|
Python YASMIN (Yet Another State MachINe)
|


Public Member Functions | |
| None | __init__ (self) |
| str | execute (self, Blackboard blackboard) |
Public Member Functions inherited from yasmin.state.State | |
| None | __init__ (self, Set[str] outcomes) |
| str | __call__ (self, Blackboard blackboard=None) |
| str | __str__ (self) |
| None | cancel_state (self) |
| bool | is_canceled (self) |
| bool | is_running (self) |
| Set[str] | get_outcomes (self) |
Additional Inherited Members | |
Protected Attributes inherited from yasmin.state.State | |
| Set | _outcomes = set() |
| A set of valid outcomes for this state. | |
| bool | _running = False |
| A flag indicating whether the state is currently running. | |
| bool | _canceled = False |
| A flag indicating whether the state has been canceled. | |
Represents the Bar state in the state machine.
| None yasmin_demos.yasmin_demo.BarState.__init__ | ( | self | ) |
Initializes the BarState instance, setting up the outcome.
Outcomes:
outcome3: Indicates the state should transition back to the Foo state.
| str yasmin_demos.yasmin_demo.BarState.execute | ( | self, | |
| Blackboard | blackboard ) |
Executes the logic for the Bar state.
Args:
blackboard (Blackboard): The shared data structure for states.
Returns:
str: The outcome of the execution, which will always be "outcome3".
Raises:
Exception: May raise exceptions related to state execution.
Reimplemented from yasmin.state.State.