Parser for raw LoRa packets seen in :rx_log_data events.
It decodes the packet header and path, parses advertisements, and – when
channel decryption is enabled – recognises and decrypts group-text packets
for channels whose secret is known (learned from :channel_info events), so
that a later :channel_msg_recv can be annotated with path/RSSI/SNR of the
packet it came from.
This is a pure data structure: every function returns the updated parser.
Summary
Functions
Finds the most recent logged channel packet carrying text hash msg_hash.
Creates an empty parser.
Remembers (or replaces) the channel at chan.channel_idx.
Parses a raw packet payload and merges the findings into log_data.
Types
@type t() :: %Meshcore.PacketParser{ channels: %{required(non_neg_integer()) => map()}, channels_log: [map()], decrypt_channels: boolean() }
Functions
@spec find_log_channel_msg(t(), non_neg_integer()) :: map() | nil
Finds the most recent logged channel packet carrying text hash msg_hash.
@spec new() :: t()
Creates an empty parser.
Remembers (or replaces) the channel at chan.channel_idx.
Parses a raw packet payload and merges the findings into log_data.
Returns {log_data, parser}.