using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace OrpaonEMS.App.Models { public class BMSRoUIntCell { /// /// 实例化函数 /// public BMSRoUIntCell(string name, int offset, double ratio, int index, int lengh, string address, bool focus, string unit) { this.Name = name; this.Offset = offset; this.Ratio = ratio; this.Index = index; this.Unit = unit; this.Address = address; //this.ValueRangeInfo = valueRange; this.Lengh = lengh; this.Focus = focus; } private uint _SrRtValue; /// /// 标签原始的实时值 /// public uint SrRtValue { get { return _SrRtValue; } set { _SrRtValue = value; RtValue = (value * Ratio) + Offset; //LastUpdateTime = DateTime.Now; } } private double _RtValue; /// /// 标签实时值 /// public double RtValue { get { return _RtValue; } set { _RtValue = value; } } /// /// 偏移值 /// public int Offset { get; set; } /// /// 分辨率 /// public double Ratio { get; set; } /// /// Index 连续区域的位置 /// public int Index { get; set; } /// /// 值长度 /// public int Lengh { get; set; } /// /// 地址标签 /// public string Address { get; set; } /// /// 标签名称 /// public string Name { get; set; } /// /// 单位 /// public string Unit { get; set; } /// /// 是否关注这个数据,比如关注后,那么就在界面上展示,此时RaisePropertyChanged()就会被使能,单独在界面上展示否则就可以在表格里面展示 /// public bool Focus { get; set; } /// /// 当前数据的范围 /// public ValueRange ValueRangeInfo { get; set; } } }