# OpcVariableNode Class

<span class="api-meta">abstract</span>

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

Defines a node to use to represent values which may be simple or complex. Variables are always defined as properties or data variables of other nodes in the address space. They are never defined by themselves. A variable is always part of at least one other node, but may be related to any number of other nodes.

## Syntax

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

```csharp
public abstract class OpcVariableNode : OpcInstanceNode
```

</div>

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

```vbnet
<OpcNodeType(62)>
Public MustInherit Class OpcVariableNode
    Inherits OpcInstanceNode
```

</div>

## Inheritance

[Object](https://learn.microsoft.com/dotnet/api/system.object) → [OpcNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnode/) → [OpcInstanceNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcinstancenode/) → **OpcVariableNode**

## Implements

<ul class="api-implements">
<li><a href="../opc.uafx.iopcnode/">IOpcNode</a></li>
<li><a href="../opc.uafx.iopcnodeinfo/">IOpcNodeInfo</a></li>
<li><a href="../opc.uafx.iopcvariablenodeinfo/">IOpcVariableNodeInfo</a></li>
</ul>

## Derived types

- [OpcDataVariableNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatavariablenode/)
- [OpcPropertyNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcpropertynode/)

## Constructors

| Name | Description |
|---|---|
| [OpcVariableNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvariablenode/members#opcvariablenode)<span class="api-meta">protected · 16 overloads</span> | Initializes a new instance of the OpcVariableNode class accessible by the `name` specified. |

## Properties

| Name | Description |
|---|---|
| [AccessLevel](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvariablenode/members#accesslevel) | Gets or sets a value which indicates in which ways the [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvariablenode/members#value) attribute of the variable node can be accessed (read/write) and if it provides current and/or historic data. |
| [ArrayDimensions](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvariablenode/members#arraydimensions)<span class="api-meta">since v2.9</span> | Gets the number/lengths of dimensions for an array [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvariablenode/members#value) with one or more fixed dimensions. |
| [DataType](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvariablenode/members#datatype)<span class="api-meta">virtual</span> | Gets or sets a value which defines a pre-defined used [DataTypeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvariablenode/members#datatypeid) as one of the members defined by the [OpcDataType](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatatype/) enumeration to simplify querying standard data types. |
| [DataTypeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvariablenode/members#datatypeid) | Gets or stets the identifier which identifies the node that defines the type of data represented by the variable node. |
| [DefaultReferenceTypeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvariablenode/members#defaultreferencetypeid)<span class="api-meta">protected · override</span> | Gets the default identifier which identifies the type that defines the underlying node reference within this [OpcInstanceNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcinstancenode/) is referenced by its parent node. |
| [DefaultTypeDefinitionId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvariablenode/members#defaulttypedefinitionid)<span class="api-meta">protected · override</span> | Gets the default identifier which identifies the node that defines the underlying node type from that this [OpcInstanceNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcinstancenode/) has been created. |
| [HistoryConfiguration](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvariablenode/members#historyconfiguration) |  |
| [IsArray](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvariablenode/members#isarray)<span class="api-meta">since v2.18</span> | Gets a value indicating whether the [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvariablenode/members#value) of the OpcVariableNode represented is an array. |
| [IsHistorizing](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvariablenode/members#ishistorizing) | Gets or sets a value indiciating whether there exists an value history for the node. |
| [ReadAccessLevelCallback](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvariablenode/members#readaccesslevelcallback) |  |
| [ReadArrayDimensionsCallback](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvariablenode/members#readarraydimensionscallback)<span class="api-meta">since v2.9</span> |  |
| [ReadDataTypeCallback](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvariablenode/members#readdatatypecallback) |  |
| [ReadIsHistorizingCallback](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvariablenode/members#readishistorizingcallback) |  |
| [ReadUserAccessLevelCallback](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvariablenode/members#readuseraccesslevelcallback) |  |
| [ReadValueRankCallback](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvariablenode/members#readvaluerankcallback) |  |
| [ReadVariableValueCallback](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvariablenode/members#readvariablevaluecallback) | Gets or sets a callback used to read the variable value. |
| [Status](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvariablenode/members#status) |  |
| [Timestamp](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvariablenode/members#timestamp) |  |
| [UserAccessLevel](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvariablenode/members#useraccesslevel) | Gets or sets a value which indicates in which ways the [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvariablenode/members#value) attribute of the variable node can be accessed (read/write) and if it provides current and/or historic data taking user access rights into account. |
| [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvariablenode/members#value) | Gets or sets the value of the variable node which may be simple or complex. |
| [ValueRank](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvariablenode/members#valuerank) |  |
| [WriteAccessLevelCallback](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvariablenode/members#writeaccesslevelcallback) |  |
| [WriteArrayDimensionsCallback](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvariablenode/members#writearraydimensionscallback)<span class="api-meta">since v2.9</span> |  |
| [WriteDataTypeCallback](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvariablenode/members#writedatatypecallback) |  |
| [WriteIsHistorizingCallback](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvariablenode/members#writeishistorizingcallback) |  |
| [WriteUserAccessLevelCallback](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvariablenode/members#writeuseraccesslevelcallback) |  |
| [WriteValueRankCallback](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvariablenode/members#writevaluerankcallback) |  |
| [WriteVariableValueCallback](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvariablenode/members#writevariablevaluecallback) | Gets or sets a callback used to write the variable value. |

## Methods

| Name | Description |
|---|---|
| [InitializeDefaults](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvariablenode/members#initializedefaults)<span class="api-meta">protected · override</span> | Initializes the default values used by the OpcVariableNode. |
| [ReadAttributeValueCore](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvariablenode/members#readattributevaluecore)<span class="api-meta">protected · override</span> |  |
| [ReadValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvariablenode/members#readvalue) | Reads the variable node value using the `context` specified. |
| [ReadVariableValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvariablenode/members#readvariablevalue) |  |
| [ReadVariableValueCore](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvariablenode/members#readvariablevaluecore)<span class="api-meta">protected · virtual</span> | Reads the value of the variable node using the `context` and `value` information specified. |
| [WriteAttributeValueCore](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvariablenode/members#writeattributevaluecore)<span class="api-meta">protected · override</span> |  |
| [WriteValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvariablenode/members#writevalue) | Writes the `value` to the variable node value using the `context` specified. |
| [WriteVariableValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvariablenode/members#writevariablevalue) |  |
| [WriteVariableValueCore](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvariablenode/members#writevariablevaluecore)<span class="api-meta">protected · virtual</span> | Writes the value of the variable node using the `context` and `value` information specified. |

Inherits members from [OpcInstanceNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcinstancenode/members), [OpcNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnode/members).

## Applies to

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