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:
torstenandCopilot committed 2026-08-19 06:06:24 +02:00
1 parent 010f91928a
commit b774f4035c
2785 files changed
+18754 -18316

No files matched your search

@@ -31,7 +31,6 @@ HandlerSounds::HandlerSounds(const std::shared_ptr<DdsHandler> &ddsHandler,
, ControlSoundRequestHandler(ddsHandler->ftsSom())
, m_ddsHandler(ddsHandler)
, m_dbHandler(dbHandler)
, m_logger(getLogger("HandlerSounds"))
{
} // end of ctor()
@@ -42,7 +41,7 @@ bool HandlerSounds::init()
SoundManagement::Sounds topicData;
SoundManagement::Sound sound;
INFO_LOG(m_logger) << "HandlerConfigureSounds::init";
INFO_LOG() << "HandlerConfigureSounds::init";
auto dtcIsm = m_ddsHandler->dtcIsm();
auto dtcSom = m_ddsHandler->dtcSom();
@@ -60,14 +59,14 @@ bool HandlerSounds::init()
QVector<Database::SomSound> soundVec;
if (!m_dbHandler->db()->select(soundVec))
{
ERROR_LOG(m_logger) << "Error reading data from database 'som_sound'!";
ERROR_LOG() << "Error reading data from database 'som_sound'!";
return false;
}
for (const Database::SomSound &data : std::as_const(soundVec))
{
static int index = 0;
DEBUG_LOG(m_logger) << "SomSound from DB data: id=" << data.id
DEBUG_LOG() << "SomSound from DB data: id=" << data.id
<< " categoryId=" << data.categoryId
<< " name=" << data.name
<< " displayName=" << data.displayName;
@@ -81,7 +80,7 @@ bool HandlerSounds::init()
soundEntry.duration = data.duration;
soundEntry.isRepeatable = data.isRepeatable;
m_soundNames.append(soundEntry);
DEBUG_LOG(m_logger) << "id=" << index
DEBUG_LOG() << "id=" << index
<< " SomSound from DB data: id=" << soundEntry.index
<< " categoryId=" << soundEntry.category
<< " name=" << soundEntry.name
@@ -117,10 +116,10 @@ bool HandlerSounds::init()
void HandlerSounds::getActiveSounds()
{
DEBUG_LOG(m_logger) << "getActiveSounds";
DEBUG_LOG() << "getActiveSounds";
if (m_hostnames.size() == 0)
{
DEBUG_LOG(m_logger) << "No EGCUs available send empty topic ActiveSounds";
DEBUG_LOG() << "No EGCUs available send empty topic ActiveSounds";
m_updateActiveSoundsTimer->stop();
// TODO alle aktiven Sounds vom DDS-Bus loeschen
return;
@@ -134,7 +133,7 @@ void HandlerSounds::getActiveSounds()
{
i.next();
QString hostname = i.value();
DEBUG_LOG(m_logger) << "getActiveSound hostname=" << hostname;
DEBUG_LOG() << "getActiveSound hostname=" << hostname;
getActiveSound(getAssetId(hostname));
}
}
@@ -145,7 +144,7 @@ void HandlerSounds::onGetActiveSoundsRequest(const rti::core::SampleIdentity &co
{
// 200{ "ID":"0x510","Name":"Sound Report","sounds":[{"category":"Explosions","sound":"0001"}]}
Core::FunctionReplyObject reply = Core::FunctionReplyObject(0, tr_lts("dds", "GetActiveSounds "));
DEBUG_LOG(m_logger) << "onGetActiveSoundsRequest: " << request;
DEBUG_LOG() << "onGetActiveSoundsRequest: " << request;
m_ddsHandler->ftsSom()->getActiveSoundsReply(cookie, reply);
// Request each EGCU
// Wait for response from each EGCU
@@ -157,7 +156,7 @@ void HandlerSounds::onGetActiveSoundsRequest(const rti::core::SampleIdentity &co
void HandlerSounds::onStopAllSoundsRequest(const rti::core::SampleIdentity &cookie,
const StopAllSoundsRequest &request)
{
DEBUG_LOG(m_logger) << "StopAllSounds: " << request;
DEBUG_LOG() << "StopAllSounds: " << request;
int failedCount = 0;
if (request.egcuId() == -1) // stopp all sounds on each EGCU
@@ -168,7 +167,7 @@ void HandlerSounds::onStopAllSoundsRequest(const rti::core::SampleIdentity &cook
{
i.next();
const QString hostname = m_hostnames.value(i.key());
DEBUG_LOG(m_logger) << "hostname=" << hostname;
DEBUG_LOG() << "hostname=" << hostname;
if (!stopAllSounds(i.key()).isEmpty()) // BLOCKING
failedCount++;
}
@@ -177,7 +176,7 @@ void HandlerSounds::onStopAllSoundsRequest(const rti::core::SampleIdentity &cook
else
{
QString hostname = m_hostnames.value(request.egcuId());
DEBUG_LOG(m_logger) << "getActiveSound hostname=" << hostname;
DEBUG_LOG() << "getActiveSound hostname=" << hostname;
if (!stopAllSounds(request.egcuId()).isEmpty()) // BLOCKING
failedCount++;
}
@@ -193,7 +192,7 @@ void HandlerSounds::onGetSoundsRequest(const rti::core::SampleIdentity &cookie,
const GetSoundsRequest &request)
{
Core::FunctionReplyObject reply = Core::FunctionReplyObject(0, tr_lts("dds", "GetSounds"));
DEBUG_LOG(m_logger) << "GetSounds: " << request;
DEBUG_LOG() << "GetSounds: " << request;
m_ddsHandler->ftsSom()->getSoundsReply(cookie, reply);
}
@@ -252,10 +251,10 @@ SoundManagement::SoundCategory HandlerSounds::stringToEnum(const QString &catego
* void HandlerMenuStruct::onModifyMenuStructRequest(const rti::core::SampleIdentity &cookie,
const MenuStruct &request)
{
DEBUG_LOG(m_logger) << "onModifyMenuStructRequest: " << request;
DEBUG_LOG() << "onModifyMenuStructRequest: " << request;
auto ret = request.id() > 0 ? modifyMenuStructRequest(request) : createMenuStructRequest(request);
if (ret.error())
WARNING_LOG(m_logger) << ret();
WARNING_LOG() << ret();
m_fts->modifyMenuStructReply(cookie, ret);
}
@@ -263,7 +262,7 @@ Core::FunctionReplyObject HandlerMenuStruct::createMenuStructRequest(const MenuS
{
ObjectMenuStruct *ifs = new ObjectMenuStruct(m_dts, m_db);
DEBUG_LOG(m_logger) << "request.menuEntries.size() : " << request.menuEntries().size();
DEBUG_LOG() << "request.menuEntries.size() : " << request.menuEntries().size();
Core::FunctionReplyObject ret = ifs->createFromDds(request);
if (ret.error())
@@ -280,7 +279,7 @@ Core::FunctionReplyObject HandlerMenuStruct::createMenuStructRequest(const MenuS
void HandlerSounds::onControlSoundRequest(const rti::core::SampleIdentity &cookie,
const ControlSoundRequest &request)
{
DEBUG_LOG(m_logger) << "ControlSound: " << request
DEBUG_LOG() << "ControlSound: " << request
<< " category=" << request.category();
const QString user = Settings::somUser();
@@ -305,7 +304,7 @@ void HandlerSounds::onControlSoundRequest(const rti::core::SampleIdentity &cooki
const int soundId = request.soundId();
const int egcuId = request.egcuId();
const SoundManagement::SoundCategory category = request.category();
DEBUG_LOG(m_logger) << "Play: durationMs=" << durationMs
DEBUG_LOG() << "Play: durationMs=" << durationMs
<< " egcuId=" << egcuId
<< " soundId=" << soundId
<< " loop=" << loop;
@@ -333,7 +332,7 @@ void HandlerSounds::onControlSoundRequest(const rti::core::SampleIdentity &cooki
soundState.id(m_indexActiveSound);
soundState.sampleTime(QDateTime::currentMSecsSinceEpoch());
soundState.inLoop(loop);
DEBUG_LOG(m_logger) << "id=" << m_indexActiveSound
DEBUG_LOG() << "id=" << m_indexActiveSound
<< " category=" << request.category()
<< " egcuId=" << request.egcuId()
<< " soundId=" << request.soundId()
@@ -371,7 +370,7 @@ void HandlerSounds::onStopSingleSound(const int egcuId, const SoundManagement::
QString passwd = Settings::somPasswd();
QString host = m_hostnames.value(egcuId);
DEBUG_LOG(m_logger) << "egcuId=" << egcuId
DEBUG_LOG() << "egcuId=" << egcuId
<< " soundId=" << soundId
<< " category=" << enumToString(soundCategory);
@@ -382,7 +381,7 @@ void HandlerSounds::onStopSingleSound(const int egcuId, const SoundManagement::
const SoundState &item = it.next();
if ((item.soundId() == soundId) && (item.egcuId() == egcuId) && item.category() == soundCategory)
{
DEBUG_LOG(m_logger) << "remove Sound from DDS-BUS id=" << item.id()
DEBUG_LOG() << "remove Sound from DDS-BUS id=" << item.id()
<< " egcuId=" << item.egcuId();
{
@@ -440,11 +439,11 @@ QString HandlerSounds::stopAllSounds(const int egcuId)
{
const SoundState &ss(it.next());
DEBUG_LOG(m_logger) << "Sound EGCU=" << ss.egcuId() << " soundId=" << ss.soundId();
DEBUG_LOG() << "Sound EGCU=" << ss.egcuId() << " soundId=" << ss.soundId();
if (ss.egcuId() != egcuId)
continue;
DEBUG_LOG(m_logger) << "remove Sound from DDS-BUS id=" << ss.id()
DEBUG_LOG() << "remove Sound from DDS-BUS id=" << ss.id()
<< " egcuId=" << ss.egcuId();
m_ddsHandler->dtsSom()->removeSoundStateByKey(ss.id());
it.remove();
@@ -470,7 +469,7 @@ void HandlerSounds::getActiveSound(const int egcuId)
url.setUrl(request);
url.setUserName(user);
url.setPassword(passwd);
DEBUG_LOG(m_logger) << "startRequest: " << url.toString();
DEBUG_LOG() << "startRequest: " << url.toString();
startRequest(url);
}
@@ -493,14 +492,14 @@ QString HandlerSounds::playBackgroundSound(const QString &user,
url.setUrl(request);
url.setUserName(user);
url.setPassword(passwd);
DEBUG_LOG(m_logger) << "startRequest: " << url.toString()
DEBUG_LOG() << "startRequest: " << url.toString()
<< " host=" << host;
return startRequestBlocking(url);
}
QString HandlerSounds::startRequestBlocking(const QUrl &requestedUrl)
{
DEBUG_LOG(m_logger) << "startRequest: " << requestedUrl.toString();
DEBUG_LOG() << "startRequest: " << requestedUrl.toString();
m_httpRequestAborted = false;
auto reply = m_qnam.get(QNetworkRequest(requestedUrl));
await(reply, &QNetworkReply::finished);
@@ -509,7 +508,7 @@ QString HandlerSounds::startRequestBlocking(const QUrl &requestedUrl)
void HandlerSounds::startRequest(const QUrl &requestedUrl)
{
DEBUG_LOG(m_logger) << "startRequest: " << requestedUrl.toString();
DEBUG_LOG() << "startRequest: " << requestedUrl.toString();
m_httpRequestAborted = false;
auto reply = m_qnam.get(QNetworkRequest(requestedUrl));
connect(reply, &QNetworkReply::finished, this, &HandlerSounds::httpFinished);
@@ -517,7 +516,7 @@ void HandlerSounds::startRequest(const QUrl &requestedUrl)
QString HandlerSounds::httpFinishedBlocking(QNetworkReply *reply)
{
DEBUG_LOG(m_logger) << "httpFinishedBlocking";
DEBUG_LOG() << "httpFinishedBlocking";
QUrl url;
// auto reply = qobject_cast<QNetworkReply *>(sender());
// Q_ASSERT(reply);
@@ -528,7 +527,7 @@ QString HandlerSounds::httpFinishedBlocking(QNetworkReply *reply)
if (m_httpRequestAborted)
{
ERROR_LOG(m_logger) << "httpRequestAborted";
ERROR_LOG() << "httpRequestAborted";
reply->deleteLater();
return QString::fromStdString(tr_lts("dds", "httpRequestAborted"));
}
@@ -537,7 +536,7 @@ QString HandlerSounds::httpFinishedBlocking(QNetworkReply *reply)
{
QByteArray data = reply->readAll();
QString dataStr = QString::fromStdString(data.toStdString());
ERROR_LOG(m_logger) << "reply->error: " << reply->errorString()
ERROR_LOG() << "reply->error: " << reply->errorString()
<< " host=" << url.host()
<< " query='" << url.query()
<< "' '" << qUtf8Printable(url.toString()) << "'"
@@ -546,7 +545,7 @@ QString HandlerSounds::httpFinishedBlocking(QNetworkReply *reply)
QString query = url.query();
if (query.contains(QStringLiteral("control=5")))
{
DEBUG_LOG(m_logger) << "m_activeSounds.insert host=" << url.host();
DEBUG_LOG() << "m_activeSounds.insert host=" << url.host();
m_activeSounds.insert(url.host(), QString());
}
reply->deleteLater();
@@ -558,7 +557,7 @@ QString HandlerSounds::httpFinishedBlocking(QNetworkReply *reply)
//parse the reply JSON and display result in the UI
const QByteArray json(reply->readAll());
DEBUG_LOG(m_logger) << "Sucess " << json;
DEBUG_LOG() << "Sucess " << json;
QString jsonStr = QString::fromStdString(json.toStdString());
if (jsonStr.contains(QStringLiteral("510"))) // 510 = Sound Report
handleSoundReport(jsonStr, url.host());
@@ -569,7 +568,7 @@ QString HandlerSounds::httpFinishedBlocking(QNetworkReply *reply)
void HandlerSounds::httpFinished()
{
DEBUG_LOG(m_logger) << "httpFinished";
DEBUG_LOG() << "httpFinished";
QUrl url;
auto reply = qobject_cast<QNetworkReply *>(sender());
if (!reply)
@@ -579,7 +578,7 @@ void HandlerSounds::httpFinished()
if (m_httpRequestAborted)
{
ERROR_LOG(m_logger) << "httpRequestAborted";
ERROR_LOG() << "httpRequestAborted";
reply->deleteLater();
return;
}
@@ -588,7 +587,7 @@ void HandlerSounds::httpFinished()
{
QByteArray data = reply->readAll();
QString dataStr = QString::fromStdString(data.toStdString());
ERROR_LOG(m_logger) << "reply->error: " << reply->errorString()
ERROR_LOG() << "reply->error: " << reply->errorString()
<< " host=" << url.host()
<< " query='" << url.query()
<< "' '" << qUtf8Printable(url.toString()) << "'"
@@ -597,7 +596,7 @@ void HandlerSounds::httpFinished()
QString query = url.query();
if (query.contains(QStringLiteral("control=5")))
{
DEBUG_LOG(m_logger) << "m_activeSounds.insert host=" << url.host();
DEBUG_LOG() << "m_activeSounds.insert host=" << url.host();
m_activeSounds.insert(url.host(), QString());
}
reply->deleteLater();
@@ -609,7 +608,7 @@ void HandlerSounds::httpFinished()
//parse the reply JSON and display result in the UI
const QByteArray json(reply->readAll());
DEBUG_LOG(m_logger) << "Sucess " << json;
DEBUG_LOG() << "Sucess " << json;
QString jsonStr = QString::fromStdString(json.toStdString());
if (jsonStr.contains(QStringLiteral("510"))) // 510 = Sound Report
handleSoundReport(jsonStr, url.host());
@@ -646,7 +645,7 @@ int HandlerSounds::getDuration(const SoundManagement::SoundCategory& category,co
if ( soundId == soundName.soundId
&& category == soundName.category)
{
DEBUG_LOG(m_logger) << "Duration=" << soundName.duration << "ms";
DEBUG_LOG() << "Duration=" << soundName.duration << "ms";
return soundName.duration;
}
} // for
@@ -658,15 +657,15 @@ void HandlerSounds::handleSoundReport(const QString &json, const QString &host)
SoundManagement::SoundState soundState;
QString jsonString;
QString jsonStr = QString::fromStdString(json.toStdString());
DEBUG_LOG(m_logger) << "remove 200";
DEBUG_LOG() << "remove 200";
jsonString = jsonStr.remove(QStringLiteral("200"));
m_activeSounds.insert(host, jsonString);
// Send Result Topic
DEBUG_LOG(m_logger) << "Send Result Topic";
DEBUG_LOG() << "Send Result Topic";
DEBUG_LOG(m_logger) << "m_updateActiveSoundsTimer->stop();";
DEBUG_LOG() << "m_updateActiveSoundsTimer->stop();";
DEBUG_LOG(m_logger) << "host=" << host
DEBUG_LOG() << "host=" << host
<< " jsonString= " << jsonString;
// decode JSON-Object
QJsonDocument doc = QJsonDocument::fromJson(jsonString.toUtf8());
@@ -699,7 +698,7 @@ void HandlerSounds::handleSoundReport(const QString &json, const QString &host)
soundState.category(category);
soundState.id(m_indexActiveSound);
soundState.sampleTime(QDateTime::currentMSecsSinceEpoch());
DEBUG_LOG(m_logger) << "id=" << m_indexActiveSound
DEBUG_LOG() << "id=" << m_indexActiveSound
<< " category=" << categoryStr
<< " name=" << name
<< " egcuId=" << egcuId
@@ -712,7 +711,7 @@ void HandlerSounds::handleSoundReport(const QString &json, const QString &host)
(item.category() == soundState.category()) &&
(item.soundId() == soundState.soundId()) )
{
DEBUG_LOG(m_logger) << "Sound is already on DDS-Bus";
DEBUG_LOG() << "Sound is already on DDS-Bus";
found = true;
break;
}
@@ -721,28 +720,28 @@ void HandlerSounds::handleSoundReport(const QString &json, const QString &host)
if (!found)
{
m_indexActiveSound++;
DEBUG_LOG(m_logger) << "Sound publish";
DEBUG_LOG() << "Sound publish";
m_ddsHandler->dtsSom()->publish(soundState);
m_soundStates.append(soundState);
}
}
}
else
ERROR_LOG(m_logger) << "Document is not an object";
ERROR_LOG() << "Document is not an object";
}
else
{
if (jsonStr.size() == 0)
DEBUG_LOG(m_logger) << "No Sounds for " << host;
DEBUG_LOG() << "No Sounds for " << host;
else
ERROR_LOG(m_logger) << "Invalid JSON...\n" << jsonStr;
ERROR_LOG() << "Invalid JSON...\n" << jsonStr;
}
m_updateActiveSoundsTimer->stop();
}
void HandlerSounds::onTimerTimeout()
{
ERROR_LOG(m_logger) << "Problem when querying the active sounds from the EGCU's";
ERROR_LOG() << "Problem when querying the active sounds from the EGCU's";
}
void HandlerSounds::onInstrumentationAssetChanged(const InfrastructureManagement::InstrumentationAsset &data, DataModification modType)
@@ -751,7 +750,7 @@ void HandlerSounds::onInstrumentationAssetChanged(const InfrastructureManagement
modType != DataModification::eModified)
return;
DEBUG_LOG(m_logger) << "onInstrumentationAssetChanged id=" << data.id()
DEBUG_LOG() << "onInstrumentationAssetChanged id=" << data.id()
<< " hostname=" << QString::fromStdString(data.hostname())
<< " mountingPointTypeId=" << data.mountingPointTypeId()
<< " assetStateId=" << data.assetStateId();
@@ -760,14 +759,14 @@ void HandlerSounds::onInstrumentationAssetChanged(const InfrastructureManagement
&& data.hostname().size() > 0)
{
QString hostname = QString::fromStdString(data.hostname());
DEBUG_LOG(m_logger) << "m_hostnames.insert id=" << data.id()
DEBUG_LOG() << "m_hostnames.insert id=" << data.id()
<< " hostname=" << hostname
<< " hostname.size=" << hostname.size()
<< " mountingPointTypeId=" << data.mountingPointTypeId()
<< " assetStateId=" << data.assetStateId();
if (hostname.size() > 0 )
{
DEBUG_LOG(m_logger) << "insert EGCU in m_hostnames " << data.hostname();
DEBUG_LOG() << "insert EGCU in m_hostnames " << data.hostname();
m_hostnames.insert(data.id(), QString::fromStdString(data.hostname()));
}
}
@@ -778,7 +777,7 @@ void HandlerSounds::onMountingPointAssetChanged(const InfrastructureManagement::
if (modType != DataModification::eAdded &&
modType != DataModification::eModified)
return;
DEBUG_LOG(m_logger) << "onMountingPointAssetChanged"
DEBUG_LOG() << "onMountingPointAssetChanged"
<< " id= " << data.id()
<< " assetId= " << data.assetId()
<< " structureElementId= " << data.structureElementId();
@@ -787,7 +786,7 @@ void HandlerSounds::onMountingPointAssetChanged(const InfrastructureManagement::
void HandlerSounds::onSoundStateChanged(const SoundManagement::SoundState &data, DataModification modType)
{
DEBUG_LOG(m_logger) << "onSoundStateChanged"
DEBUG_LOG() << "onSoundStateChanged"
<< " id= " << data.id()
<< " egcuId= " << data.egcuId()
<< " soundId=" << data.soundId()