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

Signature

AddPublishedEventsTemplate (

[in]String Name,

[in]DataSetMetaDataType DataSetMetaData,

[in]NodeId EventNotifier,

[in]SimpleAttributeOperand[]SelectedFields,

[in]ContentFilter Filter,

[out]NodeId DataSetNodeId

);

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.

EventNotifier

The NodeId of the Object in the event notifier tree of the OPC UA Server from which Events are collected.

SelectedFields

The selection of Event Fields contained in the DataSet generated for an Event and sent through the DataSetWriter.

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

If there is no Event field available for a field in the DataSetMetaData the browsePath field for the SimpleAttributeOperand entry shall be set to null.

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.

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 DataSet 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 235 specifies the AddressSpace representation for the AddPublishedEventsTemplate Method.

Table 235 – AddPublishedEventsTemplate Method AddressSpace definition

Attribute

Value

BrowseName

AddPublishedEventsTemplate

References

NodeClass

BrowseName

DataType

TypeDefinition

ModellingRule

HasProperty

Variable

InputArguments

Argument[]

PropertyType

Mandatory

HasProperty

Variable

OutputArguments

Argument[]

PropertyType

Mandatory

ConformanceUnits

PubSub Model PublishedDataSet Events