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
Alex Robin edited this page Dec 21, 2016
·
3 revisions
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.