Search documentation of grizzly

# View Source Grizzly.ZWave.Commands.ZIPPacket (grizzly v7.4.2)

Command for sending Z-Wave commands via Z/IP

# Summary

## Types

flag()
param()

## Functions

ack_response?(command)
command_name(command)
extension(command, extension_name, default \\ nil)

Get the extension by extension name

flag_to_byte(atom)
make_ack_response(seq_number, opts \\ [])
make_nack_response(seq_number)

Make a `:nack_response`

make_nack_waiting_response(seq_number, delay_in_seconds)
meta_to_byte(secure, command, extensions, more_info \\ false)
nack_response?(command)
nack_waiting?(command)
unwrap(arg)

Removes the Z/IP Packet encapsulation from a command and returns the original command as a binary.

with_zwave_command(zwave_command, seq_number, params \\ [])

Make a Z/IP Packet Command that encapsulates another Z-Wave command

# Types

Link to this type

# flag()

View Source

    @type flag() ::
      :ack_response
      | :ack_request
      | :nack_response
      | :nack_waiting
      | :nack_queue_full
      | :nack_option_error
      | :invalid

Link to this type

# param()

View Source

    @type param() ::
      {:command, Grizzly.ZWave.Command.t() | nil}
      | {:flag, flag() | nil}
      | {:seq_number, Grizzly.ZWave.seq_number()}
      | {:source, Grizzly.ZWave.node_id()}
      | {:dest, Grizzly.ZWave.node_id()}
      | {:header_extensions,
         [Grizzly.ZWave.Commands.ZIPPacket.HeaderExtensions.extension()]}
      | {:secure, boolean()}
      | {:more_info, boolean()}

# Functions

Link to this function

# ack_response?(command)

View Source

    @spec ack_response?(Grizzly.ZWave.Command.t()) :: boolean()

Link to this function

# command_name(command)

View Source

    @spec command_name(Grizzly.ZWave.Command.t()) :: atom() | nil

Link to this function

# extension(command, extension_name, default \\ nil)

View Source

    @spec extension(Grizzly.ZWave.Command.t(), atom(), any()) :: any()

Get the extension by extension name

Link to this function

# flag_to_byte(atom)

View Source

    @spec flag_to_byte(flag() | nil) :: byte()

Link to this function

# make_ack_response(seq_number, opts \\ [])

View Source

    @spec make_ack_response(
      Grizzly.ZWave.seq_number(),
      keyword()
    ) :: Grizzly.ZWave.Command.t()

Link to this function

# make_nack_response(seq_number)

View Source

    @spec make_nack_response(Grizzly.ZWave.seq_number()) :: Grizzly.ZWave.Command.t()

Make a `:nack_response`

Link to this function

# make_nack_waiting_response(seq_number, delay_in_seconds)

View Source

    @spec make_nack_waiting_response(
      Grizzly.ZWave.seq_number(),
      seconds :: non_neg_integer()
    ) ::
      Grizzly.ZWave.Command.t()

Link to this function

# meta_to_byte(secure, command, extensions, more_info \\ false)

View Source
Link to this function

# nack_response?(command)

View Source

    @spec nack_response?(Grizzly.ZWave.Command.t()) :: boolean()

Link to this function

# nack_waiting?(command)

View Source

    @spec nack_waiting?(Grizzly.ZWave.Command.t()) :: boolean()

Link to this function

# unwrap(arg)

View Source

    @spec unwrap(binary()) :: binary()

Removes the Z/IP Packet encapsulation from a command and returns the original command as a binary.

Link to this function

# with_zwave_command(zwave_command, seq_number, params \\ [])

View Source

    @spec with_zwave_command(
      Grizzly.ZWave.Command.t() | binary(),
      Grizzly.ZWave.seq_number(),
      [param()]
    ) ::
      {:ok, Grizzly.ZWave.Command.t()}

Make a Z/IP Packet Command that encapsulates another Z-Wave command