diff options
| author | tony mancill <tmancill@debian.org> | 2026-04-12 08:46:47 -0700 |
|---|---|---|
| committer | tony mancill <tmancill@debian.org> | 2026-04-12 08:46:47 -0700 |
| commit | cd2dad3bc7ae0ee0a18b7b20a945009362ec3851 (patch) | |
| tree | 5a622ec4193e9bc899f6499f936848a661be29cb /Transceiver/Transceiver.cpp | |
| parent | 558c0b9d6ecf70c5222e2069ece1fea3656c75d7 (diff) | |
| parent | 291b3817bf0c7a742e9e17d42c94fc8c9530e40d (diff) | |
Merge branch 'debian/latest' into debian/trixie-backports
Diffstat (limited to 'Transceiver/Transceiver.cpp')
| -rw-r--r--[-rwxr-xr-x] | Transceiver/Transceiver.cpp | 204 |
1 files changed, 102 insertions, 102 deletions
diff --git a/Transceiver/Transceiver.cpp b/Transceiver/Transceiver.cpp index 8c250360..c6dea805 100755..100644 --- a/Transceiver/Transceiver.cpp +++ b/Transceiver/Transceiver.cpp @@ -1,102 +1,102 @@ -#include "Transceiver.hpp"
-
-#include <ostream>
-
-#include "moc_Transceiver.cpp"
-
-Transceiver::Transceiver (logger_type * logger, QObject * parent)
- : QObject {parent}
- , logger_ {logger}
-{
-}
-
-#if !defined (QT_NO_DEBUG_STREAM)
-QDebug operator << (QDebug d, Transceiver::TransceiverState const& s)
-{
- d.nospace ()
- << "Transceiver::TransceiverState(online: " << (s.online_ ? "yes" : "no")
- << " Frequency {" << s.rx_frequency_ << "Hz, " << s.tx_frequency_ << "Hz} " << s.mode_
- << "; SPLIT: " << (Transceiver::TransceiverState::Split::on == s.split_ ? "on" : Transceiver::TransceiverState::Split::off == s.split_ ? "off" : "unknown")
- << "; PTT: " << (s.ptt_ ? "on" : "off")
- << "; AUDIO: " << (s.audio_ ? "on" : "off")
- << "; TX_AUDIO: " << (s.tx_audio_ ? "on" : "off")
- << "; TUNE: " << (s.tune_ ? "on" : "off")
- << "; QUICK: " << (s.quick_ ? "on" : "off")
- << "; PERIOD: " << s.period_ << "sec."
- << "; BLOCKSIZE: " << s.blocksize_
- << "; SYMBOLSLENGTH: " << s.symbolslength_
- << "; FRAMESPERSYMBOL: " << s.framespersymbol_
- << "; TRFREQUENCY: " << s.trfrequency_ << "Hz"
- << "; TONESPACING: " << s.tonespacing_
- << "; SYNCHRONIZE: " << (s.synchronize_ ? "on" : "off")
- << "; DBSNR: " << s.dbsnr_
- << "; TRPERIOD: " << s.trperiod_ << "sec."
- << "; SPREAD: " << s.spread_
- << "; NSYM: " << s.nsym_
- << "; VOLUME: " << s.volume_
- << "; TXVOLUME: " << s.txvolume_
- << "; LEVEL: " << s.level_ << "dBm"
- << "; POWER: " << s.power_ << "mWatts"
- << "; SWR: " << s.swr_
- << ")\n";
- return d.space ();
-}
-#endif
-
-std::ostream& operator << (std::ostream& os, Transceiver::MODE m)
-{
- auto const& mo = Transceiver::staticMetaObject; \
- return os << mo.enumerator (mo.indexOfEnumerator ("MODE")).valueToKey (static_cast<int> (m)); \
-}
-
-std::ostream& operator << (std::ostream& os, Transceiver::TransceiverState const& s)
-{
- return os
- << "Transceiver::TransceiverState(online: " << (s.online_ ? "yes" : "no")
- << " Frequency {" << s.rx_frequency_ << "Hz, " << s.tx_frequency_ << "Hz} Mode: " << s.mode_
- << "; SPLIT: " << (Transceiver::TransceiverState::Split::on == s.split_ ? "on" : Transceiver::TransceiverState::Split::off == s.split_ ? "off" : "unknown")
- << "; PTT: " << (s.ptt_ ? "on" : "off")
- << "; POWER: " << s.power_ << "mWatts"
- << "; SWR: " << s.swr_
- << "; TUNE: " << s.tune_
- << ")\n";
-}
-
-ENUM_QDATASTREAM_OPS_IMPL (Transceiver, MODE);
-
-ENUM_CONVERSION_OPS_IMPL (Transceiver, MODE);
-
-bool operator != (Transceiver::TransceiverState const& lhs, Transceiver::TransceiverState const& rhs)
-{
- return lhs.online_ != rhs.online_
- || lhs.rx_frequency_ != rhs.rx_frequency_
- || lhs.tx_frequency_ != rhs.tx_frequency_
- || lhs.mode_ != rhs.mode_
- || lhs.split_ != rhs.split_
- || lhs.ptt_ != rhs.ptt_
- || lhs.audio_ != rhs.audio_
- || lhs.tx_audio_ != rhs.tx_audio_
- || lhs.tune_ != rhs.tune_
- || lhs.quick_ != rhs.quick_
- || lhs.period_ != rhs.period_
- || lhs.blocksize_ != rhs.blocksize_
- || lhs.symbolslength_ != rhs.symbolslength_
- || lhs.framespersymbol_ != rhs.framespersymbol_
- || lhs.trfrequency_ != rhs.trfrequency_
- || lhs.tonespacing_ != rhs.tonespacing_
- || lhs.synchronize_ != rhs.synchronize_
- || lhs.dbsnr_ != rhs.dbsnr_
- || lhs.trperiod_ != rhs.trperiod_
- || lhs.spread_ != rhs.spread_
- || lhs.nsym_ != rhs.nsym_
- || lhs.volume_ != rhs.volume_
- || lhs.txvolume_ != rhs.txvolume_
- || lhs.level_ != rhs.level_
- || lhs.power_ != rhs.power_
- || lhs.swr_ != rhs.swr_;
-}
-
-bool operator == (Transceiver::TransceiverState const& lhs, Transceiver::TransceiverState const& rhs)
-{
- return !(lhs != rhs);
-}
+#include "Transceiver.hpp" + +#include <ostream> + +#include "moc_Transceiver.cpp" + +Transceiver::Transceiver (logger_type * logger, QObject * parent) + : QObject {parent} + , logger_ {logger} +{ +} + +#if !defined (QT_NO_DEBUG_STREAM) +QDebug operator << (QDebug d, Transceiver::TransceiverState const& s) +{ + d.nospace () + << "Transceiver::TransceiverState(online: " << (s.online_ ? "yes" : "no") + << " Frequency {" << s.rx_frequency_ << "Hz, " << s.tx_frequency_ << "Hz} " << s.mode_ + << "; SPLIT: " << (Transceiver::TransceiverState::Split::on == s.split_ ? "on" : Transceiver::TransceiverState::Split::off == s.split_ ? "off" : "unknown") + << "; PTT: " << (s.ptt_ ? "on" : "off") + << "; AUDIO: " << (s.audio_ ? "on" : "off") + << "; TX_AUDIO: " << (s.tx_audio_ ? "on" : "off") + << "; TUNE: " << (s.tune_ ? "on" : "off") + << "; QUICK: " << (s.quick_ ? "on" : "off") + << "; PERIOD: " << s.period_ << "sec." + << "; BLOCKSIZE: " << s.blocksize_ + << "; SYMBOLSLENGTH: " << s.symbolslength_ + << "; FRAMESPERSYMBOL: " << s.framespersymbol_ + << "; TRFREQUENCY: " << s.trfrequency_ << "Hz" + << "; TONESPACING: " << s.tonespacing_ + << "; SYNCHRONIZE: " << (s.synchronize_ ? "on" : "off") + << "; DBSNR: " << s.dbsnr_ + << "; TRPERIOD: " << s.trperiod_ << "sec." + << "; SPREAD: " << s.spread_ + << "; NSYM: " << s.nsym_ + << "; VOLUME: " << s.volume_ + << "; TXVOLUME: " << s.txvolume_ + << "; LEVEL: " << s.level_ << "dBm" + << "; POWER: " << s.power_ << "mWatts" + << "; SWR: " << s.swr_ + << ")\n"; + return d.space (); +} +#endif + +std::ostream& operator << (std::ostream& os, Transceiver::MODE m) +{ + auto const& mo = Transceiver::staticMetaObject; \ + return os << mo.enumerator (mo.indexOfEnumerator ("MODE")).valueToKey (static_cast<int> (m)); \ +} + +std::ostream& operator << (std::ostream& os, Transceiver::TransceiverState const& s) +{ + return os + << "Transceiver::TransceiverState(online: " << (s.online_ ? "yes" : "no") + << " Frequency {" << s.rx_frequency_ << "Hz, " << s.tx_frequency_ << "Hz} Mode: " << s.mode_ + << "; SPLIT: " << (Transceiver::TransceiverState::Split::on == s.split_ ? "on" : Transceiver::TransceiverState::Split::off == s.split_ ? "off" : "unknown") + << "; PTT: " << (s.ptt_ ? "on" : "off") + << "; POWER: " << s.power_ << "mWatts" + << "; SWR: " << s.swr_ + << "; TUNE: " << s.tune_ + << ")\n"; +} + +ENUM_QDATASTREAM_OPS_IMPL (Transceiver, MODE); + +ENUM_CONVERSION_OPS_IMPL (Transceiver, MODE); + +bool operator != (Transceiver::TransceiverState const& lhs, Transceiver::TransceiverState const& rhs) +{ + return lhs.online_ != rhs.online_ + || lhs.rx_frequency_ != rhs.rx_frequency_ + || lhs.tx_frequency_ != rhs.tx_frequency_ + || lhs.mode_ != rhs.mode_ + || lhs.split_ != rhs.split_ + || lhs.ptt_ != rhs.ptt_ + || lhs.audio_ != rhs.audio_ + || lhs.tx_audio_ != rhs.tx_audio_ + || lhs.tune_ != rhs.tune_ + || lhs.quick_ != rhs.quick_ + || lhs.period_ != rhs.period_ + || lhs.blocksize_ != rhs.blocksize_ + || lhs.symbolslength_ != rhs.symbolslength_ + || lhs.framespersymbol_ != rhs.framespersymbol_ + || lhs.trfrequency_ != rhs.trfrequency_ + || lhs.tonespacing_ != rhs.tonespacing_ + || lhs.synchronize_ != rhs.synchronize_ + || lhs.dbsnr_ != rhs.dbsnr_ + || lhs.trperiod_ != rhs.trperiod_ + || lhs.spread_ != rhs.spread_ + || lhs.nsym_ != rhs.nsym_ + || lhs.volume_ != rhs.volume_ + || lhs.txvolume_ != rhs.txvolume_ + || lhs.level_ != rhs.level_ + || lhs.power_ != rhs.power_ + || lhs.swr_ != rhs.swr_; +} + +bool operator == (Transceiver::TransceiverState const& lhs, Transceiver::TransceiverState const& rhs) +{ + return !(lhs != rhs); +} |
