AutoApi.DashboardLightsState (auto_api v13.2.0) View Source
Keeps Dashboard Lights state
Link to this section Summary
Functions
Callback implementation for AutoApi.State.base/0.
Build state based on binary value
Convenience function to build the State properties.
Parse state to bin
Link to this section Types
Specs
brand() :: :unknown | :abarth | :alfaromeo | :alpine | :audi | :bmw | :cadillac | :chevrolet | :chrysler | :citroen | :cupra | :dacia | :dodge | :ds | :fiat | :ford | :honda | :hyundai | :iveco | :jaguar | :jeep | :kia | :lancia | :land_rover | :lexus | :man | :mazda | :mercedes_benz | :mini | :mitsubishi | :nissan | :opel | :peugeot | :porsche | :renault | :seat | :skoda | :smart | :subaru | :toyota | :volkswagen | :volvo_cars | :emulator
Specs
bulb_failures() :: :turn_signal_left | :turn_signal_right | :low_beam | :low_beam_left | :low_beam_right | :high_beam | :high_beam_left | :high_beam_right | :fog_light_front | :fog_light_rear | :stop | :position | :day_running | :trailer_turn | :trailer_turn_left | :trailer_turn_right | :trailer_stop | :trailer_electrical_failure | :multiple
Specs
nonce() :: binary()
Specs
t() :: %AutoApi.DashboardLightsState{
brand:
AutoApi.State.property(
:unknown
| :abarth
| :alfaromeo
| :alpine
| :audi
| :bmw
| :cadillac
| :chevrolet
| :chrysler
| :citroen
| :cupra
| :dacia
| :dodge
| :ds
| :fiat
| :ford
| :honda
| :hyundai
| :iveco
| :jaguar
| :jeep
| :kia
| :lancia
| :land_rover
| :lexus
| :man
| :mazda
| :mercedes_benz
| :mini
| :mitsubishi
| :nissan
| :opel
| :peugeot
| :porsche
| :renault
| :seat
| :skoda
| :smart
| :subaru
| :toyota
| :volkswagen
| :volvo_cars
| :emulator
),
bulb_failures:
AutoApi.State.multiple_property(
:turn_signal_left
| :turn_signal_right
| :low_beam
| :low_beam_left
| :low_beam_right
| :high_beam
| :high_beam_left
| :high_beam_right
| :fog_light_front
| :fog_light_rear
| :stop
| :position
| :day_running
| :trailer_turn
| :trailer_turn_left
| :trailer_turn_right
| :trailer_stop
| :trailer_electrical_failure
| :multiple
),
dashboard_lights:
AutoApi.State.multiple_property(AutoApi.CustomType.dashboard_light()),
nonce: AutoApi.State.property(binary()),
timestamp: AutoApi.State.property(DateTime.t()),
vehicle_signature: AutoApi.State.property(binary()),
vin: AutoApi.State.property(String.t())
}
Specs
timestamp() :: DateTime.t()
Specs
vehicle_signature() :: binary()
Specs
vin() :: String.t()
Link to this section Functions
Specs
base() :: t()
Callback implementation for AutoApi.State.base/0.
Specs
Build state based on binary value
iex> bin = <<1, 0, 5, 1, 0, 2, 1, 1>> iex> AutoApi.DashboardLightsState.from_bin(bin) %AutoApi.DashboardLightsState{dashboard_lights: [%AutoApi.Property{data: %{name: :low_beam, state: :on}}]}
Specs
Convenience function to build the State properties.
See AutoApi.State.put/3.
Examples
iex> state_base = AutoApi.DiagnosticsState.base()
iex> odometer = %{value: 10_921, unit: :kilometers}
iex> state_1 = AutoApi.DiagnosticsState.put(state_base, :odometer, data: odometer)
iex> state_2 = AutoApi.State.put(state_base, :odometer, data: odometer)
iex> state_1 === state_2
true
Specs
Parse state to bin
iex> state = %AutoApi.DashboardLightsState{dashboard_lights: [%AutoApi.Property{data: %{name: :low_beam, state: :off}}]} iex> AutoApi.DashboardLightsState.to_bin(state) <<1, 0, 5, 1, 0, 2, 1, 0>>