# `DSMR.Measurement`
[🔗](https://github.com/mijnverbruik/dsmr/blob/v1.1.0/lib/dsmr/measurement.ex#L1)

A numeric value with a DSMR unit.

Measurements are used for electricity, gas, voltage, current, and duration
values. Values are parsed as native numbers by default. When `DSMR.parse/2`
is called with `floats: :decimals`, decimal values are returned as
`%Decimal{}` structs.

# `t`

```elixir
@type t() :: %DSMR.Measurement{
  raw: String.t() | nil,
  unit: String.t(),
  value: integer() | float() | Decimal.t()
}
```

`raw` holds the exact numeric text from the telegram (e.g. `"000123.456"`)
so that serialization can reproduce the original padding and precision.
It is `nil` for measurements constructed by hand.

---

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