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 required Voltage CellsVoltage { get; init; } public required Power MaxChargingPower { get; init; } public required Power MaxDischargingPower { get; init; } public required State GreenLed { get; init; } public required State AmberLed { get; init; } public required State BlueLed { get; init; } public required State RedLed { get; init; } public required State Warnings { get; init; } public required State Alarms { get; init; } public required State MainSwitchState { get; init; } // connected to bus | disconnected from bus public required State HeaterState { get; init; } // heating | not heating public required State EocState { get; init; } // EOC reached | EOC not reached public required State TemperatureState { get; init; } // cold | operating temperature | overheated public static T operator |(T left, T right) => OpParallel(left, right); private static readonly Func OpParallel = "|".CreateBinaryOpForProps(); // 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; } }