Files
qt-migration-legatus/qt6-after/qt6-migrated-legatus/Lts/Proxies/TrainingAreaBase/Plugins/WlsTetra/wls_dispatcher.h
T
berrux-dev 855b0a6101 Remove modules not compiled by this branch's release build
Lts/Common: drop the 17 submodules excluded from the RELEASE_BUILD
branch of Lts/Common/CMakeLists.txt (CodeGen, LtsAppManager, LtsBotan,
LtsCoordinate, LtsElevation, LtsLogin, LtsMultiMonitor,
LtsPluginManager, LtsPrinting, LtsProjectionWorkstation,
LtsScriptTimeline, LtsSession, LtsTimeline, LtsTimelineClassic,
LtsVirtualKeyboard, LtsWidgets, TopicEditorBase). Only the 13
subdirectories actually built remain.

TrainingAreaBase: drop sources of targets excluded by
IF(NOT RELEASE_BUILD) / IF(BUILD_RTI) (svcTabClient, svcTabServer,
svcTrainingAreaBase exe, RecordReplayPlugin customization) and the 7
plugin directories not added in the release path (AdlerJson,
ApacheHlaJson, DebugJsonDir, HlaJson, Nmea, UAS, WlsTetra). Only
tabTelegrams, svcTabCommon and the TetraJson plugin are compiled.

Cross-checked: no kept compiled source includes headers from the
removed modules (GuiPluginInterface - the only LtsWidgets consumer -
is itself NOT RELEASE_BUILD-guarded).
2026-10-13 19:19:55 +02:00

65 lines
1.9 KiB
C++
Executable File

/**
* Send / Receive telegrams to/from Wls
* $Id$
* $HeadURL$
* $Author$
* Created by Christian Ehrlicher, SLSE, 2016-09-26
*/
#pragma once
#include <QObject>
#include <QWebSocket>
#include <TrainingAreaBase/tab_plugin_interface.h>
#include <DDS/Core/function_reply_object.h> // tr_lts
#include "logger.h"
class QTimer;
namespace WlsTetra
{
class WlsHandlerRx;
class WlsHandlerTx;
class WlsDispatcher final : public TrainingAreaBase::Plugin::Interface
{
Q_OBJECT
public:
WlsDispatcher(TrainingAreaBase::Plugin::DataProvider *pdp,
const std::shared_ptr<TrainingAreaBase::RecvFromTab> &recvFromTabCb,
NGL::Settings *settings);
public Q_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 { return; }
const char *name() const override { return tr_lts("dds", "WLS"); }
public Q_SLOTS:
void onWlsConnected();
void onWlsDisconnected();
void onWlsExternalConnectionStateChanged(bool bConnected);
void onWebSocketError();
void onTextMessageReceived(const QString &message);
void onParticipantLicenseChange(const TrainingAreaBase::TetraIcd::ParticipantLicenseChange &lc);
Q_SIGNALS:
void broadcastTelegramsRequest(int equipmentNumber, int broadcastIndex, int resetCounter);
void wlsTelegramReceived(const TrainingAreaBase::TetraIcd::TrainingAreaTelegram *tele);
void wlsTelegramSent(const TrainingAreaBase::TetraIcd::TrainingAreaTelegram *tele);
private:
QUrl webSocketUrl() const;
private:
std::shared_ptr<TrainingAreaBase::RecvFromTab> m_recvFromTabCb;
std::shared_ptr<WlsHandlerRx> m_recvFromWls;
std::shared_ptr<WlsHandlerTx> m_sendToWls;
NGL::Settings *m_settings;
QWebSocket *m_webSocket;
QTimer *m_webSocketReconnectTimer;
bool m_bWarnedOnce;
NGL::INGLLogger &m_logger;
};
} // namespace WlsTetra