| USRP Hardware Driver and Device Manual Version: 4.10.0.0 UHD and USRP Manual |

Loading...
Searching...
No Matches
usrp.h
Go to the documentation of this file.
1//
2// Copyright 2015-2016 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/metadata.h>
13#include <uhd/types/ranges.h>
14#include <uhd/types/sensors.h>
15#include <uhd/types/string_vector.h>
16#include <uhd/types/tune_request.h>
17#include <uhd/types/tune_result.h>
18#include <uhd/types/usrp_info.h>
19#include <uhd/usrp/dboard_eeprom.h>
20#include <uhd/usrp/mboard_eeprom.h>
21#include <uhd/usrp/subdev_spec.h>
22/* version.hpp is safe to include in C: */
23#include <uhd/version.hpp> /* Provides UHD_VERSION */
24
25#include <stdbool.h>
26#include <stdint.h>
27#include <stdlib.h>
28#include <time.h>
29
31 typedef struct
32{
33 size_t bitwidth;
34 bool readable;
35 bool writable;
36} uhd_usrp_register_info_t;
37
38/*
39 * Streamers
40 */
41
43
46 typedef struct
47{
49 char* cpu_format;
51 char* otw_format;
53 char* args;
55 size_t* channel_list;
57 int n_channels;
58} uhd_stream_args_t;
59
61
64 typedef enum {
66 UHD_STREAM_MODE_START_CONTINUOUS = 97,
68 UHD_STREAM_MODE_STOP_CONTINUOUS = 111,
70 UHD_STREAM_MODE_NUM_SAMPS_AND_DONE = 100,
72 UHD_STREAM_MODE_NUM_SAMPS_AND_MORE = 109
73} uhd_stream_mode_t;
74
76
79 typedef struct
80{
82 uhd_stream_mode_t stream_mode;
84 size_t num_samps;
86 bool stream_now;
88 int64_t time_spec_full_secs;
90 double time_spec_frac_secs;
91} uhd_stream_cmd_t;
92
93 struct uhd_rx_streamer;
94 struct uhd_tx_streamer;
95
97
100 typedef struct uhd_rx_streamer* uhd_rx_streamer_handle;
101
103
106 typedef struct uhd_tx_streamer* uhd_tx_streamer_handle;
107
108#ifdef __cplusplus
109 extern "C" {
110#endif
111
112/*
113 * RX Streamer
114 */
115
117
121 UHD_API uhd_error uhd_rx_streamer_make(uhd_rx_streamer_handle* h);
122
124
128 UHD_API uhd_error uhd_rx_streamer_free(uhd_rx_streamer_handle* h);
129
131 UHD_API uhd_error uhd_rx_streamer_num_channels(
132 uhd_rx_streamer_handle h, size_t* num_channels_out);
133
135 UHD_API uhd_error uhd_rx_streamer_max_num_samps(
136 uhd_rx_streamer_handle h, size_t* max_num_samps_out);
137
139
150 UHD_API uhd_error uhd_rx_streamer_recv(uhd_rx_streamer_handle h,
151 void** buffs,
152 size_t samps_per_buff,
153 uhd_rx_metadata_handle* md,
154 double timeout,
155 bool one_packet,
156 size_t* items_recvd);
157
159
162 UHD_API uhd_error uhd_rx_streamer_issue_stream_cmd(
163 uhd_rx_streamer_handle h, const uhd_stream_cmd_t* stream_cmd);
164
166
174 UHD_API uhd_error uhd_rx_streamer_last_error(
175 uhd_rx_streamer_handle h, char* error_out, size_t strbuffer_len);
176
177/*
178 * TX Streamer
179 */
180
182
186 UHD_API uhd_error uhd_tx_streamer_make(uhd_tx_streamer_handle* h);
187
189
193 UHD_API uhd_error uhd_tx_streamer_free(uhd_tx_streamer_handle* h);
194
196 UHD_API uhd_error uhd_tx_streamer_num_channels(
197 uhd_tx_streamer_handle h, size_t* num_channels_out);
198
200 UHD_API uhd_error uhd_tx_streamer_max_num_samps(
201 uhd_tx_streamer_handle h, size_t* max_num_samps_out);
202
204
214 UHD_API uhd_error uhd_tx_streamer_send(uhd_tx_streamer_handle h,
215 const void** buffs,
216 size_t samps_per_buff,
217 uhd_tx_metadata_handle* md,
218 double timeout,
219 size_t* items_sent);
220
222
225 UHD_API uhd_error uhd_tx_streamer_recv_async_msg(
226 uhd_tx_streamer_handle h, uhd_async_metadata_handle* md, double timeout, bool* valid);
227
229
237 UHD_API uhd_error uhd_tx_streamer_last_error(
238 uhd_tx_streamer_handle h, char* error_out, size_t strbuffer_len);
239
240#ifdef __cplusplus
241}
242#endif
243
244/****************************************************************************
245 * Public Datatypes for USRP / streamer handling.
246 ***************************************************************************/
247 struct uhd_usrp;
248
250/*
251 * See uhd::usrp::multi_usrp for more details.
252 *
253 * NOTE: You must pass this handle into uhd_usrp_make before using it.
254 */
255 typedef struct uhd_usrp* uhd_usrp_handle;
256
257/****************************************************************************
258 * USRP Make / Free API calls
259 ***************************************************************************/
260#ifdef __cplusplus
261 extern "C" {
262#endif
263
265
268 UHD_API uhd_error uhd_usrp_find(const char* args, uhd_string_vector_handle* strings_out);
269
271
275 UHD_API uhd_error uhd_usrp_make(uhd_usrp_handle* h, const char* args);
276
278
282 UHD_API uhd_error uhd_usrp_free(uhd_usrp_handle* h);
283
285 UHD_API uhd_error uhd_usrp_last_error(
286 uhd_usrp_handle h, char* error_out, size_t strbuffer_len);
287
289 UHD_API uhd_error uhd_usrp_get_rx_stream(
290 uhd_usrp_handle h, uhd_stream_args_t* stream_args, uhd_rx_streamer_handle h_out);
291
293 UHD_API uhd_error uhd_usrp_get_tx_stream(
294 uhd_usrp_handle h, uhd_stream_args_t* stream_args, uhd_tx_streamer_handle h_out);
295
296/****************************************************************************
297 * multi_usrp API calls
298 ***************************************************************************/
299
301
304 UHD_API uhd_error uhd_usrp_get_rx_info(
305 uhd_usrp_handle h, size_t chan, uhd_usrp_rx_info_t* info_out);
306
308
311 UHD_API uhd_error uhd_usrp_get_tx_info(
312 uhd_usrp_handle h, size_t chan, uhd_usrp_tx_info_t* info_out);
313
314/****************************************************************************
315 * Motherboard methods
316 ***************************************************************************/
317
319
322 UHD_API uhd_error uhd_usrp_set_master_clock_rate(
323 uhd_usrp_handle h, double rate, size_t mboard);
324
326
329 UHD_API uhd_error uhd_usrp_get_master_clock_rate(
330 uhd_usrp_handle h, size_t mboard, double* clock_rate_out);
331
333
336 UHD_API uhd_error uhd_usrp_get_pp_string(
337 uhd_usrp_handle h, char* pp_string_out, size_t strbuffer_len);
338
340
343 UHD_API uhd_error uhd_usrp_get_mboard_name(
344 uhd_usrp_handle h, size_t mboard, char* mboard_name_out, size_t strbuffer_len);
345
347
350 UHD_API uhd_error uhd_usrp_get_time_now(
351 uhd_usrp_handle h, size_t mboard, int64_t* full_secs_out, double* frac_secs_out);
352
354
357 UHD_API uhd_error uhd_usrp_get_time_last_pps(
358 uhd_usrp_handle h, size_t mboard, int64_t* full_secs_out, double* frac_secs_out);
359
361
364 UHD_API uhd_error uhd_usrp_set_time_now(
365 uhd_usrp_handle h, int64_t full_secs, double frac_secs, size_t mboard);
366
368
371 UHD_API uhd_error uhd_usrp_set_time_next_pps(
372 uhd_usrp_handle h, int64_t full_secs, double frac_secs, size_t mboard);
373
375
378 UHD_API uhd_error uhd_usrp_set_time_unknown_pps(
379 uhd_usrp_handle h, int64_t full_secs, double frac_secs);
380
382 UHD_API uhd_error uhd_usrp_get_time_synchronized(uhd_usrp_handle h, bool* result_out);
383
385
388 UHD_API uhd_error uhd_usrp_set_command_time(
389 uhd_usrp_handle h, int64_t full_secs, double frac_secs, size_t mboard);
390
392 UHD_API uhd_error uhd_usrp_clear_command_time(uhd_usrp_handle h, size_t mboard);
393
395
398 UHD_API uhd_error uhd_usrp_set_time_source(
399 uhd_usrp_handle h, const char* time_source, size_t mboard);
400
402
405 UHD_API uhd_error uhd_usrp_get_time_source(
406 uhd_usrp_handle h, size_t mboard, char* time_source_out, size_t strbuffer_len);
407
409 UHD_API uhd_error uhd_usrp_get_time_sources(
410 uhd_usrp_handle h, size_t mboard, uhd_string_vector_handle* time_sources_out);
411
413
416 UHD_API uhd_error uhd_usrp_set_clock_source(
417 uhd_usrp_handle h, const char* clock_source, size_t mboard);
418
420
423 UHD_API uhd_error uhd_usrp_get_clock_source(
424 uhd_usrp_handle h, size_t mboard, char* clock_source_out, size_t strbuffer_len);
425
427 UHD_API uhd_error uhd_usrp_get_clock_sources(
428 uhd_usrp_handle h, size_t mboard, uhd_string_vector_handle* clock_sources_out);
429
431
434 UHD_API uhd_error uhd_usrp_set_clock_source_out(
435 uhd_usrp_handle h, bool enb, size_t mboard);
436
438
441 UHD_API uhd_error uhd_usrp_set_time_source_out(
442 uhd_usrp_handle h, bool enb, size_t mboard);
443
445 UHD_API uhd_error uhd_usrp_get_num_mboards(uhd_usrp_handle h, size_t* num_mboards_out);
446
448 UHD_API uhd_error uhd_usrp_get_mboard_sensor(uhd_usrp_handle h,
449 const char* name,
450 size_t mboard,
451 uhd_sensor_value_handle* sensor_value_out);
452
454 UHD_API uhd_error uhd_usrp_get_mboard_sensor_names(
455 uhd_usrp_handle h, size_t mboard, uhd_string_vector_handle* mboard_sensor_names_out);
456
458
461 UHD_API uhd_error uhd_usrp_set_user_register(
462 uhd_usrp_handle h, uint8_t addr, uint32_t data, size_t mboard);
463
464/****************************************************************************
465 * EEPROM access methods
466 ***************************************************************************/
467
469 UHD_API uhd_error uhd_usrp_get_mboard_eeprom(
470 uhd_usrp_handle h, uhd_mboard_eeprom_handle mb_eeprom, size_t mboard);
471
473 UHD_API uhd_error uhd_usrp_set_mboard_eeprom(
474 uhd_usrp_handle h, uhd_mboard_eeprom_handle mb_eeprom, size_t mboard);
475
477 UHD_API uhd_error uhd_usrp_get_dboard_eeprom(uhd_usrp_handle h,
478 uhd_dboard_eeprom_handle db_eeprom,
479 const char* unit,
480 const char* slot,
481 size_t mboard);
482
484 UHD_API uhd_error uhd_usrp_set_dboard_eeprom(uhd_usrp_handle h,
485 uhd_dboard_eeprom_handle db_eeprom,
486 const char* unit,
487 const char* slot,
488 size_t mboard);
489
490/****************************************************************************
491 * RX methods
492 ***************************************************************************/
493
495
498 UHD_API uhd_error uhd_usrp_set_rx_subdev_spec(
499 uhd_usrp_handle h, uhd_subdev_spec_handle subdev_spec, size_t mboard);
500
502 UHD_API uhd_error uhd_usrp_get_rx_subdev_spec(
503 uhd_usrp_handle h, size_t mboard, uhd_subdev_spec_handle subdev_spec_out);
504
506 UHD_API uhd_error uhd_usrp_get_rx_num_channels(
507 uhd_usrp_handle h, size_t* num_channels_out);
508
510 UHD_API uhd_error uhd_usrp_get_rx_subdev_name(
511 uhd_usrp_handle h, size_t chan, char* rx_subdev_name_out, size_t strbuffer_len);
512
514 UHD_API uhd_error uhd_usrp_set_rx_rate(uhd_usrp_handle h, double rate, size_t chan);
515
517 UHD_API uhd_error uhd_usrp_get_rx_rate(uhd_usrp_handle h, size_t chan, double* rate_out);
518
520 UHD_API uhd_error uhd_usrp_get_rx_rates(
521 uhd_usrp_handle h, size_t chan, uhd_meta_range_handle rates_out);
522
524 UHD_API uhd_error uhd_usrp_set_rx_freq(uhd_usrp_handle h,
525 uhd_tune_request_t* tune_request,
526 size_t chan,
527 uhd_tune_result_t* tune_result);
528
530 UHD_API uhd_error uhd_usrp_get_rx_freq(uhd_usrp_handle h, size_t chan, double* freq_out);
531
533
536 UHD_API uhd_error uhd_usrp_get_rx_freq_range(
537 uhd_usrp_handle h, size_t chan, uhd_meta_range_handle freq_range_out);
538
540 UHD_API uhd_error uhd_usrp_get_fe_rx_freq_range(
541 uhd_usrp_handle h, size_t chan, uhd_meta_range_handle freq_range_out);
542
544 UHD_UNUSED(static const char* UHD_USRP_ALL_LOS) = "all";
545
547/*
548 * See uhd::usrp::multi_usrp::get_rx_lo_names() for more details.
549 */
550 UHD_API uhd_error uhd_usrp_get_rx_lo_names(
551 uhd_usrp_handle h, size_t chan, uhd_string_vector_handle* rx_lo_names_out);
552
554/*
555 * See uhd::usrp::multi_usrp::set_rx_lo_source() for more details.
556 */
557 UHD_API uhd_error uhd_usrp_set_rx_lo_source(
558 uhd_usrp_handle h, const char* src, const char* name, size_t chan);
559
561 UHD_API uhd_error uhd_usrp_get_rx_lo_source(uhd_usrp_handle h,
562 const char* name,
563 size_t chan,
564 char* rx_lo_source_out,
565 size_t strbuffer_len);
566
568 UHD_API uhd_error uhd_usrp_get_rx_lo_sources(uhd_usrp_handle h,
569 const char* name,
570 size_t chan,
571 uhd_string_vector_handle* rx_lo_sources_out);
572
574/*
575 * See uhd::usrp::multi_usrp::set_rx_lo_enabled() for more details.
576 */
577 UHD_API uhd_error uhd_usrp_set_rx_lo_export_enabled(
578 uhd_usrp_handle h, bool enabled, const char* name, size_t chan);
579
581 UHD_API uhd_error uhd_usrp_get_rx_lo_export_enabled(
582 uhd_usrp_handle h, const char* name, size_t chan, bool* result_out);
583
585 UHD_API uhd_error uhd_usrp_set_rx_lo_freq(uhd_usrp_handle h,
586 double freq,
587 const char* name,
588 size_t chan,
589 double* coerced_freq_out);
590
592 UHD_API uhd_error uhd_usrp_get_rx_lo_freq(
593 uhd_usrp_handle h, const char* name, size_t chan, double* rx_lo_freq_out);
594
596 UHD_API uhd_error uhd_usrp_set_rx_gain(
597 uhd_usrp_handle h, double gain, size_t chan, const char* gain_name);
598
600
603 UHD_API uhd_error uhd_usrp_set_normalized_rx_gain(
604 uhd_usrp_handle h, double gain, size_t chan);
605
607
610 UHD_API uhd_error uhd_usrp_set_rx_agc(uhd_usrp_handle h, bool enable, size_t chan);
611
613 UHD_API uhd_error uhd_usrp_get_rx_gain(
614 uhd_usrp_handle h, size_t chan, const char* gain_name, double* gain_out);
615
617
620 UHD_API uhd_error uhd_usrp_get_normalized_rx_gain(
621 uhd_usrp_handle h, size_t chan, double* gain_out);
622
624 UHD_API uhd_error uhd_usrp_get_rx_gain_range(uhd_usrp_handle h,
625 const char* name,
626 size_t chan,
627 uhd_meta_range_handle gain_range_out);
628
630 UHD_API uhd_error uhd_usrp_get_rx_gain_names(
631 uhd_usrp_handle h, size_t chan, uhd_string_vector_handle* gain_names_out);
632
634 UHD_API uhd_error uhd_usrp_set_rx_antenna(
635 uhd_usrp_handle h, const char* ant, size_t chan);
636
638 UHD_API uhd_error uhd_usrp_get_rx_antenna(
639 uhd_usrp_handle h, size_t chan, char* ant_out, size_t strbuffer_len);
640
642 UHD_API uhd_error uhd_usrp_get_rx_antennas(
643 uhd_usrp_handle h, size_t chan, uhd_string_vector_handle* antennas_out);
644
646 UHD_API uhd_error uhd_usrp_get_rx_sensor_names(
647 uhd_usrp_handle h, size_t chan, uhd_string_vector_handle* sensor_names_out);
648
650 UHD_API uhd_error uhd_usrp_set_rx_bandwidth(
651 uhd_usrp_handle h, double bandwidth, size_t chan);
652
654 UHD_API uhd_error uhd_usrp_get_rx_bandwidth(
655 uhd_usrp_handle h, size_t chan, double* bandwidth_out);
656
658 UHD_API uhd_error uhd_usrp_get_rx_bandwidth_range(
659 uhd_usrp_handle h, size_t chan, uhd_meta_range_handle bandwidth_range_out);
660
662 UHD_API uhd_error uhd_usrp_get_rx_sensor(uhd_usrp_handle h,
663 const char* name,
664 size_t chan,
665 uhd_sensor_value_handle* sensor_value_out);
666
668
671 UHD_API uhd_error uhd_usrp_set_rx_dc_offset_enabled(
672 uhd_usrp_handle h, bool enb, size_t chan);
673
675 UHD_API uhd_error uhd_usrp_set_rx_iq_balance_enabled(
676 uhd_usrp_handle h, bool enb, size_t chan);
677
678/****************************************************************************
679 * TX methods
680 ***************************************************************************/
681
683
686 UHD_API uhd_error uhd_usrp_set_tx_subdev_spec(
687 uhd_usrp_handle h, uhd_subdev_spec_handle subdev_spec, size_t mboard);
688
690 UHD_API uhd_error uhd_usrp_get_tx_subdev_spec(
691 uhd_usrp_handle h, size_t mboard, uhd_subdev_spec_handle subdev_spec_out);
692
694 UHD_API uhd_error uhd_usrp_get_tx_num_channels(
695 uhd_usrp_handle h, size_t* num_channels_out);
696
698 UHD_API uhd_error uhd_usrp_get_tx_subdev_name(
699 uhd_usrp_handle h, size_t chan, char* tx_subdev_name_out, size_t strbuffer_len);
700
702 UHD_API uhd_error uhd_usrp_set_tx_rate(uhd_usrp_handle h, double rate, size_t chan);
703
705 UHD_API uhd_error uhd_usrp_get_tx_rate(uhd_usrp_handle h, size_t chan, double* rate_out);
706
708 UHD_API uhd_error uhd_usrp_get_tx_rates(
709 uhd_usrp_handle h, size_t chan, uhd_meta_range_handle rates_out);
710
712 UHD_API uhd_error uhd_usrp_set_tx_freq(uhd_usrp_handle h,
713 uhd_tune_request_t* tune_request,
714 size_t chan,
715 uhd_tune_result_t* tune_result);
716
718 UHD_API uhd_error uhd_usrp_get_tx_freq(uhd_usrp_handle h, size_t chan, double* freq_out);
719
721
724 UHD_API uhd_error uhd_usrp_get_tx_freq_range(
725 uhd_usrp_handle h, size_t chan, uhd_meta_range_handle freq_range_out);
726
728 UHD_API uhd_error uhd_usrp_get_fe_tx_freq_range(
729 uhd_usrp_handle h, size_t chan, uhd_meta_range_handle freq_range_out);
730
732/*
733 * See uhd::usrp::multi_usrp::get_tx_lo_names() for more details.
734 */
735 UHD_API uhd_error uhd_usrp_get_tx_lo_names(
736 uhd_usrp_handle h, size_t chan, uhd_string_vector_handle* tx_lo_names_out);
737
739/*
740 * See uhd::usrp::multi_usrp::set_tx_lo_source() for more details.
741 */
742 UHD_API uhd_error uhd_usrp_set_tx_lo_source(
743 uhd_usrp_handle h, const char* src, const char* name, size_t chan);
744
746 UHD_API uhd_error uhd_usrp_get_tx_lo_source(uhd_usrp_handle h,
747 const char* name,
748 size_t chan,
749 char* tx_lo_source_out,
750 size_t strbuffer_len);
751
753 UHD_API uhd_error uhd_usrp_get_tx_lo_sources(uhd_usrp_handle h,
754 const char* name,
755 size_t chan,
756 uhd_string_vector_handle* tx_lo_sources_out);
757
759/*
760 * See uhd::usrp::multi_usrp::set_tx_lo_enabled() for more details.
761 */
762 UHD_API uhd_error uhd_usrp_set_tx_lo_export_enabled(
763 uhd_usrp_handle h, bool enabled, const char* name, size_t chan);
764
766 UHD_API uhd_error uhd_usrp_get_tx_lo_export_enabled(
767 uhd_usrp_handle h, const char* name, size_t chan, bool* result_out);
768
770 UHD_API uhd_error uhd_usrp_set_tx_lo_freq(uhd_usrp_handle h,
771 double freq,
772 const char* name,
773 size_t chan,
774 double* coerced_freq_out);
775
777 UHD_API uhd_error uhd_usrp_get_tx_lo_freq(
778 uhd_usrp_handle h, const char* name, size_t chan, double* tx_lo_freq_out);
779
781 UHD_API uhd_error uhd_usrp_set_tx_gain(
782 uhd_usrp_handle h, double gain, size_t chan, const char* gain_name);
783
785
788 UHD_API uhd_error uhd_usrp_set_normalized_tx_gain(
789 uhd_usrp_handle h, double gain, size_t chan);
790
792 UHD_API uhd_error uhd_usrp_get_tx_gain_range(uhd_usrp_handle h,
793 const char* name,
794 size_t chan,
795 uhd_meta_range_handle gain_range_out);
796
798 UHD_API uhd_error uhd_usrp_get_tx_gain(
799 uhd_usrp_handle h, size_t chan, const char* gain_name, double* gain_out);
800
802
805 UHD_API uhd_error uhd_usrp_get_normalized_tx_gain(
806 uhd_usrp_handle h, size_t chan, double* gain_out);
807
809 UHD_API uhd_error uhd_usrp_get_tx_gain_names(
810 uhd_usrp_handle h, size_t chan, uhd_string_vector_handle* gain_names_out);
811
813 UHD_API uhd_error uhd_usrp_set_tx_antenna(
814 uhd_usrp_handle h, const char* ant, size_t chan);
815
817 UHD_API uhd_error uhd_usrp_get_tx_antenna(
818 uhd_usrp_handle h, size_t chan, char* ant_out, size_t strbuffer_len);
819
821 UHD_API uhd_error uhd_usrp_get_tx_antennas(
822 uhd_usrp_handle h, size_t chan, uhd_string_vector_handle* antennas_out);
823
825 UHD_API uhd_error uhd_usrp_set_tx_bandwidth(
826 uhd_usrp_handle h, double bandwidth, size_t chan);
827
829 UHD_API uhd_error uhd_usrp_get_tx_bandwidth(
830 uhd_usrp_handle h, size_t chan, double* bandwidth_out);
831
833 UHD_API uhd_error uhd_usrp_get_tx_bandwidth_range(
834 uhd_usrp_handle h, size_t chan, uhd_meta_range_handle bandwidth_range_out);
835
837 UHD_API uhd_error uhd_usrp_get_tx_sensor(uhd_usrp_handle h,
838 const char* name,
839 size_t chan,
840 uhd_sensor_value_handle* sensor_value_out);
841
843 UHD_API uhd_error uhd_usrp_get_tx_sensor_names(
844 uhd_usrp_handle h, size_t chan, uhd_string_vector_handle* sensor_names_out);
845
846/****************************************************************************
847 * GPIO methods
848 ***************************************************************************/
849
851 UHD_API uhd_error uhd_usrp_get_gpio_banks(
852 uhd_usrp_handle h, size_t mboard, uhd_string_vector_handle* gpio_banks_out);
853
855
858 UHD_API uhd_error uhd_usrp_set_gpio_attr(uhd_usrp_handle h,
859 const char* bank,
860 const char* attr,
861 uint32_t value,
862 uint32_t mask,
863 size_t mboard);
864
866
869 UHD_API uhd_error uhd_usrp_get_gpio_attr(uhd_usrp_handle h,
870 const char* bank,
871 const char* attr,
872 size_t mboard,
873 uint32_t* attr_out);
874
875#ifdef __cplusplus
876}
877#endif
config.h
UHD_UNUSED
#define UHD_UNUSED(x)
Definition config.h:68
UHD_API
#define UHD_API
Definition config.h:87
dboard_eeprom.h
uhd_dboard_eeprom_handle
struct uhd_dboard_eeprom_t * uhd_dboard_eeprom_handle
A C-level interface for interacting with a daughterboard EEPROM.
Definition dboard_eeprom.h:35
error.h
uhd_error
uhd_error
UHD error codes.
Definition error.h:20
mboard_eeprom.h
uhd_mboard_eeprom_handle
struct uhd_mboard_eeprom_t * uhd_mboard_eeprom_handle
A C-level interface for interacting with a USRP motherboard's EEPROM.
Definition mboard_eeprom.h:35
metadata.h
uhd_rx_metadata_handle
struct uhd_rx_metadata_t * uhd_rx_metadata_handle
RX metadata interface for describing sent IF data.
Definition metadata.h:54
uhd_tx_metadata_handle
struct uhd_tx_metadata_t * uhd_tx_metadata_handle
TX metadata interface for describing received IF data.
Definition metadata.h:63
uhd_async_metadata_handle
struct uhd_async_metadata_t * uhd_async_metadata_handle
Interface for describing transmit-related events.
Definition metadata.h:72
ranges.h
uhd_meta_range_handle
struct uhd_meta_range_t * uhd_meta_range_handle
C-level interface for dealing with a list of ranges.
Definition ranges.h:46
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_handle
uhd_string_vector_t * uhd_string_vector_handle
Definition string_vector.h:33
uhd_stream_args_t
A struct of parameters to construct a stream.
Definition usrp.h:47
uhd_stream_args_t::otw_format
char * otw_format
Over-the-wire format.
Definition usrp.h:51
uhd_stream_args_t::cpu_format
char * cpu_format
Format of host memory.
Definition usrp.h:49
uhd_stream_args_t::n_channels
int n_channels
Number of channels.
Definition usrp.h:57
uhd_stream_args_t::channel_list
size_t * channel_list
Array that lists channels.
Definition usrp.h:55
uhd_stream_args_t::args
char * args
Other stream args.
Definition usrp.h:53
uhd_stream_cmd_t
Define how device streams to host.
Definition usrp.h:80
uhd_stream_cmd_t::stream_now
bool stream_now
Stream now?
Definition usrp.h:86
uhd_stream_cmd_t::time_spec_full_secs
int64_t time_spec_full_secs
If not now, then full seconds into future to stream.
Definition usrp.h:88
uhd_stream_cmd_t::stream_mode
uhd_stream_mode_t stream_mode
How streaming is issued to the device.
Definition usrp.h:82
uhd_stream_cmd_t::time_spec_frac_secs
double time_spec_frac_secs
If not now, then fractional seconds into future to stream.
Definition usrp.h:90
uhd_stream_cmd_t::num_samps
size_t num_samps
Number of samples.
Definition usrp.h:84
uhd_tune_request_t
Instructs implementation how to tune the RF chain.
Definition tune_request.h:29
uhd_tune_result_t
Stores RF and DSP tuned frequencies.
Definition tune_result.h:19
uhd_usrp_register_info_t
Register info.
Definition usrp.h:32
uhd_usrp_register_info_t::writable
bool writable
Definition usrp.h:35
uhd_usrp_register_info_t::bitwidth
size_t bitwidth
Definition usrp.h:33
uhd_usrp_register_info_t::readable
bool readable
Definition usrp.h:34
uhd_usrp_rx_info_t
USRP RX info.
Definition usrp_info.h:18
uhd_usrp_tx_info_t
USRP TX info.
Definition usrp_info.h:42
subdev_spec.h
uhd_subdev_spec_handle
struct uhd_subdev_spec_t * uhd_subdev_spec_handle
A C-level interface for working with a list of subdevice specifications.
Definition subdev_spec.h:46
tune_request.h
tune_result.h
uhd_usrp_free
UHD_API uhd_error uhd_usrp_free(uhd_usrp_handle *h)
Safely destroy the USRP object underlying the handle.
uhd_usrp_get_tx_lo_sources
UHD_API uhd_error uhd_usrp_get_tx_lo_sources(uhd_usrp_handle h, const char *name, size_t chan, uhd_string_vector_handle *tx_lo_sources_out)
Get a list of possible LO sources.
uhd_usrp_set_time_next_pps
UHD_API uhd_error uhd_usrp_set_time_next_pps(uhd_usrp_handle h, int64_t full_secs, double frac_secs, size_t mboard)
Set the USRP device's time to the given value upon the next PPS detection.
uhd_usrp_get_tx_info
UHD_API uhd_error uhd_usrp_get_tx_info(uhd_usrp_handle h, size_t chan, uhd_usrp_tx_info_t *info_out)
Get TX info from the USRP device.
uhd_rx_streamer_handle
struct uhd_rx_streamer * uhd_rx_streamer_handle
C-level interface for working with an RX streamer.
Definition usrp.h:100
uhd_usrp_get_time_source
UHD_API uhd_error uhd_usrp_get_time_source(uhd_usrp_handle h, size_t mboard, char *time_source_out, size_t strbuffer_len)
Get the time source for the given device.
uhd_usrp_get_tx_gain_range
UHD_API uhd_error uhd_usrp_get_tx_gain_range(uhd_usrp_handle h, const char *name, size_t chan, uhd_meta_range_handle gain_range_out)
Get all possible gain ranges for the given channel and name.
uhd_rx_streamer_max_num_samps
UHD_API uhd_error uhd_rx_streamer_max_num_samps(uhd_rx_streamer_handle h, size_t *max_num_samps_out)
Get the max number of samples per buffer per packet.
uhd_usrp_get_normalized_rx_gain
UHD_API uhd_error uhd_usrp_get_normalized_rx_gain(uhd_usrp_handle h, size_t chan, double *gain_out)
Get the given channel's normalized RX gain [0.0, 1.0].
uhd_usrp_set_tx_freq
UHD_API uhd_error uhd_usrp_set_tx_freq(uhd_usrp_handle h, uhd_tune_request_t *tune_request, size_t chan, uhd_tune_result_t *tune_result)
Set the given channel's center TX frequency.
uhd_usrp_get_mboard_sensor_names
UHD_API uhd_error uhd_usrp_get_mboard_sensor_names(uhd_usrp_handle h, size_t mboard, uhd_string_vector_handle *mboard_sensor_names_out)
Get a list of motherboard sensors for the given device.
uhd_usrp_set_rx_agc
UHD_API uhd_error uhd_usrp_set_rx_agc(uhd_usrp_handle h, bool enable, size_t chan)
Enable or disable the given channel's RX AGC module.
uhd_usrp_make
UHD_API uhd_error uhd_usrp_make(uhd_usrp_handle *h, const char *args)
Create a USRP handle.
uhd_tx_streamer_recv_async_msg
UHD_API uhd_error uhd_tx_streamer_recv_async_msg(uhd_tx_streamer_handle h, uhd_async_metadata_handle *md, double timeout, bool *valid)
Receive an asynchronous message from this streamer.
uhd_usrp_set_command_time
UHD_API uhd_error uhd_usrp_set_command_time(uhd_usrp_handle h, int64_t full_secs, double frac_secs, size_t mboard)
Set the time at which timed commands will take place.
uhd_usrp_set_tx_subdev_spec
UHD_API uhd_error uhd_usrp_set_tx_subdev_spec(uhd_usrp_handle h, uhd_subdev_spec_handle subdev_spec, size_t mboard)
Map the given device's TX frontend to a channel.
uhd_usrp_get_tx_bandwidth
UHD_API uhd_error uhd_usrp_get_tx_bandwidth(uhd_usrp_handle h, size_t chan, double *bandwidth_out)
Get the bandwidth for the given channel's TX frontend.
uhd_usrp_get_dboard_eeprom
UHD_API uhd_error uhd_usrp_get_dboard_eeprom(uhd_usrp_handle h, uhd_dboard_eeprom_handle db_eeprom, const char *unit, const char *slot, size_t mboard)
Get a handle for the given device's daughterboard EEPROM.
uhd_usrp_set_tx_lo_export_enabled
UHD_API uhd_error uhd_usrp_set_tx_lo_export_enabled(uhd_usrp_handle h, bool enabled, const char *name, size_t chan)
Set whether the LO used by the USRP device is exported.
uhd_usrp_get_mboard_name
UHD_API uhd_error uhd_usrp_get_mboard_name(uhd_usrp_handle h, size_t mboard, char *mboard_name_out, size_t strbuffer_len)
Get the motherboard name for the given device.
uhd_rx_streamer_free
UHD_API uhd_error uhd_rx_streamer_free(uhd_rx_streamer_handle *h)
Free an RX streamer handle.
uhd_usrp_get_rx_info
UHD_API uhd_error uhd_usrp_get_rx_info(uhd_usrp_handle h, size_t chan, uhd_usrp_rx_info_t *info_out)
Get RX info from the USRP device.
uhd_usrp_set_rx_gain
UHD_API uhd_error uhd_usrp_set_rx_gain(uhd_usrp_handle h, double gain, size_t chan, const char *gain_name)
Set the RX gain for the given channel and name.
uhd_usrp_get_clock_source
UHD_API uhd_error uhd_usrp_get_clock_source(uhd_usrp_handle h, size_t mboard, char *clock_source_out, size_t strbuffer_len)
Get the given device's clock source.
uhd_usrp_get_gpio_banks
UHD_API uhd_error uhd_usrp_get_gpio_banks(uhd_usrp_handle h, size_t mboard, uhd_string_vector_handle *gpio_banks_out)
Get a list of GPIO banks associated with the given channels.
uhd_usrp_set_rx_rate
UHD_API uhd_error uhd_usrp_set_rx_rate(uhd_usrp_handle h, double rate, size_t chan)
Set the given RX channel's sample rate (in Sps).
uhd_usrp_set_gpio_attr
UHD_API uhd_error uhd_usrp_set_gpio_attr(uhd_usrp_handle h, const char *bank, const char *attr, uint32_t value, uint32_t mask, size_t mboard)
Set a GPIO attribute for a given GPIO bank.
uhd_usrp_get_tx_subdev_name
UHD_API uhd_error uhd_usrp_get_tx_subdev_name(uhd_usrp_handle h, size_t chan, char *tx_subdev_name_out, size_t strbuffer_len)
Get the name for the RX frontend.
uhd_usrp_get_rx_lo_names
UHD_API uhd_error uhd_usrp_get_rx_lo_names(uhd_usrp_handle h, size_t chan, uhd_string_vector_handle *rx_lo_names_out)
Get a list of possible LO stage names.
uhd_tx_streamer_handle
struct uhd_tx_streamer * uhd_tx_streamer_handle
C-level interface for working with a TX streamer.
Definition usrp.h:106
uhd_usrp_get_rx_lo_source
UHD_API uhd_error uhd_usrp_get_rx_lo_source(uhd_usrp_handle h, const char *name, size_t chan, char *rx_lo_source_out, size_t strbuffer_len)
Get the currently set LO source.
uhd_usrp_get_rx_gain
UHD_API uhd_error uhd_usrp_get_rx_gain(uhd_usrp_handle h, size_t chan, const char *gain_name, double *gain_out)
Get the given channel's RX gain.
uhd_usrp_get_tx_antennas
UHD_API uhd_error uhd_usrp_get_tx_antennas(uhd_usrp_handle h, size_t chan, uhd_string_vector_handle *antennas_out)
Get a list of tx antennas associated with the given channels.
uhd_rx_streamer_last_error
UHD_API uhd_error uhd_rx_streamer_last_error(uhd_rx_streamer_handle h, char *error_out, size_t strbuffer_len)
Get the last error reported by the RX streamer.
uhd_rx_streamer_num_channels
UHD_API uhd_error uhd_rx_streamer_num_channels(uhd_rx_streamer_handle h, size_t *num_channels_out)
Get the number of channels associated with this streamer.
uhd_usrp_clear_command_time
UHD_API uhd_error uhd_usrp_clear_command_time(uhd_usrp_handle h, size_t mboard)
Clear the command time so that commands are sent ASAP.
uhd_usrp_set_rx_lo_export_enabled
UHD_API uhd_error uhd_usrp_set_rx_lo_export_enabled(uhd_usrp_handle h, bool enabled, const char *name, size_t chan)
Set whether the LO used by the USRP device is exported.
uhd_usrp_get_tx_lo_names
UHD_API uhd_error uhd_usrp_get_tx_lo_names(uhd_usrp_handle h, size_t chan, uhd_string_vector_handle *tx_lo_names_out)
Get a list of possible LO stage names.
uhd_usrp_get_rx_bandwidth
UHD_API uhd_error uhd_usrp_get_rx_bandwidth(uhd_usrp_handle h, size_t chan, double *bandwidth_out)
Get the bandwidth for the given channel's RX frontend.
uhd_stream_mode_t
uhd_stream_mode_t
How streaming is issued to the device.
Definition usrp.h:64
UHD_STREAM_MODE_NUM_SAMPS_AND_DONE
@ UHD_STREAM_MODE_NUM_SAMPS_AND_DONE
Stream some number of samples and finish.
Definition usrp.h:70
UHD_STREAM_MODE_START_CONTINUOUS
@ UHD_STREAM_MODE_START_CONTINUOUS
Stream samples indefinitely.
Definition usrp.h:66
UHD_STREAM_MODE_NUM_SAMPS_AND_MORE
@ UHD_STREAM_MODE_NUM_SAMPS_AND_MORE
Stream some number of samples but expect more.
Definition usrp.h:72
UHD_STREAM_MODE_STOP_CONTINUOUS
@ UHD_STREAM_MODE_STOP_CONTINUOUS
End continuous streaming.
Definition usrp.h:68
uhd_usrp_set_rx_bandwidth
UHD_API uhd_error uhd_usrp_set_rx_bandwidth(uhd_usrp_handle h, double bandwidth, size_t chan)
Set the bandwidth for the given channel's RX frontend.
uhd_usrp_get_tx_gain_names
UHD_API uhd_error uhd_usrp_get_tx_gain_names(uhd_usrp_handle h, size_t chan, uhd_string_vector_handle *gain_names_out)
Get a list of TX gain names for the given channel.
uhd_usrp_get_rx_freq_range
UHD_API uhd_error uhd_usrp_get_rx_freq_range(uhd_usrp_handle h, size_t chan, uhd_meta_range_handle freq_range_out)
Get all possible center frequency ranges for the given channel.
uhd_usrp_get_rx_lo_sources
UHD_API uhd_error uhd_usrp_get_rx_lo_sources(uhd_usrp_handle h, const char *name, size_t chan, uhd_string_vector_handle *rx_lo_sources_out)
Get a list of possible LO sources.
uhd_usrp_set_rx_freq
UHD_API uhd_error uhd_usrp_set_rx_freq(uhd_usrp_handle h, uhd_tune_request_t *tune_request, size_t chan, uhd_tune_result_t *tune_result)
Set the given channel's center RX frequency.
uhd_usrp_get_rx_gain_range
UHD_API uhd_error uhd_usrp_get_rx_gain_range(uhd_usrp_handle h, const char *name, size_t chan, uhd_meta_range_handle gain_range_out)
Get all possible gain ranges for the given channel and name.
uhd_usrp_set_master_clock_rate
UHD_API uhd_error uhd_usrp_set_master_clock_rate(uhd_usrp_handle h, double rate, size_t mboard)
Set the master clock rate.
uhd_usrp_get_rx_antennas
UHD_API uhd_error uhd_usrp_get_rx_antennas(uhd_usrp_handle h, size_t chan, uhd_string_vector_handle *antennas_out)
Get a list of RX antennas associated with the given channels.
uhd_usrp_get_tx_lo_export_enabled
UHD_API uhd_error uhd_usrp_get_tx_lo_export_enabled(uhd_usrp_handle h, const char *name, size_t chan, bool *result_out)
Returns true if the currently selected LO is being exported.
uhd_usrp_get_master_clock_rate
UHD_API uhd_error uhd_usrp_get_master_clock_rate(uhd_usrp_handle h, size_t mboard, double *clock_rate_out)
Get the master clock rate.
uhd_usrp_get_tx_freq
UHD_API uhd_error uhd_usrp_get_tx_freq(uhd_usrp_handle h, size_t chan, double *freq_out)
Get the given channel's center TX frequency.
uhd_usrp_get_tx_sensor
UHD_API uhd_error uhd_usrp_get_tx_sensor(uhd_usrp_handle h, const char *name, size_t chan, uhd_sensor_value_handle *sensor_value_out)
Get the value for the given TX sensor.
uhd_rx_streamer_make
UHD_API uhd_error uhd_rx_streamer_make(uhd_rx_streamer_handle *h)
Create an RX streamer handle.
uhd_tx_streamer_last_error
UHD_API uhd_error uhd_tx_streamer_last_error(uhd_tx_streamer_handle h, char *error_out, size_t strbuffer_len)
Get the last error reported by the TX streamer.
uhd_usrp_get_tx_lo_freq
UHD_API uhd_error uhd_usrp_get_tx_lo_freq(uhd_usrp_handle h, const char *name, size_t chan, double *tx_lo_freq_out)
Get the current Tx LO frequency.
uhd_tx_streamer_make
UHD_API uhd_error uhd_tx_streamer_make(uhd_tx_streamer_handle *h)
Create an TX streamer handle.
uhd_usrp_get_tx_stream
UHD_API uhd_error uhd_usrp_get_tx_stream(uhd_usrp_handle h, uhd_stream_args_t *stream_args, uhd_tx_streamer_handle h_out)
Create TX streamer from a USRP handle and given stream args.
uhd_usrp_get_fe_tx_freq_range
UHD_API uhd_error uhd_usrp_get_fe_tx_freq_range(uhd_usrp_handle h, size_t chan, uhd_meta_range_handle freq_range_out)
Get all possible RF frequency ranges for the given channel's TX RF frontend.
uhd_usrp_get_tx_num_channels
UHD_API uhd_error uhd_usrp_get_tx_num_channels(uhd_usrp_handle h, size_t *num_channels_out)
Get the number of TX channels for the given handle.
uhd_usrp_get_rx_subdev_name
UHD_API uhd_error uhd_usrp_get_rx_subdev_name(uhd_usrp_handle h, size_t chan, char *rx_subdev_name_out, size_t strbuffer_len)
Get the name for the RX frontend.
uhd_usrp_get_rx_gain_names
UHD_API uhd_error uhd_usrp_get_rx_gain_names(uhd_usrp_handle h, size_t chan, uhd_string_vector_handle *gain_names_out)
Get a list of RX gain names for the given channel.
uhd_usrp_set_tx_antenna
UHD_API uhd_error uhd_usrp_set_tx_antenna(uhd_usrp_handle h, const char *ant, size_t chan)
Set the TX antenna for the given channel.
uhd_usrp_get_mboard_eeprom
UHD_API uhd_error uhd_usrp_get_mboard_eeprom(uhd_usrp_handle h, uhd_mboard_eeprom_handle mb_eeprom, size_t mboard)
Get a handle for the given motherboard's EEPROM.
uhd_usrp_set_time_source_out
UHD_API uhd_error uhd_usrp_set_time_source_out(uhd_usrp_handle h, bool enb, size_t mboard)
Enable or disable sending the time source to an output connector.
uhd_usrp_get_tx_rate
UHD_API uhd_error uhd_usrp_get_tx_rate(uhd_usrp_handle h, size_t chan, double *rate_out)
Get the given RX channel's sample rate (in Sps).
uhd_usrp_get_rx_sensor
UHD_API uhd_error uhd_usrp_get_rx_sensor(uhd_usrp_handle h, const char *name, size_t chan, uhd_sensor_value_handle *sensor_value_out)
Get the value for the given RX sensor.
uhd_usrp_set_rx_dc_offset_enabled
UHD_API uhd_error uhd_usrp_set_rx_dc_offset_enabled(uhd_usrp_handle h, bool enb, size_t chan)
Enable or disable RX DC offset correction for the given channel.
uhd_usrp_last_error
UHD_API uhd_error uhd_usrp_last_error(uhd_usrp_handle h, char *error_out, size_t strbuffer_len)
Get the last error reported by the USRP handle.
uhd_usrp_get_tx_bandwidth_range
UHD_API uhd_error uhd_usrp_get_tx_bandwidth_range(uhd_usrp_handle h, size_t chan, uhd_meta_range_handle bandwidth_range_out)
Get all possible bandwidth ranges for the given channel's TX frontend.
uhd_usrp_set_clock_source_out
UHD_API uhd_error uhd_usrp_set_clock_source_out(uhd_usrp_handle h, bool enb, size_t mboard)
Enable or disable sending the clock source to an output connector.
uhd_usrp_get_tx_lo_source
UHD_API uhd_error uhd_usrp_get_tx_lo_source(uhd_usrp_handle h, const char *name, size_t chan, char *tx_lo_source_out, size_t strbuffer_len)
Get the currently set LO source.
uhd_rx_streamer_issue_stream_cmd
UHD_API uhd_error uhd_rx_streamer_issue_stream_cmd(uhd_rx_streamer_handle h, const uhd_stream_cmd_t *stream_cmd)
Issue the given stream command.
uhd_tx_streamer_free
UHD_API uhd_error uhd_tx_streamer_free(uhd_tx_streamer_handle *h)
Free an TX streamer handle.
uhd_usrp_handle
struct uhd_usrp * uhd_usrp_handle
C-level interface for working with a USRP device.
Definition usrp.h:255
uhd_usrp_get_normalized_tx_gain
UHD_API uhd_error uhd_usrp_get_normalized_tx_gain(uhd_usrp_handle h, size_t chan, double *gain_out)
Get the given channel's normalized TX gain [0.0, 1.0].
uhd_usrp_set_rx_iq_balance_enabled
UHD_API uhd_error uhd_usrp_set_rx_iq_balance_enabled(uhd_usrp_handle h, bool enb, size_t chan)
Enable or disable RX IQ imbalance correction for the given channel.
uhd_usrp_get_tx_antenna
UHD_API uhd_error uhd_usrp_get_tx_antenna(uhd_usrp_handle h, size_t chan, char *ant_out, size_t strbuffer_len)
Get the TX antenna for the given channel.
uhd_usrp_get_num_mboards
UHD_API uhd_error uhd_usrp_get_num_mboards(uhd_usrp_handle h, size_t *num_mboards_out)
Get the number of devices associated with the given USRP handle.
uhd_rx_streamer_recv
UHD_API uhd_error uhd_rx_streamer_recv(uhd_rx_streamer_handle h, void **buffs, size_t samps_per_buff, uhd_rx_metadata_handle *md, double timeout, bool one_packet, size_t *items_recvd)
Receive buffers containing samples into the given RX streamer.
uhd_usrp_get_rx_stream
UHD_API uhd_error uhd_usrp_get_rx_stream(uhd_usrp_handle h, uhd_stream_args_t *stream_args, uhd_rx_streamer_handle h_out)
Create RX streamer from a USRP handle and given stream args.
uhd_usrp_get_tx_freq_range
UHD_API uhd_error uhd_usrp_get_tx_freq_range(uhd_usrp_handle h, size_t chan, uhd_meta_range_handle freq_range_out)
Get all possible center frequency ranges for the given channel.
uhd_tx_streamer_max_num_samps
UHD_API uhd_error uhd_tx_streamer_max_num_samps(uhd_tx_streamer_handle h, size_t *max_num_samps_out)
Get the max number of samples per buffer per packet.
uhd_usrp_get_rx_rate
UHD_API uhd_error uhd_usrp_get_rx_rate(uhd_usrp_handle h, size_t chan, double *rate_out)
Get the given RX channel's sample rate (in Sps).
uhd_usrp_get_rx_sensor_names
UHD_API uhd_error uhd_usrp_get_rx_sensor_names(uhd_usrp_handle h, size_t chan, uhd_string_vector_handle *sensor_names_out)
Get a list of RX sensors associated with the given channels.
uhd_usrp_set_time_now
UHD_API uhd_error uhd_usrp_set_time_now(uhd_usrp_handle h, int64_t full_secs, double frac_secs, size_t mboard)
Set the USRP device's time.
uhd_usrp_get_rx_rates
UHD_API uhd_error uhd_usrp_get_rx_rates(uhd_usrp_handle h, size_t chan, uhd_meta_range_handle rates_out)
Get a range of possible RX rates for the given channel.
uhd_usrp_set_clock_source
UHD_API uhd_error uhd_usrp_set_clock_source(uhd_usrp_handle h, const char *clock_source, size_t mboard)
Set the given device's clock source.
uhd_usrp_get_time_synchronized
UHD_API uhd_error uhd_usrp_get_time_synchronized(uhd_usrp_handle h, bool *result_out)
Are all motherboard times synchronized?
uhd_usrp_get_time_last_pps
UHD_API uhd_error uhd_usrp_get_time_last_pps(uhd_usrp_handle h, size_t mboard, int64_t *full_secs_out, double *frac_secs_out)
Get the time when this device's last PPS pulse occurred.
uhd_usrp_get_time_now
UHD_API uhd_error uhd_usrp_get_time_now(uhd_usrp_handle h, size_t mboard, int64_t *full_secs_out, double *frac_secs_out)
Get the USRP device's current internal time.
uhd_usrp_get_rx_antenna
UHD_API uhd_error uhd_usrp_get_rx_antenna(uhd_usrp_handle h, size_t chan, char *ant_out, size_t strbuffer_len)
Get the RX antenna for the given channel.
uhd_usrp_get_rx_num_channels
UHD_API uhd_error uhd_usrp_get_rx_num_channels(uhd_usrp_handle h, size_t *num_channels_out)
Get the number of RX channels for the given handle.
uhd_usrp_get_pp_string
UHD_API uhd_error uhd_usrp_get_pp_string(uhd_usrp_handle h, char *pp_string_out, size_t strbuffer_len)
Get a pretty-print representation of the USRP device.
uhd_usrp_set_user_register
UHD_API uhd_error uhd_usrp_set_user_register(uhd_usrp_handle h, uint8_t addr, uint32_t data, size_t mboard)
Perform a write on a user configuration register bus.
uhd_usrp_set_tx_gain
UHD_API uhd_error uhd_usrp_set_tx_gain(uhd_usrp_handle h, double gain, size_t chan, const char *gain_name)
Set the TX gain for the given channel and name.
uhd_tx_streamer_num_channels
UHD_API uhd_error uhd_tx_streamer_num_channels(uhd_tx_streamer_handle h, size_t *num_channels_out)
Get the number of channels associated with this streamer.
uhd_usrp_set_rx_antenna
UHD_API uhd_error uhd_usrp_set_rx_antenna(uhd_usrp_handle h, const char *ant, size_t chan)
Set the RX antenna for the given channel.
uhd_usrp_get_rx_lo_export_enabled
UHD_API uhd_error uhd_usrp_get_rx_lo_export_enabled(uhd_usrp_handle h, const char *name, size_t chan, bool *result_out)
Returns true if the currently selected LO is being exported.
uhd_usrp_set_mboard_eeprom
UHD_API uhd_error uhd_usrp_set_mboard_eeprom(uhd_usrp_handle h, uhd_mboard_eeprom_handle mb_eeprom, size_t mboard)
Set values in the given motherboard's EEPROM.
uhd_usrp_get_clock_sources
UHD_API uhd_error uhd_usrp_get_clock_sources(uhd_usrp_handle h, size_t mboard, uhd_string_vector_handle *clock_sources_out)
Get a list of clock sources for the given device.
uhd_usrp_set_normalized_rx_gain
UHD_API uhd_error uhd_usrp_set_normalized_rx_gain(uhd_usrp_handle h, double gain, size_t chan)
Set the normalized RX gain [0.0, 1.0] for the given channel.
uhd_usrp_find
UHD_API uhd_error uhd_usrp_find(const char *args, uhd_string_vector_handle *strings_out)
Find all connected USRP devices.
uhd_usrp_get_rx_subdev_spec
UHD_API uhd_error uhd_usrp_get_rx_subdev_spec(uhd_usrp_handle h, size_t mboard, uhd_subdev_spec_handle subdev_spec_out)
Get the RX frontend specification for the given device.
uhd_usrp_get_time_sources
UHD_API uhd_error uhd_usrp_get_time_sources(uhd_usrp_handle h, size_t mboard, uhd_string_vector_handle *time_sources_out)
Get a list of time sources for the given device.
uhd_usrp_get_tx_rates
UHD_API uhd_error uhd_usrp_get_tx_rates(uhd_usrp_handle h, size_t chan, uhd_meta_range_handle rates_out)
Get a range of possible RX rates for the given channel.
uhd_usrp_set_tx_lo_source
UHD_API uhd_error uhd_usrp_set_tx_lo_source(uhd_usrp_handle h, const char *src, const char *name, size_t chan)
Set the LO source for the USRP device.
uhd_usrp_set_rx_lo_source
UHD_API uhd_error uhd_usrp_set_rx_lo_source(uhd_usrp_handle h, const char *src, const char *name, size_t chan)
Set the LO source for the USRP device.
uhd_usrp_set_tx_bandwidth
UHD_API uhd_error uhd_usrp_set_tx_bandwidth(uhd_usrp_handle h, double bandwidth, size_t chan)
Set the bandwidth for the given channel's TX frontend.
uhd_usrp_get_rx_bandwidth_range
UHD_API uhd_error uhd_usrp_get_rx_bandwidth_range(uhd_usrp_handle h, size_t chan, uhd_meta_range_handle bandwidth_range_out)
Get all possible bandwidth ranges for the given channel's RX frontend.
uhd_tx_streamer_send
UHD_API uhd_error uhd_tx_streamer_send(uhd_tx_streamer_handle h, const void **buffs, size_t samps_per_buff, uhd_tx_metadata_handle *md, double timeout, size_t *items_sent)
Send buffers containing samples described by the metadata.
uhd_usrp_set_dboard_eeprom
UHD_API uhd_error uhd_usrp_set_dboard_eeprom(uhd_usrp_handle h, uhd_dboard_eeprom_handle db_eeprom, const char *unit, const char *slot, size_t mboard)
Set values in the given daughterboard's EEPROM.
uhd_usrp_get_rx_freq
UHD_API uhd_error uhd_usrp_get_rx_freq(uhd_usrp_handle h, size_t chan, double *freq_out)
Get the given channel's center RX frequency.
uhd_usrp_get_gpio_attr
UHD_API uhd_error uhd_usrp_get_gpio_attr(uhd_usrp_handle h, const char *bank, const char *attr, size_t mboard, uint32_t *attr_out)
Get a GPIO attribute on a particular GPIO bank.
uhd_usrp_set_tx_rate
UHD_API uhd_error uhd_usrp_set_tx_rate(uhd_usrp_handle h, double rate, size_t chan)
Set the given RX channel's sample rate (in Sps).
uhd_usrp_set_rx_subdev_spec
UHD_API uhd_error uhd_usrp_set_rx_subdev_spec(uhd_usrp_handle h, uhd_subdev_spec_handle subdev_spec, size_t mboard)
Map the given device's RX frontend to a channel.
uhd_usrp_get_tx_sensor_names
UHD_API uhd_error uhd_usrp_get_tx_sensor_names(uhd_usrp_handle h, size_t chan, uhd_string_vector_handle *sensor_names_out)
Get a list of TX sensors associated with the given channels.
uhd_usrp_get_fe_rx_freq_range
UHD_API uhd_error uhd_usrp_get_fe_rx_freq_range(uhd_usrp_handle h, size_t chan, uhd_meta_range_handle freq_range_out)
Get all possible RF frequency ranges for the given channel's RX RF frontend.
uhd_usrp_set_time_unknown_pps
UHD_API uhd_error uhd_usrp_set_time_unknown_pps(uhd_usrp_handle h, int64_t full_secs, double frac_secs)
Synchronize the time across all motherboards.
uhd_usrp_get_tx_gain
UHD_API uhd_error uhd_usrp_get_tx_gain(uhd_usrp_handle h, size_t chan, const char *gain_name, double *gain_out)
Get the given channel's RX gain.
uhd_usrp_get_tx_subdev_spec
UHD_API uhd_error uhd_usrp_get_tx_subdev_spec(uhd_usrp_handle h, size_t mboard, uhd_subdev_spec_handle subdev_spec_out)
Get the TX frontend specification for the given device.
uhd_usrp_set_normalized_tx_gain
UHD_API uhd_error uhd_usrp_set_normalized_tx_gain(uhd_usrp_handle h, double gain, size_t chan)
Set the normalized TX gain [0.0, 1.0] for the given channel.
uhd_usrp_get_rx_lo_freq
UHD_API uhd_error uhd_usrp_get_rx_lo_freq(uhd_usrp_handle h, const char *name, size_t chan, double *rx_lo_freq_out)
Get the current RX LO frequency.
uhd_usrp_set_tx_lo_freq
UHD_API uhd_error uhd_usrp_set_tx_lo_freq(uhd_usrp_handle h, double freq, const char *name, size_t chan, double *coerced_freq_out)
Set the Tx LO frequency.
uhd_usrp_get_mboard_sensor
UHD_API uhd_error uhd_usrp_get_mboard_sensor(uhd_usrp_handle h, const char *name, size_t mboard, uhd_sensor_value_handle *sensor_value_out)
Get the value associated with the given sensor name.
uhd_usrp_set_time_source
UHD_API uhd_error uhd_usrp_set_time_source(uhd_usrp_handle h, const char *time_source, size_t mboard)
Set the time source for the given device.
uhd_usrp_set_rx_lo_freq
UHD_API uhd_error uhd_usrp_set_rx_lo_freq(uhd_usrp_handle h, double freq, const char *name, size_t chan, double *coerced_freq_out)
Set the RX LO frequency.
usrp_info.h