Best C++ Serial Library?

Hi, I'm getting started with C++ because our school's robotics club found last year that Java's (third party) serial libraries are a bit slow for our needs, so we're intending to split our program into two parts so that the more speed-critical parts are in C++. What would be a good C++ serial library to use? My main requirements are just speed and ease of use. Thanks for the help!

Reply to
Ibrahim Awwal
Loading thread data ...

How fast do you need to go?

John Nagle

Reply to
John Nagle

It's too bad you're not using C#. I've done serial comm with both. C+

  • is a nightmare to code for a serial port. C# was quite straightforward. Let me know if you want my C++ sample code. I should be able to dig it up.

BRW

Reply to
BRW

Its too bad you're using windows. Its a world easier on linux. ;)

- Daniel

Reply to
D Herring

Serial as in RS232?

Only ask because I had a frustrating time trying to connect at 9600 baud to a PC. I started by sending to it from an interrupt driven buffer, ended up sending against a timer tick so I could slow it down.

Even tried writing an interrupt handler for the PC, enabled the UART FIFO's, still lost data.

Worked under DOS but not under Windows, think I may need a serial to USB adaptor.

Reply to
Robin

Look here:

formatting link
sell serial port based RC controllers and they also have a free library for talking to the PC's serial port.

-howy

Reply to
howy

Haha, that's actually the SSC we're using I believe. I suppose I could learn C# instead, as long as it's pretty fast (I think our compass does 10 or 100 hz). I can't use Linux because we're running on an OQO and getting drivers for all its stuff would probably be a pain in the rear. Side note: Never use the OQO Model 01(+) for a robotics project. It gets hot as heck in a few minutes of use. Don't know if the Model

02 is better in that regard. I guess I'll check out C# and see how well it works, we've got 10 weeks to work on this project so I can afford to play around with stuff a bit.
Reply to
Ibrahim Awwal

PolyTech Forum website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.