Innovenergy_trunk/csharp/Lib/Devices/WITGrowatt4-15K/WitGrowattDevicesRecord.cs

20 lines
879 B
C#

namespace InnovEnergy.Lib.Devices.WITGrowatt4_15K;
public class WitGrowattDevicesRecord
{
public static WitGrowattDevicesRecord Null => new WitGrowattDevicesRecord(Array.Empty<WITGrowatRecord>());
public WitGrowattDevicesRecord(IReadOnlyList<WITGrowatRecord> devices)
{
Devices = devices;
}
public IReadOnlyList<WITGrowatRecord> Devices { get; init; }
//public IEnumerable<AlarmMessage> Alarms => new []{AlarmMessage.}; //Devices.SelectMany(d => d.Status.Alarms).Distinct();
//public IEnumerable<WarningMessage> Warnings => new []{WarningMessage.DcOffset}; //Devices.SelectMany(d => d.Status.Warnings).Distinct();
//public IEnumerable<AlarmMessage> Alarms => Devices.SelectMany(d => d.Status.Alarms).Distinct();
//public IEnumerable<WarningMessage> Warnings => Devices.SelectMany(d => d.Status.Warnings).Distinct();
}