discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] 802.15.4 how to forward a parameter to a c++ bloc


From: Markus Becker
Subject: Re: [Discuss-gnuradio] 802.15.4 how to forward a parameter to a c++ block
Date: Wed, 26 May 2010 15:36:20 +0200
User-agent: KMail/1.13.3 (Linux/2.6.32-4-686; KDE/4.4.3; i686; ; )

> >>> Hi,
> >>> 
> >>> I'm currently using the UCLA ZigBee PHY implementation posted on:
> >>> https://www.cgran.org/wiki/UCLAZigBee
> >>> with gnuradio.
> >>> 
> >>> My question is the following:
> >>> How can I forward a parameter from: src/python/ieee802_15_4_pkt.py
> >>> ... e.g. from the "send_pkt(...)" function (or any other)
> >>> to the c++ block in : src/lib/ucla_symbols_to_chips_bi.cc ?
> >>> 
> >>> Or more generally speaking: How can I forward a parameter from a python
> >>> application to the c++ processing block?
> >>> If possible it would be great to use the io_signatures...
> >> 
> >> during instantiation of the block or during runtime?  If it's during
> >> instantiation, you can use a parameter to the constructor of your C++
> >> block.  But, if you want something during runtime I do not think it is
> >> possible given the current architecture.  You do not explicitly call the
> >> work() function where the processing is done, this is done within the
> >> GNU Radio framework.
> >> 
> >> - George
> > 
> > Well I'd need it during runtime.
> > What about using a shared memory block between the python and the
> > c++ block? Or what about calling a function from within the c++
> > block, which would get the parameter from the python block or a
> > specific memory block
> > 
> > Thanks for the help!
> > 
> > - Bjoern
> 
> Or how could I extend "ucla_symbols_to_chips_bi" to have more inputs,
> such that I could have one more stream forwarded from
> "ieee_802_15_4.py" to "ucla_symbols_to_chips_bi"?

For that you need to change the io_signature.

gr_make_io_signature (1, -1, sizeof (unsigned char)),
to
gr_make_io_signature (2, -1, sizeof (unsigned char)),

> This then could be used within the work() function, wouldn't it?
> 
> many thanks to all!
> -Björn
> 
> 
> _______________________________________________
> Discuss-gnuradio mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/discuss-gnuradio
------------------------------------------------
| ATTENTION: NEW TELEPHONE EXTENSION!
------------------------------------------------
| Dipl.-Ing. Markus Becker
| Communication Networks
| Mobile Research Center
| TZI - Center for Computing Technologies
| University Bremen
| Germany
------------------------------------------------
| web: http://www.comnets.uni-bremen.de/~mab/
| mailto: address@hidden
------------------------------------------------



reply via email to

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