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
+117
-118
@@ -21,7 +21,6 @@ HandlerDynamicParticipantData::HandlerDynamicParticipantData(const std::shared_p
|
||||
const std::shared_ptr<DatabaseInterface> &db)
|
||||
: m_ddsHandler(ddsHandler)
|
||||
, m_db(db)
|
||||
, m_logger(getLogger("HandlerDynamicParticipantData"))
|
||||
{
|
||||
} // end of ctor()
|
||||
|
||||
@@ -33,12 +32,12 @@ HandlerDynamicParticipantData::~HandlerDynamicParticipantData()
|
||||
//-----------------------------------------------------------------------------
|
||||
bool HandlerDynamicParticipantData::init()
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Creating and initializing PPM DTC, AES DTC, PDM DTC ...";
|
||||
DEBUG_LOG() << "Creating and initializing PPM DTC, AES DTC, PDM DTC ...";
|
||||
|
||||
m_ppmDtc = ParticipantManagement::Interface::Dtc::create(m_ddsHandler->ddsConnector());
|
||||
if (m_ppmDtc == nullptr)
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Could not create PPM DTC";
|
||||
ERROR_LOG() << "Could not create PPM DTC";
|
||||
return false;
|
||||
}
|
||||
m_ppmDtc->enableType();
|
||||
@@ -46,7 +45,7 @@ bool HandlerDynamicParticipantData::init()
|
||||
m_aesDtc = AreaEffectSimulation::Interface::Dtc::create(m_ddsHandler->ddsConnector());
|
||||
if (m_aesDtc == nullptr)
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Could not create AES DTC";
|
||||
ERROR_LOG() << "Could not create AES DTC";
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -54,7 +53,7 @@ bool HandlerDynamicParticipantData::init()
|
||||
m_gimDtc = GuezIedManagement::Interface::Dtc::create(m_ddsHandler->ddsConnector());
|
||||
if (m_gimDtc == nullptr)
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Could not create GIM DTC";
|
||||
ERROR_LOG() << "Could not create GIM DTC";
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
@@ -62,7 +61,7 @@ bool HandlerDynamicParticipantData::init()
|
||||
m_pdmDtc = ProjectDataManagement::Interface::Dtc::create(m_ddsHandler->ddsConnector());
|
||||
if (m_pdmDtc == nullptr)
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Could not create PDM DTC";
|
||||
ERROR_LOG() << "Could not create PDM DTC";
|
||||
return false;
|
||||
}
|
||||
m_pdmDtc->enableChargeType();
|
||||
@@ -81,7 +80,7 @@ bool HandlerDynamicParticipantData::init()
|
||||
m_aesDtc->enableEffects();
|
||||
m_aesDtc->waitForHistoricalDataEffects();
|
||||
bool ww = m_aesDtc->waitForHistoricalDataAesItemView();
|
||||
DEBUG_LOG(m_logger) << "waitForHistoricalDataAesItemView = " << ww;
|
||||
DEBUG_LOG() << "waitForHistoricalDataAesItemView = " << ww;
|
||||
// read all aesItemViewData
|
||||
m_aesDtc->aesItemViews([this](const AreaEffectSimulation::AesItemView &aiv) { onAesItemViewChanged(aiv, DataModification::eAdded); });
|
||||
|
||||
@@ -106,7 +105,7 @@ bool HandlerDynamicParticipantData::init()
|
||||
this, &HandlerDynamicParticipantData::onIedChanged);
|
||||
m_gimDtc->enableIed();
|
||||
bool gg = m_gimDtc->waitForHistoricalDataIed();
|
||||
DEBUG_LOG(m_logger) << "waitForHistoricalDataIed = " << gg;
|
||||
DEBUG_LOG() << "waitForHistoricalDataIed = " << gg;
|
||||
// read all aesItemViewData
|
||||
m_gimDtc->ieds([this](const GuezIedManagement::Ied &ied) { onIedChanged(ied, DataModification::eAdded); });
|
||||
#endif
|
||||
@@ -115,7 +114,7 @@ bool HandlerDynamicParticipantData::init()
|
||||
|
||||
if (!m_bldDtc)
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Could not create DTC Buildings";
|
||||
ERROR_LOG() << "Could not create DTC Buildings";
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -130,7 +129,7 @@ bool HandlerDynamicParticipantData::init()
|
||||
|
||||
if (!m_ppmDtc->enableDynamicParticipantData())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "init() PPM failed";
|
||||
ERROR_LOG() << "init() PPM failed";
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -141,12 +140,12 @@ bool HandlerDynamicParticipantData::init()
|
||||
|
||||
if (!m_ppmDtc->enableParticipantGearEvent())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "init() PPM failed";
|
||||
ERROR_LOG() << "init() PPM failed";
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
DEBUG_LOG(m_logger) << "... done";
|
||||
DEBUG_LOG() << "... done";
|
||||
|
||||
return true;
|
||||
} // end of init()
|
||||
@@ -159,7 +158,7 @@ void HandlerDynamicParticipantData::onParticipantChanged(const ParticipantManage
|
||||
case DataModification::eAdded:
|
||||
case DataModification::eModified:
|
||||
m_partMap[data.id()] = data;
|
||||
DEBUG_LOG(m_logger) << "added/modified - data.participantId: " << data.id()
|
||||
DEBUG_LOG() << "added/modified - data.participantId: " << data.id()
|
||||
<< ", data.partyId: " << data.partyId()
|
||||
<< ", data.equipmentNumber: " << data.equipmentNumber();
|
||||
break;
|
||||
@@ -178,20 +177,20 @@ void HandlerDynamicParticipantData::onParticipantPositionChanged(const Participa
|
||||
case DataModification::eModified:
|
||||
{
|
||||
m_partPositionMap[data.participantId()] = data;
|
||||
DEBUG_LOG(m_logger) << "added/modified Participant Position - data.participantId: " << data.participantId()
|
||||
DEBUG_LOG() << "added/modified Participant Position - data.participantId: " << data.participantId()
|
||||
<< ", data.pos: " << data.pos();
|
||||
|
||||
//TransportInitiated (mounted on vehicle)
|
||||
if (data.mountedOn().is_set())
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Mounted on : " << data.mountedOn().get();
|
||||
DEBUG_LOG() << "Mounted on : " << data.mountedOn().get();
|
||||
|
||||
if (m_isMounted.contains(data.participantId()))
|
||||
break;
|
||||
|
||||
m_isMounted.append(data.participantId());
|
||||
|
||||
DEBUG_LOG(m_logger) << "Added mounted participant id " << data.participantId();
|
||||
DEBUG_LOG() << "Added mounted participant id " << data.participantId();
|
||||
|
||||
qint64 timeMounted = getLastSignificantPositionMountedChanged(data.participantId(), data.sampleTime(), data.pos());
|
||||
if (timeMounted <= 0)
|
||||
@@ -209,13 +208,13 @@ void HandlerDynamicParticipantData::onParticipantPositionChanged(const Participa
|
||||
ttData.eventTypeId = ReportManagement::EventType::TransportInitiated;
|
||||
ttData.id = 0; // force insert
|
||||
if (!m_db->insert(ttData))
|
||||
WARNING_LOG(m_logger) << "Error while inserting Event TransportInitiated for participantId: " << ttData.participantId;
|
||||
WARNING_LOG() << "Error while inserting Event TransportInitiated for participantId: " << ttData.participantId;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (m_isMounted.contains(data.participantId()))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Removed mounted participant id " << data.participantId();
|
||||
DEBUG_LOG() << "Removed mounted participant id " << data.participantId();
|
||||
m_isMounted.remove(m_isMounted.indexOf(data.participantId()));
|
||||
}
|
||||
}
|
||||
@@ -224,7 +223,7 @@ void HandlerDynamicParticipantData::onParticipantPositionChanged(const Participa
|
||||
}
|
||||
case DataModification::eRemoved:
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Removed participant id " << data.participantId();
|
||||
DEBUG_LOG() << "Removed participant id " << data.participantId();
|
||||
if (m_isMounted.contains(data.participantId()))
|
||||
m_isMounted.remove(m_isMounted.indexOf(data.participantId()));
|
||||
m_partPositionMap.remove(data.participantId());
|
||||
@@ -240,7 +239,7 @@ void HandlerDynamicParticipantData::onAesItemViewChanged(const AreaEffectSimulat
|
||||
{
|
||||
case DataModification::eAdded:
|
||||
case DataModification::eModified:
|
||||
DEBUG_LOG(m_logger) << "added/modified data.aesItemId(): " << data.aesItemId();
|
||||
DEBUG_LOG() << "added/modified data.aesItemId(): " << data.aesItemId();
|
||||
m_aesItemViewMap[data.aesItemId()] = data;
|
||||
break;
|
||||
case DataModification::eRemoved:
|
||||
@@ -259,7 +258,7 @@ void HandlerDynamicParticipantData::onIedChanged(const GuezIedManagement::Ied &d
|
||||
{
|
||||
case DataModification::eAdded:
|
||||
case DataModification::eModified:
|
||||
DEBUG_LOG(m_logger) << "added/modified data.id(): " << data.id();
|
||||
DEBUG_LOG() << "added/modified data.id(): " << data.id();
|
||||
m_iedMap[data.id()] = data;
|
||||
break;
|
||||
case DataModification::eRemoved:
|
||||
@@ -276,7 +275,7 @@ void HandlerDynamicParticipantData::onDynamicParticipantDataChanged(const Partic
|
||||
if (modType == DataModification::eRemoved)
|
||||
return;
|
||||
|
||||
DEBUG_LOG(m_logger) << "onDynamicParticipantDataChanged(): "
|
||||
DEBUG_LOG() << "onDynamicParticipantDataChanged(): "
|
||||
<< " participantId: " << data.participantId()
|
||||
<< ", size stateHistory: " << data.stateHistory().size()
|
||||
<< ", size sanMatStock: " << data.sanitationMaterialStock().size();
|
||||
@@ -299,7 +298,7 @@ void HandlerDynamicParticipantData::onDynamicParticipantDataChanged(const Partic
|
||||
itParticipant = m_partMap.constFind(data.participantId());
|
||||
if (itParticipant == m_partMap.constEnd())
|
||||
{
|
||||
WARNING_LOG(m_logger) << "Participant does not exist: participantId: " << data.participantId();
|
||||
WARNING_LOG() << "Participant does not exist: participantId: " << data.participantId();
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -371,16 +370,16 @@ void HandlerDynamicParticipantData::onDynamicParticipantDataChanged(const Partic
|
||||
|
||||
if (data.stateHistory().size() > 0 && data.stateHistory() != lastDynData.stateHistory())
|
||||
{
|
||||
INFO_LOG(m_logger) << "PROCESSING: stateHistory.size() = " << data.stateHistory().size() << " for participant id = " << data.participantId();
|
||||
INFO_LOG() << "PROCESSING: stateHistory.size() = " << data.stateHistory().size() << " for participant id = " << data.participantId();
|
||||
const ParticipantManagement::StateInformation &stateInfo = data.stateHistory().at(data.stateHistory().size()-1);
|
||||
//const ParticipantManagement::StateInformation &stateInfo = m_ppmDtc->youngestStateInformation(data.stateHistory());
|
||||
const ProjectDataManagement::VulnerabilityState &vulnState = stateInfo.vulnerabilityState();
|
||||
|
||||
DEBUG_LOG(m_logger) << "vulnerabilityState: " << vulnState;
|
||||
DEBUG_LOG() << "vulnerabilityState: " << vulnState;
|
||||
if (stateInfo.originatorChargeTypeId() > 0)
|
||||
DEBUG_LOG(m_logger) << "originatorChargeTypeId: " << stateInfo.originatorChargeTypeId();
|
||||
DEBUG_LOG(m_logger) << "originatorType: " << stateInfo.originatorType();
|
||||
DEBUG_LOG(m_logger) << "vulnerabilityBits: " << stateInfo.vulnerabilityBits();
|
||||
DEBUG_LOG() << "originatorChargeTypeId: " << stateInfo.originatorChargeTypeId();
|
||||
DEBUG_LOG() << "originatorType: " << stateInfo.originatorType();
|
||||
DEBUG_LOG() << "vulnerabilityBits: " << stateInfo.vulnerabilityBits();
|
||||
|
||||
//counting NearMiss and HitWithNoEffect as CombatReady, after discussion with Ulli 08.2021
|
||||
bool isCombatReady = (vulnState == ProjectDataManagement::VulnerabilityState::CombatReady ||
|
||||
@@ -402,7 +401,7 @@ void HandlerDynamicParticipantData::onDynamicParticipantDataChanged(const Partic
|
||||
{
|
||||
// Save Treatment Data
|
||||
if (!m_db->insert(tData))
|
||||
ERROR_LOG(m_logger) << "Error while inserting treatment data - participantId: " << tData.participantId;
|
||||
ERROR_LOG() << "Error while inserting treatment data - participantId: " << tData.participantId;
|
||||
}
|
||||
|
||||
// Report Firings
|
||||
@@ -425,7 +424,7 @@ void HandlerDynamicParticipantData::onDynamicParticipantDataChanged(const Partic
|
||||
|
||||
// Save UnitPower Data
|
||||
if (!m_db->insert(upData))
|
||||
ERROR_LOG(m_logger) << "Error while inserting unit power data - participantId: " << upData.participantId;
|
||||
ERROR_LOG() << "Error while inserting unit power data - participantId: " << upData.participantId;
|
||||
|
||||
// Report Mine Area / Report Firings / Report AirSupport
|
||||
if (vulnState != ProjectDataManagement::VulnerabilityState::CombatReady)
|
||||
@@ -451,7 +450,7 @@ void HandlerDynamicParticipantData::onDynamicParticipantDataChanged(const Partic
|
||||
}
|
||||
// Save direct firings data
|
||||
if (!m_db->insert(fData))
|
||||
ERROR_LOG(m_logger) << "Error while inserting direct firings data into db for event_time = " << fData.eventTime;
|
||||
ERROR_LOG() << "Error while inserting direct firings data into db for event_time = " << fData.eventTime;
|
||||
|
||||
//save TreatmentTimeline events too
|
||||
{
|
||||
@@ -467,7 +466,7 @@ void HandlerDynamicParticipantData::onDynamicParticipantDataChanged(const Partic
|
||||
ttData.eventTypeId = ReportManagement::EventType::VBGChanged;
|
||||
ttData.id = 0; // force insert
|
||||
if (!m_db->insert(ttData))
|
||||
ERROR_LOG(m_logger) << "Error while inserting Event VBGChanged for participantId: " << ttData.participantId;
|
||||
ERROR_LOG() << "Error while inserting Event VBGChanged for participantId: " << ttData.participantId;
|
||||
}
|
||||
|
||||
// VitalityChanged
|
||||
@@ -478,7 +477,7 @@ void HandlerDynamicParticipantData::onDynamicParticipantDataChanged(const Partic
|
||||
ttData.eventTypeId = ReportManagement::EventType::VitalityChanged;
|
||||
ttData.id = 0; // force insert
|
||||
if (!m_db->insert(ttData))
|
||||
ERROR_LOG(m_logger) << "Error while inserting Event VitalityChanged for participantId: " << ttData.participantId;
|
||||
ERROR_LOG() << "Error while inserting Event VitalityChanged for participantId: " << ttData.participantId;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -488,7 +487,7 @@ void HandlerDynamicParticipantData::onDynamicParticipantDataChanged(const Partic
|
||||
if (stateInfo.originatorType() == ProjectDataManagement::StateChangeOriginator::AreaEffectSimulation && stateInfo.originatorChargeTypeId() != 0)
|
||||
{
|
||||
const AreaEffectSimulation::AesItemView aesItemView = getAesItemView(stateInfo.originatorId());
|
||||
DEBUG_LOG(m_logger) << "Found indirect fire from AES id = " << stateInfo.originatorId() << ", charge type = " << stateInfo.originatorChargeTypeId();
|
||||
DEBUG_LOG() << "Found indirect fire from AES id = " << stateInfo.originatorId() << ", charge type = " << stateInfo.originatorChargeTypeId();
|
||||
if (aesItemView.id() > 0)
|
||||
{
|
||||
if (aesItemView.partyId().is_set())
|
||||
@@ -503,11 +502,11 @@ void HandlerDynamicParticipantData::onDynamicParticipantDataChanged(const Partic
|
||||
}
|
||||
// Save indirect firings data
|
||||
if (!m_db->insert(fData))
|
||||
ERROR_LOG(m_logger) << "Error while inserting indirect firings data into db for event_time = " << fData.eventTime;
|
||||
ERROR_LOG() << "Error while inserting indirect firings data into db for event_time = " << fData.eventTime;
|
||||
|
||||
// Save indirect firings - Report AirSupport data
|
||||
if (!m_db->insert(airSupData))
|
||||
ERROR_LOG(m_logger) << "Error while inserting indirect firings (for airSupport report) into db for event_time = " << airSupData.eventTime;
|
||||
ERROR_LOG() << "Error while inserting indirect firings (for airSupport report) into db for event_time = " << airSupData.eventTime;
|
||||
|
||||
//save TreatmentTimeline events too
|
||||
{
|
||||
@@ -523,7 +522,7 @@ void HandlerDynamicParticipantData::onDynamicParticipantDataChanged(const Partic
|
||||
ttData.eventTypeId = ReportManagement::EventType::VBGChanged;
|
||||
ttData.id = 0; // force insert
|
||||
if (!m_db->insert(ttData))
|
||||
ERROR_LOG(m_logger) << "Error while inserting Event VBGChanged for participantId: " << ttData.participantId;
|
||||
ERROR_LOG() << "Error while inserting Event VBGChanged for participantId: " << ttData.participantId;
|
||||
}
|
||||
|
||||
// VitalityChanged
|
||||
@@ -534,7 +533,7 @@ void HandlerDynamicParticipantData::onDynamicParticipantDataChanged(const Partic
|
||||
ttData.eventTypeId = ReportManagement::EventType::VitalityChanged;
|
||||
ttData.id = 0; // force insert
|
||||
if (!m_db->insert(ttData))
|
||||
ERROR_LOG(m_logger) << "Error while inserting Event VitalityChanged for participantId: " << ttData.participantId;
|
||||
ERROR_LOG() << "Error while inserting Event VitalityChanged for participantId: " << ttData.participantId;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -552,7 +551,7 @@ void HandlerDynamicParticipantData::onDynamicParticipantDataChanged(const Partic
|
||||
}
|
||||
// Save explosive device data
|
||||
if (!m_db->insert(fData))
|
||||
ERROR_LOG(m_logger) << "Error while inserting explosive device data into db for event_time = " << fData.eventTime;
|
||||
ERROR_LOG() << "Error while inserting explosive device data into db for event_time = " << fData.eventTime;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -570,25 +569,25 @@ void HandlerDynamicParticipantData::onDynamicParticipantDataChanged(const Partic
|
||||
else
|
||||
nbcData.hit = 0;
|
||||
|
||||
DEBUG_LOG(m_logger) << "nbcData.hit: " << nbcData.hit;
|
||||
DEBUG_LOG() << "nbcData.hit: " << nbcData.hit;
|
||||
|
||||
// Check, if effectSimulation is mine area or NBC or Functional Area
|
||||
if (stateInfo.originatorType() == ProjectDataManagement::StateChangeOriginator::AreaEffectSimulation ||
|
||||
stateInfo.originatorType() == ProjectDataManagement::StateChangeOriginator::FunctionalArea)
|
||||
{
|
||||
INFO_LOG(m_logger) << "Originator = AreaEffectSimulation or FunctionalArea";
|
||||
INFO_LOG() << "Originator = AreaEffectSimulation or FunctionalArea";
|
||||
|
||||
mbData.mineAreaId = stateInfo.originatorId();
|
||||
nbcData.nbcId = stateInfo.originatorId();
|
||||
|
||||
DEBUG_LOG(m_logger) << "aesItemViewMap.size(): " << m_aesItemViewMap.size();
|
||||
DEBUG_LOG() << "aesItemViewMap.size(): " << m_aesItemViewMap.size();
|
||||
const AreaEffectSimulation::AesItemView aesItemView = getAesItemView(nbcData.nbcId);
|
||||
DEBUG_LOG(m_logger) << "aesItemView.id() = " << aesItemView.id();
|
||||
DEBUG_LOG() << "aesItemView.id() = " << aesItemView.id();
|
||||
|
||||
if (aesItemView.id() > 0)
|
||||
{
|
||||
AreaEffectSimulation::AesType aesType = aesItemView.aesTypeId();
|
||||
DEBUG_LOG(m_logger) << "AesType: " << aesType;
|
||||
DEBUG_LOG() << "AesType: " << aesType;
|
||||
|
||||
if (aesItemView.partyId().is_set())
|
||||
mbData.mineAreaPartyId = aesItemView.partyId().get();
|
||||
@@ -605,9 +604,9 @@ void HandlerDynamicParticipantData::onDynamicParticipantDataChanged(const Partic
|
||||
mbData.mineAreaId = aesItemView.aesItemId();
|
||||
if (mbData.mineAreaId > 0)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Inserting Mine Area Data";
|
||||
DEBUG_LOG() << "Inserting Mine Area Data";
|
||||
if (!m_db->insert(mbData))
|
||||
ERROR_LOG(m_logger) << "Error while inserting mine area data participantId: " << mbData.participantId;
|
||||
ERROR_LOG() << "Error while inserting mine area data participantId: " << mbData.participantId;
|
||||
}
|
||||
}
|
||||
if (aesType == AreaEffectSimulation::AesType::AtBCContamination ||
|
||||
@@ -619,9 +618,9 @@ void HandlerDynamicParticipantData::onDynamicParticipantDataChanged(const Partic
|
||||
nbcData.chargeTypeId = aesItemView.chargeStruct().chargeTypeId();
|
||||
if (nbcData.nbcId > 0 && nbcData.chargeTypeId > 0)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Inserting NBC Data";
|
||||
DEBUG_LOG() << "Inserting NBC Data";
|
||||
if (!m_db->insert(nbcData))
|
||||
ERROR_LOG(m_logger) << "Error while inserting nbc data participant: " << nbcData.participantId;
|
||||
ERROR_LOG() << "Error while inserting nbc data participant: " << nbcData.participantId;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -633,7 +632,7 @@ void HandlerDynamicParticipantData::onDynamicParticipantDataChanged(const Partic
|
||||
vrData.timePositionChanged = getLastSignificantParticipantPositionChanged(vrData.participantId, vrData.timeEvent, getLastPosition(vrData.participantId));
|
||||
|
||||
if (!m_db->insert(vrData))
|
||||
ERROR_LOG(m_logger) << "Error while inserting maintenance data for participantId: " << vrData.participantId;
|
||||
ERROR_LOG() << "Error while inserting maintenance data for participantId: " << vrData.participantId;
|
||||
|
||||
// treatment timeline event EnterFunctionalArea
|
||||
ttData.vulnerabilityState = stateInfo.vulnerabilityState().underlying();
|
||||
@@ -655,7 +654,7 @@ void HandlerDynamicParticipantData::onDynamicParticipantDataChanged(const Partic
|
||||
|
||||
ttData.id = 0; // force insert
|
||||
if (!m_db->insert(ttData))
|
||||
ERROR_LOG(m_logger) << "Error while inserting Event EnterFunctionalArea for participantId: " << ttData.participantId;
|
||||
ERROR_LOG() << "Error while inserting Event EnterFunctionalArea for participantId: " << ttData.participantId;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -665,7 +664,7 @@ void HandlerDynamicParticipantData::onDynamicParticipantDataChanged(const Partic
|
||||
// Treatment reports
|
||||
if (stateInfo.originatorType() == ProjectDataManagement::StateChangeOriginator::Sanitation)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Sanitation";
|
||||
DEBUG_LOG() << "Sanitation";
|
||||
// Sanitation info only for Human type class
|
||||
ParticipantManagement::TypeClass typeClass = m_ppmDtc->type(pData.typeId()).typeClass();
|
||||
if (typeClass == ParticipantManagement::TypeClass::Human)
|
||||
@@ -720,7 +719,7 @@ void HandlerDynamicParticipantData::onDynamicParticipantDataChanged(const Partic
|
||||
toAdd = false;
|
||||
|
||||
if (toAdd && !m_db->insert(tData))
|
||||
ERROR_LOG(m_logger) << "Error while inserting treatment data for participantId: " << tData.participantId;
|
||||
ERROR_LOG() << "Error while inserting treatment data for participantId: " << tData.participantId;
|
||||
|
||||
// now treatment timeline events
|
||||
{
|
||||
@@ -736,7 +735,7 @@ void HandlerDynamicParticipantData::onDynamicParticipantDataChanged(const Partic
|
||||
ttData.eventTypeId = ReportManagement::EventType::VBGChanged;
|
||||
ttData.id = 0; // force insert
|
||||
if (!m_db->insert(ttData))
|
||||
ERROR_LOG(m_logger) << "Error while inserting Event VBGChanged for participantId: " << ttData.participantId;
|
||||
ERROR_LOG() << "Error while inserting Event VBGChanged for participantId: " << ttData.participantId;
|
||||
}
|
||||
|
||||
// VitalityChanged
|
||||
@@ -747,7 +746,7 @@ void HandlerDynamicParticipantData::onDynamicParticipantDataChanged(const Partic
|
||||
ttData.eventTypeId = ReportManagement::EventType::VitalityChanged;
|
||||
ttData.id = 0; // force insert
|
||||
if (!m_db->insert(ttData))
|
||||
ERROR_LOG(m_logger) << "Error while inserting Event VitalityChanged for participantId: " << ttData.participantId;
|
||||
ERROR_LOG() << "Error while inserting Event VitalityChanged for participantId: " << ttData.participantId;
|
||||
}
|
||||
|
||||
// Treatment
|
||||
@@ -759,7 +758,7 @@ void HandlerDynamicParticipantData::onDynamicParticipantDataChanged(const Partic
|
||||
|
||||
ttData.id = 0; // force insert
|
||||
if (!m_db->insert(ttData))
|
||||
ERROR_LOG(m_logger) << "Error while inserting Event Treatment for participantId: " << ttData.participantId;
|
||||
ERROR_LOG() << "Error while inserting Event Treatment for participantId: " << ttData.participantId;
|
||||
|
||||
/*
|
||||
//TransportInitiated (mounted on vehicle)
|
||||
@@ -770,7 +769,7 @@ void HandlerDynamicParticipantData::onDynamicParticipantDataChanged(const Partic
|
||||
ttData.eventTypeId = ReportManagement::EventType::TransportInitiated;
|
||||
ttData.id = 0; // force insert
|
||||
if (!m_db->insert(ttData))
|
||||
ERROR_LOG(m_logger) << "Error while inserting Event TransportInitiated for participantId: " << ttData.participantId;
|
||||
ERROR_LOG() << "Error while inserting Event TransportInitiated for participantId: " << ttData.participantId;
|
||||
}
|
||||
*/
|
||||
}
|
||||
@@ -791,7 +790,7 @@ void HandlerDynamicParticipantData::onDynamicParticipantDataChanged(const Partic
|
||||
ttData.eventTypeId = ReportManagement::EventType::NineLinerSet;
|
||||
ttData.id = 0; //force insert
|
||||
if (!m_db->insert(ttData))
|
||||
ERROR_LOG(m_logger) << "Error while inserting Event NineLinerSet for participantId: " << ttData.participantId;
|
||||
ERROR_LOG() << "Error while inserting Event NineLinerSet for participantId: " << ttData.participantId;
|
||||
}
|
||||
else if (stateInfo.originatorChargeTypeId() == 2) // Transport Requested
|
||||
{
|
||||
@@ -800,7 +799,7 @@ void HandlerDynamicParticipantData::onDynamicParticipantDataChanged(const Partic
|
||||
ttData.eventTypeId = ReportManagement::EventType::TransportRequested;
|
||||
ttData.id = 0; //force insert
|
||||
if (!m_db->insert(ttData))
|
||||
ERROR_LOG(m_logger) << "Error while inserting Event TransportRequested for participantId: " << ttData.participantId;
|
||||
ERROR_LOG() << "Error while inserting Event TransportRequested for participantId: " << ttData.participantId;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -817,7 +816,7 @@ void HandlerDynamicParticipantData::onDynamicParticipantDataChanged(const Partic
|
||||
ttData.eventTypeId = ReportManagement::EventType::SetInjury;
|
||||
ttData.id = 0; // force insert
|
||||
if (!m_db->insert(ttData))
|
||||
ERROR_LOG(m_logger) << "Error while inserting Event SetInjury for participantId: " << ttData.participantId;
|
||||
ERROR_LOG() << "Error while inserting Event SetInjury for participantId: " << ttData.participantId;
|
||||
}
|
||||
|
||||
// Vitality and Vulnerability reset manually
|
||||
@@ -831,7 +830,7 @@ void HandlerDynamicParticipantData::onDynamicParticipantDataChanged(const Partic
|
||||
ttData.eventTypeId = ReportManagement::EventType::VitalityReset;
|
||||
ttData.id = 0; // force insert
|
||||
if (!m_db->insert(ttData))
|
||||
ERROR_LOG(m_logger) << "Error while inserting Event VitalityReset for participantId: " << ttData.participantId;
|
||||
ERROR_LOG() << "Error while inserting Event VitalityReset for participantId: " << ttData.participantId;
|
||||
}
|
||||
|
||||
#ifdef GUEZ_MODE
|
||||
@@ -845,7 +844,7 @@ void HandlerDynamicParticipantData::onDynamicParticipantDataChanged(const Partic
|
||||
ttData.eventTypeId = ReportManagement::EventType::VBGSet;
|
||||
ttData.id = 0; // force insert
|
||||
if (!m_db->insert(ttData))
|
||||
ERROR_LOG(m_logger) << "Error while inserting Event VBGSet for participantId: " << ttData.participantId;
|
||||
ERROR_LOG() << "Error while inserting Event VBGSet for participantId: " << ttData.participantId;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -854,7 +853,7 @@ void HandlerDynamicParticipantData::onDynamicParticipantDataChanged(const Partic
|
||||
|
||||
}
|
||||
else
|
||||
DEBUG_LOG(m_logger) << "No new state history for participant id = " << data.participantId();
|
||||
DEBUG_LOG() << "No new state history for participant id = " << data.participantId();
|
||||
|
||||
|
||||
// Report Charge Resupply
|
||||
@@ -894,7 +893,7 @@ void HandlerDynamicParticipantData::onDynamicParticipantDataChanged(const Partic
|
||||
crData.chargeRemain = gi.remain();
|
||||
|
||||
if (crData.chargeTypeId != gi.chargeTypeId())
|
||||
WARNING_LOG(m_logger) << "OLD charge id " << gi.chargeTypeId() << " changed in NEW id " << crData.chargeTypeId;
|
||||
WARNING_LOG() << "OLD charge id " << gi.chargeTypeId() << " changed in NEW id " << crData.chargeTypeId;
|
||||
|
||||
QPair<int, int> pair;
|
||||
pair.first = gi.gearTypeId();
|
||||
@@ -908,11 +907,11 @@ void HandlerDynamicParticipantData::onDynamicParticipantDataChanged(const Partic
|
||||
}
|
||||
gearMap.insert(pair, gi.remain());
|
||||
|
||||
DEBUG_LOG(m_logger) << "gearTypeId: " << crData.gearTypeId << ", chargeTypeId: " << crData.chargeTypeId;
|
||||
DEBUG_LOG() << "gearTypeId: " << crData.gearTypeId << ", chargeTypeId: " << crData.chargeTypeId;
|
||||
|
||||
crData.id = 0; // to force insert without id
|
||||
if (!m_db->insert(crData))
|
||||
ERROR_LOG(m_logger) << "Error while inserting charge resupply data for participant: " << data.participantId();
|
||||
ERROR_LOG() << "Error while inserting charge resupply data for participant: " << data.participantId();
|
||||
}
|
||||
|
||||
// Has Turm/Wanne Map been filled?
|
||||
@@ -930,14 +929,14 @@ void HandlerDynamicParticipantData::onDynamicParticipantDataChanged(const Partic
|
||||
}
|
||||
gearMap.insert(pair, turmWanneCrData.chargeRemain);
|
||||
|
||||
INFO_LOG(m_logger) << "Inserting TurmWanne data gearTypeId: " << turmWanneCrData.gearTypeId
|
||||
INFO_LOG() << "Inserting TurmWanne data gearTypeId: " << turmWanneCrData.gearTypeId
|
||||
<< ", chargeTypeId: " << turmWanneCrData.chargeTypeId
|
||||
<< ", remain: " << turmWanneCrData.chargeRemain
|
||||
<< ", fired: " << turmWanneCrData.chargeFired ;
|
||||
|
||||
turmWanneCrData.id = 0; // to force insert without id
|
||||
if (!m_db->insert(turmWanneCrData))
|
||||
ERROR_LOG(m_logger) << "Error while inserting (turm/wanne) charge resupply data for participant: " << data.participantId();
|
||||
ERROR_LOG() << "Error while inserting (turm/wanne) charge resupply data for participant: " << data.participantId();
|
||||
|
||||
}
|
||||
|
||||
@@ -947,7 +946,7 @@ void HandlerDynamicParticipantData::onDynamicParticipantDataChanged(const Partic
|
||||
for (auto it = gearMap.begin(); it != gearMap.end(); ++it)
|
||||
{
|
||||
QPair<int, int> pair = it.key();
|
||||
DEBUG_LOG(m_logger) << "gearTypeId: " << pair.first << ", chargeTypeId: " << pair.second;
|
||||
DEBUG_LOG() << "gearTypeId: " << pair.first << ", chargeTypeId: " << pair.second;
|
||||
if (!containsGearTypeId(data.gear(), pair.first, pair.second))
|
||||
{
|
||||
crData.chargeTypeId = -2;
|
||||
@@ -955,14 +954,14 @@ void HandlerDynamicParticipantData::onDynamicParticipantDataChanged(const Partic
|
||||
|
||||
crData.id = 0; // to force insert without id
|
||||
if (!m_db->insert(crData))
|
||||
ERROR_LOG(m_logger) << "Error while inserting charge resupply data for participant: " << data.participantId();
|
||||
ERROR_LOG() << "Error while inserting charge resupply data for participant: " << data.participantId();
|
||||
}
|
||||
}
|
||||
|
||||
// Report Sanitation Material
|
||||
if (data.sanitationMaterialStock().size() > 0)
|
||||
{
|
||||
INFO_LOG(m_logger) << "sanitationMaterialStock.size() = " << data.sanitationMaterialStock().size() << " for participant id = " << data.participantId();
|
||||
INFO_LOG() << "sanitationMaterialStock.size() = " << data.sanitationMaterialStock().size() << " for participant id = " << data.participantId();
|
||||
|
||||
Database::RepSanitationMaterialData sanData;
|
||||
|
||||
@@ -973,7 +972,7 @@ void HandlerDynamicParticipantData::onDynamicParticipantDataChanged(const Partic
|
||||
sanData.sanitationUniqueId = data.sanitationUniqueId();
|
||||
sanData.qualification = data.qualification().underlying();
|
||||
|
||||
DEBUG_LOG(m_logger) << "Qualification = " << sanData.qualification;
|
||||
DEBUG_LOG() << "Qualification = " << sanData.qualification;
|
||||
|
||||
for ( ParticipantManagement::SanitationMaterial sanMat : std::as_const(data.sanitationMaterialStock()))
|
||||
{
|
||||
@@ -981,10 +980,10 @@ void HandlerDynamicParticipantData::onDynamicParticipantDataChanged(const Partic
|
||||
sanData.materialAmount = sanMat.materialCount();
|
||||
sanData.id = 0; // to force insert
|
||||
|
||||
DEBUG_LOG(m_logger) << "Inserting SanMat data for participant id = " << data.participantId() << " , materialId = " << sanData.materialId << ", stock = " << sanData.materialAmount;
|
||||
DEBUG_LOG() << "Inserting SanMat data for participant id = " << data.participantId() << " , materialId = " << sanData.materialId << ", stock = " << sanData.materialAmount;
|
||||
|
||||
if (!m_db->insert(sanData))
|
||||
ERROR_LOG(m_logger) << "Error while inserting sanitation material data for participant: " << data.participantId();
|
||||
ERROR_LOG() << "Error while inserting sanitation material data for participant: " << data.participantId();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1012,7 +1011,7 @@ void HandlerDynamicParticipantData::onBuildingStateChanged(const Buildings::Buil
|
||||
airSupData.eventTime = data.sampleTime();
|
||||
|
||||
if (!m_db->insert(airSupData))
|
||||
ERROR_LOG(m_logger) << "Error while inserting building state data into db for event_time = " << airSupData.eventTime;
|
||||
ERROR_LOG() << "Error while inserting building state data into db for event_time = " << airSupData.eventTime;
|
||||
|
||||
} // end of onBuildingStateChanged
|
||||
|
||||
@@ -1043,7 +1042,7 @@ void HandlerDynamicParticipantData::onAesEffectsChanged(const AreaEffectSimulati
|
||||
}
|
||||
|
||||
if (!m_db->insert(impData))
|
||||
ERROR_LOG(m_logger) << "Error while inserting air support impact data into db for event_time = " << impData.eventTime;
|
||||
ERROR_LOG() << "Error while inserting air support impact data into db for event_time = " << impData.eventTime;
|
||||
|
||||
} // end of onAesEffectsChanged
|
||||
|
||||
@@ -1071,7 +1070,7 @@ bool HandlerDynamicParticipantData::checkVulnerabilityStateChange(ProjectDataMan
|
||||
// No change?
|
||||
if (it.value() == vulnState)
|
||||
{
|
||||
INFO_LOG(m_logger) << "Same vulnerabilityState: " << vulnState;
|
||||
INFO_LOG() << "Same vulnerabilityState: " << vulnState;
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1086,10 +1085,10 @@ AreaEffectSimulation::AesItemView HandlerDynamicParticipantData::getAesItemView(
|
||||
{
|
||||
// make sure we have all data
|
||||
bool ww = m_aesDtc->waitForHistoricalDataAesItemView();
|
||||
DEBUG_LOG(m_logger) << "waitForHistoricalDataAesItemView = " << ww;
|
||||
DEBUG_LOG() << "waitForHistoricalDataAesItemView = " << ww;
|
||||
|
||||
auto ret = m_aesDtc->aesItemView(effectSimulationId);
|
||||
DEBUG_LOG(m_logger) << "ret.id() = " << ret.id();
|
||||
DEBUG_LOG() << "ret.id() = " << ret.id();
|
||||
|
||||
if (ret.id() == effectSimulationId)
|
||||
{
|
||||
@@ -1098,7 +1097,7 @@ AreaEffectSimulation::AesItemView HandlerDynamicParticipantData::getAesItemView(
|
||||
}
|
||||
else
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Not found effectSimulationId = " << effectSimulationId;
|
||||
DEBUG_LOG() << "Not found effectSimulationId = " << effectSimulationId;
|
||||
return AreaEffectSimulation::AesItemView();
|
||||
}
|
||||
|
||||
@@ -1115,21 +1114,21 @@ QString HandlerDynamicParticipantData::getAesName(int effectSimulationId)
|
||||
{
|
||||
// make sure we have all data
|
||||
bool ww = m_aesDtc->waitForHistoricalDataAesItemView();
|
||||
DEBUG_LOG(m_logger) << "waitForHistoricalDataAesItemView = " << ww;
|
||||
DEBUG_LOG() << "waitForHistoricalDataAesItemView = " << ww;
|
||||
|
||||
auto aesItemView = getAesItemView(effectSimulationId);
|
||||
ERROR_LOG(m_logger) << "aesType: " << aesItemView.aesTypeId().underlying();
|
||||
ERROR_LOG() << "aesType: " << aesItemView.aesTypeId().underlying();
|
||||
if (aesItemView.aesTypeId() == AreaEffectSimulation::AesType_def::AtExplosionCluster)
|
||||
{
|
||||
QString aesName = QString::fromStdString(m_aesDtc->explosionCluster(effectSimulationId).name());
|
||||
ERROR_LOG(m_logger) << "ExplosionCluster aesName: " << aesName;
|
||||
ERROR_LOG() << "ExplosionCluster aesName: " << aesName;
|
||||
m_aesNamesMap.insert(effectSimulationId, aesName);
|
||||
return aesName;
|
||||
}
|
||||
else
|
||||
{
|
||||
QString aesName = QString::fromStdString(m_aesDtc->airSupportImpact(effectSimulationId).name());
|
||||
ERROR_LOG(m_logger) << "AirSupport aesName: " << aesName;
|
||||
ERROR_LOG() << "AirSupport aesName: " << aesName;
|
||||
m_aesNamesMap.insert(effectSimulationId, aesName);
|
||||
return aesName;
|
||||
}
|
||||
@@ -1161,9 +1160,9 @@ qint32 HandlerDynamicParticipantData::lastVitality(int participantId, qint64 cur
|
||||
"WHERE participant_id = :participantId AND (event_time <= :currTime) "
|
||||
"ORDER BY event_time DESC LIMIT 1");
|
||||
|
||||
DEBUG_LOG(m_logger) << "Statement: " << stmtSelect;
|
||||
DEBUG_LOG(m_logger) << "Participant Id = " << participantId;
|
||||
DEBUG_LOG(m_logger) << "Time = " << currTime;
|
||||
DEBUG_LOG() << "Statement: " << stmtSelect;
|
||||
DEBUG_LOG() << "Participant Id = " << participantId;
|
||||
DEBUG_LOG() << "Time = " << currTime;
|
||||
|
||||
qSelect.prepare(stmtSelect);
|
||||
qSelect.bindValue(QStringLiteral(":currTime"), currTime);
|
||||
@@ -1171,7 +1170,7 @@ qint32 HandlerDynamicParticipantData::lastVitality(int participantId, qint64 cur
|
||||
|
||||
if (!qSelect.exec())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error selecting data for participant id = " << participantId;
|
||||
ERROR_LOG() << "Error selecting data for participant id = " << participantId;
|
||||
return vit;
|
||||
}
|
||||
|
||||
@@ -1191,9 +1190,9 @@ qint32 HandlerDynamicParticipantData::lastVulnerabilityKind(int participantId, q
|
||||
"WHERE participant_id = :participantId AND (event_time <= :currTime) "
|
||||
"ORDER BY event_time DESC LIMIT 1");
|
||||
|
||||
DEBUG_LOG(m_logger) << "Statement: " << stmtSelect;
|
||||
DEBUG_LOG(m_logger) << "Participant Id = " << participantId;
|
||||
DEBUG_LOG(m_logger) << "Time = " << currTime;
|
||||
DEBUG_LOG() << "Statement: " << stmtSelect;
|
||||
DEBUG_LOG() << "Participant Id = " << participantId;
|
||||
DEBUG_LOG() << "Time = " << currTime;
|
||||
|
||||
qSelect.prepare(stmtSelect);
|
||||
qSelect.bindValue(QStringLiteral(":currTime"), currTime);
|
||||
@@ -1201,7 +1200,7 @@ qint32 HandlerDynamicParticipantData::lastVulnerabilityKind(int participantId, q
|
||||
|
||||
if (!qSelect.exec())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error selecting data for participant id = " << participantId;
|
||||
ERROR_LOG() << "Error selecting data for participant id = " << participantId;
|
||||
return vuln;
|
||||
}
|
||||
|
||||
@@ -1223,7 +1222,7 @@ Core::GeoPosition HandlerDynamicParticipantData::getLastPosition(int participant
|
||||
m_ppmDtc->waitForHistoricalDataParticipantPosition();
|
||||
itParticipant = m_partPositionMap.constFind(participantId);
|
||||
if (itParticipant == m_partPositionMap.constEnd())
|
||||
WARNING_LOG(m_logger) << "Participant position not found for participantId: " << participantId;
|
||||
WARNING_LOG() << "Participant position not found for participantId: " << participantId;
|
||||
}
|
||||
else
|
||||
return itParticipant.value().pos();
|
||||
@@ -1241,9 +1240,9 @@ qint64 HandlerDynamicParticipantData::getLastSignificantParticipantPositionChang
|
||||
"WHERE participant_id = :participantId AND (sample_time <= :currTime) "
|
||||
"ORDER by sample_time DESC");
|
||||
|
||||
DEBUG_LOG(m_logger) << "Statement: " << stmtSelect;
|
||||
DEBUG_LOG(m_logger) << "Participant Id = " << participantId;
|
||||
DEBUG_LOG(m_logger) << "Time = " << currTime;
|
||||
DEBUG_LOG() << "Statement: " << stmtSelect;
|
||||
DEBUG_LOG() << "Participant Id = " << participantId;
|
||||
DEBUG_LOG() << "Time = " << currTime;
|
||||
|
||||
qSelect.prepare(stmtSelect);
|
||||
qSelect.bindValue(QStringLiteral(":currTime"), currTime);
|
||||
@@ -1251,7 +1250,7 @@ qint64 HandlerDynamicParticipantData::getLastSignificantParticipantPositionChang
|
||||
|
||||
if (!qSelect.exec())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error selecting data for participant id = " << participantId;
|
||||
ERROR_LOG() << "Error selecting data for participant id = " << participantId;
|
||||
return time_changed;
|
||||
}
|
||||
|
||||
@@ -1278,9 +1277,9 @@ qint64 HandlerDynamicParticipantData::getLastSignificantPositionMountedChanged(i
|
||||
"WHERE participant_id = :participantId AND (sample_time <= :currTime) AND mounted_on > 0 "
|
||||
"ORDER by sample_time DESC");
|
||||
|
||||
DEBUG_LOG(m_logger) << "Statement: " << stmtSelect;
|
||||
DEBUG_LOG(m_logger) << "Participant Id = " << participantId;
|
||||
DEBUG_LOG(m_logger) << "Time = " << currTime;
|
||||
DEBUG_LOG() << "Statement: " << stmtSelect;
|
||||
DEBUG_LOG() << "Participant Id = " << participantId;
|
||||
DEBUG_LOG() << "Time = " << currTime;
|
||||
|
||||
qSelect.prepare(stmtSelect);
|
||||
qSelect.bindValue(QStringLiteral(":currTime"), currTime);
|
||||
@@ -1288,7 +1287,7 @@ qint64 HandlerDynamicParticipantData::getLastSignificantPositionMountedChanged(i
|
||||
|
||||
if (!qSelect.exec())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error selecting data for participant id = " << participantId;
|
||||
ERROR_LOG() << "Error selecting data for participant id = " << participantId;
|
||||
return time_changed;
|
||||
}
|
||||
|
||||
@@ -1311,7 +1310,7 @@ void HandlerDynamicParticipantData::onParticipantGearEventChanged(const Particip
|
||||
if (modType == DataModification::eRemoved)
|
||||
return;
|
||||
|
||||
DEBUG_LOG(m_logger) << "onParticipantGearEventChanged(): "
|
||||
DEBUG_LOG() << "onParticipantGearEventChanged(): "
|
||||
<< " participantId: " << data.participantId();
|
||||
|
||||
// Report Firings
|
||||
@@ -1329,7 +1328,7 @@ void HandlerDynamicParticipantData::onParticipantGearEventChanged(const Particip
|
||||
itOParticipant = m_partMap.constFind(fData.participantId);
|
||||
if (itOParticipant == m_partMap.constEnd())
|
||||
{
|
||||
WARNING_LOG(m_logger) << "Originator participant does not exist: Id = " << fData.participantId;
|
||||
WARNING_LOG() << "Originator participant does not exist: Id = " << fData.participantId;
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -1347,7 +1346,7 @@ void HandlerDynamicParticipantData::onParticipantGearEventChanged(const Particip
|
||||
|
||||
// Save firings data
|
||||
if (!m_db->insert(fData))
|
||||
ERROR_LOG(m_logger) << "Error while inserting ParticipantGearEvent firings data into db for event_time = " << fData.eventTime;
|
||||
ERROR_LOG() << "Error while inserting ParticipantGearEvent firings data into db for event_time = " << fData.eventTime;
|
||||
|
||||
}
|
||||
|
||||
@@ -1379,11 +1378,11 @@ qint64 HandlerDynamicParticipantData::sinceWhenVitality(int participantId, int v
|
||||
"WHERE participant_id = :participantId AND (event_time <= :currTime) "
|
||||
"ORDER BY event_time DESC");
|
||||
|
||||
DEBUG_LOG(m_logger) << "!!! sinceWhenVitality";
|
||||
DEBUG_LOG(m_logger) << "Statement: " << stmtSelect;
|
||||
DEBUG_LOG(m_logger) << "Participant Id = " << participantId;
|
||||
DEBUG_LOG(m_logger) << "Time = " << currTime;
|
||||
DEBUG_LOG(m_logger) << "Vitality = " << vitality;
|
||||
DEBUG_LOG() << "!!! sinceWhenVitality";
|
||||
DEBUG_LOG() << "Statement: " << stmtSelect;
|
||||
DEBUG_LOG() << "Participant Id = " << participantId;
|
||||
DEBUG_LOG() << "Time = " << currTime;
|
||||
DEBUG_LOG() << "Vitality = " << vitality;
|
||||
|
||||
qSelect.prepare(stmtSelect);
|
||||
qSelect.bindValue(QStringLiteral(":currTime"), currTime);
|
||||
@@ -1391,7 +1390,7 @@ qint64 HandlerDynamicParticipantData::sinceWhenVitality(int participantId, int v
|
||||
|
||||
if (!qSelect.exec())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error selecting data for participant id = " << participantId;
|
||||
ERROR_LOG() << "Error selecting data for participant id = " << participantId;
|
||||
return time;
|
||||
}
|
||||
|
||||
@@ -1407,7 +1406,7 @@ qint64 HandlerDynamicParticipantData::sinceWhenVitality(int participantId, int v
|
||||
break;
|
||||
}
|
||||
|
||||
DEBUG_LOG(m_logger) << "### Recalculated time vitality = " << time;
|
||||
DEBUG_LOG() << "### Recalculated time vitality = " << time;
|
||||
|
||||
return time;
|
||||
}
|
||||
@@ -1423,11 +1422,11 @@ qint64 HandlerDynamicParticipantData::sinceWhenVulnerability(int participantId,
|
||||
"WHERE participant_id = :participantId AND (event_time <= :currTime) "
|
||||
"ORDER BY event_time DESC");
|
||||
|
||||
DEBUG_LOG(m_logger) << "!!! sinceWhenVulnerability";
|
||||
DEBUG_LOG(m_logger) << "Statement: " << stmtSelect;
|
||||
DEBUG_LOG(m_logger) << "Participant Id = " << participantId;
|
||||
DEBUG_LOG(m_logger) << "Time = " << currTime;
|
||||
DEBUG_LOG(m_logger) << "Vulnerability = " << vulnerability;
|
||||
DEBUG_LOG() << "!!! sinceWhenVulnerability";
|
||||
DEBUG_LOG() << "Statement: " << stmtSelect;
|
||||
DEBUG_LOG() << "Participant Id = " << participantId;
|
||||
DEBUG_LOG() << "Time = " << currTime;
|
||||
DEBUG_LOG() << "Vulnerability = " << vulnerability;
|
||||
|
||||
qSelect.prepare(stmtSelect);
|
||||
qSelect.bindValue(QStringLiteral(":currTime"), currTime);
|
||||
@@ -1435,14 +1434,14 @@ qint64 HandlerDynamicParticipantData::sinceWhenVulnerability(int participantId,
|
||||
|
||||
if (!qSelect.exec())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error selecting data for participant id = " << participantId;
|
||||
ERROR_LOG() << "Error selecting data for participant id = " << participantId;
|
||||
return time;
|
||||
}
|
||||
|
||||
while (qSelect.next())
|
||||
{
|
||||
int vuln = qSelect.value(1).toInt();
|
||||
DEBUG_LOG(m_logger) << "Checking - time = " << qSelect.value(0).toLongLong() << ", vuln = " << vuln;
|
||||
DEBUG_LOG() << "Checking - time = " << qSelect.value(0).toLongLong() << ", vuln = " << vuln;
|
||||
if (vuln == vulnerability)
|
||||
{
|
||||
time = qSelect.value(0).toLongLong();
|
||||
@@ -1452,7 +1451,7 @@ qint64 HandlerDynamicParticipantData::sinceWhenVulnerability(int participantId,
|
||||
break;
|
||||
}
|
||||
|
||||
DEBUG_LOG(m_logger) << "### Recalculated time vulnerability = " << time;
|
||||
DEBUG_LOG() << "### Recalculated time vulnerability = " << time;
|
||||
|
||||
return time;
|
||||
}
|
||||
|
||||
@@ -20,7 +20,6 @@ MainHandler::MainHandler(QObject *parent)
|
||||
, m_ddsHandler(nullptr)
|
||||
, m_dbHandler(nullptr)
|
||||
, m_dynPartData(nullptr)
|
||||
, m_logger(getLogger("MainHandlerAnalyzer"))
|
||||
{}
|
||||
|
||||
MainHandler::~MainHandler()
|
||||
|
||||
@@ -35,7 +35,5 @@ private:
|
||||
std::shared_ptr<DdsHandler> m_ddsHandler;
|
||||
std::shared_ptr<DbHandler> m_dbHandler;
|
||||
std::shared_ptr<HandlerDynamicParticipantData> m_dynPartData;
|
||||
|
||||
LOGGER_T m_logger;
|
||||
};
|
||||
} // namespace ReportManagement
|
||||
Reference in new issue
Block a user