adrianiaz / TTK4145-project

Elevator project - The creation of software for controlling n elevators working in parallel across m floors.
0 stars 0 forks source link

OrderHandler Module #6

Open adrianiaz opened 6 months ago

adrianiaz commented 6 months ago

Inputs: Button presses from the elevatorController, completed orders from elevator controller, ledger from the network module. Outputs: Local order downstream to Elevator Controller, Incoming orders and completed orders upstream to the network module.

The Order handler is responsible for deciphering the ledger and to extract only the requested order that is coming from the network module meant for the current node. When the order that is meant for the current node (local order) is extracted it will send the local order as an instruction to the ElevatorController for execution.

The OrderHandler is also responsible for passing the completed orders as well as the incoming orders that comes from the hardware executer up to the network modules, so that it can be sent to the master node for processing.