Quote:
Originally Posted by JBotAlan
I am 99.9% sure that the DS ports only will handle HID devices--joysticks and the like. It may be possible to do something like this with a custom circuit, but really I don't think it's worth it. I will just FTP into the cRIO to get the log file.
Though that idea is very cool...
Jacob
|
Well you do use a thumb drive to update the driver station, so the possibility of somthing like that getting implemented may not be far off.
Quote:
Originally Posted by slavik262
I've attached my class. I need to get some sleep right now, so I apologize for not providing full documentation, but the header file is commented well enough that you should get an idea of how it works fairly easily. The only note I'd like to make is that the read and write functions take pointers to the variables you are reading/writing to. Also, you can use the generic read/write functions to write c-style strings (char arrays). For the pointer to the data, provide the name of the array, dataItemSize should be sizeof(char), and itemCount should be however many characters you want to write. I apologize for lacking full string implementation. I plan on creating a WriteString function that takes a pointer to a null-terminated string later.
I hope this helps you out.
EDIT: I just noticed I left some typedefs and a definition in the header file that I needed when I tested this in Visual C++. Feel free to remove lines 6, 11, and 12 (the _CRT_SECURE_NO_WARNINGS #define and the typedefs).
|
Can't you just use ofstream?