9.1.8 DataSetReader model

9.1.8.1 Overview

Figure 50 depicts the ObjectType for the PubSub DataSetReader model and its components and the relations to other parts of the model.

Figure 50 – DataSet Reader model overview
9.1.8.2 DataSetReaderType

This ObjectType defines receiving behaviour of DataSetMessages and the decoding to DataSets. The DataSetReaderType is formally defined in Table 291.

The SubscribedDataSetType defined in 9.1.9.1 describes the processing of the received DataSet in a Subscriber.

Table 291 – DataSetReaderType definition
Attribute Value
BrowseNameDataSetReaderType
IsAbstractFalse
References Node Class BrowseName DataType TypeDefinition Modelling Rule
Subtype of BaseObjectType defined in OPC 10000-5
HasPropertyVariablePublisherIdBaseDataTypePropertyTypeMandatory
HasPropertyVariableWriterGroupIdUInt16PropertyTypeMandatory
HasPropertyVariableDataSetWriterIdUInt16PropertyTypeMandatory
HasPropertyVariableDataSetMetaDataDataSetMetaDataTypePropertyTypeMandatory
HasPropertyVariableDataSetFieldContentMaskDataSetFieldContentMaskPropertyTypeMandatory
HasPropertyVariableMessageReceiveTimeoutDurationPropertyTypeMandatory
HasPropertyVariableKeyFrameCountUInt32PropertyTypeMandatory
HasPropertyVariableHeaderLayoutUriStringPropertyTypeMandatory
HasPropertyVariableSecurityModeMessageSecurityModePropertyTypeOptional
HasPropertyVariableSecurityGroupIdStringPropertyTypeOptional
HasPropertyVariableSecurityKeyServicesEndpointDescription[]PropertyTypeOptional
HasPropertyVariableDataSetReaderPropertiesKeyValuePair[]PropertyTypeMandatory
HasComponentObjectTransportSettingsDataSetReader‌TransportTypeOptional
HasComponentObjectMessageSettingsDataSetReader‌MessageTypeOptional
HasComponentObjectStatusPubSubStatusTypeMandatory
HasComponentObjectDiagnosticsPubSubDiagnostics‌DataSetReaderTypeOptional
HasComponentObjectSubscribedDataSetSubscribed‌DataSetTypeMandatory
HasComponentMethodCreateTargetVariablesDefined in 9.1.8.5.Optional
HasComponentMethodCreateDataSetMirrorDefined in 9.1.8.6.Optional
Conformance Units
PubSub Model Base

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

The PublisherId is defined in 6.2.9.1.

The WriterGroupId is defined in 6.2.9.2.

The DataSetWriterId is defined in 6.2.9.3.

The DataSetMetaData is defined in 6.2.9.4. If the DataSetReader receives an updated DataSetMetaData, the DataSetReader shall update the Property DataSetMetaData.

The DataSetFieldContentMask is defined in 6.2.9.5.

The MessageReceiveTimeout is defined in 6.2.9.6.

The KeyFrameCount is defined in 6.2.9.7.

The HeaderLayoutUri is defined in 6.2.9.8.

The SecurityMode is defined in 6.2.9.9. If present or if the value is not INVALID, it overwrites the settings on the group.

The SecurityGroupId is defined in 6.2.9.10.

The SecurityKeyServices is defined in 6.2.9.11.

The DataSetReaderProperties is defined in 6.2.9.12.

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

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

The Status Object provides the current operational state of the DataSetReader. The PubSubStatusType is defined in 9.1.10. The state machine for the status and the relation to other PubSub Objects like PubSubConnection and PubSubGroup are defined in 6.2.1.

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

The SubscribedDataSet Object contains the metadata for the subscribed DataSet and the information for the processing of a DataSetMessage. The SubscribedDataSetType and the available subtypes are defined in 9.1.9. If the DataSetReader is configured to receive heartbeat DataSetMessages, the Object shall be of the base type SubscribedDataSetType.

9.1.8.3 DataSetReaderTransportType

This ObjectType is the abstract base type for Objects defining the transport protocol-specific parameters for DataSetReaders. The DataSetReaderTransportType is formally defined in Table 292.

Table 292 – DataSetReaderTransportType definition
Attribute Value
BrowseNameDataSetReaderTransportType
IsAbstractTrue
References NodeClass BrowseName DataType TypeDefinition ModellingRule
Subtype of BaseObjectType defined in OPC 10000-5
Conformance Units
PubSub Model Base
9.1.8.4 DataSetReaderMessageType

This ObjectType is the abstract base type for Objects representing message mapping specific settings for DataSetReaders. The DataSetReaderMessageType is formally defined in Table 293.

Table 293 – DataSetReaderMessageType definition
Attribute Value
BrowseNameDataSetReaderMessageType
IsAbstractTrue
References NodeClass BrowseName DataType TypeDefinition ModellingRule
Subtype of BaseObjectType defined in OPC 10000-5
Conformance Units
PubSub Model Base
9.1.8.5 CreateTargetVariables Method

