Class PowerSupplyModuleBase
- Namespace
- Loehnert.Lisrt.PowerSupply
- Assembly
- Loehnert.Lisrt.PowerSupply.dll
Abstract base class for a power supply.
public abstract class PowerSupplyModuleBase : LisrtModule, INotifyPropertyChangedEx, ILisrtModule, INotifyPropertyChanged, IHasDeviceLabel, IHasServiceView, IPowerSupply
- Inheritance
-
PropertyChangedBasePowerSupplyModuleBase
- Implements
-
INotifyPropertyChangedEx
- Derived
- Inherited Members
-
PropertyChangedBase.Refresh()PropertyChangedBase.IsNotifyingPropertyChangedBase.PropertyChanged
Constructors
PowerSupplyModuleBase(string)
Initializes a new instance of the PowerSupplyModuleBase class.
protected PowerSupplyModuleBase(string name)
Parameters
name
stringName of the module.
Exceptions
- ArgumentNullException
Thrown when
name
is null.
Properties
DeviceLabel
Gets or sets the device label.
[Configuration("")]
public virtual string DeviceLabel { get; set; }
Property Value
Remarks
Is used in the ModuleTreeViewModel. Is not shown when it is null or Empty.
HardwareIdentification
Gets or sets the identification string which was returned by hardware.
public virtual string HardwareIdentification { get; protected set; }
Property Value
Icon
Gets the icon which is shown in the IModuleTree.
public override Uri Icon { get; }
Property Value
InstanceID
Gets or sets the ID for this instance.
[Configuration(0)]
public virtual int InstanceID { get; set; }
Property Value
MaximumCurrent
Gets or sets maximum current in ampere level.
[Configuration(0)]
public virtual double MaximumCurrent { get; set; }
Property Value
MaximumVoltage
Gets or sets maximum voltage in volt level.
[Configuration(0)]
public virtual double MaximumVoltage { get; set; }
Property Value
OutputIsEnabled
Gets or sets a value indicating whether the supply output is enabled.
public virtual bool OutputIsEnabled { get; protected set; }
Property Value
SetpointCurrent
Gets or sets the setpoint of the current in ampere.
public virtual double SetpointCurrent { get; protected set; }
Property Value
SetpointVoltage
Gets or sets the setpoint of the voltage in volt.
public virtual double SetpointVoltage { get; protected set; }
Property Value
Methods
SetCurrent(double)
Sets the current.
public abstract void SetCurrent(double current)
Parameters
current
doubleCurrent in ampere to regulate.
SetOutput(bool)
Enables or disables the output.
public abstract void SetOutput(bool isEnabled)
Parameters
isEnabled
boolState for the output.
SetVoltage(double)
Sets the voltage.
public abstract void SetVoltage(double voltage)
Parameters
voltage
doubleVoltage in volt to regulate.
SetVoltageAndCurrent(double, double)
Sets the voltage, current and enables the output.
public abstract void SetVoltageAndCurrent(double voltage, double current)
Parameters
ShowServiceView()
Shows the ServiceViewModel/ServiceView.
public virtual void ShowServiceView()
ThrowExceptionIfCurrentIsOutOfRange(double)
Checks if current is less or equal to MaximumCurrent, otherwise an ArgumentOutOfRangeException is thrown.
protected void ThrowExceptionIfCurrentIsOutOfRange(double current)
Parameters
current
doubleCurrent in ampere to check.
ThrowExceptionIfVoltageIsOutOfRange(double)
Checks if voltage is less or equal to MaximumVoltage, otherwise an ArgumentOutOfRangeException is thrown.
protected void ThrowExceptionIfVoltageIsOutOfRange(double voltage)
Parameters
voltage
doubleVoltage in volt to check.