Boost logo

Boost Users :

Subject: Re: [Boost-users] [boost.asio] Getting/setting RTS and CTS/DSR/DCD with serial_port
From: Michael Caisse (boost_at_[hidden])
Date: 2010-02-13 16:51:47


David Faure wrote:
> On Tuesday 02 February 2010, David Faure wrote:
>
>> How can I get/set the status of the DTR, RTS and DCD pins? [....]
>>
>
> Anyone? Who can I talk to about the asio::serial_port implementation?
>
>

Hi David -

You can use get_option and set_option to set/get various bits in the
win DCB or posix termios. These pins are not currently described as
far as I can tell.

Options implement the SetabbleSerialPortOption and GettableSerialPortOption.

Take a look at serial_port_base.hpp for the existing options (such as
baud_rate). You will find the implementation in impl/serial_port_base.ipp.

It should be fairly easy to use those as a guide to make your own
options that support your platform. For window you will modify the DCB
structure and for posix the termios.

HTH
michael

-- 
----------------------------------
Michael Caisse
Object Modeling Designs
www.objectmodelingdesigns.com

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net