aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/rfnoc/actions.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'host/lib/rfnoc/actions.cpp')
-rw-r--r--host/lib/rfnoc/actions.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/host/lib/rfnoc/actions.cpp b/host/lib/rfnoc/actions.cpp
index 1f5f0f2f7..428a1fcb2 100644
--- a/host/lib/rfnoc/actions.cpp
+++ b/host/lib/rfnoc/actions.cpp
@@ -19,3 +19,27 @@ action_info::action_info(const std::string& key_) : id(action_counter++), key(ke
// nop
}
+//! Factory function
+action_info::sptr action_info::make(const std::string& key)
+{
+ if (key == ACTION_KEY_STREAM_CMD) {
+ return stream_cmd_action_info::make(
+ uhd::stream_cmd_t::STREAM_MODE_STOP_CONTINUOUS);
+ }
+ //return std::make_shared<action_info>(key);
+ return sptr(new action_info(key));
+}
+
+stream_cmd_action_info::stream_cmd_action_info(
+ const uhd::stream_cmd_t::stream_mode_t stream_mode)
+ : action_info(ACTION_KEY_STREAM_CMD), stream_cmd(stream_mode)
+{
+ // nop
+}
+
+stream_cmd_action_info::sptr stream_cmd_action_info::make(
+ const uhd::stream_cmd_t::stream_mode_t stream_mode)
+{
+ //return std::make_shared<action_info>(ACTION_KEY_STREAM_CMD);
+ return sptr(new stream_cmd_action_info(stream_mode));
+}