aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/rfnoc/actions.cpp
diff options
context:
space:
mode:
authorsteviez <steve.czabaniuk@ni.com>2020-02-11 13:11:33 -0600
committeratrnati <54334261+atrnati@users.noreply.github.com>2020-02-18 13:36:57 -0600
commite6e1cad743d04f79148c92bab774fed183ff43a6 (patch)
tree6414180a32016f7bed17e420ea4c1df074f93aab /host/lib/rfnoc/actions.cpp
parent28bf20a19c98c7e99a67d7186d539aea28133df0 (diff)
downloaduhd-e6e1cad743d04f79148c92bab774fed183ff43a6.tar.gz
uhd-e6e1cad743d04f79148c92bab774fed183ff43a6.tar.bz2
uhd-e6e1cad743d04f79148c92bab774fed183ff43a6.zip
rfnoc: actions: Cleanup rx_event_action_info ctor
Set error code member variable in rx_event_action_info constructor instead of relying on the caller to set it after object creation
Diffstat (limited to 'host/lib/rfnoc/actions.cpp')
-rw-r--r--host/lib/rfnoc/actions.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/host/lib/rfnoc/actions.cpp b/host/lib/rfnoc/actions.cpp
index ecc1b3f20..3276c456c 100644
--- a/host/lib/rfnoc/actions.cpp
+++ b/host/lib/rfnoc/actions.cpp
@@ -51,17 +51,23 @@ stream_cmd_action_info::sptr stream_cmd_action_info::make(
}
/*** RX Metadata Action Info *************************************************/
-rx_event_action_info::rx_event_action_info() : action_info(ACTION_KEY_RX_EVENT)
+rx_event_action_info::rx_event_action_info(uhd::rx_metadata_t::error_code_t error_code_)
+ : action_info(ACTION_KEY_RX_EVENT), error_code(error_code_)
{
// nop
}
-rx_event_action_info::sptr rx_event_action_info::make()
+rx_event_action_info::sptr rx_event_action_info::make(
+ uhd::rx_metadata_t::error_code_t error_code)
{
struct rx_event_action_info_make_shared : public rx_event_action_info
{
+ rx_event_action_info_make_shared(uhd::rx_metadata_t::error_code_t error_code)
+ : rx_event_action_info(error_code)
+ {
+ }
};
- return std::make_shared<rx_event_action_info_make_shared>();
+ return std::make_shared<rx_event_action_info_make_shared>(error_code);
}
/*** TX Metadata Action Info *************************************************/