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.
Summary
Nested classes | |
---|---|
@interface |
CarPropertyValue.PropertyStatus
Value is |
Constants | |
---|---|
int |
STATUS_AVAILABLE
CarPropertyValue is available. |
int |
STATUS_ERROR
CarPropertyVale has an error. |
int |
STATUS_UNAVAILABLE
CarPropertyValue is 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 CarPropertyValue happened. |
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
CarPropertyVale 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
getPropertyId
public int getPropertyId ()
Returns | |
---|---|
int |
Property id of CarPropertyValue |
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 ERROR(/SystemClock#elapsedRealtimeNanos())
.
NOTE: Timestamp should be synchronized with other signals from the platform (e.g.
ERROR(/Location)
and ERROR(/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 2023-02-05 UTC.