diff options
author | Josh Blum <josh@joshknows.com> | 2010-02-12 18:07:55 -0800 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2010-02-12 18:07:55 -0800 |
commit | 9fff25f4e5da179ea29ff44278e0415a337870cb (patch) | |
tree | cfbee4cf2921fd4bd415e3af1c1d466f79bab3d7 /test/device_test.cpp | |
parent | 350f5c5decca20a54132867283448fd32226bbc2 (diff) | |
download | uhd-9fff25f4e5da179ea29ff44278e0415a337870cb.tar.gz uhd-9fff25f4e5da179ea29ff44278e0415a337870cb.tar.bz2 uhd-9fff25f4e5da179ea29ff44278e0415a337870cb.zip |
Added a templated dictionary class because its more useful than map.
Made the device addrs into a string:string dict.
If its all strings we dont have to change the top level caller for new product.
Created shared_iovec class to manage memory for device recvs.
Work on the bro/dude control protocol for usrp2.
Diffstat (limited to 'test/device_test.cpp')
-rw-r--r-- | test/device_test.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/test/device_test.cpp b/test/device_test.cpp index a868cf9f6..6373ff41b 100644 --- a/test/device_test.cpp +++ b/test/device_test.cpp @@ -21,10 +21,9 @@ using namespace uhd; BOOST_AUTO_TEST_CASE(test_device){ - device_addr_t device_addr(DEVICE_ADDR_TYPE_VIRTUAL); - device_addr.virtual_args.num_dboards = 2; - device_addr.virtual_args.num_rx_dsps = 3; - device_addr.virtual_args.num_tx_dsps = 4; + device_addr_t device_addr; + device_addr["type"] = "test"; + device_addr["num_dboards"] = "2"; device::sptr dev = device::make(device_addr); std::cout << "Access the device" << std::endl; @@ -34,11 +33,11 @@ BOOST_AUTO_TEST_CASE(test_device){ wax::obj mb0 = (*dev)[DEVICE_PROP_MBOARD]; std::cout << wax::cast<std::string>(mb0[MBOARD_PROP_NAME]) << std::endl; BOOST_CHECK_EQUAL( - device_addr.virtual_args.num_dboards, + 2, wax::cast<prop_names_t>(mb0[MBOARD_PROP_RX_DBOARD_NAMES]).size() ); BOOST_CHECK_EQUAL( - device_addr.virtual_args.num_dboards, + 2, wax::cast<prop_names_t>(mb0[MBOARD_PROP_TX_DBOARD_NAMES]).size() ); |