CrossGuard
|
Manages pedestrian-specific traffic lights. More...
#include <PedestriansTrafficLightSystem.h>
Public Member Functions | |
PedestriansTrafficLightSystem () | |
Constructor initializing the system with default pin settings. | |
void | initialize () |
Initializes the traffic light system. | |
void | run () |
Starts the operation of the traffic light, managing its state changes. | |
void | deactivate () |
Deactivates the traffic lights, turning them off safely. | |
Public Member Functions inherited from TrafficLight | |
TrafficLight (int redPin, int greenPin) | |
Constructor for a traffic light with specified pins for the red and green LEDs. | |
TrafficLight (int redPin, int greenPin, int yellowPin) | |
Constructor for a traffic light with specified pins for the red, green, and yellow LEDs. | |
void | turnRed () |
Sets the traffic light to red. | |
void | turnGreen () |
Sets the traffic light to green. | |
void | turnYellow () |
Sets the traffic light to yellow. | |
void | turnOff () |
Turns off all lights. | |
Additional Inherited Members | |
Public Types inherited from TrafficLight | |
enum class | State { OFF , RED , GREEN , YELLOW } |
Represents the possible states of a traffic light. More... | |
Manages pedestrian-specific traffic lights.
Extends the TrafficLight class to specifically handle pedestrian traffic lights, managing their operational state and ensuring they can be safely activated and deactivated.
PedestriansTrafficLightSystem::PedestriansTrafficLightSystem | ( | ) |
Constructor initializing the system with default pin settings.
Constructor for PedestriansTrafficLightSystem. Initializes traffic light pins and sets the system as inactive.
void PedestriansTrafficLightSystem::deactivate | ( | ) |
Deactivates the traffic lights, turning them off safely.
Deactivates the traffic light system. Turns off the lights and marks the system as inactive.
void PedestriansTrafficLightSystem::initialize | ( | ) |
Initializes the traffic light system.
Initializes the pedestrian traffic light system. Placeholder for any setup required before activating the lights.
void PedestriansTrafficLightSystem::run | ( | ) |
Starts the operation of the traffic light, managing its state changes.
Main operational logic for the pedestrian traffic lights. Currently, it does not contain implementation details.