|
From: | Marcus Müller |
Subject: | Re: [Discuss-gnuradio] trouble creating PMT uniform vectors in python that are the same type, but differ in value |
Date: | Mon, 21 Dec 2015 20:39:31 +0100 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 |
Hi Richard, On 21.12.2015 20:03, Collins, Richard
wrote:
Ha, I had fun writing it :) Also, when you write a python block's work or general work function, I think the input_ and output_items structure are numpy arrays. Not 100% sure, so please check:) Yes, they should be in-order. I don't think we're setting a maximum depth for the message handling queues, so, no, I don't expect things to get lost. Well, that depends on the signal you want to transmit. Usually, you cannot just take "few" samples, and make "100 times as many" of those and actually win something by doing so -- it's still the same signal, but now "extended" by 99 samples between each of the original samples. Ah, I'd love to tell you that TSBs solve all problems of this, but no. You seem to have sample chunks larger than what PDU to Tagged Stream Block is able to produce at once, and as mentioned, Tagged Stream Blocks rely on the fact that the length tag-marked sample chunk gets passed to the block in one piece. So what PDU to tagged stream can't do, tagged stream align can't do either. My suspicion is that since GNU Radio, when instantiating the flow graph, doesn't know how big your sample packets are going to be, reserves a sample buffer that's simply too small to fit a single one of your packets. Solution to that is going into the "advanced" tab in GRC, and setting the minimum size of the output buffer to something >= 2*max packet size (not too sure about the factor of 2 in there, but usually, GNU Radio doesn't ask blocks to produce more than half their output buffer, but that might be different for TSBs). :) That's actually the reason the USRP sink has a tagged stream block mode (which is what it operates in when you set the "length tag" property): In that mode, it instructs UHD (which in turns instructs the host-to-device streamer/DSP core to handle that) to expect as many samples as promised by the length tag, and then to go back to "idling". Best regards, Marcus
|
[Prev in Thread] | Current Thread | [Next in Thread] |