Reference
IOpcStateMachine Members
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>).
Reference
IOpcStateMachine<T> Members
- Type
- IOpcStateMachine<T>
- Namespace
- Opc.UaFx
- Assembly
- Opc.UaFx.Advanced.dll
- Package
- Opc.UaFx.Advanced v2.59.0
Inherits members from IOpcStateMachine.
Methods
CanChangeStateTo
| Overload | Description |
|---|---|
| CanChangeStateTo( | Determines whether the current state can be changed to the newState specified. |
| CanChangeStateTo( | Determines whether the oldState can be changed to the newState specified. |
CanChangeStateTo(OpcContext, T)
Determines whether the current state can be changed to the newState specified.
bool CanChangeStateTo(OpcContext context, T newState)Function CanChangeStateTo(context As OpcContext, newState As T) As BooleanParameters
| Name | Type | Description |
|---|---|---|
context | OpcContext | The OpcContext to use to determine. |
newState | T | The state to change to. |
Returns
The value true if the newState is a known state other than the current state and a transition leads from the current state to it, or if neither a current state nor a last transition is set; otherwise the value false.
Exceptions
| Exception | Condition |
|---|---|
| Argument | The context or newState is a null reference ( |
CanChangeStateTo(OpcContext, T, T)
Determines whether the oldState can be changed to the newState specified.
bool CanChangeStateTo(OpcContext context, T oldState, T newState)Function CanChangeStateTo(
context As OpcContext,
oldState As T,
newState As T) As BooleanParameters
| Name | Type | Description |
|---|---|---|
context | OpcContext | The OpcContext to use to determine. |
oldState | T | The state to change from. |
newState | T | The state to change to. |
Returns
The value true if both states are known and different and a transition leads from the oldState to the newState; otherwise the value false.
Exceptions
| Exception | Condition |
|---|---|
| Argument | The context, oldState or newState is a null reference ( |
ChangeStateTo
Changes the current state of the state machine to the newState specified.
void ChangeStateTo(OpcContext context, T newState)Sub ChangeStateTo(context As OpcContext, newState As T)Parameters
| Name | Type | Description |
|---|---|---|
context | OpcContext | The OpcContext to use to change. |
newState | T | The state to change to. |
Exceptions
| Exception | Condition |
|---|---|
| Argument | The newState is not a known state. |
| Argument | The context or newState is a null reference ( |
| Invalid | No transition leads from the current state to the newState. |
| OpcException | The change operation failed ( |
Remarks
The method does not change the state if SupportsCurrentState is false or the newState is the current state. If neither a current state nor a last transition is set, the state can be changed to any known state.
GetSubStatesMachine
Gets the state machine of the sub-states of the state specified whose states are identified by values of the type TSubStates.
IOpcStateMachine<TSubStates> GetSubStatesMachine<TSubStates>(T state)Function GetSubStatesMachine(Of TSubStates)(
state As T) As IOpcStateMachine(Of TSubStates)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
IOpcStateMachine<TSubStates>
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.

