libserial with vmin and vtime

B

Bill Michaelson

I'm looking for guidance in using the libserial package. It seems
reasonable to assume that the facility I need is there, but it's not
obvious to me how to use it...

Ideally, I want to use a SerialStream::getline() to read a CR terminated
string from an RS-232 input source, but in any case, I would like a
blocking operation with a timeout parameter. As a C coder, I would
ordinarily use a Linux/POSIX read(), and ioctl() to set VMIN/VTIME
appropriately. But I prefer to use C++ with libserial, and I'm not so
proficient.

If need be, I would do final string assembly from raw buffers in my own app.

But I'm not getting it from the libserial docs I can find, and I could
use some clues from experienced hands. Perhaps you can refer me to a
code fragment for this?

TIA
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,053
Latest member
BrodieSola

Latest Threads

Top