Modifications to usrp2 source and sink so that set center freq is called afer set...
[debian/gnuradio] / grc / blocks / usrp2_sink_xxxx.xml
1 <?xml version="1.0"?>
2 <!--
3 ###################################################
4 ##USRP2 Sink
5 ##  Note: the center freq must be set after the lo offset
6 ###################################################
7  -->
8 <block>
9         <name>USRP2 Sink</name>
10         <key>usrp2_sink_xxxx</key>
11         <import>from gnuradio import usrp2</import>
12         <make>#if not $interface() and not $mac_addr()
13 usrp2.sink_$(type.fcn)()
14 #elif not $mac_addr()
15 usrp2.sink_$(type.fcn)($interface)
16 #else
17 usrp2.sink_$(type.fcn)($interface, $mac_addr)
18 #end if
19 self.$(id).set_interp($interpolation)
20 #if $lo_offset() != float('inf')
21 self.$(id).set_lo_offset($lo_offset)
22 #end if
23 self.$(id).set_center_freq($frequency)
24 self.$(id).set_gain($gain)</make>
25         <callback>set_interp($interpolation)</callback>
26         <callback>#if $lo_offset() != float('inf')
27 self.$(id).set_lo_offset($lo_offset)
28 #end if
29 self.$(id).set_center_freq($frequency)</callback>
30         <callback>set_gain($gain)</callback>
31         <param>
32                 <name>Output Type</name>
33                 <key>type</key>
34                 <type>enum</type>
35                 <option>
36                         <name>Complex</name>
37                         <key>complex</key>
38                         <opt>fcn:32fc</opt>
39                 </option>
40                 <option>
41                         <name>Short</name>
42                         <key>short</key>
43                         <opt>fcn:16sc</opt>
44                 </option>
45         </param>
46         <param>
47                 <name>Interface</name>
48                 <key>interface</key>
49                 <value></value>
50                 <type>string</type>
51         </param>
52         <param>
53                 <name>MAC Addr</name>
54                 <key>mac_addr</key>
55                 <value></value>
56                 <type>string</type>
57         </param>
58         <param>
59                 <name>Interpolation</name>
60                 <key>interpolation</key>
61                 <type>int</type>
62         </param>
63         <param>
64                 <name>Frequency (Hz)</name>
65                 <key>frequency</key>
66                 <type>real</type>
67         </param>
68         <param>
69                 <name>LO Offset (Hz)</name>
70                 <key>lo_offset</key>
71                 <value>float('inf')</value>
72                 <type>real</type>
73                 <hide>#if $lo_offset() == float('inf') then 'part' else 'none'#</hide>
74                 <option>
75                         <name>Default</name>
76                         <key>float('inf')</key>
77                 </option>
78         </param>
79         <param>
80                 <name>Gain (dB)</name>
81                 <key>gain</key>
82                 <value>0</value>
83                 <type>real</type>
84         </param>
85         <sink>
86                 <name>in</name>
87                 <type>$type</type>
88         </sink>
89         <doc>
90 The USRP2 sink inputs 100 Megasamples per second / interpolation.
91
92 Input amplitude should be between 0.0 and 1.0.
93
94 To use the default ethernet device, leave interface blank. \
95 For systems with only 1 USRP2, you may leave the mac address blank. \
96 For multi-USRP2 systems, specify the mac address in the form 00:50:C2:85:3x:xx.
97         </doc>
98 </block>