Maintenance

State

Days to next service

Declaration

getDaysToNextService()

Discussion

Time until next servicing of the car

Example

val state:Maintenance.State
assertTrue(state.daysToNextService.value?.value == 501.0)
assertTrue(state.daysToNextService.value?.unit == Duration.Unit.DAYS)
// 501.0 days until next service

Kilometers to next service

Declaration

getKilometersToNextService()

Discussion

The distance until next servicing of the vehicle

Example

val state:Maintenance.State
assertTrue(state.kilometersToNextService.value?.value == 3681.0)
assertTrue(state.kilometersToNextService.value?.unit == Length.Unit.KILOMETERS)
// 3'681km until next service

Cbs reports count

Declaration

getCbsReportsCount()

Discussion

The number of CBS reports

Example

val state:Maintenance.State
assertTrue(state.cbsReportsCount.value == 3)
// Condition Based Service reports count is 3

Months to exhaust inspection

Declaration

getMonthsToExhaustInspection()

Discussion

Time until exhaust inspection

Example

val state:Maintenance.State
assertTrue(state.monthsToExhaustInspection.value?.value == 5.0)
assertTrue(state.monthsToExhaustInspection.value?.unit == Duration.Unit.MONTHS)
// 5 months until exhaust inspection

Teleservice availability

Declaration

getTeleserviceAvailability()

Example

val state:Maintenance.State
assertTrue(state.teleserviceAvailability.value == Maintenance.TeleserviceAvailability.SUCCESSFUL)
// Teleservice is available

Service distance threshold

Declaration

getServiceDistanceThreshold()

Discussion

Distance threshold for service

Example

val state:Maintenance.State
assertTrue(state.serviceDistanceThreshold.value?.value == 5000.0)
assertTrue(state.serviceDistanceThreshold.value?.unit == Length.Unit.KILOMETERS)
// Service distance threshold is 5000.0km

Service time threshold

Declaration

getServiceTimeThreshold()

Discussion

Time threshold for service

Example

val state:Maintenance.State
assertTrue(state.serviceTimeThreshold.value?.value == 4.0)
assertTrue(state.serviceTimeThreshold.value?.unit == Duration.Unit.WEEKS)
// Service time threshold is 4 weeks

Automatic teleservice call date

Declaration

getAutomaticTeleserviceCallDate()

Discussion

Automatic teleservice call date

Example

val state:Maintenance.State
assertTrue(dateIsSame(state.automaticTeleserviceCallDate.value, "2018-11-23T11:33:50.000Z"))
// Automatic teleservice call date is at 23 November 2018 at 11:33:50 UTC

Teleservice battery call date

Declaration

getTeleserviceBatteryCallDate()

Discussion

Teleservice batter call date

Example

val state:Maintenance.State
assertTrue(dateIsSame(state.teleserviceBatteryCallDate.value, "2018-11-23T10:36:50.000Z"))
// Teleservice battery call date is at 23 November 2018 at 10:36:50 GMT

Next inspection date

Declaration

getNextInspectionDate()

Discussion

Next inspection date

Example

val state:Maintenance.State
assertTrue(dateIsSame(state.nextInspectionDate.value, "2018-10-23T14:38:47.000Z"))
// Next inspection date is at 23 October 2018 at 14:38:47 GMT

Condition based services

Declaration

getConditionBasedServices()

Example

val state:Maintenance.State
assertTrue(state.conditionBasedServices[0].value?.year == 2019)
assertTrue(state.conditionBasedServices[0].value?.month == 5)
assertTrue(state.conditionBasedServices[0].value?.id == 3)
assertTrue(state.conditionBasedServices[0].value?.dueStatus == ConditionBasedService.DueStatus.OK)
assertTrue(state.conditionBasedServices[0].value?.text == "Brake fluid")
assertTrue(state.conditionBasedServices[0].value?.description == "Next change at specified date at the latest.")
// Next latest brake fluid change date is 2019 May in a CBS with ID 3 and status 'ok'

Brake fluid change date

Declaration

getBrakeFluidChangeDate()

Discussion

Brake fluid change date

Example

val state:Maintenance.State
assertTrue(dateIsSame(state.brakeFluidChangeDate.value, "2018-12-05T03:22:56.000Z"))
// Brake fluid change date is at 5 December 2018 at 03:22:56 GMT

Time to next service

Declaration

getTimeToNextService()

Discussion

Time until next servicing of the vehicle

Example

val state:Maintenance.State
assertTrue(state.timeToNextService.value?.value == 501.0)
assertTrue(state.timeToNextService.value?.unit == Duration.Unit.DAYS)
// 501.0 days until next service

Distance to next service

Declaration

getDistanceToNextService()

Discussion

The distance until next servicing of the vehicle

Example

val state:Maintenance.State
assertTrue(state.distanceToNextService.value?.value == 3681.0)
assertTrue(state.distanceToNextService.value?.unit == Length.Unit.KILOMETERS)
// 3'681km until next service

Time to exhaust inspection

Declaration

getTimeToExhaustInspection()

Discussion

Time until exhaust inspection

Example

val state:Maintenance.State
assertTrue(state.timeToExhaustInspection.value?.value == 5.0)
assertTrue(state.timeToExhaustInspection.value?.unit == Duration.Unit.MONTHS)
// 5 months until exhaust inspection

Last ecall

Declaration

getLastECall()

Discussion

Date-time of the last eCall

Example

val state:Maintenance.State
assertTrue(dateIsSame(state.lastECall.value, "2018-12-05T03:22:56.000Z"))
// Last eCall happened at 5 December 2018 at 03:22:56 GMT

Distance to next oil service

Declaration

getDistanceToNextOilService()

Discussion

Indicates the remaining distance until the next oil service; if this limit was exceeded, this value indicates the distance that has been driven since then.

Example

val state:Maintenance.State
assertTrue(state.distanceToNextOilService.value?.value == 525.6)
assertTrue(state.distanceToNextOilService.value?.unit == Length.Unit.KILOMETERS)
// Distance to the next oil service is 525.6km

Time to next oil service

Declaration

getTimeToNextOilService()

Discussion

Indicates the time remaining until the next oil service; if this limit was exceeded, this value indicates the time that has passed since then.

Example

val state:Maintenance.State
assertTrue(state.timeToNextOilService.value?.value == 66.8)
assertTrue(state.timeToNextOilService.value?.unit == Duration.Unit.DAYS)
// Time to the next oil service is 66.8 days

Getters

Get Maintenance property availability information

Declaration

public GetStateAvailability()
public GetStateAvailability(byte... propertyIdentifiers)

Example

// get all property availabilities
val getAvailability = GetStateAvailability()
// get daysToNextService and kilometersToNextService property availabilities
val getAvailabilityProperties = GetStateAvailability(0x01, 0x02)

Get Maintenance properties

Declaration

public GetState()
public GetState(byte... propertyIdentifiers)            

Example

// get all properties
val getState = GetState()
// get daysToNextService and kilometersToNextService properties
val getStateProperties = GetState(0x01, 0x02)