[USRP-users] ֻC API questions

Marcus Müller marcus.mueller at ettus.com
Sun Jul 16 05:31:06 EDT 2017


Hello Sivan Toledo,

I'm sorry I'm a bit late to react, but:

since UHD internally still uses Boost, I'm a little afraid that using
the C API is not a good solution here

Best regards,
Marcus
On 07/15/2017 12:46 PM, Sivan Toledo via USRP-users wrote:
> I'm converting a CPP code from UHD 3.8.5 to the C api for 3.10. (The
> main reason for the conversion is that I binaries of my CPP programs
> don't run on both Ubuntu 14 and 16 because of incompatible libboost;
> hopefully using the C API and the Ubuntu uhd-host package will resolve
> this). 
>
> I have a few questions:
>
> 1. Is the following correct, or do I have to "make" the
> string_vector_handle before I pass it to get_rx_gain_names? The manual
> says to always make, but my intuition is that get_rx_gain_names will
> make it for me, given that it gets a pointer to the handle, not the
> handle itself.
>
>   uhd_string_vector_handle gain_names; 
>   uhd_usrp_get_rx_gain_names(usrp, 0 /* channel */, &gain_names); 
>
> 2. Is there a C api version of set_rx_gain
> <https://files.ettus.com/manual/classuhd_1_1usrp_1_1multi__usrp.html#a8234968ad1fefef299ef9541cc193915> (double
> gain, size_t chan=0)? In the header files I found only set_rx_gain but
> with a gain_name argument. The CPP api has two overloaded methods, one
> with a gain-name argument and the other without it. Is the convenience
> method missing from the C API? Can I invoke it by passing NULL for the
> gain name?
>
> Thanks, Sivan Toledo
>
>
> _______________________________________________
> USRP-users mailing list
> USRP-users at lists.ettus.com
> http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ettus.com/pipermail/usrp-users_lists.ettus.com/attachments/20170716/37d54456/attachment-0002.html>


More information about the USRP-users mailing list