Quote:
Originally Posted by Greg McKaskle
The DS sends a bunch of info the the dashboard. I don't think SD currently decodes it and makes it available, but the LV dashboard, top loop, makes a call to Retrieve Status Info. That VI has an output called Power and Errors. Kind of an odd combo, but anyway, in the same cluster is match info. I have never actually tested it at an event, but I suspect that the data will be in there. You could write it to your own file on the DB computer, or you can put it into Network Tables and give it to the robot.
Greg McKaskle
|
I think I found it!
WPI_DashboardProcessTCPPacket.vi, in red box at bottom left is the bundle constant which stores the default values. I surrounded the Event Info box with a red rectangle for emphasis, since I assume this is where the values are.
Sadly, there are no descriptions for any of these values (Name, Type, Number, Replay), whether they are base-0 or base-1, or what they refer to (what does type mean? does replay read 1 if this match is a replay?)
Anyway, in hopes of turning this into a VI for a robot target (rather than one for the dashboard) I sleuthed through the relevant code.
Apparently this method creates a TCP connection on port 1741 (at least for me) which then listens for requests; when one is received, it is sent through a local variable to the WPI_DashboardRetrieveStatusInfo.vi, where 10,000 bytes are read, then the data is sent to be processed by WPI_DashboardProcessTCPPacket.vi. It does some weird byte stuff that I can't for the life of me interpret, then it reads it, parses it, and passes it out through Power and Errors.
Would this work if I ported it to the robot, or are these port 1741 requests only sent to the dashboard?