FPDCtrlDefinition.h 11 KB

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