This Method is used to initially set the SubscribedDataSet to TargetVariablesType and to create the list of target Variables of a SubscribedDataSetType.

The Client shall be authorized to modify the configuration for the PubSub functionality when invoking this Method on the Server.

Signature

	CreateTargetVariables (
		[in]	ConfigurationVersionDataType		ConfigurationVersion,
		[in]	FieldTargetDataType[]			TargetVariablesToAdd,
		[out] StatusCode[]				AddResults
		);
	
Argument Description
ConfigurationVersionConfiguration version of the DataSet. The configuration version passed through CreateTargetVariables shall match the current configuration version in DataSetMetaData Property. If it does not match, the result Bad_InvalidState shall be returned. The ConfigurationVersionDataType is defined in 6.2.3.2.6.
TargetVariablesToAddThe list of target Variables to write received DataSet fields to. The FieldTargetDataType is defined in 6.2.10.2.3. The succeeded targets are added to the TargetVariables Property.
AddResultsThe result codes for the Variables to connect.

Method Result Codes

ResultCode Description
Bad_NothingToDo An empty list of Variables was provided.
Bad_InvalidStateThe DataSetReader is not configured yet or the ConfigurationVersion does not match the version in the Publisher.
Bad_UserAccessDeniedThe Session user is not allowed to configure the Object.

Operation Result Codes

ResultCode Description
Bad_NodeIdInvalid

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

This status code is related to the TargetNodeId.

Bad_NodeIdUnknown

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

This status code is related to the TargetNodeId.

Bad_AttributeIdInvalid

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

This status code is related to the AttributeId.

Bad_NoMatchThis status code indicates that the DataSetFieldId is invalid.
Bad_IndexRangeInvalid

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

This status code indicates either an invalid ReceiverIndexRange or an invalid WriterIndexRange or if the two settings result in a different size.

Bad_IndexRangeNoData

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

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

Bad_TooManyMonitoredItemsThe Server has reached its maximum number of items for the DataSetReader object.
Bad_InvalidStateThe TargetNodeId is already used by another connection.
Bad_TypeMismatchThe Server shall return a Bad_TypeMismatch error if the data type of the DataSet field is not the same type or subtype as the target Variable DataType. Based on the DataType hierarchy, subtypes of the Variable DataType shall be accepted by the Server. A ByteString is structurally the same as a one dimensional array of Byte. A Server shall accept a ByteString if an array of Byte is expected.

Table 294 specifies the AddressSpace representation for the CreateTargetVariables Method.

Table 294 – CreateTargetVariables Method AddressSpace definition
Attribute Value
BrowseNameCreateTargetVariables
References NodeClass BrowseName DataType TypeDefinition ModellingRule
HasPropertyVariableInputArgumentsArgument[] PropertyTypeMandatory
HasPropertyVariableOutputArgumentsArgument[] PropertyTypeMandatory
ConformanceUnits
PubSub Model SubscribedDataSet
9.1.8.6 CreateDataSetMirror Method

This Method is used to set the SubscribedDataSet to SubscribedDataSetMirrorType used to represents the fields of the DataSet as Variables in the Subscriber Address Space. This Method creates an Object below the SubscribedDataSet and below this Object it creates a Variable Node for every field in the DataSetMetaData. The detailed rules for the Object creation are defined in 9.1.9.3.

If the SubscribedDataSet already has a specific subtype, this subtype is replaced with a SubscribedDataSetMirrorType instance.

The Client shall be authorized to modify the configuration for the PubSub functionality when invoking this Method on the Server.

Signature

	CreateDataSetMirror (
		[in]	String			ParentNodeName,
		[in]	RolePermissionType[]	RolePermissions,
		[out]	NodeId			ParentNodeId
		);
	
Argument Description
ParentNodeNameThis parameter defines the BrowseName and DisplayName of the parent Node for the Variables representing the fields of the subscribed DataSet.
RolePermissionsValue of the RolePermissions Attribute to be set on the parent Node. This value is also used as RolePermissions for all Variables of the DataSet mirror.
ParentNodeId NodeId of the created parent Node.

Method Result Codes

ResultCode Description
Bad_InvalidStateThe DataSetReader is not configured yet or the ConfigurationVersion does not match the version in the Publisher.
Bad_UserAccessDeniedThe Session user is not allowed to configure the Object.

Table 295 specifies the AddressSpace representation for the CreateDataSetMirror Method.

Table 295 – CreateDataSetMirror Method AddressSpace definition
Attribute Value
BrowseNameCreateDataSetMirror
References NodeClass BrowseName DataType TypeDefinition ModellingRule
HasPropertyVariableInputArgumentsArgument[] PropertyTypeMandatory
HasPropertyVariableOutputArgumentsArgument[] PropertyTypeMandatory
ConformanceUnits
PubSub Model SubscribedDataSet Mirror