libm2k
Loading...
Searching...
No Matches
m2kpowersupply.hpp
1/*
2 * Copyright (c) 2019 Analog Devices Inc.
3 *
4 * This file is part of libm2k
5 * (see http://www.github.com/analogdevicesinc/libm2k).
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation, either version 2.1 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
19 *
20 */
21
22#ifndef M2KPOWERSUPPLY_HPP
23#define M2KPOWERSUPPLY_HPP
24
25#include <libm2k/m2kglobal.hpp>
26#include <vector>
27#include <memory>
28
29namespace libm2k {
34namespace analog {
42class LIBM2K_API M2kPowerSupply {
43public:
47 virtual ~M2kPowerSupply() {}
48
49
53 virtual void reset() = 0;
54
55
62 virtual void enableChannel(unsigned int chn, bool en) = 0;
63
64
70 virtual void enableAll(bool en) = 0;
71
72
82 virtual double readChannel(unsigned int chn, bool calibrated = true) = 0;
83
84
94 virtual void pushChannel(unsigned int chn, double value, bool calibrated = true) = 0;
95
96
100 virtual void powerDownDacs(bool powerdown) = 0;
101
102
109 virtual bool anyChannelEnabled() = 0;
110};
111}
112}
113
114
115
116#endif //M2KPOWERSUPPLY_HPP
Controls the power supply.
Definition m2kpowersupply.hpp:42
virtual void enableAll(bool en)=0
Enable or disable all channels.
virtual double readChannel(unsigned int chn, bool calibrated=true)=0
Retrieve the value of a given channel.
virtual void pushChannel(unsigned int chn, double value, bool calibrated=true)=0
Set the voltage for the given channel.
virtual void enableChannel(unsigned int chn, bool en)=0
Enable or disable the given channel.
virtual bool anyChannelEnabled()=0
Check if there is at least one enabled channel.