libm2k
dmm.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 GENERICDMM_HPP
23 #define GENERICDMM_HPP
24 
25 #include <libm2k/m2kglobal.hpp>
26 #include <libm2k/analog/enums.hpp>
27 #include <vector>
28 #include <map>
29 #include <string>
30 
31 namespace libm2k {
36 namespace analog {
37 
45 class LIBM2K_API DMM {
46 public:
50  virtual ~DMM() {}
51 
52 
56  virtual void reset() = 0;
57 
58 
64  virtual std::vector<std::string> getAllChannels() = 0;
65 
66 
73  virtual libm2k::analog::DMM_READING readChannel(unsigned int index) = 0;
74 
75 
82  virtual libm2k::analog::DMM_READING readChannel(std::string chn_name) = 0;
83 
84 
90  virtual std::vector<libm2k::analog::DMM_READING> readAll() = 0;
91 
92 
98  virtual std::string getName() = 0;
99 
100 };
101 }
102 }
103 
104 
105 
106 #endif //GENERICDMM_HPP
The structure of a DMM.
Definition: enums.hpp:43
Controls the digital multimeter.
Definition: dmm.hpp:45
Analogical enumerations.