This commit is contained in:
flower_linux
2026-06-11 19:00:49 +08:00
parent 710a8c2bd3
commit 0cf0713dc5
73 changed files with 2297 additions and 95 deletions

29
docs/command_flow.md Normal file
View File

@@ -0,0 +1,29 @@
# 控制命令闭环
## 下行链路
```
OPC UA Client / --self-test
→ UaMethodBinder::ExecuteCommand
→ CommandService::submit()
→ registry 点表校验 + 范围检查
→ bus.publish(control/cmd/{device}/{point}/set)
→ TransportBusBridge → TcpUplinkServer → edge
→ CommandExecutor → ShadowChannelStore (mock AO)
→ SoftbusAck → bus.publish(control/ack/...)
→ CommandService ACK 匹配 → Succeeded
```
## 上行反馈
```
ShadowChannelStore 更新
→ edge 构造 RawPacket 上行
→ PipelineEngine 解析 → UaModelBinder
→ bus.publish(data/{device}/{point})
→ OPC UA Variable 更新
```
## 命令状态
`Created → Validated → Dispatched → Succeeded / Failed / Timeout`

View File

@@ -0,0 +1,20 @@
# 点表设计
配置文件:`config/point_table.json`YAML 镜像:`config/point_table.yaml`
## 映射关系
```
ValveOpening
↔ AO_Channel_01 (physicalChannel)
↔ ns=1;s=.../ValveOpening (opcuaNodeId)
↔ control/cmd/EdgeDevice_01/ValveOpening/set (cmdTopic)
↔ control/ack/EdgeDevice_01/ValveOpening (ackTopic)
↔ data/EdgeDevice_01/ValveOpening (dataTopic)
```
`softbus_registry::PointRegistry` 加载并建立三向索引:`objectRef` / `topic` / `opcuaNodeId`
## 主题规则
`config/topic_rule.json` 定义默认主题模板,点表可覆盖单点 `cmdTopic`/`dataTopic`