-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathroverserver.proto
58 lines (46 loc) · 1.35 KB
/
roverserver.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
syntax = "proto3";
option java_multiple_files = true;
option java_package = "org.dasfoo.rover.server";
option java_outer_classname = "RoverServerProto";
option objc_class_prefix = "RVR";
// The rover service definition
service RoverService {
// Send command for movement
rpc MoveRover(RoverWheelRequest) returns (RoverWheelResponse) {}
rpc GetBatteryPercentage(BatteryPercentageRequest) returns (BatteryPercentageResponse) {}
rpc GetAmbientLight(AmbientLightRequest) returns (AmbientLightResponse) {}
rpc GetTemperatureAndHumidity(TemperatureAndHumidityRequest) returns (TemperatureAndHumidityResponse) {}
rpc ReadEncoders(ReadEncodersRequest) returns (ReadEncodersResponse) {}
}
// The request message containing command for right and left wheels
message RoverWheelRequest {
int32 left = 1;
int32 right = 2;
}
// The response message contains response for MoveRover
message RoverWheelResponse {
}
message BatteryPercentageRequest {
}
message BatteryPercentageResponse {
int32 battery = 1;
}
message AmbientLightRequest {
}
message AmbientLightResponse {
int32 light = 1;
}
message TemperatureAndHumidityRequest {
}
message TemperatureAndHumidityResponse {
int32 temperature = 1;
int32 humidity = 2;
}
message ReadEncodersRequest {
}
message ReadEncodersResponse {
int32 leftFront = 1;
int32 leftBack = 2;
int32 rightFront = 3;
int32 rightBack = 4;
}