grizzly v0.5.0 Grizzly.CommandClass.Powerlevel.TestNodeSet View Source

Command module for working with the Powerlevel command class TEST_NODE_SET command. It is used to temporarily decrease the RF transmit power level of a device while sending test frames to another. Command Options:

  • :power_level - By how much to decrease the RF transmit power level (:normal_power is no decrease): :normal_power | :minus1dBm | :minus2dBm | :minus3dBm | :minus4dBm | :minus5dBm | :minus6dBm | :minus7dBm | :minus8dBm | :minus9dBm
  • :test_node_id - The device to send frames to from this device
  • :test_frame_count - How many frames to send
  • :seq_number - The sequence number of the Z/IP Packet
  • :retries - The number of times to try to send the command (default 2)

Link to this section Summary

Link to this section Types

Link to this type

opt() View Source
opt() ::
  {:seq_number, Grizzly.seq_number()}
  | {:retries, non_neg_integer()}
  | {:test_node_id, non_neg_integer()}
  | {:power_level, Grizzly.CommandClass.Powerlevel.power_level_description()}
  | {:test_frame_count, non_neg_integer()}

Link to this type

t() View Source
t() :: %Grizzly.CommandClass.Powerlevel.TestNodeSet{
  power_level: Grizzly.CommandClass.Powerlevel.power_level_description(),
  retries: non_neg_integer(),
  seq_number: Grizzly.seq_number(),
  test_frame_count: non_neg_integer(),
  test_node_id: non_neg_integer()
}

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, packet) View Source
handle_response(t(), Grizzly.Packet.t()) ::
  {:continue, t()}
  | {:done, {:error, :nack_response}}
  | {:done, Grizzly.CommandClass.Powerlevel.test_node_report()}
  | {: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.