DetectorCtrlDefinition.h 10.0 KB

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