# OpcFiniteStateMachineNode&lt;T&gt; Members

> Reference: Defines a specialization of the OpcFiniteStateMachineNode whose states are identified by values of the type T.

<dl class="api-definition">
<dt>Type</dt>
<dd><a href="./">OpcFiniteStateMachineNode&lt;T&gt;</a></dd>
<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>
</dl>

Inherits members from [OpcFiniteStateMachineNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcfinitestatemachinenode/members), [OpcObjectNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcobjectnode/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).

## Constructors

### OpcFiniteStateMachineNode

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

| Overload | Description |
|---|---|
| [OpcFiniteStateMachineNode(OpcName)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcfinitestatemachinenode-1/members#opcfinitestatemachinenode-opc-uafx-opcname) | Initializes a new instance of the [OpcFiniteStateMachineNode&lt;T&gt;](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcfinitestatemachinenode-1/) class accessible by the `name` specified. |
| [OpcFiniteStateMachineNode(OpcName, OpcNodeId)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcfinitestatemachinenode-1/members#opcfinitestatemachinenode-opc-uafx-opcname-opc-uafx-opcnodeid) | Initializes a new instance of the [OpcFiniteStateMachineNode&lt;T&gt;](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcfinitestatemachinenode-1/) class accessible by the `name` and `id` specified. |
| [OpcFiniteStateMachineNode(IOpcNode, OpcName)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcfinitestatemachinenode-1/members#opcfinitestatemachinenode-opc-uafx-iopcnode-opc-uafx-opcname) | Initializes a new instance of the [OpcFiniteStateMachineNode&lt;T&gt;](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcfinitestatemachinenode-1/) class accessible by the `name` specified as a child node of the `parent` node given. |
| [OpcFiniteStateMachineNode(IOpcNode, OpcName, OpcNodeId)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcfinitestatemachinenode-1/members#opcfinitestatemachinenode-opc-uafx-iopcnode-opc-uafx-opcname-opc-uafx-opcnodeid) | Initializes a new instance of the [OpcFiniteStateMachineNode&lt;T&gt;](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcfinitestatemachinenode-1/) class accessible by the `name` and `id` specified as a child node of the `parent` node given. |
| [OpcFiniteStateMachineNode(FiniteStateMachineState)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcfinitestatemachinenode-1/members#opcfinitestatemachinenode-opc-ua-finitestatemachinestate)<span class="api-meta">protected</span> | Initializes a new instance of the [OpcFiniteStateMachineNode&lt;T&gt;](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcfinitestatemachinenode-1/) class using the `content` as the instance to wrap. |
| [OpcFiniteStateMachineNode(FiniteStateMachineState, OpcNodeModel)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcfinitestatemachinenode-1/members#opcfinitestatemachinenode-opc-ua-finitestatemachinestate-opc-uafx-opcnodemodel)<span class="api-meta">protected</span> | Initializes a new instance of the [OpcFiniteStateMachineNode&lt;T&gt;](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcfinitestatemachinenode-1/) class using the `content` as the instance to wrap. |
| [OpcFiniteStateMachineNode(OpcNodeModel, OpcName)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcfinitestatemachinenode-1/members#opcfinitestatemachinenode-opc-uafx-opcnodemodel-opc-uafx-opcname)<span class="api-meta">protected</span> | Initializes a new instance of the [OpcFiniteStateMachineNode&lt;T&gt;](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcfinitestatemachinenode-1/) class accessible by the `name` specified. |
| [OpcFiniteStateMachineNode(OpcNodeModel, OpcName, OpcNodeId)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcfinitestatemachinenode-1/members#opcfinitestatemachinenode-opc-uafx-opcnodemodel-opc-uafx-opcname-opc-uafx-opcnodeid)<span class="api-meta">protected</span> | Initializes a new instance of the [OpcFiniteStateMachineNode&lt;T&gt;](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcfinitestatemachinenode-1/) class accessible by the `name` and `id` specified. |
| [OpcFiniteStateMachineNode(OpcNodeModel, IOpcNode, OpcName)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcfinitestatemachinenode-1/members#opcfinitestatemachinenode-opc-uafx-opcnodemodel-opc-uafx-iopcnode-opc-uafx-opcname)<span class="api-meta">protected</span> | Initializes a new instance of the [OpcFiniteStateMachineNode&lt;T&gt;](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcfinitestatemachinenode-1/) class accessible by the `name` specified as a child node of the `parent` node given. |
| [OpcFiniteStateMachineNode(OpcNodeModel, IOpcNode, OpcName, OpcNodeId)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcfinitestatemachinenode-1/members#opcfinitestatemachinenode-opc-uafx-opcnodemodel-opc-uafx-iopcnode-opc-uafx-opcname-opc-uafx-opcnodeid)<span class="api-meta">protected</span> | Initializes a new instance of the [OpcFiniteStateMachineNode&lt;T&gt;](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcfinitestatemachinenode-1/) class accessible by the `name` and `id` specified as a child node of the `parent` node given. |

#### OpcFiniteStateMachineNode(OpcName)

Initializes a new instance of the [OpcFiniteStateMachineNode&lt;T&gt;](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcfinitestatemachinenode-1/) class accessible by the `name` specified.

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

```csharp
public OpcFiniteStateMachineNode(OpcName name)
```

</div>

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

```vbnet
Public Sub New(name As OpcName)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `name` | [OpcName](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcname/) | The [OpcName](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcname/) through that the new finite state machine node can be accessed. |

#### OpcFiniteStateMachineNode(OpcName, OpcNodeId)

Initializes a new instance of the [OpcFiniteStateMachineNode&lt;T&gt;](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcfinitestatemachinenode-1/) class accessible by the `name` and `id` specified.

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

```csharp
public OpcFiniteStateMachineNode(OpcName name, OpcNodeId id)
```

</div>

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

```vbnet
Public Sub New(name As OpcName, id As OpcNodeId)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `name` | [OpcName](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcname/) | The [OpcName](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcname/) through that the new finite state machine node can be accessed. |
| `id` | [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/) through that the new finite state machine node can be identified and accessed. |

#### OpcFiniteStateMachineNode(IOpcNode, OpcName)

Initializes a new instance of the [OpcFiniteStateMachineNode&lt;T&gt;](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcfinitestatemachinenode-1/) class accessible by the `name` specified as a child node of the `parent` node given.

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

```csharp
public OpcFiniteStateMachineNode(IOpcNode parent, OpcName name)
```

</div>

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

```vbnet
Public Sub New(parent As IOpcNode, name As OpcName)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `parent` | [IOpcNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcnode/) | The [IOpcNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcnode/) used as the parent node or a null reference (Nothing in Visual Basic) in the case there is no parent node available. |
| `name` | [OpcName](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcname/) | The [OpcName](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcname/) through that the new finite state machine node can be accessed. |

#### OpcFiniteStateMachineNode(IOpcNode, OpcName, OpcNodeId)

Initializes a new instance of the [OpcFiniteStateMachineNode&lt;T&gt;](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcfinitestatemachinenode-1/) class accessible by the `name` and `id` specified as a child node of the `parent` node given.

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

```csharp
public OpcFiniteStateMachineNode(IOpcNode parent, OpcName name, OpcNodeId id)
```

</div>

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

```vbnet
Public Sub New(parent As IOpcNode, name As OpcName, id As OpcNodeId)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `parent` | [IOpcNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcnode/) | The [IOpcNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcnode/) used as the parent node or a null reference (Nothing in Visual Basic) in the case there is no parent node available. |
| `name` | [OpcName](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcname/) | The [OpcName](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcname/) through that the new finite state machine node can be accessed. |
| `id` | [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/) through that the new finite state machine node can be identified and accessed. |

#### OpcFiniteStateMachineNode(FiniteStateMachineState)

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

Initializes a new instance of the [OpcFiniteStateMachineNode&lt;T&gt;](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcfinitestatemachinenode-1/) class using the `content` as the instance to wrap.

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

```csharp
protected OpcFiniteStateMachineNode(FiniteStateMachineState content)
```

</div>

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

```vbnet
Protected Sub New(content As FiniteStateMachineState)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `content` | <abbr title="OPC Foundation stack type, not documented here: Opc.Ua.FiniteStateMachineState">FiniteStateMachineState</abbr> | The <abbr title="OPC Foundation stack type, not documented here: Opc.Ua.FiniteStateMachineState">FiniteStateMachineState</abbr> to wrap. |

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) | The `content` is a null reference (Nothing in Visual Basic). |

#### OpcFiniteStateMachineNode(FiniteStateMachineState, OpcNodeModel)

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

Initializes a new instance of the [OpcFiniteStateMachineNode&lt;T&gt;](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcfinitestatemachinenode-1/) class using the `content` as the instance to wrap.

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

```csharp
protected OpcFiniteStateMachineNode(
    FiniteStateMachineState content,
    OpcNodeModel model)
```

</div>

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

```vbnet
Protected Sub New(content As FiniteStateMachineState, model As OpcNodeModel)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `content` | <abbr title="OPC Foundation stack type, not documented here: Opc.Ua.FiniteStateMachineState">FiniteStateMachineState</abbr> | The <abbr title="OPC Foundation stack type, not documented here: Opc.Ua.FiniteStateMachineState">FiniteStateMachineState</abbr> to wrap. |
| `model` | [OpcNodeModel](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodemodel/) | The [OpcNodeModel](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodemodel/) which defines the modelling directives for the new node or a null reference (Nothing in Visual Basic) if there are no directives are to be applied to the node. |

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) | The `content` is a null reference (Nothing in Visual Basic). |

#### OpcFiniteStateMachineNode(OpcNodeModel, OpcName)

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

Initializes a new instance of the [OpcFiniteStateMachineNode&lt;T&gt;](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcfinitestatemachinenode-1/) class accessible by the `name` specified.

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

```csharp
protected OpcFiniteStateMachineNode(OpcNodeModel model, OpcName name)
```

</div>

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

```vbnet
Protected Sub New(model As OpcNodeModel, name As OpcName)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `model` | [OpcNodeModel](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodemodel/) | The [OpcNodeModel](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodemodel/) which defines the modelling directives for the new node or a null reference (Nothing in Visual Basic) if there are no directives are to be applied to the node. |
| `name` | [OpcName](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcname/) | The [OpcName](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcname/) through that the new finite state machine node can be accessed. |

#### OpcFiniteStateMachineNode(OpcNodeModel, OpcName, OpcNodeId)

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

Initializes a new instance of the [OpcFiniteStateMachineNode&lt;T&gt;](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcfinitestatemachinenode-1/) class accessible by the `name` and `id` specified.

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

```csharp
protected OpcFiniteStateMachineNode(
    OpcNodeModel model,
    OpcName name,
    OpcNodeId id)
```

</div>

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

```vbnet
Protected Sub New(model As OpcNodeModel, name As OpcName, id As OpcNodeId)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `model` | [OpcNodeModel](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodemodel/) | The [OpcNodeModel](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodemodel/) which defines the modelling directives for the new node or a null reference (Nothing in Visual Basic) if there are no directives are to be applied to the node. |
| `name` | [OpcName](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcname/) | The [OpcName](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcname/) through that the new finite state machine node can be accessed. |
| `id` | [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/) through that the new finite state machine node can be identified and accessed. |

#### OpcFiniteStateMachineNode(OpcNodeModel, IOpcNode, OpcName)

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

Initializes a new instance of the [OpcFiniteStateMachineNode&lt;T&gt;](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcfinitestatemachinenode-1/) class accessible by the `name` specified as a child node of the `parent` node given.

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

```csharp
protected OpcFiniteStateMachineNode(
    OpcNodeModel model,
    IOpcNode parent,
    OpcName name)
```

</div>

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

```vbnet
Protected Sub New(model As OpcNodeModel, parent As IOpcNode, name As OpcName)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `model` | [OpcNodeModel](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodemodel/) | The [OpcNodeModel](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodemodel/) which defines the modelling directives for the new node or a null reference (Nothing in Visual Basic) if there are no directives are to be applied to the node. |
| `parent` | [IOpcNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcnode/) | The [IOpcNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcnode/) used as the parent node or a null reference (Nothing in Visual Basic) in the case there is no parent node available. |
| `name` | [OpcName](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcname/) | The [OpcName](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcname/) through that the new finite state machine node can be accessed. |

#### OpcFiniteStateMachineNode(OpcNodeModel, IOpcNode, OpcName, OpcNodeId)

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

Initializes a new instance of the [OpcFiniteStateMachineNode&lt;T&gt;](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcfinitestatemachinenode-1/) class accessible by the `name` and `id` specified as a child node of the `parent` node given.

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

```csharp
protected OpcFiniteStateMachineNode(
    OpcNodeModel model,
    IOpcNode parent,
    OpcName name,
    OpcNodeId id)
```

</div>

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

```vbnet
Protected Sub New(
    model As OpcNodeModel,
    parent As IOpcNode,
    name As OpcName,
    id As OpcNodeId)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `model` | [OpcNodeModel](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodemodel/) | The [OpcNodeModel](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodemodel/) which defines the modelling directives for the new node or a null reference (Nothing in Visual Basic) if there are no directives are to be applied to the node. |
| `parent` | [IOpcNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcnode/) | The [IOpcNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcnode/) used as the parent node or a null reference (Nothing in Visual Basic) in the case there is no parent node available. |
| `name` | [OpcName](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcname/) | The [OpcName](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcname/) through that the new finite state machine node can be accessed. |
| `id` | [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/) through that the new finite state machine node can be identified and accessed. |

## Methods

### CanChangeStateTo

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

| Overload | Description |
|---|---|
| [CanChangeStateTo(OpcContext, T)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcfinitestatemachinenode-1/members#canchangestateto-opc-uafx-opccontext-t0) | Determines whether the [CurrentState](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcfinitestatemachinenode/members#currentstate) can be changed to the `newState` specified using the further specified `context`. |
| [CanChangeStateTo(OpcContext, T, T)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcfinitestatemachinenode-1/members#canchangestateto-opc-uafx-opccontext-t0-t0) | Determines whether the `oldState` can be changed to the `newState` specified using the further specified `context`. |

**Exceptions (all overloads)**

| Exception | Condition |
|---|---|
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) | The `context` or `newState` is a null reference (Nothing in Visual Basic). |

#### CanChangeStateTo(OpcContext, T)

Determines whether the [CurrentState](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcfinitestatemachinenode/members#currentstate) can be changed to the `newState` specified using the further specified `context`.

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

```csharp
public bool CanChangeStateTo(OpcContext context, T newState)
```

</div>

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

```vbnet
Public Function CanChangeStateTo(
    context As OpcContext,
    newState As T) As Boolean
```

</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/) to use to determine. |
| `newState` | T | The state number or enum of the state to determine. |

**Returns**

[Boolean](https://learn.microsoft.com/dotnet/api/system.boolean)

**Implements**

[CanChangeStateTo(OpcContext, T)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcstatemachine-1/members#canchangestateto-opc-uafx-opccontext-t0)

**Remarks**

In case [SupportsCurrentState](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcfinitestatemachinenode/members#supportscurrentstate) is equals false, this method does always returns false.

#### CanChangeStateTo(OpcContext, T, T)

Determines whether the `oldState` can be changed to the `newState` specified using the further specified `context`.

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

```csharp
public bool CanChangeStateTo(OpcContext context, T oldState, T newState)
```

</div>

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

```vbnet
Public Function CanChangeStateTo(
    context As OpcContext,
    oldState As T,
    newState As T) As Boolean
```

</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/) to use to determine. |
| `oldState` | T | The assumed current state number or enum of the state to determine. |
| `newState` | T | The dedicated new state number or enum of the state to determine. |

**Returns**

[Boolean](https://learn.microsoft.com/dotnet/api/system.boolean)

**Implements**

[CanChangeStateTo(OpcContext, T, T)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcstatemachine-1/members#canchangestateto-opc-uafx-opccontext-t0-t0)

### ChangeStateTo

Changes the [CurrentState](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcfinitestatemachinenode/members#currentstate) to the `newState` specified using the further specified `context`.

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

```csharp
public void ChangeStateTo(OpcContext context, T newState)
```

</div>

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

```vbnet
Public Sub ChangeStateTo(context As OpcContext, newState As T)
```

</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/) to use to change. |
| `newState` | T | The state number or enum of the state to change to. |

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentException](https://learn.microsoft.com/dotnet/api/system.argumentexception) | The `newState` is not a known state. |
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) | The `context` or `newState` is a null reference (Nothing in Visual Basic). |
| [InvalidOperationException](https://learn.microsoft.com/dotnet/api/system.invalidoperationexception) | No transition leads from the current state to the `newState`. |
| [OpcException](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcexception/) | The change operation failed (see exception details for more information). |

**Implements**

[ChangeStateTo(OpcContext, T)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcstatemachine-1/members#changestateto)

**Remarks**

In case [SupportsCurrentState](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcfinitestatemachinenode/members#supportscurrentstate) is equals false, this method does not perform any state changes.

### CreateSubStatesMachineNode

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

| Overload | Description |
|---|---|
| [CreateSubStatesMachineNode(object)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcfinitestatemachinenode-1/members#createsubstatesmachinenode-system-object)<span class="api-meta">protected · override</span> | Creates the state machine of the sub-states of the `state` specified using [CreateSubStatesMachineNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcfinitestatemachinenode-1/members#createsubstatesmachinenode-t0). |
| [CreateSubStatesMachineNode(T)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcfinitestatemachinenode-1/members#createsubstatesmachinenode-t0)<span class="api-meta">protected · virtual</span> | When overridden in a derived class, creates the state machine of the sub-states of the `state` specified. |

#### CreateSubStatesMachineNode(object)

<span class="api-meta">protected · override</span>

Creates the state machine of the sub-states of the `state` specified using [CreateSubStatesMachineNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcfinitestatemachinenode-1/members#createsubstatesmachinenode-t0).

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

```csharp
protected override sealed OpcFiniteStateMachineNode CreateSubStatesMachineNode(
    object state)
```

</div>

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

```vbnet
Protected NotOverridable Overrides Function CreateSubStatesMachineNode(
    state As Object) As OpcFiniteStateMachineNode
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `state` | [Object](https://learn.microsoft.com/dotnet/api/system.object) | The state number of a state for which the type definition of the state machine declares a state machine of sub-states. |

**Returns**

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

The state machine of the sub-states of the `state` created by [CreateSubStatesMachineNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcfinitestatemachinenode-1/members#createsubstatesmachinenode-t0).

**Exceptions**

| Exception | Condition |
|---|---|
| [InvalidCastException](https://learn.microsoft.com/dotnet/api/system.invalidcastexception) | The state number cannot be converted to `T`. |

**Overrides**

[CreateSubStatesMachineNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcfinitestatemachinenode/members#createsubstatesmachinenode)

**Remarks**

If `T` is an enumeration, the state number is passed as the member of the enumeration with that value; otherwise it is converted to `T` (see [ChangeType(object, Type)](https://learn.microsoft.com/dotnet/api/system.convert.changetype#system-convert-changetype%28system-object-system-type%29)).

#### CreateSubStatesMachineNode(T)

<span class="api-meta">protected · virtual</span>

When overridden in a derived class, creates the state machine of the sub-states of the `state` specified.

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

```csharp
protected virtual OpcFiniteStateMachineNode CreateSubStatesMachineNode(T state)
```

</div>

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

```vbnet
Protected Overridable Function CreateSubStatesMachineNode(
    state As T) As OpcFiniteStateMachineNode
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `state` | T | The state for which the type definition of the state machine declares a state machine of sub-states. |

**Returns**

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

The state machine of the sub-states of the `state`. The default implementation returns a null reference (Nothing in Visual Basic).

**Remarks**

The method is called when the states and transitions of the state machine are determined from its type definition.

### GetSubStatesMachineNode

Gets the state machine of the sub-states of the `state` specified whose states are identified by values of the type `TSubStates`.

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

```csharp
public OpcFiniteStateMachineNode<TSubStates> GetSubStatesMachineNode<TSubStates>(
    T state)
```

</div>

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

```vbnet
Public Function GetSubStatesMachineNode(Of TSubStates)(
    state As T) As OpcFiniteStateMachineNode(Of TSubStates)
```

</div>

**Type parameters**

| Name | Description |
|---|---|
| `TSubStates` | The type which identifies the sub-states. |

**Parameters**

| Name | Type | Description |
|---|---|---|
| `state` | T | The state whose sub-states machine is to be retrieved. |

**Returns**

[OpcFiniteStateMachineNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcfinitestatemachinenode-1/)&lt;TSubStates&gt;

The state machine of the sub-states of the `state`, or a null reference (Nothing in Visual Basic) if the state has none or its states are not identified by `TSubStates`.
