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
+71
-71
@@ -111,28 +111,28 @@ bool HandlerFunctionalAreas::init()
|
||||
return false;
|
||||
}
|
||||
|
||||
INFO_LOG(m_logger) << "HandlerParticipantArea::init() finished.";
|
||||
INFO_LOG() << "HandlerParticipantArea::init() finished.";
|
||||
return true;
|
||||
} // end of init()
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
void HandlerFunctionalAreas::onSendCesHitReply(const Core::FunctionReplyObject &replyObject)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "onSendCesHitReply for id " << replyObject.id() << " success= " << replyObject.error();
|
||||
DEBUG_LOG() << "onSendCesHitReply for id " << replyObject.id() << " success= " << replyObject.error();
|
||||
|
||||
if (replyObject.error())
|
||||
WARNING_LOG(m_logger) << "Can not send enter/leave Area to participant in training area: " << replyObject();
|
||||
WARNING_LOG() << "Can not send enter/leave Area to participant in training area: " << replyObject();
|
||||
|
||||
// Send next Request, if available
|
||||
if (!m_sendCesHitRequestQueue.isEmpty())
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "m_sendCesAreaActionRequestQueue.size()=" << m_sendCesHitRequestQueue.size();
|
||||
DEBUG_LOG() << "m_sendCesAreaActionRequestQueue.size()=" << m_sendCesHitRequestQueue.size();
|
||||
m_sendCesHitRequestQueue.dequeue();
|
||||
// Send next Message
|
||||
if (!m_sendCesHitRequestQueue.isEmpty())
|
||||
{
|
||||
const auto &hr = m_sendCesHitRequestQueue.head();
|
||||
DEBUG_LOG(m_logger) << "sendCesHitRequest: " << hr;
|
||||
DEBUG_LOG() << "sendCesHitRequest: " << hr;
|
||||
m_ddsHandler->ftcTab()->sendCesHitRequest(hr, this);
|
||||
}
|
||||
}
|
||||
@@ -140,21 +140,21 @@ void HandlerFunctionalAreas::onSendCesHitReply(const Core::FunctionReplyObject &
|
||||
|
||||
void HandlerFunctionalAreas::onDemandInitReply(const Core::FunctionReplyObject &replyObject)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "onDemandInitReply for id " << replyObject.id() << " success= " << replyObject.error();
|
||||
DEBUG_LOG() << "onDemandInitReply for id " << replyObject.id() << " success= " << replyObject.error();
|
||||
|
||||
if (replyObject.error())
|
||||
WARNING_LOG(m_logger) << "Can not send Init to participant in training area: " << replyObject();
|
||||
WARNING_LOG() << "Can not send Init to participant in training area: " << replyObject();
|
||||
|
||||
// Send next Request, if available
|
||||
if (!m_sendInitRequestQueue.isEmpty())
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "m_sendInitRequestQueue.size()=" << m_sendInitRequestQueue.size();
|
||||
DEBUG_LOG() << "m_sendInitRequestQueue.size()=" << m_sendInitRequestQueue.size();
|
||||
m_sendInitRequestQueue.dequeue();
|
||||
// Send next Message
|
||||
if (!m_sendInitRequestQueue.isEmpty())
|
||||
{
|
||||
const auto &hr = m_sendInitRequestQueue.head();
|
||||
DEBUG_LOG(m_logger) << "demandInitRequest: " << hr;
|
||||
DEBUG_LOG() << "demandInitRequest: " << hr;
|
||||
m_ddsHandler->ftcTab()->demandInitRequest(hr, this);
|
||||
}
|
||||
}
|
||||
@@ -174,7 +174,7 @@ void HandlerFunctionalAreas::onAesItemViewChanged(const AreaEffectSimulation::Ae
|
||||
|
||||
if (!fa.isCentral())
|
||||
{
|
||||
DEBUG_LOG(m_logger) << " !isCentral"
|
||||
DEBUG_LOG() << " !isCentral"
|
||||
" Got AesItemView id: " << aesItemId
|
||||
<< ", type: " << data.aesTypeId()
|
||||
<< ", effectState: " << data.effectStateId()
|
||||
@@ -185,7 +185,7 @@ void HandlerFunctionalAreas::onAesItemViewChanged(const AreaEffectSimulation::Ae
|
||||
return;
|
||||
}
|
||||
|
||||
DEBUG_LOG(m_logger) << "Got AesItemView id: " << aesItemId
|
||||
DEBUG_LOG() << "Got AesItemView id: " << aesItemId
|
||||
<< ", type: " << data.aesTypeId()
|
||||
<< ", effectState: " << data.effectStateId()
|
||||
<< ", modType: " << modType;
|
||||
@@ -200,7 +200,7 @@ void HandlerFunctionalAreas::onAesItemViewChanged(const AreaEffectSimulation::Ae
|
||||
bool isSupplyTruck = false;
|
||||
if (fa.supplyMode() == AreaEffectSimulation::AesOperatingMode_def::OmWaitingTime)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "isSupplyTruck = true";
|
||||
DEBUG_LOG() << "isSupplyTruck = true";
|
||||
isSupplyTruck = true;
|
||||
}
|
||||
auto aesItemViewUtm(CentralEffectSimulation::AesItemViewUtm::create(data, m_aesItemViews[data.aesItemId()], 0, isSupplyTruck));
|
||||
@@ -219,16 +219,16 @@ void HandlerFunctionalAreas::onAesItemViewChanged(const AreaEffectSimulation::Ae
|
||||
polygon.append(point);
|
||||
}
|
||||
enclosedBuildings = m_handlerBuildingData->polygonEncloseBuildings(polygon);
|
||||
DEBUG_LOG(m_logger) << "enclosedBuildings.size=" << enclosedBuildings.size();
|
||||
DEBUG_LOG() << "enclosedBuildings.size=" << enclosedBuildings.size();
|
||||
// local memory for the results, so that the polygonEncloseBuildings method is only run once for each effective field
|
||||
// and not for each position report
|
||||
m_aesPolygonEncloseBuilding.insert(data.aesItemId(), enclosedBuildings);
|
||||
DEBUG_LOG(m_logger) << "insert enclosedBuildings.size=" << enclosedBuildings.size();
|
||||
DEBUG_LOG() << "insert enclosedBuildings.size=" << enclosedBuildings.size();
|
||||
}
|
||||
|
||||
calculateFunctionalArea(aesItemViewUtm);
|
||||
m_aesItemViews.insert(data.aesItemId(), aesItemViewUtm);
|
||||
DEBUG_LOG(m_logger) << "insert Functiona Area AesItemView id: " << aesItemId
|
||||
DEBUG_LOG() << "insert Functiona Area AesItemView id: " << aesItemId
|
||||
<< ", type: " << data.aesTypeId();
|
||||
break;
|
||||
} // case EsActivated
|
||||
@@ -248,14 +248,14 @@ void HandlerFunctionalAreas::onAesItemViewChanged(const AreaEffectSimulation::Ae
|
||||
void HandlerFunctionalAreas::calculateFunctionalArea(const CentralEffectSimulation::AesItemViewUtm &itemView)
|
||||
{
|
||||
bool inForm = false;
|
||||
DEBUG_LOG(m_logger) << "HandlerParticipantArea::calculateFunctionalArea aesItemId =" << itemView.aesItemId;
|
||||
DEBUG_LOG() << "HandlerParticipantArea::calculateFunctionalArea aesItemId =" << itemView.aesItemId;
|
||||
const auto participantsMap = m_handlerParticipant->positions();
|
||||
for (const CentralEffectSimulation::HandlerParticipant::CesParticipantData &participantPos : participantsMap)
|
||||
{
|
||||
if (m_handlerParticipant->isOutdated(participantPos))
|
||||
continue;
|
||||
|
||||
DEBUG_LOG(m_logger) << "participant id= " << participantPos.participantId()
|
||||
DEBUG_LOG() << "participant id= " << participantPos.participantId()
|
||||
<< " buildingId=" << participantPos.buildingId();
|
||||
|
||||
if ( participantPos.buildingId() ==0 )
|
||||
@@ -269,14 +269,14 @@ void HandlerFunctionalAreas::calculateFunctionalArea(const CentralEffectSimulati
|
||||
{
|
||||
inForm = true;
|
||||
m_handlerParticipant->setNotfightMode(participantPos.participantId(), true);
|
||||
DEBUG_LOG(m_logger) << "!m_aesPolygonEncloseBuilding buildingId=" << participantPos.buildingId()
|
||||
DEBUG_LOG() << "!m_aesPolygonEncloseBuilding buildingId=" << participantPos.buildingId()
|
||||
<< " aesId=" << itemView.aesItemId
|
||||
<< " in Form = true";
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "!m_aesPolygonEncloseBuilding buildingId=" << participantPos.buildingId()
|
||||
DEBUG_LOG() << "!m_aesPolygonEncloseBuilding buildingId=" << participantPos.buildingId()
|
||||
<< " aesId=" << itemView.aesItemId
|
||||
<< " in Form = false";
|
||||
}
|
||||
@@ -290,7 +290,7 @@ void HandlerFunctionalAreas::calculateFunctionalArea(const CentralEffectSimulati
|
||||
|
||||
void HandlerFunctionalAreas::onNewParticipantPosition(const CentralEffectSimulation::HandlerParticipant::CesParticipantData &participantData)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "++++++++ onNewParticipantPosition participantId=" << participantData.participantId();
|
||||
DEBUG_LOG() << "++++++++ onNewParticipantPosition participantId=" << participantData.participantId();
|
||||
|
||||
if (m_handlerParticipant->isOutdated(participantData))
|
||||
return;
|
||||
@@ -298,14 +298,14 @@ void HandlerFunctionalAreas::onNewParticipantPosition(const CentralEffectSimulat
|
||||
const int equipmentNumber = m_ddsHandler->participantId2EquipNo(participantData.participantId());
|
||||
if (equipmentNumber <= 0)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "equipmentNumber <=0";
|
||||
DEBUG_LOG() << "equipmentNumber <=0";
|
||||
return;
|
||||
}
|
||||
|
||||
DEBUG_LOG(m_logger) << "HandlerParticipantArea::calculateAesParticipant paricipantId: " << participantData.participantId();
|
||||
DEBUG_LOG() << "HandlerParticipantArea::calculateAesParticipant paricipantId: " << participantData.participantId();
|
||||
for (const CentralEffectSimulation::AesItemViewUtm &itemView : std::as_const(m_aesItemViews))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << " itemView: " << itemView.aesItemId << ", " << itemView.aesTypeId;
|
||||
DEBUG_LOG() << " itemView: " << itemView.aesItemId << ", " << itemView.aesTypeId;
|
||||
switch (itemView.aesTypeId.underlying())
|
||||
{
|
||||
case AreaEffectSimulation::AesType_def::AtFunctionalArea:
|
||||
@@ -315,7 +315,7 @@ void HandlerFunctionalAreas::onNewParticipantPosition(const CentralEffectSimulat
|
||||
/// Die Teilnehmer der Partei des Wirkfeldes werden nicht berücksichtig.
|
||||
///
|
||||
AreaEffectSimulation::FunctionalArea functionalArea = m_ddsHandler->dtcAes()->functionalArea(itemView.aesItemId);
|
||||
DEBUG_LOG(m_logger) << "functionalArea Typ=" << functionalArea.functionalAreaTypeId()
|
||||
DEBUG_LOG() << "functionalArea Typ=" << functionalArea.functionalAreaTypeId()
|
||||
<< " itemView.partyId=" << itemView.partyId
|
||||
<< " participantData.partyId=" << participantData.partyId()
|
||||
<< " insideBuilding=" << participantData.insideBuilding();
|
||||
@@ -333,7 +333,7 @@ void HandlerFunctionalAreas::onNewParticipantPosition(const CentralEffectSimulat
|
||||
|
||||
void HandlerFunctionalAreas::onNewIndoorParticipantPosition(const CentralEffectSimulation::HandlerParticipant::CesParticipantData &participantData)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "New Indoor Position paticipantId=" << participantData.participantId();
|
||||
DEBUG_LOG() << "New Indoor Position paticipantId=" << participantData.participantId();
|
||||
|
||||
if (m_handlerParticipant->isOutdated(participantData))
|
||||
return;
|
||||
@@ -341,14 +341,14 @@ void HandlerFunctionalAreas::onNewIndoorParticipantPosition(const CentralEffectS
|
||||
const int equipmentNumber = m_ddsHandler->participantId2EquipNo(participantData.participantId());
|
||||
if (equipmentNumber <= 0)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "equipmentNumber <=0";
|
||||
DEBUG_LOG() << "equipmentNumber <=0";
|
||||
return;
|
||||
}
|
||||
|
||||
DEBUG_LOG(m_logger) << "HandlerParticipantArea::calculateAesParticipant paricipantId: " << participantData.participantId();
|
||||
DEBUG_LOG() << "HandlerParticipantArea::calculateAesParticipant paricipantId: " << participantData.participantId();
|
||||
for (const CentralEffectSimulation::AesItemViewUtm &itemView : std::as_const(m_aesItemViews))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << " itemView: " << itemView.aesItemId << ", " << itemView.aesTypeId;
|
||||
DEBUG_LOG() << " itemView: " << itemView.aesItemId << ", " << itemView.aesTypeId;
|
||||
switch (itemView.aesTypeId.underlying())
|
||||
{
|
||||
case AreaEffectSimulation::AesType_def::AtFunctionalArea:
|
||||
@@ -358,7 +358,7 @@ void HandlerFunctionalAreas::onNewIndoorParticipantPosition(const CentralEffectS
|
||||
/// Die Teilnehmer der Partei des Wirkfeldes werden nicht berücksichtig.
|
||||
///
|
||||
AreaEffectSimulation::FunctionalArea functionalArea = m_ddsHandler->dtcAes()->functionalArea(itemView.aesItemId);
|
||||
DEBUG_LOG(m_logger) << "functionalArea Typ=" << functionalArea.functionalAreaTypeId()
|
||||
DEBUG_LOG() << "functionalArea Typ=" << functionalArea.functionalAreaTypeId()
|
||||
<< " itemView.partyId=" << itemView.partyId
|
||||
<< " participantData.partyId=" << participantData.partyId()
|
||||
<< " insideBuilding=" << participantData.insideBuilding();
|
||||
@@ -366,7 +366,7 @@ void HandlerFunctionalAreas::onNewIndoorParticipantPosition(const CentralEffectS
|
||||
if ( (itemView.partyId == participantData.partyId())
|
||||
&& (functionalArea.functionalAreaTypeId() == 8)) // Funktionsraum Nicht Kampffaehig [GUEZE-2256]
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Position mit Funktionsraum Nicht Kampffähig hat die Partei des Wirkfeldes => nicht beruecksichtigen";
|
||||
DEBUG_LOG() << "Position mit Funktionsraum Nicht Kampffähig hat die Partei des Wirkfeldes => nicht beruecksichtigen";
|
||||
continue;
|
||||
}
|
||||
}
|
||||
@@ -396,7 +396,7 @@ void HandlerFunctionalAreas::onNewIndoorParticipantPosition(const CentralEffectS
|
||||
|
||||
void HandlerFunctionalAreas::onRestoreRadioReadinessChanged(const int participantId)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "HandlerArtillery::onRestoreRadioReadinessChanged participantId=" << participantId;
|
||||
DEBUG_LOG() << "HandlerArtillery::onRestoreRadioReadinessChanged participantId=" << participantId;
|
||||
m_supplyTimers.remove(participantId);
|
||||
removeParticipant(participantId);
|
||||
}
|
||||
@@ -417,11 +417,11 @@ bool HandlerFunctionalAreas::inBoundingBoxCheck(const CentralEffectSimulation::A
|
||||
const QPointF participantPosUtmPoint = CentralEffectSimulation::geographic2Utm(participantData.pos(), itemView.zone);
|
||||
if (boundingBoxImpact.contains(participantPosUtmPoint))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "inBoundingBoxCheck Paricipant " << participantData.participantId()
|
||||
DEBUG_LOG() << "inBoundingBoxCheck Paricipant " << participantData.participantId()
|
||||
<< " inside AesItemView:" << itemView.aesItemId;
|
||||
return true;
|
||||
}
|
||||
TRACE_LOG(m_logger) << "inBoundingBoxCheck Paricipant " << participantData.participantId()
|
||||
TRACE_LOG() << "inBoundingBoxCheck Paricipant " << participantData.participantId()
|
||||
<< " outside AesItemView:" << itemView.aesItemId;
|
||||
return false;
|
||||
}
|
||||
@@ -437,7 +437,7 @@ bool HandlerFunctionalAreas::inFormCheck(const CentralEffectSimulation::AesItemV
|
||||
itemView.boundingBoxTopRight);
|
||||
const QPointF participantPosUtmPoint = CentralEffectSimulation::geographic2Utm(participantData.pos(), itemView.zone);
|
||||
const QString participantPosMgrs = CentralEffectSimulation::geographic2mgrs(participantData.pos(), itemView.zone);
|
||||
DEBUG_LOG(m_logger) << "inFormCheck start, paricipantId: " << participantData.participantId()
|
||||
DEBUG_LOG() << "inFormCheck start, paricipantId: " << participantData.participantId()
|
||||
<< ", aesItemId: " << itemView.aesItemId
|
||||
<< ", aesTypeId: " << itemView.aesTypeId
|
||||
<< ", form.size: " << itemView.form.size()
|
||||
@@ -446,7 +446,7 @@ bool HandlerFunctionalAreas::inFormCheck(const CentralEffectSimulation::AesItemV
|
||||
if (boundingBox.contains(participantPosUtmPoint) &&
|
||||
itemView.form.containsPoint(participantPosUtmPoint, Qt::FillRule::OddEvenFill))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "inside AES form, paricipantId: " << participantData.participantId()
|
||||
DEBUG_LOG() << "inside AES form, paricipantId: " << participantData.participantId()
|
||||
<< ", aesItemId: " << itemView.aesItemId;
|
||||
return true;
|
||||
} // if inside
|
||||
@@ -456,10 +456,10 @@ bool HandlerFunctionalAreas::inFormCheck(const CentralEffectSimulation::AesItemV
|
||||
#if 0
|
||||
if (m_logger.isDebugEnabled())
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "inFormCheck: Paricipant " << participantPosition.participantId << " outside AesItemView " << itemView.aesItemId;
|
||||
DEBUG_LOG(m_logger) << "ParticipantPos = " << debug(participantPosUtmPoint);
|
||||
DEBUG_LOG() << "inFormCheck: Paricipant " << participantPosition.participantId << " outside AesItemView " << itemView.aesItemId;
|
||||
DEBUG_LOG() << "ParticipantPos = " << debug(participantPosUtmPoint);
|
||||
for (const auto &itPos : itemView.form)
|
||||
DEBUG_LOG(m_logger) << "itemView =" << debug(itPos);
|
||||
DEBUG_LOG() << "itemView =" << debug(itPos);
|
||||
}
|
||||
#endif
|
||||
return false;
|
||||
@@ -478,12 +478,12 @@ void HandlerFunctionalAreas::sendCesHitRequest(const CentralEffectSimulation::Ae
|
||||
switch (eventType.underlying())
|
||||
{
|
||||
case ProjectDataManagement::EventType_def::EnterFunctionalArea:
|
||||
DEBUG_LOG(m_logger) << "-------------- EnterFunctionalArea itemView =" << itemView.aesItemId;
|
||||
DEBUG_LOG() << "-------------- EnterFunctionalArea itemView =" << itemView.aesItemId;
|
||||
remaining = 1;
|
||||
break;
|
||||
case ProjectDataManagement::EventType_def::LeaveFunctionalArea:
|
||||
remaining = 0;
|
||||
DEBUG_LOG(m_logger) << "-------------- LeaveFunctionalArea itemView =" << itemView.aesItemId;
|
||||
DEBUG_LOG() << "-------------- LeaveFunctionalArea itemView =" << itemView.aesItemId;
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
@@ -492,26 +492,26 @@ void HandlerFunctionalAreas::sendCesHitRequest(const CentralEffectSimulation::Ae
|
||||
if (remaining < 0)
|
||||
return;
|
||||
|
||||
DEBUG_LOG(m_logger) << "sendCesHitRequest Settings::calculateCentralAes="
|
||||
DEBUG_LOG() << "sendCesHitRequest Settings::calculateCentralAes="
|
||||
<< " insideWlsArea=" << std::boolalpha << participantData.insideWlsArea()
|
||||
<< " isSmartChargeType=" << std::boolalpha << m_ddsHandler->isSmartChargeType(itemView.chargeStruct)
|
||||
<< " participantId=" << participantData.participantId();
|
||||
|
||||
const int equipNo = m_ddsHandler->participantId2EquipNo(participantData.participantId());
|
||||
DEBUG_LOG(m_logger) << " ftc sendCESHit to Participant participantId = " << participantData.participantId()
|
||||
DEBUG_LOG() << " ftc sendCESHit to Participant participantId = " << participantData.participantId()
|
||||
<< " equipNo = " << equipNo
|
||||
<< " aesItemId =" << itemView.aesItemId;
|
||||
|
||||
// participantPosition.participantPosition == 0 -> send to all
|
||||
if (participantData.participantId() != 0 && equipNo <= 0)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "participantPosition.participantId != 0 && equipNo <= 0";
|
||||
DEBUG_LOG() << "participantPosition.participantId != 0 && equipNo <= 0";
|
||||
return;
|
||||
}
|
||||
if (participantData.participantId() != 0 &&
|
||||
participantData.vulnerabilityState == ProjectDataManagement::VulnerabilityState_def::CatastrophicKill)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "participantPosition.participantId != 0 CatastrophicKill)";
|
||||
DEBUG_LOG() << "participantPosition.participantId != 0 CatastrophicKill)";
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -550,14 +550,14 @@ void HandlerFunctionalAreas::sendCesHitRequest(const CentralEffectSimulation::Ae
|
||||
itemView.partyId, // originPartyId
|
||||
mineId
|
||||
);
|
||||
DEBUG_LOG(m_logger) << " participantId=" << participantData.participantId()
|
||||
DEBUG_LOG() << " participantId=" << participantData.participantId()
|
||||
<< " chargeTypeId=" << itemView.chargeStruct.chargeTypeId();
|
||||
|
||||
|
||||
m_sendCesHitRequestQueue.enqueue(requestTab);
|
||||
if (m_sendCesHitRequestQueue.size() == 1)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "SendCesHitRequest: " << requestTab;
|
||||
DEBUG_LOG() << "SendCesHitRequest: " << requestTab;
|
||||
m_ddsHandler->ftcTab()->sendCesHitRequest(requestTab, this);
|
||||
}
|
||||
}
|
||||
@@ -576,7 +576,7 @@ void HandlerFunctionalAreas::sendParticipantEvent(const CentralEffectSimulation:
|
||||
typeClass == ParticipantManagement::TypeClass_def::Vessel ||
|
||||
typeClass == ParticipantManagement::TypeClass_def::Unknown)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Participant with id " << participantData.participantId()
|
||||
DEBUG_LOG() << "Participant with id " << participantData.participantId()
|
||||
<< " has invalid typeClass: " << typeClass
|
||||
<< " eventType: " << eventType;
|
||||
return;
|
||||
@@ -585,12 +585,12 @@ void HandlerFunctionalAreas::sendParticipantEvent(const CentralEffectSimulation:
|
||||
int equipmentNumber = m_ddsHandler->participantId2EquipNo(participantData.participantId());
|
||||
if (equipmentNumber <= 0)
|
||||
{
|
||||
WARNING_LOG(m_logger) << "Not sending Event " << eventType << " for participant " << participantData.participantId()
|
||||
WARNING_LOG() << "Not sending Event " << eventType << " for participant " << participantData.participantId()
|
||||
<< " - participant has no equipment number";
|
||||
return;
|
||||
}
|
||||
|
||||
DEBUG_LOG(m_logger) << "sendParticipantEvent" << eventType
|
||||
DEBUG_LOG() << "sendParticipantEvent" << eventType
|
||||
<< " participantId=" << participantData.participantId()
|
||||
<< " AesItemId=" << itemView.aesItemId;
|
||||
|
||||
@@ -610,7 +610,7 @@ void HandlerFunctionalAreas::sendParticipantEvent(const CentralEffectSimulation:
|
||||
pe.position(participantData.pos());
|
||||
pe.friendlyFire(false);
|
||||
|
||||
INFO_LOG(m_logger) << "sendParticipantEvent: " << pe
|
||||
INFO_LOG() << "sendParticipantEvent: " << pe
|
||||
<< ", currentMSecsSinceEpoch = " << QDateTime::currentMSecsSinceEpoch()
|
||||
<< ", time difference = " << QDateTime::currentMSecsSinceEpoch() - pe.eventTime();
|
||||
m_ddsHandler->dtsCes()->publish(pe);
|
||||
@@ -622,17 +622,17 @@ void HandlerFunctionalAreas::sendParticipantEvent(const CentralEffectSimulation:
|
||||
|
||||
void HandlerFunctionalAreas::aesItemViewRemoved(int aesItemId)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "aesItemViewRemoved aesItemId=" << aesItemId
|
||||
DEBUG_LOG() << "aesItemViewRemoved aesItemId=" << aesItemId
|
||||
<< " m_cesEnterLeaveFunctionalArea.size=" << m_cesEnterLeaveFunctionalArea.size()
|
||||
<< " m_aesItemViews.size=" << m_aesItemViews.size();
|
||||
QHashIterator<QPair<int, int>, EnterLeaveType> i(m_cesEnterLeaveFunctionalArea);
|
||||
while (i.hasNext()) {
|
||||
i.next();
|
||||
DEBUG_LOG(m_logger) << "Key: itemId=" << i.key().first << " participantId=" << i.key().second
|
||||
DEBUG_LOG() << "Key: itemId=" << i.key().first << " participantId=" << i.key().second
|
||||
<< " EnterLeaveType=" << i.value().eventType;
|
||||
if (i.key().first == aesItemId )
|
||||
{
|
||||
DEBUG_LOG(m_logger) << " EnterLeaveType=" << i.value().eventType;
|
||||
DEBUG_LOG() << " EnterLeaveType=" << i.value().eventType;
|
||||
CentralEffectSimulation::AesItemViewUtm itemView = m_aesItemViews.value(i.key().first);
|
||||
sendEnterLeave(itemView, i.key().second, false);
|
||||
m_cesEnterLeaveFunctionalArea.remove(i.key());
|
||||
@@ -644,16 +644,16 @@ void HandlerFunctionalAreas::aesItemViewRemoved(int aesItemId)
|
||||
|
||||
void HandlerFunctionalAreas::removeParticipant(int participantId)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "removeParticipant participantId=" << participantId
|
||||
DEBUG_LOG() << "removeParticipant participantId=" << participantId
|
||||
<< " m_cesEnterLeaveFunctionalArea.size=" << m_cesEnterLeaveFunctionalArea.size();
|
||||
QHashIterator<QPair<int, int>, EnterLeaveType> i(m_cesEnterLeaveFunctionalArea);
|
||||
while (i.hasNext()) {
|
||||
i.next();
|
||||
DEBUG_LOG(m_logger) << "Key: itemId=" << i.key().first << " participantId=" << i.key().second
|
||||
DEBUG_LOG() << "Key: itemId=" << i.key().first << " participantId=" << i.key().second
|
||||
<< " EnterLeaveType=" << i.value().eventType;
|
||||
if (i.key().second == participantId )
|
||||
{
|
||||
DEBUG_LOG(m_logger) << " EnterLeaveType=" << i.value().eventType;
|
||||
DEBUG_LOG() << " EnterLeaveType=" << i.value().eventType;
|
||||
CentralEffectSimulation::AesItemViewUtm itemView = m_aesItemViews.value(i.key().first);
|
||||
//sendEnterLeave(itemView, i.key().second, false);
|
||||
m_cesEnterLeaveFunctionalArea.remove(i.key());
|
||||
@@ -670,7 +670,7 @@ void HandlerFunctionalAreas::sendEnterLeave(const CentralEffectSimulation::AesIt
|
||||
if (m_cesEnterLeaveFunctionalArea.contains(key))
|
||||
lastEnterLeaveType = m_cesEnterLeaveFunctionalArea.value(key);
|
||||
|
||||
DEBUG_LOG(m_logger) << "HandlerFunctionalAreas::sendEnterLeave "
|
||||
DEBUG_LOG() << "HandlerFunctionalAreas::sendEnterLeave "
|
||||
<< " aesItemId=" << itemView.aesItemId
|
||||
<< " participantId=" << participantId
|
||||
<< " inForm=" << inForm;
|
||||
@@ -684,7 +684,7 @@ void HandlerFunctionalAreas::sendEnterLeave(const CentralEffectSimulation::AesIt
|
||||
const AreaEffectSimulation::FunctionalArea &fa = m_ddsHandler->dtcAes()->functionalArea(itemView.aesItemId);
|
||||
if (!lastEnterLeaveType.isAlreadySupplied)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "sendEnterLeave.startSupplyTimer"
|
||||
DEBUG_LOG() << "sendEnterLeave.startSupplyTimer"
|
||||
" m_cesEnterLeaveFunctionalArea.insert"
|
||||
<< " aesItemId=" << key.first
|
||||
<< " participantId=" << key.second
|
||||
@@ -699,10 +699,10 @@ void HandlerFunctionalAreas::sendEnterLeave(const CentralEffectSimulation::AesIt
|
||||
enterLeaveType.eventType = ProjectDataManagement::EventType_def::LeaveFunctionalArea;
|
||||
if (itemView.isSupplyTruck && lastEnterLeaveType.eventType == ProjectDataManagement::EventType_def::EnterFunctionalArea)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "sendEnterLeave.stopSupplyTimer";
|
||||
DEBUG_LOG() << "sendEnterLeave.stopSupplyTimer";
|
||||
enterLeaveType.isAlreadySupplied = false;
|
||||
stopSupplyTimer(participantId);
|
||||
DEBUG_LOG(m_logger) << "sendEnterLeave.startSupplyTimer"
|
||||
DEBUG_LOG() << "sendEnterLeave.startSupplyTimer"
|
||||
" m_cesEnterLeaveFunctionalArea.insert"
|
||||
<< " aesItemId=" << key.first
|
||||
<< " participantId=" << key.second
|
||||
@@ -718,16 +718,16 @@ void HandlerFunctionalAreas::sendEnterLeave(const CentralEffectSimulation::AesIt
|
||||
sendParticipantEvent(itemView, cesParticipantData, enterLeaveType.eventType);
|
||||
|
||||
const AreaEffectSimulation::FunctionalArea &fa = m_ddsHandler->dtcAes()->functionalArea(itemView.aesItemId);
|
||||
DEBUG_LOG(m_logger) << "fa.isCentral()=" << fa.isCentral()
|
||||
DEBUG_LOG() << "fa.isCentral()=" << fa.isCentral()
|
||||
<< " isSupplyTruck=" << itemView.isSupplyTruck
|
||||
<< " eventType=" << m_cesEnterLeaveFunctionalArea.value(key).eventType
|
||||
<< " isAlreadySupplied=" << enterLeaveType.isAlreadySupplied;
|
||||
if (fa.isCentral() && !itemView.isSupplyTruck)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "sendCesHitRequest";
|
||||
DEBUG_LOG() << "sendCesHitRequest";
|
||||
sendCesHitRequest(itemView, cesParticipantData, enterLeaveType.eventType);
|
||||
}
|
||||
DEBUG_LOG(m_logger) << " m_cesEnterLeaveFunctionalArea.insert"
|
||||
DEBUG_LOG() << " m_cesEnterLeaveFunctionalArea.insert"
|
||||
<< " aesItemId=" << key.first
|
||||
<< " participantId=" << key.second
|
||||
<< " enterLeaveType=" << enterLeaveType.eventType;
|
||||
@@ -738,21 +738,21 @@ void HandlerFunctionalAreas::sendEnterLeave(const CentralEffectSimulation::AesIt
|
||||
|
||||
void HandlerFunctionalAreas::startSupplyTimer(int participantId, int aesId, long time)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "startSupplyTimer="
|
||||
DEBUG_LOG() << "startSupplyTimer="
|
||||
<< " participantId=" << participantId
|
||||
<< " aesId=" << aesId
|
||||
<< " time=" << time
|
||||
<< " ST participant" << m_aesItemViews[aesId].participantId;
|
||||
if (participantId == m_aesItemViews[aesId].participantId)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "No supply for SupplyTruck";
|
||||
DEBUG_LOG() << "No supply for SupplyTruck";
|
||||
return;
|
||||
}
|
||||
if (m_supplyTimers.contains(participantId))
|
||||
{
|
||||
if (m_supplyTimers[participantId]->isActive())
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "SupplyTimer isActive";
|
||||
DEBUG_LOG() << "SupplyTimer isActive";
|
||||
return;
|
||||
}
|
||||
else
|
||||
@@ -760,7 +760,7 @@ void HandlerFunctionalAreas::startSupplyTimer(int participantId, int aesId, long
|
||||
}
|
||||
SupplyTimer *supplyTimer = new SupplyTimer(participantId,
|
||||
aesId, time);
|
||||
DEBUG_LOG(m_logger) << "supplyTimer->startTimer();";
|
||||
DEBUG_LOG() << "supplyTimer->startTimer();";
|
||||
QObject::connect(supplyTimer, &SupplyTimer::timeToEffectTimeout,
|
||||
this, &HandlerFunctionalAreas::on_supplyFinished);
|
||||
m_supplyTimers.insert(participantId, supplyTimer);
|
||||
@@ -769,7 +769,7 @@ void HandlerFunctionalAreas::startSupplyTimer(int participantId, int aesId, long
|
||||
|
||||
void HandlerFunctionalAreas::stopSupplyTimer(int participantId)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "stopSupplyTimer="
|
||||
DEBUG_LOG() << "stopSupplyTimer="
|
||||
<< "participantId=" << participantId;
|
||||
if (m_supplyTimers.contains(participantId))
|
||||
{
|
||||
@@ -781,7 +781,7 @@ void HandlerFunctionalAreas::stopSupplyTimer(int participantId)
|
||||
|
||||
void HandlerFunctionalAreas::on_supplyFinished(int participantId, int aesId)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "HandlerFunctionalAreas::on_supplyFinished participantId=" << participantId
|
||||
DEBUG_LOG() << "HandlerFunctionalAreas::on_supplyFinished participantId=" << participantId
|
||||
<< " aesId =" << aesId;
|
||||
|
||||
sendInitSupplyToTab(participantId,
|
||||
@@ -802,7 +802,7 @@ void HandlerFunctionalAreas::sendInitSupplyToTab(int participantId, int aesId)
|
||||
bool resetVulnerabilityState = false;
|
||||
bool restockSanitationMaterial = false;
|
||||
|
||||
DEBUG_LOG(m_logger) << "sendInitSupplyToTab"
|
||||
DEBUG_LOG() << "sendInitSupplyToTab"
|
||||
<< " participantId=" << participantId
|
||||
<< " aesId=" << aesId;
|
||||
TrainingAreaBase::DemandInitRequest demandInitRequest(
|
||||
@@ -818,7 +818,7 @@ void HandlerFunctionalAreas::sendInitSupplyToTab(int participantId, int aesId)
|
||||
m_sendInitRequestQueue.enqueue(demandInitRequest);
|
||||
if (m_sendInitRequestQueue.size() == 1)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "sendInitSupply: " << demandInitRequest;
|
||||
DEBUG_LOG() << "sendInitSupply: " << demandInitRequest;
|
||||
m_ddsHandler->ftcTab()->demandInitRequest(demandInitRequest, this);
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -137,7 +137,7 @@ private: // attributes
|
||||
QHash<int, QVector<int>> m_aesPolygonEncloseBuilding; // key = aesItemId value = BuildingIds inside form
|
||||
int m_requestId = 1;
|
||||
|
||||
NGL::INGLLogger &m_logger; ///< Interface to the Logging-Facility
|
||||
|
||||
};
|
||||
} // namespace CES_FUNCTIONAL_AREA
|
||||
|
||||
+5
-5
@@ -48,7 +48,7 @@ bool CES_FUNCTIONAL_AREAInterfaceImpl::init(int domainId, int exerciseId)
|
||||
{
|
||||
m_domainId = domainId;
|
||||
m_exerciseId = exerciseId;
|
||||
INFO_LOG(m_logger) << "CES_FUNCTIONAL_AREAInterfaceImpl::init()"
|
||||
INFO_LOG() << "CES_FUNCTIONAL_AREAInterfaceImpl::init()"
|
||||
<< " m_domainId=" << m_domainId
|
||||
<< " m_exerciseId=" << m_exerciseId;
|
||||
|
||||
@@ -62,11 +62,11 @@ bool CES_FUNCTIONAL_AREAInterfaceImpl::init(int domainId, int exerciseId)
|
||||
|
||||
if (!m_handlerFunctionalAreas->init())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Initialisation m_handlerFunctionalArea failed.";
|
||||
ERROR_LOG() << "Initialisation m_handlerFunctionalArea failed.";
|
||||
return false;
|
||||
}
|
||||
|
||||
INFO_LOG(m_logger) << "CES_FUNCTIONAL_AREAInterfaceImpl::init() return true";
|
||||
INFO_LOG() << "CES_FUNCTIONAL_AREAInterfaceImpl::init() return true";
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -74,8 +74,8 @@ QString CES_FUNCTIONAL_AREAInterfaceImpl::echo(const QString &message)
|
||||
{
|
||||
|
||||
QString ret(QStringLiteral("<<<< %1 >>>> CES_FUNCTIONAL_AREAInterfaceImpl::echo").arg(message));
|
||||
INFO_LOG(m_logger) << "CES_FUNCTIONAL_AREAInterfaceImpl::echo return:" << ret;
|
||||
DEBUG_LOG(m_logger) << "DEBUG: CES_FUNCTIONAL_AREAInterfaceImpl::echo return:" << ret;
|
||||
INFO_LOG() << "CES_FUNCTIONAL_AREAInterfaceImpl::echo return:" << ret;
|
||||
DEBUG_LOG() << "DEBUG: CES_FUNCTIONAL_AREAInterfaceImpl::echo return:" << ret;
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user