6.2.11 Information flow and status handling

6.2.11.1 Published data items

The configuration model defines different parameters that influence the information flow from Publisher to Subscriber in the case of a Bad Value Status or other error situations. Figure 25 depicts the parameters and the information flow inside a Publisher and inside a Subscriber.

The parameters and behaviour relevant for the encoding of a DataSetMessage on the Publisher side and the decoding of the DataSetMessage on the Subscriber side are defined in 6.2.4.2 together with the DataSetFieldContentMask.

Figure 25 – PubSub information flow

The mapping of source value and status to the DataSet in the Publisher depends on the substitute value. The dependencies are defined in Table 79.

Table 79 – Source to message input mapping
Source

Substitute

Value

DataSet Publisher side
Value (b) Status (a) Value Status (a)
Value 1Good_*

Value 2

Value 1Good_*
Value 1Uncertain_*Value 1Uncertain_*
IgnoredBad_*Value 2Uncertain_SubstituteValue
Value 1Good_*NullValue 1Good_*
Value 1Uncertain_*Value 1Uncertain_*
IgnoredBad_*NullBad_*

(a) If no specific StatusCode is used, the grouping into severity Good, Uncertain or Bad is used.
In this case, the resulting Status matches the input Status.

(b) Any error that happens during processing of source value e.g. DataType does not match DataSetField
should be treated like a Bad StatusCode received from the source.

The mapping of the decoded DataSet on the Subscriber side to the value and status of the target Variable depends on the override value. The dependencies are defined in Table 80.

Table 80 – Message output to target mapping
Decoded DataSet Subscriber Override Value Handling Enum

Override

Value

Reader

State

Target
Value Status (a) Value Status (a)
Value 1Good_*

OverrideValue

Value 2OperationalValue 1Good_*
Value 1Uncertain_*Value 1Uncertain_*
IgnoredBad_*Value 2Good_LocalOverride
Value 1Good_*LastUsableValueIgnoredValue 1Good_*
Value 1Uncertain_*Value 1Uncertain_*
IgnoredBad_*LastValue (b)Uncertain_LastUsableValue
Value 1Good_*DisabledIgnoredValue 1Good_*
Value 1Uncertain_*Value 1Uncertain_*
IgnoredBad_*NullBad_*

No message received.

The target values are updated once after a reader state change.

OverrideValueValue 2

Disabled

Paused

Value 2Good_LocalOverride
LastUsableValueIgnoredLastValue (b)Uncertain_LastUsableValue
DisabledIgnoredNullBad_OutOfService
OverrideValueValue 2ErrorValue 2Good_LocalOverride
LastUsableValueIgnoredLastValue (b)Uncertain_LastUsableValue
DisabledIgnoredNullBad_NoCommunication

(a) If no specific StatusCode is used, the grouping into severity Good, Uncertain or Bad is used.
In this case, the resulting Status matches the input Status.

(b) The last value is either the last received value or the default value for the data type if there was never a value received before.

If one of the target Variables in the SubscribedDataSet does not allow writing of the StatusCode and the OverrideValueHandling is set to Disabled, the DataSetReader shall indicate the configuration error by setting the DataSetReader state to Error. In all other configurations of OverrideValueHandling when the target Variable does not allow writing of the StatusCode, only the Value is transferred to the target Variable.

If a target Variable in the SubscribedDataSet does not allow writing of timestamp, any received timestamp shall not be used and only the received value shall be written to the target Variable.

6.2.11.2 Actions
6.2.11.2.1 ActionState

The ActionState is used to indicate the current state of an Action execution. It is an enumeration of the possible states. The enumeration values are described in Table 81.

Table 81 – ActionState values
NameValueDescription
Idle0The Action is waiting for activation by a Requestor
Executing1The Action is managing an Action execution.
Done2The Action was completed,
The related return values of the last Action call are available

The ActionState representation in the AddressSpace is defined in Table 82.

Table 82 – ActionState definition
Attribute Value
BrowseNameActionState
IsAbstractFalse
References Node Class BrowseName DataType TypeDefinition Others
Subtype of Enumeration defined in OPC 10000-5
HasPropertyVariableEnumStringsLocalizedText []PropertyType
Conformance Units
PubSub Parameters PublishedDataSet Action
6.2.11.2.2 Action execution sequence

The Action execution sequence and the related ActionMetaData for an Action execution through a reliable transport protocol like MQTT is described in Figure 26.

Figure 26 – Action execution sequence reliable transport

The RequestId is unique within the context of a RequestorId and CorrelationData. Each Action request in a single NetworkMessage has a different RequestId. Multiple NetworkMessages with the same RequestorId and CorrelationData may be sent.

Multiple Responses may be sent in the same NetworkMessage if the corresponding requests have the same RequestorId and CorrelationData. The grouping of requests in NetworkMessages does not affect the grouping of Responses into NetworkMessages.

