## 设计 通道配置新增 bind_app 字段: - bind_app="" (空) → 现有帧内容分路 (FTU串口) - bind_app="iec" → 整帧直投 libiec (TCP :2404 主站) - bind_app="self_ptl" → 整帧直投 self_ptl (备用) 新增 com_router_register_dispatch(bind_app, cb): - 协议模块在 app_wiring() 注册回调 - recv_cb 发现通道 bind_app 匹配, 直接调用 dispatch - 不需要帧解析 — 协议模块自行解码 ## 路由优先级 1. forward_rule → 维护透传 2. bind_app 非空 → dispatch 投递 3. bind_app 空 → 帧内容分路 (ICP67 dev=0/IEC/ICP67 dev≠0) ## 配置示例 channel_cfg.json: tcp_master(:2404) bind_app="iec" → 外部主站连接 :2404 → com_router → libiec 回调 |
||
|---|---|---|
| .. | ||
| channel_cfg.json | ||