Forum: GNU Radio Questions on writing your own block

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
A183460a6345f698900d4394de8212ce?d=identicon&s=25 Jason Uher (Guest)
on 2008-11-19 19:09
(Received via mailing list)
Hey all,

   I have written my own blocks in the past following the instructions
at http://www.gnu.org/software/gnuradio/doc/howto-wri...
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
063614dd3613cfd90b6c86b951fcf2a4?d=identicon&s=25 Karthik Vijayraghavan (Guest)
on 2008-11-19 19:14
(Received via mailing list)
On Wed, Nov 19, 2008 at 10:08 AM, Jason Uher <jasonuher@gmail.com>
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
A183460a6345f698900d4394de8212ce?d=identicon&s=25 Jason Uher (Guest)
on 2008-11-19 19:34
(Received via mailing list)
> 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
This topic is locked and can not be replied to.