USRP Hardware Driver and USRP Manual Version: 3.15.0.0-MacPorts-Release
UHD and USRP Manual
 
Loading...
Searching...
No Matches
usrp_clock.h
Go to the documentation of this file.
1//
2// Copyright 2015 Ettus Research LLC
3// Copyright 2018 Ettus Research, a National Instruments Company
4//
5// SPDX-License-Identifier: GPL-3.0-or-later
6//
7
8#ifndef INCLUDED_UHD_USRP_CLOCK_H
9#define INCLUDED_UHD_USRP_CLOCK_H
10
11#include <uhd/config.h>
12#include <uhd/error.h>
13#include <uhd/types/sensors.h>
15
16#include <stdlib.h>
17#include <stdint.h>
18#include <time.h>
19
20/****************************************************************************
21 * Public Datatypes for USRP clock
22 ***************************************************************************/
23struct uhd_usrp_clock;
24
26
32typedef struct uhd_usrp_clock* uhd_usrp_clock_handle;
33
34/****************************************************************************
35 * Make / Free API calls
36 ***************************************************************************/
37#ifdef __cplusplus
38extern "C" {
39#endif
40
42
46 const char* args,
47 uhd_string_vector_t *devices_out
48);
49
51
57 const char *args
58);
59
61
67);
68
72 char* error_out,
73 size_t strbuffer_len
74);
75
79 char* pp_string_out,
80 size_t strbuffer_len
81);
82
86 size_t *num_boards_out
87);
88
92 size_t board,
93 uint32_t *clock_time_out
94);
95
99 const char* name,
100 size_t board,
101 uhd_sensor_value_handle *sensor_value_out
102);
103
107 size_t board,
108 uhd_string_vector_handle *sensor_names_out
109);
110
111#ifdef __cplusplus
112}
113#endif
114
115#endif /* INCLUDED_UHD_USRP_CLOCK_H */
#define UHD_API
Definition config.h:68
uhd_error
UHD error codes.
Definition error.h:21
struct uhd_sensor_value_t * uhd_sensor_value_handle
C-level interface for a UHD sensor.
Definition sensors.h:34
struct uhd_string_vector_t uhd_string_vector_t
Definition string_vector.h:31
uhd_string_vector_t * uhd_string_vector_handle
Definition string_vector.h:33
UHD_API uhd_error uhd_usrp_clock_free(uhd_usrp_clock_handle *h)
Safely destroy the clock object underlying the handle.
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_API uhd_error uhd_usrp_clock_find(const char *args, uhd_string_vector_t *devices_out)
Find all connected clock devices.
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_API uhd_error uhd_usrp_clock_get_num_boards(uhd_usrp_clock_handle h, size_t *num_boards_out)
Get number of boards.
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.
struct uhd_usrp_clock * uhd_usrp_clock_handle
A C-level interface for interacting with an Ettus Research clock device.
Definition usrp_clock.h:32
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_API uhd_error uhd_usrp_clock_last_error(uhd_usrp_clock_handle h, char *error_out, size_t strbuffer_len)
Get last error.
UHD_API uhd_error uhd_usrp_clock_make(uhd_usrp_clock_handle *h, const char *args)
Create a clock handle.