summaryrefslogtreecommitdiff
path: root/EmulateSplitTransceiver.hpp
diff options
context:
space:
mode:
authorhibby <d@vehibberd.com>2018-02-16 15:17:14 +0000
committerhibby <d@vehibberd.com>2018-02-16 15:17:14 +0000
commit37f727ac0746fd85504aa46c1f023c09b3eff33a (patch)
treec8a7ce04545040a8f161ba279528730bd9a3e6ab /EmulateSplitTransceiver.hpp
parentd63dd8d081a6fcd0715cd13f26df59fb831769d2 (diff)
New upstream version 1.8.0+repackupstream/1.8.0+repack
Diffstat (limited to 'EmulateSplitTransceiver.hpp')
-rw-r--r--EmulateSplitTransceiver.hpp22
1 files changed, 10 insertions, 12 deletions
diff --git a/EmulateSplitTransceiver.hpp b/EmulateSplitTransceiver.hpp
index d0888715..210a37b7 100644
--- a/EmulateSplitTransceiver.hpp
+++ b/EmulateSplitTransceiver.hpp
@@ -29,25 +29,23 @@ class EmulateSplitTransceiver final
{
public:
// takes ownership of wrapped Transceiver
- explicit EmulateSplitTransceiver (std::unique_ptr<Transceiver> wrapped);
+ explicit EmulateSplitTransceiver (std::unique_ptr<Transceiver> wrapped,
+ QObject * parent = nullptr);
- void start () noexcept override;
- void frequency (Frequency, MODE) noexcept override;
- void tx_frequency (Frequency, bool rationalise_mode) noexcept override;
- void ptt (bool on) noexcept override;
+ void set (TransceiverState const&,
+ unsigned sequence_number) noexcept override;
// forward everything else to wrapped Transceiver
- void stop () noexcept override {wrapped_->stop (); Q_EMIT finished ();}
- void mode (MODE m, bool /* rationalise */) noexcept override {wrapped_->mode (m, false);}
- void sync (bool force_signal) noexcept override {wrapped_->sync (force_signal);}
+ void start (unsigned sequence_number) noexcept override {wrapped_->start (sequence_number);}
+ void stop () noexcept override {wrapped_->stop ();}
private:
- void handle_update (TransceiverState);
+ void handle_update (TransceiverState const&, unsigned seqeunce_number);
std::unique_ptr<Transceiver> wrapped_;
- Frequency frequency_[2]; // [0] <- RX, [1] <- other
- Frequency pre_tx_frequency_; // return to this on switching to Rx
- bool tx_;
+ Frequency rx_frequency_; // requested Rx frequency
+ Frequency tx_frequency_; // requested Tx frequency
+ bool split_; // requested split state
};
#endif