Table of Contents

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
PropertyChangedBase
PowerSupplyModuleBase
Implements
INotifyPropertyChangedEx
Derived
Inherited Members
PropertyChangedBase.Refresh()
PropertyChangedBase.IsNotifying
PropertyChangedBase.PropertyChanged

Constructors

PowerSupplyModuleBase(string)

Initializes a new instance of the PowerSupplyModuleBase class.

protected PowerSupplyModuleBase(string name)

Parameters

name string

Name 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

string

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

string

Icon

Gets the icon which is shown in the IModuleTree.

public override Uri Icon { get; }

Property Value

Uri

InstanceID

Gets or sets the ID for this instance.

[Configuration(0)]
public virtual int InstanceID { get; set; }

Property Value

int

MaximumCurrent

Gets or sets maximum current in ampere level.

[Configuration(0)]
public virtual double MaximumCurrent { get; set; }

Property Value

double

MaximumVoltage

Gets or sets maximum voltage in volt level.

[Configuration(0)]
public virtual double MaximumVoltage { get; set; }

Property Value

double

OutputIsEnabled

Gets or sets a value indicating whether the supply output is enabled.

public virtual bool OutputIsEnabled { get; protected set; }

Property Value

bool

SetpointCurrent

Gets or sets the setpoint of the current in ampere.

public virtual double SetpointCurrent { get; protected set; }

Property Value

double

SetpointVoltage

Gets or sets the setpoint of the voltage in volt.

public virtual double SetpointVoltage { get; protected set; }

Property Value

double

Methods

SetCurrent(double)

Sets the current.

public abstract void SetCurrent(double current)

Parameters

current double

Current in ampere to regulate.

SetOutput(bool)

Enables or disables the output.

public abstract void SetOutput(bool isEnabled)

Parameters

isEnabled bool

State for the output.

SetVoltage(double)

Sets the voltage.

public abstract void SetVoltage(double voltage)

Parameters

voltage double

Voltage in volt to regulate.

SetVoltageAndCurrent(double, double)

Sets the voltage, current and enables the output.

public abstract void SetVoltageAndCurrent(double voltage, double current)

Parameters

voltage double

Voltage in volt to regulate.

current double

Current in ampere to regulate.

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 double

Current 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 double

Voltage in volt to check.