The VehiclePropertyDataSource extends the Kanzi DataSource to expose the Android CarPropertyManager properties. More...
Inherits DataSource.
Public Member Functions | |
void | close () |
Close the object, and release resources. | |
DataObject | getData () |
Retrieves the root object of the underlying data tree. More... | |
Static Public Member Functions | |
static< T extends VehiclePropertyDataSource > ObjectRef< T > | create (Domain domain, String name) |
Creates a VehiclePropertyDataSource. More... | |
Static Public Attributes | |
static final Metaclass | metaclass = new Metaclass("Kanzi.VehiclePropertyDataSource") |
The Metaclass for the class. | |
Protected Member Functions | |
VehiclePropertyDataSource (Domain domain, long handle, Metaclass metaclass) | |
Constructs the VehiclePropertyDataSource. More... | |
void | addConfiguration (String name, int propertyId, int areaId, VehiclePropertyDataType type) |
Adds a configuration item. More... | |
void | initialize () |
Initialize the VehiclePropertyDataSource. More... | |
void | loadConfiguration () |
Loads the configuration used to define what properties are associated with the data source. More... | |
The VehiclePropertyDataSource extends the Kanzi DataSource to expose the Android CarPropertyManager properties.
In a Kanzi application you can bind to the data source, update and access properties, and get information about the changes that happen over time.
You can configure the functionality by extending the class and overriding the loadConfiguration() method.
|
protected |
Constructs the VehiclePropertyDataSource.
domain | UI Domain to contain this object. |
handle | The native handle for the VehiclePropertyDataSource. |
metaclass | The metaclass for this object. |
|
protected |
Adds a configuration item.
You must call this method during the data source initialization inside the loadConfiguration() method.
name | The name of the property. This is the period delimited path to the DataObject within the DataSource. |
propertyId | The property id used by the Android CarPropertyManager. |
areaId | The area id used by the Android CarPropertyManager. |
type | The data type for the property. |
|
static |
Creates a VehiclePropertyDataSource.
domain | UI Domain to contain this object. |
name | The name of the VehiclePropertyDataSource |
DataObject getData | ( | ) |
Retrieves the root object of the underlying data tree.
|
protected |
Initialize the VehiclePropertyDataSource.
Configures and constructs the DataObject tree.
|
protected |
Loads the configuration used to define what properties are associated with the data source.
By default, only a selection of HVAC controls are configured, override this method to customize the data source via the addConfiguration(String, int, int, VehiclePropertyDataType) method.