discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] Problem loading Python block


From: Martin Lülf
Subject: Re: [Discuss-gnuradio] Problem loading Python block
Date: Fri, 1 Feb 2013 16:20:20 +0100
User-agent: SquirrelMail/1.4.22

> Guys,
>
> As i told you my new installation works fine, I eve tested blocks in
> python. Now, the problem is following:
>
> I designed block in python which has None for both input and output
> signature. I wanted to use such block only for receiving messages and for
> writing to terminal some information, etc.
> The constructor of my new block, is executed, but the problem is work
> function is never executed. I put some printing at the beginning of work
> function and nothing happens. The work function looks like this:
>
>
> Could the problem be no inputs and no outputs? Or maybe something else?
>
> Best and thanks
>
> Nemanja
>


Hi Nemanja,

the work function is called by the scheduler, which only calls the work
function, if it has some samples to process. So if your block is not part
of the flow graph (which it isn't since you have no input or output
stream) it will not get called.

You could either create a Thread in the block's constructor which will
call the work function (the start/stop functions seem to not being called
either), or you could try the new message passing interface, where you can
register a callback function that is called whenever a new message
arrives.

Yours
Martin




reply via email to

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