Loading...
Searching...
No Matches
PowerSupply
Analog

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

## 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

  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