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
+1
-1
@@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
#include <QJsonDocument>
|
||||
#include <AudioVideoManagement/avm_enums.hpp>
|
||||
#include <CombatNetRadio/svccnrhelper_export.h>
|
||||
#include "svccnrhelper_export.h"
|
||||
#include <CombatNetRadio/Helper/cnr_frequency_planning_helper.h>
|
||||
|
||||
namespace AudioVideoManagement {
|
||||
|
||||
+7
-7
@@ -30,7 +30,7 @@ bool ClientConnection::init()
|
||||
{
|
||||
if (m_socket == nullptr)
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Initialisation failed due to an invalid socket";
|
||||
ERROR_LOG() << "Initialisation failed due to an invalid socket";
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -51,17 +51,17 @@ void ClientConnection::addMessage(const CombatNetRadio::WebSocketInterface::Mess
|
||||
if (!m_socket || m_socket->state() != QAbstractSocket::ConnectedState)
|
||||
{
|
||||
m_messageQueue.enqueue(message);
|
||||
DEBUG_LOG(m_logger) << "Adding message to queue, size: " << m_messageQueue.size();
|
||||
DEBUG_LOG() << "Adding message to queue, size: " << m_messageQueue.size();
|
||||
return;
|
||||
}
|
||||
const QString msg(message.toJsonString());
|
||||
DEBUG_LOG(m_logger) << "Send msg: " << msg;
|
||||
DEBUG_LOG() << "Send msg: " << msg;
|
||||
m_socket->sendTextMessage(msg);
|
||||
}
|
||||
|
||||
void ClientConnection::onNewTextMessageFromSocket(const QString &message)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Recv msg: " << message;
|
||||
DEBUG_LOG() << "Recv msg: " << message;
|
||||
emit newTextMessage(this, message);
|
||||
}
|
||||
|
||||
@@ -73,15 +73,15 @@ void ClientConnection::sendMessagesFromQueue()
|
||||
{
|
||||
Messages::ReplyMessage message = m_messageQueue.dequeue();
|
||||
const QString msg(message.toJsonString());
|
||||
TRACE_LOG(m_logger) << "Send msg: " << msg;
|
||||
TRACE_LOG() << "Send msg: " << msg;
|
||||
m_socket->sendTextMessage(msg);
|
||||
DEBUG_LOG(m_logger) << "Sent message from queue, new size: " << m_messageQueue.size();
|
||||
DEBUG_LOG() << "Sent message from queue, new size: " << m_messageQueue.size();
|
||||
}
|
||||
}
|
||||
|
||||
void ClientConnection::onSocketDisconnect()
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Client with ip "
|
||||
DEBUG_LOG() << "Client with ip "
|
||||
<< m_ip.toString()
|
||||
<< " disconnected";
|
||||
emit disconnected(this);
|
||||
|
||||
-2
@@ -46,8 +46,6 @@ private:
|
||||
QWebSocket *m_socket;
|
||||
QQueue<Messages::ReplyMessage> m_messageQueue;
|
||||
QHostAddress m_ip;
|
||||
|
||||
LOGGER_T m_logger;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
+6
-7
@@ -12,7 +12,6 @@ using namespace CombatNetRadio::WebSocketInterface::Connection;
|
||||
|
||||
ConnectionHandler::ConnectionHandler()
|
||||
: m_server(nullptr)
|
||||
, m_logger(getLogger("ConnectionHandler"))
|
||||
{
|
||||
}
|
||||
|
||||
@@ -39,13 +38,13 @@ bool ConnectionHandler::init()
|
||||
|
||||
|
||||
quint16 port = 2081;
|
||||
DEBUG_LOG(m_logger) << "Trying to listen to port " << port;
|
||||
DEBUG_LOG() << "Trying to listen to port " << port;
|
||||
if (!m_server->listen(QHostAddress::Any, port))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Not possible to listen to port " << port;
|
||||
ERROR_LOG() << "Not possible to listen to port " << port;
|
||||
return false;
|
||||
}
|
||||
DEBUG_LOG(m_logger) << "... ok";
|
||||
DEBUG_LOG() << "... ok";
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -64,7 +63,7 @@ void ConnectionHandler::onNewMessage(CombatNetRadio::WebSocketInterface::Message
|
||||
|
||||
void ConnectionHandler::onServerError(QWebSocketProtocol::CloseCode closeCode)
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Got server error with close code " << closeCode;
|
||||
ERROR_LOG() << "Got server error with close code " << closeCode;
|
||||
}
|
||||
|
||||
void ConnectionHandler::onNewConnection()
|
||||
@@ -76,7 +75,7 @@ void ConnectionHandler::onNewConnection()
|
||||
|
||||
if (!newConnection->init())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Failed to initialise new client";
|
||||
ERROR_LOG() << "Failed to initialise new client";
|
||||
delete newConnection;
|
||||
newConnection = nullptr;
|
||||
continue;
|
||||
@@ -86,7 +85,7 @@ void ConnectionHandler::onNewConnection()
|
||||
connect(newConnection, &ClientConnection::disconnected, this, &ConnectionHandler::onDisconnected);
|
||||
|
||||
m_connections.append(newConnection);
|
||||
DEBUG_LOG(m_logger) << "New client with ip " << newConnection->ip().toString() << " connected";
|
||||
DEBUG_LOG() << "New client with ip " << newConnection->ip().toString() << " connected";
|
||||
emit newClientConnection((qint64) static_cast<WebSocketInterface::Connection::ClientConnection::MessageTransmitter*>(newConnection));
|
||||
}
|
||||
}
|
||||
|
||||
-2
@@ -52,8 +52,6 @@ private Q_SLOTS:
|
||||
private:
|
||||
QWebSocketServer *m_server;
|
||||
QVector<ClientConnection *> m_connections;
|
||||
|
||||
LOGGER_T m_logger;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
-1
@@ -14,7 +14,6 @@ namespace Messages
|
||||
|
||||
MessageHandler::MessageHandler(ExerciseManager *exerciseManager)
|
||||
: m_exerciseManager(exerciseManager)
|
||||
, m_logger(getLogger("MessageHandler"))
|
||||
{
|
||||
Q_ASSERT(exerciseManager);
|
||||
}
|
||||
|
||||
-2
@@ -29,8 +29,6 @@ public Q_SLOTS:
|
||||
|
||||
private:
|
||||
ExerciseManager *m_exerciseManager;
|
||||
|
||||
LOGGER_T m_logger;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
+1
-2
@@ -17,7 +17,6 @@ WebSocketInterfaceHandler::WebSocketInterfaceHandler(ExerciseManager *exerciseMa
|
||||
: m_exerciseManager(exerciseManager)
|
||||
, m_connectionHandler(nullptr)
|
||||
, m_messageHandler(nullptr)
|
||||
, m_logger(getLogger("WebSocketInterfaceHandler"))
|
||||
{
|
||||
Q_ASSERT(exerciseManager);
|
||||
}
|
||||
@@ -40,7 +39,7 @@ bool WebSocketInterfaceHandler::init()
|
||||
|
||||
if (!m_connectionHandler->init())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Failed to initialise ConnectionHandler";
|
||||
ERROR_LOG() << "Failed to initialise ConnectionHandler";
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -20,7 +20,6 @@ ConfigCnr::ConfigCnr(int exerciseId, AudioVideoManagement::Interface::Dtc *avmDt
|
||||
: m_exerciseId(exerciseId)
|
||||
, m_avmDtc(avmDtc)
|
||||
, m_ismDtc(ismDtc)
|
||||
, m_logger(getLogger("ConfigCnr"))
|
||||
, m_loggerJson(getLogger("ConfigCnr.Json"))
|
||||
{
|
||||
Q_ASSERT(avmDtc);
|
||||
@@ -200,7 +199,7 @@ boost::optional<AudioVideoManagement::FrequencyPlanning> ConfigCnr::activePlan()
|
||||
|
||||
void ConfigCnr::onActiveFrequencyPlanningChanged(const AudioVideoManagement::ActiveFrequencyPlanning &data, DataModification modType)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << LOGFUNCTION << ": " << data;
|
||||
DEBUG_LOG() << Q_FUNC_INFO << ": " << data;
|
||||
|
||||
Q_UNUSED(modType);
|
||||
if (data.exerciseId() == m_exerciseId)
|
||||
@@ -209,7 +208,7 @@ void ConfigCnr::onActiveFrequencyPlanningChanged(const AudioVideoManagement::Act
|
||||
|
||||
void ConfigCnr::onFrequencyPlanningChanged(const AudioVideoManagement::FrequencyPlanning &data, DataModification modType)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << LOGFUNCTION << ": " << data;
|
||||
DEBUG_LOG() << Q_FUNC_INFO << ": " << data;
|
||||
|
||||
Q_UNUSED(modType);
|
||||
|
||||
@@ -224,7 +223,7 @@ void ConfigCnr::onFrequencyPlanningChanged(const AudioVideoManagement::Frequency
|
||||
|
||||
void ConfigCnr::onCnrConfigChanged(const AudioVideoManagement::CnrConfig &data, DataModification modType)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << LOGFUNCTION << ": " << data;
|
||||
DEBUG_LOG() << Q_FUNC_INFO << ": " << data;
|
||||
|
||||
Q_UNUSED(modType);
|
||||
bool isGlobal = !data.exerciseId().is_set();
|
||||
|
||||
@@ -14,18 +14,17 @@ namespace CombatNetRadio
|
||||
|
||||
DdsHandler::DdsHandler(int domainId)
|
||||
: m_ddsConnector(std::make_shared<DDSConnector::DdsConnector>(domainId, IDL::PartitionType::Global))
|
||||
, m_logger(getLogger("DdsHandler"))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "DdsHandler(" << domainId << ") for partition: " << m_ddsConnector->getDefaultPartition();
|
||||
DEBUG_LOG() << "DdsHandler(" << domainId << ") for partition: " << m_ddsConnector->getDefaultPartition();
|
||||
}
|
||||
|
||||
bool DdsHandler::init(const QStringList &qosFileList)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << LOGFUNCTION;
|
||||
DEBUG_LOG() << Q_FUNC_INFO;
|
||||
|
||||
if (!m_ddsConnector->init(qosFileList))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error initializing dds connections - aborting";
|
||||
ERROR_LOG() << "Error initializing dds connections - aborting";
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -83,8 +83,6 @@ private:
|
||||
std::shared_ptr<AudioVideoManagement::Interface::Ftc> m_avmFtc;
|
||||
std::shared_ptr<ExerciseManagement::Interface::Dtc> m_exmDtc;
|
||||
std::shared_ptr<InfrastructureManagement::Interface::Dtc> m_ismDtc;
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
};
|
||||
|
||||
}
|
||||
@@ -67,7 +67,6 @@ public:
|
||||
ExerciseManager::ExerciseManager(ActiveExercises *activeExercises, DdsHandler *ddsHandler)
|
||||
: m_activeExercises(activeExercises)
|
||||
, m_ddsHandler(ddsHandler)
|
||||
, m_logger(getLogger("ExerciseManager"))
|
||||
{
|
||||
Q_ASSERT(activeExercises);
|
||||
Q_ASSERT(ddsHandler);
|
||||
@@ -112,13 +111,13 @@ std::vector<WebSocketInterface::Messages::ReplyMessage> ExerciseManager::radioSt
|
||||
|
||||
WebSocketInterface::Messages::ReplyMessage ExerciseManager::configCnr(const QString &uuid)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << LOGFUNCTION;
|
||||
DEBUG_LOG() << Q_FUNC_INFO;
|
||||
|
||||
const WebSocketInterface::Messages::ErrorMessage noActivePlanning(1, uuid, QStringLiteral("No active frequency planning found"));
|
||||
|
||||
if (m_parts.empty())
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "No active frequency planning due to empty m_parts.";
|
||||
DEBUG_LOG() << "No active frequency planning due to empty m_parts.";
|
||||
|
||||
return noActivePlanning;
|
||||
}
|
||||
@@ -142,7 +141,7 @@ WebSocketInterface::Messages::ReplyMessage ExerciseManager::configCnr(const QStr
|
||||
|
||||
if (configCnrData.radioCircuit.empty())
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "No active frequency planning due to empty radio circuits.";
|
||||
DEBUG_LOG() << "No active frequency planning due to empty radio circuits.";
|
||||
|
||||
return noActivePlanning;
|
||||
}
|
||||
@@ -183,25 +182,25 @@ WebSocketInterface::Messages::ReplyMessage ExerciseManager::positionsCnr(const Q
|
||||
void ExerciseManager::onModifyFrequencyPlanningStatusReply(const Core::FunctionReplyObject &replyObject)
|
||||
{
|
||||
if (replyObject.error())
|
||||
ERROR_LOG(m_logger) << "Error while modifying FrequencyPlanningStatus: " << replyObject.str();
|
||||
ERROR_LOG() << "Error while modifying FrequencyPlanningStatus: " << replyObject.str();
|
||||
else
|
||||
INFO_LOG(m_logger) << "onModifyFrequencyPlanningStatusReply ok";
|
||||
INFO_LOG() << "onModifyFrequencyPlanningStatusReply ok";
|
||||
}
|
||||
|
||||
void ExerciseManager::onClearFrequencyPlanningStatusReply(const Core::FunctionReplyObject &replyObject)
|
||||
{
|
||||
if (replyObject.error())
|
||||
ERROR_LOG(m_logger) << "Error while clearing FrequencyPlanningStatus: " << replyObject.str();
|
||||
ERROR_LOG() << "Error while clearing FrequencyPlanningStatus: " << replyObject.str();
|
||||
else
|
||||
INFO_LOG(m_logger) << "onClearFrequencyPlanningStatusReply ok";
|
||||
INFO_LOG() << "onClearFrequencyPlanningStatusReply ok";
|
||||
}
|
||||
|
||||
void ExerciseManager::onRemoveFrequencyPlanningStatusByClientReply(const Core::FunctionReplyObject &replyObject)
|
||||
{
|
||||
if (replyObject.error())
|
||||
ERROR_LOG(m_logger) << "Error while removing FrequencyPlanningStatus: " << replyObject.str();
|
||||
ERROR_LOG() << "Error while removing FrequencyPlanningStatus: " << replyObject.str();
|
||||
else
|
||||
INFO_LOG(m_logger) << "onRemoveFrequencyPlanningStatusByClientReply ok";
|
||||
INFO_LOG() << "onRemoveFrequencyPlanningStatusByClientReply ok";
|
||||
}
|
||||
|
||||
void ExerciseManager::setPositionsUpdateInterval(std::chrono::milliseconds interval)
|
||||
|
||||
@@ -79,9 +79,7 @@ private:
|
||||
std::map<int, ExerciseParts> m_parts;
|
||||
std::unique_ptr<TrainingArea> m_trainingArea;
|
||||
QTimer m_positionsUpdateTimer;
|
||||
QTimer m_essentialsUpdateTimer;
|
||||
NGL::INGLLogger &m_logger;
|
||||
|
||||
QTimer m_essentialsUpdateTimer;
|
||||
};
|
||||
|
||||
}
|
||||
@@ -19,12 +19,12 @@ MainHandler::~MainHandler() = default;
|
||||
|
||||
bool MainHandler::init(int domainId)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << LOGFUNCTION;
|
||||
DEBUG_LOG() << Q_FUNC_INFO;
|
||||
|
||||
m_ddsHandler.reset(new DdsHandler(domainId));
|
||||
if (!m_ddsHandler->init())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Initialisation DdsHandler failed.";
|
||||
ERROR_LOG() << "Initialisation DdsHandler failed.";
|
||||
m_ddsHandler->pacemaker()->setNewState(Core::RunningState::StartingError);
|
||||
return false;
|
||||
}
|
||||
@@ -35,7 +35,7 @@ bool MainHandler::init(int domainId)
|
||||
m_webSocketInterfaceHandler.reset(new WebSocketInterface::WebSocketInterfaceHandler(m_exerciseManager.get()));
|
||||
if (!m_webSocketInterfaceHandler->init())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Initialisation WebSocketInterfaceHandler failed.";
|
||||
ERROR_LOG() << "Initialisation WebSocketInterfaceHandler failed.";
|
||||
m_ddsHandler->pacemaker()->setNewState(Core::RunningState::StartingError);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -72,7 +72,7 @@ void TrainingArea::getRadioStations(InfrastructureManagement::Interface::Dtc *is
|
||||
data.id = stationId(mse);
|
||||
if (data.id == 0)
|
||||
{
|
||||
WARNING_LOG(m_logger) << "Got MainStructureElement of type 'RadioStation' but property 'stationId' was not set"
|
||||
WARNING_LOG() << "Got MainStructureElement of type 'RadioStation' but property 'stationId' was not set"
|
||||
<< " - database id: " << mse.id() << " - ignoring!";
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user