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
@@ -21,7 +21,7 @@ CODEGEN_TOPIC_TYPEDEFS(SRCS_common ${xml_FILE})
|
||||
# generate ddsut_[d|f]tc.h
|
||||
CODEGEN_CLIENT_TOPICS_IFC(SRCS_common ${xml_FILE})
|
||||
|
||||
NGL_ADD_LIBRARY(ALL ddsut_common SHARED ${SRCS_common})
|
||||
NGL_ADD_LIBRARY2(ALL ddsut_common SHARED ${SRCS_common})
|
||||
IF(BUILD_RTI)
|
||||
NGL_TARGET_LINK_LIBRARIES(ddsut_common
|
||||
PRIVATE
|
||||
|
||||
@@ -29,9 +29,9 @@ DataTopicTests::DataTopicTests()
|
||||
, m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger().getNGLLogger("UnitTests.DataTopicTests"))
|
||||
{
|
||||
if (!DDS::QosProfile::setDefault())
|
||||
ERROR_LOG(m_logger) << "Error setting default QoS from xml-file ";
|
||||
ERROR_LOG() << "Error setting default QoS from xml-file ";
|
||||
|
||||
DEBUG_LOG(m_logger) << "Main thread ID is " << m_mainThreadId;
|
||||
DEBUG_LOG() << "Main thread ID is " << m_mainThreadId;
|
||||
}
|
||||
|
||||
DataTopicTests::~DataTopicTests()
|
||||
@@ -65,7 +65,7 @@ bool DataTopicTests::initPublisher()
|
||||
partitionQos.name( { partition.toStdString() } );
|
||||
publisherQos << partitionQos;
|
||||
|
||||
DEBUG_LOG(m_logger) << "Publish on partition " << partition;
|
||||
DEBUG_LOG() << "Publish on partition " << partition;
|
||||
|
||||
m_ddsPublisher = dds::pub::Publisher(m_domainParticipantPub, publisherQos);
|
||||
m_testPart = new DTS::TestParticipantImpl(m_domainParticipantPub, m_ddsPublisher);
|
||||
@@ -75,8 +75,8 @@ bool DataTopicTests::initPublisher()
|
||||
|
||||
bool DataTopicTests::write(const DdsUnitTests::TestParticipant &data)
|
||||
{
|
||||
INFO_LOG(m_logger) << "Publish topic TestParticipant ";
|
||||
DEBUG_LOG(m_logger) << "ParticipantId: " << data.location().participantId()
|
||||
INFO_LOG() << "Publish topic TestParticipant ";
|
||||
DEBUG_LOG() << "ParticipantId: " << data.location().participantId()
|
||||
<< ", equipNo = " << data.location().equipNo();
|
||||
|
||||
return m_testPart->write(data);
|
||||
@@ -88,7 +88,7 @@ bool DataTopicTests::write(const DdsUnitTests::TestParticipant &data)
|
||||
|
||||
bool DataTopicTests::initSubscriber()
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Initialisation DDS (Subscriber/Reader)";
|
||||
DEBUG_LOG() << "Initialisation DDS (Subscriber/Reader)";
|
||||
|
||||
m_domainParticipantSub =
|
||||
dds::domain::DomainParticipant(m_domainId,
|
||||
@@ -108,7 +108,7 @@ bool DataTopicTests::initSubscriber()
|
||||
partitionQos.name( partitions );
|
||||
subscriberQos << partitionQos;
|
||||
|
||||
DEBUG_LOG(m_logger) << "Initialise DTC::SubscriberListener";
|
||||
DEBUG_LOG() << "Initialise DTC::SubscriberListener";
|
||||
m_subscriberListener = new DDSGeneric::SubscriberListener();
|
||||
m_ddsSubscriber = dds::sub::Subscriber(m_domainParticipantSub,
|
||||
subscriberQos,
|
||||
@@ -142,10 +142,10 @@ void DataTopicTests::deleteSubscriber()
|
||||
|
||||
void DataTopicTests::processData(const DdsUnitTests::TestParticipant &instance, const dds::sub::SampleInfo &si)
|
||||
{
|
||||
INFO_LOG(m_logger) << "process data in topic TestParticipant, Sampleinfo: " << si.source_timestamp().sec();
|
||||
INFO_LOG() << "process data in topic TestParticipant, Sampleinfo: " << si.source_timestamp().sec();
|
||||
|
||||
DEBUG_LOG(m_logger) << "participantId: " << instance.location().participantId();
|
||||
DEBUG_LOG(m_logger) << "equipNo: " << instance.location().equipNo();
|
||||
DEBUG_LOG() << "participantId: " << instance.location().participantId();
|
||||
DEBUG_LOG() << "equipNo: " << instance.location().equipNo();
|
||||
|
||||
m_receivedParticipantData = instance;
|
||||
|
||||
|
||||
@@ -58,8 +58,6 @@ private:
|
||||
Qt::HANDLE m_mainThreadId;
|
||||
|
||||
DdsUnitTests::TestParticipant m_receivedParticipantData;
|
||||
|
||||
NGL::INGLLogger& m_logger;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ DataTopicTestsMain::DataTopicTestsMain()
|
||||
|
||||
void DataTopicTestsMain::initTestCase()
|
||||
{
|
||||
DEBUG_LOG(m_logger) <<"DataTopicTestsMain: initTestCase";
|
||||
DEBUG_LOG() <<"DataTopicTestsMain: initTestCase";
|
||||
|
||||
m_dtTest = new DataTopicTests();
|
||||
QVERIFY2(m_dtTest, "Initialisation of DataTopicTest failed");
|
||||
@@ -46,20 +46,20 @@ void DataTopicTestsMain::initTestCase()
|
||||
|
||||
void DataTopicTestsMain::publishTestCase()
|
||||
{
|
||||
DEBUG_LOG(m_logger) <<"DataTopicTestsMain: publish TestParticipant";
|
||||
DEBUG_LOG() <<"DataTopicTestsMain: publish TestParticipant";
|
||||
|
||||
m_sentParticipantData.location().participantId(100);
|
||||
m_sentParticipantData.location().equipNo(1010);
|
||||
m_sentParticipantData.testId(100);
|
||||
QVERIFY2(m_dtTest->write(m_sentParticipantData), "Publishing Topic TestParticipant failed");
|
||||
|
||||
DEBUG_LOG(m_logger) <<"DataTopicTestsMain: publish ready";
|
||||
DEBUG_LOG() <<"DataTopicTestsMain: publish ready";
|
||||
}
|
||||
|
||||
|
||||
void DataTopicTestsMain::subscribeTestCase()
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "IN subscribeTestCase";
|
||||
DEBUG_LOG() << "IN subscribeTestCase";
|
||||
|
||||
QTRY_COMPARE(m_participantDataArrivedSpy->count(), 1);
|
||||
|
||||
@@ -95,7 +95,7 @@ void DataTopicTestsMain::deleteDataReaderTestCase()
|
||||
|
||||
void DataTopicTestsMain::cleanupTestCase()
|
||||
{
|
||||
DEBUG_LOG(m_logger) <<"DataTopicTestsMain: cleanupTestCase";
|
||||
DEBUG_LOG() <<"DataTopicTestsMain: cleanupTestCase";
|
||||
delete m_dtTest; m_dtTest = nullptr;
|
||||
delete m_participantDataArrivedSpy; m_participantDataArrivedSpy = nullptr;
|
||||
}
|
||||
|
||||
@@ -34,5 +34,4 @@ private:
|
||||
DdsUnitTests::TestParticipant m_sentParticipantData;
|
||||
QSignalSpy *m_participantDataArrivedSpy = nullptr;
|
||||
DataTopicTests *m_dtTest = nullptr;
|
||||
NGL::INGLLogger &m_logger;
|
||||
};
|
||||
@@ -38,7 +38,7 @@ FunctionTopicTests::FunctionTopicTests()
|
||||
|
||||
void FunctionTopicTests::initTestCase()
|
||||
{
|
||||
DEBUG_LOG(m_logger) <<"FunctionTopicTests: initTestCase";
|
||||
DEBUG_LOG() <<"FunctionTopicTests: initTestCase";
|
||||
|
||||
const int domainId = 0;
|
||||
|
||||
@@ -97,7 +97,7 @@ void FunctionTopicTests::requestWithState()
|
||||
QSignalSpy spyRequest(this, &FunctionTopicTests::functionTopicRequestFinished);
|
||||
QSignalSpy spyReply(this, &FunctionTopicTests::functionTopicReply);
|
||||
|
||||
DEBUG_LOG(m_logger) <<"FunctionTopicTests: request";
|
||||
DEBUG_LOG() <<"FunctionTopicTests: request";
|
||||
|
||||
|
||||
DdsUnitTests::FunctionRequestWithState data;
|
||||
@@ -125,7 +125,7 @@ void FunctionTopicTests::requestTestCase2()
|
||||
QSignalSpy spyRequest(this, &FunctionTopicTests::functionTopicRequestFinished);
|
||||
QSignalSpy spyReply(this, &FunctionTopicTests::functionTopicReply);
|
||||
|
||||
DEBUG_LOG(m_logger) <<"FunctionTopicTests: request";
|
||||
DEBUG_LOG() <<"FunctionTopicTests: request";
|
||||
|
||||
|
||||
DdsUnitTests::FunctionRequest data;
|
||||
@@ -149,7 +149,7 @@ void FunctionTopicTests::requestTestCase2()
|
||||
|
||||
void FunctionTopicTests::cleanupTestCase()
|
||||
{
|
||||
DEBUG_LOG(m_logger) <<"FunctionTopicTests: cleanupTestCase";
|
||||
DEBUG_LOG() <<"FunctionTopicTests: cleanupTestCase";
|
||||
|
||||
m_fts = nullptr;
|
||||
m_ftc = nullptr;
|
||||
@@ -165,7 +165,7 @@ void FunctionTopicTests::onFunctionTopicRequest(const rti::core::SampleIdentity
|
||||
{
|
||||
QCOMPARE(m_mainThreadId, QThread::currentThreadId());
|
||||
|
||||
INFO_LOG(m_logger) << "Got function topic request (with status member)";
|
||||
INFO_LOG() << "Got function topic request (with status member)";
|
||||
m_requestTopicWithState = request;
|
||||
QCOMPARE(m_requestTopicWithState.id(), 1);
|
||||
QCOMPARE(m_requestTopicWithState.info().get(), std::string("Test request"));
|
||||
@@ -173,7 +173,7 @@ void FunctionTopicTests::onFunctionTopicRequest(const rti::core::SampleIdentity
|
||||
|
||||
DdsUnitTests::FunctionReplyWithState reply;
|
||||
|
||||
DEBUG_LOG(m_logger) << "Send sample with status REPLY_COMPLETED";
|
||||
DEBUG_LOG() << "Send sample with status REPLY_COMPLETED";
|
||||
reply.id(1);
|
||||
reply.errorString("Hello");
|
||||
reply.replyState(Core::FtReplyState::Completed);
|
||||
@@ -191,7 +191,7 @@ void FunctionTopicTests::onFunctionTopicRequest(const rti::core::SampleIdentity
|
||||
{
|
||||
QCOMPARE(m_mainThreadId, QThread::currentThreadId());
|
||||
|
||||
INFO_LOG(m_logger) << "Got function topic request (without status member)";
|
||||
INFO_LOG() << "Got function topic request (without status member)";
|
||||
|
||||
m_requestTopic = request;
|
||||
|
||||
@@ -214,7 +214,7 @@ void FunctionTopicTests::slotRequestedData(const DdsUnitTests::FunctionTopicTest
|
||||
Q_UNUSED(seqNo);
|
||||
QCOMPARE(m_mainThreadId, QThread::currentThreadId());
|
||||
|
||||
INFO_LOG(m_logger) << "Got reply from FTS: " << reply.replyState();
|
||||
INFO_LOG() << "Got reply from FTS: " << reply.replyState();
|
||||
|
||||
m_replyTopicWithState = reply;
|
||||
|
||||
|
||||
@@ -68,6 +68,4 @@ private:
|
||||
DdsUnitTests::FunctionReplyWithState m_replyTopicWithState;
|
||||
|
||||
Qt::HANDLE m_mainThreadId;
|
||||
|
||||
NGL::INGLLogger& m_logger;
|
||||
};
|
||||
@@ -38,7 +38,7 @@ GenericDataTests::GenericDataTests()
|
||||
|
||||
void GenericDataTests::initTestCase()
|
||||
{
|
||||
DEBUG_LOG(m_logger) <<"GenericDataTests: initTestCase";
|
||||
DEBUG_LOG() <<"GenericDataTests: initTestCase";
|
||||
|
||||
m_init = new Initialisation();
|
||||
|
||||
@@ -81,7 +81,7 @@ void GenericDataTests::initDWTestCase()
|
||||
|
||||
void GenericDataTests::dataWriterTestCase()
|
||||
{
|
||||
DEBUG_LOG(m_logger) <<"GenericDataTests: dataWriter";
|
||||
DEBUG_LOG() <<"GenericDataTests: dataWriter";
|
||||
|
||||
|
||||
DdsUnitTests::SpatialData data;
|
||||
@@ -125,7 +125,7 @@ void GenericDataTests::dataWriterTestCase()
|
||||
|
||||
void GenericDataTests::dataReaderTestCase()
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "GenericDataTests: dataReader";
|
||||
DEBUG_LOG() << "GenericDataTests: dataReader";
|
||||
|
||||
|
||||
QTRY_COMPARE(m_spatialData.equipNo(), 999);
|
||||
@@ -136,7 +136,7 @@ void GenericDataTests::dataReaderTestCase()
|
||||
|
||||
bool bSeenUnreadSamples = false;
|
||||
dds::sub::LoanedSamples<DdsUnitTests::TestParticipant> vecTp = m_dataReader->readAlive(bSeenUnreadSamples);
|
||||
INFO_LOG(m_logger) <<"vecTp size: " << vecTp.length();
|
||||
INFO_LOG() <<"vecTp size: " << vecTp.length();
|
||||
QCOMPARE(vecTp.length(), static_cast<decltype(vecTp.length())>(5));
|
||||
QCOMPARE(vecTp[0].data().id(), 10000);
|
||||
QCOMPARE(vecTp[1].data().id(), 11000);
|
||||
@@ -145,7 +145,7 @@ void GenericDataTests::dataReaderTestCase()
|
||||
QCOMPARE(vecTp[4].data().id(), 11111);
|
||||
|
||||
dds::sub::LoanedSamples<DdsUnitTests::TestParticipant> vecTpLoaned = m_dataReader->takeAlive(bSeenUnreadSamples);
|
||||
INFO_LOG(m_logger) <<"vecTpLoaned size: " << vecTp.length();
|
||||
INFO_LOG() <<"vecTpLoaned size: " << vecTp.length();
|
||||
QCOMPARE(vecTpLoaned.length(), static_cast<decltype(vecTpLoaned.length())>(5));
|
||||
QCOMPARE(vecTpLoaned[0].data().id(), 10000);
|
||||
QCOMPARE(vecTpLoaned[1].data().id(), 11000);
|
||||
@@ -177,7 +177,7 @@ void GenericDataTests::deleteDataReaderTestCase()
|
||||
|
||||
void GenericDataTests::cleanupTestCase()
|
||||
{
|
||||
DEBUG_LOG(m_logger) <<"GenericDataTests: cleanupTestCase";
|
||||
DEBUG_LOG() <<"GenericDataTests: cleanupTestCase";
|
||||
if (m_dataReader)
|
||||
{
|
||||
m_init->getSubscriberListener()->removeCallback(m_dataReader->getDataReader(), this);
|
||||
@@ -198,21 +198,21 @@ void GenericDataTests::cleanupTestCase()
|
||||
|
||||
void GenericDataTests::processData(const DdsUnitTests::SpatialData &data, DataModification modType)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "SpatialData: equipNo = " << data.equipNo() << " modType: " << modType;
|
||||
DEBUG_LOG() << "SpatialData: equipNo = " << data.equipNo() << " modType: " << modType;
|
||||
m_spatialData = data;
|
||||
}
|
||||
|
||||
void GenericDataTests::processData(const DdsUnitTests::TestParticipant &data, const dds::sub::SampleInfo &si)
|
||||
{
|
||||
Q_UNUSED(si);
|
||||
DEBUG_LOG(m_logger) << "TestParticipant: equipNo = " << data.location().equipNo();
|
||||
DEBUG_LOG() << "TestParticipant: equipNo = " << data.location().equipNo();
|
||||
m_testPart = data;
|
||||
}
|
||||
|
||||
void GenericDataTests::droDataAvailable(const std::string &topicType, const std::string &topicName)
|
||||
{
|
||||
Q_UNUSED(topicName)
|
||||
DEBUG_LOG(m_logger) << "IN droDataAvailable: type = " << topicType;
|
||||
DEBUG_LOG() << "IN droDataAvailable: type = " << topicType;
|
||||
if (topicType == "DdsUnitTests::TestParticipant")
|
||||
{
|
||||
m_init->getSubscriberListener()->enableCallback(m_dataReader->getDataReader(), this);
|
||||
|
||||
@@ -61,9 +61,6 @@ private:
|
||||
|
||||
DdsUnitTests::SpatialData m_spatialData;
|
||||
DdsUnitTests::TestParticipant m_testPart;
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ Initialisation::Initialisation()
|
||||
, m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger().getNGLLogger("UnitTests.Initialisation"))
|
||||
{
|
||||
if (!DDS::QosProfile::setDefault())
|
||||
ERROR_LOG(m_logger) << "Error setting default QoS from xml-file ";
|
||||
ERROR_LOG() << "Error setting default QoS from xml-file ";
|
||||
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ bool Initialisation::initDDS(int domainId, int exerciseId, PubSub pubsub)
|
||||
{
|
||||
dds::pub::qos::PublisherQos publisherQos = m_domainParticipant.default_publisher_qos();
|
||||
|
||||
DEBUG_LOG(m_logger) << "Publish on partition " << IDL::exercisePartition(exerciseId);
|
||||
DEBUG_LOG() << "Publish on partition " << IDL::exercisePartition(exerciseId);
|
||||
|
||||
|
||||
dds::core::policy::Partition partitionQos;
|
||||
@@ -74,7 +74,7 @@ bool Initialisation::initDDS(int domainId, int exerciseId, PubSub pubsub)
|
||||
|
||||
dds::sub::qos::SubscriberQos subscriberQos = domainPart.default_subscriber_qos();
|
||||
|
||||
DEBUG_LOG(m_logger) << "Subsribing on partition " << IDL::exercisePartition(exerciseId);
|
||||
DEBUG_LOG() << "Subsribing on partition " << IDL::exercisePartition(exerciseId);
|
||||
|
||||
|
||||
dds::core::policy::Partition partitionQos;
|
||||
|
||||
@@ -40,7 +40,6 @@ private:
|
||||
dds::pub::Publisher m_ddsPublisher;
|
||||
dds::sub::Subscriber m_ddsSubscriber;
|
||||
DDSGeneric::SubscriberListener *m_subListener;
|
||||
NGL::INGLLogger &m_logger;
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user