refactor(app): 去掉 App/protocol 层,104 迁入 App/iec60870/104_port

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。
This commit is contained in:
2026-11-18 14:15:10 +08:00
parent 263b00277e
commit c0cef2fca0
167 changed files with 29172 additions and 7007 deletions
+2 -2
View File
@@ -4,7 +4,7 @@
Historical bench leg; acceptance criteria: docs/子系统设计/IEC104上行设计说明.md §8.
docs/子系统设计/IEC104上行设计说明.md §3/§4. Constants mirror
App/protocol/iec104/iec104_asdu.h / iec104_link.h.
App/iec60870/104_port/iec104_asdu.h / iec104_link.h.
Flow:
1. TCP connect device :2404 (factory default; --port overrides),
@@ -78,7 +78,7 @@ COT_ACT, COT_ACTCON, COT_ACTTERM = 6, 7, 8
COT_PN = 0x40 # cause byte bit6: negative confirm
# NOTE(2026-10-25 m104fix): THIS SLAVE USES THE B4 IN-HOUSE 6-BYTE ASDU HEAD --
# T/PN/RBT FLAGS LIVE IN THE CAUSE BYTE (bit7/bit6/bit4), byte[3] IS OA+EVI(bit7).
# SEE App/protocol/iec104/iec104_asdu.c iec104_asdu_put_hdr(). The old RX path read
# SEE App/iec60870/104_port/iec104_asdu.c iec104_asdu_put_hdr(). The old RX path read
# PN from byte[3] (standard 2-byte-COT habit) -> pn was ALWAYS False and a rejected
# command logged cot=71 (7|0x40), so actcon_of(type, True) could never match.
# Bench proof 2026-10-25 (V5-gap replay): two out-of-range C_SE writes
+1 -1
View File
@@ -11,7 +11,7 @@
## 前置条件
- Real board: powered, reachable at `192.168.31.100`, firmware IEC104 listener on `2404`,
profile table matching `App/protocol/iec60870/examples/iec104_dtu_profile.h`.
profile table matching `App/iec60870/examples/iec104_dtu_profile.h`.
- Simulator: `simulator/build/Debug/lvgl_sim.exe` built with IEC104 headless CLI,
chosen port free, Windows `Get-NetTCPConnection` available for the LAN bind probe.
- All three scripts are Python 3 standard library only. They print ASCII only and
+4 -4
View File
@@ -19,7 +19,7 @@ def main():
args = parser.parse_args()
output = args.output.resolve()
output.mkdir(parents=True, exist_ok=True)
vendor = ROOT / "App/protocol/iec60870"
vendor = ROOT / "App/iec60870"
original = ROOT / "IEC60870-Slave/test"
cl, inc, lib = locate_toolchain()
if not cl:
@@ -49,13 +49,13 @@ def main():
fixture.write_text(text.replace(old, new), encoding="utf-8")
extra = []
if name == "source_binding_test":
extra = [ROOT / "App/protocol/iec104/iec104_source.c", ROOT / "App/protocol/iec104/iec104_dtu_table.c", vendor / "104/IEC104_Net_Windows.c", vendor / "104/IEC104_TcpServer.c"]
extra = [ROOT / "App/iec60870/104_port/iec104_source.c", ROOT / "App/iec60870/104_port/iec104_dtu_table.c", vendor / "104/IEC104_Net_Windows.c", vendor / "104/IEC104_TcpServer.c"]
if name == "core_lifecycle_test":
extra = [ROOT / "App/protocol/iec104/iec104_core.c", ROOT / "App/protocol/iec104/iec104_source.c", ROOT / "App/protocol/iec104/iec104_dtu_table.c"]
extra = [ROOT / "App/iec60870/104_port/iec104_core.c", ROOT / "App/iec60870/104_port/iec104_source.c", ROOT / "App/iec60870/104_port/iec104_dtu_table.c"]
flags = ["/nologo", "/std:c11", "/O2", "/W3", "/WX", "/utf-8", "/D_CRT_SECURE_NO_WARNINGS"]
if name == "iec104_remote_parameter_test":
flags += ["/DIEC104_REMOTE_PARAMETER_TEST_HOOKS", "/DIEC104_TCP_HIGH_CAPACITY=251"]
command = [cl] + flags + ["/I" + str(p) for p in include] + ["/I" + str(ROOT / "App/protocol/iec104")] + [str(fixture)] + [str(p) for p in sources + extra] + ["/Fe:" + str(target / (name + ".exe"))] + (["/link", "ws2_32.lib"] if extra else [])
command = [cl] + flags + ["/I" + str(p) for p in include] + ["/I" + str(ROOT / "App/iec60870/104_port")] + [str(fixture)] + [str(p) for p in sources + extra] + ["/Fe:" + str(target / (name + ".exe"))] + (["/link", "ws2_32.lib"] if extra else [])
build = subprocess.run(command, cwd=target, env=env, capture_output=True)
(target / "build.log").write_text(decode(build.stdout) + decode(build.stderr), encoding="utf-8")
row = {"name": name, "build_rc": build.returncode, "command": command, "fixture_sha256": hashlib.sha256(fixture.read_bytes()).hexdigest(), "adaptation": adaptation, "extra_sources_sha256": {str(p.relative_to(ROOT)): hashlib.sha256(p.read_bytes()).hexdigest() for p in extra}}
+3 -3
View File
@@ -2,20 +2,20 @@
## 交接说明(最终交付状态)
- **这组测试证明什么**:针对 `App/protocol/iec104/iec104_net_mcu.c`(被测 SHA256 `08ca22b9d61ec86181973ab97d7fab68ec8f0ecbf944bfd758e1546a80dc8b35`)的真实后端,在 fake net 层上证明 IEC104 Net ABI 契约:同 fd 语义下 Close 不毁监听、Pending_Input 精确/降级有界续收、Send 短写且不借用 buffer、Now_Ms 跨 32 位 tick 回绕单调、网络代次与句柄失效、断链重连、非 owner 入口拒绝、两句柄模型下代次重建后的监听存活(armed==1)与无 ABA、以及单 fd 会话的 Accept 一次性语义(已有 CLIENT/CLIENT_EOF 槽时 WOULD_BLOCK、零芯片事务、Close 后释放;旧语义"re-Accept 再发新句柄"已实测导致板端拆活连接,2026-11-18 台架)。最终实测:文本级静态 2/2、静态 checker 变异自测 `real_rc=0 mutant_rc=1`、动态 12/12(`real backend passed 12/12`)。
- **这组测试证明什么**:针对 `App/iec60870/104_port/iec104_net_mcu.c`(被测 SHA256 `08ca22b9d61ec86181973ab97d7fab68ec8f0ecbf944bfd758e1546a80dc8b35`)的真实后端,在 fake net 层上证明 IEC104 Net ABI 契约:同 fd 语义下 Close 不毁监听、Pending_Input 精确/降级有界续收、Send 短写且不借用 buffer、Now_Ms 跨 32 位 tick 回绕单调、网络代次与句柄失效、断链重连、非 owner 入口拒绝、两句柄模型下代次重建后的监听存活(armed==1)与无 ABA、以及单 fd 会话的 Accept 一次性语义(已有 CLIENT/CLIENT_EOF 槽时 WOULD_BLOCK、零芯片事务、Close 后释放;旧语义"re-Accept 再发新句柄"已实测导致板端拆活连接,2026-11-18 台架)。最终实测:文本级静态 2/2、静态 checker 变异自测 `real_rc=0 mutant_rc=1`、动态 12/12(`real backend passed 12/12`)。
- **这组测试不证明什么**:fake net 层只是按产品头语义实现,不是真实 CH395F 驱动或板端电路;**CH395F 板端行为未验**(同 fd 语义待板端确认);**core / TcpServer 集成未验**(完整 STARTDT 建链为 NOT_RUN);netTask 队列/临界区与板端时序未验;MCU WCET / 性能未测;真实后端编译期坏变体未做,历史 TEST DOUBLE B1~B7 仅证明 harness 有效性;S1/S2 是文本级静态检查,不覆盖宏展开或函数指针间接调用。禁止据此写“板端已验证”。
- **一条命令复现**(仓库根执行):`python test/host/iec104_netmcu/check_static_selftest.py && python test/host/iec104_netmcu/check_static.py && python test/host/iec104_netmcu/run_netmcu_tests.py && git diff --check -- test/host/iec104_netmcu`
- **产物在哪里**:本目录 `test/host/iec104_netmcu/`;最终动态证据 `results/real/{build.log,run.log,report.json}`,静态证据 `results/static/report.json`,静态 checker 变异自测 `results/static_mutant/{report.json,selftest.txt,iec104_net_mcu_BAD.c}`,历史 TEST DOUBLE 证据 `results/report.json` 与 `results/{good,B1..B7}/`。所有文件未提交、未改产品/供应商源码;第二步 serv 重写后待命做 `iec104_serv_net_tick` 针对性核查。
## 状态与边界
- 被测对象:`App/protocol/iec104/iec104_net_mcu.c`(真实板端 Net 后端,net-cutover 所有)对 `IEC104_Net.h` 的实现。
- 被测对象:`App/iec60870/104_port/iec104_net_mcu.c`(真实板端 Net 后端,net-cutover 所有)对 `IEC104_Net.h` 的实现。
- 测试替身:`net_socket_fake.{h,c}` 按产品 `Drivers/BSP/NET/net_socket.h` 声明模拟 `net_*` owner 出口(包括 `net_send_try` / `net_pending_bytes` / `net_mono_now_ms` / `net_accept_locked` / `net_drop_conn_locked` / `net_ctx_is_owner_task` 等),并受控注入单连接同 fd、短写 / WOULD_BLOCK / BUSY / RETRY_LATER、EOF / RST、网络代次变化、句柄非复用、芯片接收队列长度与 32 位 tick 回绕。绝不调用真实 CH395F 或 Windows socket。
- **CH395F 同 fd 语义(fake 已如实建模,板端仍待验证)**:`net_accept` / `net_accept_locked` 返回**监听 socket 自身**(`net_socket_fake.c:629-643` 的 `return sockfd;`),并为同一 fake fd 置 `established=1`;`net_close` 对监听 fd 会**真实销毁监听**并递增 `listen_closed_attempts`(`net_socket_fake.c:760-777`),而 `net_drop_conn` 只拆会话、保留监听(`net_socket_fake.c:779-797`)。因此 fake 不是 Winsock 式独立 fd 语义,N1/N8 断言的“Close 不毁监听”确实在同 fd 规则下判定;但这只是 fake 忠实模拟,**CH395F 实际行为仍待板端验证**。
- 本目录不进 `MDK-ARM/*.uvprojx`,不碰产品构建;只在主机侧用 MSVC 编译运行。
- 证据边界:这是 **真实后端 + fake net 层** 的 Net ABI 隔离证据,不等于完整 `iec104_core` / `TcpServer` 链路,不等于板端 CH395F / netTask 时序,也不是 MCU WCET。完整 STARTDT 建链流程仍为 NOT_RUN。
- Lead 三条口径:① `Now_Ms` = N-2(owner 周期采样),只测回绕后单调,不测“不调用也不漏记”;② `Pending_Input` 精确:RX=7 报 7、RX=0 报 0,不谎报 1/0;③ `Send` 返回后不借用 buffer:每次用不同源 buffer,返回即覆写,再断言 fake 内核中字节未被破坏。
- 已知平台偏离:CH395F 无 `setsockopt`,`App/protocol/iec104/iec104_net_mcu.h` 注释已入档;恒无 Nagle 视作平台事实,**不以 NODELAY 作为 OK 条件**。plan.md 的入档由 net-cutover 负责。
- 已知平台偏离:CH395F 无 `setsockopt`,`App/iec60870/104_port/iec104_net_mcu.h` 注释已入档;恒无 Nagle 视作平台事实,**不以 NODELAY 作为 OK 条件**。plan.md 的入档由 net-cutover 负责。
## 静态源码检查(先于动态用例)
+2 -2
View File
@@ -1,6 +1,6 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""Static acceptance checks for App/protocol/iec104/iec104_net_mcu.c.
"""Static acceptance checks for App/iec60870/104_port/iec104_net_mcu.c
S1: IEC104_Net_Close CLIENT/CLIENT_EOF branch must not contain net_close_sock.
S2: IEC104_Net_Recv rc==0 EOF branch must not call close/drop on the session.
@@ -13,7 +13,7 @@ import re
HERE = os.path.dirname(os.path.abspath(__file__))
ROOT = os.path.dirname(os.path.dirname(os.path.dirname(HERE)))
SRC = os.path.join(ROOT, "App", "protocol", "iec104", "iec104_net_mcu.c")
SRC = os.path.join(ROOT, "App", "iec60870", "104_port", "iec104_net_mcu.c")
OUT = os.path.join(HERE, "results", "static")
+1 -1
View File
@@ -1,6 +1,6 @@
/*
* IEC104 Net MCU backend isolation contract tests.
* Builds the REAL App/protocol/iec104/iec104_net_mcu.c against a fake net layer.
* Builds the REAL App/iec60870/104_port/iec104_net_mcu.c against a fake net layer.
* This is host-only evidence for the Net ABI, not full core/TcpServer or hardware.
*/
#include <stdio.h>
+8 -8
View File
@@ -1,12 +1,12 @@
{
"scope": "REAL backend App/protocol/iec104/iec104_net_mcu.c + fake net layer; host-only isolation evidence, not full core/TcpServer/hardware",
"backend_sha256": "4d6b8d9e8ed3404372f274d99c16bc87a06fecbee8db0b30b044b24d0562d73d",
"scope": "REAL backend App/iec60870/104_port/iec104_net_mcu.c + fake net layer; host-only isolation evidence, not full core/TcpServer/hardware",
"backend_sha256": "1bcb602946485156ce04b49343ece9525e8ed50f5d5ee0c1d580982e8d77ecd9",
"sources": {
"MATRIX.md": "e8c913cac2a852173f052ce806a3da101a272e2a4dff8751499fdcf39788deab",
"net_socket_fake.h": "d597375d1186b4801b4dc859401b6f3f0c9d1110efda37d0a9e73b810d7a8cd0",
"net_socket_fake.c": "8eb9ea5ed195b38e2f4993ac021ad19afa40464ff03de73628d3a795350a631e",
"netmcu_test.c": "09c203941c41fbb543580f45192c1604b984daaeb10135548756d4e42e8ebe02",
"check_static.py": "8f08695a6c6bffec6047558b5b6d0aff0c7393665853357d1176f61b1aac1132"
"MATRIX.md": "b17c25dabfc4ca17ec8befddafd420edcceb1bac69a65538c4f06b85c78d48eb",
"net_socket_fake.h": "c7c712256b5ac4b5162fd445319296dd32ada4abc6efa0384e65e2635bba38c9",
"net_socket_fake.c": "f86ecd73bae57daad7d5d9506a0a8b7158344ba0e01f0e1d16af0ebdbdac3578",
"netmcu_test.c": "65aa96163acf0ea38369f905027b8a3c8a9811bcf99aa5b4c8b874f21ea48ac1",
"check_static.py": "cd071b0a0d804f0e4a9123278a87ed413a4d2d6f1989dfc505689b1e49fdf115"
},
"case_count": 13,
"case_count_basis": "13 named cases; N2a/N2b are two cases in one N2 test function",
@@ -39,6 +39,6 @@
"MCU timing/WCET"
],
"known_deviations": [
"NODELAY: App/protocol/iec104/iec104_net_mcu.h comment; CH395F has no setsockopt, treated as always no-Nagle and NOT an OK condition"
"NODELAY: App/iec60870/104_port/iec104_net_mcu.h comment; CH395F has no setsockopt, treated as always no-Nagle and NOT an OK condition"
]
}
@@ -1,6 +1,6 @@
{
"source": "D:\\Code\\DTU Code\\STM32F4-Base\\.agents\\worktrees\\dsh-d2fd6422-281a\\App\\protocol\\iec104\\iec104_net_mcu.c",
"source_sha256": "4d6b8d9e8ed3404372f274d99c16bc87a06fecbee8db0b30b044b24d0562d73d",
"source": "D:\\Code\\DTU Code\\STM32F4-Base\\.agents\\worktrees\\dsh-d2fd6422-281a\\App\\iec60870\\104_port\\iec104_net_mcu.c",
"source_sha256": "1bcb602946485156ce04b49343ece9525e8ed50f5d5ee0c1d580982e8d77ecd9",
"checks": [
{
"id": "S1",
@@ -1,6 +1,6 @@
/* 模块名称:IEC 60870-5-104 板端 Net 后端(netTask 单 owner) */
/*
* 模块功能:实现 App/protocol/iec60870/104/IEC104_Net.h 的全部导出 ABI,
* 模块功能:实现 App/iec60870/104/IEC104_Net.h 的全部导出 ABI,
* 底层走 Drivers/BSP/NET/net_socket.h 的 net_* 接口。
* 适用平台:STM32F407ZGTx + CH395F;只在 netTask 上下文中调用(threadless)。
* 创建日期:2026-11-17(task-18 板端网络割接)
@@ -1,6 +1,6 @@
{
"source": "D:\\Code\\DTU Code\\STM32F4-Base\\.agents\\worktrees\\dsh-d2fd6422-281a\\test\\host\\iec104_netmcu\\results\\static_mutant\\iec104_net_mcu_BAD.c",
"source_sha256": "87bf283ec6b61ac14a0de3ab0f8a0352db4c62f03d4ea4479db36f9e0c546719",
"source_sha256": "6ede122b69d5ed0074bcff01c8dd30223a8e5e521f5d78fafdc97791e1d7790e",
"checks": [
{
"id": "S1",
@@ -1,4 +1,4 @@
real_rc=0
mutant_rc=1
real source: D:\Code\DTU Code\STM32F4-Base\.agents\worktrees\dsh-d2fd6422-281a\App\protocol\iec104\iec104_net_mcu.c
real source: D:\Code\DTU Code\STM32F4-Base\.agents\worktrees\dsh-d2fd6422-281a\App\iec60870\104_port\iec104_net_mcu.c
mutant: D:\Code\DTU Code\STM32F4-Base\.agents\worktrees\dsh-d2fd6422-281a\test\host\iec104_netmcu\results\static_mutant\iec104_net_mcu_BAD.c
+7 -7
View File
@@ -37,13 +37,13 @@ def run_real(cl, inc, lib):
sources = [
os.path.join(HERE, "netmcu_test.c"),
os.path.join(HERE, "net_socket_fake.c"),
os.path.join(ROOT, "App", "protocol", "iec104", "iec104_net_mcu.c"),
os.path.join(ROOT, "App", "iec60870", "104_port", "iec104_net_mcu.c"),
]
env = dict(os.environ)
env["INCLUDE"] = os.pathsep.join(inc + [
os.path.join(ROOT, "App", "protocol", "iec60870", "104"),
os.path.join(ROOT, "App", "protocol", "iec60870", "common"),
os.path.join(ROOT, "App", "protocol", "iec104"),
os.path.join(ROOT, "App", "iec60870", "104"),
os.path.join(ROOT, "App", "iec60870", "common"),
os.path.join(ROOT, "App", "iec60870", "104_port"),
os.path.join(ROOT, "Drivers", "BSP", "NET"),
os.path.join(HERE, "stub"),
os.path.join(ROOT, "test", "host", "net_socket", "stub"),
@@ -90,9 +90,9 @@ def main():
print("real: build_rc={} run_rc={} note={} failed_cases={}".format(
res["build_rc"], res["run_rc"], res["note"], res.get("failed_cases", [])))
report = {
"scope": "REAL backend App/protocol/iec104/iec104_net_mcu.c + fake net layer; host-only isolation evidence, not full core/TcpServer/hardware",
"scope": "REAL backend App/iec60870/104_port/iec104_net_mcu.c + fake net layer; host-only isolation evidence, not full core/TcpServer/hardware",
"backend_sha256": sha256(os.path.join(
ROOT, "App", "protocol", "iec104", "iec104_net_mcu.c")),
ROOT, "App", "iec60870", "104_port", "iec104_net_mcu.c")),
"sources": {f: sha256(os.path.join(HERE, f)) for f in [
"MATRIX.md", "net_socket_fake.h", "net_socket_fake.c",
"netmcu_test.c", "check_static.py"]},
@@ -102,7 +102,7 @@ def main():
"result": res,
"bad_variants": "NOT_RUN for real backend; TEST DOUBLE B1..B7 evidence retained in results_stub/report.json",
"not_run": ["full IEC104 STARTDT over core/TcpServer", "board CH395F", "MCU timing/WCET"],
"known_deviations": ["NODELAY: App/protocol/iec104/iec104_net_mcu.h comment; CH395F has no setsockopt, treated as always no-Nagle and NOT an OK condition"],
"known_deviations": ["NODELAY: App/iec60870/104_port/iec104_net_mcu.h comment; CH395F has no setsockopt, treated as always no-Nagle and NOT an OK condition"],
}
with open(os.path.join(OUT, "report.json"), "w", encoding="utf-8") as f:
json.dump(report, f, indent=2, ensure_ascii=False)
+1 -1
View File
@@ -35,7 +35,7 @@ BUILD = TestBuild(
src=os.path.join(HERE, "soe_test.c"),
include_dirs=[
os.path.join(ROOT, "App", "log"),
os.path.join(ROOT, "App", "protocol", "iec60870", "common"),
os.path.join(ROOT, "App", "iec60870", "common"),
HERE,
],
summary_marker="=== SOE Tests:",
+2 -2
View File
@@ -350,7 +350,7 @@ static void tc_yx_points(void)
/* 遥信行数 33 是**产品视图**的点数,不是协议点表的点数。这里是**有意**再抄一遍
* 字面量:测试的职责是独立见证,改点数时必须有人被绊一下——绊到后要同时改:
* ui_data.h 的 UI_DATA_YX_N、页面名表 ui_page_yx.c(有编译期数组守卫兜着)、本条。
* 历史:割接前 33 同时等于旧产品点表 App/protocol/iec104/iec104_pts.c 的 YX_N
* 历史:割接前 33 同时等于旧产品点表 App/iec60870/104_port/iec104_pts.c 的 YX_N
* (该文件 2026-11-17 通信骨架割接已删除);现在协议侧是 DTU 标准表
* iec104_dtu_table.c 的 SP 59 + DP 16 = 75 个遥信点,**两者语义不同、数值本就不等**,
* 写侧 ui_data_feed.c 留了一条一次性 DBG_ERROR 把这个差异显式化,不改显示 */
@@ -1309,7 +1309,7 @@ static void tc_maint_forwarding(void)
(void)ui_data_maint_oper_note("force reset by panel");
CHECK((s_stub_note_calls == 1) && (strcmp(s_stub_note_last, "force reset by panel") == 0),
"TC-UIDATA-026i page-side note reaches executor verbatim");
/* 面板这条与远端 YK11 那条(App/protocol/iec104/iec104_pts.c 投的
/* 面板这条与远端 YK11 那条(App/iec60870/104_port/iec104_pts.c 投的
* "force reset")必须是不同串,否则审计面再也分不出"主站下发的"还是
* "现场有人按了面板"。比的是执行侧缓冲里的实际内容,不是两个常量互比 */
CHECK(strcmp(s_stub_note_last, "force reset") != 0,