|
Parking Garage Control System
ESP32 Parking Garage – ESP-IDF/FreeRTOS
|
Entry gate controller with state machine. More...
#include <EntryGateController.h>
Public Member Functions | |
| EntryGateController (IEventBus &eventBus, IGpioInput &button, IGate &gate, ITicketService &ticketService, uint32_t barrierTimeoutMs=2000) | |
| Construct entry gate controller with injected dependencies. | |
| ~EntryGateController () | |
| EntryGateController (const EntryGateController &)=delete | |
| EntryGateController & | operator= (const EntryGateController &)=delete |
| EntryGateState | getState () const |
| Get current state. | |
| const char * | getStateString () const |
| Get state as string. | |
| IGate & | getGate () |
| Get gate reference (for debugging/console commands) | |
| IGpioInput & | getButton () |
| Get button reference (for debugging/console commands) | |
| void | setupGpioInterrupts () |
| Setup GPIO interrupts Call this after construction to enable hardware interrupts. | |
| void | reset () |
| Reset controller to initial state Stops timers, resets state to Idle, clears current ticket, closes barrier. | |
Entry gate controller with state machine.
Handles entry sequence:
Uses pure Dependency Injection - all dependencies are injected via constructor.
| EntryGateController::EntryGateController | ( | IEventBus & | eventBus, |
| IGpioInput & | button, | ||
| IGate & | gate, | ||
| ITicketService & | ticketService, | ||
| uint32_t | barrierTimeoutMs = 2000 |
||
| ) |
| EntryGateController::~EntryGateController | ( | ) |
|
delete |
|
inline |
Get button reference (for debugging/console commands)
|
inline |
Get gate reference (for debugging/console commands)
|
inline |
Get current state.
| const char * EntryGateController::getStateString | ( | ) | const |
Get state as string.
|
delete |
| void EntryGateController::reset | ( | ) |
Reset controller to initial state Stops timers, resets state to Idle, clears current ticket, closes barrier.
| void EntryGateController::setupGpioInterrupts | ( | ) |
Setup GPIO interrupts Call this after construction to enable hardware interrupts.