# OpcEvent Class

<dl class="api-definition">
<dt>Namespace</dt>
<dd><a href="../namespaces/opc.uafx">Opc.UaFx</a></dd>
<dt>Assembly</dt>
<dd>Opc.UaFx.Advanced.dll</dd>
<dt>Package</dt>
<dd>Opc.UaFx.Advanced v2.59.0</dd>
<dt>Members</dt>
<dd><a href="./members">OpcEvent Members</a></dd>
<dt>Also in</dt>
<dd>Opc.UaFx.Client</dd>
</dl>

Represents a snapshot of a 'Opc.UaFx.OpcEventNode'.

## Syntax

<div class="api-signature" data-lang="csharp">

```csharp
public class OpcEvent
```

</div>

<div class="api-signature" data-lang="vbnet">

```vbnet
Public Class OpcEvent
```

</div>

## Inheritance

[Object](https://learn.microsoft.com/dotnet/api/system.object) → **OpcEvent**

## Derived types

- [OpcCondition](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opccondition/)
- [OpcModelChange](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcmodelchange/)

## Constructors

| Name | Description |
|---|---|
| [OpcEvent](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcevent/members#opcevent)<span class="api-meta">since v2.8</span> | Initializes a new instance of the OpcEvent class using the `dataStore` specified. |

## Properties

| Name | Description |
|---|---|
| [DataStore](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcevent/members#datastore)<span class="api-meta">protected</span> | Gets the [IOpcReadOnlyNodeDataStore](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcreadonlynodedatastore/) which contains the data of the OpcEvent instance. |
| [EventId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcevent/members#eventid) | Gets a value generated by the server to uniquely identify a particular event notification. |
| [EventType](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcevent/members#eventtype) | Gets the type of event. |
| [EventTypeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcevent/members#eventtypeid) | Gets node identifier which describes the specific type of event. |
| [Message](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcevent/members#message) | Gets a value which defines a human-readable and localizable text description of the event. |
| [NodeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcevent/members#nodeid) | Gets the identifier of the node from which this event data snapshot has been created. |
| [ReceiveTime](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcevent/members#receivetime) | Gets the time the OPC UA server received the event from the underlying device of another server. |
| [Severity](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcevent/members#severity) | Gets an indication of the urgency of the event. |
| [SourceName](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcevent/members#sourcename) | Gets a description of the source of the event. |
| [SourceNodeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcevent/members#sourcenodeid) | Gets the node identifier which identifies the node that the event originated from. |
| [Time](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcevent/members#time) | Gets the time the event occurred. |

## Methods

| Name | Description |
|---|---|
| [Create](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcevent/members#create)<span class="api-meta">static · since v2.54</span> | Creates a new OpcEvent instance following the parameters specified. |
| [GetValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcevent/members#getvalue)<span class="api-meta">protected · since v2.19</span> | Retrieves the value of the event field named by the `memberName`, e.g. to implement a property of a custom event type. |
| [RegisterType](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcevent/members#registertype)<span class="api-meta">static · 2 overloads · since v2.8</span> | Registers the type defined by `T` as the OpcEvent type to create in case there an event instance is to be created for the type definition identified by the [OpcEventTypeAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opceventtypeattribute/) defined on the `T` specified. |
| [RegisterTypes](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcevent/members#registertypes)<span class="api-meta">static · 3 overloads · since v2.8</span> | Registers all non-abstract types in the `assembly` specified which defines the [OpcEventTypeAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opceventtypeattribute/) and inherit from OpcEvent. |
| [UnregisterType](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcevent/members#unregistertype)<span class="api-meta">static · 2 overloads · since v2.8</span> | Unregisters the previously registered (see [RegisterType](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcevent/members#registertype-t1)) type defined by `T` as the OpcEvent type to not longer create for the type definition identified by the [OpcEventTypeAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opceventtypeattribute/) defined on the `T` specified. |
| [UnregisterTypes](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcevent/members#unregistertypes)<span class="api-meta">static · 3 overloads · since v2.8</span> | Unregisters all previously registered types (see [RegisterTypes](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcevent/members#registertypes-system-reflection-assembly)) in the `assembly` specified. |

## Events

| Name | Description |
|---|---|
| [TypeResolve](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcevent/members#typeresolve)<span class="api-meta">static · since v2.8</span> | Occurs when the resolution of an event type fails. |

## Applies to

| Package | Versions |
|---|---|
| Opc.UaFx.Advanced | v2.5–v2.59 |
