USRP Hardware Driver and USRP Manual  Version: 003.010.001.HEAD-0-g929e3b32
UHD and USRP Manual
usrp_clock.h
Go to the documentation of this file.
1 //
2 // Copyright 2015 Ettus Research LLC
3 //
4 // This program is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU General Public License as published by
6 // the Free Software Foundation, either version 3 of the License, or
7 // (at your option) any later version.
8 //
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU General Public License for more details.
13 //
14 // You should have received a copy of the GNU General Public License
15 // along with this program. If not, see <http://www.gnu.org/licenses/>.
16 //
17 
18 #ifndef INCLUDED_UHD_USRP_CLOCK_H
19 #define INCLUDED_UHD_USRP_CLOCK_H
20 
21 #include <uhd/config.h>
22 #include <uhd/error.h>
23 #include <uhd/types/sensors.h>
25 
26 #include <stdlib.h>
27 #include <stdint.h>
28 #include <time.h>
29 
30 /****************************************************************************
31  * Public Datatypes for USRP clock
32  ***************************************************************************/
33 struct uhd_usrp_clock;
34 
36 
42 typedef struct uhd_usrp_clock* uhd_usrp_clock_handle;
43 
44 /****************************************************************************
45  * Make / Free API calls
46  ***************************************************************************/
47 #ifdef __cplusplus
48 extern "C" {
49 #endif
50 
52 
56  const char* args,
57  uhd_string_vector_t *devices_out
58 );
59 
61 
67  const char *args
68 );
69 
71 
77 );
78 
82  char* error_out,
83  size_t strbuffer_len
84 );
85 
89  char* pp_string_out,
90  size_t strbuffer_len
91 );
92 
96  size_t *num_boards_out
97 );
98 
102  size_t board,
103  uint32_t *clock_time_out
104 );
105 
109  const char* name,
110  size_t board,
111  uhd_sensor_value_handle *sensor_value_out
112 );
113 
117  size_t board,
118  uhd_string_vector_handle *sensor_names_out
119 );
120 
121 #ifdef __cplusplus
122 }
123 #endif
124 
125 #endif /* INCLUDED_UHD_USRP_CLOCK_H */
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_free(uhd_usrp_clock_handle *h)
Safely destroy the clock object underlying the handle.
struct uhd_string_vector_t uhd_string_vector_t
Definition: string_vector.h:41
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_API uhd_error uhd_usrp_clock_make(uhd_usrp_clock_handle *h, const char *args)
Create a clock 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_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_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_find(const char *args, uhd_string_vector_t *devices_out)
Find all connected clock devices.
uhd_error
UHD error codes.
Definition: error.h:31
uhd_string_vector_t * uhd_string_vector_handle
Definition: string_vector.h:43
#define UHD_API
Definition: config.h:73
struct uhd_sensor_value_t * uhd_sensor_value_handle
C-level interface for a UHD sensor.
Definition: sensors.h:44
struct uhd_usrp_clock * uhd_usrp_clock_handle
A C-level interface for interacting with an Ettus Research clock device.
Definition: usrp_clock.h:42
UHD_API uhd_error uhd_usrp_clock_last_error(uhd_usrp_clock_handle h, char *error_out, size_t strbuffer_len)
Get last error.