discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] Convert Float to PMT in a Gnuradio flowgraph


From: Marcus Müller
Subject: Re: [Discuss-gnuradio] Convert Float to PMT in a Gnuradio flowgraph
Date: Wed, 28 Jun 2017 12:52:12 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0

Hi Cristian,

the sending of values from within work() is really just a one liner (and I think you'd do it right – just send a pmt::from_double() using msg_port_pub) so you'd just write a block for that.

Anyway, your flow graph is probably misbehaving because you set the throttle rate to 1. That means that when the trottle is presented with N samples on the input buffer, it will wait N seconds.

N depends on the scheduling of this flow graph, but might typically be something like 1024, which in turn means that your flow graph starts, Signal source generates N items, Throttle gets called with N items, and then just sleeps for N seconds – that's nearly 20 min for N=1024 – before Complex to Mag gets 1024 items, processes them (likely all at once, though it's perfectly free to first process any number smaller than N, and be repeatedly called), and so on.

Best regards,

Marcus


On 28.06.2017 06:06, Cristian Rodríguez wrote:
Hi all.

I'm implementing this flowgraph.

Imágenes integradas 1

I want to calculate the power in the antenna, which is set as float and later convert it to a PMT type. I don't know if it is possible.

I tried to build the above flowgraph, My idea was to convert the float type to a tagged stream and later it in PMT type. Though the flowgraph can do that, it is not working as I expected.

What blocks could you recommend me to do this conversion?

In C++ word i want to:

float x=output_of_Moving average.
pmt::cons(pmt::PMT_NIL, pmt::from_float(x))


Thanks a lot.

Best regards,

Cristian
 


_______________________________________________
Discuss-gnuradio mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


reply via email to

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