Goby3
3.1.5a
2024.05.23
|
basic interface class for all the derived serial (and networking mimics) line-based nodes (serial, tcp, udp, etc.) More...
#include <goby/util/linebasedcomms/interface.h>
Public Types | |
enum | AccessOrder { NEWEST_FIRST, OLDEST_FIRST } |
Public Member Functions | |
LineBasedInterface (const std::string &delimiter) | |
virtual | ~LineBasedInterface () |
void | start () |
void | close () |
bool | active () |
void | sleep (int sec) |
bool | readline (std::string *s, AccessOrder order=OLDEST_FIRST) |
returns string line (including delimiter) More... | |
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 | |
virtual void | do_start ()=0 |
virtual void | do_close ()=0 |
virtual std::string | local_endpoint ()=0 |
virtual std::string | remote_endpoint () |
void | set_active (bool active) |
std::string & | delimiter () |
std::deque< goby::util::protobuf::Datagram > & | in () |
goby::middleware::InterThreadTransporter & | interthread () |
int | index () |
virtual void | do_subscribe ()=0 |
goby::middleware::DynamicGroup & | in_group () |
goby::middleware::DynamicGroup & | out_group () |
bool | io_thread_ready () |
basic interface class for all the derived serial (and networking mimics) line-based nodes (serial, tcp, udp, etc.)
Definition at line 61 of file interface.h.
Enumerator | |
---|---|
NEWEST_FIRST | |
OLDEST_FIRST |
Definition at line 81 of file interface.h.
goby::util::LineBasedInterface::LineBasedInterface | ( | const std::string & | delimiter | ) |
|
virtual |
|
inline |
Definition at line 72 of file interface.h.
void goby::util::LineBasedInterface::clear | ( | ) |
void goby::util::LineBasedInterface::close | ( | ) |
|
inlineprotected |
Definition at line 118 of file interface.h.
|
inline |
Definition at line 107 of file interface.h.
|
protectedpure virtual |
|
protectedpure virtual |
|
protectedpure virtual |
|
inlineprotected |
Definition at line 119 of file interface.h.
|
inlineprotected |
Definition at line 127 of file interface.h.
|
inlineprotected |
Definition at line 123 of file interface.h.
|
inlineprotected |
Definition at line 121 of file interface.h.
|
inlineprotected |
Definition at line 130 of file interface.h.
|
protectedpure virtual |
Implemented in goby::util::SerialClient, goby::util::TCPClient, and goby::util::TCPServer.
|
inlineprotected |
Definition at line 128 of file interface.h.
bool goby::util::LineBasedInterface::readline | ( | protobuf::Datagram * | msg, |
AccessOrder | order = OLDEST_FIRST |
||
) |
bool goby::util::LineBasedInterface::readline | ( | std::string * | s, |
AccessOrder | order = OLDEST_FIRST |
||
) |
returns string line (including delimiter)
|
inlineprotectedvirtual |
Reimplemented in goby::util::SerialClient, and goby::util::TCPClient.
Definition at line 114 of file interface.h.
|
inlineprotected |
Definition at line 116 of file interface.h.
|
inline |
Definition at line 106 of file interface.h.
void goby::util::LineBasedInterface::sleep | ( | int | sec | ) |
void goby::util::LineBasedInterface::start | ( | ) |
void goby::util::LineBasedInterface::write | ( | const protobuf::Datagram & | msg | ) |
|
inline |
Definition at line 94 of file interface.h.