I am developing an OPC UA client application that shoult programatically react to the current state of a finite state machine.
Is it the correct way to check the CurrentState->Id's value (which is a node id as you know) against the node ids of the states defined in the state machine's type definition?
Some pseudo code:
Code: Select all
if (CurrentState.Id == NodeId(ExampleStateMachineType.StateA))
{
// react to state A
}
else if CurrentState.Id == NodeId(ExampleStateMachineType.StateB))
{
// react to state B
}
// ... and so on
Thank you!