#pragma once #include #include using namespace std; // //#include "TmplMould.tlh" //#include "TmplMould.tli" #include "DIOS.Dev.MouldDefine.hpp" #pragma warning (disable:4244) // warning C4244: “初始化”: 从“double”转换到“float”,可能丢失数据 namespace DIOS::Dev::Detail { namespace SYNBOX { static const char* DeviceDriverType = "{93A0633D-0BF0-4c45-9973-BFF841D5E2DC}"; static const char* SyncConsoleUnitType = "{D1AF818B-72D0-400E-B780-DF58E2EF23D4}"; namespace AttrKey { static const char* WORKSTATION = "WORKSTATION"; static const char* EXPMODE = "EXPMODE"; static const char* DiosGeneratorSync = "GENERATORSYNCSTATE"; static const char* DiosExpectGeneratorSync = "GENERATOREXPECTSYNCSTATE"; typedef enum _Dios_Generator_Sync { GENERATOR_SYNC_ERR = -1, GENERATOR_RAD_OFF, GENERATOR_RAD_PREPARE, GENERATOR_RAD_READY, GENERATOR_RAD_XRAYON, GENERATOR_RAD_XRAYOFF, GENERATOR_FLU_OFF, GENERATOR_FLU_READY, GENERATOR_FLU_XRAYON, GENERATOR_FLU_XRAYOFF, GENERATOR_SYNC_MAX }GENERATOR_SYNC; static const char* DiosHandSwitch = "HANDSWITCHSTATE"; typedef enum _HAND_SWITCH { HAND_OFF, HAND_DWON1, HAND_DWON2, HAND_MAX }HAND_SWITCH; static const char* TOTALEXPSURENUMBER = "TotalExposureNumber"; static const char* CURRENTEXPOSUREBNUMBER = "CurrentExposureNumber"; static const char* DiosDetectorStatus = "DETECTORSTATUS"; typedef enum _Dios_Detector_Status { DETECTOR_STATUS_SHUTDOWN, DETECTOR_STATUS_INIT, DETECTOR_STATUS_SLEEP, DETECTOR_STATUS_WAKEUP,//低能耗,能工作 DETECTOR_STATUS_STANDBY,//高能耗,能采集 //DETECTOR_STATUS_ACQ_WAIT,//在STANDBY状态,执行ACQ Action且没到ACQ状态 DETECTOR_STATUS_ACQ, //DETECTOR_STATUS_STANDBY_WAIT,//在ACQ状态,执行StopAcq Action且没到STANDBY状态 DETECTOR_STATUS_ERROR, DETECTOR_STATUS_MAX }DETECTOR_STATUS; static const char* DiosXwindowStatus = "XWINDOWSTATUS"; typedef enum _Xwindow_Status { XWINDOW_OFF, XWINDOW_ON, XWINDOW_MAX }XWINDOW_STATUS; } namespace ActionKey { static const char* SetValue_WORKSTATION = "SetValue_WORKSTATION"; static const char* SetExpMode = "SetExpMode"; static const char* SetGeneratortoSyncStatus = "SetGeneratortoSyncStatus"; static const char* SetExpEnable = "SetExpEnable"; static const char* SetExpDisable = "SetExpDisable"; static const char* PrepareAcquisition = "PrepareAcquisition"; static const char* StartWindowRequest = "StartWindowRequest"; static const char* SetExposureTimes = "SetExposureTimes"; static const char* StopWindowRequest = "StopWindowRequest"; static const char* SetFrameRate = "SetFrameRate"; } //----------------------------------------------------------------------------- // HANDSWITCHMould //----------------------------------------------------------------------------- class HANDSWITCHMould :public IntMould { using super = IntMould; public: HANDSWITCHMould( int initialvalue, int lower, int upper, int accuracy) :super(AttrKey::DiosHandSwitch, initialvalue, lower, upper, accuracy) { } ~HANDSWITCHMould() { } }; //----------------------------------------------------------------------------- // GENSYNSTATEMould //----------------------------------------------------------------------------- class GENSYNSTATEMould :public IntMould { using super =IntMould; public: GENSYNSTATEMould( int initialvalue, int lower, int upper, int accuracy) :super( AttrKey::DiosGeneratorSync, initialvalue, lower, upper, accuracy) { } ~GENSYNSTATEMould() { } }; //----------------------------------------------------------------------------- // GENEXPECTSYNSTATEMould //----------------------------------------------------------------------------- class GENEXPECTSYNSTATEMould :public IntMould { using super = IntMould; public: GENEXPECTSYNSTATEMould(int initialvalue, int lower, int upper, int accuracy) :super(AttrKey::DiosExpectGeneratorSync, initialvalue, lower, upper, accuracy) { } ~GENEXPECTSYNSTATEMould() { } }; //----------------------------------------------------------------------------- // TotalExposureNumberMould //----------------------------------------------------------------------------- class TOTALEXPNUMMould :public IntMould { using super = IntMould; public: TOTALEXPNUMMould(int initialvalue, int lower, int upper, int accuracy) :super(AttrKey::TOTALEXPSURENUMBER, initialvalue, lower, upper, accuracy) { } ~TOTALEXPNUMMould() { } }; //----------------------------------------------------------------------------- // CurrentExposureNumber //----------------------------------------------------------------------------- class CUREXPNUMMould :public IntMould { using super = IntMould; public: CUREXPNUMMould(int initialvalue, int lower, int upper, int accuracy) :super( AttrKey::CURRENTEXPOSUREBNUMBER, initialvalue, lower, upper, accuracy) { } ~CUREXPNUMMould() { } }; //----------------------------------------------------------------------------- // DETECTORSTATUSMould //----------------------------------------------------------------------------- class DETECTORSTATUSMould :public IntMould { using super = IntMould; public: DETECTORSTATUSMould(int initialvalue, int lower, int upper, int accuracy) :super( AttrKey::DiosDetectorStatus, initialvalue, lower, upper, accuracy) { } ~DETECTORSTATUSMould() { } }; //----------------------------------------------------------------------------- // XWINDOWSTATUSMould //----------------------------------------------------------------------------- class XWINDOWSTATUSMould :public IntMould { using super = IntMould; public: XWINDOWSTATUSMould(int initialvalue, int lower, int upper, int accuracy) :super(AttrKey::DiosXwindowStatus, initialvalue, lower, upper, accuracy) { } ~XWINDOWSTATUSMould() { } }; //----------------------------------------------------------------------------- // WORKSTATIONMould //----------------------------------------------------------------------------- class WORKSTATIONMould :public StringMould { using super = StringMould; public: WORKSTATIONMould(std::string initialvalue) :super(AttrKey::WORKSTATION, initialvalue) { } ~WORKSTATIONMould() { } }; //----------------------------------------------------------------------------- // EXPMODEMould //----------------------------------------------------------------------------- class EXPMODEMould :public StringMould { using super = StringMould; public: EXPMODEMould(std::string initialvalue) :super(AttrKey::EXPMODE, initialvalue) { } ~EXPMODEMould() { } }; //----------------------------------------------------------------------------- // ConfigInfo //----------------------------------------------------------------------------- namespace ConfKey { static const char* DiosType = "Vender"; static const char* DiosModel = "Model"; static const char* DiosConfig = "DeviceConfig"; static const char* DiosAttribute = "Attribute"; static const char* DiosDescription = "Description"; static const char* DiosSCFType = "SCFType"; static const char* DiosSCFTCPIP = "TCPIP"; static const char* DiosSCFCOM = "COM"; static const char* DiosSCFIP = "ip"; static const char* DiosSCFPort = "port"; static const char* DiosSCFBaudrate = "baudrate"; static const char* DiosSCFBytesize = "bytesize"; static const char* DiosSCFParity = "parity"; static const char* DiosSCFStopbits = "stopbits"; static const char* DiosIsConnect = "IsConnect"; } } }