25#ifndef GOBY_UTIL_LINEBASEDCOMMS_INTERFACE_H
26#define GOBY_UTIL_LINEBASEDCOMMS_INTERFACE_H
34#include <boost/bind/bind.hpp>
75 interthread_.
poll(std::chrono::seconds(0));
94 void write(
const std::string& s)
119 std::deque<goby::util::protobuf::Datagram>&
in() {
return in_; }
137 std::string delimiter_;
138 std::deque<protobuf::Datagram> in_;
143 static std::atomic<int> count_;
151 bool io_thread_ready_{
false};
153 std::thread::id current_thread_;
Implementation of Group for dynamic (run-time) instantiations. Use Group directly for static (compile...
Class for grouping publications in the Goby middleware. Analogous to "topics" in ROS,...
A transporter for the interthread layer.
int poll(const std::chrono::time_point< Clock, Duration > &timeout=std::chrono::time_point< Clock, Duration >::max())
poll for data. Blocks until a data event occurs or a timeout when a particular time has been reached
basic interface class for all the derived serial (and networking mimics) line-based nodes (serial,...
std::string delimiter() const
goby::middleware::InterThreadTransporter & interthread()
virtual std::string remote_endpoint()
virtual ~LineBasedInterface()
void write(const protobuf::Datagram &msg)
goby::middleware::DynamicGroup & in_group()
std::deque< goby::util::protobuf::Datagram > & in()
virtual void do_start()=0
bool readline(protobuf::Datagram *msg, AccessOrder order=OLDEST_FIRST)
void set_active(bool active)
void write(const std::string &s)
std::string & delimiter()
virtual void do_close()=0
virtual void do_subscribe()=0
goby::middleware::DynamicGroup & out_group()
void set_delimiter(const std::string &s)
bool readline(std::string *s, AccessOrder order=OLDEST_FIRST)
returns string line (including delimiter)
virtual std::string local_endpoint()=0
LineBasedInterface(const std::string &delimiter)
void set_data(ArgT0 &&arg0, ArgT... args)
constexpr goby::middleware::Group linebasedcomms_in
constexpr goby::middleware::Group linebasedcomms_out
boost::units::make_system< boost::units::angle::revolution_base_unit, boost::units::metric::minute_base_unit >::type system
The global namespace for the Goby project.
extern ::PROTOBUF_NAMESPACE_ID::internal::ExtensionIdentifier< ::PROTOBUF_NAMESPACE_ID::MessageOptions, ::PROTOBUF_NAMESPACE_ID::internal::MessageTypeTraits< ::goby::GobyMessageOptions >, 11, false > msg