add heating and total current value to battery records
This commit is contained in:
parent
869a83b799
commit
7d0dd25696
|
@ -23,6 +23,10 @@ public partial class Battery48TlRecord
|
||||||
public Strings Alarms => ParseAlarms() .OrderBy(w => w).ToList();
|
public Strings Alarms => ParseAlarms() .OrderBy(w => w).ToList();
|
||||||
|
|
||||||
public Percent Soc => _Soc;
|
public Percent Soc => _Soc;
|
||||||
|
|
||||||
|
public Current BusCurrent => _BusCurrent;
|
||||||
|
|
||||||
|
public Current HeatingCurrent => _BusCurrent - _CellsCurrent;
|
||||||
|
|
||||||
public readonly struct Leds_
|
public readonly struct Leds_
|
||||||
{
|
{
|
||||||
|
@ -65,9 +69,9 @@ public partial class Battery48TlRecord
|
||||||
|
|
||||||
public readonly struct Dc_
|
public readonly struct Dc_
|
||||||
{
|
{
|
||||||
public Voltage Voltage => Self._DcVoltage;
|
public Voltage Voltage => Self._CellsVoltage;
|
||||||
public Current Current => Self._DcCurrent;
|
public Current Current => Self._CellsCurrent;
|
||||||
public ActivePower Power => Self._DcVoltage * Self._DcCurrent;
|
public ActivePower Power => Self._CellsVoltage * Self._CellsCurrent;
|
||||||
|
|
||||||
internal Dc_(Battery48TlRecord self) => Self = self;
|
internal Dc_(Battery48TlRecord self) => Self = self;
|
||||||
private Battery48TlRecord Self { get; }
|
private Battery48TlRecord Self { get; }
|
||||||
|
|
|
@ -17,8 +17,10 @@ public partial class Battery48TlRecord
|
||||||
[InputRegister<UInt64>(1009)] private UInt64 _AlarmFlags;
|
[InputRegister<UInt64>(1009)] private UInt64 _AlarmFlags;
|
||||||
[InputRegister(1013)] private UInt16 _IoStates;
|
[InputRegister(1013)] private UInt16 _IoStates;
|
||||||
|
|
||||||
[InputRegister(999, Scale = 0.01)] private Double _DcVoltage;
|
[InputRegister(999, Scale = 0.01)] private Double _CellsVoltage;
|
||||||
[InputRegister(1000, Scale = 0.01, Offset = -10000)] private Double _DcCurrent;
|
[InputRegister(1001, Scale = 0.01)] private Double _BusVoltage;
|
||||||
|
[InputRegister(1000, Scale = 0.01, Offset = -10000)] private Double _CellsCurrent;
|
||||||
|
[InputRegister(1062, Scale = 0.01, Offset = -10000)] private Double _BusCurrent;
|
||||||
|
|
||||||
[InputRegister(1053, Scale = 0.1)] private Double _Soc;
|
[InputRegister(1053, Scale = 0.1)] private Double _Soc;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue