betfsm.Generator
Bases: TickingState
Uses a python generator to define a TickingState. It implements methods entry, doo, and exit of TickingState using
the given callback function (which is a python generator that can return intermediate results usig yield). This makes
it easy to specify a TickingState.
Subclasses need to implement/override the abstract method co_execute(self, blackboard:Blackboard)
__init__(name, outcomes)
| Parameters: |
|
|---|
betfsm.GeneratorWithState
Bases: Generator
A Generator with one underlying states
__init__(name, outcomes, state)
| Parameters: |
|
|---|
betfsm.GeneratorWithList
Bases: Generator
A generator with some facilities to maintain an ordered list of children
__init__(name, outcomes, children=[])
| Parameters: |
|
|---|
add_state(state)
adds a state to the sequence parameters: state: state intance returns: self (to allow method chaining)
reset()
resets the sequence and ensures tht the underlying states are also reset.