State Machine class. More...
Public Member Functions | |
def | __init__ |
def | call_update_tree_view_cb |
def | execute |
def | get_tree_view |
def | register_tree_view_cb |
Private Member Functions | |
def | _create_tree_view |
def | _request_pause_cb |
def | _request_preempt_cb |
def | _tree_view_disable_state |
def | _tree_view_enable_state |
def | _tree_view_pause_state |
def | _update_once |
Private Attributes | |
_datamodel | |
_is_running | |
Copy the datamodel's value into the userData. | |
_onEntry | |
_onExit | |
_pause | |
_pause_sub | |
_preempt_pause | |
_preempt_requested | |
_preempt_sub | |
_preempted_label | |
_preempted_state | |
_server_name | |
_tree_view | |
_tree_view_cb |
State Machine class.
StateMachine This is a finite state machine smach container. Note that though this is a state machine, it also implements the L{smach.State} interface, so these can be composed hierarchically, if such a pattern is desired. States are added to the state machine as 3-tuple specifications: - label - state instance - transitions The label is a string, the state instance is any class that implements the L{smach.State} interface, and transitions is a dictionary mapping strings onto strings which represent the transitions out of this new state. Transit_preempt_pauseions can take one of three forms: - OUTCOME -> STATE_LABEL - OUTCOME -> None (or unspecified) - OUTCOME -> SM_OUTCOME
Definition at line 36 of file ssm_state_machine.py.
def src.airbus_ssm_core.ssm_state_machine.ssmStateMachine.__init__ | ( | self, | |
outcomes, | |||
input_keys = [] , |
|||
output_keys = [] |
|||
) |
Definition at line 57 of file ssm_state_machine.py.
def src.airbus_ssm_core.ssm_state_machine.ssmStateMachine._create_tree_view | ( | self | ) | [private] |
Definition at line 301 of file ssm_state_machine.py.
def src.airbus_ssm_core.ssm_state_machine.ssmStateMachine._request_pause_cb | ( | self, | |
msg | |||
) | [private] |
Callback empty message for propagate preempt to currently active state.
Definition at line 87 of file ssm_state_machine.py.
def src.airbus_ssm_core.ssm_state_machine.ssmStateMachine._request_preempt_cb | ( | self, | |
msg | |||
) | [private] |
Callback empty message for propagate preempt to currently active state.
Reimplemented in src.airbus_ssm_core.ssm_state_machine.ssmMainStateMachine.
Definition at line 79 of file ssm_state_machine.py.
def src.airbus_ssm_core.ssm_state_machine.ssmStateMachine._tree_view_disable_state | ( | self, | |
label | |||
) | [private] |
Definition at line 311 of file ssm_state_machine.py.
def src.airbus_ssm_core.ssm_state_machine.ssmStateMachine._tree_view_enable_state | ( | self, | |
label | |||
) | [private] |
Definition at line 306 of file ssm_state_machine.py.
def src.airbus_ssm_core.ssm_state_machine.ssmStateMachine._tree_view_pause_state | ( | self, | |
label | |||
) | [private] |
Definition at line 316 of file ssm_state_machine.py.
def src.airbus_ssm_core.ssm_state_machine.ssmStateMachine._update_once | ( | self | ) | [private] |
Method that updates the state machine once. This checks if the current state is ready to transition, if so, it requests the outcome of the current state, and then extracts the next state label from the current state's transition dictionary, and then transitions to the next state.
Definition at line 94 of file ssm_state_machine.py.
Definition at line 327 of file ssm_state_machine.py.
def src.airbus_ssm_core.ssm_state_machine.ssmStateMachine.execute | ( | self, | |
parent_ud = smach.UserData() |
|||
) |
Run the state machine on entry to this state. This will set the "closed" flag and spin up the execute thread. Once this flag has been set, it will prevent more states from being added to the state machine.
Reimplemented in src.airbus_ssm_core.ssm_state_machine.ssmMainStateMachine.
Definition at line 208 of file ssm_state_machine.py.
Definition at line 321 of file ssm_state_machine.py.
def src.airbus_ssm_core.ssm_state_machine.ssmStateMachine.register_tree_view_cb | ( | self, | |
callback | |||
) |
Definition at line 324 of file ssm_state_machine.py.
Definition at line 57 of file ssm_state_machine.py.
Copy the datamodel's value into the userData.
Do the <onentry> Do the <onexit>
Definition at line 212 of file ssm_state_machine.py.
Definition at line 57 of file ssm_state_machine.py.
Definition at line 57 of file ssm_state_machine.py.
Definition at line 57 of file ssm_state_machine.py.
Definition at line 57 of file ssm_state_machine.py.
Reimplemented in src.airbus_ssm_core.ssm_state_machine.ssmMainStateMachine.
Definition at line 57 of file ssm_state_machine.py.
Definition at line 99 of file ssm_state_machine.py.
Definition at line 57 of file ssm_state_machine.py.
Definition at line 212 of file ssm_state_machine.py.
Definition at line 99 of file ssm_state_machine.py.
Definition at line 57 of file ssm_state_machine.py.
Definition at line 57 of file ssm_state_machine.py.
Definition at line 57 of file ssm_state_machine.py.