[Top][All Lists]

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

Re: [Discuss-gnuradio] floats over UDP into GRC?

From: Mark Cetilia
Subject: Re: [Discuss-gnuradio] floats over UDP into GRC?
Date: Tue, 13 Sep 2011 20:24:23 -0400

Thanks so much Marcus, this makes perfect sense…


mark.cetilia.org | mem1.com | reduxproject.com

On Sep 13, 2011, at 7:45 PM, Marcus D. Leech wrote:

>> I'm producing the stream in C++ (using openFrameworks) and sending the data 
>> as char arrays,
>> and have confirmed that this is indeed all that is being sent (e.g. "1.25")…
> So, you're sending them in ASCII?  As ASCII strings?
> GRC/gnuradio has no method for dealing with that.  The UDP block assumes 
> native machine-binary format for data coming in
>  over UDP.  Doing it in ASCII (Or Unicode, or whatever) strings will be 
> hugely inefficient, both in terms of bandwidth required--
>  it takes many more bytes to represent a floating-point number in ASCII, than 
> in the native binary format, and converting from
>  strings back into the native binary format is also quite expensive.  Since 
> UDP is entirely binary transparent, there's no reason
>  to send them as ascii strings.  The only thing you have to watch out for is 
> if the raw floating-point format between your two
>  machines is different.  But between x86-family machines, it's all the same.
> -- 
> Marcus Leech
> Principal Investigator
> Shirleys Bay Radio Astronomy Consortium
> http://www.sbrac.org

reply via email to

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