using System; using System.ComponentModel; namespace FLY.Thick.Base.Common { /// /// 动态数据,推送当前所有状态 /// public class DynArea : INotifyPropertyChanged { public DynArea() { } /// /// 通过 Fody.PropertyChanged 自动调用 /// OnXXXChanged /// /// /// void OnHrsChanged(object before, object after) { SecuteLock = Hrs <= 0; } #region BASE /// /// AD 值经过 曲线转换的 测量值 /// public double Thk { get; set; } = 100.23; /// /// 编码器1 位置 脉冲 /// public int Position { get; set; } /// /// 测厚仪位置mm /// public double PosMm { get; set; } /// /// AD值 /// public int AD { get; set; } = 12345; /// /// 最大AD值 /// public int ADMax { get; set; } = 65535; #endregion #region POSITION2 /// /// 编码器2 位置 脉冲 /// public int Position2 { get; set; } #endregion #region 扫描 /// /// 数据是否有效, 当膜没有动时,为无效。 通过PLC获取,或编码器判断 /// public bool DataValid { get; set; } /// /// 膜宽 mm /// public double Width { get; set; } /// /// 生产速度 m/min /// public double FilmVelocity { get; set; } /// /// 膜生产位置 m /// public double FilmPosition { get; set; } /// /// 测厚仪速度 m/min /// public double Velocity { get; set; } #endregion #region 运行状态 /// /// 运行状态 /// public CTRL_STATE ControllerState { get; set; } /// /// /// public int AutoScanCounter { get; set; } = 5; /// /// 测试模式 /// public bool IsTest { get; set; } #endregion #region IO public UInt16 IStatus { get; set; } = 0xffff; public UInt16 OStatus { get; set; } = 0xffff; /// /// I/O 显示编号1~16, 最新的定义都是 X0~X15, 按序号排序 /// public bool IsIOShowNo { get; set; } = false; #endregion #region 系统 /// /// 系统剩余小时数 /// public int Hrs { get; set; } = 3; /// /// FLYAD 连接状态 /// public bool FLYADIsConnect { get; set; } /// /// 过期, 锁ing /// public bool SecuteLock { get; set; } #endregion #region INotifyPropertyChanged 成员 public event PropertyChangedEventHandler PropertyChanged; #endregion } }