Small example - using UHD function

Hello everyone,
It’s a bit of time that I try to use the functions of class UHD, but
unfortunately without success.

I have prepared a small example in which you can reproduce the error
obtained when launching the simulation.

Since it makes use of gr-802.11 you need to install this library,
and also install the block that I created, folder gr-test_simone
attached
here, the name of the code is using_uhd.
In short, this block should work as an AGC, in particular it reads the
gain
from the USRP, processes, and writes the new value.
I would be very grateful if someone with a little patience can correct
me
where I’m wrong!

-> Settings for using_uhd block,
alpha = damping constant = 0.001
reference = allowed_ADC_range^2 = 0,025 half dynamic (full dynamic is
1)

obtained error:


Traceback (most recent call last):
File “/home/simone/Scrivania/top_block.py”, line 238, in
tb = top_block(address=options.address)
File “/home/simone/Scrivania/top_block.py”, line 76, in init
self.test_simone_using_uhd_0 = test_simone.using_uhd(0.001, 0.025)
AttributeError: ‘module’ object has no attribute ‘using_uhd’


I think that the problem is how I use address in using_uhd_impl.cc when
I
call the “sptr = make”!

Cordially,
Simone Ciccia

Simone,

you’re asking a bit much of people who are essentially volunteers if
they need to install several modules before they can run and test your
code for you.

Obviously, SWIG isn’t picking up the class you wrote. There can be
several reasons for this, maybe you forgot it in your SWIG files (are
you using gr_modtool?) or your block definition is incorrect…

I suggest you start with something simpler first, until you’ve learned
the intricacies of building OOTs. We have the new ‘guided tutorials’ on
the website to help you with this.

M