DefaultVehicleProvider

class DefaultVehicleProvider(vehicle: Vehicle = Vehicle.Car(combustionEngine = CombustionEngine())) : VehicleProvider

Responsible for control, access and notification of the vehicle state.

Parameters

vehicle

Used for setting the initial state. Default value is an combustion engine non-commercial car.

Important: This is a Public Preview API. It may be changed or removed at any time.

Constructors

Link copied to clipboard
constructor(vehicle: Vehicle = Vehicle.Car(combustionEngine = CombustionEngine()))

Properties

Link copied to clipboard
open override val vehicleSnapshot: Vehicle

Snapshot of the current vehicle state.

Functions

Link copied to clipboard
open override fun addVehicleUpdatedListener(vehicleUpdatedListener: VehicleUpdatedListener)

Adds an VehicleUpdatedListener which will be notified about any vehicle update.

open override fun addVehicleUpdatedListener(vehicleUpdatedListener: VehicleUpdatedListener, vehicleUpdateOptions: List<VehicleUpdateOption>)

Adds an VehicleUpdatedListener which will be notified when specific vehicle parameters are updated.

Link copied to clipboard
open override fun removeVehicleUpdatedListener(vehicleUpdatedListener: VehicleUpdatedListener)

Removes the vehicle update listener.

Link copied to clipboard
fun setVehicle(vehicle: Vehicle)

Sets the vehicle.

Link copied to clipboard
fun updateVehicleState(updatedParameters: List<VehicleParameter>)

Updates the vehicle state.