AutoApi.AdasState (auto_api v13.2.0) View Source
Keeps Adas 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
blind_spot_warning_system_coverage() :: :regular | :trailer
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.AdasState{
alertness_system_status:
AutoApi.State.property(AutoApi.CustomType.active_state()),
automated_parking_brake:
AutoApi.State.property(AutoApi.CustomType.active_state()),
blind_spot_warning_state:
AutoApi.State.property(AutoApi.CustomType.active_state()),
blind_spot_warning_system:
AutoApi.State.property(AutoApi.CustomType.on_off_state()),
blind_spot_warning_system_coverage:
AutoApi.State.property(:regular | :trailer),
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
),
forward_collision_warning_system:
AutoApi.State.property(AutoApi.CustomType.active_state()),
lane_keep_assist_system:
AutoApi.State.property(AutoApi.CustomType.on_off_state()),
lane_keep_assists_states:
AutoApi.State.multiple_property(AutoApi.CustomType.lane_keep_assist_state()),
launch_control: AutoApi.State.property(AutoApi.CustomType.active_state()),
nonce: AutoApi.State.property(binary()),
park_assists:
AutoApi.State.multiple_property(AutoApi.CustomType.park_assist()),
rear_cross_warning_system:
AutoApi.State.property(AutoApi.CustomType.active_state()),
status: AutoApi.State.property(AutoApi.CustomType.on_off_state()),
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, 4, 1, 0, 1, 1>> iex> AutoApi.AdasState.from_bin(bin) %AutoApi.AdasState{status: %AutoApi.Property{data: :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.AdasState{status: %AutoApi.Property{data: :off}} iex> AutoApi.AdasState.to_bin(state) <<1, 0, 4, 1, 0, 1, 0>>