patrick
2019-10-18 4e8bf084f8a04617a9f542099183b8d829fa7c4b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
using Bro.Common.Helper;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using static Bro.Common.Helper.EnumHelper;
 
namespace Bro.Common.Interface
{
    /// <summary>
    /// 操作配置
    /// </summary>
    public interface IOperationConfig : IOperationResult
    {
        ///// <summary>
        ///// 结果输出 具体结果参照ConfigOutputAttribute特性指定的枚举
        ///// </summary>
        //[ConfigOutput("")]
        //int ResultOutput { get; set; }
 
        ///// <summary>
        ///// 该配置对应的工序编号
        ///// 考虑到多工序可能对应到同样的配置,工序编号不做固定赋值,在设备运作时随用随赋值
        ///// </summary>
        //string ProcessId { get; set; }
 
        ///// <summary>
        ///// 参见枚举DeviceAttributeType,表示对应项目的配置是根据数据预置配置还是上道工序输出配置
        ///// 14 (2+4+8)表示全部采用上道工序输出配置
        ///// </summary>
        //int ConfigPreset { get; set; }
 
        ///// <summary>
        ///// 该操作的设备配置 例如马达轴编号,马达速度等等
        ///// </summary>
        //IDeviceConfig DeviceConfig { get; set; }
 
        ///// <summary>
        ///// 该操作所需要的设备外部输入配置 如按钮启动,外部传感器信号等等
        ///// </summary>
        //IInputConfig InputConfig { get; set; }
 
        ///// <summary>
        ///// 暂时设想的一些不好归类的配置,使用json序列化之后保存在该字段
        ///// </summary>
        //string DataConfg { get; set; }
 
 
        //IOperationConfig Deserialize(string dataJson);
 
        /// <summary>
        /// 发生异常时的重新尝试次数
        /// </summary>
        int ReTryTimes { get; set; }
 
        /// <summary>
        /// 输入参数
        /// </summary>
        List<int> InputPara { get; set; }
 
        bool IsEnabled { get; set; }
 
        /// <summary>
        /// 当异常发生时的异常反馈值
        /// </summary>
        int ExceptionValue { get; set; }
 
        //bool IsDemoMode { get; set; }
    }
 
    /// <summary>
    /// 向PLC报警配置的接口
    /// </summary>
    public interface IPLCWarning
    {
        ///// <summary>
        ///// 失败多少次后向PLC报警
        ///// </summary>
        //int PLCWarningTimes { get; set; }
 
        WarningFromPC WarningType { get; set; }
    }
}