feat(streaming): carry AckTime on DebugAlarmStateDto (21) (ScadaBridge#84)

The live AlarmStateUpdate already carried ack_time (24) but the Debug View
snapshot DTO did not, so snapshot-seeded alarm rows showed a null ack time
until the next live update. Additive google.protobuf.Timestamp ack_time = 21
(absent => null, including from a pre-#84 site), vendored C# regenerated with
docker/regen-proto.sh sitecommand, mapped both ways in SiteCommandDtoMapper.
The native golden sample now sets AckTime (the computed one leaves it null),
so the round-trip golden pins both the present and the absent decode.

Claude-Session: https://claude.ai/code/session_01GT67AEHd2Acv1YPwGfXEoV
This commit is contained in:
Joseph Doherty
2026-11-09 12:45:21 -05:00
parent 03de3dcc14
commit d36825633b
5 changed files with 282 additions and 210 deletions
@@ -1955,6 +1955,11 @@ public static class SiteCommandDtoMapper
dto.OriginalRaiseTime = Ts(alarm.OriginalRaiseTime.Value);
}
if (alarm.AckTime.HasValue)
{
dto.AckTime = Ts(alarm.AckTime.Value);
}
return dto;
}
@@ -1985,7 +1990,8 @@ public static class SiteCommandDtoMapper
LimitValue = dto.LimitValue,
NativeSourceCanonicalName = dto.NativeSourceCanonicalName,
IsConfiguredPlaceholder = dto.IsConfiguredPlaceholder,
IsMesReportable = dto.IsMesReportable
IsMesReportable = dto.IsMesReportable,
AckTime = DtoOrNull(dto.AckTime)
};
return dto.Condition is null ? alarm : alarm with { Condition = FromProto(dto.Condition) };