discuss-gnuradio
[Top][All Lists]
Advanced

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

[Discuss-gnuradio] A question about function gr::block::set_history()


From: Kun Qian
Subject: [Discuss-gnuradio] A question about function gr::block::set_history()
Date: Mon, 19 May 2014 05:14:39 -0700 (PDT)

Hi, 

I wrote a block using gnuradio history functionality. The block is inherited
from gr::block (built by command "gr_modtool add -t general my_block"), with
history set to a bit large number, 320. I then finished rest parts of the
block.

I run the flowgraph and output the input buffer of this block when the
general_work() function is called. Then I found the history of the block is
stored at the end of the input buffer, which is not as what the tutorial
said.

For example, suppose my block is prepended by a delay block with delay value
set to 16, the content of the input buffer of my block at the first time
when general_work() is called is 336 complex zeros. Then my block consume
all 16 zeros by calling consume_each(16) and return the number of output
items.  According the description of gnuradio history functionality, the
content of the input buffer of my block at the second time when
general_work() is called ought to be 320 complex zeros (history) followed by
some data items. Yet in fact, what I get at second time is some data items
followed by 320 complex zeros!

I have no idea why it happens. Could anyone help me please? Thank you!



--
View this message in context: 
http://gnuradio.4.n7.nabble.com/A-question-about-function-gr-block-set-history-tp48313.html
Sent from the GnuRadio mailing list archive at Nabble.com.



reply via email to

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