AutoApi.TheftAlarmState (auto_api v13.2.0) View Source
TheftAlarm 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
event_type() :: :idle | :front_left | :front_middle | :front_right | :right | :rear_right | :rear_middle | :rear_left | :left | :unknown
Specs
last_event() :: DateTime.t()
Specs
last_event_level() :: :low | :medium | :high
Specs
last_warning_reason() :: :no_alarm | :basic_alarm | :door_front_left | :door_front_right | :door_rear_left | :door_rear_right | :hood | :trunk | :common_alm_in | :panic | :glovebox | :center_box | :rear_box | :sensor_vta | :its | :its_slv | :tps | :horn | :hold_com | :remote | :unknown | :siren
Specs
nonce() :: binary()
Specs
status() :: :unarmed | :armed | :triggered
Specs
t() :: %AutoApi.TheftAlarmState{
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
),
event_type:
AutoApi.State.property(
:idle
| :front_left
| :front_middle
| :front_right
| :right
| :rear_right
| :rear_middle
| :rear_left
| :left
| :unknown
),
interior_protection_status:
AutoApi.State.property(AutoApi.CustomType.active_selected_state()),
interior_protection_triggered:
AutoApi.State.property(AutoApi.CustomType.triggered()),
last_event: AutoApi.State.property(DateTime.t()),
last_event_level: AutoApi.State.property(:low | :medium | :high),
last_warning_reason:
AutoApi.State.property(
:no_alarm
| :basic_alarm
| :door_front_left
| :door_front_right
| :door_rear_left
| :door_rear_right
| :hood
| :trunk
| :common_alm_in
| :panic
| :glovebox
| :center_box
| :rear_box
| :sensor_vta
| :its
| :its_slv
| :tps
| :horn
| :hold_com
| :remote
| :unknown
| :siren
),
nonce: AutoApi.State.property(binary()),
status: AutoApi.State.property(:unarmed | :armed | :triggered),
timestamp: AutoApi.State.property(DateTime.t()),
tow_protection_status:
AutoApi.State.property(AutoApi.CustomType.active_selected_state()),
tow_protection_triggered:
AutoApi.State.property(AutoApi.CustomType.triggered()),
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, 2>> iex> AutoApi.TheftAlarmState.from_bin(bin) %AutoApi.TheftAlarmState{status: %AutoApi.Property{data: :triggered}}
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.TheftAlarmState{status: %AutoApi.Property{data: :triggered}} iex> AutoApi.TheftAlarmState.to_bin(state) <<1, 0, 4, 1, 0, 1, 2>>