PDA

View Full Version : C++ and Dashboard


Matt_Gray
05-01-2002, 02:54 PM
Hey... does anyone know how to write a segment in C++ (if it helps I use the Bourland compiler) to input information from the dashboard output to a communitcations port on the back :confused: :confused: :confused:

Ian W.
05-01-2002, 04:40 PM
If i knew i'd tell you. unfortunately, i'm still trying to figure this out myself. maybe after ap tests i'll find something...

Matt Leese
05-01-2002, 09:14 PM
Alright, I suppose I'll bring out my Dashboard viewer yet again. It's written in C/C++ and runs under Windows. It does read data in from the serial port. In short, the way to access a COM Port (aka serial port) is to simply use ReadFile/WriteFile on it. There's a bit more too it but you can find all of it in the Dashboard Viewer.

I haven't played with it too much in several years as I haven't had too much use for it. It does include the full source code. It can be found here: http://www.bcpl.net/~mleese/dashboard.html

I hope you find it useful. Feel free to contact me if you have any questions.

Matt

Ian W.
05-01-2002, 09:37 PM
use fstream to a com port...?

you lost me

/me goes to check website

rbayer
05-30-2002, 09:10 AM
Basically, the way you do serial communications in Windows is to pretend that the serial port is a file. Then, you can use the standard Windows read and write operations to get data from and to the serial port. I don't know if this works with standard C fstream objects though. As soon as I'm done with my research paper, I'll write up a white paper on both.

BTW, what exactly do you mean by segment? Are you talking about a function? It's just that the word "segment" has a very specific meaning in assembly, and I'm hoping this isn't what you're talking about...

Greg McCoy
05-30-2002, 11:15 AM
Originally posted by rbayer
I'll write up a white paper on both.


I think that would be very helpful to many programmers. I think a white paper on this would be awesome.

rbayer
06-03-2002, 11:50 PM
I think that would be very helpful to many programmers. I think a white paper on this would be awesome.

It's up now, so go check it out and tell me what you think.