USRP Hardware Driver and USRP Manual  Version: 003.010.003.HEAD-0-gef157678
UHD and USRP Manual
ranges.h File Reference
#include <uhd/config.h>
#include <uhd/error.h>
#include <stdbool.h>
#include <stdlib.h>

Go to the source code of this file.

Classes

struct  uhd_range_t
 Range of floating-point values. More...
 

Typedefs

typedef struct uhd_meta_range_t * uhd_meta_range_handle
 C-level interface for dealing with a list of ranges. More...
 

Functions

UHD_API uhd_error uhd_range_to_pp_string (const uhd_range_t *range, char *pp_string_out, size_t strbuffer_len)
 Get a string representation of the given range. More...
 
UHD_API uhd_error uhd_meta_range_make (uhd_meta_range_handle *h)
 Create a meta range handle. More...
 
UHD_API uhd_error uhd_meta_range_free (uhd_meta_range_handle *h)
 Destroy a meta range handle. More...
 
UHD_API uhd_error uhd_meta_range_start (uhd_meta_range_handle h, double *start_out)
 Get the overall start value for the given meta range. More...
 
UHD_API uhd_error uhd_meta_range_stop (uhd_meta_range_handle h, double *stop_out)
 Get the overall stop value for the given meta range. More...
 
UHD_API uhd_error uhd_meta_range_step (uhd_meta_range_handle h, double *step_out)
 Get the overall step value for the given meta range. More...
 
UHD_API uhd_error uhd_meta_range_clip (uhd_meta_range_handle h, double value, bool clip_step, double *result_out)
 Clip the given value to a possible value in the given range. More...
 
UHD_API uhd_error uhd_meta_range_size (uhd_meta_range_handle h, size_t *size_out)
 Get the number of ranges in the given meta range. More...
 
UHD_API uhd_error uhd_meta_range_push_back (uhd_meta_range_handle h, const uhd_range_t *range)
 Add a range to the given meta range. More...
 
UHD_API uhd_error uhd_meta_range_at (uhd_meta_range_handle h, size_t num, uhd_range_t *range_out)
 Get the range at the given index. More...
 
UHD_API uhd_error uhd_meta_range_to_pp_string (uhd_meta_range_handle h, char *pp_string_out, size_t strbuffer_len)
 Get a string representation of the given meta range. More...
 
UHD_API uhd_error uhd_meta_range_last_error (uhd_meta_range_handle h, char *error_out, size_t strbuffer_len)
 Get the last error recorded by the underlying meta range. More...
 

Typedef Documentation

◆ uhd_meta_range_handle

typedef struct uhd_meta_range_t* uhd_meta_range_handle

C-level interface for dealing with a list of ranges.

See uhd::meta_range_t for more details.

Function Documentation

◆ uhd_meta_range_at()

UHD_API uhd_error uhd_meta_range_at ( uhd_meta_range_handle  h,
size_t  num,
uhd_range_t range_out 
)

Get the range at the given index.

◆ uhd_meta_range_clip()

UHD_API uhd_error uhd_meta_range_clip ( uhd_meta_range_handle  h,
double  value,
bool  clip_step,
double *  result_out 
)

Clip the given value to a possible value in the given range.

◆ uhd_meta_range_free()

UHD_API uhd_error uhd_meta_range_free ( uhd_meta_range_handle h)

Destroy a meta range handle.

NOTE: Using a uhd_meta_range_handle after passing it into this function will result in a segmentation fault.

◆ uhd_meta_range_last_error()

UHD_API uhd_error uhd_meta_range_last_error ( uhd_meta_range_handle  h,
char *  error_out,
size_t  strbuffer_len 
)

Get the last error recorded by the underlying meta range.

◆ uhd_meta_range_make()

UHD_API uhd_error uhd_meta_range_make ( uhd_meta_range_handle h)

Create a meta range handle.

NOTE: Using a uhd_meta_range_handle before passing it into this function will result in undefined behavior.

◆ uhd_meta_range_push_back()

UHD_API uhd_error uhd_meta_range_push_back ( uhd_meta_range_handle  h,
const uhd_range_t range 
)

Add a range to the given meta range.

◆ uhd_meta_range_size()

UHD_API uhd_error uhd_meta_range_size ( uhd_meta_range_handle  h,
size_t *  size_out 
)

Get the number of ranges in the given meta range.

◆ uhd_meta_range_start()

UHD_API uhd_error uhd_meta_range_start ( uhd_meta_range_handle  h,
double *  start_out 
)

Get the overall start value for the given meta range.

◆ uhd_meta_range_step()

UHD_API uhd_error uhd_meta_range_step ( uhd_meta_range_handle  h,
double *  step_out 
)

Get the overall step value for the given meta range.

◆ uhd_meta_range_stop()

UHD_API uhd_error uhd_meta_range_stop ( uhd_meta_range_handle  h,
double *  stop_out 
)

Get the overall stop value for the given meta range.

◆ uhd_meta_range_to_pp_string()

UHD_API uhd_error uhd_meta_range_to_pp_string ( uhd_meta_range_handle  h,
char *  pp_string_out,
size_t  strbuffer_len 
)

Get a string representation of the given meta range.

◆ uhd_range_to_pp_string()

UHD_API uhd_error uhd_range_to_pp_string ( const uhd_range_t range,
char *  pp_string_out,
size_t  strbuffer_len 
)

Get a string representation of the given range.