File: extension.dox

package info (click to toggle)
uhd 4.9.0.0%2Bds1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 184,180 kB
  • sloc: cpp: 262,887; python: 112,011; ansic: 102,670; vhdl: 57,031; tcl: 19,924; xml: 8,581; makefile: 3,028; sh: 2,812; pascal: 230; javascript: 120; csh: 94; asm: 20; perl: 11
file content (113 lines) | stat: -rw-r--r-- 3,314 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
/*! \page page_extension Extension Framework documentation

\section extension_intro Introduction

The extension framework enables custom libraries to attach to UHD. This can be used for 
instance when an external frontend module shall be used together with a USRP while 
maintaining the control via the UHD API.

For getting started with the extensions framework please refer to the extension 
example in the examples directory. It can be built by 
- changing into the example_extension directory,
- creating a build directory and changing into it,
- calling `cmake .. && make && make install`

Depending on your UHD installation prefix root privileges may be required for `make install`.

\section extension_capabilities Capabilities of the Extension Framework

The Extension Framework attaches to multi_usrp and will work for all RFNoC-capable devices. 
The following methods in multi_usrp offer hooks which allow for manipulating the behavior 
of the USRP and controlling the extension:

RX:
- `set_rx_freq()`
- `get_rx_freq()`
- `get_rx_freq_range()`
- `get_fe_rx_freq_range()`
- `set_rx_gain()`
- `set_rx_agc()`
- `get_rx_gain()`
- `get_rx_gain_range()`
- `get_rx_gain_names()`
- `set_rx_antenna()`
- `get_rx_antenna()`
- `get_rx_antennas()`
- `set_rx_bandwidth()`
- `get_rx_bandwidth()`
- `get_rx_bandwidth_range()`

TX: 
- `set_tx_freq()`
- `get_tx_freq()`
- `get_tx_freq_range()`
- `get_fe_tx_freq_range()`
- `set_tx_gain()`
- `get_tx_gain()`
- `get_tx_gain_range()`
- `get_tx_gain_names()`
- `set_tx_antenna()`
- `get_tx_antenna()`
- `get_tx_antennas()`
- `set_tx_bandwidth()`
- `get_tx_bandwidth()`
- `get_tx_bandwidth_range()`

Further hooks may be implemented in the future. These hooks call into the following methods
in an extension:

RX:
- `set_rx_tune_args()`
- `set_rx_frequency()`
- `get_rx_frequency()`
- `get_rx_frequency_range()`
- `set_rx_bandwidth()`
- `get_rx_bandwidth()`
- `get_rx_bandwidth_range()`
- `set_rx_gain()`
- `get_rx_gain()`
- `set_rx_agc()`
- `get_rx_gain_range()`
- `get_rx_gain_names()`
- `set_rx_antenna()`
- `get_rx_antenna()`
- `get_rx_antennas()`

TX: 
- `set_tx_tune_args()`
- `set_tx_frequency()`
- `get_tx_frequency()`
- `get_tx_frequency_range()`
- `set_tx_bandwidth()`
- `get_tx_bandwidth()`
- `get_tx_bandwidth_range()`
- `set_tx_gain()`
- `get_tx_gain()`
- `get_tx_gain_range()`
- `get_tx_gain_names()`
- `set_tx_antenna()`
- `get_tx_antenna()`
- `get_tx_antennas()`

The implementation of these methods in the extension may just pass this through to the 
equivalent method on the radio or it can change values, call other methods e.g. of other 
devices etc.

\subsection extension_howto How to use the Extension Framework

To use the Extension Framework, uhd::extension::extension from 
uhd/extension/extension.hpp needs to be implemented. 

The implementation of the
extension will have to register itself by calling
`UHD_REGISTER_EXTENSION([extension_name], [class_name])`. 
After building the extension library it must be either:
- found in the `UHD_MODULE_PATH` environment variable,
- installed into the `\<install-path\>/share/uhd/modules` directory,
- or installed into `/usr/share/uhd/modules` directory (UNIX only).

To use the extension its name will have to be passed to the arguments string like
"extension=[extension_name]".

*/
// vim:ft=doxygen: