Figure 43depicts the ObjectTypefor the PubSub DataSetReadermodel and its components and the relations to other parts of the model.

image046.png

Figure 43– DataSet Reader Model Overview

This ObjectTypedefines receiving behaviour of DataSetMessagesand the decoding to DataSets. The DataSetReaderTypeis formally defined in Table 105.

The SubscribedDataSetTypedefined in 9.1.9.1describes the processing of the received DataSetin a Subscriber.

Table 126– DataSetReaderType Definition

Attribute

Value

BrowseName

DataSetReaderType

IsAbstract

False

References

Node Class

BrowseName

DataType

TypeDefinition

Modelling Rule

Subtype of BaseObjectType defined in Part 5

HasProperty

Variable

PublisherId

BaseDataType

PropertyType

Mandatory

HasProperty

Variable

WriterGroupId

UInt16

PropertyType

Mandatory

HasProperty

Variable

DataSetWriterId

UInt16

PropertyType

Mandatory

HasProperty

Variable

DataSetMetaData

DataSetMetaDataType

PropertyType

Mandatory

HasProperty

Variable

DataSetFieldContentMask

DataSetFieldContentMask

PropertyType

Mandatory

HasProperty

Variable

MessageReceiveTimeout

Duration

PropertyType

Mandatory

HasProperty

Variable

KeyFrameCount

UInt32

PropertyType

Mandatory

HasProperty

Variable

HeaderLayoutUri

String

PropertyType

Mandatory

HasProperty

Variable

SecurityMode

MessageSecurityMode

PropertyType

Optional

HasProperty

Variable

SecurityGroupId

String

PropertyType

Optional

HasProperty

Variable

SecurityKeyServices

EndpointDescription[]

PropertyType

Optional

HasProperty

Variable

DataSetReaderProperties

KeyValuePair[]

PropertyType

Mandatory

HasComponent

Object

TransportSettings

DataSetReader‌TransportType

Optional

HasComponent

Object

MessageSettings

DataSetReader‌MessageType

Optional

HasComponent

Object

Status

PubSubStatusType

Mandatory

HasComponent

Object

Diagnostics

PubSubDiagnostics‌DataSetReaderType

Optional

HasComponent

Object

SubscribedDataSet

Subscribed‌DataSetType

Mandatory

HasComponent

Method

CreateTargetVariables

Defined in 9.1.8.5.

Optional

HasComponent

Method

CreateDataSetMirror

Defined in 9.1.8.6.

Optional

The Properties PublisherId, WriterGroupId, DataSetWriterIdand DataSetClassIddefine filters for received NetworkMessages. If the value of the Propertyis set, it is used as filter and all messages that do not match the filter are dropped.

The PublisherIdis defined in 6.2.8.1.

The WriterGroupId is defined in 6.2.8.2.

The DataSetWriterIdis defined in 6.2.8.3.

The DataSetMetaDatais defined in 6.2.8.4. If the DataSetReaderreceives an updated DataSetMetaData, the DataSetReadershall update the Property DataSetMetaData.

The DataSetFieldContentMaskis defined in 6.2.8.5.

The MessageReceiveTimeoutis defined in 6.2.8.6.

The SecurityModeis defined in 6.2.8.7. If present or if the value is not INVALID_0, it overwrites the settings on the group.

The SecurityGroupIdis defined in 6.2.8.8.

The SecurityKeyServicesis defined in 6.2.8.9.

The DataSetReaderPropertiesis defined in 6.2.8.10.

The transport protocol mapping specific setting settings are provided in the optional Object TransportSettings. The DataSetWriterTransportTypeis defined in 9.1.8.3. The Objectshall be present if the transport protocol mapping defines specific parameters.

The message mapping specific setting settings are provided in the optional Object MessageSettings. The DataSetWriterMessageTypeis defined in 9.1.8.4. The Objectshall be present if the message mapping defines specific parameters.

The Status Objectprovides the current operational state of the DataSetReader. The PubSubStatusTypeis defined in 9.1.10. The state machine for the status and the relation to other PubSub Objectslike PubSubConnectionand PubSubGroupare defined in 6.2.1.

The Diagnostics Object provides the current diagnostic information for a DataSetReaderType Object. The PubSubDiagnosticsDataSetReaderTypeis defined in 9.1.11.12.

The SubscribedDataSet Objectcontains the metadata for the subscribed DataSetand the information for the processing of DataSetMessage. The SubscribedDataSetTypeis defined in 9.1.9.1.

This ObjectTypeis the abstract base type for Objectsdefining the transport protocol specific parameters forDataSetReaders. The DataSetReaderTransportTypeis formally defined in Table 127.

Table 127– DataSetReaderTransportType Definition

Attribute

Value

BrowseName

