Hi Cristian,
I've kind of wrote a blog entry about that:Thanks for your answer Marcus.
2017-06-28 5:52 GMT-05:00 Marcus Müller <marcus.mueller@ettus.com>:
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.
It is not clear for me how the common inputs work (I mean the not PMT type).
It has a buffer, and save the incoming values in a buffer, and later when the work() function is called use all this values until the buffer is empty?
https://www.gnuradio.org/blog/buffers/
That's not a parameter you can set!
I'm going to build the block, and i tell you how it is going.
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.
I set that parameter in several values, that screenshot had that value, but i used a lot and always the flowgraph failed.
Thanks in advance.
Best regards,
Cristian
______________________________Best regards,
Marcus
On 28.06.2017 06:06, Cristian Rodríguez wrote:
What blocks could you recommend me to do this conversion?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.
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 Discuss-gnuradio@gnu.org https://lists.gnu.org/mailman/ listinfo/discuss-gnuradio _________________ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org https://lists.gnu.org/mailman/ listinfo/discuss-gnuradio
No comments:
Post a Comment