Generator.BasicMoulds.hpp 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655
  1. #pragma once
  2. #include <string>
  3. #include <algorithm>
  4. using namespace std;
  5. #include "DIOS.Dev.MouldDefine.hpp"
  6. #pragma warning (disable:4244) // warning C4244: “初始化”: 从“double”转换到“float”,可能丢失数据
  7. namespace DIOS::Dev::Detail
  8. {
  9. namespace Generator
  10. {
  11. static const char* GeneratorDriverType = "{18FDF176-DECE-445F-A52C-A14BDD3AC2C1}";
  12. static const char* GeneratorUnitType = "{123492D6-A546-4ACF-8EF1-2CCAA9EA974E}";
  13. namespace AttrKey
  14. {
  15. //设备
  16. static const char* SupportSyncMode = "SupportSyncMode"; //同步模式对应关系只存在于模型中,理论上不需要发生器存储或修改,可以不定义相应变量及Get、Set接口
  17. static const char* TUBEINFO = "TubeInfo"; //球管信息
  18. static const char* TUBETARGETMATERIAL = "TubeTargetMaterial"; //球管靶材
  19. namespace TUBETARGETMATERIAL_TYPE {
  20. static const char* MO = "MO";
  21. static const char* RH = "RH";
  22. }
  23. static const char* TUBEANGLE = "TubeAngle"; //球馆角度
  24. static const char* TUBEHEAT = "TUBEHEAT"; //球管热容
  25. static const char* DENHEAT = "GENHEAT"; //发生器温度
  26. static const char* BATTERYCHARGESTATE = "BatteryChargeState"; //电池充电状态
  27. enum CHARGE_SYNC {
  28. CHARGE_STATUS_OFF,
  29. CHARGE_STATUS_CHARGING,
  30. CHARGE_STATUS_FINISH,
  31. CHARGE_STATUS_MAX
  32. };
  33. static const char* BATTERYPOWERSTATE = "BatteryPowerState"; //电池电量状态
  34. static const char* GENSYNSTATE = "GENERATORSYNCSTATE"; //发生器曝光流程状态
  35. enum GENERATOR_SYNC {
  36. GENERATOR_SYNC_ERR = -1,
  37. GENERATOR_RAD_OFF,
  38. GENERATOR_RAD_PREPARE,
  39. GENERATOR_RAD_READY,
  40. GENERATOR_RAD_XRAYON,
  41. GENERATOR_RAD_XRAYOFF,
  42. GENERATOR_FLU_OFF,
  43. GENERATOR_FLU_READY,
  44. GENERATOR_FLU_XRAYON,
  45. GENERATOR_FLU_XRAYOFF,
  46. GENERATOR_FLU_CINE_READY,
  47. GENERATOR_SYNC_MAX
  48. };
  49. static const char* GENSTATE = "GENERATORSTATUS"; //发生器设备状态
  50. enum GENERATOR_STATUS {
  51. GENERATOR_STATUS_SHUTDOWN,
  52. GENERATOR_STATUS_INIT,
  53. GENERATOR_STATUS_SLEEP,
  54. GENERATOR_STATUS_CHARGING,//充电
  55. GENERATOR_STATUS_STANDBY,
  56. GENERATOR_STATUS_EXP,
  57. GENERATOR_STATUS_ERROR,
  58. GENERATOR_STATUS_CALIBRATION,
  59. GENERATOR_STATUS_SERVICE,
  60. GENERATOR_STATUS_MAX
  61. };
  62. static const char* GENHANDSWITCH = "HANDSWITCHSTATE"; //手闸状态
  63. enum HANDSWITCH_STATUS {
  64. HANDSWITCH_STATUS_Release,
  65. HANDSWITCH_STATUS_Hold,
  66. HANDSWITCH_STATUS_Press,
  67. HANDSWITCH_STATUS_MAX
  68. };
  69. static const char* GENFOOTSWITCH = "FOOTSWITCHSTATE"; //脚闸状态
  70. enum FOOTSWITCH_STATUS {
  71. FOOTSWITCH_STATUS_Release,
  72. FOOTSWITCH_STATUS_Press,
  73. FOOTSWITCH_STATUS_MAX
  74. };
  75. //点片
  76. static const char* KV = "KV"; //阳极电压
  77. static const char* MA = "MA"; //球管电流
  78. static const char* MS = "MS"; //管电流
  79. static const char* KV2 = "KV2"; //阳极电压
  80. static const char* MA2 = "MA2"; //球管电流
  81. static const char* MS2 = "MS2"; //管电流
  82. static const char* MAS = "MAS"; //电流时间积
  83. static const char* FOCUS = "FOCUS"; //灯丝/焦点
  84. enum FOCUS_TYPE {
  85. FOCUS_SMALL,
  86. FOCUS_LARGE,
  87. FOCUS_AUTOMATIC,
  88. FOCUS_MAX
  89. };
  90. static const char* FOCUSSIZE = "FOCUSSIZE"; //灯丝尺寸
  91. static const char* WORKSTATION = "WORKSTATION"; //工作位
  92. enum GENWS_TYPE {
  93. TABLE = 0,
  94. WALL = 1,
  95. CONVENTIONAL = 2,
  96. MOBILE = 3,
  97. FREE_TABLE = 3,
  98. TOMO = 4,
  99. CONVENTIONAL_TABLE = 5,
  100. CONVENTIONAL_WALL = 6,
  101. FREE_WALL = 7,
  102. GENWS_MAX
  103. };
  104. static const char* TECHMODE = "TECHMODE"; //技术模式
  105. enum TECHMODE_TYPE {
  106. TECHMODE_NOAEC_3P,
  107. TECHMODE_NOAEC_2P,
  108. TECHMODE_AEC_3P,
  109. TECHMODE_AEC_2P,
  110. TECHMODE_AEC_1P,
  111. TECHMODE_AEC_ReduceMA,
  112. TECHMODE_NOAEC_MAS_MA,
  113. TECHMODE_AEC_MAS_MA,
  114. TECHMODE_MAX
  115. };
  116. enum TECHMODE_V2TYPE {
  117. ET_NONE = -1,
  118. ET_TIME = 0,
  119. ET_MAS = 1,
  120. ET_AEC = 2,
  121. ET_AEC2P = 3,
  122. ET_AEC1P = 4,
  123. ET_AECreduceMA = 5,
  124. ET_MAX
  125. };
  126. static const char* AECDENSITY = "AECDENSITY"; //AEC浓度
  127. static const char* AECFIELD = "AECFIELD"; //AEC区域
  128. enum AEC_FIELD {
  129. AEC_100 = 100,
  130. AEC_010 = 10,
  131. AEC_001 = 1,
  132. AEC_110 = 110,
  133. AEC_111 = 111,
  134. AEC_011 = 11,
  135. AEC_101 = 101
  136. };
  137. static const char* AECFILM = "AECFILM"; //AEC底片
  138. static const char* POSTKV = "POSTKV"; //曝光时的实际电压
  139. static const char* POSTMA = "POSTMA"; //曝光时的实际电流
  140. static const char* POSTMS = "POSTMS"; //曝光时的实际时间
  141. static const char* POSTMAS = "POSTMAS"; //曝光时的实际电流时间积
  142. static const char* TOTALEXPSURENUMBER = "TotalExposureNumber"; //总曝光次数
  143. static const char* TOTALACQTIMES = "TotalAcqTimes"; //曝光累计时间
  144. static const char* TUBECOOLWAITTIME = "TubeCoolWaitTime"; //球管冷却时间
  145. static const char* TUBEOVERLOADNUMBER = "TubeOverLoadNumber"; //球管过热次数
  146. static const char* CURRENTEXPOSUREBNUMBER = "CurrentExposureNumber"; //当前曝光次数
  147. static const char* EXPMODE = "EXPMODE"; //曝光模式
  148. namespace EXPMODE_TYPE {
  149. static const char* Single = "Single";
  150. static const char* Stitch = "Stitch";
  151. static const char* PulseSerial = "PulseSerial";
  152. static const char* CoutineSerial = "CoutineSerial";
  153. static const char* TOMO = "TOMO";
  154. }
  155. static const char* EXAMMODE = "EXAMMODE"; //检查模式
  156. namespace EXAMMODE_TYPE {
  157. static const char* MANUAL = "MANUAL"; //0
  158. static const char* SEMIAUTO = "SEMIAUTO"; //1
  159. static const char* AUTOMATIC = "AUTOMATIC"; //2
  160. static const char* AUTOFILTER = "AUTOFILTER"; //3
  161. }
  162. static const char* MODALITY = "Modality"; //?模式
  163. static const char* FRAMERATE = "FrameRate"; //帧速率(连续)
  164. static const char* REFERENCEAIRKERMA = "ReferenceAirKerma"; //?
  165. static const char* KVLIST = "KVList"; //电压取值集合
  166. static const char* MASLIST = "MASList"; //电流取值集合
  167. //透视
  168. static const char* FLUKV = "FLUKV"; //透视电压
  169. static const char* FLUMA = "FLUMA"; //透视电流
  170. static const char* FLUMS = "FLUMS"; //透视曝光时间
  171. static const char* FLUMAS = "FLUMAS"; //透视时间电流积
  172. static const char* FLUAccTime = "FLUAccTime"; //透视累计时间
  173. static const char* FLUAccTimeUnit = "FLUAccTimeUnit"; //透视累计时间单位
  174. static const char* FLUIntTime = "FLUIntTime"; //脉冲周期时间
  175. static const char* FLUPPS = "FLUPPS"; //帧率
  176. static const char* FLUpulseWidth = "FLUpulseWidth"; //脉宽
  177. static const char* FLUMode = "FLUMode"; //透视模式
  178. enum GENERATOR_FLUMode {
  179. GENERATOR_FLMODE_NOTFLU,//非透视
  180. GENERATOR_FLMODE_CF,//连续
  181. GENERATOR_FLMODE_PF,//脉冲
  182. GENERATOR_FLMODE_HCF,//高剂量连续
  183. GENERATOR_FLMODE_HPF,//高剂量脉冲
  184. GENERATOR_FLMODE_MAX
  185. };//主要是透视模式分类,后续斟酌。
  186. namespace FLFMODE_TYPE
  187. {
  188. static const char* FLF_DISB = "NotFlu";
  189. static const char* FLF_CONTI = "CF";
  190. static const char* FLF_PULSE = "PF";
  191. static const char* FLF_HL_CONTI = "HLCF";
  192. static const char* FLF_HL_PULSE = "HLF";
  193. static const char* FLF_CBCT = "5";
  194. static const char* FLF_DIRECT = "6";
  195. }
  196. static const char* FLUABSStatus = "FLUABSStatus"; //ABS状态
  197. enum GENERATOR_ABSStatus {
  198. GENERATOR_ABS_OFF,//关闭
  199. GENERATOR_ABS_ON_KV,//启用(KV only)
  200. GENERATOR_ABS_ON_KVMA,//启用(KV/mA)
  201. GENERATOR_ABS_MAX
  202. };
  203. static const char* FLUMag = "FLUMag"; //fluoro mag
  204. static const char* FLUDoseLevel = "FLUDoseLevel"; //剂量模式
  205. enum GENERATOR_DoseLevel {
  206. GENERATOR_DOSE_LOW,//关闭
  207. GENERATOR_DOSE_NORMAL,//启用(KV only)
  208. GENERATOR_DOSE_HIGH,//启用(KV/mA)
  209. GENERATOR_DOSE_CineLOW = 10,//关闭
  210. GENERATOR_DOSE_CineNORMAL,//启用(KV only)
  211. GENERATOR_DOSE_CineHIGH,//启用(KV/mA)
  212. GENERATOR_DOSE_MAX
  213. };
  214. static const char* FLUCurve = "FLUCurve"; //ABS曲线
  215. static const char* FLUCineKV = "FLUCineKV"; //Cine电压
  216. static const char* FLUCineMA = "FLUCineMA"; //Cine电流
  217. static const char* FLUCineMS = "FLUCineMS"; //Cine曝光时间
  218. enum UNIT_REGULATION_LEVEL { //故障等级
  219. REG_ERRO,
  220. REG_WARN
  221. };
  222. enum UNIT_CHARGE_STATE { //电池状态
  223. POWER_LOW,
  224. POWER_NOR
  225. };
  226. enum UNIT_CTRL_TYPE { //交互方式
  227. CTRL_PlatformInterface,
  228. CTRL_Center,
  229. CTRL_CallBackFun
  230. };
  231. }
  232. namespace ActionKey
  233. {
  234. //unit
  235. static const char* Query_HE = "Query_HE";
  236. static const char* SetGeneratortoSyncStatus = "SetGeneratortoSyncStatus";
  237. static const char* SetExpEnable = "SetExpEnable";
  238. static const char* SetExpDisable = "SetExpDisable";
  239. static const char* Reset = "RESET";
  240. static const char* SetTubeAngle = "SetTubeAngle";
  241. static const char* SetTubeTargetMaterial = "SetTubeTargetMaterial";
  242. static const char* GetSignalFromWorkflows = "GetSignalFromWorkflows";//add by wxx for 品臻3025ZF
  243. static const char* ActiveSyncMode = "ActiveSyncMode";//取代WorkStation设置同步模式,由上层调用设置
  244. static const char* SimulateError = "SimulateError";//模拟错误注入
  245. //DR
  246. static const char* SetAPR = "SetAPR";
  247. static const char* SetAPRArray = "SetAPRArray";
  248. static const char* IncParam_KV = "IncParam_KV";
  249. static const char* DecParam_KV = "DecParam_KV";
  250. static const char* IncParam_KVL = "IncParam_KVL";
  251. static const char* DecParam_KVL = "DecParam_KVL";
  252. static const char* SetValue_KV = "SetValue_KV";
  253. static const char* IncParam_MA = "IncParam_MA";
  254. static const char* DecParam_MA = "DecParam_MA";
  255. static const char* IncParam_MAL = "IncParam_MAL";
  256. static const char* DecParam_MAL = "DecParam_MAL";
  257. static const char* SetValue_MA = "SetValue_MA";
  258. static const char* IncParam_MS = "IncParam_MS";
  259. static const char* DecParam_MS = "DecParam_MS";
  260. static const char* IncParam_MSL = "IncParam_MSL";
  261. static const char* DecParam_MSL = "DecParam_MSL";
  262. static const char* SetValue_MS = "SetValue_MS";
  263. static const char* IncParam_MAS = "IncParam_MAS";
  264. static const char* DecParam_MAS = "DecParam_MAS";
  265. static const char* IncParam_MASL = "IncParam_MASL";
  266. static const char* DecParam_MASL = "DecParam_MASL";
  267. static const char* SetValue_MAS = "SetValue_MAS";
  268. static const char* SetValue_TECHMODE = "SetValue_TECHMODE";
  269. static const char* SetValue_FOCUS = "SetValue_FOCUS";
  270. static const char* SetValue_AECDENSITY = "SetValue_AECDENSITY";
  271. static const char* IncParam_AECDENSITY = "IncParam_AECDENSITY";
  272. static const char* DecParam_AECDENSITY = "DecParam_AECDENSITY";
  273. static const char* SetValue_AECFIELD = "SetValue_AECFIELD";
  274. static const char* SetValue_AECFILM = "SetValue_AECFILM";
  275. static const char* SetValue_WORKSTATION = "SetValue_WORKSTATION";
  276. static const char* GetValue_POSTKV = "GetValue_POSTKV";
  277. static const char* GetValue_POSTMA = "GetValue_POSTMA";
  278. static const char* GetValue_POSTMS = "GetValue_POSTMS";
  279. static const char* GetValue_POSTMAS = "GetValue_POSTMAS";
  280. static const char* SetExpMode = "SetExpMode";
  281. static const char* SetFrameRate = "SetFrameRate";
  282. static const char* SetModality = "SetModality";
  283. static const char* SetEXAMMode = "SetEXAMMode";
  284. //FLU
  285. static const char* IncParam_FluKV = "IncParam_FluKV";
  286. static const char* DecParam_FluKV = "DecParam_FluKV";
  287. static const char* GetValue_FluKV = "GetValue_FluKV";
  288. static const char* SetValue_FluKV = "SetValue_FluKV";
  289. static const char* IncParam_FluMA = "IncParam_FluMA";
  290. static const char* DecParam_FluMA = "DecParam_FluMA";
  291. static const char* GetValue_FluMA = "GetValue_FluMA";
  292. static const char* SetValue_FluMA = "SetValue_FluMA";
  293. static const char* IncParam_FluMS = "IncParam_FluMS";
  294. static const char* DecParam_FluMS = "DecParam_FluMS";
  295. static const char* GetValue_FluMS = "GetValue_FluMS";
  296. static const char* SetValue_FluMS = "SetValue_FluMS";
  297. static const char* IncParam_FluMAS = "IncParam_FluMAS";
  298. static const char* DecParam_FluMAS = "DecParam_FluMAS";
  299. static const char* SetValue_FluMAS = "SetValue_FluMAS";
  300. static const char* SetValue_PPS = "SetValue_PPS";
  301. static const char* GetValue_PPS = "GetValue_PPS";
  302. static const char* IncParam_PPS = "IncParam_PPS";
  303. static const char* DecParam_PPS = "DecParam_PPS";
  304. static const char* SetValue_ABSCurve = "SetValue_ABSCurve";
  305. static const char* IncParam_ABSCurve = "IncParam_ABSCurve";
  306. static const char* DecParam_ABSCurve = "DecParam_ABSCurve";
  307. static const char* SetValue_ABSValue = "SetValue_ABSValue";
  308. static const char* GetValue_FluIntTimer = "GetValue_FluIntTimer";
  309. static const char* GetValue_FluAccTimer = "GetValue_FluAccTimer";
  310. static const char* SetValue_PluseWidth = "SetPluseWidth";
  311. static const char* SetValue_ABSMode = "SetABSMode";
  312. static const char* SetValue_ABSTargetEXI = "SetABSTargetEXI";
  313. static const char* SetValue_APF = "SetAPF";
  314. static const char* ReSetFluTimer = "ReSetFluTimer";
  315. static const char* SetValue_FluPre = "SetFluPre";
  316. static const char* SetValue_FluEXP = "SetFluEXP";
  317. static const char* SetFLFMode = "SetFLFMode";
  318. static const char* SetValue_FluMAG = "SetFluMAG";
  319. static const char* DisableMAG = "DisableMAG";
  320. static const char* SetValue_FluDoseLever = "SetFluDoseLever";
  321. static const char* SetValue_HalfDose = "SetHalfDose";
  322. static const char* SetValue_RadCurve = "TransferRadCurve";
  323. //other
  324. static const char* SetCollimatorLight = "SetCollimatorLight";
  325. }
  326. //-----------------------------------------------------------------------------
  327. // ConfigInfo
  328. //-----------------------------------------------------------------------------
  329. namespace ConfKey
  330. {
  331. static const char* DiosGeneratorType = "GeneratorVender";
  332. static const char* DiosGeneratorModel = "GeneratorModel";
  333. static const char* DiosGeneratorConfig = "DeviceConfig";
  334. static const char* DiosGeneratorAttribute = "Attribute";
  335. static const char* DiosGeneratorDescription = "Description";
  336. static const char* AttributeType = "Type";
  337. static const char* AttributeAccess = "Access";
  338. static const char* AttributeRangeMax = "RangeMax";
  339. static const char* AttributeRangeMin = "RangeMin";
  340. static const char* AttributeListNum = "ListNum";
  341. static const char* AttributeList = "List";
  342. static const char* AttributeRequired = "Required";
  343. static const char* AttributeDefaultValue = "DefaultValue";
  344. static const char* DiosSyncType = "SyncType";
  345. static const char* DiosSCFType = "SCFType";
  346. static const char* DiosSCFTCPIP = "TCPIP";
  347. static const char* DiosSCFCOM = "COM";
  348. static const char* DiosSCFIP = "ip";
  349. static const char* DiosSCFPort = "port";
  350. static const char* DiosSCFBaudrate = "baudrate";
  351. static const char* DiosSCFBytesize = "bytesize";
  352. static const char* DiosSCFParity = "parity";
  353. static const char* DiosSCFStopbits = "stopbits";
  354. static const char* DiosWSTable = "WSTable";
  355. static const char* DiosWSWall = "WSWall";
  356. static const char* DiosWSFree = "WSFree";
  357. static const char* DiosWSTomo = "WSTomo";
  358. static const char* DiosWSConventional = "WSConventional";
  359. static const char* DiosSynTable = "SYNTable";
  360. static const char* DiosSynWall = "SYNWall";
  361. static const char* DiosSynFree = "SYNFree";
  362. static const char* DiosSynTomo = "SYNTomo";
  363. static const char* DiosSynConventional = "SYNConventional";
  364. static const char* DiosConsoleRole = "ConsoleRole";
  365. static const char* DiosIsConnect = "IsConnect";
  366. //20220412 新增 <ConfigToolInfo> 以及其内部属性,主要用于webconfig
  367. static const char* DiosConfigToolInfo = "ConfigToolInfo";
  368. static const char* DiosAttributeInfo = "AttributeInfo";
  369. static const char* DiosAttributeKey = "AttributeKey";
  370. static const char* DiosAttributeDescripition = "AttributeDescripition";
  371. static const char* DiosAccess = "Access";
  372. static const char* DiosType = "Type";
  373. static const char* DiosRangeMin = "RangeMin";
  374. static const char* DiosRangeMax = "RangeMax";
  375. static const char* DiosListNum = "ListNum";
  376. static const char* DiosListInfo = "ListInfo";
  377. static const char* DiosList = "List";
  378. static const char* DiosRequired = "Required";
  379. static const char* DiosDefaultValue = "DefaultValue";
  380. static const char* DiosInnerKey = "InnerKey";
  381. static const char* DiosPathID = "PathID";
  382. //20230829 新增 满足demand574
  383. static const char* DiosTubeInfo = "TubeInfo";
  384. static const char* DiosFocusSmall = "FocusSmall";
  385. static const char* DiosFocusLarge = "FocusLarge";
  386. }
  387. //-----------------------------------------------------------------------------
  388. // _tAPRArgs、_tAPFArgs
  389. //-----------------------------------------------------------------------------
  390. struct _tAPRArgs
  391. {
  392. int nWS{ 0 };
  393. int nFocus{ 0 };
  394. int nTechmode{ 0 };
  395. float fKV{ 0 };
  396. float fMA{ 0 };
  397. float fMS{ 0 };
  398. float fKV2{ 0 };
  399. float fMA2{ 0 };
  400. float fMS2{ 0 };
  401. float fMAS{ 0 };
  402. int nAECDensity{ 0 };
  403. int nAECFilm{ 0 };
  404. int nAECField{ 0 };
  405. };
  406. struct _tAPFArgs
  407. {
  408. int nWS{ 0 };
  409. int nFluMode{ 0 };
  410. int nABSMode{ 0 };
  411. int nDoseLever{ 0 };
  412. float nFLKV{ 0 };
  413. float fFLMA{ 0 };
  414. int nPPS{ 0 };
  415. };
  416. //-----------------------------------------------------------------------------
  417. // _tSyncModeArgs
  418. //-----------------------------------------------------------------------------
  419. struct _tSyncModeArgs
  420. {
  421. string strWS;
  422. string strSyncMode;
  423. string strSyncValue;
  424. };
  425. namespace AttrKey::SYNC_TYPE
  426. {
  427. static const char* SYNC_HWS = "HWS"; //硬件信号同步出线
  428. static const char* SYNC_CMD = "CMD"; //软件指令同步出线
  429. static const char* SYNC_FRE = "FRE"; //自由出线
  430. static const char* SYNC_DEMO = "DEMO"; //发生器不接入到Dios系统
  431. }
  432. //-----------------------------------------------------------------------------
  433. // SYNMould
  434. //-----------------------------------------------------------------------------
  435. enum EnSYNMode
  436. {
  437. EXPOSURE_SYNMODE_HARDWARE_SYNBOX, //0
  438. EXPOSURE_SYNMODE_DIRCETCONNECT_NOSYNBOX, //1
  439. EXPOSURE_SYNMODE_SOFTWARE_NOSYNBOX, //2
  440. EXPOSURE_SYNMODE_DIRECT //3
  441. };
  442. struct cfgWorkStationKey //SDC工作位结构体
  443. {
  444. std::string strWSNAme;
  445. int nWSID{ 0 };
  446. cfgWorkStationKey()
  447. {
  448. strWSNAme = "";
  449. nWSID = 0;
  450. };
  451. cfgWorkStationKey(std::string name, int id)
  452. {
  453. strWSNAme = name;
  454. nWSID = id;
  455. };
  456. cfgWorkStationKey(int id)
  457. {
  458. strWSNAme = "null";
  459. if (id == AttrKey::TABLE)
  460. strWSNAme = "Table";
  461. else if (id == AttrKey::WALL)
  462. strWSNAme = "Wall";
  463. else if (id == AttrKey::MOBILE)
  464. strWSNAme = "Free";
  465. else if (id == AttrKey::TOMO)
  466. strWSNAme = "Tomo";
  467. else if (id == AttrKey::CONVENTIONAL)
  468. strWSNAme = "Direct";
  469. nWSID = id;
  470. };
  471. cfgWorkStationKey(const char* name)
  472. {
  473. strWSNAme = name;
  474. if (strcmp(name, "Table") == 0)
  475. nWSID = AttrKey::TABLE;
  476. else if (strcmp(name, "Wall") == 0)
  477. nWSID = AttrKey::WALL;
  478. else if (strcmp(name, "Free") == 0)
  479. nWSID = AttrKey::MOBILE;
  480. else if (strcmp(name, "Tomo") == 0)
  481. nWSID = AttrKey::TOMO;
  482. else if (strcmp(name, "Direct") == 0)
  483. nWSID = AttrKey::CONVENTIONAL;
  484. };
  485. bool operator<(const cfgWorkStationKey& value) const {
  486. return nWSID < value.nWSID;
  487. }
  488. };
  489. struct cfgWorkStationData //SDC工作位结构体
  490. {
  491. std::string strWSNAme;
  492. int nWSNamber{ 0 };
  493. EnSYNMode nWSSYN{ EXPOSURE_SYNMODE_HARDWARE_SYNBOX };
  494. cfgWorkStationData()
  495. {
  496. strWSNAme = "";
  497. nWSNamber = 0;
  498. nWSSYN = EXPOSURE_SYNMODE_HARDWARE_SYNBOX;
  499. };
  500. cfgWorkStationData(std::string name, int number, EnSYNMode syn)
  501. {
  502. strWSNAme = name;
  503. nWSNamber = number;
  504. nWSSYN = syn;
  505. };
  506. };
  507. //##################################################################################################
  508. //定义具体设备属性
  509. #define UNIT_DATA_INT(NAME, KEY) \
  510. class NAME :public IntMould\
  511. {\
  512. using super = IntMould;\
  513. public:\
  514. NAME(int initialvalue, int lower, int upper, int accuracy)\
  515. :super(KEY, initialvalue, lower, upper, accuracy)\
  516. {}\
  517. ~NAME() {}\
  518. };\
  519. #define UNIT_DATA_INT_withLimit(NAME, KEY, INIT, MIN, MAX, ACC) \
  520. class NAME :public IntMould\
  521. {\
  522. using super = IntMould;\
  523. public:\
  524. NAME(int initialvalue = INIT, int lower = MIN, int upper = MAX, int accuracy = ACC)\
  525. :super(KEY, initialvalue, lower, upper, accuracy)\
  526. {}\
  527. ~NAME() {}\
  528. };\
  529. #define UNIT_DATA_FLOAT(NAME, KEY) \
  530. class NAME :public FloatMould\
  531. {\
  532. using super = FloatMould;\
  533. public:\
  534. NAME(float initialvalue, float lower, float upper, float accuracy)\
  535. :super(KEY, initialvalue, lower, upper, accuracy)\
  536. {}\
  537. ~NAME() {}\
  538. };\
  539. #define UNIT_DATA_STR(NAME, KEY) \
  540. class NAME :public StringMould\
  541. {\
  542. using super = StringMould;\
  543. public:\
  544. NAME(std::string initialvalue)\
  545. :super(KEY, initialvalue)\
  546. {}\
  547. ~NAME() {}\
  548. };\
  549. UNIT_DATA_FLOAT(KVMould, AttrKey::KV);
  550. UNIT_DATA_FLOAT(MAMould, AttrKey::MA);
  551. UNIT_DATA_FLOAT(MSMould, AttrKey::MS);
  552. UNIT_DATA_FLOAT(MASMould, AttrKey::MAS);
  553. UNIT_DATA_INT_withLimit(FOCUSMould, AttrKey::FOCUS,
  554. AttrKey::FOCUS_TYPE::FOCUS_AUTOMATIC,
  555. AttrKey::FOCUS_TYPE::FOCUS_SMALL,
  556. AttrKey::FOCUS_TYPE::FOCUS_AUTOMATIC,
  557. 1);
  558. UNIT_DATA_INT(WORKSTATIONMould, AttrKey::WORKSTATION);
  559. UNIT_DATA_INT(TECHMODEMould, AttrKey::TECHMODE);
  560. UNIT_DATA_INT(AECFIELDMould, AttrKey::AECFIELD);
  561. UNIT_DATA_INT(AECFILMMould, AttrKey::AECFILM);
  562. UNIT_DATA_INT(AECDENSITYMould, AttrKey::AECDENSITY);
  563. UNIT_DATA_INT(TUBEHEATMould, AttrKey::TUBEHEAT);
  564. UNIT_DATA_INT(GENHEATMould, AttrKey::DENHEAT);
  565. UNIT_DATA_FLOAT(POSTKVMould, AttrKey::POSTKV);
  566. UNIT_DATA_FLOAT(POSTMAMould, AttrKey::POSTMA);
  567. UNIT_DATA_FLOAT(POSTMSMould, AttrKey::POSTMS);
  568. UNIT_DATA_FLOAT(POSTMASMould, AttrKey::POSTMAS);
  569. UNIT_DATA_INT_withLimit(GENSYNSTATEMould, AttrKey::GENSYNSTATE,
  570. AttrKey::GENERATOR_SYNC::GENERATOR_RAD_OFF,
  571. AttrKey::GENERATOR_SYNC::GENERATOR_SYNC_ERR,
  572. AttrKey::GENERATOR_SYNC::GENERATOR_FLU_XRAYOFF,
  573. 1);
  574. UNIT_DATA_INT_withLimit(GENSTATEMould, AttrKey::GENSTATE,
  575. AttrKey::GENERATOR_STATUS::GENERATOR_STATUS_INIT,
  576. AttrKey::GENERATOR_STATUS::GENERATOR_STATUS_SHUTDOWN,
  577. AttrKey::GENERATOR_STATUS::GENERATOR_STATUS_MAX,
  578. 1);
  579. UNIT_DATA_INT(TOTALEXPNUMMould, AttrKey::TOTALEXPSURENUMBER);
  580. UNIT_DATA_INT(TOTALACQTIMESMould, AttrKey::TOTALACQTIMES);
  581. UNIT_DATA_INT(TUBECOOLTIMEMould, AttrKey::TUBECOOLWAITTIME);
  582. UNIT_DATA_INT(TUBEOVERLOADNUMMould, AttrKey::TUBEOVERLOADNUMBER);
  583. UNIT_DATA_INT(CUREXPNUMMould, AttrKey::CURRENTEXPOSUREBNUMBER);
  584. UNIT_DATA_STR(EXPMODEMould, AttrKey::EXPMODE);
  585. UNIT_DATA_STR(EXAMMODEMould, AttrKey::EXAMMODE);
  586. UNIT_DATA_STR(MODALITYMould, AttrKey::MODALITY);
  587. UNIT_DATA_FLOAT(FRAMERATEMould, AttrKey::FRAMERATE);
  588. UNIT_DATA_INT(BATTERYCHARGSTATEMould, AttrKey::BATTERYCHARGESTATE);
  589. UNIT_DATA_INT(BATTERYPOWERSTATEMould, AttrKey::BATTERYPOWERSTATE);
  590. UNIT_DATA_FLOAT(REFERENCEAIRKERMAMould, AttrKey::REFERENCEAIRKERMA);
  591. UNIT_DATA_STR(KVLISTMould, AttrKey::KVLIST);
  592. UNIT_DATA_STR(MASLISTMould, AttrKey::MASLIST);
  593. UNIT_DATA_INT(GENHANDSWITCHMould, AttrKey::BATTERYCHARGESTATE);
  594. UNIT_DATA_STR(TUBEINFOMould, AttrKey::TUBEINFO);
  595. UNIT_DATA_STR(TUBETARGETMATERIALMould, AttrKey::TUBETARGETMATERIAL);
  596. UNIT_DATA_FLOAT(TUBEANGLEMould, AttrKey::TUBEANGLE);
  597. UNIT_DATA_FLOAT(FLUKVMould, AttrKey::FLUKV);
  598. UNIT_DATA_FLOAT(FLUMAMould, AttrKey::FLUMA);
  599. UNIT_DATA_FLOAT(FLUMSMould, AttrKey::FLUMS);
  600. UNIT_DATA_FLOAT(FLUMASMould, AttrKey::FLUMAS);
  601. UNIT_DATA_FLOAT(FLAccTimeMould, AttrKey::FLUAccTime);
  602. UNIT_DATA_FLOAT(FLUIntTimeMould, AttrKey::FLUIntTime);
  603. UNIT_DATA_INT(PPSMould, AttrKey::FLUPPS);
  604. UNIT_DATA_INT_withLimit(FLUModeMould, AttrKey::FLUMode,
  605. AttrKey::GENERATOR_FLUMode::GENERATOR_FLMODE_NOTFLU,
  606. AttrKey::GENERATOR_FLUMode::GENERATOR_FLMODE_NOTFLU,
  607. AttrKey::GENERATOR_FLUMode::GENERATOR_FLMODE_HPF,
  608. 1);
  609. UNIT_DATA_INT_withLimit(FLUABSStatusMould, AttrKey::FLUABSStatus,
  610. AttrKey::GENERATOR_ABSStatus::GENERATOR_ABS_OFF,
  611. AttrKey::GENERATOR_ABSStatus::GENERATOR_ABS_OFF,
  612. AttrKey::GENERATOR_ABSStatus::GENERATOR_ABS_ON_KVMA,
  613. 1);
  614. UNIT_DATA_INT(FLUMagMould, AttrKey::FLUMag);
  615. UNIT_DATA_INT_withLimit(FLUDoseLevelMould, AttrKey::FLUDoseLevel,
  616. AttrKey::GENERATOR_DoseLevel::GENERATOR_DOSE_LOW,
  617. AttrKey::GENERATOR_DoseLevel::GENERATOR_DOSE_LOW,
  618. AttrKey::GENERATOR_DoseLevel::GENERATOR_DOSE_CineHIGH,
  619. 1);
  620. UNIT_DATA_INT(FLUCurveMould, AttrKey::FLUCurve);
  621. UNIT_DATA_FLOAT(FLUCineKVMould, AttrKey::FLUCineKV);
  622. UNIT_DATA_FLOAT(FLUCineMAMould, AttrKey::FLUMA);
  623. UNIT_DATA_FLOAT(FLUCineMSMould, AttrKey::FLUMS);
  624. }
  625. }