pub struct MeteredInterval {
pub obis_code: Option<String>,
pub melo_id: Option<String>,
pub dtm_from: String,
pub dtm_to: String,
pub quantity: String,
pub unit: Option<String>,
pub qualifier: String,
}Expand description
One decoded metered value from an MSCONS SG9/SG10 group.
§Why this lives here
Both MSCONS-receiving workflows — mako-gpke’s Strom Messwerte and
mako-geli-gas’s Gas Messdaten — need to carry the values they received to
the ERP, and makod decodes them from one MsconsMessage shape for both.
A type per crate would be two decoders that drift; this is the one both
depend on already.
§What is kept raw
qualifier is SG10 QTY DE 6063 exactly as it arrived — 220 Wahrer Wert,
67 Ersatzwert, Z18 Vorläufiger Wert (MSCONS AHB 3.1g §11.2). The
translation into the quality vocabulary the ERP and edmd share is
MeteredInterval::quality, applied when the payload is built. An inbound
value stays representable so a message carrying an unexpected qualifier can
still be recorded and refused, rather than being coerced at the boundary.
Fields§
§obis_code: Option<String>SG9 PIA DE 7140 — the OBIS register the value belongs to.
melo_id: Option<String>SG6 LOC+172 DE 3225 — the Messlokation, when the series names one.
dtm_from: StringSG10 DTM+163 — interval start, RFC 3339.
dtm_to: StringSG10 DTM+164 — interval end, RFC 3339.
quantity: StringSG10 QTY DE 6060 — the quantity, as written on the wire.
A string, not a float: [906] allows three decimal places and a
settlement quantity must not acquire a binary rounding error in transit.
unit: Option<String>SG10 QTY DE 6411 — the unit, normally KWH.
qualifier: StringSG10 QTY DE 6063, verbatim.
Implementations§
Source§impl MeteredInterval
impl MeteredInterval
Sourcepub fn quality(&self) -> &'static str
pub fn quality(&self) -> &'static str
The MSCONS DE 6063 qualifier in the quality vocabulary the ERP event
and edmd share.
| DE 6063 | MSCONS AHB 3.1g | Quality |
|---|---|---|
220 | Wahrer Wert | MEASURED |
67 | Ersatzwert | SUBSTITUTED |
Z18 | Vorläufiger Wert | PRELIMINARY |
Anything else is UNKNOWN, which downstream treats as not billable —
the safe reading for a qualifier this release does not know.
Trait Implementations§
Source§impl Clone for MeteredInterval
impl Clone for MeteredInterval
Source§fn clone(&self) -> MeteredInterval
fn clone(&self) -> MeteredInterval
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more