IGetSampleService.cs 5.54 KB
Newer Older
潘栩锋's avatar
潘栩锋 committed
1 2 3 4 5 6
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using FLY.Thick.Base.Common;
using System.ComponentModel;
7 8
using Newtonsoft.Json;
using PropertyChanged;
9
using FObjBase;
10
using FObjBase.Reflect;
潘栩锋's avatar
潘栩锋 committed
11 12 13

namespace FLY.Thick.Base.IService
{
潘栩锋's avatar
潘栩锋 committed
14 15 16
    /// <summary>
    /// 
    /// </summary>
潘栩锋's avatar
潘栩锋 committed
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
    public interface IGetSampleService:INotifyPropertyChanged
    {
        /// <summary>
        /// 参数:使能
        /// </summary>
        bool Enable { get; set; }

        /// <summary>
        /// 参数:速度
        /// </summary>
        UInt32 Velocity { get; set; }

        /// <summary>
        /// 参数:样品点范围
        /// </summary>
        int Range { get; set; }

        /// <summary>
        /// 参数:移动滤波 ,窗口值
        /// </summary>
        int Window { get; set; }

39 40 41 42 43 44 45 46 47 48 49 50
        /// <summary>
        /// 使用%方式检查异常
        /// </summary>
        bool IsCheckByPercent { get; set; }
        /// <summary>
        /// 异常%
        /// </summary>
        double ErrPercent { get; set; }
        /// <summary>
        /// 异常值
        /// </summary>
        int ErrValue { get; set; }
51

潘栩锋's avatar
潘栩锋 committed
52 53 54
        /// <summary>
        /// 参数:样品点参数
        /// </summary>
55
        [PropertyPush]
56
        SampleCell[] Samples { get; }
潘栩锋's avatar
潘栩锋 committed
57 58 59 60
        /// <summary>
        /// 参数:特征查找范围
        /// </summary>
        int Search { get; set; }
61

潘栩锋's avatar
潘栩锋 committed
62 63 64
        /// <summary>
        /// 参数:特征参数
        /// </summary>
65
        [PropertyPush]
66
        SampleFeature[] Features { get; }
潘栩锋's avatar
潘栩锋 committed
67 68 69 70 71

        /// <summary>
        /// 应用
        /// </summary>
        void Apply();
72
    }
潘栩锋's avatar
潘栩锋 committed
73

74 75


潘栩锋's avatar
潘栩锋 committed
76 77 78
    /// <summary>
    /// 采样记录
    /// </summary>
79 80
    public class TempFilterData
    {
潘栩锋's avatar
潘栩锋 committed
81 82 83
        /// <summary>
        /// 采集时间
        /// </summary>
84
        public DateTime Time { get; set; }
潘栩锋's avatar
潘栩锋 committed
85 86 87
        /// <summary>
        /// Ad值
        /// </summary>
88
        public int Ad { get; set; }
潘栩锋's avatar
潘栩锋 committed
89 90 91
        /// <summary>
        /// 滤波后的AD值
        /// </summary>
92
        public int FilterAd { get; set; }
潘栩锋's avatar
潘栩锋 committed
93 94 95
        /// <summary>
        /// 复位
        /// </summary>
96
        public bool IsReset { get; set; }
潘栩锋's avatar
潘栩锋 committed
97
    }
98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132

    /// <summary>
    /// 样品点 参数
    /// </summary>
    public class SampleCellParam : INotifyPropertyChanged 
    {
        /// <summary>
        /// 参数:使能
        /// </summary>
        public bool Enable { get; set; }

        /// <summary>
        /// 参数:只检查不标定
        /// </summary>
        public bool JustForCheck { get; set; }

        /// <summary>
        /// 参数:原始AD值
        /// </summary>
        public int OrgAD { get; set; }

        /// <summary>
        /// 参数:位置
        /// </summary>
        public int Position { get; set; }

        #region INotifyPropertyChanged 成员

        public event PropertyChangedEventHandler PropertyChanged;

