123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140 |
- #pragma once
- #include <string>
- #include "DIOS.Dev.IODevice.hpp"
- #include "DIOS.Dev.IODevice.Detail.hpp"
- #include "Collimator.BasicMoulds.hpp"
- #include "DriverConfigInfo.hpp"
- namespace nsDetail = DIOS::Dev::Detail;
- #ifndef DIOSDEVCollimatorDEVICEMOULD_EXPORTS
- #ifdef _WIN64
- #ifdef _DEBUG
- #pragma comment(lib, "DIOS.Dev.Collimator.Mould64D.lib")
- #else
- #pragma comment(lib, "DIOS.Dev.Collimator.Mould64.lib")
- #endif
- #else
- #ifdef _DEBUG
- #pragma comment(lib, "DIOS.Dev.Collimator.MouldD.lib")
- #else
- #pragma comment(lib, "DIOS.Dev.Collimator.MouldD.lib")
- #endif
- #endif
- #endif
- #ifdef DIOSDEVCollimatorDEVICEMOULD_EXPORTS
- #define _DIOSDEVCOLLIMATORDEVICEMOULD_API __declspec(dllexport)
- #else
- #define _DIOSDEVCOLLIMATORDEVICEMOULD_API __declspec(dllimport)
- #endif
- #pragma warning (disable:4251) // warning C4251: class “DIOS::Dev::Detail::Generator::DoseUnit”需要有 dll 接口由 class“DIOS::Dev::Detail::Generator::ColliamtorMould”的客户端使用
- namespace DIOS::Dev::Detail::Collimator
- {
- //获取日志配置路径
- _DIOSDEVCOLLIMATORDEVICEMOULD_API string GetProcessDirectory();
- //获取配置文件中指定模块的版本号
- _DIOSDEVCOLLIMATORDEVICEMOULD_API bool GetVersion(string& version, HMODULE hMyModule);
- _DIOSDEVCOLLIMATORDEVICEMOULD_API bool GetVersion(string& version, ResDataObject& config);
- _DIOSDEVCOLLIMATORDEVICEMOULD_API bool GetVersion(string& version);
- _DIOSDEVCOLLIMATORDEVICEMOULD_API void TransJsonText(ResDataObject& config);
- //-----------------------------------------------------------------------------
- // CollimatorUnit
- //-----------------------------------------------------------------------------
- class _DIOSDEVCOLLIMATORDEVICEMOULD_API CollimatorUnit : public IOLogicUnit
- {
- public:
- CollimatorUnit() {};
- virtual ~CollimatorUnit() {};
- public:
- std::unique_ptr<MODEMould> m_Mode;
- std::unique_ptr<XSIZEMould> m_XSize;
- std::unique_ptr<YSIZEMould> m_YSize;
- std::unique_ptr<FILTERMould> m_Filter;
- std::unique_ptr<SIDMould> m_SID;
- std::unique_ptr<ANGLEMould> m_Angle;
- std::unique_ptr<LIGHTMould> m_Light;
- std::unique_ptr<XRATIOMould> m_XRatio;
- std::unique_ptr<YRATIOMould> m_YRatio;
- std::unique_ptr<ReversalMould> m_Reversal;
- std::unique_ptr<ConnectionStatusMould> m_ConnectionStatus;
- float m_fThresholdValue{ 0 };
- };
- //-----------------------------------------------------------------------------
- // ColliamtorMould
- //-----------------------------------------------------------------------------
- namespace nDev = DIOS::Dev;
- class _DIOSDEVCOLLIMATORDEVICEMOULD_API ColliamtorMould
- {
- public:
- ColliamtorMould();
- ~ColliamtorMould();
- protected:
- virtual void Register(Dispatch* Dispatch);
- protected:
- virtual int GetMode();
- virtual RET_STATUS SetCollimatorMode(int pParams) = 0;
- virtual int GetXSize();
- virtual int GetYSize();
- virtual RET_STATUS SetCollimatorSize(float xsize, float ysize) = 0;
- virtual int GetSID();
- virtual RET_STATUS SetCollimatorSID(int sid) = 0;
- virtual int GetFilter();
- virtual RET_STATUS SetCollimatorFilter(int pParams) = 0;
- virtual int GetAngle();
- virtual RET_STATUS SetCollimatorAngle(float pParams) = 0;
- virtual int GetCollimatorLight();
- virtual RET_STATUS SetCollimatorLight(int pParams) = 0;
- virtual RET_STATUS SetHCollimatorOpen(bool bStatus);
- virtual RET_STATUS SetHCollimatorClose(bool bStatus);
- virtual RET_STATUS SetVCollimatorOpen(bool bStatus);
- virtual RET_STATUS SetVCollimatorClose(bool bStatus);
- virtual RET_STATUS Reset();
- virtual int GetXRatio();
- virtual int GetYRatio();
- virtual RET_STATUS SetCollimatorRatio(float xproportion, float yproportion);
- virtual int GetConnectionStatus();
- protected:
- CollimatorUnit m_CollimatorUnit;
- };
- }
- namespace DIOS::Dev::Detail::Collimator
- {
- class _DIOSDEVCOLLIMATORDEVICEMOULD_API DriverMould : public DIOS::Dev::IODriver
- {
- public:
- DriverMould();
- ~DriverMould();
- virtual std::string GetGUID() const;
- virtual string GetConnectDLL(string& ConfigFileName);
- virtual ResDataObject GetConnectParam(string& ConfigFileName);
- protected:
- std::list <ConfigInfo> m_ConfigInfo;
- };
- }
|