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.
40 lines
891 B
C++
40 lines
891 B
C++
#pragma once
|
|
|
|
class CAdlinkCommon_HSL
|
|
{
|
|
public:
|
|
CAdlinkCommon_HSL(int nPhysicalCardID, int nSlaveID, int nPointNo);
|
|
~CAdlinkCommon_HSL(void);
|
|
|
|
public:
|
|
int InitCard(int nHardwareIniTypeCardNo);
|
|
|
|
int CloseCard(int nPhysicalCardID);
|
|
|
|
bool ReadVoltage(double *pVoltage);
|
|
|
|
bool ReadInput(unsigned short *pState);
|
|
|
|
bool SetLastAnalogChannel(int nLastChannel);
|
|
|
|
bool SetAnalogRange(int nRange);
|
|
|
|
bool WriteOutputBit(bool bState);
|
|
|
|
bool WriteVoltage(double dVoltage);
|
|
|
|
// Analog Input
|
|
bool StartAIScan();
|
|
bool StopAIScan();
|
|
|
|
bool ReadVoltageOnly(double *pdVoltage);
|
|
|
|
// To read all slave
|
|
bool ReadInputs(std::vector<unsigned short> &vecInData);
|
|
|
|
private:
|
|
short m_sPhysicalCardID; // only used for CInput class
|
|
short m_sSlaveID; // only used for CInput class
|
|
short m_sPointNo; // only used for CInput class
|
|
};
|