37 namespace rp {
namespace standalone{
namespace rplidar {
47 bool bind(
const char * portname, uint32_t baudrate)
49 _closePending =
false;
50 return _rxtxSerial->
bind(portname, baudrate);
54 return _rxtxSerial->
open();
64 _rxtxSerial->
flush(0);
66 bool waitfordata(
size_t data_count,
_u32 timeout = -1,
size_t * returned_size = NULL)
68 if (_closePending)
return false;
73 return _rxtxSerial->
senddata(data, size) ;
78 lenRec = _rxtxSerial->
recvdata(data, size);
102 virtual void disconnect();
virtual int recvdata(unsigned char *data, size_t size)=0
virtual void cancelOperation()
virtual bool bind(const char *portname, _u32 baudrate, _u32 flags=0)=0
int senddata(const _u8 *data, size_t size)
virtual int senddata(const unsigned char *data, size_t size)=0
static void ReleaseRxTx(serial_rxtx *)
int recvdata(unsigned char *data, size_t size)
virtual void clearDTR()=0
virtual int waitfordata(size_t data_count, _u32 timeout=-1, size_t *returned_size=NULL)=0
virtual void flush(_u32 flags)=0
rp::hal::serial_rxtx * _rxtxSerial
bool bind(const char *portname, uint32_t baudrate)
bool waitfordata(size_t data_count, _u32 timeout=-1, size_t *returned_size=NULL)