Event pub/sub manager for embedded applications using FreeRTOS. More...
#include <vector>
#include <type_traits>
#include <FreeRTOS.h>
#include <task.h>
#include <semphr.h>
#include <queue.h>
#include "events/Event.h"
#include "framework/FrameworkController.h"
Go to the source code of this file.
Classes | |
class | EventManager |
Manages the system-wide event queue and subscriptions. More... | |
struct | EventManager::Subscriber |
Part of the PicoFramework application framework. This module provides the EventManager class, which allows tasks to subscribe to specific event types and post events to a global queue.
The EventManager uses a FreeRTOS queue to manage events and supports both task and ISR contexts for posting events.
Tasks can subscribe to specific event types using a bitmask and receive notifications via onEvent()
or FreeRTOS task notifications. It is possible to broadcast events to all subscribers or target specific tasks based on their subscriptions.
This design allows for flexible event-driven programming in embedded systems, enabling modular and decoupled task management.
The EventManager is implemented as a singleton, ensuring that there is only one global event queue shared across the application.
Event
class, which encapsulates the event type and any associated data. You can extend the Event
class to include additional information as needed for your application.onEvent()
method for handling events.Part of the PicoFramework application framework. This module provides the EventManager class, which allows tasks to subscribe to specific event types and post events to a global queue.
The EventManager uses a FreeRTOS queue to manage events and supports both task and ISR contexts for posting events.
Tasks can subscribe to specific event types using a bitmask and receive notifications via onEvent()
or FreeRTOS task notifications. It is possible to broadcast events to all subscribers or target specific tasks based on their subscriptions.
This design allows for flexible event-driven programming in embedded systems, enabling modular and decoupled task management.
The EventManager is implemented as a singleton, ensuring that there is only one global event queue shared across the application.
Event
class, which encapsulates the event type and any associated data. You can extend the Event
class to include additional information as needed for your application.onEvent()
method for handling events.Definition in file EventManager.h.