State machine navigation#

State machine class#

The StateMachine.all_transitions method returns all transitions in the state machine.

Property / method

Description

StateMachine.states

List of states in the state machine.

StateMachine.initial_state

Get the initial state of the state machine.

StateMachine.default_state

Get the default state of the state machine.

StateMachine.get_state()

Get a specific state by its name or lunum.

State class#

Property / method

Description

State.weak_transitions

List of weak transitions from the state.

State.strong_transitions

List of strong transitions from the state.

State.get_targets()

Get all direct target states reachable from this state.

Transition class#

Property / method

Description

Transition.head

Destination of the transition, which can be a State or a Fork.

Transition.tail

Source of the transition, which can be a State or a Fork.

Fork class#

Property / method

Description

Fork.transitions

List of out-going transitions from the fork.

Fork.from_transition

Incoming transition to the fork.

Examples#

Check the state machine example for more details.