将Feature/XP.Common和Feature/XP.Hardware分支合并至Develop/XP.forHardwareAndCommon,完善XPapp注册和相关硬件类库通用类库功能。
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
using Prism.Events;
|
||||
using XP.Hardware.MotionControl.Abstractions.Enums;
|
||||
|
||||
namespace XP.Hardware.MotionControl.Abstractions.Events
|
||||
{
|
||||
/// <summary>
|
||||
/// 轴状态变化事件数据 | Axis Status Changed Event Data
|
||||
/// </summary>
|
||||
/// <param name="AxisId">轴标识 | Axis identifier</param>
|
||||
/// <param name="Status">新的轴状态 | New axis status</param>
|
||||
public record AxisStatusChangedData(AxisId AxisId, AxisStatus Status);
|
||||
|
||||
/// <summary>
|
||||
/// 轴状态变化事件 | Axis Status Changed Event
|
||||
/// 当任意轴状态发生变化时发布 | Published when any axis status changes
|
||||
/// </summary>
|
||||
public class AxisStatusChangedEvent : PubSubEvent<AxisStatusChangedData> { }
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
using Prism.Events;
|
||||
|
||||
namespace XP.Hardware.MotionControl.Abstractions.Events
|
||||
{
|
||||
/// <summary>
|
||||
/// 门联锁状态变化事件 | Door Interlock Status Changed Event
|
||||
/// 当安全门联锁信号发生变化时发布 | Published when safety door interlock signal changes
|
||||
/// Payload: true=已联锁, false=未联锁 | Payload: true=interlocked, false=not interlocked
|
||||
/// </summary>
|
||||
public class DoorInterlockChangedEvent : PubSubEvent<bool> { }
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
using Prism.Events;
|
||||
using XP.Hardware.MotionControl.Abstractions.Enums;
|
||||
|
||||
namespace XP.Hardware.MotionControl.Abstractions.Events
|
||||
{
|
||||
/// <summary>
|
||||
/// 门状态变化事件 | Door Status Changed Event
|
||||
/// 当安全防护门状态发生变化时发布 | Published when safety door status changes
|
||||
/// </summary>
|
||||
public class DoorStatusChangedEvent : PubSubEvent<DoorStatus> { }
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
using Prism.Events;
|
||||
|
||||
namespace XP.Hardware.MotionControl.Abstractions.Events
|
||||
{
|
||||
/// <summary>
|
||||
/// 几何反算结果填入请求数据 | Geometry inverse calculation apply request data
|
||||
/// </summary>
|
||||
public class GeometryApplyRequestData
|
||||
{
|
||||
public double SourceZTarget { get; }
|
||||
public double DetectorZTarget { get; }
|
||||
public double StageXActual { get; }
|
||||
public double StageYActual { get; }
|
||||
public double DetSwingActual { get; }
|
||||
public double StageRotActual { get; }
|
||||
public double FixtureRotActual { get; }
|
||||
|
||||
public GeometryApplyRequestData(
|
||||
double sourceZTarget, double detectorZTarget,
|
||||
double stageXActual, double stageYActual,
|
||||
double detSwingActual, double stageRotActual, double fixtureRotActual)
|
||||
{
|
||||
SourceZTarget = sourceZTarget;
|
||||
DetectorZTarget = detectorZTarget;
|
||||
StageXActual = stageXActual;
|
||||
StageYActual = stageYActual;
|
||||
DetSwingActual = detSwingActual;
|
||||
StageRotActual = stageRotActual;
|
||||
FixtureRotActual = fixtureRotActual;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 几何反算结果填入请求事件 | Geometry inverse calculation apply request event
|
||||
/// 由 DebugWindow 发布,MotionControlViewModel 订阅后填入目标值
|
||||
/// Published by DebugWindow, subscribed by MotionControlViewModel to fill target values
|
||||
/// </summary>
|
||||
public class GeometryApplyRequestEvent : PubSubEvent<GeometryApplyRequestData> { }
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
using Prism.Events;
|
||||
|
||||
namespace XP.Hardware.MotionControl.Abstractions.Events
|
||||
{
|
||||
/// <summary>
|
||||
/// 几何参数数据 | Geometry Data
|
||||
/// </summary>
|
||||
/// <param name="FOD">焦点到旋转中心距离(mm)| Focus to Object Distance (mm)</param>
|
||||
/// <param name="FDD">焦点到探测器距离(mm)| Focus to Detector Distance (mm)</param>
|
||||
/// <param name="Magnification">放大倍率 | Magnification</param>
|
||||
public record GeometryData(double FOD, double FDD, double Magnification);
|
||||
|
||||
/// <summary>
|
||||
/// 几何参数更新事件 | Geometry Updated Event
|
||||
/// 当几何参数(FOD/FDD/放大倍率)重新计算后发布 | Published when geometry parameters are recalculated
|
||||
/// </summary>
|
||||
public class GeometryUpdatedEvent : PubSubEvent<GeometryData> { }
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
using Prism.Events;
|
||||
using XP.Hardware.MotionControl.Abstractions.Enums;
|
||||
|
||||
namespace XP.Hardware.MotionControl.Abstractions.Events
|
||||
{
|
||||
/// <summary>
|
||||
/// 运动错误事件数据 | Motion Error Event Data
|
||||
/// </summary>
|
||||
/// <param name="AxisId">轴标识 | Axis identifier</param>
|
||||
/// <param name="ErrorMessage">错误信息 | Error message</param>
|
||||
public record MotionErrorData(AxisId AxisId, string ErrorMessage);
|
||||
|
||||
/// <summary>
|
||||
/// 运动错误事件 | Motion Error Event
|
||||
/// 当轴状态变为 Error 或 Alarm 时发布 | Published when axis status changes to Error or Alarm
|
||||
/// </summary>
|
||||
public class MotionErrorEvent : PubSubEvent<MotionErrorData> { }
|
||||
}
|
||||
Reference in New Issue
Block a user