AutoApi.ParkingBrakeCapability (auto_api v13.2.0) View Source
Basic settings for ParkingBrake Capability
iex> alias AutoApi.ParkingBrakeCapability, as: P
iex> P.identifier
<<0x00, 0x58>>
iex> P.name
:parking_brake
iex> P.description
"Parking Brake"
iex> length(P.properties)
6
iex> List.first(P.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: Parking Brake
Retunrs capability's identifier: <<0x0, 0x58>>
Returns whether the property is multiple, that is if it can contain multiple values.
Returns capability's unique name: parking_brake
Returns properties under Parking Brake
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
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: Parking Brake
Specs
identifier() :: binary()
Retunrs capability's identifier: <<0x0, 0x58>>
Specs
Returns whether the property is multiple, that is if it can contain multiple values.
Example
iex> AutoApi.ParkingBrakeCapability.multiple?(:status)
false
Specs
name() :: atom()
Returns capability's unique name: parking_brake
Specs
properties() :: [tuple()]
Returns properties under Parking Brake:
[{0x1, :status}, {0xA0, :nonce}, {0xA1, :vehicle_signature}, {0xA2, :timestamp}, {0xA3, :vin}, {0xA4, :brand}]
Specs
Returns the ID of a property given its name.
Example
iex> AutoApi.ParkingBrakeCapability.property_id(:status)
1
Specs
Returns the name of a property given its ID.
Example
iex> AutoApi.ParkingBrakeCapability.property_name(1)
:status
Specs
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:
- mandatory properties
- optional properties
- constants
Example
iex> AutoApi.ParkingBrakeCapability.setters()
[set_parking_brake: {[: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]