![]() |
Belle II Software
release-06-02-00
|
Public Member Functions | |
| def | __init__ (self, name, enter=None, exit=None) |
| def | on_enter (self) |
| def | on_enter (self, callbacks) |
| def | on_exit (self) |
| def | on_exit (self, callbacks) |
| def | __str__ (self) |
| def | __repr__ (self) |
| def | __eq__ (self, other) |
| def | __hash__ (self) |
Public Attributes | |
| name | |
| Name of the State. | |
| on_enter | |
| Callback list when entering state. | |
| on_exit | |
| Callback list when exiting state. | |
Private Member Functions | |
| def | _add_callbacks (self, callback, attribute) |
| def | _ (self, callbacks, attribute) |
Private Attributes | |
| _on_enter | |
| _on_exit | |
Basic State object that can take enter and exit state methods and records the state of a machine. You should assign the self.on_enter or self.on_exit attributes to callback functions or lists of them, if you need them.
Definition at line 41 of file state_machines.py.
| def __init__ | ( | self, | |
| name, | |||
enter = None, |
|||
exit = None |
|||
| ) |
Basic State object that can take enter and exit state methods and records the state of a machine. You should assign the self.on_enter or self.on_exit attributes to callback functions or lists of them, if you need them.
Initialise State with a name and optional lists of callbacks.
Definition at line 50 of file state_machines.py.
|
private |
Alternate method for lists and tuples of function objects.
Definition at line 103 of file state_machines.py.
| def __eq__ | ( | self, | |
| other | |||
| ) |
Definition at line 124 of file state_machines.py.
| def __hash__ | ( | self | ) |
Definition at line 132 of file state_machines.py.
| def __repr__ | ( | self | ) |
Definition at line 119 of file state_machines.py.
| def __str__ | ( | self | ) |
Definition at line 114 of file state_machines.py.
|
private |
Adds callback to a property.
Definition at line 92 of file state_machines.py.
| def on_enter | ( | self | ) |
Runs callbacks when a state is entered.
Definition at line 62 of file state_machines.py.
| def on_enter | ( | self, | |
| callbacks | |||
| ) |
Definition at line 69 of file state_machines.py.
| def on_exit | ( | self | ) |
Runs callbacks when a state is exited.
Definition at line 77 of file state_machines.py.
| def on_exit | ( | self, | |
| callbacks | |||
| ) |
Definition at line 84 of file state_machines.py.