aboutsummaryrefslogtreecommitdiffstats
path: root/src/OutputUHD.cpp
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2016-06-17 11:19:29 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2016-06-17 11:19:29 +0200
commitbab9d654f028a214e6f3abe8ade1c1da002d25ff (patch)
tree12580eddcaf217a5a86bb5b1a5efd1443bdef153 /src/OutputUHD.cpp
parent9f09681adda2b76ab08c96548bac2384ed8eae4d (diff)
downloaddabmod-bab9d654f028a214e6f3abe8ade1c1da002d25ff.tar.gz
dabmod-bab9d654f028a214e6f3abe8ade1c1da002d25ff.tar.bz2
dabmod-bab9d654f028a214e6f3abe8ade1c1da002d25ff.zip
Add TRACE support for timing analysis
Diffstat (limited to 'src/OutputUHD.cpp')
-rw-r--r--src/OutputUHD.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/OutputUHD.cpp b/src/OutputUHD.cpp
index 4d51dc4..a49b659 100644
--- a/src/OutputUHD.cpp
+++ b/src/OutputUHD.cpp
@@ -407,7 +407,8 @@ int OutputUHD::process(Buffer* dataIn, Buffer* dataOut)
usleep(10000); // 10ms
}
- uwd.frames.push(frame);
+ size_t num_frames = uwd.frames.push(frame);
+ etiLog.log(trace, "UHD,push %zu", num_frames);
break;
}
}
@@ -619,7 +620,9 @@ void UHDWorker::process()
md.time_spec = uhd::time_spec_t(0.0);
struct UHDWorkerFrameData frame;
+ etiLog.log(trace, "UHD,wait");
uwd->frames.wait_and_pop(frame);
+ etiLog.log(trace, "UHD,pop");
handle_frame(&frame);
}
@@ -708,6 +711,7 @@ void UHDWorker::handle_frame(const struct UHDWorkerFrameData *frame)
md.has_time_spec = true;
md.time_spec = uhd::time_spec_t(tx_second, pps_offset);
+ etiLog.log(trace, "UHD,tist %f", md.time_spec.get_real_secs());
// md is defined, let's do some checks
if (md.time_spec.get_real_secs() + tx_timeout < usrp_time) {
@@ -801,6 +805,7 @@ void UHDWorker::tx_frame(const struct UHDWorkerFrameData *frame, bool ts_update)
size_t num_tx_samps = myTxStream->send(
&in_data[num_acc_samps],
samps_to_send, md_tx, tx_timeout);
+ etiLog.log(trace, "UHD,sent %zu of %zu", num_tx_samps, samps_to_send);
#endif
num_acc_samps += num_tx_samps;