Initial commit
This commit is contained in:
commit
b7d90b9afe
16245 files changed
+3396666
No files matched your search
@@ -0,0 +1,82 @@
|
||||
/**
|
||||
* Plugin CES Functional Area
|
||||
* $Id: plugin.cpp 64170 2024-11-25 11:34:11Z fritsche_h $
|
||||
* $HeadURL: svn://slssvn/TDS/branches/product/features/25_03_etb_uas/Lts/Services/CentralEffectSimulation/Plugins/FunctionalAreas/plugin.cpp $
|
||||
* $Author: fritsche_h $
|
||||
* Created by Gerlinde Rudolphus, SLTE, 2016-04-14
|
||||
*/
|
||||
|
||||
#include "plugin.h"
|
||||
#include "settings.h"
|
||||
|
||||
namespace CES_JAMMING
|
||||
{
|
||||
|
||||
|
||||
std::shared_ptr<CentralEffectSimulation::Plugin::Interface> CesFunctionalAreaPlugin::createInterface(CentralEffectSimulation::Plugin::DataProvider *pdp,
|
||||
const std::shared_ptr<DDSConnector::DdsConnector> &dDSConnector,
|
||||
NGL::Settings *settings,
|
||||
CentralEffectSimulation::MainHandler *mainHandler)
|
||||
{
|
||||
return std::make_shared<CES_JammingInterfaceImpl>(pdp, dDSConnector, settings, mainHandler);
|
||||
}
|
||||
|
||||
|
||||
CES_JammingInterfaceImpl::CES_JammingInterfaceImpl(CentralEffectSimulation::Plugin::DataProvider *pdp,
|
||||
const std::shared_ptr<DDSConnector::DdsConnector> &dDSConnector,
|
||||
NGL::Settings *settings,
|
||||
CentralEffectSimulation::MainHandler *mainHandler)
|
||||
: m_pdp(pdp)
|
||||
, m_ddsConnector(dDSConnector)
|
||||
, m_mainHandler(mainHandler)
|
||||
, m_ddsHandler(m_mainHandler->dds())
|
||||
, m_db(m_mainHandler->db())
|
||||
, m_handlerBuildingData(m_mainHandler->handlerBuildingData())
|
||||
, m_handlerParticipant(m_mainHandler->handlerParticipant())
|
||||
, m_logger(CentralEffectSimulation::getLogger("Plugin.Jamming.HandlerJamming"))
|
||||
{
|
||||
Q_UNUSED(settings)
|
||||
}
|
||||
|
||||
CES_JammingInterfaceImpl::~CES_JammingInterfaceImpl()
|
||||
{
|
||||
m_handlerJamming.reset();
|
||||
}
|
||||
|
||||
|
||||
bool CES_JammingInterfaceImpl::init(int domainId, int exerciseId)
|
||||
{
|
||||
m_domainId = domainId;
|
||||
m_exerciseId = exerciseId;
|
||||
INFO_LOG(m_logger) << "CES_JammingInterfaceImpl::init()"
|
||||
<< " m_domainId=" << m_domainId
|
||||
<< " m_exerciseId=" << m_exerciseId;
|
||||
|
||||
|
||||
|
||||
// initialize HandlerJamming
|
||||
m_handlerJamming = std::make_shared<HandlerJamming>(m_ddsHandler,
|
||||
m_handlerParticipant,
|
||||
m_handlerBuildingData,
|
||||
this);
|
||||
|
||||
if (!m_handlerJamming->init())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Initialisation m_handlerFunctionalArea failed.";
|
||||
return false;
|
||||
}
|
||||
|
||||
INFO_LOG(m_logger) << "CES_JammingInterfaceImpl::init() return true";
|
||||
return true;
|
||||
}
|
||||
|
||||
QString CES_JammingInterfaceImpl::echo(const QString &message)
|
||||
{
|
||||
|
||||
QString ret(QStringLiteral("<<<< %1 >>>> CES_JammingInterfaceImpl::echo").arg(message));
|
||||
INFO_LOG(m_logger) << "CES_JammingInterfaceImpl::echo return:" << ret;
|
||||
DEBUG_LOG(m_logger) << "DEBUG: CES_JammingInterfaceImpl::echo return:" << ret;
|
||||
return ret;
|
||||
}
|
||||
|
||||
} //namespace CES_JAMMING
|
||||
Reference in new issue
Block a user