File tree 3 files changed +70
-9
lines changed
3 files changed +70
-9
lines changed Original file line number Diff line number Diff line change
1
+ syntax = "proto3" ;
2
+
3
+ import "google/protobuf/empty.proto" ;
4
+ import "race-flag-status.proto" ;
5
+
6
+ option java_package = "com.normtronix.meringue" ;
7
+
8
+ // Car Data service provides an open api for retrieving a car's position in the race,
9
+ // as well as other telemetry that is available
10
+ service CarDataService {
11
+
12
+ rpc ping (google .protobuf .Empty ) returns (google .protobuf .Empty );
13
+
14
+ rpc getCarData (CarDataRequest ) returns (CarDataResponse );
15
+
16
+ rpc streamCarData (CarDataRequest ) returns (stream CarDataResponse );
17
+
18
+ rpc getRaceField (RaceFieldRequest ) returns (RaceFieldResponse );
19
+
20
+ }
21
+
22
+ message CarDataRequest {
23
+ string trackCode = 1 ;
24
+ string carNumber = 2 ;
25
+ }
26
+
27
+ message CarDataResponse {
28
+ string carNumber = 1 ;
29
+ int64 timestamp = 2 ;
30
+ RaceFlagStatus flagStatus = 3 ;
31
+ int32 lapCount = 4 ;
32
+ int32 position = 5 ;
33
+ int32 positionInClass = 6 ;
34
+ float lastLapTime = 7 ;
35
+ string gap = 8 ;
36
+ int32 coolantTemp = 9 ;
37
+ int32 fuelRemainingPercent = 10 ;
38
+ string driverMessage = 11 ;
39
+ string carAhead = 12 ;
40
+ string carBehind = 13 ;
41
+ int32 fastestLap = 14 ;
42
+ float fastestLapTime = 15 ;
43
+ }
44
+
45
+ message RaceFieldRequest {
46
+ string trackCode = 1 ;
47
+ }
48
+
49
+ message RaceFieldResponse {
50
+ repeated RaceParticipant participants = 1 ;
51
+ }
52
+
53
+ message RaceParticipant {
54
+ string carNumber = 1 ;
55
+ string teamName = 2 ;
56
+ }
57
+
Original file line number Diff line number Diff line change 1
1
syntax = "proto3" ;
2
2
3
3
import "google/protobuf/empty.proto" ;
4
+ import "race-flag-status.proto" ;
4
5
5
6
option java_package = "com.normtronix.meringue" ;
6
7
@@ -59,15 +60,6 @@ message DriverMessage {
59
60
60
61
}
61
62
62
- enum RaceFlagStatus {
63
- UNKNOWN = 0 ;
64
- GREEN = 1 ;
65
- YELLOW = 2 ;
66
- RED = 3 ;
67
- BLACK = 4 ;
68
- FINISH = 5 ;
69
- }
70
-
71
63
// the race status. Only sent when it changes
72
64
73
65
message RaceStatus {
Original file line number Diff line number Diff line change
1
+ syntax = "proto3" ;
2
+
3
+ option java_package = "com.normtronix.meringue" ;
4
+
5
+ enum RaceFlagStatus {
6
+ UNKNOWN = 0 ;
7
+ GREEN = 1 ;
8
+ YELLOW = 2 ;
9
+ RED = 3 ;
10
+ BLACK = 4 ;
11
+ FINISH = 5 ;
12
+ }
You can’t perform that action at this time.
0 commit comments