View Source KNXex.FrameDecoder (knxex v0.1.0)

This module contains all the binary matching logic for the KNX frames (inlined through macros from the actual frame modules).

Frames that are inlined into this module (using use), have to implement the decode_frame/3 function with binary matching in the header.

Link to this section Summary

Functions

Decodes a KNX frame from a binary string.

Link to this section Functions

Link to this function

decode_frame(arg1, arg2, arg3)

View Source
@spec decode_frame(
  protocol_version :: integer(),
  request_type :: atom(),
  data :: bitstring()
) :: {:ok, struct()} | {:error, term()} | :ignore

Decodes a KNX frame from a binary string.

:ignore will be returned as a default fallback, if no frame decoder matches.