|
3 | 3 | Each message consists of a sender ID, a receiver ID, and a command, separated by
|
4 | 4 | a single space (` `). Messages are terminated by a newline (`\n`).
|
5 | 5 |
|
6 |
| -Valid IDs are `0`, `1` and `2`, where `0` represents the station and the other |
7 |
| -two the buggies. |
| 6 | +Valid IDs are `0`, `1` and `2`, where `0` represents the station and `1` and `2` |
| 7 | +represent the two buggies. |
8 | 8 |
|
9 | 9 | ### Commands sent by the buggy to the station:
|
10 | 10 |
|
| 11 | +Commands received by the station are parsed using regular expressions. They are |
| 12 | +presented here in C# syntax |
| 13 | + |
11 | 14 | Command | Explanation
|
12 | 15 | --- | ---
|
13 |
| -ACK | For automatic communication testing, sent for every command received. Expects no reply |
14 |
| -PONG | Response to PING |
15 |
| -PING | Response to PONG |
16 |
| -GOING | Buggy is going after receiveing a GO command |
17 |
| -STOPPED | Buggy stopped after receiving a STOP command |
18 |
| -GANTRY1 | Passing under Gantry 1 |
19 |
| -GANTRY2 | Passing under Gantry 2 |
20 |
| -GANTRY3 | Passing under Gantry 3 |
21 |
| -GANTRY_INVALID | The buggy detected a gantry, but its signature did not match any of the gantries |
22 |
| -PARKED | When the buggy has stopped after being requested to park with a PARK command |
23 |
| -OBSTACLE | Informs the station that an obstacle has appeared in the path of the buggy and therefore it has temporarily stopped |
24 |
| -PATHCLEAR | Informs the station that the obstacle has been removed and the buggy is resuming travel |
25 |
| -INVALID | An invalid message has been recieved from the station, addressed to this buggy |
| 16 | +`ACK` | For automatic communication testing, sent for every command received. Expects no reply |
| 17 | +`PONG` | Response to `PING` |
| 18 | +`PING` | Response to `PONG` |
| 19 | +`GOING` | Buggy is going after receiveing a `GO` command |
| 20 | +`STOPPED` | Buggy stopped after receiving a `STOP` command |
| 21 | +`GANTRY(?<GantryID>[123])` | Passing under Gantry with the corresponding ID |
| 22 | +`GANTRY_INVALID` | The buggy detected a gantry, but its signature did not match that of any of the gantries |
| 23 | +`IRLength: (?<Length>\d+)` | The length of the infrared pulse measured by the buggy's gantry sensor, sent purely for diagnostic purposes |
| 24 | +`PARKED` | When the buggy has stopped after being requested to park with a `PARK` command |
| 25 | +`OBSTACLE` | Informs the station that an obstacle has appeared in the path of the buggy and therefore it has temporarily stopped |
| 26 | +`PATHCLEAR` | Informs the station that the obstacle has been removed and the buggy could now resume its travel |
| 27 | +`INVALID: (?<Command>.*)` | An invalid command has been recieved from the station, addressed to the sending buggy |
26 | 28 |
|
27 | 29 | ### Commands sent by the station to one of the buggies:
|
28 | 30 |
|
29 | 31 | Command | Explanation
|
30 | 32 | --- | ---
|
31 |
| -SYN | For automatic communication testing, expects nothing other than the default ACK |
32 |
| -PING | For communications testing, expecting PONG |
33 |
| -PONG | For communications testing, expecting PING |
34 |
| -GO | Commands buggy to go, following the line |
35 |
| -STOP | Commands buggy to stop immediately |
36 |
| -PARK | Commands buggy to turn in the appropriate direction for the parking lane, then stop after parking |
| 33 | +`SYN` | For automatic communication testing, expects nothing other than the default `ACK` |
| 34 | +`PING` | For communications testing, expecting `PONG` |
| 35 | +`PONG` | For communications testing, expecting `PING` |
| 36 | +`GO` | Commands buggy to go, following the line |
| 37 | +`STOP` | Commands buggy to stop immediately |
| 38 | +`PARK` | Commands buggy to turn in the appropriate direction for the parking lane, then stop after parking |
0 commit comments