libm2k
Classes | Functions
PowerSupply

Contains the representation of the power supply. More...

Collaboration diagram for PowerSupply:

Classes

class  libm2k::analog::M2kPowerSupply
 Controls the power supply. More...
 

Functions

virtual void libm2k::analog::M2kPowerSupply::enableChannel (unsigned int chn, bool en)=0
 Enable or disable the given channel. More...
 
virtual void libm2k::analog::M2kPowerSupply::enableAll (bool en)=0
 Enable or disable all channels. More...
 
virtual double libm2k::analog::M2kPowerSupply::readChannel (unsigned int chn, bool calibrated=true)=0
 Retrieve the value of a given channel. More...
 
virtual void libm2k::analog::M2kPowerSupply::pushChannel (unsigned int chn, double value, bool calibrated=true)=0
 Set the voltage for the given channel. More...
 
virtual bool libm2k::analog::M2kPowerSupply::anyChannelEnabled ()=0
 Check if there is at least one enabled channel. More...
 

Detailed Description

Contains the representation of the power supply.

Function Documentation

◆ anyChannelEnabled()

virtual bool libm2k::analog::M2kPowerSupply::anyChannelEnabled ( )
pure virtual

Check if there is at least one enabled channel.

Returns
On succes, true
Otherwise, false

◆ enableAll()

virtual void libm2k::analog::M2kPowerSupply::enableAll ( bool  en)
pure virtual

Enable or disable all channels.

Parameters
enA boolean value corresponding to the state of the channels

◆ enableChannel()

virtual void libm2k::analog::M2kPowerSupply::enableChannel ( unsigned int  chn,
bool  en 
)
pure virtual

Enable or disable the given channel.

Parameters
chnThe index corresponding to the channel
enA boolean value corresponding to the state of the channel

◆ pushChannel()

virtual void libm2k::analog::M2kPowerSupply::pushChannel ( unsigned int  chn,
double  value,
bool  calibrated = true 
)
pure virtual

Set the voltage for the given channel.

Parameters
chnThe index corresponding to the channel
valueThe voltage (up to 5V)
calibratedWritten values are converted using the calibration coefficients from the IIO context by default; This boolean flag specifies whether the coefficients should be used.

◆ readChannel()

virtual double libm2k::analog::M2kPowerSupply::readChannel ( unsigned int  chn,
bool  calibrated = true 
)
pure virtual

Retrieve the value of a given channel.

Parameters
chnThe index corresponding to the channel
calibratedRead values are converted using the calibration coefficients from the IIO context by default; This boolean flag specifies whether the coefficients should be used.
Returns
double The voltage transmitted by the given channel