DetectorCtrlDefinition.h 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474
  1. #pragma once
  2. #include <string>
  3. #pragma region DEFINITION
  4. //采集模式
  5. enum AcqMode
  6. {
  7. RAD = 1,
  8. DAEC,
  9. DUAL_ENERGY,
  10. DDR
  11. };
  12. //探测器异步事件状态
  13. enum ENUM_PANEL_EVENT_STATE
  14. {
  15. PANEL_EVENT_END_OK = 0,
  16. PANEL_EVENT_END_ERROR = 1,
  17. PANEL_EVENT_START = 2,
  18. PANEL_EVENT_SUCCESS = 3,
  19. PANEL_EVENT_END = 4,
  20. PANEL_EVENT_BEGIN = 5,
  21. PANEL_EVENT_TIMEOUT = 6
  22. };
  23. enum ENUM_EXPOSE_STATUS
  24. {
  25. DOSE_ACCEPT = 0,
  26. DOSE_TOO_HIGH = 1,
  27. DOSE_TOO_LOW = 2,
  28. DOSE_OBJECT = 3
  29. };
  30. //控制模块给DPC模块反馈的信息类型
  31. typedef enum
  32. {
  33. EVT_LEVEL_CONFIGURATION = 0x00,
  34. EVT_LEVEL_INFORMATOION = 0x01,
  35. EVT_LEVEL_STATUS = 0x02,
  36. EVT_LEVEL_DATA = 0x03,
  37. EVT_LEVEL_WARNING = 0x04,
  38. EVT_LEVEL_ERROR = 0x05,
  39. } CcosEventLevel;
  40. typedef enum
  41. {
  42. EVT_CONF_PANEL_SERIAL = 0x00,
  43. EVT_CONF_RAW_WIDTH = 0x01,
  44. EVT_CONF_RAW_HIGHT = 0x02,
  45. EVT_CONF_RAW_BITS = 0x03,
  46. EVT_CONF_PIXELSPACE = 0x04,
  47. EVT_CONF_PREVIEW_WIDTH = 0x05,
  48. EVT_CONF_PREVIEW_HIGHT = 0x06,
  49. EVT_CONF_MODULE_TYPE = 0x07,
  50. EVT_CONF_MODULE_IP = 0x08,
  51. EVT_CONF_MODULE_SN = 0x09,
  52. EVT_CONF_FIRWARE_UPDATE = 0x0A,
  53. EVT_CONF_PART_NUMBER = 0x0B,
  54. EVT_CONF_BATTERY_SN = 0x0C,
  55. EVT_CONF_WIFI_SSID = 0x0D,
  56. EVT_CONF_IFBOARD = 0x0E,
  57. EVT_CONF_DATECODE = 0x0F,
  58. EVT_CONF_LIFETIME = 0x10,
  59. } CcosEventConfigID;
  60. typedef enum
  61. {
  62. EVT_INFO_POWER_ON = 0x00,
  63. EVT_INFO_BATTERY_CAPACITY = 0x01,
  64. EVT_INFO_BATTERY_TEMPERATURE = 0x02,
  65. EVT_INFO_BATTERY_CHARGES = 0x03,
  66. EVT_INFO_WIFI_DATARATE = 0x04,
  67. EVT_INFO_WIFI_CHANNEL = 0x05,
  68. EVT_INFO_WIFI_SIGNALPOWER = 0x06,
  69. EVT_INFO_WIFI_NOISEPOWER = 0x07,
  70. EVT_INFO_FIRMWARE = 0x08,
  71. EVT_INFO_SHOCKSENSOR_INFO = 0x09,
  72. EVT_INFO_CALIBRATIOIN_TIME = 0x0A,
  73. EVT_INFO_FPVOLTAGE = 0x0B,
  74. EVT_INFO_CALIBRATIOIN_TIMEL = 0x0C, //长曝光模式
  75. } CcosEventInfoID;
  76. typedef enum
  77. {
  78. EVT_STATUS_INIT = 0x00,
  79. EVT_STATUS_MOTION = 0x01,
  80. EVT_STATUS_UPDATE_FIRMWARE = 0x02,
  81. EVT_STATUS_SELFTEST = 0x03,
  82. EVT_STATUS_DETECTORSHARE = 0x04,
  83. EVT_STATUS_SINGLEINIT = 0x05,
  84. EVT_STATUS_SELECTPANEL = 0x06,
  85. EVT_STATUS_PANEL = 0x07,
  86. EVT_STATUS_CALIBRATIOIN = 0x08,
  87. EVT_STATUS_SAVECALIB = 0x09,
  88. EVT_STATUS_SAVEDEFECT = 0x0A,
  89. EVT_STATUS_ACQUISITION = 0x0B,
  90. EVT_STATUS_SINGLEEXP = 0x0C,
  91. EVT_STATUS_IMAGEPENDING = 0x0D,
  92. EVT_STATUS_TEMPERATURE = 0x0E,
  93. EVT_STATUS_WIFI = 0x0F,
  94. EVT_STATUS_BATTERY_VALUE = 0x10,
  95. EVT_STATUS_BATTERY_CHARGING = 0x11,
  96. EVT_STATUS_SHOCK_SENSOR = 0x12,
  97. EVT_STATUS_HALL_SENSOR = 0x13,
  98. EVT_STATUS_PING = 0x14,
  99. EVT_STATUS_PMSNOTOPEN = 0x15,
  100. EVT_STATUS_RESTOREFILES = 0x16,
  101. EVT_STATUS_LASTERROR = 0x17,
  102. EVT_STATUS_RESET = 0x18,
  103. } CcosEventStatusID;
  104. typedef enum
  105. {
  106. EVT_DATA_RAW_IMAGE = 0x00,
  107. EVT_DATA_PREVIEW_IMAGE = 0x01,
  108. EVT_DATA_DOSEPARAM = 0x02,
  109. } CcosEventDataID;
  110. typedef enum
  111. {
  112. EVT_ERR_COMMUNICATE = 0x00,
  113. EVT_ERR_EXP_REQUEST = 0x01,
  114. EVT_ERR_GET_IMAGE = 0x02,
  115. EVT_ERR_MAX_NUMBER = 0x03,
  116. EVT_ERR_SN_NOTINLIST = 0x04,
  117. EVT_ERR_POWER_OFF = 0x05,
  118. EVT_ERR_INIT_FAILED = 0x06,
  119. } CcosEventErrorID;
  120. enum ENUM_PANEL_RESET
  121. {
  122. PANEL_RESET_BEGIN = 1, //
  123. PANEL_RESET_OK = 2, //
  124. PANEL_RESET_ERROR = 3
  125. };
  126. //探测器状态
  127. enum ENUM_PANEL_STATUS
  128. {
  129. PANEL_CLOSE,
  130. PANEL_CONNECT,
  131. PANEL_STANDBY,
  132. PANEL_READY_EXP,
  133. PANEL_XWINDOW_ON,
  134. PANEL_XWINDOW_OFF,
  135. PANEL_START_TRANSMIT,
  136. PANEL_END_TRANSMIT,
  137. PANEL_START_ACQ,
  138. PANEL_END_ACQ,
  139. PANEL_EXP_END_TIMEOUT,
  140. PANEL_OFFSET_CAL,
  141. PANEL_OFFSET_FINISH,
  142. PANEL_GAIN_CAL,
  143. PANEL_GAIN_FINISH,
  144. PANEL_DEFECT_CAL,
  145. PANEL_DEFECT_FINISH,
  146. PANEL_INIT = 21,
  147. PANEL_SLEEP,
  148. PANEL_GET_IMAGE,
  149. PANEL_GAIN_PREPARE,
  150. PANEL_GAIN_READY_EXP
  151. };
  152. enum
  153. {
  154. NOCAL,
  155. CAL_START,
  156. CAL_CONFIRM,
  157. CAL_REJECT,
  158. CAL_ABORT,
  159. CAL_END
  160. };
  161. struct DeviceIndexStruct
  162. {
  163. bool bPreviewEnable;
  164. bool bInitOK;
  165. bool bConnectStatus;
  166. bool bModuleEnable;
  167. bool bExisted;
  168. bool bEventReturn;
  169. bool bSetCorrection;
  170. bool bReadWifi;
  171. bool bHallSensor;
  172. bool bReadTemperature;
  173. bool bReadBattery;
  174. bool bWriteROM;
  175. bool bTaskEnd;
  176. bool bCharging;
  177. bool bOffsetOver;
  178. bool bUpdateFirmware;
  179. bool bUploadCalibFile;
  180. bool bRecoveringImage;
  181. bool bWireless;
  182. bool bLivingTime;
  183. bool bImagePending;
  184. bool bConnectChanged;
  185. bool bActived;
  186. int HWindex;
  187. int Realindex;
  188. int nSyncMode;
  189. int nPanelExpWindowMode;
  190. int nSaturationValue;
  191. int nPanelID;
  192. int nDoseOfEXI;
  193. int nRequirehwMode;
  194. int nWorkstation;
  195. int nWifiWarning;
  196. int nWifiLimit;
  197. int nCurrentWifiValue;
  198. int nBatteryWarning;
  199. int nBatteryLimit;
  200. int nCurrentBatteryValue;
  201. int nShockTimes;
  202. int nWifiChannel;
  203. int nWifiDataRate;
  204. int nWifiSignalPower;
  205. int nWifiNoisePower;
  206. int nCalibDueSetting;
  207. int nMaxShockNumber;
  208. int nForceGridSuppress;
  209. int nTemperCheckTimeConf;
  210. float fTemperatureMin;
  211. float fTemperatureMax;
  212. float fGradientMean;
  213. float fGradientStdDev;
  214. int nGridSuppressed;
  215. float fGridSuppressParam1;
  216. float fGridSuppressParam2;
  217. float fGridSuppressParam3;
  218. float fGridSuppressParam4;
  219. float fGridSuppressParam5;
  220. float fGridSuppressParam6;
  221. float fGridSuppressParam7;
  222. float fGridSuppressParam8;
  223. float fGridSuppressParam9;
  224. float fCalibTemperature;
  225. float fCalibTemperature1;
  226. float fCalibTemperature2;
  227. float fLTEthreshold;
  228. int nSaveRaw;
  229. int nSID;
  230. //ECM信息相关
  231. int nImageBits;
  232. int nRawWidth;
  233. int nRawHeight;
  234. int nFullImageWidth;
  235. int nFullImageHeight;
  236. int nPreviewWidth;
  237. int nPreviewHeight;
  238. int nMaxImageWidth;
  239. int nMaxImageHeight;
  240. int nWidthOffset;
  241. int nHeightOffset;
  242. int nImageTopffset;
  243. int nImageRightOffset;
  244. int nImageBottomOffset;
  245. int nImageLeftOffset;
  246. int nGridSuppFilterType;
  247. int nLifeTime;
  248. int nPowerOn;
  249. int nFirmwareStatus;
  250. int nTemperatureStatus;
  251. int nLastImageID;
  252. float fFactorEXI2UGY; //探测器EXI -> UGY 转换系数
  253. float fTemperWarning;
  254. float fTemperMaxLimit;
  255. float fTemperLowLimit;
  256. float fTemperMinLimit;
  257. float fCurrentTemperValue;
  258. float fPixelSpace; //像素大小
  259. std::string strAppConfFilePath; //配置文件路径
  260. std::string strDeviceName; //探测器名称
  261. std::string strPartNumber;
  262. std::string strWifiSSID;
  263. std::string strPanelSerial;
  264. std::string strFPDConfFilePath;//探测器自身配置文件路径
  265. std::string strIPAddress;
  266. std::string strCalibrationDate; //校正日期
  267. std::string strCalibrationDue;
  268. std::string strCalibrationLTEDate; //LTE校正日期
  269. std::string strCalibrationLTEDue;
  270. std::string strInterfaceBoard;
  271. std::string strDateCode;
  272. std::string strFirmware;
  273. std::string strSoftware;
  274. std::string strWorkDir; //SDK配置文件路径
  275. DeviceIndexStruct()
  276. {
  277. bConnectStatus = false;
  278. bExisted = false;
  279. bInitOK = false;
  280. bModuleEnable = false;
  281. bEventReturn = false;
  282. bSetCorrection = false;
  283. bReadWifi = false;
  284. bHallSensor = false;
  285. bReadTemperature = false;
  286. bReadBattery = false;
  287. bWriteROM = false;
  288. bTaskEnd = true;
  289. bCharging = false;
  290. bOffsetOver = false;
  291. bUpdateFirmware = false;
  292. bUploadCalibFile = false;
  293. bRecoveringImage = false;
  294. bWireless = false;
  295. bLivingTime = false;
  296. bImagePending = false;
  297. bConnectChanged = false;
  298. bActived = true;
  299. Realindex = 0;
  300. HWindex = 0;
  301. strAppConfFilePath = ""; //配置文件路径
  302. strDeviceName = ""; //探测器名称
  303. strWifiSSID = "NULL"; //探测器名称
  304. nSyncMode = 0;
  305. nPanelExpWindowMode = 0;
  306. nSaturationValue = 0;
  307. nGridSuppressed = 0;
  308. nPanelID = 0;
  309. nDoseOfEXI = 0;
  310. nRequirehwMode = 0;
  311. strPanelSerial = "";
  312. strFPDConfFilePath = "";//探测器自身配置文件路径
  313. strCalibrationDate = ("0");
  314. strCalibrationDue = ("0");
  315. strCalibrationLTEDate = ("0");
  316. strCalibrationLTEDue = ("0");
  317. fFactorEXI2UGY = 0.0;
  318. bPreviewEnable = false;
  319. fTemperWarning = 0.0f;
  320. fTemperMaxLimit = 0.0f;
  321. fTemperLowLimit = 0.0f;
  322. fTemperMinLimit = 0.0f;
  323. fCalibTemperature = 0.0f;
  324. fCalibTemperature1 = 0.0f;
  325. fCalibTemperature2 = 0.0f;
  326. fCurrentTemperValue = 0.0f;
  327. nWorkstation = -1;
  328. nWifiWarning = 0;
  329. nWifiLimit = 0;
  330. nCurrentWifiValue = -1;
  331. nBatteryWarning = 0;
  332. nBatteryLimit = 0;
  333. nCurrentBatteryValue = 0;//fixbug 9728泰雷兹探测器电量为0时不给这个值赋值,西门子还是想要0
  334. nGridSuppFilterType = 0;
  335. nShockTimes = -1;
  336. nWifiChannel = 0;
  337. nWifiDataRate = 0;
  338. nWifiSignalPower = 0;
  339. nWifiNoisePower = 0;
  340. nCalibDueSetting = 0;
  341. nMaxShockNumber = 0;
  342. nForceGridSuppress = 0;
  343. nTemperCheckTimeConf = 0;
  344. fTemperatureMin = 0.0f;
  345. fTemperatureMax = 0.0f;
  346. fGradientMean = 0.0f;
  347. fGradientStdDev = 0.0f;
  348. nGridSuppressed = 0;
  349. fGridSuppressParam1 = 0.0f;
  350. fGridSuppressParam2 = 0.0f;
  351. fGridSuppressParam3 = 0.0f;
  352. fGridSuppressParam4 = 0.0f;
  353. fGridSuppressParam5 = 0.0f;
  354. fGridSuppressParam6 = 0.0f;
  355. fGridSuppressParam7 = 0.0f;
  356. fGridSuppressParam8 = 0.0f;
  357. fGridSuppressParam9 = 0.0f;
  358. fLTEthreshold = 450.0f;
  359. nSaveRaw = 0;
  360. nSID = 0;
  361. fPixelSpace = 0.143f;
  362. //ECM信息相关
  363. nImageBits = 0;
  364. nRawWidth = 0;
  365. nRawHeight = 0;
  366. nFullImageWidth = 0;
  367. nFullImageHeight = 0;
  368. nPreviewWidth = 0;
  369. nPreviewHeight = 0;
  370. nMaxImageWidth = 0;
  371. nMaxImageHeight = 0;
  372. nWidthOffset = 0;
  373. nHeightOffset = 0;
  374. nLifeTime = 0;
  375. nPowerOn = 0;
  376. nFirmwareStatus = -1;
  377. nTemperatureStatus = 0;
  378. nLastImageID = 0;
  379. }
  380. };
  381. typedef enum
  382. {
  383. FD_INIT_NULL = -1,
  384. FD_INIT_FAILED = 0,
  385. FD_INIT_SUCCESS = 1,
  386. }fd_init_status;
  387. enum
  388. {
  389. GRID_CONF_AUTO = 0,
  390. GRID_CONF_YES = 1,
  391. GRID_CONF_NO = 2,
  392. };
  393. enum
  394. {
  395. GRID_STATE_ERROR = -3,
  396. GRID_STATE_PARAM_ERROR = -2,
  397. GRID_STATE_PARAM_NULL = -1,
  398. GRID_STATE_NO = 0,
  399. GRID_STATE_VERTICAL = 1,
  400. GRID_STATE_HORIZONTAL = 2,
  401. };
  402. enum TEMP_STATUS
  403. {
  404. TEMP_NORMAL = 0,
  405. TEMP_WARNING, //1
  406. TEMP_TOO_HIGH, //2
  407. TEMP_TOO_LOW, //3
  408. };
  409. enum APP_STATUS
  410. {
  411. APP_STATUS_IDLE = 0,
  412. APP_STATUS_WORK_BEGIN, //1
  413. APP_STATUS_WORK_END, //2
  414. APP_STATUS_DETSHARE_BEGIN, //3
  415. APP_STATUS_DETSHAR_END, //4
  416. APP_STATUS_CAL_BEGIN, //5
  417. APP_STATUS_CAL_END, // 6
  418. APP_STATUS_WORK_IN_SENSITIVITY, //7
  419. APP_STATUS_MAX,
  420. };
  421. #pragma endregion DEFINITION