EII Message Bus C Reference
|
#include <msgbus.hpp>
Public Member Functions | |
MsgbusContext (config_t *config) | |
~MsgbusContext () | |
Publisher * | new_publisher (const std::string topic) |
Subscriber * | new_subscriber (const std::string topic, user_data_t *user_data=NULL) |
Service * | new_service (std::string service_name, void *user_data=NULL) |
ServiceRequester * | get_service (std::string service_name, void *user_data=NULL) |
EII Message Bus context object.
eii::msgbus::MsgbusContext::MsgbusContext | ( | config_t * | config | ) |
Constructor.
MsgbusException | Thrown if an error occurs in the message bus. |
config | - Messae bus configuration object |
eii::msgbus::MsgbusContext::~MsgbusContext | ( | ) |
Destructor.
ServiceRequester* eii::msgbus::MsgbusContext::get_service | ( | std::string | service_name, |
void * | user_data = NULL |
||
) |
Create a new service context for receiving requests.
MsgbusException | Thrown if an error occurs in the message bus. |
service_name | - Name of the service |
user_data | - Optional user data to attach to the service. |
Service*
Publisher* eii::msgbus::MsgbusContext::new_publisher | ( | const std::string | topic | ) |
Create a new publisher with the specified topic.
config_t
given to the MsgbusContext's
constructor.MsgbusException | Thrown if an error occurs in the message bus. |
topic | - Topic string for the publisher |
Publisher*
Service* eii::msgbus::MsgbusContext::new_service | ( | std::string | service_name, |
void * | user_data = NULL |
||
) |
Create a new service context for issuing requests to a service.
MsgbusException | Thrown if an error occurs in the message bus. |
service_name | - Name of the service |
user_data | - Optional user data to attach to the service. |
Service*
Subscriber* eii::msgbus::MsgbusContext::new_subscriber | ( | const std::string | topic, |
user_data_t * | user_data = NULL |
||
) |
Create a new subscriber on the specified topic.
config_t
given to the MsgbusContext's
constructor.MsgbusException | Thrown if an error occurs in the message bus. |
topic | - Topic string for the subscriber |
user_data | - Optional user data to attach to the subscriber. |
Subscriber*