diff options
| author | hibby <d@vehibberd.com> | 2026-10-06 21:24:40 +0100 |
|---|---|---|
| committer | hibby <d@vehibberd.com> | 2026-10-06 21:24:40 +0100 |
| commit | c25cbdf6fb6d946175f4335fab77bfea601b56db (patch) | |
| tree | 6f7a94b7b81f999e434f61b73d47e337dfd26bf2 /map65/PSKReporter.hpp | |
| parent | 71f5689252c9f13e70e1c24856904475b2307809 (diff) | |
| parent | 0685fcada9f95fe90f70b387cd7d757da8209624 (diff) | |
Merge tag 'debian/3.2.0_rc1+dfsg-2' into debian/trixie-backportsdebian/trixie-backports
tagging wsjtx 3.2.0~rc1+dfsg-2
Diffstat (limited to 'map65/PSKReporter.hpp')
| -rw-r--r-- | map65/PSKReporter.hpp | 107 |
1 files changed, 0 insertions, 107 deletions
diff --git a/map65/PSKReporter.hpp b/map65/PSKReporter.hpp deleted file mode 100644 index 28884e0e..00000000 --- a/map65/PSKReporter.hpp +++ /dev/null @@ -1,107 +0,0 @@ -#ifndef PSK_REPORTER_HPP_ -#define PSK_REPORTER_HPP_ -#include <boost/log/sources/severity_channel_logger.hpp> -#include <boost/log/trivial.hpp> - -#include <QObject> -#include <QTimer> -#include <QDateTime> -#include <QQueue> -#include <QTcpSocket> -#include <QScopedPointer> -#include "Radio.hpp" -#include "../qt_helpers.hpp" -#include "commons.h" - -class QString; - -class PSKReporter : public QObject -{ - Q_OBJECT - -signals: - void dataReady(const QByteArray &payload); - - -public slots: - void restartReportTimer(); - void restartDescriptorTimer(); - void init(); // Slot to initialize timers/sockets - - -public: - explicit PSKReporter (QString const& myCall, QString const& myGrid, QString const& program_info); - ~PSKReporter (); - - void setLocalStation (QString const& call, QString const& grid, QString const& antenna, QString const& rigInformation); - void build_preamble (QDataStream& message); - void send_report (bool send_residue); - void stop (); - bool flushing(); - void writeUtfString (QDataStream& out, QString const& s); - int num_pad_bytes (int len); - void set_length (QDataStream& out, QByteArray& b); - - Q_SIGNAL void errorOccurred (QString const& reason); - - struct Spot - { - bool operator == (Spot const& rhs) - { - return - call_ == rhs.call_ - && grid_ == rhs.grid_ - && mode_ == rhs.mode_ - && std::abs (Radio::FrequencyDelta (freq_ - rhs.freq_)) < 50; - } - - QString call_; - QString grid_; - int snr_; - Radio::Frequency freq_; - QString mode_; - QDateTime time_; - }; - - void addRemoteStation (QString const& call, QString const& grid, Radio::Frequency freq, QString const& mode, int snr, QDateTime spotTime); - - // - // Flush any pending spots to PSK Reporter - // - void sendReport (bool last = false); - -private slots: - void handle_socket_error(QAbstractSocket::SocketError error); - void onConnected(); - void onReadyRead(); - void sendData(const QByteArray &payload); - -private: - using logger_type = boost::log::sources::severity_channel_logger_mt<boost::log::trivial::severity_level>; - logger_type mutable logger_; - QString myCall; - QString myGrid; - quint32 sequence_number_; - int send_descriptors_; - int send_receiver_data_; - unsigned flush_counter_ ; - QString prog_id_; - unsigned observation_id_; - QTimer *report_timer_; - QTimer *descriptor_timer_; - QScopedPointer<QTcpSocket> socket; // Or: std::unique_ptr<QSslSocket - int dns_lookup_id_; - QByteArray payload_; - QString rx_call_; - QString rx_grid_; - QString rx_ant_; - QString rigInformation_; - QByteArray tx_data_; - QByteArray tx_residue_; - QQueue<Spot> spots_; - - // Copy constructor and assignment operator disabled - Q_DISABLE_COPY(PSKReporter) -}; - -#endif |
