diff options
author | Ciro Nishiguchi <ciro.nishiguchi@ni.com> | 2019-08-08 10:25:20 -0500 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2019-11-26 11:49:36 -0800 |
commit | bffef674fbbcd892967017e81515bb76e0b850b5 (patch) | |
tree | 8f56eb8548d0fb56094b555ae11d16eb61e6c381 /host/lib/rfnoc/radio_control_impl.cpp | |
parent | 91e01c484475600fcd659bb433ab86efa5146426 (diff) | |
download | uhd-bffef674fbbcd892967017e81515bb76e0b850b5.tar.gz uhd-bffef674fbbcd892967017e81515bb76e0b850b5.tar.bz2 uhd-bffef674fbbcd892967017e81515bb76e0b850b5.zip |
rfnoc: tx_streamer: add support for async messages
Add an async message queue that aggregates errors from multiple sources.
Errors can come from the strs packets originating from the stream
endpoint or from the radio block through control packets to the host.
Diffstat (limited to 'host/lib/rfnoc/radio_control_impl.cpp')
-rw-r--r-- | host/lib/rfnoc/radio_control_impl.cpp | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/host/lib/rfnoc/radio_control_impl.cpp b/host/lib/rfnoc/radio_control_impl.cpp index 2094f4096..9d7257108 100644 --- a/host/lib/rfnoc/radio_control_impl.cpp +++ b/host/lib/rfnoc/radio_control_impl.cpp @@ -928,12 +928,24 @@ void radio_control_impl::async_message_handler( return; } switch (code) { - case err_codes::ERR_TX_UNDERRUN: + case err_codes::ERR_TX_UNDERRUN: { + auto tx_event_action = tx_event_action_info::make( + uhd::async_metadata_t::EVENT_CODE_UNDERFLOW); + post_action(res_source_info{res_source_info::INPUT_EDGE, chan}, + tx_event_action); UHD_LOG_FASTPATH("U"); + RFNOC_LOG_TRACE("Posting underrun event action message."); break; - case err_codes::ERR_TX_LATE_DATA: + } + case err_codes::ERR_TX_LATE_DATA: { + auto tx_event_action = tx_event_action_info::make( + uhd::async_metadata_t::EVENT_CODE_TIME_ERROR); + post_action(res_source_info{res_source_info::INPUT_EDGE, chan}, + tx_event_action); UHD_LOG_FASTPATH("L"); + RFNOC_LOG_TRACE("Posting late data event action message."); break; + } } break; } |