38 #ifndef ASYNC_COMM_SERIAL_H 39 #define ASYNC_COMM_SERIAL_H 43 #include <boost/asio.hpp> 44 #include <boost/function.hpp> 81 void do_async_read(
const boost::asio::mutable_buffers_1 &buffer,
82 boost::function<
void(
const boost::system::error_code&,
size_t)> handler)
override;
84 boost::function<
void(
const boost::system::error_code&,
size_t)> handler)
override;
94 #endif // ASYNC_COMM_SERIAL_H Asynchronous communication class for a serial port.
void do_async_read(const boost::asio::mutable_buffers_1 &buffer, boost::function< void(const boost::system::error_code &, size_t)> handler) override
Abstract base class for an asynchronous communication port.
static DefaultMessageHandler default_message_handler_
void do_async_write(const boost::asio::const_buffers_1 &buffer, boost::function< void(const boost::system::error_code &, size_t)> handler) override
boost::asio::serial_port serial_port_
Abstract base class for message handler.
Serial(std::string port, unsigned int baud_rate, MessageHandler &message_handler=default_message_handler_)
Open a serial port.
bool set_baud_rate(unsigned int baud_rate)
Set serial port baud rate.