DataSetReaderTransportType

IsAbstract

True

References

Node Class

BrowseName

DataType

TypeDefinition

Modelling Rule

Subtype of BaseObjectType defined in Part 5

HasSubtype

ObjectType

BrokerDataSetReaderTransportType

Defined in 9.3.2.4.

This ObjectTypeis the abstract base type for Objectsrepresenting message mapping specific settingsforDataSetReaders. The DataSetReaderMessageTypeis formally defined in Table 128.

Table 128– DataSetReaderMessageType Definition

Attribute

Value

BrowseName

DataSetReaderMessageType

IsAbstract

True

References

Node Class

BrowseName

DataType

TypeDefinition

Modelling Rule

Subtype of BaseObjectType

HasSubtype

ObjectType

UadpDataSetReaderMessageType

Defined in 9.2.1.3.

HasSubtype

ObjectType

JsonDataSetReaderMessageType

Defined in 9.2.2.3.

This Methodis used to initially set the SubscribedDataSetto TargetVariablesTypeand to create the list of target Variablesof a SubscribedDataSetType.

The Clientshall be authorized to modify the configuration for the PubSubfunctionality when invoking this Methodon the Server.

Signature

CreateTargetVariables(

[in]ConfigurationVersionDataType ConfigurationVersion

[in]FieldTargetDataType[] TargetVariablesToAdd

[out] StatusCode[] AddResults

);

Argument

Description

ConfigurationVersion

Configuration version of the DataSet. The configuration version passed in through CreateTargetVariablesmust match the current configuration version in DataSetMetaData Property. If it does not match, the result Bad_InvalidState shall be returned. The ConfigurationVersionDataTypeis defined in 6.2.2.1.5.

TargetVariablesToAdd

The list of target Variablesto write received DataSetfields to. The FieldTargetDataTypeis defined in 6.2.9.2.3. The succeeded targets are added to the TargetVariables Property.

AddResults

The result codes for the Variablesto connect.

Method Result Codes

ResultCode

Description

Bad_NothingToDo

An empty list of Variableswas passed in.

Bad_InvalidState

The DataSetReaderis not configured yet or the ConfigurationVersiondoes not match the version in the Publisher.

Bad_UserAccessDenied

The Sessionuser is not allowed to configure the Object.

Operation Result Codes

ResultCode

Description

Bad_NodeIdInvalid

See OPC 10000-4for the description of this result code.

Bad_NodeIdUnknown

See OPC 10000-4for the description of this result code.

Bad_IndexRangeInvalid

See OPC 10000-4for the description of this result code.

This status code indicates either an invalid ReceiverIndexRangeor an invalid WriterIndexRangeor if the two settings result in a different size.

Bad_IndexRangeNoData

See OPC 10000-4for the description of this result code.

If the ArrayDimensionshave a fixed length that cannot change and no data exists within the range of indexes specified, Bad_IndexRangeNoData is returned in AddDataConnections.

Bad_TooManyMonitoredItems

The Serverhas reached its maximum number of items for the DataSetReaderobject.

Bad_InvalidState

The TargetNodeId is already used by another connection.

Bad_TypeMismatch

The Servershall return a Bad_TypeMismatch error if the data type of the DataSetfield is not the same type or subtype of the target Variable DataType. Based on the DataTypehierarchy, subtypes of the Variable DataTypeshall be accepted by the Server. A ByteStringis structurally the same as a one dimensional array of Byte. A Servershall accept a ByteStringif an array of Byteis expected.

This Methodis used to set the SubscribedDataSetto SubscribedDataSetMirrorTypeused to represents the fields of the DataSetas Variablesin the Subscriber Address Space. This Methodcreates an Objectbelow the SubscribedDataSet and below this Objectit creates a Variable Nodefor every field in the DataSetMetaData.

A Variablerepresenting a field of the DataSetshall be created with the following rules

The Clientshall be authorized to modify the configuration for the PubSubfunctionality when invoking this Methodon the Server.

Signature

CreateDataSetMirror(

[in]String ParentNodeName

[in]RolePermissionType[]RolePermissions

[out]NodeId ParentNodeId

);

Argument

Description

ParentNodeName

This parameter defines the BrowseName and DisplayName of the parent Nodefor the Variablesrepresenting the fields of the subscribed DataSet.

RolePermissions

Value of the RolePermissionsAttribute to be set on the parent Node. This value is also used as RolePermissionsfor all Variablesof the DataSetmirror.

ParentNodeId

NodeIdof the created parent Node.

Method Result Codes

ResultCode

Description

Bad_InvalidState

The DataSetReaderis not configured yet or the ConfigurationVersiondoes not match the version in the Publisher.

Bad_UserAccessDenied

The Sessionuser is not allowed to configure the Object.