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