Adds immediate migration results in progress
This commit is contained in:
2102 files changed
+17482
-15071
No files matched your search
+19
-19
@@ -38,7 +38,7 @@ bool HandlerArtillerieSound::init()
|
||||
|
||||
if (Settings::cesPlayArtillerieSounds())
|
||||
{
|
||||
DEBUG_LOG() << "init with Artillerie-Sounds";
|
||||
DEBUG_LOG(m_logger) << "init with Artillerie-Sounds";
|
||||
auto dtcAes = m_ddsHandler->dtcAes();
|
||||
|
||||
dtcAes->enableExplosionSingle();
|
||||
@@ -50,7 +50,7 @@ bool HandlerArtillerieSound::init()
|
||||
this, &HandlerArtillerieSound::onTechnicalAreaChanged);
|
||||
}
|
||||
else
|
||||
DEBUG_LOG() << "init without Artillerie-Sounds";
|
||||
DEBUG_LOG(m_logger) << "init without Artillerie-Sounds";
|
||||
return true;
|
||||
} // end of init()
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -68,7 +68,7 @@ void HandlerArtillerieSound::onExplosionSingleChanged(const AreaEffectSimulation
|
||||
|
||||
if (data.effectStateId() == AreaEffectSimulation::AesEffectState_def::EsRemoved)
|
||||
{
|
||||
DEBUG_LOG() << "Remove SingleExplosion";
|
||||
DEBUG_LOG(m_logger) << "Remove SingleExplosion";
|
||||
m_explosionSingleState.remove(data.id());
|
||||
return;
|
||||
}
|
||||
@@ -77,28 +77,28 @@ void HandlerArtillerieSound::onExplosionSingleChanged(const AreaEffectSimulation
|
||||
m_explosionSingleState.value(data.id()) == AreaEffectSimulation::AesEffectState_def::EsFired) &&
|
||||
data.effectStateId() == AreaEffectSimulation::AesEffectState_def::EsActivated)
|
||||
{
|
||||
DEBUG_LOG() << "Handle SingleExplosion";
|
||||
DEBUG_LOG(m_logger) << "Handle SingleExplosion";
|
||||
handleExplosion = true;
|
||||
}
|
||||
m_explosionSingleState.insert(data.id(), data.effectStateId());
|
||||
|
||||
|
||||
DEBUG_LOG() << "Got ExplosionSingle State=" << data.effectStateId()
|
||||
DEBUG_LOG(m_logger) << "Got ExplosionSingle State=" << data.effectStateId()
|
||||
<< " id=" << data.id();
|
||||
if (handleExplosion)
|
||||
{
|
||||
DEBUG_LOG() << "Handle ExplosionSingle (EsActivated) HandlerArtillerieSound";
|
||||
DEBUG_LOG(m_logger) << "Handle ExplosionSingle (EsActivated) HandlerArtillerieSound";
|
||||
|
||||
auto assetPositions = m_handlerBuildingData->getAssetPositions();
|
||||
///////////////////////////////////////////////////////////////////
|
||||
/// Play Sound to each EGCU and OSGU volume depends on distance
|
||||
///////////////////////////////////////////////////////////////////
|
||||
INFO_LOG() << "printAssetPositions: ";
|
||||
INFO_LOG(m_logger) << "printAssetPositions: ";
|
||||
QHashIterator<int, CentralEffectSimulation::HandlerBuildingData::AssetPosition> i(assetPositions);
|
||||
while (i.hasNext())
|
||||
{
|
||||
i.next();
|
||||
INFO_LOG() << "printAssetPositions: "
|
||||
INFO_LOG(m_logger) << "printAssetPositions: "
|
||||
<< i.key() << ": " << i.value().structureElementId
|
||||
<< " type = " << i.value().mountingPointType
|
||||
<< " hostname =" << i.value().hostname
|
||||
@@ -113,7 +113,7 @@ void HandlerArtillerieSound::onExplosionSingleChanged(const AreaEffectSimulation
|
||||
const qreal distanceThreshold = Settings::cesDistanceThreshold(); // [m]
|
||||
const qreal factor = Settings::cesFactor();
|
||||
const qreal cesReduceFactor = Settings::cesReduceFactor();
|
||||
INFO_LOG() << "Distance to Explosion =" << distance
|
||||
INFO_LOG(m_logger) << "Distance to Explosion =" << distance
|
||||
<< " hostname =" << i.value().hostname
|
||||
<< " distanceThreshold=" << distanceThreshold
|
||||
<< " factor=" << factor;
|
||||
@@ -138,13 +138,13 @@ void HandlerArtillerieSound::playSound(QString &user, QString &passwd, const QSt
|
||||
url.setUrl(request);
|
||||
url.setUserName(user);
|
||||
url.setPassword(passwd);
|
||||
DEBUG_LOG() << "startRequest: " << url.toString();
|
||||
DEBUG_LOG(m_logger) << "startRequest: " << url.toString();
|
||||
startRequest(url);
|
||||
}
|
||||
|
||||
void HandlerArtillerieSound::startRequest(const QUrl &requestedUrl)
|
||||
{
|
||||
DEBUG_LOG() << "startRequest: " << requestedUrl.toString();
|
||||
DEBUG_LOG(m_logger) << "startRequest: " << requestedUrl.toString();
|
||||
m_httpRequestAborted = false;
|
||||
auto reply = m_qnam.get(QNetworkRequest(requestedUrl));
|
||||
connect(reply, &QNetworkReply::finished, this, &HandlerArtillerieSound::httpFinished);
|
||||
@@ -153,14 +153,14 @@ void HandlerArtillerieSound::startRequest(const QUrl &requestedUrl)
|
||||
|
||||
void HandlerArtillerieSound::httpFinished()
|
||||
{
|
||||
DEBUG_LOG() << "httpFinished";
|
||||
DEBUG_LOG(m_logger) << "httpFinished";
|
||||
auto reply = qobject_cast<QNetworkReply *>(sender());
|
||||
if (!reply)
|
||||
return;
|
||||
|
||||
if (m_httpRequestAborted)
|
||||
{
|
||||
ERROR_LOG() << "httpRequestAborted";
|
||||
ERROR_LOG(m_logger) << "httpRequestAborted";
|
||||
reply->deleteLater();
|
||||
return;
|
||||
}
|
||||
@@ -169,7 +169,7 @@ void HandlerArtillerieSound::httpFinished()
|
||||
{
|
||||
QNetworkRequest request = reply->request();
|
||||
QUrl url = request.url();
|
||||
ERROR_LOG() << "reply->error: " << reply->errorString()
|
||||
ERROR_LOG(m_logger) << "reply->error: " << reply->errorString()
|
||||
<< " host=" << url.host()
|
||||
<< " query='" << url.query()
|
||||
<< "' '" << qUtf8Printable(url.toString()) << "'";
|
||||
@@ -182,7 +182,7 @@ void HandlerArtillerieSound::httpFinished()
|
||||
|
||||
//parse the reply JSON and display result in the UI
|
||||
const QByteArray json(reply->readAll());
|
||||
DEBUG_LOG() << "Sucess " << json;
|
||||
DEBUG_LOG(m_logger) << "Sucess " << json;
|
||||
|
||||
reply->deleteLater();
|
||||
}
|
||||
@@ -199,7 +199,7 @@ void HandlerArtillerieSound::onTechnicalAreaChanged(const AreaEffectSimulation::
|
||||
|
||||
if (data.effectStateId() == AreaEffectSimulation::AesEffectState_def::EsRemoved)
|
||||
{
|
||||
DEBUG_LOG() << "Remove TechnicalArea";
|
||||
DEBUG_LOG(m_logger) << "Remove TechnicalArea";
|
||||
m_technicalAreas.remove(data.id());
|
||||
return;
|
||||
}
|
||||
@@ -207,14 +207,14 @@ void HandlerArtillerieSound::onTechnicalAreaChanged(const AreaEffectSimulation::
|
||||
{
|
||||
int zone = -1;
|
||||
m_technicalAreas.insert(data.id(), data);
|
||||
DEBUG_LOG() << "Handle TechnicalArea HandlerArtillerieSound id=" << data.id();
|
||||
DEBUG_LOG(m_logger) << "Handle TechnicalArea HandlerArtillerieSound id=" << data.id();
|
||||
QPointF cornerButtomLeft = CentralEffectSimulation::geographic2Utm(data.area().cornerBottomLeft(), &zone);
|
||||
qreal x = cornerButtomLeft.x() + data.area().width() / 2;
|
||||
qreal y = cornerButtomLeft.y() + data.area().height() / 2;
|
||||
QPointF center(x, y);
|
||||
DEBUG_LOG() << "Handle TechnicalArea HandlerArtillerieSound cornerButtomLeft = " << cornerButtomLeft.x() << "/" << cornerButtomLeft.y()
|
||||
DEBUG_LOG(m_logger) << "Handle TechnicalArea HandlerArtillerieSound cornerButtomLeft = " << cornerButtomLeft.x() << "/" << cornerButtomLeft.y()
|
||||
<< " zone=" << zone;
|
||||
DEBUG_LOG() << "Handle TechnicalArea HandlerArtillerieSound center = " << center.x() << "/" << center.y()
|
||||
DEBUG_LOG(m_logger) << "Handle TechnicalArea HandlerArtillerieSound center = " << center.x() << "/" << center.y()
|
||||
<< " zone=" << zone;
|
||||
}
|
||||
} // onTechnicalAreaChanged
|
||||
|
||||
+3
-3
@@ -61,7 +61,7 @@ bool CesArtillerySoundInterfaceImpl::init(int domainId, int exerciseId)
|
||||
{
|
||||
m_domainId = domainId;
|
||||
m_exerciseId = exerciseId;
|
||||
INFO_LOG() << "CentralEffectSimulation2DInterfaceImpl::init()"
|
||||
INFO_LOG(m_logger) << "CentralEffectSimulation2DInterfaceImpl::init()"
|
||||
<< " m_domainId=" << m_domainId
|
||||
<< " m_exerciseId=" << m_exerciseId;
|
||||
|
||||
@@ -74,11 +74,11 @@ bool CesArtillerySoundInterfaceImpl::init(int domainId, int exerciseId)
|
||||
|
||||
if (!m_handlerArtillerieSound->init())
|
||||
{
|
||||
ERROR_LOG() << "Initialisation m_handlerArtillerieSound failed.";
|
||||
ERROR_LOG(m_logger) << "Initialisation m_handlerArtillerieSound failed.";
|
||||
return false;
|
||||
}
|
||||
|
||||
INFO_LOG() << "CentralEffectSimulation2DInterfaceImpl::init() return true";
|
||||
INFO_LOG(m_logger) << "CentralEffectSimulation2DInterfaceImpl::init() return true";
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
+1
@@ -78,6 +78,7 @@ private Q_SLOTS:
|
||||
bool init(int domainId, int exerciseId) override;
|
||||
private:
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
private:
|
||||
CentralEffectSimulation::Plugin::DataProvider *m_pdp;
|
||||
std::shared_ptr<DDSConnector::DdsConnector> m_ddsConnector;
|
||||
|
||||
Reference in new issue
Block a user