Expand description
mako-pruefung — decides the Antwortnachricht a market participant owes.
Every inbound GPKE or GeLi Gas message that expects an answer has published rules for what that answer must be. BDEW prints them as Entscheidungsbaum-Diagramme und Codelisten für die Antwortnachrichten (4.3, 01.04.2026): each set of rules names a prüfende Rolle, walks numbered Prüfschritte, and lands on a code from its own Codeliste. This crate is those rules, executable.
The answer rides in SG4 STS+E01 of the outbound UTILMD — the code in
DE 9013, the EBD id in DE 1131 — or, for an invoice, in REMADV AJT.
| Module | Prüfende Rolle | Trees |
|---|---|---|
nb | Netzbetreiber | E_0622 Anmeldung, E_0607 Abmeldung |
lf | Lieferant | E_0609, E_0624, E_0614, E_0615, E_0603–E_0606; Gas E_3001, E_3002, E_3020, E_3008 |
msb | Messstellenbetrieb | E_0200–E_0203 und die WiM-Codelisten |
esa | MSB (Bestellung) und ESA (Abrechnung) | E_0252–E_0257 und E_0264–E_0267 |
mabis | NB, LF, BKV | the 28 MaBiS and Redispatch trees (E_0004–E_0104, E_0901, E_0902) |
The document defines around sixty trees with the LF as prüfende Rolle;
these are its process answers, the messages that move a Marktlokation
between suppliers. Rechnungsprüfung (E_0406) and Stammdatenänderung
(E_0408) are separate obligations — see codes::E_0406_CODES for what
of E_0406 is resolved here.
§MaBiS widens the Cluster axis
A GPKE answer is a Zustimmung or an Ablehnung, and the cluster picks between two PIDs. MaBiS needs more, and the differences are observable:
- an Abweisung was refused before it was assessed, and MaBiS Kap. 9.8.2 Nr. 2 says its Prüfmitteilung is not forwarded — while an Ablehnung’s is;
- Ablehnung der gesamten Liste carries no positions, a Korrekturliste wegen Ablehnung is itself a list of them;
- a Reklamation tree publishes no Zustimmung at all, because an acceptable profile is answered with silence.
Reducing any of these to zustimmung: bool loses a decision the market
acts on, so Cluster names all eight and
AntwortCode::ist_zustimmung answers None off the agreement axis.
§Why one crate and not one per role
A code has no meaning without its tree. A02 is
- „Vorlauffrist nicht eingehalten“ in
E_0607(NB answering an Abmeldung), - „Marktlokation nimmt nicht an der Marktkommunikation teil“ in
E_0622(NB answering an Anmeldung), - „Lieferende zum Abmeldedatum wurde bereits bestätigt“ in
E_0609(LF answering an Ankündigung),
and a combined NB+LF deployment runs all three. One catalogue keyed by EBD
is what makes a code checkable at all: codes::lookup resolves it
within its tree, and the code’s Cluster — not a caller-supplied
boolean — decides whether the answer rides the Bestätigungs- or the
Ablehnungs-PID.
Role separation stays available where it is load-bearing (§ 7 EnWG): the
role-nb and role-lf Cargo features compile only their own trees, so a
role-gated processd binary carries only the decisions it is allowed to make.
§Antwortcode, not ERC
An Antwortcode is not an ERC code. ERC is the APERAK/CONTRL segment
for processability errors, with its own catalogue in
mako_engine::erc; an Antwortcode is a business answer and travels in
STS+E01 (UTILMD) or AJT (REMADV).
§Design constraints
- No I/O — every input is a function argument.
- No clock — the current instant is passed in, so callers control time.
- Deterministic — same inputs, same output, always.
- No async.
- Never guess. A Prüfschritt the caller’s records cannot answer produces an escalation naming that Prüfschritt, not a plausible code. An answer to the market is a binding statement about a contract.
Re-exports§
pub use antwort::AntwortDetail;pub use antwort::RejectReason;pub use codes::AntwortCode;pub use codes::Cluster;pub use error::CheckError;pub use rechnung::PositionsFakten;pub use rechnung::RechnungsAntwort;pub use rechnung::RechnungsFakten;pub use rechnung::RechnungsFamilie;pub use rechnung::StornoAntwort;pub use rechnung::StornoFakten;pub use esa::Bestellart;pub use esa::EsaAnfrage;pub use esa::EsaBeendigung;pub use esa::EsaBestellung;pub use esa::EsaStornierung;pub use esa::pruefe_anfrage as pruefe_esa_anfrage;pub use esa::pruefe_beendigung as pruefe_esa_beendigung;pub use esa::pruefe_bestellung as pruefe_esa_bestellung;pub use esa::pruefe_rechnung as pruefe_esa_rechnung;pub use esa::pruefe_stornierung as pruefe_esa_stornierung;pub use lf::Bekannt;pub use lf::Bilanzkreisart;pub use lf::EogZustaendigkeit;pub use lf::LfAnfrage;pub use lf::LfAntwort;pub use lf::LfEntscheidung;pub use lf::LfVertragslage;pub use lf::Lokationsart;pub use lf::Terminart;pub use lf::Vollmacht;pub use lf::ZuordnungsFall;pub use lf::ZuordnungsLage;pub use lf::pruefe_abmeldung;pub use lf::pruefe_abmeldung_gas;pub use lf::pruefe_abmeldungsanfrage_gas;pub use lf::pruefe_anmeldung_eog;pub use lf::pruefe_anmeldung_eog_gas;pub use lf::pruefe_beendigung_zuordnung;pub use lf::pruefe_kuendigung;pub use lf::pruefe_kuendigung_gas;pub use lf::pruefe_zuordnung;pub use msb::Abmeldegrund;pub use msb::AbmeldungMsb;pub use msb::AnmeldungMsb;pub use msb::Einrichtungsart;pub use msb::KuendigungMsb;pub use msb::Kuendigungstermin;pub use msb::MsbEntscheidung;pub use msb::Vertragslage;pub use msb::WeiterverpflichtungAuftrag;pub use msb::pruefe_abmeldung as pruefe_abmeldung_msb;pub use msb::pruefe_anmeldung as pruefe_anmeldung_msb;pub use msb::pruefe_kuendigung as pruefe_kuendigung_msb;pub use msb::pruefe_weiterverpflichtung;pub use nb::Abmeldeanfrage;pub use nb::AbmeldungAnfrage;pub use nb::AnmeldungAnfrage;pub use nb::CODES_REQUIRING_DRITTER;pub use nb::LfaAntwort;pub use nb::MaloGridRecord;pub use nb::Messtyp;pub use nb::NbEntscheidung;pub use nb::NetzCheckConfig;pub use nb::TranchenAntwort;pub use nb::TranchenLage;pub use nb::TranchenZuordnung;pub use nb::evaluate;pub use nb::evaluate_abmeldung;pub use nb::evaluate_lieferbeginn;
Modules§
- antwort
- The wire form of a decided answer — shared by every prüfende Rolle.
- codes
- The Antwortcode catalogue — every code an LF may put in
SG4 STS+E01. - emob
- NZR-EMob / Modell 2 — the answers a VNB and an LF owe when a Ladepunktbetreiber moves a Marktlokation into or out of the virtual Bilanzierungsgebiet.
- error
- Error types for
mako-pruefung. - esa
- Every tree of the Energieserviceanbieter relationship — WiM Strom Teil 2, Kapitel 4.
- lf
- The trees whose prüfende Rolle is the Lieferant.
- mabis
- MaBiS und Redispatch — die Antwortregeln, ausführbar.
- msb
- The trees whose prüfende Rolle is a Messstellenbetreiber — or the Netzbetreiber answering one.
- nb
- The trees whose prüfende Rolle is the Netzbetreiber.
- rechnung
- The INVOIC/REMADV walk the MSB’s invoices are checked with — one engine, three families.
Enums§
- Holiday
Calendar - Selects which set of public holidays to observe when counting Werktage.
Constants§
- ABMELDUNG_
GRUENDE - Every Transaktionsgrund the UTILMD AHB admits on a 55007 Abmeldung.
- BKV_
DEAKTIVIERUNG ZQ7— Abmeldung wegen fehlender Zuordnungsermächtigung, aufgrund Deaktivierung durch den BKV beim NB.- EIN_
AUSZUG E01— Ein-/Auszug (Umzug).- STILLLEGUNG
Z33— Auszug wegen Stilllegung.- WECHSEL
E03— Wechsel.- ZRT_
AENDERUNG ZT0— Abmeldung wegen fehlender Zuordnungsermächtigung aufgrund Änderung ZRT.