c0cef2fca0
IEC 60870 是标准族(含 104/101),原 App/protocol/ 把它拆成
iec60870/(vendor 核心)+ iec104/(我方适配)两棵同级树,多一层且
看不出「104 只维护一个」。现按标准族收口:
App/protocol/iec60870 -> App/iec60870
App/protocol/iec104 -> App/iec60870/104_port
App/protocol/{README.md,.gitkeep} 删除
App/protocol/iec104/iec104_asdu.h 删除(零 include / 零注册的孤儿)
vendor 子树(104/ common/ examples/)逐字节未改:91 个 R100 重命名、
git diff --cached -M 后 0 insertions / 0 deletions,另按字节直比 89/89
一致;UPSTREAM.sha256 差异集仍等于既有 17 项受控差异,非篡改。
适配层只改注释里的路径字样,无逻辑行。
门禁配套:
- coding-standard 的 exclude 不能写祖先 App/iec60870/——rename_ref 机械
改出的祖先形态会把 2,191 行适配层一起豁免掉。改为三条精确前缀
common/ 104/ examples/,适配层 11/11 回到受检;vendor 直调脚本仍报
88 处违规而钩子 Skipped,证明确实由 exclude 生效而非空跑。
- check_registration 的 KNOWN_GAPS 键与理由文本同步到新路径。
验证:Keil 0 errors 0 warnings(Code=367464 RO-data=48492
RW-data=2288 ZI-data=173544),构建日志与 .d 依赖证明 5 个适配 .o
真被编入;模拟器 0 警告并跑通 iec104-tcp 13/13 真实 TCP 回环;
pre-commit 25 Passed / 0 Failed;doc-links 30 处问题全在
IEC60870-Slave/ 供应商快照,我方文档零新增。
顺带删掉仓根误入库且零引用的 _all_hook.txt 与 _scope.txt。
2.9 KiB
2.9 KiB
IEC104 probe runbook (tracked acceptance assets)
什么时候跑
| Script | When | Exit codes |
|---|---|---|
verify_board_acceptance.py |
After DTU firmware/point-table changes, against a real board | 0 all checks pass, 1 a check fails, 2 connection/protocol error |
verify_simulator_lan_bind.py |
After simulator bind-address/CLI change or before a LAN bench session | 0 wildcard listener and local handshake pass, 1 assertion fails, 2 missing exe/tooling error |
verify_simulator_duration_evidence.py |
Before quoting STOP-summary counters, when a clean finite-duration run is needed | 0 refusals/clock/completion and exit status pass, 1 behaviour fails, 2 startup/read error |
前置条件
- Real board: powered, reachable at
192.168.31.100, firmware IEC104 listener on2404, profile table matchingApp/iec60870/examples/iec104_dtu_profile.h. - Simulator:
simulator/build/Debug/lvgl_sim.exebuilt with IEC104 headless CLI, chosen port free, WindowsGet-NetTCPConnectionavailable for the LAN bind probe. - All three scripts are Python 3 standard library only. They print ASCII only and use exit codes as their verdict; redirect stdout/stderr to a log file for evidence.
verify_board_acceptance.pyimportswire.pybeside itself; run from anywhere withpython <repo>/test/host/iec104_dtu/verify_board_acceptance.py ....
怎么跑
From repository root:
python -B test/host/iec104_dtu/verify_board_acceptance.py --help
python -B test/host/iec104_dtu/verify_board_acceptance.py --host 192.168.31.100 --port 2404
python -B test/host/iec104_dtu/verify_simulator_lan_bind.py --help
python -B test/host/iec104_dtu/verify_simulator_lan_bind.py --duration 12
python -B test/host/iec104_dtu/verify_simulator_duration_evidence.py --help
python -B test/host/iec104_dtu/verify_simulator_duration_evidence.py \
--exe simulator/build/Debug/lvgl_sim.exe --port 24040 --duration 10 \
--output ci-artifacts/iec104-tests/duration-evidence
判据
- Board: GI terminates; all mapped measurements present;
SP 59/59andDP 16/16; commandC_SC_NA_1is refused with COT 7 and P/N=1;C_CS_NA_1is confirmed. - LAN bind: OS listener is
0.0.0.0owned by the simulator PID; STARTDT handshake replies68040b000000; process exits 0 and the listener disappears. This is same-host evidence only, not proof that another LAN device can pass through a firewall. - Duration evidence: two refused
C_SC_NA_1commands produce only COT 7/P/N=1; no COT 10 or COT 11 follows; clock read replies; simulator exits 0 andsimulator.logcontains its STOP summary line withsimulated_actions=.
分类与历史来源
PROBE_INDEX.md lists every rescued script and its A/B/C disposition. One-off design
measurements were intentionally not placed in test/host/; their original paths under
ci-artifacts/ are ignored by git and may disappear, but they are not needed to repeat
protocol acceptance.