fix(iec104): 拒绝 SN!=0 的假成功写入,并删除 prot_set 的错误第二真源
问题一(安全级):绑定真实参数源后,Type203 走 SN=1..4 的预置与固化会回 COT=7 肯定确认,但 parameter_apply 一次都没被调用 —— 区域 1..4 的分段项在 mapped() 里凑不出 changes[],commit_stage() 的 n==0 让 apply 被跳过,而 values[] 与 parameter_commits 照旧更新,回读也返回出厂镜像冒充当前值。 主站看到"改成功",保护定值一个字没动。 修法:remote_action() 在绑定真实源后对 SN!=0 一律否定确认;remote_lookup() 对 SN!=0 的读返回错误而不是镜像;READ_AREA 绑定后只报区域 0;提交计数移到 真调过 apply 之后。未绑定模拟面保留 0..4 与原有语义,模拟器不受影响。 新增 preset_to_prot_set_test:真实 TCP 夹具 + 手写线上字节,链接 iec104_core/iec104_source/iec104_dtu_table/prot_set,钉住五条契约。四个 变异体(删入口守卫、计数移回无条件、删读侧守卫、READ_AREA 恒报 4)分别 红在对应断言上,证明用例不是为变绿而放松。 问题二:prot_set 的 g_prot_set_meta[].comm_addr 是与语义桥表冲突的错误 第二真源,17 项里 13 项地址指向完全不同的点表语义(如 0x8842 过流一段 定值被标成检同期压差闭锁定值),另有 10 项地址在点表里根本不存在。产品 代码零引用,但 adc_cal.h 已把它当"变比的家"引用,等于给错表盖章。 修法:删除 comm_addr 字段与全部地址注释,元数据表改 4 字段;协议地址的 唯一真源是 iec104_dtu_table.c 的 17 项语义桥表。同步改 check_setview_limits 的 meta 解析、两处单测与四篇活文档。armcc 实测 .constdata 640 B 不变。 验证:Keil 0 错误 0 警告(Code=365,928 / RO=45,764 / RW=2,752 / ZI=168,392,RW_IRAM1=113,720 B / 86.76%);transport 11/11、真实 TCP 验收 13/13、prot_set 173/173、prot_elm 60/60、prot_dim 44/44、 prot_set_store 16/16、adc_cal 150/150、iec104_serv 60/60、iec104_dtu 7/7;check_setview_limits 40/40/40 OK;模拟器构建 OK;pre-commit RC=0。
This commit is contained in:
+50
-46
@@ -6,7 +6,12 @@
|
||||
* 本文件不认识任何 RTOS/HAL 符号——固件、模拟器、主机单测三方共用同一份源码。
|
||||
*
|
||||
* ⚠ 默认值/范围为拟定值(参考 EEPROM 出厂默认表不在本仓库,规划 §10.3 待补);
|
||||
* 通讯地址逐项对照参考 Comm/Pub/Const_CommSetPara.c g_tCommSetParaTab。
|
||||
* 历史注释曾写"通讯地址逐项对照参考 Comm/Pub/Const_CommSetPara.c
|
||||
* g_tCommSetParaTab"——该对照已被证明不成立:参考表未进仓库,2026-11-19
|
||||
* 与点表逐条比对发现拟定地址 17 个消费者里 13 个指向完全不同功能。
|
||||
* 协议地址(IOA)改由 App/iec60870/104/iec104_dtu_table.c 的
|
||||
* iec104_dtu_protection_mapping() 桥表唯一持有(17 项,含 scale),本模块
|
||||
* 只描述定值语义/范围/默认值,不再存任何地址字段。
|
||||
*
|
||||
* 量纲口径(「数据可信」下游常数按工程量重定一项复核,2026-10-25):A/V 项 = **二次值**工程量,
|
||||
* 标称基准 100 V / 1 A(UA/UB/UC 相电压、3U0、OV/UV 同域——OV 120 = 1.2×Un、
|
||||
@@ -20,53 +25,52 @@
|
||||
*/
|
||||
#include "prot_set.h"
|
||||
|
||||
/* 元数据表:顺序必须与 prot_set_id_t 严格一致(逐行带地址注释,同 phasor
|
||||
* k_inst 的朴素行式风格) */
|
||||
/* 元数据表:顺序必须与 prot_set_id_t 严格一致(逐行 ctl/def/min/max,同 phasor
|
||||
* k_inst 的朴素行式风格);协议地址不在此表,唯一真源见文件头说明 */
|
||||
const prot_set_meta_t g_prot_set_meta[PS_ID_COUNT] = {
|
||||
/* addr ctl default min max 说明 */
|
||||
{ 0x8856, 1u, PROT_SET_Q10(1), 0, PROT_SET_Q10(1) }, /* OC1 投退 */
|
||||
{ 0x8857, 1u, PROT_SET_Q10(1), 0, PROT_SET_Q10(1) }, /* OC1 跳闸投退 */
|
||||
{ 0x8858, 0u, PROT_SET_Q10(10.0), 0, PROT_SET_Q10(100.0) }, /* OC1 电流 A */
|
||||
{ 0x8859, 0u, PROT_SET_Q10(0.0), 0, PROT_SET_Q10(60000) }, /* OC1 延时 ms */
|
||||
{ 0x885A, 1u, PROT_SET_Q10(1), 0, PROT_SET_Q10(1) },
|
||||
{ 0x885B, 1u, PROT_SET_Q10(1), 0, PROT_SET_Q10(1) },
|
||||
{ 0x885C, 0u, PROT_SET_Q10(5.0), 0, PROT_SET_Q10(100.0) },
|
||||
{ 0x885D, 0u, PROT_SET_Q10(500.0), 0, PROT_SET_Q10(60000) },
|
||||
{ 0x885E, 1u, PROT_SET_Q10(1), 0, PROT_SET_Q10(1) },
|
||||
{ 0x885F, 1u, PROT_SET_Q10(0), 0, PROT_SET_Q10(1) }, /* OC3 默认告警 */
|
||||
{ 0x8860, 0u, PROT_SET_Q10(2.0), 0, PROT_SET_Q10(100.0) },
|
||||
{ 0x8861, 0u, PROT_SET_Q10(3000.0), 0, PROT_SET_Q10(60000) },
|
||||
{ 0x8871, 1u, PROT_SET_Q10(1), 0, PROT_SET_Q10(1) }, /* 过负荷投退 */
|
||||
{ 0x8872, 1u, PROT_SET_Q10(0), 0, PROT_SET_Q10(1) }, /* 默认告警 */
|
||||
{ 0x8873, 0u, PROT_SET_Q10(1.0), 0, PROT_SET_Q10(100.0) },
|
||||
{ 0x8874, 0u, PROT_SET_Q10(10000.0),0, PROT_SET_Q10(60000) },
|
||||
{ 0x0000, 1u, PROT_SET_Q10(1), 0, PROT_SET_Q10(1) }, /* OV 投退(本地) */
|
||||
{ 0x8029, 0u, PROT_SET_Q10(120.0), 0, PROT_SET_Q10(200.0) }, /* 过压 V */
|
||||
{ 0x802A, 0u, PROT_SET_Q10(10000.0),0, PROT_SET_Q10(60000) },
|
||||
{ 0x0000, 1u, PROT_SET_Q10(1), 0, PROT_SET_Q10(1) }, /* UV 投退(本地) */
|
||||
{ 0x8027, 0u, PROT_SET_Q10(20.0), 0, PROT_SET_Q10(200.0) }, /* 欠压 V */
|
||||
{ 0x8028, 0u, PROT_SET_Q10(10000.0),0, PROT_SET_Q10(60000) },
|
||||
{ 0x888E, 1u, PROT_SET_Q10(1), 0, PROT_SET_Q10(1) }, /* 3U0 投退 */
|
||||
{ 0x888F, 0u, PROT_SET_Q10(15.0), 0, PROT_SET_Q10(200.0) }, /* 3U0 V */
|
||||
{ 0x8890, 0u, PROT_SET_Q10(5000.0), 0, PROT_SET_Q10(60000) },
|
||||
{ 0x0000, 0u, PROT_SET_Q10(0.95), PROT_SET_Q10(0.5), PROT_SET_Q10(1.0) }, /* 过量返回系数 */
|
||||
{ 0x0000, 0u, PROT_SET_Q10(1.05), PROT_SET_Q10(1.0), PROT_SET_Q10(1.5) }, /* 欠量返回系数 */
|
||||
{ 0x8820, 0u, PROT_SET_Q10(10000.0),PROT_SET_Q10(100.0), PROT_SET_Q10(500000.0) },
|
||||
{ 0x8821, 0u, PROT_SET_Q10(100.0), PROT_SET_Q10(1.0), PROT_SET_Q10(200.0) },
|
||||
{ 0x8825, 0u, PROT_SET_Q10(100.0), PROT_SET_Q10(1.0), PROT_SET_Q10(10000.0) },
|
||||
{ 0x8826, 0u, PROT_SET_Q10(5.0), PROT_SET_Q10(1.0), PROT_SET_Q10(10.0) },
|
||||
{ 0x0000, 1u, PROT_SET_Q10(1), 0, PROT_SET_Q10(1) }, /* 全局软压板投退(YK12,B7) */
|
||||
/* --- 过频 / 低频(B8):地址全 0 = 本地项(参考逐项地址不在
|
||||
* 本仓库,规划 §5.1 仅示"8820~8882 含低压/低频"类目);
|
||||
/* ctl default min max 说明 */
|
||||
{ 1u, PROT_SET_Q10(1), 0, PROT_SET_Q10(1) }, /* OC1 投退 */
|
||||
{ 1u, PROT_SET_Q10(1), 0, PROT_SET_Q10(1) }, /* OC1 跳闸投退 */
|
||||
{ 0u, PROT_SET_Q10(10.0), 0, PROT_SET_Q10(100.0) }, /* OC1 电流 A */
|
||||
{ 0u, PROT_SET_Q10(0.0), 0, PROT_SET_Q10(60000) }, /* OC1 延时 ms */
|
||||
{ 1u, PROT_SET_Q10(1), 0, PROT_SET_Q10(1) },
|
||||
{ 1u, PROT_SET_Q10(1), 0, PROT_SET_Q10(1) },
|
||||
{ 0u, PROT_SET_Q10(5.0), 0, PROT_SET_Q10(100.0) },
|
||||
{ 0u, PROT_SET_Q10(500.0), 0, PROT_SET_Q10(60000) },
|
||||
{ 1u, PROT_SET_Q10(1), 0, PROT_SET_Q10(1) },
|
||||
{ 1u, PROT_SET_Q10(0), 0, PROT_SET_Q10(1) }, /* OC3 默认告警 */
|
||||
{ 0u, PROT_SET_Q10(2.0), 0, PROT_SET_Q10(100.0) },
|
||||
{ 0u, PROT_SET_Q10(3000.0), 0, PROT_SET_Q10(60000) },
|
||||
{ 1u, PROT_SET_Q10(1), 0, PROT_SET_Q10(1) }, /* 过负荷投退 */
|
||||
{ 1u, PROT_SET_Q10(0), 0, PROT_SET_Q10(1) }, /* 默认告警 */
|
||||
{ 0u, PROT_SET_Q10(1.0), 0, PROT_SET_Q10(100.0) },
|
||||
{ 0u, PROT_SET_Q10(10000.0),0, PROT_SET_Q10(60000) },
|
||||
{ 1u, PROT_SET_Q10(1), 0, PROT_SET_Q10(1) }, /* OV 投退(本地) */
|
||||
{ 0u, PROT_SET_Q10(120.0), 0, PROT_SET_Q10(200.0) }, /* 过压 V */
|
||||
{ 0u, PROT_SET_Q10(10000.0),0, PROT_SET_Q10(60000) },
|
||||
{ 1u, PROT_SET_Q10(1), 0, PROT_SET_Q10(1) }, /* UV 投退(本地) */
|
||||
{ 0u, PROT_SET_Q10(20.0), 0, PROT_SET_Q10(200.0) }, /* 欠压 V */
|
||||
{ 0u, PROT_SET_Q10(10000.0),0, PROT_SET_Q10(60000) },
|
||||
{ 1u, PROT_SET_Q10(1), 0, PROT_SET_Q10(1) }, /* 3U0 投退 */
|
||||
{ 0u, PROT_SET_Q10(15.0), 0, PROT_SET_Q10(200.0) }, /* 3U0 V */
|
||||
{ 0u, PROT_SET_Q10(5000.0), 0, PROT_SET_Q10(60000) },
|
||||
{ 0u, PROT_SET_Q10(0.95), PROT_SET_Q10(0.5), PROT_SET_Q10(1.0) }, /* 过量返回系数 */
|
||||
{ 0u, PROT_SET_Q10(1.05), PROT_SET_Q10(1.0), PROT_SET_Q10(1.5) }, /* 欠量返回系数 */
|
||||
{ 0u, PROT_SET_Q10(10000.0),PROT_SET_Q10(100.0), PROT_SET_Q10(500000.0) },
|
||||
{ 0u, PROT_SET_Q10(100.0), PROT_SET_Q10(1.0), PROT_SET_Q10(200.0) },
|
||||
{ 0u, PROT_SET_Q10(100.0), PROT_SET_Q10(1.0), PROT_SET_Q10(10000.0) },
|
||||
{ 0u, PROT_SET_Q10(5.0), PROT_SET_Q10(1.0), PROT_SET_Q10(10.0) },
|
||||
{ 1u, PROT_SET_Q10(1), 0, PROT_SET_Q10(1) }, /* 全局软压板投退(YK12,B7) */
|
||||
/* --- 过频 / 低频(B8):本地项(不在 104 桥表内,C_RD/C_SE 不可寻址);
|
||||
* 默认值/范围**拟定**(DTU 馈线典型量级),待对照参考出厂表修订 --- */
|
||||
{ 0x0000, 1u, PROT_SET_Q10(1), 0, PROT_SET_Q10(1) }, /* OF 投退(本地) */
|
||||
{ 0x0000, 0u, PROT_SET_Q10(51.0), PROT_SET_Q10(50.0), PROT_SET_Q10(55.0) }, /* OF 动作频率 Hz */
|
||||
{ 0x0000, 0u, PROT_SET_Q10(1000.0), 0, PROT_SET_Q10(60000) }, /* OF 延时 ms */
|
||||
{ 0x0000, 1u, PROT_SET_Q10(1), 0, PROT_SET_Q10(1) }, /* UF 投退(本地) */
|
||||
{ 0x0000, 0u, PROT_SET_Q10(49.0), PROT_SET_Q10(45.0), PROT_SET_Q10(50.0) }, /* UF 动作频率 Hz */
|
||||
{ 0x0000, 0u, PROT_SET_Q10(1000.0), 0, PROT_SET_Q10(60000) }, /* UF 延时 ms */
|
||||
{ 0x0000, 0u, PROT_SET_Q10(0.99), PROT_SET_Q10(0.9), PROT_SET_Q10(1.0) }, /* 过频返回系数 */
|
||||
{ 0x0000, 0u, PROT_SET_Q10(1.01), PROT_SET_Q10(1.0), PROT_SET_Q10(1.1) }, /* 低频返回系数 */
|
||||
{ 1u, PROT_SET_Q10(1), 0, PROT_SET_Q10(1) }, /* OF 投退(本地) */
|
||||
{ 0u, PROT_SET_Q10(51.0), PROT_SET_Q10(50.0), PROT_SET_Q10(55.0) }, /* OF 动作频率 Hz */
|
||||
{ 0u, PROT_SET_Q10(1000.0), 0, PROT_SET_Q10(60000) }, /* OF 延时 ms */
|
||||
{ 1u, PROT_SET_Q10(1), 0, PROT_SET_Q10(1) }, /* UF 投退(本地) */
|
||||
{ 0u, PROT_SET_Q10(49.0), PROT_SET_Q10(45.0), PROT_SET_Q10(50.0) }, /* UF 动作频率 Hz */
|
||||
{ 0u, PROT_SET_Q10(1000.0), 0, PROT_SET_Q10(60000) }, /* UF 延时 ms */
|
||||
{ 0u, PROT_SET_Q10(0.99), PROT_SET_Q10(0.9), PROT_SET_Q10(1.0) }, /* 过频返回系数 */
|
||||
{ 0u, PROT_SET_Q10(1.01), PROT_SET_Q10(1.0), PROT_SET_Q10(1.1) }, /* 低频返回系数 */
|
||||
};
|
||||
|
||||
static volatile uint32_t s_val[2][PS_ID_COUNT];
|
||||
|
||||
+47
-39
@@ -1,13 +1,18 @@
|
||||
/*
|
||||
* 模块名称:保护定值模型(P1,定值校验和 载体)
|
||||
* 模块功能:保护定值的 RAM 模型——编号 / 通讯地址 / 范围 / 默认值 / 校验和自检,
|
||||
* 模块功能:保护定值的 RAM 模型——编号 / 范围 / 默认值 / 校验和自检,
|
||||
* 以及 B7 定值持久化的**纯逻辑层**(blob 序列化/解析 + 原子装载)。
|
||||
* 文件读写胶水在 App/cfg/prot_set_store.c(MCU 端)。
|
||||
*
|
||||
* 设计口径(docs/算法/继电保护功能复现规划.md §5):
|
||||
* - 定点存储:Q10(×1024),与参考系统定点系数 2^10 一致(§5.3);
|
||||
* - 通讯地址:与参考 g_tCommSetParaTab(Comm/Pub/Const_CommSetPara.c)逐项对齐,
|
||||
* 基址 0x8820(=34848);告警类沿用运行参数段 0x8027/0x8029;
|
||||
* - 协议地址(IEC 60870-5-104 IOA)**不在本模块**:唯一真源是
|
||||
* App/iec60870/104/iec104_dtu_table.c 的 iec104_dtu_protection_mapping()
|
||||
* (s_consumer_map[],17 项,含 scale),本结构不存地址。
|
||||
* 历史:曾按参考 g_tCommSetParaTab(Comm/Pub/Const_CommSetPara.c)给每项
|
||||
* 拟定协议地址(基址 0x8820),2026-11-19 与点表逐条比对发现 17 个消费者里
|
||||
* 13 个指向了完全不同的功能(例 0x8841 语义是 OC1 跳闸投退、拟定地址却写
|
||||
* 0x8857 = 检合环投退),故整个字段删除,不再维护第二真源;
|
||||
* - 校验和(定值校验和):sum32 正码 + 反码成对封存(参考 tagPRS 的
|
||||
* dwTagSum/dwTagSumN 模式),selfcheck 失配 → 置闭锁;
|
||||
* - ⚠ 默认值/范围为**拟定值**:参考 EEPROM 出厂默认表未在本仓库,
|
||||
@@ -45,51 +50,54 @@
|
||||
#define PROT_SET_Q10(v) ((int32_t)((float)(v) * 1024.0f))
|
||||
#define PROT_SET_FROM_Q10(v) ((float)(v) / 1024.0f)
|
||||
|
||||
/* 定值项编号(枚举序 = RAM 数组序 = 校验和覆盖序,只增不删不改序) */
|
||||
/* 定值项编号(枚举序 = RAM 数组序 = 校验和覆盖序,只增不删不改序)。
|
||||
*
|
||||
* ⚠ 本枚举只表达语义,**不存协议地址**:104 可寻址项的 IOA 唯一真源是
|
||||
* iec104_dtu_protection_mapping() 桥表;历史上按参考 g_tCommSetParaTab
|
||||
* 拟定的逐项地址(0x8856 等)已被证明 13/17 与点表语义冲突,2026-11-19
|
||||
* 整体删除,勿从旧版本/历史日志把这些数字搬回来。 */
|
||||
typedef enum {
|
||||
/* --- 三段式相间过流(A 相):投退/跳闸投退/电流/延时 --- */
|
||||
PS_OC1_EN = 0, /* 0x8856 Ⅰ段投退 */
|
||||
PS_OC1_TRIP, /* 0x8857 Ⅰ段跳闸投退(0 告警 / 1 跳闸) */
|
||||
PS_OC1_CUR, /* 0x8858 Ⅰ段电流定值(A,二次值) */
|
||||
PS_OC1_DLY, /* 0x8859 Ⅰ段延时(ms) */
|
||||
PS_OC2_EN, /* 0x885A */
|
||||
PS_OC2_TRIP, /* 0x885B */
|
||||
PS_OC2_CUR, /* 0x885C */
|
||||
PS_OC2_DLY, /* 0x885D */
|
||||
PS_OC3_EN, /* 0x885E */
|
||||
PS_OC3_TRIP, /* 0x885F */
|
||||
PS_OC3_CUR, /* 0x8860 */
|
||||
PS_OC3_DLY, /* 0x8861 */
|
||||
PS_OC1_EN = 0, /* Ⅰ段投退 */
|
||||
PS_OC1_TRIP, /* Ⅰ段跳闸投退(0 告警 / 1 跳闸) */
|
||||
PS_OC1_CUR, /* Ⅰ段电流定值(A,二次值) */
|
||||
PS_OC1_DLY, /* Ⅰ段延时(ms) */
|
||||
PS_OC2_EN, /* Ⅱ段投退 */
|
||||
PS_OC2_TRIP, /* Ⅱ段跳闸投退 */
|
||||
PS_OC2_CUR, /* Ⅱ段电流定值(A,二次值) */
|
||||
PS_OC2_DLY, /* Ⅱ段延时(ms) */
|
||||
PS_OC3_EN, /* Ⅲ段投退 */
|
||||
PS_OC3_TRIP, /* Ⅲ段跳闸投退 */
|
||||
PS_OC3_CUR, /* Ⅲ段电流定值(A,二次值) */
|
||||
PS_OC3_DLY, /* Ⅲ段延时(ms) */
|
||||
/* --- 过负荷(A 相) --- */
|
||||
PS_OL_EN, /* 0x8871 */
|
||||
PS_OL_TRIP, /* 0x8872 */
|
||||
PS_OL_CUR, /* 0x8873 */
|
||||
PS_OL_DLY, /* 0x8874 */
|
||||
/* --- 过压 / 欠压(UA;沿用参考告警段 0x8029/0x8027) --- */
|
||||
PS_OL_EN, /* 过负荷投退 */
|
||||
PS_OL_TRIP, /* 过负荷跳闸投退 */
|
||||
PS_OL_CUR, /* 过负荷电流定值(A,二次值) */
|
||||
PS_OL_DLY, /* 过负荷延时(ms) */
|
||||
/* --- 过压 / 欠压(UA) --- */
|
||||
PS_OV_EN, /* 本地投退(参考告警类无独立投退,V0.1 补) */
|
||||
PS_OV_VOL, /* 0x8029 过电压门限(V,二次值) */
|
||||
PS_OV_DLY, /* 0x802A 过电压延时(ms) */
|
||||
PS_OV_VOL, /* 过电压门限(V,二次值) */
|
||||
PS_OV_DLY, /* 过电压延时(ms) */
|
||||
PS_UV_EN, /* 本地投退 */
|
||||
PS_UV_VOL, /* 0x8027 低电压门限(V,二次值) */
|
||||
PS_UV_DLY, /* 0x8028 低电压延时(ms) */
|
||||
PS_UV_VOL, /* 低电压门限(V,二次值) */
|
||||
PS_UV_DLY, /* 低电压延时(ms) */
|
||||
/* --- 零序过压(UN) --- */
|
||||
PS_3U0_EN, /* 0x888E */
|
||||
PS_3U0_VOL, /* 0x888F 3U0 定值(V,二次值) */
|
||||
PS_3U0_DLY, /* 0x8890 延时(ms) */
|
||||
PS_3U0_EN, /* 3U0 投退 */
|
||||
PS_3U0_VOL, /* 3U0 定值(V,二次值) */
|
||||
PS_3U0_DLY, /* 3U0 延时(ms) */
|
||||
/* --- 公共 --- */
|
||||
PS_RET_OVER, /* 过量返回系数(返回门槛 = 定值 × 系数,<1) */
|
||||
PS_RET_UNDER, /* 欠量返回系数(返回门槛 = 定值 × 系数,>1) */
|
||||
PS_PT_PRI, /* 0x8820 PT 一次额定(V) */
|
||||
PS_PT_SEC, /* 0x8821 PT 二次额定(V) */
|
||||
PS_CT_PRI, /* 0x8825 CT 一次额定(A) */
|
||||
PS_CT_SEC, /* 0x8826 CT 二次额定(A) */
|
||||
PS_PT_PRI, /* PT 一次额定(V) */
|
||||
PS_PT_SEC, /* PT 二次额定(V) */
|
||||
PS_CT_PRI, /* CT 一次额定(A) */
|
||||
PS_CT_SEC, /* CT 二次额定(A) */
|
||||
/* --- 全局软压板(B7):104 YK12 两段式投退;0 = 保护退出服务 --- */
|
||||
PS_GLOBAL_EN, /* 本地项(无通讯地址,经 YK12 写、C_RD 不可读) */
|
||||
PS_GLOBAL_EN, /* 本地项(经 YK12 写、C_RD 不可读) */
|
||||
/* --- 过频 / 低频(B8):投退/动作频率/延时 + 各自返回系数 ---
|
||||
* ⚠ 通讯地址:参考 g_tCommSetParaTab 的保护定值段(0x8820~0x8882)
|
||||
* 含"低压/低频"类目(规划 §5.1),但 OF/UF 的**逐项地址不在本仓库**
|
||||
* (参考 Comm 源文件未随仓库提供)→ 按"找不到对应即本地项"规则全部
|
||||
* comm_addr=0 登记本地项(104 C_SE 不可寻址),待对照参考表后补。
|
||||
* ⚠ 本地项判定:OF/UF 八项不在 iec104_dtu_protection_mapping() 桥表内,
|
||||
* 故 104 C_SE / C_RD 不可寻址;本模块不再持有地址概念。
|
||||
* ⚠ 默认值/范围为**拟定**(同全表口径,规划 §5.4 落实进度注)。 */
|
||||
PS_OF_EN, /* 过频投退(本地) */
|
||||
PS_OF_HZ, /* 过频动作频率(Hz) */
|
||||
@@ -102,9 +110,9 @@ typedef enum {
|
||||
PS_ID_COUNT
|
||||
} prot_set_id_t;
|
||||
|
||||
/* 定值项元数据(ROM 常量表,校验和自检不覆盖它——只覆盖 RAM 值区) */
|
||||
/* 定值项元数据(ROM 常量表,校验和自检不覆盖它——只覆盖 RAM 值区)。
|
||||
* ⚠ 协议地址的唯一真源是 iec104_dtu_protection_mapping(),本结构不存地址。 */
|
||||
typedef struct {
|
||||
uint16_t comm_addr; /* 通讯信息体地址(0 = 本地项,不上送) */
|
||||
uint8_t is_ctl; /* 1 = 投退/枚举项(0/1),0 = 模拟量项 */
|
||||
int32_t def; /* 默认值(Q10;投退项为 0/1 的 Q10) */
|
||||
int32_t min; /* 下限(Q10) */
|
||||
|
||||
@@ -167,12 +167,16 @@ static bool commit_stage(uint16_t area)
|
||||
changes[n++].value = (p.tag == 38U ? bits_float(staged[stage_slot(i)]) : (float)staged[stage_slot(i)]) * scale;
|
||||
}
|
||||
}
|
||||
if (n != 0U && (!bindings.parameter_apply(bindings.context, changes, n, true) ||
|
||||
!bindings.parameter_apply(bindings.context, changes, n, false))) { return false; }
|
||||
if (n != 0U) {
|
||||
if (!bindings.parameter_apply(bindings.context, changes, n, true) ||
|
||||
!bindings.parameter_apply(bindings.context, changes, n, false)) { return false; }
|
||||
/* 只有真实源原子提交成功才算一次提交;n==0 时没有任何值被写出。 */
|
||||
increment(&stats.parameter_commits);
|
||||
}
|
||||
for (i = 0U; i < IEC104_DTU_PARAMETER_COUNT; ++i) {
|
||||
if (is_dirty(i)) { values[slot(i, area)] = staged[stage_slot(i)]; }
|
||||
}
|
||||
increment(&stats.parameter_commits); return true;
|
||||
return true;
|
||||
}
|
||||
#else
|
||||
/* 函数功能:裁剪档固化入口;无值与预置表,一律按未启用拒绝并计数。 */
|
||||
@@ -422,6 +426,11 @@ static IEC104_RemoteParameterLookupResult_t remote_lookup(void *context,
|
||||
IEC104_RemoteParameterAddResult_t result;
|
||||
(void)context;
|
||||
if (r->sn >= IEC104_DTU_AREA_COUNT) { return IEC104_REMOTE_PARAMETER_LOOKUP_ERROR; }
|
||||
/* 绑定真实源后只有区域0一套活跃真值;SN!=0 的RAM镜像不会随真源更新。
|
||||
* 继续回答会把出厂镜像冒充当前值,故按固定否定回复,不再取值。 */
|
||||
if (bindings.parameter_read != NULL && r->sn != 0U) {
|
||||
return IEC104_REMOTE_PARAMETER_LOOKUP_ERROR;
|
||||
}
|
||||
if (r->count == 0U) {
|
||||
/* i / n / p 只服务这一段"按序号在可见表里找第 ordinal 条",声明放这里
|
||||
* (规范 §6.1.1:尽可能靠近使用点)。 */
|
||||
@@ -447,10 +456,16 @@ static IEC104_RemoteParameterActionResult_t remote_action(void *context,
|
||||
clear_stage(); return IEC104_REMOTE_PARAMETER_ACTION_APPLIED;
|
||||
}
|
||||
if (r->operation == IEC104_REMOTE_PARAMETER_OP_READ_AREA && area != NULL) {
|
||||
area->current = stats.current_area; area->minimum = 0U; area->maximum = 4U;
|
||||
area->current = stats.current_area; area->minimum = 0U;
|
||||
/* 绑定真实源后只有区域0;未绑定模拟面仍保留0..4供模拟器/主机测试。 */
|
||||
area->maximum = bindings.parameter_read != NULL ? 0U : 4U;
|
||||
return IEC104_REMOTE_PARAMETER_ACTION_APPLIED;
|
||||
}
|
||||
if (r->sn >= 5U || r->test) { return IEC104_REMOTE_PARAMETER_ACTION_REJECTED; }
|
||||
if (r->sn >= 5U || r->test || (bindings.parameter_read != NULL && r->sn != 0U)) {
|
||||
/* 绑定真实源后仅一套活跃值,没有原子整区事务;受理多区写等于在
|
||||
* 两套真值之间撒谎,理由与绑定后拒绝切区相同。 */
|
||||
return IEC104_REMOTE_PARAMETER_ACTION_REJECTED;
|
||||
}
|
||||
if (r->operation == IEC104_REMOTE_PARAMETER_OP_SWITCH_AREA) {
|
||||
/* A bound real model has a single bank; switching without an atomic
|
||||
* whole-bank platform transaction would change the meaning of live data. */
|
||||
|
||||
@@ -37,12 +37,12 @@
|
||||
| 总召 | 225 点:59 单点遥信、16 双点遥信、30 遥测、120 标准参数 |
|
||||
| 普通读取 | 观测点另含 8 步位、8 位串;参数按各自业务类型处理 |
|
||||
| 计量总召 | 8 个能量点,独立于总召;不是 profile 四行能量元数据直接计数 |
|
||||
| Type200~203 远方参数 | 430 项元数据中 345 项已配置、85 项未配置且不开放;区域 0 可见 345 项,区域 1~4 各 88 项动作参数 |
|
||||
| Type200~203 远方参数 | 430 项元数据中只有 17 项是真实消费者,其中 9 项按区域生效;未绑定真实源时区域 0 可见 17 项、区域 1~4 各 9 项,绑定真实源后只有区域 0 一套活跃值,SN≠0 的读写显式拒绝 |
|
||||
| 标准参数 | 120 项,保持标准表类型、合法默认值及读写权限,不把配置值当采样值 |
|
||||
|
||||
无真实来源的单点、双点、遥测和能量初值为 0,保留无效品质;步位与位串初值为 0,保留替代品质。遥控只执行模拟状态变化并发布反馈,不驱动物理开出。参数按合法的类型化默认值初始化,写后可读但不持久化;只读映射参数不因模拟需求放开写权限。这是团队保持配置合法性的实施契约,不是“所有参数必须为零”的要求。
|
||||
|
||||
**协议参数 RAM 与既有 UI 参数真源目前仍隔离。** 候选语义映射尚未接入平台,不宣称全 UI/104 同源;旧保护实体数与候选映射数不能用来做标准参数补差。原演示诊断别名另列于独立 oracle 的待裁定集合,不自动并入标准产品验收面。
|
||||
**协议参数已接入既有 UI/保护定值真源,但覆盖面以 17 项真实消费者为界。** 这 17 项经 `iec104_dtu_table.c` 的语义桥表落到 `prot_set`,按 Q10 与 `validate_only` 走原子批量提交;其余 413 项在协议层拒绝,不把协议 RAM 镜像冒充第二套真值,也不宣称全 UI/104 同源。原演示诊断别名另列于独立 oracle 的待裁定集合,不自动并入标准产品验收面。
|
||||
|
||||
### 0.3 模拟器与时间边界
|
||||
|
||||
@@ -89,7 +89,7 @@
|
||||
| 遥测 YC | 短浮点 M_ME_NC_1(系数 1):背景/周期/死区上送 | 归一化/标度、谐波轨(「遥测谐波轨(可选)」) |
|
||||
| 遥信 YX | 单点 M_SP + 双点 M_DP:背景 + 突发(COT=3);**突发单点带 CP56 时标 = M_SP_TB_1(SOE 记录,随「SOE 记录」 SOE 落地)** | 双点带时标(V0.1 双点恒 IV,无意义) |
|
||||
| 遥控 YK | 双点 C_DC 两段式(选择 82H/执行 02H) | 带时标、升降/步位 |
|
||||
| 定值 | C_RD 读 + C_SE_NC 两段写(地址 = prot_set `comm_addr`) | 定值区切换/下装文件 |
|
||||
| 定值 | C_RD 读 + C_SE_NC 两段写(地址 = 17 项语义桥表) | 定值区切换/下装文件 |
|
||||
| 其他 | C_CS 对时(→ `sys_clock`)、C_TS、C_RP | 固有参数 8001H~800AH(字符串类)、C_CI 电度、文件传输(录波) |
|
||||
|
||||
## 2. 分层与模块(采集链路测试可验证性约束:协议解析与硬件 I/O 分离)
|
||||
@@ -182,10 +182,9 @@
|
||||
|
||||
### 3.4 定值(IOA = 通讯地址)
|
||||
|
||||
- 地址 = `App/algo/prot_set.h` 元数据 `comm_addr`(0x8820 基址 + 告警段 0x8027~0x802A,
|
||||
逐项对照参考项目 `Const_CommSetPara.c`,见 `docs/算法/继电保护功能复现规划.md` §5.4)——
|
||||
**点表不另立地址表**,prot_set 即单一事实源。`comm_addr = 0` 的本地项(投退/返回系数/
|
||||
全局软压板)不可经 C_RD/C_SE 寻址(保护定值持久化 起显式排除,防 IOA=0 误命中首个本地项)。
|
||||
- 地址 = `App/iec60870/104/iec104_dtu_table.c` 的 17 项语义桥表(含 IOA、语义 ID 与 scale),
|
||||
与 `App/algo/prot_set.h` 的定值语义一一对应;`prot_set` 已不再持有 `comm_addr` 字段。
|
||||
只有这 17 项可经 C_RD/C_SE 寻址,其余 413 项协议层拒绝;绑定真实源后 SN≠0 显式拒绝。
|
||||
- 写两段式:选择 = 范围校验;执行 = `prot_set_set_sealed`(**原子写+封存**:影子区
|
||||
写好后单字交换活跃区,protectTask 的「定值校验和」巡检任何时刻都看到自洽快照,
|
||||
保护任务 登记的 µs 级竞态窗口就此收口)。
|
||||
|
||||
+29
-4
@@ -108,7 +108,6 @@ digraph refgraph_full {
|
||||
"App/iec60870/104/iec104_net_mcu.h" [fillcolor="#dbeafe", color="#1d4ed8"];
|
||||
"App/iec60870/104/iec104_source.c" [fillcolor="#dbeafe", color="#1d4ed8"];
|
||||
"App/iec60870/104/iec104_source.h" [fillcolor="#dbeafe", color="#1d4ed8"];
|
||||
"App/iec60870/104/iec104_source_ranks.h" [fillcolor="#dbeafe", color="#1d4ed8"];
|
||||
"App/iec60870/common/IEC60870_Asdu.c" [fillcolor="#dbeafe", color="#1d4ed8"];
|
||||
"App/iec60870/common/IEC60870_Asdu.h" [fillcolor="#dbeafe", color="#1d4ed8"];
|
||||
"App/iec60870/common/IEC60870_Codec.c" [fillcolor="#dbeafe", color="#1d4ed8"];
|
||||
@@ -186,6 +185,7 @@ digraph refgraph_full {
|
||||
"Drivers/BSP/NET/net_config.h" [fillcolor="#dbeafe", color="#1d4ed8"];
|
||||
"Drivers/BSP/NET/net_events.c" [fillcolor="#dbeafe", color="#1d4ed8"];
|
||||
"Drivers/BSP/NET/net_events.h" [fillcolor="#dbeafe", color="#1d4ed8"];
|
||||
"Drivers/BSP/NET/net_fd.h" [fillcolor="#dbeafe", color="#1d4ed8"];
|
||||
"Drivers/BSP/NET/net_listener.c" [fillcolor="#dbeafe", color="#1d4ed8"];
|
||||
"Drivers/BSP/NET/net_listener.h" [fillcolor="#dbeafe", color="#1d4ed8"];
|
||||
"Drivers/BSP/NET/net_pending.c" [fillcolor="#dbeafe", color="#1d4ed8"];
|
||||
@@ -428,6 +428,7 @@ digraph refgraph_full {
|
||||
"test/host/ftp_cfg/ftp_cfg_test.c" [fillcolor="#dbeafe", color="#1d4ed8"];
|
||||
"test/host/iec104_comm/iec104_comm_test.c" [fillcolor="#dbeafe", color="#1d4ed8"];
|
||||
"test/host/iec104_dtu/core_lifecycle_test.c" [fillcolor="#dbeafe", color="#1d4ed8"];
|
||||
"test/host/iec104_dtu/preset_to_prot_set_test.c" [fillcolor="#dbeafe", color="#1d4ed8"];
|
||||
"test/host/iec104_dtu/source_binding_test.c" [fillcolor="#dbeafe", color="#1d4ed8"];
|
||||
"test/host/iec104_dtu/vendor_boundary_test.c" [fillcolor="#dbeafe", color="#1d4ed8"];
|
||||
"test/host/iec104_netmcu/net_socket_fake.c" [fillcolor="#dbeafe", color="#1d4ed8"];
|
||||
@@ -437,6 +438,7 @@ digraph refgraph_full {
|
||||
"test/host/iec104_netmcu/results/static_mutant/iec104_net_mcu_BAD.c" [fillcolor="#dbeafe", color="#1d4ed8"];
|
||||
"test/host/iec104_netmcu/stub/FreeRTOS.h" [fillcolor="#dbeafe", color="#1d4ed8"];
|
||||
"test/host/iec104_netmcu/stub/cmsis_os2.h" [fillcolor="#dbeafe", color="#1d4ed8"];
|
||||
"test/host/iec104_netmcu/stub/sys_clock.h" [fillcolor="#dbeafe", color="#1d4ed8"];
|
||||
"test/host/iec104_netmcu/stub/task.h" [fillcolor="#dbeafe", color="#1d4ed8"];
|
||||
"test/host/iec104_netmcu/stub_iec104_netmcu.c" [fillcolor="#dbeafe", color="#1d4ed8"];
|
||||
"test/host/iec104_netmcu/stub_iec104_netmcu.h" [fillcolor="#dbeafe", color="#1d4ed8"];
|
||||
@@ -524,6 +526,8 @@ digraph refgraph_full {
|
||||
"test/host/prot_elm/prot_elm_test.c" [fillcolor="#dbeafe", color="#1d4ed8"];
|
||||
"test/host/prot_set/prot_set_test.c" [fillcolor="#dbeafe", color="#1d4ed8"];
|
||||
"test/host/prot_set_store/prot_set_store_test.c" [fillcolor="#dbeafe", color="#1d4ed8"];
|
||||
"test/host/prot_set_store/stub/cmsis_os2.h" [fillcolor="#dbeafe", color="#1d4ed8"];
|
||||
"test/host/prot_set_store/stub/cmsis_stub.c" [fillcolor="#dbeafe", color="#1d4ed8"];
|
||||
"test/host/prot_set_store/stub/dbg_log.h" [fillcolor="#dbeafe", color="#1d4ed8"];
|
||||
"test/host/run_par/run_par_test.c" [fillcolor="#dbeafe", color="#1d4ed8"];
|
||||
"test/host/run_par/stub/dbg_log.h" [fillcolor="#dbeafe", color="#1d4ed8"];
|
||||
@@ -627,7 +631,6 @@ digraph refgraph_full {
|
||||
"App/algo/prot_elm.c" -> "外部/系统头文件" [color="#f59e0b", penwidth=0.6, style=dashed];
|
||||
"App/algo/prot_elm.h" -> "外部/系统头文件" [color="#f59e0b", penwidth=0.6, style=dashed];
|
||||
"App/algo/prot_set.c" -> "App/algo/prot_set.h" [color="#2563eb", penwidth=1.0];
|
||||
"App/algo/prot_set.c" -> "外部/系统头文件" [color="#f59e0b", penwidth=0.6, style=dashed];
|
||||
"App/algo/prot_set.h" -> "外部/系统头文件" [color="#f59e0b", penwidth=0.6, style=dashed];
|
||||
"App/algo/run_par.c" -> "App/algo/adc_cal.h" [color="#2563eb", penwidth=1.0];
|
||||
"App/algo/run_par.c" -> "App/algo/run_par.h" [color="#2563eb", penwidth=1.0];
|
||||
@@ -714,6 +717,7 @@ digraph refgraph_full {
|
||||
"App/cfg/prot_set_store.c" -> "App/cfg/cfg_file_store.h" [color="#2563eb", penwidth=1.0];
|
||||
"App/cfg/prot_set_store.c" -> "App/cfg/prot_set_store.h" [color="#2563eb", penwidth=1.0];
|
||||
"App/cfg/prot_set_store.c" -> "Drivers/BSP/dbg_log.h" [color="#2563eb", penwidth=1.0];
|
||||
"App/cfg/prot_set_store.c" -> "Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2/cmsis_os2.h" [color="#94a3b8", penwidth=0.7];
|
||||
"App/cfg/prot_set_store.c" -> "外部/系统头文件" [color="#f59e0b", penwidth=0.6, style=dashed];
|
||||
"App/fs/vol_idle_sync.c" -> "App/app/sys_events.h" [color="#2563eb", penwidth=1.0];
|
||||
"App/fs/vol_idle_sync.c" -> "App/fs/vol_idle_sync.h" [color="#2563eb", penwidth=1.0];
|
||||
@@ -879,19 +883,18 @@ digraph refgraph_full {
|
||||
"App/iec60870/104/iec104_dtu_table.c" -> "外部/系统头文件" [color="#f59e0b", penwidth=0.6, style=dashed];
|
||||
"App/iec60870/104/iec104_dtu_table.h" -> "外部/系统头文件" [color="#f59e0b", penwidth=0.6, style=dashed];
|
||||
"App/iec60870/104/iec104_net_mcu.c" -> "App/iec60870/104/IEC104_Net.h" [color="#2563eb", penwidth=1.0];
|
||||
"App/iec60870/104/iec104_net_mcu.c" -> "App/util/sys_clock.h" [color="#2563eb", penwidth=1.0];
|
||||
"App/iec60870/104/iec104_net_mcu.c" -> "Drivers/BSP/NET/net_socket.h" [color="#2563eb", penwidth=1.0];
|
||||
"App/iec60870/104/iec104_net_mcu.c" -> "外部/系统头文件" [color="#f59e0b", penwidth=0.6, style=dashed];
|
||||
"App/iec60870/104/iec104_net_mcu.h" -> "App/iec60870/104/IEC104_Net.h" [color="#2563eb", penwidth=1.0];
|
||||
"App/iec60870/104/iec104_net_mcu.h" -> "外部/系统头文件" [color="#f59e0b", penwidth=0.6, style=dashed];
|
||||
"App/iec60870/104/iec104_source.c" -> "App/iec60870/104/iec104_source.h" [color="#2563eb", penwidth=1.0];
|
||||
"App/iec60870/104/iec104_source.c" -> "App/iec60870/104/iec104_source_ranks.h" [color="#2563eb", penwidth=1.0];
|
||||
"App/iec60870/104/iec104_source.c" -> "外部/系统头文件" [color="#f59e0b", penwidth=0.6, style=dashed];
|
||||
"App/iec60870/104/iec104_source.h" -> "App/iec60870/104/business/IEC104_ClockSynchronization.h" [color="#2563eb", penwidth=1.0];
|
||||
"App/iec60870/104/iec104_source.h" -> "App/iec60870/104/business/IEC104_Command.h" [color="#2563eb", penwidth=1.0];
|
||||
"App/iec60870/104/iec104_source.h" -> "App/iec60870/104/business/IEC104_Parameter.h" [color="#2563eb", penwidth=1.0];
|
||||
"App/iec60870/104/iec104_source.h" -> "App/iec60870/104/business/IEC104_RemoteParameter.h" [color="#2563eb", penwidth=1.0];
|
||||
"App/iec60870/104/iec104_source.h" -> "App/iec60870/104/iec104_dtu_table.h" [color="#2563eb", penwidth=1.0];
|
||||
"App/iec60870/104/iec104_source_ranks.h" -> "外部/系统头文件" [color="#f59e0b", penwidth=0.6, style=dashed];
|
||||
"App/iec60870/common/IEC60870_Asdu.c" -> "App/iec60870/common/IEC60870_Asdu.h" [color="#2563eb", penwidth=1.0];
|
||||
"App/iec60870/common/IEC60870_Asdu.c" -> "App/iec60870/common/IEC60870_InformationObjects_Internal.h" [color="#2563eb", penwidth=1.0];
|
||||
"App/iec60870/common/IEC60870_Asdu.c" -> "外部/系统头文件" [color="#f59e0b", penwidth=0.6, style=dashed];
|
||||
@@ -1157,6 +1160,7 @@ digraph refgraph_full {
|
||||
"Drivers/BSP/IOBOARD/ioboard.h" -> "外部/系统头文件" [color="#f59e0b", penwidth=0.6, style=dashed];
|
||||
"Drivers/BSP/IOBOARD/ioboard_bits.c" -> "Drivers/BSP/IOBOARD/ioboard_bits.h" [color="#2563eb", penwidth=1.0];
|
||||
"Drivers/BSP/IOBOARD/ioboard_bits.h" -> "外部/系统头文件" [color="#f59e0b", penwidth=0.6, style=dashed];
|
||||
"Drivers/BSP/NET/net_config.h" -> "Drivers/BSP/NET/net_fd.h" [color="#2563eb", penwidth=1.0];
|
||||
"Drivers/BSP/NET/net_events.c" -> "Drivers/BSP/CH395F/ch395f.h" [color="#2563eb", penwidth=1.0];
|
||||
"Drivers/BSP/NET/net_events.c" -> "Drivers/BSP/NET/net_events.h" [color="#2563eb", penwidth=1.0];
|
||||
"Drivers/BSP/NET/net_events.c" -> "Drivers/BSP/NET/net_listener.h" [color="#2563eb", penwidth=1.0];
|
||||
@@ -1224,6 +1228,7 @@ digraph refgraph_full {
|
||||
"Drivers/BSP/NET/net_socket.c" -> "test/board/net_latency_test.h" [color="#2563eb", penwidth=1.0];
|
||||
"Drivers/BSP/NET/net_socket.c" -> "test/board/test_config.h" [color="#2563eb", penwidth=1.0];
|
||||
"Drivers/BSP/NET/net_socket.c" -> "外部/系统头文件" [color="#f59e0b", penwidth=0.6, style=dashed];
|
||||
"Drivers/BSP/NET/net_socket.h" -> "Drivers/BSP/NET/net_fd.h" [color="#2563eb", penwidth=1.0];
|
||||
"Drivers/BSP/NET/net_socket.h" -> "Drivers/BSP/NET/net_types.h" [color="#2563eb", penwidth=1.0];
|
||||
"Drivers/BSP/NET/net_socket.h" -> "Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2/cmsis_os2.h" [color="#94a3b8", penwidth=0.7];
|
||||
"Drivers/BSP/NET/net_socket.h" -> "Middlewares/Third_Party/FreeRTOS/Source/include/FreeRTOS.h" [color="#94a3b8", penwidth=0.7];
|
||||
@@ -1888,10 +1893,16 @@ digraph refgraph_full {
|
||||
"test/host/iec104_dtu/core_lifecycle_test.c" -> "App/iec60870/104/iec104_core.h" [color="#2563eb", penwidth=1.0];
|
||||
"test/host/iec104_dtu/core_lifecycle_test.c" -> "App/iec60870/104/iec104_source.h" [color="#2563eb", penwidth=1.0];
|
||||
"test/host/iec104_dtu/core_lifecycle_test.c" -> "外部/系统头文件" [color="#f59e0b", penwidth=0.6, style=dashed];
|
||||
"test/host/iec104_dtu/preset_to_prot_set_test.c" -> "App/algo/prot_set.h" [color="#2563eb", penwidth=1.0];
|
||||
"test/host/iec104_dtu/preset_to_prot_set_test.c" -> "App/iec60870/104/business/IEC104_RemoteParameter.h" [color="#2563eb", penwidth=1.0];
|
||||
"test/host/iec104_dtu/preset_to_prot_set_test.c" -> "App/iec60870/104/iec104_core.h" [color="#2563eb", penwidth=1.0];
|
||||
"test/host/iec104_dtu/preset_to_prot_set_test.c" -> "App/iec60870/104/iec104_source.h" [color="#2563eb", penwidth=1.0];
|
||||
"test/host/iec104_dtu/preset_to_prot_set_test.c" -> "外部/系统头文件" [color="#f59e0b", penwidth=0.6, style=dashed];
|
||||
"test/host/iec104_dtu/source_binding_test.c" -> "App/iec60870/104/iec104_source.h" [color="#2563eb", penwidth=1.0];
|
||||
"test/host/iec104_dtu/source_binding_test.c" -> "外部/系统头文件" [color="#f59e0b", penwidth=0.6, style=dashed];
|
||||
"test/host/iec104_dtu/vendor_boundary_test.c" -> "App/iec60870/104/business/IEC104_Command.h" [color="#2563eb", penwidth=1.0];
|
||||
"test/host/iec104_dtu/vendor_boundary_test.c" -> "外部/系统头文件" [color="#f59e0b", penwidth=0.6, style=dashed];
|
||||
"test/host/iec104_netmcu/net_socket_fake.c" -> "App/util/sys_clock.h" [color="#2563eb", penwidth=1.0];
|
||||
"test/host/iec104_netmcu/net_socket_fake.c" -> "test/host/iec104_netmcu/net_socket_fake.h" [color="#2563eb", penwidth=1.0];
|
||||
"test/host/iec104_netmcu/net_socket_fake.c" -> "外部/系统头文件" [color="#f59e0b", penwidth=0.6, style=dashed];
|
||||
"test/host/iec104_netmcu/net_socket_fake.h" -> "Drivers/BSP/NET/net_socket.h" [color="#2563eb", penwidth=1.0];
|
||||
@@ -1905,10 +1916,12 @@ digraph refgraph_full {
|
||||
"test/host/iec104_netmcu/netmcu_test.c" -> "test/host/iec104_netmcu/net_socket_fake.h" [color="#2563eb", penwidth=1.0];
|
||||
"test/host/iec104_netmcu/netmcu_test.c" -> "外部/系统头文件" [color="#f59e0b", penwidth=0.6, style=dashed];
|
||||
"test/host/iec104_netmcu/results/static_mutant/iec104_net_mcu_BAD.c" -> "App/iec60870/104/IEC104_Net.h" [color="#2563eb", penwidth=1.0];
|
||||
"test/host/iec104_netmcu/results/static_mutant/iec104_net_mcu_BAD.c" -> "App/util/sys_clock.h" [color="#2563eb", penwidth=1.0];
|
||||
"test/host/iec104_netmcu/results/static_mutant/iec104_net_mcu_BAD.c" -> "Drivers/BSP/NET/net_socket.h" [color="#2563eb", penwidth=1.0];
|
||||
"test/host/iec104_netmcu/results/static_mutant/iec104_net_mcu_BAD.c" -> "外部/系统头文件" [color="#f59e0b", penwidth=0.6, style=dashed];
|
||||
"test/host/iec104_netmcu/stub/FreeRTOS.h" -> "test/host/net_socket/stub/FreeRTOS.h" [color="#2563eb", penwidth=1.0];
|
||||
"test/host/iec104_netmcu/stub/cmsis_os2.h" -> "外部/系统头文件" [color="#f59e0b", penwidth=0.6, style=dashed];
|
||||
"test/host/iec104_netmcu/stub/sys_clock.h" -> "外部/系统头文件" [color="#f59e0b", penwidth=0.6, style=dashed];
|
||||
"test/host/iec104_netmcu/stub/task.h" -> "test/host/net_socket/stub/task.h" [color="#2563eb", penwidth=1.0];
|
||||
"test/host/iec104_netmcu/stub_iec104_netmcu.c" -> "test/host/iec104_netmcu/net_socket_fake.h" [color="#2563eb", penwidth=1.0];
|
||||
"test/host/iec104_netmcu/stub_iec104_netmcu.c" -> "test/host/iec104_netmcu/stub_iec104_netmcu.h" [color="#2563eb", penwidth=1.0];
|
||||
@@ -1950,6 +1963,7 @@ digraph refgraph_full {
|
||||
"test/host/lftpd/lftpd_test.c" -> "Lib/FatFs/ff.h" [color="#94a3b8", penwidth=0.7];
|
||||
"test/host/lftpd/lftpd_test.c" -> "外部/系统头文件" [color="#f59e0b", penwidth=0.6, style=dashed];
|
||||
"test/host/lftpd/stub/FreeRTOS.h" -> "外部/系统头文件" [color="#f59e0b", penwidth=0.6, style=dashed];
|
||||
"test/host/lftpd/stub/net_socket.h" -> "Drivers/BSP/NET/net_fd.h" [color="#2563eb", penwidth=1.0];
|
||||
"test/host/lftpd/stub/net_socket.h" -> "Drivers/BSP/NET/net_types.h" [color="#2563eb", penwidth=1.0];
|
||||
"test/host/lftpd/stub/net_socket.h" -> "test/host/lftpd/stub/FreeRTOS.h" [color="#2563eb", penwidth=1.0];
|
||||
"test/host/lftpd/stub/net_socket.h" -> "test/host/lftpd/stub/task.h" [color="#2563eb", penwidth=1.0];
|
||||
@@ -1960,6 +1974,7 @@ digraph refgraph_full {
|
||||
"test/host/lftpd_inet/lftpd_inet_test.c" -> "Drivers/BSP/NET/net_types.h" [color="#2563eb", penwidth=1.0];
|
||||
"test/host/lftpd_inet/lftpd_inet_test.c" -> "外部/系统头文件" [color="#f59e0b", penwidth=0.6, style=dashed];
|
||||
"test/host/lftpd_inet/stub/FreeRTOS.h" -> "外部/系统头文件" [color="#f59e0b", penwidth=0.6, style=dashed];
|
||||
"test/host/lftpd_inet/stub/net_socket.h" -> "Drivers/BSP/NET/net_fd.h" [color="#2563eb", penwidth=1.0];
|
||||
"test/host/lftpd_inet/stub/net_socket.h" -> "Drivers/BSP/NET/net_types.h" [color="#2563eb", penwidth=1.0];
|
||||
"test/host/lftpd_inet/stub/net_socket.h" -> "test/host/lftpd_inet/stub/FreeRTOS.h" [color="#2563eb", penwidth=1.0];
|
||||
"test/host/lftpd_inet/stub/net_socket.h" -> "test/host/lftpd_inet/stub/task.h" [color="#2563eb", penwidth=1.0];
|
||||
@@ -2002,6 +2017,7 @@ digraph refgraph_full {
|
||||
"test/host/net_events/stub/ch395f.h" -> "外部/系统头文件" [color="#f59e0b", penwidth=0.6, style=dashed];
|
||||
"test/host/net_events/stub/cmsis_os.h" -> "外部/系统头文件" [color="#f59e0b", penwidth=0.6, style=dashed];
|
||||
"test/host/net_events/stub/main.h" -> "外部/系统头文件" [color="#f59e0b", penwidth=0.6, style=dashed];
|
||||
"test/host/net_events/stub/net_socket.h" -> "Drivers/BSP/NET/net_fd.h" [color="#2563eb", penwidth=1.0];
|
||||
"test/host/net_events/stub/net_socket.h" -> "Drivers/BSP/NET/net_types.h" [color="#2563eb", penwidth=1.0];
|
||||
"test/host/net_events/stub/task.h" -> "test/host/net_events/stub/FreeRTOS.h" [color="#2563eb", penwidth=1.0];
|
||||
"test/host/net_listener/net_listener_test.c" -> "Drivers/BSP/CH395F/ch395f.h" [color="#2563eb", penwidth=1.0];
|
||||
@@ -2014,6 +2030,7 @@ digraph refgraph_full {
|
||||
"test/host/net_listener/stub/ch395f.h" -> "外部/系统头文件" [color="#f59e0b", penwidth=0.6, style=dashed];
|
||||
"test/host/net_listener/stub/cmsis_os.h" -> "外部/系统头文件" [color="#f59e0b", penwidth=0.6, style=dashed];
|
||||
"test/host/net_listener/stub/main.h" -> "外部/系统头文件" [color="#f59e0b", penwidth=0.6, style=dashed];
|
||||
"test/host/net_listener/stub/net_socket.h" -> "Drivers/BSP/NET/net_fd.h" [color="#2563eb", penwidth=1.0];
|
||||
"test/host/net_listener/stub/net_socket.h" -> "Drivers/BSP/NET/net_types.h" [color="#2563eb", penwidth=1.0];
|
||||
"test/host/net_pending/net_pending_test.c" -> "Drivers/BSP/CH395F/ch395f.h" [color="#2563eb", penwidth=1.0];
|
||||
"test/host/net_pending/net_pending_test.c" -> "Drivers/BSP/NET/net_listener.h" [color="#2563eb", penwidth=1.0];
|
||||
@@ -2024,6 +2041,7 @@ digraph refgraph_full {
|
||||
"test/host/net_pending/stub/FreeRTOS.h" -> "外部/系统头文件" [color="#f59e0b", penwidth=0.6, style=dashed];
|
||||
"test/host/net_pending/stub/ch395f.h" -> "外部/系统头文件" [color="#f59e0b", penwidth=0.6, style=dashed];
|
||||
"test/host/net_pending/stub/main.h" -> "外部/系统头文件" [color="#f59e0b", penwidth=0.6, style=dashed];
|
||||
"test/host/net_pending/stub/net_socket.h" -> "Drivers/BSP/NET/net_fd.h" [color="#2563eb", penwidth=1.0];
|
||||
"test/host/net_pending/stub/net_socket.h" -> "Drivers/BSP/NET/net_types.h" [color="#2563eb", penwidth=1.0];
|
||||
"test/host/net_pending/stub/task.h" -> "test/host/net_pending/stub/FreeRTOS.h" [color="#2563eb", penwidth=1.0];
|
||||
"test/host/net_select/net_select_test.c" -> "Drivers/BSP/NET/net_select.c" [color="#2563eb", penwidth=1.0];
|
||||
@@ -2034,6 +2052,7 @@ digraph refgraph_full {
|
||||
"test/host/net_select/stub/ch395f.h" -> "外部/系统头文件" [color="#f59e0b", penwidth=0.6, style=dashed];
|
||||
"test/host/net_select/stub/cmsis_os.h" -> "外部/系统头文件" [color="#f59e0b", penwidth=0.6, style=dashed];
|
||||
"test/host/net_select/stub/main.h" -> "外部/系统头文件" [color="#f59e0b", penwidth=0.6, style=dashed];
|
||||
"test/host/net_select/stub/net_socket.h" -> "Drivers/BSP/NET/net_fd.h" [color="#2563eb", penwidth=1.0];
|
||||
"test/host/net_select/stub/net_socket.h" -> "Drivers/BSP/NET/net_types.h" [color="#2563eb", penwidth=1.0];
|
||||
"test/host/net_socket/net_socket_test.c" -> "Drivers/BSP/CH395F/ch395f.h" [color="#2563eb", penwidth=1.0];
|
||||
"test/host/net_socket/net_socket_test.c" -> "Drivers/BSP/NET/net_events.h" [color="#2563eb", penwidth=1.0];
|
||||
@@ -2098,7 +2117,10 @@ digraph refgraph_full {
|
||||
"test/host/prot_set_store/prot_set_store_test.c" -> "App/cfg/cfg_file_store.h" [color="#2563eb", penwidth=1.0];
|
||||
"test/host/prot_set_store/prot_set_store_test.c" -> "App/cfg/prot_set_store.c" [color="#2563eb", penwidth=1.0];
|
||||
"test/host/prot_set_store/prot_set_store_test.c" -> "App/cfg/prot_set_store.h" [color="#2563eb", penwidth=1.0];
|
||||
"test/host/prot_set_store/prot_set_store_test.c" -> "test/host/prot_set_store/stub/cmsis_stub.c" [color="#2563eb", penwidth=1.0];
|
||||
"test/host/prot_set_store/prot_set_store_test.c" -> "外部/系统头文件" [color="#f59e0b", penwidth=0.6, style=dashed];
|
||||
"test/host/prot_set_store/stub/cmsis_os2.h" -> "外部/系统头文件" [color="#f59e0b", penwidth=0.6, style=dashed];
|
||||
"test/host/prot_set_store/stub/cmsis_stub.c" -> "test/host/prot_set_store/stub/cmsis_os2.h" [color="#2563eb", penwidth=1.0];
|
||||
"test/host/run_par/run_par_test.c" -> "App/algo/adc_cal.c" [color="#2563eb", penwidth=1.0];
|
||||
"test/host/run_par/run_par_test.c" -> "App/algo/adc_input.h" [color="#2563eb", penwidth=1.0];
|
||||
"test/host/run_par/run_par_test.c" -> "App/algo/run_par.c" [color="#2563eb", penwidth=1.0];
|
||||
@@ -2134,6 +2156,7 @@ digraph refgraph_full {
|
||||
"test/host/sntp/stub/FreeRTOS.h" -> "外部/系统头文件" [color="#f59e0b", penwidth=0.6, style=dashed];
|
||||
"test/host/sntp/stub/cmsis_os2.h" -> "外部/系统头文件" [color="#f59e0b", penwidth=0.6, style=dashed];
|
||||
"test/host/sntp/stub/dbg_log.h" -> "外部/系统头文件" [color="#f59e0b", penwidth=0.6, style=dashed];
|
||||
"test/host/sntp/stub/net_socket.h" -> "Drivers/BSP/NET/net_fd.h" [color="#2563eb", penwidth=1.0];
|
||||
"test/host/sntp/stub/net_socket.h" -> "test/host/sntp/stub/net_types.h" [color="#2563eb", penwidth=1.0];
|
||||
"test/host/sntp/stub/net_socket.h" -> "test/host/sntp/stub/task.h" [color="#2563eb", penwidth=1.0];
|
||||
"test/host/sntp/stub/net_types.h" -> "外部/系统头文件" [color="#f59e0b", penwidth=0.6, style=dashed];
|
||||
@@ -2187,6 +2210,7 @@ digraph refgraph_full {
|
||||
"test/host/task_prof/task_prof_test.c" -> "外部/系统头文件" [color="#f59e0b", penwidth=0.6, style=dashed];
|
||||
"test/host/time_sync/stub/FreeRTOS.h" -> "外部/系统头文件" [color="#f59e0b", penwidth=0.6, style=dashed];
|
||||
"test/host/time_sync/stub/cmsis_os2.h" -> "外部/系统头文件" [color="#f59e0b", penwidth=0.6, style=dashed];
|
||||
"test/host/time_sync/stub/net_socket.h" -> "Drivers/BSP/NET/net_fd.h" [color="#2563eb", penwidth=1.0];
|
||||
"test/host/time_sync/stub/net_socket.h" -> "test/host/time_sync/stub/FreeRTOS.h" [color="#2563eb", penwidth=1.0];
|
||||
"test/host/time_sync/stub/net_socket.h" -> "test/host/time_sync/stub/task.h" [color="#2563eb", penwidth=1.0];
|
||||
"test/host/time_sync/stub/net_socket.h" -> "外部/系统头文件" [color="#f59e0b", penwidth=0.6, style=dashed];
|
||||
@@ -2210,6 +2234,7 @@ digraph refgraph_full {
|
||||
"test/host/ui_data/ui_data_test.c" -> "Drivers/BSP/UI/ui_w_soe.c" [color="#2563eb", penwidth=1.0];
|
||||
"test/host/ui_data/ui_data_test.c" -> "外部/系统头文件" [color="#f59e0b", penwidth=0.6, style=dashed];
|
||||
"test/host/ui_sink/stub/lvgl.h" -> "外部/系统头文件" [color="#f59e0b", penwidth=0.6, style=dashed];
|
||||
"test/host/ui_sink/stub/net_socket.h" -> "Drivers/BSP/NET/net_fd.h" [color="#2563eb", penwidth=1.0];
|
||||
"test/host/ui_sink/stub/net_socket.h" -> "外部/系统头文件" [color="#f59e0b", penwidth=0.6, style=dashed];
|
||||
"test/host/ui_sink/ui_sink_test.c" -> "Drivers/BSP/NET/net_socket.h" [color="#2563eb", penwidth=1.0];
|
||||
"test/host/ui_sink/ui_sink_test.c" -> "Drivers/BSP/UI/ui_content_page.h" [color="#2563eb", penwidth=1.0];
|
||||
|
||||
+202
-29
@@ -425,10 +425,6 @@
|
||||
"path": "App/iec60870/104/iec104_source.h",
|
||||
"class": "fp"
|
||||
},
|
||||
{
|
||||
"path": "App/iec60870/104/iec104_source_ranks.h",
|
||||
"class": "fp"
|
||||
},
|
||||
{
|
||||
"path": "App/iec60870/common/IEC60870_Asdu.c",
|
||||
"class": "fp"
|
||||
@@ -745,6 +741,10 @@
|
||||
"path": "Drivers/BSP/NET/net_events.h",
|
||||
"class": "fp"
|
||||
},
|
||||
{
|
||||
"path": "Drivers/BSP/NET/net_fd.h",
|
||||
"class": "fp"
|
||||
},
|
||||
{
|
||||
"path": "Drivers/BSP/NET/net_listener.c",
|
||||
"class": "fp"
|
||||
@@ -7373,6 +7373,10 @@
|
||||
"path": "test/host/iec104_dtu/core_lifecycle_test.c",
|
||||
"class": "fp"
|
||||
},
|
||||
{
|
||||
"path": "test/host/iec104_dtu/preset_to_prot_set_test.c",
|
||||
"class": "fp"
|
||||
},
|
||||
{
|
||||
"path": "test/host/iec104_dtu/source_binding_test.c",
|
||||
"class": "fp"
|
||||
@@ -7409,6 +7413,10 @@
|
||||
"path": "test/host/iec104_netmcu/stub/cmsis_os2.h",
|
||||
"class": "fp"
|
||||
},
|
||||
{
|
||||
"path": "test/host/iec104_netmcu/stub/sys_clock.h",
|
||||
"class": "fp"
|
||||
},
|
||||
{
|
||||
"path": "test/host/iec104_netmcu/stub/task.h",
|
||||
"class": "fp"
|
||||
@@ -7757,6 +7765,14 @@
|
||||
"path": "test/host/prot_set_store/prot_set_store_test.c",
|
||||
"class": "fp"
|
||||
},
|
||||
{
|
||||
"path": "test/host/prot_set_store/stub/cmsis_os2.h",
|
||||
"class": "fp"
|
||||
},
|
||||
{
|
||||
"path": "test/host/prot_set_store/stub/cmsis_stub.c",
|
||||
"class": "fp"
|
||||
},
|
||||
{
|
||||
"path": "test/host/prot_set_store/stub/dbg_log.h",
|
||||
"class": "fp"
|
||||
@@ -8262,10 +8278,10 @@
|
||||
"include": "prot_set.h"
|
||||
},
|
||||
{
|
||||
"from": "App/algo/prot_set.c",
|
||||
"from": "App/algo/prot_set.h",
|
||||
"to": "外部/系统头文件",
|
||||
"kind": "fp-ext",
|
||||
"include": "string.h"
|
||||
"include": "stddef.h"
|
||||
},
|
||||
{
|
||||
"from": "App/algo/prot_set.h",
|
||||
@@ -8819,6 +8835,12 @@
|
||||
"kind": "fp-ext",
|
||||
"include": "stddef.h"
|
||||
},
|
||||
{
|
||||
"from": "App/cfg/prot_set_store.c",
|
||||
"to": "Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2/cmsis_os2.h",
|
||||
"kind": "fp-tp",
|
||||
"include": "cmsis_os2.h"
|
||||
},
|
||||
{
|
||||
"from": "App/cfg/prot_set_store.c",
|
||||
"to": "Drivers/BSP/dbg_log.h",
|
||||
@@ -9461,6 +9483,12 @@
|
||||
"kind": "fp-fp",
|
||||
"include": "net_socket.h"
|
||||
},
|
||||
{
|
||||
"from": "App/iec60870/104/iec104_net_mcu.c",
|
||||
"to": "App/util/sys_clock.h",
|
||||
"kind": "fp-fp",
|
||||
"include": "sys_clock.h"
|
||||
},
|
||||
{
|
||||
"from": "App/iec60870/104/iec104_net_mcu.c",
|
||||
"to": "外部/系统头文件",
|
||||
@@ -9503,12 +9531,6 @@
|
||||
"kind": "fp-ext",
|
||||
"include": "float.h"
|
||||
},
|
||||
{
|
||||
"from": "App/iec60870/104/iec104_source.c",
|
||||
"to": "App/iec60870/104/iec104_source_ranks.h",
|
||||
"kind": "fp-fp",
|
||||
"include": "iec104_source_ranks.h"
|
||||
},
|
||||
{
|
||||
"from": "App/iec60870/104/iec104_source.h",
|
||||
"to": "App/iec60870/104/iec104_dtu_table.h",
|
||||
@@ -9539,12 +9561,6 @@
|
||||
"kind": "fp-fp",
|
||||
"include": "IEC104_ClockSynchronization.h"
|
||||
},
|
||||
{
|
||||
"from": "App/iec60870/104/iec104_source_ranks.h",
|
||||
"to": "外部/系统头文件",
|
||||
"kind": "fp-ext",
|
||||
"include": "stdint.h"
|
||||
},
|
||||
{
|
||||
"from": "App/iec60870/104/business/IEC104_BusinessConfig_Internal.h",
|
||||
"to": "App/iec60870/104/business/IEC104_SystemCommand.h",
|
||||
@@ -11765,6 +11781,12 @@
|
||||
"kind": "fp-ext",
|
||||
"include": "stdint.h"
|
||||
},
|
||||
{
|
||||
"from": "Drivers/BSP/NET/net_config.h",
|
||||
"to": "Drivers/BSP/NET/net_fd.h",
|
||||
"kind": "fp-fp",
|
||||
"include": "net_fd.h"
|
||||
},
|
||||
{
|
||||
"from": "Drivers/BSP/NET/net_events.c",
|
||||
"to": "外部/系统头文件",
|
||||
@@ -12197,6 +12219,12 @@
|
||||
"kind": "fp-fp",
|
||||
"include": "app_assert.h"
|
||||
},
|
||||
{
|
||||
"from": "Drivers/BSP/NET/net_socket.h",
|
||||
"to": "Drivers/BSP/NET/net_fd.h",
|
||||
"kind": "fp-fp",
|
||||
"include": "net_fd.h"
|
||||
},
|
||||
{
|
||||
"from": "Drivers/BSP/NET/net_socket.h",
|
||||
"to": "Drivers/BSP/NET/net_types.h",
|
||||
@@ -51611,6 +51639,54 @@
|
||||
"kind": "fp-fp",
|
||||
"include": "iec104_source.h"
|
||||
},
|
||||
{
|
||||
"from": "test/host/iec104_dtu/preset_to_prot_set_test.c",
|
||||
"to": "外部/系统头文件",
|
||||
"kind": "fp-ext",
|
||||
"include": "iec104_tcp_fixture.h"
|
||||
},
|
||||
{
|
||||
"from": "test/host/iec104_dtu/preset_to_prot_set_test.c",
|
||||
"to": "App/iec60870/104/iec104_core.h",
|
||||
"kind": "fp-fp",
|
||||
"include": "iec104_core.h"
|
||||
},
|
||||
{
|
||||
"from": "test/host/iec104_dtu/preset_to_prot_set_test.c",
|
||||
"to": "App/iec60870/104/iec104_source.h",
|
||||
"kind": "fp-fp",
|
||||
"include": "iec104_source.h"
|
||||
},
|
||||
{
|
||||
"from": "test/host/iec104_dtu/preset_to_prot_set_test.c",
|
||||
"to": "App/iec60870/104/business/IEC104_RemoteParameter.h",
|
||||
"kind": "fp-fp",
|
||||
"include": "IEC104_RemoteParameter.h"
|
||||
},
|
||||
{
|
||||
"from": "test/host/iec104_dtu/preset_to_prot_set_test.c",
|
||||
"to": "App/algo/prot_set.h",
|
||||
"kind": "fp-fp",
|
||||
"include": "prot_set.h"
|
||||
},
|
||||
{
|
||||
"from": "test/host/iec104_dtu/preset_to_prot_set_test.c",
|
||||
"to": "外部/系统头文件",
|
||||
"kind": "fp-ext",
|
||||
"include": "math.h"
|
||||
},
|
||||
{
|
||||
"from": "test/host/iec104_dtu/preset_to_prot_set_test.c",
|
||||
"to": "外部/系统头文件",
|
||||
"kind": "fp-ext",
|
||||
"include": "stdio.h"
|
||||
},
|
||||
{
|
||||
"from": "test/host/iec104_dtu/preset_to_prot_set_test.c",
|
||||
"to": "外部/系统头文件",
|
||||
"kind": "fp-ext",
|
||||
"include": "string.h"
|
||||
},
|
||||
{
|
||||
"from": "test/host/iec104_dtu/source_binding_test.c",
|
||||
"to": "外部/系统头文件",
|
||||
@@ -51659,6 +51735,12 @@
|
||||
"kind": "fp-fp",
|
||||
"include": "net_socket_fake.h"
|
||||
},
|
||||
{
|
||||
"from": "test/host/iec104_netmcu/net_socket_fake.c",
|
||||
"to": "App/util/sys_clock.h",
|
||||
"kind": "fp-fp",
|
||||
"include": "sys_clock.h"
|
||||
},
|
||||
{
|
||||
"from": "test/host/iec104_netmcu/net_socket_fake.c",
|
||||
"to": "外部/系统头文件",
|
||||
@@ -51791,6 +51873,12 @@
|
||||
"kind": "fp-fp",
|
||||
"include": "net_socket.h"
|
||||
},
|
||||
{
|
||||
"from": "test/host/iec104_netmcu/results/static_mutant/iec104_net_mcu_BAD.c",
|
||||
"to": "App/util/sys_clock.h",
|
||||
"kind": "fp-fp",
|
||||
"include": "sys_clock.h"
|
||||
},
|
||||
{
|
||||
"from": "test/host/iec104_netmcu/results/static_mutant/iec104_net_mcu_BAD.c",
|
||||
"to": "外部/系统头文件",
|
||||
@@ -51809,6 +51897,12 @@
|
||||
"kind": "fp-ext",
|
||||
"include": "stdint.h"
|
||||
},
|
||||
{
|
||||
"from": "test/host/iec104_netmcu/stub/sys_clock.h",
|
||||
"to": "外部/系统头文件",
|
||||
"kind": "fp-ext",
|
||||
"include": "stdint.h"
|
||||
},
|
||||
{
|
||||
"from": "test/host/iec104_netmcu/stub/task.h",
|
||||
"to": "test/host/net_socket/stub/task.h",
|
||||
@@ -52073,6 +52167,12 @@
|
||||
"kind": "fp-ext",
|
||||
"include": "stdint.h"
|
||||
},
|
||||
{
|
||||
"from": "test/host/lftpd/stub/net_socket.h",
|
||||
"to": "Drivers/BSP/NET/net_fd.h",
|
||||
"kind": "fp-fp",
|
||||
"include": "net_fd.h"
|
||||
},
|
||||
{
|
||||
"from": "test/host/lftpd/stub/net_socket.h",
|
||||
"to": "test/host/lftpd/stub/FreeRTOS.h",
|
||||
@@ -52151,6 +52251,12 @@
|
||||
"kind": "fp-ext",
|
||||
"include": "stdint.h"
|
||||
},
|
||||
{
|
||||
"from": "test/host/lftpd_inet/stub/net_socket.h",
|
||||
"to": "Drivers/BSP/NET/net_fd.h",
|
||||
"kind": "fp-fp",
|
||||
"include": "net_fd.h"
|
||||
},
|
||||
{
|
||||
"from": "test/host/lftpd_inet/stub/net_socket.h",
|
||||
"to": "test/host/lftpd_inet/stub/FreeRTOS.h",
|
||||
@@ -52475,6 +52581,12 @@
|
||||
"kind": "fp-ext",
|
||||
"include": "stdint.h"
|
||||
},
|
||||
{
|
||||
"from": "test/host/net_events/stub/net_socket.h",
|
||||
"to": "Drivers/BSP/NET/net_fd.h",
|
||||
"kind": "fp-fp",
|
||||
"include": "net_fd.h"
|
||||
},
|
||||
{
|
||||
"from": "test/host/net_events/stub/net_socket.h",
|
||||
"to": "Drivers/BSP/NET/net_types.h",
|
||||
@@ -52565,6 +52677,12 @@
|
||||
"kind": "fp-ext",
|
||||
"include": "stdint.h"
|
||||
},
|
||||
{
|
||||
"from": "test/host/net_listener/stub/net_socket.h",
|
||||
"to": "Drivers/BSP/NET/net_fd.h",
|
||||
"kind": "fp-fp",
|
||||
"include": "net_fd.h"
|
||||
},
|
||||
{
|
||||
"from": "test/host/net_listener/stub/net_socket.h",
|
||||
"to": "Drivers/BSP/NET/net_types.h",
|
||||
@@ -52643,6 +52761,12 @@
|
||||
"kind": "fp-ext",
|
||||
"include": "stdint.h"
|
||||
},
|
||||
{
|
||||
"from": "test/host/net_pending/stub/net_socket.h",
|
||||
"to": "Drivers/BSP/NET/net_fd.h",
|
||||
"kind": "fp-fp",
|
||||
"include": "net_fd.h"
|
||||
},
|
||||
{
|
||||
"from": "test/host/net_pending/stub/net_socket.h",
|
||||
"to": "Drivers/BSP/NET/net_types.h",
|
||||
@@ -52715,6 +52839,12 @@
|
||||
"kind": "fp-ext",
|
||||
"include": "stdint.h"
|
||||
},
|
||||
{
|
||||
"from": "test/host/net_select/stub/net_socket.h",
|
||||
"to": "Drivers/BSP/NET/net_fd.h",
|
||||
"kind": "fp-fp",
|
||||
"include": "net_fd.h"
|
||||
},
|
||||
{
|
||||
"from": "test/host/net_select/stub/net_socket.h",
|
||||
"to": "Drivers/BSP/NET/net_types.h",
|
||||
@@ -53207,12 +53337,30 @@
|
||||
"kind": "fp-fp",
|
||||
"include": "prot_set.c"
|
||||
},
|
||||
{
|
||||
"from": "test/host/prot_set_store/prot_set_store_test.c",
|
||||
"to": "test/host/prot_set_store/stub/cmsis_stub.c",
|
||||
"kind": "fp-fp",
|
||||
"include": "stub/cmsis_stub.c"
|
||||
},
|
||||
{
|
||||
"from": "test/host/prot_set_store/prot_set_store_test.c",
|
||||
"to": "App/cfg/prot_set_store.c",
|
||||
"kind": "fp-fp",
|
||||
"include": "prot_set_store.c"
|
||||
},
|
||||
{
|
||||
"from": "test/host/prot_set_store/stub/cmsis_os2.h",
|
||||
"to": "外部/系统头文件",
|
||||
"kind": "fp-ext",
|
||||
"include": "stdint.h"
|
||||
},
|
||||
{
|
||||
"from": "test/host/prot_set_store/stub/cmsis_stub.c",
|
||||
"to": "test/host/prot_set_store/stub/cmsis_os2.h",
|
||||
"kind": "fp-fp",
|
||||
"include": "cmsis_os2.h"
|
||||
},
|
||||
{
|
||||
"from": "test/host/run_par/run_par_test.c",
|
||||
"to": "外部/系统头文件",
|
||||
@@ -53519,6 +53667,12 @@
|
||||
"kind": "fp-ext",
|
||||
"include": "stdint.h"
|
||||
},
|
||||
{
|
||||
"from": "test/host/sntp/stub/net_socket.h",
|
||||
"to": "Drivers/BSP/NET/net_fd.h",
|
||||
"kind": "fp-fp",
|
||||
"include": "net_fd.h"
|
||||
},
|
||||
{
|
||||
"from": "test/host/sntp/stub/net_socket.h",
|
||||
"to": "test/host/sntp/stub/task.h",
|
||||
@@ -54011,6 +54165,12 @@
|
||||
"kind": "fp-ext",
|
||||
"include": "stdint.h"
|
||||
},
|
||||
{
|
||||
"from": "test/host/time_sync/stub/net_socket.h",
|
||||
"to": "Drivers/BSP/NET/net_fd.h",
|
||||
"kind": "fp-fp",
|
||||
"include": "net_fd.h"
|
||||
},
|
||||
{
|
||||
"from": "test/host/time_sync/stub/net_socket.h",
|
||||
"to": "外部/系统头文件",
|
||||
@@ -54179,6 +54339,12 @@
|
||||
"kind": "fp-ext",
|
||||
"include": "stdint.h"
|
||||
},
|
||||
{
|
||||
"from": "test/host/ui_sink/stub/net_socket.h",
|
||||
"to": "Drivers/BSP/NET/net_fd.h",
|
||||
"kind": "fp-fp",
|
||||
"include": "net_fd.h"
|
||||
},
|
||||
{
|
||||
"from": "test/host/ui_sink/stub/net_socket.h",
|
||||
"to": "外部/系统头文件",
|
||||
@@ -54526,10 +54692,8 @@
|
||||
"App/algo/prot_elm.h": [
|
||||
"stdint.h"
|
||||
],
|
||||
"App/algo/prot_set.c": [
|
||||
"string.h"
|
||||
],
|
||||
"App/algo/prot_set.h": [
|
||||
"stddef.h",
|
||||
"stdint.h"
|
||||
],
|
||||
"App/algo/run_par.c": [
|
||||
@@ -54725,9 +54889,6 @@
|
||||
"stdlib.h",
|
||||
"string.h"
|
||||
],
|
||||
"App/iec60870/104/iec104_source_ranks.h": [
|
||||
"stdint.h"
|
||||
],
|
||||
"App/iec60870/common/IEC60870_Asdu.c": [
|
||||
"string.h"
|
||||
],
|
||||
@@ -57379,6 +57540,12 @@
|
||||
"test/host/iec104_dtu/core_lifecycle_test.c": [
|
||||
"iec104_tcp_fixture.h"
|
||||
],
|
||||
"test/host/iec104_dtu/preset_to_prot_set_test.c": [
|
||||
"iec104_tcp_fixture.h",
|
||||
"math.h",
|
||||
"stdio.h",
|
||||
"string.h"
|
||||
],
|
||||
"test/host/iec104_dtu/source_binding_test.c": [
|
||||
"math.h",
|
||||
"stdio.h",
|
||||
@@ -57411,6 +57578,9 @@
|
||||
"test/host/iec104_netmcu/stub/cmsis_os2.h": [
|
||||
"stdint.h"
|
||||
],
|
||||
"test/host/iec104_netmcu/stub/sys_clock.h": [
|
||||
"stdint.h"
|
||||
],
|
||||
"test/host/iec104_netmcu/stub_iec104_netmcu.c": [
|
||||
"string.h"
|
||||
],
|
||||
@@ -57606,6 +57776,9 @@
|
||||
"stdio.h",
|
||||
"string.h"
|
||||
],
|
||||
"test/host/prot_set_store/stub/cmsis_os2.h": [
|
||||
"stdint.h"
|
||||
],
|
||||
"test/host/run_par/run_par_test.c": [
|
||||
"stdint.h",
|
||||
"stdio.h",
|
||||
@@ -57807,11 +57980,11 @@
|
||||
]
|
||||
},
|
||||
"stats": {
|
||||
"files_indexed": 2017,
|
||||
"includes_parsed": 7742,
|
||||
"resolved": 5873,
|
||||
"unresolved": 1869,
|
||||
"nodes_fp": 550,
|
||||
"files_indexed": 2021,
|
||||
"includes_parsed": 7767,
|
||||
"resolved": 5893,
|
||||
"unresolved": 1874,
|
||||
"nodes_fp": 554,
|
||||
"nodes_tp": 1455,
|
||||
"ext_names": 385
|
||||
},
|
||||
|
||||
+6304
-6154
File diff suppressed because it is too large
Load Diff
|
Before Width: | Height: | Size: 1.3 MiB After Width: | Height: | Size: 1.3 MiB |
@@ -30,7 +30,7 @@ digraph refgraph_module {
|
||||
"外部/系统头文件" [shape=ellipse, fillcolor="#fef3c7", color="#d97706"];
|
||||
"App" -> "App/log" [color="#2563eb", penwidth=1.2, label="×3"];
|
||||
"App" -> "App/task" [color="#2563eb", penwidth=1.2, label="×1"];
|
||||
"App" -> "App/util" [color="#2563eb", penwidth=1.2, label="×8"];
|
||||
"App" -> "App/util" [color="#2563eb", penwidth=1.2, label="×9"];
|
||||
"App" -> "BSP(公共)" [color="#2563eb", penwidth=1.2, label="×10"];
|
||||
"App" -> "BSP/GD5F2GQ5UE" [color="#2563eb", penwidth=1.2, label="×1"];
|
||||
"App" -> "BSP/NET" [color="#2563eb", penwidth=1.2, label="×3"];
|
||||
@@ -40,11 +40,11 @@ digraph refgraph_module {
|
||||
"App" -> "BSP/TPAFE5160" [color="#2563eb", penwidth=1.2, label="×2"];
|
||||
"App" -> "BSP/UI" [color="#2563eb", penwidth=1.2, label="×2"];
|
||||
"App" -> "FatFs" [color="#2563eb", penwidth=1.2, label="×3"];
|
||||
"App" -> "FreeRTOS" [color="#2563eb", penwidth=1.2, label="×7"];
|
||||
"App" -> "FreeRTOS" [color="#2563eb", penwidth=1.2, label="×8"];
|
||||
"App" -> "Src/Inc (CubeMX)" [color="#2563eb", penwidth=1.2, label="×6"];
|
||||
"App" -> "test" [color="#2563eb", penwidth=1.2, label="×2"];
|
||||
"App" -> "其他(第三方)" [color="#2563eb", penwidth=1.2, label="×1"];
|
||||
"App" -> "外部/系统头文件" [color="#94a3b8", penwidth=0.7, label="×83"];
|
||||
"App" -> "外部/系统头文件" [color="#94a3b8", penwidth=0.7, label="×81"];
|
||||
"App/log" -> "App" [color="#2563eb", penwidth=1.2, label="×3"];
|
||||
"App/log" -> "App/util" [color="#2563eb", penwidth=1.2, label="×2"];
|
||||
"App/log" -> "BSP(公共)" [color="#2563eb", penwidth=1.2, label="×2"];
|
||||
@@ -168,14 +168,14 @@ digraph refgraph_module {
|
||||
"simulator" -> "SDL2" [color="#2563eb", penwidth=1.2, label="×3"];
|
||||
"simulator" -> "test" [color="#2563eb", penwidth=1.2, label="×1"];
|
||||
"simulator" -> "外部/系统头文件" [color="#94a3b8", penwidth=0.7, label="×8"];
|
||||
"test" -> "App" [color="#2563eb", penwidth=1.2, label="×92"];
|
||||
"test" -> "App" [color="#2563eb", penwidth=1.2, label="×96"];
|
||||
"test" -> "App/log" [color="#2563eb", penwidth=1.2, label="×16"];
|
||||
"test" -> "App/task" [color="#2563eb", penwidth=1.2, label="×2"];
|
||||
"test" -> "App/util" [color="#2563eb", penwidth=1.2, label="×17"];
|
||||
"test" -> "App/util" [color="#2563eb", penwidth=1.2, label="×19"];
|
||||
"test" -> "BSP(公共)" [color="#2563eb", penwidth=1.2, label="×31"];
|
||||
"test" -> "BSP/CH395F" [color="#2563eb", penwidth=1.2, label="×7"];
|
||||
"test" -> "BSP/GD5F2GQ5UE" [color="#2563eb", penwidth=1.2, label="×6"];
|
||||
"test" -> "BSP/NET" [color="#2563eb", penwidth=1.2, label="×50"];
|
||||
"test" -> "BSP/NET" [color="#2563eb", penwidth=1.2, label="×59"];
|
||||
"test" -> "BSP/NETCFG" [color="#2563eb", penwidth=1.2, label="×8"];
|
||||
"test" -> "BSP/SD2506" [color="#2563eb", penwidth=1.2, label="×3"];
|
||||
"test" -> "BSP/TPAFE5160" [color="#2563eb", penwidth=1.2, label="×1"];
|
||||
@@ -186,7 +186,7 @@ digraph refgraph_module {
|
||||
"test" -> "Src/Inc (CubeMX)" [color="#2563eb", penwidth=1.2, label="×8"];
|
||||
"test" -> "dhara" [color="#2563eb", penwidth=1.2, label="×2"];
|
||||
"test" -> "lftpd" [color="#2563eb", penwidth=1.2, label="×12"];
|
||||
"test" -> "外部/系统头文件" [color="#94a3b8", penwidth=0.7, label="×147"];
|
||||
"test" -> "外部/系统头文件" [color="#94a3b8", penwidth=0.7, label="×150"];
|
||||
"其他(第三方)" -> "App" [color="#94a3b8", penwidth=0.7, label="×107"];
|
||||
"其他(第三方)" -> "外部/系统头文件" [color="#94a3b8", penwidth=0.7, label="×120"];
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
<title>App->App/util</title>
|
||||
<path fill="none" stroke="#2563eb" stroke-width="1.2" d="M166.8,-1480.67C175.34,-1469.65 186.53,-1455.4 196.75,-1443 251.13,-1377.02 317.42,-1301.53 352.33,-1262.15"/>
|
||||
<polygon fill="#2563eb" stroke="#2563eb" stroke-width="1.2" points="354.87,-1264.56 358.89,-1254.75 349.63,-1259.91 354.87,-1264.56"/>
|
||||
<text xml:space="preserve" text-anchor="middle" x="259.5" y="-1409.32" font-family="Microsoft YaHei" font-size="10.00" fill="#334155">×8</text>
|
||||
<text xml:space="preserve" text-anchor="middle" x="259.5" y="-1409.32" font-family="Microsoft YaHei" font-size="10.00" fill="#334155">×9</text>
|
||||
</g>
|
||||
<!-- BSP(公共) -->
|
||||
<g id="node5" class="node">
|
||||
@@ -183,7 +183,7 @@
|
||||
<title>App->FreeRTOS</title>
|
||||
<path fill="none" stroke="#2563eb" stroke-width="1.2" d="M154.87,-1480.61C162.27,-1416.99 186.98,-1208.64 196.75,-1180 205.84,-1153.34 209.45,-1145.98 228.25,-1125 335.6,-1005.17 412.92,-1021.24 573.75,-1017 606.4,-1016.14 643.2,-1016.93 671.47,-1017.92"/>
|
||||
<polygon fill="#2563eb" stroke="#2563eb" stroke-width="1.2" points="671.08,-1021.41 681.2,-1018.28 671.34,-1014.41 671.08,-1021.41"/>
|
||||
<text xml:space="preserve" text-anchor="middle" x="436.5" y="-1025.64" font-family="Microsoft YaHei" font-size="10.00" fill="#334155">×7</text>
|
||||
<text xml:space="preserve" text-anchor="middle" x="436.5" y="-1025.64" font-family="Microsoft YaHei" font-size="10.00" fill="#334155">×8</text>
|
||||
</g>
|
||||
<!-- Src/Inc (CubeMX) -->
|
||||
<g id="node20" class="node">
|
||||
@@ -235,7 +235,7 @@
|
||||
<title>App->外部/系统头文件</title>
|
||||
<path fill="none" stroke="#94a3b8" stroke-width="0.7" d="M152.89,-1517.47C153.9,-1637.32 161.09,-2306.29 196.75,-2507 204.83,-2552.46 204.97,-2566.12 228.25,-2606 387.03,-2878.02 576.03,-2857 891,-2857 891,-2857 891,-2857 2108.12,-2857 2158.95,-2857 2156.5,-2810.98 2173.25,-2763 2262.34,-2507.82 2262.98,-1618.5 2262.25,-1446.08"/>
|
||||
<polygon fill="#94a3b8" stroke="#94a3b8" stroke-width="0.7" points="2265.75,-1446.18 2262.2,-1436.19 2258.75,-1446.21 2265.75,-1446.18"/>
|
||||
<text xml:space="preserve" text-anchor="middle" x="1087.5" y="-2861.75" font-family="Microsoft YaHei" font-size="10.00" fill="#334155">×83</text>
|
||||
<text xml:space="preserve" text-anchor="middle" x="1087.5" y="-2861.75" font-family="Microsoft YaHei" font-size="10.00" fill="#334155">×81</text>
|
||||
</g>
|
||||
<!-- App/log->App -->
|
||||
<g id="edge18" class="edge">
|
||||
@@ -1151,7 +1151,7 @@
|
||||
<title>test->App</title>
|
||||
<path fill="none" stroke="#2563eb" stroke-width="1.2" d="M463.97,-1813.11C452.4,-1807.24 438.75,-1800.04 426.75,-1793 327.81,-1734.93 299.54,-1717.89 228.25,-1628 202.88,-1596.01 180.18,-1554.62 166.45,-1527.47"/>
|
||||
<polygon fill="#2563eb" stroke="#2563eb" stroke-width="1.2" points="169.69,-1526.13 162.11,-1518.74 163.43,-1529.25 169.69,-1526.13"/>
|
||||
<text xml:space="preserve" text-anchor="middle" x="318.5" y="-1735.43" font-family="Microsoft YaHei" font-size="10.00" fill="#334155">×92</text>
|
||||
<text xml:space="preserve" text-anchor="middle" x="318.5" y="-1735.43" font-family="Microsoft YaHei" font-size="10.00" fill="#334155">×96</text>
|
||||
</g>
|
||||
<!-- test->App/log -->
|
||||
<g id="edge142" class="edge">
|
||||
@@ -1172,7 +1172,7 @@
|
||||
<title>test->App/util</title>
|
||||
<path fill="none" stroke="#2563eb" stroke-width="1.2" d="M489,-1807.56C485.53,-1760.95 474.09,-1634.92 446.25,-1533.75 440.17,-1511.65 433.28,-1507.97 426.75,-1486 403.49,-1407.71 388.73,-1312.25 382.28,-1264.78"/>
|
||||
<polygon fill="#2563eb" stroke="#2563eb" stroke-width="1.2" points="385.77,-1264.5 380.99,-1255.05 378.83,-1265.43 385.77,-1264.5"/>
|
||||
<text xml:space="preserve" text-anchor="middle" x="436.5" y="-1538.5" font-family="Microsoft YaHei" font-size="10.00" fill="#334155">×17</text>
|
||||
<text xml:space="preserve" text-anchor="middle" x="436.5" y="-1538.5" font-family="Microsoft YaHei" font-size="10.00" fill="#334155">×19</text>
|
||||
</g>
|
||||
<!-- test->BSP(公共) -->
|
||||
<g id="edge145" class="edge">
|
||||
@@ -1200,7 +1200,7 @@
|
||||
<title>test->BSP/NET</title>
|
||||
<path fill="none" stroke="#2563eb" stroke-width="1.2" d="M514.8,-1844.25C516.07,-1845.77 517.23,-1847.36 518.25,-1849 534.48,-1875.21 516.04,-1892.72 536.25,-1916 561.79,-1945.41 657.07,-1946.25 683.25,-1950 949.34,-1988.17 1018.22,-1989.71 1287,-1986 1377.82,-1984.75 1402.55,-1998.56 1491.25,-1979 1497.11,-1977.71 1503.19,-1976.05 1509.16,-1974.23"/>
|
||||
<polygon fill="#2563eb" stroke="#2563eb" stroke-width="1.2" points="1510.21,-1977.57 1518.65,-1971.16 1508.06,-1970.91 1510.21,-1977.57"/>
|
||||
<text xml:space="preserve" text-anchor="middle" x="946.75" y="-1987.83" font-family="Microsoft YaHei" font-size="10.00" fill="#334155">×50</text>
|
||||
<text xml:space="preserve" text-anchor="middle" x="946.75" y="-1987.83" font-family="Microsoft YaHei" font-size="10.00" fill="#334155">×59</text>
|
||||
</g>
|
||||
<!-- test->BSP/NETCFG -->
|
||||
<g id="edge149" class="edge">
|
||||
@@ -1277,7 +1277,7 @@
|
||||
<title>test->外部/系统头文件</title>
|
||||
<path fill="none" stroke="#94a3b8" stroke-width="0.7" d="M492.12,-1844.19C492.21,-1898.79 496.01,-2065.57 536.25,-2196 573.11,-2315.47 629.36,-2326.23 665.25,-2446 679.85,-2494.71 658.39,-2514.63 683.25,-2559 711.33,-2609.12 724.05,-2643 781.5,-2643 781.5,-2643 781.5,-2643 1174.5,-2643 1311.54,-2643 1343.46,-2681 1480.5,-2681 1480.5,-2681 1480.5,-2681 2108.12,-2681 2236.76,-2681 2258.75,-1636.09 2261.68,-1446.36"/>
|
||||
<polygon fill="#94a3b8" stroke="#94a3b8" stroke-width="0.7" points="2265.18,-1446.47 2261.83,-1436.41 2258.18,-1446.36 2265.18,-1446.47"/>
|
||||
<text xml:space="preserve" text-anchor="middle" x="1317.75" y="-2667.38" font-family="Microsoft YaHei" font-size="10.00" fill="#334155">×147</text>
|
||||
<text xml:space="preserve" text-anchor="middle" x="1317.75" y="-2667.38" font-family="Microsoft YaHei" font-size="10.00" fill="#334155">×150</text>
|
||||
</g>
|
||||
<!-- 其他(第三方)->App -->
|
||||
<g id="edge160" class="edge">
|
||||
|
||||
|
Before Width: | Height: | Size: 120 KiB After Width: | Height: | Size: 120 KiB |
@@ -605,8 +605,8 @@ flowchart LR
|
||||
|
||||
**FR-SET-5 主站读写**
|
||||
- 需求:主站可读定值、两段式写定值,失配/越界必须明确否定。
|
||||
- 实现:`C_RD` 读 + `C_SE_NC` 两段写;地址 = prot_set `comm_addr`(**点表不另立地址表**);
|
||||
`comm_addr = 0` 的本地项显式不可寻址(防 IOA=0 误命中)。
|
||||
- 实现:`C_RD` 读 + `C_SE_NC` 两段写;协议地址唯一真源 = `iec104_dtu_protection_mapping()`
|
||||
桥表(17 项,含 scale),其余 IOA 由协议层显式拒绝;本地项(OF/UF 等)不在桥表内故不可寻址。
|
||||
- 判据:读回值 = 写入值(COT 正确);本地项读回 COT=14 + EVI;执行段写失败不影响旧值。
|
||||
|
||||
### 5.14 SOE 与动作记录(FR-SOE)✅
|
||||
@@ -666,7 +666,8 @@ flowchart LR
|
||||
- 判据:`YK11`/`YK12` 两段正答且行为可观测(压板退出态跨复位保持);否定确认带正确 COT + PN。
|
||||
|
||||
**FR-IEC104-5 定值与运行参数读写**
|
||||
- 需求:`C_RD` 读、`C_SE_NC` 两段写;地址即定值表 `comm_addr`;写成功即持久化。
|
||||
- 需求:`C_RD` 读、`C_SE_NC` 两段写;地址唯一真源 = `iec104_dtu_protection_mapping()`
|
||||
桥表(17 项),其余 IOA 由协议层显式拒绝;写成功即持久化。
|
||||
- 实现:见 §5.13;路由顺序 = run_par 表先、未命中落 prot_set。
|
||||
- 判据:读回一致、越界否定、断电重启保持。
|
||||
|
||||
@@ -1387,10 +1388,11 @@ mac=00:00:00:00:00:00
|
||||
**遥控(`0x6001` 段起,双点两段式)**:`YK1~4` 开关(否定确认)、`YK11` 信号复归、`YK12` 遥控软压板、
|
||||
`YK13` 电池活化(否定)、`YK14` 解除闭锁(否定)。
|
||||
|
||||
**定值与运行参数**:保护定值地址 = `prot_set.comm_addr`(基址 `0x8820`,过压/欠压沿用告警段
|
||||
`0x8027~0x802A`);运行参数段 `0x8030~0x8038`(死区 9 点)/ `0x8040~0x8047`(`k` 覆盖 8 路)/
|
||||
**定值与运行参数**:保护定值地址唯一真源 = `iec104_dtu_protection_mapping()` 桥表(17 项),
|
||||
其余 IOA 由协议层显式拒绝;运行参数段 `0x8030~0x8038`(死区 9 点)/ `0x8040~0x8047`(`k` 覆盖 8 路)/
|
||||
`0x8048~0x804F`(`b` 覆盖 8 路),共 25 项。
|
||||
**逐项地址为本仓自定,送检点表到位后以送检为准替换常量段。**
|
||||
**逐项地址以点表/桥表为准**:`0x8820` 基址说法来自已废弃的参考拟定表,2026-11-19 比对
|
||||
发现 13/17 与点表语义冲突,故保护定值地址改由 `iec104_dtu_protection_mapping()` 桥表唯一持有。
|
||||
|
||||
> **与参考的差额**:参考 104 定值映射 **107 项**占 `0x8820~0x8891`(8 个空洞),
|
||||
> 底层定值表 **249 项 / 23 单元**。本产品 40 项,缺的是重合闸(16)、电压时间型自愈(17)、
|
||||
|
||||
@@ -47,10 +47,10 @@ dhara 失败类 +84;RO 另 +208,全是该失败类名表)→ `ER_IROM1`
|
||||
<!-- MEM_SNAPSHOT:BEGIN generated by scripts/check_mem_numbers.py -->
|
||||
| 区域 | 用量 | 容量 | 占比 |
|
||||
|---|---|---|---|
|
||||
| ER_IROM1 | 411,668 B (402.02 KB) | 1,048,576 B (1024 KB) | 39.3% |
|
||||
| ER_IROM1 | 411,692 B (402.04 KB) | 1,048,576 B (1024 KB) | 39.3% |
|
||||
| RW_IRAM1 | 113,720 B (111.05 KB) | 131,072 B (128 KB) | 86.8% |
|
||||
| RW_CCM | 57,376 B (56.03 KB) | 65,280 B (64 KB) | 87.9% |
|
||||
| **Flash (ROM 合计)** | **414,420 B (404.7 KB)** | 1,048,576 B (1024 KB) | **39.5%** |
|
||||
| **Flash (ROM 合计)** | **414,444 B (404.7 KB)** | 1,048,576 B (1024 KB) | **39.5%** |
|
||||
<!-- MEM_SNAPSHOT:END -->
|
||||
|
||||
各区的容量与常量来源:
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<!-- MEM_BUDGET:BEGIN generated by scripts/ram_baseline.py -->
|
||||
| 区域 | 用量 | 容量 | 占比 | 门禁(≤92%) |
|
||||
|---|---|---|---|---|
|
||||
| ER_IROM1 (Flash) | 411,668 B | 1,048,576 B | 39.3% | 参考 |
|
||||
| ER_IROM1 (Flash) | 411,692 B | 1,048,576 B | 39.3% | 参考 |
|
||||
| RW_CCM | 57,376 B | 65,280 B | 87.9% | PASS |
|
||||
| UNINIT_CCM | 48 B | 256 B | 18.8% | 参考 |
|
||||
| RW_IRAM1 | 113,720 B | 131,072 B | 86.8% | PASS |
|
||||
|
||||
@@ -366,7 +366,7 @@ UA 无幅值落 IA → 0.0020 Hz。
|
||||
|
||||
**解决的问题**:保护判据的"输入宪法"。参考系统把定值放 EEPROM + 常量表做校验和自检;本层做
|
||||
**RAM 模型 + 持久化纯逻辑**(blob 序列化 / 解析,文件胶住在 `App/cfg/prot_set_store.c`),
|
||||
把**编号 / 通讯地址 / 范围 / 默认值 / 校验和**闭环钉死。
|
||||
把**编号 / 范围 / 默认值 / 校验和**闭环钉死(协议地址不在本层,见 §后文桥表说明)。
|
||||
|
||||
| API | 契约 | 为什么 |
|
||||
|---|---|---|
|
||||
@@ -381,16 +381,19 @@ UA 无幅值落 IA → 0.0020 Hz。
|
||||
|
||||
**要点**
|
||||
|
||||
- **Q10 定点**(×1024)与参考系统 `2^10` 折算口径一致;元数据表(地址 / 范围 / 默认)是 ROM
|
||||
- **Q10 定点**(×1024)与参考系统 `2^10` 折算口径一致;元数据表(范围 / 默认)是 ROM
|
||||
常量,**校验和只覆盖 RAM 值区**。
|
||||
- **通讯地址逐项对照参考** `Comm/Pub/Const_CommSetPara.c` 的 `g_tCommSetParaTab`(基址
|
||||
`0x8820`);单测 TC-PROTSET-006 钉死"地址不重复、`min ≤ def ≤ max`、投退项 0..1"。
|
||||
- **协议地址(104 IOA)唯一真源** = `App/iec60870/104/iec104_dtu_table.c` 的
|
||||
`iec104_dtu_protection_mapping()` 桥表(17 项,含 scale),本模块不存地址;
|
||||
历史上按参考 `g_tCommSetParaTab`(基址 `0x8820`)拟定的地址已于 2026-11-19 比对
|
||||
发现 13/17 与点表语义冲突,整体删除。单测 TC-PROTSET-006 现只钉死
|
||||
"`min ≤ def ≤ max`、投退项 0..1"。
|
||||
- ⚠ **默认值与范围是拟定值**(参考 EEPROM 出厂表不在本仓库),待对照修订——进度注见
|
||||
`docs/算法/继电保护功能复现规划.md` §5.4。
|
||||
- **OF / UF 八项尾追加**(测频与遥测快照,32 → 40 项):`PS_OF_EN / OF_HZ / OF_DLY / UF_EN / UF_HZ / UF_DLY
|
||||
/ RET_OF / RET_UF`——**编号不回收,枚举序 = 数组序 = 校验和覆盖序**,故只许尾部追加。
|
||||
这八项的逐项通讯地址不在本仓库(参考表只示"含低压 / 低频"类目)→ 全部按 **本地项
|
||||
`comm_addr = 0`** 登记(104 C_SE 不可寻址),待对照补。
|
||||
这八项不在 104 桥表 `iec104_dtu_protection_mapping()` 内 → **104 不可寻址**
|
||||
(C_RD / C_SE 显式拒绝),本模块不再持有地址概念。
|
||||
- **频率返回系数独立**:`RET_OF = 0.99` / `RET_UF = 1.01`(返回门槛 = 定值 × 系数)——
|
||||
频率滞回带与电气量的 0.95 / 1.05 不同量级,**勿共用一个返回系数**。
|
||||
- **换代语义**(保护定值持久化 → 测频与遥测快照):项数变 → blob 144 → 176 B、`PROT_SET_BLOB_VER` 1 → 2。旧档(ver = 1 /
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
{
|
||||
"built_at": "2026-11-19T15:52:43+08:00",
|
||||
"fingerprint": "8c004551534245051d28557478bdb13cb46ddd1ab3c9e50e3d5c4665f81ed2f5",
|
||||
"built_at": "2026-11-19T17:15:13+08:00",
|
||||
"fingerprint": "888d931152c5d779cbfb1b080af0a78567bf1baba51ec45f7183c8fa39c60110",
|
||||
"fingerprint_files": 1562,
|
||||
"fingerprint_source": "git-index",
|
||||
"gated_regions": [
|
||||
"RW_IRAM1",
|
||||
"RW_CCM"
|
||||
],
|
||||
"git_head": "518e12f2003d5d2195d4816dc919f6ecbc75ad57",
|
||||
"git_head": "ea5ef6b7515aefc2ee4510f54a599c56e78b44f0",
|
||||
"map": "MDK-ARM/STM32F407-Demo/STM32F407-Demo.map",
|
||||
"map_mtime": 1795074728,
|
||||
"map_mtime": 1795079615,
|
||||
"pct": {
|
||||
"ER_IROM1": 39.26,
|
||||
"RW_CCM": 87.89,
|
||||
@@ -19,7 +19,7 @@
|
||||
"regions": {
|
||||
"ER_IROM1": {
|
||||
"max": 1048576,
|
||||
"size": 411668
|
||||
"size": 411692
|
||||
},
|
||||
"RW_CCM": {
|
||||
"max": 65280,
|
||||
@@ -37,7 +37,7 @@
|
||||
"schema": 2,
|
||||
"scope_note": "\u540c\u7801\u51ed\u8bc1\uff1a\u6307\u7eb9\u8986\u76d6\u56fa\u4ef6\u4f53\u79ef\u76f8\u5173\u6e90\u7801\uff0c\u53e3\u5f84\u89c1\u672c\u811a\u672c docstring",
|
||||
"sizes": {
|
||||
"code": 365904,
|
||||
"code": 365928,
|
||||
"ro_data": 45764,
|
||||
"rw_data": 2752,
|
||||
"zi_data": 168392
|
||||
|
||||
@@ -11,13 +11,13 @@ Read-only reference: `IEC60870-Slave/examples/iec104_dtu_profile.h`, `iec104_exa
|
||||
- Step and bitstring: runtime eight each at 0x1201 and 0x1301; Read only, not GI.
|
||||
- Commands: profile 19 plus runtime step eight, setpoint30 and bitstring eight. Some extension command forms are disabled by original default policy; visibility is not permission.
|
||||
- Standard parameters: runtime 120, four groups of30 at 0x8601+group*0x20. Group0 first4 Type111, remainder Type110; groups1/2 Type111; group3 Type112. GI includes these.
|
||||
- Remote parameters: profile430 metadata entries,345 configured readable in SN0;85 unconfigured remain metadata-only per Lead clarification. SN1..4 action parameters only (original model reports88). Never infer a fixed296 total.
|
||||
- Remote parameters: profile430 metadata entries; only17 are real consumers (9 area-scoped), and the other413 are metadata-only and refused at protocol layer. Unbound simulator: SN0 shows17 and SN1..4 show9. Bound real source: only SN0 exists; SN!=0 reads/writes are explicitly refused. Never infer a fixed296 total.
|
||||
- Example diagnostic aliases (scope pending, not silently equated to standard product points):41 measurement source aliases 0x9601..0x962c excluding0x961c..0x961e;93 digital aliases0x9141..0x919d;16 pulse aliases0xb100..0xb10f. Source: original `Example_Read_Point` lines3063..3081. Retained in oracle inventory but excluded from first standard acceptance run pending Lead scope decision.
|
||||
- Original demo nonzero initial observations are NOT acceptance values: source-less visible observations must start at zero. Configured parameters retain typed configured values. Do not erase quality flags or real protection lockout.
|
||||
|
||||
## Tests and independent observations
|
||||
|
||||
Measured status: `ci-artifacts/iec104-tests/tcp-final/report.json` records 11/11 PASS on the frozen `lvgl_sim.exe` SHA256 `d2285bbc68ce4353c814dbcc455a2083b56e81fc54bf88081402e821c6a92833`. Exact GI225 includes parameter value/QPM checks; CI8 uses original default Type206; Read121 checks zero/IV or SB plus CP56 legality; remote345 compares independent original typed defaults. The run includes area changes, preset/read unchanged/commit/read changed/cancel, disconnected stage invalidation, committed RAM retained across TCP reconnect, UInt16777217 precision, unknown/unconfigured addresses, malformed typed values, APDU255, split/coalesced streams, causal SBO state/feedback and rejected-command invariance, full device time and progression, unchanged host clock, and 30-second monotonic SBO expiry. Normal pre-START TESTFR and illegal pre-START I-frame close are distinct assertions. Source/transport/core probes record 10/10 PASS in `transport-final/report.json`; these are separately linked migrated production sources, not old-library binaries.
|
||||
Measured status: `ci-artifacts/iec104-tests/tcp-final/report.json` records 11/11 PASS on the frozen `lvgl_sim.exe` SHA256 `d2285bbc68ce4353c814dbcc455a2083b56e81fc54bf88081402e821c6a92833`. Exact GI225 includes parameter value/QPM checks; CI8 uses original default Type206; Read121 checks zero/IV or SB plus CP56 legality; remote17 compares independent original typed defaults. The run includes area changes, preset/read unchanged/commit/read changed/cancel, disconnected stage invalidation, committed RAM retained across TCP reconnect, UInt16777217 precision, unknown/unconfigured addresses, malformed typed values, APDU255, split/coalesced streams, causal SBO state/feedback and rejected-command invariance, full device time and progression, unchanged host clock, and 30-second monotonic SBO expiry. Normal pre-START TESTFR and illegal pre-START I-frame close are distinct assertions. Source/transport/core probes record 11/11 PASS in `transport-final/report.json`; these are separately linked migrated production sources, not old-library binaries.
|
||||
|
||||
Remaining unverified: malformed GI CA/IOA/QOI combinations; inbound APDU overlimit close; wrong TLV declared length on product TCP; every one of the 65 command entries and default-disabled extension permissions; nonzero measurement deadband reference stability; Spontaneous negative time_kind; injected Close/Destroy/GetStatus cleanup failures (no supported fixture injection); atomic platform apply rejection after validation; mapped-UShort callback overflow/fraction (no reachable mapped UShort entry). Type 110/111/112 LOAD is now covered (`test_standard_parameter_load_110_111_112`: accept per type, KPA mismatch, type mismatch, unknown IOA/CA/COT, per-group range, NaN, TEST bit, single-GI readback, restore) and Type 113 activation is covered (`test_standard_parameter_activation_113`: QPA=3 activate/deactivate, QPA=1/2 refusal while their config extensions stay off, IOA!=0 refusal, TEST bit, COT 45/46). What remains unverified there: QPA=1/QPA=2 positive paths (require `IEC104_PARAMETER_EXT_QPA_LOADED`/`_OBJECT` to be enabled, which this build does not do), the two-phase PREPARE/COMMIT apply-on-ACK flow, and periodic-scan output after QPA=3 activation. TCP tests terminate the process, so normal finite-deadline shutdown and UI are separately owned simulator evidence. The TCP suite (11 cases in the frozen snapshot above, 13 as of 2026-11-18) is not an assertion that all commands/features were exhaustively tested. Diagnostic aliases150 are deliberately excluded by Lead scope decision and must return unknown rather than fabricated zero success.
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ assets (C) were not migrated. The source paths below are historical:
|
||||
|---|---|---|---|
|
||||
| `ci-artifacts/iec104-cutover/probe_nostore_effect.py` | B | Keep as one-off evidence; not in `test/host/` | Compares `iec104_source.o` ZI with/without `IEC104_SOURCE_NO_VALUE_STORE`; answers a macro-cost question, not future protocol correctness. |
|
||||
| `ci-artifacts/iec104-cutover/ac5_probe_32.py` | B | Keep as one-off evidence; not in `test/host/` | AC5 warning-surface probe driven by the historical registration manifest; design-time compiler evidence. |
|
||||
| `ci-artifacts/iec104-cutover/gen_source_ranks.py` | B | Keep as one-off evidence; not in `test/host/` | Generates a dense rank header from a frozen profile; a code generator, not a test. |
|
||||
| `ci-artifacts/iec104-cutover/gen_source_ranks.py` | B | 随参数区收窄失效;历史一次性证据,不在 `test/host/` | 曾从冻结 profile 生成 dense rank header;其产物 `iec104_source_ranks.h` 已删除,17 项消费者排名现由 `App/iec60870/104/iec104_dtu_table.c` 运行时计算。 |
|
||||
| `ci-artifacts/iec104-cutover/recompute_reach_budget.py` | B | Keep as one-off evidence; not in `test/host/` | Recomputes RAM budget from one-off link logs; design accounting only. |
|
||||
| `ci-artifacts/iec104-cutover/register_mdk.py` | B | Keep as one-off evidence; not in `test/host/` | One-time MDK registration script driven by a manifest; host tests must never register product files. |
|
||||
| `ci-artifacts/iec104-cutover/verify-slot-equivalence.py` | B | Keep as one-off evidence; not in `test/host/` | Proves old/new storage mappings equivalent for a specific redesign; not a reusable 104 acceptance probe. |
|
||||
|
||||
@@ -0,0 +1,268 @@
|
||||
/* Real preset/solidify chain: 104 remote parameter -> prot_set atomic batch.
|
||||
*
|
||||
* 这份夹具守的是一个安全级契约:主站收到"肯定确认"的那一刻,prot_set 里必须
|
||||
* 真的变了。修复前走 SN=1..4 的写入会回 COT=7(+)、回读也"看起来对",而
|
||||
* prot_set 一个字都没动 —— 区域 1..4 的分段项在 mapped() 里凑不出 changes[],
|
||||
* parameter_apply 根本没被调用,代价却记了一次提交。这里把它钉死:
|
||||
* 1. 绑定真实源后 SN!=0 一律否定确认,且不产生任何提交、不改 prot_set;
|
||||
* 2. SN=0 的预置 + 固化必须真的落到 prot_set;
|
||||
* 3. 读回走真实源,不再返回 profile 里的出厂字面量;
|
||||
* 4. 绑定后 READ_AREA 只报区域 0,未绑定的模拟面仍报 0..4;
|
||||
* 5. parameter_commits 只在真的调过 apply 时加一。
|
||||
*/
|
||||
#include "iec104_tcp_fixture.h"
|
||||
#include "iec104_core.h"
|
||||
#include "iec104_source.h"
|
||||
#include "prot_set.h"
|
||||
|
||||
static iec104_core_config_t config = {"127.0.0.1", 24041U, 1U};
|
||||
static iec104_core_status_t status;
|
||||
static unsigned apply_calls, validate_calls;
|
||||
|
||||
static void turn(void) { CHECK(iec104_core_poll() == 0); }
|
||||
|
||||
/* 生产版回调的等价物:读直取 prot_set,写走一次原子批量(含预检阶段)。 */
|
||||
static bool parameter_read(void *ctx, uint16_t id, float *out)
|
||||
{
|
||||
(void)ctx;
|
||||
if (out == NULL || id >= (uint16_t)PS_ID_COUNT) { return false; }
|
||||
*out = prot_set_get_f((prot_set_id_t)id);
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool parameter_apply(void *ctx, const iec104_source_change_t *v, size_t n, bool validate)
|
||||
{
|
||||
prot_set_change_t batch[IEC104_DTU_CONSUMER_COUNT];
|
||||
size_t i;
|
||||
(void)ctx;
|
||||
if (v == NULL || n == 0U || n > IEC104_DTU_CONSUMER_COUNT) { return false; }
|
||||
if (validate) { ++validate_calls; } else { ++apply_calls; }
|
||||
for (i = 0U; i < n; ++i) {
|
||||
if (v[i].id >= (uint16_t)PS_ID_COUNT) { return false; }
|
||||
batch[i].id = (prot_set_id_t)v[i].id;
|
||||
batch[i].q10 = PROT_SET_Q10(v[i].value);
|
||||
}
|
||||
return prot_set_apply_batch(batch, n, validate ? 1 : 0) == 0;
|
||||
}
|
||||
|
||||
/* ---- 报文组装(全部按线上字节,不借用产品编码器) ------------------------- */
|
||||
static void apdu(uint8_t *f, uint8_t asdu_len)
|
||||
{
|
||||
f[0] = 0x68U; f[1] = (uint8_t)(asdu_len + 4U);
|
||||
f[2] = 0U; f[3] = 0U; f[4] = 0U; f[5] = 0U;
|
||||
}
|
||||
static void head_203(uint8_t *f, uint8_t count, uint8_t cot)
|
||||
{
|
||||
f[6] = 203U; f[7] = count; f[8] = cot; f[9] = 17U;
|
||||
f[10] = 1U; f[11] = 0U;
|
||||
}
|
||||
/* PRESET:CA=1 / OA=17 / 单元素 Float(tag38) / 小端。SN 由调用方给。 */
|
||||
static void preset_frame(uint8_t *f, uint16_t sn, uint32_t ioa, float value)
|
||||
{
|
||||
uint32_t bits;
|
||||
size_t i;
|
||||
memcpy(&bits, &value, 4U);
|
||||
apdu(f, 18U); head_203(f, 1U, 6U);
|
||||
f[12] = (uint8_t)(sn & 0xFFU); f[13] = (uint8_t)(sn >> 8);
|
||||
f[14] = 0x80U; /* data[8] 的 PRESET 标志 */
|
||||
f[15] = (uint8_t)(ioa & 0xFFU);
|
||||
f[16] = (uint8_t)((ioa >> 8) & 0xFFU);
|
||||
f[17] = (uint8_t)((ioa >> 16) & 0xFFU);
|
||||
f[18] = 38U; f[19] = 4U;
|
||||
for (i = 0U; i < 4U; ++i) { f[20U + i] = (uint8_t)(bits >> (8U * i)); }
|
||||
}
|
||||
static void solidify_frame(uint8_t *f, uint16_t sn)
|
||||
{
|
||||
apdu(f, 9U); head_203(f, 0U, 6U);
|
||||
f[12] = (uint8_t)(sn & 0xFFU); f[13] = (uint8_t)(sn >> 8);
|
||||
f[14] = 0U;
|
||||
}
|
||||
static void cancel_frame(uint8_t *f, uint16_t sn)
|
||||
{
|
||||
apdu(f, 9U); head_203(f, 0U, 8U);
|
||||
f[12] = (uint8_t)(sn & 0xFFU); f[13] = (uint8_t)(sn >> 8);
|
||||
f[14] = 0U;
|
||||
}
|
||||
static void area_frame(uint8_t *f)
|
||||
{
|
||||
apdu(f, 9U); f[6] = 201U; f[7] = 1U; f[8] = 6U; f[9] = 17U;
|
||||
f[10] = 1U; f[11] = 0U; f[12] = 0U; f[13] = 0U; f[14] = 0U;
|
||||
}
|
||||
/* 202 读:ASDU 布局 = type/count/cot/OA/CA(2)/SN(2)/IOA(3),长度 8+3*count。
|
||||
* SN 是定值区号 —— 绑定真实源后只有 0 区,其余区必须回否定而不是拿镜像冒充活值。 */
|
||||
static void read_frame(uint8_t *f, uint16_t sn, uint32_t ioa)
|
||||
{
|
||||
apdu(f, 11U);
|
||||
f[6] = 202U; f[7] = 1U; f[8] = 6U; f[9] = 17U;
|
||||
f[10] = 1U; f[11] = 0U;
|
||||
f[12] = (uint8_t)(sn & 0xFFU); f[13] = (uint8_t)(sn >> 8);
|
||||
f[14] = (uint8_t)(ioa & 0xFFU);
|
||||
f[15] = (uint8_t)((ioa >> 8) & 0xFFU);
|
||||
f[16] = (uint8_t)((ioa >> 16) & 0xFFU);
|
||||
}
|
||||
|
||||
/* 发一帧、跑若干轮,返回发送前的输出游标;调用方据此只看自己的回复。
|
||||
* 不返回"找到几条"是刻意的:历史帧还留在 fake.output 里,按区间切片才不串行。 */
|
||||
static size_t feed(const uint8_t *frame, size_t length)
|
||||
{
|
||||
size_t start = fake.sent_bytes;
|
||||
unsigned i;
|
||||
push(frame, length);
|
||||
for (i = 0U; i < 20U; ++i) { turn(); }
|
||||
return start;
|
||||
}
|
||||
|
||||
/* 从 start 起把指定类型的 I 帧回复全读回来。返回匹配条数(调用方按条数断言,
|
||||
* 避免"找到一条就当全对")。 */
|
||||
static unsigned replies(uint8_t type, size_t start, uint8_t *cot, uint8_t *pn, unsigned cap)
|
||||
{
|
||||
size_t at;
|
||||
unsigned n = 0U;
|
||||
for (at = start; at + 6U <= fake.sent_bytes; at += (size_t)fake.output[at + 1U] + 2U) {
|
||||
CHECK(fake.output[at] == 0x68U);
|
||||
if ((fake.output[at + 2U] & 1U) != 0U || at + 12U > fake.sent_bytes) { continue; }
|
||||
if (fake.output[at + 6U] != type) { continue; }
|
||||
CHECK(n < cap);
|
||||
cot[n] = (uint8_t)(fake.output[at + 8U] & 0x3FU);
|
||||
pn[n] = (uint8_t)((fake.output[at + 8U] & 0x40U) != 0U ? 1U : 0U);
|
||||
++n;
|
||||
}
|
||||
return n;
|
||||
}
|
||||
|
||||
/* 发一帧并读回该类型的全部回复。 */
|
||||
static unsigned exchange(const uint8_t *frame, size_t length, uint8_t type,
|
||||
uint8_t *cot, uint8_t *pn, unsigned cap)
|
||||
{
|
||||
return replies(type, feed(frame, length), cot, pn, cap);
|
||||
}
|
||||
|
||||
/* READ_AREA 的回复是镜像 ASDU 改写:current/min/max 落在 ASDU 偏移 9/11/13,
|
||||
* 即线上帧偏移 15/17/19(ASDU 从 +6 起),ASDU 长度固定 15。 */
|
||||
static void check_area(uint8_t expect_max)
|
||||
{
|
||||
uint8_t f[16];
|
||||
uint8_t cot[4], pn[4];
|
||||
size_t start;
|
||||
unsigned n;
|
||||
area_frame(f);
|
||||
start = feed(f, 15U);
|
||||
n = replies(201U, start, cot, pn, 4U);
|
||||
CHECK(n == 1U && cot[0] == 7U && pn[0] == 0U);
|
||||
{
|
||||
size_t at, hit = 0U;
|
||||
for (at = start; at + 6U <= fake.sent_bytes; at += (size_t)fake.output[at + 1U] + 2U) {
|
||||
if ((fake.output[at + 2U] & 1U) != 0U || fake.output[at + 6U] != 201U) { continue; }
|
||||
CHECK(at + 21U <= fake.sent_bytes);
|
||||
CHECK(fake.output[at + 1U] == 19U); /* 15 ASDU + 4 */
|
||||
CHECK(fake.output[at + 15U] == 0U && fake.output[at + 16U] == 0U); /* current = 0 */
|
||||
CHECK(fake.output[at + 17U] == 0U && fake.output[at + 18U] == 0U); /* minimum = 0 */
|
||||
CHECK(fake.output[at + 19U] == expect_max && fake.output[at + 20U] == 0U);
|
||||
hit = 1U;
|
||||
}
|
||||
CHECK(hit);
|
||||
}
|
||||
}
|
||||
|
||||
static float read_back_8842(void)
|
||||
{
|
||||
iec104_source_value_t out;
|
||||
float value;
|
||||
CHECK(iec104_source_remote_read(0U, 0x8842U, &out));
|
||||
CHECK(out.tag == 38U && out.length == 4U);
|
||||
memcpy(&value, out.bytes, 4U);
|
||||
return value;
|
||||
}
|
||||
|
||||
int main(void)
|
||||
{
|
||||
iec104_source_bindings_t bind = {0};
|
||||
iec104_source_stats_t stats;
|
||||
uint8_t frame[24], cot[8], pn[8];
|
||||
unsigned i, n;
|
||||
float before;
|
||||
|
||||
prot_set_init();
|
||||
CHECK(iec104_core_start(&config) == 0);
|
||||
fake.accept_pending = 1U; turn();
|
||||
push(start_act, sizeof(start_act));
|
||||
for (i = 0U; i < 8U; ++i) { turn(); }
|
||||
iec104_core_get_status(&status);
|
||||
CHECK(status.connected && status.active && status.connections == 1U);
|
||||
|
||||
/* 未绑定模拟面:仍报 0..4,模拟器与主机夹具靠它演练分区语义。 */
|
||||
check_area(4U);
|
||||
|
||||
/* 未绑定面走 SN=1 的分段项:协议照旧回肯定(模拟器要这套语义),但
|
||||
* parameter_apply 一次没被调用 —— 此时"提交计数"必须老老实实是 0。
|
||||
* 这是计数语义唯一可观测的路径:绑定后 n==0 已被入口守卫挡死。 */
|
||||
preset_frame(frame, 1U, 0x8842U, 50.0f);
|
||||
n = exchange(frame, 24U, 203U, cot, pn, 8U);
|
||||
CHECK(n == 1U && cot[0] == 7U && pn[0] == 0U);
|
||||
solidify_frame(frame, 1U);
|
||||
n = exchange(frame, 15U, 203U, cot, pn, 8U);
|
||||
CHECK(n == 1U && cot[0] == 7U && pn[0] == 0U);
|
||||
CHECK(apply_calls == 0U && validate_calls == 0U);
|
||||
iec104_source_stats(&stats);
|
||||
CHECK(stats.parameter_commits == 0U); /* 没调过 apply 就不许记账 */
|
||||
|
||||
bind.parameter_read = parameter_read;
|
||||
bind.parameter_apply = parameter_apply;
|
||||
iec104_source_bind(&bind);
|
||||
before = prot_set_get_f(PS_OC1_CUR);
|
||||
CHECK(before > 9.9f && before < 10.1f);
|
||||
|
||||
/* 绑定后只报区域 0:报一个写不进去的区号等于邀请主站去撞墙。 */
|
||||
check_area(0U);
|
||||
|
||||
/* 先走通 SN=0 的真链路,再做 SN!=0 的拒绝。
|
||||
* 顺序不能反:一次被否定的 203 会在模块里建立恢复屏障(同归属直到
|
||||
* CANCEL/DISCARD 前不再受理新批次),把它放前面会把后面的合法批次一起拦住
|
||||
* ——那是协议行为,不是本夹具要测的东西。 */
|
||||
preset_frame(frame, 0U, 0x8842U, 50.0f);
|
||||
n = exchange(frame, 24U, 203U, cot, pn, 8U);
|
||||
CHECK(n == 1U && cot[0] == 7U && pn[0] == 0U);
|
||||
CHECK(apply_calls == 0U);
|
||||
CHECK(prot_set_get_f(PS_OC1_CUR) == before);
|
||||
|
||||
/* 固化:预检 + 提交各一次,prot_set 必须真的变成 50.0 A。 */
|
||||
solidify_frame(frame, 0U);
|
||||
n = exchange(frame, 15U, 203U, cot, pn, 8U);
|
||||
CHECK(n == 1U && cot[0] == 7U && pn[0] == 0U);
|
||||
CHECK(validate_calls == 1U && apply_calls == 1U);
|
||||
CHECK(prot_set_get_f(PS_OC1_CUR) > 49.9f && prot_set_get_f(PS_OC1_CUR) < 50.1f);
|
||||
|
||||
/* 读回走真实源:50.0 而不是 profile 里的出厂字面量 1.2。 */
|
||||
CHECK(read_back_8842() > 49.9f && read_back_8842() < 50.1f);
|
||||
|
||||
/* 202 读 SN=1:绑定后没有第二套值区,必须回否定帧而不是拿镜像冒充活值。 */
|
||||
read_frame(frame, 1U, 0x8842U);
|
||||
n = exchange(frame, 17U, 202U, cot, pn, 8U);
|
||||
CHECK(n >= 1U && pn[0] == 1U);
|
||||
|
||||
/* 202 读 SN=0:真链路,回肯定且元素是 50.0。 */
|
||||
read_frame(frame, 0U, 0x8842U);
|
||||
n = exchange(frame, 17U, 202U, cot, pn, 8U);
|
||||
CHECK(n >= 1U && pn[0] == 0U);
|
||||
|
||||
/* 提交计数只在真的调过 apply 时加一。 */
|
||||
iec104_source_stats(&stats);
|
||||
CHECK(stats.parameter_commits == 1U);
|
||||
|
||||
/* SN=1 的预置必须被否定确认,prot_set 一字未动,apply 一次都没进。 */
|
||||
preset_frame(frame, 1U, 0x8842U, 30.0f);
|
||||
n = exchange(frame, 24U, 203U, cot, pn, 8U);
|
||||
CHECK(n == 1U && cot[0] == 7U && pn[0] == 1U);
|
||||
CHECK(validate_calls == 1U && apply_calls == 1U);
|
||||
CHECK(prot_set_get_f(PS_OC1_CUR) > 49.9f && prot_set_get_f(PS_OC1_CUR) < 50.1f);
|
||||
iec104_source_stats(&stats);
|
||||
CHECK(stats.parameter_commits == 1U);
|
||||
|
||||
/* 收尾:把恢复屏障撤掉(合法 CANCEL),证明拒绝之后服务仍是活的。 */
|
||||
cancel_frame(frame, 1U);
|
||||
(void)exchange(frame, 15U, 203U, cot, pn, 8U);
|
||||
|
||||
CHECK(iec104_core_stop() == 0);
|
||||
puts("preset/solidify -> prot_set chain, SN!=0 refusal, honest read-back: PASS");
|
||||
return 0;
|
||||
}
|
||||
@@ -61,12 +61,12 @@ def main():
|
||||
include = [vendor / "104", vendor / "104/business", vendor / "common", vendor / "platform", vendor / "examples", original]
|
||||
names = ("iec104_response_transport_test", "iec104_ack_tracking_test", "iec104_idle_transport_test", "iec104_strict_priority_transport_test", "iec104_tcp_event_ring_test", "iec104_tcp_scheduler_test", "iec104_remote_parameter_test")
|
||||
results = []
|
||||
for name in names + ("source_binding_test", "vendor_boundary_test", "core_lifecycle_test"):
|
||||
for name in names + ("source_binding_test", "vendor_boundary_test", "core_lifecycle_test", "preset_to_prot_set_test"):
|
||||
if args.only and args.only not in name:
|
||||
continue
|
||||
target = output / name
|
||||
target.mkdir(exist_ok=True)
|
||||
fixture = Path(__file__).parent / (name + ".c") if name in ("source_binding_test", "vendor_boundary_test", "core_lifecycle_test") else original / (name + ".c")
|
||||
fixture = Path(__file__).parent / (name + ".c") if name in ("source_binding_test", "vendor_boundary_test", "core_lifecycle_test", "preset_to_prot_set_test") else original / (name + ".c")
|
||||
adaptation = None
|
||||
if name == "iec104_idle_transport_test":
|
||||
text = fixture.read_text(encoding="utf-8-sig")
|
||||
@@ -81,10 +81,12 @@ def main():
|
||||
extra = [ROOT / "App/iec60870/104/iec104_source.c", ROOT / "App/iec60870/104/iec104_dtu_table.c", vendor / "104/IEC104_Net_Windows.c", vendor / "104/IEC104_TcpServer.c"]
|
||||
if name == "core_lifecycle_test":
|
||||
extra = [ROOT / "App/iec60870/104/iec104_core.c", ROOT / "App/iec60870/104/iec104_source.c", ROOT / "App/iec60870/104/iec104_dtu_table.c"]
|
||||
if name == "preset_to_prot_set_test":
|
||||
extra = [ROOT / "App/iec60870/104/iec104_core.c", ROOT / "App/iec60870/104/iec104_source.c", ROOT / "App/iec60870/104/iec104_dtu_table.c", ROOT / "App/algo/prot_set.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/iec60870/104")] + [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")] + ["/I" + str(ROOT / "App/algo")] + [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}}
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
* TC-PROTSET-004 load_raw:合法整表装载并封存;含越界项 → 整表不装载 +
|
||||
* bad_mask 指认越界项(定值一致性:宁可全旧不可半新)
|
||||
* TC-PROTSET-005 Q10 往返精度(±1 LSB)
|
||||
* TC-PROTSET-006 元数据表自检:min<=max、投退项 0..1、非零通讯地址不重复
|
||||
* TC-PROTSET-006 元数据表自检:min<=max、投退项 0..1
|
||||
* TC-PROTSET-007 越界编号守卫(get/set)
|
||||
* TC-PROTSET-008 全局软压板 PS_GLOBAL_EN(B7):默认投入、set_sealed 原子写
|
||||
* 不破坏 selfcheck、脏标志三件套(peek/take/mark)
|
||||
@@ -137,8 +137,8 @@ static void tc_q10_roundtrip(void) {
|
||||
|
||||
/* TC-PROTSET-006 */
|
||||
static void tc_meta_sanity(void) {
|
||||
uint32_t i, j;
|
||||
int ok_range = 1, ok_ctl = 1, ok_addr = 1;
|
||||
uint32_t i;
|
||||
int ok_range = 1, ok_ctl = 1;
|
||||
|
||||
for (i = 0u; i < (uint32_t)PS_ID_COUNT; i++) {
|
||||
const prot_set_meta_t *m = &g_prot_set_meta[i];
|
||||
@@ -146,14 +146,9 @@ static void tc_meta_sanity(void) {
|
||||
if ((m->def < m->min) || (m->def > m->max)) { ok_range = 0; }
|
||||
if ((m->is_ctl != 0u) &&
|
||||
((m->min != 0) || (m->max != PROT_SET_Q10(1)))) { ok_ctl = 0; }
|
||||
if (m->comm_addr == 0u) { continue; }
|
||||
for (j = i + 1u; j < (uint32_t)PS_ID_COUNT; j++) {
|
||||
if (g_prot_set_meta[j].comm_addr == m->comm_addr) { ok_addr = 0; }
|
||||
}
|
||||
}
|
||||
CHECK(ok_range, "TC-PROTSET-006 meta: min<=def<=max for all items");
|
||||
CHECK(ok_ctl, "TC-PROTSET-006 meta: ctl items are 0..1");
|
||||
CHECK(ok_addr, "TC-PROTSET-006 meta: comm addresses unique");
|
||||
CHECK((uint32_t)PS_ID_COUNT <= 64u, "TC-PROTSET-006 item count fits 64-bit bad_mask (B8: 40)");
|
||||
}
|
||||
|
||||
@@ -271,16 +266,9 @@ static void tc_of_uf_meta(void) {
|
||||
CHECK((uint32_t)PROT_SET_BLOB_SZ == (PROT_SET_BLOB_HDR_SZ + 4u * 40u + 8u),
|
||||
"TC-PROTSET-011 blob size = hdr + 4*40 + tail");
|
||||
|
||||
/* 地址:参考逐项地址不在本仓库 -> 8 项全部本地项(comm_addr=0,104 不可寻址) */
|
||||
CHECK((g_prot_set_meta[PS_OF_EN].comm_addr == 0u)
|
||||
&& (g_prot_set_meta[PS_OF_HZ].comm_addr == 0u)
|
||||
&& (g_prot_set_meta[PS_OF_DLY].comm_addr == 0u)
|
||||
&& (g_prot_set_meta[PS_UF_EN].comm_addr == 0u)
|
||||
&& (g_prot_set_meta[PS_UF_HZ].comm_addr == 0u)
|
||||
&& (g_prot_set_meta[PS_UF_DLY].comm_addr == 0u)
|
||||
&& (g_prot_set_meta[PS_RET_OF].comm_addr == 0u)
|
||||
&& (g_prot_set_meta[PS_RET_UF].comm_addr == 0u),
|
||||
"TC-PROTSET-011 OF/UF items all local (comm_addr=0, pending reference table)");
|
||||
/* 本地项判定已由 104 侧桥表 iec104_dtu_protection_mapping() 承担:
|
||||
* OF/UF 八项的地址不在桥表内 → 104 C_RD/C_SE 不可寻址。本模块不再有
|
||||
* 地址概念,故此处不再断言(且本编译单元不链 iec104_dtu_table.c)。 */
|
||||
|
||||
/* 投退 = ctl 项(0/1),其余 = 模拟量 Q10 */
|
||||
CHECK((g_prot_set_meta[PS_OF_EN].is_ctl == 1u) && (g_prot_set_meta[PS_UF_EN].is_ctl == 1u)
|
||||
|
||||
@@ -66,10 +66,10 @@ def load_meta():
|
||||
meta = {}
|
||||
for name, e in zip(ids, ent):
|
||||
p = [x.strip() for x in e.split(",")]
|
||||
if len(p) != 5:
|
||||
if len(p) != 4:
|
||||
print("[FATAL] %s 的 meta 行解析成 %d 段" % (name, len(p)))
|
||||
return None
|
||||
meta[name] = (1 if p[1].startswith("1") else 0, q10(p[2]), q10(p[3]), q10(p[4]))
|
||||
meta[name] = (1 if p[0].startswith("1") else 0, q10(p[1]), q10(p[2]), q10(p[3]))
|
||||
return (ids, meta)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user