CarPropertyValue
public
final
class
CarPropertyValue
extends Object
implements
Parcelable
java.lang.Object | |
↳ | android.car.hardware.CarPropertyValue<T> |
Stores a value for a vehicle property ID and area ID combination.
Client should use android.car.*
types when dealing with property ID, area ID or property
value and MUST NOT use android.hardware.automotive.vehicle.*
types directly.
Summary
Nested classes | |
---|---|
@interface |
CarPropertyValue.PropertyStatus
Value is |
Constants | |
---|---|
int |
STATUS_AVAILABLE
|
int |
STATUS_ERROR
|
int |
STATUS_UNAVAILABLE
|
Inherited constants |
---|
Fields | |
---|---|
public
static
final
Creator<CarPropertyValue> |
CREATOR
|
Public methods | |
---|---|
int
|
describeContents()
|
int
|
getAreaId()
|
int
|
getPropertyId()
|
int
|
getStatus()
|
long
|
getTimestamp()
Returns the timestamp in nanoseconds at which the |
T
|
getValue()
|
void
|
writeToParcel(Parcel dest, int flags)
|
Inherited methods | |
---|---|
Constants
STATUS_AVAILABLE
public static final int STATUS_AVAILABLE
CarPropertyValue
is available.
Constant Value: 0 (0x00000000)
STATUS_ERROR
public static final int STATUS_ERROR
CarPropertyValue
has an error.
Constant Value: 2 (0x00000002)
STATUS_UNAVAILABLE
public static final int STATUS_UNAVAILABLE
CarPropertyValue
is unavailable.
Constant Value: 1 (0x00000001)
Fields
Public methods
getAreaId
public int getAreaId ()
Returns | |
---|---|
int |
Area id of CarPropertyValue , must be one of enums in one of the following
classes:
|
getPropertyId
public int getPropertyId ()
Returns | |
---|---|
int |
Property id of CarPropertyValue , must be one of enums in
VehiclePropertyIds . |
getStatus
public int getStatus ()
Returns | |
---|---|
int |
Status of CarPropertyValue
Value is STATUS_AVAILABLE , STATUS_UNAVAILABLE , or STATUS_ERROR |
getTimestamp
public long getTimestamp ()
Returns the timestamp in nanoseconds at which the CarPropertyValue
happened. For a
given car property, each new CarPropertyValue
should be monotonically increasing
using the same time base as SystemClock.elapsedRealtimeNanos()
.
NOTE: Timestamp should be synchronized with other signals from the platform (e.g.
android.location.Location
and SensorEvent
instances).
Ideally, timestamp synchronization error should be below 1 millisecond.
Returns | |
---|---|
long |
writeToParcel
public void writeToParcel (Parcel dest, int flags)
Parameters | |
---|---|
dest |
Parcel |
flags |
int |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2024-03-23 UTC.