|
| void | rkh_pubsub_init (void) |
| | Encapsulates the initialization of publish-subscribe module.
|
| |
| void | rkh_pubsub_subscribe (rui8_t channel, const RKH_SMA_T *ao) |
| | Adds an active object to the notification list of an event channel. Each subscription registers a client's interest in one event channel (topic). This module posts published events to the registered clients in order to forward events that were published to channel that match this subscription.
|
| |
| void | rkh_pubsub_unsubscribe (rui8_t channel, const RKH_SMA_T *ao) |
| | Unsubscribes an active object from topic.
|
| |
| void | rkh_pubsub_unsubscribeAll (const RKH_SMA_T *ao) |
| | Unsubscribes an active object from all topics.
|
| |
| rui8_t | rkh_pubsub_publish (rui8_t channel, RKH_EVT_T *event, const void *const sender) |
| |
Specifies the publish-subscribe interface.
This module addresses the specific issue of how to notify a set of interested active objects (clients) in a timely way that a value that they care about has changed, especially when the notification process is to be repeated for a relatively long period of time. It does this without requiring the data server to have any a priori knowledge about its clients. The basic solution offered by PubSub module is to have the clients "subscribe" to the server to be notified about the value in question according to the policy: "when the value
changes", receiving a proper event carrying the value of interest. This means, for example, that sensor data can be easily shared to elements that may not even exist when the sensor proxies are written. Also, minimizes computational effort for notification of clients and across a communications bus and minimizes the bus bandwidth required for notification of the appropriate clients.
Definition in file rkhfwk_pubsub.h.