|
|
NVIDIA DeepStream SDK API Reference
|
9.0 Release
|
Go to the documentation of this file.
13 #include "mqtt_protocol.h"
14 #include "mosquitto.h"
17 #include <unordered_map>
28 #define MAX_FIELD_LEN 1024
32 std::string sensor_id;
33 std::string timestamp;
40 std::string timestamp;
42 #define DEFAULT_LOOP_TIMEOUT 2000
43 #define DEFAULT_KEEP_ALIVE 60
75 struct mosquitto *mosq = NULL;
85 bool subscription_on =
false;
86 std::unordered_map<int , send_msg_info_t> send_msg_info_map;
88 bool enable_tls =
false;
93 bool disconnect =
false;
94 bool set_threaded =
true;
99 void my_disconnect_callback(
struct mosquitto *mosq,
void *obj,
int rc,
const mosquitto_property *properties);
100 void my_connect_callback(
struct mosquitto *mosq,
void *obj,
int result,
int flags,
const mosquitto_property *properties);
101 void my_publish_callback(
struct mosquitto *mosq,
void *obj,
int mid,
int reason_code,
const mosquitto_property *properties);
void(* nvds_msgapi_connect_cb_t)(NvDsMsgApiHandle h_ptr, NvDsMsgApiEventType ds_evt)
Type definition for a "handle" callback.
#define DEFAULT_KEEP_ALIVE
void mosq_mqtt_log_callback(struct mosquitto *mosq, void *obj, int level, const char *str)
NvDsMsgApiErrorType
Defines completion codes for operations in the messaging API.
NvDsMsgApiErrorType nvds_mqtt_read_config(NvDsMqttClientHandle *mh, char *config_path)
void my_disconnect_callback(struct mosquitto *mosq, void *obj, int rc, const mosquitto_property *properties)
#define DEFAULT_LOOP_TIMEOUT
void my_connect_callback(struct mosquitto *mosq, void *obj, int result, int flags, const mosquitto_property *properties)
std::string create_enhanced_payload(const uint8_t *payload, size_t nbuf)
ExtractedData extract_data_from_payload(const uint8_t *payload, size_t nbuf)
void(* nvds_msgapi_send_cb_t)(void *user_ptr, NvDsMsgApiErrorType completion_flag)
Type definition for a "send" callback.
bool is_valid_mqtt_connection_str(char *connection_str, std::string &burl, std::string &bport)
std::string create_protobuf_wrapper(const uint8_t *payload, size_t nbuf)
void my_publish_callback(struct mosquitto *mosq, void *obj, int mid, int reason_code, const mosquitto_property *properties)
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.
std::string serialize_protobuf_wrapper(const ProtobufWrapper &wrapper)