# OpcClient.SubscribeEvent Method

> Reference: Subscribes events on the node specified by nodeId.

<dl class="api-definition">
<dt>Type</dt>
<dd><a href="./">OpcClient</a></dd>
<dt>Namespace</dt>
<dd><a href="../namespaces/opc.uafx.client">Opc.UaFx.Client</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">OpcClient Members</a></dd>
<dt>Also in</dt>
<dd>Opc.UaFx.Client</dd>
</dl>

<span class="api-meta">44 overloads</span>

| Overload | Description |
|---|---|
| [SubscribeEvent(byte\[\], OpcEventReceivedEventHandler)](#subscribeevent-system-byte-array-opc-uafx-client-opceventreceivedeventhandler) | Subscribes events on the node specified by `nodeId`. |
| [SubscribeEvent(Guid, OpcEventReceivedEventHandler)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclient/subscribeevent#subscribeevent-system-guid-opc-uafx-client-opceventreceivedeventhandler) | Subscribes events on the node specified by `nodeId`. |
| [SubscribeEvent(int, OpcEventReceivedEventHandler)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclient/subscribeevent#subscribeevent-system-int32-opc-uafx-client-opceventreceivedeventhandler) | Subscribes events on the node specified by `nodeId`. |
| [SubscribeEvent(uint, OpcEventReceivedEventHandler)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclient/subscribeevent#subscribeevent-system-uint32-opc-uafx-client-opceventreceivedeventhandler) | Subscribes events on the node specified by `nodeId`. |
| [SubscribeEvent(string, OpcEventReceivedEventHandler)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclient/subscribeevent#subscribeevent-system-string-opc-uafx-client-opceventreceivedeventhandler) | Subscribes events on the node specified by `nodeId`. |
| [SubscribeEvent(byte\[\], OpcAttribute, OpcEventReceivedEventHandler)](#subscribeevent-system-byte-array-opc-uafx-opcattribute-opc-uafx-client-opceventreceivedeventhandler) | Subscribes events on the `attribute` of the node specified by `nodeId`. |
| [SubscribeEvent(Guid, OpcAttribute, OpcEventReceivedEventHandler)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclient/subscribeevent#subscribeevent-system-guid-opc-uafx-opcattribute-opc-uafx-client-opceventreceivedeventhandler) | Subscribes events on the `attribute` of the node specified by `nodeId`. |
| [SubscribeEvent(int, OpcAttribute, OpcEventReceivedEventHandler)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclient/subscribeevent#subscribeevent-system-int32-opc-uafx-opcattribute-opc-uafx-client-opceventreceivedeventhandler) | Subscribes events on the `attribute` of the node specified by `nodeId`. |
| [SubscribeEvent(uint, OpcAttribute, OpcEventReceivedEventHandler)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclient/subscribeevent#subscribeevent-system-uint32-opc-uafx-opcattribute-opc-uafx-client-opceventreceivedeventhandler) | Subscribes events on the `attribute` of the node specified by `nodeId`. |
| [SubscribeEvent(string, OpcAttribute, OpcEventReceivedEventHandler)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclient/subscribeevent#subscribeevent-system-string-opc-uafx-opcattribute-opc-uafx-client-opceventreceivedeventhandler) | Subscribes events on the `attribute` of the node specified by `nodeId`. |
| [SubscribeEvent(byte\[\], int, OpcEventReceivedEventHandler)](#subscribeevent-system-byte-array-system-int32-opc-uafx-client-opceventreceivedeventhandler) | Subscribes events on the node specified by `nodeId` and `namespaceIndex` specified. |
| [SubscribeEvent(Guid, int, OpcEventReceivedEventHandler)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclient/subscribeevent#subscribeevent-system-guid-system-int32-opc-uafx-client-opceventreceivedeventhandler) | Subscribes events on the node specified by `nodeId` and `namespaceIndex` specified. |
| [SubscribeEvent(int, int, OpcEventReceivedEventHandler)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclient/subscribeevent#subscribeevent-system-int32-system-int32-opc-uafx-client-opceventreceivedeventhandler) | Subscribes events on the node specified by `nodeId` and `namespaceIndex` specified. |
| [SubscribeEvent(uint, int, OpcEventReceivedEventHandler)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclient/subscribeevent#subscribeevent-system-uint32-system-int32-opc-uafx-client-opceventreceivedeventhandler) | Subscribes events on the node specified by `nodeId` and `namespaceIndex` specified. |
| [SubscribeEvent(string, int, OpcEventReceivedEventHandler)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclient/subscribeevent#subscribeevent-system-string-system-int32-opc-uafx-client-opceventreceivedeventhandler) | Subscribes events on the node specified by `nodeId` and `namespaceIndex` specified. |
| [SubscribeEvent(byte\[\], int, OpcAttribute, OpcEventReceivedEventHandler)](#subscribeevent-system-byte-array-system-int32-opc-uafx-opcattribute-opc-uafx-client-opceventreceivedeventhandler) | Subscribes events on the `attribute` of the node specified by `nodeId` and `namespaceIndex` specified to operate on the `attribute`. |
| [SubscribeEvent(Guid, int, OpcAttribute, OpcEventReceivedEventHandler)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclient/subscribeevent#subscribeevent-system-guid-system-int32-opc-uafx-opcattribute-opc-uafx-client-opceventreceivedeventhandler) | Subscribes events on the `attribute` of the node specified by `nodeId` and `namespaceIndex` specified to operate on the `attribute`. |
| [SubscribeEvent(int, int, OpcAttribute, OpcEventReceivedEventHandler)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclient/subscribeevent#subscribeevent-system-int32-system-int32-opc-uafx-opcattribute-opc-uafx-client-opceventreceivedeventhandler) | Subscribes events on the `attribute` of the node specified by `nodeId` and `namespaceIndex` specified to operate on the `attribute`. |
| [SubscribeEvent(uint, int, OpcAttribute, OpcEventReceivedEventHandler)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclient/subscribeevent#subscribeevent-system-uint32-system-int32-opc-uafx-opcattribute-opc-uafx-client-opceventreceivedeventhandler) | Subscribes events on the `attribute` of the node specified by `nodeId` and `namespaceIndex` specified to operate on the `attribute`. |
| [SubscribeEvent(string, int, OpcAttribute, OpcEventReceivedEventHandler)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclient/subscribeevent#subscribeevent-system-string-system-int32-opc-uafx-opcattribute-opc-uafx-client-opceventreceivedeventhandler) | Subscribes events on the `attribute` of the node specified by `nodeId` and `namespaceIndex` specified to operate on the `attribute`. |
| [SubscribeEvent(byte\[\], OpcEventFilter, OpcEventReceivedEventHandler)](#subscribeevent-system-byte-array-opc-uafx-opceventfilter-opc-uafx-client-opceventreceivedeventhandler) | Subscribes events on the node specified by `nodeId`. |
| [SubscribeEvent(Guid, OpcEventFilter, OpcEventReceivedEventHandler)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclient/subscribeevent#subscribeevent-system-guid-opc-uafx-opceventfilter-opc-uafx-client-opceventreceivedeventhandler) | Subscribes events on the node specified by `nodeId`. |
| [SubscribeEvent(int, OpcEventFilter, OpcEventReceivedEventHandler)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclient/subscribeevent#subscribeevent-system-int32-opc-uafx-opceventfilter-opc-uafx-client-opceventreceivedeventhandler) | Subscribes events on the node specified by `nodeId`. |
| [SubscribeEvent(uint, OpcEventFilter, OpcEventReceivedEventHandler)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclient/subscribeevent#subscribeevent-system-uint32-opc-uafx-opceventfilter-opc-uafx-client-opceventreceivedeventhandler) | Subscribes events on the node specified by `nodeId`. |
| [SubscribeEvent(string, OpcEventFilter, OpcEventReceivedEventHandler)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclient/subscribeevent#subscribeevent-system-string-opc-uafx-opceventfilter-opc-uafx-client-opceventreceivedeventhandler) | Subscribes events on the node specified by `nodeId`. |
| [SubscribeEvent(byte\[\], int, OpcEventFilter, OpcEventReceivedEventHandler)](#subscribeevent-system-byte-array-system-int32-opc-uafx-opceventfilter-opc-uafx-client-opceventreceivedeventhandler) | Subscribes events on the node specified by `nodeId` and `namespaceIndex` specified. |
| [SubscribeEvent(Guid, int, OpcEventFilter, OpcEventReceivedEventHandler)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclient/subscribeevent#subscribeevent-system-guid-system-int32-opc-uafx-opceventfilter-opc-uafx-client-opceventreceivedeventhandler) | Subscribes events on the node specified by `nodeId` and `namespaceIndex` specified. |
| [SubscribeEvent(int, int, OpcEventFilter, OpcEventReceivedEventHandler)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclient/subscribeevent#subscribeevent-system-int32-system-int32-opc-uafx-opceventfilter-opc-uafx-client-opceventreceivedeventhandler) | Subscribes events on the node specified by `nodeId` and `namespaceIndex` specified. |
| [SubscribeEvent(uint, int, OpcEventFilter, OpcEventReceivedEventHandler)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclient/subscribeevent#subscribeevent-system-uint32-system-int32-opc-uafx-opceventfilter-opc-uafx-client-opceventreceivedeventhandler) | Subscribes events on the node specified by `nodeId` and `namespaceIndex` specified. |
| [SubscribeEvent(string, int, OpcEventFilter, OpcEventReceivedEventHandler)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclient/subscribeevent#subscribeevent-system-string-system-int32-opc-uafx-opceventfilter-opc-uafx-client-opceventreceivedeventhandler) | Subscribes events on the node specified by `nodeId` and `namespaceIndex` specified. |
| [SubscribeEvent(byte\[\], OpcAttribute, OpcEventFilter, OpcEventReceivedEventHandler)](#subscribeevent-system-byte-array-opc-uafx-opcattribute-opc-uafx-opceventfilter-opc-uafx-client-opceventreceivedeventhandler) | Subscribes events on the `attribute` of the node specified by `nodeId`. |
| [SubscribeEvent(Guid, OpcAttribute, OpcEventFilter, OpcEventReceivedEventHandler)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclient/subscribeevent#subscribeevent-system-guid-opc-uafx-opcattribute-opc-uafx-opceventfilter-opc-uafx-client-opceventreceivedeventhandler) | Subscribes events on the `attribute` of the node specified by `nodeId`. |
| [SubscribeEvent(int, OpcAttribute, OpcEventFilter, OpcEventReceivedEventHandler)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclient/subscribeevent#subscribeevent-system-int32-opc-uafx-opcattribute-opc-uafx-opceventfilter-opc-uafx-client-opceventreceivedeventhandler) | Subscribes events on the `attribute` of the node specified by `nodeId`. |
| [SubscribeEvent(uint, OpcAttribute, OpcEventFilter, OpcEventReceivedEventHandler)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclient/subscribeevent#subscribeevent-system-uint32-opc-uafx-opcattribute-opc-uafx-opceventfilter-opc-uafx-client-opceventreceivedeventhandler) | Subscribes events on the `attribute` of the node specified by `nodeId`. |
| [SubscribeEvent(string, OpcAttribute, OpcEventFilter, OpcEventReceivedEventHandler)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclient/subscribeevent#subscribeevent-system-string-opc-uafx-opcattribute-opc-uafx-opceventfilter-opc-uafx-client-opceventreceivedeventhandler) | Subscribes events on the `attribute` of the node specified by `nodeId`. |
| [SubscribeEvent(byte\[\], int, OpcAttribute, OpcEventFilter, OpcEventReceivedEventHandler)](#subscribeevent-system-byte-array-system-int32-opc-uafx-opcattribute-opc-uafx-opceventfilter-opc-uafx-client-opceventreceivedeventhandler) | Subscribes events on the `attribute` of the node specified by `nodeId` and `namespaceIndex` specified. |
| [SubscribeEvent(Guid, int, OpcAttribute, OpcEventFilter, OpcEventReceivedEventHandler)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclient/subscribeevent#subscribeevent-system-guid-system-int32-opc-uafx-opcattribute-opc-uafx-opceventfilter-opc-uafx-client-opceventreceivedeventhandler) | Subscribes events on the `attribute` of the node specified by `nodeId` and `namespaceIndex` specified. |
| [SubscribeEvent(int, int, OpcAttribute, OpcEventFilter, OpcEventReceivedEventHandler)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclient/subscribeevent#subscribeevent-system-int32-system-int32-opc-uafx-opcattribute-opc-uafx-opceventfilter-opc-uafx-client-opceventreceivedeventhandler) | Subscribes events on the `attribute` of the node specified by `nodeId` and `namespaceIndex` specified. |
| [SubscribeEvent(uint, int, OpcAttribute, OpcEventFilter, OpcEventReceivedEventHandler)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclient/subscribeevent#subscribeevent-system-uint32-system-int32-opc-uafx-opcattribute-opc-uafx-opceventfilter-opc-uafx-client-opceventreceivedeventhandler) | Subscribes events on the `attribute` of the node specified by `nodeId` and `namespaceIndex` specified. |
| [SubscribeEvent(string, int, OpcAttribute, OpcEventFilter, OpcEventReceivedEventHandler)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclient/subscribeevent#subscribeevent-system-string-system-int32-opc-uafx-opcattribute-opc-uafx-opceventfilter-opc-uafx-client-opceventreceivedeventhandler) | Subscribes events on the `attribute` of the node specified by `nodeId` and `namespaceIndex` specified. |
| [SubscribeEvent(OpcNodeId, OpcEventReceivedEventHandler)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclient/subscribeevent#subscribeevent-opc-uafx-opcnodeid-opc-uafx-client-opceventreceivedeventhandler) | Subscribes events on the node specified by `nodeId`. |
| [SubscribeEvent(OpcNodeId, OpcAttribute, OpcEventReceivedEventHandler)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclient/subscribeevent#subscribeevent-opc-uafx-opcnodeid-opc-uafx-opcattribute-opc-uafx-client-opceventreceivedeventhandler) | Subscribes events on the `attribute` of the node specified by `nodeId`. |
| [SubscribeEvent(OpcNodeId, OpcEventFilter, OpcEventReceivedEventHandler)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclient/subscribeevent#subscribeevent-opc-uafx-opcnodeid-opc-uafx-opceventfilter-opc-uafx-client-opceventreceivedeventhandler) | Subscribes events on the node specified by `nodeId`. |
| [SubscribeEvent(OpcNodeId, OpcAttribute, OpcEventFilter, OpcEventReceivedEventHandler)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclient/subscribeevent#subscribeevent-opc-uafx-opcnodeid-opc-uafx-opcattribute-opc-uafx-opceventfilter-opc-uafx-client-opceventreceivedeventhandler) | Subscribes events on the `attribute` of the node specified by `nodeId`. |

**Exceptions (all overloads)**

| Exception | Condition |
|---|---|
| [ArgumentException](https://learn.microsoft.com/dotnet/api/system.argumentexception) | The `nodeId` is empty. |
| [InvalidOperationException](https://learn.microsoft.com/dotnet/api/system.invalidoperationexception) | The subscription service is currently not supported, especially using the arguments specified. |
| [ObjectDisposedException](https://learn.microsoft.com/dotnet/api/system.objectdisposedexception) | The object has been disposed of. |

## SubscribeEvent(byte\[\], OpcEventReceivedEventHandler)

Subscribes events on the node specified by `nodeId`.

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

```csharp
public OpcSubscription SubscribeEvent(
    byte[] nodeId,
    OpcEventReceivedEventHandler received)
```

</div>

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

```vbnet
Public Function SubscribeEvent(
    nodeId As Byte(),
    received As OpcEventReceivedEventHandler) As OpcSubscription
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `nodeId` | [Byte](https://learn.microsoft.com/dotnet/api/system.byte)[] | The opaque node identifier of the node to subscribe. |
| `received` | [OpcEventReceivedEventHandler](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opceventreceivedeventhandler/) | The [OpcEventReceivedEventHandler](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opceventreceivedeventhandler/) method to assign as the event handler of the [EventReceived](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcmonitoreditem/members#eventreceived) event or a null reference (Nothing in Visual Basic) if there no event handler is to be assigned first. |

**Returns**

[OpcSubscription](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcsubscription/)

A new instance of the [OpcSubscription](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcsubscription/) class with a single [OpcMonitoredItem](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcmonitoreditem/) setup with the information specified. The kind of monitored item will when monitor events performed on the node identified by the values passed to this method.

**Exceptions**

| Exception | Condition |
|---|---|
| [OpcException](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcexception/) | The service execution failed upon different circumstances; for more details see exception details. The following issues can lead to that exception: [BadNothingToDo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnothingtodo), [BadTooManyOperations](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanyoperations), [BadTimestampsToReturnInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtimestampstoreturninvalid), [BadSubscriptionIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badsubscriptionidinvalid), [BadMonitoringModeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoringmodeinvalid), [BadNodeIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidinvalid), [BadNodeIdUnknown](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidunknown), [BadAttributeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badattributeinvalid), [BadIndexRangeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangeinvalid), [BadIndexRangeNoData](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangenodata), [BadDataEncodingInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodinginvalid), [BadDataEncodingUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodingunsupported), [BadMonitoredItemFilterInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoreditemfilterinvalid), [BadMonitoredItemFilterUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoreditemfilterunsupported), [BadFilterNotAllowed](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badfilternotallowed), [BadTooManySubscriptions](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanysubscriptions) and [BadTooManyMonitoredItems](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanymonitoreditems). |

## SubscribeEvent(Guid, OpcEventReceivedEventHandler)

Subscribes events on the node specified by `nodeId`.

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

```csharp
public OpcSubscription SubscribeEvent(
    Guid nodeId,
    OpcEventReceivedEventHandler received)
```

</div>

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

```vbnet
Public Function SubscribeEvent(
    nodeId As Guid,
    received As OpcEventReceivedEventHandler) As OpcSubscription
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `nodeId` | [Guid](https://learn.microsoft.com/dotnet/api/system.guid) | The general unique identifier (= GUID) of the node to subscribe. |
| `received` | [OpcEventReceivedEventHandler](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opceventreceivedeventhandler/) | The [OpcEventReceivedEventHandler](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opceventreceivedeventhandler/) method to assign as the event handler of the [EventReceived](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcmonitoreditem/members#eventreceived) event or a null reference (Nothing in Visual Basic) if there no event handler is to be assigned first. |

**Returns**

[OpcSubscription](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcsubscription/)

A new instance of the [OpcSubscription](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcsubscription/) class with a single [OpcMonitoredItem](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcmonitoreditem/) setup with the information specified. The kind of monitored item will when monitor events performed on the node identified by the values passed to this method.

**Exceptions**

| Exception | Condition |
|---|---|
| [OpcException](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcexception/) | The service execution failed upon different circumstances; for more details see exception details. The following issues can lead to that exception: [BadNothingToDo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnothingtodo), [BadTooManyOperations](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanyoperations), [BadTimestampsToReturnInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtimestampstoreturninvalid), [BadSubscriptionIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badsubscriptionidinvalid), [BadMonitoringModeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoringmodeinvalid), [BadNodeIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidinvalid), [BadNodeIdUnknown](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidunknown), [BadIndexRangeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangeinvalid), [BadIndexRangeNoData](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangenodata), [BadDataEncodingInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodinginvalid), [BadDataEncodingUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodingunsupported), [BadMonitoredItemFilterInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoreditemfilterinvalid), [BadMonitoredItemFilterUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoreditemfilterunsupported), [BadFilterNotAllowed](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badfilternotallowed), [BadTooManySubscriptions](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanysubscriptions) and [BadTooManyMonitoredItems](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanymonitoreditems). |

## SubscribeEvent(int, OpcEventReceivedEventHandler)

Subscribes events on the node specified by `nodeId`.

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

```csharp
public OpcSubscription SubscribeEvent(
    int nodeId,
    OpcEventReceivedEventHandler received)
```

</div>

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

```vbnet
Public Function SubscribeEvent(
    nodeId As Integer,
    received As OpcEventReceivedEventHandler) As OpcSubscription
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `nodeId` | [Int32](https://learn.microsoft.com/dotnet/api/system.int32) | The numeric node identifier of the node to subscribe. |
| `received` | [OpcEventReceivedEventHandler](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opceventreceivedeventhandler/) | The [OpcEventReceivedEventHandler](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opceventreceivedeventhandler/) method to assign as the event handler of the [EventReceived](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcmonitoreditem/members#eventreceived) event or a null reference (Nothing in Visual Basic) if there no event handler is to be assigned first. |

**Returns**

[OpcSubscription](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcsubscription/)

A new instance of the [OpcSubscription](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcsubscription/) class with a single [OpcMonitoredItem](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcmonitoreditem/) setup with the information specified. The kind of monitored item will when monitor events performed on the node identified by the values passed to this method.

**Exceptions**

| Exception | Condition |
|---|---|
| [OpcException](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcexception/) | The service execution failed upon different circumstances; for more details see exception details. The following issues can lead to that exception: [BadNothingToDo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnothingtodo), [BadTooManyOperations](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanyoperations), [BadTimestampsToReturnInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtimestampstoreturninvalid), [BadSubscriptionIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badsubscriptionidinvalid), [BadMonitoringModeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoringmodeinvalid), [BadNodeIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidinvalid), [BadNodeIdUnknown](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidunknown), [BadIndexRangeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangeinvalid), [BadIndexRangeNoData](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangenodata), [BadDataEncodingInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodinginvalid), [BadDataEncodingUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodingunsupported), [BadMonitoredItemFilterInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoreditemfilterinvalid), [BadMonitoredItemFilterUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoreditemfilterunsupported), [BadFilterNotAllowed](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badfilternotallowed), [BadTooManySubscriptions](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanysubscriptions) and [BadTooManyMonitoredItems](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanymonitoreditems). |

## SubscribeEvent(uint, OpcEventReceivedEventHandler)

Subscribes events on the node specified by `nodeId`.

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

```csharp
public OpcSubscription SubscribeEvent(
    uint nodeId,
    OpcEventReceivedEventHandler received)
```

</div>

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

```vbnet
Public Function SubscribeEvent(
    nodeId As UInteger,
    received As OpcEventReceivedEventHandler) As OpcSubscription
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `nodeId` | [UInt32](https://learn.microsoft.com/dotnet/api/system.uint32) | The numeric node identifier of the node to subscribe. |
| `received` | [OpcEventReceivedEventHandler](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opceventreceivedeventhandler/) | The [OpcEventReceivedEventHandler](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opceventreceivedeventhandler/) method to assign as the event handler of the [EventReceived](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcmonitoreditem/members#eventreceived) event or a null reference (Nothing in Visual Basic) if there no event handler is to be assigned first. |

**Returns**

[OpcSubscription](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcsubscription/)

A new instance of the [OpcSubscription](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcsubscription/) class with a single [OpcMonitoredItem](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcmonitoreditem/) setup with the information specified. The kind of monitored item will when monitor events performed on the node identified by the values passed to this method.

**Exceptions**

| Exception | Condition |
|---|---|
| [OpcException](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcexception/) | The service execution failed upon different circumstances; for more details see exception details. The following issues can lead to that exception: [BadNothingToDo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnothingtodo), [BadTooManyOperations](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanyoperations), [BadTimestampsToReturnInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtimestampstoreturninvalid), [BadSubscriptionIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badsubscriptionidinvalid), [BadMonitoringModeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoringmodeinvalid), [BadNodeIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidinvalid), [BadNodeIdUnknown](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidunknown), [BadIndexRangeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangeinvalid), [BadIndexRangeNoData](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangenodata), [BadDataEncodingInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodinginvalid), [BadDataEncodingUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodingunsupported), [BadMonitoredItemFilterInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoreditemfilterinvalid), [BadMonitoredItemFilterUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoreditemfilterunsupported), [BadFilterNotAllowed](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badfilternotallowed), [BadTooManySubscriptions](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanysubscriptions) and [BadTooManyMonitoredItems](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanymonitoreditems). |

## SubscribeEvent(string, OpcEventReceivedEventHandler)

Subscribes events on the node specified by `nodeId`.

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

```csharp
public OpcSubscription SubscribeEvent(
    string nodeId,
    OpcEventReceivedEventHandler received)
```

</div>

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

```vbnet
Public Function SubscribeEvent(
    nodeId As String,
    received As OpcEventReceivedEventHandler) As OpcSubscription
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `nodeId` | [String](https://learn.microsoft.com/dotnet/api/system.string) | The textual node identifier of the node to subscribe. |
| `received` | [OpcEventReceivedEventHandler](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opceventreceivedeventhandler/) | The [OpcEventReceivedEventHandler](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opceventreceivedeventhandler/) method to assign as the event handler of the [EventReceived](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcmonitoreditem/members#eventreceived) event or a null reference (Nothing in Visual Basic) if there no event handler is to be assigned first. |

**Returns**

[OpcSubscription](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcsubscription/)

A new instance of the [OpcSubscription](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcsubscription/) class with a single [OpcMonitoredItem](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcmonitoreditem/) setup with the information specified. The kind of monitored item will when monitor events performed on the node identified by the values passed to this method.

**Exceptions**

| Exception | Condition |
|---|---|
| [OpcException](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcexception/) | The service execution failed upon different circumstances; for more details see exception details. The following issues can lead to that exception: [BadNothingToDo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnothingtodo), [BadTooManyOperations](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanyoperations), [BadTimestampsToReturnInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtimestampstoreturninvalid), [BadSubscriptionIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badsubscriptionidinvalid), [BadMonitoringModeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoringmodeinvalid), [BadNodeIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidinvalid), [BadNodeIdUnknown](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidunknown), [BadIndexRangeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangeinvalid), [BadIndexRangeNoData](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangenodata), [BadDataEncodingInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodinginvalid), [BadDataEncodingUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodingunsupported), [BadMonitoredItemFilterInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoreditemfilterinvalid), [BadMonitoredItemFilterUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoreditemfilterunsupported), [BadFilterNotAllowed](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badfilternotallowed), [BadTooManySubscriptions](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanysubscriptions) and [BadTooManyMonitoredItems](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanymonitoreditems). |

## SubscribeEvent(byte\[\], OpcAttribute, OpcEventReceivedEventHandler)

Subscribes events on the `attribute` of the node specified by `nodeId`.

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

```csharp
public OpcSubscription SubscribeEvent(
    byte[] nodeId,
    OpcAttribute attribute,
    OpcEventReceivedEventHandler received)
```

</div>

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

```vbnet
Public Function SubscribeEvent(
    nodeId As Byte(),
    attribute As OpcAttribute,
    received As OpcEventReceivedEventHandler) As OpcSubscription
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `nodeId` | [Byte](https://learn.microsoft.com/dotnet/api/system.byte)[] | The opaque node identifier of the node to subscribe. |
| `attribute` | [OpcAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/) | One of the members defined by the [OpcAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/) enumeration that defines which node attribute is to be used by the subscription. |
| `received` | [OpcEventReceivedEventHandler](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opceventreceivedeventhandler/) | The [OpcEventReceivedEventHandler](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opceventreceivedeventhandler/) method to assign as the event handler of the [EventReceived](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcmonitoreditem/members#eventreceived) event or a null reference (Nothing in Visual Basic) if there no event handler is to be assigned first. |

**Returns**

[OpcSubscription](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcsubscription/)

A new instance of the [OpcSubscription](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcsubscription/) class with a single [OpcMonitoredItem](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcmonitoreditem/) setup with the information specified. The kind of monitored item will when monitor events performed on the node identified by the values passed to this method.

**Exceptions**

| Exception | Condition |
|---|---|
| [OpcException](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcexception/) | The service execution failed upon different circumstances; for more details see exception details. The following issues can lead to that exception: [BadNothingToDo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnothingtodo), [BadTooManyOperations](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanyoperations), [BadTimestampsToReturnInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtimestampstoreturninvalid), [BadSubscriptionIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badsubscriptionidinvalid), [BadMonitoringModeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoringmodeinvalid), [BadNodeIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidinvalid), [BadNodeIdUnknown](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidunknown), [BadAttributeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badattributeinvalid), [BadIndexRangeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangeinvalid), [BadIndexRangeNoData](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangenodata), [BadDataEncodingInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodinginvalid), [BadDataEncodingUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodingunsupported), [BadMonitoredItemFilterInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoreditemfilterinvalid), [BadMonitoredItemFilterUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoreditemfilterunsupported), [BadFilterNotAllowed](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badfilternotallowed), [BadTooManySubscriptions](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanysubscriptions) and [BadTooManyMonitoredItems](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanymonitoreditems). |

## SubscribeEvent(Guid, OpcAttribute, OpcEventReceivedEventHandler)

Subscribes events on the `attribute` of the node specified by `nodeId`.

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

```csharp
public OpcSubscription SubscribeEvent(
    Guid nodeId,
    OpcAttribute attribute,
    OpcEventReceivedEventHandler received)
```

</div>

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

```vbnet
Public Function SubscribeEvent(
    nodeId As Guid,
    attribute As OpcAttribute,
    received As OpcEventReceivedEventHandler) As OpcSubscription
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `nodeId` | [Guid](https://learn.microsoft.com/dotnet/api/system.guid) | The general unique identifier (= GUID) of the node to subscribe. |
| `attribute` | [OpcAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/) | One of the members defined by the [OpcAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/) enumeration that defines which node attribute is to be used by the subscription. |
| `received` | [OpcEventReceivedEventHandler](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opceventreceivedeventhandler/) | The [OpcEventReceivedEventHandler](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opceventreceivedeventhandler/) method to assign as the event handler of the [EventReceived](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcmonitoreditem/members#eventreceived) event or a null reference (Nothing in Visual Basic) if there no event handler is to be assigned first. |

**Returns**

[OpcSubscription](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcsubscription/)

A new instance of the [OpcSubscription](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcsubscription/) class with a single [OpcMonitoredItem](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcmonitoreditem/) setup with the information specified. The kind of monitored item will when monitor events performed on the node identified by the values passed to this method.

**Exceptions**

| Exception | Condition |
|---|---|
| [OpcException](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcexception/) | The service execution failed upon different circumstances; for more details see exception details. The following issues can lead to that exception: [BadNothingToDo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnothingtodo), [BadTooManyOperations](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanyoperations), [BadTimestampsToReturnInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtimestampstoreturninvalid), [BadSubscriptionIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badsubscriptionidinvalid), [BadMonitoringModeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoringmodeinvalid), [BadNodeIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidinvalid), [BadNodeIdUnknown](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidunknown), [BadAttributeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badattributeinvalid), [BadIndexRangeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangeinvalid), [BadIndexRangeNoData](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangenodata), [BadDataEncodingInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodinginvalid), [BadDataEncodingUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodingunsupported), [BadMonitoredItemFilterInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoreditemfilterinvalid), [BadMonitoredItemFilterUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoreditemfilterunsupported), [BadFilterNotAllowed](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badfilternotallowed), [BadTooManySubscriptions](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanysubscriptions) and [BadTooManyMonitoredItems](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanymonitoreditems). |

## SubscribeEvent(int, OpcAttribute, OpcEventReceivedEventHandler)

Subscribes events on the `attribute` of the node specified by `nodeId`.

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

```csharp
public OpcSubscription SubscribeEvent(
    int nodeId,
    OpcAttribute attribute,
    OpcEventReceivedEventHandler received)
```

</div>

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

```vbnet
Public Function SubscribeEvent(
    nodeId As Integer,
    attribute As OpcAttribute,
    received As OpcEventReceivedEventHandler) As OpcSubscription
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `nodeId` | [Int32](https://learn.microsoft.com/dotnet/api/system.int32) | The numeric node identifier of the node to subscribe. |
| `attribute` | [OpcAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/) | One of the members defined by the [OpcAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/) enumeration that defines which node attribute is to be used by the subscription. |
| `received` | [OpcEventReceivedEventHandler](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opceventreceivedeventhandler/) | The [OpcEventReceivedEventHandler](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opceventreceivedeventhandler/) method to assign as the event handler of the [EventReceived](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcmonitoreditem/members#eventreceived) event or a null reference (Nothing in Visual Basic) if there no event handler is to be assigned first. |

**Returns**

[OpcSubscription](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcsubscription/)

A new instance of the [OpcSubscription](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcsubscription/) class with a single [OpcMonitoredItem](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcmonitoreditem/) setup with the information specified. The kind of monitored item will when monitor events performed on the node identified by the values passed to this method.

**Exceptions**

| Exception | Condition |
|---|---|
| [OpcException](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcexception/) | The service execution failed upon different circumstances; for more details see exception details. The following issues can lead to that exception: [BadNothingToDo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnothingtodo), [BadTooManyOperations](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanyoperations), [BadTimestampsToReturnInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtimestampstoreturninvalid), [BadSubscriptionIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badsubscriptionidinvalid), [BadMonitoringModeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoringmodeinvalid), [BadNodeIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidinvalid), [BadNodeIdUnknown](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidunknown), [BadAttributeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badattributeinvalid), [BadIndexRangeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangeinvalid), [BadIndexRangeNoData](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangenodata), [BadDataEncodingInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodinginvalid), [BadDataEncodingUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodingunsupported), [BadMonitoredItemFilterInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoreditemfilterinvalid), [BadMonitoredItemFilterUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoreditemfilterunsupported), [BadFilterNotAllowed](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badfilternotallowed), [BadTooManySubscriptions](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanysubscriptions) and [BadTooManyMonitoredItems](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanymonitoreditems). |

## SubscribeEvent(uint, OpcAttribute, OpcEventReceivedEventHandler)

Subscribes events on the `attribute` of the node specified by `nodeId`.

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

```csharp
public OpcSubscription SubscribeEvent(
    uint nodeId,
    OpcAttribute attribute,
    OpcEventReceivedEventHandler received)
```

</div>

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

```vbnet
Public Function SubscribeEvent(
    nodeId As UInteger,
    attribute As OpcAttribute,
    received As OpcEventReceivedEventHandler) As OpcSubscription
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `nodeId` | [UInt32](https://learn.microsoft.com/dotnet/api/system.uint32) | The numeric node identifier of the node to subscribe. |
| `attribute` | [OpcAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/) | One of the members defined by the [OpcAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/) enumeration that defines which node attribute is to be used by the subscription. |
| `received` | [OpcEventReceivedEventHandler](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opceventreceivedeventhandler/) | The [OpcEventReceivedEventHandler](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opceventreceivedeventhandler/) method to assign as the event handler of the [EventReceived](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcmonitoreditem/members#eventreceived) event or a null reference (Nothing in Visual Basic) if there no event handler is to be assigned first. |

**Returns**

[OpcSubscription](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcsubscription/)

A new instance of the [OpcSubscription](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcsubscription/) class with a single [OpcMonitoredItem](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcmonitoreditem/) setup with the information specified. The kind of monitored item will when monitor events performed on the node identified by the values passed to this method.

**Exceptions**

| Exception | Condition |
|---|---|
| [OpcException](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcexception/) | The service execution failed upon different circumstances; for more details see exception details. The following issues can lead to that exception: [BadNothingToDo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnothingtodo), [BadTooManyOperations](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanyoperations), [BadTimestampsToReturnInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtimestampstoreturninvalid), [BadSubscriptionIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badsubscriptionidinvalid), [BadMonitoringModeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoringmodeinvalid), [BadNodeIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidinvalid), [BadNodeIdUnknown](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidunknown), [BadAttributeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badattributeinvalid), [BadIndexRangeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangeinvalid), [BadIndexRangeNoData](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangenodata), [BadDataEncodingInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodinginvalid), [BadDataEncodingUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodingunsupported), [BadMonitoredItemFilterInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoreditemfilterinvalid), [BadMonitoredItemFilterUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoreditemfilterunsupported), [BadFilterNotAllowed](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badfilternotallowed), [BadTooManySubscriptions](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanysubscriptions) and [BadTooManyMonitoredItems](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanymonitoreditems). |

## SubscribeEvent(string, OpcAttribute, OpcEventReceivedEventHandler)

Subscribes events on the `attribute` of the node specified by `nodeId`.

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

```csharp
public OpcSubscription SubscribeEvent(
    string nodeId,
    OpcAttribute attribute,
    OpcEventReceivedEventHandler received)
```

</div>

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

```vbnet
Public Function SubscribeEvent(
    nodeId As String,
    attribute As OpcAttribute,
    received As OpcEventReceivedEventHandler) As OpcSubscription
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `nodeId` | [String](https://learn.microsoft.com/dotnet/api/system.string) | The textual node identifier of the node to subscribe. |
| `attribute` | [OpcAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/) | One of the members defined by the [OpcAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/) enumeration that defines which node attribute is to be used by the subscription. |
| `received` | [OpcEventReceivedEventHandler](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opceventreceivedeventhandler/) | The [OpcEventReceivedEventHandler](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opceventreceivedeventhandler/) method to assign as the event handler of the [EventReceived](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcmonitoreditem/members#eventreceived) event or a null reference (Nothing in Visual Basic) if there no event handler is to be assigned first. |

**Returns**

[OpcSubscription](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcsubscription/)

A new instance of the [OpcSubscription](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcsubscription/) class with a single [OpcMonitoredItem](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcmonitoreditem/) setup with the information specified. The kind of monitored item will when monitor events performed on the node identified by the values passed to this method.

**Exceptions**

| Exception | Condition |
|---|---|
| [OpcException](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcexception/) | The service execution failed upon different circumstances; for more details see exception details. The following issues can lead to that exception: [BadNothingToDo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnothingtodo), [BadTooManyOperations](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanyoperations), [BadTimestampsToReturnInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtimestampstoreturninvalid), [BadSubscriptionIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badsubscriptionidinvalid), [BadMonitoringModeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoringmodeinvalid), [BadNodeIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidinvalid), [BadNodeIdUnknown](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidunknown), [BadAttributeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badattributeinvalid), [BadIndexRangeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangeinvalid), [BadIndexRangeNoData](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangenodata), [BadDataEncodingInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodinginvalid), [BadDataEncodingUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodingunsupported), [BadMonitoredItemFilterInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoreditemfilterinvalid), [BadMonitoredItemFilterUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoreditemfilterunsupported), [BadFilterNotAllowed](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badfilternotallowed), [BadTooManySubscriptions](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanysubscriptions) and [BadTooManyMonitoredItems](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanymonitoreditems). |

## SubscribeEvent(byte\[\], int, OpcEventReceivedEventHandler)

Subscribes events on the node specified by `nodeId` and `namespaceIndex` specified.

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

```csharp
public OpcSubscription SubscribeEvent(
    byte[] nodeId,
    int namespaceIndex,
    OpcEventReceivedEventHandler received)
```

</div>

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

```vbnet
Public Function SubscribeEvent(
    nodeId As Byte(),
    namespaceIndex As Integer,
    received As OpcEventReceivedEventHandler) As OpcSubscription
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `nodeId` | [Byte](https://learn.microsoft.com/dotnet/api/system.byte)[] | The opaque node identifier of the node to subscribe. |
| `namespaceIndex` | [Int32](https://learn.microsoft.com/dotnet/api/system.int32) | The index of the namespace within that the node with the `nodeId` specified can be located. |
| `received` | [OpcEventReceivedEventHandler](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opceventreceivedeventhandler/) | The [OpcEventReceivedEventHandler](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opceventreceivedeventhandler/) method to assign as the event handler of the [EventReceived](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcmonitoreditem/members#eventreceived) event or a null reference (Nothing in Visual Basic) if there no event handler is to be assigned first. |

**Returns**

[OpcSubscription](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcsubscription/)

A new instance of the [OpcSubscription](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcsubscription/) class with a single [OpcMonitoredItem](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcmonitoreditem/) setup with the information specified. The kind of monitored item will when monitor events performed on the node identified by the values passed to this method.

**Exceptions**

| Exception | Condition |
|---|---|
| [OpcException](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcexception/) | The service execution failed upon different circumstances; for more details see exception details. The following issues can lead to that exception: [BadNothingToDo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnothingtodo), [BadTooManyOperations](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanyoperations), [BadTimestampsToReturnInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtimestampstoreturninvalid), [BadSubscriptionIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badsubscriptionidinvalid), [BadMonitoringModeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoringmodeinvalid), [BadNodeIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidinvalid), [BadNodeIdUnknown](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidunknown), [BadIndexRangeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangeinvalid), [BadIndexRangeNoData](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangenodata), [BadDataEncodingInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodinginvalid), [BadDataEncodingUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodingunsupported), [BadMonitoredItemFilterInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoreditemfilterinvalid), [BadMonitoredItemFilterUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoreditemfilterunsupported), [BadFilterNotAllowed](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badfilternotallowed), [BadTooManySubscriptions](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanysubscriptions) and [BadTooManyMonitoredItems](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanymonitoreditems). |

## SubscribeEvent(Guid, int, OpcEventReceivedEventHandler)

Subscribes events on the node specified by `nodeId` and `namespaceIndex` specified.

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

```csharp
public OpcSubscription SubscribeEvent(
    Guid nodeId,
    int namespaceIndex,
    OpcEventReceivedEventHandler received)
```

</div>

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

```vbnet
Public Function SubscribeEvent(
    nodeId As Guid,
    namespaceIndex As Integer,
    received As OpcEventReceivedEventHandler) As OpcSubscription
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `nodeId` | [Guid](https://learn.microsoft.com/dotnet/api/system.guid) | The general unique identifier (= GUID) of the node to subscribe. |
| `namespaceIndex` | [Int32](https://learn.microsoft.com/dotnet/api/system.int32) | The index of the namespace within that the node with the `nodeId` specified can be located. |
| `received` | [OpcEventReceivedEventHandler](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opceventreceivedeventhandler/) | The [OpcEventReceivedEventHandler](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opceventreceivedeventhandler/) method to assign as the event handler of the [EventReceived](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcmonitoreditem/members#eventreceived) event or a null reference (Nothing in Visual Basic) if there no event handler is to be assigned first. |

**Returns**

[OpcSubscription](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcsubscription/)

A new instance of the [OpcSubscription](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcsubscription/) class with a single [OpcMonitoredItem](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcmonitoreditem/) setup with the information specified. The kind of monitored item will when monitor events performed on the node identified by the values passed to this method.

**Exceptions**

| Exception | Condition |
|---|---|
| [OpcException](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcexception/) | The service execution failed upon different circumstances; for more details see exception details. The following issues can lead to that exception: [BadNothingToDo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnothingtodo), [BadTooManyOperations](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanyoperations), [BadTimestampsToReturnInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtimestampstoreturninvalid), [BadSubscriptionIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badsubscriptionidinvalid), [BadMonitoringModeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoringmodeinvalid), [BadNodeIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidinvalid), [BadNodeIdUnknown](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidunknown), [BadIndexRangeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangeinvalid), [BadIndexRangeNoData](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangenodata), [BadDataEncodingInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodinginvalid), [BadDataEncodingUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodingunsupported), [BadMonitoredItemFilterInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoreditemfilterinvalid), [BadMonitoredItemFilterUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoreditemfilterunsupported), [BadFilterNotAllowed](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badfilternotallowed), [BadTooManySubscriptions](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanysubscriptions) and [BadTooManyMonitoredItems](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanymonitoreditems). |

## SubscribeEvent(int, int, OpcEventReceivedEventHandler)

Subscribes events on the node specified by `nodeId` and `namespaceIndex` specified.

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

```csharp
public OpcSubscription SubscribeEvent(
    int nodeId,
    int namespaceIndex,
    OpcEventReceivedEventHandler received)
```

</div>

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

```vbnet
Public Function SubscribeEvent(
    nodeId As Integer,
    namespaceIndex As Integer,
    received As OpcEventReceivedEventHandler) As OpcSubscription
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `nodeId` | [Int32](https://learn.microsoft.com/dotnet/api/system.int32) | The numeric node identifier of the node to subscribe. |
| `namespaceIndex` | [Int32](https://learn.microsoft.com/dotnet/api/system.int32) | The index of the namespace within that the node with the `nodeId` specified can be located. |
| `received` | [OpcEventReceivedEventHandler](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opceventreceivedeventhandler/) | The [OpcEventReceivedEventHandler](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opceventreceivedeventhandler/) method to assign as the event handler of the [EventReceived](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcmonitoreditem/members#eventreceived) event or a null reference (Nothing in Visual Basic) if there no event handler is to be assigned first. |

**Returns**

[OpcSubscription](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcsubscription/)

A new instance of the [OpcSubscription](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcsubscription/) class with a single [OpcMonitoredItem](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcmonitoreditem/) setup with the information specified. The kind of monitored item will when monitor events performed on the node identified by the values passed to this method.

**Exceptions**

| Exception | Condition |
|---|---|
| [OpcException](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcexception/) | The service execution failed upon different circumstances; for more details see exception details. The following issues can lead to that exception: [BadNothingToDo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnothingtodo), [BadTooManyOperations](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanyoperations), [BadTimestampsToReturnInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtimestampstoreturninvalid), [BadSubscriptionIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badsubscriptionidinvalid), [BadMonitoringModeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoringmodeinvalid), [BadNodeIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidinvalid), [BadNodeIdUnknown](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidunknown), [BadIndexRangeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangeinvalid), [BadIndexRangeNoData](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangenodata), [BadDataEncodingInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodinginvalid), [BadDataEncodingUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodingunsupported), [BadMonitoredItemFilterInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoreditemfilterinvalid), [BadMonitoredItemFilterUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoreditemfilterunsupported), [BadFilterNotAllowed](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badfilternotallowed), [BadTooManySubscriptions](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanysubscriptions) and [BadTooManyMonitoredItems](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanymonitoreditems). |

## SubscribeEvent(uint, int, OpcEventReceivedEventHandler)

Subscribes events on the node specified by `nodeId` and `namespaceIndex` specified.

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

```csharp
public OpcSubscription SubscribeEvent(
    uint nodeId,
    int namespaceIndex,
    OpcEventReceivedEventHandler received)
```

</div>

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

```vbnet
Public Function SubscribeEvent(
    nodeId As UInteger,
    namespaceIndex As Integer,
    received As OpcEventReceivedEventHandler) As OpcSubscription
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `nodeId` | [UInt32](https://learn.microsoft.com/dotnet/api/system.uint32) | The numeric node identifier of the node to subscribe. |
| `namespaceIndex` | [Int32](https://learn.microsoft.com/dotnet/api/system.int32) | The index of the namespace within that the node with the `nodeId` specified can be located. |
| `received` | [OpcEventReceivedEventHandler](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opceventreceivedeventhandler/) | The [OpcEventReceivedEventHandler](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opceventreceivedeventhandler/) method to assign as the event handler of the [EventReceived](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcmonitoreditem/members#eventreceived) event or a null reference (Nothing in Visual Basic) if there no event handler is to be assigned first. |

**Returns**

[OpcSubscription](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcsubscription/)

A new instance of the [OpcSubscription](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcsubscription/) class with a single [OpcMonitoredItem](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcmonitoreditem/) setup with the information specified. The kind of monitored item will when monitor events performed on the node identified by the values passed to this method.

**Exceptions**

| Exception | Condition |
|---|---|
| [OpcException](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcexception/) | The service execution failed upon different circumstances; for more details see exception details. The following issues can lead to that exception: [BadNothingToDo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnothingtodo), [BadTooManyOperations](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanyoperations), [BadTimestampsToReturnInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtimestampstoreturninvalid), [BadSubscriptionIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badsubscriptionidinvalid), [BadMonitoringModeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoringmodeinvalid), [BadNodeIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidinvalid), [BadNodeIdUnknown](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidunknown), [BadIndexRangeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangeinvalid), [BadIndexRangeNoData](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangenodata), [BadDataEncodingInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodinginvalid), [BadDataEncodingUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodingunsupported), [BadMonitoredItemFilterInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoreditemfilterinvalid), [BadMonitoredItemFilterUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoreditemfilterunsupported), [BadFilterNotAllowed](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badfilternotallowed), [BadTooManySubscriptions](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanysubscriptions) and [BadTooManyMonitoredItems](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanymonitoreditems). |

## SubscribeEvent(string, int, OpcEventReceivedEventHandler)

Subscribes events on the node specified by `nodeId` and `namespaceIndex` specified.

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

```csharp
public OpcSubscription SubscribeEvent(
    string nodeId,
    int namespaceIndex,
    OpcEventReceivedEventHandler received)
```

</div>

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

```vbnet
Public Function SubscribeEvent(
    nodeId As String,
    namespaceIndex As Integer,
    received As OpcEventReceivedEventHandler) As OpcSubscription
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `nodeId` | [String](https://learn.microsoft.com/dotnet/api/system.string) | The textual node identifier of the node to subscribe. |
| `namespaceIndex` | [Int32](https://learn.microsoft.com/dotnet/api/system.int32) | The index of the namespace within that the node with the `nodeId` specified can be located. |
| `received` | [OpcEventReceivedEventHandler](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opceventreceivedeventhandler/) | The [OpcEventReceivedEventHandler](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opceventreceivedeventhandler/) method to assign as the event handler of the [EventReceived](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcmonitoreditem/members#eventreceived) event or a null reference (Nothing in Visual Basic) if there no event handler is to be assigned first. |

**Returns**

[OpcSubscription](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcsubscription/)

A new instance of the [OpcSubscription](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcsubscription/) class with a single [OpcMonitoredItem](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcmonitoreditem/) setup with the information specified. The kind of monitored item will when monitor events performed on the node identified by the values passed to this method.

**Exceptions**

| Exception | Condition |
|---|---|
| [OpcException](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcexception/) | The service execution failed upon different circumstances; for more details see exception details. The following issues can lead to that exception: [BadNothingToDo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnothingtodo), [BadTooManyOperations](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanyoperations), [BadTimestampsToReturnInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtimestampstoreturninvalid), [BadSubscriptionIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badsubscriptionidinvalid), [BadMonitoringModeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoringmodeinvalid), [BadNodeIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidinvalid), [BadNodeIdUnknown](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidunknown), [BadIndexRangeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangeinvalid), [BadIndexRangeNoData](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangenodata), [BadDataEncodingInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodinginvalid), [BadDataEncodingUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodingunsupported), [BadMonitoredItemFilterInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoreditemfilterinvalid), [BadMonitoredItemFilterUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoreditemfilterunsupported), [BadFilterNotAllowed](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badfilternotallowed), [BadTooManySubscriptions](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanysubscriptions) and [BadTooManyMonitoredItems](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanymonitoreditems). |

## SubscribeEvent(byte\[\], int, OpcAttribute, OpcEventReceivedEventHandler)

Subscribes events on the `attribute` of the node specified by `nodeId` and `namespaceIndex` specified to operate on the `attribute`.

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

```csharp
public OpcSubscription SubscribeEvent(
    byte[] nodeId,
    int namespaceIndex,
    OpcAttribute attribute,
    OpcEventReceivedEventHandler received)
```

</div>

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

```vbnet
Public Function SubscribeEvent(
    nodeId As Byte(),
    namespaceIndex As Integer,
    attribute As OpcAttribute,
    received As OpcEventReceivedEventHandler) As OpcSubscription
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `nodeId` | [Byte](https://learn.microsoft.com/dotnet/api/system.byte)[] | The opaque node identifier of the node to subscribe. |
| `namespaceIndex` | [Int32](https://learn.microsoft.com/dotnet/api/system.int32) | The index of the namespace within that the node with the `nodeId` specified can be located. |
| `attribute` | [OpcAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/) | One of the members defined by the [OpcAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/) enumeration that defines which node attribute is to be used by the subscription. |
| `received` | [OpcEventReceivedEventHandler](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opceventreceivedeventhandler/) | The [OpcEventReceivedEventHandler](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opceventreceivedeventhandler/) method to assign as the event handler of the [EventReceived](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcmonitoreditem/members#eventreceived) event or a null reference (Nothing in Visual Basic) if there no event handler is to be assigned first. |

**Returns**

[OpcSubscription](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcsubscription/)

A new instance of the [OpcSubscription](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcsubscription/) class with a single [OpcMonitoredItem](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcmonitoreditem/) setup with the information specified. The kind of monitored item will when monitor events performed on the node identified by the values passed to this method.

**Exceptions**

| Exception | Condition |
|---|---|
| [OpcException](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcexception/) | The service execution failed upon different circumstances; for more details see exception details. The following issues can lead to that exception: [BadNothingToDo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnothingtodo), [BadTooManyOperations](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanyoperations), [BadTimestampsToReturnInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtimestampstoreturninvalid), [BadSubscriptionIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badsubscriptionidinvalid), [BadMonitoringModeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoringmodeinvalid), [BadNodeIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidinvalid), [BadNodeIdUnknown](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidunknown), [BadAttributeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badattributeinvalid), [BadIndexRangeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangeinvalid), [BadIndexRangeNoData](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangenodata), [BadDataEncodingInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodinginvalid), [BadDataEncodingUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodingunsupported), [BadMonitoredItemFilterInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoreditemfilterinvalid), [BadMonitoredItemFilterUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoreditemfilterunsupported), [BadFilterNotAllowed](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badfilternotallowed), [BadTooManySubscriptions](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanysubscriptions) and [BadTooManyMonitoredItems](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanymonitoreditems). |

## SubscribeEvent(Guid, int, OpcAttribute, OpcEventReceivedEventHandler)

Subscribes events on the `attribute` of the node specified by `nodeId` and `namespaceIndex` specified to operate on the `attribute`.

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

```csharp
public OpcSubscription SubscribeEvent(
    Guid nodeId,
    int namespaceIndex,
    OpcAttribute attribute,
    OpcEventReceivedEventHandler received)
```

</div>

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

```vbnet
Public Function SubscribeEvent(
    nodeId As Guid,
    namespaceIndex As Integer,
    attribute As OpcAttribute,
    received As OpcEventReceivedEventHandler) As OpcSubscription
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `nodeId` | [Guid](https://learn.microsoft.com/dotnet/api/system.guid) | The general unique identifier (= GUID) of the node to subscribe. |
| `namespaceIndex` | [Int32](https://learn.microsoft.com/dotnet/api/system.int32) | The index of the namespace within that the node with the `nodeId` specified can be located. |
| `attribute` | [OpcAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/) | One of the members defined by the [OpcAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/) enumeration that defines which node attribute is to be used by the subscription. |
| `received` | [OpcEventReceivedEventHandler](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opceventreceivedeventhandler/) | The [OpcEventReceivedEventHandler](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opceventreceivedeventhandler/) method to assign as the event handler of the [EventReceived](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcmonitoreditem/members#eventreceived) event or a null reference (Nothing in Visual Basic) if there no event handler is to be assigned first. |

**Returns**

[OpcSubscription](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcsubscription/)

A new instance of the [OpcSubscription](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcsubscription/) class with a single [OpcMonitoredItem](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcmonitoreditem/) setup with the information specified. The kind of monitored item will when monitor events performed on the node identified by the values passed to this method.

**Exceptions**

| Exception | Condition |
|---|---|
| [OpcException](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcexception/) | The service execution failed upon different circumstances; for more details see exception details. The following issues can lead to that exception: [BadNothingToDo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnothingtodo), [BadTooManyOperations](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanyoperations), [BadTimestampsToReturnInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtimestampstoreturninvalid), [BadSubscriptionIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badsubscriptionidinvalid), [BadMonitoringModeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoringmodeinvalid), [BadNodeIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidinvalid), [BadNodeIdUnknown](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidunknown), [BadAttributeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badattributeinvalid), [BadIndexRangeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangeinvalid), [BadIndexRangeNoData](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangenodata), [BadDataEncodingInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodinginvalid), [BadDataEncodingUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodingunsupported), [BadMonitoredItemFilterInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoreditemfilterinvalid), [BadMonitoredItemFilterUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoreditemfilterunsupported), [BadFilterNotAllowed](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badfilternotallowed), [BadTooManySubscriptions](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanysubscriptions) and [BadTooManyMonitoredItems](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanymonitoreditems). |

## SubscribeEvent(int, int, OpcAttribute, OpcEventReceivedEventHandler)

Subscribes events on the `attribute` of the node specified by `nodeId` and `namespaceIndex` specified to operate on the `attribute`.

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

```csharp
public OpcSubscription SubscribeEvent(
    int nodeId,
    int namespaceIndex,
    OpcAttribute attribute,
    OpcEventReceivedEventHandler received)
```

</div>

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

```vbnet
Public Function SubscribeEvent(
    nodeId As Integer,
    namespaceIndex As Integer,
    attribute As OpcAttribute,
    received As OpcEventReceivedEventHandler) As OpcSubscription
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `nodeId` | [Int32](https://learn.microsoft.com/dotnet/api/system.int32) | The numeric node identifier of the node to subscribe. |
| `namespaceIndex` | [Int32](https://learn.microsoft.com/dotnet/api/system.int32) | The index of the namespace within that the node with the `nodeId` specified can be located. |
| `attribute` | [OpcAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/) | One of the members defined by the [OpcAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/) enumeration that defines which node attribute is to be used by the subscription. |
| `received` | [OpcEventReceivedEventHandler](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opceventreceivedeventhandler/) | The [OpcEventReceivedEventHandler](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opceventreceivedeventhandler/) method to assign as the event handler of the [EventReceived](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcmonitoreditem/members#eventreceived) event or a null reference (Nothing in Visual Basic) if there no event handler is to be assigned first. |

**Returns**

[OpcSubscription](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcsubscription/)

A new instance of the [OpcSubscription](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcsubscription/) class with a single [OpcMonitoredItem](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcmonitoreditem/) setup with the information specified. The kind of monitored item will when monitor events performed on the node identified by the values passed to this method.

**Exceptions**

| Exception | Condition |
|---|---|
| [OpcException](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcexception/) | The service execution failed upon different circumstances; for more details see exception details. The following issues can lead to that exception: [BadNothingToDo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnothingtodo), [BadTooManyOperations](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanyoperations), [BadTimestampsToReturnInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtimestampstoreturninvalid), [BadSubscriptionIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badsubscriptionidinvalid), [BadMonitoringModeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoringmodeinvalid), [BadNodeIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidinvalid), [BadNodeIdUnknown](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidunknown), [BadAttributeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badattributeinvalid), [BadIndexRangeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangeinvalid), [BadIndexRangeNoData](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangenodata), [BadDataEncodingInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodinginvalid), [BadDataEncodingUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodingunsupported), [BadMonitoredItemFilterInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoreditemfilterinvalid), [BadMonitoredItemFilterUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoreditemfilterunsupported), [BadFilterNotAllowed](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badfilternotallowed), [BadTooManySubscriptions](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanysubscriptions) and [BadTooManyMonitoredItems](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanymonitoreditems). |

## SubscribeEvent(uint, int, OpcAttribute, OpcEventReceivedEventHandler)

Subscribes events on the `attribute` of the node specified by `nodeId` and `namespaceIndex` specified to operate on the `attribute`.

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

```csharp
public OpcSubscription SubscribeEvent(
    uint nodeId,
    int namespaceIndex,
    OpcAttribute attribute,
    OpcEventReceivedEventHandler received)
```

</div>

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

```vbnet
Public Function SubscribeEvent(
    nodeId As UInteger,
    namespaceIndex As Integer,
    attribute As OpcAttribute,
    received As OpcEventReceivedEventHandler) As OpcSubscription
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `nodeId` | [UInt32](https://learn.microsoft.com/dotnet/api/system.uint32) | The numeric node identifier of the node to subscribe. |
| `namespaceIndex` | [Int32](https://learn.microsoft.com/dotnet/api/system.int32) | The index of the namespace within that the node with the `nodeId` specified can be located. |
| `attribute` | [OpcAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/) | One of the members defined by the [OpcAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/) enumeration that defines which node attribute is to be used by the subscription. |
| `received` | [OpcEventReceivedEventHandler](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opceventreceivedeventhandler/) | The [OpcEventReceivedEventHandler](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opceventreceivedeventhandler/) method to assign as the event handler of the [EventReceived](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcmonitoreditem/members#eventreceived) event or a null reference (Nothing in Visual Basic) if there no event handler is to be assigned first. |

**Returns**

[OpcSubscription](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcsubscription/)

A new instance of the [OpcSubscription](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcsubscription/) class with a single [OpcMonitoredItem](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcmonitoreditem/) setup with the information specified. The kind of monitored item will when monitor events performed on the node identified by the values passed to this method.

**Exceptions**

| Exception | Condition |
|---|---|
| [OpcException](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcexception/) | The service execution failed upon different circumstances; for more details see exception details. The following issues can lead to that exception: [BadNothingToDo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnothingtodo), [BadTooManyOperations](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanyoperations), [BadTimestampsToReturnInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtimestampstoreturninvalid), [BadSubscriptionIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badsubscriptionidinvalid), [BadMonitoringModeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoringmodeinvalid), [BadNodeIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidinvalid), [BadNodeIdUnknown](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidunknown), [BadAttributeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badattributeinvalid), [BadIndexRangeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangeinvalid), [BadIndexRangeNoData](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangenodata), [BadDataEncodingInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodinginvalid), [BadDataEncodingUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodingunsupported), [BadMonitoredItemFilterInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoreditemfilterinvalid), [BadMonitoredItemFilterUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoreditemfilterunsupported), [BadFilterNotAllowed](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badfilternotallowed), [BadTooManySubscriptions](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanysubscriptions) and [BadTooManyMonitoredItems](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanymonitoreditems). |

## SubscribeEvent(string, int, OpcAttribute, OpcEventReceivedEventHandler)

Subscribes events on the `attribute` of the node specified by `nodeId` and `namespaceIndex` specified to operate on the `attribute`.

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

```csharp
public OpcSubscription SubscribeEvent(
    string nodeId,
    int namespaceIndex,
    OpcAttribute attribute,
    OpcEventReceivedEventHandler received)
```

</div>

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

```vbnet
Public Function SubscribeEvent(
    nodeId As String,
    namespaceIndex As Integer,
    attribute As OpcAttribute,
    received As OpcEventReceivedEventHandler) As OpcSubscription
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `nodeId` | [String](https://learn.microsoft.com/dotnet/api/system.string) | The textual node identifier of the node to subscribe. |
| `namespaceIndex` | [Int32](https://learn.microsoft.com/dotnet/api/system.int32) | The index of the namespace within that the node with the `nodeId` specified can be located. |
| `attribute` | [OpcAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/) | One of the members defined by the [OpcAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/) enumeration that defines which node attribute is to be used by the subscription. |
| `received` | [OpcEventReceivedEventHandler](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opceventreceivedeventhandler/) | The [OpcEventReceivedEventHandler](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opceventreceivedeventhandler/) method to assign as the event handler of the [EventReceived](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcmonitoreditem/members#eventreceived) event or a null reference (Nothing in Visual Basic) if there no event handler is to be assigned first. |

**Returns**

[OpcSubscription](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcsubscription/)

A new instance of the [OpcSubscription](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcsubscription/) class with a single [OpcMonitoredItem](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcmonitoreditem/) setup with the information specified. The kind of monitored item will when monitor events performed on the node identified by the values passed to this method.

**Exceptions**

| Exception | Condition |
|---|---|
| [OpcException](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcexception/) | The service execution failed upon different circumstances; for more details see exception details. The following issues can lead to that exception: [BadNothingToDo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnothingtodo), [BadTooManyOperations](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanyoperations), [BadTimestampsToReturnInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtimestampstoreturninvalid), [BadSubscriptionIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badsubscriptionidinvalid), [BadMonitoringModeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoringmodeinvalid), [BadNodeIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidinvalid), [BadNodeIdUnknown](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidunknown), [BadAttributeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badattributeinvalid), [BadIndexRangeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangeinvalid), [BadIndexRangeNoData](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangenodata), [BadDataEncodingInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodinginvalid), [BadDataEncodingUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodingunsupported), [BadMonitoredItemFilterInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoreditemfilterinvalid), [BadMonitoredItemFilterUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoreditemfilterunsupported), [BadFilterNotAllowed](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badfilternotallowed), [BadTooManySubscriptions](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanysubscriptions) and [BadTooManyMonitoredItems](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanymonitoreditems). |

## SubscribeEvent(byte\[\], OpcEventFilter, OpcEventReceivedEventHandler)

Subscribes events on the node specified by `nodeId`.

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

```csharp
public OpcSubscription SubscribeEvent(
    byte[] nodeId,
    OpcEventFilter filter,
    OpcEventReceivedEventHandler received)
```

</div>

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

```vbnet
Public Function SubscribeEvent(
    nodeId As Byte(),
    filter As OpcEventFilter,
    received As OpcEventReceivedEventHandler) As OpcSubscription
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `nodeId` | [Byte](https://learn.microsoft.com/dotnet/api/system.byte)[] | The opaque node identifier of the node to subscribe. |
| `filter` | [OpcEventFilter](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opceventfilter/) | The [OpcEventFilter](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opceventfilter/) to be used by the server's subscription to - which the monitored item belongs - to filter the monitored data before it is reported to the client, which owns the monitored item. |
| `received` | [OpcEventReceivedEventHandler](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opceventreceivedeventhandler/) | The [OpcEventReceivedEventHandler](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opceventreceivedeventhandler/) method to assign as the event handler of the [EventReceived](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcmonitoreditem/members#eventreceived) event or a null reference (Nothing in Visual Basic) if there no event handler is to be assigned first. |

**Returns**

[OpcSubscription](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcsubscription/)

A new instance of the [OpcSubscription](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcsubscription/) class with a single [OpcMonitoredItem](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcmonitoreditem/) setup with the information specified. The kind of monitored item will when monitor events performed on the node identified by the values passed to this method.

**Exceptions**

| Exception | Condition |
|---|---|
| [OpcException](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcexception/) | The service execution failed upon different circumstances; for more details see exception details. The following issues can lead to that exception: [BadNothingToDo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnothingtodo), [BadTooManyOperations](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanyoperations), [BadTimestampsToReturnInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtimestampstoreturninvalid), [BadSubscriptionIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badsubscriptionidinvalid), [BadMonitoringModeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoringmodeinvalid), [BadNodeIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidinvalid), [BadNodeIdUnknown](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidunknown), [BadIndexRangeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangeinvalid), [BadIndexRangeNoData](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangenodata), [BadDataEncodingInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodinginvalid), [BadDataEncodingUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodingunsupported), [BadMonitoredItemFilterInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoreditemfilterinvalid), [BadMonitoredItemFilterUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoreditemfilterunsupported), [BadFilterNotAllowed](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badfilternotallowed), [BadTooManySubscriptions](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanysubscriptions) and [BadTooManyMonitoredItems](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanymonitoreditems). |

## SubscribeEvent(Guid, OpcEventFilter, OpcEventReceivedEventHandler)

Subscribes events on the node specified by `nodeId`.

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

```csharp
public OpcSubscription SubscribeEvent(
    Guid nodeId,
    OpcEventFilter filter,
    OpcEventReceivedEventHandler received)
```

</div>

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

```vbnet
Public Function SubscribeEvent(
    nodeId As Guid,
    filter As OpcEventFilter,
    received As OpcEventReceivedEventHandler) As OpcSubscription
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `nodeId` | [Guid](https://learn.microsoft.com/dotnet/api/system.guid) | The general unique identifier (= GUID) of the node to subscribe. |
| `filter` | [OpcEventFilter](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opceventfilter/) | The [OpcEventFilter](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opceventfilter/) to be used by the server's subscription to - which the monitored item belongs - to filter the monitored data before it is reported to the client, which owns the monitored item. |
| `received` | [OpcEventReceivedEventHandler](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opceventreceivedeventhandler/) | The [OpcEventReceivedEventHandler](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opceventreceivedeventhandler/) method to assign as the event handler of the [EventReceived](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcmonitoreditem/members#eventreceived) event or a null reference (Nothing in Visual Basic) if there no event handler is to be assigned first. |

**Returns**

[OpcSubscription](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcsubscription/)

A new instance of the [OpcSubscription](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcsubscription/) class with a single [OpcMonitoredItem](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcmonitoreditem/) setup with the information specified. The kind of monitored item will when monitor events performed on the node identified by the values passed to this method.

**Exceptions**

| Exception | Condition |
|---|---|
| [OpcException](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcexception/) | The service execution failed upon different circumstances; for more details see exception details. The following issues can lead to that exception: [BadNothingToDo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnothingtodo), [BadTooManyOperations](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanyoperations), [BadTimestampsToReturnInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtimestampstoreturninvalid), [BadSubscriptionIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badsubscriptionidinvalid), [BadMonitoringModeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoringmodeinvalid), [BadNodeIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidinvalid), [BadNodeIdUnknown](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidunknown), [BadIndexRangeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangeinvalid), [BadIndexRangeNoData](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangenodata), [BadDataEncodingInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodinginvalid), [BadDataEncodingUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodingunsupported), [BadMonitoredItemFilterInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoreditemfilterinvalid), [BadMonitoredItemFilterUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoreditemfilterunsupported), [BadFilterNotAllowed](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badfilternotallowed), [BadTooManySubscriptions](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanysubscriptions) and [BadTooManyMonitoredItems](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanymonitoreditems). |

## SubscribeEvent(int, OpcEventFilter, OpcEventReceivedEventHandler)

Subscribes events on the node specified by `nodeId`.

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

```csharp
public OpcSubscription SubscribeEvent(
    int nodeId,
    OpcEventFilter filter,
    OpcEventReceivedEventHandler received)
```

</div>

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

```vbnet
Public Function SubscribeEvent(
    nodeId As Integer,
    filter As OpcEventFilter,
    received As OpcEventReceivedEventHandler) As OpcSubscription
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `nodeId` | [Int32](https://learn.microsoft.com/dotnet/api/system.int32) | The numeric node identifier of the node to subscribe. |
| `filter` | [OpcEventFilter](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opceventfilter/) | The [OpcEventFilter](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opceventfilter/) to be used by the server's subscription to - which the monitored item belongs - to filter the monitored data before it is reported to the client, which owns the monitored item. |
| `received` | [OpcEventReceivedEventHandler](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opceventreceivedeventhandler/) | The [OpcEventReceivedEventHandler](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opceventreceivedeventhandler/) method to assign as the event handler of the [EventReceived](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcmonitoreditem/members#eventreceived) event or a null reference (Nothing in Visual Basic) if there no event handler is to be assigned first. |

**Returns**

[OpcSubscription](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcsubscription/)

A new instance of the [OpcSubscription](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcsubscription/) class with a single [OpcMonitoredItem](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcmonitoreditem/) setup with the information specified. The kind of monitored item will when monitor events performed on the node identified by the values passed to this method.

**Exceptions**

| Exception | Condition |
|---|---|
| [OpcException](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcexception/) | The service execution failed upon different circumstances; for more details see exception details. The following issues can lead to that exception: [BadNothingToDo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnothingtodo), [BadTooManyOperations](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanyoperations), [BadTimestampsToReturnInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtimestampstoreturninvalid), [BadSubscriptionIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badsubscriptionidinvalid), [BadMonitoringModeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoringmodeinvalid), [BadNodeIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidinvalid), [BadNodeIdUnknown](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidunknown), [BadIndexRangeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangeinvalid), [BadIndexRangeNoData](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangenodata), [BadDataEncodingInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodinginvalid), [BadDataEncodingUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodingunsupported), [BadMonitoredItemFilterInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoreditemfilterinvalid), [BadMonitoredItemFilterUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoreditemfilterunsupported), [BadFilterNotAllowed](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badfilternotallowed), [BadTooManySubscriptions](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanysubscriptions) and [BadTooManyMonitoredItems](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanymonitoreditems). |

## SubscribeEvent(uint, OpcEventFilter, OpcEventReceivedEventHandler)

Subscribes events on the node specified by `nodeId`.

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

```csharp
public OpcSubscription SubscribeEvent(
    uint nodeId,
    OpcEventFilter filter,
    OpcEventReceivedEventHandler received)
```

</div>

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

```vbnet
Public Function SubscribeEvent(
    nodeId As UInteger,
    filter As OpcEventFilter,
    received As OpcEventReceivedEventHandler) As OpcSubscription
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `nodeId` | [UInt32](https://learn.microsoft.com/dotnet/api/system.uint32) | The numeric node identifier of the node to subscribe. |
| `filter` | [OpcEventFilter](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opceventfilter/) | The [OpcEventFilter](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opceventfilter/) to be used by the server's subscription to - which the monitored item belongs - to filter the monitored data before it is reported to the client, which owns the monitored item. |
| `received` | [OpcEventReceivedEventHandler](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opceventreceivedeventhandler/) | The [OpcEventReceivedEventHandler](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opceventreceivedeventhandler/) method to assign as the event handler of the [EventReceived](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcmonitoreditem/members#eventreceived) event or a null reference (Nothing in Visual Basic) if there no event handler is to be assigned first. |

**Returns**

[OpcSubscription](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcsubscription/)

A new instance of the [OpcSubscription](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcsubscription/) class with a single [OpcMonitoredItem](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcmonitoreditem/) setup with the information specified. The kind of monitored item will when monitor events performed on the node identified by the values passed to this method.

**Exceptions**

| Exception | Condition |
|---|---|
| [OpcException](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcexception/) | The service execution failed upon different circumstances; for more details see exception details. The following issues can lead to that exception: [BadNothingToDo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnothingtodo), [BadTooManyOperations](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanyoperations), [BadTimestampsToReturnInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtimestampstoreturninvalid), [BadSubscriptionIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badsubscriptionidinvalid), [BadMonitoringModeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoringmodeinvalid), [BadNodeIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidinvalid), [BadNodeIdUnknown](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidunknown), [BadIndexRangeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangeinvalid), [BadIndexRangeNoData](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangenodata), [BadDataEncodingInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodinginvalid), [BadDataEncodingUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodingunsupported), [BadMonitoredItemFilterInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoreditemfilterinvalid), [BadMonitoredItemFilterUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoreditemfilterunsupported), [BadFilterNotAllowed](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badfilternotallowed), [BadTooManySubscriptions](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanysubscriptions) and [BadTooManyMonitoredItems](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanymonitoreditems). |

## SubscribeEvent(string, OpcEventFilter, OpcEventReceivedEventHandler)

Subscribes events on the node specified by `nodeId`.

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

```csharp
public OpcSubscription SubscribeEvent(
    string nodeId,
    OpcEventFilter filter,
    OpcEventReceivedEventHandler received)
```

</div>

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

```vbnet
Public Function SubscribeEvent(
    nodeId As String,
    filter As OpcEventFilter,
    received As OpcEventReceivedEventHandler) As OpcSubscription
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `nodeId` | [String](https://learn.microsoft.com/dotnet/api/system.string) | The textual node identifier of the node to subscribe. |
| `filter` | [OpcEventFilter](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opceventfilter/) | The [OpcEventFilter](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opceventfilter/) to be used by the server's subscription to - which the monitored item belongs - to filter the monitored data before it is reported to the client, which owns the monitored item. |
| `received` | [OpcEventReceivedEventHandler](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opceventreceivedeventhandler/) | The [OpcEventReceivedEventHandler](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opceventreceivedeventhandler/) method to assign as the event handler of the [EventReceived](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcmonitoreditem/members#eventreceived) event or a null reference (Nothing in Visual Basic) if there no event handler is to be assigned first. |

**Returns**

[OpcSubscription](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcsubscription/)

A new instance of the [OpcSubscription](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcsubscription/) class with a single [OpcMonitoredItem](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcmonitoreditem/) setup with the information specified. The kind of monitored item will when monitor events performed on the node identified by the values passed to this method.

**Exceptions**

| Exception | Condition |
|---|---|
| [OpcException](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcexception/) | The service execution failed upon different circumstances; for more details see exception details. The following issues can lead to that exception: [BadNothingToDo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnothingtodo), [BadTooManyOperations](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanyoperations), [BadTimestampsToReturnInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtimestampstoreturninvalid), [BadSubscriptionIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badsubscriptionidinvalid), [BadMonitoringModeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoringmodeinvalid), [BadNodeIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidinvalid), [BadNodeIdUnknown](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidunknown), [BadIndexRangeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangeinvalid), [BadIndexRangeNoData](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangenodata), [BadDataEncodingInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodinginvalid), [BadDataEncodingUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodingunsupported), [BadMonitoredItemFilterInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoreditemfilterinvalid), [BadMonitoredItemFilterUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoreditemfilterunsupported), [BadFilterNotAllowed](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badfilternotallowed), [BadTooManySubscriptions](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanysubscriptions) and [BadTooManyMonitoredItems](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanymonitoreditems). |

## SubscribeEvent(byte\[\], int, OpcEventFilter, OpcEventReceivedEventHandler)

Subscribes events on the node specified by `nodeId` and `namespaceIndex` specified.

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

```csharp
public OpcSubscription SubscribeEvent(
    byte[] nodeId,
    int namespaceIndex,
    OpcEventFilter filter,
    OpcEventReceivedEventHandler received)
```

</div>

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

```vbnet
Public Function SubscribeEvent(
    nodeId As Byte(),
    namespaceIndex As Integer,
    filter As OpcEventFilter,
    received As OpcEventReceivedEventHandler) As OpcSubscription
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `nodeId` | [Byte](https://learn.microsoft.com/dotnet/api/system.byte)[] | The opaque node identifier of the node to subscribe. |
| `namespaceIndex` | [Int32](https://learn.microsoft.com/dotnet/api/system.int32) | The index of the namespace within that the node with the `nodeId` specified can be located. |
| `filter` | [OpcEventFilter](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opceventfilter/) | The [OpcEventFilter](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opceventfilter/) to be used by the server's subscription to - which the monitored item belongs - to filter the monitored data before it is reported to the client, which owns the monitored item. |
| `received` | [OpcEventReceivedEventHandler](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opceventreceivedeventhandler/) | The [OpcEventReceivedEventHandler](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opceventreceivedeventhandler/) method to assign as the event handler of the [EventReceived](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcmonitoreditem/members#eventreceived) event or a null reference (Nothing in Visual Basic) if there no event handler is to be assigned first. |

**Returns**

[OpcSubscription](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcsubscription/)

A new instance of the [OpcSubscription](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcsubscription/) class with a single [OpcMonitoredItem](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcmonitoreditem/) setup with the information specified. The kind of monitored item will when monitor events performed on the node identified by the values passed to this method.

**Exceptions**

| Exception | Condition |
|---|---|
| [OpcException](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcexception/) | The service execution failed upon different circumstances; for more details see exception details. The following issues can lead to that exception: [BadNothingToDo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnothingtodo), [BadTooManyOperations](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanyoperations), [BadTimestampsToReturnInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtimestampstoreturninvalid), [BadSubscriptionIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badsubscriptionidinvalid), [BadMonitoringModeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoringmodeinvalid), [BadNodeIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidinvalid), [BadNodeIdUnknown](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidunknown), [BadIndexRangeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangeinvalid), [BadIndexRangeNoData](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangenodata), [BadDataEncodingInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodinginvalid), [BadDataEncodingUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodingunsupported), [BadMonitoredItemFilterInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoreditemfilterinvalid), [BadMonitoredItemFilterUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoreditemfilterunsupported), [BadFilterNotAllowed](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badfilternotallowed), [BadTooManySubscriptions](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanysubscriptions) and [BadTooManyMonitoredItems](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanymonitoreditems). |

## SubscribeEvent(Guid, int, OpcEventFilter, OpcEventReceivedEventHandler)

Subscribes events on the node specified by `nodeId` and `namespaceIndex` specified.

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

```csharp
public OpcSubscription SubscribeEvent(
    Guid nodeId,
    int namespaceIndex,
    OpcEventFilter filter,
    OpcEventReceivedEventHandler received)
```

</div>

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

```vbnet
Public Function SubscribeEvent(
    nodeId As Guid,
    namespaceIndex As Integer,
    filter As OpcEventFilter,
    received As OpcEventReceivedEventHandler) As OpcSubscription
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `nodeId` | [Guid](https://learn.microsoft.com/dotnet/api/system.guid) | The general unique identifier (= GUID) of the node to subscribe. |
| `namespaceIndex` | [Int32](https://learn.microsoft.com/dotnet/api/system.int32) | The index of the namespace within that the node with the `nodeId` specified can be located. |
| `filter` | [OpcEventFilter](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opceventfilter/) | The [OpcEventFilter](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opceventfilter/) to be used by the server's subscription to - which the monitored item belongs - to filter the monitored data before it is reported to the client, which owns the monitored item. |
| `received` | [OpcEventReceivedEventHandler](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opceventreceivedeventhandler/) | The [OpcEventReceivedEventHandler](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opceventreceivedeventhandler/) method to assign as the event handler of the [EventReceived](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcmonitoreditem/members#eventreceived) event or a null reference (Nothing in Visual Basic) if there no event handler is to be assigned first. |

**Returns**

[OpcSubscription](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcsubscription/)

A new instance of the [OpcSubscription](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcsubscription/) class with a single [OpcMonitoredItem](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcmonitoreditem/) setup with the information specified. The kind of monitored item will when monitor events performed on the node identified by the values passed to this method.

**Exceptions**

| Exception | Condition |
|---|---|
| [OpcException](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcexception/) | The service execution failed upon different circumstances; for more details see exception details. The following issues can lead to that exception: [BadNothingToDo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnothingtodo), [BadTooManyOperations](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanyoperations), [BadTimestampsToReturnInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtimestampstoreturninvalid), [BadSubscriptionIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badsubscriptionidinvalid), [BadMonitoringModeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoringmodeinvalid), [BadNodeIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidinvalid), [BadNodeIdUnknown](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidunknown), [BadIndexRangeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangeinvalid), [BadIndexRangeNoData](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangenodata), [BadDataEncodingInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodinginvalid), [BadDataEncodingUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodingunsupported), [BadMonitoredItemFilterInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoreditemfilterinvalid), [BadMonitoredItemFilterUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoreditemfilterunsupported), [BadFilterNotAllowed](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badfilternotallowed), [BadTooManySubscriptions](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanysubscriptions) and [BadTooManyMonitoredItems](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanymonitoreditems). |

## SubscribeEvent(int, int, OpcEventFilter, OpcEventReceivedEventHandler)

Subscribes events on the node specified by `nodeId` and `namespaceIndex` specified.

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

```csharp
public OpcSubscription SubscribeEvent(
    int nodeId,
    int namespaceIndex,
    OpcEventFilter filter,
    OpcEventReceivedEventHandler received)
```

</div>

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

```vbnet
Public Function SubscribeEvent(
    nodeId As Integer,
    namespaceIndex As Integer,
    filter As OpcEventFilter,
    received As OpcEventReceivedEventHandler) As OpcSubscription
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `nodeId` | [Int32](https://learn.microsoft.com/dotnet/api/system.int32) | The numeric node identifier of the node to subscribe. |
| `namespaceIndex` | [Int32](https://learn.microsoft.com/dotnet/api/system.int32) | The index of the namespace within that the node with the `nodeId` specified can be located. |
| `filter` | [OpcEventFilter](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opceventfilter/) | The [OpcEventFilter](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opceventfilter/) to be used by the server's subscription to - which the monitored item belongs - to filter the monitored data before it is reported to the client, which owns the monitored item. |
| `received` | [OpcEventReceivedEventHandler](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opceventreceivedeventhandler/) | The [OpcEventReceivedEventHandler](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opceventreceivedeventhandler/) method to assign as the event handler of the [EventReceived](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcmonitoreditem/members#eventreceived) event or a null reference (Nothing in Visual Basic) if there no event handler is to be assigned first. |

**Returns**

[OpcSubscription](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcsubscription/)

A new instance of the [OpcSubscription](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcsubscription/) class with a single [OpcMonitoredItem](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcmonitoreditem/) setup with the information specified. The kind of monitored item will when monitor events performed on the node identified by the values passed to this method.

**Exceptions**

| Exception | Condition |
|---|---|
| [OpcException](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcexception/) | The service execution failed upon different circumstances; for more details see exception details. The following issues can lead to that exception: [BadNothingToDo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnothingtodo), [BadTooManyOperations](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanyoperations), [BadTimestampsToReturnInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtimestampstoreturninvalid), [BadSubscriptionIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badsubscriptionidinvalid), [BadMonitoringModeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoringmodeinvalid), [BadNodeIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidinvalid), [BadNodeIdUnknown](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidunknown), [BadIndexRangeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangeinvalid), [BadIndexRangeNoData](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangenodata), [BadDataEncodingInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodinginvalid), [BadDataEncodingUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodingunsupported), [BadMonitoredItemFilterInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoreditemfilterinvalid), [BadMonitoredItemFilterUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoreditemfilterunsupported), [BadFilterNotAllowed](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badfilternotallowed), [BadTooManySubscriptions](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanysubscriptions) and [BadTooManyMonitoredItems](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanymonitoreditems). |

## SubscribeEvent(uint, int, OpcEventFilter, OpcEventReceivedEventHandler)

Subscribes events on the node specified by `nodeId` and `namespaceIndex` specified.

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

```csharp
public OpcSubscription SubscribeEvent(
    uint nodeId,
    int namespaceIndex,
    OpcEventFilter filter,
    OpcEventReceivedEventHandler received)
```

</div>

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

```vbnet
Public Function SubscribeEvent(
    nodeId As UInteger,
    namespaceIndex As Integer,
    filter As OpcEventFilter,
    received As OpcEventReceivedEventHandler) As OpcSubscription
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `nodeId` | [UInt32](https://learn.microsoft.com/dotnet/api/system.uint32) | The numeric node identifier of the node to subscribe. |
| `namespaceIndex` | [Int32](https://learn.microsoft.com/dotnet/api/system.int32) | The index of the namespace within that the node with the `nodeId` specified can be located. |
| `filter` | [OpcEventFilter](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opceventfilter/) | The [OpcEventFilter](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opceventfilter/) to be used by the server's subscription to - which the monitored item belongs - to filter the monitored data before it is reported to the client, which owns the monitored item. |
| `received` | [OpcEventReceivedEventHandler](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opceventreceivedeventhandler/) | The [OpcEventReceivedEventHandler](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opceventreceivedeventhandler/) method to assign as the event handler of the [EventReceived](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcmonitoreditem/members#eventreceived) event or a null reference (Nothing in Visual Basic) if there no event handler is to be assigned first. |

**Returns**

[OpcSubscription](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcsubscription/)

A new instance of the [OpcSubscription](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcsubscription/) class with a single [OpcMonitoredItem](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcmonitoreditem/) setup with the information specified. The kind of monitored item will when monitor events performed on the node identified by the values passed to this method.

**Exceptions**

| Exception | Condition |
|---|---|
| [OpcException](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcexception/) | The service execution failed upon different circumstances; for more details see exception details. The following issues can lead to that exception: [BadNothingToDo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnothingtodo), [BadTooManyOperations](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanyoperations), [BadTimestampsToReturnInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtimestampstoreturninvalid), [BadSubscriptionIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badsubscriptionidinvalid), [BadMonitoringModeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoringmodeinvalid), [BadNodeIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidinvalid), [BadNodeIdUnknown](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidunknown), [BadIndexRangeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangeinvalid), [BadIndexRangeNoData](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangenodata), [BadDataEncodingInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodinginvalid), [BadDataEncodingUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodingunsupported), [BadMonitoredItemFilterInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoreditemfilterinvalid), [BadMonitoredItemFilterUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoreditemfilterunsupported), [BadFilterNotAllowed](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badfilternotallowed), [BadTooManySubscriptions](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanysubscriptions) and [BadTooManyMonitoredItems](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanymonitoreditems). |

## SubscribeEvent(string, int, OpcEventFilter, OpcEventReceivedEventHandler)

Subscribes events on the node specified by `nodeId` and `namespaceIndex` specified.

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

```csharp
public OpcSubscription SubscribeEvent(
    string nodeId,
    int namespaceIndex,
    OpcEventFilter filter,
    OpcEventReceivedEventHandler received)
```

</div>

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

```vbnet
Public Function SubscribeEvent(
    nodeId As String,
    namespaceIndex As Integer,
    filter As OpcEventFilter,
    received As OpcEventReceivedEventHandler) As OpcSubscription
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `nodeId` | [String](https://learn.microsoft.com/dotnet/api/system.string) | The textual node identifier of the node to subscribe. |
| `namespaceIndex` | [Int32](https://learn.microsoft.com/dotnet/api/system.int32) | The index of the namespace within that the node with the `nodeId` specified can be located. |
| `filter` | [OpcEventFilter](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opceventfilter/) | The [OpcEventFilter](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opceventfilter/) to be used by the server's subscription to - which the monitored item belongs - to filter the monitored data before it is reported to the client, which owns the monitored item. |
| `received` | [OpcEventReceivedEventHandler](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opceventreceivedeventhandler/) | The [OpcEventReceivedEventHandler](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opceventreceivedeventhandler/) method to assign as the event handler of the [EventReceived](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcmonitoreditem/members#eventreceived) event or a null reference (Nothing in Visual Basic) if there no event handler is to be assigned first. |

**Returns**

[OpcSubscription](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcsubscription/)

A new instance of the [OpcSubscription](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcsubscription/) class with a single [OpcMonitoredItem](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcmonitoreditem/) setup with the information specified. The kind of monitored item will when monitor events performed on the node identified by the values passed to this method.

**Exceptions**

| Exception | Condition |
|---|---|
| [OpcException](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcexception/) | The service execution failed upon different circumstances; for more details see exception details. The following issues can lead to that exception: [BadNothingToDo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnothingtodo), [BadTooManyOperations](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanyoperations), [BadTimestampsToReturnInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtimestampstoreturninvalid), [BadSubscriptionIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badsubscriptionidinvalid), [BadMonitoringModeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoringmodeinvalid), [BadNodeIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidinvalid), [BadNodeIdUnknown](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidunknown), [BadIndexRangeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangeinvalid), [BadIndexRangeNoData](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangenodata), [BadDataEncodingInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodinginvalid), [BadDataEncodingUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodingunsupported), [BadMonitoredItemFilterInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoreditemfilterinvalid), [BadMonitoredItemFilterUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoreditemfilterunsupported), [BadFilterNotAllowed](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badfilternotallowed), [BadTooManySubscriptions](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanysubscriptions) and [BadTooManyMonitoredItems](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanymonitoreditems). |

## SubscribeEvent(byte\[\], OpcAttribute, OpcEventFilter, OpcEventReceivedEventHandler)

Subscribes events on the `attribute` of the node specified by `nodeId`.

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

```csharp
public OpcSubscription SubscribeEvent(
    byte[] nodeId,
    OpcAttribute attribute,
    OpcEventFilter filter,
    OpcEventReceivedEventHandler received)
```

</div>

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

```vbnet
Public Function SubscribeEvent(
    nodeId As Byte(),
    attribute As OpcAttribute,
    filter As OpcEventFilter,
    received As OpcEventReceivedEventHandler) As OpcSubscription
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `nodeId` | [Byte](https://learn.microsoft.com/dotnet/api/system.byte)[] | The opaque node identifier of the node to subscribe. |
| `attribute` | [OpcAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/) | One of the members defined by the [OpcAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/) enumeration that defines which node attribute is to be used by the subscription. |
| `filter` | [OpcEventFilter](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opceventfilter/) | The [OpcEventFilter](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opceventfilter/) to be used by the server's subscription to - which the monitored item belongs - to filter the monitored data before it is reported to the client, which owns the monitored item. |
| `received` | [OpcEventReceivedEventHandler](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opceventreceivedeventhandler/) | The [OpcEventReceivedEventHandler](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opceventreceivedeventhandler/) method to assign as the event handler of the [EventReceived](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcmonitoreditem/members#eventreceived) event or a null reference (Nothing in Visual Basic) if there no event handler is to be assigned first. |

**Returns**

[OpcSubscription](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcsubscription/)

A new instance of the [OpcSubscription](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcsubscription/) class with a single [OpcMonitoredItem](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcmonitoreditem/) setup with the information specified. The kind of monitored item will when monitor events performed on the node identified by the values passed to this method.

**Exceptions**

| Exception | Condition |
|---|---|
| [OpcException](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcexception/) | The service execution failed upon different circumstances; for more details see exception details. The following issues can lead to that exception: [BadNothingToDo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnothingtodo), [BadTooManyOperations](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanyoperations), [BadTimestampsToReturnInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtimestampstoreturninvalid), [BadSubscriptionIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badsubscriptionidinvalid), [BadMonitoringModeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoringmodeinvalid), [BadNodeIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidinvalid), [BadNodeIdUnknown](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidunknown), [BadAttributeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badattributeinvalid), [BadIndexRangeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangeinvalid), [BadIndexRangeNoData](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangenodata), [BadDataEncodingInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodinginvalid), [BadDataEncodingUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodingunsupported), [BadMonitoredItemFilterInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoreditemfilterinvalid), [BadMonitoredItemFilterUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoreditemfilterunsupported), [BadFilterNotAllowed](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badfilternotallowed), [BadTooManySubscriptions](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanysubscriptions) and [BadTooManyMonitoredItems](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanymonitoreditems). |

## SubscribeEvent(Guid, OpcAttribute, OpcEventFilter, OpcEventReceivedEventHandler)

Subscribes events on the `attribute` of the node specified by `nodeId`.

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

```csharp
public OpcSubscription SubscribeEvent(
    Guid nodeId,
    OpcAttribute attribute,
    OpcEventFilter filter,
    OpcEventReceivedEventHandler received)
```

</div>

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

```vbnet
Public Function SubscribeEvent(
    nodeId As Guid,
    attribute As OpcAttribute,
    filter As OpcEventFilter,
    received As OpcEventReceivedEventHandler) As OpcSubscription
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `nodeId` | [Guid](https://learn.microsoft.com/dotnet/api/system.guid) | The general unique identifier (= GUID) of the node to subscribe. |
| `attribute` | [OpcAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/) | One of the members defined by the [OpcAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/) enumeration that defines which node attribute is to be used by the subscription. |
| `filter` | [OpcEventFilter](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opceventfilter/) | The [OpcEventFilter](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opceventfilter/) to be used by the server's subscription to - which the monitored item belongs - to filter the monitored data before it is reported to the client, which owns the monitored item. |
| `received` | [OpcEventReceivedEventHandler](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opceventreceivedeventhandler/) | The [OpcEventReceivedEventHandler](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opceventreceivedeventhandler/) method to assign as the event handler of the [EventReceived](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcmonitoreditem/members#eventreceived) event or a null reference (Nothing in Visual Basic) if there no event handler is to be assigned first. |

**Returns**

[OpcSubscription](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcsubscription/)

A new instance of the [OpcSubscription](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcsubscription/) class with a single [OpcMonitoredItem](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcmonitoreditem/) setup with the information specified. The kind of monitored item will when monitor events performed on the node identified by the values passed to this method.

**Exceptions**

| Exception | Condition |
|---|---|
| [OpcException](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcexception/) | The service execution failed upon different circumstances; for more details see exception details. The following issues can lead to that exception: [BadNothingToDo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnothingtodo), [BadTooManyOperations](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanyoperations), [BadTimestampsToReturnInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtimestampstoreturninvalid), [BadSubscriptionIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badsubscriptionidinvalid), [BadMonitoringModeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoringmodeinvalid), [BadNodeIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidinvalid), [BadNodeIdUnknown](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidunknown), [BadAttributeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badattributeinvalid), [BadIndexRangeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangeinvalid), [BadIndexRangeNoData](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangenodata), [BadDataEncodingInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodinginvalid), [BadDataEncodingUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodingunsupported), [BadMonitoredItemFilterInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoreditemfilterinvalid), [BadMonitoredItemFilterUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoreditemfilterunsupported), [BadFilterNotAllowed](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badfilternotallowed), [BadTooManySubscriptions](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanysubscriptions) and [BadTooManyMonitoredItems](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanymonitoreditems). |

## SubscribeEvent(int, OpcAttribute, OpcEventFilter, OpcEventReceivedEventHandler)

Subscribes events on the `attribute` of the node specified by `nodeId`.

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

```csharp
public OpcSubscription SubscribeEvent(
    int nodeId,
    OpcAttribute attribute,
    OpcEventFilter filter,
    OpcEventReceivedEventHandler received)
```

</div>

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

```vbnet
Public Function SubscribeEvent(
    nodeId As Integer,
    attribute As OpcAttribute,
    filter As OpcEventFilter,
    received As OpcEventReceivedEventHandler) As OpcSubscription
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `nodeId` | [Int32](https://learn.microsoft.com/dotnet/api/system.int32) | The numeric node identifier of the node to subscribe. |
| `attribute` | [OpcAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/) | One of the members defined by the [OpcAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/) enumeration that defines which node attribute is to be used by the subscription. |
| `filter` | [OpcEventFilter](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opceventfilter/) | The [OpcEventFilter](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opceventfilter/) to be used by the server's subscription to - which the monitored item belongs - to filter the monitored data before it is reported to the client, which owns the monitored item. |
| `received` | [OpcEventReceivedEventHandler](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opceventreceivedeventhandler/) | The [OpcEventReceivedEventHandler](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opceventreceivedeventhandler/) method to assign as the event handler of the [EventReceived](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcmonitoreditem/members#eventreceived) event or a null reference (Nothing in Visual Basic) if there no event handler is to be assigned first. |

**Returns**

[OpcSubscription](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcsubscription/)

A new instance of the [OpcSubscription](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcsubscription/) class with a single [OpcMonitoredItem](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcmonitoreditem/) setup with the information specified. The kind of monitored item will when monitor events performed on the node identified by the values passed to this method.

**Exceptions**

| Exception | Condition |
|---|---|
| [OpcException](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcexception/) | The service execution failed upon different circumstances; for more details see exception details. The following issues can lead to that exception: [BadNothingToDo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnothingtodo), [BadTooManyOperations](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanyoperations), [BadTimestampsToReturnInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtimestampstoreturninvalid), [BadSubscriptionIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badsubscriptionidinvalid), [BadMonitoringModeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoringmodeinvalid), [BadNodeIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidinvalid), [BadNodeIdUnknown](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidunknown), [BadAttributeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badattributeinvalid), [BadIndexRangeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangeinvalid), [BadIndexRangeNoData](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangenodata), [BadDataEncodingInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodinginvalid), [BadDataEncodingUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodingunsupported), [BadMonitoredItemFilterInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoreditemfilterinvalid), [BadMonitoredItemFilterUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoreditemfilterunsupported), [BadFilterNotAllowed](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badfilternotallowed), [BadTooManySubscriptions](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanysubscriptions) and [BadTooManyMonitoredItems](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanymonitoreditems). |

## SubscribeEvent(uint, OpcAttribute, OpcEventFilter, OpcEventReceivedEventHandler)

Subscribes events on the `attribute` of the node specified by `nodeId`.

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

```csharp
public OpcSubscription SubscribeEvent(
    uint nodeId,
    OpcAttribute attribute,
    OpcEventFilter filter,
    OpcEventReceivedEventHandler received)
```

</div>

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

```vbnet
Public Function SubscribeEvent(
    nodeId As UInteger,
    attribute As OpcAttribute,
    filter As OpcEventFilter,
    received As OpcEventReceivedEventHandler) As OpcSubscription
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `nodeId` | [UInt32](https://learn.microsoft.com/dotnet/api/system.uint32) | The numeric node identifier of the node to subscribe. |
| `attribute` | [OpcAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/) | One of the members defined by the [OpcAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/) enumeration that defines which node attribute is to be used by the subscription. |
| `filter` | [OpcEventFilter](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opceventfilter/) | The [OpcEventFilter](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opceventfilter/) to be used by the server's subscription to - which the monitored item belongs - to filter the monitored data before it is reported to the client, which owns the monitored item. |
| `received` | [OpcEventReceivedEventHandler](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opceventreceivedeventhandler/) | The [OpcEventReceivedEventHandler](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opceventreceivedeventhandler/) method to assign as the event handler of the [EventReceived](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcmonitoreditem/members#eventreceived) event or a null reference (Nothing in Visual Basic) if there no event handler is to be assigned first. |

**Returns**

[OpcSubscription](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcsubscription/)

A new instance of the [OpcSubscription](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcsubscription/) class with a single [OpcMonitoredItem](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcmonitoreditem/) setup with the information specified. The kind of monitored item will when monitor events performed on the node identified by the values passed to this method.

**Exceptions**

| Exception | Condition |
|---|---|
| [OpcException](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcexception/) | The service execution failed upon different circumstances; for more details see exception details. The following issues can lead to that exception: [BadNothingToDo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnothingtodo), [BadTooManyOperations](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanyoperations), [BadTimestampsToReturnInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtimestampstoreturninvalid), [BadSubscriptionIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badsubscriptionidinvalid), [BadMonitoringModeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoringmodeinvalid), [BadNodeIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidinvalid), [BadNodeIdUnknown](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidunknown), [BadAttributeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badattributeinvalid), [BadIndexRangeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangeinvalid), [BadIndexRangeNoData](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangenodata), [BadDataEncodingInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodinginvalid), [BadDataEncodingUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodingunsupported), [BadMonitoredItemFilterInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoreditemfilterinvalid), [BadMonitoredItemFilterUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoreditemfilterunsupported), [BadFilterNotAllowed](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badfilternotallowed), [BadTooManySubscriptions](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanysubscriptions) and [BadTooManyMonitoredItems](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanymonitoreditems). |

## SubscribeEvent(string, OpcAttribute, OpcEventFilter, OpcEventReceivedEventHandler)

Subscribes events on the `attribute` of the node specified by `nodeId`.

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

```csharp
public OpcSubscription SubscribeEvent(
    string nodeId,
    OpcAttribute attribute,
    OpcEventFilter filter,
    OpcEventReceivedEventHandler received)
```

</div>

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

```vbnet
Public Function SubscribeEvent(
    nodeId As String,
    attribute As OpcAttribute,
    filter As OpcEventFilter,
    received As OpcEventReceivedEventHandler) As OpcSubscription
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `nodeId` | [String](https://learn.microsoft.com/dotnet/api/system.string) | The textual node identifier of the node to subscribe. |
| `attribute` | [OpcAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/) | One of the members defined by the [OpcAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/) enumeration that defines which node attribute is to be used by the subscription. |
| `filter` | [OpcEventFilter](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opceventfilter/) | The [OpcEventFilter](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opceventfilter/) to be used by the server's subscription to - which the monitored item belongs - to filter the monitored data before it is reported to the client, which owns the monitored item. |
| `received` | [OpcEventReceivedEventHandler](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opceventreceivedeventhandler/) | The [OpcEventReceivedEventHandler](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opceventreceivedeventhandler/) method to assign as the event handler of the [EventReceived](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcmonitoreditem/members#eventreceived) event or a null reference (Nothing in Visual Basic) if there no event handler is to be assigned first. |

**Returns**

[OpcSubscription](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcsubscription/)

A new instance of the [OpcSubscription](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcsubscription/) class with a single [OpcMonitoredItem](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcmonitoreditem/) setup with the information specified. The kind of monitored item will when monitor events performed on the node identified by the values passed to this method.

**Exceptions**

| Exception | Condition |
|---|---|
| [OpcException](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcexception/) | The service execution failed upon different circumstances; for more details see exception details. The following issues can lead to that exception: [BadNothingToDo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnothingtodo), [BadTooManyOperations](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanyoperations), [BadTimestampsToReturnInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtimestampstoreturninvalid), [BadSubscriptionIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badsubscriptionidinvalid), [BadMonitoringModeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoringmodeinvalid), [BadNodeIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidinvalid), [BadNodeIdUnknown](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidunknown), [BadAttributeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badattributeinvalid), [BadIndexRangeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangeinvalid), [BadIndexRangeNoData](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangenodata), [BadDataEncodingInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodinginvalid), [BadDataEncodingUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodingunsupported), [BadMonitoredItemFilterInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoreditemfilterinvalid), [BadMonitoredItemFilterUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoreditemfilterunsupported), [BadFilterNotAllowed](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badfilternotallowed), [BadTooManySubscriptions](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanysubscriptions) and [BadTooManyMonitoredItems](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanymonitoreditems). |

## SubscribeEvent(byte\[\], int, OpcAttribute, OpcEventFilter, OpcEventReceivedEventHandler)

Subscribes events on the `attribute` of the node specified by `nodeId` and `namespaceIndex` specified.

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

```csharp
public OpcSubscription SubscribeEvent(
    byte[] nodeId,
    int namespaceIndex,
    OpcAttribute attribute,
    OpcEventFilter filter,
    OpcEventReceivedEventHandler received)
```

</div>

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

```vbnet
Public Function SubscribeEvent(
    nodeId As Byte(),
    namespaceIndex As Integer,
    attribute As OpcAttribute,
    filter As OpcEventFilter,
    received As OpcEventReceivedEventHandler) As OpcSubscription
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `nodeId` | [Byte](https://learn.microsoft.com/dotnet/api/system.byte)[] | The opaque node identifier of the node to subscribe. |
| `namespaceIndex` | [Int32](https://learn.microsoft.com/dotnet/api/system.int32) | The index of the namespace within that the node with the `nodeId` specified can be located. |
| `attribute` | [OpcAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/) | One of the members defined by the [OpcAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/) enumeration that defines which node attribute is to be used by the subscription. |
| `filter` | [OpcEventFilter](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opceventfilter/) | The [OpcEventFilter](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opceventfilter/) to be used by the server's subscription to - which the monitored item belongs - to filter the monitored data before it is reported to the client, which owns the monitored item. |
| `received` | [OpcEventReceivedEventHandler](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opceventreceivedeventhandler/) | The [OpcEventReceivedEventHandler](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opceventreceivedeventhandler/) method to assign as the event handler of the [EventReceived](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcmonitoreditem/members#eventreceived) event or a null reference (Nothing in Visual Basic) if there no event handler is to be assigned first. |

**Returns**

[OpcSubscription](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcsubscription/)

A new instance of the [OpcSubscription](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcsubscription/) class with a single [OpcMonitoredItem](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcmonitoreditem/) setup with the information specified. The kind of monitored item will when monitor events performed on the node identified by the values passed to this method.

**Exceptions**

| Exception | Condition |
|---|---|
| [OpcException](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcexception/) | The service execution failed upon different circumstances; for more details see exception details. The following issues can lead to that exception: [BadNothingToDo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnothingtodo), [BadTooManyOperations](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanyoperations), [BadTimestampsToReturnInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtimestampstoreturninvalid), [BadSubscriptionIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badsubscriptionidinvalid), [BadMonitoringModeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoringmodeinvalid), [BadNodeIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidinvalid), [BadNodeIdUnknown](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidunknown), [BadAttributeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badattributeinvalid), [BadIndexRangeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangeinvalid), [BadIndexRangeNoData](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangenodata), [BadDataEncodingInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodinginvalid), [BadDataEncodingUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodingunsupported), [BadMonitoredItemFilterInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoreditemfilterinvalid), [BadMonitoredItemFilterUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoreditemfilterunsupported), [BadFilterNotAllowed](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badfilternotallowed), [BadTooManySubscriptions](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanysubscriptions) and [BadTooManyMonitoredItems](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanymonitoreditems). |

## SubscribeEvent(Guid, int, OpcAttribute, OpcEventFilter, OpcEventReceivedEventHandler)

Subscribes events on the `attribute` of the node specified by `nodeId` and `namespaceIndex` specified.

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

```csharp
public OpcSubscription SubscribeEvent(
    Guid nodeId,
    int namespaceIndex,
    OpcAttribute attribute,
    OpcEventFilter filter,
    OpcEventReceivedEventHandler received)
```

</div>

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

```vbnet
Public Function SubscribeEvent(
    nodeId As Guid,
    namespaceIndex As Integer,
    attribute As OpcAttribute,
    filter As OpcEventFilter,
    received As OpcEventReceivedEventHandler) As OpcSubscription
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `nodeId` | [Guid](https://learn.microsoft.com/dotnet/api/system.guid) | The general unique identifier (= GUID) of the node to subscribe. |
| `namespaceIndex` | [Int32](https://learn.microsoft.com/dotnet/api/system.int32) | The index of the namespace within that the node with the `nodeId` specified can be located. |
| `attribute` | [OpcAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/) | One of the members defined by the [OpcAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/) enumeration that defines which node attribute is to be used by the subscription. |
| `filter` | [OpcEventFilter](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opceventfilter/) | The [OpcEventFilter](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opceventfilter/) to be used by the server's subscription to - which the monitored item belongs - to filter the monitored data before it is reported to the client, which owns the monitored item. |
| `received` | [OpcEventReceivedEventHandler](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opceventreceivedeventhandler/) | The [OpcEventReceivedEventHandler](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opceventreceivedeventhandler/) method to assign as the event handler of the [EventReceived](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcmonitoreditem/members#eventreceived) event or a null reference (Nothing in Visual Basic) if there no event handler is to be assigned first. |

**Returns**

[OpcSubscription](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcsubscription/)

A new instance of the [OpcSubscription](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcsubscription/) class with a single [OpcMonitoredItem](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcmonitoreditem/) setup with the information specified. The kind of monitored item will when monitor events performed on the node identified by the values passed to this method.

**Exceptions**

| Exception | Condition |
|---|---|
| [OpcException](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcexception/) | The service execution failed upon different circumstances; for more details see exception details. The following issues can lead to that exception: [BadNothingToDo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnothingtodo), [BadTooManyOperations](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanyoperations), [BadTimestampsToReturnInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtimestampstoreturninvalid), [BadSubscriptionIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badsubscriptionidinvalid), [BadMonitoringModeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoringmodeinvalid), [BadNodeIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidinvalid), [BadNodeIdUnknown](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidunknown), [BadAttributeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badattributeinvalid), [BadIndexRangeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangeinvalid), [BadIndexRangeNoData](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangenodata), [BadDataEncodingInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodinginvalid), [BadDataEncodingUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodingunsupported), [BadMonitoredItemFilterInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoreditemfilterinvalid), [BadMonitoredItemFilterUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoreditemfilterunsupported), [BadFilterNotAllowed](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badfilternotallowed), [BadTooManySubscriptions](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanysubscriptions) and [BadTooManyMonitoredItems](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanymonitoreditems). |

## SubscribeEvent(int, int, OpcAttribute, OpcEventFilter, OpcEventReceivedEventHandler)

Subscribes events on the `attribute` of the node specified by `nodeId` and `namespaceIndex` specified.

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

```csharp
public OpcSubscription SubscribeEvent(
    int nodeId,
    int namespaceIndex,
    OpcAttribute attribute,
    OpcEventFilter filter,
    OpcEventReceivedEventHandler received)
```

</div>

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

```vbnet
Public Function SubscribeEvent(
    nodeId As Integer,
    namespaceIndex As Integer,
    attribute As OpcAttribute,
    filter As OpcEventFilter,
    received As OpcEventReceivedEventHandler) As OpcSubscription
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `nodeId` | [Int32](https://learn.microsoft.com/dotnet/api/system.int32) | The numeric node identifier of the node to subscribe. |
| `namespaceIndex` | [Int32](https://learn.microsoft.com/dotnet/api/system.int32) | The index of the namespace within that the node with the `nodeId` specified can be located. |
| `attribute` | [OpcAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/) | One of the members defined by the [OpcAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/) enumeration that defines which node attribute is to be used by the subscription. |
| `filter` | [OpcEventFilter](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opceventfilter/) | The [OpcEventFilter](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opceventfilter/) to be used by the server's subscription to - which the monitored item belongs - to filter the monitored data before it is reported to the client, which owns the monitored item. |
| `received` | [OpcEventReceivedEventHandler](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opceventreceivedeventhandler/) | The [OpcEventReceivedEventHandler](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opceventreceivedeventhandler/) method to assign as the event handler of the [EventReceived](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcmonitoreditem/members#eventreceived) event or a null reference (Nothing in Visual Basic) if there no event handler is to be assigned first. |

**Returns**

[OpcSubscription](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcsubscription/)

A new instance of the [OpcSubscription](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcsubscription/) class with a single [OpcMonitoredItem](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcmonitoreditem/) setup with the information specified. The kind of monitored item will when monitor events performed on the node identified by the values passed to this method.

**Exceptions**

| Exception | Condition |
|---|---|
| [OpcException](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcexception/) | The service execution failed upon different circumstances; for more details see exception details. The following issues can lead to that exception: [BadNothingToDo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnothingtodo), [BadTooManyOperations](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanyoperations), [BadTimestampsToReturnInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtimestampstoreturninvalid), [BadSubscriptionIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badsubscriptionidinvalid), [BadMonitoringModeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoringmodeinvalid), [BadNodeIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidinvalid), [BadNodeIdUnknown](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidunknown), [BadAttributeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badattributeinvalid), [BadIndexRangeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangeinvalid), [BadIndexRangeNoData](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangenodata), [BadDataEncodingInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodinginvalid), [BadDataEncodingUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodingunsupported), [BadMonitoredItemFilterInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoreditemfilterinvalid), [BadMonitoredItemFilterUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoreditemfilterunsupported), [BadFilterNotAllowed](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badfilternotallowed), [BadTooManySubscriptions](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanysubscriptions) and [BadTooManyMonitoredItems](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanymonitoreditems). |

## SubscribeEvent(uint, int, OpcAttribute, OpcEventFilter, OpcEventReceivedEventHandler)

Subscribes events on the `attribute` of the node specified by `nodeId` and `namespaceIndex` specified.

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

```csharp
public OpcSubscription SubscribeEvent(
    uint nodeId,
    int namespaceIndex,
    OpcAttribute attribute,
    OpcEventFilter filter,
    OpcEventReceivedEventHandler received)
```

</div>

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

```vbnet
Public Function SubscribeEvent(
    nodeId As UInteger,
    namespaceIndex As Integer,
    attribute As OpcAttribute,
    filter As OpcEventFilter,
    received As OpcEventReceivedEventHandler) As OpcSubscription
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `nodeId` | [UInt32](https://learn.microsoft.com/dotnet/api/system.uint32) | The numeric node identifier of the node to subscribe. |
| `namespaceIndex` | [Int32](https://learn.microsoft.com/dotnet/api/system.int32) | The index of the namespace within that the node with the `nodeId` specified can be located. |
| `attribute` | [OpcAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/) | One of the members defined by the [OpcAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/) enumeration that defines which node attribute is to be used by the subscription. |
| `filter` | [OpcEventFilter](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opceventfilter/) | The [OpcEventFilter](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opceventfilter/) to be used by the server's subscription to - which the monitored item belongs - to filter the monitored data before it is reported to the client, which owns the monitored item. |
| `received` | [OpcEventReceivedEventHandler](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opceventreceivedeventhandler/) | The [OpcEventReceivedEventHandler](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opceventreceivedeventhandler/) method to assign as the event handler of the [EventReceived](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcmonitoreditem/members#eventreceived) event or a null reference (Nothing in Visual Basic) if there no event handler is to be assigned first. |

**Returns**

[OpcSubscription](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcsubscription/)

A new instance of the [OpcSubscription](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcsubscription/) class with a single [OpcMonitoredItem](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcmonitoreditem/) setup with the information specified. The kind of monitored item will when monitor events performed on the node identified by the values passed to this method.

**Exceptions**

| Exception | Condition |
|---|---|
| [OpcException](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcexception/) | The service execution failed upon different circumstances; for more details see exception details. The following issues can lead to that exception: [BadNothingToDo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnothingtodo), [BadTooManyOperations](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanyoperations), [BadTimestampsToReturnInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtimestampstoreturninvalid), [BadSubscriptionIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badsubscriptionidinvalid), [BadMonitoringModeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoringmodeinvalid), [BadNodeIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidinvalid), [BadNodeIdUnknown](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidunknown), [BadAttributeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badattributeinvalid), [BadIndexRangeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangeinvalid), [BadIndexRangeNoData](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangenodata), [BadDataEncodingInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodinginvalid), [BadDataEncodingUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodingunsupported), [BadMonitoredItemFilterInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoreditemfilterinvalid), [BadMonitoredItemFilterUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoreditemfilterunsupported), [BadFilterNotAllowed](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badfilternotallowed), [BadTooManySubscriptions](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanysubscriptions) and [BadTooManyMonitoredItems](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanymonitoreditems). |

## SubscribeEvent(string, int, OpcAttribute, OpcEventFilter, OpcEventReceivedEventHandler)

Subscribes events on the `attribute` of the node specified by `nodeId` and `namespaceIndex` specified.

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

```csharp
public OpcSubscription SubscribeEvent(
    string nodeId,
    int namespaceIndex,
    OpcAttribute attribute,
    OpcEventFilter filter,
    OpcEventReceivedEventHandler received)
```

</div>

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

```vbnet
Public Function SubscribeEvent(
    nodeId As String,
    namespaceIndex As Integer,
    attribute As OpcAttribute,
    filter As OpcEventFilter,
    received As OpcEventReceivedEventHandler) As OpcSubscription
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `nodeId` | [String](https://learn.microsoft.com/dotnet/api/system.string) | The textual node identifier of the node to subscribe. |
| `namespaceIndex` | [Int32](https://learn.microsoft.com/dotnet/api/system.int32) | The index of the namespace within that the node with the `nodeId` specified can be located. |
| `attribute` | [OpcAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/) | One of the members defined by the [OpcAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/) enumeration that defines which node attribute is to be used by the subscription. |
| `filter` | [OpcEventFilter](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opceventfilter/) | The [OpcEventFilter](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opceventfilter/) to be used by the server's subscription to - which the monitored item belongs - to filter the monitored data before it is reported to the client, which owns the monitored item. |
| `received` | [OpcEventReceivedEventHandler](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opceventreceivedeventhandler/) | The [OpcEventReceivedEventHandler](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opceventreceivedeventhandler/) method to assign as the event handler of the [EventReceived](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcmonitoreditem/members#eventreceived) event or a null reference (Nothing in Visual Basic) if there no event handler is to be assigned first. |

**Returns**

[OpcSubscription](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcsubscription/)

A new instance of the [OpcSubscription](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcsubscription/) class with a single [OpcMonitoredItem](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcmonitoreditem/) setup with the information specified. The kind of monitored item will when monitor events performed on the node identified by the values passed to this method.

**Exceptions**

| Exception | Condition |
|---|---|
| [OpcException](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcexception/) | The service execution failed upon different circumstances; for more details see exception details. The following issues can lead to that exception: [BadNothingToDo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnothingtodo), [BadTooManyOperations](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanyoperations), [BadTimestampsToReturnInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtimestampstoreturninvalid), [BadSubscriptionIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badsubscriptionidinvalid), [BadMonitoringModeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoringmodeinvalid), [BadNodeIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidinvalid), [BadNodeIdUnknown](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidunknown), [BadAttributeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badattributeinvalid), [BadIndexRangeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangeinvalid), [BadIndexRangeNoData](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangenodata), [BadDataEncodingInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodinginvalid), [BadDataEncodingUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodingunsupported), [BadMonitoredItemFilterInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoreditemfilterinvalid), [BadMonitoredItemFilterUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoreditemfilterunsupported), [BadFilterNotAllowed](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badfilternotallowed), [BadTooManySubscriptions](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanysubscriptions) and [BadTooManyMonitoredItems](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanymonitoreditems). |

## SubscribeEvent(OpcNodeId, OpcEventReceivedEventHandler)

Subscribes events on the node specified by `nodeId`.

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

```csharp
public OpcSubscription SubscribeEvent(
    OpcNodeId nodeId,
    OpcEventReceivedEventHandler received)
```

</div>

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

```vbnet
Public Function SubscribeEvent(
    nodeId As OpcNodeId,
    received As OpcEventReceivedEventHandler) As OpcSubscription
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `nodeId` | [OpcNodeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/) | The [OpcNodeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/) of the node on which the service, who will execute this command. |
| `received` | [OpcEventReceivedEventHandler](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opceventreceivedeventhandler/) | The [OpcEventReceivedEventHandler](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opceventreceivedeventhandler/) method to assign as the event handler of the [EventReceived](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcmonitoreditem/members#eventreceived) event or a null reference (Nothing in Visual Basic) if there no event handler is to be assigned first. |

**Returns**

[OpcSubscription](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcsubscription/)

A new instance of the [OpcSubscription](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcsubscription/) class with a single [OpcMonitoredItem](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcmonitoreditem/) setup with the information specified. The kind of monitored item will when monitor events performed on the node identified by the values passed to this method.

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) | The `nodeId` is a null reference (Nothing in Visual Basic). |
| [OpcException](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcexception/) | The service execution failed upon different circumstances; for more details see exception details. The following issues can lead to that exception: [BadNothingToDo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnothingtodo), [BadTooManyOperations](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanyoperations), [BadTimestampsToReturnInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtimestampstoreturninvalid), [BadSubscriptionIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badsubscriptionidinvalid), [BadMonitoringModeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoringmodeinvalid), [BadNodeIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidinvalid), [BadNodeIdUnknown](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidunknown), [BadIndexRangeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangeinvalid), [BadIndexRangeNoData](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangenodata), [BadDataEncodingInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodinginvalid), [BadDataEncodingUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodingunsupported), [BadMonitoredItemFilterInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoreditemfilterinvalid), [BadMonitoredItemFilterUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoreditemfilterunsupported), [BadFilterNotAllowed](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badfilternotallowed), [BadTooManySubscriptions](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanysubscriptions) and [BadTooManyMonitoredItems](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanymonitoreditems). |

## SubscribeEvent(OpcNodeId, OpcAttribute, OpcEventReceivedEventHandler)

Subscribes events on the `attribute` of the node specified by `nodeId`.

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

```csharp
public OpcSubscription SubscribeEvent(
    OpcNodeId nodeId,
    OpcAttribute attribute,
    OpcEventReceivedEventHandler received)
```

</div>

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

```vbnet
Public Function SubscribeEvent(
    nodeId As OpcNodeId,
    attribute As OpcAttribute,
    received As OpcEventReceivedEventHandler) As OpcSubscription
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `nodeId` | [OpcNodeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/) | The [OpcNodeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/) of the node on which the service, who will execute this command, will operate on its `attribute`. |
| `attribute` | [OpcAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/) | One of the members defined by the [OpcAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/) enumeration that defines which node attribute is to be used by the subscription. |
| `received` | [OpcEventReceivedEventHandler](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opceventreceivedeventhandler/) | The [OpcEventReceivedEventHandler](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opceventreceivedeventhandler/) method to assign as the event handler of the [EventReceived](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcmonitoreditem/members#eventreceived) event or a null reference (Nothing in Visual Basic) if there no event handler is to be assigned first. |

**Returns**

[OpcSubscription](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcsubscription/)

A new instance of the [OpcSubscription](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcsubscription/) class with a single [OpcMonitoredItem](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcmonitoreditem/) setup with the information specified. The kind of monitored item will when monitor events performed on the node identified by the values passed to this method.

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) | The `nodeId` is a null reference (Nothing in Visual Basic). |
| [OpcException](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcexception/) | The service execution failed upon different circumstances; for more details see exception details. The following issues can lead to that exception: [BadNothingToDo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnothingtodo), [BadTooManyOperations](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanyoperations), [BadTimestampsToReturnInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtimestampstoreturninvalid), [BadSubscriptionIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badsubscriptionidinvalid), [BadMonitoringModeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoringmodeinvalid), [BadNodeIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidinvalid), [BadNodeIdUnknown](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidunknown), [BadAttributeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badattributeinvalid), [BadIndexRangeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangeinvalid), [BadIndexRangeNoData](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangenodata), [BadDataEncodingInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodinginvalid), [BadDataEncodingUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodingunsupported), [BadMonitoredItemFilterInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoreditemfilterinvalid), [BadMonitoredItemFilterUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoreditemfilterunsupported), [BadFilterNotAllowed](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badfilternotallowed), [BadTooManySubscriptions](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanysubscriptions) and [BadTooManyMonitoredItems](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanymonitoreditems). |

## SubscribeEvent(OpcNodeId, OpcEventFilter, OpcEventReceivedEventHandler)

Subscribes events on the node specified by `nodeId`.

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

```csharp
public OpcSubscription SubscribeEvent(
    OpcNodeId nodeId,
    OpcEventFilter filter,
    OpcEventReceivedEventHandler received)
```

</div>

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

```vbnet
Public Function SubscribeEvent(
    nodeId As OpcNodeId,
    filter As OpcEventFilter,
    received As OpcEventReceivedEventHandler) As OpcSubscription
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `nodeId` | [OpcNodeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/) | The [OpcNodeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/) of the node on which the service, who will execute this command. |
| `filter` | [OpcEventFilter](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opceventfilter/) | The [OpcEventFilter](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opceventfilter/) to be used by the server's subscription to - which the monitored item belongs - to filter the monitored data before it is reported to the client, which owns the monitored item. |
| `received` | [OpcEventReceivedEventHandler](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opceventreceivedeventhandler/) | The [OpcEventReceivedEventHandler](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opceventreceivedeventhandler/) method to assign as the event handler of the [EventReceived](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcmonitoreditem/members#eventreceived) event or a null reference (Nothing in Visual Basic) if there no event handler is to be assigned first. |

**Returns**

[OpcSubscription](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcsubscription/)

A new instance of the [OpcSubscription](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcsubscription/) class with a single [OpcMonitoredItem](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcmonitoreditem/) setup with the information specified. The kind of monitored item will when monitor events performed on the node identified by the values passed to this method.

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) | The `nodeId` is a null reference (Nothing in Visual Basic). |
| [OpcException](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcexception/) | The service execution failed upon different circumstances; for more details see exception details. The following issues can lead to that exception: [BadNothingToDo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnothingtodo), [BadTooManyOperations](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanyoperations), [BadTimestampsToReturnInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtimestampstoreturninvalid), [BadSubscriptionIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badsubscriptionidinvalid), [BadMonitoringModeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoringmodeinvalid), [BadNodeIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidinvalid), [BadNodeIdUnknown](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidunknown), [BadIndexRangeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangeinvalid), [BadIndexRangeNoData](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangenodata), [BadDataEncodingInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodinginvalid), [BadDataEncodingUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodingunsupported), [BadMonitoredItemFilterInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoreditemfilterinvalid), [BadMonitoredItemFilterUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoreditemfilterunsupported), [BadFilterNotAllowed](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badfilternotallowed), [BadTooManySubscriptions](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanysubscriptions) and [BadTooManyMonitoredItems](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanymonitoreditems). |

## SubscribeEvent(OpcNodeId, OpcAttribute, OpcEventFilter, OpcEventReceivedEventHandler)

Subscribes events on the `attribute` of the node specified by `nodeId`.

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

```csharp
public OpcSubscription SubscribeEvent(
    OpcNodeId nodeId,
    OpcAttribute attribute,
    OpcEventFilter filter,
    OpcEventReceivedEventHandler received)
```

</div>

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

```vbnet
Public Function SubscribeEvent(
    nodeId As OpcNodeId,
    attribute As OpcAttribute,
    filter As OpcEventFilter,
    received As OpcEventReceivedEventHandler) As OpcSubscription
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `nodeId` | [OpcNodeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/) | The [OpcNodeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/) of the node on which the service, who will execute this command, will operate on its `attribute`. |
| `attribute` | [OpcAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/) | One of the members defined by the [OpcAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/) enumeration that defines which node attribute is to be used by the subscription. |
| `filter` | [OpcEventFilter](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opceventfilter/) | The [OpcEventFilter](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opceventfilter/) to be used by the server's subscription to - which the monitored item belongs - to filter the monitored data before it is reported to the client, which owns the monitored item. |
| `received` | [OpcEventReceivedEventHandler](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opceventreceivedeventhandler/) | The [OpcEventReceivedEventHandler](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opceventreceivedeventhandler/) method to assign as the event handler of the [EventReceived](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcmonitoreditem/members#eventreceived) event or a null reference (Nothing in Visual Basic) if there no event handler is to be assigned first. |

**Returns**

[OpcSubscription](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcsubscription/)

A new instance of the [OpcSubscription](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcsubscription/) class with a single [OpcMonitoredItem](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcmonitoreditem/) setup with the information specified. The kind of monitored item will when monitor events performed on the node identified by the values passed to this method.

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) | The `nodeId` is a null reference (Nothing in Visual Basic). |
| [OpcException](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcexception/) | The service execution failed upon different circumstances; for more details see exception details. The following issues can lead to that exception: [BadNothingToDo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnothingtodo), [BadTooManyOperations](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanyoperations), [BadTimestampsToReturnInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtimestampstoreturninvalid), [BadSubscriptionIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badsubscriptionidinvalid), [BadMonitoringModeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoringmodeinvalid), [BadNodeIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidinvalid), [BadNodeIdUnknown](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidunknown), [BadAttributeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badattributeinvalid), [BadIndexRangeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangeinvalid), [BadIndexRangeNoData](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangenodata), [BadDataEncodingInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodinginvalid), [BadDataEncodingUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodingunsupported), [BadMonitoredItemFilterInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoreditemfilterinvalid), [BadMonitoredItemFilterUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmonitoreditemfilterunsupported), [BadFilterNotAllowed](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badfilternotallowed), [BadTooManySubscriptions](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanysubscriptions) and [BadTooManyMonitoredItems](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanymonitoreditems). |
