From bffef674fbbcd892967017e81515bb76e0b850b5 Mon Sep 17 00:00:00 2001 From: Ciro Nishiguchi Date: Thu, 8 Aug 2019 10:25:20 -0500 Subject: 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. --- host/lib/rfnoc/radio_control_impl.cpp | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'host/lib/rfnoc/radio_control_impl.cpp') 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; } -- cgit v1.2.3