The blks.channel_model block would be more useful to GRC if it had some callbacks (functions to set the input parameters at runtime). So, for example, one could vary the noise voltage while the flow graph is running.

I attached a diff with 3 callbacks added. Hopefully, it will make its way into blks2.

-Josh
diff -Naur gnuradio_old/trunk/gnuradio-core/src/python/gnuradio/blksimpl/channel_model.py gnuradio_new/trunk/gnuradio-core/src/python/gnuradio/blksimpl/channel_model.py
--- gnuradio_old/trunk/gnuradio-core/src/python/gnuradio/blksimpl/channel_model.py	2007-08-30 01:17:33.000000000 -0400
+++ gnuradio_new/trunk/gnuradio-core/src/python/gnuradio/blksimpl/channel_model.py	2007-08-30 01:23:34.000000000 -0400
@@ -48,3 +48,12 @@
         fg.connect(self.noise, (self.noise_adder,0))
         
         gr.hier_block.__init__(self, fg, self.timing_offset, self.noise_adder)
+        
+    def set_noise_voltage(noise_voltage):
+        self.noise.set_amplitude(noise_voltage)
+        
+    def set_frequency_offset(frequency_offset):
+        self.freq_offset.set_frequency(frequency_offset)
+     
+    def set_taps(taps):
+        self.multipath.set_taps(taps)
_______________________________________________
Discuss-gnuradio mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio

Reply via email to