CrossGuard
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
MainSystem Class Reference

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.
 

Detailed Description

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.

Member Enumeration Documentation

◆ TrafficLightState

Enumerates the states of the traffic lights within the system.

Enumerator
OFF 

Both cars and pedestrians lights are off.

CARS_RED_PEDESTRIANS_GREEN 

Cars at red and pedestrians at green.

CARS_GREEN_PEDESTRIANS_RED 

Cars at green and pedestrians at red.

Constructor & Destructor Documentation

◆ MainSystem()

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::~MainSystem ( )

Destructor ensures proper shutdown of all systems.

Destruct a new Main System:: Main System object Shuts down all subsystems.

Member Function Documentation

◆ initialize()

void MainSystem::initialize ( )

Initializes all subsystems and registers necessary callbacks.

Initializes all subsystems. This function initializes all subsystems of the traffic light system.

◆ runSystems()

void MainSystem::runSystems ( )

Begins operation of all traffic management subsystems.

Runs all subsystems. This function runs all subsystems of the traffic light system.

◆ shutdown()

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.


The documentation for this class was generated from the following files: