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]ConfigurationVersionDataTypeConfigurationVersion,

[out]NodeId DataSetNodeId

);

Argument

Description

Name

Name of the DataSet Object to create.

EventNotifier

The 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.

SelectedFields

The 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.

Filter

The 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.

ConfigurationVersion

Returns the initial configuration version of the PublishedDataSets.

DataSetNodeId

NodeId of the created PublishedDataSets Object.

Method Result Codes

ResultCode

Description

Bad_InvalidState

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

Bad_NodeIdExists

A data set Object with the name already exists.

Bad_NodeIdUnknown

The Event notifier node is not known in the Server.

Bad_EventFilterInvalid

The Event filter is not valid.

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.

Table 233 specifies the AddressSpace representation for the AddPublishedEvents Method.

Table 233 – AddPublishedEvents Method AddressSpace definition

Attribute

Value

BrowseName

AddPublishedEvents

References

NodeClass

BrowseName

DataType

TypeDefinition

ModellingRule

HasProperty

Variable

InputArguments

Argument[]

PropertyType

Mandatory

HasProperty

Variable

OutputArguments

Argument[]

PropertyType

Mandatory

ConformanceUnits

PubSub Model PublishedDataSet Events