platform_hardware_interfaces/vehicle/2.0/IVehicleCallback.hal
Pavel Maltsev a2f426ab27 Initial HIDL vehicle HAL
Bug: b/31803520
Test: writing a test client in upcoming CLs

Change-Id: I050ab2d764f4550c5d0417c892d05d95472c9b7f
2016-10-12 12:01:50 -07:00

56 lines
2 KiB
Text

/*
* Copyright (C) 2016 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package android.hardware.vehicle@2.0;
interface IVehicleCallback {
/*
* Event callback happens whenever a variable that the API user has
* subscribed to needs to be reported. This may be based purely on
* threshold and frequency (a regular subscription, see subscribe call's
* arguments) or when the IVehicle#set method was called and the actual
* change needs to be reported.
*
* These callbacks are chunked.
*
* @param values that has been updated.
*/
onPropertyEvent(vec<VehiclePropValue> propValues);
/*
* This method gets called if the client was susbscribed to a property using
* SubscribeFlags::SET_CALL flag and IVehicle#set(...) method was called.
*
* These events must be delivered to subscriber immediately without any
* batching.
*
* @param value Value that was set by a client.
*/
onPropertySet(VehiclePropValue propValue);
/*
* Called by HAL server when error condition has occurred.
*
* @param errorCode - any value from StatusCode enum.
* @parm property - a property where error has happened. If this is
* a generic error, this value should be VehicleProperty::INVALID.
* @param operation Represent the operation where the error has happened.
*/
onError(StatusCode errorCode,
VehicleProperty propId,
VehiclePropertyOperation operation);
};