Windscreen

State

Wipers status

Declaration

getWipersStatus()

Example

val state:Windscreen.State
assertTrue(state.wipersStatus.value == Windscreen.WipersStatus.AUTOMATIC)
// Windscreen wipers are set to automatic mode

Wipers intensity

Declaration

getWipersIntensity()

Example

val state:Windscreen.State
assertTrue(state.wipersIntensity.value == Windscreen.WipersIntensity.LEVEL_3)
// Wipers are on highest intensity, indicating heavy rain

Windscreen damage

Declaration

getWindscreenDamage()

Example

val state:Windscreen.State
assertTrue(state.windscreenDamage.value == Windscreen.WindscreenDamage.IMPACT_BUT_NO_DAMAGE_DETECTED)
// Windscreen detected an impact, but no damage

Windscreen zone matrix

Declaration

getWindscreenZoneMatrix()

Discussion

Representing the size of the matrix, seen from the inside of the vehicle

Example

val state:Windscreen.State
assertTrue(state.windscreenZoneMatrix.value?.horizontal == 4)
assertTrue(state.windscreenZoneMatrix.value?.vertical == 3)
// Windscreen is divided into a matrix 4 columns horizontally by 3 rows vertically

Windscreen damage zone

Declaration

getWindscreenDamageZone()

Discussion

Representing the position in the zone, seen from the inside of the vehicle (1-based index)

Example

val state:Windscreen.State
assertTrue(state.windscreenDamageZone.value?.horizontal == 1)
assertTrue(state.windscreenDamageZone.value?.vertical == 2)
// Damage is detected in the 1st column from left and the 2nd row from the top

Windscreen needs replacement

Declaration

getWindscreenNeedsReplacement()

Example

val state:Windscreen.State
assertTrue(state.windscreenNeedsReplacement.value == Windscreen.WindscreenNeedsReplacement.NO_REPLACEMENT_NEEDED)
// Windscreen does not need replacement

Windscreen damage confidence

Declaration

getWindscreenDamageConfidence()

Discussion

Confidence of damage detection, 0% if no impact detected

Example

val state:Windscreen.State
assertTrue(state.windscreenDamageConfidence.value == 0.95)
// Damage detected with 95% confidence

Windscreen damage detection time

Declaration

getWindscreenDamageDetectionTime()

Discussion

Windscreen damage detection date

Example

val state:Windscreen.State
assertTrue(dateIsSame(state.windscreenDamageDetectionTime.value, "2017-01-10T16:32:05.000Z"))
// Windscreen damage detected at 10 January 2017 at 16:32:05 UTC

Setters

Set windscreen damage

Declaration

public SetWindscreenDamage(WindscreenDamage windscreenDamage, @Nullable Zone windscreenDamageZone)

Example

val setWindscreenDamage = Windscreen.SetWindscreenDamage(Windscreen.WindscreenDamage.IMPACT_BUT_NO_DAMAGE_DETECTED, Zone(1, 2))    

Set windscreen replacement needed

Declaration

public SetWindscreenReplacementNeeded(WindscreenNeedsReplacement windscreenNeedsReplacement)

Example

val setWindscreenReplacementNeeded = Windscreen.SetWindscreenReplacementNeeded(Windscreen.WindscreenNeedsReplacement.NO_REPLACEMENT_NEEDED)    

Control wipers

Declaration

public ControlWipers(WipersStatus wipersStatus, @Nullable WipersIntensity wipersIntensity)

Example

val controlWipers = Windscreen.ControlWipers(Windscreen.WipersStatus.AUTOMATIC, Windscreen.WipersIntensity.LEVEL_3)    

Getters

Get Windscreen property availability information

Declaration

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

Example

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

Get Windscreen properties

Declaration

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

Example

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