discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] gr_modtool cmake/make problems on OSX


From: Warren, Kevin M
Subject: Re: [Discuss-gnuradio] gr_modtool cmake/make problems on OSX
Date: Tue, 26 Feb 2013 14:45:52 +0000

>>I assume you mean in the SWIG files? Or are you talking about something else? 
>>The SWIG order bug was fixed in both the standalone and the master branch 
>>version of gr-modtool. 

Martin,
It's "howto_swig.py" that is generated following the out of tree module 
tutorial (link in original post) downloaded from github. I see there's been a 
new version posted within the past few hours. 

>>Also, are you using the pre-3.7 or the post-3.7 module structure (gr_modtool 
>>info tells you this if you don't know what this means).

Unfortunately I do not see any switches in the parser or hard coded information 
containing the version information, though there is a reference to 
self.info['_version'] I don't see the actual assignment. Either way, it was the 
top version on github as of two days ago. 

>>In general, stuff that's "easy to remedy by hand" should be easy to get right 
>>in modtool. If you're not talking about the swig files, perhaps you can post 
>>the faulty code?

I hope this is sufficient. I cut out some of the details of the code to keep it 
short.

square_ff_sptr_swigregister = _howto_swig.square_ff_sptr_swigregister
square_ff_sptr_swigregister(square_ff_sptr)

square_ff_sptr.__repr__ = lambda self: "<gr_block %s (%d)>" % (self.name(), 
self.unique_id())
square_ff = square_ff.make;

class square_ff(object):
    """<+description of block+>"""
        ...
        return _howto_swig.square_ff_make()

    def make():
    ....
    make = staticmethod(make)
    __swig_destroy__ = _howto_swig.delete_square_ff
    __del__ = lambda self : None;

def square_ff_make():
  """
    square_ff_make() -> square_ff_sptr

    Return a shared_ptr to a new instance of howto::square_ff.
     ..."""  
    return _howto_swig.square_ff_make()

square_ff_swigregister = _howto_swig.square_ff_swigregister
square_ff_swigregister(square_ff)

>>makexml makes a lot of assumptions, and right now there's no code parser for 
>>Python blocks. Message ports aren't supported at all right now. Do you have a 
>>C++ block? If so, I'd be interested to see the code chunks that makexml 
>>stumbles over.

It is identical to that posted in the out of tree module tutorial. 
http://gnuradio.org/redmine/projects/gnuradio/wiki/OutOfTreeModules

>>However, there's only so much I can do in makexml, and it will never be able 
>>to fully understand all blocks (although it should fail gracefully).

Understood. As far as I can tell gr_modtool didn't do anything to the original 
template when I ran it on the example. When I have some time I will poke into 
the details of the script but someone else's parsing and code generation tools 
can be challenging to unravel. I can barely follow my own a few days after I've 
written them. 

Thanks,
Kevin





reply via email to

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