You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The MessageBus class provides a lightweight publish/subscribe event system used to decouple components within the firmware. Subscribers register a typed callback; publishers fire the event with matching arguments. No dynamic allocation occurs at publish time — all subscriber vectors are function-local statics.
The template parameter must be one of the event structs defined in MessageBus.h. The argument types must exactly match the Callback signature defined in that struct.
Event Reference
System & Config
Event
Callback Signature
Published by
Description
WarningChanged
void(uint32_t mask)
WarningManager
Fired when the active warning bitmask changes. mask is the new full bitmask.
SystemMetricsUpdated
void()
SystemSensorHandler
Fired on each system sensor poll. Triggers MQTTSensorHandler to republish all sensor states.
Sensors
Event
Callback Signature
Published by
Description
TemperatureUpdated
void(float newTemp)
Dht11SensorHandler
Fired after each successful DHT11 read with the new temperature in °C.
HumidityUpdated
void(uint8_t newHumidity)
Dht11SensorHandler
Fired after each successful DHT11 read with the new relative humidity (%).
Fired on every light sensor poll. isDayTime reflects the debounce-confirmed state. lightLevel is the raw ADC reading (0 – 1023). averageLightLevel is the rolling queue average.