1/* 2 * Copyright (C) 2019 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 */ 16 17syntax = "proto3"; 18 19package vhal_proto; 20 21import "google/protobuf/empty.proto"; 22import "VehicleHalProto.proto"; 23 24// correspond to StatusCode defined in types.hal 25enum VehicleHalStatusCode { 26 OK = 0; 27 TRY_AGAIN = 1; 28 INVALID_ARG = 2; 29 NOT_AVAILABLE = 3; 30 ACCESS_DENIED = 4; 31 INTERNAL_ERROR = 5; 32} 33 34message VehicleHalCallStatus { 35 VehicleHalStatusCode status_code = 1; 36} 37 38message WrappedVehiclePropValue { 39 VehiclePropValue value = 1; 40 // An indicator on whether we should update the status of the property 41 // - true: if the value is generated by (emulated/real) car, or; 42 // if the value is injected to 'fake' a on car event (for debugging purpose) 43 // - false: if the value is set by VHal (public interface), since Android 44 // cannot change status of property on a real car 45 bool update_status = 2; 46} 47 48service VehicleServer { 49 rpc GetAllPropertyConfig(google.protobuf.Empty) returns (stream VehiclePropConfig) {} 50 51 // Change the property value of the vehicle 52 rpc SetProperty(WrappedVehiclePropValue) returns (VehicleHalCallStatus) {} 53 54 // Start a vehicle property value stream 55 rpc StartPropertyValuesStream(google.protobuf.Empty) returns (stream WrappedVehiclePropValue) {} 56} 57