namespace ZB.MOM.WW.OtOpcUa.Driver.Historian.Sql.Common; /// Helpers for turning stored event rows into HistoricalEvents. public static class HistoricalEventRows { /// Clamps a stored severity into the range the event carries. /// Stored severity. /// The severity clamped to 0..65535. public static ushort ClampSeverity(int severity) => (ushort)Math.Clamp(severity, 0, ushort.MaxValue); }