refactor(iec104): 把 104_port 适配层并入 104,协议栈只剩一个目录

104 从 App/protocol 迁入 App/iec60870 时,协议核心(common/ 104/ examples/)
与我方平台适配层(原 104_port/)仍分成两个平行目录。既然这个库已转为项目自有
代码,适配层没有独立存在的理由——它本来就是对协议的装配与平台后端。

本次只做目录合并,不动任何协议逻辑:

- App/iec60870/104_port/ 的 11 个文件全部移入 App/iec60870/104/
  (iec104_core / iec104_source / iec104_source_ranks / iec104_net_mcu /
  iec104_dtu_table / iec104_comm 的 .c/.h),空目录删除
- Keil 删掉 ../App/iec60870/104_port include 路径;模拟器 CMake 把重复的
  104_port include 行合并进既有的 IEC60870_DIR/104
- 单测运行器里硬拼的 "104_port" 路径段改成 "104"(rename_ref 只认斜杠形态)
- .pre-commit-config.yaml 的 iec104-tcp 触发面去掉 104_port 前缀;coding-standard
  的排除注释改写为「库已转为自有代码,排除项待收编完成后删除」
- 文档与生成物同步:项目架构总览、软件架构与运行时规格、IEC104 上行设计说明、
  产品需求、网络配置说明、App/README、仓根 README,以及引用关系图与架构 SVG

验证(均为实跑):
- Keil UV4 RC=0,0 errors 0 warnings,Code=367464 RO=48492 RW=2288 ZI=173544
- 模拟器构建 OK,编译告警 0,iec104-tcp 13/13 真实 TCP 回环通过
- 受影响单测:iec104_comm 50/50、iec104_serv 50/50、iec104_netmcu 13/13 与
  static 2/2、soe 32/32、iec104_dtu 7 tests OK
- 覆盖率门禁 RC=0,line 8204/9185 (89.3%),49/49 套件
- 全仓 104_port 残留:仅 App/README 里一句「原 104_port 并入 104」的历史说明
This commit is contained in:
2026-11-18 19:17:25 +08:00
parent d8d8fbe081
commit 13ed84a0f0
53 changed files with 6019 additions and 5579 deletions
+13 -13
View File
@@ -144,7 +144,7 @@
"lines_covered": 33,
"lines_valid": 33
},
"App/iec60870/104_port/iec104_comm.c": {
"App/iec60870/104/iec104_comm.c": {
"func_rate": 1.0,
"funcs_covered": 7,
"funcs_valid": 7,
@@ -511,14 +511,14 @@
},
"iec104_comm": {
"files": {
"App/iec60870/104_port/iec104_comm.c": 50
"App/iec60870/104/iec104_comm.c": 50
},
"lines_total": 50,
"ok": true
},
"iec104_serv": {
"files": {
"App/iec60870/104_port/iec104_comm.c": 50,
"App/iec60870/104/iec104_comm.c": 50,
"App/task/iec104_serv.c": 102
},
"lines_total": 152,
@@ -835,7 +835,7 @@
"App/cfg/prot_set_store.c",
"App/fs/vol_idle_sync.c",
"App/fs/vol_lock.c",
"App/iec60870/104_port/iec104_comm.c",
"App/iec60870/104/iec104_comm.c",
"App/iec60870/common/IEC60870_Time.c",
"App/log/console_log.c",
"App/log/soe_rec.c",
@@ -952,7 +952,7 @@
},
{
"code_lines": 640,
"path": "App/iec60870/104_port/iec104_core.c"
"path": "App/iec60870/104/iec104_core.c"
},
{
"code_lines": 597,
@@ -976,7 +976,7 @@
},
{
"code_lines": 489,
"path": "App/iec60870/104_port/iec104_source.c"
"path": "App/iec60870/104/iec104_source.c"
},
{
"code_lines": 465,
@@ -988,7 +988,7 @@
},
{
"code_lines": 441,
"path": "App/iec60870/104_port/iec104_net_mcu.c"
"path": "App/iec60870/104/iec104_net_mcu.c"
},
{
"code_lines": 375,
@@ -1268,7 +1268,7 @@
},
{
"code_lines": 75,
"path": "App/iec60870/104_port/iec104_dtu_table.c"
"path": "App/iec60870/104/iec104_dtu_table.c"
},
{
"code_lines": 74,
@@ -1336,7 +1336,7 @@
},
{
"code_lines": 49,
"path": "App/iec60870/104_port/iec104_source.h"
"path": "App/iec60870/104/iec104_source.h"
},
{
"code_lines": 47,
@@ -1436,7 +1436,7 @@
},
{
"code_lines": 35,
"path": "App/iec60870/104_port/iec104_core.h"
"path": "App/iec60870/104/iec104_core.h"
},
{
"code_lines": 34,
@@ -1484,7 +1484,7 @@
},
{
"code_lines": 31,
"path": "App/iec60870/104_port/iec104_net_mcu.h"
"path": "App/iec60870/104/iec104_net_mcu.h"
},
{
"code_lines": 31,
@@ -1504,7 +1504,7 @@
},
{
"code_lines": 30,
"path": "App/iec60870/104_port/iec104_dtu_table.h"
"path": "App/iec60870/104/iec104_dtu_table.h"
},
{
"code_lines": 29,
@@ -1584,7 +1584,7 @@
},
{
"code_lines": 23,
"path": "App/iec60870/104_port/iec104_comm.h"
"path": "App/iec60870/104/iec104_comm.h"
},
{
"code_lines": 23,