|
From: | Cristian Rodríguez |
Subject: | Re: [Discuss-gnuradio] Convert Float to PMT in a Gnuradio flowgraph |
Date: | Thu, 29 Jun 2017 13:29:30 -0500 |
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:
What blocks could you recommend me to do this conversion?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.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.Hi all.I'm implementing this flowgraph.
In C++ word i want to:
float x=output_of_Moving average.Thanks a lot.
pmt::cons(pmt::PMT_NIL, pmt::from_float(x))
Best regards,
Cristian
_______________________________________________ Discuss-gnuradio mailing list address@hidden https://lists.gnu.org/mailman/ listinfo/discuss-gnuradio
_______________________________________________
Discuss-gnuradio mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
[Prev in Thread] | Current Thread | [Next in Thread] |