USRP Hardware Driver and USRP Manual: usrp_clock.h Source File

| USRP Hardware Driver and USRP Manual Version: 4.9.0.makepkg-0-g9ec1f582 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#pragma once
9
10#include <uhd/config.h>
11#include <uhd/error.h>
12#include <uhd/types/sensors.h>
13#include <uhd/types/string_vector.h>
14
15#include <stdint.h>
16#include <stdlib.h>
17#include <time.h>
18
19/****************************************************************************
20 * Public Datatypes for USRP clock
21 ***************************************************************************/
22struct uhd_usrp_clock;
23
25
31 typedef struct uhd_usrp_clock* uhd_usrp_clock_handle;
32
33/****************************************************************************
34 * Make / Free API calls
35 ***************************************************************************/
36#ifdef __cplusplus
37extern "C" {
38#endif
39
41
44 UHD_API uhd_error uhd_usrp_clock_find(const char* args, uhd_string_vector_t* devices_out);
45
47
51 UHD_API uhd_error uhd_usrp_clock_make(uhd_usrp_clock_handle* h, const char* args);
52
54
58 UHD_API uhd_error uhd_usrp_clock_free(uhd_usrp_clock_handle* h);
59
61 UHD_API uhd_error uhd_usrp_clock_last_error(
62 uhd_usrp_clock_handle h, char* error_out, size_t strbuffer_len);
63
65 UHD_API uhd_error uhd_usrp_clock_get_pp_string(
66 uhd_usrp_clock_handle h, char* pp_string_out, size_t strbuffer_len);
67
69 UHD_API uhd_error uhd_usrp_clock_get_num_boards(
70 uhd_usrp_clock_handle h, size_t* num_boards_out);
71
73 UHD_API uhd_error uhd_usrp_clock_get_time(
74 uhd_usrp_clock_handle h, size_t board, uint32_t* clock_time_out);
75
77 UHD_API uhd_error uhd_usrp_clock_get_sensor(uhd_usrp_clock_handle h,
78 const char* name,
79 size_t board,
80 uhd_sensor_value_handle* sensor_value_out);
81
83 UHD_API uhd_error uhd_usrp_clock_get_sensor_names(
84 uhd_usrp_clock_handle h, size_t board, uhd_string_vector_handle* sensor_names_out);
85
86#ifdef __cplusplus
87}
88#endif
config.h
UHD_API
#define UHD_API
Definition config.h:87
error.h
uhd_error
uhd_error
UHD error codes.
Definition error.h:20
sensors.h
uhd_sensor_value_handle
struct uhd_sensor_value_t * uhd_sensor_value_handle
C-level interface for a UHD sensor.
Definition sensors.h:35
string_vector.h
uhd_string_vector_t
struct uhd_string_vector_t uhd_string_vector_t
Definition string_vector.h:31
uhd_string_vector_handle
uhd_string_vector_t * uhd_string_vector_handle
Definition string_vector.h:33
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.
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_find
UHD_API uhd_error uhd_usrp_clock_find(const char *args, uhd_string_vector_t *devices_out)
Find all connected clock devices.
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_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_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_handle
struct uhd_usrp_clock * uhd_usrp_clock_handle
A C-level interface for interacting with an Ettus Research clock device.
Definition usrp_clock.h:31
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_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.