ECOM-types.h 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209
  1. // Copyright (c) 2002-2015 ECOM. All Rights Reserved.
  2. // All the information contained in this file remain the sole and exclusive
  3. // property of ECOM and shall not be disclosed by the recipient to a third
  4. // party without the prior consent of ECOM.
  5. /*! \file ECOM-types.h
  6. Abstract:
  7. This module defines the ECOM data structures.
  8. It includes :
  9. - .
  10. */
  11. #ifndef _ECOM_TYPES_H
  12. #define _ECOM_TYPES_H
  13. #include "DeviceConf_API.h"
  14. #include "HWStructure.h"
  15. #ifdef __cplusplus
  16. extern "C" {
  17. #endif
  18. #define FPD_HEADER_LEN 4096
  19. #define LEN_16 16
  20. #define LEN_8 8
  21. typedef enum{
  22. ERR_SUCCESS = 0,
  23. ERR_GENERAL = 1,
  24. LOAD_ERROR = 100,
  25. ERR_LOAD_OFFSET_REF = LOAD_ERROR + 1,
  26. ERR_LOAD_GAIN = LOAD_ERROR + 2,
  27. ERR_LOAD_DEFECTMAP = LOAD_ERROR + 3,
  28. ERR_LOAD_BADLINE = LOAD_ERROR + 4,
  29. ERR_SAVE_GAIN = LOAD_ERROR + 5,
  30. ERR_SAVE_DEFECTMAP = LOAD_ERROR + 6,
  31. }ecom_error;
  32. typedef struct
  33. {
  34. int nImageType;
  35. int nImageWidth;
  36. int nImageHeight;
  37. int nSaturationValue;
  38. int nGainRefNum;
  39. int nSaveRawDataMode;
  40. int nLicense;
  41. float fXwindow;
  42. CString strPanelName;
  43. CString strExposeMode;
  44. }Struct_EcomCalib;
  45. struct FPDImageHeader
  46. {
  47. float fFPDHeaderVersion;
  48. int nImageType; //
  49. int nImageWidth;
  50. int nImageHeight;
  51. int nImageBits;
  52. int nFactorEXI2UGY;
  53. float fImageReferUGY;
  54. float fTemperature;
  55. float fPixelSpace;
  56. char strViewDimension[LEN_16];
  57. char strDetectorID[LEN_16];
  58. char strCalibDate[LEN_8];
  59. char strCalibTime[LEN_16];
  60. char strBinning[LEN_16];
  61. FPDImageHeader()
  62. {
  63. fFPDHeaderVersion = 0.0;
  64. nImageType = 0; //0full 1Preivew
  65. nImageWidth = 3000;
  66. nImageHeight = 3000;
  67. nImageBits = 16;
  68. nFactorEXI2UGY = 150;
  69. fImageReferUGY =0.0f;
  70. fTemperature = 0.0f;
  71. fPixelSpace = 0.148f;
  72. strcpy_s(strViewDimension,LEN_16,"43\\43");
  73. strcpy_s(strDetectorID,LEN_16,"2012/12/21");
  74. memcpy(strCalibDate,"20150510",LEN_8);
  75. strcpy_s(strCalibTime,LEN_16,"192108");
  76. strcpy_s(strBinning,LEN_16,"1\\1");
  77. }
  78. };
  79. typedef struct DeviceIndexStruct
  80. {
  81. int Realindex;
  82. int HWindex;
  83. CString strAppConfFilePath; //配置文件路径
  84. CString strDeviceName; //探测器名称
  85. int nSyncMode;
  86. int nCalibrationMode;
  87. int nPanelExpWindowMode;
  88. int nSaveRawDataMode;
  89. int nSaturationValue;
  90. int nGridSuppressed;
  91. int nPanelID;
  92. int nCOMPort;
  93. int nPanelChannel;
  94. int nDoseOfEXI;
  95. int nRequirehwMode;
  96. float fStandardUgy;
  97. CString strPanelSerial;
  98. CString strFPDConfFilePath;//探测器自身配置文件路径
  99. CString strIPAddress;
  100. bool bPreviewEnable;
  101. float fTemperWarning;
  102. float fTemperLimit;
  103. float fCurrentTemperValue;
  104. int nWifiWarning;
  105. int nWifiLimit;
  106. int nCurrentWifiValue;
  107. int nBatteryWarning;
  108. int nBatteryLimit;
  109. int nCurrentBatteryValue;
  110. float fPixelSpace; //像素大小
  111. //ECM信息相关
  112. int nImageBits;
  113. int nRawWidth;
  114. int nRawHeight;
  115. int nFullImageWidth;
  116. int nFullImageHeight;
  117. int nPreviewWidth;
  118. int nPreviewHeight;
  119. int nWidthOffset;
  120. int nHeightOffset;
  121. // CalibModeInfo vecCalibInfo;
  122. vector<RefrenceCal> vecRefrenceCal;
  123. DeviceIndexStruct()
  124. {
  125. Realindex = 0;
  126. HWindex = 0;
  127. strAppConfFilePath = _T(""); //配置文件路径
  128. strDeviceName = _T(""); //探测器名称
  129. nSyncMode = 0;
  130. nCalibrationMode = 0;
  131. nPanelExpWindowMode = 0;
  132. nSaveRawDataMode = 0;
  133. nSaturationValue = 0;
  134. nGridSuppressed = 0;
  135. nPanelID = 0;
  136. nCOMPort = 0;
  137. nPanelChannel =0 ;
  138. nDoseOfEXI = 0;
  139. nRequirehwMode = 0;
  140. strPanelSerial = _T("");
  141. strFPDConfFilePath = _T("");//探测器自身配置文件路径
  142. fStandardUgy = 0.0;
  143. bPreviewEnable = false;
  144. fTemperWarning = 0.0;
  145. fTemperLimit = 0.0;
  146. fCurrentTemperValue = 0.0;
  147. nWifiWarning = 0;
  148. nWifiLimit = 0;
  149. nCurrentWifiValue = 0;
  150. nBatteryWarning = 0;
  151. nBatteryLimit = 0;
  152. nCurrentBatteryValue = 0;
  153. fPixelSpace = 0.143f;
  154. //ECM信息相关
  155. nImageBits = 0;
  156. nRawWidth = 0;
  157. nRawHeight = 0;
  158. nFullImageWidth = 0;
  159. nFullImageHeight = 0;
  160. nPreviewWidth = 0;
  161. nPreviewHeight = 0;
  162. nWidthOffset = 0;
  163. nHeightOffset = 0;
  164. }
  165. };
  166. typedef enum APPLICATION_STATUS
  167. {
  168. APPLICATION_IDLE = 0,
  169. APPLICATION_WORK_STATUS ,
  170. APPLICATION_CAL_STATUS,
  171. APPLICATION_CAL_END_STATUS, //校正中最后一次曝光获知
  172. };
  173. #ifdef __cplusplus
  174. }
  175. #endif
  176. #endif