新增 scene.signal 信号交互插件,落地 PLC 握手与扫车放行。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
ykkokluo
2026-08-14 14:43:11 +08:00
co-authored by Cursor
parent 1e780c2b65
commit 12c7c1d518
29 changed files with 2425 additions and 1 deletions
@@ -0,0 +1,20 @@
using System.ComponentModel;
namespace StandardScene.Signal.Model
{
/// <summary>
/// 握手点配置。对应老地图点上的 <c>SignalStop</c>SignalType + SignalParams)。
/// 站点 fields 若已填写同名键,优先用站点字段。
/// </summary>
public class HandshakePointModel
{
[DisplayName("站点")]
public int Sit { get; set; }
[DisplayName("信号类型")]
public string SignalType { get; set; } = "JGControl";
[DisplayName("信号参数")]
public string SignalParams { get; set; } = "";
}
}
@@ -0,0 +1,43 @@
using System.ComponentModel;
namespace StandardScene.Signal.Model
{
/// <summary>
/// PLC 机构配置。对应反编译 <c>PLCModel</c> 的可存档字段;读写运行态不进本类。
/// </summary>
public class PlcStationModel
{
[DisplayName("机构名称")]
public string JgName { get; set; } = "";
[DisplayName("机构IP")]
public string Ip { get; set; } = "127.0.0.1";
[DisplayName("端口")]
public int Port { get; set; } = 102;
[DisplayName("读地址")]
public string ReadDb { get; set; } = "";
[DisplayName("写地址")]
public string WriteDb { get; set; } = "";
[DisplayName("写心跳地址")]
public string HeartDb { get; set; } = "";
[DisplayName("机构进入地标")]
public int JgInPointId { get; set; }
[DisplayName("机构进入包含地标")]
public string JgInContains { get; set; } = "";
[DisplayName("机构地标")]
public int JgPointId { get; set; }
[DisplayName("机构包含地标")]
public string JgContains { get; set; } = "";
[DisplayName("上下机构")]
public SignalLineType LineType { get; set; } = SignalLineType.;
}
}
@@ -0,0 +1,19 @@
using System.ComponentModel;
namespace StandardScene.Signal.Model
{
/// <summary>单个机构运行态快照,供 MissionStatus / 监视面板展示。</summary>
public class PlcStationSnapshot
{
[DisplayName("机构")] public string JgName { get; set; } = "";
[DisplayName("连接")] public bool IsConnected { get; set; }
[DisplayName("读信号")] public string ReadSignal { get; set; } = "";
[DisplayName("写信号")] public string WriteSignal { get; set; } = "";
[DisplayName("回读写值")] public string ReadWriteSignal { get; set; } = "";
[DisplayName("机构内车")] public int InAgvNo { get; set; }
[DisplayName("请求进入车")] public int RequestInAgvNo { get; set; }
[DisplayName("写入成功")] public bool WriteSuccess { get; set; }
[DisplayName("心跳")] public bool Heart { get; set; }
[DisplayName("最近错误")] public string LastError { get; set; } = "";
}
}
@@ -0,0 +1,14 @@
using System.ComponentModel;
namespace StandardScene.Signal.Model
{
/// <summary>放行点配置。对应反编译 <c>StartSignModel</c>。</summary>
public class ReleasePointModel
{
[DisplayName("放行站点")]
public int Sit { get; set; }
[DisplayName("启用")]
public bool IsUse { get; set; } = true;
}
}
+30
View File
@@ -0,0 +1,30 @@
namespace StandardScene.Signal.Model
{
/// <summary>PLC → 调度:读字节含义(与反编译 ENUM_READ_SIGNAL 对齐)。</summary>
public enum SignalReadValue : byte
{
= 0,
= 1,
= 2
}
/// <summary>调度 → PLC:写字节含义(与反编译 ENUM_WRITE_SIGNAL 对齐)。</summary>
public enum SignalWriteValue : byte
{
= 0,
= 1,
= 2,
= 3,
= 4
}
/// <summary>机构类型(与反编译 ENUM_JGTYPE 对齐)。</summary>
public enum SignalLineType : byte
{
= 0,
线 = 1,
线 = 2,
线 = 3,
= 4
}
}