[Top][All Lists]

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

Re: [Discuss-gnuradio] a simple question from a beginner

From: Eric Blossom
Subject: Re: [Discuss-gnuradio] a simple question from a beginner
Date: Tue, 29 Apr 2008 08:03:41 -0700
User-agent: Mutt/1.5.17 (2007-11-01)

On Fri, Apr 25, 2008 at 12:16:02AM -0500, Murtuza wrote:
> Hi frnds
> I am new to GNURadio and I have a simple question the answer to which I
> cannot find. I tried all kinds of methods to know what's happening. This is
> my last way to know the answer. I am looking at tunnel.py in
> gnuradio/examples/digital directory. In this module in the main() function
> we initialize the variable "mods" as
> mods = modulation_utils.type_1_mods()
> The modulation_utils.type_1_mods() returns the variable _type_1_modulators.
> This variable is actually initialized as an empty dictionary object {}, but
> when it returns to tunnel.py it returns a dictionary  modulators info. I
> cannot find where this initialization is being done. I checked almost
> everything, all the import modules, etc. I tried debugging using pdb and a
> lot of print statements, but still can't find the answer to it. Can anyone
> throw some light on it.
> _type_1_modulators = {}
> # something seems to happen between these two lines. I don't know what.
> def type_1_mods():
>     print "inside function"
>     print _type_1_modulators
>     return _type_1_modulators
> Thanking you
> Ali

The mod/demod code registers themselves when they are loaded.
See for example the last two lines in 

# Add these to the mod/demod registry
modulation_utils.add_type_1_mod('dbpsk', dbpsk_mod)
modulation_utils.add_type_1_demod('dbpsk', dbpsk_demod)

reply via email to

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