Eric Blossom wrote:
> 
> On Fri, Jul 18, 2008 at 03:19:08PM -0700, irene159 wrote:
>> 
>> Hi,
>> 
>> I have the same problem. I have already taken a look at gr_simple_framer,
>> but code seems slightly complicated. I would appreciate any
>> explanations/comments on how to code different input and output rates.
>> 
>> In the block I am coding the number of input items for an output item
>> isn't
>> constant. How can I handle this?
>> 
>> Thanks,
>> 
>> Irene
> 
> All is revealed in:
> 
>   http://www.gnu.org/software/gnuradio/doc/howto-write-a-block.html
> 
> Basically you subclass gr_block, provide forecast and general_work
> methods, then call consume/consume_each at the tail end of your
> general_work function.
> 
> Eric
> 
> 
> _______________________________________________
> Discuss-gnuradio mailing list
> Discuss-gnuradio@gnu.org
> http://lists.gnu.org/mailman/listinfo/discuss-gnuradio
> 
> 


Thanks, I think I am starting to figure thinks out.

When referring to gr_simple_framer (which I am using as an example), may you
please help me understand the processing part (lines 76 to 89 in the .cc
file)?

So, we are adding a synchro sequence at the beginning of a frame of
‘payload_bytesize’ bytes. I suppose lines 79 to 87 in the while loop add the
synchro sequence end the sequence number. Line 89 copies ‘payload_bytesize’
bytes of input data to output stream after de synchro sequence. But why
write 0x55 ‘noutput_items’ bytes to ‘out’ ? 

-- 
View this message in context: 
http://www.nabble.com/Different-input-output-rate-tp709242p18564972.html
Sent from the GnuRadio mailing list archive at Nabble.com.



_______________________________________________
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio

Reply via email to