libm2k
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 
29 namespace libm2k {
34 namespace analog {
42 class LIBM2K_API M2kPowerSupply {
43 public:
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