- training_area_telegrams.cpp: Fixed QJsonObject initializer syntax (Qt6 requires {{}} not ({}))
- training_area_telegrams.cpp: Fixed fromJson() methods to access m_* members directly
- training_area_telegrams.cpp: Fixed brace mismatches in multiple toJson() methods
- training_area_telegrams.h: Changed Header struct to public members for consistency
- tx_mixin.cpp: Fixed getEquipmentNumber() template for direct member access
- lts_coordinate.cpp: Added missing #include <iomanip>
- MIGRATION_STATUS.md: Added migration progress tracking document
C++17 constraint enforced due to RTI Connext DDS 7.7.0 incompatibility with C++20+
Build status: BUILD_RTI=OFF successful (0 errors, warnings only)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
75 lines
1.8 KiB
C++
Executable File
75 lines
1.8 KiB
C++
Executable File
/**
|
|
* @RDE_HEADER@
|
|
* Unit test for ExerciseManagement (EXM)
|
|
* $Id$
|
|
* $HeadURL$
|
|
* $Author$
|
|
* Created by Hanna E. Rathje, SLSE, 2015-08-20
|
|
*/
|
|
#pragma once
|
|
|
|
#include <QtCore/QObject>
|
|
#include <DDS/Generic/subscriber_listener.h>
|
|
|
|
// For Topic Exercise
|
|
#include <ExerciseManagement/exm_dtc_types.h>
|
|
#include <ExerciseManagement/exm_dts_types.h>
|
|
#include <LtsUtils/LtsUtilsCore/data_modification_enum.h>
|
|
|
|
#include <ExerciseManagement/exm.hpp>
|
|
#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 ExerciseManagement::Exercise &data);
|
|
|
|
// Subscriber
|
|
ExerciseManagement::Exercise getReceivedExerciseData() const { return m_receivedExerciseData; }
|
|
|
|
protected:
|
|
NGL::INGLLogger &m_logger;
|
|
// Subscriber Methods
|
|
void processData(const ExerciseManagement::Exercise& instance, DataModification modType);
|
|
|
|
|
|
Q_SIGNALS:
|
|
void exerciseDataArrived();
|
|
|
|
private:
|
|
dds::domain::DomainParticipant m_domainParticipantPub;
|
|
dds::domain::DomainParticipant m_domainParticipantSub;
|
|
int m_domainId;
|
|
|
|
// Publisher
|
|
dds::pub::Publisher m_ddsPublisher;
|
|
DTS::Exercise *m_dtsExercise;
|
|
|
|
// Subscriber
|
|
dds::sub::Subscriber m_ddsSubscriber;
|
|
DDSGeneric::SubscriberListener *m_subscriberListener;
|
|
rti::core::ListenerBinder< dds::sub::Subscriber, dds::sub::SubscriberListener> m_subscriberListenerBinder;
|
|
DTC::Exercise *m_dtcExercise;
|
|
|
|
Qt::HANDLE m_mainThreadId;
|
|
// For returning TestData
|
|
ExerciseManagement::Exercise m_receivedExerciseData;
|
|
};
|
|
|
|
|
|
|