The Action execution sequence for an Action execution through a non-reliable transport protocol like UDP is described in Figure 27. The related ActionMetaData is described in Figure 26. It shows the use of the ActionState for a non-reliable transport protocol. The request and response messages are send in the PublishingInterval of the Responder as long as the ActionState requires the exchange of messages for a Action execution.

The state changes for Action execution are defined in Table 83 for the Requestor and in Table 84 for the Responder.

Table 83 – Action execution state changes Requestor
Current State Condition Event State for next message
IdleStart Action executionRequestor sends Request Message with ActionState = Executing.Executing
ExecutingPublishingInterval expired and no Done or Executing received from Responder.Requestor sends Request Message again with ActionState = Executing.Executing
ExecutingReceived Done from ResponderRequestor sends Request Message with ActionState = IdleIdle
DonePublisihingInterval expire and no Idle received.Requestor sends Request Message again with ActionState = Idle.Idle
DoneReceived Idle from ResponderNone
Table 84 – Action execution state changes Responder
Current State Condition Event State for next message
IdleReceives RequestMessage for a new combination of RequestorId, CorrelationData and RequestId.Begins processing Action.Executing
ExecutingPublishingInterval expired and Action execution is still in progress.Responder sends Response Message with ActionState = Executing, Status = Good and the payload is empty.Executing
ExecutingAction execution completed.Responder sends Response Message with ActionState = Done, Status = Action result and payload provided for Good and Uncertain Status and payload is empty for Bad Status.Done
DonePublishingInterval expired and did not receive Idle from Requestor yetResponder sends Response Message again with ActionState = Done until Idle is received from the Requestor or the time duration defined by the TimeoutHint request parameter ends.Done
DoneReceived Idle from RequestorNone
Figure 27 – Action execution sequence non-reliable transport

Errors during the execution of an Action are reported in the Status of the Action response message.

For some errors such as decoding errors for the request message, addressing errors or failing security checks, the Responder does not produce a response message. Therefore the Requestor should have an internal timeout setting to stop waiting for a response message.

6.2.11.2.3 Action specific use of parameters

The Action specific use of PubSub configuration parameters is defined in Table 85.

Note that the reliability of the protocol depends on the QoS levels supported by the protocol. Any Broker-based middleware that is using a QoS of AtLeastOnce or greater is reliable (see 6.4.2.5.4). Broker-less middle is not reliable if it does not support any DatagramQoS (see 6.4.1.2.6).

Table 85 – Action specific use of parameters
PubSubComponent Parameter Description
PubSubConnectionDataTypeReaderGroupsReaders are not used for Actions.
WriterGroupDataTypePublishingInterval

The value is 0 for reliable transport protocols.

The value shall be larger than 0 for non-reliable transport protocols.

The Requestor and Responder resends Action messages that have not been acknowledged by the receiver with this frequency.

KeepAliveTimeThis value is not used and set to 0.
HeaderLayoutUri

For JSON messages the JSON-NetworkMessage header layout URI is used (see A.3.4).

For UADP messages this value is UADP-Dynamic header layout URI is used (see A.2.2).

BrokerWriterGroupTransportDataTypeQueueNameThe address that the Requestor uses to send requests to the Responder.
RequestedDelivery‌GuaranteeShall be AtLeastOnce or better
UadpWriterGroupMessageDataTypeSamplingOffsetAlways -1.
NetworkMessageContentMaskBit 0: PublisherId is always 1
JsonWriterGroupMessageDataTypeNetworkMessageContentMask

Bit 0: NetworkMessageHeader is always 1.

Bit 1: DataSetMessageHeader is always 1.

Bit 2: SingleDataSetMessage is always 0.

Bit 3: PublisherId is always 1

Bit 5: ReplyTo is is always 0.

DataSetWriterDataTypeDataSetFieldContentMaskAlways 0.
KeyFrameCountAlways 0.
DataSetNameThe name of the ActionMetaData.
UadpDataSetWriterMessageDataTypeDataSetMessageContentMask

Bit 1: PicoSeconds is always 0.

Bit 2: Status is always 1, however, it is not sent in requests.

JsonDataSetWriterMessageDataTypeDataSetMessageContentMask

Bit 2: SequenceNumber is always 0.

Bit 4: Status is always 1, however, it is not sent in requests.

Bit 5: MessageType is always 0.

Bit 8: PublisherId is always 0

DatagramWriterGroupTransport2DataTypeMessageRepeatCountAlways 0
MessageRepeatDelayAlways 0
BrokerDataSetWriterTransportDataTypeQueueNameNot used.
RequestedDelivery‌GuaranteeNot used.
MetaDataQueueNameThe address used to send ActionMetaData Messages.