aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2019-02-26 15:41:51 -0800
committerBrent Stapleton <brent.stapleton@ettus.com>2019-02-28 11:52:21 -0800
commitcbaa0bb6dbf36fcbd9d602eefc07b7dcac2ef4dc (patch)
tree343168f416802625c791e56cf7f1b9fed35e4900 /host/lib
parent61fc14d3eb246927deac0397d12e6e87bca815fa (diff)
downloaduhd-cbaa0bb6dbf36fcbd9d602eefc07b7dcac2ef4dc.tar.gz
uhd-cbaa0bb6dbf36fcbd9d602eefc07b7dcac2ef4dc.tar.bz2
uhd-cbaa0bb6dbf36fcbd9d602eefc07b7dcac2ef4dc.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')
-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: