namespace BmsMonitor.App.Can; public sealed record CanFrame(uint Id, bool IsExtended, byte[] Data, DateTime Timestamp) { public string IdText => IsExtended ? $"{Id:X8}" : $"{Id:X3}"; public string FrameType => IsExtended ? "扩展帧" : "标准帧"; public int Dlc => Data.Length; public string DataText => string.Join(" ", Data.Select(value => value.ToString("X2"))); }