View Source KNXex.TPCI (knxex v0.1.0)

KNX Transport Layer Protocol Control Information (TPCI).

See also https://support.knx.org/hc/en-us/articles/115003188529-Payload.

Link to this section Summary

Types

Defines what type of packet it is.

t()

Represents the TPCI.

Defines the purpose of the packet and whether it contains a sequence number.

Functions

Creates a new TPCI struct from the raw TPCI value.

Calculates the integer value for the given TPCI struct.

Link to this section Types

@type control_data() :: :tl_connect | :tl_disconnect | :tl_ack | :tl_nak

Defines what type of packet it is.

@type t() :: %KNXex.TPCI{
  control_data: control_data() | nil,
  sequence_number: non_neg_integer() | nil,
  type: type()
}

Represents the TPCI.

@type type() ::
  :unnumbered_data | :numbered_data | :unnumbered_control | :numbered_control

Defines the purpose of the packet and whether it contains a sequence number.

Link to this section Functions

@spec make(non_neg_integer()) :: t()

Creates a new TPCI struct from the raw TPCI value.

@spec to_integer(t()) :: non_neg_integer()

Calculates the integer value for the given TPCI struct.