Boost logo

Boost Users :

From: Casimiro, Daniel C CIV NUWC NWPT (daniel.casimiro_at_[hidden])
Date: 2008-08-01 15:51:11


 
> Is there a boost library available for serial communications (com
port)? I could not find one based on the descriptions
> on the boost libraries page.

Boost::ASIO 1.1.1 supports serial ports. From the announcement,

The major new features in this release are:

* Support for serial ports.

   New classes have been included for creating and manipulating serial
   ports in a portable manner. For example, a serial port may be opened
   using:

     serial_port port(my_io_service, name);

   where name is something like "COM1" on Windows, and "/dev/ttyS0" on
   POSIX platforms. Once opened the serial port may be used as a stream
   (meaning you can use the free functions such as read(), write(),
   etc.)

   The serial port implementation also includes option classes for
   configuring the port: baud_rate, flow_control, parity, stop_bits and
   character_size.

   Thanks go to Rep Invariant Systems, Inc. for contributing the
   initial implementation which was integrated into asio to provide
   this facility.

Boost::ASIO 1.1.1 is a development version (boost 1.35.0 ships ASIO
1.0.0)
http://sourceforge.net/project/showfiles.php?group_id=122478&package_id=
134200&release_id=610981

~Dan


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