auto_api v0.1.0 AutoApi.DiagnosticsCapability View Source
Basic settings for Diagnostics Capability
iex> alias AutoApi.DiagnosticsCapability, as: D
iex> D.identifier
<<0x00, 0x33>>
iex> D.capability_size
1
iex> D.name
:diagnostics
iex> D.description
"Diagnostics"
iex> D.command_name(0x00)
:get_diagnostics_state
iex> D.command_name(0x01)
:diagnostics_state
iex> length(D.properties)
14
iex> List.last(D.properties)
{0x0e, :distance_since_start}
Link to this section Summary
Functions
Deprecated. Use API level 5 and above
Deprecated. Use API level 5 and above
Returns the command module related to this capability
Return commands id based on atom
Returns commands readable name
Returns map of commands id and thier name
Returns capability’s description: Diagnostics
Retunrs capability’s identifier: <<0x0, 0x33>>
Returns capability’s unique name: diagnostics
Retunrs properties under Diagnostics:
[{0x1, :mileage}, {0x2, :engine_oil_temperature}, {0x3, :speed}, {0x4, :engine_rpm}, {0x5, :fuel_level}, {0x6, :estimated_range}, {0x7, :current_fuel_consumption}, {0x8, :average_fuel_consumption}, {0x9, :washer_fluid_level}, {0xA, :tire}, {0xB, :battery_voltage}, {0xC, :adblue_level}, {0xD, :distance_since_reset}, {0xE, :distance_since_start}]
Returns the command module related to this capability
Returns binary value of capability based on list of available supported capabilities
Returns list of supported sub capability based on binary value
Deprecated. Use API level 5 and above
Deprecated. Use API level 5 and above
Link to this section Types
command_type() :: :get_diagnostics_state | :diagnostics_state
Link to this section Functions
Deprecated. Use API level 5 and above.
Retunrs capabilities under Diagnostics:
[]
Deprecated. Use API level 5 and above.
Returns capability size: 1
Returns the command module related to this capability
command_id(AutoApi.DiagnosticsCapability.command_type()) :: integer() | nil
Return commands id based on atom
command_name(integer()) :: AutoApi.DiagnosticsCapability.command_type() | nil
Returns commands readable name.
Available commands:
%{0x0 => :get_diagnostics_state, 0x1 => :diagnostics_state}
Returns map of commands id and thier name
[{0x0, :get_diagnostics_state}, {0x1, :diagnostics_state}]
Returns capability’s description: Diagnostics
Retunrs capability’s identifier: <<0x0, 0x33>>
Returns capability’s unique name: diagnostics
Retunrs properties under Diagnostics:
[{0x1, :mileage}, {0x2, :engine_oil_temperature}, {0x3, :speed}, {0x4, :engine_rpm}, {0x5, :fuel_level}, {0x6, :estimated_range}, {0x7, :current_fuel_consumption}, {0x8, :average_fuel_consumption}, {0x9, :washer_fluid_level}, {0xA, :tire}, {0xB, :battery_voltage}, {0xC, :adblue_level}, {0xD, :distance_since_reset}, {0xE, :distance_since_start}]
Returns the command module related to this capability
Returns binary value of capability based on list of available supported capabilities
to_map(binary()) :: [command_type()] :: [map()]
Returns list of supported sub capability based on binary value
Level 5:
ie> HmAutoApi.DoorLocksCapability.to_map(<<0x00, 0x20, 0x01, 0x00, 0x02>>)
[:lock_state, :get_lock_state, :lock_unlock_doors]
Level 4:
ie> HmAutoApi.DoorLocksCapability.to_map(<<0x1, 0x0>>)
[%{bin: <<0x00>>, name: "Unavailable", atom: :unavailable, title: ""}]
Deprecated. Use API level 5 and above.
Deprecated. Use API level 5 and above.