grizzly v0.8.7 Grizzly.Packet View Source

Module for working with raw Z/IP packets

This is used to marshall a Z/IP packet of bytes into an Elixir data structure for use to work with.

This data structure is a more "lower level" representation of the messaging between this library and Z-Wave. Most the time you should probably be working with a Grizzly.Message.

This structure is for internal byte string parsing.

Link to this section Summary

Link to this section Types

Link to this type

t() View Source
t() :: %Grizzly.Packet{
  body: any(),
  header_extensions: Grizzly.Packet.HeaderExtension.t(),
  raw?: boolean(),
  seq_number: non_neg_integer() | nil,
  types: [type()]
}

Link to this type

type() View Source
type() :: :ack_response | :nack_response | :nack_waiting

Link to this section Functions

Link to this function

ack_request?(packet) View Source
ack_request?(t()) :: boolean()

Link to this function

as_ack_response(seq_number) View Source
as_ack_response(Grizzly.seq_number()) :: binary()

Link to this function

decode(zip_packet_binary) View Source
decode(binary()) :: t()

Link to this function

header(seq_number) View Source
header(seq_number :: non_neg_integer()) :: binary()

Link to this function

heart_beat() View Source
heart_beat() :: <<_::24>>

Return Z/IP binary for the heart beat packet

Link to this function

heart_beat_response(packet) View Source
heart_beat_response(t()) :: boolean()

Link to this function

new(opts \\ []) View Source
new(options :: keyword()) :: t()

Link to this function

put_expected_delay(packet, seconds) View Source
put_expected_delay(t(), seconds :: non_neg_integer()) :: t()

Link to this function

sleeping_delay?(packet) View Source
sleeping_delay?(t()) :: boolean()