BeeeOn Gateway  v2020.3.1-2-g6f737dc
Platform to interconnect the IoT world
Public Types | Public Member Functions
BeeeOn::SerialPort Class Reference

Public Types

enum  StopBits { STOPBITS_1, STOPBITS_2 }
 
enum  Parity { PARITY_NONE, PARITY_EVEN, PARITY_ODD }
 
enum  DataBits { DATABITS_5, DATABITS_6, DATABITS_7, DATABITS_8 }
 

Public Member Functions

 SerialPort (const std::string &devicePath="")
 
void setDevicePath (const std::string &devicePath)
 
std::string devicePath () const
 
void setBaudRate (int baudRate)
 
void setStopBits (StopBits stopBits)
 
void setParity (Parity parity)
 
void setDataBits (DataBits dataBits)
 
void setNonBlocking (bool nonBlocking)
 
void open ()
 
std::string read (const Poco::Timespan &timeout)
 
size_t write (const char *buffer, size_t size)
 
size_t write (const std::string &data)
 
void close ()
 
void flush ()
 
bool isOpen ()
 

Member Function Documentation

void SerialPort::open ( )

O_RDWR - Open for reading and writing. O_NOCTTY - If set and path identifies a terminal device, open() will not cause the terminal device to become the controlling terminal for the process. O_NDELAY - When possible, the file is opened in nonblocking mode.


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