Skip to content

Reference

OpcEventNode Members

Defines a generic base class for all general characteristics of an OPC UA Event.

Reference

OpcEventNode Members ​

Type
OpcEventNode
Namespace
Opc.UaFx
Assembly
Opc.UaFx.Advanced.dll
Package
Opc.UaFx.Advanced v2.59.0

Inherits members from OpcObjectNode, OpcInstanceNode, OpcNode.

Constructors ​

OpcEventNode ​

10 overloads

OverloadDescription
OpcEventNode(OpcName)Initializes a new instance of the OpcEventNode class accessible by the name specified.
OpcEventNode(OpcName, OpcNodeId)Initializes a new instance of the OpcEventNode class accessible by the name and id specified.
OpcEventNode(IOpcNode, OpcName)Initializes a new instance of the OpcEventNode class accessible by the name specified as a child node of the parent node given.
OpcEventNode(IOpcNode, OpcName, OpcNodeId)Initializes a new instance of the OpcEventNode class accessible by the name and id specified as a child node of the parent node given.
OpcEventNode(BaseEventState)protected · since v2.50Initializes a new instance of the OpcEventNode class using the content as the instance to wrap.
OpcEventNode(BaseEventState, OpcNodeModel)protected · since v2.50Initializes a new instance of the OpcEventNode class using the content as the instance to wrap.
OpcEventNode(OpcNodeModel, OpcName)protected · since v2.50Initializes a new instance of the OpcEventNode class accessible by the name specified.
OpcEventNode(OpcNodeModel, OpcName, OpcNodeId)protected · since v2.50Initializes a new instance of the OpcEventNode class accessible by the name and id specified.
OpcEventNode(OpcNodeModel, IOpcNode, OpcName)protected · since v2.50Initializes a new instance of the OpcEventNode class accessible by the name specified as a child node of the parent node given.
OpcEventNode(OpcNodeModel, IOpcNode, OpcName, OpcNodeId)protected · since v2.50Initializes a new instance of the OpcEventNode class accessible by the name and id specified as a child node of the parent node given.

OpcEventNode(OpcName) ​

Initializes a new instance of the OpcEventNode class accessible by the name specified.

csharp
public OpcEventNode(OpcName name)
vbnet
Public Sub New(name As OpcName)

Parameters

NameTypeDescription
nameOpcNameThe OpcName through that the new event node can be accessed.

OpcEventNode(OpcName, OpcNodeId) ​

Initializes a new instance of the OpcEventNode class accessible by the name and id specified.

csharp
public OpcEventNode(OpcName name, OpcNodeId id)
vbnet
Public Sub New(name As OpcName, id As OpcNodeId)

Parameters

NameTypeDescription
nameOpcNameThe OpcName through that the new event node can be accessed.
idOpcNodeIdThe OpcNodeId through that the new event node can be identified and accessed.

OpcEventNode(IOpcNode, OpcName) ​

Initializes a new instance of the OpcEventNode class accessible by the name specified as a child node of the parent node given.

csharp
public OpcEventNode(IOpcNode parent, OpcName name)
vbnet
Public Sub New(parent As IOpcNode, name As OpcName)

Parameters

NameTypeDescription
parentIOpcNodeThe IOpcNode used as the parent node or a null reference (Nothing in Visual Basic) in the case there is no parent node available.
nameOpcNameThe OpcName through that the new event node can be accessed.

OpcEventNode(IOpcNode, OpcName, OpcNodeId) ​

Initializes a new instance of the OpcEventNode class accessible by the name and id specified as a child node of the parent node given.

csharp
public OpcEventNode(IOpcNode parent, OpcName name, OpcNodeId id)
vbnet
Public Sub New(parent As IOpcNode, name As OpcName, id As OpcNodeId)

Parameters

NameTypeDescription
parentIOpcNodeThe IOpcNode used as the parent node or a null reference (Nothing in Visual Basic) in the case there is no parent node available.
nameOpcNameThe OpcName through that the new event node can be accessed.
idOpcNodeIdThe OpcNodeId through that the new event node can be identified and accessed.

