53 lines
1.7 KiB
C#
53 lines
1.7 KiB
C#
using System.Diagnostics.CodeAnalysis;
|
|
using InnovEnergy.Lib.StatusApi;
|
|
using InnovEnergy.Lib.Units;
|
|
using InnovEnergy.Lib.Utils;
|
|
|
|
namespace InnovEnergy.Lib.Devices.Battery48TL;
|
|
|
|
using T = Battery48TLStatus;
|
|
|
|
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
|
public record Battery48TLStatus : BatteryStatus
|
|
{
|
|
public Voltage CellsVoltage { get; init; }
|
|
|
|
public Power MaxChargingPower { get; init; }
|
|
public Power MaxDischargingPower { get; init; }
|
|
|
|
public State GreenLed { get; init; }
|
|
public State AmberLed { get; init; }
|
|
public State BlueLed { get; init; }
|
|
public State RedLed { get; init; }
|
|
|
|
public State Warnings { get; init; }
|
|
public State Alarms { get; init; }
|
|
|
|
public State MainSwitchState { get; init; } // connected to bus | disconnected from bus
|
|
public State HeaterState { get; init; } // heating | not heating
|
|
public State EocState { get; init; } // EOC reached | EOC not reached
|
|
public State TemperatureState { get; init; } // cold | operating temperature | overheated
|
|
|
|
|
|
public static T operator |(T left, T right) => OpParallel(left, right);
|
|
private static readonly Func<T, T, T> OpParallel = "|".CreateBinaryOpForProps<T>();
|
|
|
|
|
|
|
|
// TODO: strings
|
|
// TODO
|
|
// public State LimitedBy { get; init; }
|
|
|
|
// TODO
|
|
// public Boolean AlarmOutActive { get; init; }
|
|
// public Boolean InternalFanActive { get; init; }
|
|
// public Boolean VoltMeasurementAllowed { get; init; }
|
|
// public Boolean AuxRelay { get; init; }
|
|
// public Boolean RemoteState { get; init; }
|
|
|
|
}
|
|
|
|
|
|
|
|
|