35 #ifndef SERIAL_INCLUDED 36 #define SERIAL_INCLUDED 45 #include <sigc++/sigc++.h> 181 explicit Serial(
const std::string& serial_port);
221 bool open(
bool flush=
false);
244 int write(
const char *buf,
size_t count)
246 return ::write(fd, buf, count);
321 const std::string serial_port;
325 struct termios port_settings;
Use software (XON/XOFF) flow control.
Parity
A type that defines the possible choices for parity.
bool setParams(int speed, Parity parity, int bits, int stop_bits, Flow flow)
Setup the serial port communications parameters.
Use hardware flow control.
bool close(void)
Close a previously opened serial port.
A class for using asyncronous serial communications.
Pin
A type that defines the read/write pins in the serial port.
bool getPin(Pin pin, bool &is_set)
Get the state of one of the input pins in the serial port.
Input: Data Carrier Detect.
int write(const char *buf, size_t count)
Write data to the serial port.
bool setPin(Pin pin, bool set)
Set the state of one of the output pins in the serial port.
sigc::signal< void, char *, int > charactersReceived
A signal that is emitted when there is data to read.
Namespace for the asynchronous programming classes.
Output: Data Terminal Ready.
bool setCanonical(bool canonical)
Set or clear canonical mode.
static const int READ_BUFSIZE
The maximum number of characters that can be read at once.
Serial(const std::string &serial_port)
Constuctor.
bool stopInput(bool stop)
Stop/start input of data.
Flow
A type that defines the possible choices for flow control.
bool open(bool flush=false)
Open the serial port.