Python YASMIN (Yet Another State MachINe)
Loading...
Searching...
No Matches
yasmin_demos.foo_state.FooState Class Reference
Inheritance diagram for yasmin_demos.foo_state.FooState:
Collaboration diagram for yasmin_demos.foo_state.FooState:

Public Member Functions

None __init__ (self)
None configure (self)
str execute (self, Blackboard blackboard)

Public Attributes

int counter = 0
str counter_prefix = "Counter"
int max_count = 3
int sleep_ms = 300

Detailed Description

Represents the Foo state in the state machine.

Constructor & Destructor Documentation

◆ __init__()

None yasmin_demos.foo_state.FooState.__init__ ( self)
Initializes the FooState instance, setting up the outcomes.

Outcomes:
    outcome1: Indicates the state should continue to the Bar state.
    outcome2: Indicates the state should finish execution and return.

Member Function Documentation

◆ configure()

None yasmin_demos.foo_state.FooState.configure ( self)

◆ execute()

str yasmin_demos.foo_state.FooState.execute ( self,
Blackboard blackboard )
Executes the logic for the Foo state.

Args:
    blackboard (Blackboard): The shared data structure for states.

Returns:
    str: The outcome of the execution, which can be "outcome1" or "outcome2".

Raises:
    Exception: May raise exceptions related to state execution.

Member Data Documentation

◆ counter

int yasmin_demos.foo_state.FooState.counter = 0

◆ counter_prefix

str yasmin_demos.foo_state.FooState.counter_prefix = "Counter"

◆ max_count

int yasmin_demos.foo_state.FooState.max_count = 3

◆ sleep_ms

int yasmin_demos.foo_state.FooState.sleep_ms = 300

The documentation for this class was generated from the following file: