NVIDIA DeepStream SDK API Reference

6.4 Release
nvmsgbroker.h File Reference

Go to the source code of this file.

Data Structures

struct  NvMsgBrokerClientMsg
 

Macros

#define NV_MSGBROKER_VERSION   "2.0"
 
#define LOG_CAT   "DSLOG:NV_MSGBROKER"
 

Typedefs

typedef void * NvMsgBrokerClientHandle
 
typedef void(* nv_msgbroker_connect_cb_t) (NvMsgBrokerClientHandle h_ptr, NvMsgBrokerErrorType status)
 Connect callback method registered during connect. More...
 
typedef void(* nv_msgbroker_send_cb_t) (void *user_ptr, NvMsgBrokerErrorType status)
 Send callback method registered during send_async. More...
 
typedef void(* nv_msgbroker_subscribe_cb_t) (NvMsgBrokerErrorType status, void *msg, int msglen, char *topic, void *user_ptr)
 subscribe callback method registered during subscribe More...
 

Enumerations

enum  NvMsgBrokerErrorType {
  NV_MSGBROKER_API_OK,
  NV_MSGBROKER_API_ERR,
  NV_MSGBROKER_API_RECONNECTING,
  NV_MSGBROKER_API_NOT_SUPPORTED
}
 

Functions

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)
 

Macro Definition Documentation

◆ LOG_CAT

#define LOG_CAT   "DSLOG:NV_MSGBROKER"

Definition at line 27 of file nvmsgbroker.h.

◆ NV_MSGBROKER_VERSION

#define NV_MSGBROKER_VERSION   "2.0"

Definition at line 26 of file nvmsgbroker.h.

Typedef Documentation

◆ nv_msgbroker_connect_cb_t

typedef void(* nv_msgbroker_connect_cb_t) (NvMsgBrokerClientHandle h_ptr, NvMsgBrokerErrorType status)

Connect callback method registered during connect.

Parameters
[in]h_ptrMsgbroker Connection handle
[in]statusConnection status

Definition at line 59 of file nvmsgbroker.h.

◆ nv_msgbroker_send_cb_t

typedef void(* nv_msgbroker_send_cb_t) (void *user_ptr, NvMsgBrokerErrorType status)

Send callback method registered during send_async.

Parameters
[in]user_ptrPointer passed during send_async for context
[in]statusCompletion status of send operation

Definition at line 65 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]statusCompletion status of send operation
[in]msgConsumer Message. Should be copied before function return
[in]msglenLength of message consumed
[in]topicSubscribed Topic where message is received
[in]user_ptrPointer passed during send_async for context

Definition at line 75 of file nvmsgbroker.h.

◆ NvMsgBrokerClientHandle

typedef void* NvMsgBrokerClientHandle

Definition at line 51 of file nvmsgbroker.h.

Enumeration Type Documentation

◆ NvMsgBrokerErrorType

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.

Function Documentation

◆ nv_msgbroker_connect()

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.

Parameters
[in]broker_conn_strA connection string (optional) with format
[in]broker_proto_libFull Path to Message protocol adapter library
[in]connect_cbA pointer to a callback function for events associated with the connection.
[in]cfgPathname of a configuration file passed to be passed to the message protocol adapter
Returns
A connection handle.

◆ nv_msgbroker_disconnect()

NvMsgBrokerErrorType nv_msgbroker_disconnect ( NvMsgBrokerClientHandle  h_ptr)

◆ nv_msgbroker_send_async()

NvMsgBrokerErrorType nv_msgbroker_send_async ( NvMsgBrokerClientHandle  h_ptr,
NvMsgBrokerClientMsg  message,
nv_msgbroker_send_cb_t  cb,
void *  user_ctx 
)

◆ nv_msgbroker_subscribe()

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)

Parameters
[in]h_ptrConnection handle
[in]topicspointer to array of topics (cannot be NULL)
[in]num_topicsnumber of topics
[in]cbA pointer to a callback function to forward consumed message
[in]user_ctxuser ptr to be passed to callback for context
Returns
Completion status of send operation

◆ nv_msgbroker_version()

char* nv_msgbroker_version ( void  )