From c8c9d5abf8238c3531ecae8fb272fdf5bbffd336 Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Mon, 8 Jul 2019 12:08:44 +0200 Subject: Unify Socket library with other mmbTools --- src/output/Feedback.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/output') diff --git a/src/output/Feedback.cpp b/src/output/Feedback.cpp index 17e45bf..88d8319 100644 --- a/src/output/Feedback.cpp +++ b/src/output/Feedback.cpp @@ -200,14 +200,13 @@ void DPDFeedbackServer::ReceiveBurstThread() void DPDFeedbackServer::ServeFeedback() { - TCPSocket m_server_sock; - m_server_sock.listen(m_port); + Socket::TCPSocket m_server_sock; + m_server_sock.listen(m_port, "127.0.0.1"); etiLog.level(info) << "DPD Feedback server listening on port " << m_port; while (m_running) { - struct sockaddr_in client; - TCPSocket client_sock = m_server_sock.accept_with_timeout(1000, &client); + auto client_sock = m_server_sock.accept(1000); if (not m_running) { break; -- cgit v1.2.3 From 0c532ab20b47d661f098cc6089184303dce65d56 Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Thu, 5 Sep 2019 11:00:51 +0200 Subject: SDR: show FCT with timestamp warnings in log --- src/output/SDR.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/output') diff --git a/src/output/SDR.cpp b/src/output/SDR.cpp index bacb281..fd8b4ba 100644 --- a/src/output/SDR.cpp +++ b/src/output/SDR.cpp @@ -309,7 +309,7 @@ void SDR::handle_frame(struct FrameData& frame) } if (expected_sec != tx_second or expected_pps != tx_pps) { - etiLog.level(warn) << "OutputSDR: timestamp irregularity!" << + etiLog.level(warn) << "OutputSDR: timestamp irregularity at FCT=" << frame.ts.fct << std::fixed << " Expected " << expected_sec << "+" << (double)expected_pps/16384000.0 << @@ -332,7 +332,7 @@ void SDR::handle_frame(struct FrameData& frame) if (time_spec.get_real_secs() + tx_timeout < device_time) { etiLog.level(warn) << - "OutputSDR: Timestamp in the past! offset: " << + "OutputSDR: Timestamp in the past at FCT=" << frame.ts.fct << " offset: " << std::fixed << time_spec.get_real_secs() - device_time << " (" << device_time << ")" @@ -344,7 +344,7 @@ void SDR::handle_frame(struct FrameData& frame) if (time_spec.get_real_secs() > device_time + TIMESTAMP_ABORT_FUTURE) { etiLog.level(error) << - "OutputSDR: Timestamp way too far in the future! offset: " << + "OutputSDR: Timestamp way too far in the future at FCT=" << frame.ts.fct << " offset: " << std::fixed << time_spec.get_real_secs() - device_time; throw std::runtime_error("Timestamp error. Aborted."); @@ -353,7 +353,7 @@ void SDR::handle_frame(struct FrameData& frame) if (m_config.muting) { etiLog.log(info, - "OutputSDR: Muting sample %d requested\n", + "OutputSDR: Muting FCT=%d requested", frame.ts.fct); return; } -- cgit v1.2.3