Skip to content

Commit ab7f213

Browse files
committed
Updated documentation
1 parent 5926ae3 commit ab7f213

File tree

9 files changed

+28
-31
lines changed

9 files changed

+28
-31
lines changed

doc/Sequence diagrams/Bronze.png

-1.45 KB
Loading

doc/Sequence diagrams/Bronze.puml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ title Bronze challenge\nsequence diagram
33
participant Buggy as b #4f4
44
participant Station as s #44f
55
note over b, s #fff: Buggy in parking lot, stopped
6-
s->b: CLOCK
76
s->b: GO
87
s<-b: GOING
98
s<->b: Under gantry 1...

doc/Sequence diagrams/Gold.png

-6.76 KB
Loading

doc/Sequence diagrams/Gold.puml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,9 @@ title Gold challenge sequence diagram
44
participant "Buggy 1" as b1 #f44
55
participant Station as s #44f
66
participant "Buggy 2" as b2 #4f4
7-
note over s #fff: Ask user the challenge level to present\n\
8-
If gold, ask user for number of loops to go [➔n]\n\
9-
If silver, 1n\n\
10-
For bronze, see bronze sequence diagram
7+
note over s #fff: Ask user the number of buggies used\n\
8+
and the number of laps to go [➔n]
119
note over b1, b2 #fff: Buggies in parking lot, stopped
12-
group Initialise
13-
s->b1: CLOCK
14-
s->b2: ACLOCK
15-
end
1610
loop n times
1711
group Buggy 1 lap
1812
s->b1: GO

doc/Sequence diagrams/Obstacle.png

673 Bytes
Loading

doc/Sequence diagrams/Obstacle.puml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ group Obstacle encountered
77
b->s: OBSTACLE
88
...
99
b->s: PATHCLEAR
10+
b<-s: GO
11+
b->s: GOING
1012
end
1113
...
1214
@enduml
-471 Bytes
Loading

doc/Sequence diagrams/Under gantry.puml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ participant Buggy as b #4f4
44
participant Station as s #44f
55
...
66
group Under gantry n
7-
s<-b: GANTRY n
7+
s<-b: GANTRYn
88
s->b: STOP
99
s<-b: STOPPED
1010
note over s #fff: Wait 1 sec

doc/commands.md

Lines changed: 23 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3,34 +3,36 @@
33
Each message consists of a sender ID, a receiver ID, and a command, separated by
44
a single space (` `). Messages are terminated by a newline (`\n`).
55

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.
88

99
### Commands sent by the buggy to the station:
1010

11+
Commands received by the station are parsed using regular expressions. They are
12+
presented here in C# syntax
13+
1114
Command | Explanation
1215
--- | ---
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
2628

2729
### Commands sent by the station to one of the buggies:
2830

2931
Command | Explanation
3032
--- | ---
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

Comments
 (0)