From cbaa0bb6dbf36fcbd9d602eefc07b7dcac2ef4dc Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Tue, 26 Feb 2019 15:41:51 -0800 Subject: 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. --- host/lib/usrp/x300/x300_device_args.hpp | 33 +++++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) (limited to 'host/lib') 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: -- cgit v1.2.3