CrossGuard
|
Orchestrates the operations of traffic and pedestrian traffic lights, monitoring systems, and emergency protocols. More...
#include <MainSystem.h>
Public Types | |
enum | TrafficLightState { OFF , CARS_RED_PEDESTRIANS_GREEN , CARS_GREEN_PEDESTRIANS_RED } |
Public Member Functions | |
MainSystem () | |
Constructor initializes the system with traffic lights off. | |
~MainSystem () | |
Destructor ensures proper shutdown of all systems. | |
void | initialize () |
Initializes all subsystems and registers necessary callbacks. | |
void | runSystems () |
Begins operation of all traffic management subsystems. | |
void | shutdown () |
Safely deactivates all subsystems and terminates operation. | |
Orchestrates the operations of traffic and pedestrian traffic lights, monitoring systems, and emergency protocols.
Integrates multiple subsystems like CarsTrafficLightSystem, PedestriansTrafficLightSystem, CheckingSystem, and WarningSystem to create a cohesive traffic management system. Handles state transitions based on sensor inputs and manages the safety protocols during unusual events.
MainSystem::MainSystem | ( | ) |
Constructor initializes the system with traffic lights off.
Construct a new Main System:: Main System object Initializes the traffic light state to OFF.
MainSystem::~MainSystem | ( | ) |
Destructor ensures proper shutdown of all systems.
Destruct a new Main System:: Main System object Shuts down all subsystems.
void MainSystem::initialize | ( | ) |
Initializes all subsystems and registers necessary callbacks.
Initializes all subsystems. This function initializes all subsystems of the traffic light system.
void MainSystem::runSystems | ( | ) |
Begins operation of all traffic management subsystems.
Runs all subsystems. This function runs all subsystems of the traffic light system.
void MainSystem::shutdown | ( | ) |
Safely deactivates all subsystems and terminates operation.
Shuts down all subsystems. This function shuts down all subsystems of the traffic light system.