feat(communication): map enriched alarm fields across gRPC (server + client)

This commit is contained in:
Joseph Doherty
2026-05-31 02:16:43 -04:00
parent 50176765fe
commit 0c6f9a9cff
5 changed files with 132 additions and 10 deletions
@@ -67,7 +67,24 @@ public class StreamRelayActor : ReceiveActor
Priority = msg.Priority,
Timestamp = Timestamp.FromDateTimeOffset(msg.Timestamp),
Level = MapAlarmLevel(msg.Level),
Message = msg.Message ?? string.Empty
Message = msg.Message ?? string.Empty,
// Native alarm enrichment (additive — computed alarms map their default condition).
Kind = msg.Kind.ToString(),
Active = msg.Condition.Active,
Acknowledged = msg.Condition.Acknowledged,
Confirmed = msg.Condition.Confirmed ?? false,
ShelveState = AlarmShelveStateCodec.ToWire(msg.Condition.Shelve),
Suppressed = msg.Condition.Suppressed,
SourceReference = msg.SourceReference ?? string.Empty,
AlarmTypeName = msg.AlarmTypeName ?? string.Empty,
Category = msg.Category ?? string.Empty,
OperatorUser = msg.OperatorUser ?? string.Empty,
OperatorComment = msg.OperatorComment ?? string.Empty,
OriginalRaiseTime = msg.OriginalRaiseTime.HasValue
? Timestamp.FromDateTimeOffset(msg.OriginalRaiseTime.Value)
: null,
CurrentValue = msg.CurrentValue ?? string.Empty,
LimitValue = msg.LimitValue ?? string.Empty
}
};