#include #include #include "nvds_logger.h" #include "nvds_msgapi.h" #include "MQTTClient.h" using namespace std; #define NVDS_MQTT_LOG_CAT "DSLOG:NVDS_MQTT_PROTO" #define NVDS_MSGAPI_VERSION "5.0" #define NVDS_MSGAPI_PROTOCOL "MQTT" #define QOS 0 #define TIMEOUT 10000L bool is_valid_mqtt_connection_str(char* connection_str, string& burl, string& bport); bool is_valid_mqtt_connection_str(char* connection_str, string& burl, string& bport) { if (connection_str == NULL) { nvds_log(NVDS_MQTT_LOG_CAT, LOG_ERR, "mqtt connection string cant be NULL"); return false; } string str(connection_str); size_t n=0; for(int i=0;i