#ifndef GLOBALINFO_H #define GLOBALINFO_H #include #include #include "nlohmann/json.hpp" /** * @brief 全局信息 * */ using nJson = nlohmann::json; /* 算法相关信息 */ struct AlgorithmInfo { std::string ActionID; /* 算法ID */ std::string ActionName; /* 算法名称 */ int ActionTaskID; /* 算法任务ID */ AlgorithmInfo() = default; AlgorithmInfo(const AlgorithmInfo& other) : ActionID(other.ActionID), ActionName(other.ActionName), ActionTaskID(other.ActionTaskID) {} AlgorithmInfo& operator=(const AlgorithmInfo& other) { if (this != &other) { ActionID = other.ActionID; ActionName = other.ActionName; ActionTaskID = other.ActionTaskID; } return *this; } }; /* 设备列表 */ struct DeviceInfo { int PKID; /* 主键ID */ int DeviceID; /* 设备ID */ int DevicePort; /* 设备端口 */ std::string DeviceName; /* 设备名称 */ std::string DeviceSerial; /* 设备序列号 */ std::string DeviceType; /* 设备类型 */ std::string UserAccount; /* 用户账号 */ std::string UserPassword; /* 用户密码 */ std::vector vecAlgorithmInfo; /* 算法信息 */ }; #endif /* GLOBALINFO_H */