aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Chemeris <Alexander.Chemeris@gmail.com>2015-07-11 12:49:55 -0400
committerAlexander Chemeris <Alexander.Chemeris@gmail.com>2015-07-11 12:49:55 -0400
commit1537d4b2d943fbe299919939f73a8460e5efb368 (patch)
tree23e30010da37ae0cd8aa35450aad82d8570e0831
parent94325a3f602618cd980c5f261f4b661c31623dd9 (diff)
UHD: DEBUG: More debug output.
-rw-r--r--Transceiver52M/UHDDevice.cpp19
1 files changed, 13 insertions, 6 deletions
diff --git a/Transceiver52M/UHDDevice.cpp b/Transceiver52M/UHDDevice.cpp
index a62e02f..c116dde 100644
--- a/Transceiver52M/UHDDevice.cpp
+++ b/Transceiver52M/UHDDevice.cpp
@@ -1040,6 +1040,7 @@ int uhd_device::readSamples(std::vector<short *> &bufs, int len, bool *overrun,
current_time = metadata.time_spec;
LOG(DEBUG) << "Received timestamp = " << current_time.get_real_secs();
+// LOG(INFO) << "Received timestamp = " << convert_time(current_time, rx_rate);
for (size_t i = 0; i < rx_buffers.size(); i++) {
rc = rx_buffers[i]->write((short *) &pkt_bufs[i].front(),
@@ -1110,6 +1111,8 @@ int uhd_device::writeSamples(std::vector<short *> &bufs, int len, bool *underrun
}
}
+// LOG(INFO) << "Sending timestamp = " << timestamp << "(" << convert_time(metadata.time_spec, tx_rate) << ")";
+
thread_enable_cancel(false);
size_t num_smpls = tx_stream->send(bufs, len, metadata);
thread_enable_cancel(true);
@@ -1308,10 +1311,11 @@ bool uhd_device::recv_async_msg()
if (md.event_code != uhd::async_metadata_t::EVENT_CODE_BURST_ACK) {
aligned = false;
- if ((md.event_code != uhd::async_metadata_t::EVENT_CODE_UNDERFLOW) &&
- (md.event_code != uhd::async_metadata_t::EVENT_CODE_TIME_ERROR)) {
- LOG(ERR) << str_code(md);
- }
+ LOG(ERR) << str_code(md);
+// if ((md.event_code != uhd::async_metadata_t::EVENT_CODE_UNDERFLOW) &&
+// (md.event_code != uhd::async_metadata_t::EVENT_CODE_TIME_ERROR)) {
+// LOG(ERR) << str_code(md);
+// }
}
return true;
@@ -1348,7 +1352,8 @@ std::string uhd_device::str_code(uhd::rx_metadata_t metadata)
}
if (metadata.has_time_spec)
- ost << " at " << metadata.time_spec.get_real_secs() << " sec.";
+ ost << " at " << metadata.time_spec.get_real_secs() << " sec "
+ << convert_time(metadata.time_spec, rx_rate) << " TIMESTAMP";
return ost.str();
}
@@ -1381,7 +1386,9 @@ std::string uhd_device::str_code(uhd::async_metadata_t metadata)
}
if (metadata.has_time_spec)
- ost << " at " << metadata.time_spec.get_real_secs() << " sec.";
+ ost << " at " << std::setprecision(15) << metadata.time_spec.get_real_secs() << " sec "
+ << convert_time(metadata.time_spec, rx_rate) << " Rx TIMESTAMP "
+ << convert_time(metadata.time_spec, tx_rate) << " Tx TIMESTAMP";
return ost.str();
}