GNU Radio Manual and C++ API Reference  3.10.9.1
The Free & Open Software Radio Ecosystem
iio_types.h
Go to the documentation of this file.
1 /* -*- c++ -*- */
2 /*
3  * Copyright 2021 Josh Morman
4  *
5  * SPDX-License-Identifier: GPL-3.0-or-later
6  *
7  */
8 
9 #ifndef _INCLUDED_IIO_TYPES_H
10 #define _INCLUDED_IIO_TYPES_H
11 
12 #include <gnuradio/iio/api.h>
13 #include <charconv>
14 #include <string>
15 #include <variant>
16 #include <vector>
17 
18 namespace gr {
19 namespace iio {
20 
21 enum class data_type_t { DOUBLE = 0, FLOAT = 1, LONGLONG = 2, INT = 3, UINT8 = 4 };
22 
23 enum class attr_type_t {
24  CHANNEL = 0,
25  DEVICE = 1,
26  DEVICE_BUFFER = 2,
27  DEVICE_DEBUG = 3,
29 };
30 
31 typedef std::variant<long long unsigned int, long unsigned int, int, double, std::string>
33 
34 class IIO_API iio_param_t : public std::pair<std::string, std::string>
35 {
36 public:
37  iio_param_t(const std::string& key, iio_param_value_t value);
38  iio_param_t(const std::string& kvpair);
40 
41  static std::string to_string(iio_param_value_t value);
42 };
43 
44 typedef std::vector<iio_param_t> iio_param_vec_t;
45 
46 } // namespace iio
47 } // namespace gr
48 
49 #endif
Definition: iio_types.h:35
iio_param_t(const std::string &kvpair)
static std::string to_string(iio_param_value_t value)
iio_param_t(const std::string &key, iio_param_value_t value)
~iio_param_t()
Definition: iio_types.h:39
#define IIO_API
Definition: gr-iio/include/gnuradio/iio/api.h:18
std::vector< iio_param_t > iio_param_vec_t
Definition: iio_types.h:44
data_type_t
Definition: iio_types.h:21
std::variant< long long unsigned int, long unsigned int, int, double, std::string > iio_param_value_t
Definition: iio_types.h:32
attr_type_t
Definition: iio_types.h:23
GNU Radio logging wrapper.
Definition: basic_block.h:29