OpcEventNode(BaseEventState) ​

protected · since v2.50

Initializes a new instance of the OpcEventNode class using the content as the instance to wrap.

csharp
protected OpcEventNode(BaseEventState content)
vbnet
Protected Sub New(content As BaseEventState)

Parameters

NameTypeDescription
contentBaseEventStateThe BaseEventState to wrap.

Exceptions

ExceptionCondition
ArgumentNullExceptionThe content is a null reference (Nothing in Visual Basic).

OpcEventNode(BaseEventState, OpcNodeModel) ​

protected · since v2.50

Initializes a new instance of the OpcEventNode class using the content as the instance to wrap.

csharp
protected OpcEventNode(BaseEventState content, OpcNodeModel model)
vbnet
Protected Sub New(content As BaseEventState, model As OpcNodeModel)

Parameters

NameTypeDescription
contentBaseEventStateThe BaseEventState to wrap.
modelOpcNodeModelThe OpcNodeModel which defines the modelling directives for the new node or a null reference (Nothing in Visual Basic) if there are no directives are to be applied to the node.

Exceptions

ExceptionCondition
ArgumentNullExceptionThe content is a null reference (Nothing in Visual Basic).

OpcEventNode(OpcNodeModel, OpcName) ​

protected · since v2.50

Initializes a new instance of the OpcEventNode class accessible by the name specified.

csharp
protected OpcEventNode(OpcNodeModel model, OpcName name)
vbnet
Protected Sub New(model As OpcNodeModel, name As OpcName)

Parameters

NameTypeDescription
modelOpcNodeModelThe OpcNodeModel which defines the modelling directives for the new node or a null reference (Nothing in Visual Basic) if there are no directives are to be applied to the node.
nameOpcNameThe OpcName through that the new event node can be accessed.

OpcEventNode(OpcNodeModel, OpcName, OpcNodeId) ​

protected · since v2.50

Initializes a new instance of the OpcEventNode class accessible by the name and id specified.

csharp
protected OpcEventNode(OpcNodeModel model, OpcName name, OpcNodeId id)
vbnet
Protected Sub New(model As OpcNodeModel, name As OpcName, id As OpcNodeId)

Parameters

NameTypeDescription
modelOpcNodeModelThe OpcNodeModel which defines the modelling directives for the new node or a null reference (Nothing in Visual Basic) if there are no directives are to be applied to the node.
nameOpcNameThe OpcName through that the new event node can be accessed.
idOpcNodeIdThe OpcNodeId through that the new event node can be identified and accessed.

OpcEventNode(OpcNodeModel, IOpcNode, OpcName) ​

protected · since v2.50

Initializes a new instance of the OpcEventNode class accessible by the name specified as a child node of the parent node given.

csharp
protected OpcEventNode(OpcNodeModel model, IOpcNode parent, OpcName name)
vbnet
Protected Sub New(model As OpcNodeModel, parent As IOpcNode, name As OpcName)

Parameters

NameTypeDescription
modelOpcNodeModelThe OpcNodeModel which defines the modelling directives for the new node or a null reference (Nothing in Visual Basic) if there are no directives are to be applied to the node.
parentIOpcNodeThe IOpcNode used as the parent node or a null reference (Nothing in Visual Basic) in the case there is no parent node available.
nameOpcNameThe OpcName through that the new event node can be accessed.

OpcEventNode(OpcNodeModel, IOpcNode, OpcName, OpcNodeId) ​

protected · since v2.50

Initializes a new instance of the OpcEventNode class accessible by the name and id specified as a child node of the parent node given.

csharp
protected OpcEventNode(
    OpcNodeModel model,
    IOpcNode parent,
    OpcName name,
    OpcNodeId id)
vbnet
Protected Sub New(
    model As OpcNodeModel,
    parent As IOpcNode,
    name As OpcName,
    id As OpcNodeId)

Parameters

