Expand description
§smgw-core
Allocation-free Rust metering engines for smart meter gateways. Commission a meter channel and supply its readings, timestamps and quality. The crate builds with no_std and has zero dependencies.
| Engines | What they do |
|---|---|
| TAF 1, 2 and 6 | Select a billing close or daily opening balance and derive tariff registers. |
| TAF 7, 8 and 15 | Record series, calculate interval and maximum demand, and backfill a meter’s registered history. |
| TAF 9, 10 and 14 | Deliver active power, grid-state measurements and measurement blocks on the configured triggers. |
From a workspace checkout, run cargo run --locked -p smgw-core --example taf8 to see a 300 Wh increase over 15 minutes produce 1,200 W mean demand. Each engine has an example with the same name. Use taf15::Profile::capture_batch to commit overlapping reads together and preserve the original records if the batch fails.
The wakeup module constructs and parses gateway administrator datagrams. Use WakeUpPrefix::new to obtain the exact message bytes to sign, and with_p256_signature to attach the fixed-width signature components. parse returns an UnverifiedWakeUp that requires recipient, signature, freshness and replay verification by the host.
Modules§
- taf1
- TAF 1 selection of one cumulative electricity reading per billing close.
- taf2
- Single-meter TAF 2 register simulation for quarter-hour electricity readings.
- taf6
- TAF 6 retrospective selection of a daily billing-register balance.
- taf7
- Bounded, in-memory TAF 7 series for one commissioned active-energy channel.
- taf8
- TAF 8 load curves and maximum demand for one electricity billing window.
- taf9
- TAF 9 single-channel, instantaneous active-power simulation.
- taf10
- TAF 10 grid-state measurements for one commissioned meter and OBIS channel.
- taf14
- Bounded TAF 14 measurement blocks for value-added services (BSI TR-03109-1 v1.1).
- taf15
- TAF 15 capture of meter-registered values for one commissioned OBIS channel.
- wakeup
- Offline inspection of a gateway administrator (GWA) wake-up message addressed to a smart meter gateway (SMGW).