I have a B200 mini. I would like a function in C++ that returns a flag regarding the hardware connection. So if there is a hardware connection, the function return 1. If there is not a connection, it returns 0. Does ettus have any functions like this?

1

There are 1 answers

0
Loufylouf On BEST ANSWER

As you are using UHD, you can use the function uhd::device::find. In any cases, it will return you an std::vector<uhd::device_adrr_t>. So if you give an hint to the find function, you can simply verify that your device is connected by checking the size of the vector returned. If you don't give any hint to the function, it will return all devices connected to the computer. You can then iterate and search for your specific device.