25 #ifndef SerialClient20091211H 26 #define SerialClient20091211H 28 #include "client_base.h" 44 const std::string& delimiter =
"\r\n");
54 std::string
name()
const {
return name_; }
57 unsigned baud()
const {
return baud_; }
59 boost::asio::serial_port& socket() {
return serial_port_; }
66 bool start_specific();
69 boost::asio::serial_port serial_port_;
provides a basic client for line by line text based communications over a 8N1 tty (such as an RS-232 ...
SerialClient(const std::string &name="", unsigned baud=9600, const std::string &delimiter="\r\n")
create a serial client
void set_baud(unsigned baud)
baud rate, e.g. 4800
std::string name() const
serial port name, e.g. "/dev/ttyS0"
std::string local_endpoint()
our serial port, e.g. "/dev/ttyUSB1"
void set_name(const std::string &name)
set serial port name, e.g. "/dev/ttyS0"
std::string remote_endpoint()
who knows where the serial port goes?! (empty string)
unsigned baud() const
baud rate, e.g. 4800
The global namespace for the Goby project.