# `Meshcore.Lpp`
[🔗](https://github.com/nyannus/meshcore_ex/blob/v0.1.0/lib/meshcore/lpp.ex#L1)

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.

# `reading`

```elixir
@type reading() :: %{channel: non_neg_integer(), type: String.t(), value: term()}
```

# `parse`

```elixir
@spec parse(binary()) :: {:ok, [reading()]} | {:error, term()}
```

Parses a full LPP frame.

Returns `{:error, {:unknown_lpp_type, type}}` or `{:error, :truncated}` for
malformed input.

# `parse_mma`

```elixir
@spec parse_mma(binary()) :: {:ok, [map()]} | {:error, term()}
```

Parses a min/max/average (MMA) telemetry block: repeated
`channel, type, min, max, avg` records.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
