Innovenergy_trunk/csharp/Lib/Devices/Trumpf/TruConvertAc/Control/AcControl.cs

35 lines
930 B
C#

using InnovEnergy.Lib.Devices.Trumpf.SystemControl.DataTypes;
using InnovEnergy.Lib.Devices.Trumpf.TruConvertAc.DataTypes;
namespace InnovEnergy.Lib.Devices.Trumpf.TruConvertAc.Control;
public class AcControl
{
public AcPowerControl Power => new (_Self);
public PhaseControl PhaseControl
{
get => _Self.PhaseControl;
set => _Self.PhaseControl = value;
}
public GridType GridType
{
get => _Self.GridType;
set
{
_Self.GridType = value;
_Self.GridMode = value switch
{
GridType.Island400V50Hz => GridMode.Island,
GridType.Island480V60Hz => GridMode.Island,
_ => GridMode.GridTied
};
}
}
public IslandMode IslandMode => new(_Self);
internal AcControl(AcDcRecord self) => _Self = self;
private readonly AcDcRecord _Self;
}