Skip to main content

automapper_validation/generated/fv2610/
insrpt_conditions_fv2610.rs

1// <auto-generated>
2// Generated by automapper-generator generate-conditions
3// AHB: xml-migs-and-ahbs/FV2610/INSRPT_AHB_1_1g_außerordentliche_20251211.xml
4// Generated: 2026-04-22T18:01:13Z
5// Delegates unchanged conditions to InsrptConditionEvaluatorFV2510 (FV2510).
6// </auto-generated>
7
8#![allow(clippy::style, clippy::complexity)]
9
10#[allow(unused_imports)]
11use crate::eval::format_validators::*;
12use crate::eval::{ConditionEvaluator, ConditionResult, EvaluationContext};
13use crate::generated::fv2510::InsrptConditionEvaluatorFV2510;
14
15/// Condition evaluator for INSRPT FV2610.
16///
17/// Delegates to [`InsrptConditionEvaluatorFV2510`] for conditions whose AHB description is
18/// unchanged from that version. Local overrides: [500].
19pub struct InsrptConditionEvaluatorFV2610 {
20    fallback: InsrptConditionEvaluatorFV2510,
21}
22
23impl Default for InsrptConditionEvaluatorFV2610 {
24    fn default() -> Self {
25        Self {
26            fallback: InsrptConditionEvaluatorFV2510::default(),
27        }
28    }
29}
30
31/// Condition IDs whose implementation differs from the fallback.
32const FV2610_OVERRIDES: &[u32] = &[500];
33
34impl ConditionEvaluator for InsrptConditionEvaluatorFV2610 {
35    fn message_type(&self) -> &str {
36        "INSRPT"
37    }
38
39    fn format_version(&self) -> &str {
40        "FV2610"
41    }
42
43    fn evaluate(&self, condition: u32, ctx: &EvaluationContext) -> ConditionResult {
44        match condition {
45            500 => self.evaluate_500(ctx),
46            other => self.fallback.evaluate(other, ctx),
47        }
48    }
49
50    fn is_external(&self, condition: u32) -> bool {
51        self.fallback.is_external(condition)
52    }
53
54    fn is_known(&self, condition: u32) -> bool {
55        FV2610_OVERRIDES.contains(&condition) || self.fallback.is_known(condition)
56    }
57}
58
59impl InsrptConditionEvaluatorFV2610 {
60    /// [500] Hinweis: Vorgangsnummer (DOC DE1004) aus Prozessschritt 4b „Bestätigung der Störungsmeldung“ (Gas) bzw. Prozessschritt 2 „Antwort“ (Strom).
61    fn evaluate_500(&self, _ctx: &EvaluationContext) -> ConditionResult {
62        // Hinweis: Vorgangsnummer (DOC DE1004) aus Prozessschritt 4b "Bestätigung der Störungsmeldung" (Gas) bzw. Prozessschritt 2 "Antwort" (Strom) — informational note, always applies
63        ConditionResult::True
64    }
65}