iRayCtrlDefinition.h 12 KB

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