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.
61 lines
1.3 KiB
C++
61 lines
1.3 KiB
C++
// Output.h: interface for the COutput class.
|
|
//
|
|
//////////////////////////////////////////////////////////////////////
|
|
|
|
#if !defined(AFX_OUTPUT_H__5B5E0981_F82B_11D6_A627_003064018EFE__INCLUDED_)
|
|
#define AFX_OUTPUT_H__5B5E0981_F82B_11D6_A627_003064018EFE__INCLUDED_
|
|
|
|
#if _MSC_VER > 1000
|
|
#pragma once
|
|
#endif // _MSC_VER > 1000
|
|
|
|
#include "hardwareini.h"
|
|
#include "OutputBase.h"
|
|
|
|
#ifdef BUILD_IODLL
|
|
#define IODLLCLASS __declspec(dllexport)
|
|
#else
|
|
#define IODLLCLASS __declspec(dllimport)
|
|
#endif
|
|
|
|
class IODLLCLASS COutputSetting
|
|
{
|
|
public:
|
|
// configuration
|
|
LPCTSTR m_szName;
|
|
LPCTSTR m_szModuleName;
|
|
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();
|
|
|
|
BOOL SetVoltage(double dVoltage);
|
|
// dRange = -10 for 0-10V output
|
|
// dRange = 10 for -10-0V output
|
|
BOOL SetVoltageRange(double dRange = -10);
|
|
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;
|
|
};
|
|
|
|
#endif // !defined(AFX_OUTPUT_H__5B5E0981_F82B_11D6_A627_003064018EFE__INCLUDED_)
|