Honk horn flash lights
State
Flashers
Declaration
getFlashers()
Example
val state:HonkHornFlashLights.State
assertTrue(state.flashers.value == HonkHornFlashLights.Flashers.LEFT_FLASHER_ACTIVE)
// Left flasher is active
Honk seconds
Declaration
getHonkSeconds()
Discussion
Time to honk the horn
Example
val state:HonkHornFlashLights.State
assertTrue(state.honkSeconds.value?.value == 3.0)
assertTrue(state.honkSeconds.value?.unit == Duration.Unit.SECONDS)
// Honk the horn for 3.0s
Flash times
Declaration
getFlashTimes()
Discussion
Number of times to flash the lights
Example
val state:HonkHornFlashLights.State
assertTrue(state.flashTimes.value == 5)
// Flash the lights 5 times
Emergency flashers state
Declaration
getEmergencyFlashersState()
Example
val state:HonkHornFlashLights.State
assertTrue(state.emergencyFlashersState.value == ActiveState.ACTIVE)
// Emergency flashers are active
Honk time
Declaration
getHonkTime()
Discussion
Time to honk the horn
Example
val state:HonkHornFlashLights.State
assertTrue(state.honkTime.value?.value == 2.0)
assertTrue(state.honkTime.value?.unit == Duration.Unit.SECONDS)
// Honk the horn for 2.0s
Setters
Honk flash
Declaration
public HonkFlash(@Nullable Integer flashTimes, @Nullable Duration honkTime)
Example
val honkFlash = HonkHornFlashLights.HonkFlash(5, Duration(2.0, Duration.Unit.SECONDS))
Activate deactivate emergency flasher
Declaration
public ActivateDeactivateEmergencyFlasher(ActiveState emergencyFlashersState)
Example
val activateDeactivateEmergencyFlasher = HonkHornFlashLights.ActivateDeactivateEmergencyFlasher(ActiveState.ACTIVE)
Getters
Get Honk Horn & Flash Lights property availability information
Declaration
public GetFlashersStateAvailability()
public GetFlashersStateAvailability(byte... propertyIdentifiers)
Example
// get all property availabilities
val getAvailability = GetFlashersStateAvailability()
// get flashers and honkSeconds property availabilities
val getAvailabilityProperties = GetFlashersStateAvailability(0x01, 0x02)
Get flashers state
Declaration
public GetFlashersState()
public GetFlashersState(byte... propertyIdentifiers)
Example
// get all properties
val getState = GetFlashersState()
// get flashers and honkSeconds properties
val getStateProperties = GetFlashersState(0x01, 0x02)