uploaded 4 months ago
Event Manager for Publish / Subscribe Asynchronous interactions component for ESP-IDF

readme

Event Manager Component

The EventManager class enables anonymous publish/subscribe interactions between different software components and contexts in the system. It provides a singleton class which manages the registry of publishers and subscribers in the system and provides loose coupling between them. To subscribe to events/data, a component must register itself with the manager by calling add_subscriber() - which will register a callback function associated with that component for the event/topic provided. All callback functions for a given topic/event are called from the same thread/context - a thread that is started and managed by the EventManager. As noted in a few places, it is recommended to use a (de-)serialization library such as espp::serialization / alpaca for transforming data structures to/from std::vector<uint8_t> for publishing/subscribing.

Example

The example shows some basic usage for the EventManager which allows asynchronous communications between multiple tasks following the anonymous pub/sub interaction pattern - supporting one to one, one to many, many to one, and many to many data and event dissemination.

Links

Supports all targets

Maintainer

  • William Emfinger <waemfinger@gmail.com>

License: MIT

To add this component to your project, run:

idf.py add-dependency "espp/event_manager^0.21.0"

or download archive

Stats

  • Archive size
    Archive size ~ 13.98 KB
  • Downloaded in total
    Downloaded in total 4.7k times
  • Downloaded this version
    This version: 1 time

Badge

espp/event_manager version: 0.21.0
|