1/* 2 * Copyright (C) 2020 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16syntax = "proto3"; 17 18package gnss_grpc_proxy; 19 20option java_multiple_files = true; 21option java_package = "com.android.cuttlefish.gnssproxy.proto"; 22 23// The greeting service definition. 24service GnssGrpcProxy { 25 // Sends NmeaRequest 26 rpc SendNmea (SendNmeaRequest) returns (SendNmeaReply) {} 27 28 // Sends GpsRequest 29 rpc SendGps (SendGpsRequest) returns (SendGpsReply) {} 30 31 //// Sends GPS vector of data 32 rpc SendGpsVector (SendGpsCoordinatesRequest) returns (SendGpsCoordinatesReply) {} 33} 34 35 36// The request message containing nmea 37message SendNmeaRequest { 38 string nmea = 1; 39} 40 41// The response message containing the return nmea reply message 42message SendNmeaReply { 43 string reply = 1; 44} 45 46 47// The request message containing gps location information 48message SendGpsRequest { 49 string gps = 1; 50} 51 52// The response message containing the return information 53message SendGpsReply { 54 string reply = 1; 55} 56 57message GpsCoordinates { 58 float latitude = 1; 59 float longitude = 2; 60 float elevation = 3; 61} 62 63// The request message containing array of gps locations 64message SendGpsCoordinatesRequest { 65 //Delay in millisecond 66 int32 delay =1; 67 repeated GpsCoordinates coordinates = 2; 68} 69 70// The response message containing the return status or error code if exists 71message SendGpsCoordinatesReply { 72 enum StatusCode { 73 OK = 0; 74 CANCELLED = 1; 75 UNKNOWN = 2; 76 INVALID_ARGUMENT = 3; 77 DEADLINE_EXCEEDED = 4; 78 NOT_FOUND = 5; 79 ALREADY_EXISTS = 6; 80 PERMISSION_DENIED = 7; 81 RESOURCE_EXHAUSTED = 8; 82 FAILED_PRECONDITION = 9; 83 ABORTED = 10; 84 OUT_OF_RANGE = 11; 85 UNIMPLEMENTED = 12; 86 INTERNAL = 13; 87 UNAVAILABLE = 14; 88 DATA_LOSS = 15; 89 UNAUTHENTICATED = 16; 90 } 91 92 StatusCode status = 1; 93}