USRP Hardware Driver and USRP Manual  Version: 3.13.0.HEAD-0-gf114cfa0
UHD and USRP Manual
usrp_clock.h File Reference
#include <uhd/config.h>
#include <uhd/error.h>
#include <uhd/types/sensors.h>
#include <uhd/types/string_vector.h>
#include <stdlib.h>
#include <stdint.h>
#include <time.h>

Go to the source code of this file.

Typedefs

typedef struct uhd_usrp_clock * uhd_usrp_clock_handle
 A C-level interface for interacting with an Ettus Research clock device. More...
 

Functions

UHD_API uhd_error uhd_usrp_clock_find (const char *args, uhd_string_vector_t *devices_out)
 Find all connected clock devices. More...
 
UHD_API uhd_error uhd_usrp_clock_make (uhd_usrp_clock_handle *h, const char *args)
 Create a clock handle. More...
 
UHD_API uhd_error uhd_usrp_clock_free (uhd_usrp_clock_handle *h)
 Safely destroy the clock object underlying the handle. More...
 
UHD_API uhd_error uhd_usrp_clock_last_error (uhd_usrp_clock_handle h, char *error_out, size_t strbuffer_len)
 Get last error. More...
 
UHD_API uhd_error uhd_usrp_clock_get_pp_string (uhd_usrp_clock_handle h, char *pp_string_out, size_t strbuffer_len)
 Get board information in a nice output. More...
 
UHD_API uhd_error uhd_usrp_clock_get_num_boards (uhd_usrp_clock_handle h, size_t *num_boards_out)
 Get number of boards. More...
 
UHD_API uhd_error uhd_usrp_clock_get_time (uhd_usrp_clock_handle h, size_t board, uint32_t *clock_time_out)
 Get time. More...
 
UHD_API uhd_error uhd_usrp_clock_get_sensor (uhd_usrp_clock_handle h, const char *name, size_t board, uhd_sensor_value_handle *sensor_value_out)
 Get sensor. More...
 
UHD_API uhd_error uhd_usrp_clock_get_sensor_names (uhd_usrp_clock_handle h, size_t board, uhd_string_vector_handle *sensor_names_out)
 Get sensor names. More...
 

Typedef Documentation

◆ uhd_usrp_clock_handle

typedef struct uhd_usrp_clock* uhd_usrp_clock_handle

A C-level interface for interacting with an Ettus Research clock device.

See uhd::usrp_clock::multi_usrp_clock for more details.

NOTE: Attempting to use a handle before passing it into uhd_usrp_clock_make() will result in undefined behavior.

Function Documentation

◆ uhd_usrp_clock_find()

UHD_API uhd_error uhd_usrp_clock_find ( const char *  args,
uhd_string_vector_t devices_out 
)

Find all connected clock devices.

See uhd::device::find() for more details.

◆ uhd_usrp_clock_free()

UHD_API uhd_error uhd_usrp_clock_free ( uhd_usrp_clock_handle h)

Safely destroy the clock object underlying the handle.

Note: After calling this, usage of h may cause segmentation faults. However, multiple calling of uhd_usrp_free() is safe.

◆ uhd_usrp_clock_get_num_boards()

UHD_API uhd_error uhd_usrp_clock_get_num_boards ( uhd_usrp_clock_handle  h,
size_t *  num_boards_out 
)

Get number of boards.

◆ uhd_usrp_clock_get_pp_string()

UHD_API uhd_error uhd_usrp_clock_get_pp_string ( uhd_usrp_clock_handle  h,
char *  pp_string_out,
size_t  strbuffer_len 
)

Get board information in a nice output.

◆ uhd_usrp_clock_get_sensor()

UHD_API uhd_error uhd_usrp_clock_get_sensor ( uhd_usrp_clock_handle  h,
const char *  name,
size_t  board,
uhd_sensor_value_handle sensor_value_out 
)

Get sensor.

◆ uhd_usrp_clock_get_sensor_names()

UHD_API uhd_error uhd_usrp_clock_get_sensor_names ( uhd_usrp_clock_handle  h,
size_t  board,
uhd_string_vector_handle sensor_names_out 
)

Get sensor names.

◆ uhd_usrp_clock_get_time()

UHD_API uhd_error uhd_usrp_clock_get_time ( uhd_usrp_clock_handle  h,
size_t  board,
uint32_t *  clock_time_out 
)

Get time.

◆ uhd_usrp_clock_last_error()

UHD_API uhd_error uhd_usrp_clock_last_error ( uhd_usrp_clock_handle  h,
char *  error_out,
size_t  strbuffer_len 
)

Get last error.

◆ uhd_usrp_clock_make()

UHD_API uhd_error uhd_usrp_clock_make ( uhd_usrp_clock_handle h,
const char *  args 
)

Create a clock handle.

Parameters
hThe handle
argsDevice args (e.g. "addr=192.168.10.3")