An interface abstracting Boost.Asio's serial_port for testability. This is an internal interface used for dependency injection and mocking.
More...
#include <iserial_port.hpp>
|
| virtual | ~SerialPortInterface ()=default |
| |
| virtual void | open (const std::string &device, boost::system::error_code &ec)=0 |
| |
| virtual bool | is_open () const =0 |
| |
| virtual void | close (boost::system::error_code &ec)=0 |
| |
| virtual void | set_option (const net::serial_port_base::baud_rate &option, boost::system::error_code &ec)=0 |
| |
| virtual void | set_option (const net::serial_port_base::character_size &option, boost::system::error_code &ec)=0 |
| |
| virtual void | set_option (const net::serial_port_base::stop_bits &option, boost::system::error_code &ec)=0 |
| |
| virtual void | set_option (const net::serial_port_base::parity &option, boost::system::error_code &ec)=0 |
| |
| virtual void | set_option (const net::serial_port_base::flow_control &option, boost::system::error_code &ec)=0 |
| |
| virtual void | async_read_some (const net::mutable_buffer &buffer, std::function< void(const boost::system::error_code &, std::size_t)> handler)=0 |
| |
| virtual void | async_write (const net::const_buffer &buffer, std::function< void(const boost::system::error_code &, std::size_t)> handler)=0 |
| |
An interface abstracting Boost.Asio's serial_port for testability. This is an internal interface used for dependency injection and mocking.
Definition at line 35 of file iserial_port.hpp.
◆ ~SerialPortInterface()
| virtual unilink::interface::SerialPortInterface::~SerialPortInterface |
( |
| ) |
|
|
virtualdefault |
◆ async_read_some()
| virtual void unilink::interface::SerialPortInterface::async_read_some |
( |
const net::mutable_buffer & |
buffer, |
|
|
std::function< void(const boost::system::error_code &, std::size_t)> |
handler |
|
) |
| |
|
pure virtual |
◆ async_write()
| virtual void unilink::interface::SerialPortInterface::async_write |
( |
const net::const_buffer & |
buffer, |
|
|
std::function< void(const boost::system::error_code &, std::size_t)> |
handler |
|
) |
| |
|
pure virtual |
◆ close()
| virtual void unilink::interface::SerialPortInterface::close |
( |
boost::system::error_code & |
ec | ) |
|
|
pure virtual |
◆ is_open()
| virtual bool unilink::interface::SerialPortInterface::is_open |
( |
| ) |
const |
|
pure virtual |
◆ open()
| virtual void unilink::interface::SerialPortInterface::open |
( |
const std::string & |
device, |
|
|
boost::system::error_code & |
ec |
|
) |
| |
|
pure virtual |
◆ set_option() [1/5]
| virtual void unilink::interface::SerialPortInterface::set_option |
( |
const net::serial_port_base::baud_rate & |
option, |
|
|
boost::system::error_code & |
ec |
|
) |
| |
|
pure virtual |
◆ set_option() [2/5]
| virtual void unilink::interface::SerialPortInterface::set_option |
( |
const net::serial_port_base::character_size & |
option, |
|
|
boost::system::error_code & |
ec |
|
) |
| |
|
pure virtual |
◆ set_option() [3/5]
| virtual void unilink::interface::SerialPortInterface::set_option |
( |
const net::serial_port_base::flow_control & |
option, |
|
|
boost::system::error_code & |
ec |
|
) |
| |
|
pure virtual |
◆ set_option() [4/5]
| virtual void unilink::interface::SerialPortInterface::set_option |
( |
const net::serial_port_base::parity & |
option, |
|
|
boost::system::error_code & |
ec |
|
) |
| |
|
pure virtual |
◆ set_option() [5/5]
| virtual void unilink::interface::SerialPortInterface::set_option |
( |
const net::serial_port_base::stop_bits & |
option, |
|
|
boost::system::error_code & |
ec |
|
) |
| |
|
pure virtual |
The documentation for this class was generated from the following file: