UIClient.BasicMoulds.hpp 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258
  1. #pragma once
  2. #include <string>
  3. #include <algorithm>
  4. using namespace std;
  5. //
  6. //#include "TmplMould.tlh"
  7. //#include "TmplMould.tli"
  8. #include "DIOS.Dev.MouldDefine.hpp"
  9. #pragma warning (disable:4244) // warning C4244: “初始化”: 从“double”转换到“float”,可能丢失数据
  10. namespace DIOS::Dev::Detail
  11. {
  12. namespace UIClient
  13. {
  14. static const char* DeviceDriverType = "{18FDF176-DECE-445F-A52C-A14BDD3AC2C1}";
  15. static const char* DAPUnitType = "{123492D6-A546-4ACF-8EF1-2CCAA9EA974E}";
  16. namespace AttrKey
  17. {
  18. static const char* ERA = "ERA";//总错误数
  19. static const char* RSI = "RSI";//查询系统状态信息
  20. static const char* RMV = "RMV";//查询模块版本信息
  21. static const char* CFM = "CFM";//查询配置文件操作
  22. static const char* BRM = "BRM";//BackupRestore
  23. static const char* PLS = "PLS";//PMS登录状态
  24. static const char* UDO = "UDO";//Undo功能操作
  25. static const char* SHS = "SHS";//切换到服务模式
  26. static const char* STM = "STM";//当前工作模式,目前无用
  27. static const char* SDF = "SDF";//当前界面切换
  28. static const char* SOP = "SOP";//当前选中的view名
  29. static const char* SCREENLOCK = "SCREENLOCK";//当前发生器锁屏状态 1锁屏,0解锁
  30. static const char* SDN = "SDN";//关机
  31. }
  32. namespace ActionKey
  33. {
  34. //模拟测试热容量
  35. static const char* SetHET = "SetHET";
  36. //设置检查名称是否正确
  37. static const char* SetSHO = "SetSHO";
  38. //设置软件状态
  39. static const char* SetSTA = "SetSTA";
  40. //设置当前view名称到TUI
  41. static const char* SetPIM = "SetPIM";
  42. //设置系统信息
  43. static const char* SetSSI = "SetSSI";
  44. //设置组件版本信息
  45. static const char* SetSMV = "SetSMV";
  46. //设置处理配置文件结果
  47. static const char* SetCFM = "SetCFM";
  48. //设置backup结果
  49. static const char* SetBRM = "SetBRM";
  50. //检查最后错误数目
  51. static const char* SetERA = "SetERA";
  52. }
  53. class ERAMould :public IntMould
  54. {
  55. using super = IntMould;
  56. public:
  57. ERAMould( int initialvalue, int lower, int upper, int accuracy)
  58. :super( AttrKey::ERA, initialvalue, lower, upper, accuracy)
  59. {}
  60. ~ERAMould() {}
  61. };
  62. class RSIMould :public IntMould
  63. {
  64. using super = IntMould;
  65. public:
  66. RSIMould( int initialvalue, int lower, int upper, int accuracy)
  67. :super( AttrKey::RSI, initialvalue, lower, upper, accuracy)
  68. {}
  69. ~RSIMould() {}
  70. };
  71. class RMVMould :public IntMould
  72. {
  73. using super = IntMould;
  74. public:
  75. RMVMould(int initialvalue, int lower, int upper, int accuracy)
  76. :super(AttrKey::RMV, initialvalue, lower, upper, accuracy)
  77. {}
  78. ~RMVMould() {}
  79. };
  80. class CFMMould :public IntMould
  81. {
  82. using super = IntMould;
  83. public:
  84. CFMMould(int initialvalue, int lower, int upper, int accuracy)
  85. :super(AttrKey::CFM, initialvalue, lower, upper, accuracy)
  86. {}
  87. ~CFMMould() {}
  88. };
  89. class BRMMould :public IntMould
  90. {
  91. using super = IntMould;
  92. public:
  93. BRMMould(int initialvalue, int lower, int upper, int accuracy)
  94. :super(AttrKey::BRM, initialvalue, lower, upper, accuracy)
  95. {}
  96. ~BRMMould() {}
  97. };
  98. class PLSMould :public IntMould
  99. {
  100. using super = IntMould;
  101. public:
  102. PLSMould(int initialvalue, int lower, int upper, int accuracy)
  103. :super(AttrKey::PLS, initialvalue, lower, upper, accuracy)
  104. {}
  105. ~PLSMould() {}
  106. };
  107. class UDOMould :public IntMould
  108. {
  109. using super = IntMould;
  110. public:
  111. UDOMould(int initialvalue, int lower, int upper, int accuracy)
  112. :super(AttrKey::UDO, initialvalue, lower, upper, accuracy)
  113. {}
  114. ~UDOMould() {}
  115. };
  116. class SHSMould :public IntMould
  117. {
  118. using super = IntMould;
  119. public:
  120. SHSMould(int initialvalue, int lower, int upper, int accuracy)
  121. :super(AttrKey::SHS, initialvalue, lower, upper, accuracy)
  122. {}
  123. ~SHSMould() {}
  124. };
  125. class STMMould :public IntMould
  126. {
  127. using super = IntMould;
  128. public:
  129. STMMould(int initialvalue, int lower, int upper, int accuracy)
  130. :super(AttrKey::STM, initialvalue, lower, upper, accuracy)
  131. {}
  132. ~STMMould() {}
  133. };
  134. class SDFMould :public IntMould
  135. {
  136. using super = IntMould;
  137. public:
  138. SDFMould(int initialvalue, int lower, int upper, int accuracy)
  139. :super(AttrKey::SDF, initialvalue, lower, upper, accuracy)
  140. {}
  141. ~SDFMould() {}
  142. };
  143. class SCREENLOCKMould :public IntMould
  144. {
  145. using super = IntMould;
  146. public:
  147. SCREENLOCKMould(int initialvalue, int lower, int upper, int accuracy)
  148. :super(AttrKey::SCREENLOCK, initialvalue, lower, upper, accuracy)
  149. {}
  150. ~SCREENLOCKMould() {}
  151. };
  152. class SOPMould :public StringMould
  153. {
  154. using super = StringMould;
  155. public:
  156. SOPMould(std::string initialvalue)
  157. :super(AttrKey::SOP, initialvalue)
  158. {
  159. }
  160. ~SOPMould()
  161. {
  162. }
  163. };
  164. class SDNMould :public StringMould
  165. {
  166. using super = StringMould;
  167. public:
  168. SDNMould(std::string initialvalue)
  169. :super(AttrKey::SDN, initialvalue)
  170. {
  171. }
  172. ~SDNMould()
  173. {
  174. }
  175. };
  176. //class SOPMould :public StringMould
  177. //{
  178. //public:
  179. // SOPMould(std::string initialvalue)
  180. // {
  181. // Key = AttrKey::SOP;
  182. // m_Value = initialvalue;
  183. // }
  184. // ~SOPMould() {}
  185. // std::string GetDescription()
  186. // {
  187. // ResDataObject result;
  188. // result.add(Key.c_str(), "");
  189. // return result.encode();
  190. // }
  191. // std::string GetAttribute()
  192. // {
  193. // ResDataObject temp;
  194. // temp.add(Key.c_str(), m_Value.c_str());
  195. // return temp.encode();
  196. // }
  197. // //
  198. // std::string JSGet()
  199. // {
  200. // return m_Value;
  201. // }
  202. // std::string GetKey()
  203. // {
  204. // return Key;
  205. // }
  206. //protected:
  207. // std::string Key;
  208. // std::string m_Value;
  209. //};
  210. //class SDNMould :public StringMould
  211. //{
  212. //public:
  213. // SDNMould(std::string initialvalue)
  214. // {
  215. // Key = AttrKey::SDN;
  216. // m_Value = initialvalue;
  217. // }
  218. // ~SDNMould() {}
  219. // std::string GetDescription()
  220. // {
  221. // ResDataObject result;
  222. // result.add(Key.c_str(), "");
  223. // return result.encode();
  224. // }
  225. // std::string GetAttribute()
  226. // {
  227. // ResDataObject temp;
  228. // temp.add(Key.c_str(), m_Value.c_str());
  229. // return temp.encode();
  230. // }
  231. // //
  232. // std::string JSGet()
  233. // {
  234. // return m_Value;
  235. // }
  236. // std::string GetKey()
  237. // {
  238. // return Key;
  239. // }
  240. //protected:
  241. // std::string Key;
  242. // std::string m_Value;
  243. //};
  244. }
  245. }