discuss-gnuradio
[Top][All Lists]
Advanced

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

Block not found in module although it is there


From: Ralf Gorholt
Subject: Block not found in module although it is there
Date: Wed, 5 May 2021 16:38:14 +0200
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.10.0

Dear all,

my problem concerns GNU Radio version 3.8 from the maintenance branch
but it is probably not limited to this version.

I would like to try to adapt the block "ofdm_synchronization" that
Federico Larrocca and others have developed for ISDB-T so that it can be
used for DVB-T. For this purpose I have created the module "gr-dl5eu"
that contains a block called "dvbt_ofdm_synchronization".

As long as the block only passes data from the input to the output
everything is ok. But when I start to add code to the constructor, the
block dvbt_ofdm_synchronization is no longer found in gr-dl5eu when I
run the flow graph.

My constructor looks like this:

dvbt_ofdm_synchronization_impl::dvbt_ofdm_synchronization_impl(int mode,
int cp_length, bool interpolate
    : gr::block("dvbt_ofdm_synchronization",
        gr::io_signature::make(1, 1, sizeof(gr_complex)),
        gr::io_signature::make(1, 1, sizeof(gr_complex)))
{
}

Everything is fine, the block copies data from input to output.

But when I add the variable "d_fft_calculator" to the private section of
the object and the following line just before the opening brace of the
constructor: "    , d_fft_calculator(gr::fft::fft_complex(pow(2.0,
10+mode), true, 1))", I get an error message when I run the flow graph:
"AttributeError: module 'dl5eu' has no attribute
'dvbt_ofdm_synchronization'"

The complete messages are below.

<<< Welcome to GNU Radio Companion v3.8.2.0-113-g729d5a98 >>>
Block paths:
/usr/share/gnuradio/grc/blocks
Loading: "/home/ralfg/gnuradio/dvbt_rx_udp.grc"
>>> Done
Generating: '/home/ralfg/gnuradio/dvbt_rx_udp.py'
Executing: /usr/bin/python3 -u /home/ralfg/gnuradio/dvbt_rx_udp.py

qt5ct: using qt5ct plugin
gr-osmosdr 0.2.0.0 (0.2.0) gnuradio v3.8.2.0-113-g729d5a98
built-in source types: file rtl rtl_tcp rfspace redpitaya
Using device #0 Realtek RTL2838UHIDIR SN: 00000001
Found Rafael Micro R820T tuner
Setting rtl clock to 28800000 Hz.
Setting tuner clock to 28800000 Hz.
[R82XX] PLL not locked!
Exact sample rate is: 1142857,021756 Hz
[R82XX] PLL not locked!
Traceback (most recent call last):
File "/home/ralfg/gnuradio/dvbt_rx_udp.py", line 404, in <module>
main()
File "/home/ralfg/gnuradio/dvbt_rx_udp.py", line 380, in main
tb = top_block_cls()
File "/home/ralfg/gnuradio/dvbt_rx_udp.py", line 272, in __init__
self.dl5eu_dvbt_ofdm_synchronization_0 =
dl5eu.dvbt_ofdm_synchronization(1, 0.125, True)
AttributeError: module 'dl5eu' has no attribute 'dvbt_ofdm_synchronization'
>>> Done (return code 1)

In the original code the initialization of "d_fft_calculator" the
initializatiion is done this way. I have the same problem when I change
d_fft_calculator to a pointer type and initialize it with "new" inside
of the constructor.

Can anybody give me a hint what is happening here? Is there something
missing in the .yml file? I have got the impression that C++ and GNU
Radio are indeed not made for beginners :-(

Thank you very much for your help!

Kind regards,

Ralf



reply via email to

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