- Migrated all 104 CMakeLists.txt files in Lts/Services - Replaced Qt5::Core, Qt5::Gui, Qt5::Widgets, Qt5::Network, Qt5::Svg, Qt5::Concurrent, Qt5::WebSockets, Qt5::Sql, Qt5::Xml, Qt5::Test, Qt5::SerialPort with Qt6:: equivalents - 1244 files modified (CMakeLists.txt and source files) - Zero Qt5:: references remaining in Lts/Services - QTextCodec, QDesktopWidget: No blocking issues found - QRegExp: 7 occurrences remain (deprecated but functional) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
82 lines
2.3 KiB
C++
Executable File
82 lines
2.3 KiB
C++
Executable File
/**
|
|
* @RDE_HEADER@
|
|
* Unit test for ServiceManagement (SCM)
|
|
* $Id$
|
|
* $HeadURL$
|
|
* $Author$
|
|
* Created by Hannes Baeuerle, SLSE, 2015-03-14
|
|
*/
|
|
#pragma once
|
|
|
|
#include <QObject>
|
|
|
|
// For Topic Exercise
|
|
#include <ServiceManagement/scm_dtc_types.h>
|
|
#include <ServiceManagement/scm_dts_types.h>
|
|
|
|
#include <ServiceManagement/scm.hpp>
|
|
#include <DDS/Generic/subscriber_listener.h>
|
|
#include <LtsUtilsCore/data_modification_enum.h>
|
|
#include <rti/core/ListenerBinder.hpp>
|
|
|
|
|
|
namespace NGL {
|
|
class INGLLogger;
|
|
}
|
|
|
|
class DataTopicTests : public QObject
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
DataTopicTests();
|
|
virtual ~DataTopicTests();
|
|
|
|
// Initialisation
|
|
bool initPublisher();
|
|
bool initSubscriber();
|
|
|
|
// Publisher
|
|
bool write(const ServiceManagement::ServiceInformation &data);
|
|
bool write(const ServiceManagement::GroupInformation &data);
|
|
|
|
// Subscriber
|
|
ServiceManagement::ServiceInformation getReceivedServiceInformationData() const;
|
|
ServiceManagement::GroupInformation getReceivedGroupInformationData() const;
|
|
|
|
protected:
|
|
// Subscriber Methods
|
|
void processData(const ServiceManagement::ServiceInformation& instance, DataModification modType);
|
|
void processData(const ServiceManagement::GroupInformation& instance, DataModification modType);
|
|
|
|
|
|
Q_SIGNALS:
|
|
void serviceInformationDataArrived();
|
|
void groupInformationDataArrived();
|
|
|
|
private:
|
|
dds::domain::DomainParticipant m_domainParticipantPub;
|
|
dds::domain::DomainParticipant m_domainParticipantSub;
|
|
int m_domainId;
|
|
|
|
// Publisher
|
|
dds::pub::Publisher m_ddsPublisher;
|
|
DTS::ServiceInformation *m_dtsServiceInformation;
|
|
DTS::GroupInformation *m_dtsGroupInformation;
|
|
// Subscriber
|
|
dds::sub::Subscriber m_ddsSubscriber;
|
|
DDSGeneric::SubscriberListener *m_subscriberListener;
|
|
rti::core::ListenerBinder< dds::sub::Subscriber, dds::sub::SubscriberListener> m_subscriberListenerBinder;
|
|
DTC::ServiceInformation *m_dtcServiceInformation;
|
|
DTC::GroupInformation *m_dtcGroupInformation;
|
|
|
|
Qt::HANDLE m_mainThreadId;
|
|
// For returning TestData
|
|
ServiceManagement::ServiceInformation m_receivedServiceInformationData;
|
|
ServiceManagement::GroupInformation m_receivedGroupInformationData;
|
|
|
|
NGL::INGLLogger& m_logger;
|
|
};
|
|
|
|
|
|
|