diff options
| author | Enrico Rossi <e.rossi@tecnobrain.com> | 2018-11-03 17:52:26 +0100 |
|---|---|---|
| committer | Enrico Rossi <e.rossi@tecnobrain.com> | 2018-11-03 17:52:26 +0100 |
| commit | b4aebf2d137b892f53503b13785ecae900062ff7 (patch) | |
| tree | 3ba99b2baec2292f2e13bfe90a5e401a5f4c47a5 /UDPExamples/UDPDaemon.cpp | |
| parent | 37f727ac0746fd85504aa46c1f023c09b3eff33a (diff) | |
New upstream version 1.9.1+repackupstream/1.9.1+repack
* Drop local hamlib copy (commit d1b545be).
* Drop local boost copy (1.63.0).
Diffstat (limited to 'UDPExamples/UDPDaemon.cpp')
| -rw-r--r-- | UDPExamples/UDPDaemon.cpp | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/UDPExamples/UDPDaemon.cpp b/UDPExamples/UDPDaemon.cpp index 2d3b1b2d..b75a8ade 100644 --- a/UDPExamples/UDPDaemon.cpp +++ b/UDPExamples/UDPDaemon.cpp @@ -95,6 +95,38 @@ 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) + { + 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; + 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 +159,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 (); |
