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

45 lines
1.4 KiB
C#
Raw Normal View History

2023-06-13 11:01:01 +00:00
using InnovEnergy.Lib.Devices.Trumpf.SystemControl.DataTypes;
using InnovEnergy.Lib.Devices.Trumpf.TruConvertAc.DataTypes;
using InnovEnergy.Lib.Units;
namespace InnovEnergy.Lib.Devices.Trumpf.TruConvertAc.Control;
public class DcControl
{
public Voltage ReferenceVoltage
{
get => Is480V ? _Self.DcLinkReferenceVoltage480VGrid : _Self.DcLinkReferenceVoltage380400VGrid;
set
{
_Self.DcLinkReferenceVoltage480VGrid = value;
_Self.DcLinkReferenceVoltage380400VGrid = value;
}
}
public Voltage MinVoltage
{
get => Is480V ? _Self.DcLinkMinVoltage480VGrid : _Self.DcLinkMinVoltage380400VGrid;
set
{
_Self.DcLinkMinVoltage480VGrid = value;
_Self.DcLinkMinVoltage380400VGrid = value;
}
}
public Voltage MaxVoltage
{
get => Is480V ? _Self.DcLinkMaxVoltage480VGrid : _Self.DcLinkMaxVoltage380400VGrid;
set
{
_Self.DcLinkMaxVoltage480VGrid = value;
_Self.DcLinkMaxVoltage380400VGrid = value;
}
}
public DcPrechargeConfig PrechargeConfig => _Self.DcPrechargeConfig;
private Boolean Is480V => _Self.GridType is GridType.GridTied480V60Hz or GridType.Island480V60Hz;
internal DcControl(AcDcRecord self) => _Self = self;
private readonly AcDcRecord _Self;
}