auto_api v0.1.0 AutoApi.WindscreenCapability View Source

Basic settings for Windscreen Capability

iex> alias AutoApi.WindscreenCapability, as: W
iex> W.identifier
<<0x00, 0x42>>
iex> W.name
:windscreen
iex> W.description
"Windscreen"
iex> W.command_name(0x00)
:get_windscreen_state
iex> W.command_name(0x01)
:windscreen_state
iex> W.command_name(0x02)
:set_windscreen_damage
iex> length(W.properties)
8
iex> List.last(W.properties)
{0x08, :windscreen_damage_detection_time}

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: Windscreen

Retunrs capability’s identifier: <<0x0, 0x42>>

Returns capability’s unique name: windscreen

Retunrs properties under Windscreen:

[{0x1, :wipers}, {0x2, :wipers_intensity}, {0x3, :windscreen_damage}, {0x4, :windscreen_zone_matrix}, {0x5, :windscreen_damage_zone}, {0x6, :windscreen_needs_replacement}, {0x7, :windscreen_damage_confidence}, {0x8, :windscreen_damage_detection_time}]

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

Link to this type command_type() View Source
command_type() ::
  :get_windscreen_state |
  :windscreen_state |
  :set_windscreen_damage

Link to this section Functions

Link to this function capabilities() View Source
capabilities() :: [map()]

Deprecated. Use API level 5 and above.

Retunrs capabilities under Windscreen:

[]
Link to this function capability_size() View Source
capability_size() :: integer()

Deprecated. Use API level 5 and above.

Returns capability size: 1

Link to this function command() View Source
command() :: atom()

Returns the command module related to this capability

Return commands id based on atom

Link to this function command_name(id) View Source
command_name(integer()) ::
  AutoApi.WindscreenCapability.command_type() |
  nil

Returns commands readable name.

Available commands:

%{0x0 => :get_windscreen_state, 0x1 => :windscreen_state, 0x2 => :set_windscreen_damage}
Link to this function commands() View Source
commands() :: [{integer(), atom()}]

Returns map of commands id and thier name

[{0x0, :get_windscreen_state}, {0x1, :windscreen_state}, {0x2, :set_windscreen_damage}]

Link to this function description() View Source
description() :: String.t()

Returns capability’s description: Windscreen

Link to this function identifier() View Source
identifier() :: binary()

Retunrs capability’s identifier: <<0x0, 0x42>>

Returns capability’s unique name: windscreen

Link to this function properties() View Source
properties() :: [tuple()]

Retunrs properties under Windscreen:

[{0x1, :wipers}, {0x2, :wipers_intensity}, {0x3, :windscreen_damage}, {0x4, :windscreen_zone_matrix}, {0x5, :windscreen_damage_zone}, {0x6, :windscreen_needs_replacement}, {0x7, :windscreen_damage_confidence}, {0x8, :windscreen_damage_detection_time}]

Returns the command module related to this capability

Link to this function to_bin(actions_list) View Source
to_bin([command_type()]) :: binary()

Returns binary value of capability based on list of available supported capabilities

Link to this function to_map(capability_bin) View Source
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: ""}]
Link to this function to_map(sub_cap_bin, index) View Source

Deprecated. Use API level 5 and above.

Deprecated. Use API level 5 and above.