discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] Creating bindings to other langauges for GNURadio


From: Eric Blossom
Subject: Re: [Discuss-gnuradio] Creating bindings to other langauges for GNURadio
Date: Sun, 13 Jan 2008 13:33:48 -0800
User-agent: Mutt/1.5.17 (2007-11-01)

On Sun, Jan 13, 2008 at 09:39:20PM +0100, Robert Varttinen wrote:
>
> Hi all!
>
> I am experimenting with GNURadio and in particular trying to create
> a binding for another language for a module than
> Python. Unfortunately I am not that proficient, yet, with Swig and
> some of the other tools. After taking a peek at the make files, the
> Swig interface files, etc. it seems a bit of a hurdle to grasp at
> first. Could someone please provide a pointer to some of the entries
> in the files (.i, make-files and others?) of a module (small one) so
> I can work out the details for my experiments ...

Sorry, there really aren't any small ones[1].  For gnuradio-core, it all
gets pulled together in gnuradio-core/src/lib/swig.  We build 
5 separate modules that are logically a single entity.  (We used to
build them as a single entity, but the 6MB of generated C++ code got a
bit too large for people with < 512MB to compile).  
The first module to study is gnuradio.i which gets compiled into
gnuradio_swig_py_runtime.*.   It contains the base of the inheritance
hierarchy. 

You'll want to spend some quality time with the swig documentation.
The main things to study are the overview, C, C++ and Python chapters.
We don't do anything fancy with typemaps.  We mostly avoid those
problems by designing our C++ interfaces to be "SWIG friendly".

What's your other language?

Let us know when you've got more questions :)

Eric


[1] Actually, there are a few small ones, but I don't think they'll
help you get going.  You could look at gr-audio-alsa/src/audio_alsa.i,
but it has a dependency on gnuradio.i, so you're back to
gnuradio-core/src/lib/swig/gnuradio.i





reply via email to

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