82 class TransceiverState {
85 : online_{
false}, rx_frequency_{0}, tx_frequency_{0}, mode_{UNK},
86 split_{Split::unknown}, ptt_{
false} {}
88 bool online()
const {
return online_; }
89 Frequency frequency()
const {
return rx_frequency_; }
90 Frequency tx_frequency()
const {
return tx_frequency_; }
91 bool split()
const {
return Split::on == split_; }
92 MODE mode()
const {
return mode_; }
93 bool ptt()
const {
return ptt_; }
95 void online(
bool state) { online_ = state; }
96 void frequency(Frequency f) { rx_frequency_ = f; }
97 void tx_frequency(Frequency f) { tx_frequency_ = f; }
98 void split(
bool state) { split_ = state ? Split::on : Split::off; }
99 void mode(MODE m) { mode_ = m; }
100 void ptt(
bool state) { ptt_ = state; }
104 Frequency rx_frequency_;
105 Frequency tx_frequency_;
107 enum class Split { unknown, off, on } split_;
112 friend QDebug operator<<(QDebug, TransceiverState
const &);
113 friend bool operator!=(TransceiverState
const &,
114 TransceiverState
const &);