40d3a9bd8c
Bug: 36453077 Test: mma Change-Id: I0b1f77dfae5d2258969e33d85ecf45401ffbdfaa
59 lines
2.3 KiB
Text
59 lines
2.3 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.automotive.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.
|
|
*/
|
|
oneway onPropertyEvent(vec<VehiclePropValue> propValues);
|
|
|
|
/**
|
|
* This method gets called if the client was subscribed 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.
|
|
*/
|
|
oneway onPropertySet(VehiclePropValue propValue);
|
|
|
|
/**
|
|
* Set property value is usually asynchronous operation. Thus even if
|
|
* client received StatusCode::OK from the IVehicle::set(...) this
|
|
* doesn't guarantee that the value was successfully propagated to the
|
|
* vehicle network. If such rare event occurs this method must be called.
|
|
*
|
|
* @param errorCode - any value from StatusCode enum.
|
|
* @param property - a property where error has happened.
|
|
* @param areaId - bitmask that specifies in which areas the problem has
|
|
* occurred, must be 0 for global properties
|
|
*/
|
|
oneway onPropertySetError(StatusCode errorCode,
|
|
int32_t propId,
|
|
int32_t areaId);
|
|
};
|