using Bro.Common.Helper;
|
using Bro.Common.Interface;
|
using Newtonsoft.Json;
|
using System;
|
using System.Collections.Generic;
|
using System.ComponentModel;
|
using System.Linq;
|
using System.Text;
|
using System.Threading.Tasks;
|
using static Bro.Common.Helper.EnumHelper;
|
|
namespace Bro.Common.Base
|
{
|
//[Device("Base", "基础操作配置", EnumHelper.DeviceAttributeType.OperationConfig)]
|
public class OperationConfigBase : IOperationConfig
|
{
|
////[JsonIgnore]
|
//public IDeviceConfig DeviceConfig { get; set; }
|
|
////[JsonIgnore]
|
//public IInputConfig InputConfig { get; set; }
|
|
//public string OutputMethodName { get; set; }
|
|
////[JsonIgnore]
|
//public string ProcessId { get; set; }
|
|
//public string ProcessName { get; set; }
|
|
[JsonIgnore]
|
[Browsable(false)]
|
public virtual int ResultOutput { get; set; }
|
|
/// <summary>
|
/// 输入参数
|
/// </summary>
|
[JsonIgnore]
|
[Browsable(false)]
|
public List<int> InputPara { get; set; }
|
|
|
[Category("启用配置")]
|
[Description("true:启用该配置执行操作;false:不启用该配置,不执行操作")]
|
public bool IsEnabled { get; set; } = true;
|
|
/// <summary>
|
/// 异常反馈值
|
/// </summary>
|
[Category("异常反馈设置")]
|
[Description("异常反馈值")]
|
public int ExceptionValue { get; set; } = 0;
|
|
/// <summary>
|
/// 发生异常时的重新尝试次数
|
/// </summary>
|
[Category("异常反馈设置")]
|
[Description("发生异常时的重新尝试次数")]
|
public int ReTryTimes { get; set; } = 3;
|
|
///// <summary>
|
///// 发生异常多次后向PLC报警
|
///// </summary>
|
//[Category("异常反馈设置")]
|
//[Description("发生异常多次后向PLC报警")]
|
//public int PLCWarningTimes { get; set; } = 0;
|
|
///// <summary>
|
///// 向PLC报警的报警类别
|
///// </summary>
|
//[Category("异常反馈设置")]
|
//[Description("向PLC报警的报警类别")]
|
//public WarningFromPC WarningType { get; set; } = WarningFromPC.UnknowError;
|
|
///// <summary>
|
///// 14 (2+4+8)表示全部采用上道工序输出配置
|
///// </summary>
|
//public int ConfigPreset { get; set; } = 0;
|
}
|
|
public class OperationConfigCommon : OperationConfigBase
|
{
|
[ConfigOutputResource("OutputResultCommon")]
|
public override int ResultOutput { get; set; }
|
}
|
}
|