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.