Subscription

public final class Subscription
extends Object

java.lang.Object
   ↳ android.car.hardware.property.Subscription


Represents the subscription data to CarPropertyManager#subscribePropertyEvents. To create a Subscription use Subscription.Builder.

Summary

Nested classes

class Subscription.Builder

Builder for Subscription 

Public methods

int[] getAreaIds()

Gets all the areaIds added in the Subscription.Builder object.

int getPropertyId()

Gets the propertyId set in the Subscription.Builder object.

float getResolution()

Gets the resolution set in the Subscription.Builder object.

float getUpdateRateFast()

Gets the CarPropertyManager#SENSOR_RATE_FAST which is 10hz.

float getUpdateRateFastest()

Gets the CarPropertyManager#SENSOR_RATE_FASTEST which is 100hz.

float getUpdateRateHz()

Gets the updateRateHz set in the Subscription.Builder object.

float getUpdateRateNormal()

Gets the CarPropertyManager#SENSOR_RATE_NORMAL which is 1hz.

float getUpdateRateUi()

Gets the CarPropertyManager#SENSOR_RATE_UI which is 5hz.

boolean isVariableUpdateRateEnabled()

Gets the variable update rate enabled boolean set in the Subscription.Builder object.

Inherited methods

Public methods

getAreaIds

public int[] getAreaIds ()

Gets all the areaIds added in the Subscription.Builder object. This will return an empty array if no particular areaIds were added specifically, which means that the client wants to subscribe to all possible area IDs.

Returns
int[] The areaIds to subscribe to, empty array means subscribing to all area IDs.

getPropertyId

public int getPropertyId ()

Gets the propertyId set in the Subscription.Builder object.

Returns
int The propertyId to subscribe to

getResolution

public float getResolution ()

Gets the resolution set in the Subscription.Builder object.

Returns
float the resolution to subscribe to

getUpdateRateFast

public float getUpdateRateFast ()

Gets the CarPropertyManager#SENSOR_RATE_FAST which is 10hz.

Returns
float CarPropertyManager#SENSOR_RATE_FAST

getUpdateRateFastest

public float getUpdateRateFastest ()

Gets the CarPropertyManager#SENSOR_RATE_FASTEST which is 100hz.

Returns
float CarPropertyManager#SENSOR_RATE_FASTEST

getUpdateRateHz

public float getUpdateRateHz ()

Gets the updateRateHz set in the Subscription.Builder object.

Returns
float The update rate to subscribe to

getUpdateRateNormal

public float getUpdateRateNormal ()

Gets the CarPropertyManager#SENSOR_RATE_NORMAL which is 1hz.

Returns
float CarPropertyManager#SENSOR_RATE_NORMAL

getUpdateRateUi

public float getUpdateRateUi ()

Gets the CarPropertyManager#SENSOR_RATE_UI which is 5hz.

Returns
float CarPropertyManager#SENSOR_RATE_UI

isVariableUpdateRateEnabled

public boolean isVariableUpdateRateEnabled ()

Gets the variable update rate enabled boolean set in the Subscription.Builder object.

Returns
boolean whether variable update rate is enabled.