NVIDIA DeepStream SDK API Reference

4.0.1 Release

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Groups
nvds_msgapi.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2018-2019 NVIDIA Corporation. All rights reserved.
3  *
4  * NVIDIA Corporation and its licensors retain all intellectual property
5  * and proprietary rights in and to this software, related documentation
6  * and any modifications thereto. Any use, reproduction, disclosure or
7  * distribution of this software and related documentation without an express
8  * license agreement from NVIDIA Corporation is strictly prohibited.
9  *
10  */
11 /*
12  * This file defines the NvDS_MsgApi interface.
13  * The interfaces is used by DeepStream applications to send and receive
14  * messages from remote entities and services to deliver events, allow
15  * configuration of settings etc.
16  */
17 
34 #ifndef __NVDS_MSGAPI_H__
35 #define __NVDS_MSGAPI_H__
36 
37 #ifdef __cplusplus
38 extern "C"
39 {
40 #endif
41 #include <stdint.h>
42 
46 typedef void *NvDsMsgApiHandle;
47 
51 typedef enum {
57 
61 typedef enum {
66 
73 typedef void (*nvds_msgapi_send_cb_t)(void *user_ptr, NvDsMsgApiErrorType completion_flag);
74 
82 typedef void (*nvds_msgapi_connect_cb_t)(NvDsMsgApiHandle h_ptr, NvDsMsgApiEventType ds_evt);
83 
96 NvDsMsgApiHandle nvds_msgapi_connect(char *connection_str, nvds_msgapi_connect_cb_t connect_cb, char *config_path);
97 
108 NvDsMsgApiErrorType nvds_msgapi_send(NvDsMsgApiHandle h_ptr, char *topic, const uint8_t *payload, size_t nbuf);
109 
122 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);
123 
134 void nvds_msgapi_do_work(NvDsMsgApiHandle h_ptr);
135 
143 NvDsMsgApiErrorType nvds_msgapi_disconnect(NvDsMsgApiHandle h_ptr);
144 
151 char *nvds_msgapi_getversion(void);
152 
153 #ifdef __cplusplus
154 }
155 #endif
156 
157 #endif
158 
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.
NvDsMsgApiErrorType
Defines completion status for operations in the NvDS_MsgApi interface.
Definition: nvds_msgapi.h:61
char * nvds_msgapi_getversion(void)
Current version of NvDS_MsgApi interface supported by 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 protocol adapter.
disconnection of connection handle
Definition: nvds_msgapi.h:53
void(* nvds_msgapi_connect_cb_t)(NvDsMsgApiHandle h_ptr, NvDsMsgApiEventType ds_evt)
Type definition for handle method callback registered during connect.
Definition: nvds_msgapi.h:82
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 to be used with all methods in the NvDS_MsgApi interface.
Definition: nvds_msgapi.h:46
NvDsMsgApiErrorType nvds_msgapi_disconnect(NvDsMsgApiHandle h_ptr)
Terminates existing connection.
void(* nvds_msgapi_send_cb_t)(void *user_ptr, NvDsMsgApiErrorType completion_flag)
Type definition for send method callback.
Definition: nvds_msgapi.h:73
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.
NvDsMsgApiEventType
Defines various events associated with connections to remote entities.
Definition: nvds_msgapi.h:51
remote service is down
Definition: nvds_msgapi.h:55