All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
ranges.hpp
Go to the documentation of this file.
//
// Copyright 2010-2011 Ettus Research LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
#ifndef INCLUDED_UHD_TYPES_RANGES_HPP
#define INCLUDED_UHD_TYPES_RANGES_HPP
#include <uhd/config.hpp>
#include <uhd/utils/pimpl.hpp>
#include <string>
#include <vector>
namespace uhd{
class UHD_API range_t{
public:
range_t(double value = 0);
range_t(double start, double stop, double step = 0);
double start(void) const;
double stop(void) const;
double step(void) const;
const std::string to_pp_string(void) const;
private: UHD_PIMPL_DECL(impl) _impl;
};
struct UHD_API meta_range_t : std::vector<range_t>{
meta_range_t(void);
template <typename InputIterator>
meta_range_t(InputIterator first, InputIterator last):
std::vector<range_t>(first, last){ /* NOP */ }
meta_range_t(double start, double stop, double step = 0);
double start(void) const;
double stop(void) const;
double step(void) const;
double clip(double value, bool clip_step = false) const;
const std::string to_pp_string(void) const;
};
typedef meta_range_t gain_range_t;
typedef meta_range_t freq_range_t;
} //namespace uhd
#endif /* INCLUDED_UHD_TYPES_RANGES_HPP */