|
Boost Users : |
From: Rob Desbois (rob.desbois_at_[hidden])
Date: 2008-01-18 08:02:01
Hi,
I'm a newcomer to boost and having trouble determining if what I want to
achieve is possible.
I want some sort of boost::iostreams object wrapping a serial port so that
it conforms to the usual interfaces - this would be extremely useful not
only for its use, but also to enable injection of a stringstream instance as
a mock object when testing.
It seems that the likely candidate for this is file_descriptor but I'm not
entirely sure.
First off, file_descriptor refines SeekableDevice, which a serial port isn't
- does this mean that I can't do it?
After trying to compile I realised that a SeekableDevice provides read,
write and seek functions, nothing else.
Am I seriously misunderstanding the point of boost::iostreams?
If I am then can anybody point me in a better direction? My ultimate
requirement is a serial port access class that looks just like a C++/boost
iostream. I cannot use C++ iostreams directly as I require access to
file-descriptor which is not available.
Anyone able to help a lost person please?
TIA,
--rob
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