IRayDMCtrl.h 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488
  1. #pragma once
  2. #include "CCOS.Dev.FPD.iRayDM.h"
  3. #include "include/IRayFpdSys_MAM.h"
  4. const int SCAN_EVENT_NUM = 5;
  5. namespace CCOS::Dev::Detail::Detector
  6. {
  7. namespace nsDPC = CCOS::Dev::Detail::Detector;
  8. class IRayCtrl
  9. {
  10. string g_strAppPath;
  11. int m_nPanelCount;
  12. int m_nCurrentPanelID;
  13. void* m_pCurrentDPC;
  14. map<FPDDeviceIRay*, int>* m_pDPC2PanelID;
  15. map<int, FPDDeviceIRay*>* m_pPanelID2DPC;
  16. DeviceIndexStruct m_stDeviceIndex[3]; //配置的探测器列表
  17. ResDataObject m_ObjFPDsInfo[3]; //存储探测器数量和类型
  18. //int m_nActiveFPDAppMode[2];
  19. WORD* m_pImgBuffer;
  20. WORD* m_pwRawImageData; //原始图像内存
  21. WORD* m_pwPreviewImg; //preview内存
  22. int m_nCmdConnectResult;
  23. ENUM_PANEL_STATUS m_ePanelStatus; //探测器的状态 PARPARE READY WINDOWON OFF
  24. //DeviceErrorInfor m_WarnRes; //warn配置文件列表
  25. //DeviceErrorInfor m_ErrRes; //error配置文件列表
  26. //DeviceErrorList m_ErrList; //当前错误列表
  27. //DeviceErrorList m_ErrListTemp; //初始化时未发送到UI的ERROR
  28. //DeviceErrorList m_WarnList; //当前错误列表
  29. //int m_nExpTag; //Siemens未用,曝光帧数
  30. //CFPDMSMProxy m_fpdMSM; //状态机实例
  31. //CStringArray m_strErrorCodes;//要恢复的错误号列表,目前只用来存储单个错误号
  32. //int m_nErrorIndex;
  33. //UINT_PTR m_ntimer_GetHardware; // 查询WIFI电量的定时器
  34. //UINT_PTR m_ntimer_CheckCalibration; // 查询WIFI电量的定时器
  35. //UINT_PTR m_ntimer_TemperCheck;
  36. //UINT_PTR m_ntimer_ResetSNList;
  37. //UINT_PTR m_ntimer_ReconnectFPD;
  38. bool m_bOpened; //初始化开始与否;初始化未开始,屏蔽DLL反馈的各种状态信息;
  39. bool m_bInitialing;
  40. //bool m_bBatteryCharging; //电池充电与否的状态
  41. //bool m_bRecoveringImage;//是否在恢复图像的流程中;若是,屏蔽其他错误,以防止干扰恢复图像的界面流程
  42. //bool m_bAbortRecover; //放弃恢复图像(状态),恢复图像过程中中止,恢复图像失败的提示不再往上发送;目前不起作用
  43. //bool m_bSNListExisted;
  44. //bool m_bSetCorrectFile;
  45. //bool m_bSendRecoverMessage;
  46. //bool m_bHasGrid; // XCU通知有栅/无栅的状态
  47. //bool m_bContinueCalibration; //校正报错后是否继续校正
  48. //bool m_bHasSNList;
  49. //bool m_bTestSensitivity;
  50. //bool m_bPingStatus;
  51. //bool m_bDefectAccept;
  52. //bool m_bDoorOpen;
  53. //bool m_bForceGridSuppress;
  54. bool m_bInCalibrating;
  55. bool m_bInExposure;
  56. bool m_bWindowOn; //曝光窗口是否打开了
  57. bool m_bPMSLoginStatus;
  58. bool m_bShowAttachInfo;
  59. bool m_bModuleConnecting;
  60. bool m_bModulePresent;
  61. volatile bool m_bScanResult;
  62. string m_strSourceID; //非SIEMENS用,FPDAPP用 FPDAPP的BUS SOURCE
  63. wstring m_wcsRecoverInfo; //恢复图像的结果,包含序列号和成功/失败的一个JSON结构体
  64. string m_strCalibTime;
  65. string m_strWorkdir_Template;
  66. //int m_nReconnectTimes;
  67. int m_nDoseParam;// 校正用的曝光计量,发送到UI 且本地记录
  68. int m_nRequireTimer; //查询WIFI电量的周期,Patient界面 10分钟检查一次
  69. int m_nRecoverImageTimes; // 恢复图像失败的次数,每2次提示用户一次
  70. //int m_nComPort ; //红外适配器用的串口号
  71. //int m_nConnectTimeout;
  72. int m_nCalibDueSetting; // 校正文件的保质期天数
  73. int m_nFixedFDPlace;//固定板在哪个工作位
  74. int m_nOffsetTime;
  75. long m_nGrayHist[256]; // 统计defect文件,每个坏点分类的个数
  76. int m_nOldDay; //校正日期定期检查的上次时间(某一天)
  77. //int m_nTemperCheckTimes;//温度已经查询的时间
  78. //int m_nTemperCheckTimeConf;//温度检查查询多久,配置项
  79. /*int m_nCalibStatus;
  80. int m_nTemperCheckResult;
  81. int m_nSID;
  82. int m_nXCUStatus;
  83. int m_nMaxShockNumber;
  84. int m_nBatteryCapacity;
  85. int m_nBatteryCharges;
  86. int m_nGridLicense;
  87. float m_fCalibTemperature1;
  88. float m_fCalibTemperature2;
  89. float m_fCalibTemperature;
  90. float m_fBatteryTemperature;
  91. float m_fTemperatureMin;
  92. float m_fTemperatureMax;
  93. float m_fGradientMean;
  94. float m_fGradientStdDev;
  95. bool m_bDueDateWarnSend;
  96. bool m_bWallDueDateWarnSend;*/
  97. //校正相关变量
  98. /*list<RefrenceCal> m_listCalibItem;
  99. list<RefrenceCal>::iterator m_iterCalibDose;*/
  100. //int m_nCalibrationMode; //校正模式,ZSKK or Factory
  101. //int m_nDefectExpTimes;
  102. //int m_nDefectTotalTimes;
  103. //int m_nGainExpTimes;
  104. //int m_nGainTotalFrames;
  105. //int m_nDefectTotalFrames;
  106. //int m_nPingSuccessTime; //ping成功次数,iRay探测器ping成功不代表能连接上探测器,需要等待一段时间,目前等待一分钟
  107. //int m_nActiveState;
  108. //int m_nLastExpFDIndex;
  109. //bool m_bImageRecoverBeCanceled;
  110. //string m_strLastError; //DLL反馈的错误内容
  111. void ConfFeedback(int nEventID, int nDetectorID = -1, const char* pszMsg = "", int nParam1 = 0, float fParam2 = 0, int nPtrParamLen = 0, void* pParam = NULL);
  112. void InfoFeedback(int nEventID, int nDetectorID = -1, int nParam1 = 0, float fParam2 = 0, const char* pszMsg = "", int nPtrParamLen = 0, void* pParam = NULL);
  113. void StatusFeedback(int nEventID, int nParam1 = 0, const char* pszMsg = "", int nDetectorID = -1, float fParam2 = 0, int nPtrParamLen = 0, void* pParam = NULL);
  114. void DataFeedback(int nEventID, void* pParam = NULL, int nParam1 = 0, float fParam2 = 0, const char* pszMsg = "", int nPtrParamLen = 0, int nDetectorID = -1);
  115. void WarnFeedback(int nEventID, const char* pszMsg = "", int nParam1 = 0, float fParam2 = 0, int nPtrParamLen = 0, void* pParam = NULL, int nDetectorID = -1);
  116. void ErrorFeedback(int nEventID, const char* pszMsg = "", int nDetectorID = -1, int nParam1 = 0, float fParam2 = 0, int nPtrParamLen = 0, void* pParam = NULL);
  117. //bool SetPrepCapMode(int nDetectorID, int nPrepCapMode);
  118. //bool SetSelfCapEnable(int nDetectorID, int nSelfCapEnable);
  119. //bool SetSelfClearEnable(int nDetectorID, int nSelfClearEnable);
  120. //bool SetDynaOffsetGapTime(int nDetectorID, int nDynaOffsetGapTime);
  121. //bool SetInnerSubFlowAttr(int nDetectorID, int nInnerSubFlow);
  122. //bool SetXWindowDelay(int nDetectorID, int nXWidnowTime);
  123. //bool GetExpWindowTime(int nDetectorID, int& nExpWindowTime);
  124. //bool SetExpWindowTime(int nDetectorID, int nExpWindow);
  125. //bool GetDetectorStatus(int nDetectorID, int& state);
  126. //bool ReadBatteryStatus(int nPanelIndex);
  127. //bool CheckBattery(int nPanelIndex, bool bLog = true);
  128. //bool GetBatterySN(int nDetectorID, char* inoutSN);
  129. //bool GetBatteryExist(int nDetectorID, int& nExist);
  130. //bool GetBatteryRemaining(int nDetectorID, int& nRemaining);
  131. //bool GetBatteryChargingStatus(int nDetectorID, int& nStatus);
  132. //bool GetFPDTempT1(int nDetectorID, float& fTempT1);
  133. //bool GetHallSensor(int nDetectorID, int& nPosition);
  134. //bool GetLifeTime(int nDetectorID, int& nLifeTime);
  135. //bool GetPowerOnCount(int nDetectorID, int& nPowerOnCount);
  136. //bool GetCorrectionOption(int nDetectorID, int& nOption);
  137. //bool GetFWUpdateProgress(int nDetectorID, int& nOption);
  138. //bool ReadWifiStatus(int nPanelIndex);
  139. //bool CheckWiFi(int nPanelIndex, bool bLog = true);
  140. //bool CheckTemperature(int nPanelIndex);
  141. //bool ReadTempStatus(int nPanelIndex);
  142. //bool ReadLivingTime(int nDetectorID);
  143. //bool CheckLivingTime(int nDetectorID);
  144. //bool GetProductNo(int nDetectorID, int&);
  145. //bool GetSrcIP(int nDetectorID, char* pszUROM_SrcIP);
  146. //bool GetSerialNo(int nDetectorID, char* pszUROM_SerialNo);
  147. //bool GetMainVersion(int nDetectorID, char* pszMainVersion);
  148. //bool GetReadVersion(int nDetectorID, char* pszReadVersion);
  149. //bool GetMcuVersion(int nDetectorID, char* pszMcuVersion);
  150. //bool GetArmVersion(int nDetectorID, char* pszArmVersion);
  151. //bool GetKernelVersion(int nDetectorID, char* pszKernelVersion);
  152. //bool GetDelayTime(int nDetectorID, int& nDelayTime);
  153. //bool SetDelayTime(int nDetectorID, int nDelayTime);
  154. //bool SetAppMode(int nDetectorID);
  155. //bool UploadCalibrationFileToFDindex10();
  156. //bool SetCorrectFile();
  157. //bool GetCorrectFileIndex(int& nGainMapIndex, int& nDefectMapIndex);
  158. //bool GetSetDelayTime(int nDetectorID, int& nSetDelayTime);
  159. //bool GetWifiLinkQuality(int nDetectorID, int& nQuality);
  160. //string ProductNo2Type(int nProductNo);
  161. //bool GetROMInfo(int nPanelIndex, bool bFDAttach);
  162. //bool GetXWindowDelay(int nDetectorID, int& nXWidnowTime);
  163. //bool GetPrepCapMode(int nDetectorID, int& nPrepCapMode);
  164. //bool GetConnState(int nDetectorID, int& nConnState);
  165. //bool GetSelfCapEnable(int nDetectorID, int& nSelfCapEnable);
  166. //bool GetSelfClearEnable(int nDetectorID, int& nSelfClearEnable);
  167. //bool GetDynaOffsetGapTime(int nDetectorID, int& nDynOffsetGapTime);
  168. //bool GetInnerSubFlow(int nDetectorID, int& nInnerSubFlow);
  169. //bool WriteRom(int nDetectorID);
  170. //int SetInnerSubFlow(int nDetectorID, int nInnerSubFlow);
  171. //int SetCapModeFunc(int nDetectorID, int nSetCapMode);
  172. //int SetFPDCalParam(int nDetectorID, int nSetSelfCapEnable, int nSetSelfClearEnable);
  173. //bool GetActivePanelNum(int& nFindActiveFD);
  174. //bool StartOffsetThread();
  175. //static DWORD OffsetThread(LPVOID pParam);
  176. //void DisconnectFD(int nDetectorID);
  177. //bool IsFWNeedUpdate(int nDetectorID);
  178. //bool UpdateFirmware(int nPanelIndex, bool bUpdate);
  179. //bool UploadCalibFileFromFD(int nDetectorID, int nIndex, string strFileName, bool bGain);
  180. //bool DownloadCalibrationFileToFD(bool bGainFile, bool bExpMode);
  181. //bool DownloadUserDefectFileToFD(bool bLTE);
  182. //bool ReadCumstomFile(int nDetectorID);
  183. //bool DownloadfromDetector(int nDetectorID);
  184. //bool BackupCalibFiles(int nDetectorID, bool bDownload, bool bExpMode);
  185. //bool DeleteOneFolder(string strSourceFolder);
  186. //bool CleanCalibFiles(int nDetectorID, bool bExpMode);
  187. //bool CleanCalibReport(int nDetectorID, bool bExpMode);
  188. //bool BackupCalibReport(int nDetectorID, bool bExpMode);
  189. //bool RestoreSensitivity(int nDetectorID);
  190. //bool RestoreCalibReport(int nDetectorID, bool bExpMode);
  191. //bool CheckLastImageStatus(int nDetectorID);
  192. //bool RecoverImage();
  193. //bool GetCalibrationTime(int nDetectorID, bool bExpMode);
  194. //void GetFwName(string strFirmPath, string& strFirmwareName);
  195. ////bool LoadSensitivity(int nDetectorID);
  196. //bool SyncTimePC2FD(int nDetectorID);
  197. //void OnProcessAttach();
  198. //void StartModuleThread();
  199. //static DWORD _stdcall onModuleThread(void* pParam); // 红外配对的线程
  200. //bool OnModuleConnect();
  201. //bool OnDetectorShareStatus(DETECTOR_SHARE_STATUS eStatus, int nDetectorID = 0);
  202. //bool IsConnected(string strIP);
  203. //bool CheckSNInList(string strSN, bool bGetIP, string& strIP);
  204. //bool InDetectorShare();
  205. //bool GetCurrentFDInfo();
  206. //bool GetConnectConf(int nDetectorID);
  207. //bool UpdatePanelSerialFile(string strPanelType, string strSN, string strSetIP, string strDate, bool bActive);
  208. ////bool GetPanelSNList(string strPanelSerial, PanelSerialList& stpanelInfo);
  209. //bool SetConnectConf(bool bConnect, int nDetectorID);
  210. //void SetAttachFPDInfo(string strFPDType, int nDetectorID);
  211. //bool ModifyConfigIni(string strIniPath, string strSN, string strIP);
  212. //bool CheckPanelSize(string strPanelType);
  213. //HANDLE m_pHardwareStatusThread;
  214. //HANDLE m_hEndHWStatusThreadEvent;
  215. //HANDLE m_hHWStatusThreadEndEvent;
  216. //bool StartHardwareStatusThread();
  217. //static DWORD HardwareStatusThread(LPVOID pParam);
  218. //bool GetHardwareStatus();
  219. //bool GetConnectionStatus(int nDetectorID);
  220. //bool AnalysisCalibrationData(bool bExpMode);
  221. //bool CreatCalibrationReport(bool bModifyItem, bool bExpMode);
  222. //int ParseDefectFile(int nPanelIndex, bool bExpMode, bool bManual = false);
  223. //bool OpenDefectTemplateFile(const char* pszFilePath, void** ppHandler, unsigned short* pWidth, unsigned short* pHeight, char** ppPoints, char** ppRows, char** ppCols, char** ppDualReadCols2);
  224. //bool CloseDefectTemplateFile(void* pHandler);
  225. //bool TestDefectFile();
  226. //bool SetLEDStatus(int nPanelIndex, bool bGreen);
  227. //HMODULE m_hFpdAttachModule;
  228. //FnGetAttachmentSDKVersion m_fpGetAttachmentSDKVersion;
  229. //FnRegisterDeviceStateNotify m_fpRegisterDeviceStateNotify;
  230. //FnInitLibrary m_fpInitLibrary;
  231. //FnUnInitLibrary m_fpUnInitLibrary;
  232. //FnGetFDInfo m_fpGetFDInfo;
  233. //FnSetFDIpWifiInfo m_fpSetFDIpWifiInfo;
  234. //FnSetFDIpInfo m_fpSetFDIpInfo;
  235. //FnSetFDWifiInfo m_fpSetFDWifiInfo;
  236. //int m_nRecoverImageTimes; // 自动恢复图像失败的次数,2次后终止,由用户操作
  237. HANDLE m_hArrayEvent[SCAN_EVENT_NUM];
  238. HANDLE m_hExitEvent;
  239. HANDLE m_hRecoverImage;
  240. HANDLE m_hCofirmCalib;
  241. HANDLE m_hEndCalibEvent;
  242. HANDLE m_hOffsetEvent;
  243. HANDLE m_hIRayScanEnd;
  244. HANDLE m_hSharedEvent;
  245. HANDLE m_hWindowOffEvent;
  246. HANDLE m_pOffsetThread;
  247. HANDLE m_pXWindowoffThread;
  248. HANDLE m_hScanEventThread;
  249. HANDLE m_hInitThread;
  250. public:
  251. IRayCtrl();
  252. ~IRayCtrl();
  253. bool Init(string strAppPath);
  254. bool AddDPCs(nsDPC::FPDDeviceIRay* pDrvDPC, ResDataObject& Configuration, DeviceIndexStruct& DeviceStruct);
  255. bool DelDPCs(nsDPC::FPDDeviceIRay* pDrvDPC);
  256. bool Connect(string strAppPath, nsDPC::FPDDeviceIRay* pDrvDPC);
  257. bool DisConnect(nsDPC::FPDDeviceIRay* pDrvDPC);
  258. void ProcessEvent(int nDetectorID, int nEventID, int nEventLevel, const char* pszMsg, int nParam1, int nParam2, int nPtrParamLen, void* pParam);
  259. void OnProcessTaskResult(int nDetectorID, int nParam1, int nParam2, bool bResult);
  260. bool ScanResult(DetectorProfile* pDetectorProfile);
  261. bool EnterExam(APP_STATUS eStatus);
  262. bool ActivePanel(nsDPC::FPDDeviceIRay* pDrvDPC, bool bActive);
  263. //bool SwithPanel(int nPanelId);
  264. //bool ResetFPD(nsDPC::FPDDeviceIRay* pDrvDPC);
  265. bool SelectExamMode(int nLogicMode, nsDPC::FPDDeviceIRay* pDrvDPC);
  266. bool SetSyncMode(int nPanelIndex, int nSetSyncMode);
  267. RET_STATUS PrepareAcquisition(nsDPC::FPDDeviceIRay* pDrvDPC);
  268. RET_STATUS StartAcquisition(nsDPC::FPDDeviceIRay* pDrvDPC);
  269. RET_STATUS StopAcquisition(nsDPC::FPDDeviceIRay* pDrvDPC);
  270. bool ActiveConfigurationMode(int nDetectorID, int nConfigurationID);
  271. bool SelectMode(int nAppMode, int nExpMode, int nFilterMode);
  272. //bool InitCalibration();
  273. //bool GetiRayPanelCalibItem();
  274. //RET_STATUS ActiveCalibration(CCOS_CALIBRATION_TYPE Type, nsDPC::FPDDeviceIRay* pDrvDPC);
  275. //RET_STATUS PrepareCalibration(nsDPC::FPDDeviceIRay* pDrvDPC);
  276. //RET_STATUS StartCalibration(nsDPC::FPDDeviceIRay* pDrvDPC);
  277. //RET_STATUS CompleteCalibration(nsDPC::FPDDeviceIRay* pDrvDPC);
  278. //RET_STATUS AbortCalibration(nsDPC::FPDDeviceIRay* pDrvDPC);
  279. //RET_STATUS OnUpdateFirmware(nsDPC::FPDDeviceIRay* pDrvDPC);
  280. //bool ConfirmCalibration();
  281. //bool AcceptCalibration();
  282. //bool RejectCalibration();
  283. //bool CreateCalibrationFile();
  284. //void OnEndCalibraion();
  285. //bool UploadCalibrationFiles(nsDPC::FPDDeviceIRay* pDrvDPC, string strFileName);
  286. //bool SetLTEMode(bool bEnable);
  287. //bool RecoverLastImage();
  288. //bool RecoverLastImageAuto();
  289. //void PMSStatus(bool bEnable);
  290. //bool SaveFailedCalibFiles(int nDetectorID, bool bExpMode);
  291. //bool CopyFile2Folder(string strSrcPath, string strDstPath);
  292. //bool WriteCumstomFile(int nDetectorID);
  293. //bool CancelImageRecover();
  294. ////WORD *m_pImageBuffer; //SDK所需的一个大的图像buffer
  295. //ResDataObject m_PanelConfigPath; //加载PanelConfigPath,通过探测器类型获取配置文件名称
  296. ////ResDataObject m_ObjFPDInfo; //存储配置文件中探测器数量和类型信息
  297. //bool m_bCalibResultFailed;
  298. private:
  299. bool ExitDetectorScanThread();
  300. void DeleteHandle();
  301. bool LoadIRayDLL(string strWorkPath);
  302. bool FreeIRayDLL();
  303. FPDRESULT IrayFnInvoke(int nDetectorID, int nCommandID, IRayCmdParam pars[], int nParCount);
  304. bool TestError(int nDetectorID, int nErrorStatus);
  305. void StartInitFPDThread();
  306. static DWORD __stdcall onInitPanel(void* pParam); //初始化线程
  307. void Action_Init();
  308. bool DetectorInitProcess(int nDetectorID);
  309. bool RetryConnect(int nPanelIndex);
  310. bool OnInitStatus(int nPanelIndex, ENUM_PANEL_EVENT_STATE ePanelState);
  311. void CheckSDKiniFile(int nDetectorID);
  312. void iRayScanEventThread(); //辅助线程
  313. static DWORD __stdcall onScanEvent(void* pParam);
  314. bool WaitRespond(int nTimeOut);
  315. void SendNotify();
  316. void ResetLock();
  317. void Pausetime(DWORD dwSpan);
  318. bool WaitReady(int nPanelIndex, int nMs);
  319. bool GetAttr(int nDetectorID, int nAttrID, int& nValue);
  320. bool GetAttr(int nDetectorID, int nAttrID, float& fValue);
  321. bool GetAttr(int nDetectorID, int nAttrID, char* pszAttr);
  322. bool SetAttr(int nDetectorID, int nAttrID, int nValue);
  323. bool GetSyncMode(int nDetectorID, int& nTriggerMode);
  324. string TriggerModeName(int nTriggerMode);
  325. //void OnProcessPreImg();
  326. void OnProcessImg();
  327. bool GetEffectiveImage(WORD* pOutImg, WORD* pInImg, int nInWidth);
  328. bool GetMammoAppMode(int nDetectorID);
  329. bool SetMammoAppMode(int nDetectorID, int nAppMode, int nExpMode, int nFilterMode);
  330. bool StartXWindowOffThread();
  331. static DWORD XWindowOffThread(LPVOID pParam);
  332. bool ClearCorrectionOption(int nDetectorID);
  333. bool SetCorrectionOption(int nDetectorID, int nExpMode);
  334. bool GetCorrectionOption(int nDetectorID, int& nOption);
  335. bool PerformOffset(int nDetectorID, int nOffsetType);
  336. bool FlipX(WORD* pData, int nWidth, int nHeight);
  337. bool FlipXRotate90(WORD* pData, int nWidth, int nHeight);
  338. private:
  339. HMODULE m_hIRayModule;
  340. FnGetSDKVersion m_fpGetSDKVersion;
  341. FnSetUserCode m_fpSetUserCode;
  342. FnNotifyScanResult m_fpNotifyScanResult;
  343. FnRegisterScanNotify m_fpRegisterScanNotify;
  344. FnScanOnce m_fpScanOnce;
  345. FnCallback m_fpCallback;
  346. FnCreate m_fpCreate;
  347. FnDestroy m_fpDestroy;
  348. FnGetAttr m_fpGetAttr;
  349. FnSetAttr m_fpSetAttr;
  350. FnInvoke m_fpInvoke;
  351. FnAbort m_fpAbort;
  352. FnOpenDefectTemplateFile m_fpOpenDefectTemplateFile;
  353. FnSaveDefectTemplateFile m_fpSaveDefectTemplateFile;
  354. FnCloseDefectTemplateFile m_fpCloseDefectTemplateFile;
  355. ResDataObject m_ModeConfig;
  356. //string m_strPanelType; //探测器类型
  357. string m_strWorkPath; //工作路径
  358. //string m_strPanelIP; //配置文件中的IP地址
  359. ////bool m_bOpened; //true: SDK Open成功,避免重复执行
  360. //bool m_bConnected; //true: SDK Connect成功,避免重复执行
  361. //bool m_bLoaded; //true: 已经加载过SDK
  362. APP_STATUS m_eAppStatus; //记录当前软件的工作状态(界面)
  363. int m_nCurrentMode; //记录探测器当前逻辑模式
  364. int m_nImageWidth;
  365. int m_nImageHeight;
  366. int m_nHeightOffset;
  367. int m_nBottomOffset;
  368. int m_nWidthOffset;
  369. int m_nRightOffset;
  370. int m_nRawImgWidth; //图像原始宽
  371. int m_nRawImgHeight; //图像原始高
  372. int m_nImgBits;
  373. int m_nPixelPitch;
  374. bool m_bPreviewEnable;
  375. //float m_fFactorEXI2UGY; //探测器EXI -> UGY 转换系数
  376. int m_nPreviewWidth;
  377. int m_nPreviewHeight;
  378. int m_nTriggerMode;
  379. int m_nAppMode;
  380. int m_nExpMode;
  381. int m_nFilterMode;
  382. int m_nTotalFrameNum;
  383. int m_nCurrentFrame;
  384. int m_nClinicalApplicationMode;
  385. //CCOS_CALIBRATION_TYPE m_eCaliType; // 记录当前校正模式
  386. //float m_fCurrentDose; // 记录当前的Dose要求
  387. //int m_nCaliFailedCount; //记录增益校正失败次数,超过一定次数自动停止校正
  388. //bool m_bGainPreparing; //true: 正在进入增益校正状态
  389. //bool m_bGainProcess; //true: 处于增益曝光的一次小循环当中(WindowOn ~ SDK返回当前曝光结果)
  390. //bool m_bConfirmCaliRst; //true: 接受当前增益校正曝光结果
  391. int m_nSaveRaw; //0:不存; 1:预览图; 2:raw图; 4:实际尺寸图像;
  392. //bool m_bPreviewImg; //true: 当前获取的是预览图
  393. ////int m_nGainNodeCount; //校正曝光的总节点个数
  394. ////int m_nGainNodeIndex; //校正曝光的节点Index
  395. ////int m_nGainExpCount; //校正曝光节点需要曝光的次数
  396. ////int m_nGainExpIndex; //校正曝光节点已曝光的次数
  397. ////bool m_bAttaching; //true: 探测器正在attach过程中
  398. ////bool m_bModuleConnecting; //true: 探测器正在连接过程中。固件升级、attach时使用
  399. ////bool m_bModulePresent; //记录红外探头是否和探测器接触
  400. //string m_strModuleType; //红外获取的探测器类型;
  401. //string m_strModuleIP;//红外获取的探测器IP;
  402. //string m_strModuleSN; //红外获取的探测器SN
  403. //string m_strModuleSSID; //红外获取的SSID
  404. ////string m_strModuleSetIP; //attach时设置给探测器的IP
  405. //bool m_bModuleEnable; //true: 使用红外扫描功能
  406. //bool m_bUpdateFirmwareDirect; //true: 直接升级固件
  407. ////bool m_bNeedUpdateFW; //true: 需要升级固件 需要通过配置获知是否需要升级
  408. ////SYNC_MODE m_eSyncMode; //同步模式
  409. ////bool m_bTransImageSuccess; //true:图像传输成功
  410. ////int m_nTotalShockNumber;
  411. //string m_strAttachFPD; //记录要attach的探测器类型
  412. //int m_nAttachFPDID; //记录要attach的探测器ID
  413. //int m_nUpdateFPDID; //记录要固件升级的探测器ID
  414. //bool m_bIsImageRecovering; //是否处于图像恢复流程
  415. //PanelSerialXMLControl m_objSNlist;
  416. };
  417. }