# OpcTwoStateVariableNode Class

> Reference: Defines a specialization of the OpcStateVariableNode which uses a bool as the value of the VariableId.

<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">OpcTwoStateVariableNode Members</a></dd>
</dl>

Defines a specialization of the [OpcStateVariableNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatevariablenode/) which uses a [bool](https://learn.microsoft.com/dotnet/api/system.boolean) as the value of the [VariableId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctwostatevariablenode/members#variableid).

## Syntax

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

```csharp
public class OpcTwoStateVariableNode : OpcStateVariableNode
```

</div>

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

```vbnet
<OpcNodeType(8995)>
Public Class OpcTwoStateVariableNode
    Inherits OpcStateVariableNode
```

</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](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvariablenode/) → [OpcDataVariableNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatavariablenode/) → [OpcTextVariableNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctextvariablenode/) → [OpcStateVariableNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatevariablenode/) → **OpcTwoStateVariableNode**

## 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>

## Constructors

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

## Properties

| Name | Description |
|---|---|
| [DefaultTypeDefinitionId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctwostatevariablenode/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. |
| [EffectiveTransitionTime](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctwostatevariablenode/members#effectivetransitiontime) | Gets or sets a value which specifies the time when the current state or one of its substates was entered. |
| [EffectiveTransitionTimeNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctwostatevariablenode/members#effectivetransitiontimenode) | Gets the [OpcPropertyNode&lt;T&gt;](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcpropertynode-1/) of the [EffectiveTransitionTime](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctwostatevariablenode/members#effectivetransitiontime) property. |
| [FalseState](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctwostatevariablenode/members#falsestate) | Gets or sets a value which contains a human readable representation for the variable value when its [VariableId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctwostatevariablenode/members#variableid) property has the value true. |
| [FalseStateNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctwostatevariablenode/members#falsestatenode) | Gets the [OpcTextPropertyNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctextpropertynode/) of the [FalseState](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctwostatevariablenode/members#falsestate) property. |
| [TransitionTime](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctwostatevariablenode/members#transitiontime) | Gets or sets a value which specifies when the current state was entered. |
| [TransitionTimeNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctwostatevariablenode/members#transitiontimenode) | Gets the [OpcPropertyNode&lt;T&gt;](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcpropertynode-1/) of the [TransitionTime](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctwostatevariablenode/members#transitiontime) property. |
| [TrueState](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctwostatevariablenode/members#truestate) | Gets or sets a value which contains a human readable representation for the variable value when its [VariableId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctwostatevariablenode/members#variableid) property has the value true. |
| [TrueStateNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctwostatevariablenode/members#truestatenode) | Gets the [OpcTextPropertyNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctextpropertynode/) of the [TrueState](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctwostatevariablenode/members#truestate) property. |
| [VariableId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctwostatevariablenode/members#variableid) | Gets or sets a node identifier which uniquely identifies the current state within the state machine. |

## Methods

| Name | Description |
|---|---|
| [InitializeDefaults](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctwostatevariablenode/members#initializedefaults)<span class="api-meta">protected · override</span> | Initializes the default values used by the OpcTwoStateVariableNode. |

Inherits members from [OpcStateVariableNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatevariablenode/members), [OpcTextVariableNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctextvariablenode/members), [OpcVariableNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvariablenode/members), [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 |
