NVIDIA DeepStream SDK API Reference

4.0.2 Release

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
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 
18 #ifndef __NVDS_MSGAPI_H__
19 #define __NVDS_MSGAPI_H__
20 
21 #ifdef __cplusplus
22 extern "C"
23 {
24 #endif
25 #include <stdint.h>
26 
30 typedef void *NvDsMsgApiHandle;
31 
35 typedef enum {
41 
45 typedef enum {
50 
57 typedef void (*nvds_msgapi_send_cb_t)(void *user_ptr, NvDsMsgApiErrorType completion_flag);
58 
66 typedef void (*nvds_msgapi_connect_cb_t)(NvDsMsgApiHandle h_ptr, NvDsMsgApiEventType ds_evt);
67 
80 NvDsMsgApiHandle nvds_msgapi_connect(char *connection_str, nvds_msgapi_connect_cb_t connect_cb, char *config_path);
81 
92 NvDsMsgApiErrorType nvds_msgapi_send(NvDsMsgApiHandle h_ptr, char *topic, const uint8_t *payload, size_t nbuf);
93 
106 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);
107 
118 void nvds_msgapi_do_work(NvDsMsgApiHandle h_ptr);
119 
127 NvDsMsgApiErrorType nvds_msgapi_disconnect(NvDsMsgApiHandle h_ptr);
128 
135 char *nvds_msgapi_getversion(void);
136 
137 #ifdef __cplusplus
138 }
139 #endif
140 
141 #endif
142 
void nvds_msgapi_do_work(NvDsMsgApiHandle h_ptr)
Calls into the adapter to allow for execution of undnerlying protocol logic.
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.
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.
void * NvDsMsgApiHandle
Defines the handle to be used with all methods in the NvDS_MsgApi interface.
Definition: nvds_msgapi.h:30
NvDsMsgApiErrorType nvds_msgapi_disconnect(NvDsMsgApiHandle h_ptr)
Terminates existing connection.
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:66
char * nvds_msgapi_getversion(void)
Current version of NvDS_MsgApi interface supported by protocol adapter.
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.
remote service is down
Definition: nvds_msgapi.h:39
disconnection of connection handle
Definition: nvds_msgapi.h:37
NvDsMsgApiEventType
Defines various events associated with connections to remote entities.
Definition: nvds_msgapi.h:35
NvDsMsgApiErrorType
Defines completion status for operations in the NvDS_MsgApi interface.
Definition: nvds_msgapi.h:45
void(* nvds_msgapi_send_cb_t)(void *user_ptr, NvDsMsgApiErrorType completion_flag)
Type definition for send method callback.
Definition: nvds_msgapi.h:57