View Source Siblings.Test.FSM (Siblings v0.11.3)

The instance of FSM backed up by Finitomata.

fsm-representation

FSM representation

graph TD
    s1 --> |to_s2| s2
    s1 --> |to_s3| s3

Link to this section Summary

Types

Kind of event which might be send to initiate the transition.

Functions

Getter for the internal compiled in FSM information.

Returns a specification to start this module under a supervisor.

The convenient macro to allow using states in guards, returns a compile-time list of states for Siblings.Test.FSM.

Starts an FSM alone with name and payload given.

Link to this section Types

@type state() :: :s3 | :s2 | :s1 | :*

Kind of event which might be send to initiate the transition.

fsm-representation

FSM representation

graph TD
    s1 --> |to_s2| s2
    s1 --> |to_s3| s3

Link to this section Functions

@spec __config__(atom()) :: any()

Getter for the internal compiled in FSM information.

Returns a specification to start this module under a supervisor.

See Supervisor.

The convenient macro to allow using states in guards, returns a compile-time list of states for Siblings.Test.FSM.

Starts an FSM alone with name and payload given.

Usually one does not want to call this directly, the most common way would be to start a Finitomata supervision tree or even better embed it into the existing supervision tree and start FSM with Finitomata.start_fsm/3 passing Siblings.Test.FSM as the first parameter.