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.

35 lines
1.2 KiB
C++

// Input_ADLINK_ECAT.h: interface for the CInput_ADLINK_ECAT class.
//
//////////////////////////////////////////////////////////////////////
#pragma once
#include "InputBase.h"
class CAdlinkCommon_APS;
class CInput_ADLINK_ECAT : public CInputBase
{
public:
CInput_ADLINK_ECAT(const CInputSetting& Setting);
virtual ~CInput_ADLINK_ECAT();
// method to query Analog input voltage
// nRange = 0 -> +/-10V
// nRange = 1 -> +/-5V
// nRange = 2 -> +/-2.5V
// nRange = 3 -> +/-1.25V
BOOL GetVoltage(double& dVoltage, int nRange) override;
int GetState() override;
// ECAT Process Data Object. Index & SubIndex is vendor specific. Thus, application need to decide what value to pass into. The info can be extract from SDO dictionary
bool GetPDO(unsigned short nIndex, unsigned short nSubIndex, std::vector<unsigned char>& vecData, unsigned long LenInBits, unsigned long& outLenInBit) override;
bool GetPDOValue(unsigned short nIndex, unsigned short nSubIndex, long& lValue) override;
bool GetPDOValue(unsigned short nIndex, unsigned short nSubIndex, bool& bValue) override;
private:
std::unique_ptr<CAdlinkCommon_APS> m_pCommon;
};