| USRP Hardware Driver and Device Manual Version: 4.10.0.0 UHD and USRP Manual |

Loading...
Searching...
No Matches
uhd::meta_range_t Struct Reference

`#include <uhd/types/ranges.hpp>`

Inheritance diagram for uhd::meta_range_t:

## Detailed Description

A meta-range object holds a list of individual ranges.

## Public Member Functions
| meta_range_t (void)
| A default constructor for an empty meta-range.
template<typename InputIterator>
| meta_range_t (InputIterator first, InputIterator last)
| meta_range_t (std::initializer_list< double > il)
| Initializer list constructor.
| meta_range_t (std::initializer_list< range_t > il)
| Initializer list constructor.
| meta_range_t (double start, double stop, double step=0)
double | start (void) const
| Get the overall start value for this meta-range.
double | stop (void) const
| Get the overall stop value for this meta-range.
double | step (void) const
| Get the overall step value for this meta-range.
double | clip (double value, bool clip_step=false) const
meta_range_t | as_monotonic () const
std::string | to_pp_string (void) const
| Convert this meta-range to a printable string.

## Constructor & Destructor Documentation

## ◆ meta_range_t() [1/5]

uhd::meta_range_t::meta_range_t | ( | void |  | ) |

A default constructor for an empty meta-range.

## ◆ meta_range_t() [2/5]

template<typename InputIterator>

uhd::meta_range_t::meta_range_t | ( | InputIterator | first,
|  | InputIterator | last )
| inline

Input iterator constructor

Allows initializing this object from iterators:

meta_range_t r(other_range.begin(), other_range.end());
uhd::meta_range_t::meta_range_t
meta_range_t(void)
A default constructor for an empty meta-range.

Parameters

  first | the begin iterator
  last | the end iterator

## ◆ meta_range_t() [3/5]

uhd::meta_range_t::meta_range_t | ( | std::initializer_list< double > | il | ) |

Initializer list constructor.

## ◆ meta_range_t() [4/5]

uhd::meta_range_t::meta_range_t | ( | std::initializer_list< range_t > | il | ) |
| inline

Initializer list constructor.

## ◆ meta_range_t() [5/5]

uhd::meta_range_t::meta_range_t | ( | double | start,
|  | double | stop,
|  | double | step = 0 )

A convenience constructor for a single range. A step size of zero implies infinite precision.

Parameters

  start | the minimum value for this range
  stop | the maximum value for this range
  step | the step size for this range

## Member Function Documentation

## ◆ as_monotonic()

meta_range_t uhd::meta_range_t::as_monotonic | ( |  | ) | const

A method for converting an arbitrary meta_range_t into a monotonic meta_range_t which has no overlapping ranges, and where all ranges are sorted.

Requires that all subranges have a step size of zero, or else it throws uhd::value_error.

Returns
  a monotonic meta_range_t

## ◆ clip()

double uhd::meta_range_t::clip | ( | double | value,
|  | bool | clip_step = false ) const

Clip the target value to a possible range value.

Parameters

  value | the value to clip to this range
  clip_step | if true, clip to steps as well

Returns
  a value that is in one of the ranges

## ◆ start()

double uhd::meta_range_t::start | ( | void |  | ) | const

Get the overall start value for this meta-range.

## ◆ step()

double uhd::meta_range_t::step | ( | void |  | ) | const

Get the overall step value for this meta-range.

## ◆ stop()

double uhd::meta_range_t::stop | ( | void |  | ) | const

Get the overall stop value for this meta-range.

## ◆ to_pp_string()

std::string uhd::meta_range_t::to_pp_string | ( | void |  | ) | const

Convert this meta-range to a printable string.

The documentation for this struct was generated from the following file:

- ranges.hpp