AutoApi.VehicleTimeCapability (auto_api v13.2.0) View Source

Basic settings for Vehicle Time Capability

iex> alias AutoApi.VehicleTimeCapability, as: VT
iex> VT.identifier
<<0x00, 0x50>>
iex> VT.name
:vehicle_time
iex> VT.description
"Vehicle Time"
iex> length(VT.properties)
6
iex> List.first(VT.properties)
{1, :vehicle_time}

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 Time

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

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

Returns capability's unique name: vehicle_time

Returns properties under Vehicle Time

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 Time

Specs

identifier() :: binary()

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

Specs

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

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

Example

iex> AutoApi.VehicleTimeCapability.multiple?(:vehicle_time)
false

Specs

name() :: atom()

Returns capability's unique name: vehicle_time

Specs

properties() :: [tuple()]

Returns properties under Vehicle Time:

[{0x1, :vehicle_time}, {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.VehicleTimeCapability.property_id(:vehicle_time)
1

Specs

property_name(integer()) :: atom()

Returns the name of a property given its ID.

Example

iex> AutoApi.VehicleTimeCapability.property_name(1)
:vehicle_time

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.VehicleTimeCapability.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]