Vasil,
Thank you for your patient discussion of my issues. You have presented to me
the best description of the problem that I faced of anyone that has
responded to my questions.
I have learned a great deal in the process.
Now I need to move on and find another implementation to solve my problem.
Obviously what I was trying to do will not work.
Thanks again.
Jim
-----Original Message-----
From: Vasil Velichkov
Sent: Saturday, September 30, 2023 9:26 AM
To: Elmore’s
Cc: discuss-gnuradio@gnu.org
Subject: Re: Index Error: output_index < noutputs
Hi Jim,
On 29/09/2023 17.58, Elmore’s wrote:
Thanks for the answer. I thought that since I imported the Receive
constructor I would be able to create a new instance of the Receive class
not a new class.
You are creating a new instance (not a new class) and this is exactly your
problem. In freq.py you need to obtain a reference to the instance that has
been created in your top flowgraph and call set_wave_select to this
instance.
Also, since a message is asynchronous I don’t think that will work since I
need precise timing.
But your solution is not any more synchronous then using messages. In
gnuradio all blocks are running in their own threads in parallel (more or
less) and have their own input and output buffers. Each block consume and
produce samples as fast as it can. The fact that one block currently process
the N-th sample does not necessary means that the other block is also
processing this very same N-th sample. Depending on the sampling rate this
other block can be few million samples behind (if it is a downstream) or
ahead. Calling a member function is not any more synchronous than sending a
message because you don't know how far behind or ahead is the other block.
Both solutions are non-deterministic - every time you run the flowgraph with
the same input you would get slightly different result.
P.S.
Please keep the mailing list address in the loop.
Regards,
Vasil
Jim
Sent from my iPhone
On Sep 29, 2023, at 9:55 AM, Vasil Velichkov <vvvelich...@gmail.com>
wrote:
Hi Jim,
On 29/09/2023 05.00, Elmore Family wrote:
If I am not properly instantiating the objects then I am very confused.
I don't understand how I could be creating an instance of the
FT8_Receive block outside of the flowgraph.
In freq.py on line 64 you are calling the FT8_Receive class constructor.
64 RCV = FT8_Receive()
This basically create a new instance FT8_Receive class. Have a look in
the python file generated by your top flowgraph (top_block.py), you would
have something like
369 self.FT8_Receive_0 = FT8_Receive(
370 wave_select=0,
371 )
Here the first instance is created and later this instance gets connected
to other blocks in your flowgraph.
384 self.connect((self.Receive, 2), (self.FT8_Receive_0, 0))
You can try adding a print statement in FT8_Receive constructor and check
how many time it gets printed on your terminal.
If this is the case, how do I create the proper instance?
I'm not sure how to pass a reference to this first instance of FT8_Recive
to freq.py.
I'm usually using message ports when available in order to avoid tight
coupling between blocks. The selector block has iindex port that you can
use to change the input port, see
https://wiki.gnuradio.org/index.php/Selector#Messages
Regards,
Vasil
-----Original Message----- From: Vasil Velichkov
Sent: Thursday, September 28, 2023 5:00 AM
To: Elmore Family
Cc: discuss-gnuradio@gnu.org
Subject: Re: Index Error: output_index < noutputs
Hi Elmore,
On 28/09/2023 04.58, Elmore Family wrote:
I moved the Selector code (i.e. set_wave_select(wave_select)) into the
portion of my code which runs after the flowgraph is running. I still
get the same error.
Where did you moved it? Can you provide the modified source code?
Are you sure that you are calling set_wave_select() to the correct
instance of FT8_Receive block, that is actually part of your flowgraph?
Previously you were creating a new instance of FT8_Receive block that
was not part of any flowgraph and because of this it would never be run,
the check_topology() would never be called on this specific instance.
Regards,
Vasil
--
This email has been checked for viruses by AVG antivirus software.
www.avg.com