Elevator v1.0.0 WatchDog

Module for backing up the state of an individual elevator and updating the NetworkHandler when this state changes, and sending a request to the NetworkHandler. If the elevator has become inactive for more than 5 seconds, e.g. because of a motor stop.

State:

  • No state

Tasks:

  • Send elevator state info to NetworkHandler
  • Detect failiure to complete active orders for elevator

Communication:

  • Sends to: NetworkHandler
  • Receives from: StateMachine

Link to this section Summary

Functions

Returns a specification to start this module under a supervisor

Handles a external override of backup state

Initialize by sending backup

Sends backup of coupled elevator to NetworkHandler

Sends message about motor stop to NetworkHandler

Will send an error message to NetworkHandler if it is initialized and receives no sign of life within a set time

Link to this section Functions

Link to this function

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

Link to this function

handle_cast(msg, state)

Handles a external override of backup state

Initialize by sending backup

Link to this function

send_backup(backup)

Sends backup of coupled elevator to NetworkHandler

Link to this function

send_motorstop()

Sends message about motor stop to NetworkHandler

Link to this function

start_link(init_args)

Link to this function

watchdog_loop()

Will send an error message to NetworkHandler if it is initialized and receives no sign of life within a set time