/* * Copyright (C) 2018 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.car; import android.annotation.RequiresPermission; import android.car.hardware.CarPropertyValue; import android.car.hardware.property.VehicleElectronicTollCollectionCardStatus; import android.car.hardware.property.VehicleElectronicTollCollectionCardType; /** * Copy from android.hardware.automotive.vehicle-V2.0-java_gen_java/gen/android/hardware/automotive * /vehicle/V2_0. Need to update this file when vehicle propertyId is changed in VHAL. * Use it as PropertyId in getProperty() and setProperty() in * {@link android.car.hardware.property.CarPropertyManager} */ public final class VehiclePropertyIds { /** * Undefined property. */ public static final int INVALID = 0; /** * VIN of vehicle * Requires permission: {@link Car#PERMISSION_IDENTIFICATION}. */ @RequiresPermission(Car.PERMISSION_IDENTIFICATION) public static final int INFO_VIN = 286261504; /** * Manufacturer of vehicle. * * * *

Requires permission: {@link Car#PERMISSION_CAR_INFO}. */ @RequiresPermission(Car.PERMISSION_CAR_INFO) public static final int INFO_MAKE = 286261505; /** * Model of vehicle. * *

* *

Requires permission: {@link Car#PERMISSION_CAR_INFO}. */ @RequiresPermission(Car.PERMISSION_CAR_INFO) public static final int INFO_MODEL = 286261506; /** * Model year of vehicle. * *

* *

Requires permission: {@link Car#PERMISSION_CAR_INFO}. */ @RequiresPermission(Car.PERMISSION_CAR_INFO) public static final int INFO_MODEL_YEAR = 289407235; /** * Fuel capacity of the vehicle in milliliters. * *

* *

Requires permission: {@link Car#PERMISSION_CAR_INFO}. */ @RequiresPermission(Car.PERMISSION_CAR_INFO) public static final int INFO_FUEL_CAPACITY = 291504388; /** * List the {@link FuelType}s the vehicle may use. * *

* *

Requires permission: {@link Car#PERMISSION_CAR_INFO}. */ @RequiresPermission(Car.PERMISSION_CAR_INFO) public static final int INFO_FUEL_TYPE = 289472773; /** * Battery capacity of the vehicle in watt-hours (Wh), if EV or hybrid. This is the nominal * battery capacity when the vehicle is new. * *

* *

Requires permission: {@link Car#PERMISSION_CAR_INFO}. */ @RequiresPermission(Car.PERMISSION_CAR_INFO) public static final int INFO_EV_BATTERY_CAPACITY = 291504390; /** * List of {@link EvConnectorType}s this vehicle may use. * *

* *

Requires permission: {@link Car#PERMISSION_CAR_INFO}. */ @RequiresPermission(Car.PERMISSION_CAR_INFO) public static final int INFO_EV_CONNECTOR_TYPE = 289472775; /** * {@link PortLocationType} for the fuel door location. * *

* *

Requires permission: {@link Car#PERMISSION_CAR_INFO}. */ @RequiresPermission(Car.PERMISSION_CAR_INFO) public static final int INFO_FUEL_DOOR_LOCATION = 289407240; /** * {@link PortLocationType} for the EV port location * *

* *

Requires permission: {@link Car#PERMISSION_CAR_INFO}. */ @RequiresPermission(Car.PERMISSION_CAR_INFO) public static final int INFO_EV_PORT_LOCATION = 289407241; /** * List {@link PortLocationType}s for Multiple EV port locations. * *

* *

Requires permission: {@link Car#PERMISSION_CAR_INFO}. */ @RequiresPermission(Car.PERMISSION_CAR_INFO) public static final int INFO_MULTI_EV_PORT_LOCATIONS = 289472780; /** * Driver's {@link VehicleAreaSeat} seat location. * *

* *

Requires permission: {@link Car#PERMISSION_CAR_INFO}. */ @RequiresPermission(Car.PERMISSION_CAR_INFO) public static final int INFO_DRIVER_SEAT = 356516106; /** * Vehicle's exterior dimensions in millimeters. * *

* *

Exterior dimensions defined in the {@link CarPropertyValue#getValue()} {@code Integer[]}: *

* *

Requires permission: {@link Car#PERMISSION_CAR_INFO}. */ @RequiresPermission(Car.PERMISSION_CAR_INFO) public static final int INFO_EXTERIOR_DIMENSIONS = 289472779; /** * Current odometer value of the vehicle in kilometers. * The property is protected by the signature permission: android.car.permission.CAR_MILEAGE. */ @RequiresPermission(Car.PERMISSION_MILEAGE) public static final int PERF_ODOMETER = 291504644; /** * Speed of the vehicle in meters per second. * *

* *

When the vehicle is moving forward, PERF_VEHICLE_SPEED is positive and negative when the * vehicle is moving backward. Also, this value is independent of gear value (CURRENT_GEAR or * GEAR_SELECTION). For example, if GEAR_SELECTION is GEAR_NEUTRAL, PERF_VEHICLE_SPEED is * positive when the vehicle is moving forward, negative when moving backward, and zero when * not moving. * *

Requires permission: {@link Car#PERMISSION_SPEED}. */ @RequiresPermission(Car.PERMISSION_SPEED) public static final int PERF_VEHICLE_SPEED = 291504647; /** * Speed of the vehicle in meters per second for displays. * *

* *

Some cars display a slightly slower speed than the actual speed. This is * usually displayed on the speedometer. * *

Requires permission: {@link Car#PERMISSION_SPEED}. */ @RequiresPermission(Car.PERMISSION_SPEED) public static final int PERF_VEHICLE_SPEED_DISPLAY = 291504648; /** * Front bicycle model steering angle for vehicle in degrees. * * Left is negative. * Requires permission: {@link Car#PERMISSION_READ_STEERING_STATE}. */ @RequiresPermission(Car.PERMISSION_READ_STEERING_STATE) public static final int PERF_STEERING_ANGLE = 291504649; /** * Rear bicycle model steering angle for vehicle in degrees. * * Left is negative. * Requires permission: {@link Car#PERMISSION_READ_STEERING_STATE}. */ @RequiresPermission(Car.PERMISSION_READ_STEERING_STATE) public static final int PERF_REAR_STEERING_ANGLE = 291504656; /** * Temperature of engine coolant in celsius. * The property is protected by the signature permission: * android.car.permission.CAR_ENGINE_DETAILED. */ @RequiresPermission(Car.PERMISSION_CAR_ENGINE_DETAILED) public static final int ENGINE_COOLANT_TEMP = 291504897; /** * Engine oil level * The property is protected by the signature permission: * android.car.permission.CAR_ENGINE_DETAILED. */ @RequiresPermission(Car.PERMISSION_CAR_ENGINE_DETAILED) public static final int ENGINE_OIL_LEVEL = 289407747; /** * Temperature of engine oil in celsius. * The property is protected by the signature permission: * android.car.permission.CAR_ENGINE_DETAILED. */ @RequiresPermission(Car.PERMISSION_CAR_ENGINE_DETAILED) public static final int ENGINE_OIL_TEMP = 291504900; /** * Engine rpm * The property is protected by the signature permission: * android.car.permission.CAR_ENGINE_DETAILED. */ @RequiresPermission(Car.PERMISSION_CAR_ENGINE_DETAILED) public static final int ENGINE_RPM = 291504901; /** * Reports wheel ticks. * *

* *

The first element in the array is a reset count. A reset indicates * previous tick counts are not comparable with this and future ones. Some * sort of discontinuity in tick counting has occurred. * *

The next four elements represent ticks for individual wheels in the * following order: front left, front right, rear right, rear left. All * tick counts are cumulative. Tick counts increment when the vehicle * moves forward, and decrement when vehicles moves in reverse. The ticks * should be reset to 0 when the vehicle is started by the user. * *

* *

configArray is used to indicate the micrometers-per-wheel-tick values and * which wheels are supported. Each micrometers-per-wheel-tick value is static (i.e. will not * update based on wheel's status) and a best approximation. For example, if a vehicle has * multiple rim/tire size options, the micrometers-per-wheel-tick values are set to those for * the typically expected rim/tire size. configArray is set as follows: * *

* *

NOTE: If a wheel is not supported, its value is always 0. * *

Requires permission: {@link Car#PERMISSION_SPEED}. */ @RequiresPermission(Car.PERMISSION_SPEED) public static final int WHEEL_TICK = 290521862; /** * Fuel remaining in the vehicle in milliliters. * *

Property Config: *

* *

Required Permissions: *

*/ @RequiresPermission(Car.PERMISSION_ENERGY) public static final int FUEL_LEVEL = 291504903; /** * Fuel door open. * *

Property Config: *

* *

Required Permissions: *

*/ @RequiresPermission.Read(@RequiresPermission(Car.PERMISSION_ENERGY_PORTS)) @RequiresPermission.Write(@RequiresPermission(Car.PERMISSION_CONTROL_ENERGY_PORTS)) public static final int FUEL_DOOR_OPEN = 287310600; /** * EV battery level in watt-hours (Wh), if EV or hybrid. * *

Property Config: *

* *

Required Permissions: *

*/ @RequiresPermission(Car.PERMISSION_ENERGY) public static final int EV_BATTERY_LEVEL = 291504905; /** * EV charge port open. * *

Property Config: *

* *

Required Permissions: *

*/ @RequiresPermission.Read(@RequiresPermission(Car.PERMISSION_ENERGY_PORTS)) @RequiresPermission.Write(@RequiresPermission(Car.PERMISSION_CONTROL_ENERGY_PORTS)) public static final int EV_CHARGE_PORT_OPEN = 287310602; /** * EV charge port connected. * *

Property Config: *

* *

Required Permissions: *

*/ @RequiresPermission(Car.PERMISSION_ENERGY_PORTS) public static final int EV_CHARGE_PORT_CONNECTED = 287310603; /** * EV instantaneous charge rate in milliwatts. * *

Positive rate indicates battery is being charged, and Negative rate indicates battery * being discharged. * *

Property Config: *

* *

Required Permissions: *

*/ @RequiresPermission(Car.PERMISSION_ENERGY) public static final int EV_BATTERY_INSTANTANEOUS_CHARGE_RATE = 291504908; /** * Range remaining in meters. * *

Range remaining accounts for all energy sources in a vehicle. For example, a hybrid car's * range will be the sum of the ranges based on fuel and battery. * *

Property Config: *

* *

Required Permissions: *

*/ @RequiresPermission.Read(@RequiresPermission(Car.PERMISSION_ENERGY)) @RequiresPermission.Write(@RequiresPermission(Car.PERMISSION_ADJUST_RANGE_REMAINING)) public static final int RANGE_REMAINING = 291504904; /** * Tire pressure in kilopascals. * * min/max value indicates tire pressure sensor range. Each tire will have a separate min/max * value denoted by its areaConfig.areaId. * The property is protected by the signature permission: android.car.permission.CAR_TIRES. */ @RequiresPermission(Car.PERMISSION_TIRES) public static final int TIRE_PRESSURE = 392168201; /** * Critically low tire pressure * *

This property indicates the critically low pressure threshold for each tire. It * indicates when it is time for tires to be replaced or fixed. The value * must be less than or equal to minFloatValue in {@link VehiclePropertyIds#TIRE_PRESSURE}. *

Minimum and maximum property values * (that is, {@code minFloatValue}, {@code maxFloatValue}) are not applicable to this property. */ @RequiresPermission(Car.PERMISSION_TIRES) public static final int CRITICALLY_LOW_TIRE_PRESSURE = 392168202; /** * Currently selected gear by user. * *

* *

See {@link VehicleGear} for gear value enum. * *

configArray represents the list of supported gears for the vehicle. For example, * configArray for an EV vehicle is set as follows: * *

* *

Example automatic transmission configArray: * *

* *

Example manual transmission configArray: * *

* *

Requires permission: {@link Car#PERMISSION_POWERTRAIN}. */ @RequiresPermission(Car.PERMISSION_POWERTRAIN) public static final int GEAR_SELECTION = 289408000; /** * Vehicle transmission's current {@link VehicleGear}. * *

* *

{@code CURRENT_GEAR}'s value may not match that of {@link * VehiclePropertyIds#GEAR_SELECTION}. For example, if the {@link * VehiclePropertyIds#GEAR_SELECTION} is {@link VehicleGear#GEAR_DRIVE} in a vehicle with an * automatic transmission, the {@code CURRENT_GEAR} will be one of {@link * VehicleGear#GEAR_FIRST}, {@link VehicleGear#GEAR_SECOND}, etc, which reflects the actual gear * the transmission is currently running in. * *

configArray represents the list of supported {@link VehicleGear}s for {@code * CURRENT_GEAR}. For example, the configArray for an EV vehicle is set as follows: * *

* *

Example automatic transmission configArray: * *

* *

Example manual transmission configArray: * *

* *

Requires permission: {@link Car#PERMISSION_POWERTRAIN}. */ @RequiresPermission(Car.PERMISSION_POWERTRAIN) public static final int CURRENT_GEAR = 289408001; /** * Parking brake state. * *

* *

Requires permission: {@link Car#PERMISSION_POWERTRAIN}. */ @RequiresPermission(Car.PERMISSION_POWERTRAIN) public static final int PARKING_BRAKE_ON = 287310850; /** * Auto-apply parking brake. * *

* *

Requires permission: {@link Car#PERMISSION_POWERTRAIN}. */ @RequiresPermission(Car.PERMISSION_POWERTRAIN) public static final int PARKING_BRAKE_AUTO_APPLY = 287310851; /** * Warning for fuel low level. * *

{@code FUEL_LEVEL_LOW} corresponds to the low fuel warning on the dashboard. Once {@code * FUEL_LEVEL_LOW} is set, it should not be cleared until more fuel is added to the vehicle. * This property may take into account all fuel sources for a vehicle - for example: *

* *

Property Config: *

* *

Required Permissions: *

*/ @RequiresPermission(Car.PERMISSION_ENERGY) public static final int FUEL_LEVEL_LOW = 287310853; /** * Night mode. * * * *

True indicates that the night mode sensor has detected that the car cabin environment has * low light. * *

Requires permission: {@link Car#PERMISSION_EXTERIOR_ENVIRONMENT}. */ @RequiresPermission(Car.PERMISSION_EXTERIOR_ENVIRONMENT) public static final int NIGHT_MODE = 287310855; /** * State of the vehicles turn signals * The property is protected by the signature permission: * android.car.permission.CAR_EXTERIOR_LIGHTS . */ @RequiresPermission(Car.PERMISSION_EXTERIOR_LIGHTS) public static final int TURN_SIGNAL_STATE = 289408008; /** * Vehicle's ignition state. * *

The property value can be one of: *