Contains the representation of the power supply.
More...
Contains the representation of the power supply.
◆ 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
-
en | A 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
-
chn | The index corresponding to the channel |
en | A 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
-
chn | The index corresponding to the channel |
value | The voltage (up to 5V) |
calibrated | Written 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
-
chn | The index corresponding to the channel |
calibrated | Read 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