Elevator v1.0.0 Poller
Module for polling the DriverInterface to the hardware and passing the information
State:
- No state
Tasks:
- Spawning two threads polling the floor sensor and button sensor, and passing these messages to the OrderHandler and StateMachine
Communication:
- Sends to: OrderHandler, StateMachine
- Receives from:
Link to this section Summary
Functions
Loop and send when a new button is pressed 20 times per second
Returns a specification to start this module under a supervisor
Loop and send when a new floor is reached 20 times per second
Initialize by turning off all lights and spawning one process for button polling and one for floor polling
Link to this section Functions
Link to this function
button_poller()
Loop and send when a new button is pressed 20 times per second
Link to this function
child_spec(init_arg)
Returns a specification to start this module under a supervisor.
See Supervisor
.
Link to this function
floor_poller(floor)
Loop and send when a new floor is reached 20 times per second
Link to this function
init(mock)
Initialize by turning off all lights and spawning one process for button polling and one for floor polling
Link to this function
send_floor(floor)
Link to this function
set_order(floor, button_type)
Link to this function