Loading...
Searching...
No Matches
iio_types.h
Go to the documentation of this file.
/* -*- c++ -*- */
/*
* Copyright 2021 Josh Morman
*
* SPDX-License-Identifier: GPL-3.0-or-later
*
*/
#ifndef _INCLUDED_IIO_TYPES_H
#define _INCLUDED_IIO_TYPES_H
#include <gnuradio/iio/api.h>
#include <charconv>
#include <string>
#include <variant>
#include <vector>
namespace gr {
namespace iio {
enum class data_type_t { DOUBLE = 0, FLOAT = 1, LONGLONG = 2, INT = 3, UINT8 = 4 };
enum class attr_type_t {
CHANNEL = 0,
DEVICE = 1,
DEVICE_BUFFER = 2,
DEVICE_DEBUG = 3,
DIRECT_REGISTER_ACCESS = 4
};
typedef std::variant<long long unsigned int, long unsigned int, int, double, std::string>
iio_param_value_t;
class IIO_API iio_param_t : public std::pair<std::string, std::string>
{
public:
iio_param_t(const std::string& key, iio_param_value_t value);
iio_param_t(const std::string& kvpair);
~iio_param_t() {}
static std::string to_string(iio_param_value_t value);
};
typedef std::vector<iio_param_t> iio_param_vec_t;
} // namespace iio
} // namespace gr
#endif
gr::iio::iio_param_t::iio_param_t
iio_param_t(const std::string &kvpair)
gr::iio::iio_param_t::to_string
static std::string to_string(iio_param_value_t value)
gr::iio::iio_param_t::iio_param_t
iio_param_t(const std::string &key, iio_param_value_t value)
gr::iio::iio_param_t::~iio_param_t
~iio_param_t()
Definition iio_types.h:39
api.h
IIO_API
#define IIO_API
Definition gr-iio/include/gnuradio/iio/api.h:18
gr::iio
Definition attr_sink.h:19
gr::iio::iio_param_vec_t
std::vector< iio_param_t > iio_param_vec_t
Definition iio_types.h:44
gr::iio::data_type_t
data_type_t
Definition iio_types.h:21
gr::iio::data_type_t::INT
@ INT
Definition iio_types.h:21
gr::iio::data_type_t::LONGLONG
@ LONGLONG
Definition iio_types.h:21
gr::iio::data_type_t::FLOAT
@ FLOAT
Definition iio_types.h:21
gr::iio::data_type_t::UINT8
@ UINT8
Definition iio_types.h:21
gr::iio::data_type_t::DOUBLE
@ DOUBLE
Definition iio_types.h:21
gr::iio::iio_param_value_t
std::variant< long long unsigned int, long unsigned int, int, double, std::string > iio_param_value_t
Definition iio_types.h:32
gr::iio::attr_type_t
attr_type_t
Definition iio_types.h:23
gr::iio::attr_type_t::DIRECT_REGISTER_ACCESS
@ DIRECT_REGISTER_ACCESS
Definition iio_types.h:28
gr::iio::attr_type_t::DEVICE
@ DEVICE
Definition iio_types.h:25
gr::iio::attr_type_t::CHANNEL
@ CHANNEL
Definition iio_types.h:24
gr::iio::attr_type_t::DEVICE_BUFFER
@ DEVICE_BUFFER
Definition iio_types.h:26
gr::iio::attr_type_t::DEVICE_DEBUG
@ DEVICE_DEBUG
Definition iio_types.h:27
gr
GNU Radio logging wrapper.
Definition basic_block.h:29