Goby3 3.2.3
2025.05.13
|
Reads/Writes strings from/to serial port using a line-based (typically ASCII) protocol with a defined end-of-line regex. More...
#include <goby/middleware/io/cobs/serial.h>
Public Member Functions | |
SerialThreadCOBS (const goby::middleware::protobuf::SerialConfig &config, int index=-1) | |
Constructs the thread. | |
~SerialThreadCOBS () | |
![]() | |
SerialThread (const goby::middleware::protobuf::SerialConfig &config, int index=-1) | |
Constructs the thread. | |
virtual | ~SerialThread () override |
![]() | |
IOThread (const IOConfig &config, int index, std::string glog_group="i/o") | |
Constructs the thread. | |
void | initialize () override |
void | finalize () override |
virtual | ~IOThread () |
Friends | |
template<class Thread > | |
void | cobs_async_write (Thread *this_thread, std::shared_ptr< const goby::middleware::protobuf::IOData > io_msg) |
template<class Thread , class ThreadBase > | |
void | cobs_async_read (Thread *this_thread, std::shared_ptr< ThreadBase > self) |
Additional Inherited Members | |
![]() | |
boost::asio::serial_port & | mutable_serial_port () |
Access the (mutable) serial_port object. | |
![]() | |
void | write (std::shared_ptr< const goby::middleware::protobuf::IOData > io_msg) |
void | handle_read_success (std::size_t bytes_transferred, const std::string &bytes) |
void | handle_read_success (std::size_t bytes_transferred, std::shared_ptr< goby::middleware::protobuf::IOData > io_msg) |
void | handle_write_success (std::size_t bytes_transferred) |
void | handle_read_error (const boost::system::error_code &ec) |
void | handle_write_error (const boost::system::error_code &ec) |
SocketType & | mutable_socket () |
Access the (mutable) socket (or serial_port) object. | |
boost::asio::io_context & | mutable_io () |
bool | socket_is_open () |
Does the socket exist and is it open? | |
const std::string & | glog_group () |
Reads/Writes strings from/to serial port using a line-based (typically ASCII) protocol with a defined end-of-line regex.
line_in_group | goby::middleware::Group to publish to after receiving data from the serial port |
line_out_group | goby::middleware::Group to subcribe to for data to send to the serial port |
|
inline |
|
inline |
|
friend |
|
friend |