commit-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commit-gnuradio] r10974 - in gnuradio/trunk/grc: data/platforms/python/


From: jblum
Subject: [Commit-gnuradio] r10974 - in gnuradio/trunk/grc: data/platforms/python/blocks src/grc_gnuradio/usrp
Date: Tue, 5 May 2009 18:49:23 -0600 (MDT)

Author: jblum
Date: 2009-05-05 18:49:22 -0600 (Tue, 05 May 2009)
New Revision: 10974

Modified:
   gnuradio/trunk/grc/data/platforms/python/blocks/usrp2_sink_xxxx.xml
   gnuradio/trunk/grc/data/platforms/python/blocks/usrp2_source_xxxx.xml
   gnuradio/trunk/grc/data/platforms/python/blocks/usrp_dual_sink_x.xml
   gnuradio/trunk/grc/data/platforms/python/blocks/usrp_dual_source_x.xml
   gnuradio/trunk/grc/data/platforms/python/blocks/usrp_simple_sink_x.xml
   gnuradio/trunk/grc/data/platforms/python/blocks/usrp_simple_source_x.xml
   gnuradio/trunk/grc/src/grc_gnuradio/usrp/dual_usrp.py
   gnuradio/trunk/grc/src/grc_gnuradio/usrp/simple_usrp.py
Log:

Added LO Offset param to usrp simple and dual block wrappers.
Modified usrp simple and dual wrapper classes with setter methods.



Modified: gnuradio/trunk/grc/data/platforms/python/blocks/usrp2_sink_xxxx.xml
===================================================================
--- gnuradio/trunk/grc/data/platforms/python/blocks/usrp2_sink_xxxx.xml 
2009-05-06 00:37:03 UTC (rev 10973)
+++ gnuradio/trunk/grc/data/platforms/python/blocks/usrp2_sink_xxxx.xml 
2009-05-06 00:49:22 UTC (rev 10974)
@@ -76,6 +76,7 @@
        <param>
                <name>Gain (dB)</name>
                <key>gain</key>
+               <value>0</value>
                <type>real</type>
        </param>
        <sink>

Modified: gnuradio/trunk/grc/data/platforms/python/blocks/usrp2_source_xxxx.xml
===================================================================
--- gnuradio/trunk/grc/data/platforms/python/blocks/usrp2_source_xxxx.xml       
2009-05-06 00:37:03 UTC (rev 10973)
+++ gnuradio/trunk/grc/data/platforms/python/blocks/usrp2_source_xxxx.xml       
2009-05-06 00:49:22 UTC (rev 10974)
@@ -62,7 +62,7 @@
                <key>frequency</key>
                <type>real</type>
        </param>
-    <param>
+       <param>
                <name>LO Offset (Hz)</name>
                <key>lo_offset</key>
                <value>float('inf')</value>
@@ -76,6 +76,7 @@
        <param>
                <name>Gain (dB)</name>
                <key>gain</key>
+               <value>0</value>
                <type>real</type>
        </param>
        <source>

Modified: gnuradio/trunk/grc/data/platforms/python/blocks/usrp_dual_sink_x.xml
===================================================================
--- gnuradio/trunk/grc/data/platforms/python/blocks/usrp_dual_sink_x.xml        
2009-05-06 00:37:03 UTC (rev 10973)
+++ gnuradio/trunk/grc/data/platforms/python/blocks/usrp_dual_sink_x.xml        
2009-05-06 00:49:22 UTC (rev 10974)
@@ -14,6 +14,12 @@
 self.$(id).set_frequency_b($frequency_b, verbose=True)
 self.$(id).set_gain_a($gain_a)
 self.$(id).set_gain_b($gain_b)
+#if $lo_offset_a() != float('inf')
+self.$(id).set_lo_offset_a($lo_offset_a)
+#end if
+#if $lo_offset_b() != float('inf')
+self.$(id).set_lo_offset_b($lo_offset_b)
+#end if
 ##################################################
 ## Flex RF A
 ##################################################
@@ -64,23 +70,47 @@
                <type>int</type>
        </param>
        <param>
-               <name>Frequency A</name>
+               <name>Frequency A (Hz)</name>
                <key>frequency_a</key>
                <type>real</type>
        </param>
        <param>
-               <name>Frequency B</name>
+               <name>Frequency B (Hz)</name>
                <key>frequency_b</key>
                <type>real</type>
        </param>
        <param>
-               <name>Gain A</name>
+               <name>LO Offset A (Hz)</name>
+               <key>lo_offset_a</key>
+               <value>float('inf')</value>
+               <type>real</type>
+               <hide>#if $lo_offset_a() == float('inf') then 'part' else 
'none'#</hide>
+               <option>
+                       <name>Default</name>
+                       <key>float('inf')</key>
+               </option>
+       </param>
+       <param>
+               <name>LO Offset B (Hz)</name>
+               <key>lo_offset_b</key>
+               <value>float('inf')</value>
+               <type>real</type>
+               <hide>#if $lo_offset_b() == float('inf') then 'part' else 
'none'#</hide>
+               <option>
+                       <name>Default</name>
+                       <key>float('inf')</key>
+               </option>
+       </param>
+       <param>
+               <name>Gain A (dB)</name>
                <key>gain_a</key>
