DetectorCtrlDefinition.h 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498
  1. #pragma once
  2. #include <string>
  3. #pragma region DEFINITION
  4. //采集模式
  5. enum AcqMode
  6. {
  7. NONE,
  8. RAD = 1,
  9. DUALENERGY,
  10. DDR
  11. };
  12. //探测器异步事件状态
  13. enum PanelEventState
  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 ExposeStatus
  24. {
  25. DOSE_ACCEPT = 0,
  26. DOSE_TOO_HIGH = 1,
  27. DOSE_TOO_LOW = 2,
  28. DOSE_OBJECT = 3
  29. };
  30. //控制模块给DPC模块反馈的信息类型
  31. enum CcosEventLevel
  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. };
  40. enum CcosEventConfigID
  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. };
  60. enum CcosEventInfoID
  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. };
  76. enum CcosEventStatusID
  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. };
  104. enum CcosEventDataID
  105. {
  106. EVT_DATA_RAW_IMAGE = 0x00,
  107. EVT_DATA_PREVIEW_IMAGE = 0x01,
  108. EVT_DATA_DOSEPARAM = 0x02,
  109. };
  110. enum CcosEventErrorID
  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. };
  120. enum PanelRestStatus
  121. {
  122. PANEL_RESET_BEGIN = 1,
  123. PANEL_RESET_OK = 2,
  124. PANEL_RESET_ERROR = 3
  125. };
  126. //探测器状态
  127. enum PanelStatus
  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_XRAY_ON,
  147. PANEL_XRAY_OFF,
  148. PANEL_INIT = 21,
  149. PANEL_SLEEP,
  150. PANEL_GET_IMAGE,
  151. PANEL_GAIN_PREPARE,
  152. PANEL_GAIN_READY_EXP
  153. };
  154. enum CalibStatus
  155. {
  156. NOCAL,
  157. CAL_START,
  158. CAL_CONFIRM,
  159. CAL_REJECT,
  160. CAL_ABORT,
  161. CAL_END
  162. };
  163. struct DeviceIndexStruct
  164. {
  165. bool bPreviewEnable;
  166. bool bInitOK;
  167. bool bConnectStatus;
  168. bool bModuleEnable;
  169. bool bExisted;
  170. bool bEventReturn;
  171. bool bSetCorrection;
  172. bool bReadWifi;
  173. bool bHallSensor;
  174. bool bReadTemperature;
  175. bool bReadBattery;
  176. bool bWriteROM;
  177. bool bTaskEnd;
  178. bool bCharging;
  179. bool bOffsetOver;
  180. bool bUpdateFirmware;
  181. bool bUploadCalibFile;
  182. bool bRecoveringImage;
  183. bool bWireless;
  184. bool bLivingTime;
  185. bool bImagePending;
  186. bool bConnectChanged;
  187. bool bActived;
  188. int HWindex;
  189. int Realindex;
  190. int nSyncMode;
  191. int nPanelExpWindowMode;
  192. int nSaturationValue;
  193. int nPanelID;
  194. int nDoseOfEXI;
  195. int nRequirehwMode;
  196. int nWorkstation;
  197. int nSaveRaw;
  198. int nSID;
  199. int nShockTimes;
  200. int nMaxShockNumber;
  201. //温度、电量、wifi
  202. int nNotifyStatusTimePeriod;//通知状态信息时间间隔,从模型文件中读取
  203. int nWifiChannel;
  204. int nWifiDataRate;
  205. int nWifiSignalPower;
  206. int nWifiNoisePower;
  207. int nWifiWarning;//低信号警告
  208. int nWifiLimit;//最低信号值
  209. int nCurrentWifiValue;//当前wifi信号值
  210. int nBatteryWarning;//低电量警告
  211. int nBatteryLimit;//最低电量限制
  212. int nBatLowerLimitInCali;
  213. int nCurrentBatteryValue;//当前电量
  214. float fTemperatureErrorMin;//最低温度值
  215. float fTemperatureErrorMax;//最高温度值
  216. float fTemperatureWarnMin;//低温警告
  217. float fTemperatureWarnMax;//高温警告
  218. float fCurrentTemperValue;//当前温度
  219. //栅相关
  220. int nForceGridSuppress;
  221. int nGridSuppressed;
  222. float fGridSuppressParam1;
  223. float fGridSuppressParam2;
  224. float fGridSuppressParam3;
  225. float fGridSuppressParam4;
  226. float fGridSuppressParam5;
  227. float fGridSuppressParam6;
  228. float fGridSuppressParam7;
  229. float fGridSuppressParam8;
  230. float fGridSuppressParam9;
  231. //ECM信息相关
  232. int nImageBits;
  233. int nRawWidth;
  234. int nRawHeight;
  235. int nFullImageWidth;
  236. int nFullImageHeight;
  237. int nMaxImgHeight;
  238. int nMaxImgWidth;
  239. int nPreviewWidth;
  240. int nPreviewHeight;
  241. int nWidthOffset;
  242. int nHeightOffset;
  243. int nImageTopffset;
  244. int nImageRightOffset;
  245. int nImageBottomOffset;
  246. int nImageLeftOffset;
  247. int nGridSuppFilterType;
  248. int nLifeTime;
  249. int nPowerOn;
  250. int nFirmwareStatus;
  251. int nTemperatureStatus;
  252. int nLastImageID;
  253. int nPixelSpace;
  254. std::string strAppConfFilePath; //配置文件路径
  255. std::string strDeviceName; //探测器名称
  256. std::string strPartNumber;
  257. std::string strWifiSSID;
  258. std::string strPanelSerial;
  259. std::string strFPDConfFilePath;//探测器自身配置文件路径
  260. std::string strDetectorWiredIP;
  261. std::string strDetectorWirelessIP;
  262. std::string strLocalIP;
  263. std::string strCalibrationDate; //校正日期
  264. std::string strCalibrationDue;
  265. std::string strCalibrationLTEDate; //LTE校正日期
  266. std::string strCalibrationLTEDue;
  267. std::string strInterfaceBoard;
  268. std::string strDateCode;
  269. std::string strFirmware;
  270. std::string strSoftware;
  271. std::string strWorkDir; //SDK配置文件路径
  272. std::string strSupportSyncMode;
  273. std::string strShowTemperature;
  274. std::string strShowWifi;
  275. std::string strShowBattery;
  276. std::string strShowBluetooth;
  277. std::string strLastCalibrationDate;
  278. std::string strCalibrationFileExpireTime;
  279. std::string strCalibrationFileExpirationReminder;
  280. bool bSupportDDR; //是否支持DDR采集模式
  281. int nOffsetInterval;//offset刷新间隔 单位(分钟)
  282. int nDetectorWidth;
  283. int nDetectorHeight;
  284. int nCalibMode;
  285. int nReconnectTimePeriod;
  286. DeviceIndexStruct()
  287. {
  288. bPreviewEnable = false;
  289. bInitOK = false;
  290. bConnectStatus = false;
  291. bModuleEnable = false;
  292. bExisted = false;
  293. bEventReturn = false;
  294. bSetCorrection = false;
  295. bReadWifi = false;
  296. bHallSensor = false;
  297. bReadTemperature = false;
  298. bReadBattery = false;
  299. bWriteROM = false;
  300. bTaskEnd = false;
  301. bCharging = false;
  302. bOffsetOver = false;
  303. bUpdateFirmware = false;
  304. bUploadCalibFile = false;
  305. bRecoveringImage = false;
  306. bWireless = false;
  307. bLivingTime = false;
  308. bImagePending = false;
  309. bConnectChanged = false;
  310. bActived = false;
  311. HWindex = 0;
  312. Realindex = 0;
  313. nSyncMode = 0;
  314. nPanelExpWindowMode = 0;
  315. nSaturationValue = 0;
  316. nPanelID = 0;
  317. nDoseOfEXI = 0;
  318. nRequirehwMode = 0;
  319. nWorkstation = 0;
  320. nSaveRaw = 0;
  321. nSID = 0;
  322. nShockTimes = 0;
  323. nMaxShockNumber = 0;
  324. nNotifyStatusTimePeriod = 0;
  325. nWifiChannel = 0;
  326. nWifiDataRate = 0;
  327. nWifiSignalPower = 0;
  328. nWifiNoisePower = 0;
  329. nWifiWarning = 0;
  330. nWifiLimit = 0;
  331. nCurrentWifiValue = 0;
  332. nBatteryWarning = 0;
  333. nBatteryLimit = 0;
  334. nBatLowerLimitInCali = 0;
  335. nCurrentBatteryValue = 0;
  336. fTemperatureErrorMin = 0.0f;
  337. fTemperatureErrorMax = 0.0f;
  338. fTemperatureWarnMin = 0.0f;
  339. fTemperatureWarnMax = 0.0f;
  340. fCurrentTemperValue = 0.0f;
  341. nForceGridSuppress = 0;
  342. nGridSuppressed = 0;
  343. fGridSuppressParam1 = 0.0f;
  344. fGridSuppressParam2 = 0.0f;
  345. fGridSuppressParam3 = 0.0f;
  346. fGridSuppressParam4 = 0.0f;
  347. fGridSuppressParam5 = 0.0f;
  348. fGridSuppressParam6 = 0.0f;
  349. fGridSuppressParam7 = 0.0f;
  350. fGridSuppressParam8 = 0.0f;
  351. fGridSuppressParam9 = 0.0f;
  352. nImageBits = 0;
  353. nRawWidth = 0;
  354. nRawHeight = 0;
  355. nFullImageWidth = 0;
  356. nFullImageHeight = 0;
  357. nMaxImgHeight = 0;
  358. nMaxImgWidth = 0;
  359. nPreviewWidth = 0;
  360. nPreviewHeight = 0;
  361. nWidthOffset = 0;
  362. nHeightOffset = 0;
  363. nImageTopffset = 0;
  364. nImageRightOffset = 0;
  365. nImageBottomOffset = 0;
  366. nImageLeftOffset = 0;
  367. nGridSuppFilterType = 0;
  368. nLifeTime = 0;
  369. nPowerOn = 0;
  370. nFirmwareStatus = 0;
  371. nTemperatureStatus = 0;
  372. nLastImageID = 0;
  373. nPixelSpace = 0;
  374. strAppConfFilePath = ""; //配置文件路径
  375. strDeviceName = "";//探测器名称
  376. strPartNumber = "";
  377. strWifiSSID = "";
  378. strPanelSerial = "";
  379. strFPDConfFilePath = "";//探测器自身配置文件路径
  380. strDetectorWiredIP = "";
  381. strDetectorWirelessIP = "";
  382. strLocalIP = "";
  383. strCalibrationDate = ""; //校正日期
  384. strCalibrationDue = "";
  385. strCalibrationLTEDate = ""; //LTE校正日期
  386. strCalibrationLTEDue = "";
  387. strInterfaceBoard = "";
  388. strDateCode = "";
  389. strFirmware = "";
  390. strSoftware = "";
  391. strWorkDir = ""; //SDK配置文件路径
  392. strSupportSyncMode = "";
  393. strShowTemperature = "";
  394. strShowWifi = "";
  395. strShowBattery = "";
  396. strShowBluetooth = "";
  397. strLastCalibrationDate = "";
  398. strCalibrationFileExpireTime = "";
  399. strCalibrationFileExpirationReminder = "";
  400. bSupportDDR = false;
  401. nOffsetInterval = 30;
  402. nDetectorWidth = 0;
  403. nDetectorHeight = 0;
  404. nCalibMode = 0;
  405. nReconnectTimePeriod = 0;
  406. }
  407. };
  408. enum FdInitStatus
  409. {
  410. FD_INIT_NULL = -1,
  411. FD_INIT_FAILED = 0,
  412. FD_INIT_SUCCESS = 1,
  413. };
  414. enum GridConf
  415. {
  416. GRID_CONF_AUTO = 0,
  417. GRID_CONF_YES = 1,
  418. GRID_CONF_NO = 2,
  419. };
  420. enum GridState
  421. {
  422. GRID_STATE_ERROR = -3,
  423. GRID_STATE_PARAM_ERROR = -2,
  424. GRID_STATE_PARAM_NULL = -1,
  425. GRID_STATE_NO = 0,
  426. GRID_STATE_VERTICAL = 1,
  427. GRID_STATE_HORIZONTAL = 2,
  428. };
  429. enum TemperatureStatus
  430. {
  431. TEMP_NORMAL = 0,
  432. TEMP_WARNING, //1
  433. TEMP_TOO_HIGH, //2
  434. TEMP_TOO_LOW, //3
  435. };
  436. enum AppStatus
  437. {
  438. APP_STATUS_IDLE = 0,
  439. APP_STATUS_WORK_BEGIN, //1
  440. APP_STATUS_WORK_END, //2
  441. APP_STATUS_DETSHARE_BEGIN, //3
  442. APP_STATUS_DETSHAR_END, //4
  443. APP_STATUS_CAL_BEGIN, //5
  444. APP_STATUS_CAL_END, // 6
  445. APP_STATUS_WORK_IN_SENSITIVITY, //7
  446. APP_STATUS_MAX,
  447. };
  448. #pragma endregion DEFINITION