aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2019-02-26 15:41:51 -0800
committerMichael West <michael.west@ettus.com>2019-03-05 10:32:53 -0800
commit10843679bde75cd77b0d6d518177a07b1949ade8 (patch)
treee20cb935b4a224a26f3210930fb20ef9ceb90a0e /host/lib/usrp
parente26b5ae026e1b83dbd2de36febf9adfd32d12226 (diff)
downloaduhd-10843679bde75cd77b0d6d518177a07b1949ade8.tar.gz
uhd-10843679bde75cd77b0d6d518177a07b1949ade8.tar.bz2
uhd-10843679bde75cd77b0d6d518177a07b1949ade8.zip
x300: Enable x300_device_args.to_string()
Before, it was only returning the master clock rate. Note: This function is never used in UHD, this is merely for completion's sake.
Diffstat (limited to 'host/lib/usrp')
-rw-r--r--host/lib/usrp/x300/x300_device_args.hpp33
1 files changed, 31 insertions, 2 deletions
diff --git a/host/lib/usrp/x300/x300_device_args.hpp b/host/lib/usrp/x300/x300_device_args.hpp
index bdb3762af..b9294b48b 100644
--- a/host/lib/usrp/x300/x300_device_args.hpp
+++ b/host/lib/usrp/x300/x300_device_args.hpp
@@ -116,10 +116,39 @@ public:
return _enable_tx_dual_eth.get();
}
-
inline virtual std::string to_string() const
{
- return _master_clock_rate.to_string() + ", " + "";
+ // We leave out blank_eeprom for safety reasons
+ return (!_first_addr.get().empty() ? (_first_addr.to_string() + ", ") : "")
+ + (!_second_addr.get().empty() ? (_second_addr.to_string() + ", ") : "")
+ + _master_clock_rate.to_string() + ", " + _dboard_clock_rate.to_string()
+ + ", "
+ + (_system_ref_rate.get() != DEFAULT_SYSREF_RATE
+ ? (_system_ref_rate.to_string() + ", ")
+ : "")
+ + (_time_source.get() != DEFAULT_TIME_SOURCE
+ ? (_time_source.to_string() + ", ")
+ : "")
+ + (_clock_source.get() != DEFAULT_CLOCK_SOURCE
+ ? (_clock_source.to_string() + ", ")
+ : "")
+ + (_resource.get().empty() ? "" : (_resource.to_string() + ", "))
+ + (_self_cal_adc_delay.get() ? (_self_cal_adc_delay.to_string() + ", ")
+ : "")
+ + (_ext_adc_self_test.get() ? (_ext_adc_self_test.to_string() + ", ") : "")
+ + (_ext_adc_self_test.get() && (_ext_adc_self_test_duration.get() != 30.0)
+ ? (_ext_adc_self_test.to_string() + ", ")
+ : "")
+ + (_recover_mb_eeprom.get() ? (_recover_mb_eeprom.to_string() + ", ") : "")
+ + (_ignore_cal_file.get() ? (_ignore_cal_file.to_string() + ", ") : "")
+ + ((!_resource.get().empty()
+ && _niusrprio_rpc_port.get() != NIUSRPRIO_DEFAULT_RPC_PORT)
+ ? (_niusrprio_rpc_port.to_string() + ", ")
+ : "")
+ + (_has_fw_file.get() ? _fw_file.to_string() + ", " : "")
+ + (_enable_tx_dual_eth.get() ? (_enable_tx_dual_eth.to_string() + ", ")
+ : "")
+ ;
}
private: