9.1.9.2 Target Variables
9.1.9.2.1 TargetVariablesType

This ObjectType defines the metadata for the subscribed DataSet and the information for the processing of DataSetMessages. The TargetVariablesType is formally defined in Table 297.

Table 297 – TargetVariablesType definition
Attribute Value
BrowseNameTargetVariablesType
IsAbstractFalse
References NodeClass BrowseName DataType TypeDefinition ModellingRule
Subtype of SubscribedDataSetType defined in 9.1.9.1.
HasPropertyVariableTargetVariablesFieldTarget‌DataType[]PropertyTypeMandatory
HasComponentMethodAddTargetVariablesDefined in 9.1.9.2.2.Optional
HasComponentMethodRemoveTargetVariablesDefined in 9.1.9.2.3.Optional
Conformance Units
PubSub Model SubscribedDataSet

The TargetVariables is defined in 6.2.10.2.

9.1.9.2.2 AddTargetVariables Method

This Method is used to add target Variables to an existing list of target Variables of a TargetVariablesType Object.

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

Signature

	AddTargetVariables (
		[in]	ConfigurationVersionDataType		ConfigurationVersion,
		[in]	FieldTargetDataType[]			TargetVariablesToAdd,
		[out]	StatusCode[]				AddResults
		);
	
Argument Description
ConfigurationVersionConfiguration version of the DataSet. The configuration version passed through AddDataConnections 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 connections 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.
Bad_NodeIdUnknownSee OPC 10000-4 for the description of this result code.
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 target Variable.
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 298 specifies the AddressSpace representation for the AddTargetVariables Method.

Table 298 – AddTargetVariables Method AddressSpace definition
Attribute Value
BrowseNameAddTargetVariables
References NodeClass BrowseName DataType TypeDefinition ModellingRule
HasPropertyVariableInputArgumentsArgument[] PropertyTypeMandatory
HasPropertyVariableOutputArgumentsArgument[] PropertyTypeMandatory
ConformanceUnits
PubSub Model SubscribedDataSet
9.1.9.2.3 RemoveTargetVariables Method

This Method is used to remove entries from the list of target Variables of a TargetVariablesType Object.

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

Signature

	RemoveTargetVariables (
		[in]	ConfigurationVersionDataType		ConfigurationVersion,
		[in]	UInt32[]					TargetsToRemove,
		[out]	StatusCode[]				RemoveResults
		);
	
Argument Description
ConfigurationVersionConfiguration version of the DataSet. The configuration version passed through RemoveTargetVariables 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.
TargetsToRemoveArray of indices of connections to remove from the list of target Variables.
RemoveResultsThe result codes for the connections to remove.

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 DataSetMetaData.
Bad_UserAccessDeniedThe Session user is not allowed to configure the Object.

Operation Result Codes

ResultCode Description
Bad_InvalidArgument The provided index is invalid.

Table 299 specifies the AddressSpace representation for the RemoveTargetVariables Method.

Table 299 – RemoveTargetVariables Method AddressSpace definition
Attribute Value
BrowseNameRemoveTargetVariables
References NodeClass BrowseName DataType TypeDefinition ModellingRule
HasPropertyVariableInputArgumentsArgument[] PropertyTypeMandatory
HasPropertyVariableOutputArgumentsArgument[] PropertyTypeMandatory
ConformanceUnits
PubSub Model SubscribedDataSet