update schneider Meter
This commit is contained in:
parent
8bb1287864
commit
32191f3821
|
@ -1,19 +1,3 @@
|
|||
/*using InnovEnergy.Lib.Devices.IEM3kGridMeter;
|
||||
using InnovEnergy.Lib.Protocols.DBus.Protocol.DataTypes;
|
||||
using InnovEnergy.Lib.Victron.VeDBus;
|
||||
|
||||
namespace InnovEnergy.App.SchneiderDriver;
|
||||
|
||||
|
||||
// TODO: Does not compile
|
||||
public record Signal(Func<Iem3KGridMeterRegisters, object> Source, ObjectPath Path, string Format = "")
|
||||
{
|
||||
public VeProperty ToVeProperty(Iem3KGridMeterRegisters status)
|
||||
{
|
||||
var value = Source(status);
|
||||
return new VeProperty(Path, value, string.Format($"{{0:{Format}}}", value));
|
||||
}
|
||||
}*/
|
||||
|
||||
using InnovEnergy.Lib.Devices.IEM3kGridMeter;
|
||||
using InnovEnergy.Lib.Protocols.DBus.Protocol.DataTypes;
|
||||
|
@ -56,24 +40,3 @@ namespace InnovEnergy.App.SchneiderDriver
|
|||
}
|
||||
}
|
||||
|
||||
/*namespace InnovEnergy.App.SchneiderDriver
|
||||
{
|
||||
public record Signal(Func<Iem3KGridMeterRegisters, object> Source, ObjectPath Path, string Format = "")
|
||||
{
|
||||
public VeProperty ToVeProperty(Iem3KGridMeterRegisters status)
|
||||
{
|
||||
if (status == null)
|
||||
{
|
||||
Console.WriteLine($"Status is null for path: {Path}");
|
||||
// Return a default VeProperty if status is null
|
||||
return new VeProperty(Path, default, String.Format($"{{0:{Format}}}", default));
|
||||
}
|
||||
|
||||
var value = Source(status);
|
||||
return new VeProperty(Path, value, String.Format($"{{0:{Format}}}", value));
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue