AutoApi.WiFiCapability (auto_api v13.2.0) View Source

Basic settings for WiFi Capability

iex> alias AutoApi.WiFiCapability, as: W
iex> W.identifier
<<0x00, 0x59>>
iex> W.name
:wi_fi
iex> W.description
"Wi-Fi"
iex> length(W.properties)
10
iex> List.first(W.properties)
{1, :status}

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: Wi-Fi

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

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

Returns capability's unique name: wi_fi

Returns properties under Wi-Fi

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: Wi-Fi

Specs

identifier() :: binary()

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

Specs

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

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

Example

iex> AutoApi.WiFiCapability.multiple?(:status)
false

Specs

name() :: atom()

Returns capability's unique name: wi_fi

Specs

properties() :: [tuple()]

Returns properties under Wi-Fi:

[{0x1, :status}, {0x2, :network_connected}, {0x3, :network_ssid}, {0x4, :network_security}, {0x5, :password}, {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.WiFiCapability.property_id(:status)
1

Specs

property_name(integer()) :: atom()

Returns the name of a property given its ID.

Example

iex> AutoApi.WiFiCapability.property_name(1)
:status

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.WiFiCapability.setters()
[connect_to_network: {[:network_ssid, :network_security], [:password], []}, forget_network: {[:network_ssid], [], []}, enable_disable_wi_fi: {[:status], [], []}]

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]