This Methodis used to create a PublishedDataSets Objectof type PublishedDataItemsType and to add it to the DataSetFolderType Object. The configuration parameters passed in with this Methodare further described in the PublishedDataItemsTypedefined in 9.1.4.3.1and the PublishedDataSetTypedefined in 9.1.4.2.

The Clientshall be authorized to modify the configuration for the PubSubfunctionality when invoking this Methodon 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 Objectto create.

DataSetMetaData

The DataSetMetaDatapredefined by the caller. The initial setting shall not be changed by the Publisher. If the dataSetClassIdof the DataSetMetaDatais not null, the DataSetClassId Propertyof the PublishedDataSetTypeshall be created and initialized with the dataSetClassId value.

The name of the PublishedDataSet Objectis 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 fieldsarray in the DataSetMetaData.

The substituteValuein the VariablesToAddentries shall be configured.

For failed variables the publishedVariablefield of entry in the resulting PublishedData Propertyshall be set to a null NodeId.

If there is no Variableavailable for a field in the DataSetMetaDatathe publishedVariablefield for the entry shall be set to a null NodeId.

The PublishedVariableDataTypeis defined in 6.2.2.6.1.

DataSetNodeId

NodeIdof 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 Objectdoes not allow a configuration change.

Bad_BrowseNameDuplicated

A data set Objectwith the name already exists.

Bad_UserAccessDenied

The Sessionuser is not allowed to configure the Object.

Bad_InvalidArgument

The VariablesToAddparameter does not match the array size of the fields in the DataSetMetaDataor the configuration of the VariablesToAddcontains invalid settings.

Bad_TooManyMonitoredItems

The Objectcannot be created since the number of items in the PublishedDataSetexceeds the capabilities of the Publisher.

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_TooManyMonitoredItems

The Serverhas reached its maximum number of items for the PublishedDataItemsType Object.

Bad_DuplicateName

The passed field name alias already exists.