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) |
| |
◆ LOG_CAT
| #define LOG_CAT "DSLOG:NV_MSGBROKER" |
◆ NV_MSGBROKER_VERSION
| #define NV_MSGBROKER_VERSION "2.0" |
◆ nv_msgbroker_connect_cb_t
Connect callback method registered during connect.
- Parameters
-
| [in] | h_ptr | Msgbroker Connection handle |
| [in] | status | Connection status |
Definition at line 62 of file nvmsgbroker.h.
◆ nv_msgbroker_send_cb_t
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 68 of file nvmsgbroker.h.
◆ nv_msgbroker_subscribe_cb_t
| 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 78 of file nvmsgbroker.h.
◆ NvMsgBrokerClientHandle
◆ NvMsgBrokerErrorType
| Enumerator |
|---|
| NV_MSGBROKER_API_OK | |
| NV_MSGBROKER_API_ERR | |
| NV_MSGBROKER_API_RECONNECTING | |
| NV_MSGBROKER_API_NOT_SUPPORTED | |
Definition at line 34 of file nvmsgbroker.h.
◆ nv_msgbroker_connect()
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.
◆ nv_msgbroker_disconnect()
◆ nv_msgbroker_send_async()
◆ nv_msgbroker_subscribe()
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
◆ nv_msgbroker_version()
| char* nv_msgbroker_version |
( |
void |
| ) |
|