123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716 |
- #pragma once
- #include <string>
- #include "ResDataObject.h"
- #include "Detector_Model_Def.h"
- #include "CCOSConfigurations.h"
- #include "global_time.h"
- #include "CCOS.Dev.IODevice.hpp"
- #include "CCOS.Dev.IODevice.Detail.hpp"
- #include "BatteryMould.hpp"
- #include "TemperatureMould.hpp"
- #include "WifiMould.hpp"
- #define _CCOSDEVFPDDEVICEMOULD_API
- namespace CCOS::Dev::Detail::Detector
- {
- static const char* DetectorDriverType = "{18CAB88A-C61C-4BB2-AC28-184FDD4FD160}";
- static const char* DetectorUnitType = "{A209866C-A049-4A17-B5C9-421974E59D68}";
- 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}";
- namespace ConfKey
- {
- constexpr auto CcosDetectorType = "DetectorVender";
- constexpr auto CcosDetectorModel = "DetectorModel";
- constexpr auto CcosDetectorConfig = "DeviceConfig";
- constexpr auto CcosDetectorAttribute = "Attribute";
- constexpr auto CcosDetectorDescription = "Description";
- constexpr auto CcosDetectorSerialNumber = "SerialNumber";
- constexpr auto CcosWiredIP = "WiredIP";
- constexpr auto CcosWirelessIP = "WirelessIP";
- constexpr auto CcosLocalIP = "LocalIP";
- constexpr auto CcosSyncType = "SyncType";
- constexpr auto CcosWorkStation = "WorkStation";
- constexpr auto CcosTempMaxLimit = "TempMaxLimit";
- constexpr auto CcosTempUpperLimit = "TempUpperLimit";
- constexpr auto CcosTempLowerLimit = "TempLowerLimit";
- constexpr auto CcosTempMinLimit = "TempMinLimit";
- constexpr auto CcosBatLowerLimit = "BatLowerLimit";
- constexpr auto CcosBatMiniLimit = "BatMiniLimit";
- constexpr auto CcosWifiLowerLimit = "WifiLowerLimit";
- constexpr auto CcosWifiMiniLimit = "WifiMiniLimit";
- constexpr auto CcosImageFullWidth = "ImageFullWidth";
- constexpr auto CcosImageFullHeight = "ImageFullHeight";
- constexpr auto CcosShowTemperature = "ShowTemperature";
- constexpr auto CcosShowWifi = "ShowWifi";
- constexpr auto CcosShowBattery = "ShowBattery";
- constexpr auto CcosShowBluetooth = "ShowBluetooth";
- constexpr auto CcosIsConnect = "IsConnect";
- }
- namespace ActionKey
- {
- //DetecorCtrl
- constexpr auto GetFPDinformation = "GetFPDinformation";
- constexpr auto ActiveDetector = "ActiveDetector";
- constexpr auto RESET = "RESET";
- constexpr auto EnterExam = "EnterExam";
- constexpr auto ExitExam = "ExitExam";
- constexpr auto AttachConnect = "AttachConnect";
- constexpr auto CancelAttach = "CancelAttach";
- constexpr auto RecoverImage = "RecoverImage";
- constexpr auto ResetConnect = "ResetConnect";
- constexpr auto DisConnectFPD = "DisConnectFPD";
- constexpr auto UpdateFirmware = "UpdateFirmware";
- constexpr auto SaveSensitivity = "SaveSensitivity";
- constexpr auto SetXrayOnNum = "SetXrayOnNum";
- constexpr auto SetExposureTimes = "SetExposureTimes";
- constexpr auto SetValue_PPS = "SetValue_PPS";
- constexpr auto FaultInjection = "FaultInjection";
- constexpr auto EliminateFault = "EliminateFault";
- //Acqusition
- constexpr auto SetAcqMode = "SetAcqMode";
- constexpr auto SetResolution = "SetResolution";
- //Synchronization
- constexpr auto SetSyncMode = "SetSyncMode";
- constexpr auto SetXwindowSize = "SetXwindowSize";
- constexpr auto PrepareAcquisition = "PrepareAcquisition";
- constexpr auto StartAcquisition = "StartAcquisition";
- constexpr auto StopAcquisition = "StopAcquisition";
- constexpr auto ActiveSyncMode = "ActiveSyncMode";
- //Calibration
- constexpr auto SetSID = "SetSID";
- constexpr auto ActiveCalibration = "ActiveCalibration";
- constexpr auto PrepareCalibration = "PrepareCalibration";
- constexpr auto StartCalibration = "StartCalibration";
- constexpr auto StopCalibration = "StopCalibration";
- constexpr auto SetCorrectionType = "SetCorrectionType";
- constexpr auto UploadCalibrationFiles = "UploadCalibrationFiles";
- constexpr auto GetRequestedDose = "GetRequestedDose";
- constexpr auto SetRequestedDose = "SetRequestedDose";
- constexpr auto AcceptCalibration = "AcceptCalibration";
- constexpr auto RejectCalibration = "RejectCalibration";
- constexpr auto SaveCalibrationFile = "SaveCalibrationFile";
- constexpr auto GetCalibrationStep = "GetCalibrationStep";
- constexpr auto StartOffset = "StartOffset";
- constexpr auto AbortOffset = "AbortOffset";
- }
- namespace AttrKey
- {
- //sensor status
- constexpr auto GetTemperatureValue = "GetTemperatureValue";
- constexpr auto GetRemainPowerValue = "GetRemainPowerValue";
- constexpr auto GetWifiStrengthValue = "GetWifiStrengthValue";
- constexpr auto Temperature_Value = "Temperature_Value";
- constexpr auto Remain_Power_Value = "Remain_Power_Value";
- constexpr auto Wifi_Strength_Value = "Wifi_Strength_Value";
- constexpr auto NotifyStatusTimePeriod = "NotifyStatusTimePeriod";
- constexpr auto ReconnectTimePeriod = "ReconnectTimePeriod";
- //DetecorCtrl
- constexpr auto DetectorStatus = "DetectorStatus";
- constexpr auto DetectorConnectStatus = "DetectorConnectStatus";
- constexpr auto DetectorAttach = "DetectorAttach";
- constexpr auto FPDAttached = "FPDAttached";
- constexpr auto DetectorInitialStatus = "DetectorInitialStatus";
- constexpr auto DetectorUpdateFWStatus = "DetectorUpdateFWStatus";
- constexpr auto FPDShockSensorInfo = "FPDShockSensorInfo";
- constexpr auto SaveRawDataMode = "SaveRawDataMode";
- constexpr auto DetectorWidth = "DetectorWidth";
- constexpr auto DetectorHeight = "DetectorHeight";
- constexpr auto DetectorWiredIP = "DetectorWiredIP";
- constexpr auto DetectorWirelessIP = "DetectorWirelessIP";
- constexpr auto SerialNumber = "SerialNumber";
- constexpr auto SupportSwitchResolution = "SupportSwitchResolution";
- constexpr auto CurrentResolution = "CurrentResolution";
- //Calibration
- constexpr auto CalibrationStatus = "CalibrationStatus";
- constexpr auto CalibrationProgress = "CalibrationProgress";
- constexpr auto UploadCalibrationFilesResult = "UploadCalibrationFilesResult";
- constexpr auto SupportCalibrationType = "SupportCalibrationType";
- constexpr auto SaveCalibrationFileFinish = "SaveCalibrationFileFinish";
- constexpr auto HaveImgCalibration = "HaveImgCalibration";
- constexpr auto OffsetStatus = "OffsetStatus";
- constexpr auto OffsetCounts = "OffsetCounts";
- constexpr auto OffsetProgress = "OffsetProgress";
- constexpr auto OffsetInterval = "OffsetInterval";
- constexpr auto CalibMode = "CalibMode";
- constexpr auto LastCalibrationDate = "LastCalibrationDate";
- constexpr auto CalibrationFileExpireTime = "CalibrationFileExpireTime";
- constexpr auto CalibrationFileExpirationReminder = "CalibrationFileExpirationReminder";
- //Synchronization
- constexpr auto FPDReadyStatus = "FPDReadyStatus";
- constexpr auto XwindowStatus = "XwindowStatus";
- constexpr auto ImageReadingStatus = "ImageReadingStatus";
- constexpr auto EcomFPDState = "EcomFPDState";
- constexpr auto FPDExpReady = "FPDExpReady";
- constexpr auto XrayON = "XrayON";
- constexpr auto SyncMode = "SyncMode";
- constexpr auto SupportSyncMode = "SupportSyncMode";
- //Acquisition
- constexpr auto NoNeedWaitImage = "NoNeedWaitImage";
- constexpr auto ImgDataInfo = "ImgDataInfo";
- constexpr auto AutonumousMapFinish = "AutonumousMapFinish";
- constexpr auto FluPPS = "FluPPS";
- constexpr auto AcqMode = "AcqMode";
- constexpr auto MaxFrameRate = "MaxFrameRate";
- constexpr auto ModeInRunning = "ModeInRunning";
- //DICOM
- constexpr auto DetectorType = "DetectorType";
- constexpr auto Description = "Description";
- constexpr auto DetectorID = "DetectorID";
- constexpr auto FieldofViewShape = "FieldofViewShape";
- constexpr auto FieldofViewDimension = "FieldofViewDimension";
- constexpr auto DateofLastDetectorCalibration = "DateofLastDetectorCalibration";
- constexpr auto TimeofLastDetectorCalibration = "TimeofLastDetectorCalibration";
- constexpr auto DetectorConditionsNominalFlag = "DetectorConditionsNominalFlag";
- constexpr auto FPDSensitivity = "FPDSensitivity";
- constexpr auto PixelData = "PixelData";
- constexpr auto TargetEXI = "TargetEXI";
- constexpr auto ImagerPixelSpacing = "ImagerPixelSpacing";
- constexpr auto DistanceSourcetoDetector = "DistanceSourcetoDetector";
- constexpr auto DistanceSourcetoPatient = "DistanceSourcetoPatient";
- constexpr auto EstimatedRadiographicMagnificationFactor = "EstimatedRadiographicMagnificationFactor";
- constexpr auto DetectorElementSpacing = "DetectorElementSpacing";
- }
- namespace nsDev = CCOS::Dev;
- //-----------------------------------------------------------------------------
- // AcqUnit
- //-----------------------------------------------------------------------------
- class _CCOSDEVFPDDEVICEMOULD_API AcqUnit : public IOLogicUnit, public IODeviceDetail
- {
- string m_strEcomFPDState;
- string m_strNoNeedWaitImage;
- string m_strLastImage;
- string m_strAutonumousMapFinish;
- string m_strFluPPS;
- string m_strMaxFrameRate;
- string m_strAcqMode;
- 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 JSGetAcqMode(std::string& out);
- RET_STATUS JSSetAcqMode(std::string in, std::string& out);
- RET_STATUS JSSetResolution(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 JSSetFluPPS(std::string in, std::string& out);
- RET_STATUS JSGetEcomFPDState(std::string& out);
- RET_STATUS SetEcomFPDState(string in);
- RET_STATUS JSGetNoNeedWaitImage(std::string& out);
- RET_STATUS JSSetNoNeedWaitImage(std::string in);
- RET_STATUS JSGetLastImage(std::string& out);
- RET_STATUS JSGetFluPPS(std::string& out);
- RET_STATUS JSGetMaxFrameRate(std::string& out);
- RET_STATUS JSAutonumousMapFinish(std::string& out);
- DWORD AddFrame(IMAGE_VIEW_TYPE Type, string ImageHead, unsigned short* pFrameBuff, DWORD FrameSize);
- RET_STATUS OEM_IF AddFrameWithRawHead(IMAGE_VIEW_TYPE Type, string ImageHead, unsigned short* pFrameBuff, DWORD FrameSize);
- RET_STATUS JSUpdateModeInRunning(std::string in, std::string& out);
- 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);
- bool OEM_IF FlipX(unsigned short* pData, unsigned int nWidth, unsigned int nHeight);
- bool OEM_IF FlipY(unsigned short* pData, unsigned int nWidth, unsigned int nHeight);
- bool OEM_IF RotateImage(unsigned short* imageBuffer, int nImageHeight, int nImageWidth, int nAngle);
- void OEM_IF SetMaxFrameRate(float fMaxFrameRate);
- void OEM_NOTIFY SendNoNeedWaitImage(bool bflag);
- void OEM_NOTIFY SendAutonumousMapFinish(int bFlag);
- void OEM_NOTIFY FluPPSNotify(float nCurrentFps);
- void OEM_NOTIFY AcqModeNotify(string strAcqMode);
- void OEM_NOTIFY ImagerPixelSpacingNotify(int nPixelSpacing);
- void OEM_NOTIFY SidNotify(float fSid);
- void OEM_NOTIFY SodNotify(float fSod);
- void OEM_NOTIFY ErmfNotify(float fErmf);
- protected:
- virtual RET_STATUS SetAcqMode(string strAcqMode) = 0;
- virtual RET_STATUS SetResolution(int nResolution);
- 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& strFile1, string& strFile2, string& strFile3);
- virtual RET_STATUS SetFluPPS(float fFluPPS);
- virtual RET_STATUS GetFluPPS(float& fFluPPS);
- virtual RET_STATUS UpdateModeInRunning(std::vector<AcqModeInfo>& vAcqModeList);
- };
- //-----------------------------------------------------------------------------
- // SyncUnit
- //-----------------------------------------------------------------------------
- class _CCOSDEVFPDDEVICEMOULD_API SyncUnit : public IOLogicUnit, public IODeviceDetail
- {
- string m_strReady4EXP;
- string m_strXwindowStatus;
- string m_strFPDExpReady;
- string m_strXrayON;
- string m_strConnectStatus;
- string m_strImageReadingStatus;
- string m_strSupportSyncMode;
-
- 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 JSSetXwindowSize(std::string in, std::string& out);
- RET_STATUS JSSetFrameRate(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 JSActiveSyncMode(std::string in, std::string& out);
- RET_STATUS JSGetSyncMode(std::string& out);
- RET_STATUS JSGetFPDReady(std::string& out);
- RET_STATUS JSSetFPDReady(std::string in);
- RET_STATUS JSGetConnectStatus(std::string& out);
- RET_STATUS JSGetXrayON(std::string& out);
- RET_STATUS JSGetImageReadingStatus(std::string& out);
- RET_STATUS JSSetImageReadingStatus(std::string in);
- RET_STATUS JSGetExpReadyStatus(std::string& out);
- RET_STATUS JSGetXWindowStatus(std::string& out);
- RET_STATUS JSSetXWindowStatus(std::string in);
- RET_STATUS JSGetSupportSyncMode(std::string& out);
- void OEM_NOTIFY FPDReadyNotify(bool bReady);
- void OEM_NOTIFY FPDConnectStatusNotify(bool bConnect);
- void OEM_NOTIFY XWindowOnNotify();
- void OEM_NOTIFY XWindowOffNotify();
- void OEM_NOTIFY FakeEIPONNotify();
- void OEM_NOTIFY XrayOnNotify();
- void OEM_NOTIFY XrayOffNotify();
- void OEM_NOTIFY ImageReadingNotify();
- void OEM_NOTIFY ExpReadyNotify(int nMillisecond);
- RET_STATUS SetSupportSyncMode(string in);
-
- 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 PrepareAcquisition() = 0;
- virtual RET_STATUS StartAcquisition(string in = "") = 0;
- virtual RET_STATUS StopAcquisition() = 0;
- virtual RET_STATUS ActiveSyncMode(int nSyncMode);
- };
- //-----------------------------------------------------------------------------
- // CalibUnit
- //-----------------------------------------------------------------------------
- class _CCOSDEVFPDDEVICEMOULD_API CalibUnit : public IOLogicUnit, public IODeviceDetail
- {
- CCOS_CALIBRATION_MODE m_CalibMode;
- CCOS_CALIBRATION_TYPE m_CurrentCalibType;
- CCOS_CALIBRATION_STATUS m_CalibStatus;
- string m_strCalibProgress;
- string m_strUploadCalibrationFilesResult;
- string m_strSaveCalibrationFileFinish;
- string m_strOffsetStatus;
- string m_strOffsetCounts;
- string m_strOffsetProgress;
- string m_strOffsetInterval;
- string m_strLastCalibrationDate;
- string m_strCalibrationFileExpireTime;
- string m_strCalibrationFileExpirationReminder;
- protected:
- std::shared_ptr <CCOS::Dev::IOEventCenter> m_EventCenter;
- public:
- CalibUnit();
- ~CalibUnit();
- std::string GetGUID() const override { return DetectorCalibType; }
- void 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 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);
- RET_STATUS JSGetCalibStatus(std::string& out);
- RET_STATUS JSGetCalibProgress(std::string& out);
- RET_STATUS JSGetUploadCalibrationFilesResult(std::string& out);
- RET_STATUS JSGetSupportCalibrationType(std::string& out);
- RET_STATUS JSGetHaveImgCalibration(std::string& out);
- RET_STATUS JSGetSaveCalibrationFileFinish(std::string& out);
- RET_STATUS JSStartOffset(std::string in, std::string& out);
- RET_STATUS JSAbortOffset(std::string in, std::string& out);
- RET_STATUS PauseCalibration();
- RET_STATUS SetCalibrationStatus(string in);
- RET_STATUS SetCalibrationProgress(string in);
- RET_STATUS SetUploadCalibrationFilesResult(string in);
- void SetSaveCalibrationFileFinish(bool bResult);
- CCOS_CALIBRATION_TYPE GetCalibrationType();
- CCOS_CALIBRATION_STATUS GetCalibrationStatus();
- RET_STATUS JSGetOffsetStatus(std::string& out);
- RET_STATUS SetOffsetStatus(std::string in);
- RET_STATUS JSGetOffsetCounts(std::string& out);
- RET_STATUS SetOffsetCounts(std::string in);
- RET_STATUS JSGetOffsetProgress(std::string& out);
- RET_STATUS SetOffsetProgress(std::string in);
- RET_STATUS JSGetOffsetInterval(std::string& out);
- RET_STATUS SetOffsetInterval(std::string in);
- RET_STATUS JSUpdateOffsetInterval(std::string in, std::string& out);
- RET_STATUS JSGetCalibMode(std::string& out);
- RET_STATUS SetCalibMode(string in);
- RET_STATUS JSUpdateCalibMode(std::string in, std::string& out);
- RET_STATUS JSGetLastCalibrationDate(std::string& out);
- RET_STATUS SetLastCalibrationDate(string in);
- RET_STATUS JSUpdateLastCalibrationDate(std::string in, std::string& out);
- RET_STATUS JSGetCalibrationFileExpireTime(std::string& out);
- RET_STATUS SetCalibrationFileExpireTime(string in);
- RET_STATUS JSUpdateCalibrationFileExpireTime(std::string in, std::string& out);
- RET_STATUS JSGetCalibrationFileExpirationReminder(std::string& out);
- RET_STATUS SetCalibrationFileExpirationReminder(string in);
- RET_STATUS JSUpdateCalibrationFileExpirationReminder(std::string in, std::string& out);
- 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 RET_STATUS GetCalibrationStep(int nDetectorID, string& strCalibrationStepInfo);
- virtual RET_STATUS AcceptCalibration();
- virtual RET_STATUS RejectCalibration();
- virtual RET_STATUS SaveCalibrationFile(bool bSaveFlag);
- virtual bool Support_DarkCalib();
- virtual bool Support_XrayCalib();
- virtual bool Support_HaveImageCalib();
- virtual RET_STATUS StartOffset(bool isAll);
- virtual RET_STATUS AbortOffset();
- virtual RET_STATUS UpdateCalibMode(CCOS_CALIBRATION_MODE eCalibMode);
- virtual RET_STATUS UpdateLastCalibrationDate(std::string in);
- virtual RET_STATUS UpdateCalibrationFileExpireTime(std::string in);
- virtual RET_STATUS UpdateCalibrationFileExpirationReminder(std::string in);
- };
- //-----------------------------------------------------------------------------
- // DetectorCtrlUnit
- //-----------------------------------------------------------------------------
- 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_strDetectorWidth;
- string m_strDetectorHeight;
- string m_strDetectorWiredIP;
- string m_strDetectorWirelessIP;
- string m_strLocalIP;
- string m_strSerialNumber;
- string m_strShowTemperature;
- string m_strShowWifi;
- string m_strShowBattery;
- string m_strShowBluetooth;
- string m_strSupportSwitchResolution;
- string m_strCurrentResolution;
-
- 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);
- //Action
- 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);
- RET_STATUS JSOfflineFPD(std::string in, std::string& out);
- RET_STATUS JSOnlineFPD(std::string in, std::string& out);
- RET_STATUS JSSetFilterType(std::string in, std::string& out);
- RET_STATUS JSSaveRawDataMode(std::string in, std::string& out);
- RET_STATUS JSGetImageMetaData(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 JSExportAutonumousAll(std::string in, std::string& out);
- RET_STATUS JSFaultInjection(std::string in, std::string& out);
- RET_STATUS JSEliminateFault(std::string in, std::string& out);
- //Get Set
- RET_STATUS SetDetectorStatus(string in);
- RET_STATUS JSGetFPDStatus(std::string& out);
- RET_STATUS SetConnectStatus(string in);
- RET_STATUS JSGetConnectStatus(std::string& out);
- RET_STATUS SetAttachResult(string in);
- RET_STATUS JSGetAttachResult(std::string& out);
- RET_STATUS SetAttachStatus(string in);
- RET_STATUS JSGetAttachStatus(std::string& out);
- RET_STATUS SetInitialStatus(string in);
- RET_STATUS JSGetInitialStatus(std::string& out);
- RET_STATUS SetUpdateFWStatus(string in);
- RET_STATUS JSGetUpdateFWStatus(std::string& out);
- RET_STATUS SetShockSensorInfo(string in);
- RET_STATUS JSGetShockSensorInfo(std::string& out);
- RET_STATUS SetRecoverImageState(string in);
- RET_STATUS JSGetRecoverImageState(std::string& out);
- RET_STATUS SetRecoverImageEvent(string in);
- RET_STATUS JSGetRecoverImageEvent(std::string& out);
- RET_STATUS SetFieldofViewShape(string in);
- RET_STATUS JSGetFieldofViewShape(std::string& out);
- RET_STATUS SetFieldofViewDimension(string in);
- RET_STATUS JSGetFieldofViewDimension(std::string& out);
- RET_STATUS SetDetectorType(string in);
- RET_STATUS JSGetDetectorType(std::string& out);
- RET_STATUS SetDescription(string in);
- RET_STATUS JSGetDescription(std::string& out);
- RET_STATUS SetDetectorID(string in);
- RET_STATUS JSGetDetectorID(std::string& out);
- RET_STATUS SetDateofLastDetectorCalibration(string in);
- RET_STATUS JSGetDateofLastDetectorCalibration(std::string& out);
- RET_STATUS SetTimeofLastDetectorCalibration(string in);
- RET_STATUS JSGetTimeofLastDetectorCalibration(std::string& out);
- RET_STATUS SetDetectorConditionsNominalFlag(string in);
- RET_STATUS JSGetDetectorConditionsNominalFlag(std::string& out);
- RET_STATUS SetFPDSensitivity(string in);
- RET_STATUS JSGetFPDSensitivity(std::string& out);
- RET_STATUS SetFPDSensitivityResult(string in);
- RET_STATUS JSGetFPDSensitivityResult(std::string& out);
- RET_STATUS SetPixelData(string in);
- RET_STATUS JSGetPixelData(std::string& out);
- RET_STATUS SetTargetEXI(string in);
- RET_STATUS JSGetTargetEXI(std::string& out);
- RET_STATUS SetSupportDDR(string in);
- RET_STATUS JSGetSupportDDR(std::string& out);
- RET_STATUS SetSupportSwitchResolution(string in);
- RET_STATUS JSGetSupportSwitchResolution(std::string& out);
- RET_STATUS SetCurrentResolution(string in);
- RET_STATUS JSGetCurrentResolution(std::string& out);
- RET_STATUS SetLastError(string in);
- RET_STATUS JSGetLastError(std::string& out);
- RET_STATUS SetFirmwareStatus(string in);
- RET_STATUS JSGetFirmwareStatus(std::string& out);
- RET_STATUS SetDetectorWidth(string in);
- RET_STATUS JSGetDetectorWidth(std::string& out);
- RET_STATUS SetDetectorHeight(string in);
- RET_STATUS JSGetDetectorHeight(std::string& out);
- RET_STATUS SetDetectorWiredIP(string in);
- RET_STATUS JSGetDetectorWiredIP(std::string& out);
- RET_STATUS SetDetectorWirelessIP(string in);
- RET_STATUS JSGetDetectorWirelessIP(std::string& out);
- RET_STATUS SetLocalIP(string in);
- RET_STATUS JSGetLocalIP(std::string& out);
- RET_STATUS SetSerialNumber(string in);
- RET_STATUS JSGetSerialNumber(std::string& out);
- RET_STATUS SetShowTemperature(string in);
- RET_STATUS JSGetShowTemperature(std::string& out);
- RET_STATUS SetShowWifi(string in);
- RET_STATUS JSGetShowWifi(std::string& out);
- RET_STATUS SetShowBattery(string in);
- RET_STATUS JSGetShowBattery(std::string& out);
- RET_STATUS SetShowBluetooth(string in);
- RET_STATUS JSGetShowBluetooth(std::string& out);
- DETECTOR_STATUS GetDetectorStatus();
- //update
- RET_STATUS JSUpdateNotifyStatusTimePeriod(std::string in, std::string& out);
- RET_STATUS JSUpdateReconnectTimePeriod(std::string in, std::string& out);
- RET_STATUS JSUpdateDetectorWiredIP(std::string in, std::string& out);
- RET_STATUS JSUpdateDetectorWirelessIP(std::string in, std::string& out);
- RET_STATUS JSUpdateLocalIP(std::string in, std::string& out);
- RET_STATUS JSUpdateSerialNumber(std::string in, std::string& out);
- RET_STATUS JSUpdateShowTemperature(std::string in, std::string& out);
- RET_STATUS JSUpdateShowWifi(std::string in, std::string& out);
- RET_STATUS JSUpdateShowBattery(std::string in, std::string& out);
- RET_STATUS JSUpdateShowBluetooth(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();
- virtual RET_STATUS UpdateNotifyStatusTimePeriod(int nTime);
- virtual RET_STATUS UpdateReconnectTimePeriod(int nTime);
- virtual RET_STATUS UpdateDetectorWiredIP(string strWiredIP);
- virtual RET_STATUS UpdateDetectorWirelessIP(string strWirelessIP);
- virtual RET_STATUS UpdateLocalIP(string strLocalIP);
- virtual RET_STATUS FaultInjection(string strErrorCode);
- virtual RET_STATUS EliminateFault(string strErrorCode);
- };
- //-----------------------------------------------------------------------------
- // ConfigInfo
- //-----------------------------------------------------------------------------
- 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();
- ~FPDDeviceMould();
- //protected:
- // virtual void RegisterCtrl();
- // virtual void RegisterAcq();
- // virtual void RegisterSync();
- // virtual void RegisterCalib();
- // virtual void RegisterOthers();
- };
- }
- 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;
- };
- }
|