# IOpcStateMachine Interface

> Reference: Defines an interface which provides the state of a state machine and methods to change it (see OpcFiniteStateMachineNode).

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

Defines an interface which provides the state of a state machine and methods to change it (see [OpcFiniteStateMachineNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcfinitestatemachinenode/)).

## Syntax

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

```csharp
public interface IOpcStateMachine
```

</div>

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

```vbnet
Public Interface IOpcStateMachine
```

</div>

## Derived types

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

## Properties

| Name | Description |
|---|---|
| [CurrentState](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcstatemachine/members#currentstate) | Gets or sets a human readable name for the current state of the state machine. |
| [LastTransition](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcstatemachine/members#lasttransition) | Gets or sets a human readable name for the last transition which occurred in the state machine. |
| [Name](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcstatemachine/members#name) | Gets the name of the state machine. |
| [SupportsCurrentState](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcstatemachine/members#supportscurrentstate) | Gets a value indicating whether the state machine supports changes of its current state. |

## Methods

| Name | Description |
|---|---|
| [CanChangeStateTo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcstatemachine/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/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/members#getsubstatesmachine)<span class="api-meta">2 overloads</span> | Gets the state machine of the sub-states of the current state. |

## Applies to

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