Loading...
Searching...
No Matches
m2kpowersupply.hpp
/*
* Copyright (c) 2019 Analog Devices Inc.
*
* This file is part of libm2k
* (see http://www.github.com/analogdevicesinc/libm2k).
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 2.1 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef M2KPOWERSUPPLY_HPP
#define M2KPOWERSUPPLY_HPP
#include <libm2k/m2kglobal.hpp>
#include <vector>
#include <memory>
namespace libm2k {
namespace analog {
class LIBM2K_API M2kPowerSupply {
public:
virtual ~M2kPowerSupply() {}
virtual void reset() = 0;
virtual void enableChannel(unsigned int chn, bool en) = 0;
virtual void enableAll(bool en) = 0;
virtual double readChannel(unsigned int chn, bool calibrated = true) = 0;
virtual void pushChannel(unsigned int chn, double value, bool calibrated = true) = 0;
virtual void powerDownDacs(bool powerdown) = 0;
virtual bool anyChannelEnabled() = 0;
};
}
}
#endif //M2KPOWERSUPPLY_HPP
libm2k::analog::M2kPowerSupply
Controls the power supply.
Definition m2kpowersupply.hpp:42
libm2k::analog::M2kPowerSupply::enableAll
virtual void enableAll(bool en)=0
Enable or disable all channels.
libm2k::analog::M2kPowerSupply::readChannel
virtual double readChannel(unsigned int chn, bool calibrated=true)=0
Retrieve the value of a given channel.
libm2k::analog::M2kPowerSupply::pushChannel
virtual void pushChannel(unsigned int chn, double value, bool calibrated=true)=0
Set the voltage for the given channel.
libm2k::analog::M2kPowerSupply::enableChannel
virtual void enableChannel(unsigned int chn, bool en)=0
Enable or disable the given channel.
libm2k::analog::M2kPowerSupply::anyChannelEnabled
virtual bool anyChannelEnabled()=0
Check if there is at least one enabled channel.