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

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



[in]ConfigurationVersionDataType ConfigurationVersion

[in]String[] FieldNameAliases

[in]Boolean[] PromotedFields

[in]PublishedVariableDataType[] VariablesToAdd

[out]ConfigurationVersionDataType NewConfigurationVersion

[out] StatusCode[] AddResults





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


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.


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.


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

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


Returns the new configuration version of the PublishedDataSet.


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




An empty list of variables was passed in.


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


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


The Sessionuser is not allowed to configure the object.

Operation Result Codes




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


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


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


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.


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