// OutputBase.h: interface for the COutputBase class. // ////////////////////////////////////////////////////////////////////// #if !defined(AFX_OUTPUTBASE_H__DA22D42D_0E6E_434A_8114_1E357FF92EAB__INCLUDED_) #define AFX_OUTPUTBASE_H__DA22D42D_0E6E_434A_8114_1E357FF92EAB__INCLUDED_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 #include "hardwareini.h" class COutputSetting; class COutputBase : public CCard { public: COutputBase(CString csMutexName, const COutputSetting &Setting); virtual ~COutputBase(); // virtual method to set analog output voltage virtual BOOL SetVoltage(double dVoltage, double dRange); virtual BOOL SetState(bool bState) = 0; // virtual method to set output to OFF BOOL Off(); // virtual method to set output to ON BOOL On(); BOOL IsOn(); BOOL IsOff(); // Gary 28MAr12, V1.29.06, exposed this variable as public so that when destroying the object, // Parent Class (COutput) can access and use it to off the output based on the ON logic. BOOL m_bOnState; protected: CMutex m_mutexOutput; BOOL m_bCurrentState; int m_nPt; int m_nSlaveID; int m_nPtrNo; CString m_csName; int m_nBoardType; int m_nCardNo; int m_nCardID; bool IsDigitalOutput(int nPt); bool IsAnalogOutput(int nPt); }; #endif // !defined(AFX_OUTPUTBASE_H__DA22D42D_0E6E_434A_8114_1E357FF92EAB__INCLUDED_)