50 lines
1.8 KiB
C#
50 lines
1.8 KiB
C#
using System.Collections.Generic;
|
|
|
|
namespace MainShell.DeviceMaintance.Model
|
|
{
|
|
public enum CylinderControlType
|
|
{
|
|
SingleOutput = 0,
|
|
DualOutput = 1,
|
|
MultiOutput = 2
|
|
}
|
|
|
|
public enum CylinderConditionType
|
|
{
|
|
PointOn = 0,
|
|
PointOff = 1
|
|
}
|
|
|
|
public class CylinderActionConditionDefinition
|
|
{
|
|
public CylinderConditionType ConditionType { get; set; }
|
|
public string PointReference { get; set; }
|
|
public string Message { get; set; }
|
|
|
|
public bool ExpectedState => ConditionType == CylinderConditionType.PointOn;
|
|
}
|
|
|
|
public class CylinderDefinition
|
|
{
|
|
public string Name { get; set; }
|
|
public string Description { get; set; }
|
|
public string Module { get; set; }
|
|
public CylinderControlType ControlType { get; set; }
|
|
public List<string> ExtendOutputPoints { get; set; } = new List<string>();
|
|
public List<string> RetractOutputPoints { get; set; } = new List<string>();
|
|
public List<string> ExtendedFeedbackPoints { get; set; } = new List<string>();
|
|
public List<string> RetractedFeedbackPoints { get; set; } = new List<string>();
|
|
public List<CylinderActionConditionDefinition> ExtendConditions { get; set; } = new List<CylinderActionConditionDefinition>();
|
|
public List<CylinderActionConditionDefinition> RetractConditions { get; set; } = new List<CylinderActionConditionDefinition>();
|
|
|
|
public bool HasRetractOutputs => RetractOutputPoints != null && RetractOutputPoints.Count > 0;
|
|
}
|
|
|
|
public class CylinderExecutionResult
|
|
{
|
|
public bool Success { get; set; }
|
|
public string FailureReason { get; set; }
|
|
public IReadOnlyList<string> FailurePointReferences { get; set; } = new List<string>();
|
|
}
|
|
}
|