bpod_core.fsm

Module defining classes and types for creating and managing state machines.

Functions

dec_hook

Decode a dictionary into a BaseModel instance.

enc_hook

Encode a BaseModel instance into a dictionary.

Classes

Actions

A collection of actions.

Condition

A condition in the state machine.

Conditions

A collection of conditions.

GlobalCounter

A global counter in the state machine.

GlobalCounters

A collection of global counters.

GlobalTimer

A global timer in the state machine.

GlobalTimers

A collection of global timers.

State

A state in the state machine.

StateMachine

Definition of a Bpod finite-state machine.

States

A collection of states.

Transitions

A collection of state transitions.

Attributes

bpod_core.fsm.StateName

A valid state machine state name.

alias of Annotated[str, FieldInfo(annotation=NoneType, required=True, title=’State Name’, description=’The name of the state’, metadata=[MinLen(min_length=1), _PydanticGeneralMetadata(pattern=re.compile(‘^(?!>)(?!exit$)(?!back$).+$’))]), WrapValidator(func=_validate_state_name, json_schema_input_type=PydanticUndefined)]