gluxon / node-driverstation

Node.js API for the client-side FRC Driver Station
MIT License
5 stars 1 forks source link

Analysis of WPILib (from-robot) UDP packet structure #2

Open gluxon opened 11 years ago

gluxon commented 10 years ago

So most of the information I found in version 0.3 (which has this incomplete) is from accessing FRCControl.setStatusData() and FRCControl.setErrorData() from the robot template file and spoofing values.

http://robotics.francisparker.org/javadoc/edu/wpi/first/wpilibj/communication/FRCControl.html#setStatusData%28double,%20int,%20int,%20byte[],%20int,%20byte[],%20int,%20int%29

This allowed me to find their offsets in the udp packet.

gluxon commented 10 years ago

The cRIO image version and configured programming language should also be somewhere in the packet. It's possible the Driver Station may request this info over FTP but this seems less likely.

FPGAHardwareVersion is also probably somewhere in this packet, given C++ source wrapping a function for it. I'd like to write a C++ application that calls getFPGAHardwareVersion to check this later.