discuss-gnuradio
[Top][All Lists]
Advanced

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

[Discuss-gnuradio] A few questions about subclassing gr_block


From: Mark Cottrell
Subject: [Discuss-gnuradio] A few questions about subclassing gr_block
Date: Fri, 3 May 2013 11:04:40 +1200

Hello,

I am trying to create a block that detects sync patterns at baseband tagging the first sample of the pattern using stream tags, then using the tags down stream as part of demodulation.  I have made a few assumptions about how gnuradio works that I would like to validate:

- a sync pattern could span two blocks of samples passed to general_work
- I need to keep SYNC_PATTERN_LENGTH - 1 samples to get around this, so I should be able to use a general block and not output all of the items
- you can't tag historic samples (i.e. samples obtained using set_history), so I can't use that

are these all reasonable?

Currently I have an implementation of the block, but I am having trouble understanding the relationship between ninput_items and noutput_items.  When I feed the block from a file source consisting of 720 samples, I get ninput_items[0] = 720 and noutput_items = 512.  Does this value for noutput_items mean I can only consume and copy 512 of the input samples?  And do I need to implement forecast if I want to output more?

Thanks in advance for any help,
Mark


This email, including any attachments, is only for the intended recipient. It is subject to copyright, is confidential and may be the subject of legal or other privilege, none of which is waived or lost by reason of this transmission.
If you are not an intended recipient, you may not use, disseminate, distribute or reproduce such email, any attachments, or any part thereof. If you have received a message in error, please notify the sender immediately and erase all copies of the message and any attachments.
Unfortunately, we cannot warrant that the email has not been altered or corrupted during transmission nor can we guarantee that any email or any attachments are free from computer viruses or other conditions which may damage or interfere with recipient data, hardware or software. The recipient relies upon its own procedures and assumes all risk of use and of opening any attachments.


reply via email to

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