- cmake/FindRTI.cmake: Add INTERFACE placeholder targets when RTI not found - cmake/FindRTI.cmake: Force BUILD_RTI=OFF when RTI not installed - Lts/Common/LtsSession/CMakeLists.txt: Make LtsSessionDataDds conditional on BUILD_RTI - Lts/Viewer/CMakeLists.txt: Make LtsDataView conditional on BUILD_RTI - Lts/Plugins/*/CMakeLists.txt: 97 plugin files wrapped in BUILD_RTI conditionals - cmake/NGLMacros.cmake: Fix NGL_ADD_BIG_RESOURCES macro (removed premature return()) - Multiple Qt6 API fixes: QLinkedList→std::list, QStringRef→QStringView, etc. - BUILD_RTI_FIXES_SUMMARY.md: Comprehensive documentation of all fixes Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
61 lines
1.4 KiB
C++
Executable File
61 lines
1.4 KiB
C++
Executable File
|
|
|
|
|
|
#pragma once
|
|
|
|
#include <QObject>
|
|
#include <QWebSocketServer>
|
|
#include <QWebSocket>
|
|
#include <QTimer>
|
|
#include <QUdpSocket>
|
|
#include <TrainingAreaBase/tab_plugin_interface.h>
|
|
#include <nglsettings/nglsettings_settings.h>
|
|
#include <Core/core_types.h>
|
|
#include "logger.h"
|
|
|
|
namespace Nmea
|
|
{
|
|
class NmeaHandlerRx;
|
|
class NmeaHandlerTx;
|
|
class NmeaDispatcher final : public TrainingAreaBase::Plugin::Interface
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
explicit NmeaDispatcher(TrainingAreaBase::Plugin::DataProvider *pdp,
|
|
const std::shared_ptr<TrainingAreaBase::RecvFromTab> &recvFromTabCb, NGL::Settings *settings);
|
|
|
|
public slots:
|
|
bool init() override;
|
|
|
|
public:
|
|
std::shared_ptr<TrainingAreaBase::SendToTab> sendToTab() override;
|
|
bool isDebugInterface() const override { return false; }
|
|
bool canSendData() const override;
|
|
void exerciseChanged() override;
|
|
const char *name() const override { return tr_lts("dds", "TETRA"); }
|
|
|
|
|
|
private slots:
|
|
void connected();
|
|
void disconnected();
|
|
void bytesWritten(qint64 bytes);
|
|
void readyRead();
|
|
void reconnectTimerSlot();
|
|
private:
|
|
void reconnect();
|
|
QString getNmeaHost();
|
|
int getNmeaPort();
|
|
private:
|
|
std::shared_ptr<NmeaHandlerRx> m_rxHandler;
|
|
std::shared_ptr<NmeaHandlerTx> m_txHandler;
|
|
TrainingAreaBase::Plugin::DataProvider *m_dataProvider;
|
|
|
|
int m_nmeaPort;
|
|
QString m_nmeaHost;
|
|
QUdpSocket *m_socket;
|
|
QTimer *m_reconnectTimer;
|
|
NGL::Settings *m_settings;
|
|
};
|
|
|
|
}
|