auto_api v0.1.0 AutoApi.CapabilitiesState View Source

Door position possible values: :closed, :open Door lock possible values: :unlocked, :locked

Link to this section Summary

Functions

Callback implementation for AutoApi.State.base/0

Build state based on binary value (NOT IMPLEMENTED)

Parse state to bin

Link to this section Types

Link to this type t() View Source
t() :: %AutoApi.CapabilitiesState{diagnostics: [atom()], door_locks: [atom()]}

Link to this section Functions

Callback implementation for AutoApi.State.base/0.

Build state based on binary value (NOT IMPLEMENTED)

ie> AutoApi.CapabilitiesState.from_bin(<<0x01, 4::integer-16, 0x00, 0x33, 0x00, 0x01>>) %AutoApi.CapabilitiesState{diagnostics: [:get_diagnostics_state, :diagnostics_state], door_locks: []}

Parse state to bin

iex> AutoApi.CapabilitiesState.to_bin(%AutoApi.CapabilitiesState{diagnostics: [:get_diagnostics_state, :diagnostics_state], door_locks: [:get_lock_state, :lock_state, :lock_unlock_doors]}) <<1, 0, 4, 0, 0x33, 0, 1, 1, 0, 5, 0, 0x20, 0, 1, 2>> iex> AutoApi.CapabilitiesState.to_bin(%AutoApi.CapabilitiesState{diagnostics: [:get_diagnostics_state, :diagnostics_state], door_locks: []}) <<1, 0, 4, 0, 0x33, 0, 1>>