Qt6 Migration: DDS-Stubs, Logger-Fixes, Export-Header Korrekturen
- NGL_ADD_LIBRARY2: 87 CMakeLists.txt konvertiert für Export-Header Generierung - 44 Export-Header Include-Pfade korrigiert (_export.h) - 81 DDS-Stub-Header generiert (*_dtc.h, *_fts.h, *_dts.h, *_ftc.h) - INGLLogger: Duplikat gelöscht, m_logger Member entfernt, variadische Makros - Q_FUNC_INFO Redefinition behoben (Qt6 definiert bereits) - FATAL_LOG Makro hinzugefügt - InfrastructureManagement DDS-Stubs (ism.hpp, ism_enums.hpp, ism_ftc.h) - FilterManagement DDS-Stubs (flt_ftc.h, flt_dts.h) - AreaEffectSimulation DDS-Stubs (aes.hpp, aes_enums.hpp) - SymbolAppearance Klasse vollständig definiert mit content() Methode - BuildingComponentFilter Klasse definiert mit Copy-Konstruktor - Ftc Factory: nullptr Return (abstract class) - AesFilter Klasse in aes.hpp hinzugefügt - Dtc Klasse in ppm.hpp mit participantChanged Signal - AesType Enum: alle 15 At* Werte definiert - AesEffectState_def: EsReceived hinzugefügt - DataModification Enum: eAdded/eModified/eRemoved - function_reply_object.h → core_types.h Include-Pfad (72 Dateien) - Enum-Class-Streaming Template-Operator in INGLLogger.h - ism_mounting_point.h: QImage → QtGui/QImage, QGuiApplication/QScreen - ism_data_plugin_interface.h: QSet Include, Include-Reihenfolge - QRegExp → QRegularExpression in tpm_js_parser.cpp - .underlying() Aufrufe zu direktem Enum-Vergleich korrigiert - Include-Pfade: aes.hpp in symbol_appearance_settings_impl.h und aes_display_filter_impl.h Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
2785 files changed
+18754
-18316
No files matched your search
+11
-12
@@ -20,7 +20,6 @@ WebSocketHandler::WebSocketHandler(int exerciseId, MainHandler *mainHandler, QOb
|
||||
, m_webSocketServer(new QWebSocketServer(QStringLiteral("WLS"), QWebSocketServer::NonSecureMode, this))
|
||||
, m_mainHandler(mainHandler)
|
||||
, m_exerciseId(exerciseId)
|
||||
, m_logger(getLogger("WebSocketHandler"))
|
||||
{}
|
||||
|
||||
WebSocketHandler::~WebSocketHandler()
|
||||
@@ -33,7 +32,7 @@ bool WebSocketHandler::init(quint16 listenPort)
|
||||
{
|
||||
if (!m_webSocketServer->listen(QHostAddress::Any, listenPort))
|
||||
{
|
||||
WARNING_LOG(m_logger) << "Can not listen on port " << listenPort << " - aborting";
|
||||
WARNING_LOG() << "Can not listen on port " << listenPort << " - aborting";
|
||||
return false;
|
||||
}
|
||||
connect(m_webSocketServer, &QWebSocketServer::newConnection,
|
||||
@@ -52,7 +51,7 @@ bool WebSocketHandler::sendTelegramInternal(const TrainingAreaBase::TetraIcd::Tr
|
||||
|
||||
|
||||
const QString jsonStr = QString::fromUtf8(QJsonDocument(obj).toJson(QJsonDocument::Compact));
|
||||
DEBUG_LOG(m_logger) << "jsonStr: " << jsonStr;
|
||||
DEBUG_LOG() << "jsonStr: " << jsonStr;
|
||||
|
||||
bool bOk = false;
|
||||
for (auto wsw : std::as_const(m_webSockets))
|
||||
@@ -69,12 +68,12 @@ void WebSocketHandler::sendHlaConnectionState()
|
||||
TrainingAreaBase::TetraIcd::ProxyConnectionState connState;
|
||||
connState.connectedToSystem = m_mainHandler->isConnectedToHla();
|
||||
sendTelegram(&connState, m_exerciseId);
|
||||
DEBUG_LOG(m_logger) << "sendHlaConnectionState, isConnected: " << connState.connectedToSystem;
|
||||
DEBUG_LOG() << "sendHlaConnectionState, isConnected: " << connState.connectedToSystem;
|
||||
}
|
||||
|
||||
void WebSocketHandler::sendParticipantConnectionStates()
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "sendParticipantConnectionStates";
|
||||
DEBUG_LOG() << "sendParticipantConnectionStates";
|
||||
TrainingAreaBase::TetraIcd::WlsParticipantsConnectionState partConnState;
|
||||
partConnState.equipmentNumber = -1;
|
||||
partConnState.dataCommunicationPossible = false;
|
||||
@@ -82,7 +81,7 @@ void WebSocketHandler::sendParticipantConnectionStates()
|
||||
|
||||
if (!m_mainHandler->isConnectedToHla())
|
||||
{
|
||||
INFO_LOG(m_logger) << "We are (not) yet connected to HLA - don't send participant connection states";
|
||||
INFO_LOG() << "We are (not) yet connected to HLA - don't send participant connection states";
|
||||
return;
|
||||
}
|
||||
const auto externalEquipmentNumbers = m_mainHandler->ngsHandler()->ppmHandler()->externalEquipmentNumbers();
|
||||
@@ -118,7 +117,7 @@ void WebSocketHandler::onNewConnection()
|
||||
QWebSocket *ws = m_webSocketServer->nextPendingConnection();
|
||||
if (!ws)
|
||||
return;
|
||||
DEBUG_LOG(m_logger) << "New websocket connection from " << ws->peerAddress().toString() << ":" << ws->peerPort();
|
||||
DEBUG_LOG() << "New websocket connection from " << ws->peerAddress().toString() << ":" << ws->peerPort();
|
||||
auto wsw = std::make_shared<WebSocketWrapper>(ws);
|
||||
|
||||
connect(wsw.get(), &WebSocketWrapper::textMessageReceived,
|
||||
@@ -133,11 +132,11 @@ void WebSocketHandler::onTextMessageReceived(const QByteArray &baJson)
|
||||
{
|
||||
using namespace TrainingAreaBase::TetraIcd;
|
||||
|
||||
TRACE_LOG(m_logger) << "WebSocketHandler::onTextMessageReceived: " << baJson;
|
||||
TRACE_LOG() << "WebSocketHandler::onTextMessageReceived: " << baJson;
|
||||
WebSocketWrapper *wsw = qobject_cast<WebSocketWrapper *>(sender());
|
||||
if (!wsw)
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Internal error - sender is no WebSocketWrapper";
|
||||
ERROR_LOG() << "Internal error - sender is no WebSocketWrapper";
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -157,7 +156,7 @@ void WebSocketHandler::onTextMessageReceived(const QByteArray &baJson)
|
||||
const QJsonValue typeId = obj.value(QStringLiteral("typeId"));
|
||||
if (!typeId.isDouble())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Can not read type id: " << baJson;
|
||||
ERROR_LOG() << "Can not read type id: " << baJson;
|
||||
return;
|
||||
}
|
||||
const QJsonObject data = obj.value(QStringLiteral("data")).toObject();
|
||||
@@ -186,14 +185,14 @@ void WebSocketHandler::onTextMessageReceived(const QByteArray &baJson)
|
||||
emit vulnerabilityStateRequest(DemandVulnerabilityStateChange::fromJson(data));
|
||||
break;
|
||||
default:
|
||||
WARNING_LOG(m_logger) << "Handler for telegram Id " << typeId.toInt()
|
||||
WARNING_LOG() << "Handler for telegram Id " << typeId.toInt()
|
||||
<< " not yet implemented (" << baJson << ")";
|
||||
return;
|
||||
}
|
||||
}
|
||||
catch (const std::exception &e)
|
||||
{
|
||||
WARNING_LOG(m_logger) << "Could not parse json: " << e.what() << " (" << baJson << ")";
|
||||
WARNING_LOG() << "Could not parse json: " << e.what() << " (" << baJson << ")";
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user