123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697 |
- #pragma once
- #include <string>
- #include "ResDataObject.h"
- #include "Detector_Model_Def.h"
- #include "CCOSConfigurations.h"
- #include "CCOS.Dev.IODevice.hpp"
- #include "CCOS.Dev.IODevice.Detail.hpp"
- #include "BatteryMould.hpp"
- #include "TemperatureMould.hpp"
- #include "WifiMould.hpp"
- #ifndef CCOSDEVFPDDEVICEMOULD_EXPORTS
- #ifdef _WIN64
- #pragma message("import WIN64 CCOSDEVFPDDEVICEMOULD")
- #ifdef _DEBUG
- #pragma message("import WIN64 Debug CCOSDEVFPDDEVICEMOULD")
- #pragma comment(lib, "CCOS.Dev.FPDDeviceMould64D.lib")
- #else
- #pragma message("import WIN64 Release CCOSDEVFPDDEVICEMOULD")
- #pragma comment(lib, "CCOS.Dev.FPDDeviceMould64.lib")
- #endif
- #else
- #ifdef _DEBUG
- #pragma comment(lib, "CCOS.Dev.FPDDeviceMouldD.lib")
- #else
- #pragma comment(lib, "CCOS.Dev.FPDDeviceMould.lib")
- #endif
- #endif
- #endif
- #ifdef CCOSDEVFPDDEVICEMOULD_EXPORTS
- #define _CCOSDEVFPDDEVICEMOULD_API __declspec(dllexport)
- #else
- #define _CCOSDEVFPDDEVICEMOULD_API __declspec(dllimport)
- #endif
- namespace ConfKey
- {
- static const char* CcosDetectorType = "DetectorVender";
- static const char* CcosDetectorModel = "DetectorModel";
- static const char* CcosDetectorConfig = "DeviceConfig";
- static const char* CcosDetectorAttribute = "Attribute";
- static const char* CcosDetectorDescription = "Description";
- static const char* CcosDetectorSerialNumber = "SerialNumber";
- static const char* CcosWiredIP = "WiredIP";
- static const char* CcosWirelessIP = "WirelessIP";
- static const char* CcosLocalIP = "LocalIP";
- static const char* CcosSyncType = "SyncType";
- static const char* CcosWorkStation = "WorkStation";
- static const char* CcosTempMaxLimit = "TempMaxLimit";
- static const char* CcosTempUpperLimit = "TempUpperLimit";
- static const char* CcosTempLowerLimit = "TempLowerLimit";
- static const char* CcosTempMinLimit = "TempMinLimit";
- static const char* CcosBatLowerLimit = "BatLowerLimit";
- static const char* CcosBatMiniLimit = "BatMiniLimit";
- static const char* CcosWifiLowerLimit = "WifiLowerLimit";
- static const char* CcosWifiMiniLimit = "WifiMiniLimit";
- static const char* CcosImageFullWidth = "ImageFullWidth";
- static const char* CcosImageFullHeight = "ImageFullHeight";
- static const char* CcosShowTemperature = "ShowTemperature";
- static const char* CcosShowWifi = "ShowWifi";
- static const char* CcosShowBattery = "ShowBattery";
- static const char* CcosShowBluetooth = "ShowBluetooth";
- static const char* CcosIsConnect = "IsConnect";
- }
- namespace ActionKey
- {
- //DetecorCtrl
- static const char* GetDetectorInfo = "GetFPDinformation";
- static const char* CcosActiveDetector = "ActiveDetector";
- static const char* RESET = "RESET";
- static const char* EnterExam = "EnterExam";
- static const char* ExitExam = "ExitExam";
- static const char* AttachConnect = "AttachConnect";
- static const char* CancelAttach = "CancelAttach";
- static const char* RecoverImage = "RecoverImage";
- static const char* ResetConnect = "ResetConnect";
- static const char* DisConnectFPD = "DisConnectFPD";
- static const char* UpdateFirmware = "UpdateFirmware";
- static const char* SaveSensitivity = "SaveSensitivity";
- constexpr auto SetXrayOnNum = "SetXrayOnNum";
- constexpr auto SetExposureTimes = "SetExposureTimes";
- //Synchronization
- static const char* SetAcqMode = "SetAcqMode";
- static const char* SetSyncMode = "SetSyncMode";
- static const char* SetXwindowSize = "SetXwindowSize";
- static const char* PrepareAcquisition = "PrepareAcquisition";
- static const char* StartAcquisition = "StartAcquisition";
- static const char* StopAcquisition = "StopAcquisition";
- //Calibration
- static const char* SetSID = "SetSID";
- static const char* ActiveCalibration = "ActiveCalibration";
- static const char* PrepareCalibration = "PrepareCalibration";
- static const char* StartCalibration = "StartCalibration";
- static const char* StopCalibration = "StopCalibration";
- static const char* SetCorrectionType = "SetCorrectionType";
- static const char* UploadCalibrationFiles = "UploadCalibrationFiles";
- constexpr auto GetRequestedDose = "GetRequestedDose";
- }
- namespace AttrKey
- {
- //sensor status
- static const char* GetTemperatureValue = "GetTemperatureValue";
- static const char* GetRemainPowerValue = "GetRemainPowerValue";
- static const char* GetWifiStrengthValue = "GetWifiStrengthValue";
- constexpr auto Temperature_Value = "Temperature_Value";
- constexpr auto Remain_Power_Value = "Remain_Power_Value";
- constexpr auto Wifi_Strength_Value = "Wifi_Strength_Value";
- //DetecorCtrl
- static const char* DetectorStatus = "DetectorStatus";
- static const char* DetectorConnectStatus = "DetectorConnectStatus";
- static const char* DetectorAttach = "DetectorAttach";
- static const char* DetectorAttachedFlag = "FPDAttached";
- static const char* DetectorInitialStatus = "DetectorInitialStatus";
- static const char* DetectorUpdateFWStatus = "DetectorUpdateFWStatus";
- static const char* FPDShockSensorInfo = "FPDShockSensorInfo";
- static const char* SaveRawDataMode = "SaveRawDataMode";
- //Calibration
- static const char* CalibrationStatus = "CalibrationStatus";
- static const char* CalibrationProgress = "CalibrationProgress";
- static const char* UploadCalibrationFilesResult = "UploadCalibrationFilesResult";
- constexpr auto SupportCalibrationType = "SupportCalibrationType";
- //Synchronization
- static const char* FPDReadyStatus = "FPDReadyStatus";
- static const char* XwindowStatus = "XwindowStatus";
- static const char* ImageReadingStatus = "ImageReadingStatus";
- static const char* ZskkFPDState = "ZskkFPDState";
- constexpr auto FPDExpReady = "FPDExpReady";
- //Acquisition
- static const char* NoNeedWaitImage = "NoNeedWaitImage";
- static const char* ImgDataInfo = "ImgDataInfo";
- static const char* AutonumousMapFinish = "AutonumousMapFinish";
- //DICOM
- static const char* DetectorType = "DetectorType";
- static const char* Description = "Description";
- static const char* DetectorID = "DetectorID";
- static const char* FieldofViewShape = "FieldofViewShape";
- static const char* FieldofViewDimension = "FieldofViewDimension";
- static const char* DateofLastDetectorCalibration = "DateofLastDetectorCalibration";
- static const char* TimeofLastDetectorCalibration = "TimeofLastDetectorCalibration";
- static const char* DetectorConditionsNominalFlag = "DetectorConditionsNominalFlag";
- static const char* FPDSensitivity = "FPDSensitivity";
- static const char* PixelData = "PixelData";
- static const char* TargetEXI = "TargetEXI";
- //超声相关
- static const char* ProbeType = "ProbeType";//探头类型 线阵 凸阵
- static const char* ProbeMode = "ProbeMode";//帧类型 B模式图 C模式图
- static const char* BGain = "BGain";//B模式增益
- static const char* BDepth = "BDepth";//B模式深度档位
- static const char* BDepthCm = "BDepthCm";//B模式深度值
- static const char* BFrequency = "BFrequency";//B模式帧率
- static const char* BFocus = "BFocus";//B模式焦点档位
- static const char* BFocusCm = "BFocusCm";//B模式焦点值
- static const char* BDynamicRange = "BDynamicRange";//B模式动态范围
- static const char* BHarmonic = "BHarmonic";//B模式谐波开关
- static const char* BPower = "BPower";//B模式能量值
- static const char* CxLeft = "CxLeft";//C模式ROI范围(X轴左侧值)
- static const char* CxRight = "CxRight";//C模式ROI范围(X轴右侧值)
- static const char* CyTop = "CyTop";//C模式ROI范围(Y轴上方值)
- static const char* CyBottom = "CyBottom";//C模式ROI范围(Y轴下方值)
- static const char* CGain = "CGain";//C模式增益
- static const char* CFrequency = "CFrequency";//C模式帧率
- static const char* CSpeedWallFilter = "CSpeedWallFilter";//C模式速度璧滤波
- static const char* CRangeWallFilter = "CRangeWallFilter";//C模式幅度璧滤波
- static const char* CPersistence = "CPersistence";//C模式余辉
- static const char* CLinearAngle = "CLinearAngle";//C模式线阵偏转角
- static const char* CPrf = "CPrf";//C模式Prf??不知道什么意思
- static const char* PostLevel = "PostLevel";//后处理级别
- static const char* Mirror = "Mirror";//是否镜像模式
- }
- namespace CCOS::Dev::Detail::Detector
- {
- static const char* DetectorDriverType = "{18CAB88A-C61C-4BB2-AC28-184FDD4FD160}";
- static const char* UltrasonicDriverType = "{636A944E-AD06-4099-910F-B519253C2715}";
- static const char* DetectorUnitType = "{A209866C-A049-4A17-B5C9-421974E59D68}";
- static const char* UltrasonicUnitType = "{B74BFF35-BFFB-412F-BC5D-5657E7535E87}";
- static const char* DetectorAcqType = "{A209866C-A049-4A17-B5C9-421974000000}";
- static const char* DetectorSyncType = "{A209866C-A049-4A17-B5C9-421974000001}";
- static const char* DetectorCalibType = "{A209866C-A049-4A17-B5C9-421974000002}";
- static const char* DetectorCtrlType = "{A209866C-A049-4A17-B5C9-421974000003}";
- //-----------------------------------------------------------------------------
- // AcqUnit
- //-----------------------------------------------------------------------------
- namespace nsDev = CCOS::Dev;
- class _CCOSDEVFPDDEVICEMOULD_API AcqUnit : public IOLogicUnit,public IODeviceDetail
- {
- string m_strZskkFPDState;
- string m_strNoNeedWaitImage;
- string m_strLastImage;
- string m_strAutonumousMapFinish;
- DWORD m_nFullWidth;
- DWORD m_nFullHeight;
- DWORD m_nPrevWidth;
- DWORD m_nPrevHeight;
- DWORD m_nBits;
- PVOID m_pFullImageQueue;
- PVOID m_pPrevImageData;
- protected:
- std::shared_ptr <CCOS::Dev::IOEventCenter> m_EventCenter;
- public:
- AcqUnit();
- ~AcqUnit();
- std::string GetGUID() const override { return DetectorAcqType; }
- void OEM_IF SetEventCenter(std::shared_ptr <CCOS::Dev::IOEventCenter> EventCenter);
- RET_STATUS JSSetAcqMode(std::string in, std::string & out);
- RET_STATUS JSSetGainMode(std::string in, std::string & out);
- RET_STATUS JSSetBinningMode(std::string in, std::string & out);
- RET_STATUS JSSetZoomMode(std::string in, std::string & out);
- RET_STATUS JSSetDemoImage(std::string in, std::string & out);
- RET_STATUS JSGetZskkFPDState(std::string & out);
- bool OEM_IF SetZskkFPDState(ZSKK_FPD_STATE state);
- RET_STATUS JSGetNoNeedWaitImage(std::string & out);
- void OEM_NOTIFY SendNoNeedWaitImage(bool bflag);
- RET_STATUS JSGetLastImage(std::string & out);
- RET_STATUS OEM_IF AddFrameWithRawHead(IMAGE_VIEW_TYPE Type, string ImageHead, unsigned char* pFrameBuff, DWORD FrameSize);
- bool OEM_IF SetMaxBlockSize(const char *pQueName, DWORD BlockSize, DWORD FulBlockCount, DWORD PrevBlockCount);
- bool OEM_IF SetFulImageInfo(DWORD Height, DWORD Width, DWORD Bits, bool FetchFlag);
- bool OEM_IF SetPrevImageInfo(bool Support, DWORD Height, DWORD Width, bool FetchFlag);
- DWORD AddFrame(IMAGE_VIEW_TYPE Type, string ImageHead, WORD* pFrameBuff, DWORD FrameSize);
- bool OEM_IF FlipX(WORD* pData, UINT nWidth, UINT nHeight);
- bool OEM_IF FlipY(WORD* pData, UINT nWidth, UINT nHeight);
- bool OEM_IF RotateImage(WORD* imageBuffer, int nImageHeight, int nImageWidth, int nAngle);
- RET_STATUS JSAutonumousMapFinish(std::string& out);
- void OEM_NOTIFY SendAutonumousMapFinish(int bFlag);
- //超声相关
- RET_STATUS JSSetFreeze(std::string in, std::string& out);
- RET_STATUS JSSwitchProbe(std::string in, std::string& out);
- RET_STATUS JSSwitchProbeMode(std::string in, std::string& out);
- RET_STATUS JSSetBGain(std::string in, std::string& out);
- RET_STATUS JSSetBDepth(std::string in, std::string& out);
- RET_STATUS JSSetBFrequency(std::string in, std::string& out);
- RET_STATUS JSSetBFocus(std::string in, std::string& out);
- RET_STATUS JSSetBHarmonic(std::string in, std::string& out);
- RET_STATUS JSSetBPower(std::string in, std::string& out);
- RET_STATUS JSSetBDynamicRange(std::string in, std::string& out);
- RET_STATUS JSGetBDepth(std::string in, std::string& out);
- RET_STATUS JSGetBFrequency(std::string in, std::string& out);
- RET_STATUS JSGetBGain(std::string in, std::string& out);
- RET_STATUS JSGetBFocus(std::string in, std::string& out);
- RET_STATUS JSGetBDynamicRange(std::string in, std::string& out);
- RET_STATUS JSSetCRoi(std::string in, std::string& out);
- RET_STATUS JSSetCGain(std::string in, std::string& out);
- RET_STATUS JSSetPostLevel(std::string in, std::string& out);
- RET_STATUS JSSetMirror(std::string in, std::string& out);
- RET_STATUS JSSetCFrequency(std::string in, std::string& out);
- RET_STATUS JSSetCSpeedWallFilter(std::string in, std::string& out);
- RET_STATUS JSSetCRangeWallFilter(std::string in, std::string& out);
- RET_STATUS JSSetCPersistence(std::string in, std::string& out);
- RET_STATUS JSSetCLinearAngle(std::string in, std::string& out);
- RET_STATUS JSSetCPrf(std::string in, std::string& out);
- RET_STATUS JSGetCFrequency(std::string in, std::string& out);
- RET_STATUS JSGetCGain(std::string in, std::string& out);
- RET_STATUS JSGetCPrf(std::string in, std::string& out);
- RET_STATUS JSGetCLinearAngle(std::string in, std::string& out);
- //调节图像亮暗的
- RET_STATUS JSSetTgc1(std::string in, std::string& out);
- RET_STATUS JSSetTgc2(std::string in, std::string& out);
- RET_STATUS JSSetTgc3(std::string in, std::string& out);
- RET_STATUS JSSetTgc4(std::string in, std::string& out);
- RET_STATUS JSSetTgc5(std::string in, std::string& out);
- RET_STATUS JSSetTgc6(std::string in, std::string& out);
- RET_STATUS JSSetTgc7(std::string in, std::string& out);
- RET_STATUS JSSetTgc8(std::string in, std::string& out);
- void OEM_NOTIFY NotifyProbeType(int nProbeType);
- protected:
- virtual RET_STATUS SetAcqMode(int mode) = 0;
- virtual RET_STATUS SetGainMode(float nGain);
- virtual RET_STATUS SetBinningMode(int nBinningX, int nBinningY);
- virtual RET_STATUS SetZoomMode(int nZOOMX1, int nZOOMY1, int nZOOMX2, int nZOOMY2);
- virtual RET_STATUS SetDemoImage(string strFile);
- //超声相关
- virtual RET_STATUS SetFreeze(int nFreeze);
- virtual RET_STATUS SwitchProbe(int nProbeType);//切换探头
- virtual RET_STATUS SwitchProbeMode(int nProbeMode);//切换模式
- virtual RET_STATUS SetBGain(int nGain);
- virtual RET_STATUS SetBDepth(int nDepth);
- virtual RET_STATUS SetBFrequency(float fFrequency);
- virtual RET_STATUS SetBFocus(int nFocus);
- virtual RET_STATUS SetBHarmonic(int nHarmonic);
- virtual RET_STATUS SetBPower(int nPower);
- virtual RET_STATUS SetBDynamicRange(int nRange);
- virtual RET_STATUS GetBDepth(int& nDepth,float& fDepthCm);
- virtual RET_STATUS GetBFrequency(float& fFrequency);
- virtual RET_STATUS GetBGain(int& nGain);
- virtual RET_STATUS GetBFocus(int& nFocus,float& fFocusCm);
- virtual RET_STATUS GetBDynamicRange(int& nRange);
- virtual RET_STATUS SetCRoi(int x1,int x2,int y1,int y2);
- virtual RET_STATUS SetCGain(int nGain);
- virtual RET_STATUS SetPostLevel(int nLevel);
- virtual RET_STATUS SetMirror(int nMirror);
- virtual RET_STATUS SetCFrequency(float fFrequency);
- virtual RET_STATUS SetCSpeedWallFilter(int nSpeedWallFilter);
- virtual RET_STATUS SetCRangeWallFilter(int nRangeWallFilter);
- virtual RET_STATUS SetCPersistence(int nPersistence);
- virtual RET_STATUS SetCLinearAngle(int nAngle);
- virtual RET_STATUS SetCPrf(int nPrf);
- virtual RET_STATUS GetCFrequency(float& fFrequency);
- virtual RET_STATUS GetCGain(int& nGain);
- virtual RET_STATUS GetCPrf(int& nPrf);
- virtual RET_STATUS GetCLinearAngle(int& nAngle);
- //调节图像亮暗的
- virtual RET_STATUS SetTgc1(int nTgc);
- virtual RET_STATUS SetTgc2(int nTgc);
- virtual RET_STATUS SetTgc3(int nTgc);
- virtual RET_STATUS SetTgc4(int nTgc);
- virtual RET_STATUS SetTgc5(int nTgc);
- virtual RET_STATUS SetTgc6(int nTgc);
- virtual RET_STATUS SetTgc7(int nTgc);
- virtual RET_STATUS SetTgc8(int nTgc);
- };
- //-----------------------------------------------------------------------------
- // SyncUnit
- //-----------------------------------------------------------------------------
- class _CCOSDEVFPDDEVICEMOULD_API SyncUnit : public IOLogicUnit, public IODeviceDetail
- {
- string m_strReady4EXP;
- string m_strXwindowStatus;
- string m_strFPDExpReady;
- string m_strXrayON;
- string m_strConnectStatus;
- protected:
- std::shared_ptr <CCOS::Dev::IOEventCenter> m_EventCenter;
- public:
- SyncUnit();
- ~SyncUnit();
- std::string GetGUID() const override { return DetectorSyncType; }
- void OEM_IF SetEventCenter(std::shared_ptr <CCOS::Dev::IOEventCenter> EventCenter);
- RET_STATUS JSSetSyncMode(std::string in, std::string & out);
- RET_STATUS JSGetSyncMode(std::string& out);
- RET_STATUS JSSetXwindowSize(std::string in, std::string & out);
- RET_STATUS JSSetFrameRate(std::string in, std::string& out);
- RET_STATUS JSSetFluPPS(std::string in, std::string & out);
- RET_STATUS JSPrepareAcquisition(std::string in, std::string& out);
- RET_STATUS JSStartAcquisition(std::string in, std::string& out);
- RET_STATUS JSStopAcquisition(std::string in, std::string& out);
- RET_STATUS JSGetFPDReady(std::string& out);
- RET_STATUS JSGetConnectStatus(std::string & out);
- RET_STATUS JSGetXrayON(std::string& out)
- {
- out = m_strXrayON;
- return RET_STATUS::RET_SUCCEED;
- }
- void OEM_NOTIFY FPDReadyNotify(bool bReady);
- void OEM_NOTIFY FPDConnectStatusNotify(bool bConnect);
- RET_STATUS JSGetXWindowStatus(std::string & out);
- void OEM_NOTIFY XWindowOnNotify();
- void OEM_NOTIFY XWindowOffNotify();
- void OEM_NOTIFY FakeEIPONNotify();
- void OEM_NOTIFY XrayONNotify();
- void OEM_NOTIFY XrayOffNNotify();
- RET_STATUS JSGetImageReadingStatus(std::string & out);
- void OEM_NOTIFY ImageReadingNotify();
- RET_STATUS JSGetExpReadyStatus(std::string& out);
- void OEM_NOTIFY ExpReadyNotify(int nMillisecond);
- protected:
- virtual RET_STATUS SetSyncMode(SYNC_MODE nSyncMode, HARDWARE_TRIGGER_MODE TriggerMode) = 0;
- virtual RET_STATUS GetSyncMode(SYNC_MODE &nSyncMode);
- virtual RET_STATUS SetXwindow(float XwindowSize) = 0;
- virtual RET_STATUS SetFrameRate(float fFrameRate);
- virtual RET_STATUS SetFluPPS(float fFluPPS);
- virtual RET_STATUS PrepareAcquisition() = 0;
- virtual RET_STATUS StartAcquisition(string in = "") = 0;
- virtual RET_STATUS StopAcquisition() = 0;
- };
- //-----------------------------------------------------------------------------
- // CalibUnit
- //-----------------------------------------------------------------------------
- class _CCOSDEVFPDDEVICEMOULD_API CalibUnit : public IOLogicUnit, public IODeviceDetail
- {
- CCOS_CALIBRATION_TYPE m_CurrentCalibType;
- CCOS_CALIBRATION_STATUS m_CalibStatus;
- string m_strCalibProgress;
- string m_strUploadCalibrationFilesResult;
- string m_strSaveCalibrationFileFinish;
- protected:
- std::shared_ptr <CCOS::Dev::IOEventCenter> m_EventCenter;
- public:
- CalibUnit();
- ~CalibUnit();
- std::string GetGUID() const override { return DetectorCalibType; }
- void OEM_IF SetEventCenter(std::shared_ptr <CCOS::Dev::IOEventCenter> EventCenter);
- RET_STATUS JSActiveCalibration(std::string in, std::string & out);
- RET_STATUS JSGetRequestedDose(std::string in, std::string & out);
- RET_STATUS JSSetRequestedDose(std::string in, std::string& out);
- RET_STATUS JSPrepareCalibration(std::string in, std::string& out);
- RET_STATUS JSStartCalibration(std::string in, std::string& out);
- RET_STATUS JSStopCalibration(std::string in, std::string& out);
- RET_STATUS OEM_IF PauseCalibration();
- RET_STATUS JSSetSID(std::string in, std::string& out);
- RET_STATUS JSSetCorrectionType(std::string in, std::string & out);
- RET_STATUS JSUploadCalibrationFiles(std::string in, std::string & out);
- RET_STATUS JSGetCalibrationStep(std::string in, std::string& out);
- RET_STATUS JSAcceptCalibration(std::string in, std::string& out);
- RET_STATUS JSRejectCalibration(std::string in, std::string& out);
- RET_STATUS JSSaveCalibrationFile(std::string in, std::string& out);
- CCOS_CALIBRATION_STATUS OEM_IF GetCalibrationStatus();
- void OEM_IF SetCalibrationStatus(CCOS_CALIBRATION_STATUS Status);
- RET_STATUS JSGetCalibStatus(std::string & out);
- void OEM_IF SetCalibrationProgress(DWORD progress);
- RET_STATUS JSGetCalibProgress(std::string & out);
- CCOS_CALIBRATION_TYPE OEM_IF GetCalibrationType();
- RET_STATUS JSGetUploadCalibrationFilesResult(std::string & out);
- void OEM_IF SetUploadCalibrationFilesResult(bool bResult);
- RET_STATUS JSGetSupportCalibrationType(std::string & out);
- RET_STATUS JSGetHaveImgCalibration(std::string& out);
- RET_STATUS JSGetSaveCalibrationFileFinish(std::string& out);
- void OEM_IF SetSaveCalibrationFileFinish(bool bResult);
- protected:
- virtual RET_STATUS SetSID(int nSID) = 0;
- virtual RET_STATUS ActiveCalibration(CCOS_CALIBRATION_TYPE in) = 0;
- virtual RET_STATUS PrepareCalibration() = 0;
- virtual RET_STATUS GetRequestedDose(std::string& out) = 0;
- virtual RET_STATUS SetRequestedDose(std::string in);
- virtual RET_STATUS StartCalibration() = 0;
- virtual RET_STATUS StopCalibration() = 0;
- virtual RET_STATUS SetCorrectionType(CCOS_CORRECTION_TYPE in) = 0;
- virtual RET_STATUS UploadCalibrationFiles(string strFileName) = 0;
- virtual bool Support_DarkCalib();
- virtual bool Support_XrayCalib();
- virtual bool Support_HaveImageCalib();
- virtual RET_STATUS GetCalibrationStep(int nDetectorID, string & strCalibrationStepInfo);
- virtual RET_STATUS AcceptCalibration();
- virtual RET_STATUS RejectCalibration();
- virtual RET_STATUS SaveCalibrationFile(bool bSaveFlag);
- };
- //-----------------------------------------------------------------------------
- // CalibUnit
- //-----------------------------------------------------------------------------
- class _CCOSDEVFPDDEVICEMOULD_API DetectorCtrlUnit : public IOLogicUnit, public IODeviceDetail
- {
- DETECTOR_STATUS m_DetectorStatus;
- DETECTOR_SHARE_STATUS m_DetectorConnectStatus;
- string m_strUpdateFWStatus;
- string m_strInitialStatus;
- string m_strAttachStatus;
- string m_strAttachResult;
- string m_strShockSensor;
- string m_strRecoverImageState;
- string m_strRecoverImageEvent;
- string m_strFieldofViewShape;
- string m_strFieldofViewDimension;
- string m_strDetectorType;
- string m_strDescription;
- string m_strDetectorID;
- string m_strDateofLastDetectorCalibration;
- string m_strTimeofLastDetectorCalibration;
- string m_strDetectorConditionsNominalFlag;
- string m_strFPDSensitivity;
- string m_strFPDSensitivityResult;
- string m_strPixelData;
- string m_strTargetEXI;
- string m_strFirmwareStatus;
- string m_strSupportDDR;
- string m_strAcqMode;
- protected:
- std::shared_ptr <CCOS::Dev::IOEventCenter> m_EventCenter;
- public:
- DetectorCtrlUnit();
- ~DetectorCtrlUnit();
- std::string GetGUID() const override { return DetectorCtrlType; }
- void OEM_IF SetEventCenter(std::shared_ptr <CCOS::Dev::IOEventCenter> EventCenter);
- RET_STATUS JSRESET(std::string in, std::string& out);
- RET_STATUS JSActiveDetector(std::string in, std::string & out);
- RET_STATUS JSWakeupDetector(std::string in, std::string & out);
- RET_STATUS JSEnterExam(std::string in, std::string & out);
- RET_STATUS JSExitExam(std::string in, std::string& out);
- RET_STATUS JSAttachConnect(std::string in, std::string& out);
- RET_STATUS JSCancelAttach(std::string in, std::string& out);
- RET_STATUS JSGetDetectorInfo(std::string in, std::string & out);
- RET_STATUS JSResetConnect(std::string in, std::string& out);
- RET_STATUS JSDisConnectFPD(std::string in, std::string& out);
- RET_STATUS JSDisConnectFPDForce(std::string in, std::string& out);
- RET_STATUS JSUpdateFirmware(std::string in, std::string& out);
- RET_STATUS JSRecoverImage(std::string in, std::string & out);
- RET_STATUS JSSaveSensitivity(std::string in, std::string& out);
- RET_STATUS JSSetXrayOnNum(std::string in, std::string& out);
- RET_STATUS JSSetExposureTimes(std::string in, std::string& out);
- RET_STATUS JSGetRecoverImageState(std::string in, std::string& out);
- DETECTOR_STATUS OEM_IF GetDetectorStatus();
- RET_STATUS OEM_IF SetDetectorStatus(DETECTOR_STATUS status);
- RET_STATUS JSGetFPDStatus(std::string & out);
- RET_STATUS OEM_IF SetConnectStatus(DETECTOR_SHARE_STATUS nStatus);
- RET_STATUS JSGetConnectStatus(std::string & out);
- RET_STATUS OEM_IF SetAttachResult(bool result, const char* DetectorType, const char* DetectorSN);
- RET_STATUS JSGetAttachResult(std::string & out);
- RET_STATUS OEM_IF SetAttachStatus(int nStatus);
- RET_STATUS JSGetAttachStatus(std::string & out);
- RET_STATUS OEM_IF SetInitialStatus(int nStatus);
- RET_STATUS JSGetInitialStatus(std::string & out);
- RET_STATUS OEM_IF SetUpdateFWStatus(int nStatus);
- RET_STATUS JSGetUpdateFWStatus(std::string & out);
- RET_STATUS OEM_IF SetShockSensorInfo(string nStatus);
- RET_STATUS JSGetShockSensorInfo(std::string & out);
- RET_STATUS OEM_IF SetRecoverImageState(string nStatus);
- RET_STATUS JSGetRecoverImageState(std::string & out);
- RET_STATUS OEM_IF SetRecoverImageEvent(int nStatus);
- RET_STATUS JSGetRecoverImageEvent(std::string & out);
- RET_STATUS OEM_IF SetFieldofViewShape(string nStatus);
- RET_STATUS JSGetFieldofViewShape(std::string & out);
- RET_STATUS OEM_IF SetFieldofViewDimension(string nStatus);
- RET_STATUS JSGetFieldofViewDimension(std::string & out);
- RET_STATUS OEM_IF SetDetectorType(string nStatus);
- RET_STATUS JSGetDetectorType(std::string & out);
- RET_STATUS OEM_IF SetDescription(string nStatus);
- RET_STATUS JSGetDescription(std::string & out);
- RET_STATUS OEM_IF SetDetectorID(string nStatus);
- RET_STATUS JSGetDetectorID(std::string & out);
- RET_STATUS OEM_IF SetDateofLastDetectorCalibration(string nStatus);
- RET_STATUS JSGetDateofLastDetectorCalibration(std::string & out);
- RET_STATUS OEM_IF SetTimeofLastDetectorCalibration(string nStatus);
- RET_STATUS JSGetTimeofLastDetectorCalibration(std::string & out);
- RET_STATUS OEM_IF SetDetectorConditionsNominalFlag(string nStatus);
- RET_STATUS JSGetDetectorConditionsNominalFlag(std::string & out);
- RET_STATUS OEM_IF SetFPDSensitivity(string nStatus);
- RET_STATUS JSGetFPDSensitivity(std::string & out);
- RET_STATUS OEM_IF SetFPDSensitivityResult(string nStatus);
- RET_STATUS JSGetFPDSensitivityResult(std::string& out);
- RET_STATUS OEM_IF SetPixelData(string nStatus);
- RET_STATUS JSGetPixelData(std::string & out);
- RET_STATUS OEM_IF SetTargetEXI(string nStatus);
- RET_STATUS JSGetTargetEXI(std::string & out);
- //DDR
- RET_STATUS OEM_IF SetSupportDDR(bool bFlag);
- RET_STATUS JSGetSupportDDR(std::string& out);
- RET_STATUS OEM_IF SetAcqMode(int nMode);
- RET_STATUS JSGetAcqMode(std::string& out);
- //DDR
- RET_STATUS OEM_IF SetLastError(string nStatus);
- RET_STATUS JSGetLastError(std::string& out);
- RET_STATUS JSSetFilterType(std::string in, std::string& out);
- RET_STATUS OEM_IF SetFirmwareStatus(int nStatus);
- RET_STATUS JSGetFirmwareStatus(std::string& out);
- RET_STATUS JSSaveRawDataMode(std::string in, std::string& out);
- RET_STATUS JSOfflineFPD(std::string in, std::string& out);
- RET_STATUS JSOnlineFPD(std::string in, std::string& out);
- RET_STATUS JSGetAutonumousImageList(std::string in, std::string& out);
- RET_STATUS JSRemoveAutonumousImageList(std::string in, std::string& out);
- RET_STATUS JSRemoveAutonumousAll(std::string in, std::string& out);
- RET_STATUS JSGetImageMetaData(std::string in, std::string& out);
- RET_STATUS JSExportAutonumousAll(std::string in, std::string& out);
- protected:
- virtual RET_STATUS ActiveDetector(bool bActive) = 0;
- virtual RET_STATUS EnterExam(int nExamStatus) = 0;
- virtual RET_STATUS GetDetectorInfo(string& strFDI) = 0;
- virtual RET_STATUS RESET();
- virtual RET_STATUS WakeupDetector();
- virtual RET_STATUS ExitExam();
- virtual RET_STATUS AttachConnect();
- virtual RET_STATUS CancelAttach();
- virtual RET_STATUS ResetConnect();
- virtual RET_STATUS DisConnectFPD();
- virtual RET_STATUS DisConnectFPDForce();
- virtual RET_STATUS UpdateFirmware();
- virtual RET_STATUS RecoverImage(bool bRecoverIt);
- virtual RET_STATUS SaveSensitivity();
- virtual RET_STATUS SetXrayOnNum();
- virtual RET_STATUS SetExposureTimes(int nTimes);
- virtual RET_STATUS GetRecoverImageState(string & strREI);
- virtual RET_STATUS SetFilterType(int nFilter);
- virtual RET_STATUS SaveRawDataMode(int nSaveRawDataMode);
- virtual RET_STATUS OfflineFPD(int nOfflineFPDMode);
- virtual RET_STATUS OnlineFPD(int nOnlineFPDMode);
- virtual RET_STATUS GetAutonumousImageList(int nDetectorID, vector<string>& AutonumousList);
- virtual RET_STATUS RemoveAutonumousImageList(string strMeta);
- virtual RET_STATUS RemoveAutonumousAll();
- virtual RET_STATUS GetImageMetaData(string strMetaData);
- virtual RET_STATUS ExportAutonumousAll();
- };
- class _CCOSDEVFPDDEVICEMOULD_API ConfigInfo
- {
- public:
- ConfigInfo(const char* Key, const char* strType, const char* strAccess, const char* strRequired, const char* strDefaultValue);
- virtual ~ConfigInfo();
- void SetList(const char* str);
- void SetRange(const char* strmin, const char* strmax);
- const char* GetCurrentValue();
- void SetCurrentValue(const char* res);
- const char* GetDescription();
- const char* GetKey();
-
- private:
- std::string strConfKey;
- std::string resValue;
- std::string resDescription;
- };
- //-----------------------------------------------------------------------------
- // FPDDeviceMould
- //-----------------------------------------------------------------------------
- class _CCOSDEVFPDDEVICEMOULD_API FPDDeviceMould : public IODeviceDetail
- {
- public:
- FPDDeviceMould(/*std::shared_ptr <IOEventCenter> center*/);
- ~FPDDeviceMould();
- };
- }
- namespace CCOS::Dev::Detail::Detector
- {
- class _CCOSDEVFPDDEVICEMOULD_API FPDDriverMould : public CCOS::Dev::IODriver
- {
- public:
- FPDDriverMould();
- ~FPDDriverMould();
- public:
- virtual std::string GetGUID() const;
- //virtual void Prepare() override;
- //virtual int Connect() override;
- //virtual void Disconnect() override;
- //virtual bool isConnected() const override;
- //virtual void FireNotify(int code, std::string key, std::string content) override;
- //virtual auto CreateDevice(int index)->std::unique_ptr <IODevice> override;
- //virtual std::string DriverProbe() override;
- //virtual std::string GetResource() override;
- //virtual std::string DeviceProbe() override;
- void AddConfig(ConfigInfo config);
- protected:
- std::list <ConfigInfo> m_ConfigInfo;
- };
- }
|