mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2026-06-10 01:49:21 -04:00
Add WSPR decodes to UDP message protocol
The message_aggregator (MessageAggregator.cpp) has been updated to do something with WSPR decodes. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@6101 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
+22
-2
@@ -272,9 +272,16 @@ MessageClient::MessageClient (QString const& id, QString const& server, port_typ
|
||||
, m_ {id, server_port, this}
|
||||
{
|
||||
connect (&*m_, static_cast<void (impl::*) (impl::SocketError)> (&impl::error)
|
||||
, [this] (impl::SocketError /* e */)
|
||||
, [this] (impl::SocketError e)
|
||||
{
|
||||
Q_EMIT error (m_->errorString ());
|
||||
#if defined (Q_OS_WIN) && QT_VERSION >= 0x050500
|
||||
if (e != impl::NetworkError) // take this out when Qt 5.5
|
||||
// stops doing this
|
||||
// spuriously
|
||||
#endif
|
||||
{
|
||||
Q_EMIT error (m_->errorString ());
|
||||
}
|
||||
});
|
||||
set_server (server);
|
||||
}
|
||||
@@ -340,6 +347,19 @@ void MessageClient::decode (bool is_new, QTime time, qint32 snr, float delta_tim
|
||||
}
|
||||
}
|
||||
|
||||
void MessageClient::WSPR_decode (bool is_new, QTime time, qint32 snr, float delta_time, Frequency frequency
|
||||
, qint32 drift, QString const& callsign, QString const& grid, qint32 power)
|
||||
{
|
||||
if (m_->server_port_ && !m_->server_string_.isEmpty ())
|
||||
{
|
||||
QByteArray message;
|
||||
NetworkMessage::Builder out {&message, NetworkMessage::WSPRDecode, m_->id_, m_->schema_};
|
||||
out << is_new << time << snr << delta_time << frequency << drift << callsign.toUtf8 ()
|
||||
<< grid.toUtf8 () << power;
|
||||
m_->send_message (out, message);
|
||||
}
|
||||
}
|
||||
|
||||
void MessageClient::clear_decodes ()
|
||||
{
|
||||
if (m_->server_port_ && !m_->server_string_.isEmpty ())
|
||||
|
||||
Reference in New Issue
Block a user