diff options
author | steviez <steve.czabaniuk@ni.com> | 2020-02-11 13:11:33 -0600 |
---|---|---|
committer | atrnati <54334261+atrnati@users.noreply.github.com> | 2020-02-18 13:36:57 -0600 |
commit | e6e1cad743d04f79148c92bab774fed183ff43a6 (patch) | |
tree | 6414180a32016f7bed17e420ea4c1df074f93aab /host/lib/rfnoc/radio_control_impl.cpp | |
parent | 28bf20a19c98c7e99a67d7186d539aea28133df0 (diff) | |
download | uhd-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/radio_control_impl.cpp')
-rw-r--r-- | host/lib/rfnoc/radio_control_impl.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/host/lib/rfnoc/radio_control_impl.cpp b/host/lib/rfnoc/radio_control_impl.cpp index 6c7a769df..ea67d891e 100644 --- a/host/lib/rfnoc/radio_control_impl.cpp +++ b/host/lib/rfnoc/radio_control_impl.cpp @@ -966,9 +966,9 @@ void radio_control_impl::async_message_handler( switch (code) { case err_codes::ERR_RX_OVERRUN: { UHD_LOG_FASTPATH("O"); - auto rx_event_action = rx_event_action_info::make(); - rx_event_action->error_code = uhd::rx_metadata_t::ERROR_CODE_OVERFLOW; - const bool cont_mode = _last_stream_cmd.at(chan).stream_mode + auto rx_event_action = rx_event_action_info::make( + uhd::rx_metadata_t::ERROR_CODE_OVERFLOW); + const bool cont_mode = _last_stream_cmd.at(chan).stream_mode == stream_cmd_t::STREAM_MODE_START_CONTINUOUS; rx_event_action->args["cont_mode"] = std::to_string(cont_mode); RFNOC_LOG_TRACE("Posting overrun event action message."); @@ -978,9 +978,8 @@ void radio_control_impl::async_message_handler( } case err_codes::ERR_RX_LATE_CMD: UHD_LOG_FASTPATH("L"); - auto rx_event_action = rx_event_action_info::make(); - rx_event_action->error_code = - uhd::rx_metadata_t::ERROR_CODE_LATE_COMMAND; + auto rx_event_action = rx_event_action_info::make( + uhd::rx_metadata_t::ERROR_CODE_LATE_COMMAND); RFNOC_LOG_TRACE("Posting RX late command message."); post_action(res_source_info{res_source_info::OUTPUT_EDGE, chan}, rx_event_action); |