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.

66 lines
1.3 KiB
C++

// Output.h: interface for the COutput class.
//
//////////////////////////////////////////////////////////////////////
#pragma once
#include "hardwareini.h"
#include "OutputBase.h"
#ifdef BUILD_IODLL
#define IODLLCLASS __declspec(dllexport)
#else
#define IODLLCLASS __declspec(dllimport)
#endif
class IODLLCLASS COutputSetting
{
public:
// configuration
// COutputSetting() :
// m_szName(nullptr),
// m_szModuleName(nullptr),
// m_bLogic(FALSE),
// m_nPointNo(0),
// m_nSlaveID(0),
// m_nPtrNo(0),
// m_nBoardType(0),
// m_bEnableCheck(FALSE),
// m_nCardNo(0)
//{
//}
std::string m_strName;
std::string m_strModuleName;
BOOL m_bLogic;
int m_nPointNo;
int m_nSlaveID;
int m_nPtrNo;
int m_nBoardType;
BOOL m_bEnableCheck;
int m_nCardNo;
};
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;
COutputBase* m_outputBase;
};