aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/rfnoc/block_control.cpp
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2019-05-30 14:21:41 -0700
committerMartin Braun <martin.braun@ettus.com>2019-11-26 11:49:18 -0800
commit6ec8cf3eeac70d4458ad7a4f7f1eea4f082c140d (patch)
treeb85288ac4916432aba5ff287acaac0e014c36b0f /host/lib/rfnoc/block_control.cpp
parent36853315741aaba41af91cca93c742a6171ae46d (diff)
downloaduhd-6ec8cf3eeac70d4458ad7a4f7f1eea4f082c140d.tar.gz
uhd-6ec8cf3eeac70d4458ad7a4f7f1eea4f082c140d.tar.bz2
uhd-6ec8cf3eeac70d4458ad7a4f7f1eea4f082c140d.zip
rfnoc: Add default block controller
The default block controller should get instantiated when no other suitable block controller can be found.
Diffstat (limited to 'host/lib/rfnoc/block_control.cpp')
-rw-r--r--host/lib/rfnoc/block_control.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/host/lib/rfnoc/block_control.cpp b/host/lib/rfnoc/block_control.cpp
new file mode 100644
index 000000000..78c390001
--- /dev/null
+++ b/host/lib/rfnoc/block_control.cpp
@@ -0,0 +1,24 @@
+//
+// Copyright 2019 Ettus Research, a National Instruments Brand
+//
+// SPDX-License-Identifier: GPL-3.0-or-later
+//
+
+#include <uhd/exception.hpp>
+#include <uhd/rfnoc/block_control.hpp>
+#include <uhd/rfnoc/defaults.hpp>
+#include <uhd/rfnoc/registry.hpp>
+
+using namespace uhd::rfnoc;
+
+class block_control_impl : public block_control
+{
+public:
+ RFNOC_BLOCK_CONSTRUCTOR(block_control)
+ {
+ set_prop_forwarding_policy(forwarding_policy_t::DROP);
+ set_action_forwarding_policy(forwarding_policy_t::DROP);
+ }
+};
+
+UHD_RFNOC_BLOCK_REGISTER_DIRECT(block_control, DEFAULT_NOC_ID, DEFAULT_BLOCK_NAME)