GlobalInfo.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. #ifndef GLOBALINFO_H
  2. #define GLOBALINFO_H
  3. #include <QString>
  4. #include <vector>
  5. #include "nlohmann/json.hpp"
  6. /**
  7. * @brief 全局信息
  8. *
  9. */
  10. using nJson = nlohmann::json;
  11. /* 算法相关信息 */
  12. struct AlgorithmInfo
  13. {
  14. std::string ActionID; /* 算法ID */
  15. std::string ActionName; /* 算法名称 */
  16. int ActionTaskID; /* 算法任务ID */
  17. AlgorithmInfo() = default;
  18. AlgorithmInfo(const AlgorithmInfo& other)
  19. : ActionID(other.ActionID), ActionName(other.ActionName), ActionTaskID(other.ActionTaskID) {}
  20. AlgorithmInfo& operator=(const AlgorithmInfo& other) {
  21. if (this != &other) {
  22. ActionID = other.ActionID;
  23. ActionName = other.ActionName;
  24. ActionTaskID = other.ActionTaskID;
  25. }
  26. return *this;
  27. }
  28. };
  29. /* 设备列表 */
  30. struct DeviceInfo
  31. {
  32. int PKID; /* 主键ID */
  33. int DeviceID; /* 设备ID */
  34. int DevicePort; /* 设备端口 */
  35. std::string DeviceName; /* 设备名称 */
  36. std::string DeviceSerial; /* 设备序列号 */
  37. std::string DeviceType; /* 设备类型 */
  38. std::string UserAccount; /* 用户账号 */
  39. std::string UserPassword; /* 用户密码 */
  40. std::vector<AlgorithmInfo> vecAlgorithmInfo; /* 算法信息 */
  41. };
  42. #endif /* GLOBALINFO_H */