aboutsummaryrefslogtreecommitdiffstats
path: root/src/OutputUHDFeedback.h
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2017-10-17 06:29:29 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2017-10-17 06:29:29 +0200
commitad311a62d4020e3fd7a7048e9d25bd5735206c81 (patch)
tree9ca1308c636129d6c1ff1bccfe6fad630cb5c37a /src/OutputUHDFeedback.h
parent3446e66971ed340146c1885b7768eefbaecac1bc (diff)
downloaddabmod-ad311a62d4020e3fd7a7048e9d25bd5735206c81.tar.gz
dabmod-ad311a62d4020e3fd7a7048e9d25bd5735206c81.tar.bz2
dabmod-ad311a62d4020e3fd7a7048e9d25bd5735206c81.zip
Recover OutputUHDFeedback failure
Diffstat (limited to 'src/OutputUHDFeedback.h')
-rw-r--r--src/OutputUHDFeedback.h19
1 files changed, 10 insertions, 9 deletions
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<uint8_t> 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<uint8_t> 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<uint8_t> &buf,
const struct frame_timestamp& ts);