Note: Goby version 1 (shown here) is now considered obsolete. Please use version 2 for new projects, and consider upgrading old projects.

Goby Underwater Autonomy Project  Series: 1.1, revision: 163, released on 2013-02-06 14:23:27 -0500
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends
Public Member Functions
goby::util::SerialClient Class Reference

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 >.

List of all members.

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)

Detailed Description

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.


Constructor & Destructor Documentation

goby::util::SerialClient::SerialClient ( const std::string &  name = "",
unsigned  baud = 9600,
const std::string &  delimiter = "\r\n" 
)

create a serial client

Parameters:
namename of the serial connection (e.g. "/dev/ttyS0")
baudbaud rate of the serial connection (e.g. 9600)
delimiterstring used to split lines

Definition at line 25 of file serial_client.cpp.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends