Go to the source code of this file.
|
NvMsgBrokerClientHandle | nv_msgbroker_connect (char *broker_conn_str, char *broker_proto_lib, nv_msgbroker_connect_cb_t connect_cb, char *cfg) |
| Connect to a remote entity by calling into msgbroker library. More...
|
|
NvMsgBrokerErrorType | nv_msgbroker_send_async (NvMsgBrokerClientHandle h_ptr, NvMsgBrokerClientMsg message, nv_msgbroker_send_cb_t cb, void *user_ctx) |
|
NvMsgBrokerErrorType | nv_msgbroker_subscribe (NvMsgBrokerClientHandle h_ptr, char **topics, int num_topics, nv_msgbroker_subscribe_cb_t cb, void *user_ctx) |
| Subscribe to a remote entity for receiving messages on particular topic(s) More...
|
|
NvMsgBrokerErrorType | nv_msgbroker_disconnect (NvMsgBrokerClientHandle h_ptr) |
|
char * | nv_msgbroker_version (void) |
|
#define LOG_CAT "DSLOG:NV_MSGBROKER" |
#define NV_MSGBROKER_VERSION "2.0" |
Connect callback method registered during connect.
- Parameters
-
[in] | h_ptr | Msgbroker Connection handle |
[in] | status | Connection status |
Definition at line 59 of file nvmsgbroker.h.
Send callback method registered during send_async.
- Parameters
-
[in] | user_ptr | Pointer passed during send_async for context |
[in] | status | Completion status of send operation |
Definition at line 65 of file nvmsgbroker.h.
typedef void(* nv_msgbroker_subscribe_cb_t)(NvMsgBrokerErrorType status, void *msg, int msglen, char *topic, void *user_ptr) |
subscribe callback method registered during subscribe
- Parameters
-
[in] | status | Completion status of send operation |
[in] | msg | Consumer Message. Should be copied before function return |
[in] | msglen | Length of message consumed |
[in] | topic | Subscribed Topic where message is received |
[in] | user_ptr | Pointer passed during send_async for context |
Definition at line 75 of file nvmsgbroker.h.
Enumerator |
---|
NV_MSGBROKER_API_OK |
|
NV_MSGBROKER_API_ERR |
|
NV_MSGBROKER_API_RECONNECTING |
|
NV_MSGBROKER_API_NOT_SUPPORTED |
|
Definition at line 31 of file nvmsgbroker.h.
Connect to a remote entity by calling into msgbroker library.
- Parameters
-
[in] | broker_conn_str | A connection string (optional) with format |
[in] | broker_proto_lib | Full Path to Message protocol adapter library |
[in] | connect_cb | A pointer to a callback function for events associated with the connection. |
[in] | cfg | Pathname of a configuration file passed to be passed to the message protocol adapter |
- Returns
- A connection handle.
Subscribe to a remote entity for receiving messages on particular topic(s)
- Parameters
-
[in] | h_ptr | Connection handle |
[in] | topics | pointer to array of topics (cannot be NULL) |
[in] | num_topics | number of topics |
[in] | cb | A pointer to a callback function to forward consumed message |
[in] | user_ctx | user ptr to be passed to callback for context |
- Returns
- Completion status of send operation
char* nv_msgbroker_version |
( |
void |
| ) |
|