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
child_spec(init_arg)
Returns a specification to start this module under a supervisor.
See Supervisor
.
handle_cast(msg, state)
Handles a external override of backup state
init(list)
Initialize by sending backup
send_backup(backup)
Sends backup of coupled elevator to NetworkHandler
send_motorstop()
Sends message about motor stop to NetworkHandler
start_link(init_args)
watchdog_loop()
Will send an error message to NetworkHandler if it is initialized and receives no sign of life within a set time