AutoApi.MaintenanceCapability (auto_api v13.2.0) View Source
Basic settings for Maintenance Capability
iex> alias AutoApi.MaintenanceCapability, as: M
iex> M.identifier
<<0x00, 0x34>>
iex> M.name
:maintenance
iex> M.description
"Maintenance"
iex> length(M.properties)
40
iex> List.first(M.properties)
{0x01, :days_to_next_service}
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: Maintenance
Retunrs capability's identifier: <<0x0, 0x34>>
Returns whether the property is multiple, that is if it can contain multiple values.
Returns capability's unique name: maintenance
Returns properties under Maintenance
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: Maintenance
Specs
identifier() :: binary()
Retunrs capability's identifier: <<0x0, 0x34>>
Specs
Returns whether the property is multiple, that is if it can contain multiple values.
Example
iex> AutoApi.MaintenanceCapability.multiple?(:days_to_next_service)
false
Specs
name() :: atom()
Returns capability's unique name: maintenance
Specs
properties() :: [tuple()]
Returns properties under Maintenance:
[{0x1, :days_to_next_service}, {0x2, :kilometers_to_next_service}, {0x3, :cbs_reports_count}, {0x4, :months_to_exhaust_inspection}, {0x5, :teleservice_availability}, {0x6, :service_distance_threshold}, {0x7, :service_time_threshold}, {0x8, :automatic_teleservice_call_date}, {0x9, :teleservice_battery_call_date}, {0xA, :next_inspection_date}, {0xB, :condition_based_services}, {0xC, :brake_fluid_change_date}, {0xD, :time_to_next_service}, {0xE, :distance_to_next_service}, {0xF, :time_to_exhaust_inspection}, {0x10, :last_ecall}, {0x11, :distance_to_next_oil_service}, {0x12, :time_to_next_oil_service}, {0x13, :brake_fluid_remaining_distance}, {0x14, :brake_fluid_status}, {0x16, :brakes_service_due_dates}, {0x17, :brakes_service_remaining_distances}, {0x18, :brakes_service_statuses}, {0x19, :drive_in_inspection_date}, {0x1A, :drive_in_inspection_status}, {0x1B, :next_oil_service_date}, {0x1C, :next_inspection_distance_to}, {0x1D, :legal_inspection_date}, {0x1E, :service_status}, {0x1F, :service_date}, {0x20, :inspection_status}, {0x21, :drive_in_inspection_distance_to}, {0x22, :vehicle_check_date}, {0x23, :vehicle_check_status}, {0x24, :vehicle_check_distance_to}, {0xA0, :nonce}, {0xA1, :vehicle_signature}, {0xA2, :timestamp}, {0xA3, :vin}, {0xA4, :brand}]
Specs
Returns the ID of a property given its name.
Example
iex> AutoApi.MaintenanceCapability.property_id(:days_to_next_service)
1
Specs
Returns the name of a property given its ID.
Example
iex> AutoApi.MaintenanceCapability.property_name(1)
:days_to_next_service
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.MaintenanceCapability.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]