-
Notifications
You must be signed in to change notification settings - Fork 20
EventBus
The event bus is at the core of sensorhub implementation. It is the main way of exchanging asynchronous messages between components, and is based on the publish-subscribe paradigm. For instance, real-time data produced by sensor drivers is pushed to the bus, and any module can register to receive the corresponding "data" events.

For efficiency, the implementation creates a dedicated instance of IEventHandler for each different listener/topic combination so we can avoid a map lookup for each message.
OSH now uses an asynchronous implementation of IEventHandler called AsyncEventHandler that multi-threads event dispatching while maintaining message order.