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
+30
-31
@@ -34,7 +34,6 @@ HandlerOcAesData::HandlerOcAesData(MainHandler *mainHandler,
|
||||
, m_demandingEquipments(QMap<OcSituation::AesType, QSet<int>>())
|
||||
, m_iedPositionsToBeSend(QMap<int, GuezIedManagement::IedPosition>())
|
||||
, m_iedPositionCycleTimer(new QTimer(this))
|
||||
, m_logger(getLogger("HandlerOcAesData"))
|
||||
{}
|
||||
|
||||
HandlerOcAesData::~HandlerOcAesData()
|
||||
@@ -58,7 +57,7 @@ bool HandlerOcAesData::init()
|
||||
// read all Ieds from database
|
||||
if (!m_dbHandler->select(dataVec))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error reading reset counter from database!";
|
||||
ERROR_LOG() << "Error reading reset counter from database!";
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -78,7 +77,7 @@ bool HandlerOcAesData::init()
|
||||
}
|
||||
default:
|
||||
{
|
||||
WARNING_LOG(m_logger) << "Reset counter for aes type: " << data.aesTypeId << " read from db is not handled.";
|
||||
WARNING_LOG() << "Reset counter for aes type: " << data.aesTypeId << " read from db is not handled.";
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -87,7 +86,7 @@ bool HandlerOcAesData::init()
|
||||
// AES DTC enable
|
||||
if (!m_aesDtc->enableDangerArea())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Enabling AES Data-Topics failed.";
|
||||
ERROR_LOG() << "Enabling AES Data-Topics failed.";
|
||||
return false;
|
||||
}
|
||||
connect(m_aesDtc.get(), &AreaEffectSimulation::Interface::Dtc::dangerAreaChanged, this, &HandlerOcAesData::onDangerAreaChanged);
|
||||
@@ -96,7 +95,7 @@ bool HandlerOcAesData::init()
|
||||
if (!m_gimDtc->enableIed() ||
|
||||
!m_gimDtc->enableIedPosition())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Enabling GIM Data-Topics failed.";
|
||||
ERROR_LOG() << "Enabling GIM Data-Topics failed.";
|
||||
return false;
|
||||
}
|
||||
connect(m_gimDtc.get(), &GuezIedManagement::Interface::Dtc::iedChanged, this, &HandlerOcAesData::onIedChanged);
|
||||
@@ -104,7 +103,7 @@ bool HandlerOcAesData::init()
|
||||
|
||||
connect(m_iedPositionCycleTimer, &QTimer::timeout, this, &HandlerOcAesData::sendIedPositions);
|
||||
m_iedPositionCycleTimer->setInterval(Settings::iedPositionCycleTime());
|
||||
DEBUG_LOG(m_logger) << "Starting ied position timer with interval: " << m_iedPositionCycleTimer->interval();
|
||||
DEBUG_LOG() << "Starting ied position timer with interval: " << m_iedPositionCycleTimer->interval();
|
||||
m_iedPositionCycleTimer->start();
|
||||
|
||||
return true;
|
||||
@@ -117,7 +116,7 @@ void HandlerOcAesData::demandAesItems(OcSituation::AesType aesType, int eqNumber
|
||||
case OcSituation::AesType::DangerArea:
|
||||
case OcSituation::AesType::Ied:
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Got demand for aes type: " << aesType << " from equipment: " << eqNumber;
|
||||
DEBUG_LOG() << "Got demand for aes type: " << aesType << " from equipment: " << eqNumber;
|
||||
|
||||
if (!m_collectionTimer[aesType]->isActive())
|
||||
m_collectionTimer[aesType]->start();
|
||||
@@ -127,7 +126,7 @@ void HandlerOcAesData::demandAesItems(OcSituation::AesType aesType, int eqNumber
|
||||
}
|
||||
default:
|
||||
{
|
||||
WARNING_LOG(m_logger) << "Aes type: " << aesType << " is currently not handled.";
|
||||
WARNING_LOG() << "Aes type: " << aesType << " is currently not handled.";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -135,9 +134,9 @@ void HandlerOcAesData::demandAesItems(OcSituation::AesType aesType, int eqNumber
|
||||
void HandlerOcAesData::onSendOcDataReply(const Core::FunctionReplyObject &reply)
|
||||
{
|
||||
if (reply.error())
|
||||
ERROR_LOG(m_logger) << "Oc data could not be send: " << reply.translated();
|
||||
ERROR_LOG() << "Oc data could not be send: " << reply.translated();
|
||||
else
|
||||
DEBUG_LOG(m_logger) << "Oc data send successfully to TAB!";
|
||||
DEBUG_LOG() << "Oc data send successfully to TAB!";
|
||||
}
|
||||
|
||||
void HandlerOcAesData::onDangerAreaChanged(const AreaEffectSimulation::DangerArea &data, DataModification mod)
|
||||
@@ -166,7 +165,7 @@ void HandlerOcAesData::onIedPositionChanged(const GuezIedManagement::IedPosition
|
||||
m_iedPositionsToBeSend.insert(data.id(), data);
|
||||
}
|
||||
else
|
||||
ERROR_LOG(m_logger) << "Got ied position for not existing ID: " << data.id();
|
||||
ERROR_LOG() << "Got ied position for not existing ID: " << data.id();
|
||||
}
|
||||
|
||||
void HandlerOcAesData::onCollectionTimeOutDemandDangerAreas()
|
||||
@@ -185,7 +184,7 @@ void HandlerOcAesData::sendIedPositions()
|
||||
{
|
||||
if (m_iedPositionsToBeSend.size() == 0)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "No new ied positions to be send.";
|
||||
DEBUG_LOG() << "No new ied positions to be send.";
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -210,14 +209,14 @@ void HandlerOcAesData::sendIedPositions()
|
||||
data[1] = ++cnt;
|
||||
|
||||
QByteArray ba = qCompress(data);
|
||||
DEBUG_LOG(m_logger) << "Added ied position " << pos
|
||||
DEBUG_LOG() << "Added ied position " << pos
|
||||
<< " data size: " << data.size()
|
||||
<< " compressed size: " << ba.size();
|
||||
|
||||
if (ba.size() > Settings::maxNumOfBytePerAesTxCycle()) // one cycle is full -> send
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Uncompressed Data: " << data.toHex(' ');
|
||||
DEBUG_LOG(m_logger) << "Compressed Data: " << ba.toHex(' ');
|
||||
DEBUG_LOG() << "Uncompressed Data: " << data.toHex(' ');
|
||||
DEBUG_LOG() << "Compressed Data: " << ba.toHex(' ');
|
||||
payload.append(ba);
|
||||
req.payload(LtsUtils::convert<std::vector<uint8_t>>(payload));
|
||||
m_tabFtc->sendOcDataRequest(req, this);
|
||||
@@ -235,8 +234,8 @@ void HandlerOcAesData::sendIedPositions()
|
||||
|
||||
if (cnt > 0) // is still data to be send?
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Uncompressed Data: " << data.toHex(' ');
|
||||
DEBUG_LOG(m_logger) << "Compressed Data: " << qCompress(data).toHex(' ');
|
||||
DEBUG_LOG() << "Uncompressed Data: " << data.toHex(' ');
|
||||
DEBUG_LOG() << "Compressed Data: " << qCompress(data).toHex(' ');
|
||||
payload.append(qCompress(data));
|
||||
req.payload(LtsUtils::convert<std::vector<uint8_t>>(payload));
|
||||
m_tabFtc->sendOcDataRequest(req, this);
|
||||
@@ -247,7 +246,7 @@ void HandlerOcAesData::sendIedPositions()
|
||||
|
||||
void HandlerOcAesData::collectionTimeout(OcSituation::AesType type, const std::function<void (int)> &sendFunction)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "There are " << m_demandingEquipments[type].size() << " requests for aes type: " << type
|
||||
DEBUG_LOG() << "There are " << m_demandingEquipments[type].size() << " requests for aes type: " << type
|
||||
<< " sending Items as " << ((m_demandingEquipments[type].size() > 5) ? QStringLiteral("broadcast") : QStringLiteral("direct")) << " telegram(s)";
|
||||
|
||||
if (m_demandingEquipments[type].size() > 5)
|
||||
@@ -297,13 +296,13 @@ void HandlerOcAesData::sendDangerAreasToTab(int eqNumber)
|
||||
data[1] = ++cnt;
|
||||
|
||||
QByteArray ba = qCompress(data);
|
||||
DEBUG_LOG(m_logger) << "Added danger area " << dangerArea
|
||||
DEBUG_LOG() << "Added danger area " << dangerArea
|
||||
<< " data size: " << data.size()
|
||||
<< " compressed size: " << ba.size();
|
||||
if (ba.size() > Settings::maxNumOfBytePerAesTxCycle()) // one cycle is full -> send
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Uncompressed Data: " << data.toHex(' ');
|
||||
DEBUG_LOG(m_logger) << "Compressed Data: " << ba.toHex(' ');
|
||||
DEBUG_LOG() << "Uncompressed Data: " << data.toHex(' ');
|
||||
DEBUG_LOG() << "Compressed Data: " << ba.toHex(' ');
|
||||
payload.append(ba);
|
||||
req.payload(LtsUtils::convert<std::vector<uint8_t>>(payload));
|
||||
m_tabFtc->sendOcDataRequest(req, this);
|
||||
@@ -322,8 +321,8 @@ void HandlerOcAesData::sendDangerAreasToTab(int eqNumber)
|
||||
|
||||
if (cnt > 0) // is still data to be send?
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Uncompressed Data: " << data.toHex(' ');
|
||||
DEBUG_LOG(m_logger) << "Compressed Data: " << qCompress(data).toHex(' ');
|
||||
DEBUG_LOG() << "Uncompressed Data: " << data.toHex(' ');
|
||||
DEBUG_LOG() << "Compressed Data: " << qCompress(data).toHex(' ');
|
||||
payload.append(qCompress(data));
|
||||
req.payload(LtsUtils::convert<std::vector<uint8_t>>(payload));
|
||||
m_tabFtc->sendOcDataRequest(req, this);
|
||||
@@ -366,14 +365,14 @@ void HandlerOcAesData::sendIedsToTab(int eqNumber)
|
||||
data[1] = ++cnt;
|
||||
|
||||
QByteArray ba = qCompress(data);
|
||||
DEBUG_LOG(m_logger) << "Added ied " << ied
|
||||
DEBUG_LOG() << "Added ied " << ied
|
||||
<< " data size: " << data.size()
|
||||
<< " compressed size: " << ba.size();
|
||||
|
||||
if (ba.size() > Settings::maxNumOfBytePerAesTxCycle()) // one cycle is full -> send
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Uncompressed Data: " << data.toHex(' ');
|
||||
DEBUG_LOG(m_logger) << "Compressed Data: " << ba.toHex(' ');
|
||||
DEBUG_LOG() << "Uncompressed Data: " << data.toHex(' ');
|
||||
DEBUG_LOG() << "Compressed Data: " << ba.toHex(' ');
|
||||
payload.append(ba);
|
||||
req.payload(LtsUtils::convert<std::vector<uint8_t>>(payload));
|
||||
m_tabFtc->sendOcDataRequest(req, this);
|
||||
@@ -391,8 +390,8 @@ void HandlerOcAesData::sendIedsToTab(int eqNumber)
|
||||
|
||||
if (cnt > 0) // is still data to be send?
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Uncompressed Data: " << data.toHex(' ');
|
||||
DEBUG_LOG(m_logger) << "Compressed Data: " << qCompress(data).toHex(' ');
|
||||
DEBUG_LOG() << "Uncompressed Data: " << data.toHex(' ');
|
||||
DEBUG_LOG() << "Compressed Data: " << qCompress(data).toHex(' ');
|
||||
payload.append(qCompress(data));
|
||||
req.payload(LtsUtils::convert<std::vector<uint8_t>>(payload));
|
||||
m_tabFtc->sendOcDataRequest(req, this);
|
||||
@@ -415,7 +414,7 @@ void HandlerOcAesData::incrementResetCnt(OcSituation::AesType aesType)
|
||||
}
|
||||
default:
|
||||
{
|
||||
WARNING_LOG(m_logger) << "Reset counter for aes type: " << aesType << " is not handled in incrementResetCnt.";
|
||||
WARNING_LOG() << "Reset counter for aes type: " << aesType << " is not handled in incrementResetCnt.";
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -441,14 +440,14 @@ void HandlerOcAesData::setResetCnt(OcSituation::AesType aesType, int resetCnt)
|
||||
}
|
||||
default:
|
||||
{
|
||||
WARNING_LOG(m_logger) << "Reset counter for aes type: " << aesType << " is not handled in setResetCnt.";
|
||||
WARNING_LOG() << "Reset counter for aes type: " << aesType << " is not handled in setResetCnt.";
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// update db
|
||||
if (!m_dbHandler->update(data))
|
||||
ERROR_LOG(m_logger) << "Error updating reset counter in db.";
|
||||
ERROR_LOG() << "Error updating reset counter in db.";
|
||||
}
|
||||
|
||||
} // namespace OcSituationServer
|
||||
Reference in new issue
Block a user