NameTypeDescription
modelOpcNodeModelThe OpcNodeModel which defines the modelling directives for the new node or a null reference (Nothing in Visual Basic) if there are no directives are to be applied to the node.
parentIOpcNodeThe IOpcNode used as the parent node or a null reference (Nothing in Visual Basic) in the case there is no parent node available.
nameOpcNameThe OpcName through that the new event node can be accessed.
idOpcNodeIdThe OpcNodeId through that the new event node can be identified and accessed.

Properties ​

DefaultTypeDefinitionId ​

protected · override

Gets the default identifier which identifies the node that defines the underlying node type from that this OpcInstanceNode has been created.

csharp
protected override OpcNodeId DefaultTypeDefinitionId { get; }
vbnet
Protected Overrides ReadOnly Property DefaultTypeDefinitionId As OpcNodeId

Property value

OpcNodeId

The OpcNodeId of the type node from that this OpcInstanceNode has been created from. These type node defines the typical structure of an instance node of its type definition. If there exists no specific type definition node a null reference (Nothing in Visual Basic).

Overrides

DefaultTypeDefinitionId

EventId ​

Gets or sets a value generated by the server to uniquely identify a particular event notification.

csharp
public byte[] EventId { get; set; }
vbnet
Public Property EventId As Byte()

Property value

Byte[]

The server is responsible to ensure that each event has its unique event identifier. It may do this, for example, by putting GUIDs into the ByteString. Clients can use the event identifier to assist in minimizing or eliminating gaps and overlaps that may occur during a redundancy failover. The event identifier shall always be returned as value and the server is not allowed to return a status code for the event identifier indicating an error.

EventIdNode ​

Gets the OpcPropertyNode<T> of the EventId property.

csharp
public OpcPropertyNode<byte[]> EventIdNode { get; }
vbnet
Public ReadOnly Property EventIdNode As OpcPropertyNode(Of Byte())

Property value

OpcPropertyNode<Byte[]>

An instance of the OpcPropertyNode<T> class.

EventTypeId ​

Gets or sets the node identifier which describes the specific type of event.

csharp
public OpcNodeId EventTypeId { get; set; }
vbnet
Public Property EventTypeId As OpcNodeId

Property value

OpcNodeId

The event type shall always be returned as value and the server is not allowed to return a status code for the event type indicating an error.

EventTypeIdNode ​

Gets the OpcNodeIdPropertyNode of the EventTypeId property.

csharp
public OpcNodeIdPropertyNode EventTypeIdNode { get; }
vbnet
Public ReadOnly Property EventTypeIdNode As OpcNodeIdPropertyNode

Property value

OpcNodeIdPropertyNode

An instance of the OpcNodeIdPropertyNode class.

Message ​

Gets or sets a value which defines a human-readable and localizable text description of the event.

csharp
public OpcText Message { get; set; }
vbnet
Public Property Message As OpcText

Property value

OpcText

The server may return any appropriate text to describe the event. A null reference (Nothing in Visual Basic) if it is not a valid value; if the server does not have a description, it shall return the string part of the Name of the node associated with the event.

MessageNode ​

Gets the OpcTextPropertyNode of the Message property.

csharp
public OpcTextPropertyNode MessageNode { get; }
vbnet
Public ReadOnly Property MessageNode As OpcTextPropertyNode

Property value

OpcTextPropertyNode

An instance of the OpcTextPropertyNode class.

ReceiveTime ​

Gets or sets the time the OPC UA server received the event from the underlying device of another server.

csharp
public DateTime ReceiveTime { get; set; }
vbnet
Public Property ReceiveTime As Date

Property value

DateTime

The ReceiveTime is analogous to the ServerTimestamp, i.e. in the case where the OPC UA server gets an event from another OPC UA server, each server applies its own ReceiveTime. That implies that a client may get the same event, having the same EventId, from different servers having different values of the ReceiveTime. The ReceiveTime shall always be returned as value and the server is not allowed to return a status code for the ReceiveTime indicating an error.

ReceiveTimeNode ​

Gets the OpcPropertyNode<T> of the ReceiveTime property.

csharp
public OpcPropertyNode<DateTime> ReceiveTimeNode { get; }
vbnet
Public ReadOnly Property ReceiveTimeNode As OpcPropertyNode(Of Date)

Property value

OpcPropertyNode<DateTime>

An instance of the OpcPropertyNode<T> class.

Severity ​

Gets or sets an indication of the urgency of the event.

csharp
public OpcEventSeverity Severity { get; set; }
vbnet
Public Property Severity As OpcEventSeverity

Property value

OpcEventSeverity

This value is commonly called "priority". Values will range from 1 to 1 000, with 1 being the lowest severity and 1 000 being the highest. Typically, a severity of 1 would indicate an event which is informational in nature, while a value of 1 000 would indicate an event of catastrophic nature, which could potentially result in severe financial loss or loss of life.

Remarks

It is expected that very few server implementations will support 1 000 distinct severity levels. Therefore, server developers are responsible for distributing their severity levels across the 1 to 1 000 range in such a manner that clients can assume a linear distribution.

In many cases a strict linear mapping of underlying source severities to the OPC severity range is not appropriate. The server developer will instead intelligently map the underlying source severities to the 1 to 1 000 OPC severity range in some other fashion. In particular, it is recommended that server developers map events of high urgency into the OPC severity range of 667 to 1 000, events of medium urgency into the OPC severity range of 334 to 666 and events of low urgency into OPC severities of 1 to 333.

Some servers might not support any events which are catastrophic in nature, so they may choose to map all of their severities into a subset of the 1 to 1 000 range (for example, 1 to 666). Other servers might not support any events which are merely informational, so they may choose to map all of their severities into a different subset of the 1 to 1 000 range (for example, 334 to 1 000).

The purpose of this approach is to allow clients to use severity values from multiple servers from different vendors in a consistent manner.

SeverityNode ​

Gets the OpcPropertyNode<T> of the Severity property.

csharp
[CLSCompliant(false)]
public OpcPropertyNode<ushort> SeverityNode { get; }
vbnet
<CLSCompliant(False)>
Public ReadOnly Property SeverityNode As OpcPropertyNode(Of UShort)

Property value

OpcPropertyNode<UInt16>

An instance of the OpcPropertyNode<T> class.

SourceName ​

Gets or sets a description of the source of the event.

csharp
public string SourceName { get; set; }
vbnet
Public Property SourceName As String

Property value

String

A value which can be a string-part of the DisplayName of the event source using the default locale of the server, if the event is specific to a node, or some server-specific notation.

SourceNameNode ​

Gets the OpcPropertyNode<T> of the SourceName property.

csharp
public OpcPropertyNode<string> SourceNameNode { get; }
vbnet
Public ReadOnly Property SourceNameNode As OpcPropertyNode(Of String)

Property value

OpcPropertyNode<String>

An instance of the OpcPropertyNode<T> class.

SourceNodeId ​

Gets or sets the node identifier which identifies the node that the event originated from.

csharp
public OpcNodeId SourceNodeId { get; set; }
vbnet
Public Property SourceNodeId As OpcNodeId

Property value

OpcNodeId

If the event is not specific to a node the value is a null reference (Nothing in Visual Basic); otherwise the OpcNodeId of the node that the event originated from. Some subtypes of this OpcEventNode may define additional rules for the SourceNodeId.

SourceNodeIdNode ​

Gets the OpcNodeIdPropertyNode of the SourceNodeId property.

csharp
public OpcNodeIdPropertyNode SourceNodeIdNode { get; }
vbnet
Public ReadOnly Property SourceNodeIdNode As OpcNodeIdPropertyNode

Property value

OpcNodeIdPropertyNode

An instance of the OpcNodeIdPropertyNode class.

Time ​

Gets or sets the time the event occurred.

csharp
public DateTime Time { get; set; }
vbnet
Public Property Time As Date

Property value

DateTime

