1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-12-14 04:00:34 +00:00

Adding UHD device filter by serial number option

This commit is contained in:
Javier 2017-05-31 11:45:26 +02:00
parent 9c65531fed
commit f69cc2491c

View File

@ -62,7 +62,12 @@ UhdSignalSource::UhdSignalSource(ConfigurationInterface* configuration,
{
dev_addr["addr"] = device_address_;
}
//filter the device by serial number if required (useful for USB devices)
std::string device_serial = configuration->property(role + ".device_serial", empty);
if (empty.compare(device_serial) != 0) // if not empty
{
dev_addr["serial"] = device_serial;
}
subdevice_ = configuration->property(role + ".subdevice", empty);
clock_source_ = configuration->property(role + ".clock_source", std::string("internal"));
RF_channels_ = configuration->property(role + ".RF_channels", 1);