discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] Continuos data transmission using messages ...


From: Kshitij Kumar Singh
Subject: Re: [Discuss-gnuradio] Continuos data transmission using messages ...
Date: Tue, 26 Feb 2008 12:02:31 -0500


> I think you are misunderstanding how gr.message_sink works.  Since
> it's possible to set the item size small (e.g., gr.sizeof_float), it
> returns as many samples as it can in a message.  It does however
> provide you information about what it did in the arg1 and arg2 field.
> 
>   // build a message to hold whatever we've got
>   gr_message_sptr msg = gr_make_message(0,            // msg type
>                                       d_itemsize,     // arg1 for other end
>                                       noutput_items,  // arg2 for other end 
> (redundant)
>                                       noutput_items * d_itemsize);   // len 
> of msg
> 
> Eric
Eric, thanks for the reply and for clearing up the confusion. I now
understand how this works. Sorry if I did not phrase my question
correctly earlier: I want to transmit a file using packets repeatedly,
i.e. the first packet transmits the entire contents of file(as a string,
size <= 4096), the second packet again transmits the entire file and so
on. I thought that the best place to start was tx_voice.py since all I
needed to do was replace the audio_rx class with my own which got the
data from a file. The program ran perfectly without glitches but after
the sending the first packet, I was unable to loop around for a second
time (Still can't figure it out). So I decided to start from scratch and
got confused with the message stuff.

Thanks for your patience.

Regards,
Kshitij






reply via email to

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