From 2b877e304d52c406720050aa55eed97b6f7869be Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Sun, 7 May 2017 14:22:21 +0200 Subject: Add WIP for OutputUHDFeedback --- src/OutputUHD.cpp | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) (limited to 'src/OutputUHD.cpp') diff --git a/src/OutputUHD.cpp b/src/OutputUHD.cpp index d78c4bf..6dc8878 100644 --- a/src/OutputUHD.cpp +++ b/src/OutputUHD.cpp @@ -169,8 +169,6 @@ OutputUHD::OutputUHD( RC_ADD_PARAMETER(muting, "Mute the output by stopping the transmitter"); RC_ADD_PARAMETER(staticdelay, "Set static delay (uS) between 0 and 96000"); - // TODO: find out how to use boost::bind to give the logger to the - // uhd_msg_handler uhd::msg::register_handler(uhd_msg_handler); uhd::set_thread_priority_safe(); @@ -286,13 +284,9 @@ OutputUHD::OutputUHD( SetDelayBuffer(myConf.dabMode); - MDEBUG("OutputUHD:UHD ready.\n"); -} + uhdFeedback.setup(myUsrp, myConf.dpdFeedbackServerPort); - -OutputUHD::~OutputUHD() -{ - MDEBUG("OutputUHD::~OutputUHD() @ %p\n", this); + MDEBUG("OutputUHD:UHD ready.\n"); } @@ -426,12 +420,11 @@ int OutputUHD::process(Buffer* dataIn) "OutputUHD: dropping one frame with invalid FCT"; } else { - while (true) { - size_t num_frames = uwd.frames.push_wait_if_full(frame, - FRAMES_MAX_SIZE); - etiLog.log(trace, "UHD,push %zu", num_frames); - break; - } + uhdFeedback.set_tx_frame(frame.buf, frame.ts); + + size_t num_frames = uwd.frames.push_wait_if_full(frame, + FRAMES_MAX_SIZE); + etiLog.log(trace, "UHD,push %zu", num_frames); } } -- cgit v1.2.3