# IOpcStateMachine&lt;T&gt; Interface

> Reference: Defines an interface which provides the state of a state machine whose states are identified by values of the type T and methods to change it (see OpcFiniteStateMachineNode<T>).

<span class="api-meta">since v2.54</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">IOpcStateMachine&lt;T&gt; Members</a></dd>
</dl>

Defines an interface which provides the state of a state machine whose states are identified by values of the type `T` and methods to change it (see [OpcFiniteStateMachineNode&lt;T&gt;](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcfinitestatemachinenode-1/)).

## Syntax

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

```csharp
public interface IOpcStateMachine<T>
```

</div>

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

```vbnet
Public Interface IOpcStateMachine(Of T)
```

</div>

## Type parameters

| Name | Description |
|---|---|
| `T` | The type which identifies the states, e.g. an enumeration whose members are the state numbers. |

## Base interfaces

<ul class="api-implements">
<li><a href="../opc.uafx.iopcstatemachine/">IOpcStateMachine</a></li>
</ul>

## Derived types

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

## Methods

| Name | Description |
|---|---|
| [CanChangeStateTo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcstatemachine-1/members#canchangestateto)<span class="api-meta">2 overloads</span> | Determines whether the current state can be changed to the `newState` specified. |
| [ChangeStateTo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcstatemachine-1/members#changestateto) | Changes the current state of the state machine to the `newState` specified. |
| [GetSubStatesMachine](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcstatemachine-1/members#getsubstatesmachine) | Gets the state machine of the sub-states of the `state` specified whose states are identified by values of the type `TSubStates`. |

Inherits members from [IOpcStateMachine](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcstatemachine/members).

## Applies to

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