blob: a081fd0076a4ee4140c06ec3c9e4d7b3b4aa18e7 [file] [log] [blame]
keunyounge18e25d2015-08-28 15:57:19 -07001/*
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
17package com.android.car.vehiclenetwork;
18
keunyoung1ab8e182015-09-24 09:25:22 -070019import com.android.car.vehiclenetwork.IVehicleNetworkHalMock;
20import com.android.car.vehiclenetwork.IVehicleNetworkListener;
keunyounge18e25d2015-08-28 15:57:19 -070021import com.android.car.vehiclenetwork.VehiclePropConfigsParcelable;
22import com.android.car.vehiclenetwork.VehiclePropValueParcelable;
23import com.android.car.vehiclenetwork.VehiclePropValuesParcelable;
24
keunyounge18e25d2015-08-28 15:57:19 -070025/**
26 * Binder API to access vehicle network service.
27 * @hide
28 */
29interface IVehicleNetwork {
30 VehiclePropConfigsParcelable listProperties(int property) = 0;
keunyoung15882e52015-09-16 16:57:58 -070031 /** For error case, exception will be thrown. */
32 void setProperty(in VehiclePropValueParcelable value) = 1;
keunyoung7d74e6d2015-10-14 15:43:10 -070033 VehiclePropValueParcelable getProperty(in VehiclePropValueParcelable value) = 2;
keunyoung15882e52015-09-16 16:57:58 -070034 /** For error case, exception will be thrown. */
Keun-young Park0727f952015-12-21 14:30:07 -080035 void subscribe(in IVehicleNetworkListener listener, int property, float sampleRate,
Pavel Maltsevb0324b42016-09-27 21:00:41 -070036 int zones, int flags) = 3;
keunyounge18e25d2015-08-28 15:57:19 -070037 void unsubscribe(in IVehicleNetworkListener listener, int property) = 4;
keunyoung1ab8e182015-09-24 09:25:22 -070038 /** 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 Park28dd4702015-11-19 18:06:04 -080044 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;
keunyoung1ab8e182015-09-24 09:25:22 -070049
keunyounge18e25d2015-08-28 15:57:19 -070050 //TODO add specialized set for byte array for efficiency
51}