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 | package com.android.car.vehiclenetwork; |
| 18 | |
keunyoung | 1ab8e18 | 2015-09-24 09:25:22 -0700 | [diff] [blame] | 19 | import com.android.car.vehiclenetwork.IVehicleNetworkHalMock; |
| 20 | import com.android.car.vehiclenetwork.IVehicleNetworkListener; |
keunyoung | e18e25d | 2015-08-28 15:57:19 -0700 | [diff] [blame] | 21 | import com.android.car.vehiclenetwork.VehiclePropConfigsParcelable; |
| 22 | import com.android.car.vehiclenetwork.VehiclePropValueParcelable; |
| 23 | import com.android.car.vehiclenetwork.VehiclePropValuesParcelable; |
| 24 | |
keunyoung | e18e25d | 2015-08-28 15:57:19 -0700 | [diff] [blame] | 25 | /** |
| 26 | * Binder API to access vehicle network service. |
| 27 | * @hide |
| 28 | */ |
| 29 | interface IVehicleNetwork { |
| 30 | VehiclePropConfigsParcelable listProperties(int property) = 0; |
keunyoung | 15882e5 | 2015-09-16 16:57:58 -0700 | [diff] [blame] | 31 | /** For error case, exception will be thrown. */ |
| 32 | void setProperty(in VehiclePropValueParcelable value) = 1; |
keunyoung | 7d74e6d | 2015-10-14 15:43:10 -0700 | [diff] [blame] | 33 | VehiclePropValueParcelable getProperty(in VehiclePropValueParcelable value) = 2; |
keunyoung | 15882e5 | 2015-09-16 16:57:58 -0700 | [diff] [blame] | 34 | /** For error case, exception will be thrown. */ |
Keun-young Park | 0727f95 | 2015-12-21 14:30:07 -0800 | [diff] [blame] | 35 | void subscribe(in IVehicleNetworkListener listener, int property, float sampleRate, |
Pavel Maltsev | b0324b4 | 2016-09-27 21:00:41 -0700 | [diff] [blame^] | 36 | int zones, int flags) = 3; |
keunyoung | e18e25d | 2015-08-28 15:57:19 -0700 | [diff] [blame] | 37 | void unsubscribe(in IVehicleNetworkListener listener, int property) = 4; |
keunyoung | 1ab8e18 | 2015-09-24 09:25:22 -0700 | [diff] [blame] | 38 | /** For testing only. inject events. */ |
| 39 | void injectEvent(in VehiclePropValueParcelable value) = 5; |
| 40 | /** For testing only. Start in mocking mode. */ |
| 41 | void startMocking(in IVehicleNetworkHalMock mock) = 6; |
| 42 | /** Finish mocking mode. */ |
| 43 | void stopMocking(in IVehicleNetworkHalMock mock) = 7; |
Keun-young Park | 28dd470 | 2015-11-19 18:06:04 -0800 | [diff] [blame] | 44 | void injectHalError(int errorCode, int property, int operation) = 8; |
| 45 | void startErrorListening(in IVehicleNetworkListener listener) = 9; |
| 46 | void stopErrorListening(in IVehicleNetworkListener listener) = 10; |
| 47 | void startHalRestartMonitoring(in IVehicleNetworkListener listener) = 11; |
| 48 | void stopHalRestartMonitoring(in IVehicleNetworkListener listener) = 12; |
keunyoung | 1ab8e18 | 2015-09-24 09:25:22 -0700 | [diff] [blame] | 49 | |
keunyoung | e18e25d | 2015-08-28 15:57:19 -0700 | [diff] [blame] | 50 | //TODO add specialized set for byte array for efficiency |
| 51 | } |