protocol_t* proto_##proto_name##_initialize(
const char*, config_t*); \
void proto_##proto_name##_destroy(void* ctx); \
msgbus_ret_t proto_##proto_name##_publisher_new( \
void* ctx, const char* topic, void** pub_ctx); \
msgbus_ret_t proto_##proto_name##_publisher_publish( \
void proto_##proto_name##_publisher_destroy(void* ctx, void* pub_ctx); \
msgbus_ret_t proto_##proto_name##_subscriber_new( \
void* ctx, const char* topic, void** subscriber); \
void proto_##proto_name##_recv_ctx_destroy(void* ctx, void* recv_ctx); \
msgbus_ret_t proto_##proto_name##_recv_wait( \
msgbus_ret_t proto_##proto_name##_recv_timedwait( \
msgbus_ret_t proto_##proto_name##_recv_nowait( \
msgbus_ret_t proto_##proto_name##_service_get( \
void* ctx, const char* service_name, void** service_ctx); \
msgbus_ret_t proto_##proto_name##_service_new( \
void* ctx, const char* service_name, void** service_ctx); \
msgbus_ret_t proto_##proto_name##_request( \
msgbus_ret_t proto_##proto_name##_response( \
protocol_exports_t PROTO_EXPORTS = { \
.initialize=proto_##proto_name##_initialize };
Helper macro for defining a new protocol.
This macro defines the function prototypes for all of the functions needed for an EII Message Bus protocol. Additionally, it defines the PROTO_EXPORTS
global which is required to dynamically load the protocol into the EII Message Bus.