2 #ifndef ModbusTCPCore_H_
3 #define ModbusTCPCore_H_
6 #include "ModbusRTUErrors.h"
7 #include "UTCPStream.h"
13 namespace ModbusTCPCore
18 size_t readNextData(
UTCPStream* tcp, std::queue<unsigned char>& qrecv,
size_t max = 100);
19 size_t getNextData(
UTCPStream* tcp, std::queue<unsigned char>& qrecv,
unsigned char* buf,
size_t len );
20 ModbusRTU::mbErrCode sendData(
UTCPStream* tcp,
unsigned char* buf,
size_t len );
23 size_t readDataFD(
int fd, std::queue<unsigned char>& qrecv,
size_t max = 100,
size_t attempts = 1 );
24 size_t getDataFD(
int fd, std::queue<unsigned char>& qrecv,
unsigned char* buf,
size_t len,
size_t attempts = 1 );
25 ModbusRTU::mbErrCode sendDataFD(
int fd,
unsigned char* buf,
size_t len );
30 #endif // ModbusTCPCore_H_