        #endregion

    }


133 134 135 136
    /// <summary>
    /// 样品点
    /// </summary>
    public class SampleCell:INotifyPropertyChanged
潘栩锋's avatar
潘栩锋 committed
137
    {
138

潘栩锋's avatar
潘栩锋 committed
139 140 141
        /// <summary>
        /// 参数:使能
        /// </summary>
142
        public bool Enable { get; set; }
潘栩锋's avatar
潘栩锋 committed
143 144 145 146

        /// <summary>
        /// 参数:只检查不标定
        /// </summary>
147
        public bool JustForCheck { get; set; }
潘栩锋's avatar
潘栩锋 committed
148 149 150 151

        /// <summary>
        /// 参数:原始AD值
        /// </summary>
152
        public int OrgAD { get; set; }
潘栩锋's avatar
潘栩锋 committed
153 154

        /// <summary>
155
        /// 参数:位置
潘栩锋's avatar
潘栩锋 committed
156
        /// </summary>
157
        public int Position { get; set; }
潘栩锋's avatar
潘栩锋 committed
158 159 160 161

        /// <summary>
        /// 状态:当前测量的AD值
        /// </summary>
162 163
        public int AD { get; set; }

潘栩锋's avatar
潘栩锋 committed
164 165 166 167

        /// <summary>
        /// 状态:当前测量的AD值 对应的 样品值
        /// </summary>
168
        public double SampleValue { get; set; }
169

170 171 172 173
        /// <summary>
        /// 采集失败了
        /// </summary>
        public bool IsFailure { get; set; }
174 175 176 177 178 179
        #region INotifyPropertyChanged 成员

        public event PropertyChangedEventHandler PropertyChanged;

        #endregion

潘栩锋's avatar
潘栩锋 committed
180
    }
181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210


    /// <summary>
    /// 样品正向校正特征
    /// </summary>
    public class SampleFeatureParam : INotifyPropertyChanged
    {

        /// <summary>
        /// 参数:使能
        /// </summary>
        public bool Enable { get; set; }

        /// <summary>
        /// 参数:开始位置
        /// </summary>
        public int StartPos { get; set; }

        /// <summary>
        /// 参数:结束位置
        /// </summary>
        public int EndPos { get; set; }


        #region INotifyPropertyChanged 成员

        public event PropertyChangedEventHandler PropertyChanged;

        #endregion
    }
211 212 213 214
    /// <summary>
    /// 样品正向校正特征
    /// </summary>
    public class SampleFeature :INotifyPropertyChanged
潘栩锋's avatar
潘栩锋 committed
215
    {
216

潘栩锋's avatar
潘栩锋 committed
217 218 219
        /// <summary>
        /// 参数:使能
        /// </summary>
220 221 222
        public bool Enable { get; set; }


潘栩锋's avatar
潘栩锋 committed
223 224 225
        /// <summary>
        /// 参数:开始位置
        /// </summary>
226 227 228
        public int StartPos { get; set; }


潘栩锋's avatar
潘栩锋 committed
229 230 231
        /// <summary>
        /// 参数:结束位置
        /// </summary>
232 233
        public int EndPos { get; set; }

潘栩锋's avatar
潘栩锋 committed
234 235

        /// <summary>
236
        /// 状态:相似度必须高于0.8,失败-1
潘栩锋's avatar
潘栩锋 committed
237
        /// </summary>
238
        public double MaxRelevancy { get; set; } = -1;
潘栩锋's avatar
潘栩锋 committed
239 240 241 242

        /// <summary>
        /// 状态:最大相似度对应的偏移
        /// </summary>
243
        public int MaxOffset { get; set; }
潘栩锋's avatar
潘栩锋 committed
244

245 246 247 248 249 250 251

        #region INotifyPropertyChanged 成员

        public event PropertyChangedEventHandler PropertyChanged;


        #endregion
潘栩锋's avatar
潘栩锋 committed
252 253
    }
}