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

53 lines
1.7 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 12:23:42 +00:00
public Voltage CellsVoltage { get; init; }
2023-03-01 09:41:13 +00:00
2023-03-01 12:23:42 +00:00
public Power MaxChargingPower { get; init; }
public Power MaxDischargingPower { get; init; }
2023-03-01 09:41:13 +00:00
2023-03-01 12:23:42 +00:00
public State GreenLed { get; init; }
public State AmberLed { get; init; }
public State BlueLed { get; init; }
public State RedLed { get; init; }
2023-03-01 09:41:13 +00:00
2023-03-01 12:23:42 +00:00
public State Warnings { get; init; }
public State Alarms { get; init; }
2023-03-01 09:41:13 +00:00
2023-03-01 12:23:42 +00:00
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
2023-03-01 09:41:13 +00:00
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
}