# OpcStateMachineNodeExtension Members

> Reference: Provides static (Shared in Visual Basic) extension methods to manage OpcStateMachineNode objects.

<dl class="api-definition">
<dt>Type</dt>
<dd><a href="./">OpcStateMachineNodeExtension</a></dd>
<dt>Namespace</dt>
<dd><a href="../namespaces/opc.uafx.server">Opc.UaFx.Server</a></dd>
<dt>Assembly</dt>
<dd>Opc.UaFx.Advanced.dll</dd>
<dt>Package</dt>
<dd>Opc.UaFx.Advanced v2.59.0</dd>
</dl>

## Methods

### ChangeState

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

Changes the current state of the `stateMachineNode` specified using the further specified `context`.

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

```csharp
public static void ChangeState(
    this OpcFiniteStateMachineNode stateMachineNode,
    OpcContext context,
    uint value)
```

</div>

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

```vbnet
Public Shared Sub ChangeState(
    stateMachineNode As OpcFiniteStateMachineNode,
    context As OpcContext,
    value As UInteger)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `stateMachineNode` | [OpcFiniteStateMachineNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcfinitestatemachinenode/) | The [OpcFiniteStateMachineNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcfinitestatemachinenode/) its [CurrentState](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcfinitestatemachinenode/members#currentstate) is to be modified. |
| `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 respond. |
| `value` | [UInt32](https://learn.microsoft.com/dotnet/api/system.uint32) |  |

**Exceptions**

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