Initial commit: BMS CAN monitor

This commit is contained in:
acetaffy
2026-09-16 13:26:51 +08:00
commit 2b92f10a0c
23 changed files with 965 additions and 0 deletions
+9
View File
@@ -0,0 +1,9 @@
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")));
}