Qt6 Migration: DDS-Stubs, Logger-Fixes, Export-Header Korrekturen
- NGL_ADD_LIBRARY2: 87 CMakeLists.txt konvertiert für Export-Header Generierung - 44 Export-Header Include-Pfade korrigiert (_export.h) - 81 DDS-Stub-Header generiert (*_dtc.h, *_fts.h, *_dts.h, *_ftc.h) - INGLLogger: Duplikat gelöscht, m_logger Member entfernt, variadische Makros - Q_FUNC_INFO Redefinition behoben (Qt6 definiert bereits) - FATAL_LOG Makro hinzugefügt - InfrastructureManagement DDS-Stubs (ism.hpp, ism_enums.hpp, ism_ftc.h) - FilterManagement DDS-Stubs (flt_ftc.h, flt_dts.h) - AreaEffectSimulation DDS-Stubs (aes.hpp, aes_enums.hpp) - SymbolAppearance Klasse vollständig definiert mit content() Methode - BuildingComponentFilter Klasse definiert mit Copy-Konstruktor - Ftc Factory: nullptr Return (abstract class) - AesFilter Klasse in aes.hpp hinzugefügt - Dtc Klasse in ppm.hpp mit participantChanged Signal - AesType Enum: alle 15 At* Werte definiert - AesEffectState_def: EsReceived hinzugefügt - DataModification Enum: eAdded/eModified/eRemoved - function_reply_object.h → core_types.h Include-Pfad (72 Dateien) - Enum-Class-Streaming Template-Operator in INGLLogger.h - ism_mounting_point.h: QImage → QtGui/QImage, QGuiApplication/QScreen - ism_data_plugin_interface.h: QSet Include, Include-Reihenfolge - QRegExp → QRegularExpression in tpm_js_parser.cpp - .underlying() Aufrufe zu direktem Enum-Vergleich korrigiert - Include-Pfade: aes.hpp in symbol_appearance_settings_impl.h und aes_display_filter_impl.h Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
2785 files changed
+18754
-18316
No files matched your search
@@ -32,7 +32,7 @@ CODEGEN_CLIENT_TOPICS_IFC(SRCS_common ${xml_FILE})
|
||||
# Generate esm_db_impl.cpp/.h, esm_db.h
|
||||
CODEGEN_DATABASE(SRCS_common ${xml_FILE})
|
||||
|
||||
NGL_ADD_LIBRARY(AAR SV WS svcEsmCommon SHARED ${SRCS_common})
|
||||
NGL_ADD_LIBRARY2(AAR SV WS svcEsmCommon SHARED ${SRCS_common})
|
||||
NGL_TARGET_INCLUDE_DIRECTORIES(svcEsmCommon
|
||||
PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../
|
||||
@@ -60,7 +60,7 @@ SET(SRCS_client
|
||||
# generate esm_[d|f]tc.h, esm_[d|f]tc_impl.[cpp|h]
|
||||
CODEGEN_CLIENT_TOPICS_IMPL(SRCS_client ${xml_FILE})
|
||||
|
||||
NGL_ADD_LIBRARY(AAR SV WS svcEsmClient SHARED ${SRCS_client})
|
||||
NGL_ADD_LIBRARY2(AAR SV WS svcEsmClient SHARED ${SRCS_client})
|
||||
NGL_TARGET_INCLUDE_DIRECTORIES(svcEsmClient
|
||||
PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../
|
||||
@@ -133,7 +133,7 @@ CODEGEN_SERVER_TOPICS(SRCS_server ${xml_FILE})
|
||||
CODEGEN_SQL(SRCS_server ${xml_FILE})
|
||||
|
||||
NGL_ADD_SVC_ICON(SRCS_server)
|
||||
NGL_ADD_LIBRARY(AAR SV svcEsmServer SHARED ${SRCS_server})
|
||||
NGL_ADD_LIBRARY2(AAR SV svcEsmServer SHARED ${SRCS_server})
|
||||
NGL_TARGET_INCLUDE_DIRECTORIES(svcEsmServer
|
||||
PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../
|
||||
|
||||
@@ -16,18 +16,17 @@ namespace EffectShowManagement
|
||||
|
||||
DdsHandler::DdsHandler(const std::shared_ptr<DDSConnector::DdsConnector> &ddsConnector)
|
||||
: m_ddsConnector(ddsConnector)
|
||||
, m_logger(getLogger("DdsHandler"))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "DdsHandler(" << m_ddsConnector->getDomainId() << ") for partition: " << m_ddsConnector->getDefaultPartition();
|
||||
DEBUG_LOG() << "DdsHandler(" << m_ddsConnector->getDomainId() << ") for partition: " << m_ddsConnector->getDefaultPartition();
|
||||
}
|
||||
|
||||
bool DdsHandler::init(const QStringList &qosFileList)
|
||||
{
|
||||
INFO_LOG(m_logger) << "--- StartEffectShowManagement DDSHandler.";
|
||||
INFO_LOG() << "--- StartEffectShowManagement DDSHandler.";
|
||||
|
||||
if (!m_ddsConnector->init(qosFileList))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error initializing dds connections - aborting";
|
||||
ERROR_LOG() << "Error initializing dds connections - aborting";
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -45,13 +44,13 @@ bool DdsHandler::init(const QStringList &qosFileList)
|
||||
|
||||
if (!m_ddsDts->enableAll())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Could not Dts enableAll";
|
||||
ERROR_LOG() << "Could not Dts enableAll";
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!m_ddsFts->enableAll())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Could not Fts enableAll";
|
||||
ERROR_LOG() << "Could not Fts enableAll";
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -59,18 +58,18 @@ bool DdsHandler::init(const QStringList &qosFileList)
|
||||
m_dtcAes = AreaEffectSimulation::Interface::Dtc::create(m_ddsConnector);
|
||||
if (!m_dtcAes->enableExplosionArea())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Could not initialize enableExplosionArea data topic client";
|
||||
ERROR_LOG() << "Could not initialize enableExplosionArea data topic client";
|
||||
return false;
|
||||
}
|
||||
if (!m_dtcAes->enableExplosionSingle())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Could not initialize enableExplosionArea data topic client";
|
||||
ERROR_LOG() << "Could not initialize enableExplosionArea data topic client";
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!m_dtcAes->enableMineArea())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Could not initialize enableMineArea data topic client";
|
||||
ERROR_LOG() << "Could not initialize enableMineArea data topic client";
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -79,7 +78,7 @@ bool DdsHandler::init(const QStringList &qosFileList)
|
||||
m_ftcAes = AreaEffectSimulation::Interface::Ftc::create(m_ddsConnector);
|
||||
if (!m_ftcAes->enableSetAesItemEffectorState(true))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Could not initialize enableSetAesItemEffectorState data topic client";
|
||||
ERROR_LOG() << "Could not initialize enableSetAesItemEffectorState data topic client";
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -88,13 +87,13 @@ bool DdsHandler::init(const QStringList &qosFileList)
|
||||
|
||||
if (!m_dtcPpm->enableParticipant())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Could not initialize Participant data topic client";
|
||||
ERROR_LOG() << "Could not initialize Participant data topic client";
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!m_dtcPpm->enableType())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Could not initialize Participant type data topic client";
|
||||
ERROR_LOG() << "Could not initialize Participant type data topic client";
|
||||
return false;
|
||||
}
|
||||
m_dtcPpm->waitForHistoricalDataType();
|
||||
@@ -104,7 +103,7 @@ bool DdsHandler::init(const QStringList &qosFileList)
|
||||
|
||||
if (!m_dtcPdm->enableChargeType())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error initializing ProjectDataManagement DTC";
|
||||
ERROR_LOG() << "Error initializing ProjectDataManagement DTC";
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -113,7 +112,7 @@ bool DdsHandler::init(const QStringList &qosFileList)
|
||||
|
||||
if (!m_dtcMdm->enableMeteoData())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error initializing MeteoDataManagement DTC";
|
||||
ERROR_LOG() << "Error initializing MeteoDataManagement DTC";
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -122,19 +121,19 @@ bool DdsHandler::init(const QStringList &qosFileList)
|
||||
|
||||
if (!m_dtcTab->enableFireSmokeMarkerData())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error initializing TrainingAreaBase DTC";
|
||||
ERROR_LOG() << "Error initializing TrainingAreaBase DTC";
|
||||
return false;
|
||||
}
|
||||
|
||||
m_ftcTab = TrainingAreaBase::Interface::Ftc::create(m_ddsConnector);
|
||||
if (!m_ftcTab->enableSendFireSmokeMarkerData())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error initializing TrainingAreaBase FTC";
|
||||
ERROR_LOG() << "Error initializing TrainingAreaBase FTC";
|
||||
return false;
|
||||
}
|
||||
if (!m_ftcTab->enableAdlerFqFb())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error initializing TrainingAreaBase FTC";
|
||||
ERROR_LOG() << "Error initializing TrainingAreaBase FTC";
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -79,7 +79,6 @@ private:
|
||||
std::shared_ptr<MeteoDataManagement::Interface::Dtc> m_dtcMdm;
|
||||
std::shared_ptr<TrainingAreaBase::Interface::Dtc> m_dtcTab;
|
||||
std::shared_ptr<TrainingAreaBase::Interface::Ftc> m_ftcTab;
|
||||
NGL::INGLLogger &m_logger;
|
||||
};
|
||||
|
||||
} // namespace EffectShowManagement
|
||||
+11
-12
@@ -19,7 +19,6 @@ EffectShowEffectCluster::EffectShowEffectCluster(const AreaEffectSimulation::Eff
|
||||
: m_effectCluster(effectCluster)
|
||||
, m_handlerPdmData(handlerPdmData)
|
||||
, m_numOfEffectShows(0)
|
||||
, m_logger(getLogger("EffectShowEffectCluster"))
|
||||
{
|
||||
}
|
||||
|
||||
@@ -83,7 +82,7 @@ Database::EsmEffectShow EffectShowEffectCluster::getEffectShow(int idx)
|
||||
if (esmEffectShow.shotsPerVolley <= 0)
|
||||
esmEffectShow.shotsPerVolley = 1;
|
||||
|
||||
DEBUG_LOG(m_logger) << "recalc effectDuration ";
|
||||
DEBUG_LOG() << "recalc effectDuration ";
|
||||
|
||||
if (m_effectCluster.effectDuration() == DEFAULT_EFFECT_DURATION)
|
||||
{
|
||||
@@ -95,7 +94,7 @@ Database::EsmEffectShow EffectShowEffectCluster::getEffectShow(int idx)
|
||||
{
|
||||
//use default
|
||||
esmEffectShow.duration = Settings::getDefaultCadence() * esmEffectShow.shotsPerVolley;
|
||||
DEBUG_LOG(m_logger) << " recalc effectDuration use default value as fireoncommand " << esmEffectShow.duration ;
|
||||
DEBUG_LOG() << " recalc effectDuration use default value as fireoncommand " << esmEffectShow.duration ;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -103,13 +102,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(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());
|
||||
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());
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Use effectDuration directly ";
|
||||
DEBUG_LOG() << "Use effectDuration directly ";
|
||||
esmEffectShow.duration = m_effectCluster.effectDuration();
|
||||
}
|
||||
esmEffectShow.lowerLeftPosition = lowerLeftPosRotated.geographic();
|
||||
@@ -118,7 +117,7 @@ Database::EsmEffectShow EffectShowEffectCluster::getEffectShow(int idx)
|
||||
esmEffectShow.areaRotation = m_effectCluster.area().rotation() + 90;
|
||||
|
||||
|
||||
DEBUG_LOG(m_logger) << "\nWidth: " << m_effectCluster.area().width() << " Height: " << m_effectCluster.area().height()
|
||||
DEBUG_LOG() << "\nWidth: " << m_effectCluster.area().width() << " Height: " << m_effectCluster.area().height()
|
||||
<< "\nRotated LL Pos: " << lowerLeftPosRotated.mgrs()
|
||||
<< "\nduration: " << esmEffectShow.duration
|
||||
<< "\nRotated Center Pos: " << centerPosRotated.mgrs()
|
||||
@@ -156,7 +155,7 @@ Database::EsmEffectShow EffectShowEffectCluster::getEffectShow(int idx)
|
||||
esmEffectShow.areaDepth = m_effectCluster.area().height();
|
||||
esmEffectShow.areaRotation = m_effectCluster.area().rotation() + 90;
|
||||
|
||||
DEBUG_LOG(m_logger) << "\nWidth: " << m_effectCluster.area().width() << " Height: " << m_effectCluster.area().height()
|
||||
DEBUG_LOG() << "\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();
|
||||
@@ -168,12 +167,12 @@ Database::EsmEffectShow EffectShowEffectCluster::getEffectShow(int idx)
|
||||
void EffectShowEffectCluster::updateEffectShow(Database::EsmEffectShow &data)
|
||||
{
|
||||
|
||||
DEBUG_LOG(m_logger) << "update EffectSHow for (" << data.id << ")";
|
||||
DEBUG_LOG() << "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(m_logger) << "Recalc effectDuration ";
|
||||
DEBUG_LOG() << "Recalc effectDuration ";
|
||||
|
||||
if (m_effectCluster.effectDuration() == DEFAULT_EFFECT_DURATION)
|
||||
{
|
||||
@@ -185,7 +184,7 @@ void EffectShowEffectCluster::updateEffectShow(Database::EsmEffectShow &data)
|
||||
{
|
||||
//use default
|
||||
data.duration = Settings::getDefaultCadence() * data.shotsPerVolley;
|
||||
DEBUG_LOG(m_logger) << " recalc effectDuration use default value as fireoncommand " << data.duration ;
|
||||
DEBUG_LOG() << " recalc effectDuration use default value as fireoncommand " << data.duration ;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -193,13 +192,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(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());
|
||||
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());
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Use effectDuration directly ";
|
||||
DEBUG_LOG() << "Use effectDuration directly ";
|
||||
data.duration = m_effectCluster.effectDuration();
|
||||
}
|
||||
|
||||
|
||||
-3
@@ -122,9 +122,6 @@ private:
|
||||
areas_t m_areasDepth; // squares in y-direction
|
||||
|
||||
LtsCoordTrans::UtmCoordinate m_lowerLeftPos;
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
+3
-4
@@ -14,7 +14,6 @@ EffectShowExplosionArea::EffectShowExplosionArea(const AreaEffectSimulation::Exp
|
||||
: m_explosionArea(explosionArea)
|
||||
, m_handlerPdmData(handlerPdmData)
|
||||
, m_numOfEffectShows(0)
|
||||
, m_logger(getLogger("EffectShowExplosionArea"))
|
||||
{
|
||||
}
|
||||
|
||||
@@ -83,7 +82,7 @@ Database::EsmEffectShow EffectShowExplosionArea::getEffectShow(int idx)
|
||||
esmEffectShow.areaRotation = m_explosionArea.area().rotation() + 90;
|
||||
|
||||
|
||||
DEBUG_LOG(m_logger) << "\nWidth: " << m_explosionArea.area().width() << " Height: " << m_explosionArea.area().height()
|
||||
DEBUG_LOG() << "\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
|
||||
@@ -120,7 +119,7 @@ Database::EsmEffectShow EffectShowExplosionArea::getEffectShow(int idx)
|
||||
esmEffectShow.areaDepth = m_explosionArea.area().height();
|
||||
esmEffectShow.areaRotation = m_explosionArea.area().rotation() + 90;
|
||||
|
||||
DEBUG_LOG(m_logger) << "\nWidth: " << m_explosionArea.area().width() << " Height: " << m_explosionArea.area().height()
|
||||
DEBUG_LOG() << "\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();
|
||||
@@ -158,7 +157,7 @@ void EffectShowExplosionArea::calculateSquare()
|
||||
else
|
||||
m_numOfEffectShows = m_areasWidth.numOfAreas * m_areasDepth.numOfAreas;
|
||||
|
||||
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;
|
||||
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;
|
||||
}
|
||||
//static ----------------------------------------------------------------------
|
||||
LtsCoordTrans::UtmCoordinate EffectShowExplosionArea::rotate(const LtsCoordTrans::UtmCoordinate &p, const LtsCoordTrans::UtmCoordinate &c, double angle)
|
||||
|
||||
-3
@@ -124,9 +124,6 @@ private:
|
||||
areas_t m_areasDepth; // squares in y-direction
|
||||
|
||||
LtsCoordTrans::UtmCoordinate m_lowerLeftPos;
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
+3
-4
@@ -14,7 +14,6 @@ EffectShowExplosionCluster::EffectShowExplosionCluster(const AreaEffectSimulatio
|
||||
: m_explosionCluster(explosionCluster)
|
||||
, m_handlerPdmData(handlerPdmData)
|
||||
, m_numOfEffectShows(0)
|
||||
, m_logger(getLogger("EffectShowExplosionCluster"))
|
||||
{
|
||||
}
|
||||
|
||||
@@ -83,7 +82,7 @@ Database::EsmEffectShow EffectShowExplosionCluster::getEffectShow(int idx)
|
||||
esmEffectShow.areaRotation = m_explosionCluster.area().rotation() + 90;
|
||||
|
||||
|
||||
DEBUG_LOG(m_logger) << "\nWidth: " << m_explosionCluster.area().width() << " Height: " << m_explosionCluster.area().height()
|
||||
DEBUG_LOG() << "\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
|
||||
@@ -120,7 +119,7 @@ Database::EsmEffectShow EffectShowExplosionCluster::getEffectShow(int idx)
|
||||
esmEffectShow.areaDepth = m_explosionCluster.area().height();
|
||||
esmEffectShow.areaRotation = m_explosionCluster.area().rotation() + 90;
|
||||
|
||||
DEBUG_LOG(m_logger) << "\nWidth: " << m_explosionCluster.area().width() << " Height: " << m_explosionCluster.area().height()
|
||||
DEBUG_LOG() << "\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();
|
||||
@@ -132,7 +131,7 @@ Database::EsmEffectShow EffectShowExplosionCluster::getEffectShow(int idx)
|
||||
void EffectShowExplosionCluster::updateEffectShow(Database::EsmEffectShow &data)
|
||||
{
|
||||
|
||||
DEBUG_LOG(m_logger) << "update EffectSHow for (" << data.id << ")";
|
||||
DEBUG_LOG() << "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();
|
||||
|
||||
-3
@@ -122,9 +122,6 @@ private:
|
||||
areas_t m_areasDepth; // squares in y-direction
|
||||
|
||||
LtsCoordTrans::UtmCoordinate m_lowerLeftPos;
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
+2
-3
@@ -16,7 +16,6 @@ EffectShowMineArea::EffectShowMineArea(const AreaEffectSimulation::MineArea &min
|
||||
, m_segment(getEffectShowSegment(mineArea))
|
||||
, m_utmZone(-1)
|
||||
, m_rotation(0.0)
|
||||
, m_logger(getLogger("EffectShowMineArea"))
|
||||
{
|
||||
}
|
||||
|
||||
@@ -47,9 +46,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(m_logger) << "Start Pos Segm.: " << pos.mgrs();
|
||||
DEBUG_LOG() << "Start Pos Segm.: " << pos.mgrs();
|
||||
}
|
||||
DEBUG_LOG(m_logger) << "Center Pos Effect Show: " << LtsCoordTrans::mgrsFromGeographic(esmEffectShow.centerPosition.x(), esmEffectShow.centerPosition.y());
|
||||
DEBUG_LOG() << "Center Pos Effect Show: " << LtsCoordTrans::mgrsFromGeographic(esmEffectShow.centerPosition.x(), esmEffectShow.centerPosition.y());
|
||||
return esmEffectShow;
|
||||
}
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
-1
@@ -95,7 +95,6 @@ private:
|
||||
LtsCoordTrans::UtmCoordinate m_centerPos;
|
||||
LtsCoordTrans::UtmCoordinate m_lowerLeftPos;
|
||||
double m_rotation; // math angle [degree]
|
||||
NGL::INGLLogger &m_logger;
|
||||
};
|
||||
|
||||
}
|
||||
+36
-37
@@ -18,7 +18,6 @@ using namespace EffectShowManagement;
|
||||
HandlerAesData::HandlerAesData(Initialization *mainHandler)
|
||||
: QObject()
|
||||
, m_mainHandler(mainHandler)
|
||||
, m_logger(getLogger("HandlerAesData"))
|
||||
{
|
||||
} // end of ctor()
|
||||
//=============================================================================
|
||||
@@ -31,7 +30,7 @@ HandlerAesData::~HandlerAesData()
|
||||
|
||||
bool HandlerAesData::init()
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Begin HandlerAesData";
|
||||
DEBUG_LOG() << "Begin HandlerAesData";
|
||||
|
||||
// create ObjectAesData
|
||||
auto cbAes = [this](const Database::EsmAesData & data)
|
||||
@@ -42,7 +41,7 @@ bool HandlerAesData::init()
|
||||
};
|
||||
if (!m_mainHandler->db()->select(cbAes))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error reading data from database!";
|
||||
ERROR_LOG() << "Error reading data from database!";
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -110,7 +109,7 @@ bool HandlerAesData::init()
|
||||
return false;
|
||||
}
|
||||
|
||||
DEBUG_LOG(m_logger) << "m_AesDataObjMap.size() = " << m_AesDataObjMap.size();
|
||||
DEBUG_LOG() << "m_AesDataObjMap.size() = " << m_AesDataObjMap.size();
|
||||
return true;
|
||||
} // end of init()
|
||||
|
||||
@@ -148,7 +147,7 @@ void HandlerAesData::onExplosionSingleChanged(const AreaEffectSimulation::Explos
|
||||
if (kindOfModification == HandlerEffectShow::KindOfModification_e::Added && ifs)
|
||||
kindOfModification = HandlerEffectShow::KindOfModification_e::ModifiedData;
|
||||
|
||||
DEBUG_LOG(m_logger) << "Got ExplosionArea: "
|
||||
DEBUG_LOG() << "Got ExplosionArea: "
|
||||
<< "\n ID: " << data.id()
|
||||
<< "\n Name: " << data.name()
|
||||
<< "\n Effect status: " << data.effectStateId()
|
||||
@@ -168,7 +167,7 @@ void HandlerAesData::onExplosionSingleChanged(const AreaEffectSimulation::Explos
|
||||
if (ret.error())
|
||||
{
|
||||
delete ifs;
|
||||
ERROR_LOG(m_logger) << ret();
|
||||
ERROR_LOG() << ret();
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -188,10 +187,10 @@ void HandlerAesData::onExplosionSingleChanged(const AreaEffectSimulation::Explos
|
||||
if (!ret.error())
|
||||
m_mainHandler->handlerEffectShow()->onExplosionAreaChanged(areaData, kindOfModification);
|
||||
else
|
||||
ERROR_LOG(m_logger) << ret();
|
||||
ERROR_LOG() << ret();
|
||||
}
|
||||
else
|
||||
WARNING_LOG(m_logger) << "Explosion Area not available for modification: " << data.id();
|
||||
WARNING_LOG() << "Explosion Area not available for modification: " << data.id();
|
||||
break;
|
||||
}
|
||||
case HandlerEffectShow::KindOfModification_e::Removed:
|
||||
@@ -199,11 +198,11 @@ void HandlerAesData::onExplosionSingleChanged(const AreaEffectSimulation::Explos
|
||||
if (ifs != nullptr)
|
||||
{
|
||||
if (!m_AesDataObjMap.remove(data.id()))
|
||||
ERROR_LOG(m_logger) << "Remove of AES data (" << data.id() << ") from map failed.";
|
||||
ERROR_LOG() << "Remove of AES data (" << data.id() << ") from map failed.";
|
||||
|
||||
Core::FunctionReplyObject ret = ifs->removeObject();
|
||||
if (ret.error())
|
||||
ERROR_LOG(m_logger) << ret();
|
||||
ERROR_LOG() << ret();
|
||||
}
|
||||
|
||||
m_mainHandler->handlerEffectShow()->onExplosionAreaChanged(areaData, kindOfModification);
|
||||
@@ -229,7 +228,7 @@ void HandlerAesData::onExplosionAreaChanged(const AreaEffectSimulation::Explosio
|
||||
kindOfModification = HandlerEffectShow::KindOfModification_e::ModifiedData;
|
||||
|
||||
const Core::GeoPosition2D &posLl = data.area().cornerBottomLeft();
|
||||
DEBUG_LOG(m_logger) << "Got ExplosionArea: "
|
||||
DEBUG_LOG() << "Got ExplosionArea: "
|
||||
<< "\n ID: " << data.id()
|
||||
<< "\n Name: " << data.name()
|
||||
<< "\n Effect status: " << data.effectStateId()
|
||||
@@ -252,7 +251,7 @@ void HandlerAesData::onExplosionAreaChanged(const AreaEffectSimulation::Explosio
|
||||
if (ret.error())
|
||||
{
|
||||
delete ifs;
|
||||
ERROR_LOG(m_logger) << ret();
|
||||
ERROR_LOG() << ret();
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -272,10 +271,10 @@ void HandlerAesData::onExplosionAreaChanged(const AreaEffectSimulation::Explosio
|
||||
if (!ret.error())
|
||||
m_mainHandler->handlerEffectShow()->onExplosionAreaChanged(data, kindOfModification);
|
||||
else
|
||||
ERROR_LOG(m_logger) << ret();
|
||||
ERROR_LOG() << ret();
|
||||
}
|
||||
else
|
||||
WARNING_LOG(m_logger) << "Explosion Area not available for modification: " << data.id();
|
||||
WARNING_LOG() << "Explosion Area not available for modification: " << data.id();
|
||||
break;
|
||||
}
|
||||
case HandlerEffectShow::KindOfModification_e::Removed:
|
||||
@@ -283,11 +282,11 @@ void HandlerAesData::onExplosionAreaChanged(const AreaEffectSimulation::Explosio
|
||||
if (ifs != nullptr)
|
||||
{
|
||||
if (!m_AesDataObjMap.remove(data.id()))
|
||||
ERROR_LOG(m_logger) << "Remove of AES data (" << data.id() << ") from map failed.";
|
||||
ERROR_LOG() << "Remove of AES data (" << data.id() << ") from map failed.";
|
||||
|
||||
Core::FunctionReplyObject ret = ifs->removeObject();
|
||||
if (ret.error())
|
||||
ERROR_LOG(m_logger) << ret();
|
||||
ERROR_LOG() << ret();
|
||||
}
|
||||
|
||||
m_mainHandler->handlerEffectShow()->onExplosionAreaChanged(data, kindOfModification);
|
||||
@@ -311,7 +310,7 @@ void HandlerAesData::onExplosionClusterChanged(const AreaEffectSimulation::Explo
|
||||
kindOfModification = HandlerEffectShow::KindOfModification_e::ModifiedData;
|
||||
|
||||
const Core::GeoPosition2D &posLl = data.area().cornerBottomLeft();
|
||||
DEBUG_LOG(m_logger) << ">>>> Got Cluster: "
|
||||
DEBUG_LOG() << ">>>> Got Cluster: "
|
||||
<< "\n ID: " << data.id()
|
||||
<< "\n Name: " << data.name()
|
||||
<< "\n Effect status: " << data.effectStateId()
|
||||
@@ -334,7 +333,7 @@ void HandlerAesData::onExplosionClusterChanged(const AreaEffectSimulation::Explo
|
||||
if (ret.error())
|
||||
{
|
||||
delete ifs;
|
||||
ERROR_LOG(m_logger) << ret();
|
||||
ERROR_LOG() << ret();
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -354,10 +353,10 @@ void HandlerAesData::onExplosionClusterChanged(const AreaEffectSimulation::Explo
|
||||
if (!ret.error())
|
||||
m_mainHandler->handlerEffectShow()->onExplosionClusterChanged(data, kindOfModification);
|
||||
else
|
||||
ERROR_LOG(m_logger) << ret();
|
||||
ERROR_LOG() << ret();
|
||||
}
|
||||
else
|
||||
WARNING_LOG(m_logger) << "Explosion Area not available for modification: " << data.id();
|
||||
WARNING_LOG() << "Explosion Area not available for modification: " << data.id();
|
||||
break;
|
||||
}
|
||||
case HandlerEffectShow::KindOfModification_e::Removed:
|
||||
@@ -365,11 +364,11 @@ void HandlerAesData::onExplosionClusterChanged(const AreaEffectSimulation::Explo
|
||||
if (ifs != nullptr)
|
||||
{
|
||||
if (!m_AesDataObjMap.remove(data.id()))
|
||||
ERROR_LOG(m_logger) << "Remove of AES data (" << data.id() << ") from map failed.";
|
||||
ERROR_LOG() << "Remove of AES data (" << data.id() << ") from map failed.";
|
||||
|
||||
Core::FunctionReplyObject ret = ifs->removeObject();
|
||||
if (ret.error())
|
||||
ERROR_LOG(m_logger) << ret();
|
||||
ERROR_LOG() << ret();
|
||||
}
|
||||
|
||||
m_mainHandler->handlerEffectShow()->onExplosionClusterChanged(data, kindOfModification);
|
||||
@@ -392,7 +391,7 @@ void HandlerAesData::onEffectClusterChanged(const AreaEffectSimulation::EffectCl
|
||||
kindOfModification = HandlerEffectShow::KindOfModification_e::ModifiedData;
|
||||
|
||||
const Core::GeoPosition2D &posLl = data.area().cornerBottomLeft();
|
||||
DEBUG_LOG(m_logger) << ">>>> Got EffectCluster: "
|
||||
DEBUG_LOG() << ">>>> Got EffectCluster: "
|
||||
<< "\n ID: " << data.id()
|
||||
<< "\n Name: " << data.name()
|
||||
<< "\n Effect status: " << data.effectStateId()
|
||||
@@ -415,7 +414,7 @@ void HandlerAesData::onEffectClusterChanged(const AreaEffectSimulation::EffectCl
|
||||
if (ret.error())
|
||||
{
|
||||
delete ifs;
|
||||
ERROR_LOG(m_logger) << ret();
|
||||
ERROR_LOG() << ret();
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -435,10 +434,10 @@ void HandlerAesData::onEffectClusterChanged(const AreaEffectSimulation::EffectCl
|
||||
if (!ret.error())
|
||||
m_mainHandler->handlerEffectShow()->onEffectClusterChanged(data, kindOfModification);
|
||||
else
|
||||
ERROR_LOG(m_logger) << ret();
|
||||
ERROR_LOG() << ret();
|
||||
}
|
||||
else
|
||||
WARNING_LOG(m_logger) << "Explosion Area not available for modification: " << data.id();
|
||||
WARNING_LOG() << "Explosion Area not available for modification: " << data.id();
|
||||
break;
|
||||
}
|
||||
case HandlerEffectShow::KindOfModification_e::Removed:
|
||||
@@ -446,11 +445,11 @@ void HandlerAesData::onEffectClusterChanged(const AreaEffectSimulation::EffectCl
|
||||
if (ifs != nullptr)
|
||||
{
|
||||
if (!m_AesDataObjMap.remove(data.id()))
|
||||
ERROR_LOG(m_logger) << "Remove of AES data (" << data.id() << ") from map failed.";
|
||||
ERROR_LOG() << "Remove of AES data (" << data.id() << ") from map failed.";
|
||||
|
||||
Core::FunctionReplyObject ret = ifs->removeObject();
|
||||
if (ret.error())
|
||||
ERROR_LOG(m_logger) << ret();
|
||||
ERROR_LOG() << ret();
|
||||
}
|
||||
|
||||
m_mainHandler->handlerEffectShow()->onEffectClusterChanged(data, kindOfModification);
|
||||
@@ -477,7 +476,7 @@ void HandlerAesData::onMineAreaChanged(const AreaEffectSimulation::MineArea &dat
|
||||
return;
|
||||
|
||||
const Core::GeoPosition2D &posLl = data.segments().at(data.segments().size() / 2).positionStart();
|
||||
DEBUG_LOG(m_logger) << "Got MineArea: "
|
||||
DEBUG_LOG() << "Got MineArea: "
|
||||
<< "\n ID: " << data.id()
|
||||
<< "\n Name: " << data.name()
|
||||
<< "\n Effect status: " << data.effectStateId()
|
||||
@@ -498,7 +497,7 @@ void HandlerAesData::onMineAreaChanged(const AreaEffectSimulation::MineArea &dat
|
||||
if (ret.error())
|
||||
{
|
||||
delete ifs;
|
||||
ERROR_LOG(m_logger) << ret();
|
||||
ERROR_LOG() << ret();
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -518,10 +517,10 @@ void HandlerAesData::onMineAreaChanged(const AreaEffectSimulation::MineArea &dat
|
||||
if (!ret.error())
|
||||
m_mainHandler->handlerEffectShow()->onMineAreaChanged(data, kindOfModification);
|
||||
else
|
||||
ERROR_LOG(m_logger) << ret();
|
||||
ERROR_LOG() << ret();
|
||||
}
|
||||
else
|
||||
WARNING_LOG(m_logger) << "Mine Area not available for modification: " << data.id();
|
||||
WARNING_LOG() << "Mine Area not available for modification: " << data.id();
|
||||
break;
|
||||
}
|
||||
case HandlerEffectShow::KindOfModification_e::Removed:
|
||||
@@ -529,11 +528,11 @@ void HandlerAesData::onMineAreaChanged(const AreaEffectSimulation::MineArea &dat
|
||||
if (ifs != nullptr)
|
||||
{
|
||||
if (!m_AesDataObjMap.remove(data.id()))
|
||||
ERROR_LOG(m_logger) << "Remove of AES data (" << data.id() << ") from map failed.";
|
||||
ERROR_LOG() << "Remove of AES data (" << data.id() << ") from map failed.";
|
||||
|
||||
Core::FunctionReplyObject ret = ifs->removeObject();
|
||||
if (ret.error())
|
||||
ERROR_LOG(m_logger) << ret();
|
||||
ERROR_LOG() << ret();
|
||||
}
|
||||
m_mainHandler->handlerEffectShow()->onMineAreaChanged(data, kindOfModification);
|
||||
break;
|
||||
@@ -559,18 +558,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(m_logger) << "Check esm " << data.idAes << " modType " << modType;
|
||||
DEBUG_LOG() << "Check esm " << data.idAes << " modType " << modType;
|
||||
switch (modType)
|
||||
{
|
||||
case DataModification::eAdded:
|
||||
case DataModification::eModified:
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Case Added Or Modified";
|
||||
DEBUG_LOG() << "Case Added Or Modified";
|
||||
|
||||
if (it != m_AesDataObjMap.end())
|
||||
{
|
||||
|
||||
DEBUG_LOG(m_logger) << "Found data";
|
||||
DEBUG_LOG() << "Found data";
|
||||
if (it.value()->areaChanged(data))
|
||||
return HandlerEffectShow::KindOfModification_e::ModifiedArea;
|
||||
if (it.value()->dataChanged(data))
|
||||
|
||||
@@ -93,8 +93,6 @@ private:
|
||||
private: // attributes
|
||||
QMap<int, ObjectAesData *> m_AesDataObjMap;
|
||||
Initialization *m_mainHandler;
|
||||
NGL::INGLLogger &m_logger;
|
||||
|
||||
};
|
||||
} // namespace EffectShowManagement
|
||||
|
||||
+44
-45
@@ -33,7 +33,6 @@ HandlerEffectShow::HandlerEffectShow(Initialization *mainHandler,
|
||||
, m_cleanupTimer(new QTimer(this))
|
||||
, m_timerMeteoData(new QTimer(this))
|
||||
, m_mainHandler(mainHandler)
|
||||
, m_logger(getLogger("HandlerEffectShow"))
|
||||
{} // end of ctor()
|
||||
//=============================================================================
|
||||
|
||||
@@ -55,7 +54,7 @@ bool HandlerEffectShow::init()
|
||||
if (ret.error())
|
||||
{
|
||||
delete ifs;
|
||||
ERROR_LOG(m_logger) << ret();
|
||||
ERROR_LOG() << ret();
|
||||
bRet = false;
|
||||
return;
|
||||
}
|
||||
@@ -63,7 +62,7 @@ bool HandlerEffectShow::init()
|
||||
};
|
||||
if (!m_mainHandler->db()->select(cbEffectShow) || !bRet)
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error reading data from database 'esm_effect_show!";
|
||||
ERROR_LOG() << "Error reading data from database 'esm_effect_show!";
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -74,13 +73,13 @@ bool HandlerEffectShow::init()
|
||||
connect(m_cleanupTimer, &QTimer::timeout, this, &HandlerEffectShow::onCleanUp);
|
||||
m_cleanupTimer->start(CLEANUPTIME); //10 minutes
|
||||
|
||||
DEBUG_LOG(m_logger) << "m_effectShowObjMap.size() = " << m_effectShowObjMap.size();
|
||||
DEBUG_LOG() << "m_effectShowObjMap.size() = " << m_effectShowObjMap.size();
|
||||
return true;
|
||||
} // end of init()
|
||||
//=============================================================================
|
||||
void HandlerEffectShow::onExplosionAreaChanged(const AreaEffectSimulation::ExplosionArea &data, KindOfModification_e kindOfModification)
|
||||
{
|
||||
INFO_LOG(m_logger) << "onExplosionAreaChanged: " << data << ", kindOfModification: " << enumToString(kindOfModification);
|
||||
INFO_LOG() << "onExplosionAreaChanged: " << data << ", kindOfModification: " << enumToString(kindOfModification);
|
||||
switch (kindOfModification)
|
||||
{
|
||||
case KindOfModification_e::Added:
|
||||
@@ -114,7 +113,7 @@ void HandlerEffectShow::onExplosionAreaChanged(const AreaEffectSimulation::Explo
|
||||
|
||||
void HandlerEffectShow::onExplosionClusterChanged(const AreaEffectSimulation::ExplosionCluster &data, HandlerEffectShow::KindOfModification_e kindOfModification)
|
||||
{
|
||||
INFO_LOG(m_logger) << "onExplosionClusterChanged: " << data << ", kindOfModification: " << enumToString(kindOfModification);
|
||||
INFO_LOG() << "onExplosionClusterChanged: " << data << ", kindOfModification: " << enumToString(kindOfModification);
|
||||
switch (kindOfModification)
|
||||
{
|
||||
case KindOfModification_e::Added:
|
||||
@@ -149,7 +148,7 @@ void HandlerEffectShow::onExplosionClusterChanged(const AreaEffectSimulation::Ex
|
||||
|
||||
void HandlerEffectShow::onEffectClusterChanged(const AreaEffectSimulation::EffectCluster &data, KindOfModification_e kindOfModification)
|
||||
{
|
||||
INFO_LOG(m_logger) << "onEffectClusterChanged: " << data << ", kindOfModification: " << enumToString(kindOfModification);
|
||||
INFO_LOG() << "onEffectClusterChanged: " << data << ", kindOfModification: " << enumToString(kindOfModification);
|
||||
switch (kindOfModification)
|
||||
{
|
||||
case KindOfModification_e::Added:
|
||||
@@ -185,7 +184,7 @@ void HandlerEffectShow::onEffectClusterChanged(const AreaEffectSimulation::Effec
|
||||
//=============================================================================
|
||||
void HandlerEffectShow::onMineAreaChanged(const AreaEffectSimulation::MineArea &data, KindOfModification_e kindOfModification)
|
||||
{
|
||||
INFO_LOG(m_logger) << "onMineAreaChanged: " << data << ", kindOfModification: " << enumToString(kindOfModification);
|
||||
INFO_LOG() << "onMineAreaChanged: " << data << ", kindOfModification: " << enumToString(kindOfModification);
|
||||
switch (kindOfModification)
|
||||
{
|
||||
case KindOfModification_e::Added:
|
||||
@@ -219,12 +218,12 @@ void HandlerEffectShow::onMineAreaChanged(const AreaEffectSimulation::MineArea &
|
||||
//=============================================================================
|
||||
void HandlerEffectShow::effectShowOrderConfirmationReceived(const ConvertFromTab::OrderConfirmation_t &orderConfirmation)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "onEffectShowConfirmationReceived()";
|
||||
DEBUG_LOG() << "onEffectShowConfirmationReceived()";
|
||||
|
||||
ObjectEffectShow *ifs = m_effectShowObjMap.value(orderConfirmation.orderId);
|
||||
if (ifs == nullptr)
|
||||
{
|
||||
WARNING_LOG(m_logger) << "Error receiving effect show ID not known: " << orderConfirmation.orderId;
|
||||
WARNING_LOG() << "Error receiving effect show ID not known: " << orderConfirmation.orderId;
|
||||
return;
|
||||
}
|
||||
const auto oldId = ifs->getData().orderConfirmation;
|
||||
@@ -234,7 +233,7 @@ void HandlerEffectShow::effectShowOrderConfirmationReceived(const ConvertFromTab
|
||||
|
||||
if (oldId != ifs->getData().orderConfirmation && ifs->getData().orderConfirmation == EffectShowManagement::OrderConfirmation_e::FiringReadiness)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "effectShowOrderConfirmationReceived Got Fire Readyness, send to aes for " << ifs->getId();
|
||||
DEBUG_LOG() << "effectShowOrderConfirmationReceived Got Fire Readyness, send to aes for " << ifs->getId();
|
||||
AreaEffectSimulation::SetAesItemEffectorStateRequest req;
|
||||
req.aesId(ifs->getIdAES());
|
||||
req.newEffectorState(AreaEffectSimulation::AesEffectorState::EsReadyToFire);
|
||||
@@ -264,7 +263,7 @@ void HandlerEffectShow::createEffectShow(const Database::EsmEffectShow &data, bo
|
||||
if (ret.error())
|
||||
{
|
||||
delete ifs;
|
||||
ERROR_LOG(m_logger) << ret();
|
||||
ERROR_LOG() << ret();
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -278,10 +277,10 @@ void HandlerEffectShow::onEffectShowModifyRequest(
|
||||
const rti::core::SampleIdentity &cookie,
|
||||
const EffectShow &request)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "onEffectShowModifyRequest: " << request.id();
|
||||
DEBUG_LOG() << "onEffectShowModifyRequest: " << request.id();
|
||||
if (request.id() <= 0)
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Illegal Effect Show Id: " << request.id();
|
||||
ERROR_LOG() << "Illegal Effect Show Id: " << request.id();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -290,7 +289,7 @@ void HandlerEffectShow::onEffectShowModifyRequest(
|
||||
|
||||
auto ret = effectShowModifyRequest(request);
|
||||
if (ret.error())
|
||||
ERROR_LOG(m_logger) << ret();
|
||||
ERROR_LOG() << ret();
|
||||
|
||||
m_mainHandler->dds()->fts()->effectShowModifyReply(cookie, ret);
|
||||
|
||||
@@ -320,7 +319,7 @@ Core::FunctionReplyObject HandlerEffectShow::effectShowModifyRequest(const Effec
|
||||
triggerEffectShowOrder(ifs); // trigger effect show order to effect show actor
|
||||
|
||||
if (ret.error())
|
||||
WARNING_LOG(m_logger) << ret();
|
||||
WARNING_LOG() << ret();
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -328,7 +327,7 @@ Core::FunctionReplyObject HandlerEffectShow::effectShowModifyRequest(const Effec
|
||||
void HandlerEffectShow::onEffectShowRemoveRequest(const rti::core::SampleIdentity &cookie,
|
||||
const Core::RemoveElementRequest &request)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "onEffectShowRemoveRequest: " << request.id();
|
||||
DEBUG_LOG() << "onEffectShowRemoveRequest: " << request.id();
|
||||
|
||||
ObjectEffectShow *ifs = m_effectShowObjMap.value(request.id());
|
||||
Core::FunctionReplyObject ret;
|
||||
@@ -378,7 +377,7 @@ void HandlerEffectShow::createEffectShowsRelatedToMineArea(const AreaEffectSimul
|
||||
for (const auto &esmEffectShow : esmEffectShows)
|
||||
{
|
||||
createEffectShow(esmEffectShow);
|
||||
DEBUG_LOG(m_logger) << toString(esmEffectShow);
|
||||
DEBUG_LOG() << toString(esmEffectShow);
|
||||
}
|
||||
}
|
||||
//-------------------------------------------------------------------------------
|
||||
@@ -388,7 +387,7 @@ void HandlerEffectShow::createEffectShowsRelatedToExplosionArea(const AreaEffect
|
||||
for (const auto &esmEffectShow : esmEffectShows)
|
||||
{
|
||||
createEffectShow(esmEffectShow);
|
||||
DEBUG_LOG(m_logger) << toString(esmEffectShow);
|
||||
DEBUG_LOG() << toString(esmEffectShow);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -398,7 +397,7 @@ void HandlerEffectShow::createEffectShowsRelatedToExplosionCluster(const AreaEff
|
||||
for (const auto &esmEffectShow : esmEffectShows)
|
||||
{
|
||||
createEffectShow(esmEffectShow);
|
||||
DEBUG_LOG(m_logger) << toString(esmEffectShow);
|
||||
DEBUG_LOG() << toString(esmEffectShow);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -408,7 +407,7 @@ void HandlerEffectShow::createEffectShowsRelatedToEffectCluster(const AreaEffect
|
||||
for (const auto &esmEffectShow : esmEffectShows)
|
||||
{
|
||||
createEffectShow(esmEffectShow);
|
||||
DEBUG_LOG(m_logger) << toString(esmEffectShow);
|
||||
DEBUG_LOG() << toString(esmEffectShow);
|
||||
}
|
||||
}
|
||||
//-------------------------------------------------------------------------------
|
||||
@@ -416,7 +415,7 @@ QVector<Database::EsmEffectShow> HandlerEffectShow::createEffectShowDbDataRelate
|
||||
{
|
||||
QVector<Database::EsmEffectShow> ret;
|
||||
|
||||
DEBUG_LOG(m_logger) << "createEffectShowDbDataRelatedToExplosionArea: ";
|
||||
DEBUG_LOG() << "createEffectShowDbDataRelatedToExplosionArea: ";
|
||||
|
||||
EffectShowMineArea effectShowMineArea(data);
|
||||
Database::EsmEffectShow esmEffectShow = effectShowMineArea.getEffectShow();
|
||||
@@ -428,7 +427,7 @@ QVector<Database::EsmEffectShow> HandlerEffectShow::createEffectShowDbDataRelate
|
||||
{
|
||||
QVector<Database::EsmEffectShow> ret;
|
||||
|
||||
DEBUG_LOG(m_logger) << "createEffectShowDbDataRelatedToExplosionArea: ";
|
||||
DEBUG_LOG() << "createEffectShowDbDataRelatedToExplosionArea: ";
|
||||
|
||||
EffectShowExplosionArea effectShowExplosionArea(data, m_mainHandler->handlerPdmData());
|
||||
|
||||
@@ -437,7 +436,7 @@ QVector<Database::EsmEffectShow> HandlerEffectShow::createEffectShowDbDataRelate
|
||||
//create exact 1
|
||||
ret.reserve(1);
|
||||
Database::EsmEffectShow esmEffectShow = effectShowExplosionArea.getEffectShow(0);
|
||||
DEBUG_LOG(m_logger) << toString(esmEffectShow);
|
||||
DEBUG_LOG() << toString(esmEffectShow);
|
||||
ret.push_back(std::move(esmEffectShow));
|
||||
}
|
||||
else
|
||||
@@ -467,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(m_logger) << toString(esmEffectShow);
|
||||
DEBUG_LOG() << toString(esmEffectShow);
|
||||
|
||||
ret.push_back(std::move(esmEffectShow));
|
||||
}
|
||||
@@ -487,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(m_logger) << toString(esmEffectShow);
|
||||
DEBUG_LOG() << toString(esmEffectShow);
|
||||
ret.push_back(std::move(esmEffectShow));
|
||||
}
|
||||
else
|
||||
@@ -517,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(m_logger) << toString(esmEffectShow);
|
||||
DEBUG_LOG() << toString(esmEffectShow);
|
||||
|
||||
// Evlt. nicht bei DM42 (dann ist max > 1)
|
||||
if(data.esmParticipantIds().size() > 0)
|
||||
@@ -540,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(m_logger) << toString(esmEffectShow);
|
||||
DEBUG_LOG() << toString(esmEffectShow);
|
||||
ret.push_back(std::move(esmEffectShow));
|
||||
}
|
||||
else
|
||||
@@ -570,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(m_logger) << toString(esmEffectShow);
|
||||
//DEBUG_LOG() << 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(m_logger) << toString(esmEffectShow);
|
||||
DEBUG_LOG() << toString(esmEffectShow);
|
||||
|
||||
ret.push_back(std::move(esmEffectShow));
|
||||
}
|
||||
@@ -585,7 +584,7 @@ QVector<Database::EsmEffectShow> HandlerEffectShow::createEffectShowDbDataRelate
|
||||
//-------------------------------------------------------------------------------
|
||||
void HandlerEffectShow::removeEffectShowsRelatedToAes(int idAes, bool retract)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "removeEffectShowsRelatedToAes(" << idAes << ")";
|
||||
DEBUG_LOG() << "removeEffectShowsRelatedToAes(" << idAes << ")";
|
||||
auto it = m_effectShowObjMap.begin();
|
||||
while (it != m_effectShowObjMap.end())
|
||||
{
|
||||
@@ -596,7 +595,7 @@ void HandlerEffectShow::removeEffectShowsRelatedToAes(int idAes, bool retract)
|
||||
(it.value()->getData().orderConfirmation != EffectShowManagement::OrderConfirmation_e_def::OrderCarriedOut))
|
||||
remove = true;
|
||||
else
|
||||
INFO_LOG(m_logger) << "Effect Show: " << it.value()->getId() << " not removed due to EXECUTION / ORDER CARRIED OUT";
|
||||
INFO_LOG() << "Effect Show: " << it.value()->getId() << " not removed due to EXECUTION / ORDER CARRIED OUT";
|
||||
}
|
||||
if (remove)
|
||||
{
|
||||
@@ -783,7 +782,7 @@ Core::FunctionReplyObject HandlerEffectShow::removeEffectShow(ObjectEffectShow *
|
||||
Core::FunctionReplyObject ret = ifs->removeObject();
|
||||
if (ret.error())
|
||||
{
|
||||
ERROR_LOG(m_logger) << ret();
|
||||
ERROR_LOG() << ret();
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -792,9 +791,9 @@ Core::FunctionReplyObject HandlerEffectShow::removeEffectShow(ObjectEffectShow *
|
||||
|
||||
// remove from map
|
||||
if (!m_effectShowObjMap.remove(effectShowId) && bWarnWhenNotInMap)
|
||||
WARNING_LOG(m_logger) << "Remove of EffectShow(" << effectShowId << ") failed.";
|
||||
WARNING_LOG() << "Remove of EffectShow(" << effectShowId << ") failed.";
|
||||
else
|
||||
DEBUG_LOG(m_logger) << "EffectShow(" << effectShowId << ") removed.";
|
||||
DEBUG_LOG() << "EffectShow(" << effectShowId << ") removed.";
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -802,7 +801,7 @@ Core::FunctionReplyObject HandlerEffectShow::removeEffectShow(ObjectEffectShow *
|
||||
void HandlerEffectShow::triggerEffectShowOrder(const ObjectEffectShow *ifs)
|
||||
{
|
||||
const Database::EsmEffectShow &effectShow = ifs->getData();
|
||||
INFO_LOG(m_logger) << "triggerEffectShowOrder for id " << ifs->getId()
|
||||
INFO_LOG() << "triggerEffectShowOrder for id " << ifs->getId()
|
||||
<< ", aesId: " << ifs->getIdAES()
|
||||
<< ", actor: " << effectShow.esmParticipantId;
|
||||
if (effectShow.esmParticipantId == -1)
|
||||
@@ -817,7 +816,7 @@ void HandlerEffectShow::triggerEffectShowOrder(const ObjectEffectShow *ifs)
|
||||
void HandlerEffectShow::triggerRetractOrder(const ObjectEffectShow *ifs)
|
||||
{
|
||||
const Database::EsmEffectShow &effectShow = ifs->getData();
|
||||
INFO_LOG(m_logger) << "triggerRetractOrder for id " << ifs->getId()
|
||||
INFO_LOG() << "triggerRetractOrder for id " << ifs->getId()
|
||||
<< ", aesId: " << ifs->getIdAES()
|
||||
<< ", actor: " << effectShow.esmParticipantId;
|
||||
if (effectShow.esmParticipantId == -1)
|
||||
@@ -833,7 +832,7 @@ void HandlerEffectShow::triggerRetractOrder(const ObjectEffectShow *ifs)
|
||||
void HandlerEffectShow::triggerEffectShowStop(const ObjectEffectShow *ifs)
|
||||
{
|
||||
const Database::EsmEffectShow &effectShow = ifs->getData();
|
||||
INFO_LOG(m_logger) << "triggerEffectShowStop for id " << ifs->getId()
|
||||
INFO_LOG() << "triggerEffectShowStop for id " << ifs->getId()
|
||||
<< ", aesId: " << ifs->getIdAES()
|
||||
<< ", actor: " << effectShow.esmParticipantId;
|
||||
if (effectShow.esmParticipantId == -1)
|
||||
@@ -847,7 +846,7 @@ void HandlerEffectShow::triggerEffectShowStop(const ObjectEffectShow *ifs)
|
||||
void HandlerEffectShow::triggerEffectShowContinue(const ObjectEffectShow *ifs)
|
||||
{
|
||||
const Database::EsmEffectShow &effectShow = ifs->getData();
|
||||
INFO_LOG(m_logger) << "triggerEffectShowContinue for id " << ifs->getId()
|
||||
INFO_LOG() << "triggerEffectShowContinue for id " << ifs->getId()
|
||||
<< ", aesId: " << ifs->getIdAES()
|
||||
<< ", actor: " << effectShow.esmParticipantId;
|
||||
if (effectShow.esmParticipantId == -1)
|
||||
@@ -869,7 +868,7 @@ void HandlerEffectShow::triggerMeteoData(const ObjectEffectShow *ifs)
|
||||
{
|
||||
if (!meteoData.windOk() && !meteoData.climateOk())
|
||||
{
|
||||
WARNING_LOG(m_logger) << "Found MeteoStation but no weather Data available, try again in 1 minute";
|
||||
WARNING_LOG() << "Found MeteoStation but no weather Data available, try again in 1 minute";
|
||||
QTimer::singleShot(6000, this, &HandlerEffectShow::onSendMeteoData);
|
||||
return;
|
||||
}
|
||||
@@ -880,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(m_logger) << "Age of meteo data=" << (deltaTime / 60000) << "min for vehicle: " << equipmentNumber;
|
||||
WARNING_LOG() << "Age of meteo data=" << (deltaTime / 60000) << "min for vehicle: " << equipmentNumber;
|
||||
}
|
||||
else
|
||||
{
|
||||
int equipmentNumber = m_mainHandler->handlerPpmData()->getEquipmentNumber(effectShow.esmParticipantId);
|
||||
WARNING_LOG(m_logger) << "Meteo data not available for effect show vehicle: " << equipmentNumber;
|
||||
WARNING_LOG() << "Meteo data not available for effect show vehicle: " << equipmentNumber;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -908,7 +907,7 @@ void HandlerEffectShow::onSendMeteoData()
|
||||
|
||||
void HandlerEffectShow::onCleanUp()
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Start Cleanup ";
|
||||
DEBUG_LOG() << "Start Cleanup ";
|
||||
QVector<ObjectEffectShow * > objects;
|
||||
for (ObjectEffectShow *obj : std::as_const(m_effectShowObjMap))
|
||||
{
|
||||
@@ -916,11 +915,11 @@ void HandlerEffectShow::onCleanUp()
|
||||
if (effectShow.orderConfirmation == OrderConfirmation_e::OrderCarriedOut || effectShow.startTime <= 0 || effectShow.id <= 0)
|
||||
continue;
|
||||
|
||||
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();
|
||||
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();
|
||||
if ((effectShow.startTime + effectShow.duration + CLEANUPTIME) < m_mainHandler->dds()->currentPartitionTime())
|
||||
{
|
||||
//remove object
|
||||
DEBUG_LOG(m_logger) << "Remove Effect Show " << effectShow.id ;
|
||||
DEBUG_LOG() << "Remove Effect Show " << effectShow.id ;
|
||||
objects.append(obj);
|
||||
}
|
||||
}
|
||||
|
||||
+1
-3
@@ -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(m_logger) << replyObject.translated();}
|
||||
void onSetAesItemEffectorStateReply(const Core::FunctionReplyObject &replyObject) override {DEBUG_LOG() << replyObject.translated();}
|
||||
/**
|
||||
* @brief Create, update, remove & create or remove Effect Shows in relation to the changes of the Explosion Area.
|
||||
* @param[in] data
|
||||
@@ -182,7 +182,5 @@ private:
|
||||
QTimer *m_timerMeteoData;
|
||||
|
||||
Initialization *m_mainHandler;
|
||||
NGL::INGLLogger &m_logger;
|
||||
|
||||
};
|
||||
}
|
||||
+10
-11
@@ -25,7 +25,6 @@ HandlerEffectShowActorRelocation::HandlerEffectShowActorRelocation(Initializatio
|
||||
, EffectShowActorRelocationModifyRequestHandler(mainHandler->dds()->fts())
|
||||
, EffectShowActorRelocationRemoveRequestHandler(mainHandler->dds()->fts())
|
||||
, m_mainHandler(mainHandler)
|
||||
, m_logger(getLogger("HandlerEffectShowActorRelocation"))
|
||||
{}
|
||||
//=============================================================================
|
||||
HandlerEffectShowActorRelocation::~HandlerEffectShowActorRelocation()
|
||||
@@ -45,7 +44,7 @@ bool HandlerEffectShowActorRelocation::init()
|
||||
if (ret.error())
|
||||
{
|
||||
delete ifs;
|
||||
ERROR_LOG(m_logger) << ret();
|
||||
ERROR_LOG() << ret();
|
||||
bRet = false;
|
||||
return;
|
||||
}
|
||||
@@ -53,23 +52,23 @@ bool HandlerEffectShowActorRelocation::init()
|
||||
};
|
||||
if (!m_mainHandler->db()->select(cbActor) || !bRet)
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error reading data from database!";
|
||||
ERROR_LOG() << "Error reading data from database!";
|
||||
return false;
|
||||
}
|
||||
|
||||
DEBUG_LOG(m_logger) << "m_effectShowActorRelocationObjMap.size() = " << m_effectShowActorRelocationObjMap.size();
|
||||
DEBUG_LOG() << "m_effectShowActorRelocationObjMap.size() = " << m_effectShowActorRelocationObjMap.size();
|
||||
|
||||
return true;
|
||||
}
|
||||
//=============================================================================
|
||||
void HandlerEffectShowActorRelocation::relocationOrderConfirmationReceived(const ConvertFromTab::OrderConfirmation_t &orderConfirmation)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "relocationOrderConfirmationReceived()";
|
||||
DEBUG_LOG() << "relocationOrderConfirmationReceived()";
|
||||
|
||||
ObjectEffectShowActorRelocation *ifs = m_effectShowActorRelocationObjMap.value(orderConfirmation.orderId);
|
||||
if (ifs == nullptr)
|
||||
{
|
||||
WARNING_LOG(m_logger) << "Error receiving effect show relocation ID not known.";
|
||||
WARNING_LOG() << "Error receiving effect show relocation ID not known.";
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -84,10 +83,10 @@ void HandlerEffectShowActorRelocation::onEffectShowActorRelocationModifyRequest(
|
||||
const rti::core::SampleIdentity &cookie,
|
||||
const EffectShowActorRelocation &request)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "onEffectShowActorRelocationModifyRequest: " << request.id();
|
||||
DEBUG_LOG() << "onEffectShowActorRelocationModifyRequest: " << request.id();
|
||||
auto ret = request.id() > 0 ? effectShowActorRelocationModifyRequest(request) : effectShowActorRelocationCreateRequest(request);
|
||||
if (ret.error())
|
||||
WARNING_LOG(m_logger) << ret();
|
||||
WARNING_LOG() << ret();
|
||||
m_mainHandler->dds()->fts()->effectShowActorRelocationModifyReply(cookie, ret);
|
||||
|
||||
}
|
||||
@@ -107,7 +106,7 @@ Core::FunctionReplyObject HandlerEffectShowActorRelocation::effectShowActorReloc
|
||||
int equipmentNumber = m_mainHandler->handlerPpmData()->getEquipmentNumber(participantId);
|
||||
m_mainHandler->handlerTabData()->relocationOrder(equipmentNumber, participantId, ifs->getRelocationOrder());
|
||||
|
||||
DEBUG_LOG(m_logger) << "effectShowActorRelocationCreateRequest() - insert";
|
||||
DEBUG_LOG() << "effectShowActorRelocationCreateRequest() - insert";
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
@@ -123,7 +122,7 @@ Core::FunctionReplyObject HandlerEffectShowActorRelocation::effectShowActorReloc
|
||||
void HandlerEffectShowActorRelocation::onEffectShowActorRelocationRemoveRequest(const rti::core::SampleIdentity &cookie,
|
||||
const Core::RemoveElementRequest &request)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "onEffectShowActorRelocationRemoveRequest: " << request.id();
|
||||
DEBUG_LOG() << "onEffectShowActorRelocationRemoveRequest: " << request.id();
|
||||
|
||||
Core::FunctionReplyObject ret;
|
||||
ObjectEffectShowActorRelocation *ifs = m_effectShowActorRelocationObjMap.value(request.id());
|
||||
@@ -146,7 +145,7 @@ void HandlerEffectShowActorRelocation::onEffectShowActorRelocationRemoveRequest(
|
||||
|
||||
ret = ifs->removeObject();
|
||||
if (ret.error())
|
||||
ERROR_LOG(m_logger) << LOGFUNCTION << ret();
|
||||
ERROR_LOG() << Q_FUNC_INFO << ret();
|
||||
else
|
||||
{
|
||||
// trigger relocation telegram to effect show actor
|
||||
|
||||
-2
@@ -74,7 +74,5 @@ private:
|
||||
};
|
||||
QQueue<Completed_t> m_completed; // IDs and timestamp of the completed relocations
|
||||
Initialization *m_mainHandler;
|
||||
NGL::INGLLogger &m_logger;
|
||||
|
||||
};
|
||||
}
|
||||
+9
-10
@@ -23,7 +23,6 @@ HandlerEffectShowVehicleStatus::HandlerEffectShowVehicleStatus(Initialization *m
|
||||
QObject *parent)
|
||||
: QObject(parent)
|
||||
, m_mainHandler(mainHandler)
|
||||
, m_logger(getLogger("HandlerEffectShowVehicleStatus"))
|
||||
{
|
||||
m_timerVehicleStatus.setSingleShot(true);
|
||||
}
|
||||
@@ -36,19 +35,19 @@ HandlerEffectShowVehicleStatus::~HandlerEffectShowVehicleStatus()
|
||||
//=============================================================================
|
||||
bool HandlerEffectShowVehicleStatus::init()
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Begin HandlerEffectShowVehicleStatus";
|
||||
DEBUG_LOG() << "Begin HandlerEffectShowVehicleStatus";
|
||||
|
||||
// create EffectShowVehicleStatuss objects
|
||||
auto cbEsvs = [this] (const Database::EsmEffectShowVehicleStatus &data)
|
||||
{
|
||||
ObjectEffectShowVehicleStatus *ifs(new ObjectEffectShowVehicleStatus(m_mainHandler));
|
||||
ifs->set(data);
|
||||
DEBUG_LOG(m_logger) << "HandlerEffectShowVehicleStatus::init getParticipantId :" << ifs->getParticipantId();
|
||||
DEBUG_LOG() << "HandlerEffectShowVehicleStatus::init getParticipantId :" << ifs->getParticipantId();
|
||||
m_effectShowVehicleStatusObjMap.insert(ifs->getParticipantId(), ifs);
|
||||
};
|
||||
if (!m_mainHandler->db()->select(cbEsvs))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error reading data from database!";
|
||||
ERROR_LOG() << "Error reading data from database!";
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -61,7 +60,7 @@ bool HandlerEffectShowVehicleStatus::init()
|
||||
if (m_effectShowVehicleStatusObjMap.size() != 0)
|
||||
onTimeoutVehicleStatus();
|
||||
|
||||
DEBUG_LOG(m_logger) << "m_effectShowVehicleStatusObjMap.size() = " << m_effectShowVehicleStatusObjMap.size();
|
||||
DEBUG_LOG() << "m_effectShowVehicleStatusObjMap.size() = " << m_effectShowVehicleStatusObjMap.size();
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -109,7 +108,7 @@ bool HandlerEffectShowVehicleStatus::isOperational(int id) const
|
||||
void HandlerEffectShowVehicleStatus::vehicleStatusReceived(const ConvertFromTab::VehicleStatus_t &vehicleStatus)
|
||||
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "vehicleStatusReceived: " << vehicleStatus.equipmentNumber
|
||||
DEBUG_LOG() << "vehicleStatusReceived: " << vehicleStatus.equipmentNumber
|
||||
<< ' ' << vehicleStatus.timestamp << ' ' << m_mainHandler->dds()->currentPartitionTime();
|
||||
|
||||
HandlerPpmData::Participant_t actor = m_mainHandler->handlerPpmData()->getIdAndNameOfEffectShowActor(vehicleStatus.equipmentNumber);
|
||||
@@ -139,7 +138,7 @@ void HandlerEffectShowVehicleStatus::vehicleStatusReceived(const ConvertFromTab:
|
||||
//=============================================================================
|
||||
void HandlerEffectShowVehicleStatus::effectShowActorChanged(const HandlerPpmData::Participant_t &data, DataModification modType)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "onEffectShowActorChanged: " << data.equipmentNumber;
|
||||
DEBUG_LOG() << "onEffectShowActorChanged: " << data.equipmentNumber;
|
||||
auto it = m_effectShowVehicleStatusObjMap.find(data.id);
|
||||
if (it == m_effectShowVehicleStatusObjMap.end()) return; // participant not allocated to any order
|
||||
|
||||
@@ -187,7 +186,7 @@ void HandlerEffectShowVehicleStatus::onStatusRequest()
|
||||
auto it = m_effectShowVehicleStatusObjMap.find(actor.id);
|
||||
if (it != m_effectShowVehicleStatusObjMap.end())
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Status Request equipment number: " << equipmentNumber << ' ' << it.value()->getIdOfEffectShowActor();
|
||||
DEBUG_LOG() << "Status Request equipment number: " << equipmentNumber << ' ' << it.value()->getIdOfEffectShowActor();
|
||||
m_mainHandler->handlerTabData()->effectShowVehicleStatusRequest(equipmentNumber, it.value()->getIdOfEffectShowActor());
|
||||
}
|
||||
|
||||
@@ -221,7 +220,7 @@ void HandlerEffectShowVehicleStatus::onTimeoutVehicleStatus()
|
||||
if (it.value()->getOperational())
|
||||
{
|
||||
qint64 age = currentTime - it.value()->getTimestamp();
|
||||
DEBUG_LOG(m_logger) << currentTime << ' ' << it.value()->getTimestamp();
|
||||
DEBUG_LOG() << currentTime << ' ' << it.value()->getTimestamp();
|
||||
if ((age + 1000) >= HandlerEffectShowVehicleStatus::statusTimeout)
|
||||
{
|
||||
it.value()->setOperational(false); // reset operational status
|
||||
@@ -239,7 +238,7 @@ void HandlerEffectShowVehicleStatus::onTimeoutVehicleStatus()
|
||||
if (activateTimer)
|
||||
m_timerVehicleStatus.start(HandlerEffectShowVehicleStatus::statusTimeout - maxAge);
|
||||
|
||||
DEBUG_LOG(m_logger) << "onTimeoutVehicleStatus(): " << activateTimer << ' ' << maxAge;
|
||||
DEBUG_LOG() << "onTimeoutVehicleStatus(): " << activateTimer << ' ' << maxAge;
|
||||
|
||||
}
|
||||
|
||||
|
||||
-2
@@ -96,7 +96,5 @@ private:
|
||||
QVector<int> m_statusRequest; // List of equipment numbers; Order List for request of vehicle status.
|
||||
QTimer m_timerVehicleStatus;
|
||||
Initialization *m_mainHandler;
|
||||
NGL::INGLLogger &m_logger;
|
||||
|
||||
};
|
||||
}
|
||||
+1
-2
@@ -17,14 +17,13 @@ HandlerMdmData::HandlerMdmData(const std::shared_ptr<DdsHandler> &ddsHandler,
|
||||
QObject *parent)
|
||||
: QObject(parent)
|
||||
, m_ddsHandler(ddsHandler)
|
||||
, m_logger(getLogger("HandlerMdmData"))
|
||||
{
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
bool HandlerMdmData::init()
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "init() HandlerMdmData";
|
||||
DEBUG_LOG() << "init() HandlerMdmData";
|
||||
auto dtcMdm = m_ddsHandler->dtcMdm();
|
||||
|
||||
connect(dtcMdm.get(), &MeteoDataManagement::Interface::Dtc::meteoDataChanged,
|
||||
|
||||
@@ -42,6 +42,5 @@ private Q_SLOTS:
|
||||
private:
|
||||
QHash<int, MeteoDataManagement::MeteoData> m_meteoData;
|
||||
std::shared_ptr<DdsHandler> m_ddsHandler;
|
||||
NGL::INGLLogger &m_logger;
|
||||
};
|
||||
} // namespace EffectShowManagement
|
||||
@@ -19,7 +19,6 @@ HandlerPdmData::HandlerPdmData(const std::shared_ptr<DdsHandler> &ddsHandler,
|
||||
|
||||
: QObject(parent)
|
||||
, m_ddsHandler(ddsHandler)
|
||||
, m_logger(getLogger("HandlerPdmData"))
|
||||
{
|
||||
} // end of ctor()
|
||||
//=============================================================================
|
||||
|
||||
@@ -36,7 +36,6 @@ public:
|
||||
|
||||
private: // attributes
|
||||
std::shared_ptr<DdsHandler> m_ddsHandler;
|
||||
NGL::INGLLogger &m_logger;
|
||||
};
|
||||
} // namespace EffectShowManagement
|
||||
|
||||
+6
-7
@@ -18,14 +18,13 @@ HandlerPpmData::HandlerPpmData(Initialization *mainHandler,
|
||||
QObject *parent)
|
||||
: QObject(parent)
|
||||
, m_mainHandler(mainHandler)
|
||||
, m_logger(getLogger("HandlerPpmData"))
|
||||
{
|
||||
} // end of ctor()
|
||||
//=============================================================================
|
||||
|
||||
bool HandlerPpmData::init()
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Begin HandlerPpmData";
|
||||
DEBUG_LOG() << "Begin HandlerPpmData";
|
||||
auto dtcPpm = m_mainHandler->dds()->dtcPpm();
|
||||
connect(dtcPpm.get(), &ParticipantManagement::Interface::Dtc::participantChanged,
|
||||
this, &HandlerPpmData::onParticipantChanged);
|
||||
@@ -41,7 +40,7 @@ bool HandlerPpmData::init()
|
||||
return false;
|
||||
}
|
||||
|
||||
DEBUG_LOG(m_logger) << "End HandlerPpmData";
|
||||
DEBUG_LOG() << "End HandlerPpmData";
|
||||
return true;
|
||||
} // end of init()
|
||||
|
||||
@@ -54,7 +53,7 @@ HandlerPpmData::Participant_t HandlerPpmData::getIdAndNameOfEffectShowActor(int
|
||||
return p;
|
||||
}
|
||||
|
||||
WARNING_LOG(m_logger) << LOGFUNCTION << " Equipment Number not found: " << equipmentNum;
|
||||
WARNING_LOG() << Q_FUNC_INFO << " Equipment Number not found: " << equipmentNum;
|
||||
return Participant_t(); // participant not available
|
||||
|
||||
} // end of getIdAndNameOfEffectShowActor()
|
||||
@@ -65,7 +64,7 @@ int HandlerPpmData::getEquipmentNumber(int id) const
|
||||
auto it = m_participant.find(id);
|
||||
if (it == m_participant.end())
|
||||
{
|
||||
WARNING_LOG(m_logger) << LOGFUNCTION << " Participant(" << id << ") not found. ";
|
||||
WARNING_LOG() << Q_FUNC_INFO << " Participant(" << id << ") not found. ";
|
||||
return -1; // participant not available
|
||||
}
|
||||
return it.value().equipmentNumber;
|
||||
@@ -79,7 +78,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(m_logger) << "support entity / equipment number set " << (typeClass == ParticipantManagement::TypeClass::SupportEntity)
|
||||
DEBUG_LOG() << "support entity / equipment number set " << (typeClass == ParticipantManagement::TypeClass::SupportEntity)
|
||||
<< " / " << data.equipmentNumber().is_set() << ", typeId: " << data.typeId()
|
||||
<< ", cnt: " << m_ppmDtc->types().size();
|
||||
|
||||
@@ -120,7 +119,7 @@ void HandlerPpmData::onParticipantChanged(const ParticipantManagement::Participa
|
||||
}
|
||||
}
|
||||
|
||||
DEBUG_LOG(m_logger) << "onParticipantChanged: " << data.id() << ' ' << data.name() << ' ' << modType;
|
||||
DEBUG_LOG() << "onParticipantChanged: " << data.id() << ' ' << data.name() << ' ' << modType;
|
||||
|
||||
|
||||
} // end of onParticipantChanged()
|
||||
@@ -74,7 +74,6 @@ private:
|
||||
QMap<int, Participant_t> m_participant; // key = ID
|
||||
|
||||
Initialization *m_mainHandler;
|
||||
NGL::INGLLogger &m_logger;
|
||||
};
|
||||
} // namespace EffectShowManagement
|
||||
|
||||
+20
-21
@@ -31,14 +31,13 @@ HandlerTabData::HandlerTabData(Initialization *mainHandler,
|
||||
|
||||
: QObject(parent)
|
||||
, m_mainHandler(mainHandler)
|
||||
, m_logger(getLogger("HandlerTabData"))
|
||||
{
|
||||
} // end of ctor()
|
||||
|
||||
//=============================================================================
|
||||
bool HandlerTabData::init()
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Begin HandlerTabData";
|
||||
DEBUG_LOG() << "Begin HandlerTabData";
|
||||
auto dtcTab = m_mainHandler->dds()->dtcTab();
|
||||
connect(dtcTab.get(), &TrainingAreaBase::Interface::Dtc::fireSmokeMarkerDataChanged,
|
||||
this, &HandlerTabData::onFireSmokeMarkerDataChanged);
|
||||
@@ -54,13 +53,13 @@ bool HandlerTabData::init()
|
||||
return false;
|
||||
}
|
||||
|
||||
DEBUG_LOG(m_logger) << "End HandlerTabData";
|
||||
DEBUG_LOG() << "End HandlerTabData";
|
||||
return true;
|
||||
} // end of init()
|
||||
//=============================================================================
|
||||
void HandlerTabData::effectShowVehicleStatusRequest(int equipmentNumber, int participantId)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Trigger Status Request " << equipmentNumber << ' ' << participantId;
|
||||
DEBUG_LOG() << "Trigger Status Request " << equipmentNumber << ' ' << participantId;
|
||||
TrainingAreaBase::SendFireSmokeMarkerDataRequest out;
|
||||
|
||||
out.equipmentNumber(equipmentNumber);
|
||||
@@ -72,7 +71,7 @@ void HandlerTabData::effectShowVehicleStatusRequest(int equipmentNumber, int par
|
||||
//=============================================================================
|
||||
void HandlerTabData::relocationOrder(int equipmentNumber, int participantId, const ConvertToTab::RelocationOrder_t &relocationOrder)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Trigger Relocation Order " << equipmentNumber << ' ' << participantId;
|
||||
DEBUG_LOG() << "Trigger Relocation Order " << equipmentNumber << ' ' << participantId;
|
||||
TrainingAreaBase::SendFireSmokeMarkerDataRequest out;
|
||||
|
||||
out.equipmentNumber(equipmentNumber);
|
||||
@@ -91,7 +90,7 @@ void HandlerTabData::effectShowOrder(int equipmentNumber, int participantId, con
|
||||
|
||||
Core::GeoPosition2D posCenter = effectShowOrder.centerPosition;
|
||||
Core::GeoPosition2D posLl = effectShowOrder.lowerLeftPosition;
|
||||
DEBUG_LOG(m_logger) << "Trigger Effect Show Order " << equipmentNumber << ' ' << participantId
|
||||
DEBUG_LOG() << "Trigger Effect Show Order " << equipmentNumber << ' ' << participantId
|
||||
<< "\n idEffectShow " << effectShowOrder.idEffectShow
|
||||
<< "\n startTime " << effectShowOrder.startTime
|
||||
<< "\n centerPosition " << LtsCoordTrans::mgrsFromGeographic(posCenter.lon(), posCenter.lat())
|
||||
@@ -111,7 +110,7 @@ void HandlerTabData::effectShowOrder(int equipmentNumber, int participantId, con
|
||||
//=============================================================================
|
||||
void HandlerTabData::effectShowStop(int equipmentNumber, int participantId, const qint16 &idEffectShow)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Trigger Effect Show Stop " << equipmentNumber << ' ' << participantId;
|
||||
DEBUG_LOG() << "Trigger Effect Show Stop " << equipmentNumber << ' ' << participantId;
|
||||
TrainingAreaBase::SendFireSmokeMarkerDataRequest out;
|
||||
|
||||
out.equipmentNumber(equipmentNumber);
|
||||
@@ -128,7 +127,7 @@ void HandlerTabData::effectShowContinue(int equipmentNumber, int participantId,
|
||||
out.participantId(participantId);
|
||||
out.payload(ConvertToTab::convertEffectShowContinue(effectShowContinue));
|
||||
|
||||
DEBUG_LOG(m_logger) << "Trigger Effect Show Continue " << equipmentNumber << ' ' << participantId
|
||||
DEBUG_LOG() << "Trigger Effect Show Continue " << equipmentNumber << ' ' << participantId
|
||||
<< "\n idEffectShow " << effectShowContinue.idEffectShow
|
||||
<< "\n executionTime " << effectShowContinue.executionTime
|
||||
<< "\n payload" << plText(out.payload());
|
||||
@@ -144,7 +143,7 @@ void HandlerTabData::retractOrder(int equipmentNumber, int participantId, const
|
||||
out.participantId(participantId);
|
||||
out.payload(ConvertToTab::convertOrderRetract(retractOrder));
|
||||
|
||||
DEBUG_LOG(m_logger) << "Trigger Retract Order " << equipmentNumber << ' ' << participantId
|
||||
DEBUG_LOG() << "Trigger Retract Order " << equipmentNumber << ' ' << participantId
|
||||
<< "\n orderType " << retractOrder.orderType
|
||||
<< "\n id " << retractOrder.id
|
||||
<< "\n payload" << plText(out.payload());
|
||||
@@ -159,7 +158,7 @@ void HandlerTabData::meteoData(int equipmentNumber, int participantId, const Met
|
||||
out.participantId(participantId);
|
||||
out.payload(ConvertToTab::convertMeteoData(meteoData));
|
||||
|
||||
DEBUG_LOG(m_logger) << "Trigger Meteo data " << equipmentNumber << ' ' << participantId
|
||||
DEBUG_LOG() << "Trigger Meteo data " << equipmentNumber << ' ' << participantId
|
||||
<< "\n temperature " << meteoData.temperature()
|
||||
<< "\n humidity " << meteoData.humidity()
|
||||
<< "\n pressure " << meteoData.pressure()
|
||||
@@ -172,9 +171,9 @@ void HandlerTabData::meteoData(int equipmentNumber, int participantId, const Met
|
||||
void HandlerTabData::onSendFireSmokeMarkerDataReply(const Core::FunctionReplyObject &reply)
|
||||
{
|
||||
if (reply.error())
|
||||
ERROR_LOG(m_logger) << "Fire Smoke Marker Data could not be send: " << reply.str();
|
||||
ERROR_LOG() << "Fire Smoke Marker Data could not be send: " << reply.str();
|
||||
else
|
||||
DEBUG_LOG(m_logger) << "Fire Smoke Marker Data send successfully to TAB!";
|
||||
DEBUG_LOG() << "Fire Smoke Marker Data send successfully to TAB!";
|
||||
} // end of onSendFireSmokeMarkerDataReply()
|
||||
//-----------------------------------------------------------------------------
|
||||
void HandlerTabData::onFireSmokeMarkerDataChanged(const TrainingAreaBase::FireSmokeMarkerData &data, DataModification modType)
|
||||
@@ -182,18 +181,18 @@ void HandlerTabData::onFireSmokeMarkerDataChanged(const TrainingAreaBase::FireSm
|
||||
if (modType == DataModification::eRemoved)
|
||||
return;
|
||||
|
||||
DEBUG_LOG(m_logger) << "Got Fire Smoke Marker " << data.sampleTime();
|
||||
DEBUG_LOG() << "Got Fire Smoke Marker " << data.sampleTime();
|
||||
switch (ConvertFromTab::isTelegram(data))
|
||||
{
|
||||
case ConvertFromTab::RxTelegram_e::VehicleStatus:
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Got Vehicle Status";
|
||||
DEBUG_LOG() << "Got Vehicle Status";
|
||||
m_mainHandler->handlerEffectShowVehicleStatus()->vehicleStatusReceived(ConvertFromTab::getVehicleStatus(data));
|
||||
break;
|
||||
}
|
||||
case ConvertFromTab::RxTelegram_e::OrderConfirmation:
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Got Order Confirmation ";
|
||||
DEBUG_LOG() << "Got Order Confirmation ";
|
||||
switch (modType)
|
||||
{
|
||||
case DataModification::eAdded:
|
||||
@@ -202,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(m_logger) << "relocationOrderConfirmationReceived(orderConfirmation)";
|
||||
DEBUG_LOG() << "relocationOrderConfirmationReceived(orderConfirmation)";
|
||||
m_mainHandler->handlerEffectShowActorRelocation()->relocationOrderConfirmationReceived(orderConfirmation);
|
||||
}
|
||||
else
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "effectShowOrderConfirmationReceived(orderConfirmation)";
|
||||
DEBUG_LOG() << "effectShowOrderConfirmationReceived(orderConfirmation)";
|
||||
m_mainHandler->handlerEffectShow()->effectShowOrderConfirmationReceived(orderConfirmation);
|
||||
}
|
||||
break;
|
||||
@@ -225,14 +224,14 @@ void HandlerTabData::onFireSmokeMarkerDataChanged(const TrainingAreaBase::FireSm
|
||||
//-----------------------------------------------------------------------------
|
||||
void HandlerTabData::publishVehicleStatus(const EffectShowManagement::EffectShowVehicleStatus &vehicleStatus)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Vehicle Status published esmParticipantId: " << vehicleStatus.esmParticipantId() << ' ' << vehicleStatus.operational();
|
||||
DEBUG_LOG() << "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(m_logger) << "Send Adler Feuerbereitschaft";
|
||||
DEBUG_LOG() << "Send Adler Feuerbereitschaft";
|
||||
TrainingAreaBase::AdlerFqFbRequest out;
|
||||
|
||||
out.aesItemId(aesId);
|
||||
@@ -242,10 +241,10 @@ void HandlerTabData::sendAdlerFqFb(const int aesId)
|
||||
void HandlerTabData::onAdlerFqFbReply(const Core::FunctionReplyObject &reply)
|
||||
{
|
||||
if (reply.error())
|
||||
ERROR_LOG(m_logger) << "Adler Feuerbereitschaft could not be send: " << reply.str()
|
||||
ERROR_LOG() << "Adler Feuerbereitschaft could not be send: " << reply.str()
|
||||
<< ", id:" << reply.id();
|
||||
else
|
||||
DEBUG_LOG(m_logger) << "Adler Feuerbereitschaft successfully to TAB!";
|
||||
DEBUG_LOG() << "Adler Feuerbereitschaft successfully to TAB!";
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -113,7 +113,6 @@ private:
|
||||
|
||||
private: // attributes
|
||||
Initialization *m_mainHandler;
|
||||
NGL::INGLLogger &m_logger;
|
||||
QMap<int, EffectShowManagement::EffectShowVehicleStatus> m_effectShowVehicleStatus;
|
||||
|
||||
};
|
||||
|
||||
+11
-11
@@ -41,13 +41,13 @@ Initialization::~Initialization()
|
||||
|
||||
bool Initialization::initialize(const std::shared_ptr<DDSConnector::DdsConnector> &ddsConnector, const QSqlDatabase &sqlDb)
|
||||
{
|
||||
INFO_LOG(m_logger) << "Start EffectShowManagement Initialization.";
|
||||
INFO_LOG() << "Start EffectShowManagement Initialization.";
|
||||
|
||||
// initialize DDS
|
||||
m_ddsHandler = std::make_shared<DdsHandler>(ddsConnector);
|
||||
if (!m_ddsHandler->init())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Initialisation DdsHandler failed.";
|
||||
ERROR_LOG() << "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(m_logger) << "Initialisation DbHandler failed.";
|
||||
ERROR_LOG() << "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(m_logger) << "EffectShowManagement initialized.";
|
||||
INFO_LOG() << "EffectShowManagement initialized.";
|
||||
|
||||
return true;
|
||||
|
||||
@@ -98,43 +98,43 @@ bool Initialization::loadFromDatabase()
|
||||
|
||||
if (!m_handlerEffectShow->init())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Initialisation handlerEffectShow failed.";
|
||||
ERROR_LOG() << "Initialisation handlerEffectShow failed.";
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!m_handlerEffectShowActorRelocation->init())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Initialisation handlerEffectShowActorRelocation failed.";
|
||||
ERROR_LOG() << "Initialisation handlerEffectShowActorRelocation failed.";
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!m_handlerEffectShowVehicleStatus->init())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Initialisation HandlerEffectShowVehicleStatus failed.";
|
||||
ERROR_LOG() << "Initialisation HandlerEffectShowVehicleStatus failed.";
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!m_handlerPpmData->init())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Initialisation HandlerPpmData failed.";
|
||||
ERROR_LOG() << "Initialisation HandlerPpmData failed.";
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!m_handlerMdmData->init())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Initialisation HandlerMdmData failed.";
|
||||
ERROR_LOG() << "Initialisation HandlerMdmData failed.";
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!m_handlerTabData->init())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Initialisation HandlerTabData failed.";
|
||||
ERROR_LOG() << "Initialisation HandlerTabData failed.";
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!m_handlerAesData->init())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Initialisation HandlerAesData failed.";
|
||||
ERROR_LOG() << "Initialisation HandlerAesData failed.";
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#include <memory>
|
||||
#include <EffectShowManagement/esm_db.h>
|
||||
#include "dds_handler.h"
|
||||
#include "esm_export.h"
|
||||
#include "svcesmserver_export.h"
|
||||
#include "logger.h"
|
||||
|
||||
namespace NGLDB
|
||||
@@ -63,9 +63,6 @@ private:
|
||||
std::shared_ptr<HandlerEffectShow> m_handlerEffectShow;
|
||||
std::shared_ptr<HandlerEffectShowActorRelocation> m_handlerEffectShowActorRelocation;
|
||||
std::shared_ptr<HandlerEffectShowVehicleStatus> m_handlerEffectShowVehicleStatus;
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
|
||||
};
|
||||
|
||||
} // namespace EffectShowManagement
|
||||
@@ -9,7 +9,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <NGLLogger/INGLLogger.h>
|
||||
#include "esm_export.h"
|
||||
#include "svcesmcommon_export.h"
|
||||
|
||||
namespace EffectShowManagement
|
||||
{
|
||||
|
||||
+3
-4
@@ -18,7 +18,6 @@ ObjectAesData::ObjectAesData(Initialization *mainHandler,
|
||||
QObject *parent)
|
||||
: QObject(parent)
|
||||
, m_mainHandler(mainHandler)
|
||||
, m_logger(getLogger("ObjectAesData"))
|
||||
{
|
||||
}
|
||||
//=============================================================================
|
||||
@@ -30,7 +29,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(m_logger) << "New EsmAesData Id: " << m_data.idAes;
|
||||
DEBUG_LOG() << "New EsmAesData Id: " << m_data.idAes;
|
||||
return Core::FunctionReplyObject(m_data.idAes);
|
||||
}
|
||||
//=============================================================================
|
||||
@@ -41,7 +40,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(m_logger) << "Data changed for EsmAesData Id: " << m_data.idAes;
|
||||
DEBUG_LOG() << "Data changed for EsmAesData Id: " << m_data.idAes;
|
||||
|
||||
return Core::FunctionReplyObject(m_data.idAes);
|
||||
}
|
||||
@@ -73,7 +72,7 @@ bool ObjectAesData::dataChanged(const Database::EsmAesData &data) const
|
||||
if (m_data.nameAes != data.nameAes)
|
||||
return true;
|
||||
|
||||
DEBUG_LOG(m_logger) << "Data Volley: " << data.volley << " old: " << m_data.volley;
|
||||
DEBUG_LOG() << "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)
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#include "dds_handler.h"
|
||||
#include "logger.h"
|
||||
|
||||
#include <DDS/Core/function_reply_object.h>
|
||||
#include <DDS/Core/core_types.h>
|
||||
|
||||
// Generated
|
||||
#include <EffectShowManagement/esm_db.h>
|
||||
@@ -94,8 +94,5 @@ public:
|
||||
private:
|
||||
Initialization *m_mainHandler;
|
||||
Database::EsmAesData m_data;
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
|
||||
};
|
||||
}
|
||||
+13
-14
@@ -16,7 +16,6 @@ namespace EffectShowManagement
|
||||
ObjectEffectShow::ObjectEffectShow(Initialization *mainHandler, QObject *parent)
|
||||
: QObject(parent)
|
||||
, m_mainHandler(mainHandler)
|
||||
, m_logger(getLogger("ObjectEffectShow"))
|
||||
{
|
||||
} // end of ctor()
|
||||
//=============================================================================
|
||||
@@ -40,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(m_logger) << "createObject(db) complete ->"
|
||||
DEBUG_LOG() << "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
|
||||
@@ -80,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(m_logger) << "updateObject(data topic) complete ->"
|
||||
DEBUG_LOG() << "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()
|
||||
@@ -121,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(m_logger) << "Data changed for EffectShow Id: " << m_data.id;
|
||||
DEBUG_LOG() << "Data changed for EffectShow Id: " << m_data.id;
|
||||
|
||||
// Publish Data via DTS
|
||||
onPublishData();
|
||||
@@ -131,7 +130,7 @@ Core::FunctionReplyObject ObjectEffectShow::updateObject(const EffectShowManagem
|
||||
//=============================================================================
|
||||
bool ObjectEffectShow::updateObject(const ConvertFromTab::OrderConfirmation_t &data)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "updateObject() partly ->"
|
||||
DEBUG_LOG() << "updateObject() partly ->"
|
||||
<< "\n orderConfirmation " << m_data.orderConfirmation << " new: " << data.confirmation.underlying()
|
||||
<< "\n answerText " << m_data.answerText << " new: " << data.answerText;
|
||||
|
||||
@@ -140,7 +139,7 @@ bool ObjectEffectShow::updateObject(const ConvertFromTab::OrderConfirmation_t &d
|
||||
|
||||
if (!m_mainHandler->db()->update(m_data))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Effect Show Order Confirmation can_t be updated Id: " << m_data.id;
|
||||
ERROR_LOG() << "Effect Show Order Confirmation can_t be updated Id: " << m_data.id;
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -152,7 +151,7 @@ bool ObjectEffectShow::updateObject(const ConvertFromTab::OrderConfirmation_t &d
|
||||
//=============================================================================
|
||||
bool ObjectEffectShow::updateObject(const Database::EsmEffectShow &data)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "updateObject(db) complete ->"
|
||||
DEBUG_LOG() << "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()
|
||||
@@ -177,7 +176,7 @@ bool ObjectEffectShow::updateObject(const Database::EsmEffectShow &data)
|
||||
|
||||
if (!m_mainHandler->db()->update(m_data))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Failed effect Show updated Id: " << m_data.id;
|
||||
ERROR_LOG() << "Failed effect Show updated Id: " << m_data.id;
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -195,7 +194,7 @@ bool ObjectEffectShow::resetOrderConfirmation()
|
||||
|
||||
if (!m_mainHandler->db()->update(m_data))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Effect Show Order Confirmation can_t be updated Id: " << m_data.id;
|
||||
ERROR_LOG() << "Effect Show Order Confirmation can_t be updated Id: " << m_data.id;
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -221,7 +220,7 @@ ConvertToTab::EffectShowOrder_t ObjectEffectShow::getEffectShowOrder() const
|
||||
order.typeOfAmmunition = m_data.typeOfAmmunition;
|
||||
order.name = m_data.nameAreaEfffectSimulation;
|
||||
|
||||
DEBUG_LOG(m_logger) << "getEffectShowOrder():"
|
||||
DEBUG_LOG() << "getEffectShowOrder():"
|
||||
<< "\n idEffectShow " << order.idEffectShow
|
||||
<< "\n areaDepth " << order.areaDepth
|
||||
<< "\n areaWidth " << order.areaWidth
|
||||
@@ -243,7 +242,7 @@ ConvertToTab::RetractOrder_t ObjectEffectShow::getRetractOrder() const
|
||||
order.id = m_data.id;
|
||||
order.orderType = 1;
|
||||
|
||||
DEBUG_LOG(m_logger) << "getRetractOrder():"
|
||||
DEBUG_LOG() << "getRetractOrder():"
|
||||
<< "\n id " << order.id
|
||||
<< "\n orderType " << (int)order.orderType;
|
||||
return order;
|
||||
@@ -255,7 +254,7 @@ ConvertToTab::EffectShowContinue_t ObjectEffectShow::getContinueOrder() const
|
||||
order.idEffectShow = m_data.id;
|
||||
order.executionTime = m_data.startTime / 1000; // [ms] -> [s]
|
||||
|
||||
DEBUG_LOG(m_logger) << "getContinueOrder():"
|
||||
DEBUG_LOG() << "getContinueOrder():"
|
||||
<< "\n id " << order.idEffectShow
|
||||
<< "\n orderType " << order.executionTime;
|
||||
|
||||
@@ -289,10 +288,10 @@ void ObjectEffectShow::onPublishData()
|
||||
|
||||
|
||||
|
||||
INFO_LOG(m_logger) << "Publish EsmEffectShow-data to dds (" << m_data.id << ") ...";
|
||||
INFO_LOG() << "Publish EsmEffectShow-data to dds (" << m_data.id << ") ...";
|
||||
|
||||
if (!m_mainHandler->dds()->dts()->publish(ddsData))
|
||||
ERROR_LOG(m_logger) << "Error publishing EsmEffectShow-data to dds";
|
||||
ERROR_LOG() << "Error publishing EsmEffectShow-data to dds";
|
||||
} // end of onPublishData()
|
||||
//-----------------------------------------------------------------------------
|
||||
} // Namespace EffectShowManagement
|
||||
+1
-4
@@ -12,7 +12,7 @@
|
||||
#include "esm_convert_from_tab.h"
|
||||
#include "logger.h"
|
||||
|
||||
#include <DDS/Core/function_reply_object.h>
|
||||
#include <DDS/Core/core_types.h>
|
||||
#include <EffectShowManagement/esm_db.h>
|
||||
#include <EffectShowManagement/esm_dts.h>
|
||||
|
||||
@@ -63,8 +63,5 @@ private:
|
||||
Initialization *m_mainHandler;
|
||||
Database::EsmEffectShow m_data;
|
||||
bool m_bRemoveFromDdsOnDestruction = true;
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
|
||||
};
|
||||
}
|
||||
+4
-5
@@ -14,7 +14,6 @@ namespace EffectShowManagement
|
||||
|
||||
ObjectEffectShowActorRelocation::ObjectEffectShowActorRelocation(Initialization *mainHandler)
|
||||
: m_mainHandler(mainHandler)
|
||||
, m_logger(getLogger("ObjectEffectShowActorRelocation"))
|
||||
{
|
||||
}
|
||||
//=============================================================================
|
||||
@@ -32,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(m_logger) << "New Effect Show Actor Relocation Id: " << m_data.id;
|
||||
DEBUG_LOG() << "New Effect Show Actor Relocation Id: " << m_data.id;
|
||||
}
|
||||
|
||||
// Publish Data via DTS
|
||||
@@ -51,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(m_logger) << "Data changed for EffectShowActorRelocation Id: " << m_data.id;
|
||||
DEBUG_LOG() << "Data changed for EffectShowActorRelocation Id: " << m_data.id;
|
||||
|
||||
// Publish Data via DTS
|
||||
onPublishData();
|
||||
@@ -81,10 +80,10 @@ void ObjectEffectShowActorRelocation::onPublishData()
|
||||
ddsData.isDeleted(false);
|
||||
ddsData.isUsed(false);
|
||||
|
||||
INFO_LOG(m_logger) << "Publish EsmEffectShowActorRelocation-data to dds (" << m_data.id << ") ...";
|
||||
INFO_LOG() << "Publish EsmEffectShowActorRelocation-data to dds (" << m_data.id << ") ...";
|
||||
|
||||
if (!m_mainHandler->dds()->dts()->publish(ddsData))
|
||||
ERROR_LOG(m_logger) << "Error publishing EsmEffectShowActorRelocation-data to dds";
|
||||
ERROR_LOG() << "Error publishing EsmEffectShowActorRelocation-data to dds";
|
||||
}
|
||||
//=============================================================================
|
||||
ConvertToTab::RelocationOrder_t ObjectEffectShowActorRelocation::getRelocationOrder() const
|
||||
|
||||
+1
-4
@@ -10,7 +10,7 @@
|
||||
#include "esm_convert_to_tab.h"
|
||||
#include "logger.h"
|
||||
|
||||
#include <DDS/Core/function_reply_object.h>
|
||||
#include <DDS/Core/core_types.h>
|
||||
#include <EffectShowManagement/esm_db.h>
|
||||
#include <EffectShowManagement/esm_dts.h>
|
||||
|
||||
@@ -56,8 +56,5 @@ protected:
|
||||
private:
|
||||
Initialization *m_mainHandler;
|
||||
Database::EsmEffectShowActorRelocation m_data;
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
|
||||
};
|
||||
}
|
||||
+8
-9
@@ -14,7 +14,6 @@ namespace EffectShowManagement
|
||||
|
||||
ObjectEffectShowVehicleStatus::ObjectEffectShowVehicleStatus(Initialization *mainHandler)
|
||||
: m_mainHandler(mainHandler)
|
||||
, m_logger(getLogger("ObjectEffectShowVehicleStatus"))
|
||||
{
|
||||
}
|
||||
|
||||
@@ -55,11 +54,11 @@ void ObjectEffectShowVehicleStatus::createObject()
|
||||
{
|
||||
if (!m_mainHandler->db()->insert(m_data))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error inserting EsmEffectShowVehicleStatus into database. esmParticipantId" << m_data.esmParticipantId;
|
||||
ERROR_LOG() << "Error inserting EsmEffectShowVehicleStatus into database. esmParticipantId" << m_data.esmParticipantId;
|
||||
return;
|
||||
}
|
||||
|
||||
DEBUG_LOG(m_logger) << "New Effect Show Vehicle Status esmParticipantId: " << m_data.esmParticipantId;
|
||||
DEBUG_LOG() << "New Effect Show Vehicle Status esmParticipantId: " << m_data.esmParticipantId;
|
||||
|
||||
// Publish Data via DTS
|
||||
onPublishData();
|
||||
@@ -69,17 +68,17 @@ void ObjectEffectShowVehicleStatus::updateObject()
|
||||
{
|
||||
if (m_data.esmParticipantId <= 0)
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Update object illegal esmParticipantId: " << m_data.esmParticipantId;
|
||||
ERROR_LOG() << "Update object illegal esmParticipantId: " << m_data.esmParticipantId;
|
||||
return;
|
||||
}
|
||||
|
||||
if (!m_mainHandler->db()->update(m_data))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error updating EsmEffectShowVehicleStatus into database esmParticipantId: " << m_data.esmParticipantId;
|
||||
ERROR_LOG() << "Error updating EsmEffectShowVehicleStatus into database esmParticipantId: " << m_data.esmParticipantId;
|
||||
return;
|
||||
}
|
||||
|
||||
DEBUG_LOG(m_logger) << "Data changed for EsmEffectShowVehicleStatus esmParticipantId: " << m_data.esmParticipantId;
|
||||
DEBUG_LOG() << "Data changed for EsmEffectShowVehicleStatus esmParticipantId: " << m_data.esmParticipantId;
|
||||
|
||||
// Publish Data via DTS
|
||||
onPublishData();
|
||||
@@ -89,7 +88,7 @@ void ObjectEffectShowVehicleStatus::removeObject()
|
||||
{
|
||||
if (!m_mainHandler->db()->removeEsmEffectShowVehicleStatus(m_data.esmParticipantId))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "EsmEffectShowVehicleStatus can not be removed eqpNum: " << m_data.esmParticipantId;
|
||||
ERROR_LOG() << "EsmEffectShowVehicleStatus can not be removed eqpNum: " << m_data.esmParticipantId;
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -111,10 +110,10 @@ void ObjectEffectShowVehicleStatus::onPublishData()
|
||||
ddsData.nameEffectShowActor(m_data.nameEffectShowActor.toStdString());
|
||||
ddsData.operational(m_data.operational);
|
||||
ddsData.sampleTime(m_data.timestamp);
|
||||
INFO_LOG(m_logger) << "Publish EsmEffectShowVehicleStatus-data to dds (" << m_data.esmParticipantId << ") ...";
|
||||
INFO_LOG() << "Publish EsmEffectShowVehicleStatus-data to dds (" << m_data.esmParticipantId << ") ...";
|
||||
|
||||
if (!m_mainHandler->dds()->dts()->publish(ddsData))
|
||||
ERROR_LOG(m_logger) << "Error publishing EsmEffectShowVehicleStatus-data to dds";
|
||||
ERROR_LOG() << "Error publishing EsmEffectShowVehicleStatus-data to dds";
|
||||
}
|
||||
|
||||
} // Namespace EffectShowManagement
|
||||
+1
-4
@@ -11,7 +11,7 @@
|
||||
#include "handler_ppm_data.h"
|
||||
#include "logger.h"
|
||||
|
||||
#include <DDS/Core/function_reply_object.h>
|
||||
#include <DDS/Core/core_types.h>
|
||||
|
||||
// Generated
|
||||
#include <EffectShowManagement/esm_db.h>
|
||||
@@ -66,8 +66,5 @@ protected:
|
||||
private:
|
||||
Initialization *m_mainHandler;
|
||||
Database::EsmEffectShowVehicleStatus m_data;
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
|
||||
};
|
||||
}
|
||||
Reference in new issue
Block a user