Goby Underwater Autonomy Project
Series: 1.1, revision: 163, released on 2013-02-06 14:23:27 -0500
|
provides a basic client for line by line text based communications over a 8N1 tty (such as an RS-232 serial link) without flow control More...
#include <util/liblinebasedcomms/serial_client.h>
Inherits goby::util::LineBasedClient< ASIOAsyncReadStream >.
Public Member Functions | |
SerialClient (const std::string &name="", unsigned baud=9600, const std::string &delimiter="\r\n") | |
create a serial client | |
void | set_name (const std::string &name) |
set serial port name, e.g. "/dev/ttyS0" | |
void | set_baud (unsigned baud) |
baud rate, e.g. 4800 | |
std::string | name () const |
serial port name, e.g. "/dev/ttyS0" | |
unsigned | baud () const |
baud rate, e.g. 4800 | |
boost::asio::serial_port & | socket () |
std::string | local_endpoint () |
our serial port, e.g. "/dev/ttyUSB1" | |
std::string | remote_endpoint () |
who knows where the serial port goes?! (empty string) |
provides a basic client for line by line text based communications over a 8N1 tty (such as an RS-232 serial link) without flow control
Definition at line 30 of file serial_client.h.
goby::util::SerialClient::SerialClient | ( | const std::string & | name = "" , |
unsigned | baud = 9600 , |
||
const std::string & | delimiter = "\r\n" |
||
) |
create a serial client
name | name of the serial connection (e.g. "/dev/ttyS0") |
baud | baud rate of the serial connection (e.g. 9600) |
delimiter | string used to split lines |
Definition at line 25 of file serial_client.cpp.