Driver Station to FMS
UDP
Sent to 10.0.100.5 UDP port 1160 (from UDP port 1145).
Field |
Length |
Type |
Comment |
|---|---|---|---|
Sequence Num |
2 |
uint16 |
|
Comm Version |
1 |
uint8 |
Only |
Status Byte |
1 |
Contains control bits |
|
Team Num |
2 |
uint16 |
|
Battery |
2 |
Battery voltage |
|
Tags |
N |
Status
Field |
Mask |
Comment |
E-Stop |
|
0: Normal, 1: Emergency Stopped |
Robot Comms Active |
|
0: No, 1: Yes |
Radio Ping |
|
0: No, 1: Yes |
Rio Ping |
|
0: No, 1: Yes |
Enabled |
|
0: Disabled, 1: Enabled |
Mode |
|
0: TeleOp, 1: Test, 2: Autonomous |
Reserved |
|
Battery
Received as a uint16, XXYY. Voltage is calculated by: XX + YY/256
TCP
Sent to 10.0.100.5 TCP port 1750.
Field |
Length |
Type |
Comment |
|---|---|---|---|
Size |
2 |
uint16 |
Including ID |
ID |
1 |
uint8 |
See table below (only of Size > 0) |
Tags |
n |
Depends on tag type |
Tags
ID |
Tag |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Versions all take the same format
Version
See above table for devices and their associated tag IDs.
Field |
Length |
Type |
Comment |
|---|---|---|---|
Status |
n |
string |
<bad>, <good>, or <preferred> |
Version |
n |
string |
Usage Report (0x15)
Field |
Length |
Type |
Comment |
|---|---|---|---|
Team Num |
2 |
uint16 |
|
Unknown |
1 |
uint8 |
|
Entries |
n |
See Usage Reporting for details about the Entries format.
Log Data (0x16)
Field |
Length |
Type |
Comment |
|---|---|---|---|
Trip Time |
1 |
uint8 |
This is round trip time, actual trip time is half of this |
Lost Packets |
1 |
uint8 |
|
Voltage |
2 |
|
|
Robot Status |
1 |
||
CAN |
1 |
uint8 |
Value is halved |
SignalDb |
1 |
uint8 |
Value is halved |
Bandwidth |
2 |
Bandwidth |
|
Status
Field |
Mask |
Comment |
|---|---|---|
Brownout |
|
|
Watchdog |
|
|
DS TeleOp |
|
|
DS Auto |
|
|
DS Disable |
|
|
Robot TeleOp |
|
|
Robot Auto |
|
|
Robot Disable |
|
Error and Event Data (0x17)
Field |
Length |
Type |
Comment |
|---|---|---|---|
Message Count |
4 |
uint32 |
Number of messages to process |
Timestamp |
8 |
uint64 |
Number of seconds since 1904/01/01 00:00:00 GMT |
Unknown |
8 |
|
|
Log Message |
4 + n |
string |
Team Number (0x18)
Sent immediately upon TCP connection. Sending this triggers a challenge response.
Field |
Length |
Type |
Comment |
|---|---|---|---|
Team Num |
2 |
uint16 |
Looks like it takes over the FMS’s Driver Station context associated with that team number. Would probably be bad to send another team’s number from your own station |
Challenge Response (0x1b)
Used to verify if the Driver Station is “official”. Trivial to figure out the correct response from the off-season FMS, which isn’t incredibly useful.
Field |
Length |
Type |
Comment |
|---|---|---|---|
Response |
n |
string |
As of 2017, there’s 23 possible responses. These change year to year.
ID |
Response |
|---|---|
0 |
Johnny Five |
1 |
Data |
2 |
ED-209 |
3 |
Bishop |
4 |
NXT |
5 |
Optimus Prime |
6 |
Roomba |
7 |
Rosie |
8 |
The Terminator |
9 |
HAL 9000 |
10 |
Sojourner |
11 |
R2-D2 |
12 |
C-3PO |
13 |
Wall-E |
14 |
Curiosity |
15 |
Opportunity |
16 |
Spirit |
17 |
Cylons |
18 |
Stinky |
19 |
Iron Giant |
20 |
RCX |
21 |
EV3 |
22 |
ASIMO |
The correct response uses the Random Value sent by the Challenge Question.
id = ( (team number) * (random value) ) % 23
DS Ping (0x1c)
Just an empty tag. Sent by DS to FMS as a heartbeat.
Field |
Length |
Type |
Comment |
|---|---|---|---|