keunyoung | e18e25d | 2015-08-28 15:57:19 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2015 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 | |
| 17 | syntax = "proto2"; |
| 18 | option java_package = "com.android.car.vehiclenetwork"; |
| 19 | option optimize_for = LITE_RUNTIME; |
| 20 | |
keunyoung | e18e25d | 2015-08-28 15:57:19 -0700 | [diff] [blame] | 21 | message VehiclePropConfig { |
| 22 | required int32 prop = 1; |
| 23 | required int32 access = 2; |
| 24 | required int32 change_mode = 3; |
| 25 | required int32 value_type = 4; |
| 26 | required int32 permission_model = 5; |
Keun-young Park | 71b2f5c | 2016-03-10 18:44:40 -0800 | [diff] [blame] | 27 | optional int32 zones = 6; |
| 28 | repeated int32 config_array = 7; |
| 29 | required float sample_rate_max = 8; |
| 30 | required float sample_rate_min = 9; |
| 31 | optional string config_string = 10; |
| 32 | repeated float float_maxs = 11; |
| 33 | repeated float float_mins = 12; |
| 34 | repeated int32 int32_maxs = 13; |
| 35 | repeated int32 int32_mins = 14; |
| 36 | repeated int64 int64_maxs = 15; |
| 37 | repeated int64 int64_mins = 16; |
keunyoung | e18e25d | 2015-08-28 15:57:19 -0700 | [diff] [blame] | 38 | }; |
| 39 | |
| 40 | message VehiclePropConfigs { |
| 41 | repeated VehiclePropConfig configs = 1; |
| 42 | }; |
| 43 | |
keunyoung | e18e25d | 2015-08-28 15:57:19 -0700 | [diff] [blame] | 44 | message VehiclePropValue { |
| 45 | // common data |
| 46 | required int32 prop = 1; |
| 47 | required int32 value_type = 2; |
keunyoung | 15882e5 | 2015-09-16 16:57:58 -0700 | [diff] [blame] | 48 | optional int64 timestamp = 3; // required for valid data from HAL, but can be skipped for set. |
keunyoung | e18e25d | 2015-08-28 15:57:19 -0700 | [diff] [blame] | 49 | // values |
Keun-young Park | 71b2f5c | 2016-03-10 18:44:40 -0800 | [diff] [blame] | 50 | optional int32 zone = 4; |
| 51 | repeated int32 int32_values= 5; // this also covers boolean value. |
| 52 | optional int64 int64_value = 6; |
| 53 | repeated float float_values = 7; |
| 54 | optional string string_value = 8; |
| 55 | optional bytes bytes_value = 9; |
keunyoung | e18e25d | 2015-08-28 15:57:19 -0700 | [diff] [blame] | 56 | }; |
| 57 | |
| 58 | message VehiclePropValues { |
| 59 | repeated VehiclePropValue values = 1; |
| 60 | }; |