grizzly v0.6.0 Grizzly.CommandClass.UserCode View Source

Link to this section Summary

Link to this section Types

Link to this type

slot_status() View Source
slot_status() :: :occupied | :available

Link to this type

user_code() View Source
user_code() :: [0..9]

Link to this section Functions

Link to this function

decode_slot_status(int) View Source
decode_slot_status(1 | 0) :: slot_status()

Link to this function

empty_code() View Source
empty_code() :: [0, ...]

The default empty code to be sent.

This function is useful to use when trying to set a user code slot from occupied to available

Link to this function

encode_status(other) View Source
encode_status(slot_status()) :: {:ok, 1 | 0} | {:error, :invalid_arg, any()}

Link to this function

encode_user_code(user_code) View Source
encode_user_code(user_code()) ::
  {:ok, [48..57]} | {:error, :invalid_arg, any()}