Create a StringActive from the limpBitMap
Create SerialNumber and the FW version
This commit is contained in:
parent
993d344918
commit
c150793c70
|
@ -20,8 +20,12 @@ public partial class Battery48TlRecord
|
|||
public Boolean ConnectedToDcBus => (_IoStates & 1) == 0;
|
||||
public Boolean Eoc => Leds is { Green: On, Amber: Off, Blue : Off };
|
||||
|
||||
public Strings Warnings => ParseWarnings().OrderBy(w => w).ToList();
|
||||
public Strings Alarms => ParseAlarms() .OrderBy(w => w).ToList();
|
||||
|
||||
public String SerialNumber => $"{_SerialNum1:D4}{_SerialNum2:D4}{_SerialNum3:D4}{_SerialNum4:D4}".TrimStart('0');
|
||||
|
||||
public String FwVersion => _FwVersion.ToString("X4");
|
||||
public Strings Warnings => ParseWarnings().OrderBy(w => w).ToList();
|
||||
public Strings Alarms => ParseAlarms() .OrderBy(w => w).ToList();
|
||||
|
||||
public Percent Soc => _Soc;
|
||||
|
||||
|
@ -46,6 +50,18 @@ public partial class Battery48TlRecord
|
|||
|
||||
}
|
||||
|
||||
public readonly struct _StringActive
|
||||
{
|
||||
public Boolean String1Active => (Self._LimpBitMap & 1) == 0;
|
||||
public Boolean String2Active => (Self._LimpBitMap & 2) == 0;
|
||||
public Boolean String3Active => (Self._LimpBitMap & 4) == 0;
|
||||
public Boolean String4Active => (Self._LimpBitMap & 8) == 0;
|
||||
public Boolean String5Active => (Self._LimpBitMap & 16) == 0;
|
||||
|
||||
internal _StringActive(Battery48TlRecord self) => Self = self;
|
||||
private Battery48TlRecord Self { get; }
|
||||
}
|
||||
|
||||
public readonly struct Temperatures_
|
||||
{
|
||||
public Boolean Heating => (Self._IoStates & 64) != 0;
|
||||
|
|
Loading…
Reference in New Issue