This Methodis used to add a PublishedEventsType Objectto the DataSetFolderType Object. The configuration parameters passed in with this Methodare further described in the PublishedEventsTypedefined in 9.1.4.4.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

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

EventNotifier

The NodeIdof the Objectin the event notifier tree of the OPC UA Serverthat is used to collect Eventsfrom.

SelectedFields

The selection of Event Fields contained in the DataSetgenerated for an Eventand sent through the DataSetWriter.

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

If there is no Eventfield available for a field in the DataSetMetaDatathe browsePathfield for the SimpleAttributeOperandentry shall be set to null.

The SimpleAttributeOperand DataTypeis defined in OPC 10000-4.

Filter

The filter applied to the Events. It allows the reduction of the DataSetsgenerated from Eventsthrough a filter like filtering for a certain EventType. The ContentFilter DataTypeis defined in OPC 10000-4.

DataSetNodeId

NodeIdof the created PublishedDataSets Object.

Method Result Codes

ResultCode

Description

Bad_InvalidState

The current state of the Objectdoes not allow a configuration change.

Bad_NodeIdExists

A DataSet Objectwith the name already exists.

Bad_NodeIdUnknown

The Eventnotifier node is not known in the Server.

Bad_EventFilterInvalid

The Eventfilter is not valid.

Bad_UserAccessDenied

The Sessionuser is not allowed to configure the Object.

Bad_InvalidArgument

The Serveris not able to apply the Name. The Namemay be too long or may contain invalid characters.