elevator v1.0.0 Fsm View Source

Module for representing the elevator as a Finite State Machine.

Link to this section Summary

Functions

Returns a specification to start this module under a supervisor.

Signals to the Fsm that a floor is reached.

Requests the current state of all the Fsms.

Initializes the Fsm, checking which floor the elevator is at and setting the motor direction downwards if it is between floors.

Checks which floor the elevator is actually in. Starts the Fsm at the given floor in idle, or as on an unknown floor in a downwards direction if the elevator is between floors. For use in a supervision tree, see Supervisor.

Signals to the Fsm to wake up from idle state.

Link to this section Functions

Returns a specification to start this module under a supervisor.

See Supervisor.

Signals to the Fsm that a floor is reached.

Link to this function

getStates(nodes \\ [node() | Node.list()])

View Source

Requests the current state of all the Fsms.

Initializes the Fsm, checking which floor the elevator is at and setting the motor direction downwards if it is between floors.

Checks which floor the elevator is actually in. Starts the Fsm at the given floor in idle, or as on an unknown floor in a downwards direction if the elevator is between floors. For use in a supervision tree, see Supervisor.

Signals to the Fsm to wake up from idle state.