7.6 MachineEngineDeliveryType definition
7.6.1 Overview
The MachineEngineDeliveryType provides functionality to request a delivery (by the payment service) as well as exposes the status of the delivery (displayed by the UI). It is formally defined in Table 20.
7.6.2 ObjectType definition
| Attribute | Value | ||||
| BrowseName | MachineEngineDeliveryType | ||||
| IsAbstract | False | ||||
| References | Node Class | BrowseName | DataType | TypeDefinition | Other |
|---|---|---|---|---|---|
| Subtype of the 0:BaseObjectType | |||||
| 0:HasComponent | Variable | DeliveryRequests | DeliveryRequestDataType[] | 0:BaseDataVariableType | M |
| 0:HasComponent | Variable | DeliveryProgress | DeliveryProgressDataType[] | 0:BaseDataVariableType | M |
| 0:HasComponent | Method | Deliver | M | ||
| 0:HasComponent | Method | StopDelivery | M | ||
| Conformance Units | |||||
|---|---|---|---|---|---|
| UnattendedRetail MachineEngine | |||||
The DeliveryRequests Variable is an array that contains all delivery requests that have recently been added to the machine engine. It shall contain all delivery requests that are currently executing or are queued for execution. It is up to the implementation when the finished delivery requests get removed from the array. The simplest implementation just manages one entry and disallows a new delivery request while there is already one in execution. The DataType is defined in 8.3.
The DeliveryProgress Variable is an array that contains the progress information of delivery requests that are currently in execution or have recently been executed. It shall have one entry for each delivery request entry in the DeliveryRequests Variable. The DataType is defined in 8.5. It is up to the implementation how often to update the ProgressInPercent of a delivery progress entry. When the Status is changing, the entry of a delivery progress shall change.
7.6.3 Deliver Method
The Deliver Method puts a delivery request into the machine engine. When successfully executed, the delivery request shall be added to the DeliveryRequests Variable, and, considering the internal logic of the machine engine with respect to the order of the delivery requests, being executed. The status of the execution shall be reflected in the DeliveryProgress Variable.
If the execution of the Method cannot be done due to some application logic, the Method should return an Uncertain StatusCode and provide details of the failure in the Status output Argument. When the Method returns an Uncertain StatusCode, the Method is considered to be failed, and no entries are added to the DeliveryRequests and DeliveryProgress Variables.
The signature of this Method is specified below. Table 21 and Table 22 specify the Arguments and AddressSpace representation, respectively.
Signature
Deliver (
[in] 0:String SelectionId,
[in] OptionSelectionDataType[] Options,
[in] 0:UInt64 TransactionId,
[out] 0:Int32 Status);| Argument | Description |
| SelectionId | SelectionId of the order. Method execution shall fail, if SelectionId not in the SelectionList of the Capabilities Object. |
| Options | List of selected options for the SelectionId. May be an empty array, if no option is selected. The option shall be allowed for the SelectionId as defined in the SelectionList of the Capabilities Object. |
| TransactionId | A unique identifier given into the machine engine that uniquely identifies the deliver request. It shall be used as the TransactionId in the DeliveryRequests and the DeliveryProgress Variables. The TransactionId shall only be used by the machine engine if the method returns successful (StatusCode is Good and Status is 0). |
| Status | Status of the execution of the method. If issues occurred during execution. 0 = Execution was successful -1 = Invalid SelectionId -2 = Invalid Options -3 = Invalid TransactionId - duplicate -4 = Cannot execute delivery Vendors may return a vendor specific status starting with number -16 or smaller. |
Method Result Codes (defined in Call Service)
| Result Code | Description |
| Bad_UserAccessDenied | See OPC 10000-4 for a general description. |
| Attribute | Value | ||||
| BrowseName | Deliver | ||||
| References | NodeClass | BrowseName | DataType | TypeDefinition | ModellingRule |
|---|---|---|---|---|---|
| 0:HasProperty | Variable | 0:InputArguments | 0:Argument[] | 0:PropertyType | 0:Mandatory |
| 0:HasProperty | Variable | 0:OutputArguments | 0:Argument[] | 0:PropertyType | 0:Mandatory |
7.6.4 StopDelivery Method
The StopDelivery Method stops the physical delivery of a TransactionId, that has already been started. When executed, the delivery is still counted to be successfully delivered. The StopDelivery may be called by the UI, when for example a cup is overflowing with a coffee delivery.
If the execution of the Method cannot be done due to some application logic, the Method should return an Uncertain StatusCode and provide details of the failure in the Status output Argument. When the Method returns an Uncertain StatusCode, the Method is considered to be failed and the delivery was not stopped.
The signature of this Method is specified below. Table 23 and Table 24 specify the Arguments and AddressSpace representation, respectively.
Signature
StopDelivery (
[in] 0:UInt64 TransactionId,
[out] 0:Int32 Status);| Argument | Description |
| TransactionId | Unique identifier representing a deliver request |
| Status | Status of the execution of the method. If issues occurred during execution. 0 = Execution was successful. -1 = Invalid TransactionId. -2 = Invalid status of TransactionId - delivery already finished -3 = Invalid status of TransactionId - delivery not started -4 = Selection does not support stopping Vendors may return a vendor specific status starting with number -16 or smaller. |
Method Result Codes (defined in Call Service)
| Result Code | Description |
| Bad_UserAccessDenied | See OPC 10000-4 for a general description. |
| Attribute | Value | ||||
| BrowseName | StopDelivery | ||||
| References | NodeClass | BrowseName | DataType | TypeDefinition | ModellingRule |
|---|---|---|---|---|---|
| 0:HasProperty | Variable | 0:InputArguments | 0:Argument[] | 0:PropertyType | 0:Mandatory |
| 0:HasProperty | Variable | 0:OutputArguments | 0:Argument[] | 0:PropertyType | 0:Mandatory |