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 Client shall be authorized to modify the configuration for the PubSub functionality when invoking this Method on the Server.

Signature

AddPublishedDataItemsTemplate (

[in]String Name

[in]DataSetMetaDataType DataSetMetaData

[in]PublishedVariableDataType[] VariablesToAdd

[out] NodeId DataSetNodeId

[out] StatusCode[] AddResults

);

Argument

Description

Name

Name of the Object to create.

DataSetMetaData

The DataSetMetaData predefined by the caller. The initial setting shall not be changed by the Publisher. If the dataSetClassId of the DataSetMetaData is not null, the DataSetClassId Property of the PublishedDataSetType shall be created and initialized with the dataSetClassId value.

The name of the PublishedDataSet Object is defined by the name in the DataSetMetaData.

VariablesToAdd

Array of variable settings for the data acquisition for the fields in the DataSetMetaData.

The size of the array shall match the size of the fields array in the DataSetMetaData.

The substituteValue in the VariablesToAdd entries shall be configured.

For failed variables the publishedVariable field of entry in the resulting PublishedData Property shall be set to a null NodeId.

If there is no Variable available for a field in the DataSetMetaData the publishedVariable field for the entry shall be set to a null NodeId.

The PublishedVariableDataType is defined in 6.2.2.6.1.

DataSetNodeId

NodeId of the created PublishedDataSets Object.

AddResults

The result codes for the variables to add.

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 VariablesToAdd parameter does not match the array size of the fields in the DataSetMetaData or the configuration of the VariablesToAdd contains invalid settings.

Bad_TooManyMonitoredItems

The Object cannot be created since the number of items in the PublishedDataSet exceeds the capabilities of the Publisher.

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.