Go to the documentation of this file.
27 #ifndef GOBY_UTIL_LINEBASEDCOMMS_SERIAL_CLIENT_H
28 #define GOBY_UTIL_LINEBASEDCOMMS_SERIAL_CLIENT_H
64 std::string
name()
const {
return name_; }
67 unsigned baud()
const {
return baud_; }
78 void do_start()
override;
79 void do_close()
override;
80 void do_subscribe()
override;
91 std::atomic<bool> serial_alive_{
false};
92 std::unique_ptr<std::thread> serial_thread_;
The global namespace for the Goby project.
void set_name(const std::string &name)
set serial port name, e.g. "/dev/ttyS0"
Reads/Writes strings from/to serial port using a line-based (typically ASCII) protocol with a defined...
void send_command(const middleware::protobuf::SerialCommand &command)
constexpr goby::middleware::Group linebasedcomms_in
unsigned baud() const
baud rate, e.g. 4800
std::string name() const
serial port name, e.g. "/dev/ttyS0"
std::string remote_endpoint() override
who knows where the serial port goes?! (empty string)
std::string delimiter() const
provides a basic client for line by line text based communications over a 8N1 tty (such as an RS-232 ...
constexpr goby::middleware::Group linebasedcomms_out
const middleware::protobuf::SerialStatus & read_status()
std::string local_endpoint() override
our serial port, e.g. "/dev/ttyUSB1"
basic interface class for all the derived serial (and networking mimics) line-based nodes (serial,...
SerialClient(std::string name="", unsigned baud=9600, const std::string &delimiter="\r\n")
create a serial client
void set_baud(unsigned baud)
baud rate, e.g. 4800