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

ConfigurationVersion

Configuration 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.

TargetVariablesToAdd

The 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.

AddResults

The result codes for the Variables to connect.

Method Result Codes

ResultCode

Description

Bad_NothingToDo

An empty list of Variables was provided.

Bad_InvalidState

The DataSetReader is not configured yet or the ConfigurationVersion does not match the version in the Publisher.

Bad_UserAccessDenied

The 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_NoMatch

This 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_TooManyMonitoredItems

The Server has reached its maximum number of items for the DataSetReader object.

Bad_InvalidState

The TargetNodeId is already used by another connection.

Bad_TypeMismatch

The 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 267 specifies the AddressSpace representation for the CreateTargetVariables Method.

Table 267 – CreateTargetVariables Method AddressSpace definition

Attribute

Value

BrowseName

CreateTargetVariables

References

NodeClass

BrowseName

DataType

TypeDefinition

ModellingRule

HasProperty

Variable

InputArguments

Argument[]

PropertyType

Mandatory

HasProperty

Variable

OutputArguments

Argument[]

PropertyType

Mandatory

ConformanceUnits

PubSub Model SubscribedDataSet