grizzly v0.8.0 Grizzly.CommandClass.UserCode.Set View Source

Command module for working with USER_CODE SET command

command options:

  • :slot_id - The slot id of the user code
  • :slot_status - Either :occupied or :available
  • :user_code - The user code
  • :seq_number - The sequence number for the Z/IP Packet
  • :retries - The number times to retry to send the command (default 2)

Link to this section Summary

Link to this section Types

Link to this type

opt() View Source
opt() ::
  {:slot_id, pos_integer()}
  | {:slot_status, Grizzly.CommandClass.UserCode.slot_status()}
  | {:user_code, Grizzly.CommandClass.UserCode.user_code()}
  | {:seq_number, Grizzly.seq_number()}
  | {:retries, non_neg_integer()}

Link to this type

t() View Source
t() :: %Grizzly.CommandClass.UserCode.Set{
  retries: non_neg_integer(),
  seq_number: Grizzly.seq_number(),
  slot_id: pos_integer(),
  slot_status: Grizzly.CommandClass.UserCode.slot_status(),
  user_code: Grizzly.CommandClass.UserCode.user_code()
}

Link to this section Functions

Link to this function

encode(command) View Source
encode(t()) :: {:ok, binary()} | {:error, Grizzly.Command.EncodeError.t()}

Callback implementation for Grizzly.Command.encode/1.

Link to this function

handle_response(command, arg2) View Source
handle_response(t(), Grizzly.Packet.t()) ::
  {:continue, t()}
  | {:done, {:error, :nack_response}}
  | {:done, :ok}
  | {:retry, t()}

Callback implementation for Grizzly.Command.handle_response/2.

Link to this function

init(opts) View Source
init([opt()]) :: {:ok, t()}

Callback implementation for Grizzly.Command.init/1.