This commit is contained in:
@@ -8,6 +8,7 @@ public class AppConfig
|
||||
public PlcRegisterAddresses PlcRegisterAddresses { get; set; } = new();
|
||||
public TestParameters TestParameters { get; set; } = new();
|
||||
public AppSettings AppSettings { get; set; } = new();
|
||||
|
||||
}
|
||||
|
||||
public class PlcConnectionConfig
|
||||
@@ -15,15 +16,18 @@ public class PlcConnectionConfig
|
||||
public string IpAddress { get; set; } = "127.0.0.1";
|
||||
public int Port { get; set; } = 502;
|
||||
public int TimeoutMs { get; set; } = 5000;
|
||||
|
||||
public byte SlaveId { get; set; } = 1; // 从站地址(默认1)
|
||||
}
|
||||
|
||||
public class PlcRegisterAddresses
|
||||
{
|
||||
public int ThermalConductivity { get; set; } = 40001;
|
||||
public int ThermalDiffusivity { get; set; } = 40003;
|
||||
public int TestTemperature { get; set; } = 40005;
|
||||
public int StartCommand { get; set; } = 40010;
|
||||
public int ResetCommand { get; set; } = 40011;
|
||||
public ushort ThermalConductivity { get; set; } = 40001;
|
||||
public ushort ThermalDiffusivity { get; set; } = 40003;
|
||||
public ushort TestTemperature { get; set; } = 40005;
|
||||
public ushort StartCommand { get; set; } = 40010;
|
||||
public ushort ResetCommand { get; set; } = 40011;
|
||||
|
||||
}
|
||||
|
||||
public class TestParameters
|
||||
@@ -43,6 +47,8 @@ public class TestParameters
|
||||
public bool UsePressure { get; set; } = false;
|
||||
public string ReferenceLiquid { get; set; } = "蒸馏水";
|
||||
public double ReferenceConductivity { get; set; } = 0.606;
|
||||
|
||||
public CalibrationCoefficients CalibrationCoefficients { get; set; } = new();
|
||||
}
|
||||
|
||||
public class AppSettings
|
||||
@@ -50,4 +56,12 @@ public class AppSettings
|
||||
public int WindowWidth { get; set; } = 1024;
|
||||
public int WindowHeight { get; set; } = 768;
|
||||
public string ThemeColor { get; set; } = "Blue";
|
||||
}
|
||||
|
||||
public class CalibrationCoefficients
|
||||
{
|
||||
public ushort PressureCoefficient { get; set; }
|
||||
public ushort PressureProtection { get; set; }
|
||||
public ushort TemperatureCoefficient { get; set; }
|
||||
public ushort ResistanceCoefficient { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user