[Top][All Lists]

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

Re: [Discuss-gnuradio] coerce endpoint - hier block API question with co

From: Martin Braun
Subject: Re: [Discuss-gnuradio] coerce endpoint - hier block API question with code
Date: Mon, 8 Aug 2011 11:35:03 +0200
User-agent: Mutt/1.5.20 (2009-06-14)

On Sat, Aug 06, 2011 at 10:08:19PM +0200, Marius wrote:
> Hi!
> I'm creating an integration for the current GNU Radio >= 3.4 tree
> upwards for a 3d FFT display block.
> I put the code I got there, and added some changes:
> https://github.com/wishi/gr_3d_fft
> My probem is:
> Traceback (most recent call last):
>   File "usrp_gl_fft.py", line 81, in <module>
>     main ()
>   File "usrp_gl_fft.py", line 77, in main
>     app = stdgui2.stdapp(app_flow_graph, "3d")
> [not interesting]
>   File "/usr/local/lib/python2.6/dist-packages/gnuradio/gr/top_block.py",
> line 128, in _connect
>     (dst_block, dst_port) = self._coerce_endpoint(dst)
>   File "/usr/local/lib/python2.6/dist-packages/gnuradio/gr/top_block.py",
> line 139, in _coerce_endpoint
>     raise ValueError("unable to coerce endpoint")
> ValueError: unable to coerce endpoint
> I know this is related to the hierarchical block API, but I don't know
> what I have to change. Could someone help me - at least a little?
> I think there's too much to do left, however I don't find a way to
> treat this error.
> If that works I'll do GRC integration and clean up the OpenGL stuff
> (the code is from the source mentioned in the repository, but GPL).
> I'm missing this kind of 3d perspective so I tried to create this
> graphical sink based on the mentioned code.

Hi Marius,

this usually means something like there's an 'open' connection (it's
like leaving that one pin of your µC dangling when it should be grounded

A quick look at the code suggests your error is in the fft_sink_c class
(possibly others). In fact, you've thoroughly misunderstood what a
hier_block does.

A hier_block works just like any other block (from the outside). You
should have a look at some of the examples in

Two things immediately stand out:

- You're not calling the hier_block constructor.
- You pass 'fg' to the block, but it *is* part of the flow graph.
- Since this is a sink, you must have something like
  self.connect(self, ...)

As I said, have a look at the examples. Your code can't work in this

Good luck,


Karlsruhe Institute of Technology (KIT)
Communications Engineering Lab (CEL)

Dipl.-Ing. Martin Braun
Research Associate

Kaiserstraße 12
Building 05.01
76131 Karlsruhe

Phone: +49 721 608-43790
Fax: +49 721 608-46071

KIT -- University of the State of Baden-Württemberg and
National Laboratory of the Helmholtz Association

Attachment: pgpy9dJEeqAui.pgp
Description: PGP signature

reply via email to

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