diff options
| author | Christoph Berg <christoph.berg@credativ.de> | 2022-08-23 10:23:31 +0200 |
|---|---|---|
| committer | Christoph Berg <christoph.berg@credativ.de> | 2022-08-23 10:23:31 +0200 |
| commit | 0e579a45e2e5823f90e2632073749583cd15fa0d (patch) | |
| tree | 5e709e13d41c8ea0da0968fb6c4566057b4b7909 /Transceiver/EmulateSplitTransceiver.hpp | |
| parent | 28d1767618141cd6481de2e93e36e3dfa555d4b4 (diff) | |
| parent | 2d1068e60bce7ae1fff11623454900e8cee956b1 (diff) | |
Update upstream source from tag 'upstream/2.6.0_rc3+repack'
Update to upstream version '2.6.0~rc3+repack'
with Debian dir 9ee8bc3a4b60bb88f4d57c7d1f2d37dbc1632144
Diffstat (limited to 'Transceiver/EmulateSplitTransceiver.hpp')
| -rwxr-xr-x | Transceiver/EmulateSplitTransceiver.hpp | 108 |
1 files changed, 54 insertions, 54 deletions
diff --git a/Transceiver/EmulateSplitTransceiver.hpp b/Transceiver/EmulateSplitTransceiver.hpp index 250305d1..e6d85690 100755 --- a/Transceiver/EmulateSplitTransceiver.hpp +++ b/Transceiver/EmulateSplitTransceiver.hpp @@ -1,54 +1,54 @@ -#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 (logger_type *, - 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 +#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 (logger_type *,
+ 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
|
