[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Discuss-gnuradio] Cannot get Socket-to-blob and blob-to-Socket to w
From: |
Josh Blum |
Subject: |
Re: [Discuss-gnuradio] Cannot get Socket-to-blob and blob-to-Socket to work with float values |
Date: |
Tue, 10 Jul 2012 10:12:59 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120615 Thunderbird/13.0.1 |
On 07/10/2012 10:12 AM, Josh Blum wrote:
>
>
> On 07/10/2012 09:34 AM, Tommy Tracy wrote:
>> Hello everyone,
>>
>> I'm doing some work with Josh Blum's extras. Basically, I made the
>> easiest possible message-passing program I could think of.
>>
>
> Floats have a size of 4 bytes.
> You should set the item size parameter to 4.
>
I replied too quickly. Take a look at the stream to blob/blob to stream
blocks.
-josh
> -josh
>
>> Signal Source [sample:44.1k, freq:1k] ----(float)----> Extras: Blob
>> to Socket[UDP, 127.0.0.1, 12345]
>>
>> Extras: Socket to Blob[UDP, 127.0.0.1, 12345] -----(float)------>Audio
>> Sink[sample:44.1k]
>>
>> When I attempt to run this, I get the following error message:
>>
>> File "/home/ttracy/Documents/GNURADIO/examples/companion/top_block.py",
>> line 41, in __init__
>> self.connect((self.gr_sig_source_x_0, 0), (self.extras_blob_to_socket_0,
>> 0))
>> File "/usr/local/lib/python2.7/dist-packages/gnuradio/gr/top_block.py",
>> line 124, in connect
>> self._connect(points[i-1], points[i])
>> File "/usr/local/lib/python2.7/dist-packages/gnuradio/gr/top_block.py",
>> line 130, in _connect
>> dst_block.to_basic_block(), dst_port)
>> File
>> "/usr/local/lib/python2.7/dist-packages/gnuradio/gr/gnuradio_core_runtime.py",
>> line 1836, in primitive_connect
>> Traceback (most recent call last):
>> File "/home/ttracy/Documents/GNURADIO/examples/companion/top_block.py",
>> line 54, in <module>
>> return _gnuradio_core_runtime.gr_top_block_sptr_primitive_connect(self,
>> *args)
>> ValueError: itemsize mismatch: sig_source_f(1):0 using 4, blob_to_udp
>> wrapper(6):0 using 1
>>
>> Unfortunately, I have no idea what this stack trace is telling me. Can
>> it not handle Floats as an input?
>>
>> Thanks for the help!
>>
>