test(grpc-data): A2a — unit-phase manifest key A2; probe carries history,conditions; metadata never carries AlarmSubscribe
This commit is contained in:
@@ -1070,5 +1070,72 @@
|
||||
],
|
||||
"existing_classes": []
|
||||
}
|
||||
],
|
||||
"A2": [
|
||||
{
|
||||
"project": "tests/Core/ZB.MOM.WW.OtOpcUa.Core.Abstractions.Tests/ZB.MOM.WW.OtOpcUa.Core.Abstractions.Tests.csproj",
|
||||
"filter": "FullyQualifiedName~.GrpcDataOperationToleranceTests.",
|
||||
"new_classes": [],
|
||||
"existing_classes": [
|
||||
"GrpcDataOperationToleranceTests"
|
||||
]
|
||||
},
|
||||
{
|
||||
"project": "tests/Core/ZB.MOM.WW.OtOpcUa.Commons.Tests/ZB.MOM.WW.OtOpcUa.Commons.Tests.csproj",
|
||||
"filter": "(Feature=GrpcData&Phase=A2)|FullyQualifiedName~.GrpcDataProtoReservationTests.|FullyQualifiedName~.GrpcDataFeatureHeaderTests.|FullyQualifiedName~.GrpcDataTolerantDecodeTests.",
|
||||
"new_classes": [
|
||||
"GrpcDataConditionCodecTests"
|
||||
],
|
||||
"existing_classes": [
|
||||
"GrpcDataProtoReservationTests",
|
||||
"GrpcDataFeatureHeaderTests",
|
||||
"GrpcDataTolerantDecodeTests"
|
||||
]
|
||||
},
|
||||
{
|
||||
"project": "tests/Core/ZB.MOM.WW.OtOpcUa.Configuration.Tests/ZB.MOM.WW.OtOpcUa.Configuration.Tests.csproj",
|
||||
"filter": "(Feature=GrpcData&Phase=A2)|FullyQualifiedName~.GrpcDataReservedOperationAuthoringTests.|FullyQualifiedName~.GrpcDataSchemaModelTests.",
|
||||
"new_classes": [
|
||||
"GrpcDataConditionConfigurationTests"
|
||||
],
|
||||
"existing_classes": [
|
||||
"GrpcDataReservedOperationAuthoringTests",
|
||||
"GrpcDataSchemaModelTests"
|
||||
]
|
||||
},
|
||||
{
|
||||
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests/ZB.MOM.WW.OtOpcUa.Runtime.Tests.csproj",
|
||||
"filter": "(Feature=GrpcData&Phase=A2)|FullyQualifiedName~.GrpcDataArtifactReadTests.|FullyQualifiedName~.ConditionStateHubTests.|FullyQualifiedName~.GrpcDataConditionPlacementTests.|FullyQualifiedName~.GrpcDataFeatureHeaderClientTests.",
|
||||
"new_classes": [
|
||||
"GrpcDataConditionStreamTests",
|
||||
"GrpcDataConditionArtifactReadTests"
|
||||
],
|
||||
"existing_classes": [
|
||||
"GrpcDataArtifactReadTests",
|
||||
"ConditionStateHubTests",
|
||||
"GrpcDataConditionPlacementTests",
|
||||
"GrpcDataFeatureHeaderClientTests"
|
||||
]
|
||||
},
|
||||
{
|
||||
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.Host.Tests/ZB.MOM.WW.OtOpcUa.Host.Tests.csproj",
|
||||
"filter": "(Feature=GrpcData&Phase=A2)|FullyQualifiedName~.GrpcDataV1CompatibilityTests.|FullyQualifiedName~.GrpcDataV1RealOriginCompatibilityTests.",
|
||||
"new_classes": [],
|
||||
"existing_classes": [
|
||||
"GrpcDataV1CompatibilityTests",
|
||||
"GrpcDataV1RealOriginCompatibilityTests"
|
||||
]
|
||||
},
|
||||
{
|
||||
"project": "tests/Server/ZB.MOM.WW.OtOpcUa.AdminUI.Tests/ZB.MOM.WW.OtOpcUa.AdminUI.Tests.csproj",
|
||||
"filter": "(Feature=GrpcData&Phase=A2)|FullyQualifiedName~.GrpcDataEditorValidationTests.|FullyQualifiedName~.GrpcDataHistoryEditorTests.",
|
||||
"new_classes": [
|
||||
"GrpcDataConditionEditorTests"
|
||||
],
|
||||
"existing_classes": [
|
||||
"GrpcDataEditorValidationTests",
|
||||
"GrpcDataHistoryEditorTests"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -284,8 +284,9 @@ public static class DataProtoMapper
|
||||
x.ValueRank,
|
||||
x.Dimensions.ToArray(),
|
||||
x.Writable,
|
||||
// X0 tolerant reader: an operation bit this build does not understand is no grant.
|
||||
(DataOperations)(x.AllowedOperations & (uint)DataOperationSets.Understood),
|
||||
// X0 tolerant reader: an operation bit this build does not understand is no grant. A2: AlarmSubscribe is a
|
||||
// root-scope grant, never a node operation, so a metadata item carrying it is masked too.
|
||||
(DataOperations)(x.AllowedOperations & (uint)DataOperationSets.Understood & ~(uint)DataOperations.AlarmSubscribe),
|
||||
x.CatalogRevision,
|
||||
x.HasStableSourceId ? x.StableSourceId : null,
|
||||
x.HasEngineeringUnits ? x.EngineeringUnits : null,
|
||||
|
||||
+4
-4
@@ -52,10 +52,10 @@ public sealed class GrpcDataFeatureHeaderClientTests
|
||||
handler.Paths.ShouldContain(p => p.EndsWith("/GetMetadata", StringComparison.Ordinal));
|
||||
handler.Paths.ShouldContain(p => p.EndsWith("/Read", StringComparison.Ordinal));
|
||||
handler.Paths.ShouldContain(p => p.EndsWith("/Write", StringComparison.Ordinal));
|
||||
// H2 (coordinator decision): the probe always asks for what this consumer understands; nothing else carries the
|
||||
// header, because this origin advertised no history field.
|
||||
// H2 (coordinator decision): the probe always asks for what this consumer understands (A2a: history and
|
||||
// conditions); nothing else carries the header, because this origin advertised neither field.
|
||||
handler.FeatureHeaders.ShouldNotBeEmpty();
|
||||
handler.FeatureHeaders.ShouldAllBe(x => x == "history");
|
||||
handler.FeatureHeaders.ShouldAllBe(x => x == "history,conditions");
|
||||
handler.FeatureHeaderPaths.ShouldAllBe(p => p.EndsWith("/GetCapabilities", StringComparison.Ordinal));
|
||||
}
|
||||
|
||||
@@ -84,7 +84,7 @@ public sealed class GrpcDataFeatureHeaderClientTests
|
||||
{
|
||||
var wire = DataProtoMapper.EncodeMetadataResponse([new("0", DataItemStatus.Good,
|
||||
new DataMetadata(View, "x", "tag", DataValueKind.Int32, -1, [], true, DataOperations.Read | DataOperations.Write, 1, null, null, false), null)]);
|
||||
wire.Items[0].Value.AllowedOperations |= 64u; // still reserved (32 is understood since H2)
|
||||
wire.Items[0].Value.AllowedOperations |= 64u | 128u; // 128 still reserved; 64 is never a node operation (A2a)
|
||||
wire.Serving = DataProtoMapper.EncodeServing(Serving); message = wire;
|
||||
}
|
||||
else if (path.EndsWith("/Read", StringComparison.Ordinal))
|
||||
|
||||
Reference in New Issue
Block a user