132 lines
5.1 KiB
C#
132 lines
5.1 KiB
C#
|
|
using System;
|
|||
|
|
|
|||
|
|
namespace HME_MoistureLossMeter.Models
|
|||
|
|
{
|
|||
|
|
public class DeviceDataModel
|
|||
|
|
{
|
|||
|
|
// 实时数据
|
|||
|
|
public float WaterTemp { get; set; } // 水浴温度 D1118
|
|||
|
|
public float ChamberTemp { get; set; } // 箱体温度 D1168
|
|||
|
|
public float Weight { get; set; } // 重量 D1268
|
|||
|
|
public float AirVolume { get; set; } // 空气体积 D4110
|
|||
|
|
public float OutletFlow { get; set; } // 出口流量 D1218
|
|||
|
|
public float TidalVolume { get; set; } // 潮气量 D300
|
|||
|
|
public float Frequency { get; set; } // 频率 D210
|
|||
|
|
public int BreathCount { get; set; } // 呼吸次数 D3000
|
|||
|
|
public float DryAirFlow { get; set; } // 干燥空气量 D3700
|
|||
|
|
|
|||
|
|
// 设置参数
|
|||
|
|
public int PresetHour { get; set; } // 设定测试时 D1681
|
|||
|
|
public int PresetMinute { get; set; } // 设定测试分 D1680
|
|||
|
|
public int PresetSecond { get; set; } // 显示时间秒 D3002
|
|||
|
|
public int DisplayHour { get; set; } // 显示时 D3004
|
|||
|
|
public int DisplayMinute { get; set; } // 显示分 D3003
|
|||
|
|
public int DisplaySecond { get; set; } // 显示秒 D3002
|
|||
|
|
|
|||
|
|
public float ManualSpeed { get; set; } // 手动速度 D218
|
|||
|
|
public float TidalCoeff { get; set; } // 潮气量系数 D302
|
|||
|
|
public float FreqCoeff { get; set; } // 频率系数 D282
|
|||
|
|
|
|||
|
|
public int OperatorId { get; set; } // 操作员编号 D3200
|
|||
|
|
public string BatchNo { get; set; } = ""; // 生产批号 D3202
|
|||
|
|
public int ExperimentId { get; set; } // 实验编号 D3204
|
|||
|
|
|
|||
|
|
// 测试结果
|
|||
|
|
public float InitialMass { get; set; } // 初始质量 D206
|
|||
|
|
public float FinalMass { get; set; } // 测后质量 D208
|
|||
|
|
public float MoistureLoss { get; set; } // 水分损失 D4106
|
|||
|
|
|
|||
|
|
// 状态
|
|||
|
|
public bool IsTesting { get; set; }
|
|||
|
|
public bool IsFault { get; set; }
|
|||
|
|
public bool IsHeating { get; set; }
|
|||
|
|
public bool IsInhale { get; set; }
|
|||
|
|
public bool IsExhale { get; set; }
|
|||
|
|
public bool IsRising { get; set; }
|
|||
|
|
public bool IsFalling { get; set; }
|
|||
|
|
public bool IsZeroing { get; set; }
|
|||
|
|
public DateTime Timestamp { get; set; } = DateTime.Now;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
public class TestResultModel
|
|||
|
|
{
|
|||
|
|
public string DeviceId { get; set; } = "";
|
|||
|
|
public string TestFinishTime { get; set; } = "";
|
|||
|
|
public string BatchNo { get; set; } = "";
|
|||
|
|
public int OperatorId { get; set; }
|
|||
|
|
public int? ExperimentId { get; set; }
|
|||
|
|
public float InitialMass { get; set; }
|
|||
|
|
public float FinalMass { get; set; }
|
|||
|
|
public float MoistureLoss { get; set; }
|
|||
|
|
public TestConditions TestConditions { get; set; } = new();
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
public class TestConditions
|
|||
|
|
{
|
|||
|
|
public float? AvgWaterTemp { get; set; }
|
|||
|
|
public float? AvgChamberTemp { get; set; }
|
|||
|
|
public float? AvgTidalVolume { get; set; }
|
|||
|
|
public float? AvgFrequency { get; set; }
|
|||
|
|
public float? AvgAirVolume { get; set; }
|
|||
|
|
public float? AvgOutletFlow { get; set; }
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
public class HistoryRecordModel
|
|||
|
|
{
|
|||
|
|
public int? RecordId { get; set; }
|
|||
|
|
public string TestTime { get; set; } = "";
|
|||
|
|
public int OperatorId { get; set; }
|
|||
|
|
public string BatchNo { get; set; } = "";
|
|||
|
|
public int? ExperimentId { get; set; }
|
|||
|
|
public float InitialMass { get; set; }
|
|||
|
|
public float FinalMass { get; set; }
|
|||
|
|
public float MoistureLoss { get; set; }
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
public class HistoryDataModel
|
|||
|
|
{
|
|||
|
|
public string DeviceId { get; set; } = "";
|
|||
|
|
public List<HistoryRecordModel> Records { get; set; } = new();
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
public class RealtimeDataModel
|
|||
|
|
{
|
|||
|
|
public string DeviceId { get; set; } = "";
|
|||
|
|
public string Timestamp { get; set; } = "";
|
|||
|
|
public RealtimeData Realtime { get; set; } = new();
|
|||
|
|
public SettingsData Settings { get; set; } = new();
|
|||
|
|
public StatusData Status { get; set; } = new();
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
public class RealtimeData
|
|||
|
|
{
|
|||
|
|
public float WaterTemp { get; set; }
|
|||
|
|
public float ChamberTemp { get; set; }
|
|||
|
|
public float Weight { get; set; }
|
|||
|
|
public float AirVolume { get; set; }
|
|||
|
|
public float OutletFlow { get; set; }
|
|||
|
|
public float TidalVolume { get; set; }
|
|||
|
|
public float Frequency { get; set; }
|
|||
|
|
public int BreathRate { get; set; }
|
|||
|
|
public float DryAirFlow { get; set; }
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
public class SettingsData
|
|||
|
|
{
|
|||
|
|
public int? PresetHour { get; set; }
|
|||
|
|
public int? PresetMinute { get; set; }
|
|||
|
|
public int? PresetSecond { get; set; }
|
|||
|
|
public float? ManualSpeed { get; set; }
|
|||
|
|
public float? TidalCoeff { get; set; }
|
|||
|
|
public float? FreqCoeff { get; set; }
|
|||
|
|
public int? OperatorId { get; set; }
|
|||
|
|
public string? BatchNo { get; set; }
|
|||
|
|
public int? ExperimentId { get; set; }
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
public class StatusData
|
|||
|
|
{
|
|||
|
|
public bool IsTesting { get; set; }
|
|||
|
|
public bool IsFault { get; set; }
|
|||
|
|
}
|
|||
|
|
}
|