discuss-gnuradio
[Top][All Lists]
Advanced

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

single pad sink hier block fails but similar two output block works


From: aardric
Subject: single pad sink hier block fails but similar two output block works
Date: Fri, 29 Nov 2024 19:27:42 +0000

Version: 3.10.11.0-1

I have a simple hier block with two output pad sinks that works as 
expected. These two outputs are nearly identical but independent 
streams. I created a very similar hier block with only a single stream 
and one output pad sink.  Executing a flow graph containing the latter 
hier block generates the error:

".local/lib64/python3.11/site-packages/gnuradio/gr/hier_block2.py", line 
126, in connect
     self.primitive_connect(*args)
ValueError: port number 0 exceeds max of (none)

The offending line 126:

     def connect(self, *args):
         """
         Connect two or more block endpoints.  An endpoint is either a 
(block, port)
         tuple or a block instance.  In the latter case, the port number 
is assumed
         to be zero.

         To connect the hierarchical block external inputs or outputs to 
internal block
         inputs or outputs, use 'self' in the connect call.

         If multiple arguments are provided, connect will attempt to 
wire them in series,
         interpreting the endpoints as inputs or outputs as appropriate.
         """
         self.primitive_connect(*args)


Working two output block init:

     def __init__(self, E6bCode_file='0', E6cCode_file='0'):
         gr.hier_block2.__init__(
             self, "E6bc_code_source",
                 gr.io_signature(0, 0, 0),
                 gr.io_signature.makev(2, 2, [gr.sizeof_float*1, 
gr.sizeof_float*1]),
         )


errant single output block init:

     def __init__(self, HxCode_file='0'):
         gr.hier_block2.__init__(
             self, "Hx_code_source",
                 gr.io_signature(0, 0, 0),
                 gr.io_signature(1, 1, gr.sizeof_float*1),
         )


Is there a place I should look for the root of the problem? I am 
struggling to understand this. I thought to ask now in anticipation of 
still struggling at the end of the day.


Rick






reply via email to

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