update mubea with BTMT information
This commit is contained in:
@@ -300,6 +300,21 @@ def build_sensor_merkmale(block):
|
||||
}
|
||||
|
||||
|
||||
def build_btmt_merkmale(block):
|
||||
"""Merkmale-Dict fuer eine eigenstaendige BTMT-Beladung/SC_Entladung-Station
|
||||
(siehe pattern_btmt_beladung/pattern_btmt_entladung in cfg/export.cfg).
|
||||
|
||||
Anders als build_sensor_merkmale ohne "Zuordnung": eine BTMT-Station ist
|
||||
keinem Kreisel/GF/VF-Carrier zugeordnet, das ZUORDNUNG-Attribut existiert
|
||||
hier nicht."""
|
||||
attribs = block.get("attribs", {})
|
||||
return {
|
||||
"ARTINR": attribs.get("ARTINR", ""),
|
||||
"Höhe": get_hoehe(block),
|
||||
"Drehung": get_drehung(block),
|
||||
}
|
||||
|
||||
|
||||
def format_sensor_id(prefix, n):
|
||||
"""Fallback-TeileId fuer Separator/Scanner-Zeilen im CSV-Export, falls das
|
||||
Block-Attribut "ID" (noch) leer ist.
|
||||
@@ -581,6 +596,8 @@ def process_blocks(blocks, lookup, dbg=None):
|
||||
strecke_modul_count = 0
|
||||
separator_count = 0
|
||||
scanner_count = 0
|
||||
btmt_beladung_count = 0
|
||||
btmt_entladung_count = 0
|
||||
|
||||
# Zaehlung fuer die Omniflo-Sum-Zeile (nur Bogen/Weiche/Gerade)
|
||||
cnt_wk = cnt_einzel = cnt_delta = cnt_doppel = cnt_stern = 0
|
||||
@@ -798,6 +815,39 @@ def process_blocks(blocks, lookup, dbg=None):
|
||||
})
|
||||
continue
|
||||
|
||||
# BTMT-Beladestation - eigene TeileArt-Zeile, sonst analog zu Separator/
|
||||
# Scanner oben. Anders als dort NICHT von export_sivas.py ausgeschlossen
|
||||
# (siehe SEP_SCANNER_PATTERNS-Kommentar) - eine BTMT-Station wird von
|
||||
# keinem anderen Element mitgezaehlt.
|
||||
if matches_any(bname, BLOCKPATTERNS.get("pattern_btmt_beladung", [])):
|
||||
elem_nr += 1
|
||||
btmt_beladung_count += 1
|
||||
items.append({
|
||||
"nr": elem_nr,
|
||||
"teileart": "ILS 2.0 BTMT Beladung",
|
||||
"teileid": block.get("attribs", {}).get("ID") or format_sensor_id("BEL", btmt_beladung_count),
|
||||
"bezeichnung": f"BTMT Beladung :{btmt_beladung_count}",
|
||||
"planquadrat": planquadrat_column(block, planquadrat_cfg),
|
||||
"merkmale": build_btmt_merkmale(block),
|
||||
**bbox_columns(block),
|
||||
})
|
||||
continue
|
||||
|
||||
# BTMT-Entladestation (Abwurfstation) - analog zur Beladestation oben.
|
||||
if matches_any(bname, BLOCKPATTERNS.get("pattern_btmt_entladung", [])):
|
||||
elem_nr += 1
|
||||
btmt_entladung_count += 1
|
||||
items.append({
|
||||
"nr": elem_nr,
|
||||
"teileart": "ILS 2.0 BTMT Entladung",
|
||||
"teileid": block.get("attribs", {}).get("ID") or format_sensor_id("ENT", btmt_entladung_count),
|
||||
"bezeichnung": f"BTMT Entladung :{btmt_entladung_count}",
|
||||
"planquadrat": planquadrat_column(block, planquadrat_cfg),
|
||||
"merkmale": build_btmt_merkmale(block),
|
||||
**bbox_columns(block),
|
||||
})
|
||||
continue
|
||||
|
||||
if has_omniflo:
|
||||
elem_nr += 1
|
||||
items.append({
|
||||
|
||||
Reference in New Issue
Block a user