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

@@ -18,7 +18,6 @@ TxDdlHandler::TxDdlHandler()
, m_segmentToggle(0)
, m_sentCnt(0)
, m_responseTimer(new QTimer(this))
, m_logger(getLogger("TxDdlHandler"))
{
m_responseTimer->setInterval(1000);
m_responseTimer->setSingleShot(true);
@@ -47,13 +46,13 @@ void TxDdlHandler::process(const QByteArray &data)
{
case 1:
{
DEBUG_LOG(m_logger) << "Segment download confirmation received";
DEBUG_LOG() << "Segment download confirmation received";
qint32 toggle = ((data[0] & 0x10) >> 4);
if (m_segmentToggle != toggle)
{
ERROR_LOG(m_logger) << "Toggle bit of confirmation not equal to request";
ERROR_LOG() << "Toggle bit of confirmation not equal to request";
sendAbort(130);
}
@@ -63,14 +62,14 @@ void TxDdlHandler::process(const QByteArray &data)
}
case 3:
{
DEBUG_LOG(m_logger) << "Initiate download confirmation received";
DEBUG_LOG() << "Initiate download confirmation received";
if (m_dataToSend.isEmpty())
break;
if (DdlState::Initiated != m_state)
{
ERROR_LOG(m_logger) << "Initiate download confirmation received but ddl wasn't startet yet.";
ERROR_LOG() << "Initiate download confirmation received but ddl wasn't startet yet.";
sendAbort();
break;
}
@@ -79,7 +78,7 @@ void TxDdlHandler::process(const QByteArray &data)
}
case 4:
{
WARNING_LOG(m_logger) << "Error during domain download";
WARNING_LOG() << "Error during domain download";
m_state = DdlState::NotStarted;
if (m_dataToSend.isEmpty())
@@ -91,7 +90,7 @@ void TxDdlHandler::process(const QByteArray &data)
}
default:
ERROR_LOG(m_logger) << "unknown scs value received: " << scs;
ERROR_LOG() << "unknown scs value received: " << scs;
break;
}
}
@@ -116,13 +115,13 @@ void TxDdlHandler::initiateDomainDownload()
{
if (m_dataToSend.isEmpty())
{
ERROR_LOG(m_logger) << "::initiateDomainDownload called, but no data to send available";
ERROR_LOG() << "::initiateDomainDownload called, but no data to send available";
return;
}
if (m_sentCnt >= s_maxResendCnt)
{
ERROR_LOG(m_logger) << "Maximum trys of resending DDL exceeded. ";
ERROR_LOG() << "Maximum trys of resending DDL exceeded. ";
m_dataToSend.removeFirst();
m_sentCnt = 0;
startNextDomainDownload();
@@ -138,7 +137,7 @@ void TxDdlHandler::initiateDomainDownload()
data[6] = ((dataSize >> 16) & 0xFF);
data[7] = ((dataSize >> 24) & 0xFF);
DEBUG_LOG(m_logger) << "Initiate DDL Req";
DEBUG_LOG() << "Initiate DDL Req";
m_state = DdlState::Initiated;
m_sentCnt++;
@@ -150,7 +149,7 @@ void TxDdlHandler::domainDownload()
{
if (m_dataToSend.isEmpty())
{
ERROR_LOG(m_logger) << "::domainDownload called, but no data to send available";
ERROR_LOG() << "::domainDownload called, but no data to send available";
return;
}
@@ -203,7 +202,7 @@ void TxDdlHandler::domainDownload()
m_dataToSend.first().offset = newOffset;
DEBUG_LOG(m_logger) << "Segment DDL Req";
DEBUG_LOG() << "Segment DDL Req";
m_state = DdlState::Downloading;
emit send(data);
@@ -215,7 +214,7 @@ void TxDdlHandler::sendAbort(quint8 error)
QByteArray data(8, '\0');
data[0] = 0x80;
data[1] = error;
DEBUG_LOG(m_logger) << "Abort DDL Req";
DEBUG_LOG() << "Abort DDL Req";
m_state = DdlState::NotStarted;
m_dataToSend.first().offset = 0;
@@ -225,7 +224,6 @@ void TxDdlHandler::sendAbort(quint8 error)
RxDdlHandler::RxDdlHandler(bool isMultiplexed)
: m_isMultiplexed(isMultiplexed)
, m_logger(getLogger("RxDdlHandler"))
{}
void RxDdlHandler::process(const QByteArray &data)
@@ -237,7 +235,7 @@ void RxDdlHandler::process(const QByteArray &data)
case 1:
{
DEBUG_LOG(m_logger) << "initiate download received";
DEBUG_LOG() << "initiate download received";
if (m_isMultiplexed)
m_multiplexer = (((data[1] & 0xFF) << 16) | ((data[2] & 0xFF) << 8) | (data[3] & 0xFF));
@@ -253,10 +251,10 @@ void RxDdlHandler::process(const QByteArray &data)
case 0:
{
DEBUG_LOG(m_logger) << "download segment received";
DEBUG_LOG() << "download segment received";
if (m_state == DdlState::NotStarted)
{
WARNING_LOG(m_logger) << "download segment and data m_state == DdlState::NotStarted, something went wrong!";
WARNING_LOG() << "download segment and data m_state == DdlState::NotStarted, something went wrong!";
sendDPConfirmation(4, 0);
return;
}
@@ -286,14 +284,14 @@ void RxDdlHandler::process(const QByteArray &data)
case 4:
{
DEBUG_LOG(m_logger) << "abort download received";
DEBUG_LOG() << "abort download received";
m_messageData.clear();
m_state = DdlState::NotStarted;
break;
}
default:
{
WARNING_LOG(m_logger) << "Unknown ccs ID: " << ccs;
WARNING_LOG() << "Unknown ccs ID: " << ccs;
break;
}
}
@@ -317,7 +315,7 @@ void RxDdlHandler::sendDPConfirmation(const quint32 ccs, const quint32 toggle, c
else if (1 == toggle)
data[0] = 0x30;
else
WARNING_LOG(m_logger) << "Unknown toggle state: " << toggle;
WARNING_LOG() << "Unknown toggle state: " << toggle;
m_state = DdlState::Downloading;
}
else if (4 == ccs)
@@ -347,7 +345,6 @@ CanagHandler::CanagHandler(MainHandler *mainHandler)
, m_syncSocket(new QTcpSocket(this))
, m_technicalStateSfm(OcTelegrams::TechnicalStateSfm())
, m_sfmConnectionEstablished(false)
, m_logger(getLogger("CanagHandler"))
{}
CanagHandler::~CanagHandler()
@@ -368,7 +365,7 @@ bool CanagHandler::init()
if (!m_handlerAesData->init())
{
ERROR_LOG(m_logger) << "Could not initialise HandlerAesData.";
ERROR_LOG() << "Could not initialise HandlerAesData.";
return false;
}
@@ -462,19 +459,19 @@ bool CanagHandler::txData(const TrainingAreaBase::TetraIcd::OpaquePayloadDataBas
{
case TrainingAreaBase::TetraIcd::OpaquePayloadDataBase::Type::OC:
{
INFO_LOG(m_logger) << "adding DDL CanId::CAN_ID_DATENVERKEHR_SRT_KOPPELRECHNER_TX";
INFO_LOG() << "adding DDL CanId::CAN_ID_DATENVERKEHR_SRT_KOPPELRECHNER_TX";
m_txDdlHandler[CanId::OcExconDataTx]->addData(LtsUtils::toQByteArray(data.payload));
break;
}
case TrainingAreaBase::TetraIcd::OpaquePayloadDataBase::Type::FireSmokeMarker:
{
INFO_LOG(m_logger) << "adding DDL CanId::CAN_ID_DATENVERKEHR_DMF_KOPPELRECHNER_TX";
INFO_LOG() << "adding DDL CanId::CAN_ID_DATENVERKEHR_DMF_KOPPELRECHNER_TX";
m_txDdlHandler[CanId::FireSmokeMarkerExconDataTx]->addData(LtsUtils::toQByteArray(data.payload));
break;
}
default:
{
ERROR_LOG(m_logger) << "Tryed to send unhandled TrainingAreaBase::TetraIcd::OpaquePayloadDataBase::Type " << static_cast<int>(data.payloadType);
ERROR_LOG() << "Tryed to send unhandled TrainingAreaBase::TetraIcd::OpaquePayloadDataBase::Type " << static_cast<int>(data.payloadType);
return false;
}
}
@@ -486,22 +483,22 @@ void CanagHandler::handleSfmTelegram(const LtsUtils::SfmMessage &message)
{
if (message.id() == 0)
{
ERROR_LOG(m_logger) << "Error while receiving data from sfm.";
ERROR_LOG() << "Error while receiving data from sfm.";
return;
}
DEBUG_LOG(m_logger) << "Received new CAN-Message with ID: " << message.id() << " RTR: " << message.rtr() << " data: " << message.payload().toHex(' ');
DEBUG_LOG() << "Received new CAN-Message with ID: " << message.id() << " RTR: " << message.rtr() << " data: " << message.payload().toHex(' ');
switch (message.id())
{
case CanId::DemandDeviceId:
{
INFO_LOG(m_logger) << "Received CanId::DemandDeviceId";
INFO_LOG() << "Received CanId::DemandDeviceId";
m_deviceMessageTimer->start();
break;
}
case CanId::Time:
{
DEBUG_LOG(m_logger) << "Received CanId::Time";
DEBUG_LOG() << "Received CanId::Time";
QByteArray data = message.payload();
OcTelegrams::TimeSync outData;
@@ -509,7 +506,7 @@ void CanagHandler::handleSfmTelegram(const LtsUtils::SfmMessage &message)
LtsUtils::get4Byte(data, gpsTime);
outData.gpsTimeMsec = gpsTime * 1000ULL;
outData.timezone = data[4];
DEBUG_LOG(m_logger) << "Received " << gpsTime;
DEBUG_LOG() << "Received " << gpsTime;
sendSyncTime(gpsTime);
m_rxHandler->rxData(outData);
@@ -517,7 +514,7 @@ void CanagHandler::handleSfmTelegram(const LtsUtils::SfmMessage &message)
}
case CanId::EnterLeaveAes:
{
INFO_LOG(m_logger) << "Received CanId::EnterLeaveAes";
INFO_LOG() << "Received CanId::EnterLeaveAes";
QByteArray data = message.payload();
OcTelegrams::EnterLeaveAes outData;
@@ -538,13 +535,13 @@ void CanagHandler::handleSfmTelegram(const LtsUtils::SfmMessage &message)
}
case CanId::ParameterOcRx:
{
INFO_LOG(m_logger) << "Received CanId::ParameterOcRx";
INFO_LOG() << "Received CanId::ParameterOcRx";
send(*m_messages[CanId::ParameterOcTx]);
break;
}
case CanId::TechnicalStateSfm:
{
INFO_LOG(m_logger) << "Received CanId::TechnicalStateSfm";
INFO_LOG() << "Received CanId::TechnicalStateSfm";
QByteArray data = message.payload();
OcTelegrams::TechnicalStateSfm outData;
@@ -569,7 +566,7 @@ void CanagHandler::handleSfmTelegram(const LtsUtils::SfmMessage &message)
}
case CanId::TechnicalStateOc:
{
INFO_LOG(m_logger) << "Received CanId::TechnicalStateOc";
INFO_LOG() << "Received CanId::TechnicalStateOc";
if (message.rtr())
send(*m_messages[CanId::TechnicalStateOc]);
@@ -577,42 +574,42 @@ void CanagHandler::handleSfmTelegram(const LtsUtils::SfmMessage &message)
}
case CanId::ExconOcDataRx:
{
INFO_LOG(m_logger) << "Received CanId::ExconOcDataRx";
INFO_LOG() << "Received CanId::ExconOcDataRx";
QByteArray data = message.payload();
m_rxDdlHandler[CanId::ExconOcDataTx]->process(data);
break;
}
case CanId::OcExconDataRx:
{
INFO_LOG(m_logger) << "Received CanId::OcExconDataRx";
INFO_LOG() << "Received CanId::OcExconDataRx";
QByteArray data = message.payload();
m_txDdlHandler[CanId::OcExconDataTx]->process(data);
break;
}
case CanId::ExconFireSmokeMarkerDataRx:
{
INFO_LOG(m_logger) << "Received CanId::ExconFireSmokeMarkerDataRx";
INFO_LOG() << "Received CanId::ExconFireSmokeMarkerDataRx";
QByteArray data = message.payload();
m_rxDdlHandler[CanId::ExconFireSmokeMarkerDataTx]->process(data);
break;
}
case CanId::FireSmokeMarkerExconDataRx:
{
INFO_LOG(m_logger) << "Received CanId::FireSmokeMarkerExconDataRx";
INFO_LOG() << "Received CanId::FireSmokeMarkerExconDataRx";
QByteArray data = message.payload();
m_txDdlHandler[CanId::FireSmokeMarkerExconDataTx]->process(data);
break;
}
case CanId::AwesDataRx:
{
INFO_LOG(m_logger) << "Received CanId::AwesDataRx";
INFO_LOG() << "Received CanId::AwesDataRx";
QByteArray data = message.payload();
m_rxDdlHandler[CanId::AwesDataTx]->process(data);
break;
}
case CanId::Position:
{
INFO_LOG(m_logger) << "Received CanId::Position";
INFO_LOG() << "Received CanId::Position";
QByteArray data = message.payload();
OcTelegrams::OwnPosition outData;
@@ -629,7 +626,7 @@ void CanagHandler::handleSfmTelegram(const LtsUtils::SfmMessage &message)
}
case CanId::DisplayMessage:
{
INFO_LOG(m_logger) << "Received CanId::DisplayMessage";
INFO_LOG() << "Received CanId::DisplayMessage";
handleDisplayMessage(message);
@@ -637,7 +634,7 @@ void CanagHandler::handleSfmTelegram(const LtsUtils::SfmMessage &message)
}
case CanId::SpecificsExercise:
{
INFO_LOG(m_logger) << "Received CanId::SpecificsExercise";
INFO_LOG() << "Received CanId::SpecificsExercise";
QByteArray data = message.payload();
OcTelegrams::SpecificsExercise outData;
@@ -665,7 +662,7 @@ void CanagHandler::handleSfmTelegram(const LtsUtils::SfmMessage &message)
}
case CanId::SpecificsOc:
{
INFO_LOG(m_logger) << "Received CanId::SpecificsOc";
INFO_LOG() << "Received CanId::SpecificsOc";
if (message.rtr())
send(*m_messages[CanId::SpecificsOc]);
@@ -673,7 +670,7 @@ void CanagHandler::handleSfmTelegram(const LtsUtils::SfmMessage &message)
}
case CanId::SpecificsEquipment:
{
INFO_LOG(m_logger) << "Received CanId::SpecificsEquipment";
INFO_LOG() << "Received CanId::SpecificsEquipment";
QByteArray data = message.payload();
OcTelegrams::SpecificsEquipment outData;
@@ -698,13 +695,13 @@ void CanagHandler::handleSfmTelegram(const LtsUtils::SfmMessage &message)
}
case CanId::ParameterSfmRx:
{
INFO_LOG(m_logger) << "Received CanId::ParameterSfmRx";
INFO_LOG() << "Received CanId::ParameterSfmRx";
break;
}
case CanId::ConnectionTestSfmReply:
{
INFO_LOG(m_logger) << "Received CanId::TestConnectionSfmReply";
INFO_LOG() << "Received CanId::TestConnectionSfmReply";
if (!m_sfmConnectionEstablished)
sendDemandDeviceId();
else
@@ -713,21 +710,21 @@ void CanagHandler::handleSfmTelegram(const LtsUtils::SfmMessage &message)
break;
}
default:
DEBUG_LOG(m_logger) << "message id " << message.id() << " is not handled!";
DEBUG_LOG() << "message id " << message.id() << " is not handled!";
break;
}
}
void CanagHandler::sendDemandDeviceId()
{
INFO_LOG(m_logger) << "Requesting Device ID.";
INFO_LOG() << "Requesting Device ID.";
send(*m_messages[CanId::DemandDeviceId]);
m_deviceMessageTimer->start();
}
void CanagHandler::sendDeviceMessage()
{
INFO_LOG(m_logger) << "Sending Device ID.";
INFO_LOG() << "Sending Device ID.";
send(*m_messages[CanId::DeviceId]);
if (!m_technicalStateSfm.sfmConnected)
demandInitialSfmData();
@@ -819,12 +816,12 @@ void CanagHandler::sendFreeText()
void CanagHandler::sendSyncTime(uint32_t syncTimeSec)
{
INFO_LOG(m_logger) << "sendSyncTime " << syncTimeSec;
INFO_LOG() << "sendSyncTime " << syncTimeSec;
if (syncTimeSec > QDateTime::currentSecsSinceEpoch() - 3 &&
syncTimeSec < QDateTime::currentSecsSinceEpoch() + 3)
{
DEBUG_LOG(m_logger) << "PartitionTime is Still valid";
DEBUG_LOG() << "PartitionTime is Still valid";
return;
}
if (!m_syncSocket->isOpen())
@@ -834,7 +831,7 @@ void CanagHandler::sendSyncTime(uint32_t syncTimeSec)
{
m_syncSocket->write(QByteArray::number(syncTimeSec));
m_syncSocket->flush();
DEBUG_LOG(m_logger) << "Send: " << syncTimeSec << " " << QByteArray::number(syncTimeSec);
DEBUG_LOG() << "Send: " << syncTimeSec << " " << QByteArray::number(syncTimeSec);
}
}
@@ -842,13 +839,13 @@ void CanagHandler::send(const LtsUtils::SfmMessage &message)
{
DEBUG_LOG(m_logger) << "send message - " << message.id() << " RTR: " << message.rtr();
DEBUG_LOG() << "send message - " << message.id() << " RTR: " << message.rtr();
if (!message.payload().isEmpty())
DEBUG_LOG(m_logger) << " size: " << message.payload().size() << " data: " << message.payload().toHex(' ');
DEBUG_LOG() << " size: " << message.payload().size() << " data: " << message.payload().toHex(' ');
if (!m_connectionHandler->send(message))
ERROR_LOG(m_logger) << "Could not send message!";
ERROR_LOG() << "Could not send message!";
else
emit sendMessage(message);
}
@@ -868,15 +865,15 @@ void CanagHandler::openSocket()
m_syncSocket->connectToHost(Settings::hostName(), 13777);
if (!m_syncSocket->waitForConnected())
WARNING_LOG(m_logger) << "Could not (re)open tcp destination " << m_syncSocket->peerName() << ":" << m_syncSocket->peerPort() << ", error: " << m_syncSocket->errorString();
WARNING_LOG() << "Could not (re)open tcp destination " << m_syncSocket->peerName() << ":" << m_syncSocket->peerPort() << ", error: " << m_syncSocket->errorString();
else
{
connect(m_syncSocket, &QTcpSocket::disconnected, this, [this]
{
DEBUG_LOG(m_logger) << "Disconnected from Host";
DEBUG_LOG() << "Disconnected from Host";
m_syncSocket->close();
});
DEBUG_LOG(m_logger) << "(re)open tcp destination " << m_syncSocket->peerName() << ":" << m_syncSocket->peerPort();
DEBUG_LOG() << "(re)open tcp destination " << m_syncSocket->peerName() << ":" << m_syncSocket->peerPort();
}
}