AutoApi.WindscreenState (auto_api v13.2.0) View Source
Windscreen 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
nonce() :: binary()
Specs
t() :: %AutoApi.WindscreenState{ 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 ), nonce: AutoApi.State.property(binary()), timestamp: AutoApi.State.property(DateTime.t()), vehicle_signature: AutoApi.State.property(binary()), vin: AutoApi.State.property(String.t()), windscreen_damage: AutoApi.State.property( :no_impact_detected | :impact_but_no_damage_detected | :damage_smaller_than_1_inch | :damage_larger_than_1_inch ), windscreen_damage_confidence: AutoApi.State.property(AutoApi.CustomType.percentage()), windscreen_damage_detection_time: AutoApi.State.property(DateTime.t()), windscreen_damage_zone: AutoApi.State.property(AutoApi.CustomType.zone()), windscreen_needs_replacement: AutoApi.State.property( :unknown | :no_replacement_needed | :replacement_needed ), windscreen_zone_matrix: AutoApi.State.property(AutoApi.CustomType.zone()), wipers_intensity: AutoApi.State.property(:level_0 | :level_1 | :level_2 | :level_3), wipers_status: AutoApi.State.property(:inactive | :active | :automatic) }
Specs
timestamp() :: DateTime.t()
Specs
vehicle_signature() :: binary()
Specs
vin() :: String.t()
Specs
windscreen_damage() :: :no_impact_detected | :impact_but_no_damage_detected | :damage_smaller_than_1_inch | :damage_larger_than_1_inch
Specs
windscreen_damage_detection_time() :: DateTime.t()
Specs
windscreen_needs_replacement() :: :unknown | :no_replacement_needed | :replacement_needed
Specs
wipers_intensity() :: :level_0 | :level_1 | :level_2 | :level_3
Specs
wipers_status() :: :inactive | :active | :automatic
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, 4, 1, 0, 1, 2>> iex> AutoApi.WindscreenState.from_bin(bin) %AutoApi.WindscreenState{wipers_status: %AutoApi.Property{data: :automatic}}
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.WindscreenState{wipers_status: %AutoApi.Property{data: :automatic}} iex> AutoApi.WindscreenState.to_bin(state) <<1, 0, 4, 1, 0, 1, 2>>