Adds immediate migration results in progress
This commit is contained in:
2102 files changed
+17482
-15071
No files matched your search
+21
-21
@@ -23,7 +23,7 @@ MainHandler::MainHandler(QObject *parent)
|
||||
: QObject(parent)
|
||||
, m_logger(CentralEffectSimulation::getLogger("MainHandler"))
|
||||
{
|
||||
INFO_LOG() << "MainHandler::MainHandler";
|
||||
INFO_LOG(m_logger) << "MainHandler::MainHandler";
|
||||
} // end of ctor()
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
@@ -34,47 +34,47 @@ MainHandler::~MainHandler()
|
||||
m_handlerParticipant.reset();
|
||||
m_handlerBuildingData.reset();
|
||||
|
||||
INFO_LOG() << "MainHandler::~MainHandler";
|
||||
INFO_LOG(m_logger) << "MainHandler::~MainHandler";
|
||||
} // end of dtor()
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
||||
bool MainHandler::loadPlugin(const LtsPluginManager::PluginInstance &pi)
|
||||
{
|
||||
DEBUG_LOG() << "Trying to load ces plugin '" << pi.fullFileName << "'...";
|
||||
DEBUG_LOG(m_logger) << "Trying to load ces plugin '" << pi.fullFileName << "'...";
|
||||
|
||||
Plugin::Plugin *cesPlugin = qobject_cast<Plugin::Plugin *>(pi.plugin);
|
||||
if (!cesPlugin)
|
||||
{
|
||||
WARNING_LOG() << "failed loading a ces plugin - not a CentralEffectSimulation object!";
|
||||
WARNING_LOG(m_logger) << "failed loading a ces plugin - not a CentralEffectSimulation object!";
|
||||
return false;
|
||||
}
|
||||
DEBUG_LOG() << "... success";
|
||||
DEBUG_LOG(m_logger) << "... success";
|
||||
std::shared_ptr<Plugin::Interface> ifc = cesPlugin->createInterface(this,
|
||||
// m_ddsHandler->dds(),
|
||||
nullptr,
|
||||
Settings::settings(),
|
||||
this);
|
||||
|
||||
DEBUG_LOG() << "Vorher: m_interfaces.size=" << m_interfaces.size();
|
||||
DEBUG_LOG(m_logger) << "Vorher: m_interfaces.size=" << m_interfaces.size();
|
||||
|
||||
|
||||
if (!ifc || !ifc->init(m_domainId, m_exerciseId))
|
||||
{
|
||||
WARNING_LOG() << "Could not initialize CentralEffectSimulation plugin";
|
||||
WARNING_LOG(m_logger) << "Could not initialize CentralEffectSimulation plugin";
|
||||
return false;
|
||||
}
|
||||
|
||||
static int counter = 0;
|
||||
INFO_LOG() << "Loading and init of ces_plugin successfull: "
|
||||
INFO_LOG(m_logger) << "Loading and init of ces_plugin successfull: "
|
||||
<< ++counter
|
||||
<< " pluginName = '" << pi.pluginName << "'"
|
||||
<< ", filename '" << pi.fullFileName << "'";
|
||||
|
||||
m_interfaces.push_back(ifc);
|
||||
DEBUG_LOG() << "Nachher: m_interfaces.size=" << m_interfaces.size();
|
||||
DEBUG_LOG(m_logger) << "Nachher: m_interfaces.size=" << m_interfaces.size();
|
||||
|
||||
DEBUG_LOG() << "ECHO!" << ifc->echo(QStringLiteral("TEST"));
|
||||
DEBUG_LOG(m_logger) << "ECHO!" << ifc->echo(QStringLiteral("TEST"));
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -88,7 +88,7 @@ bool MainHandler::init(int domainId, int exerciseId)
|
||||
{
|
||||
m_domainId = domainId;
|
||||
m_exerciseId = exerciseId;
|
||||
INFO_LOG() << "Start MessageDataManagement MainHandler. domainId =" << domainId
|
||||
INFO_LOG(m_logger) << "Start MessageDataManagement MainHandler. domainId =" << domainId
|
||||
<< " exerciseId=" << exerciseId;
|
||||
|
||||
// initialize database
|
||||
@@ -96,18 +96,18 @@ bool MainHandler::init(int domainId, int exerciseId)
|
||||
|
||||
if (!m_dbHandler->init(exerciseId, Settings::settings()))
|
||||
{
|
||||
ERROR_LOG() << "Initialisation DbHandler failed.";
|
||||
ERROR_LOG(m_logger) << "Initialisation DbHandler failed.";
|
||||
return false;
|
||||
}
|
||||
m_db = m_dbHandler->db();
|
||||
INFO_LOG() << "MainHandler::init DbHandler initialized. ";
|
||||
INFO_LOG(m_logger) << "MainHandler::init DbHandler initialized. ";
|
||||
|
||||
|
||||
// initialize DDS
|
||||
m_ddsHandler = std::make_shared<DdsHandler>(domainId, exerciseId);
|
||||
if (!m_ddsHandler->init())
|
||||
{
|
||||
ERROR_LOG() << "Initialisation DdsHandler failed.";
|
||||
ERROR_LOG(m_logger) << "Initialisation DdsHandler failed.";
|
||||
if (m_ddsHandler->pacemaker())
|
||||
m_ddsHandler->pacemaker()->setNewState(Core::RunningState::StartingError);
|
||||
return false;
|
||||
@@ -126,7 +126,7 @@ bool MainHandler::init(int domainId, int exerciseId)
|
||||
// So the logMsg 'Finished reading elevation map of file' will be shown with a delay.
|
||||
// This is no error.
|
||||
ltsElevationManager->waitForInitialization();
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " LtsElevationManager... waitForInitialization DONE";
|
||||
DEBUG_LOG(m_logger) << Q_FUNC_INFO << " LtsElevationManager... waitForInitialization DONE";
|
||||
|
||||
// using elevationCbFunc = std::function<double(double, double, double, bool*)>;
|
||||
using namespace std::placeholders;
|
||||
@@ -138,7 +138,7 @@ bool MainHandler::init(int domainId, int exerciseId)
|
||||
}
|
||||
|
||||
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " LtsElevationManager... DONE ";
|
||||
DEBUG_LOG(m_logger) << Q_FUNC_INFO << " LtsElevationManager... DONE ";
|
||||
|
||||
|
||||
|
||||
@@ -147,7 +147,7 @@ bool MainHandler::init(int domainId, int exerciseId)
|
||||
|
||||
if (!m_handlerBuildingData->init())
|
||||
{
|
||||
ERROR_LOG() << "Initialisation HandlerBuildingData failed.";
|
||||
ERROR_LOG(m_logger) << "Initialisation HandlerBuildingData failed.";
|
||||
m_ddsHandler->pacemaker()->setNewState(Core::RunningState::StartingError);
|
||||
return false;
|
||||
}
|
||||
@@ -168,7 +168,7 @@ bool MainHandler::init(int domainId, int exerciseId)
|
||||
|
||||
if (!m_handlerParticipant->init())
|
||||
{
|
||||
ERROR_LOG() << "Initialisation HandlerParticipant failed.";
|
||||
ERROR_LOG(m_logger) << "Initialisation HandlerParticipant failed.";
|
||||
m_ddsHandler->pacemaker()->setNewState(Core::RunningState::StartingError);
|
||||
return false;
|
||||
}
|
||||
@@ -194,13 +194,13 @@ bool MainHandler::init(int domainId, int exerciseId)
|
||||
|
||||
if (m_interfaces.empty())
|
||||
{
|
||||
WARNING_LOG() << "Could not load any Central Effect Simulation plugin";
|
||||
WARNING_LOG(m_logger) << "Could not load any Central Effect Simulation plugin";
|
||||
return false;
|
||||
}
|
||||
INFO_LOG() << "m_interfaces size=" << m_interfaces.size();
|
||||
INFO_LOG(m_logger) << "m_interfaces size=" << m_interfaces.size();
|
||||
|
||||
// for (/*std::shared_ptr<*/Plugin::EchoInterface/*> &*/ *ifc : m_interfaces)
|
||||
// INFO_LOG() << "ECHO! " << ifc->echo(QStringLiteral("TEST"));
|
||||
// INFO_LOG(m_logger) << "ECHO! " << ifc->echo(QStringLiteral("TEST"));
|
||||
//m_txHandler->addTxHandler(ifc->sendToTab());
|
||||
///////////////////
|
||||
/// End Plugins ///
|
||||
|
||||
Reference in new issue
Block a user