the template for object represents serial port with timeout
More...
#include <SerialPort.hpp>
|
typedef std::vector< char > | Buffer |
|
typedef clock_type | Clock |
|
typedef Clock::duration | Timeout |
|
typedef boost::function1< bool,
const Buffer & > | ReadPredicate |
|
|
| BasicSerialPort (const std::string &port_name, const Timeout timeout, boost::asio::serial_port_base::baud_rate baud_rate=boost::asio::serial_port_base::baud_rate(9600), boost::asio::serial_port_base::flow_control flow_control=boost::asio::serial_port_base::flow_control(boost::asio::serial_port_base::flow_control::none), boost::asio::serial_port_base::parity parity=boost::asio::serial_port_base::parity(boost::asio::serial_port_base::parity::none), boost::asio::serial_port_base::stop_bits stop_bits=boost::asio::serial_port_base::stop_bits(boost::asio::serial_port_base::stop_bits::one), boost::asio::serial_port_base::character_size character_size=boost::asio::serial_port_base::character_size(8)) |
|
| ~BasicSerialPort () |
|
const Buffer & | read_if (ReadPredicate p) |
|
const Buffer & | read_n (int n) |
|
Buffer::size_type | write (const Buffer &buf) |
|
template<typename clock_type>
class mt4cpp::BasicSerialPort< clock_type >
the template for object represents serial port with timeout
- Parameters
-
clock_type | the type of the clock, e.g. boost::chrono::steady_clock |
template<typename clock_type >
mt4cpp::BasicSerialPort< clock_type >::BasicSerialPort |
( |
const std::string & |
port_name, |
|
|
const Timeout |
timeout, |
|
|
boost::asio::serial_port_base::baud_rate |
baud_rate = boost::asio::serial_port_base::baud_rate(9600) , |
|
|
boost::asio::serial_port_base::flow_control |
flow_control = boost::asio::serial_port_base::flow_control(boost::asio::serial_port_base::flow_control::none) , |
|
|
boost::asio::serial_port_base::parity |
parity = boost::asio::serial_port_base::parity(boost::asio::serial_port_base::parity::none) , |
|
|
boost::asio::serial_port_base::stop_bits |
stop_bits = boost::asio::serial_port_base::stop_bits(boost::asio::serial_port_base::stop_bits::one) , |
|
|
boost::asio::serial_port_base::character_size |
character_size = boost::asio::serial_port_base::character_size(8) |
|
) |
| |
|
inline |
template<typename clock_type >
template<typename clock_type >
template<typename clock_type >
template<typename clock_type >
write into port. Return number bytes written.
< write buffer to port. Return number of written bytes
The documentation for this class was generated from the following file: