✨ feat(*): 更新 PLC 相关配置与结果代码类型
- 修改 appConfig.json 中 PLC 和扫描仪的 IP 地址及字节序配置 - 将多个地方的 ResultCode 类型从 short 更新为 ushort,以确保与 PLC 通信一致 - 更新相关服务和模型以适应新的 ResultCode 类型 - 调整单元测试以验证新配置和类型的正确性
This commit is contained in:
@@ -11,16 +11,16 @@ namespace AxiOmron.PcbCheck.Tests;
|
||||
public sealed class OmronFinsPlcServiceTests
|
||||
{
|
||||
/// <summary>
|
||||
/// 默认字节序应使用 BADC,以匹配现场 D 区 Int16 的高低字节顺序。
|
||||
/// 默认字节序应使用 ABCD,避免 UInt16 结果代码发生高低字节交换。
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void ResolveEndianFormat_ShouldUseBadc_WhenConfigurationIsDefault()
|
||||
public void ResolveEndianFormat_ShouldUseAbcd_WhenConfigurationIsDefault()
|
||||
{
|
||||
var options = new PlcOptions();
|
||||
|
||||
EndianFormat result = OmronFinsPlcService.ResolveEndianFormat(options);
|
||||
|
||||
Assert.Equal(EndianFormat.BADC, result);
|
||||
Assert.Equal(EndianFormat.ABCD, result);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user