summaryrefslogtreecommitdiff
path: root/EmulateSplitTransceiver.hpp
diff options
context:
space:
mode:
authorChristoph Berg <myon@debian.org>2020-05-11 22:17:58 +0200
committerChristoph Berg <myon@debian.org>2020-05-11 22:17:58 +0200
commit32a41b1abe1a4aab0892c9c2051be6ba5b379f1e (patch)
treec6e107c1ee4d70610e43a7912e57c720334a08c7 /EmulateSplitTransceiver.hpp
parent08299e8b2bf50ba90daf570f57def529dd29d6e7 (diff)
New upstream version 2.2.0~rc1+repackupstream/2.2.0_rc1+repack
Diffstat (limited to 'EmulateSplitTransceiver.hpp')
-rw-r--r--EmulateSplitTransceiver.hpp53
1 files changed, 0 insertions, 53 deletions
diff --git a/EmulateSplitTransceiver.hpp b/EmulateSplitTransceiver.hpp
deleted file mode 100644
index d373c020..00000000
--- a/EmulateSplitTransceiver.hpp
+++ /dev/null
@@ -1,53 +0,0 @@
-#ifndef EMULATE_SPLIT_TRANSCEIVER_HPP__
-#define EMULATE_SPLIT_TRANSCEIVER_HPP__
-
-#include <memory>
-
-#include "Transceiver.hpp"
-
-//
-// Emulate Split Transceiver
-//
-// Helper decorator class that encapsulates the emulation of split TX
-// operation.
-//
-// Responsibilities
-//
-// Delegates all but setting of other (split) frequency to the
-// wrapped Transceiver instance. Also routes failure signals from the
-// wrapped Transceiver instance to this instances failure signal.
-//
-// Intercepts status updates from the wrapped Transceiver instance
-// and re-signals it with the emulated status.
-//
-// Generates a status update signal if the other (split) frequency is
-// changed, this is necessary since the wrapped transceiver instance
-// never receives other frequency changes.
-//
-class EmulateSplitTransceiver final
- : public Transceiver
-{
- Q_OBJECT
-
-public:
- // takes ownership of wrapped Transceiver
- explicit EmulateSplitTransceiver (std::unique_ptr<Transceiver> wrapped,
- QObject * parent = nullptr);
-
- void set (TransceiverState const&,
- unsigned sequence_number) noexcept override;
-
- // forward everything else to wrapped Transceiver
- void start (unsigned sequence_number) noexcept override {wrapped_->start (sequence_number);}
- void stop () noexcept override {wrapped_->stop ();}
-
-private:
- void handle_update (TransceiverState const&, unsigned seqeunce_number);
-
- std::unique_ptr<Transceiver> wrapped_;
- Frequency rx_frequency_; // requested Rx frequency
- Frequency tx_frequency_; // requested Tx frequency
- bool split_; // requested split state
-};
-
-#endif