aboutsummaryrefslogtreecommitdiffstats
path: root/host/tests/CMakeLists.txt
diff options
context:
space:
mode:
authorAaron Rossetto <aaron.rossetto@ni.com>2020-07-22 12:51:21 -0500
committerAaron Rossetto <aaron.rossetto@ni.com>2020-07-24 13:15:30 -0500
commita5fe0b071d7041f0539804cd16ada27d920bc96d (patch)
tree840f254f2f2d0165681706f7c539bdc48a52e67f /host/tests/CMakeLists.txt
parent4b01628cad132db68ec1cc8cce211f2df0f62770 (diff)
downloaduhd-a5fe0b071d7041f0539804cd16ada27d920bc96d.tar.gz
uhd-a5fe0b071d7041f0539804cd16ada27d920bc96d.tar.bz2
uhd-a5fe0b071d7041f0539804cd16ada27d920bc96d.zip
rfnoc: Support instance overrides in set_properties()
This commit adds an enhancement to node_t::set_properties() in which the instance argument provided to the function (which normally applies to all properties in the key/value list) can be overridden on a per-property basis using a special syntax. If the key consists of the property name followed by a colon (':') and then a number, the number following the colon is used to determine which instance of the property this set pertains to, and the value passed via the instance parameter is ignored for that property. For example, in the following call: node->set_properties("dog=10,cat:2=5,bird:0=0.5", 1) instance 1 of node's 'dog' property is set to 10, the 1 coming from the instance parameter, instance 2 of the node's 'cat' property is set to 5 due to the override syntax provided in the string, and instance 0 of the node's 'bird' property is set to 0.5 due to its override. If the name/instance pair is malformed, e.g. 'value:=10' or 'value:foobar=10', a runtime error is thrown.
Diffstat (limited to 'host/tests/CMakeLists.txt')
-rw-r--r--host/tests/CMakeLists.txt1
1 files changed, 1 insertions, 0 deletions
diff --git a/host/tests/CMakeLists.txt b/host/tests/CMakeLists.txt
index e06d4c6df..daf9f2976 100644
--- a/host/tests/CMakeLists.txt
+++ b/host/tests/CMakeLists.txt
@@ -46,6 +46,7 @@ set(test_sources
narrow_cast_test.cpp
property_test.cpp
ranges_test.cpp
+ rfnoc_node_test.cpp
scope_exit_test.cpp
sensors_test.cpp
soft_reg_test.cpp