Adds immediate migration results in progress
This commit is contained in:
2102 files changed
+17482
-15071
No files matched your search
+105
-105
@@ -133,28 +133,28 @@ bool HandlerNBC::init()
|
||||
return false;
|
||||
}
|
||||
|
||||
INFO_LOG() << "HandlerParticipantArea::init() finished.";
|
||||
INFO_LOG(m_logger) << "HandlerParticipantArea::init() finished.";
|
||||
return true;
|
||||
} // end of init()
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
void HandlerNBC::onSendCesHitReply(const Core::FunctionReplyObject &replyObject)
|
||||
{
|
||||
DEBUG_LOG() << "onSendCesHitReply for id " << replyObject.id() << " success= " << replyObject.error();
|
||||
DEBUG_LOG(m_logger) << "onSendCesHitReply for id " << replyObject.id() << " success= " << replyObject.error();
|
||||
|
||||
if (replyObject.error())
|
||||
WARNING_LOG() << "Can not send enter/leave Area to participant in training area: " << replyObject();
|
||||
WARNING_LOG(m_logger) << "Can not send enter/leave Area to participant in training area: " << replyObject();
|
||||
|
||||
// Send next Request, if available
|
||||
if (!m_sendCesHitRequestQueue.isEmpty())
|
||||
{
|
||||
DEBUG_LOG() << "m_sendCesAreaActionRequestQueue.size()=" << m_sendCesHitRequestQueue.size();
|
||||
DEBUG_LOG(m_logger) << "m_sendCesAreaActionRequestQueue.size()=" << m_sendCesHitRequestQueue.size();
|
||||
m_sendCesHitRequestQueue.dequeue();
|
||||
// Send next Message
|
||||
if (!m_sendCesHitRequestQueue.isEmpty())
|
||||
{
|
||||
const auto &hr = m_sendCesHitRequestQueue.head();
|
||||
DEBUG_LOG() << "sendCesHitRequest: " << hr;
|
||||
DEBUG_LOG(m_logger) << "sendCesHitRequest: " << hr;
|
||||
m_ddsHandler->ftcTab()->sendCesHitRequest(hr, this);
|
||||
}
|
||||
}
|
||||
@@ -170,7 +170,7 @@ void HandlerNBC::onAesItemViewChanged(const AreaEffectSimulation::AesItemView &d
|
||||
double upperOffset = 0;
|
||||
double lowerOffset = 0;
|
||||
bool offsetIsSet = false;
|
||||
TRACE_LOG() << "onAesItemViewChanged"
|
||||
TRACE_LOG(m_logger) << "onAesItemViewChanged"
|
||||
<< " aesItemId=" << data.aesItemId();
|
||||
|
||||
|
||||
@@ -190,7 +190,7 @@ void HandlerNBC::onAesItemViewChanged(const AreaEffectSimulation::AesItemView &d
|
||||
const AreaEffectSimulation::BCContamination &bc = m_ddsHandler->dtcAes()->bCContamination(data.aesItemId());
|
||||
if (!bc.isCentral())
|
||||
{
|
||||
DEBUG_LOG() << "!Central BCContamination id: " << aesItemId;
|
||||
DEBUG_LOG(m_logger) << "!Central BCContamination id: " << aesItemId;
|
||||
return;
|
||||
}
|
||||
offsetIsSet = true;
|
||||
@@ -202,7 +202,7 @@ void HandlerNBC::onAesItemViewChanged(const AreaEffectSimulation::AesItemView &d
|
||||
const AreaEffectSimulation::DangerArea &da = m_ddsHandler->dtcAes()->dangerArea(data.aesItemId());
|
||||
if (!da.isCentral())
|
||||
{
|
||||
DEBUG_LOG() << "!Central DangerArea id: " << aesItemId;
|
||||
DEBUG_LOG(m_logger) << "!Central DangerArea id: " << aesItemId;
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -211,20 +211,20 @@ void HandlerNBC::onAesItemViewChanged(const AreaEffectSimulation::AesItemView &d
|
||||
const AreaEffectSimulation::NContamination &nc = m_ddsHandler->dtcAes()->nContamination(data.aesItemId());
|
||||
if (!nc.isCentral())
|
||||
{
|
||||
DEBUG_LOG() << "!Central NContamination id: " << aesItemId;
|
||||
DEBUG_LOG(m_logger) << "!Central NContamination id: " << aesItemId;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
TRACE_LOG() << "Got AesItemView id: " << aesItemId
|
||||
TRACE_LOG(m_logger) << "Got AesItemView id: " << aesItemId
|
||||
<< ", type: " << data.aesTypeId()
|
||||
<< ", effectState: " << data.effectStateId()
|
||||
<< ", modType: " << modType;
|
||||
|
||||
|
||||
const double impactRadius = m_ddsHandler->chargeTypeRadius(data.chargeStruct());
|
||||
DEBUG_LOG() << "impactRadius=" << impactRadius;
|
||||
DEBUG_LOG(m_logger) << "impactRadius=" << impactRadius;
|
||||
switch (effectState.underlying())
|
||||
{
|
||||
case AreaEffectSimulation::AesEffectState_def::EsPrepared:
|
||||
@@ -271,13 +271,13 @@ void HandlerNBC::onAesItemViewChanged(const AreaEffectSimulation::AesItemView &d
|
||||
// if new field for this participant send sendCesHitRequest
|
||||
calculateBcContamination(aesItemViewUtm);
|
||||
m_aesItemViews.insert(data.aesItemId(), aesItemViewUtm);
|
||||
// DEBUG_LOG() << "insert AtBCContamination oder AtNContamination AesItemView id: " << aesItemId
|
||||
// DEBUG_LOG(m_logger) << "insert AtBCContamination oder AtNContamination AesItemView id: " << aesItemId
|
||||
// << ", type: " << data.aesTypeId();
|
||||
break;
|
||||
case AreaEffectSimulation::AesType_def::AtDangerArea:
|
||||
calculateDangerArea(aesItemViewUtm);
|
||||
m_aesItemViews.insert(data.aesItemId(), aesItemViewUtm);
|
||||
DEBUG_LOG() << "insert AtDangerArea AesItemView id: " << aesItemId
|
||||
DEBUG_LOG(m_logger) << "insert AtDangerArea AesItemView id: " << aesItemId
|
||||
<< ", type: " << data.aesTypeId();
|
||||
break;
|
||||
default:
|
||||
@@ -336,7 +336,7 @@ void HandlerNBC::onBCContaminationChanged(const AreaEffectSimulation::BCContamin
|
||||
void HandlerNBC::onNContaminationChanged(const AreaEffectSimulation::NContamination &data, DataModification modType)
|
||||
{
|
||||
|
||||
DEBUG_LOG() << "onNContaminationChanged"
|
||||
DEBUG_LOG(m_logger) << "onNContaminationChanged"
|
||||
<< " id=" << data.id();
|
||||
switch (modType)
|
||||
{
|
||||
@@ -359,7 +359,7 @@ void HandlerNBC::onNContaminationChanged(const AreaEffectSimulation::NContaminat
|
||||
{
|
||||
if (m_handlerParticipant->isOutdated(participantPos))
|
||||
continue;
|
||||
DEBUG_LOG() << "onNContaminationChanged participantId=" << participantPos.participantId()
|
||||
DEBUG_LOG(m_logger) << "onNContaminationChanged participantId=" << participantPos.participantId()
|
||||
<< " insideBuilding=" << participantPos.insideBuilding()
|
||||
<< " buildingId=" << participantPos.buildingId();
|
||||
|
||||
@@ -368,7 +368,7 @@ void HandlerNBC::onNContaminationChanged(const AreaEffectSimulation::NContaminat
|
||||
|
||||
const EffectType effectType = CES_NBC::EffectType::NContaminationDetonation;
|
||||
const int ctasEffectType = static_cast<int>(effectType) & 0xffff;
|
||||
DEBUG_LOG() << "onNContaminationChanged isInCircle=" << isInCircle
|
||||
DEBUG_LOG(m_logger) << "onNContaminationChanged isInCircle=" << isInCircle
|
||||
<< " aesItemId=" << data.id();
|
||||
if ( isInCircle)
|
||||
{
|
||||
@@ -389,7 +389,7 @@ void HandlerNBC::onNContaminationChanged(const AreaEffectSimulation::NContaminat
|
||||
m_effectTypeStates.insert(data.id(), effectTypeStatesFromAesItem);
|
||||
|
||||
|
||||
DEBUG_LOG() << "m_participantAes.insert participantId=" << participantPos.participantId()
|
||||
DEBUG_LOG(m_logger) << "m_participantAes.insert participantId=" << participantPos.participantId()
|
||||
<< " aesId=" << data.id();
|
||||
sendCesHitRequest(ref,
|
||||
participantPos,
|
||||
@@ -410,13 +410,13 @@ void HandlerNBC::onNContaminationChanged(const AreaEffectSimulation::NContaminat
|
||||
|
||||
void HandlerNBC::calculateBcContamination(const CentralEffectSimulation::AesItemViewUtm &itemView)
|
||||
{
|
||||
TRACE_LOG() << "HandlerParticipantArea::calculateBcContamination aesItemId =" << itemView.aesItemId;
|
||||
TRACE_LOG(m_logger) << "HandlerParticipantArea::calculateBcContamination aesItemId =" << itemView.aesItemId;
|
||||
const auto participantsMap = m_handlerParticipant->positions();
|
||||
for (const CentralEffectSimulation::HandlerParticipant::CesParticipantData &participantPos : participantsMap)
|
||||
{
|
||||
if (m_handlerParticipant->isOutdated(participantPos))
|
||||
continue;
|
||||
DEBUG_LOG() << "participantId=" << participantPos.participantId()
|
||||
DEBUG_LOG(m_logger) << "participantId=" << participantPos.participantId()
|
||||
<< " insideBuilding=" << participantPos.insideBuilding()
|
||||
<< " buildingId=" << participantPos.buildingId()
|
||||
<< " roomId=" << participantPos.roomId();
|
||||
@@ -427,7 +427,7 @@ void HandlerNBC::calculateBcContamination(const CentralEffectSimulation::AesItem
|
||||
|
||||
void HandlerNBC::calculateDangerArea(const CentralEffectSimulation::AesItemViewUtm &itemView)
|
||||
{
|
||||
DEBUG_LOG() << "HandlerParticipantArea::calculateDangerArea aesItemId =" << itemView.aesItemId;
|
||||
DEBUG_LOG(m_logger) << "HandlerParticipantArea::calculateDangerArea aesItemId =" << itemView.aesItemId;
|
||||
const auto partPosMap = m_handlerParticipant->positions();
|
||||
for (const CentralEffectSimulation::HandlerParticipant::CesParticipantData &participantPos : partPosMap)
|
||||
inFormCheck(itemView, participantPos);
|
||||
@@ -436,20 +436,20 @@ void HandlerNBC::calculateDangerArea(const CentralEffectSimulation::AesItemViewU
|
||||
void HandlerNBC::deleteDangerArea(const int aesItemId)
|
||||
{
|
||||
CentralEffectSimulation::AesItemViewUtm itemView = m_aesItemViews.value(aesItemId);
|
||||
DEBUG_LOG() << "delete " << itemView.aesItemId << ", aesItemId: " << aesItemId;
|
||||
DEBUG_LOG(m_logger) << "delete " << itemView.aesItemId << ", aesItemId: " << aesItemId;
|
||||
|
||||
const auto partPosMap = m_handlerParticipant->positions();
|
||||
for (const CentralEffectSimulation::HandlerParticipant::CesParticipantData &participantPos : partPosMap)
|
||||
{
|
||||
sendParticipantEvent(aesItemId, participantPos, ProjectDataManagement::EventType_def::LeaveDangerArea);
|
||||
DEBUG_LOG() << "Participant inside id=" << participantPos.participantId();
|
||||
DEBUG_LOG(m_logger) << "Participant inside id=" << participantPos.participantId();
|
||||
}// for all Participants
|
||||
} // deleteDangerArea
|
||||
|
||||
void HandlerNBC::onNewOutdoorParticipantPosition(const CentralEffectSimulation::HandlerParticipant::CesParticipantData &participantData)
|
||||
{
|
||||
bool leave = false;
|
||||
DEBUG_LOG() << "++++++++ onNewOutdoorParticipantPosition participantId=" << participantData.participantId()
|
||||
DEBUG_LOG(m_logger) << "++++++++ onNewOutdoorParticipantPosition participantId=" << participantData.participantId()
|
||||
<< " buildingId=" << participantData.buildingId()
|
||||
<< " roomId=" << participantData.roomId()
|
||||
<< " reportingSource=" << participantData.reportingSource()
|
||||
@@ -460,13 +460,13 @@ void HandlerNBC::onNewOutdoorParticipantPosition(const CentralEffectSimulation::
|
||||
|
||||
if (m_handlerParticipant->getEquipmentNumber(participantData.participantId()) == 0)
|
||||
{
|
||||
DEBUG_LOG() << "Not handle position: participant has no equipment number";
|
||||
DEBUG_LOG(m_logger) << "Not handle position: participant has no equipment number";
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_lastRoomId.value(participantData.participantId()) > 0)
|
||||
{
|
||||
DEBUG_LOG() << "Leave Building m_isInContaminatedRoom.contains participantId=" << participantData.participantId()
|
||||
DEBUG_LOG(m_logger) << "Leave Building m_isInContaminatedRoom.contains participantId=" << participantData.participantId()
|
||||
<< " m_isInContaminatedRoom.\nremove!!!";
|
||||
|
||||
|
||||
@@ -476,32 +476,32 @@ void HandlerNBC::onNewOutdoorParticipantPosition(const CentralEffectSimulation::
|
||||
if (aesIsAvailable
|
||||
&& (aesItemView.effectStateId() == AreaEffectSimulation::AesEffectState_def::EsActivated))
|
||||
{
|
||||
DEBUG_LOG() << "Feld ist nicht mehr da. id=" << aesItemView.aesItemId();
|
||||
DEBUG_LOG(m_logger) << "Feld ist nicht mehr da. id=" << aesItemView.aesItemId();
|
||||
m_isInContaminatedRoom.remove(participantData.participantId());
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
DEBUG_LOG() << "Feld ist nicht mehr da. id=" << aesItemView.aesItemId();
|
||||
DEBUG_LOG(m_logger) << "Feld ist nicht mehr da. id=" << aesItemView.aesItemId();
|
||||
sendLeaveEvent(aesItemView.aesItemId(),participantData );
|
||||
}
|
||||
leave = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
DEBUG_LOG() << "m_lastRoomId.contains(" << m_lastRoomId.contains(participantData.participantId())
|
||||
DEBUG_LOG(m_logger) << "m_lastRoomId.contains(" << m_lastRoomId.contains(participantData.participantId())
|
||||
<< " roomId=" << m_lastRoomId.value(participantData.participantId());
|
||||
}
|
||||
|
||||
m_lastRoomId.insert(participantData.participantId(), 0);
|
||||
|
||||
|
||||
DEBUG_LOG() << "HandlerParticipantArea::calculateAesParticipant paricipantId: " << participantData.participantId()
|
||||
DEBUG_LOG(m_logger) << "HandlerParticipantArea::calculateAesParticipant paricipantId: " << participantData.participantId()
|
||||
<< " m_aesItemViews.size()=" << m_aesItemViews.size();
|
||||
for (const CentralEffectSimulation::AesItemViewUtm &itemView : std::as_const(m_aesItemViews))
|
||||
{
|
||||
DEBUG_LOG() << " xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
|
||||
DEBUG_LOG() << " itemView: " << itemView.aesItemId << ", " << itemView.aesTypeId;
|
||||
DEBUG_LOG(m_logger) << " xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
|
||||
DEBUG_LOG(m_logger) << " itemView: " << itemView.aesItemId << ", " << itemView.aesTypeId;
|
||||
if (leave)
|
||||
{
|
||||
QHash<int, QSet<EffectType>> effectTypeHash = m_effectTypeStates.value(itemView.aesItemId);
|
||||
@@ -527,12 +527,12 @@ void HandlerNBC::onNewOutdoorParticipantPosition(const CentralEffectSimulation::
|
||||
|
||||
void HandlerNBC::onParticipantDecontaminated(const int participantId)
|
||||
{
|
||||
DEBUG_LOG() << "onParticipantDecontaminated participantId=" << participantId;
|
||||
DEBUG_LOG(m_logger) << "onParticipantDecontaminated participantId=" << participantId;
|
||||
m_participantAes.remove(participantId);
|
||||
|
||||
for (auto i = m_effectTypeStates.cbegin(), end = m_effectTypeStates.cend(); i != end; ++i)
|
||||
{
|
||||
DEBUG_LOG() << "aesItemId=" << i.key();
|
||||
DEBUG_LOG(m_logger) << "aesItemId=" << i.key();
|
||||
QHash<int, QSet<EffectType>> value = i.value();
|
||||
value.remove(participantId);
|
||||
m_effectTypeStates.insert(i.key(), value);
|
||||
@@ -541,12 +541,12 @@ void HandlerNBC::onParticipantDecontaminated(const int participantId)
|
||||
|
||||
void HandlerNBC::onRestoreRadioReadinessChanged(const int participantId)
|
||||
{
|
||||
DEBUG_LOG() << "HandlerNBC::onRestoreRadioReadinessChanged participantId=" << participantId
|
||||
DEBUG_LOG(m_logger) << "HandlerNBC::onRestoreRadioReadinessChanged participantId=" << participantId
|
||||
<< " m_participantAes.size=" << m_participantAes.size();
|
||||
|
||||
if (!m_participantAes.contains(participantId) )
|
||||
{
|
||||
DEBUG_LOG() << "HandlerNBC::onRestoreRadioReadinessChanged !m_participantAes.contains( participantId=" << participantId << ")";
|
||||
DEBUG_LOG(m_logger) << "HandlerNBC::onRestoreRadioReadinessChanged !m_participantAes.contains( participantId=" << participantId << ")";
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -556,7 +556,7 @@ void HandlerNBC::onRestoreRadioReadinessChanged(const int participantId)
|
||||
while (i.hasNext())
|
||||
{
|
||||
i.next();
|
||||
DEBUG_LOG() << "HandlerNBC::onRestoreRadioReadinessChanged remove aesId=" << i.key();
|
||||
DEBUG_LOG(m_logger) << "HandlerNBC::onRestoreRadioReadinessChanged remove aesId=" << i.key();
|
||||
m_participantAes.remove(i.key());
|
||||
m_eventStates.remove(i.key());
|
||||
m_effectTypeStates.remove(i.key());
|
||||
@@ -581,11 +581,11 @@ bool HandlerNBC::inBoundingBoxCheck(const CentralEffectSimulation::AesItemViewUt
|
||||
const QPointF participantPosUtmPoint = CentralEffectSimulation::geographic2Utm(participantData.pos(), itemView.zone);
|
||||
if (boundingBoxImpact.contains(participantPosUtmPoint))
|
||||
{
|
||||
DEBUG_LOG() << "inBoundingBoxCheck Paricipant " << participantData.participantId()
|
||||
DEBUG_LOG(m_logger) << "inBoundingBoxCheck Paricipant " << participantData.participantId()
|
||||
<< " inside AesItemView:" << itemView.aesItemId;
|
||||
return true;
|
||||
}
|
||||
TRACE_LOG() << "inBoundingBoxCheck Paricipant " << participantData.participantId()
|
||||
TRACE_LOG(m_logger) << "inBoundingBoxCheck Paricipant " << participantData.participantId()
|
||||
<< " outside AesItemView:" << itemView.aesItemId;
|
||||
return false;
|
||||
}
|
||||
@@ -597,7 +597,7 @@ void HandlerNBC::sendEnterEvent(const int aesItemId, const AreaEffectSimulation:
|
||||
m_ddsHandler->dtcAes()->aesItemViewFromEntityId(aesItemId,AreaEffectSimulation::AesType::AtUnknown, aesItemView );
|
||||
|
||||
|
||||
DEBUG_LOG() << "sendEnterEvent, paricipantId: " << participantData.participantId()
|
||||
DEBUG_LOG(m_logger) << "sendEnterEvent, paricipantId: " << participantData.participantId()
|
||||
<< ", aesItemId: " << aesItemId
|
||||
<< ", aesType=" << aesTypeId
|
||||
<< ", isIndoor=" << isIndoor;
|
||||
@@ -611,7 +611,7 @@ void HandlerNBC::sendEnterEvent(const int aesItemId, const AreaEffectSimulation:
|
||||
zone = m_aesItemViews.value(aesItemId).zone;
|
||||
else
|
||||
{
|
||||
ERROR_LOG() << "No m_aesItemViews.contains aesItemId=" << aesItemId;
|
||||
ERROR_LOG(m_logger) << "No m_aesItemViews.contains aesItemId=" << aesItemId;
|
||||
}
|
||||
|
||||
const QPointF participantPosUtmPoint = CentralEffectSimulation::geographic2Utm(participantData.pos(), zone);
|
||||
@@ -638,7 +638,7 @@ void HandlerNBC::sendEnterEvent(const int aesItemId, const AreaEffectSimulation:
|
||||
case AreaEffectSimulation::AesType_def::AtFunctionalArea:
|
||||
case AreaEffectSimulation::AesType_def::AtMineArea:
|
||||
default:
|
||||
INFO_LOG() << "sendEvent Unhandled AES-Type" << aesTypeId;
|
||||
INFO_LOG(m_logger) << "sendEvent Unhandled AES-Type" << aesTypeId;
|
||||
break;
|
||||
}
|
||||
} // END sendEvent
|
||||
@@ -649,7 +649,7 @@ void HandlerNBC::sendLeaveEvent(const int aesItemId, const CentralEffectSimulati
|
||||
AreaEffectSimulation::AesItemView aesItemView;
|
||||
m_ddsHandler->dtcAes()->aesItemViewFromEntityId(aesItemId, AreaEffectSimulation::AesType_def::AtUnknown, aesItemView);
|
||||
|
||||
DEBUG_LOG() << "sendLeaveEvent"
|
||||
DEBUG_LOG(m_logger) << "sendLeaveEvent"
|
||||
<< " aesId=" << aesItemId
|
||||
<< " participantId=" << participantData.participantId()
|
||||
<< " aesTypeId=" << aesItemView.aesTypeId();
|
||||
@@ -689,7 +689,7 @@ bool HandlerNBC::inFormCheck(const CentralEffectSimulation::AesItemViewUtm &item
|
||||
itemView.boundingBoxTopRight);
|
||||
const QPointF participantPosUtmPoint = CentralEffectSimulation::geographic2Utm(participantData.pos(), itemView.zone);
|
||||
const QString participantPosMgrs = CentralEffectSimulation::geographic2mgrs(participantData.pos(), itemView.zone);
|
||||
TRACE_LOG() << "inFormCheck start, paricipantId: " << participantData.participantId()
|
||||
TRACE_LOG(m_logger) << "inFormCheck start, paricipantId: " << participantData.participantId()
|
||||
<< ", aesItemId: " << itemView.aesItemId
|
||||
<< ", aesTypeId: " << itemView.aesTypeId
|
||||
<< ", form.size: " << itemView.form.size()
|
||||
@@ -699,7 +699,7 @@ bool HandlerNBC::inFormCheck(const CentralEffectSimulation::AesItemViewUtm &item
|
||||
if (boundingBoxImpact.contains(participantPosUtmPoint) &&
|
||||
itemView.form.containsPoint(participantPosUtmPoint, Qt::FillRule::OddEvenFill))
|
||||
{
|
||||
DEBUG_LOG() << "Participant id=" << participantData.participantId()
|
||||
DEBUG_LOG(m_logger) << "Participant id=" << participantData.participantId()
|
||||
<< " inside Area"
|
||||
<< " inside Building:" << participantData.insideBuilding()
|
||||
<< " roomId=" << participantData.roomId();
|
||||
@@ -709,7 +709,7 @@ bool HandlerNBC::inFormCheck(const CentralEffectSimulation::AesItemViewUtm &item
|
||||
InfrastructureManagement::StructureElement structureElement;
|
||||
bool roomFound = m_ddsHandler->dtcIsm()->getStructureElementById(participantData.roomId(), structureElement);
|
||||
|
||||
DEBUG_LOG() << "Participant id=" << participantData.participantId()
|
||||
DEBUG_LOG(m_logger) << "Participant id=" << participantData.participantId()
|
||||
<< " pos.z=" << participantData.pos().z()
|
||||
<< " upperOffset =" << itemView.upperOffset
|
||||
<< " lowerOffset=" << itemView.lowerOffset
|
||||
@@ -721,7 +721,7 @@ bool HandlerNBC::inFormCheck(const CentralEffectSimulation::AesItemViewUtm &item
|
||||
&& ( ( structureElement.relPosition().offsetZ() + 1.5 > itemView.upperOffset )
|
||||
|| ( structureElement.relPosition().offsetZ() + 1.5 < itemView.lowerOffset)))
|
||||
{
|
||||
DEBUG_LOG() << "Participant id=" << participantData.participantId()
|
||||
DEBUG_LOG(m_logger) << "Participant id=" << participantData.participantId()
|
||||
<< " pos.z=" << participantData.pos().z()
|
||||
<< " not between upperOffset =" << itemView.upperOffset
|
||||
<< " and lowerOffset=" << itemView.lowerOffset
|
||||
@@ -741,10 +741,10 @@ bool HandlerNBC::inFormCheck(const CentralEffectSimulation::AesItemViewUtm &item
|
||||
#if 0
|
||||
if (m_logger.isDebugEnabled())
|
||||
{
|
||||
DEBUG_LOG() << "inFormCheck: Paricipant " << participantPosition.participantId << " outside AesItemView " << itemView.aesItemId;
|
||||
DEBUG_LOG() << "ParticipantPos = " << debug(participantPosUtmPoint);
|
||||
DEBUG_LOG(m_logger) << "inFormCheck: Paricipant " << participantPosition.participantId << " outside AesItemView " << itemView.aesItemId;
|
||||
DEBUG_LOG(m_logger) << "ParticipantPos = " << debug(participantPosUtmPoint);
|
||||
for (const auto &itPos : itemView.form)
|
||||
DEBUG_LOG() << "itemView =" << debug(itPos);
|
||||
DEBUG_LOG(m_logger) << "itemView =" << debug(itPos);
|
||||
}
|
||||
#endif
|
||||
return false;
|
||||
@@ -760,20 +760,20 @@ void HandlerNBC::sendCesHitRequest(const CentralEffectSimulation::AesItemViewUtm
|
||||
if (remaining < 0)
|
||||
return;
|
||||
|
||||
DEBUG_LOG() << "sendCesHitRequest Settings::calculateCentralAes="
|
||||
DEBUG_LOG(m_logger) << "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() << " ftc sendCESHit to Participant participantId = " << participantData.participantId()
|
||||
DEBUG_LOG(m_logger) << " 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() << "participantPosition.participantId != 0 && equipNo <= 0" ;
|
||||
DEBUG_LOG(m_logger) << "participantPosition.participantId != 0 && equipNo <= 0" ;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -799,14 +799,14 @@ void HandlerNBC::sendCesHitRequest(const CentralEffectSimulation::AesItemViewUtm
|
||||
itemView.partyId, // originPartyId
|
||||
mineFieldBitIndex
|
||||
);
|
||||
DEBUG_LOG() << " participantId=" << participantData.participantId()
|
||||
DEBUG_LOG(m_logger) << " participantId=" << participantData.participantId()
|
||||
<< " chargeTypeId=" << itemView.chargeStruct.chargeTypeId();
|
||||
|
||||
|
||||
m_sendCesHitRequestQueue.enqueue(requestTab);
|
||||
if (m_sendCesHitRequestQueue.size() == 1)
|
||||
{
|
||||
DEBUG_LOG() << "SendCesHitRequest: " << requestTab;
|
||||
DEBUG_LOG(m_logger) << "SendCesHitRequest: " << requestTab;
|
||||
m_ddsHandler->ftcTab()->sendCesHitRequest(requestTab, this);
|
||||
}
|
||||
}
|
||||
@@ -829,7 +829,7 @@ void HandlerNBC::sendCesHitRequest(const int aesItemId,
|
||||
if ( aesItem.partyId().is_set())
|
||||
partyId = aesItem.partyId().get();
|
||||
legacyChargeTypeId = m_ddsHandler->getLegacyIdFromChargeTypeId(aesItem.chargeStruct());
|
||||
DEBUG_LOG() << "sendCesHitRequest Settings::calculateCentralAes="
|
||||
DEBUG_LOG(m_logger) << "sendCesHitRequest Settings::calculateCentralAes="
|
||||
<< " insideWlsArea=" << std::boolalpha << participantData.insideWlsArea()
|
||||
<< " isSmartChargeType=" << std::boolalpha << m_ddsHandler->isSmartChargeType(aesItem.chargeStruct())
|
||||
<< " participantId=" << participantData.participantId()
|
||||
@@ -838,30 +838,30 @@ void HandlerNBC::sendCesHitRequest(const int aesItemId,
|
||||
<< " remaining=" << remaining;
|
||||
|
||||
const int equipmentNumber = m_ddsHandler->participantId2EquipNo(participantData.participantId());
|
||||
DEBUG_LOG() << " ftc sendCESHit to Participant participantId = " << participantData.participantId()
|
||||
DEBUG_LOG(m_logger) << " ftc sendCESHit to Participant participantId = " << participantData.participantId()
|
||||
<< " equipNo = " << equipmentNumber << " aesItemId =" << aesItemId;
|
||||
|
||||
// participantPosition.participantPosition == 0 -> send to all
|
||||
if (participantData.participantId() != 0 && equipmentNumber <= 0)
|
||||
{
|
||||
DEBUG_LOG() << "participantPosition.participantId != 0 && equipNo <= 0" ;
|
||||
DEBUG_LOG(m_logger) << "participantPosition.participantId != 0 && equipNo <= 0" ;
|
||||
return;
|
||||
} // if
|
||||
|
||||
// Check Protection by buildings
|
||||
else if (effectType == CES_NBC::EffectType::NContaminationEnterArea1)
|
||||
{
|
||||
DEBUG_LOG() << "NContaminationEnterArea1";
|
||||
DEBUG_LOG(m_logger) << "NContaminationEnterArea1";
|
||||
if (participantData.buildingId() > 0)
|
||||
{
|
||||
DEBUG_LOG() << "NContaminationEnterArea1 Protection by buildings"
|
||||
DEBUG_LOG(m_logger) << "NContaminationEnterArea1 Protection by buildings"
|
||||
<< " remaining vorher=" << remaining
|
||||
<< " remaining nachher=2";
|
||||
remaining = 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
DEBUG_LOG() << "NContaminationEnterArea1 NO Protection by buildings"
|
||||
DEBUG_LOG(m_logger) << "NContaminationEnterArea1 NO Protection by buildings"
|
||||
<< " remaining vorher="<< remaining
|
||||
<< " remaining nachher=1";
|
||||
remaining = 1;
|
||||
@@ -869,10 +869,10 @@ void HandlerNBC::sendCesHitRequest(const int aesItemId,
|
||||
}
|
||||
else if (effectType == CES_NBC::EffectType::NContaminationEnterArea2)
|
||||
{
|
||||
DEBUG_LOG() << "NContaminationEnterArea2 NO Protection by buildings"
|
||||
DEBUG_LOG(m_logger) << "NContaminationEnterArea2 NO Protection by buildings"
|
||||
<< " remaining vorher="<< remaining
|
||||
<< " remaining nachher=2";
|
||||
DEBUG_LOG() << "NContaminationEnterArea2";
|
||||
DEBUG_LOG(m_logger) << "NContaminationEnterArea2";
|
||||
remaining = 2;
|
||||
}
|
||||
|
||||
@@ -887,13 +887,13 @@ void HandlerNBC::sendCesHitRequest(const int aesItemId,
|
||||
equipmentNumber, participantData.participantId(), legacyChargeTypeId, aesItemId, originatorEquipmentNumber,
|
||||
remaining, pos, effectTime, eventType, partyId, mineFieldBitIndex
|
||||
);
|
||||
DEBUG_LOG() << " participantId=" << participantData.participantId() << " chargeTypeId=" << aesItem.chargeStruct().chargeTypeId()
|
||||
DEBUG_LOG(m_logger) << " participantId=" << participantData.participantId() << " chargeTypeId=" << aesItem.chargeStruct().chargeTypeId()
|
||||
<< " legacyChargeTypeId=" << legacyChargeTypeId;
|
||||
|
||||
m_sendCesHitRequestQueue.enqueue(requestTab);
|
||||
if (m_sendCesHitRequestQueue.size() == 1)
|
||||
{
|
||||
DEBUG_LOG() << "SendCesHitRequest: " << requestTab;
|
||||
DEBUG_LOG(m_logger) << "SendCesHitRequest: " << requestTab;
|
||||
m_ddsHandler->ftcTab()->sendCesHitRequest(requestTab, this);
|
||||
} // if
|
||||
}
|
||||
@@ -911,7 +911,7 @@ void HandlerNBC::sendParticipantEvent(const int aesItemId,
|
||||
typeClass == ParticipantManagement::TypeClass_def::Vessel ||
|
||||
typeClass == ParticipantManagement::TypeClass_def::Unknown)
|
||||
{
|
||||
DEBUG_LOG() << "Participant with id " << participantData.participantId()
|
||||
DEBUG_LOG(m_logger) << "Participant with id " << participantData.participantId()
|
||||
<< " has invalid typeClass: " << typeClass
|
||||
<< " eventType: " << eventType;
|
||||
return;
|
||||
@@ -921,11 +921,11 @@ void HandlerNBC::sendParticipantEvent(const int aesItemId,
|
||||
{
|
||||
if ( m_isInContaminatedRoom.contains(participantData.participantId()) && participantData.roomId() == 0) // Tln leaves Building
|
||||
{
|
||||
DEBUG_LOG() << "Sending Event because Participant leaves Building";
|
||||
DEBUG_LOG(m_logger) << "Sending Event because Participant leaves Building";
|
||||
}
|
||||
else
|
||||
{
|
||||
DEBUG_LOG() << "Not sending Event " << eventType << " for participant " << participantData.participantId()
|
||||
DEBUG_LOG(m_logger) << "Not sending Event " << eventType << " for participant " << participantData.participantId()
|
||||
<< " and aes " << aesItemId << " - already sent";
|
||||
return;
|
||||
}
|
||||
@@ -939,19 +939,19 @@ void HandlerNBC::sendParticipantEvent(const int aesItemId,
|
||||
|| eventType == ProjectDataManagement::EventType_def::HitMine
|
||||
|| eventType == ProjectDataManagement::EventType_def::HitN)
|
||||
{
|
||||
DEBUG_LOG() << "send hit events only with central AES Simulation participant=" << participantData.participantId();
|
||||
DEBUG_LOG(m_logger) << "send hit events only with central AES Simulation participant=" << participantData.participantId();
|
||||
return;
|
||||
}
|
||||
|
||||
int equipmentNumber = m_ddsHandler->participantId2EquipNo(participantData.participantId());
|
||||
if (equipmentNumber <= 0)
|
||||
{
|
||||
WARNING_LOG() << "Not sending Event " << eventType << " for participant " << participantData.participantId()
|
||||
WARNING_LOG(m_logger) << "Not sending Event " << eventType << " for participant " << participantData.participantId()
|
||||
<< " - participant has no equipment number";
|
||||
return;
|
||||
}
|
||||
|
||||
DEBUG_LOG() << "sendParticipantEvent" << eventType
|
||||
DEBUG_LOG(m_logger) << "sendParticipantEvent" << eventType
|
||||
<< " participantId=" << participantData.participantId()
|
||||
<< " AesItemId=" << aesItemId;
|
||||
|
||||
@@ -1002,7 +1002,7 @@ void HandlerNBC::sendParticipantEvent(const int aesItemId,
|
||||
else
|
||||
pe.friendlyFire(false);
|
||||
|
||||
INFO_LOG() << "sendParticipantEvent: " << pe
|
||||
INFO_LOG(m_logger) << "sendParticipantEvent: " << pe
|
||||
<< ", currentMSecsSinceEpoch = " << QDateTime::currentMSecsSinceEpoch()
|
||||
<< ", time difference = " << QDateTime::currentMSecsSinceEpoch() - pe.eventTime();
|
||||
m_ddsHandler->dtsCes()->publish(pe);
|
||||
@@ -1022,14 +1022,14 @@ void HandlerNBC::sendEffectTypeEvent(const int aesItemId,
|
||||
participantData.participantId(),
|
||||
effectType))
|
||||
{
|
||||
DEBUG_LOG() << "Not sending EffectType event " << toString(effectType)
|
||||
DEBUG_LOG(m_logger) << "Not sending EffectType event " << toString(effectType)
|
||||
<< ", participant: " << participantData.participantId()
|
||||
<< ", aesItemId: " << aesItemId
|
||||
<< " - already sent";
|
||||
return;
|
||||
}
|
||||
const int ctasEffectType = static_cast<int>(effectType) & 0xffff;
|
||||
DEBUG_LOG() << "Sending EffectType event " << toString(effectType)
|
||||
DEBUG_LOG(m_logger) << "Sending EffectType event " << toString(effectType)
|
||||
<< ", participant: " << participantData.participantId()
|
||||
<< ", aesItemId: " << aesItemId
|
||||
<< ", ctasEffectType: " << ctasEffectType;
|
||||
@@ -1051,7 +1051,7 @@ bool HandlerNBC::eventMustBeSend(int aesItemId,
|
||||
// - only send event if it was not already sent
|
||||
if (activeEvents.contains(eventType))
|
||||
{
|
||||
DEBUG_LOG() << "activeEvents=" << eventType
|
||||
DEBUG_LOG(m_logger) << "activeEvents=" << eventType
|
||||
<< " return false";
|
||||
return false;
|
||||
}
|
||||
@@ -1084,7 +1084,7 @@ bool HandlerNBC::eventMustBeSend(int aesItemId,
|
||||
default:
|
||||
break;
|
||||
}
|
||||
DEBUG_LOG() << "eventMustBeSend=true";
|
||||
DEBUG_LOG(m_logger) << "eventMustBeSend=true";
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1092,7 +1092,7 @@ bool HandlerNBC::effectTypeMustBeSend(int aesItemId,
|
||||
int participantId,
|
||||
EffectType effectType)
|
||||
{
|
||||
DEBUG_LOG() << "effectTypeMustBeSend"
|
||||
DEBUG_LOG(m_logger) << "effectTypeMustBeSend"
|
||||
<< " aesItemId= " << aesItemId
|
||||
<< " participantId=" << participantId
|
||||
<< " effectType=" << CES_NBC::toString(effectType);
|
||||
@@ -1102,7 +1102,7 @@ bool HandlerNBC::effectTypeMustBeSend(int aesItemId,
|
||||
// - only send event if it was not already sent
|
||||
if (activeEffects.contains(effectType))
|
||||
{
|
||||
//DEBUG_LOG() << "effectTypeStates already contains aesItemId " << aesItemId;
|
||||
//DEBUG_LOG(m_logger) << "effectTypeStates already contains aesItemId " << aesItemId;
|
||||
return false;
|
||||
}
|
||||
if ( (effectType == EffectType::NContaminationEnterArea1)
|
||||
@@ -1110,7 +1110,7 @@ bool HandlerNBC::effectTypeMustBeSend(int aesItemId,
|
||||
{
|
||||
if (activeEffects.contains(EffectType::NContaminationDetonation))
|
||||
{
|
||||
DEBUG_LOG() << "effectTypeStates.contains(NContaminationDetonation) " << aesItemId
|
||||
DEBUG_LOG(m_logger) << "effectTypeStates.contains(NContaminationDetonation) " << aesItemId
|
||||
<< " return false";
|
||||
return false;
|
||||
}
|
||||
@@ -1188,7 +1188,7 @@ bool HandlerNBC::inCircle(const QPointF ¢erUtm, const double radius, const Q
|
||||
{
|
||||
double squareDist = CentralEffectSimulation::getSquareDistance(centerUtm, pointUtm);
|
||||
double squareRadius = radius * radius;
|
||||
DEBUG_LOG() << "squareDist: " << squareDist << ", squareRadius: " << squareRadius
|
||||
DEBUG_LOG(m_logger) << "squareDist: " << squareDist << ", squareRadius: " << squareRadius
|
||||
<< " centerUtm=" << centerUtm.x() << "/" << centerUtm.y()
|
||||
<< " pointUtm=" << pointUtm.x() << "/" << pointUtm.y()
|
||||
<< " radius = " << radius
|
||||
@@ -1235,59 +1235,59 @@ EffectType HandlerNBC::effectTypeForNContaminationArea(const CentralEffectSimula
|
||||
const AreaEffectSimulation::NContamination &nc = m_ddsHandler->dtcAes()->nContamination(itemView.aesItemId);
|
||||
auto utm = LtsCoordTrans::UtmCoordinate::fromGeographic(nc.impactPosition().lon(), nc.impactPosition().lat(), itemView.zone);
|
||||
QPointF impactPositionUtm = QPointF(utm.x, utm.y);
|
||||
DEBUG_LOG() << "HandlerNBC::effectTypeForNContaminationArea itemView.radials.size()=" << itemView.radials.size();
|
||||
DEBUG_LOG(m_logger) << "HandlerNBC::effectTypeForNContaminationArea itemView.radials.size()=" << itemView.radials.size();
|
||||
if (itemView.radials.size() != 3)
|
||||
return EffectType::NContaminationEnterArea2; // not yet known, we only know we're inside the area
|
||||
|
||||
DEBUG_LOG() << "impactPositionUtm=" << impactPositionUtm.x() << "/" << impactPositionUtm.y()
|
||||
DEBUG_LOG(m_logger) << "impactPositionUtm=" << impactPositionUtm.x() << "/" << impactPositionUtm.y()
|
||||
<< " participantPosUtmPoint=" << participantPosUtmPoint.x() << "/" << participantPosUtmPoint.y();
|
||||
|
||||
const double squareDist = CentralEffectSimulation::getSquareDistance(impactPositionUtm, participantPosUtmPoint);
|
||||
if (squareDist <= pow(itemView.radials.at(0), 2))
|
||||
{
|
||||
// 5s delay
|
||||
DEBUG_LOG() << "partPosSampleTime: " << partPosSampleTime
|
||||
DEBUG_LOG(m_logger) << "partPosSampleTime: " << partPosSampleTime
|
||||
<< ", itemView.effectStart: " << itemView.effectStart;
|
||||
if (partPosSampleTime < itemView.effectStart + 5000)
|
||||
{
|
||||
DEBUG_LOG() << "return EffectType::NContaminationDetonation";
|
||||
DEBUG_LOG(m_logger) << "return EffectType::NContaminationDetonation";
|
||||
return EffectType::NContaminationDetonation;
|
||||
}
|
||||
DEBUG_LOG() << "return EffectType::NContaminationEnterArea2";
|
||||
DEBUG_LOG(m_logger) << "return EffectType::NContaminationEnterArea2";
|
||||
return EffectType::NContaminationEnterArea2;
|
||||
}
|
||||
DEBUG_LOG() << "squareDist=" << squareDist
|
||||
DEBUG_LOG(m_logger) << "squareDist=" << squareDist
|
||||
<< " pow(itemView.radials.at(1), 2)=" << pow(itemView.radials.at(1), 2)
|
||||
<< " itemView.radials.at(1)=" << itemView.radials.at(1);
|
||||
// Bereich 1
|
||||
if (squareDist <= pow(itemView.radials.at(1), 2))
|
||||
{
|
||||
DEBUG_LOG() << "-------------- NContamination Bereich 1 ---------------------";
|
||||
DEBUG_LOG(m_logger) << "-------------- NContamination Bereich 1 ---------------------";
|
||||
if ( isIndoor)
|
||||
{
|
||||
DEBUG_LOG() << "NContaminationEnterArea1 indoor => NContaminationEnterArea2";
|
||||
DEBUG_LOG(m_logger) << "NContaminationEnterArea1 indoor => NContaminationEnterArea2";
|
||||
return EffectType::NContaminationEnterArea2;
|
||||
}
|
||||
DEBUG_LOG() << "NContaminationEnterArea1";
|
||||
DEBUG_LOG(m_logger) << "NContaminationEnterArea1";
|
||||
return EffectType::NContaminationEnterArea1;
|
||||
}
|
||||
DEBUG_LOG() << "squareDist=" << squareDist
|
||||
DEBUG_LOG(m_logger) << "squareDist=" << squareDist
|
||||
<< " Dist=" << sqrt (squareDist )
|
||||
<< " pow(itemView.radials.at(2), 2)=" << pow(itemView.radials.at(2), 2)
|
||||
<< " itemView.radials.at(2)=" << itemView.radials.at(2);
|
||||
// Bereich 2
|
||||
if (squareDist <= pow(itemView.radials.at(2), 2))
|
||||
{
|
||||
DEBUG_LOG() << "-------------- NContamination Bereich 2 ---------------------";
|
||||
DEBUG_LOG(m_logger) << "-------------- NContamination Bereich 2 ---------------------";
|
||||
if ( isIndoor)
|
||||
{
|
||||
DEBUG_LOG() << "NContaminationEnterArea2 indoor => NContaminationLeave";
|
||||
DEBUG_LOG(m_logger) << "NContaminationEnterArea2 indoor => NContaminationLeave";
|
||||
return EffectType::NContaminationLeave;
|
||||
}
|
||||
DEBUG_LOG() << "NContaminationEnterArea2";
|
||||
DEBUG_LOG(m_logger) << "NContaminationEnterArea2";
|
||||
return EffectType::NContaminationEnterArea2;
|
||||
}
|
||||
DEBUG_LOG() << "NContaminationLeave";
|
||||
DEBUG_LOG(m_logger) << "NContaminationLeave";
|
||||
return EffectType::NContaminationLeave;
|
||||
}
|
||||
|
||||
@@ -1318,12 +1318,12 @@ void HandlerNBC::aesItemViewRemoved(int aesItemId)
|
||||
const auto effectTypLeave = leaveEffectTypeForAesType(aiv.aesTypeId);
|
||||
if (effectTypLeave != EffectType::Unknown)
|
||||
{
|
||||
DEBUG_LOG() << "aesItemViewRemoved, leaveEffectType: " << toString(effectTypLeave);
|
||||
DEBUG_LOG(m_logger) << "aesItemViewRemoved, leaveEffectType: " << toString(effectTypLeave);
|
||||
auto it = m_effectTypeStates.find(aesItemId);
|
||||
if (it != m_effectTypeStates.end())
|
||||
{
|
||||
const QHash<int, QSet<EffectType>> &participants = it.value();
|
||||
DEBUG_LOG() << "aesItemViewRemoved, sending leave events to " << participants.size()
|
||||
DEBUG_LOG(m_logger) << "aesItemViewRemoved, sending leave events to " << participants.size()
|
||||
<< " participants";
|
||||
for (auto itP = participants.begin(); itP != participants.end(); ++ itP)
|
||||
sendEffectTypeEvent(aesItemId, m_handlerParticipant->position(itP.key()), effectTypLeave);
|
||||
@@ -1332,12 +1332,12 @@ void HandlerNBC::aesItemViewRemoved(int aesItemId)
|
||||
const auto eventTypeLeave = leaveEventTypeForAesType(aiv.aesTypeId);
|
||||
if (eventTypeLeave != ProjectDataManagement::EventType::Unknown)
|
||||
{
|
||||
DEBUG_LOG() << "aesItemViewRemoved, leaveEventType: " << eventTypeLeave;
|
||||
DEBUG_LOG(m_logger) << "aesItemViewRemoved, leaveEventType: " << eventTypeLeave;
|
||||
auto it = m_eventStates.find(aesItemId);
|
||||
if (it != m_eventStates.end())
|
||||
{
|
||||
const QHash<int, QSet<ProjectDataManagement::EventType>> &participants = it.value();
|
||||
DEBUG_LOG() << "aesItemViewRemoved, sending leave events to " << participants.size()
|
||||
DEBUG_LOG(m_logger) << "aesItemViewRemoved, sending leave events to " << participants.size()
|
||||
<< " participants";
|
||||
for (auto itP = participants.begin(); itP != participants.end(); ++ itP)
|
||||
sendParticipantEvent(aiv.aesItemId, m_handlerParticipant->position(itP.key()), eventTypeLeave);
|
||||
@@ -1357,7 +1357,7 @@ void HandlerNBC::aesItemViewRemoved(int aesItemId)
|
||||
|
||||
int HandlerNBC::getContaminationFromBuildingRoom(const int buildingId, const int roomId) const
|
||||
{
|
||||
DEBUG_LOG() << "getContaminationFromBuildingRoom buildingId=" << buildingId
|
||||
DEBUG_LOG(m_logger) << "getContaminationFromBuildingRoom buildingId=" << buildingId
|
||||
<< " roomId=" << roomId;
|
||||
|
||||
Buildings::BuildingState buildingState = m_ddsHandler->dtcBld()->buildingState(buildingId);
|
||||
@@ -1386,7 +1386,7 @@ void HandlerNBC::onBuildingStateChanged(const Buildings::BuildingState &data, Da
|
||||
return;
|
||||
}
|
||||
|
||||
DEBUG_LOG() << "Got BuildingState originatorParticipantId=" << data.originatorParticipantId()
|
||||
DEBUG_LOG(m_logger) << "Got BuildingState originatorParticipantId=" << data.originatorParticipantId()
|
||||
<< ", aesId = " << data.aesId()
|
||||
<< ", data.contaminationStates().size()=" << data.contaminationStates().size();
|
||||
// Check each participant
|
||||
@@ -1415,7 +1415,7 @@ void HandlerNBC::onNewIndoorParticipantPosition(const CentralEffectSimulation::H
|
||||
bool enterBuilding = false;
|
||||
if ( m_lastRoomId.value(participantData.participantId()) == 0)
|
||||
{
|
||||
DEBUG_LOG() << "m_lastRoomId Enter Building m_isInContaminatedRoom.contains participantId=" << participantData.participantId()
|
||||
DEBUG_LOG(m_logger) << "m_lastRoomId Enter Building m_isInContaminatedRoom.contains participantId=" << participantData.participantId()
|
||||
<< " roomId=" << participantData.roomId()
|
||||
<< " m_isInContaminatedRoom. \nremove!!!!";
|
||||
m_isInContaminatedRoom.remove(participantData.participantId());
|
||||
@@ -1424,12 +1424,12 @@ void HandlerNBC::onNewIndoorParticipantPosition(const CentralEffectSimulation::H
|
||||
}
|
||||
else
|
||||
{
|
||||
DEBUG_LOG() << "m_lastRoomId.contains(" << m_lastRoomId.contains(participantData.participantId())
|
||||
DEBUG_LOG(m_logger) << "m_lastRoomId.contains(" << m_lastRoomId.contains(participantData.participantId())
|
||||
<< " roomId=" << m_lastRoomId.value(participantData.participantId());
|
||||
}
|
||||
|
||||
int aesId = getContaminationFromBuildingRoom(participantData.buildingId(), participantData.roomId());
|
||||
DEBUG_LOG() << "++++++++ onNewIndoorParticipantPosition participantId=" << participantData.participantId()
|
||||
DEBUG_LOG(m_logger) << "++++++++ onNewIndoorParticipantPosition participantId=" << participantData.participantId()
|
||||
<< " buildingId=" << participantData.buildingId()
|
||||
<< " roomId=" << participantData.roomId()
|
||||
<< " reportingSource=" << participantData.reportingSource()
|
||||
@@ -1452,11 +1452,11 @@ void HandlerNBC::onNewIndoorParticipantPosition(const CentralEffectSimulation::H
|
||||
}
|
||||
|
||||
|
||||
DEBUG_LOG() << "aesId=" << aesId;
|
||||
DEBUG_LOG(m_logger) << "aesId=" << aesId;
|
||||
|
||||
if (aesId > 0 && !m_aesItemViews.contains(aesId))
|
||||
{
|
||||
DEBUG_LOG() << "m_isInContaminatedRoom insert participantId=" << participantData.participantId()
|
||||
DEBUG_LOG(m_logger) << "m_isInContaminatedRoom insert participantId=" << participantData.participantId()
|
||||
<< " aesId=" << aesId;
|
||||
m_isInContaminatedRoom.insert(participantData.participantId(), aesId);
|
||||
}
|
||||
@@ -1468,7 +1468,7 @@ void HandlerNBC::onNewIndoorParticipantPosition(const CentralEffectSimulation::H
|
||||
|
||||
AreaEffectSimulation::AesType aesTypeId = aesItemView.aesTypeId();
|
||||
|
||||
DEBUG_LOG() << "onNewIndoorParticipantPosition sendEnterEvent aesTypeId=" << aesTypeId;
|
||||
DEBUG_LOG(m_logger) << "onNewIndoorParticipantPosition sendEnterEvent aesTypeId=" << aesTypeId;
|
||||
sendEnterEvent(aesId,aesTypeId, participantData, true);
|
||||
}
|
||||
else
|
||||
|
||||
Reference in new issue
Block a user