From 6f1bdcb58608e3a7c2625841e3a8f1c6297bb544 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Mon, 26 Apr 2010 15:20:18 -0700 Subject: Renamed the prop set/get error macros so they make sense for not-implemented properties. --- host/lib/usrp/dboard/db_basic_and_lf.cpp | 8 ++++---- host/lib/usrp/dboard/db_rfx.cpp | 8 ++++---- host/lib/usrp/dboard/db_xcvr2450.cpp | 8 ++++---- host/lib/usrp/usrp2/dboard_impl.cpp | 8 ++++---- host/lib/usrp/usrp2/dsp_impl.cpp | 8 ++++---- host/lib/usrp/usrp2/mboard_impl.cpp | 4 ++-- host/lib/usrp/usrp2/usrp2_impl.cpp | 4 ++-- 7 files changed, 24 insertions(+), 24 deletions(-) (limited to 'host/lib/usrp') diff --git a/host/lib/usrp/dboard/db_basic_and_lf.cpp b/host/lib/usrp/dboard/db_basic_and_lf.cpp index fa53bd964..b0fbbd2ec 100644 --- a/host/lib/usrp/dboard/db_basic_and_lf.cpp +++ b/host/lib/usrp/dboard/db_basic_and_lf.cpp @@ -158,7 +158,7 @@ void basic_rx::rx_get(const wax::obj &key_, wax::obj &val){ val = true; //there is no LO, so it must be true! return; - default: UHD_THROW_PROP_WRITE_ONLY(); + default: UHD_THROW_PROP_GET_ERROR(); } } @@ -180,7 +180,7 @@ void basic_rx::rx_set(const wax::obj &key_, const wax::obj &val){ case SUBDEV_PROP_FREQ: return; // it wont do you much good, but you can set it - default: UHD_THROW_PROP_READ_ONLY(); + default: UHD_THROW_PROP_SET_ERROR(); } } @@ -257,7 +257,7 @@ void basic_tx::tx_get(const wax::obj &key_, wax::obj &val){ val = true; //there is no LO, so it must be true! return; - default: UHD_THROW_PROP_WRITE_ONLY(); + default: UHD_THROW_PROP_GET_ERROR(); } } @@ -279,6 +279,6 @@ void basic_tx::tx_set(const wax::obj &key_, const wax::obj &val){ case SUBDEV_PROP_FREQ: return; // it wont do you much good, but you can set it - default: UHD_THROW_PROP_READ_ONLY(); + default: UHD_THROW_PROP_SET_ERROR(); } } diff --git a/host/lib/usrp/dboard/db_rfx.cpp b/host/lib/usrp/dboard/db_rfx.cpp index 6ad5ad906..175f55eab 100644 --- a/host/lib/usrp/dboard/db_rfx.cpp +++ b/host/lib/usrp/dboard/db_rfx.cpp @@ -410,7 +410,7 @@ void rfx_xcvr::rx_get(const wax::obj &key_, wax::obj &val){ val = this->get_locked(dboard_iface::UNIT_RX); return; - default: UHD_THROW_PROP_WRITE_ONLY(); + default: UHD_THROW_PROP_GET_ERROR(); } } @@ -434,7 +434,7 @@ void rfx_xcvr::rx_set(const wax::obj &key_, const wax::obj &val){ set_rx_ant(val.as()); return; - default: UHD_THROW_PROP_READ_ONLY(); + default: UHD_THROW_PROP_SET_ERROR(); } } @@ -503,7 +503,7 @@ void rfx_xcvr::tx_get(const wax::obj &key_, wax::obj &val){ val = this->get_locked(dboard_iface::UNIT_TX); return; - default: UHD_THROW_PROP_WRITE_ONLY(); + default: UHD_THROW_PROP_GET_ERROR(); } } @@ -527,6 +527,6 @@ void rfx_xcvr::tx_set(const wax::obj &key_, const wax::obj &val){ UHD_ASSERT_THROW(val.as() == "TX/RX"); return; - default: UHD_THROW_PROP_READ_ONLY(); + default: UHD_THROW_PROP_SET_ERROR(); } } diff --git a/host/lib/usrp/dboard/db_xcvr2450.cpp b/host/lib/usrp/dboard/db_xcvr2450.cpp index 5b932904d..f1510da10 100644 --- a/host/lib/usrp/dboard/db_xcvr2450.cpp +++ b/host/lib/usrp/dboard/db_xcvr2450.cpp @@ -488,7 +488,7 @@ void xcvr2450::rx_get(const wax::obj &key_, wax::obj &val){ val = this->get_locked(); return; - default: UHD_THROW_PROP_WRITE_ONLY(); + default: UHD_THROW_PROP_GET_ERROR(); } } @@ -511,7 +511,7 @@ void xcvr2450::rx_set(const wax::obj &key_, const wax::obj &val){ this->set_rx_ant(val.as()); return; - default: UHD_THROW_PROP_READ_ONLY(); + default: UHD_THROW_PROP_SET_ERROR(); } } @@ -582,7 +582,7 @@ void xcvr2450::tx_get(const wax::obj &key_, wax::obj &val){ val = this->get_locked(); return; - default: UHD_THROW_PROP_WRITE_ONLY(); + default: UHD_THROW_PROP_GET_ERROR(); } } @@ -605,6 +605,6 @@ void xcvr2450::tx_set(const wax::obj &key_, const wax::obj &val){ this->set_tx_ant(val.as()); return; - default: UHD_THROW_PROP_READ_ONLY(); + default: UHD_THROW_PROP_SET_ERROR(); } } diff --git a/host/lib/usrp/usrp2/dboard_impl.cpp b/host/lib/usrp/usrp2/dboard_impl.cpp index 226a7950d..403faf5cf 100644 --- a/host/lib/usrp/usrp2/dboard_impl.cpp +++ b/host/lib/usrp/usrp2/dboard_impl.cpp @@ -123,7 +123,7 @@ void usrp2_impl::rx_dboard_get(const wax::obj &key_, wax::obj &val){ val = _rx_db_eeprom.id; return; - default: UHD_THROW_PROP_WRITE_ONLY(); + default: UHD_THROW_PROP_GET_ERROR(); } } @@ -139,7 +139,7 @@ void usrp2_impl::rx_dboard_set(const wax::obj &key, const wax::obj &val){ _iface->write_eeprom(I2C_ADDR_RX_DB, 0, _rx_db_eeprom.get_eeprom_bytes()); return; - default: UHD_THROW_PROP_READ_ONLY(); + default: UHD_THROW_PROP_SET_ERROR(); } } @@ -172,7 +172,7 @@ void usrp2_impl::tx_dboard_get(const wax::obj &key_, wax::obj &val){ val = _tx_db_eeprom.id; return; - default: UHD_THROW_PROP_WRITE_ONLY(); + default: UHD_THROW_PROP_GET_ERROR(); } } @@ -188,6 +188,6 @@ void usrp2_impl::tx_dboard_set(const wax::obj &key, const wax::obj &val){ _iface->write_eeprom(I2C_ADDR_TX_DB, 0, _tx_db_eeprom.get_eeprom_bytes()); return; - default: UHD_THROW_PROP_READ_ONLY(); + default: UHD_THROW_PROP_SET_ERROR(); } } diff --git a/host/lib/usrp/usrp2/dsp_impl.cpp b/host/lib/usrp/usrp2/dsp_impl.cpp index 84c50ac0d..84314a656 100644 --- a/host/lib/usrp/usrp2/dsp_impl.cpp +++ b/host/lib/usrp/usrp2/dsp_impl.cpp @@ -118,7 +118,7 @@ void usrp2_impl::ddc_get(const wax::obj &key, wax::obj &val){ val = get_master_clock_freq()/_ddc_decim; return; - default: UHD_THROW_PROP_WRITE_ONLY(); + default: UHD_THROW_PROP_GET_ERROR(); } } @@ -141,7 +141,7 @@ void usrp2_impl::ddc_set(const wax::obj &key, const wax::obj &val){ } return; - default: UHD_THROW_PROP_READ_ONLY(); + default: UHD_THROW_PROP_SET_ERROR(); } } @@ -202,7 +202,7 @@ void usrp2_impl::duc_get(const wax::obj &key, wax::obj &val){ val = get_master_clock_freq()/_duc_interp; return; - default: UHD_THROW_PROP_WRITE_ONLY(); + default: UHD_THROW_PROP_GET_ERROR(); } } @@ -225,6 +225,6 @@ void usrp2_impl::duc_set(const wax::obj &key, const wax::obj &val){ } return; - default: UHD_THROW_PROP_READ_ONLY(); + default: UHD_THROW_PROP_SET_ERROR(); } } diff --git a/host/lib/usrp/usrp2/mboard_impl.cpp b/host/lib/usrp/usrp2/mboard_impl.cpp index 684cf245d..36bef4f25 100644 --- a/host/lib/usrp/usrp2/mboard_impl.cpp +++ b/host/lib/usrp/usrp2/mboard_impl.cpp @@ -248,7 +248,7 @@ void usrp2_impl::mboard_get(const wax::obj &key_, wax::obj &val){ val = _clock_config; return; - default: UHD_THROW_PROP_WRITE_ONLY(); + default: UHD_THROW_PROP_GET_ERROR(); } } @@ -304,6 +304,6 @@ void usrp2_impl::mboard_set(const wax::obj &key, const wax::obj &val){ issue_ddc_stream_cmd(val.as()); return; - default: UHD_THROW_PROP_READ_ONLY(); + default: UHD_THROW_PROP_SET_ERROR(); } } diff --git a/host/lib/usrp/usrp2/usrp2_impl.cpp b/host/lib/usrp/usrp2/usrp2_impl.cpp index d9b2248ff..4079357f9 100644 --- a/host/lib/usrp/usrp2/usrp2_impl.cpp +++ b/host/lib/usrp/usrp2/usrp2_impl.cpp @@ -202,10 +202,10 @@ void usrp2_impl::get(const wax::obj &key_, wax::obj &val){ val = size_t(_max_tx_samples_per_packet); return; - default: UHD_THROW_PROP_WRITE_ONLY(); + default: UHD_THROW_PROP_GET_ERROR(); } } void usrp2_impl::set(const wax::obj &, const wax::obj &){ - UHD_THROW_PROP_READ_ONLY(); + UHD_THROW_PROP_SET_ERROR(); } -- cgit v1.2.3