You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Current Handoff
- Goal: 完成综合平台编程器的核心数据模型与接口。
- Branch:
main。
- Current status: 已完成开发顺序第 3 步,核心领域模型、寄存器仓库接口和运行模式边界已定义。
- Changed files:
app/integrated_platform.pro
app/src/main.cpp
app/src/ui/main_window.h
app/src/ui/main_window.cpp
app/src/ui/main_window.ui
AGENTS.md
docs/C++代码规范.md
docs/architecture.md
app/src/domain/.gitkeep
app/src/services/.gitkeep
app/src/infrastructure/.gitkeep
app/tests/.gitkeep
scripts/build_and_run_qt.ps1
app/src/domain/register_address.h
app/src/domain/register_address.cpp
app/src/domain/register_repository.h
app/src/domain/register_repository.cpp
app/src/domain/hmi_model.h
app/src/domain/hmi_model.cpp
app/src/domain/control_logic_model.h
app/src/domain/control_logic_model.cpp
app/src/domain/project_model.h
app/src/domain/project_model.cpp
app/src/domain/runtime_state.h
app/src/domain/runtime_state.cpp
app/tests/domain_tests.pro
app/tests/domain_tests.cpp
- Decisions made:
- Qt 应用源码位于
app/,构建输出位于被忽略的 build/。
- 使用 qmake、Qt Widgets、Qt SerialBus 和 MinGW 8.1。
- 主窗口只承载基础界面,不承担 PLC 通信或控制逻辑。
- 简单函数、构造函数和析构函数不添加重复性注释。
- 生产代码按
UI -> Services -> Domain 的方向依赖;基础设施实现领域接口。
- 领域模型仅使用 C++17 标准库,不依赖 Qt UI、串口或 Modbus。
- M 地址只承载布尔值,D 地址只承载带符号 16 位值,地址范围统一为
0~4000。
RegisterRepository 统一虚拟寄存器和真实 PLC 缓存的访问契约。
- 控制逻辑节点使用
std::variant 组合触点、线圈和数值比较的独立配置类型。
- 当前控制逻辑范围不包含定时器;不得因为设备手册或旧开发计划提前加入未确认功能。
- 新增逻辑节点时增加独立配置类型,不向通用节点结构堆叠无关可选字段。
- 测试按业务风险分级 优先覆盖领域规则 服务闭环 工程存储和通信异常 不为简单访问器堆叠单测。
- 运行态之间不可直接切换;真机运行态必须先完成 PLC 初次读取,且不运行软件逻辑执行器。
- Validation run and results:
- 在
build/baseline/ 执行 qmake 与 mingw32-make -j2,构建成功。
- 已启动
integrated_platform.exe 并正常退出。
- 已通过
scripts/build_and_run_qt.ps1 完成 Debug 构建和启动验证。
- 新增分层目录后再次完成 Debug 构建和启动验证。
- 已确认构建目录、临时目录和本地草稿文档被
.gitignore 忽略。
- 在
build/core-model/ 重新执行 qmake 和 mingw32-make -j2,应用构建成功。
- 在
build/domain-tests/ 构建并运行领域测试,输出 domain tests passed。
- 控制逻辑节点配置重构后再次构建应用和领域测试,均通过。
- Remaining work: 进入开发顺序第 4 步,实现工程新建、保存、另存为和加载。
- Known risks / blockers: 无。
- Suggested next command: 基于
Project 领域模型设计版本化的工程文件 DTO 与存储接口。