Initial commit: BMS CAN monitor
This commit is contained in:
@@ -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")));
|
||||
}
|
||||
Reference in New Issue
Block a user