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
+25
-26
@@ -31,14 +31,13 @@ namespace ExerciseEventManagement
|
||||
{
|
||||
EemTests::EemTests(QObject *parent)
|
||||
: QObject(parent)
|
||||
, m_logger(getLogger("Test"))
|
||||
{}
|
||||
|
||||
//-----------------------------------------------------------------------------------------------------------------------
|
||||
bool EemTests::init(int domainId, int exerciseId, int testId)
|
||||
{
|
||||
bool bRet = true;
|
||||
DEBUG_LOG(m_logger) << "init begin";
|
||||
DEBUG_LOG() << "init begin";
|
||||
|
||||
m_testId = testId;
|
||||
|
||||
@@ -64,7 +63,7 @@ bool EemTests::init(int domainId, int exerciseId, int testId)
|
||||
m_bldDts = Buildings::Interface::Dts::create(m_ddsConnector42);
|
||||
bRet &= m_bldDts->enableBuildingState();
|
||||
|
||||
DEBUG_LOG(m_logger) << "bRet: " << bRet;
|
||||
DEBUG_LOG() << "bRet: " << bRet;
|
||||
|
||||
return bRet;
|
||||
}
|
||||
@@ -72,7 +71,7 @@ bool EemTests::init(int domainId, int exerciseId, int testId)
|
||||
//-----------------------------------------------------------------------------------------------------------------------
|
||||
void EemTests::startTest()
|
||||
{
|
||||
INFO_LOG(m_logger) << "startTest m_testId = " << m_testId;
|
||||
INFO_LOG() << "startTest m_testId = " << m_testId;
|
||||
|
||||
if (m_testId == 1) // publish dynamicParticipantData
|
||||
{
|
||||
@@ -135,7 +134,7 @@ void EemTests::startTest()
|
||||
|
||||
if (m_testId <= 0 || m_testId > 6)
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Unknown test case: " << m_testId;
|
||||
ERROR_LOG() << "Unknown test case: " << m_testId;
|
||||
failExit();
|
||||
}
|
||||
|
||||
@@ -167,10 +166,10 @@ void EemTests::tryCreateDynamicParticipantData(int participantId, ProjectDataMan
|
||||
dp.stateHistory().push_back(si);
|
||||
dp.sampleTime(esTime);
|
||||
|
||||
DEBUG_LOG(m_logger) << "Publishing DynamicParticipantData for participant " << participantId ;
|
||||
DEBUG_LOG() << "Publishing DynamicParticipantData for participant " << participantId ;
|
||||
if (!m_ppmDts->publish(dp))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error requesting create DynamicParticipantData";
|
||||
ERROR_LOG() << "Error requesting create DynamicParticipantData";
|
||||
failExit();
|
||||
}
|
||||
}
|
||||
@@ -192,10 +191,10 @@ void EemTests::trySendFireEvent()
|
||||
|
||||
gearAssigment.gears(gears);
|
||||
|
||||
DEBUG_LOG(m_logger) << "Publish EquipmentGearAssigment";
|
||||
DEBUG_LOG() << "Publish EquipmentGearAssigment";
|
||||
if (!m_tabDts->publish(gearAssigment))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error while publishing EquipmentGearAssigment";
|
||||
ERROR_LOG() << "Error while publishing EquipmentGearAssigment";
|
||||
failExit();
|
||||
}
|
||||
|
||||
@@ -213,10 +212,10 @@ void EemTests::trySendFireEvent()
|
||||
|
||||
gearChargeState.charge(vGearCharge);
|
||||
|
||||
DEBUG_LOG(m_logger) << "Publish EquipmentGearChargeState";
|
||||
DEBUG_LOG() << "Publish EquipmentGearChargeState";
|
||||
if (!m_tabDts->publish(gearChargeState))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error while publishing EquipmentGearChargeState";
|
||||
ERROR_LOG() << "Error while publishing EquipmentGearChargeState";
|
||||
failExit();
|
||||
}
|
||||
|
||||
@@ -232,10 +231,10 @@ void EemTests::trySendFireEvent()
|
||||
gearEvent.chargeAmount(200);
|
||||
gearEvent.charge(gc);
|
||||
|
||||
DEBUG_LOG(m_logger) << "Publish EquipmentGearEvent";
|
||||
DEBUG_LOG() << "Publish EquipmentGearEvent";
|
||||
if (!m_tabDts->publish(gearEvent))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error while publishing EquipmentGearEvent";
|
||||
ERROR_LOG() << "Error while publishing EquipmentGearEvent";
|
||||
failExit();
|
||||
}
|
||||
|
||||
@@ -247,10 +246,10 @@ void EemTests::trySendFireEvent()
|
||||
gearEvent.chargeAmount(100);
|
||||
gearEvent.charge(gc);
|
||||
|
||||
DEBUG_LOG(m_logger) << "Publish EquipmentGearEvent";
|
||||
DEBUG_LOG() << "Publish EquipmentGearEvent";
|
||||
if (!m_tabDts->publish(gearEvent))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error while publishing EquipmentGearEvent";
|
||||
ERROR_LOG() << "Error while publishing EquipmentGearEvent";
|
||||
failExit();
|
||||
}
|
||||
|
||||
@@ -258,12 +257,12 @@ void EemTests::trySendFireEvent()
|
||||
|
||||
const QMap<qint64, ExerciseEventManagement::Event> events = m_dtc->events();
|
||||
|
||||
DEBUG_LOG(m_logger) << "events: " << events.size();
|
||||
DEBUG_LOG() << "events: " << events.size();
|
||||
|
||||
int noEvents = 0;
|
||||
for(const ExerciseEventManagement::Event &e : events)
|
||||
{
|
||||
INFO_LOG(m_logger) << "eventId: " << e.id() << ", eventType: " << e.eventTypeId().underlying();
|
||||
INFO_LOG() << "eventId: " << e.id() << ", eventType: " << e.eventTypeId().underlying();
|
||||
if (e.eventTypeId() == ProjectDataManagement::EventType_def::WeaponAssignment ||
|
||||
e.eventTypeId() == ProjectDataManagement::EventType_def::FireEvent)
|
||||
noEvents ++;
|
||||
@@ -271,7 +270,7 @@ void EemTests::trySendFireEvent()
|
||||
|
||||
if (noEvents != 5)
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error number of events (" << QString::number(noEvents) << ") not as expected (5)";
|
||||
ERROR_LOG() << "Error number of events (" << QString::number(noEvents) << ") not as expected (5)";
|
||||
failExit();
|
||||
}
|
||||
|
||||
@@ -307,7 +306,7 @@ void EemTests::trySendBiteMessage()
|
||||
|
||||
if (!m_tabDts->publish(bite))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error while publishing EquipmentBite";
|
||||
ERROR_LOG() << "Error while publishing EquipmentBite";
|
||||
failExit();
|
||||
}
|
||||
|
||||
@@ -332,7 +331,7 @@ void EemTests::trySendBuildingState()
|
||||
|
||||
if (!m_bldDts->publish(bState))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error while publishing building state";
|
||||
ERROR_LOG() << "Error while publishing building state";
|
||||
failExit();
|
||||
}
|
||||
|
||||
@@ -359,10 +358,10 @@ void EemTests::tryCreateIed(qint64 time)
|
||||
const rti::core::int64 esTime = static_cast<rti::core::int64>(time);
|
||||
ied.sampleTime(esTime);
|
||||
|
||||
DEBUG_LOG(m_logger) << "Publishing Ied " ;
|
||||
DEBUG_LOG() << "Publishing Ied " ;
|
||||
if (!m_gimDts->publish(ied))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error requesting publish Ied";
|
||||
ERROR_LOG() << "Error requesting publish Ied";
|
||||
failExit();
|
||||
}
|
||||
}
|
||||
@@ -372,12 +371,12 @@ void EemTests::checkEvents(const ProjectDataManagement::EventType &et, int expec
|
||||
{
|
||||
const QMap<qint64, ExerciseEventManagement::Event> events = m_dtc->events();
|
||||
|
||||
DEBUG_LOG(m_logger) << "All published events: " << events.size();
|
||||
DEBUG_LOG() << "All published events: " << events.size();
|
||||
int noEvents = 0;
|
||||
|
||||
for (const ExerciseEventManagement::Event &e : events)
|
||||
{
|
||||
INFO_LOG(m_logger) << "eventId: " << e.id() << ", eventType: " << e.eventTypeId().underlying();
|
||||
INFO_LOG() << "eventId: " << e.id() << ", eventType: " << e.eventTypeId().underlying();
|
||||
if (e.eventTypeId() == et)
|
||||
{
|
||||
QJsonObject prop = LtsUtils::JsonObject::fromJson(e.properties());
|
||||
@@ -390,11 +389,11 @@ void EemTests::checkEvents(const ProjectDataManagement::EventType &et, int expec
|
||||
}
|
||||
}
|
||||
|
||||
DEBUG_LOG(m_logger) << "No events: " << noEvents;
|
||||
DEBUG_LOG() << "No events: " << noEvents;
|
||||
|
||||
if (noEvents != expected)
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error number of events (" << QString::number(noEvents) << ") not as expected (" << QString::number(expected) << ")";
|
||||
ERROR_LOG() << "Error number of events (" << QString::number(noEvents) << ") not as expected (" << QString::number(expected) << ")";
|
||||
failExit();
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user