I have a serial device and I want to control the RTS and DTR signal during the communication. Basicly the whole communication is based on this two signals. Is there a way to use the boost::asio::serial_port implementation under linux to do this. Is there any way to get the underlying structures boost uses to control both signals?
I found under boost/asio/impl/serial_port_basis.ipp
boost::system::error_code serial_port_base::flow_control::load(
const BOOST_ASIO_OPTION_STORAGE& storage, boost::system::error_code& ec)
{
#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
...
#else
if (storage.c_iflag & (IXOFF | IXON))
{
value_ = software;
}
# if defined(_BSD_SOURCE)
else if (storage.c_cflag & CRTSCTS)
{
value_ = hardware;
}
# elif defined(__QNXNTO__)
else if (storage.c_cflag & IHFLOW && storage.c_cflag & OHFLOW)
{
value_ = hardware;
}
# endif
else
{
value_ = none;
}
#endif
ec = boost::system::error_code();
return ec;
}
boost also defines # define BOOST_ASIO_OPTION_STORAGE termios