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
| Overload | Description |
|---|---|
| OpcEventNode( | Initializes a new instance of the OpcEventNode class accessible by the name specified. |
| OpcEventNode( | Initializes a new instance of the OpcEventNode class accessible by the name and id specified. |
| OpcEventNode( | Initializes a new instance of the OpcEventNode class accessible by the name specified as a child node of the parent node given. |
| OpcEventNode( | 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( | Initializes a new instance of the OpcEventNode class using the content as the instance to wrap. |
| OpcEventNode( | Initializes a new instance of the OpcEventNode class using the content as the instance to wrap. |
| OpcEventNode( | Initializes a new instance of the OpcEventNode class accessible by the name specified. |
| OpcEventNode( | Initializes a new instance of the OpcEventNode class accessible by the name and id specified. |
| OpcEventNode( | Initializes a new instance of the OpcEventNode class accessible by the name specified as a child node of the parent node given. |
| OpcEventNode( | 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(OpcName)
Initializes a new instance of the OpcEventNode class accessible by the name specified.
public OpcEventNode(OpcName name)Public Sub New(name As OpcName)Parameters
| Name | Type | Description |
|---|---|---|
name | OpcName | The 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.
public OpcEventNode(OpcName name, OpcNodeId id)Public Sub New(name As OpcName, id As OpcNodeId)Parameters
| Name | Type | Description |
|---|---|---|
name | OpcName | The OpcName through that the new event node can be accessed. |
id | OpcNodeId | The 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.
public OpcEventNode(IOpcNode parent, OpcName name)Public Sub New(parent As IOpcNode, name As OpcName)Parameters
| Name | Type | Description |
|---|---|---|
parent | IOpcNode | The IOpcNode used as the parent node or a null reference ( |
name | OpcName | The 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.
public OpcEventNode(IOpcNode parent, OpcName name, OpcNodeId id)Public Sub New(parent As IOpcNode, name As OpcName, id As OpcNodeId)Parameters
| Name | Type | Description |
|---|---|---|
parent | IOpcNode | The IOpcNode used as the parent node or a null reference ( |
name | OpcName | The OpcName through that the new event node can be accessed. |
id | OpcNodeId | The OpcNodeId through that the new event node can be identified and accessed. |
OpcEventNode(BaseEventState)
Initializes a new instance of the OpcEventNode class using the content as the instance to wrap.
protected OpcEventNode(BaseEventState content)Protected Sub New(content As BaseEventState)Parameters
| Name | Type | Description |
|---|---|---|
content | BaseEventState | The BaseEventState to wrap. |
Exceptions
| Exception | Condition |
|---|---|
| Argument | The content is a null reference ( |
OpcEventNode(BaseEventState, OpcNodeModel)
Initializes a new instance of the OpcEventNode class using the content as the instance to wrap.
protected OpcEventNode(BaseEventState content, OpcNodeModel model)Protected Sub New(content As BaseEventState, model As OpcNodeModel)Parameters
| Name | Type | Description |
|---|---|---|
content | BaseEventState | The BaseEventState to wrap. |
model | OpcNodeModel | The OpcNodeModel which defines the modelling directives for the new node or a null reference ( |
Exceptions
| Exception | Condition |
|---|---|
| Argument | The content is a null reference ( |
OpcEventNode(OpcNodeModel, OpcName)
Initializes a new instance of the OpcEventNode class accessible by the name specified.
protected OpcEventNode(OpcNodeModel model, OpcName name)Protected Sub New(model As OpcNodeModel, name As OpcName)Parameters
| Name | Type | Description |
|---|---|---|
model | OpcNodeModel | The OpcNodeModel which defines the modelling directives for the new node or a null reference ( |
name | OpcName | The OpcName through that the new event node can be accessed. |
OpcEventNode(OpcNodeModel, OpcName, OpcNodeId)
Initializes a new instance of the OpcEventNode class accessible by the name and id specified.
protected OpcEventNode(OpcNodeModel model, OpcName name, OpcNodeId id)Protected Sub New(model As OpcNodeModel, name As OpcName, id As OpcNodeId)Parameters
| Name | Type | Description |
|---|---|---|
model | OpcNodeModel | The OpcNodeModel which defines the modelling directives for the new node or a null reference ( |
name | OpcName | The OpcName through that the new event node can be accessed. |
id | OpcNodeId | The OpcNodeId through that the new event node can be identified and accessed. |
OpcEventNode(OpcNodeModel, IOpcNode, OpcName)
Initializes a new instance of the OpcEventNode class accessible by the name specified as a child node of the parent node given.
protected OpcEventNode(OpcNodeModel model, IOpcNode parent, OpcName name)Protected Sub New(model As OpcNodeModel, parent As IOpcNode, name As OpcName)Parameters
| Name | Type | Description |
|---|---|---|
model | OpcNodeModel | The OpcNodeModel which defines the modelling directives for the new node or a null reference ( |
parent | IOpcNode | The IOpcNode used as the parent node or a null reference ( |
name | OpcName | The OpcName through that the new event node can be accessed. |
OpcEventNode(OpcNodeModel, 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.
protected OpcEventNode(
OpcNodeModel model,
IOpcNode parent,
OpcName name,
OpcNodeId id)Protected Sub New(
model As OpcNodeModel,
parent As IOpcNode,
name As OpcName,
id As OpcNodeId)Parameters
| Name | Type | Description |
|---|---|---|
model | OpcNodeModel | The OpcNodeModel which defines the modelling directives for the new node or a null reference ( |
parent | IOpcNode | The IOpcNode used as the parent node or a null reference ( |
name | OpcName | The OpcName through that the new event node can be accessed. |
id | OpcNodeId | The OpcNodeId through that the new event node can be identified and accessed. |
Properties
DefaultTypeDefinitionId
Gets the default identifier which identifies the node that defines the underlying node type from that this OpcInstanceNode has been created.
protected override OpcNodeId DefaultTypeDefinitionId { get; }Protected Overrides ReadOnly Property DefaultTypeDefinitionId As OpcNodeIdProperty value
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
EventId
Gets or sets a value generated by the server to uniquely identify a particular event notification.
public byte[] EventId { get; set; }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.
public OpcPropertyNode<byte[]> EventIdNode { get; }Public ReadOnly Property EventIdNode As OpcPropertyNode(Of Byte())Property value
An instance of the OpcPropertyNode<T> class.
EventTypeId
Gets or sets the node identifier which describes the specific type of event.
public OpcNodeId EventTypeId { get; set; }Public Property EventTypeId As OpcNodeIdProperty value
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.
public OpcNodeIdPropertyNode EventTypeIdNode { get; }Public ReadOnly Property EventTypeIdNode As OpcNodeIdPropertyNodeProperty value
An instance of the OpcNodeIdPropertyNode class.
Message
Gets or sets a value which defines a human-readable and localizable text description of the event.
public OpcText Message { get; set; }Public Property Message As OpcTextProperty value
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.
public OpcTextPropertyNode MessageNode { get; }Public ReadOnly Property MessageNode As OpcTextPropertyNodeProperty value
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.
public DateTime ReceiveTime { get; set; }Public Property ReceiveTime As DateProperty value
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.
public OpcPropertyNode<DateTime> ReceiveTimeNode { get; }Public ReadOnly Property ReceiveTimeNode As OpcPropertyNode(Of Date)Property value
An instance of the OpcPropertyNode<T> class.
Severity
Gets or sets an indication of the urgency of the event.
public OpcEventSeverity Severity { get; set; }Public Property Severity As OpcEventSeverityProperty value
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.
[CLSCompliant(false)]
public OpcPropertyNode<ushort> SeverityNode { get; }<CLSCompliant(False)>
Public ReadOnly Property SeverityNode As OpcPropertyNode(Of UShort)Property value
An instance of the OpcPropertyNode<T> class.
SourceName
Gets or sets a description of the source of the event.
public string SourceName { get; set; }Public Property SourceName As StringProperty value
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.
public OpcPropertyNode<string> SourceNameNode { get; }Public ReadOnly Property SourceNameNode As OpcPropertyNode(Of String)Property value
An instance of the OpcPropertyNode<T> class.
SourceNodeId
Gets or sets the node identifier which identifies the node that the event originated from.
public OpcNodeId SourceNodeId { get; set; }Public Property SourceNodeId As OpcNodeIdProperty value
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.
public OpcNodeIdPropertyNode SourceNodeIdNode { get; }Public ReadOnly Property SourceNodeIdNode As OpcNodeIdPropertyNodeProperty value
An instance of the OpcNodeIdPropertyNode class.
Time
Gets or sets the time the event occurred.
public DateTime Time { get; set; }Public Property Time As DateProperty value
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.
public OpcPropertyNode<DateTime> TimeNode { get; }Public ReadOnly Property TimeNode As OpcPropertyNode(Of Date)Property value
An instance of the OpcPropertyNode<T> class.
Methods
CreateEvent
Creates a new instance of the OpcEvent class which represents a snapshot of this OpcEventNode.
public OpcEvent CreateEvent(OpcContext context)Public Function CreateEvent(context As OpcContext) As OpcEventParameters
| Name | Type | Description |
|---|---|---|
context | OpcContext | The OpcContext to use. |
Returns
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
Creates a new instance of the OpcEvent class representing the specified snapshot of this OpcEventNode.
protected virtual OpcEvent CreateEventCore(
OpcContext context,
OpcEventNodeSnapshot snapshot)Protected Overridable Function CreateEventCore(
context As OpcContext,
snapshot As OpcEventNodeSnapshot) As OpcEventParameters
| Name | Type | Description |
|---|---|---|
context | OpcContext | The OpcContext used to create the snapshot. |
snapshot | Opc | The Opc |
Returns
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
Initializes the default values used by the OpcEventNode.
protected override void InitializeDefaults()Protected Overrides Sub InitializeDefaults()Overrides
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
Prepares the OpcEventNode for a new OpcEventNodeSnapshot.
protected virtual void PrepareEventSnapshot(OpcContext context)Protected Overridable Sub PrepareEventSnapshot(context As OpcContext)Parameters
| Name | Type | Description |
|---|---|---|
context | OpcContext | The OpcContext used to prepare the current OpcEventNode. |
ReportEvent
Produces an event using the data represented by this OpcEventNode.
public void ReportEvent(OpcContext context)Public Sub ReportEvent(context As OpcContext)Parameters
| Name | Type | Description |
|---|---|---|
context | OpcContext | The OpcContext to use. |
Exceptions
| Exception | Condition |
|---|---|
| Argument | The context is a null reference ( |
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.
public void ReportEventFrom(OpcContext context, IOpcNode source)Public Sub ReportEventFrom(context As OpcContext, source As IOpcNode)Parameters
| Name | Type | Description |
|---|---|---|
context | OpcContext | The OpcContext to use. |
source | IOpcNode | The 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
| Exception | Condition |
|---|---|
| Argument | The context or source is a null reference ( |
Remarks
The method sets the source of the event node and is not synchronized, see ReportEvent.

