fix(builder): AnalogPoint 보조 QV(AuxiliaryNameA*) 레지스터 생성

FIQ 류 적산기는 QV(적산)가 FlexibleParameter가 아니라 AnalogPoint 보조슬롯
(AuxiliaryNameA{n}=QV ↔ SourceAddressA{n})에 노출된다. 빌더는 FlexibleParameter
에서만 .QV를 만들어 FICQ-*.QV는 잡았지만 FIQ-*.QV(스팀 적산 등)를 전부 놓쳤다.
→ 리포트(energy_intensity_qv 등)가 의존하는 태그가 register-map/map_master에서
누락되어 archive 기준 '삭제대상'으로 오분류, 라이브 폴링도 안 됐음.

AnalogPoint else 분기에 보조 A1~A4 처리 추가: 이름 있는 보조슬롯을 실제
SourceAddress로 해석해 {item}.{AuxName} 엔트리 생성, QV=연속 누적값→archive=TRUE.
realtime=False(기존 .QV/FlexibleParameter와 동일 정책).

검증(dry build): C3 FIQ-6115/6215/8115.QV, C4 FIQ-9115/9215/10115/10215.QV 등이
실제 주소(8390 등)·archive=true로 생성. 커밋맵 대비 순수 추가(제거 0).
→ map 재빌드 시 keep 분류 자동 유지 + 라이브 적산 폴링 가능.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
windpacer
2026-06-18 20:55:44 +09:00
parent 1d54b80160
commit 47149253aa

View File

@@ -516,6 +516,30 @@ def build_registers(sinam_path: Path, controller: str,
r['type'], access, f'{cls} {attr}', is_analog)
produced = True
# 보조 파라미터 A1~A4: FIQ 류 적산기는 QV(적산)가 FlexibleParameter가 아니라
# AnalogPoint 보조슬롯(AuxiliaryNameA{n}=QV ↔ SourceAddressA{n})에 노출된다.
# FICQ 류(QV=FlexibleParameter)와 달리 빌더가 놓쳤던 부분. QV=연속 누적값→archive.
if is_analog:
for n in (1, 2, 3, 4):
aux_name = gv(row, f'AuxiliaryNameA{n}')
aux_src = gv(row, f'SourceAddressA{n}')
if not aux_name or not aux_src:
continue
r = resolve_one(aux_src, controller_num)
if not r:
continue
dst = gv(row, f'DestinationAddressA{n}')
access = 'RW' if dst else r['access']
write_addr = r['addr']
if dst:
dres = resolve_one(dst, controller_num)
if dres:
write_addr = dres['addr']
aux_archive = (aux_name.upper() == 'QV')
add_entry(f'{item_name}.{aux_name}', r['addr'], write_addr, r['count'],
r['type'], access, f'{cls} aux {aux_name}', aux_archive, realtime=False)
produced = True
# 베이스 태그 메타데이터 (이 컨트롤러에 속해 엔트리가 생성된 경우 1회)
if produced and db_conn and item_name not in meta_upserted:
meta_upserted.add(item_name)