SerialPort
A light-weight C++ library for cross-platform serial communication.
Loading...
Searching...
No Matches
serial_port::Interface Class Referenceabstract

An abstract base class defining the interface of all serial port implementations. More...

#include <interface.h>

Collaboration diagram for serial_port::Interface:

Public Member Functions

 Interface (const Settings &settings)
 
 Interface (const std::string &port_name, int baud_rate, Parity parity=Parity::kNone, NumStopBits stop_bits=serial_port::NumStopBits::kOne, bool hardware_flow_control=false, unsigned long int timeout_s=0, unsigned long int timeout_ms=0)
 
 Interface (Interface &&)=default
 
Interfaceoperator= (Interface &&other)=default
 
 Interface (const Interface &)=delete
 
Interfaceoperator= (const Interface &other)=delete
 
virtual void Open ()=0
 
virtual void Close ()=0
 
virtual bool IsOpen ()=0
 
const SettingsGetSettings () const
 
virtual unsigned long NumBytesAvailable ()=0
 
virtual void FlushBuffer () const =0
 
virtual unsigned long ReadData (char *data, unsigned long num_bytes)=0
 
virtual std::string ReadString ()
 
virtual unsigned long WriteData (const char *data, unsigned long num_bytes)=0
 
virtual unsigned long WriteString (const std::string &str)
 

Protected Attributes

Settings settings_
 

Detailed Description

An abstract base class defining the interface of all serial port implementations.


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