17 #ifndef COMPORT_485F_H_
18 #define COMPORT_485F_H_
22 #include "PassiveTimer.h"
42 ComPort485F(
const std::string& comDevice,
int gpio_num,
bool tmit_ctrl =
false );
44 virtual void sendByte(
unsigned char x )
override;
45 virtual void setTimeout( timeout_t timeout )
override;
46 virtual size_t sendBlock(
unsigned char* msg,
size_t len )
override;
48 virtual void cleanupChannel()
override;
49 virtual void reopen()
override;
53 virtual unsigned char m_receiveByte(
bool wait )
override;
54 void save2queue(
unsigned char* msg,
size_t len,
size_t bnum );
55 bool remove_echo(
unsigned char tb[],
size_t len );
56 void m_read( timeout_t tmsec );
59 unsigned char tbuf[ComPort::BufSize];
61 std::queue<unsigned char>
wq;
62 std::queue<unsigned char>
rq;
67 timeout_t tout_msec = { 2000 };
72 #endif // COMPORT_485F_H_