This value is set as close to the event generator as possible. It often comes from the underlying system or device. Once set, intermediate OPC UA servers shall not alter the value.

TimeNode ​

Gets the OpcPropertyNode<T> of the Time property.

csharp
public OpcPropertyNode<DateTime> TimeNode { get; }
vbnet
Public ReadOnly Property TimeNode As OpcPropertyNode(Of Date)

Property value

OpcPropertyNode<DateTime>

An instance of the OpcPropertyNode<T> class.

Methods ​

CreateEvent ​

Creates a new instance of the OpcEvent class which represents a snapshot of this OpcEventNode.

csharp
public OpcEvent CreateEvent(OpcContext context)
vbnet
Public Function CreateEvent(context As OpcContext) As OpcEvent

Parameters

NameTypeDescription
contextOpcContextThe OpcContext to use.

Returns

OpcEvent

A new immutable instance of the OpcEvent class representing a snapshot of the event node data at the time this method has been called.

CreateEventCore ​

protected · virtual

Creates a new instance of the OpcEvent class representing the specified snapshot of this OpcEventNode.

csharp
protected virtual OpcEvent CreateEventCore(
    OpcContext context,
    OpcEventNodeSnapshot snapshot)
vbnet
Protected Overridable Function CreateEventCore(
    context As OpcContext,
    snapshot As OpcEventNodeSnapshot) As OpcEvent

Parameters

NameTypeDescription
contextOpcContextThe OpcContext used to create the snapshot.
snapshotOpcEventNodeSnapshotThe OpcEventNodeSnapshot taken from the current state of this OpcEventNode from that the new OpcEvent is to be created.

Returns

OpcEvent

A new instance of the OpcEvent representing an immutable snapshot of this OpcEventNode.

Remarks

In case there this method is not overridden the method will determine the type of OpcEvent to use using the OpcEventTypeAttribute of the OpcEventNode and will use this one to create a new OpcEvent using the snapshot specified.

InitializeDefaults ​

protected · override

Initializes the default values used by the OpcEventNode.

csharp
protected override void InitializeDefaults()
vbnet
Protected Overrides Sub InitializeDefaults()

Overrides

InitializeDefaults

Remarks

This method is used to ensure the availability of appropriate node specific default values. For more information like when this method is to be overwritten see InitializeDefaults.

PrepareEventSnapshot ​

protected · virtual · since v2.22

Prepares the OpcEventNode for a new OpcEventNodeSnapshot.

csharp
protected virtual void PrepareEventSnapshot(OpcContext context)
vbnet
Protected Overridable Sub PrepareEventSnapshot(context As OpcContext)

Parameters

NameTypeDescription
contextOpcContextThe OpcContext used to prepare the current OpcEventNode.

ReportEvent ​

Produces an event using the data represented by this OpcEventNode.

csharp
public void ReportEvent(OpcContext context)
vbnet
Public Sub ReportEvent(context As OpcContext)

Parameters

NameTypeDescription
contextOpcContextThe OpcContext to use.

Exceptions

ExceptionCondition
ArgumentNullExceptionThe context is a null reference (Nothing in Visual Basic).

Remarks

The method applies the pending changes of the event node first and is not synchronized, see ApplyChanges. Report an event node from one thread at a time. Reporting locks the node manager of every notifier the event passes, one after the other.

ReportEventFrom ​

Produces an event using the data represented by this OpcEventNode using the source as initiator of the event reported.

csharp
public void ReportEventFrom(OpcContext context, IOpcNode source)
vbnet
Public Sub ReportEventFrom(context As OpcContext, source As IOpcNode)

Parameters

NameTypeDescription
contextOpcContextThe OpcContext to use.
sourceIOpcNodeThe IOpcNode instance its Id is used for the SourceNodeId property and its SymbolicName is used for the SourceName property to define the origin of the event produced.

Exceptions

ExceptionCondition
ArgumentNullExceptionThe context or source is a null reference (Nothing in Visual Basic).

Remarks

The method sets the source of the event node and is not synchronized, see ReportEvent.