Dear Mr. Askar,

you can get the detailed names of the available gain elements of every device 
by calling

auto gain_names = my_multi_usrp->get_rx_gain_names();

and then do something fun like:

for(const auto& gain_name : gain_names) {
    auto gain = my_multi_usrp->get_rx_gain(gain_name);
    std::cout << gain_name << ": " << gain << " dB(arbitrary)\n";
}

Setting the gains works just the same, 
my_multi_usrp->set_rx_gain(gain_element_name, value).

However, 99.5% of times¹ you *don't* want to set the gain to any element in 
isolation; UHD
was coded to choose the most sensible combination of gains distributed across 
the settable
gain elements.

There's a relatively new API for *Gain Profiles*: With a call to
my_multi_usrp->get_rx_gain_profile_names() you get a list of available gain 
profiles (I
must admit I don't know which ones are supported on CBX-120; you might only get 
an empty
list meaning there's but one default profile); you can set them with the 
eponymous setter
method.

May I ask what the intention behind wanting to set that individual gain instead 
of simply
setting the overall RX gain is? Maybe we can advise to your advantage based on 
that.

Best regards,
Marcus Müller

¹ Note that 87.56% of such numbers are totally made up

DISCLAIMER: Any attached Code is provided As Is. It has not been tested or 
validated as a
product, for use in a deployed application or system, or for use in hazardous
environments. You assume all risks for use of the Code. Use of the Code is 
subject to
terms of the licenses to the UHD or RFNoC code with which the Code is used. 
Standard
licenses to UHD and RFNoC can be found at 
https://www.ettus.com/sdr-software/licenses/.

NI will only perform services based on its understanding and condition that the 
goods or services (i) are not for the use in the production or development of 
any item produced, purchased, or ordered by any entity with a footnote 1 
designation in the license requirement column of Supplement No. 4 to Part 744, 
U.S. Export Administration Regulations and (ii) such a company is not a party 
to the transaction.  If our understanding is incorrect, please notify us 
immediately because a specific authorization may be required from the U.S. 
Commerce Department before the transaction may proceed further.

On 15.02.21 17:48, Askar, Ramez via USRP-users wrote:
>
> Dear Sir or Madam,
>
>  
>
> We are using the  X310 with CBX-120 daughter cards. How can we get and set 
> the digital
> RX gain (ads62p48 gain) from C++ application?
>
>  
>
>  
>
> Best regards / Mit freundlichen Grüßen
>
> --
> Askar, Ramez, M.Sc.
> Research Associate / Project Manager / Delegate
>
> Wireless Communications and Networks
> Fraunhofer Institute for Telecommunications, Heinrich Hertz Institute, HHI
> Einsteinufer 37, 10587 Berlin, Germany
> +49 (0)30 31002-628
> ramez.as...@hhi.fraunhofer.de <mailto:ramez.as...@hhi.fraunhofer.de>
> www.hhi.fraunhofer.de <http://www.hhi.fraunhofer.de/>
>
>  
>
>
> _______________________________________________
> USRP-users mailing list
> USRP-users@lists.ettus.com
> http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com

_______________________________________________
USRP-users mailing list
USRP-users@lists.ettus.com
http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com

Reply via email to