On Wed, 2 Mar 2005, Eric Blossom wrote:
On Wed, Mar 02, 2005 at 10:23:22AM -0500, Charles Clancy wrote:
I'm trying to write a gnuradio 2.4 module that computes the phase of a
complex baseband signal, mostly as a learning excercise in developing a
4-FSK receiver.  (Is there an existing module that could do this for me?)

Yes: gr.complex_to_arg ()

Cool, that seems to work. Is there a derivative block? Something that takes float f(x) and returns float f'(x)?


  File
  "/usr/local/lib/python2.3/site-packages/gnuradio/gr/basic_flow_graph.py",
  line 180, in _check_port
    if signature.max_streams () == -1: # infinite
  AttributeError: 'str' object has no attribute 'max_streams'

The fact that the AttributeError is complaining that a string object ('str') doesn't have a 'max_streams' attribute is highly suspicious.

Did you follow the examples in gr-howto-write-a-block?
 http://www.gnu.org/software/gnuradio/doc/howto-write-a-block.html
 ftp://ftp.gnu.org/gnu/gnuradio/gr-howto-write-a-block-0.2.tar.gz

The massive automake/autoconf structure made adapting the tar.gz version very difficult to work with. I reverse engineered the post-configured makefiles and figured out exactly what commands I needed, and went from there. I copied the code structure from the howto_square module, and double-checked against some of the gnuradio-core modules.


Does the public constructor return a boost shared_ptr version of the pointer?
Does your .i file use GR_SWIG_BLOCK_MAGIC(...)?

The mypkg_make_phase_cf function returns a mypkg_phase_cf_sptr. My mypkg_phase_cf constructor calls the gr_block constructor. My .i file contains "GR_SWIG_BLOCK_MAGIC(mypkg, phase_cf)".


[ t. charles clancy ]--[ [EMAIL PROTECTED] ]--[ www.cs.umd.edu/~clancy ]
[ computer science ]-----[ university of maryland | college park ]


_______________________________________________ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org http://lists.gnu.org/mailman/listinfo/discuss-gnuradio

Reply via email to