2
0
Fork 0

Feat: RaceState and RaceCommand

This commit is contained in:
Dorian Zedler 2023-10-14 17:23:56 +02:00
parent 2413fcb9b6
commit 99cb0e6191
Signed by: dorian
GPG key ID: 989DE36109AFA354
2 changed files with 57 additions and 0 deletions

20
RaceCommand.proto Normal file
View file

@ -0,0 +1,20 @@
syntax = "proto3";
package ScStw;
message StartCommand {}
message DisableCommand { uint32 laneNumber = 1; }
message FallCommand { uint32 laneNumber = 1; }
message ResetCommand {}
message Command {
oneof Command {
StartCommand start = 1;
DisableCommand disable = 2;
FallCommand fall = 3;
ResetCommand reset = 4;
}
}

37
RaceState.proto Normal file
View file

@ -0,0 +1,37 @@
syntax = "proto3";
package ScStw;
message LaneFullState {
enum State {
IDLE = 0;
IDLE_FOOT_DOWN = 1;
READY_FOOT_DOWN = 2;
RUNNING_FOOT_DOWN = 3;
RUNNING = 4;
FALSE_START = 5;
FALSE_START_TIE = 6;
WILDCARD = 7;
FINISHED = 8;
FINISHED_WINNER = 9;
FINISHED_TIE = 10;
FALL = 11;
DISABLED = 12;
}
State state = 1;
uint32 reactionTime = 2;
uint32 climbingTime = 3;
}
message RaceFullState {
enum State {
IDLE = 0;
IDLE_CLEAR_TO_START = 1;
STARTING = 2;
RUNNING = 3;
FINISHED = 4;
FINISHED_MUTED = 5;
}
State state = 1;
repeated LaneFullState laneStates = 2;
}