AutoApi.VehicleInformationState (auto_api v13.2.0) View Source

VehicleInformation 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

build_date() :: DateTime.t()

Specs

colour_name() :: String.t()

Specs

country_code() :: String.t()

Specs

data_quality() :: :no_data | :up_to_date | :almost_up_to_date | :out_of_date

Specs

display_unit() :: :km | :miles

Specs

drive() :: :fwd | :rwd | :four_wd | :awd
Link to this type

driver_seat_location()

View Source

Specs

driver_seat_location() :: :left | :right | :center

Specs

equipments() :: String.t()
Link to this type

extra_equipment_codes()

View Source

Specs

extra_equipment_codes() :: String.t()

Specs

gearbox() :: :manual | :automatic | :semi_automatic

Specs

language() :: String.t()
Link to this type

last_data_transfer_date()

View Source

Specs

last_data_transfer_date() :: DateTime.t()

Specs

license_plate() :: String.t()

Specs

model_key() :: String.t()

Specs

model_name() :: String.t()

Specs

model_year() :: integer()

Specs

name() :: String.t()

Specs

nonce() :: binary()

Specs

number_of_doors() :: integer()

Specs

number_of_seats() :: integer()

Specs

sales_designation() :: String.t()

Specs

series() :: String.t()

Specs

t() :: %AutoApi.VehicleInformationState{
  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
    ),
  build_date: AutoApi.State.property(DateTime.t()),
  colour_name: AutoApi.State.property(String.t()),
  country_code: AutoApi.State.property(String.t()),
  data_quality:
    AutoApi.State.property(
      :no_data
      | :up_to_date
      | :almost_up_to_date
      | :out_of_date
    ),
  display_unit: AutoApi.State.property(:km | :miles),
  drive: AutoApi.State.property(:fwd | :rwd | :four_wd | :awd),
  driver_seat_location: AutoApi.State.property(:left | :right | :center),
  engine_max_torque: AutoApi.State.property(AutoApi.UnitType.torque()),
  engine_volume: AutoApi.State.property(AutoApi.UnitType.volume()),
  equipments: AutoApi.State.multiple_property(String.t()),
  extra_equipment_codes: AutoApi.State.multiple_property(String.t()),
  fuel_tank_capacity: AutoApi.State.property(AutoApi.UnitType.volume()),
  gearbox: AutoApi.State.property(:manual | :automatic | :semi_automatic),
  language: AutoApi.State.property(String.t()),
  last_data_transfer_date: AutoApi.State.property(DateTime.t()),
  license_plate: AutoApi.State.property(String.t()),
  model_key: AutoApi.State.property(String.t()),
  model_name: AutoApi.State.property(String.t()),
  model_year: AutoApi.State.property(integer()),
  name: AutoApi.State.property(String.t()),
  nonce: AutoApi.State.property(binary()),
  number_of_doors: AutoApi.State.property(integer()),
  number_of_seats: AutoApi.State.property(integer()),
  power: AutoApi.State.property(AutoApi.UnitType.power()),
  power_in_kw: AutoApi.State.property(AutoApi.UnitType.power()),
  powertrain: AutoApi.State.property(AutoApi.CustomType.engine_type()),
  powertrain_secondary:
    AutoApi.State.property(AutoApi.CustomType.engine_type()),
  sales_designation: AutoApi.State.property(String.t()),
  series: AutoApi.State.property(String.t()),
  time_zone: AutoApi.State.property(:wintertime | :summertime | :utc | :manual),
  timeformat: AutoApi.State.property(:twelve_h | :twenty_four_h),
  timestamp: AutoApi.State.property(DateTime.t()),
  vehicle_mass: AutoApi.State.property(AutoApi.UnitType.mass()),
  vehicle_signature: AutoApi.State.property(binary()),
  vin: AutoApi.State.property(String.t())
}

Specs

time_zone() :: :wintertime | :summertime | :utc | :manual

Specs

timeformat() :: :twelve_h | :twenty_four_h

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

from_bin(binary()) :: t()

Build state based on binary value

iex> bin = <<4, 0, 13, 1, 0, 10, 72, 77, 32, 67, 111, 110, 99, 101, 112, 116>> iex> AutoApi.VehicleInformationState.from_bin(bin) %AutoApi.VehicleInformationState{name: %AutoApi.Property{data: "HM Concept"}}

Link to this function

put(state, property, property_component_or_params)

View Source

Specs

put(struct(), atom(), AutoApi.Property.t() | keyword() | map()) :: struct()

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

to_bin(t()) :: binary()

Parse state to bin

iex> state = %AutoApi.VehicleInformationState{name: %AutoApi.Property{data: "HM Concept"}} iex> AutoApi.VehicleInformationState.to_bin(state) <<4, 0, 13, 1, 0, 10, 72, 77, 32, 67, 111, 110, 99, 101, 112, 116>>