更新数据接口

This commit is contained in:
GukSang.Jin
2026-06-02 18:14:01 +08:00
parent 27439505a9
commit fee2310977
11 changed files with 1401 additions and 205 deletions

View File

@@ -0,0 +1,16 @@
namespace Footwear_Test_methodsfor_wholeshoe_Slipresistanceperformance.Models
{
public sealed record DeviceSettings(
string ManualSpeed,
string ManualDisplacement,
string TestSpeed,
string NormalPressureZero,
string NormalPressureCoefficient,
string FrictionZero1,
string FrictionCoefficient1,
string FrictionZero2,
string FrictionCoefficient2,
string PlcPortName,
string AdcPortName,
int BaudRate);
}

View File

@@ -0,0 +1,12 @@
using System;
namespace Footwear_Test_methodsfor_wholeshoe_Slipresistanceperformance.Models
{
public sealed record SlipDataPoint(
DateTime Timestamp,
double TimeSeconds,
double VerticalLoadN,
double HorizontalFrictionN,
double DisplacementMm,
double FrictionCoefficient);
}

View File

@@ -0,0 +1,22 @@
using System;
namespace Footwear_Test_methodsfor_wholeshoe_Slipresistanceperformance.Models
{
public sealed record SlipDeviceSnapshot(
DateTime Timestamp,
double VerticalLoadN,
double HorizontalFrictionN,
double DisplacementMm,
bool IsTestRunning,
bool IsResetting,
bool IsConnected,
string LastError)
{
public double FrictionCoefficient => Math.Abs(VerticalLoadN) > 0.0001
? HorizontalFrictionN / VerticalLoadN
: 0;
public static SlipDeviceSnapshot Offline(string error = "") =>
new(DateTime.Now, 0, 0, 0, false, false, false, error);
}
}

View File

@@ -0,0 +1,21 @@
using System.Collections.Generic;
namespace Footwear_Test_methodsfor_wholeshoe_Slipresistanceperformance.Models
{
public sealed record SlipReportExport(
string TestNumber,
string OperatorName,
string MethodName,
string ReportName,
string SampleFeature,
string ShoeSize,
string Lubricant,
string TestMode,
string Surface,
string TargetLoad,
string ActualLoad,
string TestSpeed,
string StandardReference,
IReadOnlyList<TestSample> Results,
IReadOnlyList<SlipDataPoint> Points);
}

View File

@@ -0,0 +1,11 @@
namespace Footwear_Test_methodsfor_wholeshoe_Slipresistanceperformance.Models
{
public sealed record TestSample(
int Index,
string Time,
string StaticCoefficient,
string DynamicCoefficient,
string Verdict,
double StaticCoefficientValue,
double DynamicCoefficientValue);
}