YDLIDAR X2 SDK  V1.4.1
Public Member Functions | List of all members
serial::Serial::SerialImpl Class Reference

Public Member Functions

 SerialImpl (const string &port, unsigned long baudrate, bytesize_t bytesize, parity_t parity, stopbits_t stopbits, flowcontrol_t flowcontrol)
 
bool open ()
 
void close ()
 
bool isOpen () const
 
size_t available ()
 
bool waitReadable (uint32_t timeout)
 
void waitByteTimes (size_t count)
 
int waitfordata (size_t data_count, uint32_t timeout, size_t *returned_size)
 
size_t read (uint8_t *buf, size_t size=1)
 
size_t write (const uint8_t *data, size_t length)
 
void flush ()
 
void flushInput ()
 
void flushOutput ()
 
void sendBreak (int duration)
 
bool setBreak (bool level)
 
bool setRTS (bool level)
 
bool setDTR (bool level)
 
bool waitForChange ()
 
bool getCTS ()
 
bool getDSR ()
 
bool getRI ()
 
bool getCD ()
 
uint32_t getByteTime ()
 
void setPort (const string &port)
 
string getPort () const
 
void setTimeout (Timeout &timeout)
 
Timeout getTimeout () const
 
bool setBaudrate (unsigned long baudrate)
 
bool setStandardBaudRate (speed_t baudrate)
 
bool setCustomBaudRate (unsigned long baudrate)
 
unsigned long getBaudrate () const
 
bool setBytesize (bytesize_t bytesize)
 
bytesize_t getBytesize () const
 
bool setParity (parity_t parity)
 
parity_t getParity () const
 
bool setStopbits (stopbits_t stopbits)
 
stopbits_t getStopbits () const
 
bool setFlowcontrol (flowcontrol_t flowcontrol)
 
flowcontrol_t getFlowcontrol () const
 
bool setTermios (const termios *tio)
 
bool getTermios (termios *tio)
 
int readLock ()
 
int readUnlock ()
 
int writeLock ()
 
int writeUnlock ()
 

Member Function Documentation

size_t serial::Serial::SerialImpl::write ( const uint8_t *  data,
size_t  length 
)

Error

Timeout

Port ready to write


The documentation for this class was generated from the following files: