diff options
author | Martin Braun <martin.braun@ettus.com> | 2019-08-23 12:11:19 -0700 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2019-11-26 11:49:38 -0800 |
commit | af5b2b5e778ead57b0fe9e72561227f1ebbbfc42 (patch) | |
tree | 546aff3823314a2716e7b08911ca1e2a0bdfcdfc /host/tests/rfnoc_blocks_test.cpp | |
parent | acc4dab894db1bb6285c3181548af16c1d1091f6 (diff) | |
download | uhd-af5b2b5e778ead57b0fe9e72561227f1ebbbfc42.tar.gz uhd-af5b2b5e778ead57b0fe9e72561227f1ebbbfc42.tar.bz2 uhd-af5b2b5e778ead57b0fe9e72561227f1ebbbfc42.zip |
rfnoc: node: Add set_properties()
node_t::set_properties() is a convenience function that lets you set
multiple properties at once from a device_addr_t.
Diffstat (limited to 'host/tests/rfnoc_blocks_test.cpp')
-rw-r--r-- | host/tests/rfnoc_blocks_test.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/host/tests/rfnoc_blocks_test.cpp b/host/tests/rfnoc_blocks_test.cpp index df08f15ad..ea1f91b6b 100644 --- a/host/tests/rfnoc_blocks_test.cpp +++ b/host/tests/rfnoc_blocks_test.cpp @@ -250,6 +250,11 @@ BOOST_AUTO_TEST_CASE(test_ddc_block) "mtu", NEW_MTU / 2, {res_source_info::OUTPUT_EDGE, 0}); BOOST_CHECK_EQUAL(test_ddc->get_mtu({res_source_info::INPUT_EDGE, 0}), NEW_MTU / 2); BOOST_CHECK_EQUAL(test_ddc->get_mtu({res_source_info::OUTPUT_EDGE, 0}), NEW_MTU / 2); + + // Now reset the props using set_properties + test_ddc->set_properties(uhd::device_addr_t("decim=1,freq=0.0,foo=bar"), 0); + BOOST_CHECK_EQUAL(test_ddc->get_property<int>("decim", 0), 1); + BOOST_CHECK_EQUAL(test_ddc->get_property<double>("freq", 0), 0.0); } BOOST_AUTO_TEST_CASE(test_duc_block) |