using System; using System.Collections.Generic; using System.Linq; using System.Text; using FLY.Thick.Base.Common; using System.ComponentModel; using Newtonsoft.Json; using PropertyChanged; using FObjBase; using FObjBase.Reflect; namespace FLY.Thick.Base.IService { /// /// /// public interface IGetSampleService:INotifyPropertyChanged { /// /// 参数:使能 /// bool Enable { get; set; } /// /// 参数:速度 /// UInt32 Velocity { get; } /// /// 参数:样品点范围 单位:脉冲 /// 样品点直径为 Range*2 /// int SampleRange { get; set; } /// /// 参数:移动滤波 ,窗口值 单位:min /// int Window { get; set; } /// /// 使用%方式检查异常 /// 1.滤波前AD 与 滤波后AD比较 /// 2.当前样品AD 与 上一次样品AD比较 /// 3.当前 样品X_AD/样品0_AD 与 上一次比较 /// bool IsCheckByPercent { get; set; } /// /// 异常比例 单位不是% /// double ErrPercent { get; set; } /// /// 异常值 /// int ErrValue { get; set; } /// /// 当前 样品X_AD/样品0_AD 与 上一次比较 差异比例 单位不是% /// double CrossErrPercent { get; set; } /// /// 参数:样品点参数 /// [PropertyPush] SampleCell[] Samples { get; } /// /// 参数:特征查找范围 单位:脉冲 /// 取样范围 会扩大为 -SearchRange ~ +SearchRange /// int SearchRange { get; set; } /// /// 参数:特征参数 0:正方向, 1:反方向 /// [PropertyPush] SampleFeature[] Features { get; } /// /// 应用 /// void Apply(); [Call(typeof(List>))] void GetTempFilterDatas(AsyncCBHandler asyncDelegate, object asyncContext); } /// /// 采样记录 /// public class TempFilterData { /// /// 采集时间 /// public DateTime Time { get; set; } /// /// Ad值 /// public int Ad { get; set; } /// /// 滤波后的AD值 /// public int FilterAd { get; set; } /// /// 复位 /// public bool IsReset { get; set; } } /// /// 样品点 参数 /// public class SampleCellParam : INotifyPropertyChanged { /// /// 参数:使能 /// public bool Enable { get; set; } /// /// 参数:只检查不标定 /// public bool JustForCheck { get; set; } /// /// 参数:原始AD值 /// public int OrgAD { get; set; } /// /// 参数:位置 /// public int Position { get; set; } #region INotifyPropertyChanged 成员 public event PropertyChangedEventHandler PropertyChanged; #endregion } /// /// 样品点 /// public class SampleCell:INotifyPropertyChanged { /// /// 参数:使能 /// public bool Enable { get; set; } /// /// 参数:只检查不标定 /// public bool JustForCheck { get; set; } /// /// 参数:原始AD值 /// public int OrgAD { get; set; } /// /// 参数:位置 /// public int Position { get; set; } /// /// 状态:当前测量的AD值 /// public int AD { get; set; } /// /// 状态:当前测量的AD值 对应的 样品值 /// public double SampleValue { get; set; } #region INotifyPropertyChanged 成员 public event PropertyChangedEventHandler PropertyChanged; #endregion } /// /// 样品正向校正特征 /// public class SampleFeatureParam : INotifyPropertyChanged { /// /// 参数:使能 /// public bool Enable { get; set; } /// /// 参数:开始位置 /// public int StartPos { get; set; } /// /// 参数:结束位置 /// public int EndPos { get; set; } #region INotifyPropertyChanged 成员 public event PropertyChangedEventHandler PropertyChanged; #endregion } /// /// 样品正向校正特征 /// public class SampleFeature :INotifyPropertyChanged { /// /// 参数:使能 /// public bool Enable { get; set; } /// /// 参数:开始位置 /// public int StartPos { get; set; } /// /// 参数:结束位置 /// public int EndPos { get; set; } /// /// 状态:相似度必须高于0.8,失败-1 /// public double MaxRelevancy { get; set; } = -1; /// /// 状态:最大相似度对应的偏移 /// public int MaxOffset { get; set; } #region INotifyPropertyChanged 成员 public event PropertyChangedEventHandler PropertyChanged; #endregion } }