USRP Hardware Driver and USRP Manual  Version: 4.3.0.0-1-g4d6b7263f
UHD and USRP Manual
subdev_spec.h File Reference
#include <uhd/config.h>
#include <uhd/error.h>
#include <stdbool.h>

Go to the source code of this file.

Classes

struct  uhd_subdev_spec_pair_t
 Subdevice specification. More...
 

Typedefs

typedef struct uhd_subdev_spec_t * uhd_subdev_spec_handle
 A C-level interface for working with a list of subdevice specifications. More...
 

Functions

UHD_API uhd_error uhd_subdev_spec_pair_free (uhd_subdev_spec_pair_t *subdev_spec_pair)
 Safely destroy any memory created in the generation of a uhd_subdev_spec_pair_t. More...
 
UHD_API uhd_error uhd_subdev_spec_pairs_equal (const uhd_subdev_spec_pair_t *first, const uhd_subdev_spec_pair_t *second, bool *result_out)
 Check to see if two subdevice specifications are equal. More...
 
UHD_API uhd_error uhd_subdev_spec_make (uhd_subdev_spec_handle *h, const char *markup)
 Create a handle for a list of subdevice specifications. More...
 
UHD_API uhd_error uhd_subdev_spec_free (uhd_subdev_spec_handle *h)
 Safely destroy a subdevice specification handle. More...
 
UHD_API uhd_error uhd_subdev_spec_size (uhd_subdev_spec_handle h, size_t *size_out)
 Check how many subdevice specifications are in this list. More...
 
UHD_API uhd_error uhd_subdev_spec_push_back (uhd_subdev_spec_handle h, const char *markup)
 Add a subdevice specification to this list. More...
 
UHD_API uhd_error uhd_subdev_spec_at (uhd_subdev_spec_handle h, size_t num, uhd_subdev_spec_pair_t *subdev_spec_pair_out)
 Get the subdevice specification at the given index. More...
 
UHD_API uhd_error uhd_subdev_spec_to_pp_string (uhd_subdev_spec_handle h, char *pp_string_out, size_t strbuffer_len)
 Get a string representation of the given list. More...
 
UHD_API uhd_error uhd_subdev_spec_to_string (uhd_subdev_spec_handle h, char *string_out, size_t strbuffer_len)
 Get a markup string representation of the given list. More...
 
UHD_API uhd_error uhd_subdev_spec_last_error (uhd_subdev_spec_handle h, char *error_out, size_t strbuffer_len)
 Get the last error recorded by the given handle. More...
 

Typedef Documentation

◆ uhd_subdev_spec_handle

typedef struct uhd_subdev_spec_t* uhd_subdev_spec_handle

A C-level interface for working with a list of subdevice specifications.

See uhd::usrp::subdev_spec_t for more details.

NOTE: Using a handle before passing it into uhd_subdev_spec_make() will result in undefined behavior.

Function Documentation

◆ uhd_subdev_spec_at()

UHD_API uhd_error uhd_subdev_spec_at ( uhd_subdev_spec_handle  h,
size_t  num,
uhd_subdev_spec_pair_t subdev_spec_pair_out 
)

Get the subdevice specification at the given index.

◆ uhd_subdev_spec_free()

UHD_API uhd_error uhd_subdev_spec_free ( uhd_subdev_spec_handle h)

Safely destroy a subdevice specification handle.

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

◆ uhd_subdev_spec_last_error()

UHD_API uhd_error uhd_subdev_spec_last_error ( uhd_subdev_spec_handle  h,
char *  error_out,
size_t  strbuffer_len 
)

Get the last error recorded by the given handle.

◆ uhd_subdev_spec_make()

UHD_API uhd_error uhd_subdev_spec_make ( uhd_subdev_spec_handle h,
const char *  markup 
)

Create a handle for a list of subdevice specifications.

◆ uhd_subdev_spec_pair_free()

UHD_API uhd_error uhd_subdev_spec_pair_free ( uhd_subdev_spec_pair_t subdev_spec_pair)

Safely destroy any memory created in the generation of a uhd_subdev_spec_pair_t.

◆ uhd_subdev_spec_pairs_equal()

UHD_API uhd_error uhd_subdev_spec_pairs_equal ( const uhd_subdev_spec_pair_t first,
const uhd_subdev_spec_pair_t second,
bool *  result_out 
)

Check to see if two subdevice specifications are equal.

◆ uhd_subdev_spec_push_back()

UHD_API uhd_error uhd_subdev_spec_push_back ( uhd_subdev_spec_handle  h,
const char *  markup 
)

Add a subdevice specification to this list.

◆ uhd_subdev_spec_size()

UHD_API uhd_error uhd_subdev_spec_size ( uhd_subdev_spec_handle  h,
size_t *  size_out 
)

Check how many subdevice specifications are in this list.

◆ uhd_subdev_spec_to_pp_string()

UHD_API uhd_error uhd_subdev_spec_to_pp_string ( uhd_subdev_spec_handle  h,
char *  pp_string_out,
size_t  strbuffer_len 
)

Get a string representation of the given list.

◆ uhd_subdev_spec_to_string()

UHD_API uhd_error uhd_subdev_spec_to_string ( uhd_subdev_spec_handle  h,
char *  string_out,
size_t  strbuffer_len 
)

Get a markup string representation of the given list.