You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
53 lines
1.1 KiB
C++
53 lines
1.1 KiB
C++
// OutputBase.h: interface for the COutputBase class.
|
|
//
|
|
//////////////////////////////////////////////////////////////////////
|
|
#pragma once
|
|
|
|
#include <string>
|
|
#include "hardwareini.h"
|
|
|
|
class COutputSetting;
|
|
|
|
class COutputBase : public CCard
|
|
{
|
|
public:
|
|
COutputBase(std::string 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();
|
|
|
|
// 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;
|
|
std::string m_strName;
|
|
int m_nBoardType;
|
|
int m_nCardNo;
|
|
int m_nCardID;
|
|
|
|
bool IsDigitalOutput(int nPt);
|
|
|
|
bool IsAnalogOutput(int nPt);
|
|
};
|