Adds immediate migration results in progress

This commit is contained in:
torsten committed 2026-08-19 11:18:24 +02:00
1 parent 8453e104c5
commit 3bb6e89496
2102 files changed
+17482 -15071

No files matched your search

@@ -17,16 +17,16 @@ namespace EffectShowManagement
DdsHandler::DdsHandler(const std::shared_ptr<DDSConnector::DdsConnector> &ddsConnector)
: m_ddsConnector(ddsConnector)
{
DEBUG_LOG() << "DdsHandler(" << m_ddsConnector->getDomainId() << ") for partition: " << m_ddsConnector->getDefaultPartition();
DEBUG_LOG(m_logger) << "DdsHandler(" << m_ddsConnector->getDomainId() << ") for partition: " << m_ddsConnector->getDefaultPartition();
}
bool DdsHandler::init(const QStringList &qosFileList)
{
INFO_LOG() << "--- StartEffectShowManagement DDSHandler.";
INFO_LOG(m_logger) << "--- StartEffectShowManagement DDSHandler.";
if (!m_ddsConnector->init(qosFileList))
{
ERROR_LOG() << "Error initializing dds connections - aborting";
ERROR_LOG(m_logger) << "Error initializing dds connections - aborting";
return false;
}
@@ -44,13 +44,13 @@ bool DdsHandler::init(const QStringList &qosFileList)
if (!m_ddsDts->enableAll())
{
ERROR_LOG() << "Could not Dts enableAll";
ERROR_LOG(m_logger) << "Could not Dts enableAll";
return false;
}
if (!m_ddsFts->enableAll())
{
ERROR_LOG() << "Could not Fts enableAll";
ERROR_LOG(m_logger) << "Could not Fts enableAll";
return false;
}
@@ -58,18 +58,18 @@ bool DdsHandler::init(const QStringList &qosFileList)
m_dtcAes = AreaEffectSimulation::Interface::Dtc::create(m_ddsConnector);
if (!m_dtcAes->enableExplosionArea())
{
ERROR_LOG() << "Could not initialize enableExplosionArea data topic client";
ERROR_LOG(m_logger) << "Could not initialize enableExplosionArea data topic client";
return false;
}
if (!m_dtcAes->enableExplosionSingle())
{
ERROR_LOG() << "Could not initialize enableExplosionArea data topic client";
ERROR_LOG(m_logger) << "Could not initialize enableExplosionArea data topic client";
return false;
}
if (!m_dtcAes->enableMineArea())
{
ERROR_LOG() << "Could not initialize enableMineArea data topic client";
ERROR_LOG(m_logger) << "Could not initialize enableMineArea data topic client";
return false;
}
@@ -78,7 +78,7 @@ bool DdsHandler::init(const QStringList &qosFileList)
m_ftcAes = AreaEffectSimulation::Interface::Ftc::create(m_ddsConnector);
if (!m_ftcAes->enableSetAesItemEffectorState(true))
{
ERROR_LOG() << "Could not initialize enableSetAesItemEffectorState data topic client";
ERROR_LOG(m_logger) << "Could not initialize enableSetAesItemEffectorState data topic client";
return false;
}
@@ -87,13 +87,13 @@ bool DdsHandler::init(const QStringList &qosFileList)
if (!m_dtcPpm->enableParticipant())
{
ERROR_LOG() << "Could not initialize Participant data topic client";
ERROR_LOG(m_logger) << "Could not initialize Participant data topic client";
return false;
}
if (!m_dtcPpm->enableType())
{
ERROR_LOG() << "Could not initialize Participant type data topic client";
ERROR_LOG(m_logger) << "Could not initialize Participant type data topic client";
return false;
}
m_dtcPpm->waitForHistoricalDataType();
@@ -103,7 +103,7 @@ bool DdsHandler::init(const QStringList &qosFileList)
if (!m_dtcPdm->enableChargeType())
{
ERROR_LOG() << "Error initializing ProjectDataManagement DTC";
ERROR_LOG(m_logger) << "Error initializing ProjectDataManagement DTC";
return false;
}
@@ -112,7 +112,7 @@ bool DdsHandler::init(const QStringList &qosFileList)
if (!m_dtcMdm->enableMeteoData())
{
ERROR_LOG() << "Error initializing MeteoDataManagement DTC";
ERROR_LOG(m_logger) << "Error initializing MeteoDataManagement DTC";
return false;
}
@@ -121,19 +121,19 @@ bool DdsHandler::init(const QStringList &qosFileList)
if (!m_dtcTab->enableFireSmokeMarkerData())
{
ERROR_LOG() << "Error initializing TrainingAreaBase DTC";
ERROR_LOG(m_logger) << "Error initializing TrainingAreaBase DTC";
return false;
}
m_ftcTab = TrainingAreaBase::Interface::Ftc::create(m_ddsConnector);
if (!m_ftcTab->enableSendFireSmokeMarkerData())
{
ERROR_LOG() << "Error initializing TrainingAreaBase FTC";
ERROR_LOG(m_logger) << "Error initializing TrainingAreaBase FTC";
return false;
}
if (!m_ftcTab->enableAdlerFqFb())
{
ERROR_LOG() << "Error initializing TrainingAreaBase FTC";
ERROR_LOG(m_logger) << "Error initializing TrainingAreaBase FTC";
return false;
}
@@ -65,6 +65,7 @@ public:
qint64 currentPartitionTime() const;
private:
NGL::INGLLogger &m_logger;
std::shared_ptr<DDSConnector::DdsConnector> m_ddsConnector;
std::shared_ptr<Core::TopicLockMaster> m_topicLockMaster;
std::shared_ptr<Core::Interface::Dtc> m_dtcCore;
@@ -15,11 +15,10 @@ const static int DEFAULT_EFFECT_DURATION = 777777;
namespace EffectShowManagement
{
EffectShowEffectCluster::EffectShowEffectCluster(const AreaEffectSimulation::EffectCluster &effectCluster,
const std::shared_ptr<HandlerPdmData> &handlerPdmData)
: m_effectCluster(effectCluster)
const std::shared_ptr<HandlerPdmData> &handlerPdmData) : m_effectCluster(effectCluster)
, m_handlerPdmData(handlerPdmData)
, m_numOfEffectShows(0)
{
, m_numOfEffectShows(0),
m_logger(NGL::NGLLoggerBootstrap::getLogger()) {
}
//=============================================================================
@@ -82,7 +81,7 @@ Database::EsmEffectShow EffectShowEffectCluster::getEffectShow(int idx)
if (esmEffectShow.shotsPerVolley <= 0)
esmEffectShow.shotsPerVolley = 1;
DEBUG_LOG() << "recalc effectDuration ";
DEBUG_LOG(m_logger) << "recalc effectDuration ";
if (m_effectCluster.effectDuration() == DEFAULT_EFFECT_DURATION)
{
@@ -94,7 +93,7 @@ Database::EsmEffectShow EffectShowEffectCluster::getEffectShow(int idx)
{
//use default
esmEffectShow.duration = Settings::getDefaultCadence() * esmEffectShow.shotsPerVolley;
DEBUG_LOG() << " recalc effectDuration use default value as fireoncommand " << esmEffectShow.duration ;
DEBUG_LOG(m_logger) << " recalc effectDuration use default value as fireoncommand " << esmEffectShow.duration ;
}
else
{
@@ -102,13 +101,13 @@ Database::EsmEffectShow EffectShowEffectCluster::getEffectShow(int idx)
if (m_effectCluster.effectors().size()) //should always be there!
{
esmEffectShow.duration = m_effectCluster.effectors().at(0).chargeAmount() * m_handlerPdmData.get()->getCadence(m_effectCluster.effectors().at(0).chargeStruct().chargeTypeId());
DEBUG_LOG() << " recalc effectDuration use cadence value " << esmEffectShow.duration << " effector shots: " << m_effectCluster.effectors().at(0).chargeAmount() << " cadence " << m_handlerPdmData.get()->getCadence(m_effectCluster.effectors().at(0).chargeStruct().chargeTypeId());
DEBUG_LOG(m_logger) << " recalc effectDuration use cadence value " << esmEffectShow.duration << " effector shots: " << m_effectCluster.effectors().at(0).chargeAmount() << " cadence " << m_handlerPdmData.get()->getCadence(m_effectCluster.effectors().at(0).chargeStruct().chargeTypeId());
}
}
}
else
{
DEBUG_LOG() << "Use effectDuration directly ";
DEBUG_LOG(m_logger) << "Use effectDuration directly ";
esmEffectShow.duration = m_effectCluster.effectDuration();
}
esmEffectShow.lowerLeftPosition = lowerLeftPosRotated.geographic();
@@ -117,7 +116,7 @@ Database::EsmEffectShow EffectShowEffectCluster::getEffectShow(int idx)
esmEffectShow.areaRotation = m_effectCluster.area().rotation() + 90;
DEBUG_LOG() << "\nWidth: " << m_effectCluster.area().width() << " Height: " << m_effectCluster.area().height()
DEBUG_LOG(m_logger) << "\nWidth: " << m_effectCluster.area().width() << " Height: " << m_effectCluster.area().height()
<< "\nRotated LL Pos: " << lowerLeftPosRotated.mgrs()
<< "\nduration: " << esmEffectShow.duration
<< "\nRotated Center Pos: " << centerPosRotated.mgrs()
@@ -155,7 +154,7 @@ Database::EsmEffectShow EffectShowEffectCluster::getEffectShow(int idx)
esmEffectShow.areaDepth = m_effectCluster.area().height();
esmEffectShow.areaRotation = m_effectCluster.area().rotation() + 90;
DEBUG_LOG() << "\nWidth: " << m_effectCluster.area().width() << " Height: " << m_effectCluster.area().height()
DEBUG_LOG(m_logger) << "\nWidth: " << m_effectCluster.area().width() << " Height: " << m_effectCluster.area().height()
<< "\nRotated LL Pos: " << lowerLeftPosRotated.mgrs()
<< "\nRotated Center Pos: " << centerPosRotated.mgrs()
<< "\nSide x,y: " << m_effectCluster.area().width() << " , " << m_effectCluster.area().height();
@@ -167,12 +166,12 @@ Database::EsmEffectShow EffectShowEffectCluster::getEffectShow(int idx)
void EffectShowEffectCluster::updateEffectShow(Database::EsmEffectShow &data)
{
DEBUG_LOG() << "update EffectSHow for (" << data.id << ")";
DEBUG_LOG(m_logger) << "update EffectSHow for (" << data.id << ")";
data.nameAreaEfffectSimulation = QString::fromStdString(m_effectCluster.name());
data.startTime = m_effectCluster.effectStart().is_set() ? m_effectCluster.effectStart().get() : 0;
DEBUG_LOG() << "Recalc effectDuration ";
DEBUG_LOG(m_logger) << "Recalc effectDuration ";
if (m_effectCluster.effectDuration() == DEFAULT_EFFECT_DURATION)
{
@@ -184,7 +183,7 @@ void EffectShowEffectCluster::updateEffectShow(Database::EsmEffectShow &data)
{
//use default
data.duration = Settings::getDefaultCadence() * data.shotsPerVolley;
DEBUG_LOG() << " recalc effectDuration use default value as fireoncommand " << data.duration ;
DEBUG_LOG(m_logger) << " recalc effectDuration use default value as fireoncommand " << data.duration ;
}
else
{
@@ -192,13 +191,13 @@ void EffectShowEffectCluster::updateEffectShow(Database::EsmEffectShow &data)
if (m_effectCluster.effectors().size()) //should always be there!
{
data.duration = m_effectCluster.effectors().at(0).chargeAmount() * m_handlerPdmData.get()->getCadence(m_effectCluster.effectors().at(0).chargeStruct().chargeTypeId());
DEBUG_LOG() << " recalc effectDuration use cadence value " << data.duration << " effector shots: " << m_effectCluster.effectors().at(0).chargeAmount() << " cadence " << m_handlerPdmData.get()->getCadence(m_effectCluster.effectors().at(0).chargeStruct().chargeTypeId());
DEBUG_LOG(m_logger) << " recalc effectDuration use cadence value " << data.duration << " effector shots: " << m_effectCluster.effectors().at(0).chargeAmount() << " cadence " << m_handlerPdmData.get()->getCadence(m_effectCluster.effectors().at(0).chargeStruct().chargeTypeId());
}
}
}
else
{
DEBUG_LOG() << "Use effectDuration directly ";
DEBUG_LOG(m_logger) << "Use effectDuration directly ";
data.duration = m_effectCluster.effectDuration();
}
@@ -71,6 +71,7 @@ public:
int getShotsPerArea() const;
private:
NGL::INGLLogger &m_logger;
/**
* @brief Calculates the square of the each effect area.
*/
@@ -114,6 +115,7 @@ private:
double rotationRad() const;
private:
NGL::INGLLogger &m_logger;
AreaEffectSimulation::EffectCluster const m_effectCluster;
std::shared_ptr<HandlerPdmData> m_handlerPdmData;
int m_numOfEffectShows;
@@ -10,11 +10,10 @@
namespace EffectShowManagement
{
EffectShowExplosionArea::EffectShowExplosionArea(const AreaEffectSimulation::ExplosionArea &explosionArea,
const std::shared_ptr<HandlerPdmData> &handlerPdmData)
: m_explosionArea(explosionArea)
const std::shared_ptr<HandlerPdmData> &handlerPdmData) : m_explosionArea(explosionArea)
, m_handlerPdmData(handlerPdmData)
, m_numOfEffectShows(0)
{
, m_numOfEffectShows(0),
m_logger(NGL::NGLLoggerBootstrap::getLogger()) {
}
//=============================================================================
@@ -82,7 +81,7 @@ Database::EsmEffectShow EffectShowExplosionArea::getEffectShow(int idx)
esmEffectShow.areaRotation = m_explosionArea.area().rotation() + 90;
DEBUG_LOG() << "\nWidth: " << m_explosionArea.area().width() << " Height: " << m_explosionArea.area().height()
DEBUG_LOG(m_logger) << "\nWidth: " << m_explosionArea.area().width() << " Height: " << m_explosionArea.area().height()
<< "\nRotated LL Pos: " << lowerLeftPosRotated.mgrs()
<< "\nRotated Center Pos: " << centerPosRotated.mgrs()
<< "\nOffset x,y: " << x_off << " , " << y_off
@@ -119,7 +118,7 @@ Database::EsmEffectShow EffectShowExplosionArea::getEffectShow(int idx)
esmEffectShow.areaDepth = m_explosionArea.area().height();
esmEffectShow.areaRotation = m_explosionArea.area().rotation() + 90;
DEBUG_LOG() << "\nWidth: " << m_explosionArea.area().width() << " Height: " << m_explosionArea.area().height()
DEBUG_LOG(m_logger) << "\nWidth: " << m_explosionArea.area().width() << " Height: " << m_explosionArea.area().height()
<< "\nRotated LL Pos: " << lowerLeftPosRotated.mgrs()
<< "\nRotated Center Pos: " << centerPosRotated.mgrs()
<< "\nSide x,y: " << m_explosionArea.area().width() << " , " << m_explosionArea.area().height();
@@ -157,7 +156,7 @@ void EffectShowExplosionArea::calculateSquare()
else
m_numOfEffectShows = m_areasWidth.numOfAreas * m_areasDepth.numOfAreas;
DEBUG_LOG() << "Calc Square poslef " << m_lowerLeftPos.x << " " << m_lowerLeftPos.y << " witdh" << m_areasWidth.sideLength1 << " depth " << m_areasDepth.sideLength1 << " num of Effect Shows " << m_numOfEffectShows;
DEBUG_LOG(m_logger) << "Calc Square poslef " << m_lowerLeftPos.x << " " << m_lowerLeftPos.y << " witdh" << m_areasWidth.sideLength1 << " depth " << m_areasDepth.sideLength1 << " num of Effect Shows " << m_numOfEffectShows;
}
//static ----------------------------------------------------------------------
LtsCoordTrans::UtmCoordinate EffectShowExplosionArea::rotate(const LtsCoordTrans::UtmCoordinate &p, const LtsCoordTrans::UtmCoordinate &c, double angle)
@@ -73,6 +73,7 @@ public:
int getShotsPerArea() const;
private:
NGL::INGLLogger &m_logger;
/**
* @brief Calculates the square of the each effect area.
*/
@@ -116,6 +117,7 @@ private:
double rotationRad() const;
private:
NGL::INGLLogger &m_logger;
AreaEffectSimulation::ExplosionArea const m_explosionArea;
std::shared_ptr<HandlerPdmData> m_handlerPdmData;
int m_numOfEffectShows;
@@ -10,11 +10,10 @@
namespace EffectShowManagement
{
EffectShowExplosionCluster::EffectShowExplosionCluster(const AreaEffectSimulation::ExplosionCluster &explosionCluster,
const std::shared_ptr<HandlerPdmData> &handlerPdmData)
: m_explosionCluster(explosionCluster)
const std::shared_ptr<HandlerPdmData> &handlerPdmData) : m_explosionCluster(explosionCluster)
, m_handlerPdmData(handlerPdmData)
, m_numOfEffectShows(0)
{
, m_numOfEffectShows(0),
m_logger(NGL::NGLLoggerBootstrap::getLogger()) {
}
//=============================================================================
@@ -82,7 +81,7 @@ Database::EsmEffectShow EffectShowExplosionCluster::getEffectShow(int idx)
esmEffectShow.areaRotation = m_explosionCluster.area().rotation() + 90;
DEBUG_LOG() << "\nWidth: " << m_explosionCluster.area().width() << " Height: " << m_explosionCluster.area().height()
DEBUG_LOG(m_logger) << "\nWidth: " << m_explosionCluster.area().width() << " Height: " << m_explosionCluster.area().height()
<< "\nRotated LL Pos: " << lowerLeftPosRotated.mgrs()
<< "\nRotated Center Pos: " << centerPosRotated.mgrs()
<< "\nOffset x,y: " << x_off << " , " << y_off
@@ -119,7 +118,7 @@ Database::EsmEffectShow EffectShowExplosionCluster::getEffectShow(int idx)
esmEffectShow.areaDepth = m_explosionCluster.area().height();
esmEffectShow.areaRotation = m_explosionCluster.area().rotation() + 90;
DEBUG_LOG() << "\nWidth: " << m_explosionCluster.area().width() << " Height: " << m_explosionCluster.area().height()
DEBUG_LOG(m_logger) << "\nWidth: " << m_explosionCluster.area().width() << " Height: " << m_explosionCluster.area().height()
<< "\nRotated LL Pos: " << lowerLeftPosRotated.mgrs()
<< "\nRotated Center Pos: " << centerPosRotated.mgrs()
<< "\nSide x,y: " << m_explosionCluster.area().width() << " , " << m_explosionCluster.area().height();
@@ -131,7 +130,7 @@ Database::EsmEffectShow EffectShowExplosionCluster::getEffectShow(int idx)
void EffectShowExplosionCluster::updateEffectShow(Database::EsmEffectShow &data)
{
DEBUG_LOG() << "update EffectSHow for (" << data.id << ")";
DEBUG_LOG(m_logger) << "update EffectSHow for (" << data.id << ")";
data.nameAreaEfffectSimulation = QString::fromStdString(m_explosionCluster.name());
data.startTime = m_explosionCluster.effectStart().is_set() ? m_explosionCluster.effectStart().get() : 0;
data.duration = m_explosionCluster.effectDuration();
@@ -71,6 +71,7 @@ public:
int getShotsPerArea() const;
private:
NGL::INGLLogger &m_logger;
/**
* @brief Calculates the square of the each effect area.
*/
@@ -114,6 +115,7 @@ private:
double rotationRad() const;
private:
NGL::INGLLogger &m_logger;
AreaEffectSimulation::ExplosionCluster const m_explosionCluster;
std::shared_ptr<HandlerPdmData> m_handlerPdmData;
int m_numOfEffectShows;
@@ -11,12 +11,11 @@
namespace EffectShowManagement
{
EffectShowMineArea::EffectShowMineArea(const AreaEffectSimulation::MineArea &mineArea)
: m_mineArea(mineArea)
EffectShowMineArea::EffectShowMineArea(const AreaEffectSimulation::MineArea &mineArea) : m_mineArea(mineArea)
, m_segment(getEffectShowSegment(mineArea))
, m_utmZone(-1)
, m_rotation(0.0)
{
, m_rotation(0.0),
m_logger(NGL::NGLLoggerBootstrap::getLogger()) {
}
//=============================================================================
@@ -46,9 +45,9 @@ Database::EsmEffectShow EffectShowMineArea::getEffectShow()
{
const Core::GeoPosition2D &posGeo = seg.positionStart();
LtsCoordTrans::UtmCoordinate pos = LtsCoordTrans::UtmCoordinate::fromGeographic(posGeo.lon(), posGeo.lat(), m_utmZone);
DEBUG_LOG() << "Start Pos Segm.: " << pos.mgrs();
DEBUG_LOG(m_logger) << "Start Pos Segm.: " << pos.mgrs();
}
DEBUG_LOG() << "Center Pos Effect Show: " << LtsCoordTrans::mgrsFromGeographic(esmEffectShow.centerPosition.x(), esmEffectShow.centerPosition.y());
DEBUG_LOG(m_logger) << "Center Pos Effect Show: " << LtsCoordTrans::mgrsFromGeographic(esmEffectShow.centerPosition.x(), esmEffectShow.centerPosition.y());
return esmEffectShow;
}
//-----------------------------------------------------------------------------
@@ -60,6 +60,7 @@ public:
}
private:
NGL::INGLLogger &m_logger;
/**
* @brief Calculates the center position and the lower left position of the effect area.
*/
@@ -89,6 +90,7 @@ private:
static LtsCoordTrans::UtmCoordinate rotate(const LtsCoordTrans::UtmCoordinate &p, const LtsCoordTrans::UtmCoordinate &c, double angle);
private:
NGL::INGLLogger &m_logger;
AreaEffectSimulation::MineArea const m_mineArea;
const AreaEffectSimulation::MineSegment &m_segment;
int m_utmZone;
@@ -15,10 +15,9 @@
using namespace EffectShowManagement;
HandlerAesData::HandlerAesData(Initialization *mainHandler)
: QObject()
, m_mainHandler(mainHandler)
{
HandlerAesData::HandlerAesData(Initialization *mainHandler) : QObject()
, m_mainHandler(mainHandler),
m_logger(NGL::NGLLoggerBootstrap::getLogger()) {
} // end of ctor()
//=============================================================================
HandlerAesData::~HandlerAesData()
@@ -30,7 +29,7 @@ HandlerAesData::~HandlerAesData()
bool HandlerAesData::init()
{
DEBUG_LOG() << "Begin HandlerAesData";
DEBUG_LOG(m_logger) << "Begin HandlerAesData";
// create ObjectAesData
auto cbAes = [this](const Database::EsmAesData & data)
@@ -41,7 +40,7 @@ bool HandlerAesData::init()
};
if (!m_mainHandler->db()->select(cbAes))
{
ERROR_LOG() << "Error reading data from database!";
ERROR_LOG(m_logger) << "Error reading data from database!";
return false;
}
@@ -109,7 +108,7 @@ bool HandlerAesData::init()
return false;
}
DEBUG_LOG() << "m_AesDataObjMap.size() = " << m_AesDataObjMap.size();
DEBUG_LOG(m_logger) << "m_AesDataObjMap.size() = " << m_AesDataObjMap.size();
return true;
} // end of init()
@@ -147,7 +146,7 @@ void HandlerAesData::onExplosionSingleChanged(const AreaEffectSimulation::Explos
if (kindOfModification == HandlerEffectShow::KindOfModification_e::Added && ifs)
kindOfModification = HandlerEffectShow::KindOfModification_e::ModifiedData;
DEBUG_LOG() << "Got ExplosionArea: "
DEBUG_LOG(m_logger) << "Got ExplosionArea: "
<< "\n ID: " << data.id()
<< "\n Name: " << data.name()
<< "\n Effect status: " << data.effectStateId()
@@ -167,7 +166,7 @@ void HandlerAesData::onExplosionSingleChanged(const AreaEffectSimulation::Explos
if (ret.error())
{
delete ifs;
ERROR_LOG() << ret();
ERROR_LOG(m_logger) << ret();
}
else
{
@@ -187,10 +186,10 @@ void HandlerAesData::onExplosionSingleChanged(const AreaEffectSimulation::Explos
if (!ret.error())
m_mainHandler->handlerEffectShow()->onExplosionAreaChanged(areaData, kindOfModification);
else
ERROR_LOG() << ret();
ERROR_LOG(m_logger) << ret();
}
else
WARNING_LOG() << "Explosion Area not available for modification: " << data.id();
WARNING_LOG(m_logger) << "Explosion Area not available for modification: " << data.id();
break;
}
case HandlerEffectShow::KindOfModification_e::Removed:
@@ -198,11 +197,11 @@ void HandlerAesData::onExplosionSingleChanged(const AreaEffectSimulation::Explos
if (ifs != nullptr)
{
if (!m_AesDataObjMap.remove(data.id()))
ERROR_LOG() << "Remove of AES data (" << data.id() << ") from map failed.";
ERROR_LOG(m_logger) << "Remove of AES data (" << data.id() << ") from map failed.";
Core::FunctionReplyObject ret = ifs->removeObject();
if (ret.error())
ERROR_LOG() << ret();
ERROR_LOG(m_logger) << ret();
}
m_mainHandler->handlerEffectShow()->onExplosionAreaChanged(areaData, kindOfModification);
@@ -228,7 +227,7 @@ void HandlerAesData::onExplosionAreaChanged(const AreaEffectSimulation::Explosio
kindOfModification = HandlerEffectShow::KindOfModification_e::ModifiedData;
const Core::GeoPosition2D &posLl = data.area().cornerBottomLeft();
DEBUG_LOG() << "Got ExplosionArea: "
DEBUG_LOG(m_logger) << "Got ExplosionArea: "
<< "\n ID: " << data.id()
<< "\n Name: " << data.name()
<< "\n Effect status: " << data.effectStateId()
@@ -251,7 +250,7 @@ void HandlerAesData::onExplosionAreaChanged(const AreaEffectSimulation::Explosio
if (ret.error())
{
delete ifs;
ERROR_LOG() << ret();
ERROR_LOG(m_logger) << ret();
}
else
{
@@ -271,10 +270,10 @@ void HandlerAesData::onExplosionAreaChanged(const AreaEffectSimulation::Explosio
if (!ret.error())
m_mainHandler->handlerEffectShow()->onExplosionAreaChanged(data, kindOfModification);
else
ERROR_LOG() << ret();
ERROR_LOG(m_logger) << ret();
}
else
WARNING_LOG() << "Explosion Area not available for modification: " << data.id();
WARNING_LOG(m_logger) << "Explosion Area not available for modification: " << data.id();
break;
}
case HandlerEffectShow::KindOfModification_e::Removed:
@@ -282,11 +281,11 @@ void HandlerAesData::onExplosionAreaChanged(const AreaEffectSimulation::Explosio
if (ifs != nullptr)
{
if (!m_AesDataObjMap.remove(data.id()))
ERROR_LOG() << "Remove of AES data (" << data.id() << ") from map failed.";
ERROR_LOG(m_logger) << "Remove of AES data (" << data.id() << ") from map failed.";
Core::FunctionReplyObject ret = ifs->removeObject();
if (ret.error())
ERROR_LOG() << ret();
ERROR_LOG(m_logger) << ret();
}
m_mainHandler->handlerEffectShow()->onExplosionAreaChanged(data, kindOfModification);
@@ -310,7 +309,7 @@ void HandlerAesData::onExplosionClusterChanged(const AreaEffectSimulation::Explo
kindOfModification = HandlerEffectShow::KindOfModification_e::ModifiedData;
const Core::GeoPosition2D &posLl = data.area().cornerBottomLeft();
DEBUG_LOG() << ">>>> Got Cluster: "
DEBUG_LOG(m_logger) << ">>>> Got Cluster: "
<< "\n ID: " << data.id()
<< "\n Name: " << data.name()
<< "\n Effect status: " << data.effectStateId()
@@ -333,7 +332,7 @@ void HandlerAesData::onExplosionClusterChanged(const AreaEffectSimulation::Explo
if (ret.error())
{
delete ifs;
ERROR_LOG() << ret();
ERROR_LOG(m_logger) << ret();
}
else
{
@@ -353,10 +352,10 @@ void HandlerAesData::onExplosionClusterChanged(const AreaEffectSimulation::Explo
if (!ret.error())
m_mainHandler->handlerEffectShow()->onExplosionClusterChanged(data, kindOfModification);
else
ERROR_LOG() << ret();
ERROR_LOG(m_logger) << ret();
}
else
WARNING_LOG() << "Explosion Area not available for modification: " << data.id();
WARNING_LOG(m_logger) << "Explosion Area not available for modification: " << data.id();
break;
}
case HandlerEffectShow::KindOfModification_e::Removed:
@@ -364,11 +363,11 @@ void HandlerAesData::onExplosionClusterChanged(const AreaEffectSimulation::Explo
if (ifs != nullptr)
{
if (!m_AesDataObjMap.remove(data.id()))
ERROR_LOG() << "Remove of AES data (" << data.id() << ") from map failed.";
ERROR_LOG(m_logger) << "Remove of AES data (" << data.id() << ") from map failed.";
Core::FunctionReplyObject ret = ifs->removeObject();
if (ret.error())
ERROR_LOG() << ret();
ERROR_LOG(m_logger) << ret();
}
m_mainHandler->handlerEffectShow()->onExplosionClusterChanged(data, kindOfModification);
@@ -391,7 +390,7 @@ void HandlerAesData::onEffectClusterChanged(const AreaEffectSimulation::EffectCl
kindOfModification = HandlerEffectShow::KindOfModification_e::ModifiedData;
const Core::GeoPosition2D &posLl = data.area().cornerBottomLeft();
DEBUG_LOG() << ">>>> Got EffectCluster: "
DEBUG_LOG(m_logger) << ">>>> Got EffectCluster: "
<< "\n ID: " << data.id()
<< "\n Name: " << data.name()
<< "\n Effect status: " << data.effectStateId()
@@ -414,7 +413,7 @@ void HandlerAesData::onEffectClusterChanged(const AreaEffectSimulation::EffectCl
if (ret.error())
{
delete ifs;
ERROR_LOG() << ret();
ERROR_LOG(m_logger) << ret();
}
else
{
@@ -434,10 +433,10 @@ void HandlerAesData::onEffectClusterChanged(const AreaEffectSimulation::EffectCl
if (!ret.error())
m_mainHandler->handlerEffectShow()->onEffectClusterChanged(data, kindOfModification);
else
ERROR_LOG() << ret();
ERROR_LOG(m_logger) << ret();
}
else
WARNING_LOG() << "Explosion Area not available for modification: " << data.id();
WARNING_LOG(m_logger) << "Explosion Area not available for modification: " << data.id();
break;
}
case HandlerEffectShow::KindOfModification_e::Removed:
@@ -445,11 +444,11 @@ void HandlerAesData::onEffectClusterChanged(const AreaEffectSimulation::EffectCl
if (ifs != nullptr)
{
if (!m_AesDataObjMap.remove(data.id()))
ERROR_LOG() << "Remove of AES data (" << data.id() << ") from map failed.";
ERROR_LOG(m_logger) << "Remove of AES data (" << data.id() << ") from map failed.";
Core::FunctionReplyObject ret = ifs->removeObject();
if (ret.error())
ERROR_LOG() << ret();
ERROR_LOG(m_logger) << ret();
}
m_mainHandler->handlerEffectShow()->onEffectClusterChanged(data, kindOfModification);
@@ -476,7 +475,7 @@ void HandlerAesData::onMineAreaChanged(const AreaEffectSimulation::MineArea &dat
return;
const Core::GeoPosition2D &posLl = data.segments().at(data.segments().size() / 2).positionStart();
DEBUG_LOG() << "Got MineArea: "
DEBUG_LOG(m_logger) << "Got MineArea: "
<< "\n ID: " << data.id()
<< "\n Name: " << data.name()
<< "\n Effect status: " << data.effectStateId()
@@ -497,7 +496,7 @@ void HandlerAesData::onMineAreaChanged(const AreaEffectSimulation::MineArea &dat
if (ret.error())
{
delete ifs;
ERROR_LOG() << ret();
ERROR_LOG(m_logger) << ret();
}
else
{
@@ -517,10 +516,10 @@ void HandlerAesData::onMineAreaChanged(const AreaEffectSimulation::MineArea &dat
if (!ret.error())
m_mainHandler->handlerEffectShow()->onMineAreaChanged(data, kindOfModification);
else
ERROR_LOG() << ret();
ERROR_LOG(m_logger) << ret();
}
else
WARNING_LOG() << "Mine Area not available for modification: " << data.id();
WARNING_LOG(m_logger) << "Mine Area not available for modification: " << data.id();
break;
}
case HandlerEffectShow::KindOfModification_e::Removed:
@@ -528,11 +527,11 @@ void HandlerAesData::onMineAreaChanged(const AreaEffectSimulation::MineArea &dat
if (ifs != nullptr)
{
if (!m_AesDataObjMap.remove(data.id()))
ERROR_LOG() << "Remove of AES data (" << data.id() << ") from map failed.";
ERROR_LOG(m_logger) << "Remove of AES data (" << data.id() << ") from map failed.";
Core::FunctionReplyObject ret = ifs->removeObject();
if (ret.error())
ERROR_LOG() << ret();
ERROR_LOG(m_logger) << ret();
}
m_mainHandler->handlerEffectShow()->onMineAreaChanged(data, kindOfModification);
break;
@@ -558,18 +557,18 @@ bool HandlerAesData::takeIntoAccountEffectShow(const AreaEffectSimulation::AesEf
HandlerEffectShow::KindOfModification_e HandlerAesData::getKindOfModification(const Database::EsmAesData &data, DataModification modType) const
{
auto it = m_AesDataObjMap.find(data.idAes);
DEBUG_LOG() << "Check esm " << data.idAes << " modType " << modType;
DEBUG_LOG(m_logger) << "Check esm " << data.idAes << " modType " << modType;
switch (modType)
{
case DataModification::eAdded:
case DataModification::eModified:
{
DEBUG_LOG() << "Case Added Or Modified";
DEBUG_LOG(m_logger) << "Case Added Or Modified";
if (it != m_AesDataObjMap.end())
{
DEBUG_LOG() << "Found data";
DEBUG_LOG(m_logger) << "Found data";
if (it.value()->areaChanged(data))
return HandlerEffectShow::KindOfModification_e::ModifiedArea;
if (it.value()->dataChanged(data))
@@ -76,6 +76,7 @@ private Q_SLOTS:
void onMineAreaChanged(const AreaEffectSimulation::MineArea &data, DataModification modType);
private:
NGL::INGLLogger &m_logger;
/**
* @brief Checks, if the status of the area effect simulation allows a treatment of its data.
* @param effectStateId Status of the area effect simulatin data.
@@ -54,7 +54,7 @@ bool HandlerEffectShow::init()
if (ret.error())
{
delete ifs;
ERROR_LOG() << ret();
ERROR_LOG(m_logger) << ret();
bRet = false;
return;
}
@@ -62,7 +62,7 @@ bool HandlerEffectShow::init()
};
if (!m_mainHandler->db()->select(cbEffectShow) || !bRet)
{
ERROR_LOG() << "Error reading data from database 'esm_effect_show!";
ERROR_LOG(m_logger) << "Error reading data from database 'esm_effect_show!";
return false;
}
@@ -73,13 +73,13 @@ bool HandlerEffectShow::init()
connect(m_cleanupTimer, &QTimer::timeout, this, &HandlerEffectShow::onCleanUp);
m_cleanupTimer->start(CLEANUPTIME); //10 minutes
DEBUG_LOG() << "m_effectShowObjMap.size() = " << m_effectShowObjMap.size();
DEBUG_LOG(m_logger) << "m_effectShowObjMap.size() = " << m_effectShowObjMap.size();
return true;
} // end of init()
//=============================================================================
void HandlerEffectShow::onExplosionAreaChanged(const AreaEffectSimulation::ExplosionArea &data, KindOfModification_e kindOfModification)
{
INFO_LOG() << "onExplosionAreaChanged: " << data << ", kindOfModification: " << enumToString(kindOfModification);
INFO_LOG(m_logger) << "onExplosionAreaChanged: " << data << ", kindOfModification: " << enumToString(kindOfModification);
switch (kindOfModification)
{
case KindOfModification_e::Added:
@@ -113,7 +113,7 @@ void HandlerEffectShow::onExplosionAreaChanged(const AreaEffectSimulation::Explo
void HandlerEffectShow::onExplosionClusterChanged(const AreaEffectSimulation::ExplosionCluster &data, HandlerEffectShow::KindOfModification_e kindOfModification)
{
INFO_LOG() << "onExplosionClusterChanged: " << data << ", kindOfModification: " << enumToString(kindOfModification);
INFO_LOG(m_logger) << "onExplosionClusterChanged: " << data << ", kindOfModification: " << enumToString(kindOfModification);
switch (kindOfModification)
{
case KindOfModification_e::Added:
@@ -148,7 +148,7 @@ void HandlerEffectShow::onExplosionClusterChanged(const AreaEffectSimulation::Ex
void HandlerEffectShow::onEffectClusterChanged(const AreaEffectSimulation::EffectCluster &data, KindOfModification_e kindOfModification)
{
INFO_LOG() << "onEffectClusterChanged: " << data << ", kindOfModification: " << enumToString(kindOfModification);
INFO_LOG(m_logger) << "onEffectClusterChanged: " << data << ", kindOfModification: " << enumToString(kindOfModification);
switch (kindOfModification)
{
case KindOfModification_e::Added:
@@ -184,7 +184,7 @@ void HandlerEffectShow::onEffectClusterChanged(const AreaEffectSimulation::Effec
//=============================================================================
void HandlerEffectShow::onMineAreaChanged(const AreaEffectSimulation::MineArea &data, KindOfModification_e kindOfModification)
{
INFO_LOG() << "onMineAreaChanged: " << data << ", kindOfModification: " << enumToString(kindOfModification);
INFO_LOG(m_logger) << "onMineAreaChanged: " << data << ", kindOfModification: " << enumToString(kindOfModification);
switch (kindOfModification)
{
case KindOfModification_e::Added:
@@ -218,12 +218,12 @@ void HandlerEffectShow::onMineAreaChanged(const AreaEffectSimulation::MineArea &
//=============================================================================
void HandlerEffectShow::effectShowOrderConfirmationReceived(const ConvertFromTab::OrderConfirmation_t &orderConfirmation)
{
DEBUG_LOG() << "onEffectShowConfirmationReceived()";
DEBUG_LOG(m_logger) << "onEffectShowConfirmationReceived()";
ObjectEffectShow *ifs = m_effectShowObjMap.value(orderConfirmation.orderId);
if (ifs == nullptr)
{
WARNING_LOG() << "Error receiving effect show ID not known: " << orderConfirmation.orderId;
WARNING_LOG(m_logger) << "Error receiving effect show ID not known: " << orderConfirmation.orderId;
return;
}
const auto oldId = ifs->getData().orderConfirmation;
@@ -233,7 +233,7 @@ void HandlerEffectShow::effectShowOrderConfirmationReceived(const ConvertFromTab
if (oldId != ifs->getData().orderConfirmation && ifs->getData().orderConfirmation == EffectShowManagement::OrderConfirmation_e::FiringReadiness)
{
DEBUG_LOG() << "effectShowOrderConfirmationReceived Got Fire Readyness, send to aes for " << ifs->getId();
DEBUG_LOG(m_logger) << "effectShowOrderConfirmationReceived Got Fire Readyness, send to aes for " << ifs->getId();
AreaEffectSimulation::SetAesItemEffectorStateRequest req;
req.aesId(ifs->getIdAES());
req.newEffectorState(AreaEffectSimulation::AesEffectorState::EsReadyToFire);
@@ -263,7 +263,7 @@ void HandlerEffectShow::createEffectShow(const Database::EsmEffectShow &data, bo
if (ret.error())
{
delete ifs;
ERROR_LOG() << ret();
ERROR_LOG(m_logger) << ret();
}
else
{
@@ -277,10 +277,10 @@ void HandlerEffectShow::onEffectShowModifyRequest(
const rti::core::SampleIdentity &cookie,
const EffectShow &request)
{
DEBUG_LOG() << "onEffectShowModifyRequest: " << request.id();
DEBUG_LOG(m_logger) << "onEffectShowModifyRequest: " << request.id();
if (request.id() <= 0)
{
ERROR_LOG() << "Illegal Effect Show Id: " << request.id();
ERROR_LOG(m_logger) << "Illegal Effect Show Id: " << request.id();
return;
}
@@ -289,7 +289,7 @@ void HandlerEffectShow::onEffectShowModifyRequest(
auto ret = effectShowModifyRequest(request);
if (ret.error())
ERROR_LOG() << ret();
ERROR_LOG(m_logger) << ret();
m_mainHandler->dds()->fts()->effectShowModifyReply(cookie, ret);
@@ -319,7 +319,7 @@ Core::FunctionReplyObject HandlerEffectShow::effectShowModifyRequest(const Effec
triggerEffectShowOrder(ifs); // trigger effect show order to effect show actor
if (ret.error())
WARNING_LOG() << ret();
WARNING_LOG(m_logger) << ret();
return ret;
}
@@ -327,7 +327,7 @@ Core::FunctionReplyObject HandlerEffectShow::effectShowModifyRequest(const Effec
void HandlerEffectShow::onEffectShowRemoveRequest(const rti::core::SampleIdentity &cookie,
const Core::RemoveElementRequest &request)
{
DEBUG_LOG() << "onEffectShowRemoveRequest: " << request.id();
DEBUG_LOG(m_logger) << "onEffectShowRemoveRequest: " << request.id();
ObjectEffectShow *ifs = m_effectShowObjMap.value(request.id());
Core::FunctionReplyObject ret;
@@ -377,7 +377,7 @@ void HandlerEffectShow::createEffectShowsRelatedToMineArea(const AreaEffectSimul
for (const auto &esmEffectShow : esmEffectShows)
{
createEffectShow(esmEffectShow);
DEBUG_LOG() << toString(esmEffectShow);
DEBUG_LOG(m_logger) << toString(esmEffectShow);
}
}
//-------------------------------------------------------------------------------
@@ -387,7 +387,7 @@ void HandlerEffectShow::createEffectShowsRelatedToExplosionArea(const AreaEffect
for (const auto &esmEffectShow : esmEffectShows)
{
createEffectShow(esmEffectShow);
DEBUG_LOG() << toString(esmEffectShow);
DEBUG_LOG(m_logger) << toString(esmEffectShow);
}
}
@@ -397,7 +397,7 @@ void HandlerEffectShow::createEffectShowsRelatedToExplosionCluster(const AreaEff
for (const auto &esmEffectShow : esmEffectShows)
{
createEffectShow(esmEffectShow);
DEBUG_LOG() << toString(esmEffectShow);
DEBUG_LOG(m_logger) << toString(esmEffectShow);
}
}
@@ -407,7 +407,7 @@ void HandlerEffectShow::createEffectShowsRelatedToEffectCluster(const AreaEffect
for (const auto &esmEffectShow : esmEffectShows)
{
createEffectShow(esmEffectShow);
DEBUG_LOG() << toString(esmEffectShow);
DEBUG_LOG(m_logger) << toString(esmEffectShow);
}
}
//-------------------------------------------------------------------------------
@@ -415,7 +415,7 @@ QVector<Database::EsmEffectShow> HandlerEffectShow::createEffectShowDbDataRelate
{
QVector<Database::EsmEffectShow> ret;
DEBUG_LOG() << "createEffectShowDbDataRelatedToExplosionArea: ";
DEBUG_LOG(m_logger) << "createEffectShowDbDataRelatedToExplosionArea: ";
EffectShowMineArea effectShowMineArea(data);
Database::EsmEffectShow esmEffectShow = effectShowMineArea.getEffectShow();
@@ -427,7 +427,7 @@ QVector<Database::EsmEffectShow> HandlerEffectShow::createEffectShowDbDataRelate
{
QVector<Database::EsmEffectShow> ret;
DEBUG_LOG() << "createEffectShowDbDataRelatedToExplosionArea: ";
DEBUG_LOG(m_logger) << "createEffectShowDbDataRelatedToExplosionArea: ";
EffectShowExplosionArea effectShowExplosionArea(data, m_mainHandler->handlerPdmData());
@@ -436,7 +436,7 @@ QVector<Database::EsmEffectShow> HandlerEffectShow::createEffectShowDbDataRelate
//create exact 1
ret.reserve(1);
Database::EsmEffectShow esmEffectShow = effectShowExplosionArea.getEffectShow(0);
DEBUG_LOG() << toString(esmEffectShow);
DEBUG_LOG(m_logger) << toString(esmEffectShow);
ret.push_back(std::move(esmEffectShow));
}
else
@@ -466,7 +466,7 @@ QVector<Database::EsmEffectShow> HandlerEffectShow::createEffectShowDbDataRelate
esmEffectShow.shotsPerVolley = effectShowExplosionArea.getShotsPerArea();
if (esmEffectShow.shotsPerVolley < esmEffectShow.numOfVolley)
esmEffectShow.shotsPerVolley = esmEffectShow.numOfVolley; // set minimum shots per volley
DEBUG_LOG() << toString(esmEffectShow);
DEBUG_LOG(m_logger) << toString(esmEffectShow);
ret.push_back(std::move(esmEffectShow));
}
@@ -486,7 +486,7 @@ QVector<Database::EsmEffectShow> HandlerEffectShow::createEffectShowDbDataRelate
Database::EsmEffectShow esmEffectShow = effectShowExplosionCluster.getEffectShow(0);
if(data.esmParticipantIds().size() > 0)
esmEffectShow.esmParticipantId = data.esmParticipantIds().at(0); // TODO handle vector
DEBUG_LOG() << toString(esmEffectShow);
DEBUG_LOG(m_logger) << toString(esmEffectShow);
ret.push_back(std::move(esmEffectShow));
}
else
@@ -516,7 +516,7 @@ QVector<Database::EsmEffectShow> HandlerEffectShow::createEffectShowDbDataRelate
esmEffectShow.shotsPerVolley = effectShowExplosionCluster.getShotsPerArea();
if (esmEffectShow.shotsPerVolley < esmEffectShow.numOfVolley)
esmEffectShow.shotsPerVolley = esmEffectShow.numOfVolley; // set minimum shots per volley
DEBUG_LOG() << toString(esmEffectShow);
DEBUG_LOG(m_logger) << toString(esmEffectShow);
// Evlt. nicht bei DM42 (dann ist max > 1)
if(data.esmParticipantIds().size() > 0)
@@ -539,7 +539,7 @@ QVector<Database::EsmEffectShow> HandlerEffectShow::createEffectShowDbDataRelate
Database::EsmEffectShow esmEffectShow = effectShowEffectCluster.getEffectShow(0);
if(data.esmParticipantIds().size() > 0)
esmEffectShow.esmParticipantId = data.esmParticipantIds().at(0); // TODO handle vector
DEBUG_LOG() << toString(esmEffectShow);
DEBUG_LOG(m_logger) << toString(esmEffectShow);
ret.push_back(std::move(esmEffectShow));
}
else
@@ -569,12 +569,12 @@ QVector<Database::EsmEffectShow> HandlerEffectShow::createEffectShowDbDataRelate
esmEffectShow.shotsPerVolley = effectShowEffectCluster.getShotsPerArea();
if (esmEffectShow.shotsPerVolley < esmEffectShow.numOfVolley)
esmEffectShow.shotsPerVolley = esmEffectShow.numOfVolley; // set minimum shots per volley
//DEBUG_LOG() << toString(esmEffectShow);
//DEBUG_LOG(m_logger) << toString(esmEffectShow);
// Evlt. nicht bei DM42 (dann ist max > 1)
if(data.esmParticipantIds().size() > (size_t)i)
esmEffectShow.esmParticipantId = data.esmParticipantIds().at(i); // TODO handle vector
DEBUG_LOG() << toString(esmEffectShow);
DEBUG_LOG(m_logger) << toString(esmEffectShow);
ret.push_back(std::move(esmEffectShow));
}
@@ -584,7 +584,7 @@ QVector<Database::EsmEffectShow> HandlerEffectShow::createEffectShowDbDataRelate
//-------------------------------------------------------------------------------
void HandlerEffectShow::removeEffectShowsRelatedToAes(int idAes, bool retract)
{
DEBUG_LOG() << "removeEffectShowsRelatedToAes(" << idAes << ")";
DEBUG_LOG(m_logger) << "removeEffectShowsRelatedToAes(" << idAes << ")";
auto it = m_effectShowObjMap.begin();
while (it != m_effectShowObjMap.end())
{
@@ -595,7 +595,7 @@ void HandlerEffectShow::removeEffectShowsRelatedToAes(int idAes, bool retract)
(it.value()->getData().orderConfirmation != EffectShowManagement::OrderConfirmation_e_def::OrderCarriedOut))
remove = true;
else
INFO_LOG() << "Effect Show: " << it.value()->getId() << " not removed due to EXECUTION / ORDER CARRIED OUT";
INFO_LOG(m_logger) << "Effect Show: " << it.value()->getId() << " not removed due to EXECUTION / ORDER CARRIED OUT";
}
if (remove)
{
@@ -782,7 +782,7 @@ Core::FunctionReplyObject HandlerEffectShow::removeEffectShow(ObjectEffectShow *
Core::FunctionReplyObject ret = ifs->removeObject();
if (ret.error())
{
ERROR_LOG() << ret();
ERROR_LOG(m_logger) << ret();
return ret;
}
@@ -791,9 +791,9 @@ Core::FunctionReplyObject HandlerEffectShow::removeEffectShow(ObjectEffectShow *
// remove from map
if (!m_effectShowObjMap.remove(effectShowId) && bWarnWhenNotInMap)
WARNING_LOG() << "Remove of EffectShow(" << effectShowId << ") failed.";
WARNING_LOG(m_logger) << "Remove of EffectShow(" << effectShowId << ") failed.";
else
DEBUG_LOG() << "EffectShow(" << effectShowId << ") removed.";
DEBUG_LOG(m_logger) << "EffectShow(" << effectShowId << ") removed.";
return ret;
}
@@ -801,7 +801,7 @@ Core::FunctionReplyObject HandlerEffectShow::removeEffectShow(ObjectEffectShow *
void HandlerEffectShow::triggerEffectShowOrder(const ObjectEffectShow *ifs)
{
const Database::EsmEffectShow &effectShow = ifs->getData();
INFO_LOG() << "triggerEffectShowOrder for id " << ifs->getId()
INFO_LOG(m_logger) << "triggerEffectShowOrder for id " << ifs->getId()
<< ", aesId: " << ifs->getIdAES()
<< ", actor: " << effectShow.esmParticipantId;
if (effectShow.esmParticipantId == -1)
@@ -816,7 +816,7 @@ void HandlerEffectShow::triggerEffectShowOrder(const ObjectEffectShow *ifs)
void HandlerEffectShow::triggerRetractOrder(const ObjectEffectShow *ifs)
{
const Database::EsmEffectShow &effectShow = ifs->getData();
INFO_LOG() << "triggerRetractOrder for id " << ifs->getId()
INFO_LOG(m_logger) << "triggerRetractOrder for id " << ifs->getId()
<< ", aesId: " << ifs->getIdAES()
<< ", actor: " << effectShow.esmParticipantId;
if (effectShow.esmParticipantId == -1)
@@ -832,7 +832,7 @@ void HandlerEffectShow::triggerRetractOrder(const ObjectEffectShow *ifs)
void HandlerEffectShow::triggerEffectShowStop(const ObjectEffectShow *ifs)
{
const Database::EsmEffectShow &effectShow = ifs->getData();
INFO_LOG() << "triggerEffectShowStop for id " << ifs->getId()
INFO_LOG(m_logger) << "triggerEffectShowStop for id " << ifs->getId()
<< ", aesId: " << ifs->getIdAES()
<< ", actor: " << effectShow.esmParticipantId;
if (effectShow.esmParticipantId == -1)
@@ -846,7 +846,7 @@ void HandlerEffectShow::triggerEffectShowStop(const ObjectEffectShow *ifs)
void HandlerEffectShow::triggerEffectShowContinue(const ObjectEffectShow *ifs)
{
const Database::EsmEffectShow &effectShow = ifs->getData();
INFO_LOG() << "triggerEffectShowContinue for id " << ifs->getId()
INFO_LOG(m_logger) << "triggerEffectShowContinue for id " << ifs->getId()
<< ", aesId: " << ifs->getIdAES()
<< ", actor: " << effectShow.esmParticipantId;
if (effectShow.esmParticipantId == -1)
@@ -868,7 +868,7 @@ void HandlerEffectShow::triggerMeteoData(const ObjectEffectShow *ifs)
{
if (!meteoData.windOk() && !meteoData.climateOk())
{
WARNING_LOG() << "Found MeteoStation but no weather Data available, try again in 1 minute";
WARNING_LOG(m_logger) << "Found MeteoStation but no weather Data available, try again in 1 minute";
QTimer::singleShot(6000, this, &HandlerEffectShow::onSendMeteoData);
return;
}
@@ -879,12 +879,12 @@ void HandlerEffectShow::triggerMeteoData(const ObjectEffectShow *ifs)
// meteo data available
qint64 deltaTime = m_mainHandler->dds()->currentPartitionTime() - meteoData.timeStamp();
if (deltaTime > (60 * 15 * 1000))
WARNING_LOG() << "Age of meteo data=" << (deltaTime / 60000) << "min for vehicle: " << equipmentNumber;
WARNING_LOG(m_logger) << "Age of meteo data=" << (deltaTime / 60000) << "min for vehicle: " << equipmentNumber;
}
else
{
int equipmentNumber = m_mainHandler->handlerPpmData()->getEquipmentNumber(effectShow.esmParticipantId);
WARNING_LOG() << "Meteo data not available for effect show vehicle: " << equipmentNumber;
WARNING_LOG(m_logger) << "Meteo data not available for effect show vehicle: " << equipmentNumber;
}
}
@@ -907,7 +907,7 @@ void HandlerEffectShow::onSendMeteoData()
void HandlerEffectShow::onCleanUp()
{
DEBUG_LOG() << "Start Cleanup ";
DEBUG_LOG(m_logger) << "Start Cleanup ";
QVector<ObjectEffectShow * > objects;
for (ObjectEffectShow *obj : std::as_const(m_effectShowObjMap))
{
@@ -915,11 +915,11 @@ void HandlerEffectShow::onCleanUp()
if (effectShow.orderConfirmation == OrderConfirmation_e::OrderCarriedOut || effectShow.startTime <= 0 || effectShow.id <= 0)
continue;
DEBUG_LOG() << "Effect show with ID " << effectShow.id << " will expire at: " << QDateTime::fromMSecsSinceEpoch(effectShow.startTime + effectShow.duration + CLEANUPTIME).toString() << " current time: " << QDateTime::fromMSecsSinceEpoch(m_mainHandler->dds()->currentPartitionTime()).toString();
DEBUG_LOG(m_logger) << "Effect show with ID " << effectShow.id << " will expire at: " << QDateTime::fromMSecsSinceEpoch(effectShow.startTime + effectShow.duration + CLEANUPTIME).toString() << " current time: " << QDateTime::fromMSecsSinceEpoch(m_mainHandler->dds()->currentPartitionTime()).toString();
if ((effectShow.startTime + effectShow.duration + CLEANUPTIME) < m_mainHandler->dds()->currentPartitionTime())
{
//remove object
DEBUG_LOG() << "Remove Effect Show " << effectShow.id ;
DEBUG_LOG(m_logger) << "Remove Effect Show " << effectShow.id ;
objects.append(obj);
}
}
@@ -82,7 +82,7 @@ public:
enum class KindOfModification_e : int { Added = 0, ModifiedArea, ModifiedData, Removed, Paused, Continued, None };
static QString enumToString(HandlerEffectShow::KindOfModification_e mod);
void onSetAesItemEffectorStateReply(const Core::FunctionReplyObject &replyObject) override {DEBUG_LOG() << replyObject.translated();}
void onSetAesItemEffectorStateReply(const Core::FunctionReplyObject &replyObject) override {DEBUG_LOG(m_logger) << replyObject.translated();}
/**
* @brief Create, update, remove & create or remove Effect Shows in relation to the changes of the Explosion Area.
* @param[in] data
@@ -44,7 +44,7 @@ bool HandlerEffectShowActorRelocation::init()
if (ret.error())
{
delete ifs;
ERROR_LOG() << ret();
ERROR_LOG(m_logger) << ret();
bRet = false;
return;
}
@@ -52,23 +52,23 @@ bool HandlerEffectShowActorRelocation::init()
};
if (!m_mainHandler->db()->select(cbActor) || !bRet)
{
ERROR_LOG() << "Error reading data from database!";
ERROR_LOG(m_logger) << "Error reading data from database!";
return false;
}
DEBUG_LOG() << "m_effectShowActorRelocationObjMap.size() = " << m_effectShowActorRelocationObjMap.size();
DEBUG_LOG(m_logger) << "m_effectShowActorRelocationObjMap.size() = " << m_effectShowActorRelocationObjMap.size();
return true;
}
//=============================================================================
void HandlerEffectShowActorRelocation::relocationOrderConfirmationReceived(const ConvertFromTab::OrderConfirmation_t &orderConfirmation)
{
DEBUG_LOG() << "relocationOrderConfirmationReceived()";
DEBUG_LOG(m_logger) << "relocationOrderConfirmationReceived()";
ObjectEffectShowActorRelocation *ifs = m_effectShowActorRelocationObjMap.value(orderConfirmation.orderId);
if (ifs == nullptr)
{
WARNING_LOG() << "Error receiving effect show relocation ID not known.";
WARNING_LOG(m_logger) << "Error receiving effect show relocation ID not known.";
return;
}
@@ -83,10 +83,10 @@ void HandlerEffectShowActorRelocation::onEffectShowActorRelocationModifyRequest(
const rti::core::SampleIdentity &cookie,
const EffectShowActorRelocation &request)
{
DEBUG_LOG() << "onEffectShowActorRelocationModifyRequest: " << request.id();
DEBUG_LOG(m_logger) << "onEffectShowActorRelocationModifyRequest: " << request.id();
auto ret = request.id() > 0 ? effectShowActorRelocationModifyRequest(request) : effectShowActorRelocationCreateRequest(request);
if (ret.error())
WARNING_LOG() << ret();
WARNING_LOG(m_logger) << ret();
m_mainHandler->dds()->fts()->effectShowActorRelocationModifyReply(cookie, ret);
}
@@ -106,7 +106,7 @@ Core::FunctionReplyObject HandlerEffectShowActorRelocation::effectShowActorReloc
int equipmentNumber = m_mainHandler->handlerPpmData()->getEquipmentNumber(participantId);
m_mainHandler->handlerTabData()->relocationOrder(equipmentNumber, participantId, ifs->getRelocationOrder());
DEBUG_LOG() << "effectShowActorRelocationCreateRequest() - insert";
DEBUG_LOG(m_logger) << "effectShowActorRelocationCreateRequest() - insert";
}
return ret;
}
@@ -122,7 +122,7 @@ Core::FunctionReplyObject HandlerEffectShowActorRelocation::effectShowActorReloc
void HandlerEffectShowActorRelocation::onEffectShowActorRelocationRemoveRequest(const rti::core::SampleIdentity &cookie,
const Core::RemoveElementRequest &request)
{
DEBUG_LOG() << "onEffectShowActorRelocationRemoveRequest: " << request.id();
DEBUG_LOG(m_logger) << "onEffectShowActorRelocationRemoveRequest: " << request.id();
Core::FunctionReplyObject ret;
ObjectEffectShowActorRelocation *ifs = m_effectShowActorRelocationObjMap.value(request.id());
@@ -145,7 +145,7 @@ void HandlerEffectShowActorRelocation::onEffectShowActorRelocationRemoveRequest(
ret = ifs->removeObject();
if (ret.error())
ERROR_LOG() << Q_FUNC_INFO << ret();
ERROR_LOG(m_logger) << Q_FUNC_INFO << ret();
else
{
// trigger relocation telegram to effect show actor
@@ -57,6 +57,7 @@ public:
void relocationOrderConfirmationReceived(const ConvertFromTab::OrderConfirmation_t &orderConfirmation);
private:
NGL::INGLLogger &m_logger;
void onEffectShowActorRelocationModifyRequest(const rti::core::SampleIdentity &cookie,
const EffectShowActorRelocation &request) override final;
Core::FunctionReplyObject effectShowActorRelocationModifyRequest(const EffectShowActorRelocation &request);
@@ -66,6 +67,7 @@ private:
private:
NGL::INGLLogger &m_logger;
QMap<int, ObjectEffectShowActorRelocation *> m_effectShowActorRelocationObjMap;
struct Completed_t
{
@@ -20,10 +20,9 @@ namespace EffectShowManagement
{
//=============================================================================
HandlerEffectShowVehicleStatus::HandlerEffectShowVehicleStatus(Initialization *mainHandler,
QObject *parent)
: QObject(parent)
, m_mainHandler(mainHandler)
{
QObject *parent) : QObject(parent)
, m_mainHandler(mainHandler),
m_logger(NGL::NGLLoggerBootstrap::getLogger()) {
m_timerVehicleStatus.setSingleShot(true);
}
//=============================================================================
@@ -35,19 +34,19 @@ HandlerEffectShowVehicleStatus::~HandlerEffectShowVehicleStatus()
//=============================================================================
bool HandlerEffectShowVehicleStatus::init()
{
DEBUG_LOG() << "Begin HandlerEffectShowVehicleStatus";
DEBUG_LOG(m_logger) << "Begin HandlerEffectShowVehicleStatus";
// create EffectShowVehicleStatuss objects
auto cbEsvs = [this] (const Database::EsmEffectShowVehicleStatus &data)
{
ObjectEffectShowVehicleStatus *ifs(new ObjectEffectShowVehicleStatus(m_mainHandler));
ifs->set(data);
DEBUG_LOG() << "HandlerEffectShowVehicleStatus::init getParticipantId :" << ifs->getParticipantId();
DEBUG_LOG(m_logger) << "HandlerEffectShowVehicleStatus::init getParticipantId :" << ifs->getParticipantId();
m_effectShowVehicleStatusObjMap.insert(ifs->getParticipantId(), ifs);
};
if (!m_mainHandler->db()->select(cbEsvs))
{
ERROR_LOG() << "Error reading data from database!";
ERROR_LOG(m_logger) << "Error reading data from database!";
return false;
}
@@ -60,7 +59,7 @@ bool HandlerEffectShowVehicleStatus::init()
if (m_effectShowVehicleStatusObjMap.size() != 0)
onTimeoutVehicleStatus();
DEBUG_LOG() << "m_effectShowVehicleStatusObjMap.size() = " << m_effectShowVehicleStatusObjMap.size();
DEBUG_LOG(m_logger) << "m_effectShowVehicleStatusObjMap.size() = " << m_effectShowVehicleStatusObjMap.size();
return true;
}
@@ -108,7 +107,7 @@ bool HandlerEffectShowVehicleStatus::isOperational(int id) const
void HandlerEffectShowVehicleStatus::vehicleStatusReceived(const ConvertFromTab::VehicleStatus_t &vehicleStatus)
{
DEBUG_LOG() << "vehicleStatusReceived: " << vehicleStatus.equipmentNumber
DEBUG_LOG(m_logger) << "vehicleStatusReceived: " << vehicleStatus.equipmentNumber
<< ' ' << vehicleStatus.timestamp << ' ' << m_mainHandler->dds()->currentPartitionTime();
HandlerPpmData::Participant_t actor = m_mainHandler->handlerPpmData()->getIdAndNameOfEffectShowActor(vehicleStatus.equipmentNumber);
@@ -138,7 +137,7 @@ void HandlerEffectShowVehicleStatus::vehicleStatusReceived(const ConvertFromTab:
//=============================================================================
void HandlerEffectShowVehicleStatus::effectShowActorChanged(const HandlerPpmData::Participant_t &data, DataModification modType)
{
DEBUG_LOG() << "onEffectShowActorChanged: " << data.equipmentNumber;
DEBUG_LOG(m_logger) << "onEffectShowActorChanged: " << data.equipmentNumber;
auto it = m_effectShowVehicleStatusObjMap.find(data.id);
if (it == m_effectShowVehicleStatusObjMap.end()) return; // participant not allocated to any order
@@ -186,7 +185,7 @@ void HandlerEffectShowVehicleStatus::onStatusRequest()
auto it = m_effectShowVehicleStatusObjMap.find(actor.id);
if (it != m_effectShowVehicleStatusObjMap.end())
{
DEBUG_LOG() << "Status Request equipment number: " << equipmentNumber << ' ' << it.value()->getIdOfEffectShowActor();
DEBUG_LOG(m_logger) << "Status Request equipment number: " << equipmentNumber << ' ' << it.value()->getIdOfEffectShowActor();
m_mainHandler->handlerTabData()->effectShowVehicleStatusRequest(equipmentNumber, it.value()->getIdOfEffectShowActor());
}
@@ -220,7 +219,7 @@ void HandlerEffectShowVehicleStatus::onTimeoutVehicleStatus()
if (it.value()->getOperational())
{
qint64 age = currentTime - it.value()->getTimestamp();
DEBUG_LOG() << currentTime << ' ' << it.value()->getTimestamp();
DEBUG_LOG(m_logger) << currentTime << ' ' << it.value()->getTimestamp();
if ((age + 1000) >= HandlerEffectShowVehicleStatus::statusTimeout)
{
it.value()->setOperational(false); // reset operational status
@@ -238,7 +237,7 @@ void HandlerEffectShowVehicleStatus::onTimeoutVehicleStatus()
if (activateTimer)
m_timerVehicleStatus.start(HandlerEffectShowVehicleStatus::statusTimeout - maxAge);
DEBUG_LOG() << "onTimeoutVehicleStatus(): " << activateTimer << ' ' << maxAge;
DEBUG_LOG(m_logger) << "onTimeoutVehicleStatus(): " << activateTimer << ' ' << maxAge;
}
@@ -87,11 +87,13 @@ public Q_SLOTS:
void onTimeoutVehicleStatus();
private:
NGL::INGLLogger &m_logger;
static const qint64 statusTimeout = 1800000; // 30 min timeout effect show vehicle status
static const qint64 delayAfterStart = 20000; // 20 seconds delay for status requests after service start
static const qint64 statusRequestInterval = 5000; // Status request time interval of 5 seconds
private:
NGL::INGLLogger &m_logger;
QMap<int, ObjectEffectShowVehicleStatus *> m_effectShowVehicleStatusObjMap; // key = equipment number
QVector<int> m_statusRequest; // List of equipment numbers; Order List for request of vehicle status.
QTimer m_timerVehicleStatus;
@@ -14,16 +14,15 @@
using namespace EffectShowManagement;
//=============================================================================
HandlerMdmData::HandlerMdmData(const std::shared_ptr<DdsHandler> &ddsHandler,
QObject *parent)
: QObject(parent)
, m_ddsHandler(ddsHandler)
{
QObject *parent) : QObject(parent)
, m_ddsHandler(ddsHandler),
m_logger(NGL::NGLLoggerBootstrap::getLogger()) {
}
//=============================================================================
bool HandlerMdmData::init()
{
DEBUG_LOG() << "init() HandlerMdmData";
DEBUG_LOG(m_logger) << "init() HandlerMdmData";
auto dtcMdm = m_ddsHandler->dtcMdm();
connect(dtcMdm.get(), &MeteoDataManagement::Interface::Dtc::meteoDataChanged,
@@ -40,6 +40,7 @@ private Q_SLOTS:
void onMeteoDataChanged(const MeteoDataManagement::MeteoData &data, DataModification modType);
private:
NGL::INGLLogger &m_logger;
QHash<int, MeteoDataManagement::MeteoData> m_meteoData;
std::shared_ptr<DdsHandler> m_ddsHandler;
};
@@ -15,11 +15,9 @@ namespace EffectShowManagement
//=============================================================================
HandlerPdmData::HandlerPdmData(const std::shared_ptr<DdsHandler> &ddsHandler,
QObject *parent)
: QObject(parent)
, m_ddsHandler(ddsHandler)
{
QObject *parent) : QObject(parent)
, m_ddsHandler(ddsHandler),
m_logger(NGL::NGLLoggerBootstrap::getLogger()) {
} // end of ctor()
//=============================================================================
@@ -35,6 +35,8 @@ public:
int getCadence(const int chargeId) const;
private: // attributes
NGL::INGLLogger &m_logger;
std::shared_ptr<DdsHandler> m_ddsHandler;
};
} // namespace EffectShowManagement
@@ -15,16 +15,15 @@ using namespace EffectShowManagement;
//=============================================================================
HandlerPpmData::HandlerPpmData(Initialization *mainHandler,
QObject *parent)
: QObject(parent)
, m_mainHandler(mainHandler)
{
QObject *parent) : QObject(parent)
, m_mainHandler(mainHandler),
m_logger(NGL::NGLLoggerBootstrap::getLogger()) {
} // end of ctor()
//=============================================================================
bool HandlerPpmData::init()
{
DEBUG_LOG() << "Begin HandlerPpmData";
DEBUG_LOG(m_logger) << "Begin HandlerPpmData";
auto dtcPpm = m_mainHandler->dds()->dtcPpm();
connect(dtcPpm.get(), &ParticipantManagement::Interface::Dtc::participantChanged,
this, &HandlerPpmData::onParticipantChanged);
@@ -40,7 +39,7 @@ bool HandlerPpmData::init()
return false;
}
DEBUG_LOG() << "End HandlerPpmData";
DEBUG_LOG(m_logger) << "End HandlerPpmData";
return true;
} // end of init()
@@ -53,7 +52,7 @@ HandlerPpmData::Participant_t HandlerPpmData::getIdAndNameOfEffectShowActor(int
return p;
}
WARNING_LOG() << Q_FUNC_INFO << " Equipment Number not found: " << equipmentNum;
WARNING_LOG(m_logger) << Q_FUNC_INFO << " Equipment Number not found: " << equipmentNum;
return Participant_t(); // participant not available
} // end of getIdAndNameOfEffectShowActor()
@@ -64,7 +63,7 @@ int HandlerPpmData::getEquipmentNumber(int id) const
auto it = m_participant.find(id);
if (it == m_participant.end())
{
WARNING_LOG() << Q_FUNC_INFO << " Participant(" << id << ") not found. ";
WARNING_LOG(m_logger) << Q_FUNC_INFO << " Participant(" << id << ") not found. ";
return -1; // participant not available
}
return it.value().equipmentNumber;
@@ -78,7 +77,7 @@ void HandlerPpmData::onParticipantChanged(const ParticipantManagement::Participa
{
auto m_ppmDtc = m_mainHandler->dds()->dtcPpm();
ParticipantManagement::TypeClass typeClass = m_ppmDtc->type(data.typeId()).typeClass();
DEBUG_LOG() << "support entity / equipment number set " << (typeClass == ParticipantManagement::TypeClass::SupportEntity)
DEBUG_LOG(m_logger) << "support entity / equipment number set " << (typeClass == ParticipantManagement::TypeClass::SupportEntity)
<< " / " << data.equipmentNumber().is_set() << ", typeId: " << data.typeId()
<< ", cnt: " << m_ppmDtc->types().size();
@@ -119,7 +118,7 @@ void HandlerPpmData::onParticipantChanged(const ParticipantManagement::Participa
}
}
DEBUG_LOG() << "onParticipantChanged: " << data.id() << ' ' << data.name() << ' ' << modType;
DEBUG_LOG(m_logger) << "onParticipantChanged: " << data.id() << ' ' << data.name() << ' ' << modType;
} // end of onParticipantChanged()
@@ -71,6 +71,7 @@ private Q_SLOTS:
void onParticipantChanged(const ParticipantManagement::Participant &data, DataModification modType);
private:
NGL::INGLLogger &m_logger;
QMap<int, Participant_t> m_participant; // key = ID
Initialization *m_mainHandler;
@@ -37,7 +37,7 @@ HandlerTabData::HandlerTabData(Initialization *mainHandler,
//=============================================================================
bool HandlerTabData::init()
{
DEBUG_LOG() << "Begin HandlerTabData";
DEBUG_LOG(m_logger) << "Begin HandlerTabData";
auto dtcTab = m_mainHandler->dds()->dtcTab();
connect(dtcTab.get(), &TrainingAreaBase::Interface::Dtc::fireSmokeMarkerDataChanged,
this, &HandlerTabData::onFireSmokeMarkerDataChanged);
@@ -53,13 +53,13 @@ bool HandlerTabData::init()
return false;
}
DEBUG_LOG() << "End HandlerTabData";
DEBUG_LOG(m_logger) << "End HandlerTabData";
return true;
} // end of init()
//=============================================================================
void HandlerTabData::effectShowVehicleStatusRequest(int equipmentNumber, int participantId)
{
DEBUG_LOG() << "Trigger Status Request " << equipmentNumber << ' ' << participantId;
DEBUG_LOG(m_logger) << "Trigger Status Request " << equipmentNumber << ' ' << participantId;
TrainingAreaBase::SendFireSmokeMarkerDataRequest out;
out.equipmentNumber(equipmentNumber);
@@ -71,7 +71,7 @@ void HandlerTabData::effectShowVehicleStatusRequest(int equipmentNumber, int par
//=============================================================================
void HandlerTabData::relocationOrder(int equipmentNumber, int participantId, const ConvertToTab::RelocationOrder_t &relocationOrder)
{
DEBUG_LOG() << "Trigger Relocation Order " << equipmentNumber << ' ' << participantId;
DEBUG_LOG(m_logger) << "Trigger Relocation Order " << equipmentNumber << ' ' << participantId;
TrainingAreaBase::SendFireSmokeMarkerDataRequest out;
out.equipmentNumber(equipmentNumber);
@@ -90,7 +90,7 @@ void HandlerTabData::effectShowOrder(int equipmentNumber, int participantId, con
Core::GeoPosition2D posCenter = effectShowOrder.centerPosition;
Core::GeoPosition2D posLl = effectShowOrder.lowerLeftPosition;
DEBUG_LOG() << "Trigger Effect Show Order " << equipmentNumber << ' ' << participantId
DEBUG_LOG(m_logger) << "Trigger Effect Show Order " << equipmentNumber << ' ' << participantId
<< "\n idEffectShow " << effectShowOrder.idEffectShow
<< "\n startTime " << effectShowOrder.startTime
<< "\n centerPosition " << LtsCoordTrans::mgrsFromGeographic(posCenter.lon(), posCenter.lat())
@@ -110,7 +110,7 @@ void HandlerTabData::effectShowOrder(int equipmentNumber, int participantId, con
//=============================================================================
void HandlerTabData::effectShowStop(int equipmentNumber, int participantId, const qint16 &idEffectShow)
{
DEBUG_LOG() << "Trigger Effect Show Stop " << equipmentNumber << ' ' << participantId;
DEBUG_LOG(m_logger) << "Trigger Effect Show Stop " << equipmentNumber << ' ' << participantId;
TrainingAreaBase::SendFireSmokeMarkerDataRequest out;
out.equipmentNumber(equipmentNumber);
@@ -127,7 +127,7 @@ void HandlerTabData::effectShowContinue(int equipmentNumber, int participantId,
out.participantId(participantId);
out.payload(ConvertToTab::convertEffectShowContinue(effectShowContinue));
DEBUG_LOG() << "Trigger Effect Show Continue " << equipmentNumber << ' ' << participantId
DEBUG_LOG(m_logger) << "Trigger Effect Show Continue " << equipmentNumber << ' ' << participantId
<< "\n idEffectShow " << effectShowContinue.idEffectShow
<< "\n executionTime " << effectShowContinue.executionTime
<< "\n payload" << plText(out.payload());
@@ -143,7 +143,7 @@ void HandlerTabData::retractOrder(int equipmentNumber, int participantId, const
out.participantId(participantId);
out.payload(ConvertToTab::convertOrderRetract(retractOrder));
DEBUG_LOG() << "Trigger Retract Order " << equipmentNumber << ' ' << participantId
DEBUG_LOG(m_logger) << "Trigger Retract Order " << equipmentNumber << ' ' << participantId
<< "\n orderType " << retractOrder.orderType
<< "\n id " << retractOrder.id
<< "\n payload" << plText(out.payload());
@@ -158,7 +158,7 @@ void HandlerTabData::meteoData(int equipmentNumber, int participantId, const Met
out.participantId(participantId);
out.payload(ConvertToTab::convertMeteoData(meteoData));
DEBUG_LOG() << "Trigger Meteo data " << equipmentNumber << ' ' << participantId
DEBUG_LOG(m_logger) << "Trigger Meteo data " << equipmentNumber << ' ' << participantId
<< "\n temperature " << meteoData.temperature()
<< "\n humidity " << meteoData.humidity()
<< "\n pressure " << meteoData.pressure()
@@ -171,9 +171,9 @@ void HandlerTabData::meteoData(int equipmentNumber, int participantId, const Met
void HandlerTabData::onSendFireSmokeMarkerDataReply(const Core::FunctionReplyObject &reply)
{
if (reply.error())
ERROR_LOG() << "Fire Smoke Marker Data could not be send: " << reply.str();
ERROR_LOG(m_logger) << "Fire Smoke Marker Data could not be send: " << reply.str();
else
DEBUG_LOG() << "Fire Smoke Marker Data send successfully to TAB!";
DEBUG_LOG(m_logger) << "Fire Smoke Marker Data send successfully to TAB!";
} // end of onSendFireSmokeMarkerDataReply()
//-----------------------------------------------------------------------------
void HandlerTabData::onFireSmokeMarkerDataChanged(const TrainingAreaBase::FireSmokeMarkerData &data, DataModification modType)
@@ -181,18 +181,18 @@ void HandlerTabData::onFireSmokeMarkerDataChanged(const TrainingAreaBase::FireSm
if (modType == DataModification::eRemoved)
return;
DEBUG_LOG() << "Got Fire Smoke Marker " << data.sampleTime();
DEBUG_LOG(m_logger) << "Got Fire Smoke Marker " << data.sampleTime();
switch (ConvertFromTab::isTelegram(data))
{
case ConvertFromTab::RxTelegram_e::VehicleStatus:
{
DEBUG_LOG() << "Got Vehicle Status";
DEBUG_LOG(m_logger) << "Got Vehicle Status";
m_mainHandler->handlerEffectShowVehicleStatus()->vehicleStatusReceived(ConvertFromTab::getVehicleStatus(data));
break;
}
case ConvertFromTab::RxTelegram_e::OrderConfirmation:
{
DEBUG_LOG() << "Got Order Confirmation ";
DEBUG_LOG(m_logger) << "Got Order Confirmation ";
switch (modType)
{
case DataModification::eAdded:
@@ -201,12 +201,12 @@ void HandlerTabData::onFireSmokeMarkerDataChanged(const TrainingAreaBase::FireSm
const ConvertFromTab::OrderConfirmation_t orderConfirmation = ConvertFromTab::getOrderConfirmation(data);
if (orderConfirmation.orderType == ConvertFromTab::OrderType_e::Relocation)
{
DEBUG_LOG() << "relocationOrderConfirmationReceived(orderConfirmation)";
DEBUG_LOG(m_logger) << "relocationOrderConfirmationReceived(orderConfirmation)";
m_mainHandler->handlerEffectShowActorRelocation()->relocationOrderConfirmationReceived(orderConfirmation);
}
else
{
DEBUG_LOG() << "effectShowOrderConfirmationReceived(orderConfirmation)";
DEBUG_LOG(m_logger) << "effectShowOrderConfirmationReceived(orderConfirmation)";
m_mainHandler->handlerEffectShow()->effectShowOrderConfirmationReceived(orderConfirmation);
}
break;
@@ -224,14 +224,14 @@ void HandlerTabData::onFireSmokeMarkerDataChanged(const TrainingAreaBase::FireSm
//-----------------------------------------------------------------------------
void HandlerTabData::publishVehicleStatus(const EffectShowManagement::EffectShowVehicleStatus &vehicleStatus)
{
DEBUG_LOG() << "Vehicle Status published esmParticipantId: " << vehicleStatus.esmParticipantId() << ' ' << vehicleStatus.operational();
DEBUG_LOG(m_logger) << "Vehicle Status published esmParticipantId: " << vehicleStatus.esmParticipantId() << ' ' << vehicleStatus.operational();
m_mainHandler->dds()->dts()->publish(vehicleStatus);
} // end of publishVehicleStatus()
//-----------------------------------------------------------------------------
void HandlerTabData::sendAdlerFqFb(const int aesId)
{
DEBUG_LOG() << "Send Adler Feuerbereitschaft";
DEBUG_LOG(m_logger) << "Send Adler Feuerbereitschaft";
TrainingAreaBase::AdlerFqFbRequest out;
out.aesItemId(aesId);
@@ -241,10 +241,10 @@ void HandlerTabData::sendAdlerFqFb(const int aesId)
void HandlerTabData::onAdlerFqFbReply(const Core::FunctionReplyObject &reply)
{
if (reply.error())
ERROR_LOG() << "Adler Feuerbereitschaft could not be send: " << reply.str()
ERROR_LOG(m_logger) << "Adler Feuerbereitschaft could not be send: " << reply.str()
<< ", id:" << reply.id();
else
DEBUG_LOG() << "Adler Feuerbereitschaft successfully to TAB!";
DEBUG_LOG(m_logger) << "Adler Feuerbereitschaft successfully to TAB!";
}
@@ -102,6 +102,7 @@ public:
void sendAdlerFqFb(const int aesId);
protected:
NGL::INGLLogger &m_logger;
void onSendFireSmokeMarkerDataReply(const Core::FunctionReplyObject &reply) override final;
void onAdlerFqFbReply(const Core::FunctionReplyObject &reply) override final;
@@ -41,13 +41,13 @@ Initialization::~Initialization()
bool Initialization::initialize(const std::shared_ptr<DDSConnector::DdsConnector> &ddsConnector, const QSqlDatabase &sqlDb)
{
INFO_LOG() << "Start EffectShowManagement Initialization.";
INFO_LOG(m_logger) << "Start EffectShowManagement Initialization.";
// initialize DDS
m_ddsHandler = std::make_shared<DdsHandler>(ddsConnector);
if (!m_ddsHandler->init())
{
ERROR_LOG() << "Initialisation DdsHandler failed.";
ERROR_LOG(m_logger) << "Initialisation DdsHandler failed.";
return false;
}
@@ -55,7 +55,7 @@ bool Initialization::initialize(const std::shared_ptr<DDSConnector::DdsConnector
m_dbHandler = std::make_shared<DbHandler>();
if (!m_dbHandler->init(ddsConnector->getPartitionId(), sqlDb))
{
ERROR_LOG() << "Initialisation DbHandler failed.";
ERROR_LOG(m_logger) << "Initialisation DbHandler failed.";
return false;
}
@@ -76,7 +76,7 @@ bool Initialization::initialize(const std::shared_ptr<DDSConnector::DdsConnector
// initialize handlerAesData
m_handlerAesData = std::make_shared<HandlerAesData>(this);
INFO_LOG() << "EffectShowManagement initialized.";
INFO_LOG(m_logger) << "EffectShowManagement initialized.";
return true;
@@ -98,43 +98,43 @@ bool Initialization::loadFromDatabase()
if (!m_handlerEffectShow->init())
{
ERROR_LOG() << "Initialisation handlerEffectShow failed.";
ERROR_LOG(m_logger) << "Initialisation handlerEffectShow failed.";
return false;
}
if (!m_handlerEffectShowActorRelocation->init())
{
ERROR_LOG() << "Initialisation handlerEffectShowActorRelocation failed.";
ERROR_LOG(m_logger) << "Initialisation handlerEffectShowActorRelocation failed.";
return false;
}
if (!m_handlerEffectShowVehicleStatus->init())
{
ERROR_LOG() << "Initialisation HandlerEffectShowVehicleStatus failed.";
ERROR_LOG(m_logger) << "Initialisation HandlerEffectShowVehicleStatus failed.";
return false;
}
if (!m_handlerPpmData->init())
{
ERROR_LOG() << "Initialisation HandlerPpmData failed.";
ERROR_LOG(m_logger) << "Initialisation HandlerPpmData failed.";
return false;
}
if (!m_handlerMdmData->init())
{
ERROR_LOG() << "Initialisation HandlerMdmData failed.";
ERROR_LOG(m_logger) << "Initialisation HandlerMdmData failed.";
return false;
}
if (!m_handlerTabData->init())
{
ERROR_LOG() << "Initialisation HandlerTabData failed.";
ERROR_LOG(m_logger) << "Initialisation HandlerTabData failed.";
return false;
}
if (!m_handlerAesData->init())
{
ERROR_LOG() << "Initialisation HandlerAesData failed.";
ERROR_LOG(m_logger) << "Initialisation HandlerAesData failed.";
return false;
}
@@ -52,6 +52,7 @@ public:
int exerciseId() const;
private:
NGL::INGLLogger &m_logger;
std::shared_ptr<DdsHandler> m_ddsHandler;
std::shared_ptr<DbHandler> m_dbHandler;
@@ -15,10 +15,9 @@ namespace EffectShowManagement
{
//=============================================================================
ObjectAesData::ObjectAesData(Initialization *mainHandler,
QObject *parent)
: QObject(parent)
, m_mainHandler(mainHandler)
{
QObject *parent) : QObject(parent)
, m_mainHandler(mainHandler),
m_logger(NGL::NGLLoggerBootstrap::getLogger()) {
}
//=============================================================================
@@ -29,7 +28,7 @@ Core::FunctionReplyObject ObjectAesData::createObject(const Database::EsmAesData
if (!m_mainHandler->db()->insert(m_data))
return Core::FunctionReplyObject(m_data.idAes, tr_lts("dds", "Error inserting EsmAesData into database."));
DEBUG_LOG() << "New EsmAesData Id: " << m_data.idAes;
DEBUG_LOG(m_logger) << "New EsmAesData Id: " << m_data.idAes;
return Core::FunctionReplyObject(m_data.idAes);
}
//=============================================================================
@@ -40,7 +39,7 @@ Core::FunctionReplyObject ObjectAesData::updateObject(const Database::EsmAesData
if (!m_mainHandler->db()->update(m_data))
return Core::FunctionReplyObject(m_data.idAes, tr_lts("dds", "Error updating EsmAesData into database"));
DEBUG_LOG() << "Data changed for EsmAesData Id: " << m_data.idAes;
DEBUG_LOG(m_logger) << "Data changed for EsmAesData Id: " << m_data.idAes;
return Core::FunctionReplyObject(m_data.idAes);
}
@@ -72,7 +71,7 @@ bool ObjectAesData::dataChanged(const Database::EsmAesData &data) const
if (m_data.nameAes != data.nameAes)
return true;
DEBUG_LOG() << "Data Volley: " << data.volley << " old: " << m_data.volley;
DEBUG_LOG(m_logger) << "Data Volley: " << data.volley << " old: " << m_data.volley;
return (m_data.chargeTypeId != data.chargeTypeId)
|| (m_data.effectStart != data.effectStart)
|| (m_data.effectStateId == AreaEffectSimulation::AesEffectState::EsFired)
@@ -92,6 +92,7 @@ public:
static Database::EsmAesData asEsmAesData(const AreaEffectSimulation::EffectCluster &data);
private:
NGL::INGLLogger &m_logger;
Initialization *m_mainHandler;
Database::EsmAesData m_data;
};
@@ -39,7 +39,7 @@ Core::FunctionReplyObject ObjectEffectShow::createObject(const Database::EsmEffe
return Core::FunctionReplyObject(m_data.id, tr_lts("dds", "Error updating EffectShow into database"));
}
DEBUG_LOG() << "createObject(db) complete ->"
DEBUG_LOG(m_logger) << "createObject(db) complete ->"
<< "\n id " << m_data.id
<< "\n centerPosition " << LtsCoordTrans::mgrsFromGeographic(m_data.centerPosition.x(), m_data.centerPosition.y())
<< "\n idAreaEffectSimulation " << m_data.idAreaEffectSimulation
@@ -79,7 +79,7 @@ Core::FunctionReplyObject ObjectEffectShow::updateObject(const EffectShowManagem
if (m_data.orderConfirmation == EffectShowManagement::OrderConfirmation_e_def::Execution)
return Core::FunctionReplyObject(data.id(), tr_lts("dds", "Changes rejected due to Effect Show in execution."));
DEBUG_LOG() << "updateObject(data topic) complete ->"
DEBUG_LOG(m_logger) << "updateObject(data topic) complete ->"
<< "\n id " << m_data.id << " new: " << data.id()
<< "\n centerPosition x " << m_data.centerPosition.x() << " new: " << data.position().lon()
<< "\n centerPosition y " << m_data.centerPosition.y() << " new: " << data.position().lat()
@@ -120,7 +120,7 @@ Core::FunctionReplyObject ObjectEffectShow::updateObject(const EffectShowManagem
if (!m_mainHandler->db()->update(m_data))
return Core::FunctionReplyObject(m_data.id, tr_lts("dds", "Error updating EffectShow into database"));
DEBUG_LOG() << "Data changed for EffectShow Id: " << m_data.id;
DEBUG_LOG(m_logger) << "Data changed for EffectShow Id: " << m_data.id;
// Publish Data via DTS
onPublishData();
@@ -130,7 +130,7 @@ Core::FunctionReplyObject ObjectEffectShow::updateObject(const EffectShowManagem
//=============================================================================
bool ObjectEffectShow::updateObject(const ConvertFromTab::OrderConfirmation_t &data)
{
DEBUG_LOG() << "updateObject() partly ->"
DEBUG_LOG(m_logger) << "updateObject() partly ->"
<< "\n orderConfirmation " << m_data.orderConfirmation << " new: " << data.confirmation.underlying()
<< "\n answerText " << m_data.answerText << " new: " << data.answerText;
@@ -139,7 +139,7 @@ bool ObjectEffectShow::updateObject(const ConvertFromTab::OrderConfirmation_t &d
if (!m_mainHandler->db()->update(m_data))
{
ERROR_LOG() << "Effect Show Order Confirmation can_t be updated Id: " << m_data.id;
ERROR_LOG(m_logger) << "Effect Show Order Confirmation can_t be updated Id: " << m_data.id;
return false;
}
@@ -151,7 +151,7 @@ bool ObjectEffectShow::updateObject(const ConvertFromTab::OrderConfirmation_t &d
//=============================================================================
bool ObjectEffectShow::updateObject(const Database::EsmEffectShow &data)
{
DEBUG_LOG() << "updateObject(db) complete ->"
DEBUG_LOG(m_logger) << "updateObject(db) complete ->"
<< "\n id " << m_data.id << " new: " << data.id
<< "\n centerPosition x " << m_data.centerPosition.x() << " new: " << data.centerPosition.x()
<< "\n centerPosition y " << m_data.centerPosition.y() << " new: " << data.centerPosition.y()
@@ -176,7 +176,7 @@ bool ObjectEffectShow::updateObject(const Database::EsmEffectShow &data)
if (!m_mainHandler->db()->update(m_data))
{
ERROR_LOG() << "Failed effect Show updated Id: " << m_data.id;
ERROR_LOG(m_logger) << "Failed effect Show updated Id: " << m_data.id;
return false;
}
@@ -194,7 +194,7 @@ bool ObjectEffectShow::resetOrderConfirmation()
if (!m_mainHandler->db()->update(m_data))
{
ERROR_LOG() << "Effect Show Order Confirmation can_t be updated Id: " << m_data.id;
ERROR_LOG(m_logger) << "Effect Show Order Confirmation can_t be updated Id: " << m_data.id;
return false;
}
@@ -220,7 +220,7 @@ ConvertToTab::EffectShowOrder_t ObjectEffectShow::getEffectShowOrder() const
order.typeOfAmmunition = m_data.typeOfAmmunition;
order.name = m_data.nameAreaEfffectSimulation;
DEBUG_LOG() << "getEffectShowOrder():"
DEBUG_LOG(m_logger) << "getEffectShowOrder():"
<< "\n idEffectShow " << order.idEffectShow
<< "\n areaDepth " << order.areaDepth
<< "\n areaWidth " << order.areaWidth
@@ -242,7 +242,7 @@ ConvertToTab::RetractOrder_t ObjectEffectShow::getRetractOrder() const
order.id = m_data.id;
order.orderType = 1;
DEBUG_LOG() << "getRetractOrder():"
DEBUG_LOG(m_logger) << "getRetractOrder():"
<< "\n id " << order.id
<< "\n orderType " << (int)order.orderType;
return order;
@@ -254,7 +254,7 @@ ConvertToTab::EffectShowContinue_t ObjectEffectShow::getContinueOrder() const
order.idEffectShow = m_data.id;
order.executionTime = m_data.startTime / 1000; // [ms] -> [s]
DEBUG_LOG() << "getContinueOrder():"
DEBUG_LOG(m_logger) << "getContinueOrder():"
<< "\n id " << order.idEffectShow
<< "\n orderType " << order.executionTime;
@@ -288,10 +288,10 @@ void ObjectEffectShow::onPublishData()
INFO_LOG() << "Publish EsmEffectShow-data to dds (" << m_data.id << ") ...";
INFO_LOG(m_logger) << "Publish EsmEffectShow-data to dds (" << m_data.id << ") ...";
if (!m_mainHandler->dds()->dts()->publish(ddsData))
ERROR_LOG() << "Error publishing EsmEffectShow-data to dds";
ERROR_LOG(m_logger) << "Error publishing EsmEffectShow-data to dds";
} // end of onPublishData()
//-----------------------------------------------------------------------------
} // Namespace EffectShowManagement
@@ -60,6 +60,7 @@ public Q_SLOTS:
void onPublishData();
private:
NGL::INGLLogger &m_logger;
Initialization *m_mainHandler;
Database::EsmEffectShow m_data;
bool m_bRemoveFromDdsOnDestruction = true;
@@ -31,7 +31,7 @@ Core::FunctionReplyObject ObjectEffectShowActorRelocation::createObject(const Da
if (!m_mainHandler->db()->insert(m_data))
return Core::FunctionReplyObject(0, tr_lts("dds", "Error inserting Effect Show Actor Relocation into database."));
DEBUG_LOG() << "New Effect Show Actor Relocation Id: " << m_data.id;
DEBUG_LOG(m_logger) << "New Effect Show Actor Relocation Id: " << m_data.id;
}
// Publish Data via DTS
@@ -50,7 +50,7 @@ Core::FunctionReplyObject ObjectEffectShowActorRelocation::updateObject(const Da
if (!m_mainHandler->db()->update(m_data))
return Core::FunctionReplyObject(m_data.id, tr_lts("dds", "Error updating EffectShowActorRelocation into database"));
DEBUG_LOG() << "Data changed for EffectShowActorRelocation Id: " << m_data.id;
DEBUG_LOG(m_logger) << "Data changed for EffectShowActorRelocation Id: " << m_data.id;
// Publish Data via DTS
onPublishData();
@@ -80,10 +80,10 @@ void ObjectEffectShowActorRelocation::onPublishData()
ddsData.isDeleted(false);
ddsData.isUsed(false);
INFO_LOG() << "Publish EsmEffectShowActorRelocation-data to dds (" << m_data.id << ") ...";
INFO_LOG(m_logger) << "Publish EsmEffectShowActorRelocation-data to dds (" << m_data.id << ") ...";
if (!m_mainHandler->dds()->dts()->publish(ddsData))
ERROR_LOG() << "Error publishing EsmEffectShowActorRelocation-data to dds";
ERROR_LOG(m_logger) << "Error publishing EsmEffectShowActorRelocation-data to dds";
}
//=============================================================================
ConvertToTab::RelocationOrder_t ObjectEffectShowActorRelocation::getRelocationOrder() const
@@ -51,6 +51,7 @@ public:
static Database::EsmEffectShowActorRelocation ddsToDb(const EffectShowManagement::EffectShowActorRelocation &ddsData);
protected:
NGL::INGLLogger &m_logger;
void onPublishData();
private:
@@ -54,11 +54,11 @@ void ObjectEffectShowVehicleStatus::createObject()
{
if (!m_mainHandler->db()->insert(m_data))
{
ERROR_LOG() << "Error inserting EsmEffectShowVehicleStatus into database. esmParticipantId" << m_data.esmParticipantId;
ERROR_LOG(m_logger) << "Error inserting EsmEffectShowVehicleStatus into database. esmParticipantId" << m_data.esmParticipantId;
return;
}
DEBUG_LOG() << "New Effect Show Vehicle Status esmParticipantId: " << m_data.esmParticipantId;
DEBUG_LOG(m_logger) << "New Effect Show Vehicle Status esmParticipantId: " << m_data.esmParticipantId;
// Publish Data via DTS
onPublishData();
@@ -68,17 +68,17 @@ void ObjectEffectShowVehicleStatus::updateObject()
{
if (m_data.esmParticipantId <= 0)
{
ERROR_LOG() << "Update object illegal esmParticipantId: " << m_data.esmParticipantId;
ERROR_LOG(m_logger) << "Update object illegal esmParticipantId: " << m_data.esmParticipantId;
return;
}
if (!m_mainHandler->db()->update(m_data))
{
ERROR_LOG() << "Error updating EsmEffectShowVehicleStatus into database esmParticipantId: " << m_data.esmParticipantId;
ERROR_LOG(m_logger) << "Error updating EsmEffectShowVehicleStatus into database esmParticipantId: " << m_data.esmParticipantId;
return;
}
DEBUG_LOG() << "Data changed for EsmEffectShowVehicleStatus esmParticipantId: " << m_data.esmParticipantId;
DEBUG_LOG(m_logger) << "Data changed for EsmEffectShowVehicleStatus esmParticipantId: " << m_data.esmParticipantId;
// Publish Data via DTS
onPublishData();
@@ -88,7 +88,7 @@ void ObjectEffectShowVehicleStatus::removeObject()
{
if (!m_mainHandler->db()->removeEsmEffectShowVehicleStatus(m_data.esmParticipantId))
{
ERROR_LOG() << "EsmEffectShowVehicleStatus can not be removed eqpNum: " << m_data.esmParticipantId;
ERROR_LOG(m_logger) << "EsmEffectShowVehicleStatus can not be removed eqpNum: " << m_data.esmParticipantId;
return;
}
}
@@ -110,10 +110,10 @@ void ObjectEffectShowVehicleStatus::onPublishData()
ddsData.nameEffectShowActor(m_data.nameEffectShowActor.toStdString());
ddsData.operational(m_data.operational);
ddsData.sampleTime(m_data.timestamp);
INFO_LOG() << "Publish EsmEffectShowVehicleStatus-data to dds (" << m_data.esmParticipantId << ") ...";
INFO_LOG(m_logger) << "Publish EsmEffectShowVehicleStatus-data to dds (" << m_data.esmParticipantId << ") ...";
if (!m_mainHandler->dds()->dts()->publish(ddsData))
ERROR_LOG() << "Error publishing EsmEffectShowVehicleStatus-data to dds";
ERROR_LOG(m_logger) << "Error publishing EsmEffectShowVehicleStatus-data to dds";
}
} // Namespace EffectShowManagement
@@ -61,6 +61,7 @@ public:
protected:
NGL::INGLLogger &m_logger;
void onPublishData();
private: