summaryrefslogtreecommitdiff
path: root/Transceiver/Transceiver.cpp
diff options
context:
space:
mode:
authorChristoph Berg <myon@debian.org>2025-09-16 12:37:12 +0200
committerChristoph Berg <myon@debian.org>2025-09-16 12:57:29 +0200
commit5a4967c577ad245a2117b7b2f71c13b1212fe285 (patch)
tree4d09343cfe757239895a0dd9b399242d2a07d7c2 /Transceiver/Transceiver.cpp
parent23c903a09fb1d73fd20b50323cd80cfb3aba8799 (diff)
Merge 2.7 changes, I had uploaded -1 from the wrong branch.debian/3.0.0_rc1+repack-2
Diffstat (limited to 'Transceiver/Transceiver.cpp')
-rwxr-xr-xTransceiver/Transceiver.cpp161
1 files changed, 102 insertions, 59 deletions
diff --git a/Transceiver/Transceiver.cpp b/Transceiver/Transceiver.cpp
index c8be6116..8c250360 100755
--- a/Transceiver/Transceiver.cpp
+++ b/Transceiver/Transceiver.cpp
@@ -1,59 +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")
- << ')';
- 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")
- << ')';
-}
-
-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_;
-}
-
-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);
+}