Commit dde0e269 authored by Tobias Winchen's avatar Tobias Winchen
Browse files

Added debug output

parent 4864cb3f
......@@ -273,17 +273,22 @@ bool VLBI<HandlerType>::operator()(RawBytes &block) {
_spillOver.size(), cudaMemcpyDeviceToHost, _d2h_stream));
// fill in header data
const size_t samplesPerDataFrame = outputBlockSize * 8 / _output_bitDepth;
const size_t dataFramesPerSecond = _sampleRate / samplesPerDataFrame;
const uint32_t samplesPerDataFrame = outputBlockSize * 8 / _output_bitDepth;
const uint32_t dataFramesPerSecond = _sampleRate / samplesPerDataFrame;
for (size_t i = 0; i < numberOfBlocksInOutput; i++)
BOOST_LOG_TRIVIAL(debug) << " Samples per data frame: " << samplesPerDataFrame;
BOOST_LOG_TRIVIAL(debug) << " Dataframes per second: " << dataFramesPerSecond;
for (uint32_t i = 0; i < numberOfBlocksInOutput; i++)
{
// copy header to correct position
std::copy(reinterpret_cast<uint8_t *>(_vdifHeader.getData()),
// copy header to correct position
std::copy(reinterpret_cast<uint8_t *>(_vdifHeader.getData()),
reinterpret_cast<uint8_t *>(_vdifHeader.getData()) + vlbiHeaderSize,
_outputBuffer.a().begin() + i * (outputBlockSize + vlbiHeaderSize));
// update header
size_t dataFrame = _vdifHeader.getDataFrameNumber();
uint32_t dataFrame = _vdifHeader.getDataFrameNumber();
if (i < 5)
BOOST_LOG_TRIVIAL(debug) << i << " Dataframe Number: " << dataFrame;
if (dataFrame < dataFramesPerSecond)
{
_vdifHeader.setDataFrameNumber(dataFrame + 1);
......@@ -291,7 +296,7 @@ bool VLBI<HandlerType>::operator()(RawBytes &block) {
else
{
_vdifHeader.setDataFrameNumber(0);
_vdifHeader.setSecondsFromReferenceEpoch(_vdifHeader.getSecondsFromReferenceEpoch() + 1);
_vdifHeader.setSecondsFromReferenceEpoch(_vdifHeader.getSecondsFromReferenceEpoch() + 1);
}
}
......
......@@ -120,6 +120,8 @@ class VDIF_Sender
//BOOST_LOG_TRIVIAL(debug) << counter << " Set delay to " << delay.count()<< " ns. Current rate " << current_rate << ", processed_bytes: " << processed_bytes;
}
if (counter < 5)
BOOST_LOG_TRIVIAL(debug) << counter << " Send - FN: " << vdifHeader.getDataFrameNumber() << ", Sec f. E.: " << vdifHeader.getSecondsFromReferenceEpoch() << " Get TS.: " << vdifHeader.getTimestamp();
}
BOOST_LOG_TRIVIAL(info) << "Send " << counter << " frames of " << block.used_bytes() << " bytes total size.";
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment