# IOpcEventHistoryProvider Members

> Reference: Defines an interface which is to be used by an OpcNodeManager to provide historical event data for an OpcObjectNode.

<dl class="api-definition">
<dt>Type</dt>
<dd><a href="./">IOpcEventHistoryProvider</a></dd>
<dt>Namespace</dt>
<dd><a href="../namespaces/opc.uafx.server">Opc.UaFx.Server</a></dd>
<dt>Assembly</dt>
<dd>Opc.UaFx.Advanced.dll</dd>
<dt>Package</dt>
<dd>Opc.UaFx.Advanced v2.59.0</dd>
</dl>

## Properties

### Node

Gets the [OpcObjectNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcobjectnode/) for which this instance provides event history data.

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

```csharp
OpcObjectNode Node { get; }
```

</div>

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

```vbnet
ReadOnly Property Node As OpcObjectNode
```

</div>

**Property value**

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

An instance of the [OpcObjectNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcobjectnode/) class this provider is responsible for.

## Methods

### ReadEventHistory

Retrieves a sequence of [OpcEvent](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcevent/) instances representing the historical events for the associated [Node](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.server.iopceventhistoryprovider/members#node) according to the query parameters specified.

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

```csharp
IEnumerable<OpcEvent> ReadEventHistory(
    OpcContext context,
    OpcEventFilter filter,
    DateTime? startTime,
    DateTime? endTime,
    bool timeFlowsBackward,
    uint? maxCount)
```

</div>

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

```vbnet
Function ReadEventHistory(
    context As OpcContext,
    filter As OpcEventFilter,
    startTime As Date?,
    endTime As Date?,
    timeFlowsBackward As Boolean,
    maxCount As UInteger?) As IEnumerable(Of OpcEvent)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `context` | [OpcContext](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opccontext/) | The [OpcContext](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opccontext/) of the requesting session. |
| `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 use to filter the event history, including the select-clause and where-clause. The server does **not** apply the [WhereClause](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opceventfilter/members#whereclause) — the implementation must evaluate it, e.g. by translating it into a database query. |
| `startTime` | [Nullable](https://learn.microsoft.com/dotnet/api/system.nullable-1)&lt;[DateTime](https://learn.microsoft.com/dotnet/api/system.datetime)&gt; | The inclusive start of the requested time range, or [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null) if no lower bound is specified. |
| `endTime` | [Nullable](https://learn.microsoft.com/dotnet/api/system.nullable-1)&lt;[DateTime](https://learn.microsoft.com/dotnet/api/system.datetime)&gt; | The exclusive end of the requested time range, or [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null) if no upper bound is specified. Exception: when `startTime` equals `endTime`, the single event at that exact timestamp is returned (i.e. `endTime` becomes inclusive). |
| `timeFlowsBackward` | [Boolean](https://learn.microsoft.com/dotnet/api/system.boolean) | The value [true](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool) if results should be returned in reverse chronological order. |
| `maxCount` | [Nullable](https://learn.microsoft.com/dotnet/api/system.nullable-1)&lt;[UInt32](https://learn.microsoft.com/dotnet/api/system.uint32)&gt; | The maximum number of events to return, or [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null) for no limit. |

**Returns**

[IEnumerable](https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1)&lt;[OpcEvent](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcevent/)&gt;

The matching [OpcEvent](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcevent/) instances. Use [Create](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcevent/members#create) to reconstruct events from stored field values.
