123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- using MV485.helper;
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace MV485.model
- {
- public class WMData : INotifyPropertyChanged
- {
- public event PropertyChangedEventHandler PropertyChanged;
- protected virtual void OnPropertyChanged(string propertyName)
- {
- PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
- }
- //设备SN号
- public string DeviceSn { get; set; }
- //模块ID
- public byte SlaveAddress { get; set; }
- //固件版本号(MCU的版本号)
- public string McuVer { get; set; }
- //public byte DeviceAddress { get; set; }
- public ulong TotalFlow { get; set; } // 单位:升
- //结果已立方为单位时保留的小数位数
- public byte ResultDecimalPlaces { get; set; }
- public string SampleResult
- {
- get
- {
- double value = TotalFlow / (double)Constant.CUBE_VALUE;
- return value.ToString($"F{ResultDecimalPlaces}");
- //return (TotalFlow / Constant.CUBE_VALUE).ToString();
- }
- }
- public DateTime SampleTime { get; set; }
- public string SampleTimeName => SampleTime.ToString("yyyy-MM-dd HH:mm");
- //水表类型及结果说明
- public byte ResultType { get; set; }
- public string ResultTypeName => Tools.GetResultTypeName(ResultType);
- //模块名称
- public string ModelName { get; set; }
- //485设备波特率
- public int BaudRate { get; set; }
- }
- }
|