![]() |
NVIDIA DeepStream SDK API Reference4.0.2 Release |
Go to the source code of this file.
Typedefs | |
typedef void * | NvDsMsgApiHandle |
Defines the handle to be used with all methods in the NvDS_MsgApi interface. More... | |
typedef void(* | nvds_msgapi_send_cb_t )(void *user_ptr, NvDsMsgApiErrorType completion_flag) |
Type definition for send method callback. More... | |
typedef void(* | nvds_msgapi_connect_cb_t )(NvDsMsgApiHandle h_ptr, NvDsMsgApiEventType ds_evt) |
Type definition for handle method callback registered during connect. More... | |
Enumerations | |
enum | NvDsMsgApiEventType { NVDS_MSGAPI_EVT_DISCONNECT, NVDS_MSGAPI_EVT_SERVICE_DOWN } |
Defines various events associated with connections to remote entities. More... | |
enum | NvDsMsgApiErrorType { NVDS_MSGAPI_OK, NVDS_MSGAPI_ERR, NVDS_MSGAPI_UNKNOWN_TOPIC } |
Defines completion status for operations in the NvDS_MsgApi interface. More... | |
Functions | |
NvDsMsgApiHandle | nvds_msgapi_connect (char *connection_str, nvds_msgapi_connect_cb_t connect_cb, char *config_path) |
Connects to a remote agent by calling into protocol adapter. More... | |
NvDsMsgApiErrorType | nvds_msgapi_send (NvDsMsgApiHandle h_ptr, char *topic, const uint8_t *payload, size_t nbuf) |
Send message over connection synchronously based on blocking semantics. More... | |
NvDsMsgApiErrorType | nvds_msgapi_send_async (NvDsMsgApiHandle h_ptr, char *topic, const uint8_t *payload, size_t nbuf, nvds_msgapi_send_cb_t send_callback, void *user_ptr) |
Send message over connection asynchronously based on non-blocking semantics. More... | |
void | nvds_msgapi_do_work (NvDsMsgApiHandle h_ptr) |
Calls into the adapter to allow for execution of undnerlying protocol logic. More... | |
NvDsMsgApiErrorType | nvds_msgapi_disconnect (NvDsMsgApiHandle h_ptr) |
Terminates existing connection. More... | |
char * | nvds_msgapi_getversion (void) |
Current version of NvDS_MsgApi interface supported by protocol adapter. More... | |
typedef void(* nvds_msgapi_connect_cb_t)(NvDsMsgApiHandle h_ptr, NvDsMsgApiEventType ds_evt) |
Type definition for handle method callback registered during connect.
using which events corresponding to connection are delivered
[in] | h_ptr | Handle corresponding to event |
[in] | ds_evt | Event type based on enum |
Definition at line 66 of file nvds_msgapi.h.
typedef void(* nvds_msgapi_send_cb_t)(void *user_ptr, NvDsMsgApiErrorType completion_flag) |
Type definition for send method callback.
[in] | user_ptr | Pointer passed during async_send for context |
[in] | completion_flag | Completion status of send operation. |
Definition at line 57 of file nvds_msgapi.h.
typedef void* NvDsMsgApiHandle |
Defines the handle to be used with all methods in the NvDS_MsgApi interface.
Definition at line 30 of file nvds_msgapi.h.
enum NvDsMsgApiErrorType |
Defines completion status for operations in the NvDS_MsgApi interface.
Enumerator | |
---|---|
NVDS_MSGAPI_OK | |
NVDS_MSGAPI_ERR | |
NVDS_MSGAPI_UNKNOWN_TOPIC |
Definition at line 45 of file nvds_msgapi.h.
enum NvDsMsgApiEventType |
Defines various events associated with connections to remote entities.
Enumerator | |
---|---|
NVDS_MSGAPI_EVT_DISCONNECT |
disconnection of connection handle |
NVDS_MSGAPI_EVT_SERVICE_DOWN |
remote service is down |
Definition at line 35 of file nvds_msgapi.h.
NvDsMsgApiHandle nvds_msgapi_connect | ( | char * | connection_str, |
nvds_msgapi_connect_cb_t | connect_cb, | ||
char * | config_path | ||
) |
Connects to a remote agent by calling into protocol adapter.
[in] | connection_str | A connection string with format "url;port;topic" . |
[in] | connect_cb | A pointer to a callback function for events associated with the connection. |
[in] | config_path | Pathname of a configuration file passed to the protocol adapter. |
NvDsMsgApiErrorType nvds_msgapi_disconnect | ( | NvDsMsgApiHandle | h_ptr | ) |
Terminates existing connection.
[in] | h_ptr | connection handle |
void nvds_msgapi_do_work | ( | NvDsMsgApiHandle | h_ptr | ) |
Calls into the adapter to allow for execution of undnerlying protocol logic.
As part of this routine, adapter should service outstanding incoming and outgoing. It can also perform periodic housekeeping tasks such s sending heartbeats. The method makes client control when the protocol logic gets executed. It should be called periodically by the client, as required by the adapter.
[in] | h_ptr | connection handle |
char* nvds_msgapi_getversion | ( | void | ) |
Current version of NvDS_MsgApi interface supported by protocol adapter.
NvDsMsgApiErrorType nvds_msgapi_send | ( | NvDsMsgApiHandle | h_ptr, |
char * | topic, | ||
const uint8_t * | payload, | ||
size_t | nbuf | ||
) |
Send message over connection synchronously based on blocking semantics.
[in] | h_ptr | connection handle |
[in] | topic | topic to which send message |
[in] | payload | message data |
[in] | nbuf | number of bytes of data to send |
NvDsMsgApiErrorType nvds_msgapi_send_async | ( | NvDsMsgApiHandle | h_ptr, |
char * | topic, | ||
const uint8_t * | payload, | ||
size_t | nbuf, | ||
nvds_msgapi_send_cb_t | send_callback, | ||
void * | user_ptr | ||
) |
Send message over connection asynchronously based on non-blocking semantics.
[in] | h_ptr | connection handle |
[in] | topic | topic to which send message |
[in] | payload | message data |
[in] | nbuf | number of bytes of data to send |
[in] | send_callback | callback to be invoked when operation complets |
[in] | user_ptr | pointer to pass to callback for context |