Initial commit
This commit is contained in:
commit
b7d90b9afe
16245 files changed
+3396666
No files matched your search
@@ -0,0 +1,81 @@
|
||||
/**
|
||||
* @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;
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user