Vehicle information

State

Powertrain

Declaration

getPowertrain()

Discussion

Type of the (primary) powertrain

Example

val state:VehicleInformation.State
assertTrue(state.powertrain.value == EngineType.ALL_ELECTRIC)
// Powertrain is all electric

Model name

Declaration

getModelName()

Discussion

The vehicle model name

Example

val state:VehicleInformation.State
assertTrue(state.modelName.value == "Type X")
// Model name is 'Type X'

Name

Declaration

getName()

Discussion

The vehicle name (nickname)

Example

val state:VehicleInformation.State
assertTrue(state.name.value == "Speedy")
// Name of the vehicle is 'Speedy'

License plate

Declaration

getLicensePlate()

Discussion

The license plate number

Example

val state:VehicleInformation.State
assertTrue(state.licensePlate.value == "ABC123")
// Licence plate number is 'ABC123'

Sales designation

Declaration

getSalesDesignation()

Discussion

The sales designation of the model

Example

val state:VehicleInformation.State
assertTrue(state.salesDesignation.value == "Package+")
// Sales designation is 'Package+'

Model year

Declaration

getModelYear()

Discussion

The vehicle model manufacturing year number

Example

val state:VehicleInformation.State
assertTrue(state.modelYear.value == 2019)
// Vehicle manufacturing year is 2019

Colour name

Declaration

getColourName()

Discussion

The colour name

Example

val state:VehicleInformation.State
assertTrue(state.colourName.value == "Estoril Blau")
// Colour is named 'Estoril Blau'

Power in kw

Declaration

getPowerInKW()

Discussion

The power of the vehicle

Example

val state:VehicleInformation.State
assertTrue(state.powerInKW.value?.value == 220.0)
assertTrue(state.powerInKW.value?.unit == Power.Unit.KILOWATTS)
// Vehicle has 220.0kW of power

Number of doors

Declaration

getNumberOfDoors()

Discussion

The number of doors

Example

val state:VehicleInformation.State
assertTrue(state.numberOfDoors.value == 5)
// Vehicle has 5 doors

Number of seats

Declaration

getNumberOfSeats()

Discussion

The number of seats

Example

val state:VehicleInformation.State
assertTrue(state.numberOfSeats.value == 5)
// Vehicle has 5 seats

Engine volume

Declaration

getEngineVolume()

Discussion

The engine volume displacement

Example

val state:VehicleInformation.State
assertTrue(state.engineVolume.value?.value == 2.5)
assertTrue(state.engineVolume.value?.unit == Volume.Unit.LITERS)
// Engine volume is 2.5 L

Engine max torque

Declaration

getEngineMaxTorque()

Discussion

The maximum engine torque

Example

val state:VehicleInformation.State
assertTrue(state.engineMaxTorque.value?.value == 245.0)
assertTrue(state.engineMaxTorque.value?.unit == Torque.Unit.NEWTON_METERS)
// Engine maximum torque is 245.0Nm

Gearbox

Declaration

getGearbox()

Example

val state:VehicleInformation.State
assertTrue(state.gearbox.value == VehicleInformation.Gearbox.AUTOMATIC)
// Vehicle has an automatic gearbox

Display unit

Declaration

getDisplayUnit()

Example

val state:VehicleInformation.State
assertTrue(state.displayUnit.value == VehicleInformation.DisplayUnit.KM)
// Vehicle displays values in kilometers

Driver seat location

Declaration

getDriverSeatLocation()

Example

val state:VehicleInformation.State
assertTrue(state.driverSeatLocation.value == VehicleInformation.DriverSeatLocation.LEFT)
// Driver seat is located on the left

Equipments

Declaration

getEquipments()

Discussion

Names of equipment the vehicle is equipped with

Example

val state:VehicleInformation.State
assertTrue(state.equipments[0].value == "Parking sensors")
// Parking sensors are equipped (installed)

Power

Declaration

getPower()

Discussion

The power of the vehicle

Example

val state:VehicleInformation.State
assertTrue(state.power.value?.value == 220.0)
assertTrue(state.power.value?.unit == Power.Unit.KILOWATTS)
// Vehicle has 220kW of power

Language

Declaration

getLanguage()

Discussion

The language on headunit

Example

val state:VehicleInformation.State
assertTrue(state.language.value == "estonian")
// Headunit is in estonian language

Timeformat

Declaration

getTimeformat()

Discussion

The timeformat on headunit

Example

val state:VehicleInformation.State
assertTrue(state.timeformat.value == VehicleInformation.Timeformat.TWENTY_FOUR_H)
// Headunit is using a 24h timeformat

Drive

Declaration

getDrive()

Discussion

Wheels driven by the engine

Example

val state:VehicleInformation.State
assertTrue(state.drive.value == VehicleInformation.Drive.RWD)
// Vehicle has rear-wheel drive

Powertrain secondary

Declaration

getPowertrainSecondary()

Example

val state:VehicleInformation.State
assertTrue(state.powertrainSecondary.value == EngineType.PETROL)
// Secondary powertrain`s type is petrol.

Getters

Get vehicle information

Declaration

public GetVehicleInformation()
public GetVehicleInformation(byte... propertyIdentifiers)            

Example

// get all properties
val getState = GetVehicleInformation()
// get powertrain and modelName properties
val getStateProperties = GetVehicleInformation(0x02, 0x03)