9.1.4.5.3 AddPublishedEvents Method

This Method is used to add a PublishedEventsType Object to the DataSetFolderType Object. The configuration parameters provided with this Method are further described in the PublishedEventsType defined in 9.1.4.4.1 and the PublishedDataSetType defined in 9.1.4.2.

The settings in the EventNotifier, SelectedFields and Filter are used to configure the data acquisition for the DataSet and are used to initialize the corresponding Properties of the PublishedEventsType.

The DataSetMetaData of the PublishedDataSetType is created from metadata of the selected Event fields 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

	AddPublishedEvents (
		[in]	String				Name,
		[in]	NodeId				EventNotifier,
		[in]	String[]				FieldNameAliases,
		[in]	DataSetFieldFlags[]		FieldFlags,
		[in]	SimpleAttributeOperand[]	SelectedFields,
		[in]	ContentFilter			Filter,
		[out]	ConfigurationVersionDataType	ConfigurationVersion,
		[out]	NodeId				DataSetNodeId
		);
	
Argument Description
NameName of the DataSet Object to create.
EventNotifierThe NodeId of the Object in the event notifier tree of the OPC UA Server from which Events are collected.
FieldNameAliases

The names assigned to the selected fields in the DataSetMetaData and in the DataSetMessages for tagged message encoding. The size and the order of the array shall match the SelectedFields.

The string is used to set the name field in the FieldMetaData that is part of the DataSetMetaData.

FieldFlags

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

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

SelectedFieldsThe selection of Event Fields contained in the DataSet generated for an Event and sent through the DataSetWriter. The SimpleAttributeOperand DataType is defined in OPC 10000-4.
FilterThe filter applied to the Events. It allows the reduction of the DataSets generated from Events through a filter like filtering for a certain EventType. The ContentFilter DataType is defined in OPC 10000-4.
ConfigurationVersionReturns the initial configuration version of the PublishedDataSets.
DataSetNodeId NodeId of the created PublishedDataSets Object.

Method Result Codes

ResultCode Description
Bad_InvalidStateThe current state of the Object does not allow a configuration change.
Bad_NodeIdExistsA data set Object with the name already exists.
Bad_NodeIdUnknownThe Event notifier node is not known in the Server.
Bad_EventFilterInvalidThe Event filter is not valid.
Bad_UserAccessDeniedThe Session user is not allowed to configure the Object.
Bad_InvalidArgumentThe Server is not able to apply the Name. The Name may be too long or may contain invalid characters.

Table 260 specifies the AddressSpace representation for the AddPublishedEvents Method.

Table 260 – AddPublishedEvents Method AddressSpace definition
Attribute Value
BrowseNameAddPublishedEvents
References NodeClass BrowseName DataType TypeDefinition ModellingRule
HasPropertyVariableInputArgumentsArgument[] PropertyTypeMandatory
HasPropertyVariableOutputArgumentsArgument[] PropertyTypeMandatory
ConformanceUnits
PubSub Model PublishedDataSet Events