Add version and revision information to UDP heartbeat messages

Updated  UDP examples  to show  the version  and revision  information
received from clients.

git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@7358 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Bill Somerville
2016-12-04 00:55:15 +00:00
parent ac859c8f68
commit 2255b17e91
11 changed files with 79 additions and 23 deletions
+11 -2
View File
@@ -112,7 +112,7 @@ public:
}
private:
void add_client (QString const& id)
void add_client (QString const& id, QString const& version, QString const& revision)
{
auto client = new Client {id};
connect (server_, &MessageServer::status_update, client, &Client::update_status);
@@ -120,7 +120,16 @@ private:
connect (server_, &MessageServer::WSPR_decode, client, &Client::beacon_spot_added);
clients_[id] = client;
server_->replay (id);
std::cout << "Discovered WSJT-X instance: " << id.toStdString () << std::endl;
std::cout << "Discovered WSJT-X instance: " << id.toStdString ();
if (version.size ())
{
std::cout << " v" << version.toStdString ();
}
if (revision.size ())
{
std::cout << " (" << revision.toStdString () << ")";
}
std::cout << std::endl;
}
void remove_client (QString const& id)