CarPropertyConfig
public
final
class
CarPropertyConfig
extends Object
implements
Parcelable
java.lang.Object | |
↳ | android.car.hardware.CarPropertyConfig<T> |
Represents general information about car property such as data type and min/max ranges for car areas (if applicable). This class supposed to be immutable, parcelable and could be passed over.
Summary
Constants | |
---|---|
int |
VEHICLE_PROPERTY_ACCESS_NONE
Property Access Unknown |
int |
VEHICLE_PROPERTY_ACCESS_READ
The property is readable |
int |
VEHICLE_PROPERTY_ACCESS_READ_WRITE
The property is readable and writable |
int |
VEHICLE_PROPERTY_ACCESS_WRITE
The property is writable |
int |
VEHICLE_PROPERTY_CHANGE_MODE_CONTINUOUS
Properties of this type change continuously. |
int |
VEHICLE_PROPERTY_CHANGE_MODE_ONCHANGE
Properties of this type must report when there is a change. |
int |
VEHICLE_PROPERTY_CHANGE_MODE_STATIC
Properties of this type must never be changed. |
Inherited constants |
---|
Fields | |
---|---|
public
static
final
Creator<CarPropertyConfig> |
CREATOR
|
Public methods | |
---|---|
int
|
describeContents()
|
int
|
getAccess()
Return the access type of the car property. |
int[]
|
getAreaIds()
|
int
|
getAreaType()
Return the area type of the car property. |
int
|
getChangeMode()
Return the change mode of the car property. |
List<Integer>
|
getConfigArray()
|
float
|
getMaxSampleRate()
|
T
|
getMaxValue(int areaId)
|
T
|
getMaxValue()
|
float
|
getMinSampleRate()
|
T
|
getMinValue()
|
T
|
getMinValue(int areaId)
|
int
|
getPropertyId()
|
Class<T>
|
getPropertyType()
Returns the value type of the vehicle property. |
boolean
|
isGlobalProperty()
|
void
|
writeToParcel(Parcel dest, int flags)
|
Inherited methods | |
---|---|
Constants
VEHICLE_PROPERTY_ACCESS_NONE
public static final int VEHICLE_PROPERTY_ACCESS_NONE
Property Access Unknown
Constant Value: 0 (0x00000000)
VEHICLE_PROPERTY_ACCESS_READ
public static final int VEHICLE_PROPERTY_ACCESS_READ
The property is readable
Constant Value: 1 (0x00000001)
VEHICLE_PROPERTY_ACCESS_READ_WRITE
public static final int VEHICLE_PROPERTY_ACCESS_READ_WRITE
The property is readable and writable
Constant Value: 3 (0x00000003)
VEHICLE_PROPERTY_ACCESS_WRITE
public static final int VEHICLE_PROPERTY_ACCESS_WRITE
The property is writable
Constant Value: 2 (0x00000002)
VEHICLE_PROPERTY_CHANGE_MODE_CONTINUOUS
public static final int VEHICLE_PROPERTY_CHANGE_MODE_CONTINUOUS
Properties of this type change continuously.
Constant Value: 2 (0x00000002)
VEHICLE_PROPERTY_CHANGE_MODE_ONCHANGE
public static final int VEHICLE_PROPERTY_CHANGE_MODE_ONCHANGE
Properties of this type must report when there is a change.
Constant Value: 1 (0x00000001)
VEHICLE_PROPERTY_CHANGE_MODE_STATIC
public static final int VEHICLE_PROPERTY_CHANGE_MODE_STATIC
Properties of this type must never be changed.
Constant Value: 0 (0x00000000)
Fields
Public methods
getAccess
public int getAccess ()
Return the access type of the car property.
The access type could be one of the following:
CarPropertyConfig#VEHICLE_PROPERTY_ACCESS_NONE
CarPropertyConfig#VEHICLE_PROPERTY_ACCESS_READ
CarPropertyConfig#VEHICLE_PROPERTY_ACCESS_WRITE
CarPropertyConfig#VEHICLE_PROPERTY_ACCESS_READ_WRITE
Returns | |
---|---|
int |
the access type of the car property.
Value is VEHICLE_PROPERTY_ACCESS_NONE , VEHICLE_PROPERTY_ACCESS_READ , VEHICLE_PROPERTY_ACCESS_WRITE , or VEHICLE_PROPERTY_ACCESS_READ_WRITE |
getAreaIds
public int[] getAreaIds ()
Returns | |
---|---|
int[] |
Array of areaIds. An AreaID is a combination of one or more areas, and is represented using a bitmask of Area enums. Different AreaTypes may not be mixed in a single AreaID. For instance, a window area cannot be combined with a seat area in an AreaID. Rules for mapping a zoned property to AreaIDs: - A property must be mapped to an array of AreaIDs that are impacted when the property value changes. - Each element in the array must represent an AreaID, in which, the property value can only be changed together in all the areas within an AreaID and never independently. That is, when the property value changes in one of the areas in an AreaID in the array, then it must automatically change in all other areas in the AreaID. - The property value must be independently controllable in any two different AreaIDs in the array. - An area must only appear once in the array of AreaIDs. That is, an area must only be part of a single AreaID in the array. |
getAreaType
public int getAreaType ()
Return the area type of the car property.
The area type could be one of the following:
VehicleAreaType#VEHICLE_AREA_TYPE_GLOBAL
VehicleAreaType#VEHICLE_AREA_TYPE_WINDOW
VehicleAreaType#VEHICLE_AREA_TYPE_SEAT
VehicleAreaType#VEHICLE_AREA_TYPE_DOOR
VehicleAreaType#VEHICLE_AREA_TYPE_MIRROR
VehicleAreaType#VEHICLE_AREA_TYPE_WHEEL
Returns | |
---|---|
int |
the area type of the car property.
Value is VehicleAreaType.VEHICLE_AREA_TYPE_GLOBAL , VehicleAreaType.VEHICLE_AREA_TYPE_WINDOW , VehicleAreaType.VEHICLE_AREA_TYPE_SEAT , VehicleAreaType.VEHICLE_AREA_TYPE_DOOR , VehicleAreaType.VEHICLE_AREA_TYPE_MIRROR , or VehicleAreaType.VEHICLE_AREA_TYPE_WHEEL |
getChangeMode
public int getChangeMode ()
Return the change mode of the car property.
The change mode could be one of the following:
CarPropertyConfig#VEHICLE_PROPERTY_CHANGE_MODE_STATIC
CarPropertyConfig#VEHICLE_PROPERTY_CHANGE_MODE_ONCHANGE
CarPropertyConfig#VEHICLE_PROPERTY_CHANGE_MODE_CONTINUOUS
Returns | |
---|---|
int |
the change mode of properties.
Value is VEHICLE_PROPERTY_CHANGE_MODE_STATIC , VEHICLE_PROPERTY_CHANGE_MODE_ONCHANGE , or VEHICLE_PROPERTY_CHANGE_MODE_CONTINUOUS |
getConfigArray
public List<Integer> getConfigArray ()
Returns | |
---|---|
List<Integer> |
Additional configuration parameters. For different properties, configArrays have different information. |
getMaxSampleRate
public float getMaxSampleRate ()
Returns | |
---|---|
float |
Max sample rate in Hz. Must be defined for VehiclePropertyChangeMode::CONTINUOUS return 0 if change mode is not continuous. |
getMaxValue
public T getMaxValue (int areaId)
Returns | |
---|---|
T |
Max value in given areaId. Null if not have max value in given area. |
getMaxValue
public T getMaxValue ()
Returns | |
---|---|
T |
Max value in areaId 0. Null if not have max value. |
getMinSampleRate
public float getMinSampleRate ()
Returns | |
---|---|
float |
Min sample rate in Hz.Must be defined for VehiclePropertyChangeMode::CONTINUOUS return 0 if change mode is not continuous. |
getMinValue
public T getMinValue ()
Returns | |
---|---|
T |
Min value in areaId 0. Null if not have min value. |
getMinValue
public T getMinValue (int areaId)
Returns | |
---|---|
T |
Min value in given areaId. Null if not have min value in given area. |
getPropertyType
public Class<T> getPropertyType ()
Returns the value type of the vehicle property.
The value type could be one of the following:
- Boolean
- Float
- Float[]
- Integer
- Integer[]
- Long
- Long[]
- String
- byte[]
- Object[]
Returns | |
---|---|
Class<T> |
the value type of the vehicle property. |
isGlobalProperty
public boolean isGlobalProperty ()
Returns | |
---|---|
boolean |
true if this property doesn't hold car area-specific configuration. |
writeToParcel
public void writeToParcel (Parcel dest, int flags)
Parameters | |
---|---|
dest |
Parcel |
flags |
int |