本仓库是基于 .NET 6 + Vue 3 的 S7 PLC 模拟器,采用前后端分离架构。
WIDESEAWCS_S7Simulator.Core:核心领域模型、内存区域(M/DB/I/Q/T/C)、模拟器运行时与持久化能力。WIDESEAWCS_S7Simulator.Application:应用层抽象与协议/应用服务。WIDESEAWCS_S7Simulator.Server:ASP.NET Core Web API(Controllers/、Program.cs),运行数据位于 Data/。WIDESEAWCS_S7Simulator.Web:Vue 3 + TypeScript 前端(src/views、src/api、src/router、src/types)。WIDESEAWCS_S7Simulator.UnitTests:xUnit 单元测试项目。docs/:设计说明与协议文档。以下命令默认在仓库根目录执行。
dotnet restore WIDESEAWCS_S7Simulator.slnx:还原 NuGet 依赖。dotnet build WIDESEAWCS_S7Simulator.slnx:构建后端所有项目。dotnet test WIDESEAWCS_S7Simulator.UnitTests:运行 xUnit 测试。dotnet run --project WIDESEAWCS_S7Simulator.Server:启动后端 API(默认 http://localhost:5137)。cd WIDESEAWCS_S7Simulator.Web && pnpm install:安装前端依赖。cd WIDESEAWCS_S7Simulator.Web && pnpm dev:启动前端开发服务(通常为 http://localhost:3000 或 5173)。cd WIDESEAWCS_S7Simulator.Web && pnpm build:执行类型检查并构建生产包。PascalCase,局部变量/参数使用 camelCase,接口使用 I 前缀。PascalCase(如 DetailsView.vue);变量与函数使用 camelCase;API DTO 类型集中在 src/types。Microsoft.NET.Test.Sdk、coverlet.collector)。MemoryStoreTests.ReadBit_ReturnsExpectedValue。dotnet test。feat: ...、fix: ...、refactor: ...、docs: ...(可使用中文描述)。dotnet test、pnpm build),UI 改动附截图或录屏。git commit、git push 或创建 PR。