namespace IOModuleTestBlazor.Models;

public record CanMessageDto(
    uint Id,
    byte[] Data,
    int Dlc,
    ulong TimestampUs,
    bool IsExtended,
    IReadOnlyDictionary<string, double>? Signals
);

public class CanFilter
{
    public Guid Id { get; set; }
    public uint MessageId { get; set; }
    public uint Mask { get; set; } = 0x7FF;
    public string? Description { get; set; }
}

public class CanBitmask
{
    public Guid Id { get; set; }
    public uint MessageId { get; set; }
    public string SignalName { get; set; } = "";
    public ulong DataMask { get; set; }
    public int RightShift { get; set; }
    public double Scale { get; set; } = 1.0;
    public double Offset { get; set; }
    public string? Unit { get; set; }
}

public class CanStatus
{
    public bool IsConnected { get; set; }
    public string ChannelName { get; set; } = "";
}
