#include <sl_lidar_driver.h>

Public Member Functions | |
| virtual void | clearReadCache ()=0 |
| virtual void | close ()=0 |
| virtual void | flush ()=0 |
| virtual bool | open ()=0 |
| virtual int | read (void *buffer, size_t size)=0 |
| virtual bool | waitForData (size_t size, sl_u32 timeoutInMs=-1, size_t *actualReady=nullptr)=0 |
| virtual int | write (const void *data, size_t size)=0 |
| virtual | ~IChannel () |
Abstract interface of communication channel
Definition at line 132 of file sl_lidar_driver.h.
|
inlinevirtual |
Definition at line 135 of file sl_lidar_driver.h.
|
pure virtual |
Clear read cache
Implemented in sl::UdpChannel, sl::SerialPortChannel, and sl::TcpChannel.
|
pure virtual |
Close communication channel
Implemented in sl::SerialPortChannel, sl::TcpChannel, and sl::UdpChannel.
|
pure virtual |
Flush all written data to remote endpoint
Implemented in sl::SerialPortChannel, sl::TcpChannel, and sl::UdpChannel.
|
pure virtual |
Open communication channel (return true if succeed)
Implemented in sl::SerialPortChannel, sl::TcpChannel, and sl::UdpChannel.
|
pure virtual |
Read data from the chanel
| buffer | The buffer to receive data |
| size | The size of the read buffer |
Implemented in sl::SerialPortChannel, sl::TcpChannel, and sl::UdpChannel.
|
pure virtual |
Wait for some data
| size | Bytes to wait |
| timeoutInMs | Wait timeout (in microseconds, -1 for forever) |
| actualReady | [out] actual ready bytes |
Implemented in sl::SerialPortChannel, sl::TcpChannel, and sl::UdpChannel.
|
pure virtual |
Send data to remote endpoint
| data | The data buffer |
| size | The size of data buffer (in bytes) |
Implemented in sl::SerialPortChannel, sl::TcpChannel, and sl::UdpChannel.