调试预制舱通讯协议修改数据解析

This commit is contained in:
lixiaoyuan
2025-09-18 20:12:46 +08:00
parent cec5cdc19a
commit 2ba4ab2781
28 changed files with 363415 additions and 662 deletions

View File

@@ -1,27 +1,23 @@
#pragma once
#include <map>
#include <string>
struct DatabaseOption
{
std::string host;
int port;
std::string user;
std::string passwd;
std::string dbname;
};
struct AppOption
{
int debug {0};
std::string webSrvUrl;
std::string lunchDate;
DatabaseOption database;
struct {
std::string host;
int port;
std::string user;
std::string passwd;
std::string dbname;
} database;
struct {
int useToken {1};
bool useToken {true};
int port {0};
int encryption {1};
std::string encryptKey;
} http;
struct {
@@ -30,20 +26,8 @@ struct AppOption
std::string password;
} mqtt;
struct {
float latitude {0};
float longitude {0};
float altitude {0};
} view;
struct VideoInfo {
std::string host;
int port;
std::string user;
std::string passwd;
};
std::map<std::string, VideoInfo> mapVideo;
std::string webSrvUrl;
std::string lunchDate;
};
@@ -52,7 +36,6 @@ class Config
public:
static bool init(std::string filename);
static AppOption::VideoInfo* getVideoInfo(std::string name);
static AppOption option;
};