18 #ifndef CPROTOCOLDEVICE_H 19 #define CPROTOCOLDEVICE_H 21 #include "../Device/Device.h" 22 #include "../Device/ProtocolMessage.h" 23 #include "../Util/Random.h" 24 #include "../Util/StopWatch.h" 48 int readChar(
int iModuleId,
int iCommandId,
int iParameterId,
char* pcData);
49 int readUnsignedChar(
int iModuleId,
int iCommandId,
int iParameterId,
unsigned char* pucData);
50 int readShort(
int iModuleId,
int iCommandId,
int iParameterId,
short* piData);
51 int readUnsignedShort(
int iModuleId,
int iCommandId,
int iParameterId,
unsigned short* puiData);
52 int readLong(
int iModuleId,
int iCommandId,
int iParameterId,
long* piData);
53 int readUnsignedLong(
int iModuleId,
int iCommandId,
int iParameterId,
unsigned long* puiData);
54 int readFloat(
int iModuleId,
int iCommandId,
int iParameterId,
float* pfData);
56 int readLongUnsignedChars(
int iModuleId,
int iCommandId,
int iParameterId,
long* piData,
unsigned char* pucData1,
unsigned char* pucData2);
57 int readFloatUnsignedChars(
int iModuleId,
int iCommandId,
int iParameterId,
float* pfData,
unsigned char* pucData1,
unsigned char* pucData2);
59 int write8Bytes(
int iModuleId,
bool bAck,
void* pBytes);
61 int writeChar(
int iModuleId,
int iCommandId,
int iParameterId,
char cData);
62 int writeUnsignedChar(
int iModuleId,
int iCommandId,
int iParameterId,
unsigned char ucData);
63 int writeShort(
int iModuleId,
int iCommandId,
int iParameterId,
short iData);
64 int writeUnsignedShort(
int iModuleId,
int iCommandId,
int iParameterId,
unsigned short uiData);
65 int writeLong(
int iModuleId,
int iCommandId,
int iParameterId,
long iData);
66 int writeUnsignedLong(
int iModuleId,
int iCommandId,
int iParameterId,
unsigned long uiData);
67 int writeFloat(
int iModuleId,
int iCommandId,
int iParameterId,
float fData);
69 int writeAll(
int iCommandId,
int iParameterId);
72 int writeLongShort(
int iModuleId,
int iCommandId,
int iParameterId,
long iData1,
short iData2);
73 int writeFloatShort(
int iModuleId,
int iCommandId,
int iParameterId,
float fData,
short iData);
75 int writeShortReadLongUnsignedChars(
int iModuleId,
int iCommandId,
int iParameterId,
short iData,
long* piData,
unsigned char* pucData1,
unsigned char* pucData2);
76 int writeLongReadLongUnsignedChars(
int iModuleId,
int iCommandId,
int iParameterId,
long iData,
long* piData,
unsigned char* pucData1,
unsigned char* pucData2);
77 int writeLongShortReadLongUnsignedChars(
int iModuleId,
int iCommandId,
int iParameterId,
long iData1,
short iData2,
long* piData,
unsigned char* pucData1,
unsigned char* pucData2);
78 int writeFloatReadFloatUnsignedChars(
int iModuleId,
int iCommandId,
int iParameterId,
float fData,
float* pfData,
unsigned char* pucData1,
unsigned char* pucData2);
79 int writeFloatShortReadFloatUnsignedChars(
int iModuleId,
int iCommandId,
int iParameterId,
float fData,
short iData,
float* pfData,
unsigned char* pucData1,
unsigned char* pucData2);
81 virtual int reinit(
unsigned char ucBaudRateId) = 0;
110 int getDataSCHUNK_FTC(
int iModuleId,
int iChannelTypeId, std::vector<float>& rafData,
short* piState);
virtual int readDevice(CProtocolMessage &rclProtocolMessage)=0
int readFloatUnsignedChars(int iModuleId, int iCommandId, int iParameterId, float *pfData, unsigned char *pucData1, unsigned char *pucData2)
int getDataSCHUNK_FTC(int iModuleId, int iChannelTypeId, std::vector< float > &rafData, short *piState)
int writeLong(int iModuleId, int iCommandId, int iParameterId, long iData)
int setInitMP55_IO_fast(int iModuleId)
CRITICAL_SECTION m_csDevice
int getUnsignedLong(int iModuleId, unsigned long *puiData)
int readUnsignedShort(int iModuleId, int iCommandId, int iParameterId, unsigned short *puiData)
int writeLongShortReadLongUnsignedChars(int iModuleId, int iCommandId, int iParameterId, long iData1, short iData2, long *piData, unsigned char *pucData1, unsigned char *pucData2)
int getDataMP55_IO_fast(int iModuleId, float *pfData)
int readLongUnsignedChars(int iModuleId, int iCommandId, int iParameterId, long *piData, unsigned char *pucData1, unsigned char *pucData2)
int writeAll(int iCommandId, int iParameterId)
int setNullSCHUNK_FTC(int iModuleId, short *piState)
CProtocolDevice()
default constructor
int writeFloatReadFloatUnsignedChars(int iModuleId, int iCommandId, int iParameterId, float fData, float *pfData, unsigned char *pucData1, unsigned char *pucData2)
int writeChar(int iModuleId, int iCommandId, int iParameterId, char cData)
int printMessage(CProtocolMessage &rclProtocolMessage, bool read)
int readFloat(int iModuleId, int iCommandId, int iParameterId, float *pfData)
int writeUnsignedLong(int iModuleId, int iCommandId, int iParameterId, unsigned long uiData)
int readUnsignedLong(int iModuleId, int iCommandId, int iParameterId, unsigned long *puiData)
virtual int clearReadQueue()=0
CProtocolDevice & operator=(const CProtocolDevice &rclProtocolDevice)
virtual ~CProtocolDevice()
destructor
virtual int reinit(unsigned char ucBaudRateId)=0
int getDataDLR_FTS(std::vector< float > &rafData, long *piState)
int getCanOpenRawAbsEnc(int iModuleId, short *piValue)
int writeLongReadLongUnsignedChars(int iModuleId, int iCommandId, int iParameterId, long iData, long *piData, unsigned char *pucData1, unsigned char *pucData2)
int writeUnsignedShort(int iModuleId, int iCommandId, int iParameterId, unsigned short uiData)
int writeShort(int iModuleId, int iCommandId, int iParameterId, short iData)
int readLong(int iModuleId, int iCommandId, int iParameterId, long *piData)
int write8Bytes(int iModuleId, bool bAck, void *pBytes)
int readUnsignedChar(int iModuleId, int iCommandId, int iParameterId, unsigned char *pucData)
int readShort(int iModuleId, int iCommandId, int iParameterId, short *piData)
int writeUnsignedChar(int iModuleId, int iCommandId, int iParameterId, unsigned char ucData)
int writeShortReadLongUnsignedChars(int iModuleId, int iCommandId, int iParameterId, short iData, long *piData, unsigned char *pucData1, unsigned char *pucData2)
int writeFloat(int iModuleId, int iCommandId, int iParameterId, float fData)
int readChar(int iModuleId, int iCommandId, int iParameterId, char *pcData)
virtual int writeDevice(CProtocolMessage &rclProtocolMessage)=0
int writeFloatShortReadFloatUnsignedChars(int iModuleId, int iCommandId, int iParameterId, float fData, short iData, float *pfData, unsigned char *pucData1, unsigned char *pucData2)
int writeCommand(int iModuleId, int iCommandId)
virtual int setMessageId(unsigned long uiMessageId)=0
int getDataMP55_IO(int iModuleId, float *pfData)
int writeLongShort(int iModuleId, int iCommandId, int iParameterId, long iData1, short iData2)
int setTaraMP55_IO(int iModuleId, float fTara)
int writeFloatShort(int iModuleId, int iCommandId, int iParameterId, float fData, short iData)