AutoApi.KeyfobPositionState (auto_api v13.2.0) View Source
KeyfobPosition 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
location() :: :out_of_range | :outside_driver_side | :outside_in_front_of_car | :outside_passenger_side | :outside_behind_car | :inside_car | :not_inside
Specs
nonce() :: binary()
Specs
t() :: %AutoApi.KeyfobPositionState{ 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 ), location: AutoApi.State.property( :out_of_range | :outside_driver_side | :outside_in_front_of_car | :outside_passenger_side | :outside_behind_car | :inside_car | :not_inside ), 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> AutoApi.KeyfobPositionState.from_bin(<<1, 4::integer-16, 1, 0, 1, 0>>) %AutoApi.KeyfobPositionState{location: %AutoApi.Property{data: :out_of_range}}
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.KeyfobPositionState{location: %AutoApi.Property{data: :out_of_range}} iex> AutoApi.KeyfobPositionState.to_bin(state) <<1, 4::integer-16, 1, 0, 1, 0>>