39 #ifndef TF_SERIALPORT_H_VERSION 46 #define TF_SERIALPORT_H_VERSION \ 47 "TF_SERIALPORT_H V1.1" 48 #define TF_SERIALPORT_H_CVSID \ 59 const int& flags=(O_RDWR | O_NOCTTY | O_NDELAY));
63 void write(
const std::string& text)
const;
65 std::string
read(
const std::string& delim=
"\n")
const;
67 int read(
char* buffer,
const int& bufsize)
const;
101 #endif // TF_SERIALPORT_H_VERSION (includeguard) void setdefaults() const
set default values from ttydefaults.h
void clocal() const
set clocal
void baud9600() const
select 9600 baud
std::string read(const std::string &delim="\) const
read from port until delimiter
bool Musexon
use xon/xoff flow control
Root namespace of library.
struct termios Mdevoptions
remember device status
void makeraw() const
issue cfmakeraw
void write(const std::string &text) const
write string to port
void mode7E1() const
set 7 data bits, even parity, 1 stop bit
SerialPort(const std::string &devname, const int &flags=(O_RDWR|O_NOCTTY|O_NDELAY))
open port by name of device file
void debug(const bool &flag)
set debug mode
void sendxoff() const
send xoff
int Mfd
file descriptor to this port
void flowxon()
set xon/xoff slow control
void sendxon() const
send xon