diff options
| author | Christoph Berg <myon@debian.org> | 2026-04-07 19:04:48 +0200 |
|---|---|---|
| committer | Christoph Berg <myon@debian.org> | 2026-04-07 19:04:48 +0200 |
| commit | 9b9d6a272fa4204d45956828da3f20b7be49f675 (patch) | |
| tree | b611f981259a12a2bfd4d7305843929447f1bb74 /Transceiver/Transceiver.cpp | |
| parent | 2f7ab3ab46786fa2a5931dae22a1b119b5cfdafa (diff) | |
| parent | f647d78463c1250ce9c99af664615fafccf5e959 (diff) | |
Update upstream source from tag 'upstream/3.0.0'
Update to upstream version '3.0.0'
with Debian dir 3b764e9a4be12ad8351230b538640dd98ddb9d05
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); +} |
