|
From: | Kyeong Su Shin |
Subject: | Re: return from python block |
Date: | Wed, 4 Dec 2019 10:44:53 +0000 |
Hello Sarandis:
The 'list' that you are dealing with in your Python block is actually a (part of a) buffer with a pre-defined length, and GNU Radio already has a reference to that buffer. So, you do not need to tell (return) that to GNU Radio. What you do need to tell to GNU
Radio is number of samples that you actually wrote to that buffer. Your return statement is used to povide that information to GNU Radio.
"return len(output_items[0])" assumes that you wrote len(output_items[0]) samples to the output buffer (and processed the same number of samples from the input buffer, if the block is sync_block. If it is basic_block, you should use "comsume" function to tell
that information separately). If you did not write that many samples to the output buffer, then you must change that value to the number of samples that you actually wrote to the output buffer.
Regards,
Kyeong Su Shin
보낸 사람: sarandis. Doulgeris <address@hidden> 대신 Discuss-gnuradio <discuss-gnuradio-bounces+ksshin=address@hidden>
보낸 날짜: 2019년 12월 4일 수요일 오후 6:00 받는 사람: address@hidden <address@hidden> 제목: return from python block Hi . I'm having trouble understanding why i should return len(output_items[0]) and not the list itself output_items[0].
|
[Prev in Thread] | Current Thread | [Next in Thread] |