Questions on writing your own block

Hey all,

I have written my own blocks in the past following the instructions
at http://www.gnu.org/software/gnuradio/doc/howto-write-a-block.html
and had success. However, today I am trying to implement a copy of
‘gr.mpsk_receiver_cc’, so I made a new module and block
‘ju.mpsk_receiver_cc’, I believe I changed everything in the ac,h,cc,
and i files necessary, but I get the following error when I try to run
‘make check’:

======================================================================
ERROR: test_001_mpsk_receiver_cc (main.qa_ju)

Traceback (most recent call last):
File “./qa_ju.py”, line 38, in test_001_mpsk_receiver_cc
receiver=ju.mpsk_receiver_cc(2, 0, 2, 2,0, 0, 0, 1, 0, 0, 0 )
AttributeError: ‘module’ object has no attribute ‘mpsk_receiver_cc’

I do not get an error when I try to ‘import ju’ alone, so it seems as
if the module has been created appropriately. But for some reason the
mpsk receiver code did not get attached to it. Here is the relevant
portion of the ju.i file that I thought did the attaching:

GR_SWIG_BLOCK_MAGIC(ju,mpsk_receiver_cc);

ju_mpsk_receiver_cc_sptr ju_mpsk_receiver_cc ();

class ju_mpsk_receiver_cc : public gr_block
{
private:
ju_mpsk_receiver_cc ();
};

What can I do to get gnuradio to recognize ju.mpsk_receiver_cc in
addition to ju?

Thanks
Jason

On Wed, Nov 19, 2008 at 10:08 AM, Jason U. [email protected]
wrote:

======================================================================
portion of the ju.i file that I thought did the attaching:

What can I do to get gnuradio to recognize ju.mpsk_receiver_cc in
addition to ju?

Thanks
Jason

Based on other blocks that I have seen shouldn’t the word “make” be
present.

ju_mpsk_receiver_cc_sptr ju_make_mpsk_receiver_cc ();

Karthik

Based on other blocks that I have seen shouldn’t the word “make” be present.

ju_mpsk_receiver_cc_sptr ju_make_mpsk_receiver_cc ();

Thanks! I didn’t spot that while proof reading. It’s the small stuff
that kills you!

Jason