123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287 |
- #pragma once
- #include <string>
- #include "DriverConfigInfo.hpp"
- #include "DIOS.Dev.IODevice.hpp"
- #include "DIOS.Dev.IODevice.Detail.hpp"
- #include "Generator.BasicMoulds.hpp"
- #include "Logger.temp.h"
- namespace nsDetail = DIOS::Dev::Detail;
- #ifndef DIOSDEVGENDEVICEMOULD_EXPORTS
- #ifdef _WIN64
- #ifdef _DEBUG
- #pragma comment(lib, "DIOS.Dev.Generator.Mould64D.lib")
- #else
- #pragma comment(lib, "DIOS.Dev.Generator.Mould64.lib")
- #endif
- #else
- #ifdef _DEBUG
- #pragma comment(lib, "DIOS.Dev.Generator.MouldD.lib")
- #else
- #pragma comment(lib, "DIOS.Dev.Generator.MouldD.lib")
- #endif
- #endif
- #endif
- #ifdef DIOSDEVGENDEVICEMOULD_EXPORTS
- #define _DIOSDEVGENDEVICEMOULD_API __declspec(dllexport)
- #else
- #define _DIOSDEVGENDEVICEMOULD_API __declspec(dllimport)
- #endif
- #pragma warning (disable:4251) // warning C4251: class “DIOS::Dev::Detail::Generator::DoseUnit”需要有 dll 接口由 class“DIOS::Dev::Detail::Generator::GeneratorMould”的客户端使用
- namespace DIOS::Dev::Detail::Generator
- {
- //-----------------------------------------------------------------------------
- // DoseUnit
- //-----------------------------------------------------------------------------
- class _DIOSDEVGENDEVICEMOULD_API DoseUnit : public IOLogicUnit
- {
- public:
- DoseUnit() {};
- virtual ~DoseUnit() {};
- public:
- std::unique_ptr<KVMould> m_KV;
- std::unique_ptr<MAMould> m_MA;
- std::unique_ptr<MSMould> m_MS;
- std::unique_ptr<MASMould> m_MAS;
- std::unique_ptr<TECHMODEMould> m_Techmode;
- std::unique_ptr<WORKSTATIONMould> m_WS;
- std::unique_ptr<FOCUSMould> m_Focus;
- std::unique_ptr<AECFIELDMould> m_AECField;
- std::unique_ptr<AECFILMMould> m_AECFilm;
- std::unique_ptr<AECDENSITYMould> m_AECDensity;
- std::unique_ptr<TUBEHEATMould> m_HE;
- std::unique_ptr<POSTKVMould> m_PostKV;
- std::unique_ptr<POSTMAMould> m_PostMA;
- std::unique_ptr<POSTMSMould> m_PostMS;
- std::unique_ptr<POSTMASMould> m_PostMAS;
- std::unique_ptr<GENSYNSTATEMould> m_GenSynState;
- std::unique_ptr<GENSTATEMould> m_GenState;
- std::unique_ptr<TOTALEXPNUMMould> m_GenTotalExpNumber;
- std::unique_ptr<TOTALACQTIMESMould> m_GenTotalAcqTimes;
- std::unique_ptr<TUBECOOLTIMEMould> m_GenTubeCoolWaitTimes;
- std::unique_ptr<TUBEOVERLOADNUMMould> m_GenTubeOverLoadNumber;
- std::unique_ptr<CUREXPNUMMould> m_GenCurrentExpNumber;
- std::unique_ptr<EXPMODEMould> m_ExpMode;
- std::unique_ptr<FRAMERATEMould> m_FrameRate;
- std::unique_ptr<MODALITYMould> m_Modality;
- std::unique_ptr<BATTERYCHARGSTATEMould> m_BatteryChargeState;
- std::unique_ptr<REFERENCEAIRKERMAMould> m_ReferenceAirKerma;
- std::unique_ptr<KVLISTMould> m_KVList;
- std::unique_ptr<MASLISTMould> m_mAsList;
- };
- //-----------------------------------------------------------------------------
- // GeneratorMould
- //-----------------------------------------------------------------------------
- namespace nDev = DIOS::Dev;
- class _DIOSDEVGENDEVICEMOULD_API GeneratorMould
- {
- public:
- GeneratorMould ();
- ~GeneratorMould ();
- protected:
- virtual void Register(Dispatch* Dispatch);
- virtual void RegisterKV (Dispatch* Dispatch); // 子类可能希望注册更多的
- virtual void RegisterMA(Dispatch* Dispatch);
- virtual void RegisterMS(Dispatch* Dispatch);
- virtual void RegisterMAS(Dispatch* Dispatch);
- virtual void RegisterFOCUS(Dispatch* Dispatch);
- virtual void RegisterTECHMODE(Dispatch* Dispatch);
- virtual void RegisterAEC(Dispatch* Dispatch);
- virtual void RegisterExpEnable(Dispatch* Dispatch);
- virtual void RegisterGeneratortoSyncStatus(Dispatch* Dispatch);
- private:
- //caoxue
- nDev::RET_STATUS JSIncKV (std::string in, std::string& out);
- nDev::RET_STATUS JSDecKV (std::string in, std::string& out);
- nDev::RET_STATUS JSGetKV (std::string& out);
- nDev::RET_STATUS JSSetKV (std::string in, std::string& out);
- nDev::RET_STATUS JSIncMA(std::string in, std::string& out);
- nDev::RET_STATUS JSDecMA(std::string in, std::string& out);
- nDev::RET_STATUS JSGetMA(std::string& out);
- nDev::RET_STATUS JSSetMA(std::string in, std::string& out);
- nDev::RET_STATUS JSIncMS(std::string in, std::string& out);
- nDev::RET_STATUS JSDecMS(std::string in, std::string& out);
- nDev::RET_STATUS JSGetMS(std::string& out);
- nDev::RET_STATUS JSSetMS(std::string in, std::string& out);
- nDev::RET_STATUS JSIncMAS(std::string in, std::string& out);
- nDev::RET_STATUS JSDecMAS(std::string in, std::string& out);
- nDev::RET_STATUS JSGetMAS(std::string& out);
- nDev::RET_STATUS JSSetMAS(std::string in, std::string& out);
- nDev::RET_STATUS JSGetTECHMODE(std::string& out);
- nDev::RET_STATUS JSSetTECHMODE(std::string in, std::string& out);
- nDev::RET_STATUS JSGetFOCUS(std::string& out);
- nDev::RET_STATUS JSSetFOCUS(std::string in, std::string& out);
- nDev::RET_STATUS JSGetAECDENSITY(std::string& out);
- nDev::RET_STATUS JSSetAECDENSITY(std::string in, std::string& out);
- nDev::RET_STATUS JSGetAECFIELD(std::string& out);
- nDev::RET_STATUS JSSetAECFIELD(std::string in, std::string& out);
- nDev::RET_STATUS JSGetAECFILM(std::string& out);
- nDev::RET_STATUS JSSetAECFILM(std::string in, std::string& out);
- nDev::RET_STATUS JSGetWORKSTATION(std::string& out);
- nDev::RET_STATUS JSSetWORKSTATION(std::string in, std::string& out);
- nDev::RET_STATUS JSGetHE(std::string& out);
- nDev::RET_STATUS JSQueryHE(std::string in, std::string& out);
- nDev::RET_STATUS JSGetPOSTKV(std::string& out);
- nDev::RET_STATUS JSObtainPOSTKV(std::string in, std::string& out);
- nDev::RET_STATUS JSGetPOSTMA(std::string& out);
- nDev::RET_STATUS JSObtainPOSTMA(std::string in, std::string& out);
- nDev::RET_STATUS JSGetPOSTMS(std::string& out);
- nDev::RET_STATUS JSObtainPOSTMS(std::string in, std::string& out);
- nDev::RET_STATUS JSGetPOSTMAS(std::string& out);
- nDev::RET_STATUS JSObtainPOSTMAS(std::string in, std::string& out);
- nDev::RET_STATUS JSSetAPR (std::string in, std::string& out);
- nDev::RET_STATUS JSGetGeneratortoSyncStatus(std::string& out);
- nDev::RET_STATUS JSSetGeneratortoSyncStatus(std::string in, std::string& out);
- nDev::RET_STATUS JSGetGeneratortoStatus(std::string& out);
- nDev::RET_STATUS JSGetGenTotalExpNumber(std::string& out);
- nDev::RET_STATUS JSGetGenTotalAcqTimes(std::string& out);
- nDev::RET_STATUS JSGetGenTubeCoolWaitTimes(std::string& out);
- nDev::RET_STATUS JSGetGenTubeOverLoadNumber(std::string& out);
- nDev::RET_STATUS JSGetGenCurrentExpNumber(std::string& out);
- nDev::RET_STATUS JSGetGeneratorBatteryChargState(std::string& out);
- nDev::RET_STATUS JSGetGeneratorReferenceAirKerma(std::string& out);
- nDev::RET_STATUS JSGetGeneratorKVList(std::string& out);
- nDev::RET_STATUS JSGetGeneratormAsList(std::string& out);
- nDev::RET_STATUS JSSetExpEnable(std::string in, std::string& out);
- nDev::RET_STATUS JSSetExpDisable(std::string in, std::string& out);
- nDev::RET_STATUS JSReset(std::string in, std::string& out);
- nDev::RET_STATUS JSSetExpMode(std::string in, std::string& out);
- nDev::RET_STATUS JSSetFrameRate(std::string in, std::string& out);
- nDev::RET_STATUS JSSetModality(std::string in, std::string& out);
- protected:
- virtual nDev::RET_STATUS IncKV () = 0;
- virtual nDev::RET_STATUS DecKV () = 0;
- virtual float GetKV ();
- virtual nDev::RET_STATUS SetKV (float value) = 0;
- virtual nDev::RET_STATUS IncMA () = 0;
- virtual nDev::RET_STATUS DecMA () = 0;
- virtual float GetMA ();
- virtual nDev::RET_STATUS SetMA (float value) = 0;
- virtual nDev::RET_STATUS IncMS () = 0;
- virtual nDev::RET_STATUS DecMS () = 0;
- virtual float GetMS ();
- virtual nDev::RET_STATUS SetMS (float value) = 0;
- virtual nDev::RET_STATUS IncMAS () = 0;
- virtual nDev::RET_STATUS DecMAS () = 0;
- virtual float GetMAS ();
- virtual nDev::RET_STATUS SetMAS (float value) = 0;
- virtual int GetTechmode ();
- virtual nDev::RET_STATUS SetTechmode (int value) = 0;
- virtual int GetFocus ();
- virtual nDev::RET_STATUS SetFocus (int value) = 0;
- virtual int GetAECDensity ();
- virtual nDev::RET_STATUS SetAECDensity (int value) = 0;
- virtual int GetAECField ();
- virtual nDev::RET_STATUS SetAECField (int value) = 0;
- virtual int GetAECFilm ();
- virtual nDev::RET_STATUS SetAECFilm (int value) = 0;
- virtual int GetWS ();
- virtual nDev::RET_STATUS SetWS (const std::string value) = 0;
- virtual int GetHE();
- virtual nDev::RET_STATUS QueryHE(int& value) = 0;
- virtual float GetPostKV();
- virtual nDev::RET_STATUS QueryPostKV(float& value) = 0;
- virtual float GetPostMA();
- virtual nDev::RET_STATUS QueryPostMA(float& value) = 0;
- virtual float GetPostMS();
- virtual nDev::RET_STATUS QueryPostMS(float& value) = 0;
- virtual float GetPostMAS();
- virtual nDev::RET_STATUS QueryPostMAS(float& value) = 0;
- virtual int GetGenSynState();
- virtual nDev::RET_STATUS SetGenSynState(int value) = 0;
- virtual int GetGenState();
- virtual nDev::RET_STATUS SetGenState(int value) = 0;
- virtual int GetGenTotalExpNumber();
- virtual int GetGenTotalAcqTimes();
- virtual int GetGenTubeCoolWaitTimes();
- virtual int GetGenTubeOverLoadNumber();
- virtual int GetGenCurrentExpNumber();
-
- virtual int GetGeneratorBatteryChargState();
- virtual int GetGeneratorReferenceAirKerma();
- virtual string GetGeneratorKVList();
- virtual string GetGeneratormAsList();
- virtual nDev::RET_STATUS SetAPR (const _tAPRArgs & t) = 0;
- virtual nDev::RET_STATUS SetExpEnable() = 0;
- virtual nDev::RET_STATUS SetExpDisable() = 0;
- virtual nDev::RET_STATUS Reset()=0;
- virtual nDev::RET_STATUS SetExpMode(std::string value) = 0;
- virtual nDev::RET_STATUS SetFrameRate(FLOAT frameRate) = 0;
- protected:
- DoseUnit m_DoseUnit;
- };
- }
- namespace DIOS::Dev::Detail::Generator
- {
- class _DIOSDEVGENDEVICEMOULD_API DriverMould : public DIOS::Dev::IODriver
- {
- public:
- DriverMould ();
- ~DriverMould ();
- virtual std::string GetGUID () const;
- protected:
- std::list <ConfigInfo> m_ConfigInfo;
- };
- }
|