123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254 |
- #pragma once
- #include <string>
- #include <algorithm>
- 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";
- }
- }
- }
|