discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] re-initialize multi usrp object


From: Marcus D. Leech
Subject: Re: [Discuss-gnuradio] re-initialize multi usrp object
Date: Fri, 31 Aug 2018 17:39:07 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0

On 08/31/2018 05:23 PM, Sanjoy Basak wrote:
Hi All,
I need to re-initialize multi usrp object in my (c++) application on the runtime. How should I reset the multi usrp object? 
If I use reset command, it gives error on the runtime. 
Could anyone tell me what is the correct way to re-initialize the multi usrp object?

uhd::usrp::multi_usrp::sptr usrp;
string args="addr0=192.168.10.1,addr1=192.168.10.2";
usrp = uhd::usrp::multi_usrp::make(args);
uhd::usrp::subdev_spec_t subdev("A:0 B:0");

//receive and operate
...

//reinitialize usrp
usrp.reset();
string args="addr0=192.168.10.1,addr1=192.168.10.2";
usrp=uhd::usrp::multi_usrp::make(args);
uhd::usrp::subdev_spec_t subdev("A:0 B:0");

I am using usrp x310, ubuntu 14.04 and uhd 3.9 lts.

Best regards
Sanjoy

What is it you wish to "re-initialize"??  You can always destroy the usrp object, and create a fresh one.

But in most cases, I don't see why you need to "reset" the usrp object.



reply via email to

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