Expand description
Condition evaluation traits and expression evaluator.
Re-exports§
pub use answer_lists::AnswerCodeLists;pub use codelist::ArtikelIdCodelist;pub use codelist::CodelistColumn;pub use codelist::MessageFlags;pub use ebd_cluster::Cluster;pub use ebd_cluster::EbdClusterLookup;pub use providers::Clock;pub use providers::ClockedProvider;pub use providers::CodeListProvider;pub use providers::CompositeExternalProvider;pub use providers::CountryPostalCodeProvider;pub use providers::KonfigurationenProvider;pub use providers::MapExternalProvider;pub use providers::MarketRole;pub use providers::MarketRoleProvider;pub use providers::Sector;pub use providers::SectorProvider;pub use timezone::dst_transitions_between;pub use timezone::dtm_after;pub use timezone::dtm_start_utc_min;pub use timezone::is_mesz_utc;pub use timezone::is_mez_utc;pub use timezone::parse_dtm303;pub use werktag::compute_easter;pub use werktag::is_german_holiday;pub use werktag::is_werktag;pub use werktag::parse_ccyymmdd_prefix;pub use werktag::werktage_between;pub use format_validators::*;
Modules§
- abrechnungsdaten
- The products of chapter 6.2 of the Codeliste der Konfigurationen, “Produkte zur Bestellung einer Änderung von Abrechnungsdaten”: what an ORDERS 17133 may order in PIA+5 DE7140, and what each product takes in its SG30 — a Produkteigenschaft (CAV+ZH9 DE7110) from its own list, or a Wertedetail (CAV+ZV4 DE7110) of its own format.
- answer_
lists - Which answer codes each EBD / Codeliste holds.
- codelist
- BDEW Artikel-ID / Artikelnummer codelist provider.
- ebd_
cluster - EBD answer-code cluster lookup.
- format_
validators - Format validation helpers for AHB 900-series conditions.
- periods
- Zeiträume of a transaction: its SG6 groups, each naming a Zeitraum-ID in RFF DE1156 (UTILMD SG4, UTILTS SG5).
- providers
- Concrete
ExternalConditionProviderimplementations. - reading_
dates - MSCONS SG10 DTM+7 (Nutzungszeitpunkt) beside DTM+60 / DTM+9: conditions [130] and [133], identical in every MSCONS AHB from 3.1d to 3.2.
- sg4_
instances - Group instances of one UTILMD SG4 compared with each other.
- timezone
- DST timezone helpers for German MESZ/MEZ validation.
- werktag
- German Werktag (working day) arithmetic for BDEW AHB conditions.
Structs§
- Absent
Target - Evaluates conditions for an element or group that is known to be absent.
- Condition
Expr Evaluator - Evaluates a
ConditionExprAST against an evaluation context. - Evaluation
Context - Context passed to condition evaluators during evaluation.
- Evaluator
Registry - Global registry of condition evaluators.
- Group
Scope - A scope identifying one group instance, by its repetition at every level
from the root:
[("SG4", 1), ("SG8", 2)]is the third SG8 of the second SG4. - NoOp
External Provider - A no-op external condition provider that returns
Unknownfor everything. - NoOp
Group Navigator - A no-op group navigator that returns empty results for all queries.
- Present
Target - Evaluates conditions for an element or group that is known to be present, to decide whether it is allowed there.
- Status
Resolution - Which status an AHB status applies, see
ConditionExprEvaluator::resolve_status. - Vorgang
- A transaction (Vorgang) of a message type: the top-level group it repeats as, and where that group’s entry segment carries the transaction’s reference, which an APERAK names in SG5 RFF+TN DE1154.
Enums§
- Condition
Result - Three-valued result of evaluating a single condition.
Traits§
- Condition
Evaluator - Evaluates individual AHB conditions by number.
- External
Condition Provider - Provider for external conditions that depend on context outside the EDIFACT message.
- Group
Navigator - Provides group-scoped segment access for condition evaluation.
Functions§
- binds_
once - Whether
statuslimits what it annotates to once per transaction: the conditiononceis a conjunct of every line (Muss [483] ∧ [2061]). Where it sits in one branch only (Soll [165] ∧ (([2061] ∧ [583]) ∨ [584])), the other branch allows more. - breaks_
repetition_ limit - Whether
countsegments understatusbreak arepetition_limitscondition the status names and that applies wherectxis. - counted_
repetitions - The repetition conditions of a message type whose evaluators count what
they limit in the group they name, so that a false one means “sent too
often there”: ORDERS
[2005]/[2006], “Pro SG29 LIN ist die SG34 RFF+Z09 (Gerätenummer) genau einmal / bis zu dreimal anzugeben”. Most[2000]+ evaluators still count over the whole message; a condition joins this list once its evaluator is verified to count per instance. - is_
transaction_ group - Whether
group_idis a transaction group ofmessage_type, whose conditions the AHB states per transaction. The validator evaluates each repetition against the message as that transaction sees it (mig_assembly::transaction_view, #337). - once_
per_ transaction - The condition of a message type that allows a group or segment once per
transaction, and the transaction group: UTILMD’s
[2061]“Segment bzw. Segmentgruppe ist genau einmal je SG4 IDE (Vorgang) anzugeben” (Strom and Gas, FV2504–FV2610). The conditions evaluate it asTruewherever there is a transaction, so what it limits — the count — is checked on its own; seebinds_once. - packages_
allow_ none - Whether
expris package terms only, none of which needs a code ([9P0..1]): a status of that kind requires nothing. - presence_
condition - The number of a message type’s bare “Wenn vorhanden” condition, if it has one.
- presence_
conditions - Every condition of a message type that answers “does the annotated thing exist?”, which an absent element or group answers with no.
- refuses_
count - Whether something present under
statusis sent more often than it allows wherectxis:refuses_presencedoes not refuse it, but does once the message type’scounted_repetitionsare evaluated. ORDERS 17009’s SG34Muss ([102] ∧ [2006]) ⊻ ([103] ∧ [2005])holds for the second RFF+Z09 of a Zähleinrichtung as far as presence goes;[2005]refuses it. - refuses_
presence - Whether something present under
statusis not allowed wherectxis: aMuss/Xstatus with a condition that evaluates to false throughPresentTarget.Soll/Kann, an unconditional status, an undecidable condition, a package ([19P1..1], judged by its own check) and a status of several lines refuse nothing. - repetition_
limits - The repetition conditions of a message type that set how often a segment
is sent in its group instance where they apply, as
(condition, min, max): UTILMD Strom[2317]“… CAV+MIW/MPW/MUW vorhanden, ist das Segment mindestens zweimal anzugeben” and[2318]“… CAV+MBW vorhanden, … genau einmal” on the Wandler’s CAV+Z30. Their evaluators say whether one applies there (which also makes the segment required); the count is judged bybreaks_repetition_limit. - requiredness
- What of
exprdecides whether something missing must be sent. - transactions
- The transactions of a message type, as the APERAK MIG lists them (SG5 RFF+TN DE1154, FV2504–FV2610):