Innovenergy_trunk/csharp/Lib/Devices/Battery48TL/Battery48TLStatusRecord.cs

53 lines
1.8 KiB
C#
Raw Normal View History

2023-02-16 12:57:06 +00:00
using System.Diagnostics.CodeAnalysis;
2023-03-01 09:41:13 +00:00
using InnovEnergy.Lib.StatusApi;
using InnovEnergy.Lib.Units;
using InnovEnergy.Lib.Utils;
2023-02-16 12:57:06 +00:00
namespace InnovEnergy.Lib.Devices.Battery48TL;
2023-03-01 09:41:13 +00:00
using T = Battery48TLStatus;
2023-02-16 12:57:06 +00:00
[SuppressMessage("ReSharper", "InconsistentNaming")]
2023-03-01 09:41:13 +00:00
public record Battery48TLStatus : BatteryStatus
2023-02-16 12:57:06 +00:00
{
2023-03-01 09:41:13 +00:00
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<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; }
2023-02-16 12:57:06 +00:00
}