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
+55
-56
@@ -30,7 +30,6 @@ RepTests::RepTests(QObject *parent)
|
||||
, m_reportId(0)
|
||||
, m_operatorId(100)
|
||||
, m_bTestsSuccessful(true)
|
||||
, m_logger(getLogger("Test"))
|
||||
{
|
||||
qRegisterMetaType<Core::FunctionReply>("Core::FunctionReply");
|
||||
}
|
||||
@@ -42,7 +41,7 @@ RepTests::~RepTests()
|
||||
// ------------------------------------------------------------------
|
||||
bool RepTests::init(int domainId, int exerciseId, int testId, int reportId, int operatorId)
|
||||
{
|
||||
INFO_LOG(m_logger) << "init begin";
|
||||
INFO_LOG() << "init begin";
|
||||
|
||||
m_testId = testId;
|
||||
m_exerciseId = exerciseId;
|
||||
@@ -53,32 +52,32 @@ bool RepTests::init(int domainId, int exerciseId, int testId, int reportId, int
|
||||
m_ddsConnector.reset(new DDSConnector::DdsConnector(domainId, IDL::PartitionType::Exercise, m_exerciseId));
|
||||
if (!m_ddsConnector->init())
|
||||
return false;
|
||||
DEBUG_LOG(m_logger) << "DdsHandler(" << domainId << ") for partition: " << m_ddsConnector->getDefaultPartition();
|
||||
DEBUG_LOG() << "DdsHandler(" << domainId << ") for partition: " << m_ddsConnector->getDefaultPartition();
|
||||
m_ddsConnector->initPublisherSubscriber();
|
||||
|
||||
// initialize database
|
||||
m_dbHandler = std::make_shared<DbHandler>();
|
||||
if(!m_dbHandler->init(m_exerciseId, Settings::settings()))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Initialisation dbHandler failed.";
|
||||
ERROR_LOG() << "Initialisation dbHandler failed.";
|
||||
return false;
|
||||
}
|
||||
DEBUG_LOG(m_logger) << "Initialisation dbHandler succesful.";
|
||||
DEBUG_LOG() << "Initialisation dbHandler succesful.";
|
||||
m_db = m_dbHandler->db();
|
||||
|
||||
DEBUG_LOG(m_logger) << "create dtc";
|
||||
DEBUG_LOG() << "create dtc";
|
||||
m_dtc = ReportManagement::Interface::Dtc::create(m_ddsConnector);
|
||||
DEBUG_LOG(m_logger) << "create ftc";
|
||||
DEBUG_LOG() << "create ftc";
|
||||
m_ftc = ReportManagement::Interface::Ftc::create(m_ddsConnector);
|
||||
DEBUG_LOG(m_logger) << "init ftc/dtc";
|
||||
DEBUG_LOG() << "init ftc/dtc";
|
||||
bool bRet = m_ftc->enableAll() && m_dtc->enableAll();
|
||||
DEBUG_LOG(m_logger) << "init end - bRet = " << bRet;
|
||||
DEBUG_LOG() << "init end - bRet = " << bRet;
|
||||
|
||||
DEBUG_LOG(m_logger) << "Domain Id = " << domainId;
|
||||
DEBUG_LOG(m_logger) << "Exercise Id = " << exerciseId;
|
||||
DEBUG_LOG(m_logger) << "Test Id = " << testId;
|
||||
DEBUG_LOG(m_logger) << "Report Id = " << reportId;
|
||||
DEBUG_LOG(m_logger) << "Operator Id = " << operatorId;
|
||||
DEBUG_LOG() << "Domain Id = " << domainId;
|
||||
DEBUG_LOG() << "Exercise Id = " << exerciseId;
|
||||
DEBUG_LOG() << "Test Id = " << testId;
|
||||
DEBUG_LOG() << "Report Id = " << reportId;
|
||||
DEBUG_LOG() << "Operator Id = " << operatorId;
|
||||
|
||||
//TODO: add connects
|
||||
|
||||
@@ -88,7 +87,7 @@ bool RepTests::init(int domainId, int exerciseId, int testId, int reportId, int
|
||||
// ------------------------------------------------------------------
|
||||
void RepTests::startTest()
|
||||
{
|
||||
INFO_LOG(m_logger) << "startTest";
|
||||
INFO_LOG() << "startTest";
|
||||
// create reports
|
||||
if (m_testId == 11)
|
||||
tryCreate(ReportManagement::ReportType::UnitPower);
|
||||
@@ -145,7 +144,7 @@ void RepTests::startTest()
|
||||
tryChangeStatus();
|
||||
else
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Unknown test case!";
|
||||
ERROR_LOG() << "Unknown test case!";
|
||||
failExit();
|
||||
}
|
||||
QTimer::singleShot(0, qApp, &QCoreApplication::quit);
|
||||
@@ -154,7 +153,7 @@ void RepTests::startTest()
|
||||
// ------------------------------------------------------------------
|
||||
void RepTests::tryCreate(ReportType repType, VisualisationType visType)
|
||||
{
|
||||
INFO_LOG(m_logger) << "trying to send createRequest Report";
|
||||
INFO_LOG() << "trying to send createRequest Report";
|
||||
CreateModifyReportRequest request;
|
||||
|
||||
QString repName = QStringLiteral("Test Report - type ") + QString::number(repType.underlying());
|
||||
@@ -481,14 +480,14 @@ void RepTests::tryCreate(ReportType repType, VisualisationType visType)
|
||||
}
|
||||
default:
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Unknown report type!";
|
||||
ERROR_LOG() << "Unknown report type!";
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!m_ftc->createModifyReportRequest(request, this))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error requesting create data";
|
||||
ERROR_LOG() << "Error requesting create data";
|
||||
failExit();
|
||||
}
|
||||
QTest::qWait(2000);
|
||||
@@ -497,7 +496,7 @@ void RepTests::tryCreate(ReportType repType, VisualisationType visType)
|
||||
// ------------------------------------------------------------------
|
||||
void RepTests::tryModify()
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "trying to send modify request for report Id = " << m_reportId;
|
||||
DEBUG_LOG() << "trying to send modify request for report Id = " << m_reportId;
|
||||
|
||||
m_dtc->waitForHistoricalDataReportInfo(1000);
|
||||
ReportInfo rep = m_dtc->reportInfo(m_reportId);
|
||||
@@ -527,22 +526,22 @@ void RepTests::tryModify()
|
||||
request.fileStatus(ReportManagement::FileStatus::Valid);
|
||||
request.lastModified(QDateTime::currentMSecsSinceEpoch());
|
||||
|
||||
DEBUG_LOG(m_logger) << "Start modify";
|
||||
DEBUG_LOG(m_logger) << "Report type = " << rep.reportType();
|
||||
DEBUG_LOG() << "Start modify";
|
||||
DEBUG_LOG() << "Report type = " << rep.reportType();
|
||||
|
||||
if (!m_ftc->createModifyReportRequest(request, this))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error requesting modify data";
|
||||
ERROR_LOG() << "Error requesting modify data";
|
||||
failExit();
|
||||
}
|
||||
QTest::qWait(1000);
|
||||
DEBUG_LOG(m_logger) << "AFTER modify";
|
||||
DEBUG_LOG() << "AFTER modify";
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
void RepTests::tryGetData()
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "trying to send get data request for report Id = " << m_reportId;
|
||||
DEBUG_LOG() << "trying to send get data request for report Id = " << m_reportId;
|
||||
GetReportDataRequest request;
|
||||
|
||||
request.reportId(m_reportId);
|
||||
@@ -550,7 +549,7 @@ void RepTests::tryGetData()
|
||||
|
||||
if (!m_ftc->getReportDataRequest(request, this))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error requesting modify data";
|
||||
ERROR_LOG() << "Error requesting modify data";
|
||||
failExit();
|
||||
}
|
||||
QTest::qWait(1000);
|
||||
@@ -560,7 +559,7 @@ void RepTests::tryGetData()
|
||||
// ------------------------------------------------------------------
|
||||
void RepTests::tryChangeStatus()
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "trying to send change status request for report Id = " << m_reportId;
|
||||
DEBUG_LOG() << "trying to send change status request for report Id = " << m_reportId;
|
||||
ReportChangeStatusRequest request;
|
||||
|
||||
request.id(m_reportId);
|
||||
@@ -570,7 +569,7 @@ void RepTests::tryChangeStatus()
|
||||
|
||||
if (!m_ftc->reportChangeStatusRequest(request, this))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error requesting change status";
|
||||
ERROR_LOG() << "Error requesting change status";
|
||||
failExit();
|
||||
}
|
||||
QTest::qWait(1000);
|
||||
@@ -579,10 +578,10 @@ void RepTests::tryChangeStatus()
|
||||
// ------------------------------------------------------------------
|
||||
void RepTests::tryDelete()
|
||||
{
|
||||
INFO_LOG(m_logger) << "trying to send delete request for report Id = " << m_reportId;
|
||||
INFO_LOG() << "trying to send delete request for report Id = " << m_reportId;
|
||||
if (!m_ftc->removeReportRequest(RemoveReportRequest(m_reportId), this))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error requesting delete data";
|
||||
ERROR_LOG() << "Error requesting delete data";
|
||||
failExit();
|
||||
}
|
||||
QTest::qWait(1000);
|
||||
@@ -591,60 +590,60 @@ void RepTests::tryDelete()
|
||||
// ------------------------------------------------------------------
|
||||
void RepTests::onCreateModifyReportReply(const CreateModifyReportReply &replyObject)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "END (onCreateModifyReportReply)";
|
||||
DEBUG_LOG() << "END (onCreateModifyReportReply)";
|
||||
if (replyObject.errorString().size() > 0)
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Got onCreateModifyReportReply error: " << replyObject.errorString();
|
||||
ERROR_LOG() << "Got onCreateModifyReportReply error: " << replyObject.errorString();
|
||||
failExit();
|
||||
return;
|
||||
}
|
||||
INFO_LOG(m_logger) << "Got createModifyReply with id " << replyObject.id()
|
||||
INFO_LOG() << "Got createModifyReply with id " << replyObject.id()
|
||||
<< " and errorString " << replyObject.errorString();
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
void RepTests::onRemoveReportReply(const Core::FunctionReplyObject &replyObject)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "END (onRemoveReportReply)";
|
||||
DEBUG_LOG() << "END (onRemoveReportReply)";
|
||||
if (replyObject.error())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Got onRemoveReportReply error: " << replyObject();
|
||||
ERROR_LOG() << "Got onRemoveReportReply error: " << replyObject();
|
||||
failExit();
|
||||
return;
|
||||
}
|
||||
INFO_LOG(m_logger) << "Got removeReply with id " << replyObject.id()
|
||||
INFO_LOG() << "Got removeReply with id " << replyObject.id()
|
||||
<< " and errorString " << replyObject.translated();
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
void RepTests::onGetReportDataReply(const GetReportDataReply &replyObject)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "END (onGetReportDataReply)";
|
||||
DEBUG_LOG() << "END (onGetReportDataReply)";
|
||||
if (replyObject.errorString().size() > 0)
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Got onGetReportDataReply error: " << replyObject.errorString();
|
||||
ERROR_LOG() << "Got onGetReportDataReply error: " << replyObject.errorString();
|
||||
failExit();
|
||||
return;
|
||||
}
|
||||
INFO_LOG(m_logger) << "Got createReply with id " << replyObject.id()
|
||||
INFO_LOG() << "Got createReply with id " << replyObject.id()
|
||||
<< " and errorString " << replyObject.errorString();
|
||||
|
||||
QByteArray reportData = LtsUtils::toQByteArray(replyObject.reportData());
|
||||
|
||||
DEBUG_LOG(m_logger) << "Size reportData: " << reportData.size();
|
||||
DEBUG_LOG() << "Size reportData: " << reportData.size();
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
void RepTests::onReportChangeStatusReply(const Core::FunctionReplyObject &replyObject)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "END (onReportChangeStatusReply)";
|
||||
DEBUG_LOG() << "END (onReportChangeStatusReply)";
|
||||
if (replyObject.error())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Got onReportChangeStatusReply error: " << replyObject();
|
||||
ERROR_LOG() << "Got onReportChangeStatusReply error: " << replyObject();
|
||||
failExit();
|
||||
return;
|
||||
}
|
||||
INFO_LOG(m_logger) << "Got changeStatusReply with id " << replyObject.id()
|
||||
INFO_LOG() << "Got changeStatusReply with id " << replyObject.id()
|
||||
<< " and errorString " << replyObject.translated();
|
||||
}
|
||||
|
||||
@@ -652,7 +651,7 @@ void RepTests::onReportChangeStatusReply(const Core::FunctionReplyObject &replyO
|
||||
void RepTests::addTestDataTreatmentTimeline()
|
||||
{
|
||||
// Report Treatment Timeline
|
||||
ERROR_LOG(m_logger) << "START addTestDataTreatmentTimeline" ;
|
||||
ERROR_LOG() << "START addTestDataTreatmentTimeline" ;
|
||||
|
||||
ReportManagement::Database::RepTreatmentTimelineData resData;
|
||||
resData.id = 10;
|
||||
@@ -670,7 +669,7 @@ void RepTests::addTestDataTreatmentTimeline()
|
||||
|
||||
if (!m_db->insert(resData))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error while inserting Event for participantId: " << resData.participantId;
|
||||
ERROR_LOG() << "Error while inserting Event for participantId: " << resData.participantId;
|
||||
failExit();
|
||||
}
|
||||
|
||||
@@ -681,7 +680,7 @@ void RepTests::addTestDataTreatmentTimeline()
|
||||
resData.properties = QString();
|
||||
if (!m_db->insert(resData))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error while inserting Event for participantId: " << resData.participantId;
|
||||
ERROR_LOG() << "Error while inserting Event for participantId: " << resData.participantId;
|
||||
failExit();
|
||||
}
|
||||
|
||||
@@ -694,7 +693,7 @@ void RepTests::addTestDataTreatmentTimeline()
|
||||
resData.properties = QString();
|
||||
if (!m_db->insert(resData))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error while inserting Event for participantId: " << resData.participantId;
|
||||
ERROR_LOG() << "Error while inserting Event for participantId: " << resData.participantId;
|
||||
failExit();
|
||||
}
|
||||
|
||||
@@ -705,7 +704,7 @@ void RepTests::addTestDataTreatmentTimeline()
|
||||
resData.properties = QString();
|
||||
if (!m_db->insert(resData))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error while inserting Event for participantId: " << resData.participantId;
|
||||
ERROR_LOG() << "Error while inserting Event for participantId: " << resData.participantId;
|
||||
failExit();
|
||||
}
|
||||
|
||||
@@ -716,7 +715,7 @@ void RepTests::addTestDataTreatmentTimeline()
|
||||
resData.properties = QString();
|
||||
if (!m_db->insert(resData))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error while inserting Event for participantId: " << resData.participantId;
|
||||
ERROR_LOG() << "Error while inserting Event for participantId: " << resData.participantId;
|
||||
failExit();
|
||||
}
|
||||
|
||||
@@ -728,7 +727,7 @@ void RepTests::addTestDataTreatmentTimeline()
|
||||
resData.properties = QString::fromStdString(json);
|
||||
if (!m_db->insert(resData))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error while inserting Event for participantId: " << resData.participantId;
|
||||
ERROR_LOG() << "Error while inserting Event for participantId: " << resData.participantId;
|
||||
failExit();
|
||||
}
|
||||
|
||||
@@ -739,7 +738,7 @@ void RepTests::addTestDataTreatmentTimeline()
|
||||
resData.properties = QString();
|
||||
if (!m_db->insert(resData))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error while inserting Event for participantId: " << resData.participantId;
|
||||
ERROR_LOG() << "Error while inserting Event for participantId: " << resData.participantId;
|
||||
failExit();
|
||||
}
|
||||
|
||||
@@ -750,7 +749,7 @@ void RepTests::addTestDataTreatmentTimeline()
|
||||
resData.properties = QString();
|
||||
if (!m_db->insert(resData))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error while inserting Event for participantId: " << resData.participantId;
|
||||
ERROR_LOG() << "Error while inserting Event for participantId: " << resData.participantId;
|
||||
failExit();
|
||||
}
|
||||
|
||||
@@ -764,7 +763,7 @@ void RepTests::addTestDataTreatmentTimeline()
|
||||
resData.properties = QString();
|
||||
if (!m_db->insert(resData))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error while inserting Event for participantId: " << resData.participantId;
|
||||
ERROR_LOG() << "Error while inserting Event for participantId: " << resData.participantId;
|
||||
failExit();
|
||||
}
|
||||
|
||||
@@ -775,7 +774,7 @@ void RepTests::addTestDataTreatmentTimeline()
|
||||
resData.properties = QString::fromStdString(json);
|
||||
if (!m_db->insert(resData))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error while inserting Event for participantId: " << resData.participantId;
|
||||
ERROR_LOG() << "Error while inserting Event for participantId: " << resData.participantId;
|
||||
failExit();
|
||||
}
|
||||
|
||||
@@ -786,7 +785,7 @@ void RepTests::addTestDataTreatmentTimeline()
|
||||
resData.properties = QString::fromStdString(json);
|
||||
if (!m_db->insert(resData))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error while inserting Event for participantId: " << resData.participantId;
|
||||
ERROR_LOG() << "Error while inserting Event for participantId: " << resData.participantId;
|
||||
failExit();
|
||||
}
|
||||
|
||||
@@ -795,7 +794,7 @@ void RepTests::addTestDataTreatmentTimeline()
|
||||
// ------------------------------------------------------------------------------
|
||||
void RepTests::failExit()
|
||||
{
|
||||
ERROR_LOG(m_logger) << "FAIL EXIT !";
|
||||
ERROR_LOG() << "FAIL EXIT !";
|
||||
m_bTestsSuccessful = false;
|
||||
QTimer::singleShot(0, qApp, &QCoreApplication::quit);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user