Adds immediate migration results in progress
This commit is contained in:
2102 files changed
+17482
-15071
No files matched your search
@@ -21,8 +21,7 @@
|
||||
namespace AssetManagement
|
||||
{
|
||||
|
||||
MainHandler::MainHandler(QObject *parent)
|
||||
: QObject(parent)
|
||||
MainHandler::MainHandler(QObject *parent) : QObject(parent)
|
||||
, m_handlerTrainingArea(nullptr)
|
||||
, m_handlerWorkstationLogout(nullptr)
|
||||
, m_handlerAsset(nullptr)
|
||||
@@ -30,8 +29,8 @@ MainHandler::MainHandler(QObject *parent)
|
||||
, m_handlerRelayInfo(nullptr)
|
||||
, m_ddsHandler(nullptr)
|
||||
, m_dbHandler(nullptr)
|
||||
, m_handlerWebSocket(nullptr)
|
||||
{}
|
||||
, m_handlerWebSocket(nullptr),
|
||||
m_logger(NGL::NGLLoggerBootstrap::getLogger()) {}
|
||||
|
||||
MainHandler::~MainHandler()
|
||||
{
|
||||
@@ -52,29 +51,29 @@ bool MainHandler::init(int domainId)
|
||||
|
||||
if (!m_dbHandler->init(0, Settings::settings()))
|
||||
{
|
||||
ERROR_LOG() << "Initialisation dbHandler failed.";
|
||||
ERROR_LOG(m_logger) << "Initialisation dbHandler failed.";
|
||||
return false;
|
||||
}
|
||||
DEBUG_LOG() << "Initialisation dbHandler succesful.";
|
||||
DEBUG_LOG(m_logger) << "Initialisation dbHandler succesful.";
|
||||
|
||||
// initialize DDS
|
||||
m_ddsHandler = std::make_shared<DdsHandler>(domainId);
|
||||
if (!m_ddsHandler->init())
|
||||
{
|
||||
ERROR_LOG() << "Initialisation ddsHandler failed.";
|
||||
ERROR_LOG(m_logger) << "Initialisation ddsHandler failed.";
|
||||
return false;
|
||||
}
|
||||
DEBUG_LOG() << "Initialisation ddsHandler succesful.";
|
||||
DEBUG_LOG(m_logger) << "Initialisation ddsHandler succesful.";
|
||||
|
||||
// read project specific data from database
|
||||
// publish project specific data
|
||||
// initialize all handlers
|
||||
if (!initAsmHandler())
|
||||
{
|
||||
ERROR_LOG() << "Initialisation AsmHandler failed.";
|
||||
ERROR_LOG(m_logger) << "Initialisation AsmHandler failed.";
|
||||
return false;
|
||||
}
|
||||
DEBUG_LOG() << "Initialisation AsmHandler succesful.";
|
||||
DEBUG_LOG(m_logger) << "Initialisation AsmHandler succesful.";
|
||||
|
||||
m_ddsHandler->pacemaker()->setNewState(Core::RunningState::Running);
|
||||
|
||||
@@ -83,73 +82,73 @@ bool MainHandler::init(int domainId)
|
||||
|
||||
bool MainHandler::initAsmHandler()
|
||||
{
|
||||
DEBUG_LOG() << "Start Initialisation AsmHandler";
|
||||
DEBUG_LOG(m_logger) << "Start Initialisation AsmHandler";
|
||||
|
||||
// TrainingArea
|
||||
m_handlerTrainingArea = std::make_shared<HandlerTrainingArea>(this);
|
||||
DEBUG_LOG() << "Reset HandlerTrainingArea succesful.";
|
||||
DEBUG_LOG(m_logger) << "Reset HandlerTrainingArea succesful.";
|
||||
|
||||
if (!m_handlerTrainingArea->init())
|
||||
{
|
||||
ERROR_LOG() << "Initialisation of HandlerTrainingArea failed.";
|
||||
ERROR_LOG(m_logger) << "Initialisation of HandlerTrainingArea failed.";
|
||||
return false;
|
||||
}
|
||||
DEBUG_LOG() << "Initialisation HandlerTrainingArea succesful.";
|
||||
DEBUG_LOG(m_logger) << "Initialisation HandlerTrainingArea succesful.";
|
||||
|
||||
// WorkstationLogout
|
||||
m_handlerWorkstationLogout = std::make_shared<HandlerWorkstationLogout>(this);
|
||||
DEBUG_LOG() << "Reset HandlerWorkstationLogout succesful.";
|
||||
DEBUG_LOG(m_logger) << "Reset HandlerWorkstationLogout succesful.";
|
||||
|
||||
if (!m_handlerWorkstationLogout->init())
|
||||
{
|
||||
ERROR_LOG() << "Initialisation of HandlerWorkstationLogout failed.";
|
||||
ERROR_LOG(m_logger) << "Initialisation of HandlerWorkstationLogout failed.";
|
||||
return false;
|
||||
}
|
||||
DEBUG_LOG() << "Initialisation HandlerWorkstationLogout succesful.";
|
||||
DEBUG_LOG(m_logger) << "Initialisation HandlerWorkstationLogout succesful.";
|
||||
|
||||
// Asset
|
||||
m_handlerAsset = std::make_shared<HandlerAsset>(this);
|
||||
DEBUG_LOG() << "Reset HandlerAsset succesful.";
|
||||
DEBUG_LOG(m_logger) << "Reset HandlerAsset succesful.";
|
||||
|
||||
if (!m_handlerAsset->init())
|
||||
{
|
||||
ERROR_LOG() << "Initialisation of HandlerAsset failed.";
|
||||
ERROR_LOG(m_logger) << "Initialisation of HandlerAsset failed.";
|
||||
return false;
|
||||
}
|
||||
DEBUG_LOG() << "Initialisation HandlerAsset succesful.";
|
||||
DEBUG_LOG(m_logger) << "Initialisation HandlerAsset succesful.";
|
||||
|
||||
// Location
|
||||
m_handlerLocation = std::make_shared<HandlerLocation>(this);
|
||||
DEBUG_LOG() << "Reset HandlerLocation succesful.";
|
||||
DEBUG_LOG(m_logger) << "Reset HandlerLocation succesful.";
|
||||
|
||||
if (!m_handlerLocation->init())
|
||||
{
|
||||
ERROR_LOG() << "Initialisation of HandlerLocation failed.";
|
||||
ERROR_LOG(m_logger) << "Initialisation of HandlerLocation failed.";
|
||||
return false;
|
||||
}
|
||||
DEBUG_LOG() << "Initialisation HandlerLocation succesful.";
|
||||
DEBUG_LOG(m_logger) << "Initialisation HandlerLocation succesful.";
|
||||
|
||||
// RelayInfo
|
||||
m_handlerRelayInfo = std::make_shared<HandlerRelayInfo>(this);
|
||||
DEBUG_LOG() << "Reset HandlerRelayInfo succesful.";
|
||||
DEBUG_LOG(m_logger) << "Reset HandlerRelayInfo succesful.";
|
||||
|
||||
if (!m_handlerRelayInfo->init())
|
||||
{
|
||||
ERROR_LOG() << "Initialisation of HandlerRelayInfo failed.";
|
||||
ERROR_LOG(m_logger) << "Initialisation of HandlerRelayInfo failed.";
|
||||
return false;
|
||||
}
|
||||
DEBUG_LOG() << "Initialisation HandlerRelayInfo succesful.";
|
||||
DEBUG_LOG(m_logger) << "Initialisation HandlerRelayInfo succesful.";
|
||||
|
||||
// WebSocketServer
|
||||
m_handlerWebSocket = std::make_shared<WebSocketInterface::WebSocketInterfaceHandler>(this);
|
||||
DEBUG_LOG() << "Reset WebSocketInterfaceHandler succesful.";
|
||||
DEBUG_LOG(m_logger) << "Reset WebSocketInterfaceHandler succesful.";
|
||||
if (!m_handlerWebSocket->init())
|
||||
{
|
||||
ERROR_LOG() << "Initialisation WebSocketInterfaceHandler failed.";
|
||||
ERROR_LOG(m_logger) << "Initialisation WebSocketInterfaceHandler failed.";
|
||||
return false;
|
||||
}
|
||||
m_ddsHandler->pacemaker()->addPort(m_handlerWebSocket->serverWebSocketPort(), Core::PortType::WebSocketServer);
|
||||
DEBUG_LOG() << "Initialisation WebSocketInterfaceHandler succesful.";
|
||||
DEBUG_LOG(m_logger) << "Initialisation WebSocketInterfaceHandler succesful.";
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user