grizzly v0.8.6 Grizzly.CommandClass.Powerlevel.Set View Source
Command module for working with the Powerlevel command class SET command. It is used to temporarily decrease the RF transmit power level of a device. 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:timeout
- The number of seconds during which RF transmit power level is decreased (it is then returned to normal power automatically).: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
Functions
Callback implementation for Grizzly.Command.encode/1
.
Callback implementation for Grizzly.Command.handle_response/2
.
Callback implementation for Grizzly.Command.init/1
.
Link to this section Types
Link to this type
opt()
View Source
opt()
View Source
opt() ::
{:seq_number, Grizzly.seq_number()}
| {:retries, non_neg_integer()}
| {:power_level, Grizzly.CommandClass.Powerlevel.power_level_description()}
| {:timeout, non_neg_integer()}
opt() :: {:seq_number, Grizzly.seq_number()} | {:retries, non_neg_integer()} | {:power_level, Grizzly.CommandClass.Powerlevel.power_level_description()} | {:timeout, non_neg_integer()}
Link to this type
t()
View Source
t()
View Source
t() :: %Grizzly.CommandClass.Powerlevel.Set{
power_level: Grizzly.CommandClass.Powerlevel.power_level_description(),
retries: non_neg_integer(),
seq_number: Grizzly.seq_number(),
timeout: non_neg_integer()
}
t() :: %Grizzly.CommandClass.Powerlevel.Set{ power_level: Grizzly.CommandClass.Powerlevel.power_level_description(), retries: non_neg_integer(), seq_number: Grizzly.seq_number(), timeout: non_neg_integer() }
Link to this section Functions
Link to this function
encode(command)
View Source
encode(command)
View Source
encode(t()) :: {:ok, binary()} | {:error, Grizzly.Command.EncodeError.t()}
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(command, packet)
View Source
handle_response(t(), Grizzly.Packet.t()) ::
{:continue, t()}
| {:done, {:error, :nack_response}}
| {:done, Grizzly.CommandClass.Powerlevel.power_level_report()}
| {:retry, t()}
handle_response(t(), Grizzly.Packet.t()) :: {:continue, t()} | {:done, {:error, :nack_response}} | {:done, Grizzly.CommandClass.Powerlevel.power_level_report()} | {:retry, t()}
Callback implementation for Grizzly.Command.handle_response/2
.
Link to this function
init(opts) View Source
Callback implementation for Grizzly.Command.init/1
.