📄 dpi515com.h
字号:
/******************************************************************************/
/* File: DPI515COM.H */
/* */
/* Class: cDPI515Communications */
/* Author: Alaster Jones */
/* Description: Derived from the VISA class specifically for DPI515 instru- */
/* ment communications, serial and IEEE. */
/* */
/* Date: 02/03/01 */
/******************************************************************************/
//---------------------------------------------------------------------------
#ifndef dpi515ComH
#define dpi515ComH
#include "VISAComm.h"
#include "presunit.h"
enum CommsProtocol
{
eNoProtocol = 0,
e515,
e510,
e520,
e7000,
e599
};
#define SRQ_VENT 0x0001
#define SRQ_RANGE 0x0002
#define SRQ_INLIMITS 0x0004
#define SRQ_ZERO 0x0008
#define SRQ_AUTOZERO 0x0010
#define SRQ_FILLTIMEOUT 0x0020
#define SRQ_IDLETIMEOUT 0x0040
#define SRQ_SWITCH 0x0100
//---------------------------------------------------------------------------
class cDPI515Communications : public cCommunications
{
private:
char instrumentRanges[10][20];
char instrumentUnits[30][20];
char currentRange[20];
char currentUnit[20];
float pressureReading; // current pressure
float currentRangeFS; // value in mbar
short numRanges;
short numUnits;
ULONG sndBytes;
ULONG rcdBytes;
CommsProtocol commsProtocol;
PressureUnit * pUnit;
public:
cDPI515Communications();
~cDPI515Communications();
bool trap_SRQ;
short trap_SRQ_Value;
void clearByteCounters(void);
float getmbarFS(void){return currentRangeFS;};
char * getinstrRange(short index){return (instrumentRanges[index]);};
char * getinstrUnit(short index){return (instrumentUnits[index]);};
char * getcurrentRange(void){return currentRange;};
char * getcurrentUnit(void){return currentUnit;};
ULONG getsndBytes(void){return sndBytes;};
ULONG getrcdBytes(void){return rcdBytes;};
short getnumRanges(void){return numRanges;};
short getnumUnits(void){return numUnits;};
long instrumentInitialisation(void);
long getInstrumentID(char * instrumentID);
long getPressure(double * pPressure);
long setSetpoint(double dSetpoint);
long getSetpoint(double * pdSetpoint);
long setControllerOnOff(short On);
long getControllerOnOff(short * pOn);
long getInstrumentRanges(void);
long getCurrentRange(char * strRange);
long setCurrentRange(char * strRange);
long getInstrumentUnits(void);
long getCurrentUnit(char * strUnit);
long setCurrentUnit(char * strUnit);
long setIsolationValve(short sOpen);
long getPressureOperationsRegister(short * pReg);
long onSRQ(short srqRegister);
long getStatusByte(ViSession vi, USHORT * srq);
long gotoLocal(void);
double getpressurePercentFS(double pressure);
double getpercentFSPressure(double pcFS);
long waitforSRQ(short waitPeriod, short * SRQ_event);
long setVent(short On);
};
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -