I am more than willing to try new message passing interface. The idea with
the thread is a bit old, that's what I have heard, from more experienced
guys. Are there any blocs that uses new message passing interface, so that
I can take a look how it works?

@Tom
Nothing happened by adding self.connect(self) in top_block.

This block design style i picked up from grExtras module. Maybe they use
different "something", and their block is called even when it has no
inputs/outputs.

Best
Nemanja


On Fri, Feb 1, 2013 at 4:30 PM, Nemanja Savic <vlasi...@gmail.com> wrote:

> I am more than willing to try new message passing interface. The idea with
> the thread is a bit old, that's what I have heard, from more experienced
> guys. Are there any blocs that uses new message passing interface, so that
> I can take a look how it works?
>
> @Tom
> Nothing happened by adding self.connect(self) in top_block.
>
> Best
> Nemanja
>
>
> On Fri, Feb 1, 2013 at 4:20 PM, "Martin Lülf" <m...@mluelf.de> wrote:
>
>> > 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
>>
>>
>> _______________________________________________
>> Discuss-gnuradio mailing list
>> Discuss-gnuradio@gnu.org
>> https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
>>
>
>
>
> --
> Nemanja Savić
>



-- 
Nemanja Savić
_______________________________________________
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

Reply via email to