Initial commit
This commit is contained in:
commit
b7d90b9afe
16245 files changed
+3396666
No files matched your search
+19
@@ -0,0 +1,19 @@
|
||||
#
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
# $Author$
|
||||
# Created by Astrid Mueller, SGAS, 2017-08-09
|
||||
#
|
||||
|
||||
#
|
||||
# Data Plugin
|
||||
#
|
||||
NGL_ADD_LIBRARY(WS CesDataPlugin MODULE ces_data_plugin.cpp ces_data_plugin.h)
|
||||
NGL_TARGET_LINK_LIBRARIES(CesDataPlugin
|
||||
Qt5::Core
|
||||
CesDataPluginInterface
|
||||
svcCesClient
|
||||
NGLLogger
|
||||
LtsSessionDataDds
|
||||
)
|
||||
NGL_INSTALL_TARGET(CesDataPlugin)
|
||||
@@ -0,0 +1,38 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* Data Plugin for CentralEffectSimulation
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Astrid Mueller, SGAS, 2017-08-09
|
||||
*/
|
||||
|
||||
#include "ces_data_plugin.h"
|
||||
|
||||
#include <DDS/DDSConnector/dds_connector.h>
|
||||
#include <LtsSession/lts_session_data_dds.h>
|
||||
|
||||
|
||||
namespace CentralEffectSimulation
|
||||
{
|
||||
|
||||
std::shared_ptr<DataPluginBase::Interface> DataPlugin::createDataInterface(LtsSession::LtsSessionDataDds *session)
|
||||
{
|
||||
std::shared_ptr<Interface::Dtc> dtc;
|
||||
std::shared_ptr<Interface::Ftc> ftc;
|
||||
if (!session->createTopicClient(dtc, ftc))
|
||||
return std::shared_ptr<DataPluginBase::Interface>();
|
||||
|
||||
return std::make_shared<DataInterfaceImpl>(dtc, ftc);
|
||||
}
|
||||
|
||||
|
||||
DataInterfaceImpl::DataInterfaceImpl(const std::shared_ptr<CentralEffectSimulation::Interface::Dtc> &dtc,
|
||||
const std::shared_ptr<CentralEffectSimulation::Interface::Ftc> &ftc)
|
||||
: DataInterface()
|
||||
, m_dtc(dtc)
|
||||
, m_ftc(ftc)
|
||||
{}
|
||||
|
||||
|
||||
} // namespace CentralEffectSimulation
|
||||
@@ -0,0 +1,54 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* Data Plugin for CentralEffectSimulation
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Astrid Mueller, SGAS, 2017-08-09
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <PluginInterfaces/data_plugin_interface.h>
|
||||
#include <Plugins/CentralEffectSimulation/ces_data_plugin_interface.h>
|
||||
|
||||
|
||||
namespace CentralEffectSimulation
|
||||
{
|
||||
|
||||
class DataPlugin final : public QObject, public DataPluginBase::Plugin
|
||||
{
|
||||
Q_PLUGIN_METADATA(IID "data:3:ces")
|
||||
Q_INTERFACES(DataPluginBase::Plugin)
|
||||
|
||||
Q_OBJECT
|
||||
public:
|
||||
DataPlugin() = default;
|
||||
~DataPlugin() = default;
|
||||
|
||||
QString pluginName() const override { return QStringLiteral("CentralEffectSimulation"); }
|
||||
std::shared_ptr<DataPluginBase::Interface> createDataInterface(LtsSession::LtsSessionDataDds *session) override;
|
||||
bool availableInPartition(IDL::PartitionType partition) const override
|
||||
{
|
||||
return partition == IDL::PartitionType::Exercise ||
|
||||
partition == IDL::PartitionType::Replay ||
|
||||
partition == IDL::PartitionType::Global;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
class DataInterfaceImpl final : public DataInterface
|
||||
{
|
||||
public:
|
||||
DataInterfaceImpl(const std::shared_ptr<CentralEffectSimulation::Interface::Dtc> &dtc,
|
||||
const std::shared_ptr<CentralEffectSimulation::Interface::Ftc> &ftc);
|
||||
|
||||
std::shared_ptr<CentralEffectSimulation::Interface::Dtc> getDtc() override { return m_dtc; }
|
||||
std::shared_ptr<CentralEffectSimulation::Interface::Ftc> getFtc() override { return m_ftc; }
|
||||
|
||||
private:
|
||||
std::shared_ptr<CentralEffectSimulation::Interface::Dtc> m_dtc;
|
||||
std::shared_ptr<CentralEffectSimulation::Interface::Ftc> m_ftc;
|
||||
};
|
||||
|
||||
} // namespace CentralEffectSimulation
|
||||
Reference in new issue
Block a user