Files
lmxopcua/src/Core/ZB.MOM.WW.OtOpcUa.Commons/Protos/TelemetryProtoContract.cs
T

26 lines
1.1 KiB
C#

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,
];
}