Extend UDP status message - added Rx/Tx DF, call and grid information

Build now creates and installs a  UDP library that contains the server
side  of the  UDP messaging  facility.  This  library is  used by  the
udp_daemon and message_aggregator reference  examples. The new library
is  currently a  static archive  but  can also  be built  as a  shared
library.  The library  allows third  party Qt  applications to  easily
access UDP messages from WSJT-X.

Refactored  the  message_aggregator  reference example  to  split  out
classes into  separate translation  units. Added new  functionality to
exercise  the  new  UDP  status fields,  highlight  own  call,  CQ/QRZ
messages and decodes near Rx DF.

git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@6691 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Bill Somerville
2016-05-24 10:08:35 +00:00
parent 3ff3a192ee
commit ae3749bb46
29 changed files with 1164 additions and 787 deletions
+14 -2
View File
@@ -7,6 +7,7 @@
#include <QTimer>
#include <QHash>
#include "Radio.hpp"
#include "NetworkMessage.hpp"
#include "qt_helpers.hpp"
@@ -25,6 +26,9 @@ public:
, port_ {0u}
, clock_ {new QTimer {this}}
{
// register the required types with Qt
Radio::register_types ();
connect (this, &QIODevice::readyRead, this, &MessageServer::impl::pending_datagrams);
connect (this, static_cast<void (impl::*) (SocketError)> (&impl::error)
, [this] (SocketError /* e */)
@@ -194,12 +198,20 @@ void MessageServer::impl::parse_message (QHostAddress const& sender, port_type s
bool tx_enabled {false};
bool transmitting {false};
bool decoding {false};
in >> f >> mode >> dx_call >> report >> tx_mode >> tx_enabled >> transmitting >> decoding;
qint32 rx_df {-1};
qint32 tx_df {-1};
QByteArray de_call;
QByteArray de_grid;
QByteArray dx_grid;
in >> f >> mode >> dx_call >> report >> tx_mode >> tx_enabled >> transmitting >> decoding
>> rx_df >> tx_df >> de_call >> de_grid >> dx_grid;
if (check_status (in) != Fail)
{
Q_EMIT self_->status_update (id, f, QString::fromUtf8 (mode), QString::fromUtf8 (dx_call)
, QString::fromUtf8 (report), QString::fromUtf8 (tx_mode)
, tx_enabled, transmitting, decoding);
, tx_enabled, transmitting, decoding, rx_df, tx_df
, QString::fromUtf8 (de_call), QString::fromUtf8 (de_grid)
, QString::fromUtf8 (dx_grid));
}
}
break;