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)
96 protobuf::Datagram datagram;
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,...
goby::middleware::InterThreadTransporter & interthread()
std::string delimiter() const
virtual std::string remote_endpoint()
virtual ~LineBasedInterface()
void write(const protobuf::Datagram &msg)
virtual void do_start()=0
goby::middleware::DynamicGroup & in_group()
bool readline(protobuf::Datagram *msg, AccessOrder order=OLDEST_FIRST)
void set_active(bool active)
std::string & delimiter()
goby::middleware::DynamicGroup & out_group()
void write(const std::string &s)
virtual void do_close()=0
virtual void do_subscribe()=0
std::deque< goby::util::protobuf::Datagram > & in()
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)
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< ::google::protobuf::MessageOptions, ::PROTOBUF_NAMESPACE_ID::internal::MessageTypeTraits< ::goby::GobyMessageOptions >, 11, false > msg