Errata exists for this version of the document.

This Method is used to create a PublishedDataSets Object of type PublishedDataItemsType and to add it to the DataSetFolderType Object. The configuration parameters passed in with this Method are further described in the PublishedDataItemsType defined in 9.1.4.3.1 and the PublishedDataSetType defined in 9.1.4.2.

The settings in the VariablesToAdd are used to configure the data acquisition for the DataSet and are used to initialize the PublishedData Property of the PublishedDataItemsType.

The DataSetMetaData of the PublishedDataSetType is created from meta-data of the Variables referenced in VariablesToAdd and the settings in FieldNameAliases and FieldFlags.

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

Signature

AddPublishedDataItems (

[in]String Name

[in]String[] FieldNameAliases

[in]DataSetFieldFlags[] FieldFlags

[in]PublishedVariableDataType[] VariablesToAdd

[out] NodeId DataSetNodeId

[out]ConfigurationVersionDataType ConfigurationVersion

[out] StatusCode[] AddResults

);

Argument

Description

Name

Name of the Object to create.

FieldNameAliases

The names assigned to the selected Variables for the fields in the DataSetMetaData and in the DataSetMessages for 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 FieldMetaData that is part of the DataSetMetaData.

The name shall be unique in the DataSet.

FieldFlags

The field flags assigned to the selected Variables for the fields in the DataSetMetaData. The size and the order of the array shall match the VariablesToAdd.

The flag is used to set the corresponding field in the FieldMetaData that is part of the DataSetMetaData.

VariablesToAdd

Array of Variables to add to PublishedData and 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 PublishedVariableDataType is defined in 6.2.2.6.1.

DataSetNodeId

NodeId of the created PublishedDataSets Object.

ConfigurationVersion

Returns the initial configuration version of the DataSet.

AddResults

The result codes for the variables to add.

Variables exceeding the maximum number of items in the Object are rejected with Bad_TooManyMonitoredItems.

Method Result Codes

ResultCode

Description

Bad_InvalidState

The current state of the Object does not allow a configuration change.

Bad_BrowseNameDuplicated

A data set Object with the name already exists.

Bad_UserAccessDenied

The Session user is not allowed to configure the Object.

Bad_InvalidArgument

The Server is not able to apply the Name. The Name may be too long or may contain invalid characters.

Operation Result Codes

ResultCode

Description

Bad_NodeIdInvalid

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

Bad_NodeIdUnknown

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

Bad_IndexRangeInvalid

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

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

Bad_TooManyMonitoredItems

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

Bad_DuplicateName

The passed field name alias already exists.