Decoder for Cayenne LPP (Low Power Payload) telemetry frames.
Mirrors Python's lpp_parse / lpp_json_encoder: a frame is a list of
%{channel: integer, type: String.t(), value: term} maps. Multi-field types
decode to maps (:gps → %{latitude:, longitude:, altitude:}), the
gyrometer to a list, everything else to a number.
As in the Python library, a zero byte where a channel number is expected terminates parsing.
Summary
Functions
Parses a full LPP frame.
Parses a min/max/average (MMA) telemetry block: repeated
channel, type, min, max, avg records.
Types
@type reading() :: %{channel: non_neg_integer(), type: String.t(), value: term()}
Functions
Parses a full LPP frame.
Returns {:error, {:unknown_lpp_type, type}} or {:error, :truncated} for
malformed input.
Parses a min/max/average (MMA) telemetry block: repeated
channel, type, min, max, avg records.