Commit 4965c33f authored by Andreas's avatar Andreas Committed by oroulet

edit comments

parent 78aee035
...@@ -19,8 +19,8 @@ if __name__ == "__main__": ...@@ -19,8 +19,8 @@ if __name__ == "__main__":
await mystatemachine.install(optionals=True) await mystatemachine.install(optionals=True)
# 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!
await mystatemachine.add_state(state1, state_type=ua.NodeId(2309, 0)) #this is a init state -> InitialStateType: ua.NodeId(2309, 0) await mystatemachine.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
await mystatemachine.add_transition(trans1) await mystatemachine.add_transition(trans1)
trans2 = Transition("Transition-Id-2", "to Loading", 2) trans2 = Transition("Transition-Id-2", "to Loading", 2)
await mystatemachine.add_transition(trans2) await mystatemachine.add_transition(trans2)
......
...@@ -19,7 +19,7 @@ if __name__ == "__main__": ...@@ -19,7 +19,7 @@ if __name__ == "__main__":
await mystatemachine.install(optionals=True) await mystatemachine.install(optionals=True)
# 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!
await mystatemachine.add_state(state1, state_type=ua.NodeId(2309, 0)) #this is a init state -> InitialStateType: ua.NodeId(2309, 0) await mystatemachine.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__":
await mystatemachine.add_state(state5) await mystatemachine.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!
await mystatemachine.add_transition(trans1) await mystatemachine.add_transition(trans1)
trans2 = Transition("Transition-Id-2", "to Loading", 2) trans2 = Transition("Transition-Id-2", "to Loading", 2)
await mystatemachine.add_transition(trans2) await mystatemachine.add_transition(trans2)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment