discuss-gnuradio
[Top][All Lists]
Advanced

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

[Discuss-gnuradio] some thoughts on scripting...


From: Maitland Bottoms
Subject: [Discuss-gnuradio] some thoughts on scripting...
Date: Mon, 3 Mar 2003 22:16:59 -0500

As I was browsing the GNU Radio web pages I noticed:

In the Future

    * Scripting interface. Allow C++ signal processing primtives to be
      glued together on the fly with guile, etc.

...and I have this observation to make...

There's another software project - The Visualization ToolKit (VTK) -
which is built as a C++ library that is wrapped into extensions to
Tcl, Python and Java. Part of their technique involves adhering to a
coding style to allow for a parser to automatically generate wrapper
code.

See http://www.vtk.org/pdf/dioot.pdf for the motivations of VTK.

I fell that much of the same could be said about GNU Radio. Certainly
the data-flow model applies, and the network arrangement of small
processing blocks.

Just some food for thought for those about to build the software.

-Maitland

P.S.
Let me be the first to ponder the following Python GNU Radio
application:

#!/usr/bin/python

# First we load in the GNU Radio Toolkit to Python...
import grt

# Next we create an instance of grtSineSource and set some of its
# parameters
tone = grt.grtSineSource()
tone.SetAmplitude( 0.9 )
tone.SetFrequency( 1000.0 )

# Now a switch

switch = grt.grtSwitch()
switch.SetInput( tone.GetOutput() )

# Oh yeah, something to control the switch

msg = grt.grtAsciiMorseMapper("CQ CQ CQ de Software Radio")
msg.SetRateWPM(10)

# hook it up
switch.SetControlInput( msg.GetOutput() )

# Connect the speakers...
speaker = grt.grtSpeakerOutput()
speaker.SetDevice( "/dev/dsp" )
speaker.SetOutputRate( 44100 )
speaker.AddSignal( switch.GetOutput() )

# Produce ouptut:
speaker.Play()




reply via email to

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