Add grpc rust codegen + stubs, add rppal compile feature

for raspberry pi compilation.

This is because rppal won't compile on mac, so we
only want to bring in the dependency when actually compiling
for the raspberry pi, and so will manually need to enable the
dependency.
This commit is contained in:
Piv
2022-08-06 20:34:00 +09:30
parent 26647017c3
commit d876fcbb2e
7 changed files with 395 additions and 32 deletions

View File

@@ -7,8 +7,6 @@ option java_multiple_files = true;
option java_package = "org.vato.carcontroller";
option java_outer_classname = "MotorServiceProto";
import "google/protobuf/empty.proto";
message ThrottleRequest{
float throttle = 1;
}
@@ -38,10 +36,22 @@ message SaveRequest{
string file = 1;
}
message Vehicle2DResponse {
}
message RecordingResponse {
}
message SaveResponse {
}
service CarControl{
rpc set_throttle(ThrottleRequest) returns (ThrottleResponse){}
rpc set_steering(SteeringRequest) returns (SteeringResponse){}
rpc stream_vehicle_2d(stream Vehicle2DRequest) returns (google.protobuf.Empty){}
rpc record(RecordingReqeust) returns (google.protobuf.Empty) {}
rpc save_recorded_data(SaveRequest) returns (google.protobuf.Empty) {}
rpc stream_vehicle_2d(stream Vehicle2DRequest) returns (Vehicle2DResponse){}
rpc record(RecordingReqeust) returns (RecordingResponse) {}
rpc save_recorded_data(SaveRequest) returns (SaveResponse) {}
}