29 #ifndef __NVDS_MSGAPI_H__
30 #define __NVDS_MSGAPI_H__
NvDsMsgApiErrorType nvds_msgapi_send(NvDsMsgApiHandle h_ptr, char *topic, const uint8_t *payload, size_t nbuf)
Sends a message synchronously over a connection.
NvDsMsgApiErrorType
Defines completion codes for operations in the messaging API.
char * nvds_msgapi_getversion(void)
Gets the version number of the messaging API interface supported by the protocol adapter.
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 a protocol adapter.
Specifies disconnection of a connection handle.
void(* nvds_msgapi_connect_cb_t)(NvDsMsgApiHandle h_ptr, NvDsMsgApiEventType ds_evt)
Type definition for a "handle" callback.
NvDsMsgApiErrorType nvds_msgapi_subscribe(NvDsMsgApiHandle h_ptr, char **topics, int num_topics, nvds_msgapi_subscribe_request_cb_t cb, void *user_ctx)
Subscribe to a remote entity for receiving messages on a particular topic(s)
void(* nvds_msgapi_subscribe_request_cb_t)(NvDsMsgApiErrorType flag, void *msg, int msg_len, char *topic, void *user_ptr)
Type definition for callback registered during subscribe.
NvDsMsgApiErrorType nvds_msgapi_connection_signature(char *broker_str, char *cfg, char *output_str, int max_len)
Fetch the connection signature by parsing broker_connection string and cfg file.
void nvds_msgapi_do_work(NvDsMsgApiHandle h_ptr)
Calls into the adapter to allow for execution of undnerlying protocol logic.
void * NvDsMsgApiHandle
Defines the handle used by messaging API functions.
NvDsMsgApiErrorType nvds_msgapi_disconnect(NvDsMsgApiHandle h_ptr)
Terminates a connection.
void(* nvds_msgapi_send_cb_t)(void *user_ptr, NvDsMsgApiErrorType completion_flag)
Type definition for a "send" callback.
Specifies that a connection attempt was Successful.
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)
Sends message asynchronously over a connection.
NvDsMsgApiEventType
Defines events associated with connections to remote entities.
Specifies that the remote service is down.
char * nvds_msgapi_get_protocol_name(void)
Gets the name of the protocol used in the adapter.