Define.h 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. #pragma once
  2. #include <string>
  3. #include <list>
  4. enum ModuleType
  5. {
  6. Sensor=1,
  7. Actor=2,
  8. Purifier=3,
  9. Calculator=4,
  10. Storage=5,
  11. Transfer=6,
  12. };
  13. struct DataItem
  14. {
  15. int Id;
  16. std::string DataName;
  17. std::string Code;
  18. std::string DataType;
  19. bool Displayed;
  20. std::string Description;
  21. std::string ToString()
  22. {
  23. return Code + DataName;
  24. }
  25. };
  26. struct ModuleInfo
  27. {
  28. int Id;
  29. ModuleType Type; // 类型
  30. std::string Name; // 名称
  31. std::string Code; // 标识码
  32. std::string Model; // 型号
  33. std::string AssemblyName; // 组件程序(dll、jar)名字,含路径
  34. std::string ClassName; // 组件的 类名
  35. std::string Description; // 描述
  36. std::string Version; // 版本
  37. };
  38. struct DeviceInfo
  39. {
  40. int Id;
  41. std::string Name; // 名称
  42. std::string Type; // 类型
  43. std::string Code; // 标识码
  44. std::string Model; // 型号,通信组件的Code属性
  45. int ServerId; //
  46. ModuleInfo ModuleInfo; //
  47. std::string Description; // 描述
  48. std::list<DataItem> Properties;
  49. };
  50. struct ConsumerInfo{
  51. std::string name;
  52. std::string AssemblyName; // 组件程序(dll、jar)名字,含路径
  53. std::string ClassName; // 组件的 类名
  54. std::string SubscribeName;
  55. };
  56. struct DataManagerInfo{
  57. int Id;
  58. std::string Name; // 名称
  59. std::string Type; // 类型
  60. std::string Code; // 标识码
  61. std::string Model; // 型号,通信组件的Code属性
  62. int ServerId; //
  63. std::string Description; // 描述
  64. std::list<ModuleInfo> modules;
  65. std::list<ConsumerInfo>consumers;
  66. };
  67. /*struct Config
  68. {
  69. int serverId;
  70. std::string appName;
  71. };*/