AutoApi.VehicleStatusCapability (auto_api v13.2.0) View Source

Basic settings for Vehicle Status Capability

iex> alias AutoApi.VehicleStatusCapability, as: VS
iex> VS.identifier
<<0x00, 0x11>>
iex> VS.name
:vehicle_status
iex> VS.description
"Vehicle Status"
iex> length(VS.properties)
6
iex> List.first(VS.properties)
{0x99, :states}

Link to this section Summary

Functions

Returns whether the capability requires authorization to be queried

Returns the command module related to this capability

Returns whether the property is deprecated.

Returns capability's description: Vehicle Status

Retunrs capability's identifier: <<0x0, 0x11>>

Returns whether the property is multiple, that is if it can contain multiple values.

Returns capability's unique name: vehicle_status

Returns properties under Vehicle Status

Returns the ID of a property given its name.

Returns the name of a property given its ID.

Returns the list of setters defined for the capability.

Returns the state module related to this capability

Returns which properties are included in the State specification.

Link to this section Functions

Specs

authorization?() :: boolean()

Returns whether the capability requires authorization to be queried

Examples

iex> AutoApi.DiagnosticsCapability.authorization?()
true

iex> AutoApi.HistoricalCapability.authorization?()
false

Specs

command() :: atom()

Returns the command module related to this capability

Specs

deprecated?(atom()) :: boolean()

Returns whether the property is deprecated.

Example

iex> AutoApi.HoodCapability.deprecated?(:lock)
false

iex> AutoApi.DiagnosticsCapability.deprecated?(:mileage)
true

Specs

description() :: String.t()

Returns capability's description: Vehicle Status

Specs

identifier() :: binary()

Retunrs capability's identifier: <<0x0, 0x11>>

Specs

multiple?(atom()) :: boolean()

Returns whether the property is multiple, that is if it can contain multiple values.

Example

iex> AutoApi.VehicleStatusCapability.multiple?(:states)
true

Specs

name() :: atom()

Returns capability's unique name: vehicle_status

Specs

properties() :: [tuple()]

Returns properties under Vehicle Status:

[{0x99, :states}, {0xA0, :nonce}, {0xA1, :vehicle_signature}, {0xA2, :timestamp}, {0xA3, :vin}, {0xA4, :brand}]

Specs

property_id(atom()) :: integer()

Returns the ID of a property given its name.

Example

iex> AutoApi.VehicleStatusCapability.property_id(:states)
153

Specs

property_name(integer()) :: atom()

Returns the name of a property given its ID.

Example

iex> AutoApi.VehicleStatusCapability.property_name(153)
:states

Specs

setters() :: keyword({[atom()], [atom()], keyword(binary())})

Returns the list of setters defined for the capability.

The list is a Keyword with the setter name as a key and as value a tuple with three elements:

  1. mandatory properties
  2. optional properties
  3. constants

Example

iex> AutoApi.VehicleStatusCapability.setters()
[]

Returns the state module related to this capability

Specs

state_properties() :: [atom()]

Returns which properties are included in the State specification.

Universal properties are always included

Examples

iex> AutoApi.SeatsCapability.state_properties()
[:persons_detected, :seatbelts_state, :nonce, :vehicle_signature, :timestamp, :vin, :brand]

iex> AutoApi.WakeUpCapability.state_properties()
[:nonce, :vehicle_signature, :timestamp, :vin, :brand]