# the FiniteStateMachine provides helperclasses for states and transition each class is a representation of the state- and transition-variabletype
# the FiniteStateMachine provides helperclasses for states and transition each class is a representation of the state- and transition-variabletype
# if the state node already exist for example from xml model you can assign it here aswell as if its a substate this is importent for the change of the state
# if the state node already exist for example from xml model you can assign it here: node=<StateNode>
state1=State("State-Id-1","Idle",1)
state1=State("State-Id-1","Idle",1,node=None)
# adds the state (StateType) to the statemachine childs - this is mandatory for the FiniteStateMachine!
# adds the state (StateType) to the statemachine childs - this is mandatory for the FiniteStateMachine!
awaitmystatemachine.add_state(state1,state_type=ua.NodeId(2309,0))#this is a init state -> InitialStateType: ua.NodeId(2309, 0)
awaitmystatemachine.add_state(state1,state_type=ua.NodeId(2309,0))#this is a init state -> InitialStateType: ua.NodeId(2309, 0)
state2=State("State-Id-2","Loading",2)
state2=State("State-Id-2","Loading",2)
...
@@ -43,9 +43,9 @@ if __name__ == "__main__":
...
@@ -43,9 +43,9 @@ if __name__ == "__main__":
])
])
# setup your transition helperclass
# setup your transition helperclass
# if the transition node already exist for example from xml model you can assign it here
# if the transition node already exist for example from xml model you can assign it here: node=<TransitionNode>
trans1=Transition("Transition-Id-1","to Idle",1)
trans1=Transition("Transition-Id-1","to Idle",1)
# adds the state (TransitionType) to the statemachine childs - this is optional for the FiniteStateMachine
# adds the transition (TransitionType) to the statemachine childs - this is optional for the FiniteStateMachine
# the StateMachine provides helperclasses for states and transition each class is a representation of the state- and transition-variabletype
# the StateMachine provides helperclasses for states and transition each class is a representation of the state- and transition-variabletype
# if the state node already exist for example from xml model you can assign it here aswell as if its a substate this is importent for the change of the state
# if the state node already exist for example from xml model you can assign it here: node=<StateNode>
state1=State("State-Id-1","Idle",1)
state1=State("State-Id-1","Idle",1)
# adds the state (StateType) to the statemachine childs - this is optional!
# adds the state (StateType) to the statemachine childs - this is optional!
awaitmystatemachine.add_state(state1,state_type=ua.NodeId(2309,0))#this is a init state -> InitialStateType: ua.NodeId(2309, 0)
awaitmystatemachine.add_state(state1,state_type=ua.NodeId(2309,0))#this is a init state -> InitialStateType: ua.NodeId(2309, 0)
...
@@ -33,9 +33,9 @@ if __name__ == "__main__":
...
@@ -33,9 +33,9 @@ if __name__ == "__main__":
awaitmystatemachine.add_state(state5)
awaitmystatemachine.add_state(state5)
# setup your transition helperclass
# setup your transition helperclass
# if the transition node already exist for example from xml model you can assign it here
# if the transition node already exist for example from xml model you can assign it here: node=<TransitionNode>
trans1=Transition("Transition-Id-1","to Idle",1)
trans1=Transition("Transition-Id-1","to Idle",1)
# adds the state (TransitionType) to the statemachine childs - this is optional!
# adds the transition (TransitionType) to the statemachine childs - this is optional!