+               <value>0</value>
                <type>real</type>
        </param>
        <param>
-               <name>Gain B</name>
+               <name>Gain B (dB)</name>
                <key>gain_b</key>
+               <value>0</value>
                <type>real</type>
        </param>
 <!--
@@ -154,6 +184,8 @@
        <doc>
 The USRP sink inputs 128 Megasamples per second / interpolation.
 
+Input amplitude should be between 0 and 32767.
+
 Flex RF boards only: The "Transmit Setting" must be configured. \
 When set to "Enable" the transmitter is always on. \
 When set to "Auto Transmit/Receive", the transmitter is disabled while 
receiving.

Modified: gnuradio/trunk/grc/data/platforms/python/blocks/usrp_dual_source_x.xml
===================================================================
--- gnuradio/trunk/grc/data/platforms/python/blocks/usrp_dual_source_x.xml      
2009-05-06 00:37:03 UTC (rev 10973)
+++ gnuradio/trunk/grc/data/platforms/python/blocks/usrp_dual_source_x.xml      
2009-05-06 00:49:22 UTC (rev 10974)
@@ -16,7 +16,13 @@
 self.$(id).set_frequency_a($frequency_a, verbose=True)
 self.$(id).set_frequency_b($frequency_b, verbose=True)
 self.$(id).set_gain_a($gain_a)
-self.$(id).set_gain_b($gain_b)</make>
+self.$(id).set_gain_b($gain_b)
+#if $lo_offset_a() != float('inf')
+self.$(id).set_lo_offset_a($lo_offset_a)
+#end if
+#if $lo_offset_b() != float('inf')
+self.$(id).set_lo_offset_b($lo_offset_b)
+#end if</make>
        <callback>set_decim_rate($decimation)</callback>
        <callback>set_frequency_a($frequency_a)</callback>
        <callback>set_frequency_b($frequency_b)</callback>
@@ -68,23 +74,47 @@
                <type>int</type>
        </param>
        <param>
-               <name>Frequency A</name>
+               <name>Frequency A (Hz)</name>
                <key>frequency_a</key>
                <type>real</type>
        </param>
        <param>
-               <name>Frequency B</name>
+               <name>Frequency B (Hz)</name>
                <key>frequency_b</key>
                <type>real</type>
        </param>
        <param>
-               <name>Gain A</name>
+               <name>LO Offset A (Hz)</name>
+               <key>lo_offset_a</key>
+               <value>float('inf')</value>
+               <type>real</type>
+               <hide>#if $lo_offset_a() == float('inf') then 'part' else 
'none'#</hide>
+               <option>
+                       <name>Default</name>
+                       <key>float('inf')</key>
+               </option>
+       </param>
+       <param>
+               <name>LO Offset B (Hz)</name>
+               <key>lo_offset_b</key>
+               <value>float('inf')</value>
+               <type>real</type>
+               <hide>#if $lo_offset_b() == float('inf') then 'part' else 
'none'#</hide>
+               <option>
+                       <name>Default</name>
+                       <key>float('inf')</key>
+               </option>
+       </param>
+       <param>
+               <name>Gain A (dB)</name>
                <key>gain_a</key>
+               <value>0</value>
                <type>real</type>
        </param>
        <param>
-               <name>Gain B</name>
+               <name>Gain B (dB)</name>
                <key>gain_b</key>
+               <value>0</value>
                <type>real</type>
        </param>
 <!--

Modified: gnuradio/trunk/grc/data/platforms/python/blocks/usrp_simple_sink_x.xml
===================================================================
--- gnuradio/trunk/grc/data/platforms/python/blocks/usrp_simple_sink_x.xml      
2009-05-06 00:37:03 UTC (rev 10973)
+++ gnuradio/trunk/grc/data/platforms/python/blocks/usrp_simple_sink_x.xml      
2009-05-06 00:49:22 UTC (rev 10974)
@@ -17,7 +17,11 @@
 #end if
 #if $transmit.auto_tr
 self.$(id).set_auto_tr(True)
+#end if
+#if $lo_offset() != float('inf')
+self.$(id).set_lo_offset($lo_offset)
 #end if</make>
+       <callback>set_lo_offset($lo_offset)</callback>
        <callback>set_interp_rate($interpolation)</callback>
        <callback>set_frequency($frequency)</callback>
        <callback>set_gain($gain)</callback>
@@ -48,13 +52,25 @@
                <type>int</type>
        </param>
        <param>
-               <name>Frequency</name>
+               <name>Frequency (Hz)</name>
                <key>frequency</key>
                <type>real</type>
        </param>
        <param>
-               <name>Gain</name>
+               <name>LO Offset (Hz)</name>
+               <key>lo_offset</key>
+               <value>float('inf')</value>
+               <type>real</type>
+               <hide>#if $lo_offset() == float('inf') then 'part' else 
'none'#</hide>
+               <option>
+                       <name>Default</name>
+                       <key>float('inf')</key>
+               </option>
+       </param>
+       <param>
+               <name>Gain (dB)</name>
                <key>gain</key>
