Go to the documentation of this file.
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_;
LineBasedInterface(const std::string &delimiter)
boost::units::make_system< boost::units::angle::revolution_base_unit, boost::units::metric::minute_base_unit >::type system
virtual std::string remote_endpoint()
std::deque< goby::util::protobuf::Datagram > & in()
The global namespace for the Goby project.
virtual ~LineBasedInterface()
void set_data(const ::std::string &value)
goby::middleware::DynamicGroup & out_group()
A transporter for the interthread layer.
std::string & delimiter()
constexpr goby::middleware::Group linebasedcomms_in
virtual void do_start()=0
goby::middleware::InterThreadTransporter & interthread()
bool readline(std::string *s, AccessOrder order=OLDEST_FIRST)
returns string line (including delimiter)
virtual std::string local_endpoint()=0
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
goby::middleware::DynamicGroup & in_group()
extern ::google::protobuf::internal::ExtensionIdentifier< ::google::protobuf::MessageOptions, ::google::protobuf::internal::MessageTypeTraits< ::goby::GobyMessageOptions >, 11, false > msg
Class for grouping publications in the Goby middleware. Analogous to "topics" in ROS,...
std::string delimiter() const
void write(const std::string &s)
constexpr goby::middleware::Group linebasedcomms_out
void set_delimiter(const std::string &s)
basic interface class for all the derived serial (and networking mimics) line-based nodes (serial,...
virtual void do_close()=0
Implementation of Group for dynamic (run-time) instantiations. Use Group directly for static (compile...
void set_active(bool active)
virtual void do_subscribe()=0