From ad311a62d4020e3fd7a7048e9d25bd5735206c81 Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Tue, 17 Oct 2017 06:29:29 +0200 Subject: Recover OutputUHDFeedback failure --- src/OutputUHDFeedback.h | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'src/OutputUHDFeedback.h') diff --git a/src/OutputUHDFeedback.h b/src/OutputUHDFeedback.h index da0d487..80d287f 100644 --- a/src/OutputUHDFeedback.h +++ b/src/OutputUHDFeedback.h @@ -61,23 +61,23 @@ struct UHDReceiveBurstRequest { mutable boost::mutex mutex; boost::condition_variable mutex_notification; - BurstRequestState state; + BurstRequestState state = BurstRequestState::None; // In the SaveTransmit states, num_samples complexf samples are saved into // the vectors - size_t num_samples; + size_t num_samples = 0; // The timestamp of the first sample of the TX buffers - uint32_t tx_second; - uint32_t tx_pps; // in units of 1/16384000s + uint32_t tx_second = 0; + uint32_t tx_pps = 0; // in units of 1/16384000s // Samples contain complexf, but since our internal representation is uint8_t // we keep it like that std::vector tx_samples; // The timestamp of the first sample of the RX buffers - uint32_t rx_second; - uint32_t rx_pps; + uint32_t rx_second = 0; + uint32_t rx_pps = 0; std::vector rx_samples; // Also, actually complexf }; @@ -85,13 +85,14 @@ struct UHDReceiveBurstRequest { // Serve TX samples and RX feedback samples over a TCP connection class OutputUHDFeedback { public: - OutputUHDFeedback(); + OutputUHDFeedback( + uhd::usrp::multi_usrp::sptr usrp, + uint16_t port, + uint32_t sampleRate); OutputUHDFeedback(const OutputUHDFeedback& other) = delete; OutputUHDFeedback& operator=(const OutputUHDFeedback& other) = delete; ~OutputUHDFeedback(); - void setup(uhd::usrp::multi_usrp::sptr usrp, uint16_t port, uint32_t sampleRate); - void set_tx_frame(const std::vector &buf, const struct frame_timestamp& ts); -- cgit v1.2.3