The PublishedDataItemsTypeis used to select a list of OPC UA Variablesas the source for the creation of DataSetssent through one or more DataSetWriters.

The PublishedDataItemsTypeis formally defined Table 109.

Table 109– PublishedDataItemsType Definition

Attribute

Value

BrowseName

PublishedDataItemsType

IsAbstract

False

References

Node Class

BrowseName

DataType

TypeDefinition

Modelling Rule

Subtype of PublishedDataSetType defined in 9.1.4.2.

HasProperty

Variable

PublishedData

PublishedVariable‌DataType[]

PropertyType

Mandatory

HasComponent

Method

AddVariables

Defined in 9.1.4.3.2.

Optional

HasComponent

Method

RemoveVariables

Defined in 9.1.4.3.3.

Optional

The PublishedDataItemsType ObjectTypeis a concrete type and can be used directly.

The PublishedDatais defined in 6.2.2.6.1. Existing entries in the array can be changed by writing the new settings to the Variable Value. A new Valueshall be rejected with Bad_OutOfRange if the array size would be changed. Entries in the array can be added and removed with the Methods AddVariablesand RemoveVariables.

The index into the list of entries in the PublishedDatahas an important role for Subscribersand for configuration tools. It is used as a handle to reference the entry in configuration actions like RemoveVariableor the Valuein DataSetMessagesreceived by Subscribers. The index may change after configuration changes. Changes are indicated by the ConfigurationVersionand applications working with the index shall always check the ConfigurationVersionbefore using the index.

This Methodis used to add Variablesto the PublishedData Property. The PublishedDatacontains a list of published Variablesof a PublishedDataItemsType Object. The information provided in the input Arguments and information available for the added Variables is also used to create the content of the DataSetMetaData Property. The mapping to the DataSetMetaDatais described for the input Arguments.

Variablesshall be added at the end of the list in PublishedData. This ensures that Subscribersare only affected by the change if they are interested in the added Variables.

If at least one Variablewas added to the PublishedData, the MinorVersionof the ConfigurationVersionshall be updated. The ConfigurationVersionDataTypeand the rules for setting the version are defined in 6.2.2.1.5.

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

Signature

AddVariables(

[in]ConfigurationVersionDataType ConfigurationVersion

[in]String[] FieldNameAliases

[in]Boolean[] PromotedFields

[in]PublishedVariableDataType[] VariablesToAdd

[out]ConfigurationVersionDataType NewConfigurationVersion

[out] StatusCode[] AddResults

);

Argument

Description

ConfigurationVersion

Configuration version of the DataSet. The configuration version must match the entire current configuration version of the Objectwhen the Methodcall is processed. If it does not match, the result Bad_InvalidState shall be returned.

The ConfigurationVersionDataTypeis defined in 6.2.2.1.5.

FieldNameAliases

The names assigned to the selected Variablesfor the fields in the DataSetMetaDataand in the DataSetMessagesfor tagged message encoding. The size and the order of the array shall match the VariablesToAdd.

The string shall be used to set the name field in the FieldMetaDatathat is part of the DataSetMetaData.

PromotedFields

The flags indicating if the corresponding field is promoted to the DataSetMessageheader. The size and the order of the array shall match the VariablesToAdd.

The flag is used to set the PromotedFieldflag in the fieldFlagsparameter in the FieldMetaData.

VariablesToAdd

Array of Variablesto add to PublishedDataand the related configuration settings. Successfully added variables are appended to the end of the list of published variables configured in the PublishedData Property. Failed variables are not added to the list.

The PublishedVariableDataTypeis defined in 6.2.2.6.1.

The parameters builtInType, dataType, valueRankand arrayDimensionsof the FieldMetaDataare filled from corresponding Variable Attributes.

NewConfigurationVersion

Returns the new configuration version of the PublishedDataSet.

AddResults

The result codes for the variables to add.

Variables exceeding the maximum number of items in the Objectare rejected with Bad_TooManyVariables.

Method Result Codes

ResultCode

Description

Bad_NothingToDo

An empty list of variables was passed in.

Bad_InvalidState

The configuration version did not match the current state of the object.

Bad_NotWritable

The DataSetis based on a DataSetClassand the size of the PublishedDataarray cannot be changed.

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.

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 AddVariables. Otherwise, if the length of the array is dynamic, the Publishershall insert this status in a DataSetif no data exists within the range.

Bad_TooManyVariables

The Publisherhas reached its maximum number of items for the PublishedDataItemsTypeobject.

This Methodis used to remove Variablesfrom the PublishedDatalist. It contains the list of published Variablesof a PublishedDataItemsType Object.

A caller shall read the current Values of PublishedDataand ConfigurationVersionprior to calling this Method, to ensure the use of the correct index of the Variablesthat are being removed.

If at least one Variablewas successfully removed from the PublishedData, the MajorVersionof the ConfigurationVersionshall be updated. The ConfigurationVersionDataTypeand the rules for setting the version are defined in 6.2.2.1.5.

The order of the remaining Variablesin the PublishedDatashall be preserved.

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

Signature

RemoveVariables(

[in]ConfigurationVersionDataType ConfigurationVersion

[in]UInt32[] VariablesToRemove

[out]ConfigurationVersionDataType NewConfigurationVersion

[out] StatusCode[] RemoveResults

);

Argument

Description

ConfigurationVersion

Configuration version of the DataSet. The configuration version and the indices passed in through VariablesToRemovemust match the entire current configuration version of the Objectwhen the Methodcall is processed. If it does not match, the result Bad_InvalidState shall be returned. The ConfigurationVersionDataTypeis defined in 6.2.2.1.5.

VariablesToRemove

Array of indices of Variables to remove from the list of Variablesconfigured in PublishedDataof the PublishedDataItemsType. This matches the list of fields configured in the DataSetMetaDataof the PublishedDataSetType.

NewConfigurationVersion

Returns the new configuration version of the DataSet.

RemoveResults

The result codes for each of the variables to remove.

Method Result Codes

ResultCode

Description

Bad_NothingToDo

An empty list of variables was passed in.

Bad_InvalidState

The configuration version did not match the current state of the Object.

Bad_UserAccessDenied

The Sessionuser is not allowed to configure the Object.

Operation Result Codes

ResultCode

Description

Bad_InvalidArgument

The passed index was invalid.