24#ifndef GOBY_MIDDLEWARE_IO_MAVLINK_SERIAL_H
25#define GOBY_MIDDLEWARE_IO_MAVLINK_SERIAL_H
29#include <boost/asio/buffer.hpp>
30#include <boost/asio/completion_condition.hpp>
31#include <boost/asio/read.hpp>
32#include <boost/system/error_code.hpp>
65 PubSubLayer subscribe_layer,
template <
class>
class ThreadType>
67 line_in_group, line_out_group, publish_layer, subscribe_layer,
93 void async_read()
override;
104 subscribe_layer, ThreadType>::async_read()
106 boost::asio::async_read(
107 this->mutable_serial_port(), boost::asio::buffer(this->buffer()),
108 boost::asio::transfer_at_least(1),
109 [
this](
const boost::system::error_code& ec, std::size_t bytes_transferred)
111 if (!ec && bytes_transferred > 0)
113 this->try_parse(bytes_transferred);
118 this->handle_read_error(ec);
Class for grouping publications in the Goby middleware. Analogous to "topics" in ROS,...
Implements Thread for a three layer middleware setup ([ intervehicle [ interprocess [ interthread ] ]...
Reads/Writes MAVLink message packages from/to serial port.
SerialThreadMAVLink(const goby::middleware::protobuf::SerialConfig &config)
The global namespace for the Goby project.