Files
picar/protobuf/src/main/proto/car/control/motorService.proto
2020-05-03 16:10:40 +09:30

48 lines
1008 B
Protocol Buffer

syntax = "proto3";
package MotorControl;
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;
}
message ThrottleResponse{
bool throttleSet = 1;
}
message SteeringRequest{
float steering = 1;
}
message SteeringResponse{
bool steeringSet = 1;
}
message Vehicle2DRequest{
ThrottleRequest throttle = 1;
SteeringRequest steering = 2;
}
message RecordingReqeust{
bool record = 1;
}
message SaveRequest{
string file = 1;
}
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) {}
}