IRayDefinition.h 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485
  1. #pragma once
  2. #include <string>
  3. extern const char * TriggerModeName[];
  4. extern const char * PanelStatus[];
  5. extern const char * PanelErrorStatus[];
  6. extern const char * DetectorState[];
  7. extern const char * PrepCapMode[];
  8. extern const char * Enm_Switch[];
  9. extern const char * InnerSubFlow[];
  10. typedef struct
  11. {
  12. int nReferDose;
  13. int nAvgNum;
  14. }RefrenceCal;
  15. enum FW_STATUS
  16. {
  17. FW_NEED_UPDATE = 1,
  18. FW_MANDATORY_UPDATE,
  19. FW_NOT_SUPPORT,
  20. FW_NEW,
  21. FW_GET_ERROR
  22. };
  23. enum IRAY_TRIGGER_MODE
  24. {
  25. TRIGGER_NONE,
  26. TRIGGER_SOFT,
  27. TRIGGER_INNER,
  28. TRIGGER_INNER2,
  29. TRIGGER_FREESYNC,
  30. TRIGGER_PREP,
  31. TRIGGER_MAX
  32. };
  33. enum IRAY_SYNCMODE_CHANGE
  34. {
  35. E_IRAY_SYNCMODE_NOCHANGE = 0,
  36. E_IRAY_SYNCMODE_CHANGED = 2,
  37. E_IRAY_SYNCMODE_SETFAILED = 4
  38. };
  39. enum ENUM_EXPOSE_STATUS
  40. {
  41. DOSE_ACCEPT = 0,
  42. DOSE_TOO_HIGH = 1,
  43. DOSE_TOO_LOW = 2,
  44. DOSE_OBJECT = 3
  45. };
  46. //探测器异步事件状态
  47. enum ENUM_PANEL_EVENT_STATE
  48. {
  49. PANEL_EVENT_END_OK = 0,
  50. PANEL_EVENT_END_ERROR = 1,
  51. PANEL_EVENT_START = 2,
  52. PANEL_EVENT_SUCCESS = 3,
  53. PANEL_EVENT_END = 4,
  54. PANEL_EVENT_BEGIN = 5,
  55. PANEL_EVENT_TIMEOUT = 6,
  56. PANEL_EVENT_FWU_ERROR_BATTERY = 7,
  57. PANEL_EVENT_CALIB_REPORT = 8,
  58. PANEL_EVENT_FWU_ERROR_OMIT = 9,
  59. };
  60. typedef enum
  61. {
  62. EVT_LEVEL_CONFIGURATION = 0x00,
  63. EVT_LEVEL_INFORMATOION = 0x01,
  64. EVT_LEVEL_STATUS = 0x02,
  65. EVT_LEVEL_DATA = 0x03,
  66. EVT_LEVEL_WARNING = 0x04,
  67. EVT_LEVEL_ERROR = 0x05,
  68. } CcosEventLevel;
  69. typedef enum
  70. {
  71. EVT_CONF_PANEL_SERIAL = 0x00,
  72. EVT_CONF_RAW_WIDTH = 0x01,
  73. EVT_CONF_RAW_HIGHT = 0x02,
  74. EVT_CONF_RAW_BITS = 0x03,
  75. EVT_CONF_PIXELSPACE = 0x04,
  76. EVT_CONF_PREVIEW_WIDTH = 0x05,
  77. EVT_CONF_PREVIEW_HIGHT = 0x06,
  78. EVT_CONF_MODULE_TYPE = 0x07,
  79. EVT_CONF_MODULE_IP = 0x08,
  80. EVT_CONF_MODULE_SN = 0x09,
  81. EVT_CONF_FIRWARE_UPDATE = 0x0A,
  82. EVT_CONF_PART_NUMBER = 0x0B,
  83. EVT_CONF_BATTERY_SN = 0x0C,
  84. EVT_CONF_WIFI_SSID = 0x0D,
  85. EVT_CONF_IFBOARD = 0x0E,
  86. EVT_CONF_DATECODE = 0x0F,
  87. EVT_CONF_LIFETIME = 0x10,
  88. } CcosEventConfigID;
  89. typedef enum
  90. {
  91. EVT_INFO_POWER_ON = 0x00,
  92. EVT_INFO_BATTERY_CAPACITY = 0x01,
  93. EVT_INFO_BATTERY_TEMPERATURE = 0x02,
  94. EVT_INFO_BATTERY_CHARGES = 0x03,
  95. EVT_INFO_WIFI_DATARATE = 0x04,
  96. EVT_INFO_WIFI_CHANNEL = 0x05,
  97. EVT_INFO_WIFI_SIGNALPOWER = 0x06,
  98. EVT_INFO_WIFI_NOISEPOWER = 0x07,
  99. EVT_INFO_FIRMWARE = 0x08,
  100. EVT_INFO_SHOCKSENSOR_INFO = 0x09,
  101. EVT_INFO_CALIBRATIOIN_DATE = 0x0A,
  102. EVT_INFO_FPVOLTAGE = 0x0B,
  103. EVT_INFO_CALIBRATIOIN_DATEL = 0x0C, //长曝光模式
  104. EVT_INFO_CALIBRATIOIN_TIME = 0x0D,
  105. EVT_INFO_CALIBRATIOIN_TIMEL = 0x0E,
  106. } CcosEventInfoID;
  107. typedef enum
  108. {
  109. EVT_STATUS_INIT = 0x00,
  110. EVT_STATUS_MOTION = 0x01,
  111. EVT_STATUS_UPDATE_FIRMWARE = 0x02,
  112. EVT_STATUS_SELFTEST = 0x03,
  113. EVT_STATUS_DETECTORSHARE = 0x04,
  114. EVT_STATUS_SINGLEINIT = 0x05,
  115. EVT_STATUS_SELECTPANEL = 0x06,
  116. EVT_STATUS_PANEL = 0x07,
  117. EVT_STATUS_CALIBRATIOIN = 0x08,
  118. EVT_STATUS_SAVECALIB = 0x09,
  119. EVT_STATUS_SAVEDEFECT = 0x0A,
  120. EVT_STATUS_ACQUISITION = 0x0B,
  121. EVT_STATUS_SINGLEEXP = 0x0C,
  122. EVT_STATUS_IMAGEPENDING = 0x0D,
  123. EVT_STATUS_TEMPERATURE = 0x0E,
  124. EVT_STATUS_WIFI = 0x0F,
  125. EVT_STATUS_BATTERY_VALUE = 0x10,
  126. EVT_STATUS_BATTERY_CHARGING = 0x11,
  127. EVT_STATUS_SHOCK_SENSOR = 0x12,
  128. EVT_STATUS_HALL_SENSOR = 0x13,
  129. EVT_STATUS_PING = 0x14,
  130. EVT_STATUS_PMSNOTOPEN = 0x15,
  131. EVT_STATUS_RESTOREFILES = 0x16,
  132. EVT_STATUS_LASTERROR = 0x17,
  133. EVT_STATUS_RESET = 0x18,
  134. EVT_STATUS_IMAGERECOVERAUTO = 0x19,
  135. EVT_STATUS_PREPARE_EDNCALIBRATION = 0x21,
  136. } CcosEventStatusID;
  137. typedef enum
  138. {
  139. EVT_DATA_RAW_IMAGE = 0x00,
  140. EVT_DATA_PREVIEW_IMAGE = 0x01,
  141. EVT_DATA_DOSEPARAM = 0x02,
  142. } CcosEventDataID;
  143. typedef enum
  144. {
  145. EVT_ERR_COMMUNICATE = 0x00,
  146. EVT_ERR_EXP_REQUEST = 0x01,
  147. EVT_ERR_GET_IMAGE = 0x02,
  148. EVT_ERR_MAX_NUMBER = 0x03,
  149. EVT_ERR_SN_NOTINLIST = 0x04,
  150. EVT_ERR_POWER_OFF = 0x05,
  151. EVT_ERR_INIT_FAILED = 0x06,
  152. } CcosEventErrorID;
  153. //探测器状态
  154. enum ENUM_PANEL_STATUS
  155. {
  156. PANEL_CLOSE = 0,
  157. PANEL_STANDBY = 1,
  158. PANEL_READY_EXP = 2,
  159. PANEL_XWINDOW_ON = 3,
  160. PANEL_XWINDOW_OFF = 4,
  161. PANEL_START_TRANSMIT = 5,
  162. PANEL_END_TRANSMIT = 6,
  163. PANEL_START_ACQ = 7,
  164. PANEL_END_ACQ = 8,
  165. PANEL_EXP_END_TIMEOUT = 9,
  166. PANEL_OFFSET_CAL = 10,
  167. PANEL_OFFSET_FINISH = 11,
  168. PANEL_GAIN_CAL = 12,
  169. PANEL_GAIN_FINISH = 13,
  170. PANEL_DEFECT_CAL = 14,
  171. PANEL_DEFECT_FINISH = 15,
  172. PANEL_AED_XRAY_ON = 16,
  173. PANEL_AED_XRAY_OFF = 17,
  174. PANEL_INIT = 21,
  175. PANEL_SLEEP = 22,
  176. PANEL_GET_IMAGE = 23,
  177. PANEL_GAIN_PREPARE = 24,
  178. PANEL_GAIN_READY_EXP = 25,
  179. PANEL_OFFSET_FAILED = 26,
  180. };
  181. struct DeviceIndexStruct
  182. {
  183. bool bInitOK;
  184. bool bConnectStatus;
  185. bool bActived;
  186. bool bExisted;
  187. bool bEventReturn;
  188. bool bSetCorrection;
  189. bool bReadWifi;
  190. bool bHallSensor;
  191. bool bReadTemperature;
  192. bool bReadBattery;
  193. bool bTaskEnd;
  194. bool bCharging;
  195. bool bUpdateFirmware;
  196. bool bUploadCalibFile;
  197. bool bRecoveringImage;
  198. bool bWireless;
  199. bool bLivingTime;
  200. bool bImagePending;
  201. bool bConnectChanged;
  202. bool bPreviewEnable;
  203. bool bStatusPollEnable;
  204. bool bTemperatureEnable;
  205. bool bBatteryEnable;
  206. bool bWifiEnable;
  207. int nSyncMode;
  208. int nSaturationValue;
  209. int nPanelID;
  210. int nDoseOfEXI;
  211. int nWorkstation;
  212. int nWifiWarning;
  213. int nWifiLimit;
  214. int nCurrentWifiValue;
  215. int nBatteryWarning;
  216. int nBatteryLimit;
  217. int nCurrentBatteryValue;
  218. int nWifiChannel;
  219. int nWifiDataRate;
  220. int nWifiSignalPower;
  221. int nWifiNoisePower;
  222. int nCalibDueSetting;
  223. int nShockTimes;
  224. int nMaxShockNumber;
  225. int nForceGridSuppress;
  226. float fGradientMean;
  227. float fGradientStdDev;
  228. int nGridSuppressed;
  229. float fGridSuppressParam1;
  230. float fGridSuppressParam2;
  231. float fGridSuppressParam3;
  232. float fGridSuppressParam4;
  233. float fGridSuppressParam5;
  234. float fGridSuppressParam6;
  235. float fGridSuppressParam7;
  236. float fGridSuppressParam8;
  237. float fGridSuppressParam9;
  238. float fCalibTemperature;
  239. float fCalibTemperatureLTE;
  240. float fCalibTemperature1;
  241. float fCalibTemperature2;
  242. int nSaveRaw;
  243. int nSID;
  244. int nCorrectionType; //校正策略
  245. int nCalibMode; //校正方式:0(ZSKK校正);1(厂商校正)
  246. //ECM信息相关
  247. int nImageBits;
  248. int nRawWidth;
  249. int nRawHeight;
  250. int nFullImageWidth;
  251. int nFullImageHeight;
  252. int nPreviewWidth;
  253. int nPreviewHeight;
  254. int nWidthOffset;
  255. int nHeightOffset;
  256. int nImageLeftOffset;
  257. int nImageTopOffset;
  258. int nImageRightOffset;
  259. int nImageBottomOffset;
  260. int nGridSuppFilterType;
  261. int nLifeTime;
  262. int nPowerOn;
  263. int nFirmwareStatus;
  264. int nTemperatureStatus;
  265. int nLastImageID;
  266. int nPixelSpace; //像素大小
  267. int nExpWindowMode;
  268. int nXWindow;
  269. float fFactorEXI2UGY; //探测器EXI -> UGY 转换系数
  270. //Temperature
  271. float fTemperMaxLimit;
  272. float fTemperUpLimit;
  273. float fTemperLowLimit;
  274. float fTemperMinLimit;
  275. float fCalibTemperUp;
  276. float fCalibTemperLow;
  277. float fCurrentTemperValue;
  278. std::string strDetectorModel; //探测器类型
  279. std::string strDeviceName; //探测器名称
  280. std::string strPartNumber;
  281. std::string strWifiSSID;
  282. std::string strPanelSerial;
  283. std::string strFPDConfFilePath;//探测器自身配置文件路径
  284. std::string strIPAddress; //探测器IP
  285. std::string strWiredIP; //有线IP
  286. std::string strWirelessIP; //无线IP
  287. std::string strLocalIP; //本地IP
  288. std::string strCalibrationDate; //校正日期
  289. std::string strCalibrationTime; //校正时间
  290. std::string strCalibrationDue; //校正过期日
  291. std::string strCalibrationLTEDate; //LTE校正日期
  292. std::string strCalibrationLTETime; //LTE校正时间
  293. std::string strCalibrationLTEDue; //LTE校正过期日
  294. std::string strDateCode;
  295. std::string strFirmware;
  296. std::string strSoftware;
  297. std::string strWorkDir; //SDK配置文件路径
  298. std::string strLastCalibrationDate; //上一次校正日期时间
  299. std::string strCalibrationFileExpireTime; //校正文件过期天数
  300. DeviceIndexStruct()
  301. {
  302. bInitOK = false;
  303. bConnectStatus = false;
  304. bExisted = false;
  305. bEventReturn = false;
  306. bSetCorrection = false;
  307. bReadWifi = false;
  308. bHallSensor = false;
  309. bReadTemperature = false;
  310. bReadBattery = false;
  311. bTaskEnd = true;
  312. bCharging = false;
  313. bUpdateFirmware = false;
  314. bUploadCalibFile = false;
  315. bRecoveringImage = false;
  316. bWireless = false;
  317. bLivingTime = false;
  318. bImagePending = false;
  319. bConnectChanged = false;
  320. bActived = true;
  321. bStatusPollEnable = false;
  322. bTemperatureEnable = false;
  323. bBatteryEnable = false;
  324. bWifiEnable = false;
  325. nCalibMode = 0;
  326. strDetectorModel = ""; //探测器名称
  327. strDeviceName = ""; //探测器名称
  328. strWifiSSID = "NULL"; //无线探测器SSID名称
  329. nSyncMode = 0;
  330. nSaturationValue = 0;
  331. nGridSuppressed = 0;
  332. nPanelID = 0;
  333. nDoseOfEXI = 0;
  334. strPanelSerial = "";
  335. strFPDConfFilePath = "";//探测器自身配置文件路径
  336. strCalibrationDate = (" ");
  337. strCalibrationTime = (" ");
  338. strCalibrationDue = (" ");
  339. strCalibrationLTEDate = (" ");
  340. strCalibrationLTETime = (" ");
  341. strCalibrationLTEDue = (" ");
  342. fFactorEXI2UGY = 0.0f;
  343. bPreviewEnable = false;
  344. fTemperMaxLimit = 0.0f;
  345. fTemperUpLimit = 0.0f;
  346. fTemperLowLimit = 0.0f;
  347. fTemperMinLimit = 0.0f;
  348. fCalibTemperUp = 0.0f;
  349. fCalibTemperLow = 0.0f;
  350. fCalibTemperature = 0.0f;
  351. fCalibTemperatureLTE = 0.0f;
  352. fCalibTemperature1 = 0.0f;
  353. fCalibTemperature2 = 0.0f;
  354. fCurrentTemperValue = 0.0f;
  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. fGradientMean = 0.0;
  372. fGradientStdDev = 0.0;
  373. nGridSuppressed = 0;
  374. fGridSuppressParam1 = 0.0;
  375. fGridSuppressParam2 = 0.0;
  376. fGridSuppressParam3 = 0.0;
  377. fGridSuppressParam4 = 0.0;
  378. fGridSuppressParam5 = 0.0;
  379. fGridSuppressParam6 = 0.0;
  380. fGridSuppressParam7 = 0.0;
  381. fGridSuppressParam8 = 0.0;
  382. fGridSuppressParam9 = 0.0;
  383. nSaveRaw = 0;
  384. nSID = 0;
  385. nPixelSpace = 143;
  386. //ECM信息相关
  387. nImageBits = 0;
  388. nRawWidth = 0;
  389. nRawHeight = 0;
  390. nFullImageWidth = 0;
  391. nFullImageHeight = 0;
  392. nPreviewWidth = 0;
  393. nPreviewHeight = 0;
  394. nWidthOffset = 0;
  395. nHeightOffset = 0;
  396. nLifeTime = 0;
  397. nPowerOn = 0;
  398. nFirmwareStatus = -1;
  399. nTemperatureStatus = 0;
  400. nLastImageID = 0;
  401. strWiredIP = "";
  402. strWirelessIP = "";
  403. strLocalIP = "";
  404. strWorkDir = "";
  405. strLastCalibrationDate = "0000-00-00 00:00:00";
  406. strCalibrationFileExpireTime = "365";
  407. }
  408. };
  409. enum APP_STATUS
  410. {
  411. APP_STATUS_IDLE = 0,
  412. APP_STATUS_WORK_BEGIN, //1
  413. APP_STATUS_WORK_END, //2
  414. APP_STATUS_DETSHARE_BEGIN, //3
  415. APP_STATUS_DETSHAR_END, //4
  416. APP_STATUS_CAL_BEGIN, //5
  417. APP_STATUS_CAL_END, // 6
  418. APP_STATUS_WORK_IN_SENSITIVITY, //7
  419. };
  420. enum GRID_STATUS
  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 TEMP_STATUS
  430. {
  431. TEMP_NORMAL = 0,
  432. TEMP_WARNING, //1
  433. TEMP_TOO_HIGH, //2
  434. TEMP_TOO_LOW, //3
  435. };