feat(mesh-phase5): telemetry.proto contract + oneof + contract-lock test
Claude-Session: https://claude.ai/code/session_01GASWkNEi68FSCtvr6rLoEW
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
using ZB.MOM.WW.OtOpcUa.Commons.Protos.Telemetry.V1;
|
||||
|
||||
namespace ZB.MOM.WW.OtOpcUa.Commons.Protos;
|
||||
|
||||
/// <summary>
|
||||
/// The single source of truth for which <see cref="TelemetryEvent.EventOneofCase"/> variants the
|
||||
/// Phase 5 telemetry transport actually handles. Both the contract-lock test (which proves this
|
||||
/// list stays in lock-step with the generated oneof) and the later oneof↔domain converter
|
||||
/// reference this array, so adding a fifth channel to <c>telemetry.proto</c> forces a matching
|
||||
/// entry here or the build/test goes red.
|
||||
/// </summary>
|
||||
public static class TelemetryProtoContract
|
||||
{
|
||||
/// <summary>
|
||||
/// Exactly the four telemetry oneof cases mirrored from the domain records:
|
||||
/// alerts / script-logs / driver-health / driver-resilience-status.
|
||||
/// </summary>
|
||||
public static readonly TelemetryEvent.EventOneofCase[] HandledCases =
|
||||
[
|
||||
TelemetryEvent.EventOneofCase.AlarmTransition,
|
||||
TelemetryEvent.EventOneofCase.ScriptLog,
|
||||
TelemetryEvent.EventOneofCase.DriverHealth,
|
||||
TelemetryEvent.EventOneofCase.DriverResilience,
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user