DetectorCtrlDefinition.h 11 KB

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