I'm trying to get some USRP configuration parameters by calling the
"getter" functions defined in gr::uhd::usrp_block. I have already read the
following thread
<http://lists.ettus.com/pipermail/usrp-users_lists.ettus.com/2016-August/049462.html>but
I could not apply that fix to my use case.

For the moment I've unsuccessfully tried to get the device and gain
settings by calling the corresponding functions from another function
defined in my OOT block:

      double gain;
      size_t chan=0;

      ::uhd::usrp::multi_usrp::sptr usrp =
gr::uhd::usrp_block::get_device();
      gain = gr::uhd::usrp_block::get_gain (chan);


When compiling, I get the following errors:

error: cannot call member function ‘virtual uhd::usrp::multi_usrp::sptr
gr::uhd::usrp_block::get_device()’ without object
       ::uhd::usrp::multi_usrp::sptr usrp =
gr::uhd::usrp_block::get_device();

error: cannot call member function ‘virtual double
gr::uhd::usrp_block::get_gain(size_t)’ without object
       gain = gr::uhd::usrp_block::get_gain (chan);


I guess this error could come from not instantiating the class properly,
however I have not yet found a proper way of fixing it...

Any suggestions?

Thanks beforehand,

Joaquin.
_______________________________________________
USRP-users mailing list
[email protected]
http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com

Reply via email to