2e9272cc8a
引入成熟 IEC 60870-5-104 子站的只读子集(App/protocol/iec60870,28 个源文件 按原字节复制,UPSTREAM.sha256 记录来源,兼容补丁保留全部断言与容量),在其上 装配单属主共享核心(Start/Poll/Stop/Get_Status),并把标准 DTU 演示点表全量 接入为唯一真源。 - iec104_core:threadless 推进,poll 零等待,通知/交互/COV 扫描全部有界; 生命周期区分失败启动待重试、重复启动拒绝、断线保固化 RAM。 - iec104_dtu_table / iec104_source:标准 DTU 全点表注册,无数据源的点读 0, 遥控只做模拟状态可读回,不触碰实际出口。 - iec104_sim:仅窗口与独立服务模式起真实 TCP,无头黄金模式保持确定性假统计。 - test/host/iec104_dtu:独立真实 TCP 11 项、传输层 10 项、生命周期与借用负例。 验证:lvgl_sim 真实 TCP 11/11、传输 10/10,UI 像素回归未回退;AC5 单 TU 编译 0 错误 0 诊断。板端尚未切换:完整库闭包 RAM 超 92% 门禁净增预算 25730B, 结论为停止转实施,记录在 IEC104_MCU最小可行性验证.md。旧实现与 board 服务 保持原样,未提交 MDK 工程改动,未烧板。
39 lines
1.4 KiB
C
39 lines
1.4 KiB
C
/* 模块名称:DTU标准点表元数据接口;作者:DTU项目组。
|
|
* Metadata is taken from the unmodified upstream DTU demonstration profile. */
|
|
#ifndef IEC104_DTU_TABLE_H
|
|
#define IEC104_DTU_TABLE_H
|
|
#include <stdbool.h>
|
|
#include <stddef.h>
|
|
#include <stdint.h>
|
|
#define IEC104_DTU_SP_COUNT 59U
|
|
#define IEC104_DTU_DP_COUNT 16U
|
|
#define IEC104_DTU_ME_COUNT 30U
|
|
#define IEC104_DTU_ENERGY_COUNT 8U
|
|
#define IEC104_DTU_PARAMETER_COUNT 430U
|
|
#define IEC104_DTU_STANDARD_COUNT 120U
|
|
#define IEC104_DTU_COMMAND_COUNT 65U
|
|
#define IEC104_DTU_AREA_COUNT 5U
|
|
#define IEC104_DTU_GI_COUNT 225U
|
|
/* Point order: SP59, DP16, ME30. GI then appends standard parameters120. */
|
|
typedef struct {
|
|
uint32_t ioa;
|
|
uint16_t source_addr;
|
|
uint8_t type;
|
|
const char *name;
|
|
const char *unit;
|
|
} iec104_dtu_point_t;
|
|
typedef struct {
|
|
uint32_t ioa;
|
|
uint8_t tag, source_tag;
|
|
bool configured, writable, area_scoped;
|
|
const char *initial;
|
|
} iec104_dtu_parameter_t;
|
|
bool iec104_dtu_point(size_t index, iec104_dtu_point_t *out);
|
|
bool iec104_dtu_parameter(size_t index, iec104_dtu_parameter_t *out);
|
|
size_t iec104_dtu_parameter_index(uint32_t ioa);
|
|
bool iec104_dtu_parameter_visible(size_t index, uint16_t area);
|
|
/* IDs are existing prot_set_id_t values, not legacy communication addresses.
|
|
* wire_value * source_scale = source engineering value. */
|
|
bool iec104_dtu_protection_mapping(uint32_t ioa, uint16_t *id, float *source_scale);
|
|
#endif
|