feat(historian-gateway): sample/aggregate->DataValueSnapshot + quality mapper (Wonderware parity)
Claude-Session: https://claude.ai/code/session_012SDSQ3AcaXqPcBtDESBRii
This commit is contained in:
+19
@@ -0,0 +1,19 @@
|
||||
using Xunit;
|
||||
using ZB.MOM.WW.OtOpcUa.Driver.Historian.Gateway.Mapping;
|
||||
|
||||
namespace ZB.MOM.WW.OtOpcUa.Driver.Historian.Gateway.Tests.Mapping;
|
||||
|
||||
public sealed class GatewayQualityMapperTests
|
||||
{
|
||||
[Theory]
|
||||
[InlineData(192, 0x00000000u)] // Good
|
||||
[InlineData(216, 0x00D80000u)] // Good_LocalOverride
|
||||
[InlineData(64, 0x40000000u)] // Uncertain
|
||||
[InlineData(0, 0x80000000u)] // Bad
|
||||
[InlineData(8, 0x808A0000u)] // Bad_NotConnected
|
||||
[InlineData(255, 0x00000000u)] // >=192 bucket
|
||||
[InlineData(100, 0x40000000u)] // >=64 bucket
|
||||
[InlineData(1, 0x80000000u)] // bad bucket
|
||||
public void Maps_opc_quality_byte(byte q, uint expected)
|
||||
=> Assert.Equal(expected, GatewayQualityMapper.Map(q));
|
||||
}
|
||||
Reference in New Issue
Block a user