Define.h 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  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. std::string Settings;
  56. };
  57. struct DataManagerInfo{
  58. int Id;
  59. std::string Name; // 名称
  60. std::string Type; // 类型
  61. std::string Code; // 标识码
  62. std::string Model; // 型号,通信组件的Code属性
  63. int ServerId; //
  64. std::string Description; // 描述
  65. std::list<ModuleInfo> modules;
  66. std::list<ConsumerInfo>consumers;
  67. };
  68. /*struct Config
  69. {
  70. int serverId;
  71. std::string appName;
  72. };*/