Adds immediate migration results in progress
This commit is contained in:
2102 files changed
+17482
-15071
No files matched your search
+20
-21
@@ -15,8 +15,7 @@
|
||||
|
||||
using namespace VideoOverlayManagement;
|
||||
|
||||
MainHandler::MainHandler(QObject *parent)
|
||||
: QObject(parent)
|
||||
MainHandler::MainHandler(QObject *parent) : QObject(parent)
|
||||
, m_exerciseId(0)
|
||||
, m_avsIf(new AvsInterface(true, this))
|
||||
, m_avsConnectionState(AvsIfConnectionState::Undefined)
|
||||
@@ -26,8 +25,8 @@ MainHandler::MainHandler(QObject *parent)
|
||||
, m_handlerOverlays(nullptr)
|
||||
, m_checkConnectTimer(new QTimer(this))
|
||||
, m_keepAliveTriggerTimer(new QTimer(this))
|
||||
, m_bAvsSocketWarnedOnce(false)
|
||||
{
|
||||
, m_bAvsSocketWarnedOnce(false),
|
||||
m_logger(NGL::NGLLoggerBootstrap::getLogger()) {
|
||||
} // end of ctor()
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
@@ -39,14 +38,14 @@ MainHandler::~MainHandler()
|
||||
|
||||
bool MainHandler::init(int domainId, int exerciseId)
|
||||
{
|
||||
INFO_LOG() << "Start VideoOverlayManagement MainHandler.";
|
||||
INFO_LOG(m_logger) << "Start VideoOverlayManagement MainHandler.";
|
||||
|
||||
m_exerciseId = exerciseId;
|
||||
|
||||
// init AVS-Interface
|
||||
QString hostName = Settings::getAvsHostname();
|
||||
quint16 port = Settings::getAvsAvaPort();
|
||||
INFO_LOG() << "Init AVS-Interface Hostname/Ip:" << hostName
|
||||
INFO_LOG(m_logger) << "Init AVS-Interface Hostname/Ip:" << hostName
|
||||
<< " Port: " << port;
|
||||
|
||||
m_avsIf->start(hostName, port);
|
||||
@@ -68,7 +67,7 @@ bool MainHandler::init(int domainId, int exerciseId)
|
||||
m_ddsHandler.reset(new 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;
|
||||
@@ -79,7 +78,7 @@ bool MainHandler::init(int domainId, int exerciseId)
|
||||
|
||||
if (!m_handlerParticipantData->init())
|
||||
{
|
||||
ERROR_LOG() << "Initialisation HandlerPlayerData failed.";
|
||||
ERROR_LOG(m_logger) << "Initialisation HandlerPlayerData failed.";
|
||||
m_ddsHandler->pacemaker()->setNewState(Core::RunningState::StartingError);
|
||||
return false;
|
||||
}
|
||||
@@ -89,7 +88,7 @@ bool MainHandler::init(int domainId, int exerciseId)
|
||||
|
||||
if (!m_handlerInfrastructureData->init(m_exerciseId))
|
||||
{
|
||||
ERROR_LOG() << "Initialisation HandlerInfrastructreData failed.";
|
||||
ERROR_LOG(m_logger) << "Initialisation HandlerInfrastructreData failed.";
|
||||
m_ddsHandler->pacemaker()->setNewState(Core::RunningState::StartingError);
|
||||
return false;
|
||||
}
|
||||
@@ -99,7 +98,7 @@ bool MainHandler::init(int domainId, int exerciseId)
|
||||
this, &MainHandler::onTryToInitOverlayHandler);
|
||||
m_checkConnectTimer->start(1000);
|
||||
|
||||
INFO_LOG() << "VOM Handler initialized. (Connection to AVS may be still pending) ";
|
||||
INFO_LOG(m_logger) << "VOM Handler initialized. (Connection to AVS may be still pending) ";
|
||||
m_ddsHandler->pacemaker()->setNewState(Core::RunningState::Starting);
|
||||
|
||||
return true;
|
||||
@@ -114,7 +113,7 @@ bool MainHandler::onTryToInitOverlayHandler()
|
||||
if (!m_bAvsSocketWarnedOnce)
|
||||
{
|
||||
m_bAvsSocketWarnedOnce = true;
|
||||
WARNING_LOG() << "MainHandler::onTryToInitOverlayHandler()"
|
||||
WARNING_LOG(m_logger) << "MainHandler::onTryToInitOverlayHandler()"
|
||||
<< " Wait for AvsIfConnectionState::Connected... ";
|
||||
}
|
||||
return false;
|
||||
@@ -128,12 +127,12 @@ bool MainHandler::onTryToInitOverlayHandler()
|
||||
|
||||
if (!m_handlerOverlays->init())
|
||||
{
|
||||
ERROR_LOG() << "Initialisation HandlerOverlays failed.";
|
||||
ERROR_LOG(m_logger) << "Initialisation HandlerOverlays failed.";
|
||||
m_ddsHandler->pacemaker()->setNewState(Core::RunningState::StoppedError);
|
||||
return false;
|
||||
}
|
||||
|
||||
INFO_LOG() << "VOM Handler initialized. (Connection to AVS established) ";
|
||||
INFO_LOG(m_logger) << "VOM Handler initialized. (Connection to AVS established) ";
|
||||
m_ddsHandler->pacemaker()->setNewState(Core::RunningState::Running);
|
||||
|
||||
return true;
|
||||
@@ -145,7 +144,7 @@ void MainHandler::onAvsIfConnectionState(AvsIfConnectionState state)
|
||||
switch (state)
|
||||
{
|
||||
case AvsIfConnectionState::Connected:
|
||||
INFO_LOG() << "AvsIfConnectionState::Connected ... start keepAliveTriggerTimer";
|
||||
INFO_LOG(m_logger) << "AvsIfConnectionState::Connected ... start keepAliveTriggerTimer";
|
||||
m_keepAliveTriggerTimer->start(Settings::getAvsKeepAliveTriggerRequestTime());
|
||||
break;
|
||||
case AvsIfConnectionState::Disconnected:
|
||||
@@ -155,13 +154,13 @@ void MainHandler::onAvsIfConnectionState(AvsIfConnectionState state)
|
||||
m_keepAliveTriggerTimer->stop();
|
||||
break;
|
||||
case AvsIfConnectionState::ConnectionError:
|
||||
ERROR_LOG() << "AvsIfConnectionState::ConnectionError !";
|
||||
ERROR_LOG(m_logger) << "AvsIfConnectionState::ConnectionError !";
|
||||
m_keepAliveTriggerTimer->stop();
|
||||
m_ddsHandler->pacemaker()->setNewState(Core::RunningState::StoppedError);
|
||||
break;
|
||||
case AvsIfConnectionState::Undefined:
|
||||
default:
|
||||
WARNING_LOG() << "Undefined AvsIfConnectionState !";
|
||||
WARNING_LOG(m_logger) << "Undefined AvsIfConnectionState !";
|
||||
break;
|
||||
}
|
||||
} // end of onAvsIfConnectionState()
|
||||
@@ -173,17 +172,17 @@ void MainHandler::onAvsCmdState(AvsCmdState state)
|
||||
switch (state)
|
||||
{
|
||||
case AvsCmdState::Ok:
|
||||
INFO_LOG() << "AvsCmdState::Ok";
|
||||
INFO_LOG(m_logger) << "AvsCmdState::Ok";
|
||||
bOk = true;
|
||||
break;
|
||||
case AvsCmdState::BadArguments:
|
||||
WARNING_LOG() << "AvsCmdState::BadArguments";
|
||||
WARNING_LOG(m_logger) << "AvsCmdState::BadArguments";
|
||||
break;
|
||||
case AvsCmdState::CommandNotStateValid:
|
||||
WARNING_LOG() << "AvsCmdState::CommandNotStateValid";
|
||||
WARNING_LOG(m_logger) << "AvsCmdState::CommandNotStateValid";
|
||||
break;
|
||||
case AvsCmdState::KeepAlive:
|
||||
DEBUG_LOG() << "AvsCmdState::KeepAlive";
|
||||
DEBUG_LOG(m_logger) << "AvsCmdState::KeepAlive";
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -199,7 +198,7 @@ void MainHandler::onAvsCmdState(AvsCmdState state)
|
||||
void MainHandler::onAvsKeepAliveTimeout()
|
||||
{
|
||||
// ToDo: Fehlermeldung an ServiceManagement senden
|
||||
WARNING_LOG() << "AVS KeepAlive timeout !";
|
||||
WARNING_LOG(m_logger) << "AVS KeepAlive timeout !";
|
||||
} // end of onAvsKeepAliveTimeout()
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
||||
Reference in new issue
Block a user