✨ feat(*): 更新 PLC 相关功能与配置

- 在 appConfig.json 中添加 EndianFormat 配置项并更新相关输入输出地址
- 修改 ResultCode 类型为 short,确保与 PLC 通信一致
- 新增 DesignTimePlcService 以支持设计时的 PLC 测试写入功能
- 更新 SystemSettingViewModel 和 DashboardPage 以支持手动测试写入
- 调整多个视图模型和服务以适应新的 PLC 写入逻辑
- 更新相关单元测试以验证新功能的正确性
This commit is contained in:
2026-06-02 17:26:24 +08:00
parent ce356bffff
commit 27e2c9d5d0
31 changed files with 812 additions and 110 deletions

View File

@@ -129,6 +129,11 @@ public sealed class PlcOptions
/// </summary>
public byte SourceNodeAddress { get; set; } = 25;
/// <summary>
/// 获取或设置 PLC 寄存器字节序,默认使用 BADC 以匹配现场 D 区 Int16 高低字节顺序。
/// </summary>
public string? EndianFormat { get; set; } = "BADC";
/// <summary>
/// 获取或设置轮询周期,单位为毫秒。
/// </summary>