# IOpcReadEventsHistoryService Members

> Reference: Defines a specialized IOpcService<TResponse, TRequest> which can be used to read historical events of one or more nodes.

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

Inherits members from [IOpcService&lt;OpcReadEventsHistoryResponse, OpcReadEventsHistoryRequest&gt;](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.services.iopcservice-2/members).

## Properties

### TimestampsToReturn

Gets or sets the [OpcTimestampsToReturn](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctimestampstoreturn/) to use to request historical data from the server.

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

```csharp
OpcTimestampsToReturn? TimestampsToReturn { get; set; }
```

</div>

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

```vbnet
Property TimestampsToReturn As OpcTimestampsToReturn?
```

</div>

**Property value**

[Nullable](https://learn.microsoft.com/dotnet/api/system.nullable-1)&lt;[OpcTimestampsToReturn](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctimestampstoreturn/)&gt;

One of the members defined by the [OpcTimestampsToReturn](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctimestampstoreturn/) enumeration; otherwise a null reference (Nothing in Visual Basic). In case there the value is a null reference (Nothing in Visual Basic) the [TimestampsToReturn](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.services.opcreadeventshistoryrequest/members#timestampstoreturn) of the [OpcReadEventsHistoryRequest](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.services.opcreadeventshistoryrequest/) to process is used. The default value of this property is a null reference (Nothing in Visual Basic).

## Methods

### ReadEventsHistory

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

| Overload | Description |
|---|---|
| [ReadEventsHistory(OpcReadEventHistoryDetails, IEnumerable&lt;HistoryReadValueId&gt;)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.services.iopcreadeventshistoryservice/members#readeventshistory-opc-uafx-opcreadeventhistorydetails-system-collections-generic-ienumerable-of-opc-ua-historyreadvalueid) |  |
| [ReadEventsHistory(OpcReadEventHistoryDetails, params HistoryReadValueId\[\])](#readeventshistory-opc-uafx-opcreadeventhistorydetails-opc-ua-historyreadvalueid-array) |  |

**Exceptions (all overloads)**

| Exception | Condition |
|---|---|
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) |  |
| [InvalidOperationException](https://learn.microsoft.com/dotnet/api/system.invalidoperationexception) |  |
| [OpcException](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcexception/) |  |

#### ReadEventsHistory(OpcReadEventHistoryDetails, IEnumerable&lt;HistoryReadValueId&gt;)

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

```csharp
HistoryReadResultCollection ReadEventsHistory(
    OpcReadEventHistoryDetails details,
    IEnumerable<HistoryReadValueId> nodesToRead)
```

</div>

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

```vbnet
Function ReadEventsHistory(
    details As OpcReadEventHistoryDetails,
    nodesToRead As IEnumerable(Of HistoryReadValueId)) As HistoryReadResultCollection
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `details` | [OpcReadEventHistoryDetails](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcreadeventhistorydetails/) |  |
| `nodesToRead` | [IEnumerable](https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1)&lt;<abbr title="OPC Foundation stack type, not documented here: Opc.Ua.HistoryReadValueId">HistoryReadValueId</abbr>&gt; |  |

**Returns**

<abbr title="OPC Foundation stack type, not documented here: Opc.Ua.HistoryReadResultCollection">HistoryReadResultCollection</abbr>

#### ReadEventsHistory(OpcReadEventHistoryDetails, params HistoryReadValueId\[\])

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

```csharp
HistoryReadResultCollection ReadEventsHistory(
    OpcReadEventHistoryDetails details,
    params HistoryReadValueId[] nodesToRead)
```

</div>

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

```vbnet
Function ReadEventsHistory(
    details As OpcReadEventHistoryDetails,
    ParamArray nodesToRead As HistoryReadValueId()) As HistoryReadResultCollection
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `details` | [OpcReadEventHistoryDetails](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcreadeventhistorydetails/) |  |
| `nodesToRead` | params <abbr title="OPC Foundation stack type, not documented here: Opc.Ua.HistoryReadValueId">HistoryReadValueId</abbr>[] |  |

**Returns**

<abbr title="OPC Foundation stack type, not documented here: Opc.Ua.HistoryReadResultCollection">HistoryReadResultCollection</abbr>