+               <value>0</value>
                <type>real</type>
        </param>
        <param>
@@ -103,6 +119,8 @@
        <doc>
 The USRP sink inputs 128 Megasamples per second / interpolation.
 
+Input amplitude should be between 0 and 32767.
+
 Flex RF boards only: The "Transmit Setting" must be configured. \
 When set to "Enable" the transmitter is always on. \
 When set to "Auto Transmit/Receive", the transmitter is disabled while 
receiving.

Modified: 
gnuradio/trunk/grc/data/platforms/python/blocks/usrp_simple_source_x.xml
===================================================================
--- gnuradio/trunk/grc/data/platforms/python/blocks/usrp_simple_source_x.xml    
2009-05-06 00:37:03 UTC (rev 10973)
+++ gnuradio/trunk/grc/data/platforms/python/blocks/usrp_simple_source_x.xml    
2009-05-06 00:49:22 UTC (rev 10974)
@@ -14,7 +14,11 @@
 #end if
 self.$(id).set_decim_rate($decimation)
 self.$(id).set_frequency($frequency, verbose=True)
-self.$(id).set_gain($gain)</make>
+self.$(id).set_gain($gain)
+#if $lo_offset() != float('inf')
+self.$(id).set_lo_offset($lo_offset)
+#end if</make>
+       <callback>set_lo_offset($lo_offset)</callback>
        <callback>set_decim_rate($decimation)</callback>
        <callback>set_frequency($frequency)</callback>
        <callback>set_gain($gain)</callback>
@@ -64,13 +68,25 @@
                <type>int</type>
        </param>
        <param>
-               <name>Frequency</name>
+               <name>Frequency (Hz)</name>
                <key>frequency</key>
                <type>real</type>
        </param>
        <param>
-               <name>Gain</name>
+               <name>LO Offset (Hz)</name>
+               <key>lo_offset</key>
+               <value>float('inf')</value>
+               <type>real</type>
+               <hide>#if $lo_offset() == float('inf') then 'part' else 
'none'#</hide>
+               <option>
+                       <name>Default</name>
+                       <key>float('inf')</key>
+               </option>
+       </param>
+       <param>
+               <name>Gain (dB)</name>
                <key>gain</key>
+               <value>0</value>
                <type>real</type>
        </param>
        <param>

Modified: gnuradio/trunk/grc/src/grc_gnuradio/usrp/dual_usrp.py
===================================================================
--- gnuradio/trunk/grc/src/grc_gnuradio/usrp/dual_usrp.py       2009-05-06 
00:37:03 UTC (rev 10973)
+++ gnuradio/trunk/grc/src/grc_gnuradio/usrp/dual_usrp.py       2009-05-06 
00:49:22 UTC (rev 10974)
@@ -67,6 +67,8 @@
                        frequency=frequency,
                        verbose=verbose,
                )
+       def set_lo_offset_a(self, lo_offset): 
self._subdev_a.set_lo_offset(lo_offset)
+       def set_lo_offset_b(self, lo_offset): 
self._subdev_b.set_lo_offset(lo_offset)
        def set_gain_a(self, gain): self._subdev_a.set_gain(gain)
        def set_gain_b(self, gain): self._subdev_b.set_gain(gain)
 
@@ -117,6 +119,8 @@
                        frequency=frequency,
                        verbose=verbose,
                )
+       def set_lo_offset_a(self, lo_offset): 
self._subdev_a.set_lo_offset(lo_offset)
+       def set_lo_offset_b(self, lo_offset): 
self._subdev_b.set_lo_offset(lo_offset)
        def set_gain_a(self, gain): self._subdev_a.set_gain(gain)
        def set_gain_b(self, gain): self._subdev_b.set_gain(gain)
        def set_enable_a(self, enable): self._subdev_a.set_enable(enable)

Modified: gnuradio/trunk/grc/src/grc_gnuradio/usrp/simple_usrp.py
===================================================================
--- gnuradio/trunk/grc/src/grc_gnuradio/usrp/simple_usrp.py     2009-05-06 
00:37:03 UTC (rev 10973)
+++ gnuradio/trunk/grc/src/grc_gnuradio/usrp/simple_usrp.py     2009-05-06 
00:49:22 UTC (rev 10974)
@@ -56,6 +56,7 @@
                self._get_u().set_decim_rate(int(decim))
                if self._no_hb: #set the BW to half the sample rate
                        
self._subdev.set_bw(self._get_u().converter_rate()/decim/2)
+       def set_lo_offset(self, lo_offset): 
self._subdev.set_lo_offset(lo_offset)
        def set_frequency(self, frequency, verbose=False):
                self._set_frequency(
                        chan=0, #ddc0
@@ -102,6 +103,7 @@
                        frequency=frequency,
                        verbose=verbose,
                )
+       def set_lo_offset(self, lo_offset): 
self._subdev.set_lo_offset(lo_offset)
        def set_gain(self, gain): self._subdev.set_gain(gain)
        def set_enable(self, enable): self._subdev.set_enable(enable)
        def set_auto_tr(self, auto_tr): self._subdev.set_auto_tr(auto_tr)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]