Initial commit
This commit is contained in:
commit
b7d90b9afe
16245 files changed
+3396666
No files matched your search
+77
@@ -0,0 +1,77 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* Data Plugin for OperatorManagement
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Christian Ehrlicher, SLSE, 2016-02-29
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <Plugins/OperatorManagement/opm_data_plugin_interface.h>
|
||||
#include <OperatorManagement/opm_dts_types.h>
|
||||
#include <DDS/DTS/generic_dts_impl.h>
|
||||
|
||||
class QTimer;
|
||||
namespace OperatorManagement
|
||||
{
|
||||
|
||||
class DataPlugin final : public QObject, public DataPluginBase::Plugin
|
||||
{
|
||||
Q_PLUGIN_METADATA(IID "data:3:opm")
|
||||
Q_INTERFACES(DataPluginBase::Plugin)
|
||||
|
||||
Q_OBJECT
|
||||
public:
|
||||
DataPlugin() = default;
|
||||
~DataPlugin() = default;
|
||||
|
||||
QString pluginName() const override { return QStringLiteral("OperatorManagement"); }
|
||||
std::shared_ptr<DataPluginBase::Interface> createDataInterface(LtsSession::LtsSessionDataDds *session) override;
|
||||
bool availableInPartition(IDL::PartitionType partition) const override
|
||||
{
|
||||
return partition == IDL::PartitionType::Global ||
|
||||
partition == IDL::PartitionType::Exercise ||
|
||||
partition == IDL::PartitionType::Replay;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
class DataInterfaceImpl final : public DataInterface
|
||||
{
|
||||
public:
|
||||
DataInterfaceImpl(const std::shared_ptr<OperatorManagement::Interface::Dtc> &dtc,
|
||||
const std::shared_ptr<OperatorManagement::Interface::Ftc> &ftc,
|
||||
LtsSession::LtsSessionDataDds *session);
|
||||
|
||||
std::shared_ptr<OperatorManagement::Interface::Dtc> getDtc() override { return m_dtc; }
|
||||
std::shared_ptr<OperatorManagement::Interface::Ftc> getFtc() override { return m_ftc; }
|
||||
std::shared_ptr<ForeignDataInterface> getForeignDataInterface() override { return m_foreignInterface; }
|
||||
|
||||
private:
|
||||
std::shared_ptr<OperatorManagement::Interface::Dtc> m_dtc;
|
||||
std::shared_ptr<OperatorManagement::Interface::Ftc> m_ftc;
|
||||
std::shared_ptr<ForeignDataInterface> m_foreignInterface;
|
||||
};
|
||||
|
||||
class ForeignInterfaceImpl final : public QObject, public ForeignDataInterface
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
ForeignInterfaceImpl(const std::shared_ptr<OperatorManagement::Interface::Dtc> &dtc,
|
||||
const std::shared_ptr<OperatorManagement::Interface::Ftc> &ftc,
|
||||
LtsSession::LtsSessionDataDds *session);
|
||||
~ForeignInterfaceImpl();
|
||||
|
||||
void onSendKeepAlive() override;
|
||||
private:
|
||||
std::shared_ptr<OperatorManagement::Interface::Dtc> m_dtc;
|
||||
std::shared_ptr<OperatorManagement::Interface::Ftc> m_ftc;
|
||||
|
||||
std::unique_ptr<DTS::OperatorWorkstationAlive> m_dtsOperatorWorkstationAlive;
|
||||
LtsSession::LtsSessionDataDds *m_session;
|
||||
QTimer *m_timer;
|
||||
};
|
||||
|
||||
} // namespace OperatorManagement
|
||||
Reference in new issue
Block a user