elevator v1.0.0 OrderHandler View Source

A module for keeping track of the orders being handled by a specific elevator.

Link to this section Summary

Functions

Asks the OrderHandler to add the order to the order queue.

Returns a specification to start this module under a supervisor.

Signals to the OrderHandler that a floor is finished, triggering the deletion of all orders on that floor.

Asks the OrderHandler which floor the next order is on. Returns :tnil if the order queue is empty.

Requests the order queue of all the OrderHandlers.

Callback implementation for GenServer.init/1.

Triggers all the OrderHandlers to retrieve backup from the BackupHandlers.

Asks the OrderHandler if there are orders on the given floor.

Requests backup from the BackupHandlers and starts the OrderHandler in a supervision tree, see Supervisor.

Link to this section Functions

Asks the OrderHandler to add the order to the order queue.

Returns a specification to start this module under a supervisor.

See Supervisor.

Link to this function

finishedOrdersOnFloor(floor)

View Source

Signals to the OrderHandler that a floor is finished, triggering the deletion of all orders on that floor.

Asks the OrderHandler which floor the next order is on. Returns :tnil if the order queue is empty.

Link to this function

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

View Source

Requests the order queue of all the OrderHandlers.

Callback implementation for GenServer.init/1.

Link to this function

multiTriggerRetrieveBackup()

View Source

Triggers all the OrderHandlers to retrieve backup from the BackupHandlers.

Link to this function

ordersOnFloor?(floor, travelDirection)

View Source

Asks the OrderHandler if there are orders on the given floor.

Requests backup from the BackupHandlers and starts the OrderHandler in a supervision tree, see Supervisor.