diff options
Diffstat (limited to 'UDPExamples/UDPDaemon.cpp')
| -rw-r--r-- | UDPExamples/UDPDaemon.cpp | 39 |
1 files changed, 38 insertions, 1 deletions
diff --git a/UDPExamples/UDPDaemon.cpp b/UDPExamples/UDPDaemon.cpp index 2d3b1b2d..0ee202dc 100644 --- a/UDPExamples/UDPDaemon.cpp +++ b/UDPExamples/UDPDaemon.cpp @@ -50,7 +50,8 @@ public: , QString const& /*report*/, QString const& /*tx_mode*/, bool /*tx_enabled*/ , bool /*transmitting*/, bool /*decoding*/, qint32 /*rx_df*/, qint32 /*tx_df*/ , QString const& /*de_call*/, QString const& /*de_grid*/, QString const& /*dx_grid*/ - , bool /* watchdog_timeout */, QString const& sub_mode, bool /*fast_mode*/) + , bool /* watchdog_timeout */, QString const& sub_mode, bool /*fast_mode*/ + , quint8 /*special_op_mode*/) { if (id == id_) { @@ -95,6 +96,40 @@ public: } } + Q_SLOT void qso_logged (QString const&client_id, QDateTime time_off, QString const& dx_call, QString const& dx_grid + , Frequency dial_frequency, QString const& mode, QString const& report_sent + , QString const& report_received, QString const& tx_power + , QString const& comments, QString const& name, QDateTime time_on + , QString const& operator_call, QString const& my_call, QString const& my_grid + , QString const& exchange_sent, QString const& exchange_rcvd) + { + if (client_id == id_) + { + qDebug () << "time_on:" << time_on << "time_off:" << time_off << "dx_call:" << dx_call << "grid:" << dx_grid + << "freq:" << dial_frequency << "mode:" << mode << "rpt_sent:" << report_sent + << "rpt_rcvd:" << report_received << "Tx_pwr:" << tx_power << "comments:" << comments + << "name:" << name << "operator_call:" << operator_call << "my_call:" << my_call + << "my_grid:" << my_grid << "exchange_sent:" << exchange_sent + << "exchange_rcvd:" << exchange_rcvd; + std::cout << QByteArray {80, '-'}.data () << '\n'; + std::cout << tr ("%1: Logged %2 grid: %3 power: %4 sent: %5 recd: %6 freq: %7 time_off: %8 op: %9 my_call: %10 my_grid: %11") + .arg (id_).arg (dx_call).arg (dx_grid).arg (tx_power).arg (report_sent).arg (report_received) + .arg (dial_frequency).arg (time_off.toString("yyyy-MM-dd hh:mm:ss.z")).arg (operator_call) + .arg (my_call).arg (my_grid).toStdString () + << std::endl; + } + } + + Q_SLOT void logged_ADIF (QString const&client_id, QByteArray const& ADIF) + { + if (client_id == id_) + { + qDebug () << "ADIF:" << ADIF; + std::cout << QByteArray {80, '-'}.data () << '\n'; + std::cout << ADIF.data () << std::endl; + } + } + private: QString id_; Frequency dial_frequency_; @@ -127,6 +162,8 @@ private: connect (server_, &MessageServer::status_update, client, &Client::update_status); connect (server_, &MessageServer::decode, client, &Client::decode_added); connect (server_, &MessageServer::WSPR_decode, client, &Client::beacon_spot_added); + connect (server_, &MessageServer::qso_logged, client, &Client::qso_logged); + connect (server_, &MessageServer::logged_ADIF, client, &Client::logged_ADIF); clients_[id] = client; server_->replay (id); std::cout << "Discovered WSJT-X instance: " << id.toStdString (); |
