[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: |
Sun, 18 Sep 2011 22:14:28 -0400 |
Ok so I have made some headway & am now sending floats over UDP as binary data
(4 bytes),
followed by a null packet (1 byte of "\0") but am not sure how to unpack the
data into a float in GRC…
It's all happening within the same machine on an Intel Mac so there shouldn't
be any issues with endianness.
Any ideas / suggestions?
Cheers,
Mark
--
mark.cetilia.org | mem1.com | reduxproject.com
On Sep 13, 2011, at 8:24 PM, Mark Cetilia wrote:
> Thanks so much Marcus, this makes perfect sense…
>
> Cheers,
> Mark
>
> --
> 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
>>
>>
>
>
> _______________________________________________
> Discuss-gnuradio mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
>
- [Discuss-gnuradio] Transmitting additional data from N210 to the PC, Eral Tuerkyilmaz, 2011/09/05
- Re: [Discuss-gnuradio] Transmitting additional data from N210 to the PC, Josh Blum, 2011/09/05
- Re: [Discuss-gnuradio] Transmitting additional data from N210 to the PC, Eral Tuerkyilmaz, 2011/09/13
- [Discuss-gnuradio] floats over UDP into GRC?, Mark Cetilia, 2011/09/13
- Re: [Discuss-gnuradio] floats over UDP into GRC?, Marcus D. Leech, 2011/09/13
- Re: [Discuss-gnuradio] floats over UDP into GRC?, Andrew Rich, 2011/09/13
- Re: [Discuss-gnuradio] floats over UDP into GRC?, Mark Cetilia, 2011/09/13
- Message not available
- Re: [Discuss-gnuradio] floats over UDP into GRC?, Marcus D. Leech, 2011/09/13
- Re: [Discuss-gnuradio] floats over UDP into GRC?, Mark Cetilia, 2011/09/13
- Re: [Discuss-gnuradio] floats over UDP into GRC?,
Mark Cetilia <=
- Re: [Discuss-gnuradio] Transmitting additional data from N210 to the PC, Josh Blum, 2011/09/13
- Re: [Discuss-gnuradio] Transmitting additional data from N210 to the PC, Eral Tuerkyilmaz, 2011/09/16