// Output.h: interface for the COutput class. // ////////////////////////////////////////////////////////////////////// #pragma once #include #include "OutputBase.h" #include "HardwareIni.h" #include "DllDefines.h" class IODLLCLASS COutputSetting { public: std::string m_strName; std::string m_strModuleName; BOOL m_bLogic{ FALSE }; int m_nPointNo{ 0 }; int m_nSlaveID{ 0 }; int m_nPtrNo{ 0 }; int m_nBoardType{ 0 }; BOOL m_bEnableCheck{ FALSE }; int m_nCardNo{ 0 }; }; class IODLLCLASS COutput : public CCard { public: COutput(const COutputSetting& Setting); virtual ~COutput(); // dRange = -10 for 0-10V output // dRange = 10 for -10-0V output BOOL SetVoltage(double dVoltage, double dRange); BOOL Off(void); BOOL On(void); BOOL IsOff(void); BOOL IsOn(void); BOOL operator=(const BOOL bState); BOOL operator==(const BOOL bState); BOOL operator!=(const BOOL bState); private: CMutex m_OutputMutex; std::unique_ptr m_outputBase; };