[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] r10277 - in gnuradio/trunk/grc: data/platforms/python/
From: |
jblum |
Subject: |
[Commit-gnuradio] r10277 - in gnuradio/trunk/grc: data/platforms/python/blocks scripts |
Date: |
Wed, 21 Jan 2009 12:05:38 -0700 (MST) |
Author: jblum
Date: 2009-01-21 12:05:38 -0700 (Wed, 21 Jan 2009)
New Revision: 10277
Modified:
gnuradio/trunk/grc/data/platforms/python/blocks/usrp2_probe.xml
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/scripts/usrp2_probe
Log:
usrp2 function names, usrp2 contructor usage
Modified: gnuradio/trunk/grc/data/platforms/python/blocks/usrp2_probe.xml
===================================================================
--- gnuradio/trunk/grc/data/platforms/python/blocks/usrp2_probe.xml
2009-01-21 16:56:57 UTC (rev 10276)
+++ gnuradio/trunk/grc/data/platforms/python/blocks/usrp2_probe.xml
2009-01-21 19:05:38 UTC (rev 10277)
@@ -12,7 +12,7 @@
<param>
<name>Interface</name>
<key>interface</key>
- <value>eth0</value>
+ <value></value>
<type>string</type>
</param>
<param>
Modified: gnuradio/trunk/grc/data/platforms/python/blocks/usrp2_sink_xxxx.xml
===================================================================
--- gnuradio/trunk/grc/data/platforms/python/blocks/usrp2_sink_xxxx.xml
2009-01-21 16:56:57 UTC (rev 10276)
+++ gnuradio/trunk/grc/data/platforms/python/blocks/usrp2_sink_xxxx.xml
2009-01-21 19:05:38 UTC (rev 10277)
@@ -8,9 +8,15 @@
<name>USRP2 Sink</name>
<key>usrp2_sink_xxxx</key>
<import>from gnuradio import usrp2</import>
- <make>usrp2.sink_$(type.fcn)($interface, $mac_addr)
-self.$(id).set_interp_rate($interpolation)
-self.$(id).set_frequency($frequency)
+ <make>#if not $interface.eval and not $mac_addr.eval
+usrp2.sink_$(type.fcn)()
+#elif not $mac_addr.eval
+usrp2.sink_$(type.fcn)($interface)
+#else
+usrp2.sink_$(type.fcn)($interface, $mac_addr)
+#end if
+self.$(id).set_interp($interpolation)
+self.$(id).set_center_freq($frequency)
self.$(id).set_gain($gain)
#if $auto_tr.eval
self.$(id).set_auto_tr($auto_tr)
@@ -19,8 +25,8 @@
self.$(id).set_enable($tx_enb)
#end if
</make>
- <callback>set_interp_rate($interpolation)</callback>
- <callback>set_frequency($frequency)</callback>
+ <callback>set_interp($interpolation)</callback>
+ <callback>set_center_freq($frequency)</callback>
<callback>set_gain($gain)</callback>
<param>
<name>Output Type</name>
Modified: gnuradio/trunk/grc/data/platforms/python/blocks/usrp2_source_xxxx.xml
===================================================================
--- gnuradio/trunk/grc/data/platforms/python/blocks/usrp2_source_xxxx.xml
2009-01-21 16:56:57 UTC (rev 10276)
+++ gnuradio/trunk/grc/data/platforms/python/blocks/usrp2_source_xxxx.xml
2009-01-21 19:05:38 UTC (rev 10277)
@@ -8,9 +8,15 @@
<name>USRP2 Source</name>
<key>usrp2_source_xxxx</key>
<import>from gnuradio import usrp2</import>
- <make>usrp2.source_$(type.fcn)($interface, $mac_addr)
-self.$(id).set_decim_rate($decimation)
-self.$(id).set_frequency($frequency)
+ <make>#if not $interface.eval and not $mac_addr.eval
+usrp2.source_$(type.fcn)()
+#elif not $mac_addr.eval
+usrp2.source_$(type.fcn)($interface)
+#else
+usrp2.source_$(type.fcn)($interface, $mac_addr)
+#end if
+self.$(id).set_decim($decimation)
+self.$(id).set_center_freq($frequency)
self.$(id).set_gain($gain)
#if $auto_tr.eval
self.$(id).set_auto_tr($auto_tr)
@@ -19,8 +25,8 @@
self.$(id).select_rx_antenna($rx_ant)
#end if
</make>
- <callback>set_decim_rate($decimation)</callback>
- <callback>set_frequency($frequency)</callback>
+ <callback>set_decim($decimation)</callback>
+ <callback>set_center_freq($frequency)</callback>
<callback>set_gain($gain)</callback>
<param>
<name>Output Type</name>
Modified: gnuradio/trunk/grc/scripts/usrp2_probe
===================================================================
--- gnuradio/trunk/grc/scripts/usrp2_probe 2009-01-21 16:56:57 UTC (rev
10276)
+++ gnuradio/trunk/grc/scripts/usrp2_probe 2009-01-21 19:05:38 UTC (rev
10277)
@@ -135,8 +135,11 @@
'rx': (usrp2.source_32fc, 'adc_rate'),
'tx': (usrp2.sink_32fc, 'dac_rate'),
}[usrp_type_param.evaluate()]
+ interface = usrp_interface_param.evaluate()
try:
- u = make(usrp_interface_param.evaluate(), mac_addr)
+ if not interface and not mac_addr: u = make()
+ elif not mac_addr: u = make(interface)
+ else: u = make(interface, mac_addr)
msg = ">>> USRP2 Probe\n"
msg = "%s\nMAC Addr:\n\t%s\n"%(msg, u.mac_addr())
msg = "%s\nName (ID):\n\t%s\n"%(msg,
u.daughterboard_id())
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Commit-gnuradio] r10277 - in gnuradio/trunk/grc: data/platforms/python/blocks scripts,
jblum <=