9.1.4.5.4 AddPublishedDataItemsTemplate Method

This Method is used to create a PublishedDataSets Object of type PublishedDataItemsType and to add it to the DataSetFolderType Object. The configuration parameters provided 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
NameName 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.3.7.1.

DataSetNodeId NodeId of the created PublishedDataSets Object.
AddResultsThe result codes for the variables to add.

Method Result Codes

ResultCode Description
Bad_InvalidStateThe current state of the Object does not allow a configuration change.
Bad_BrowseNameDuplicatedA data set Object with the name already exists.
Bad_UserAccessDeniedThe Session user is not allowed to configure the Object.
Bad_InvalidArgumentThe VariablesToAdd parameter does not match the array size of the fields in the DataSetMetaData or the configuration of the VariablesToAdd contains invalid settings.
Bad_TooManyMonitoredItemsThe 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_NodeIdUnknownSee OPC 10000-4 for the description of this result code.
Bad_IndexRangeInvalidSee 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_TooManyMonitoredItemsThe Server has reached its maximum number of items for the PublishedDataItemsType Object.
Bad_DuplicateNameThe passed field name alias already exists.

Table 261 specifies the AddressSpace representation for the AddPublishedDataItemsTemplate Method.

Table 261 – AddPublishedDataItemsTemplate Method AddressSpace definition
Attribute Value
BrowseNameAddPublishedDataItemsTemplate
References NodeClass BrowseName DataType TypeDefinition ModellingRule
HasPropertyVariableInputArgumentsArgument[] PropertyTypeMandatory
HasPropertyVariableOutputArgumentsArgument[] PropertyTypeMandatory
ConformanceUnits
PubSub Model PublishedDataSet