19class TransceiverFactory :
public QObject {
21 Q_ENUMS(DataBits StopBits Handshake PTTMethod TXAudioSource SplitMode)
30 enum PortType { none, serial, network, usb };
32 explicit Capabilities(
int model_number = 0, PortType port_type = none,
33 bool has_CAT_PTT =
false,
34 bool has_CAT_PTT_mic_data =
false,
35 bool has_CAT_indirect_serial_PTT =
false,
36 bool asynchronous =
false)
37 : model_number_{model_number}, port_type_{port_type},
38 has_CAT_PTT_{has_CAT_PTT},
39 has_CAT_PTT_mic_data_{has_CAT_PTT_mic_data},
40 has_CAT_indirect_serial_PTT_{has_CAT_indirect_serial_PTT},
41 asynchronous_{asynchronous} {}
46 bool has_CAT_PTT_mic_data_;
47 bool has_CAT_indirect_serial_PTT_;
54 typedef QMap<QString, Capabilities> Transceivers;
59 enum DataBits { seven_data_bits = 7, eight_data_bits, default_data_bits };
61 enum StopBits { one_stop_bit = 1, two_stop_bits, default_stop_bits };
77 enum TXAudioSource { TX_audio_source_front, TX_audio_source_rear };
79 enum SplitMode { split_mode_none, split_mode_rig, split_mode_emulate };
83 ~TransceiverFactory();
86 *
const basic_transceiver_name_;
91 Transceivers
const &supported_transceivers()
const;
94 Capabilities::PortType
95 CAT_port_type(QString
const &name)
const;
96 bool has_CAT_PTT(QString
const &name)
const;
97 bool has_CAT_PTT_mic_data(
98 QString
const &name)
const;
99 bool has_CAT_indirect_serial_PTT(QString
const &name)
101 bool has_asynchronous_CAT(
102 QString
const &name)
const;
107 QString network_port;
118 TXAudioSource audio_source;
120 SplitMode split_mode;
127 return rhs.rig_name == rig_name && rhs.serial_port == serial_port &&
128 rhs.network_port == network_port &&
129 rhs.usb_port == usb_port && rhs.baud == baud &&
130 rhs.data_bits == data_bits && rhs.stop_bits == stop_bits &&
131 rhs.handshake == handshake && rhs.force_dtr == force_dtr &&
132 rhs.dtr_high == dtr_high && rhs.force_rts == force_rts &&
133 rhs.rts_high == rts_high && rhs.ptt_type == ptt_type &&
134 rhs.audio_source == audio_source &&
135 rhs.split_mode == split_mode && rhs.ptt_port == ptt_port &&
136 rhs.poll_interval == poll_interval;
150 QThread *target_thread =
nullptr);
153 Transceivers transceivers_;