plan_execute_t1/README.md

60 lines
1.7 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# CMS — 联合作战任务规划系统
**Command Management System (CMS)** 是一个支持集中式与分布式作战任务方案规划、执行监控及动态重构的软件系统,服务于联合作战指挥机构。
## 目录结构
```
project-files/
├── CMakeLists.txt # CMake 构建配置
├── README.md # 本文件
├── include/
│ └── app.hpp # 核心数据结构与 CMS 引擎接口定义
├── src/
│ ├── app.cpp # CMS 引擎实现
│ └── main.cpp # 命令行入口(功能演示)
└── tests/
└── basic_test.cpp # 单元测试(基于标准库 assert
```
## 构建与运行
### 前置条件
- CMake ≥ 3.14
- 支持 C++17 的编译器GCC 8+, Clang 7+, MSVC 2019+
### 构建步骤
```bash
# 1. 进入工程目录
cd codegen-runs/codegen_8fc6cf94f71a40058add1b003d16ce05
# 2. 创建构建目录
mkdir -p build && cd build
# 3. 配置
cmake ..
# 4. 编译
cmake --build . --parallel
# 5. 运行主程序
./cms_main
# 6. 运行测试
./cms_test
```
## 核心数据结构
| 结构体 | 说明 |
|--------|------|
| `TaskPlan` | 任务方案:包含 ID、名称、类型集中/分布)、状态、拓扑等 |
| `EventRecord` | 战场事件ID、类型、时空坐标、优先级、处理状态 |
| `TemplateInstance` | 模板实例:适用场景、版本、子任务需求树 |
| `ExecutionStatus` | 执行状态:进度、健康指标、心跳、异常码 |
| `UserSession` | 用户会话:用户 ID、角色、权限位图、令牌 |
| `NotificationMessage` | 通知消息:优先级、类型、摘要、时间 |
| `SystemStateContext` | 系统状态上下文:运行模式、快照、一致性标记 |