71 lines
1.6 KiB
C++
Executable File
71 lines
1.6 KiB
C++
Executable File
|
|
|
|
#pragma once
|
|
|
|
#include <QObject>
|
|
|
|
#include "initialisation.h"
|
|
|
|
#include <DdsUnitTests/ddsut_dtc_types.h>
|
|
#include <DdsUnitTests/ddsut_dts_types.h>
|
|
|
|
#include <DDS/Generic/subscriber_listener.h>
|
|
#include <LtsUtilsCore/data_modification_enum.h>
|
|
|
|
namespace NGL
|
|
{
|
|
class INGLLogger;
|
|
}
|
|
|
|
class GenericDataTests : public DDSGeneric::SubscriberListenerCallback
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
GenericDataTests();
|
|
|
|
private Q_SLOTS:
|
|
void initTestCase();
|
|
void initDRTestCase();
|
|
void initDWTestCase();
|
|
void dataWriterTestCase();
|
|
void dataReaderTestCase();
|
|
void deleteDataReaderTestCase();
|
|
void cleanupTestCase();
|
|
|
|
protected:
|
|
void droDataAvailable(const std::string &topicType, const std::string &topicName) override;
|
|
void noWriterAnymore(const std::string &topicType, const std::string &topicName) override
|
|
{
|
|
Q_UNUSED(topicType);
|
|
Q_UNUSED(topicName);
|
|
}
|
|
|
|
void writerAvailable(const std::string &topicType, const std::string &topicName) override
|
|
{
|
|
Q_UNUSED(topicType);
|
|
Q_UNUSED(topicName);
|
|
}
|
|
|
|
void processData(const DdsUnitTests::TestParticipant &data, const dds::sub::SampleInfo &si);
|
|
void processData(const DdsUnitTests::SpatialData &data, DataModification modType);
|
|
|
|
private:
|
|
Initialisation *m_init = nullptr;
|
|
|
|
DTS::DwoTestParticipant *m_dataWriter = nullptr;
|
|
DTC::DroTestParticipant *m_dataReader = nullptr;
|
|
|
|
DTS::DwoSpatialData *m_dataWriterSd = nullptr;
|
|
DTC::DroSpatialData *m_dataReaderSd = nullptr;
|
|
|
|
DdsUnitTests::SpatialData m_spatialData;
|
|
DdsUnitTests::TestParticipant m_testPart;
|
|
|
|
NGL::INGLLogger &m_logger;
|
|
|
|
};
|
|
|
|
|
|
|