|
Goby Underwater Autonomy Project
Series: 1.1, revision: 163, released on 2013-02-06 14:23:27 -0500
|
basic interface class for all the derived serial (and networking mimics) line-based nodes (serial, tcp, udp, etc.) More...
#include <util/liblinebasedcomms/interface.h>
Inherited by goby::util::LineBasedClient< ASIOAsyncReadStream >, goby::util::TCPServer, goby::util::LineBasedClient< boost::asio::ip::tcp::socket >, and goby::util::LineBasedClient< boost::asio::serial_port >.
Public Types | |
| enum | AccessOrder { NEWEST_FIRST, OLDEST_FIRST } |
Public Member Functions | |
| void | start () |
| void | close () |
| bool | active () |
| bool | readline (std::string *s, AccessOrder order=OLDEST_FIRST) |
| returns string line (including delimiter) | |
| bool | readline (protobuf::Datagram *msg, AccessOrder order=OLDEST_FIRST) |
| void | write (const std::string &s) |
| void | write (const protobuf::Datagram &msg) |
| void | clear () |
| void | set_delimiter (const std::string &s) |
| std::string | delimiter () const |
Protected Member Functions | |
| LineBasedInterface (const std::string &delimiter) | |
| virtual void | do_start ()=0 |
| virtual void | do_write (const protobuf::Datagram &line)=0 |
| virtual void | do_close (const boost::system::error_code &error)=0 |
| void | set_active (bool active) |
Static Protected Attributes | |
| static std::string | delimiter_ |
| static boost::asio::io_service | io_service_ |
|
static std::deque < protobuf::Datagram > | in_ |
| static boost::mutex | in_mutex_ |
basic interface class for all the derived serial (and networking mimics) line-based nodes (serial, tcp, udp, etc.)
Definition at line 39 of file interface.h.
| bool goby::util::LineBasedInterface::readline | ( | std::string * | s, |
| AccessOrder | order = OLDEST_FIRST |
||
| ) | [inline] |
returns string line (including delimiter)
Definition at line 55 of file interface.h.
1.7.6.1