No description
Find a file
Harbor 8309df7ef0 feat: coordinator 工具、测试点表与 libiec61850 本地补丁入库
- tools/coordinator: PCS 协调控制器源码 + CMake 目标
- 测试程序点表: Trina_PCS.scd / GOOSE 点位描述
- patches/libiec61850: 上游库本地修改的可重放 patch(sc501.c 生成物除外,由 ICD 再生)
- .gitignore: 忽略 data/(向量库与日志等运行时产物)
2026-09-17 09:51:45 +08:00
deploy feat(deploy): 新增本地部署脚本与 systemd 服务 2026-08-12 10:32:10 +08:00
include/iec_bus feat: 服务实时日志(隧道连接/收发可见) 2026-08-12 11:08:55 +08:00
patches/libiec61850 feat: coordinator 工具、测试点表与 libiec61850 本地补丁入库 2026-09-17 09:51:45 +08:00
sdk feat: 新增 GOOSE 过滤/ICD/VLAN、MMS 主从站、SCL 解析与 SDK 交付包 2026-08-12 10:29:15 +08:00
src fix(goose): 数据集重建/心跳发布加锁,修复并发访问 dataset 2026-09-17 09:51:45 +08:00
tests feat: 新增 GOOSE 过滤/ICD/VLAN、MMS 主从站、SCL 解析与 SDK 交付包 2026-08-12 10:29:15 +08:00
tools feat: coordinator 工具、测试点表与 libiec61850 本地补丁入库 2026-09-17 09:51:45 +08:00
测试程序点表 feat: coordinator 工具、测试点表与 libiec61850 本地补丁入库 2026-09-17 09:51:45 +08:00
.gitignore feat: coordinator 工具、测试点表与 libiec61850 本地补丁入库 2026-09-17 09:51:45 +08:00
CMakeLists.txt feat: coordinator 工具、测试点表与 libiec61850 本地补丁入库 2026-09-17 09:51:45 +08:00
CMakePresets.json init: iec_bus IEC61850 协议栈工程(libiec61850 + libuv + flatbuffers) 2026-08-05 17:00:56 +08:00
CMakeUserPresets.json init: iec_bus IEC61850 协议栈工程(libiec61850 + libuv + flatbuffers) 2026-08-05 17:00:56 +08:00
conanfile.py feat: 新增 GOOSE 过滤/ICD/VLAN、MMS 主从站、SCL 解析与 SDK 交付包 2026-08-12 10:29:15 +08:00
mms从站设计方案.md feat: 新增 GOOSE 过滤/ICD/VLAN、MMS 主从站、SCL 解析与 SDK 交付包 2026-08-12 10:29:15 +08:00
README.md init: iec_bus IEC61850 协议栈工程(libiec61850 + libuv + flatbuffers) 2026-08-05 17:00:56 +08:00
规约栈接入指南.md feat: 新增 GOOSE 过滤/ICD/VLAN、MMS 主从站、SCL 解析与 SDK 交付包 2026-08-12 10:29:15 +08:00

iec_bus

iec_bus 是基于 libiec61850 的 IEC 61850 协议栈工程(C++17)。

模块

  • core/iec_bind — UDS 服务端监听(libuv,多连接,回调)
  • core/iec_client — UDS 客户端(连接、回调)
  • type/iec_type — flatbuffers 消息定义与帧协议(4 字节大端长度前缀分帧)
  • registry/iec_registry — 常驻注册服务:客户端注册协议(如 GOOSE 发布端)→ 服务端分配独立隧道 UDS 地址 → 协议消息走隧道

依赖

  • boost/1.89.0(header-only)
  • libuv/1.51.0
  • fmt/11.2.0
  • flatbuffers/25.12.19(fbs 定义在 include/iec_bus/type/iec_type.fbs,构建时用 flatc 生成 iec_type_generated.h)
  • gtest/1.17.0(测试)
  • libiec61850(本地子工程,../libiec61850)

构建

# 1. 安装依赖(首次或依赖变更后)
conan install . --output-folder=build/debug -s build_type=Debug --build=missing

# 2. 配置 + 构建
cmake -S . -B build/debug -DCMAKE_TOOLCHAIN_FILE=build/debug/conan_toolchain.cmake -DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTING=ON
cmake --build build/debug -j$(nproc)

# 3. 运行 / 测试
./build/debug/iec_bus
ctest --test-dir build/debug --output-on-failure

Release 构建将 build/debug 与 build_type=Release 对应替换即可。

运行

# 终端 1:启动常驻注册服务(默认监听 /tmp/iec_bus.sock)
./build/debug/iec_bus

# 终端 2:验证程序(注册 4 种协议 → 隧道收发 → 关闭)
./build/debug/iec_bus_reg_test