[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Discuss-gnuradio] How to create a python block
From: |
Martin Braun |
Subject: |
Re: [Discuss-gnuradio] How to create a python block |
Date: |
Wed, 16 Mar 2016 13:54:00 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 |
GNU Radio supports Python blocks out-of-the-box. You can use gr_modtool
to create them, if you like. Also check out our qa codes for some
examples (including message based blocks).
Cheers,
M
On 03/16/2016 01:51 PM, Dennis Glatting wrote:
> This is probably a dumb question but someone has to ask them...
>
>
> I have a run graph with c++ blocks: a receiver block, a transmitter
> block, and a manipulator block. I want to have the manipulator block
> editable from the run graph where the user can insert python code.
> Specifically:
>
> 1) The block has two message ports: an "in" port and an "out" port.
>
> 2) A user can write and type python code into the block to manipulate
> the message received on the input port and post the manipulated message
> on the output port.
>
> 3) The python code may have to call other functions, such as updating a
> hash code.
>
> How might I do that? I could do a c++ wrap around exec() but I believe
> there has to be an easier way since GNURadio is a combination of python
> and c++.
>
> The incoming messages arrive at a low frequency and a low data rate so
> I'm not really concerned about processing time.
>
>
>
>
>
>
>
> _______________________________________________
> Discuss-gnuradio mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
>