Complete Qt6 migration: full clean build green across groups G1-G12 incl. runtime plugin set
new_docker_build.sh gains Group 12 (212 GUI/Data plugins); fixes LtsUtilsGuiDds visibility (LTO-stripped exports), LtsProjectionWorkstation unity name shadow, 6 unity-off dirs (dup file-scope statics, ddsftc INTERFACE sources) and reconfigures BUILD_FILTERMANAGEMENT/BUILD_PLUGINS_SERVICEMONITOR=ON
This commit is contained in:
1718 files changed
+126739
-18495
No files matched your search
+201
-201
@@ -23,7 +23,7 @@ namespace core
|
||||
{
|
||||
inline uint qHash(ProjectDataManagement::PdmEventType et)
|
||||
{
|
||||
return ::qHash(et.underlying());
|
||||
return ::qHash(et);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -171,45 +171,45 @@ void HandlerNBC::onAesItemViewChanged(const AreaEffectSimulation::AesItemView &d
|
||||
double lowerOffset = 0;
|
||||
bool offsetIsSet = false;
|
||||
TRACE_LOG(m_logger) << "onAesItemViewChanged"
|
||||
<< " aesItemId=" << data.aesItemId();
|
||||
<< " aesItemId=" << data.aesItemId;
|
||||
|
||||
|
||||
AreaEffectSimulation::BCContamination bCContamination = m_ddsHandler->dtcAes()->bCContamination(data.aesItemId());
|
||||
AreaEffectSimulation::BCContamination bCContamination = m_ddsHandler->dtcAes()->bCContamination(data.aesItemId);
|
||||
|
||||
|
||||
|
||||
const int aesItemId = data.aesItemId();
|
||||
const AreaEffectSimulation::AesEffectState &effectState = data.effectStateId();
|
||||
if ((data.aesTypeId().underlying() != AreaEffectSimulation::AesType::AtDangerArea)
|
||||
&& (data.aesTypeId().underlying() != AreaEffectSimulation::AesType::AtBCContamination)
|
||||
&& (data.aesTypeId().underlying() != AreaEffectSimulation::AesType::AtNContamination))
|
||||
const int aesItemId = data.aesItemId;
|
||||
const AreaEffectSimulation::AesEffectState &effectState = data.effectStateId;
|
||||
if ((data.aesTypeId != AreaEffectSimulation::AesType::AtDangerArea)
|
||||
&& (data.aesTypeId != AreaEffectSimulation::AesType::AtBCContamination)
|
||||
&& (data.aesTypeId != AreaEffectSimulation::AesType::AtNContamination))
|
||||
return;
|
||||
|
||||
if (data.aesTypeId().underlying() == AreaEffectSimulation::AesType::AtBCContamination)
|
||||
if (data.aesTypeId == AreaEffectSimulation::AesType::AtBCContamination)
|
||||
{
|
||||
const AreaEffectSimulation::BCContamination &bc = m_ddsHandler->dtcAes()->bCContamination(data.aesItemId());
|
||||
if (!bc.isCentral())
|
||||
const AreaEffectSimulation::BCContamination &bc = m_ddsHandler->dtcAes()->bCContamination(data.aesItemId);
|
||||
if (!bc.isCentral)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "!Central BCContamination id: " << aesItemId;
|
||||
return;
|
||||
}
|
||||
offsetIsSet = true;
|
||||
upperOffset = bCContamination.upperOffset();
|
||||
lowerOffset = bCContamination.lowerOffset();
|
||||
upperOffset = bCContamination.upperOffset;
|
||||
lowerOffset = bCContamination.lowerOffset;
|
||||
}
|
||||
else if (data.aesTypeId().underlying() == AreaEffectSimulation::AesType::AtDangerArea)
|
||||
else if (data.aesTypeId == AreaEffectSimulation::AesType::AtDangerArea)
|
||||
{
|
||||
const AreaEffectSimulation::DangerArea &da = m_ddsHandler->dtcAes()->dangerArea(data.aesItemId());
|
||||
if (!da.isCentral())
|
||||
const AreaEffectSimulation::DangerArea &da = m_ddsHandler->dtcAes()->dangerArea(data.aesItemId);
|
||||
if (!da.isCentral)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "!Central DangerArea id: " << aesItemId;
|
||||
return;
|
||||
}
|
||||
}
|
||||
else if (data.aesTypeId().underlying() == AreaEffectSimulation::AesType::AtNContamination)
|
||||
else if (data.aesTypeId == AreaEffectSimulation::AesType::AtNContamination)
|
||||
{
|
||||
const AreaEffectSimulation::NContamination &nc = m_ddsHandler->dtcAes()->nContamination(data.aesItemId());
|
||||
if (!nc.isCentral())
|
||||
const AreaEffectSimulation::NContamination &nc = m_ddsHandler->dtcAes()->nContamination(data.aesItemId);
|
||||
if (!nc.isCentral)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "!Central NContamination id: " << aesItemId;
|
||||
return;
|
||||
@@ -218,26 +218,26 @@ void HandlerNBC::onAesItemViewChanged(const AreaEffectSimulation::AesItemView &d
|
||||
|
||||
|
||||
TRACE_LOG(m_logger) << "Got AesItemView id: " << aesItemId
|
||||
<< ", type: " << data.aesTypeId()
|
||||
<< ", effectState: " << data.effectStateId()
|
||||
<< ", type: " << data.aesTypeId
|
||||
<< ", effectState: " << data.effectStateId
|
||||
<< ", modType: " << modType;
|
||||
|
||||
|
||||
const double impactRadius = m_ddsHandler->chargeTypeRadius(data.chargeStruct());
|
||||
const double impactRadius = m_ddsHandler->chargeTypeRadius(data.chargeStruct);
|
||||
DEBUG_LOG(m_logger) << "impactRadius=" << impactRadius;
|
||||
switch (effectState.underlying())
|
||||
switch (effectState)
|
||||
{
|
||||
case AreaEffectSimulation::AesEffectState::EsPrepared:
|
||||
{
|
||||
const auto &aesItemViewUtm = CentralEffectSimulation::AesItemViewUtm::create(data,
|
||||
m_aesItemViews[data.aesItemId()],
|
||||
m_aesItemViews[data.aesItemId],
|
||||
impactRadius,
|
||||
isSupplyTruck,
|
||||
hazardDistance,
|
||||
offsetIsSet,
|
||||
upperOffset,
|
||||
lowerOffset);
|
||||
m_aesItemViews.insert(data.aesItemId(), aesItemViewUtm);
|
||||
m_aesItemViews.insert(data.aesItemId, aesItemViewUtm);
|
||||
}
|
||||
break;
|
||||
case AreaEffectSimulation::AesEffectState::EsActivated:
|
||||
@@ -245,23 +245,23 @@ void HandlerNBC::onAesItemViewChanged(const AreaEffectSimulation::AesItemView &d
|
||||
|
||||
CentralEffectSimulation::AesItemViewUtm aesItemViewUtm =
|
||||
CentralEffectSimulation::AesItemViewUtm::create(data,
|
||||
m_aesItemViews[data.aesItemId()],
|
||||
m_aesItemViews[data.aesItemId],
|
||||
impactRadius,
|
||||
isSupplyTruck,
|
||||
hazardDistance,
|
||||
offsetIsSet,
|
||||
upperOffset,
|
||||
lowerOffset);
|
||||
const Core::GeoPosition2D &pointGeo = bCContamination.impactPosition();
|
||||
const Core::GeoPosition2D &pointGeo = bCContamination.impactPosition;
|
||||
int zone = aesItemViewUtm.zone;
|
||||
|
||||
//aesItemViewUtm.center = CentralEffectSimulation::geographic2Utm(pointGeo, &zone);
|
||||
|
||||
auto utm = LtsCoordTrans::UtmCoordinate::fromGeographic(pointGeo.lon(), pointGeo.lat(), zone);
|
||||
auto utm = LtsCoordTrans::UtmCoordinate::fromGeographic(pointGeo.lon, pointGeo.lat, zone);
|
||||
QPointF impactPositionUtm = QPointF(utm.x, utm.y);
|
||||
aesItemViewUtm.center = impactPositionUtm;
|
||||
|
||||
switch (data.aesTypeId().underlying())
|
||||
switch (data.aesTypeId)
|
||||
{
|
||||
case AreaEffectSimulation::AesType::AtBCContamination:
|
||||
case AreaEffectSimulation::AesType::AtNContamination:
|
||||
@@ -270,15 +270,15 @@ void HandlerNBC::onAesItemViewChanged(const AreaEffectSimulation::AesItemView &d
|
||||
// form-Check
|
||||
// if new field for this participant send sendCesHitRequest
|
||||
calculateBcContamination(aesItemViewUtm);
|
||||
m_aesItemViews.insert(data.aesItemId(), aesItemViewUtm);
|
||||
m_aesItemViews.insert(data.aesItemId, aesItemViewUtm);
|
||||
// DEBUG_LOG(m_logger) << "insert AtBCContamination oder AtNContamination AesItemView id: " << aesItemId
|
||||
// << ", type: " << data.aesTypeId();
|
||||
break;
|
||||
case AreaEffectSimulation::AesType::AtDangerArea:
|
||||
calculateDangerArea(aesItemViewUtm);
|
||||
m_aesItemViews.insert(data.aesItemId(), aesItemViewUtm);
|
||||
m_aesItemViews.insert(data.aesItemId, aesItemViewUtm);
|
||||
DEBUG_LOG(m_logger) << "insert AtDangerArea AesItemView id: " << aesItemId
|
||||
<< ", type: " << data.aesTypeId();
|
||||
<< ", type: " << data.aesTypeId;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -301,9 +301,9 @@ void HandlerNBC::onAesItemViewChanged(const AreaEffectSimulation::AesItemView &d
|
||||
|
||||
void HandlerNBC::onBCContaminationChanged(const AreaEffectSimulation::BCContamination &data, DataModification modType)
|
||||
{
|
||||
if (!data.isCentral())
|
||||
if (!data.isCentral)
|
||||
{
|
||||
aesItemViewRemoved(data.id());
|
||||
aesItemViewRemoved(data.id);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -313,15 +313,15 @@ void HandlerNBC::onBCContaminationChanged(const AreaEffectSimulation::BCContamin
|
||||
break;
|
||||
case DataModification::eAdded:
|
||||
case DataModification::eModified:
|
||||
switch (data.effectStateId().underlying())
|
||||
switch (data.effectStateId)
|
||||
{
|
||||
case AreaEffectSimulation::AesEffectState::EsActivated:
|
||||
{
|
||||
CentralEffectSimulation::AesItemViewUtm &ref = m_aesItemViews[data.id()];
|
||||
if (m_ddsHandler->volatilityTypeId(data.chargeStruct()) == ProjectDataManagement::VolatilityType::Resident)
|
||||
CentralEffectSimulation::AesItemViewUtm &ref = m_aesItemViews[data.id];
|
||||
if (m_ddsHandler->volatilityTypeId(data.chargeStruct) == ProjectDataManagement::VolatilityType::Resident)
|
||||
{
|
||||
ref.radials = {data.impactRadius()};
|
||||
ref.center = CentralEffectSimulation::geographic2Utm(data.impactPosition(), &ref.zone);
|
||||
ref.radials = {data.impactRadius};
|
||||
ref.center = CentralEffectSimulation::geographic2Utm(data.impactPosition, &ref.zone);
|
||||
}
|
||||
else
|
||||
ref.radials.clear();
|
||||
@@ -337,60 +337,60 @@ void HandlerNBC::onNContaminationChanged(const AreaEffectSimulation::NContaminat
|
||||
{
|
||||
|
||||
DEBUG_LOG(m_logger) << "onNContaminationChanged"
|
||||
<< " id=" << data.id();
|
||||
<< " id=" << data.id;
|
||||
switch (modType)
|
||||
{
|
||||
case DataModification::eRemoved:
|
||||
break;
|
||||
case DataModification::eAdded:
|
||||
case DataModification::eModified:
|
||||
switch (data.effectStateId().underlying())
|
||||
switch (data.effectStateId)
|
||||
{
|
||||
case AreaEffectSimulation::AesEffectState::EsActivated:
|
||||
{
|
||||
CentralEffectSimulation::AesItemViewUtm &ref = m_aesItemViews[data.id()];
|
||||
ref.radials = {data.impactRadius(),
|
||||
data.borderLengthInner(),
|
||||
data.borderLengthInner() + data.borderLengthOuter()
|
||||
CentralEffectSimulation::AesItemViewUtm &ref = m_aesItemViews[data.id];
|
||||
ref.radials = {data.impactRadius,
|
||||
data.borderLengthInner,
|
||||
data.borderLengthInner + data.borderLengthOuter
|
||||
};
|
||||
ref.center = CentralEffectSimulation::geographic2Utm(data.impactPosition(), &ref.zone);
|
||||
ref.center = CentralEffectSimulation::geographic2Utm(data.impactPosition, &ref.zone);
|
||||
const QHash<int, CentralEffectSimulation::HandlerParticipant::CesParticipantData> participantsMap = m_handlerParticipant->positions();
|
||||
for (const CentralEffectSimulation::HandlerParticipant::CesParticipantData &participantPos : participantsMap)
|
||||
{
|
||||
if (m_handlerParticipant->isOutdated(participantPos))
|
||||
continue;
|
||||
DEBUG_LOG(m_logger) << "onNContaminationChanged participantId=" << participantPos.participantId()
|
||||
DEBUG_LOG(m_logger) << "onNContaminationChanged participantId=" << participantPos.participantId
|
||||
<< " insideBuilding=" << participantPos.insideBuilding()
|
||||
<< " buildingId=" << participantPos.buildingId();
|
||||
<< " buildingId=" << participantPos.buildingId;
|
||||
|
||||
const QPointF posUtm = CentralEffectSimulation::geographic2Utm(participantPos.pos(), &ref.zone);
|
||||
const bool isInCircle = inCircle(ref.center, data.impactRadius(), posUtm);
|
||||
const QPointF posUtm = CentralEffectSimulation::geographic2Utm(participantPos.pos, &ref.zone);
|
||||
const bool isInCircle = inCircle(ref.center, data.impactRadius, posUtm);
|
||||
|
||||
const EffectType effectType = CES_NBC::EffectType::NContaminationDetonation;
|
||||
const int ctasEffectType = static_cast<int>(effectType) & 0xffff;
|
||||
DEBUG_LOG(m_logger) << "onNContaminationChanged isInCircle=" << isInCircle
|
||||
<< " aesItemId=" << data.id();
|
||||
<< " aesItemId=" << data.id;
|
||||
if ( isInCircle)
|
||||
{
|
||||
QHash<int, bool> aesIds = m_participantAes.value(participantPos.participantId());
|
||||
aesIds.insert(data.id(), true);
|
||||
QHash<int, bool> aesIds = m_participantAes.value(participantPos.participantId);
|
||||
aesIds.insert(data.id, true);
|
||||
|
||||
m_participantAes.insert( participantPos.participantId(), aesIds);
|
||||
m_participantAes.insert( participantPos.participantId, aesIds);
|
||||
|
||||
QHash<int, QSet<EffectType>> effectTypeStatesFromAesItem = m_effectTypeStates.value(data.id());
|
||||
QHash<int, QSet<EffectType>> effectTypeStatesFromAesItem = m_effectTypeStates.value(data.id);
|
||||
|
||||
|
||||
QSet<EffectType> effectSet = effectTypeStatesFromAesItem.value(participantPos.participantId());
|
||||
QSet<EffectType> effectSet = effectTypeStatesFromAesItem.value(participantPos.participantId);
|
||||
|
||||
effectSet.insert(EffectType::NContaminationDetonation);
|
||||
|
||||
effectTypeStatesFromAesItem.insert(participantPos.participantId(), effectSet);
|
||||
effectTypeStatesFromAesItem.insert(participantPos.participantId, effectSet);
|
||||
|
||||
m_effectTypeStates.insert(data.id(), effectTypeStatesFromAesItem);
|
||||
m_effectTypeStates.insert(data.id, effectTypeStatesFromAesItem);
|
||||
|
||||
|
||||
DEBUG_LOG(m_logger) << "m_participantAes.insert participantId=" << participantPos.participantId()
|
||||
<< " aesId=" << data.id();
|
||||
DEBUG_LOG(m_logger) << "m_participantAes.insert participantId=" << participantPos.participantId
|
||||
<< " aesId=" << data.id;
|
||||
sendCesHitRequest(ref,
|
||||
participantPos,
|
||||
//effectTime >= 0 ? effectTime : participantPosition.sampleTime(),
|
||||
@@ -416,10 +416,10 @@ void HandlerNBC::calculateBcContamination(const CentralEffectSimulation::AesItem
|
||||
{
|
||||
if (m_handlerParticipant->isOutdated(participantPos))
|
||||
continue;
|
||||
DEBUG_LOG(m_logger) << "participantId=" << participantPos.participantId()
|
||||
DEBUG_LOG(m_logger) << "participantId=" << participantPos.participantId
|
||||
<< " insideBuilding=" << participantPos.insideBuilding()
|
||||
<< " buildingId=" << participantPos.buildingId()
|
||||
<< " roomId=" << participantPos.roomId();
|
||||
<< " buildingId=" << participantPos.buildingId
|
||||
<< " roomId=" << participantPos.roomId;
|
||||
inFormCheck(itemView, participantPos);
|
||||
}
|
||||
// for
|
||||
@@ -442,61 +442,61 @@ void HandlerNBC::deleteDangerArea(const int aesItemId)
|
||||
for (const CentralEffectSimulation::HandlerParticipant::CesParticipantData &participantPos : partPosMap)
|
||||
{
|
||||
sendParticipantEvent(aesItemId, participantPos, ProjectDataManagement::PdmEventType::EventType_LeaveDangerArea);
|
||||
DEBUG_LOG(m_logger) << "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(m_logger) << "++++++++ onNewOutdoorParticipantPosition participantId=" << participantData.participantId()
|
||||
<< " buildingId=" << participantData.buildingId()
|
||||
<< " roomId=" << participantData.roomId()
|
||||
<< " reportingSource=" << participantData.reportingSource()
|
||||
DEBUG_LOG(m_logger) << "++++++++ onNewOutdoorParticipantPosition participantId=" << participantData.participantId
|
||||
<< " buildingId=" << participantData.buildingId
|
||||
<< " roomId=" << participantData.roomId
|
||||
<< " reportingSource=" << participantData.reportingSource
|
||||
<< " m_aesItemViews.size=" << m_aesItemViews.size();
|
||||
|
||||
if (m_handlerParticipant->isOutdated(participantData))
|
||||
return;
|
||||
|
||||
if (m_handlerParticipant->getEquipmentNumber(participantData.participantId()) == 0)
|
||||
if (m_handlerParticipant->getEquipmentNumber(participantData.participantId) == 0)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Not handle position: participant has no equipment number";
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_lastRoomId.value(participantData.participantId()) > 0)
|
||||
if (m_lastRoomId.value(participantData.participantId) > 0)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Leave Building m_isInContaminatedRoom.contains participantId=" << participantData.participantId()
|
||||
DEBUG_LOG(m_logger) << "Leave Building m_isInContaminatedRoom.contains participantId=" << participantData.participantId
|
||||
<< " m_isInContaminatedRoom.\nremove!!!";
|
||||
|
||||
|
||||
AreaEffectSimulation::AesItemView aesItemView;
|
||||
bool aesIsAvailable = m_ddsHandler->dtcAes()->aesItemViewFromEntityId(m_isInContaminatedRoom.value(participantData.participantId()),AreaEffectSimulation::AesType::AtUnknown, aesItemView );
|
||||
bool aesIsAvailable = m_ddsHandler->dtcAes()->aesItemViewFromEntityId(m_isInContaminatedRoom.value(participantData.participantId),AreaEffectSimulation::AesType::AtUnknown, aesItemView );
|
||||
|
||||
if (aesIsAvailable
|
||||
&& (aesItemView.effectStateId() == AreaEffectSimulation::AesEffectState::EsActivated))
|
||||
&& (aesItemView.effectStateId == AreaEffectSimulation::AesEffectState::EsActivated))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Feld ist nicht mehr da. id=" << aesItemView.aesItemId();
|
||||
m_isInContaminatedRoom.remove(participantData.participantId());
|
||||
DEBUG_LOG(m_logger) << "Feld ist nicht mehr da. id=" << aesItemView.aesItemId;
|
||||
m_isInContaminatedRoom.remove(participantData.participantId);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Feld ist nicht mehr da. id=" << aesItemView.aesItemId();
|
||||
sendLeaveEvent(aesItemView.aesItemId(),participantData );
|
||||
DEBUG_LOG(m_logger) << "Feld ist nicht mehr da. id=" << aesItemView.aesItemId;
|
||||
sendLeaveEvent(aesItemView.aesItemId,participantData );
|
||||
}
|
||||
leave = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "m_lastRoomId.contains(" << m_lastRoomId.contains(participantData.participantId())
|
||||
<< " roomId=" << m_lastRoomId.value(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);
|
||||
m_lastRoomId.insert(participantData.participantId, 0);
|
||||
|
||||
|
||||
DEBUG_LOG(m_logger) << "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))
|
||||
{
|
||||
@@ -505,13 +505,13 @@ void HandlerNBC::onNewOutdoorParticipantPosition(const CentralEffectSimulation::
|
||||
if (leave)
|
||||
{
|
||||
QHash<int, QSet<EffectType>> effectTypeHash = m_effectTypeStates.value(itemView.aesItemId);
|
||||
if ( effectTypeHash.contains(participantData.participantId()))
|
||||
if ( effectTypeHash.contains(participantData.participantId))
|
||||
{
|
||||
effectTypeHash.remove(participantData.participantId());
|
||||
effectTypeHash.remove(participantData.participantId);
|
||||
}
|
||||
m_effectTypeStates.insert(itemView.aesItemId, effectTypeHash);
|
||||
}
|
||||
switch (itemView.aesTypeId.underlying())
|
||||
switch (itemView.aesTypeId)
|
||||
{
|
||||
case AreaEffectSimulation::AesType::AtBCContamination:
|
||||
case AreaEffectSimulation::AesType::AtNContamination:
|
||||
@@ -578,14 +578,14 @@ bool HandlerNBC::inBoundingBoxCheck(const CentralEffectSimulation::AesItemViewUt
|
||||
const QRectF boundingBoxImpact(itemView.boundingBoxBottomLeft,
|
||||
itemView.boundingBoxTopRight);
|
||||
|
||||
const QPointF participantPosUtmPoint = CentralEffectSimulation::geographic2Utm(participantData.pos(), itemView.zone);
|
||||
const QPointF participantPosUtmPoint = CentralEffectSimulation::geographic2Utm(participantData.pos, itemView.zone);
|
||||
if (boundingBoxImpact.contains(participantPosUtmPoint))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "inBoundingBoxCheck Paricipant " << participantData.participantId()
|
||||
DEBUG_LOG(m_logger) << "inBoundingBoxCheck Paricipant " << participantData.participantId
|
||||
<< " inside AesItemView:" << itemView.aesItemId;
|
||||
return true;
|
||||
}
|
||||
TRACE_LOG(m_logger) << "inBoundingBoxCheck Paricipant " << participantData.participantId()
|
||||
TRACE_LOG(m_logger) << "inBoundingBoxCheck Paricipant " << participantData.participantId
|
||||
<< " outside AesItemView:" << itemView.aesItemId;
|
||||
return false;
|
||||
}
|
||||
@@ -597,14 +597,14 @@ void HandlerNBC::sendEnterEvent(const int aesItemId, const AreaEffectSimulation:
|
||||
m_ddsHandler->dtcAes()->aesItemViewFromEntityId(aesItemId,AreaEffectSimulation::AesType::AtUnknown, aesItemView );
|
||||
|
||||
|
||||
DEBUG_LOG(m_logger) << "sendEnterEvent, paricipantId: " << participantData.participantId()
|
||||
DEBUG_LOG(m_logger) << "sendEnterEvent, paricipantId: " << participantData.participantId
|
||||
<< ", aesItemId: " << aesItemId
|
||||
<< ", aesType=" << aesTypeId
|
||||
<< ", isIndoor=" << isIndoor;
|
||||
|
||||
QHash<int, bool> aesIds = m_participantAes.value(participantData.participantId());
|
||||
QHash<int, bool> aesIds = m_participantAes.value(participantData.participantId);
|
||||
aesIds.insert(aesItemId, true);
|
||||
m_participantAes.insert(participantData.participantId(), aesIds);
|
||||
m_participantAes.insert(participantData.participantId, aesIds);
|
||||
int zone = -1;
|
||||
|
||||
if ( m_aesItemViews.contains(aesItemId))
|
||||
@@ -614,8 +614,8 @@ void HandlerNBC::sendEnterEvent(const int aesItemId, const AreaEffectSimulation:
|
||||
ERROR_LOG(m_logger) << "No m_aesItemViews.contains aesItemId=" << aesItemId;
|
||||
}
|
||||
|
||||
const QPointF participantPosUtmPoint = CentralEffectSimulation::geographic2Utm(participantData.pos(), zone);
|
||||
switch (aesTypeId.underlying())
|
||||
const QPointF participantPosUtmPoint = CentralEffectSimulation::geographic2Utm(participantData.pos, zone);
|
||||
switch (aesTypeId)
|
||||
{
|
||||
case AreaEffectSimulation::AesType::AtBCContamination:
|
||||
{
|
||||
@@ -632,7 +632,7 @@ void HandlerNBC::sendEnterEvent(const int aesItemId, const AreaEffectSimulation:
|
||||
break;
|
||||
case AreaEffectSimulation::AesType::AtNContamination:
|
||||
sendParticipantEvent(aesItemId, participantData, ProjectDataManagement::PdmEventType::EventType_EnterNuclear);
|
||||
sendEffectTypeEvent(aesItemId, participantData, effectTypeForNContaminationArea(m_aesItemViews.value(aesItemId), participantPosUtmPoint, participantData.sampleTime(), participantData.insideBuilding()));
|
||||
sendEffectTypeEvent(aesItemId, participantData, effectTypeForNContaminationArea(m_aesItemViews.value(aesItemId), participantPosUtmPoint, participantData.sampleTime, participantData.insideBuilding()));
|
||||
break;
|
||||
case AreaEffectSimulation::AesType::AtExplosionArea:
|
||||
case AreaEffectSimulation::AesType::AtFunctionalArea:
|
||||
@@ -651,11 +651,11 @@ void HandlerNBC::sendLeaveEvent(const int aesItemId, const CentralEffectSimulati
|
||||
|
||||
DEBUG_LOG(m_logger) << "sendLeaveEvent"
|
||||
<< " aesId=" << aesItemId
|
||||
<< " participantId=" << participantData.participantId()
|
||||
<< " aesTypeId=" << aesItemView.aesTypeId();
|
||||
<< " participantId=" << participantData.participantId
|
||||
<< " aesTypeId=" << aesItemView.aesTypeId;
|
||||
|
||||
|
||||
switch (aesItemView.aesTypeId().underlying())
|
||||
switch (aesItemView.aesTypeId)
|
||||
{
|
||||
case AreaEffectSimulation::AesType::AtBCContamination:
|
||||
sendEffectTypeEvent(aesItemId, participantData, EffectType::BCContaminationLeave);
|
||||
@@ -687,9 +687,9 @@ bool HandlerNBC::inFormCheck(const CentralEffectSimulation::AesItemViewUtm &item
|
||||
|
||||
const QRectF boundingBoxImpact(itemView.boundingBoxBottomLeft,
|
||||
itemView.boundingBoxTopRight);
|
||||
const QPointF participantPosUtmPoint = CentralEffectSimulation::geographic2Utm(participantData.pos(), itemView.zone);
|
||||
const QString participantPosMgrs = CentralEffectSimulation::geographic2mgrs(participantData.pos(), itemView.zone);
|
||||
TRACE_LOG(m_logger) << "inFormCheck start, paricipantId: " << participantData.participantId()
|
||||
const QPointF participantPosUtmPoint = CentralEffectSimulation::geographic2Utm(participantData.pos, itemView.zone);
|
||||
const QString participantPosMgrs = CentralEffectSimulation::geographic2mgrs(participantData.pos, itemView.zone);
|
||||
TRACE_LOG(m_logger) << "inFormCheck start, paricipantId: " << participantData.participantId
|
||||
<< ", aesItemId: " << itemView.aesItemId
|
||||
<< ", aesTypeId: " << itemView.aesTypeId
|
||||
<< ", form.size: " << itemView.form.size()
|
||||
@@ -699,30 +699,30 @@ bool HandlerNBC::inFormCheck(const CentralEffectSimulation::AesItemViewUtm &item
|
||||
if (boundingBoxImpact.contains(participantPosUtmPoint) &&
|
||||
itemView.form.containsPoint(participantPosUtmPoint, Qt::FillRule::OddEvenFill))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Participant id=" << participantData.participantId()
|
||||
DEBUG_LOG(m_logger) << "Participant id=" << participantData.participantId
|
||||
<< " inside Area"
|
||||
<< " inside Building:" << participantData.insideBuilding()
|
||||
<< " roomId=" << participantData.roomId();
|
||||
if ( participantData.roomId() > 0 )
|
||||
<< " roomId=" << participantData.roomId;
|
||||
if ( participantData.roomId > 0 )
|
||||
{
|
||||
|
||||
InfrastructureManagement::StructureElement structureElement;
|
||||
bool roomFound = m_ddsHandler->dtcIsm()->getStructureElementById(participantData.roomId(), structureElement);
|
||||
bool roomFound = m_ddsHandler->dtcIsm()->getStructureElementById(participantData.roomId, structureElement);
|
||||
|
||||
DEBUG_LOG (m_logger) << "Participant id=" << participantData.participantId()
|
||||
<< " pos.z=" << participantData.pos().z()
|
||||
DEBUG_LOG (m_logger) << "Participant id=" << participantData.participantId
|
||||
<< " pos.z=" << participantData.pos.z
|
||||
<< " upperOffset =" << itemView.upperOffset
|
||||
<< " lowerOffset=" << itemView.lowerOffset
|
||||
<< " roomFound=" << roomFound
|
||||
<< " offsetZ=" << structureElement.relPosition().offsetZ();
|
||||
<< " offsetZ=" << structureElement.relPosition.offsetZ;
|
||||
|
||||
if ( (itemView.aesTypeId.underlying() != AreaEffectSimulation::AesType::AtNContamination)
|
||||
if ( (itemView.aesTypeId != AreaEffectSimulation::AesType::AtNContamination)
|
||||
&& itemView.offsetIsSet
|
||||
&& ( ( structureElement.relPosition().offsetZ() + 1.5 > itemView.upperOffset )
|
||||
|| ( structureElement.relPosition().offsetZ() + 1.5 < itemView.lowerOffset)))
|
||||
&& ( ( structureElement.relPosition.offsetZ + 1.5 > itemView.upperOffset )
|
||||
|| ( structureElement.relPosition.offsetZ + 1.5 < itemView.lowerOffset)))
|
||||
{
|
||||
DEBUG_LOG (m_logger) << "Participant id=" << participantData.participantId()
|
||||
<< " pos.z=" << participantData.pos().z()
|
||||
DEBUG_LOG (m_logger) << "Participant id=" << participantData.participantId
|
||||
<< " pos.z=" << participantData.pos.z
|
||||
<< " not between upperOffset =" << itemView.upperOffset
|
||||
<< " and lowerOffset=" << itemView.lowerOffset
|
||||
<< "\nreturn false";
|
||||
@@ -763,15 +763,15 @@ void HandlerNBC::sendCesHitRequest(const CentralEffectSimulation::AesItemViewUtm
|
||||
DEBUG_LOG(m_logger) << "sendCesHitRequest Settings::calculateCentralAes="
|
||||
<< " insideWlsArea=" << std::boolalpha << participantData.insideWlsArea()
|
||||
<< " isSmartChargeType=" << std::boolalpha << m_ddsHandler->isSmartChargeType(itemView.chargeStruct)
|
||||
<< " participantId=" << participantData.participantId();
|
||||
<< " participantId=" << participantData.participantId;
|
||||
|
||||
const int equipNo = m_ddsHandler->participantId2EquipNo(participantData.participantId());
|
||||
DEBUG_LOG(m_logger) << " ftc sendCESHit to Participant participantId = " << participantData.participantId()
|
||||
const int equipNo = m_ddsHandler->participantId2EquipNo(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)
|
||||
if (participantData.participantId != 0 && equipNo <= 0)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "participantPosition.participantId != 0 && equipNo <= 0" ;
|
||||
return;
|
||||
@@ -779,17 +779,17 @@ void HandlerNBC::sendCesHitRequest(const CentralEffectSimulation::AesItemViewUtm
|
||||
|
||||
int32_t originatorParticipantId = m_aesItemId2partIdMap.value(itemView.aesItemId, 0);
|
||||
|
||||
const TrainingAreaBase::TabPosition pos(participantData.pos(),
|
||||
const TrainingAreaBase::TabPosition pos(participantData.pos,
|
||||
Core::PositionReportingSource::Gps, // irrelevant
|
||||
participantData.buildingId(),
|
||||
participantData.roomId());
|
||||
participantData.buildingId,
|
||||
participantData.roomId);
|
||||
const int originatorEquipNo = m_ddsHandler->participantId2EquipNo(originatorParticipantId);
|
||||
|
||||
const ProjectDataManagement::PdmEventType eventType = ProjectDataManagement::PdmEventType::EventType_Unknown;
|
||||
TrainingAreaBase::SendCesHitRequest requestTab(
|
||||
equipNo, // equipmentNumber
|
||||
participantData.participantId(), // participantId
|
||||
itemView.chargeStruct.chargeTypeId(), // chargeTypeId
|
||||
participantData.participantId, // participantId
|
||||
itemView.chargeStruct.chargeTypeId, // chargeTypeId
|
||||
itemView.aesItemId, // aesId
|
||||
originatorEquipNo, // originatorEquipmentNumber
|
||||
remaining, // remainEffectPercent ( no protection outside Building )
|
||||
@@ -799,8 +799,8 @@ void HandlerNBC::sendCesHitRequest(const CentralEffectSimulation::AesItemViewUtm
|
||||
itemView.partyId, // originPartyId
|
||||
mineFieldBitIndex
|
||||
);
|
||||
DEBUG_LOG(m_logger) << " participantId=" << participantData.participantId()
|
||||
<< " chargeTypeId=" << itemView.chargeStruct.chargeTypeId();
|
||||
DEBUG_LOG(m_logger) << " participantId=" << participantData.participantId
|
||||
<< " chargeTypeId=" << itemView.chargeStruct.chargeTypeId;
|
||||
|
||||
|
||||
m_sendCesHitRequestQueue.enqueue(requestTab);
|
||||
@@ -826,23 +826,23 @@ void HandlerNBC::sendCesHitRequest(const int aesItemId,
|
||||
|
||||
int32_t legacyChargeTypeId = 0;
|
||||
int32_t partyId = 0;
|
||||
if ( aesItem.partyId.is_set())
|
||||
if ( aesItem.partyId.has_value())
|
||||
partyId = aesItem.partyId.get();
|
||||
legacyChargeTypeId = m_ddsHandler->getLegacyIdFromChargeTypeId(aesItem.chargeStruct());
|
||||
legacyChargeTypeId = m_ddsHandler->getLegacyIdFromChargeTypeId(aesItem.chargeStruct);
|
||||
DEBUG_LOG(m_logger) << "sendCesHitRequest Settings::calculateCentralAes="
|
||||
<< " insideWlsArea=" << std::boolalpha << participantData.insideWlsArea()
|
||||
<< " isSmartChargeType=" << std::boolalpha << m_ddsHandler->isSmartChargeType(aesItem.chargeStruct())
|
||||
<< " participantId=" << participantData.participantId()
|
||||
<< " isSmartChargeType=" << std::boolalpha << m_ddsHandler->isSmartChargeType(aesItem.chargeStruct)
|
||||
<< " participantId=" << participantData.participantId
|
||||
<< " partyId=" << partyId
|
||||
<< " effectType=" << static_cast<int>(effectType)
|
||||
<< " remaining=" << remaining;
|
||||
|
||||
const int equipmentNumber = m_ddsHandler->participantId2EquipNo(participantData.participantId());
|
||||
DEBUG_LOG(m_logger) << " ftc sendCESHit to Participant participantId = " << participantData.participantId()
|
||||
const int equipmentNumber = m_ddsHandler->participantId2EquipNo(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)
|
||||
if (participantData.participantId != 0 && equipmentNumber <= 0)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "participantPosition.participantId != 0 && equipNo <= 0" ;
|
||||
return;
|
||||
@@ -852,7 +852,7 @@ void HandlerNBC::sendCesHitRequest(const int aesItemId,
|
||||
else if (effectType == CES_NBC::EffectType::NContaminationEnterArea1)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "NContaminationEnterArea1";
|
||||
if (participantData.buildingId() > 0)
|
||||
if (participantData.buildingId > 0)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "NContaminationEnterArea1 Protection by buildings"
|
||||
<< " remaining vorher=" << remaining
|
||||
@@ -879,15 +879,15 @@ void HandlerNBC::sendCesHitRequest(const int aesItemId,
|
||||
int32_t originatorParticipantId = m_aesItemId2partIdMap.value(aesItemId, 0);
|
||||
const int originatorEquipmentNumber = m_ddsHandler->participantId2EquipNo(originatorParticipantId);
|
||||
const TrainingAreaBase::TabPosition pos(
|
||||
participantData.pos(), Core::PositionReportingSource::Gps, participantData.buildingId(),
|
||||
participantData.roomId()
|
||||
participantData.pos, Core::PositionReportingSource::Gps, participantData.buildingId,
|
||||
participantData.roomId
|
||||
);
|
||||
const ProjectDataManagement::PdmEventType eventType = ProjectDataManagement::PdmEventType::EventType_Unknown;
|
||||
TrainingAreaBase::SendCesHitRequest requestTab(
|
||||
equipmentNumber, participantData.participantId(), legacyChargeTypeId, aesItemId, originatorEquipmentNumber,
|
||||
equipmentNumber, participantData.participantId, legacyChargeTypeId, aesItemId, originatorEquipmentNumber,
|
||||
remaining, pos, effectTime, eventType, partyId, mineFieldBitIndex
|
||||
);
|
||||
DEBUG_LOG(m_logger) << " participantId=" << participantData.participantId() << " chargeTypeId=" << aesItem.chargeStruct().chargeTypeId()
|
||||
DEBUG_LOG(m_logger) << " participantId=" << participantData.participantId << " chargeTypeId=" << aesItem.chargeStruct.chargeTypeId
|
||||
<< " legacyChargeTypeId=" << legacyChargeTypeId;
|
||||
|
||||
m_sendCesHitRequestQueue.enqueue(requestTab);
|
||||
@@ -902,7 +902,7 @@ void HandlerNBC::sendParticipantEvent(const int aesItemId,
|
||||
const CentralEffectSimulation::HandlerParticipant::CesParticipantData &participantData,
|
||||
const ProjectDataManagement::PdmEventType eventType)
|
||||
{
|
||||
ParticipantManagement::TypeClass typeClass = m_handlerParticipant->typeClassFromTypeId(participantData.participantTypeId());
|
||||
ParticipantManagement::TypeClass typeClass = m_handlerParticipant->typeClassFromTypeId(participantData.participantTypeId);
|
||||
// can happen since the positions are collected for all participants (no check if it is a SupportEntity or similar)
|
||||
if (typeClass == ParticipantManagement::TypeClass::Unit ||
|
||||
typeClass == ParticipantManagement::TypeClass::SupportUnit ||
|
||||
@@ -911,21 +911,21 @@ void HandlerNBC::sendParticipantEvent(const int aesItemId,
|
||||
typeClass == ParticipantManagement::TypeClass::Vessel ||
|
||||
typeClass == ParticipantManagement::TypeClass::Unknown)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Participant with id " << participantData.participantId()
|
||||
DEBUG_LOG(m_logger) << "Participant with id " << participantData.participantId
|
||||
<< " has invalid typeClass: " << typeClass
|
||||
<< " eventType: " << eventType;
|
||||
return;
|
||||
}
|
||||
|
||||
if (!eventMustBeSend(aesItemId, participantData.participantId(), eventType))
|
||||
if (!eventMustBeSend(aesItemId, participantData.participantId, eventType))
|
||||
{
|
||||
if ( m_isInContaminatedRoom.contains(participantData.participantId()) && participantData.roomId() == 0) // Tln leaves Building
|
||||
if ( m_isInContaminatedRoom.contains(participantData.participantId) && participantData.roomId == 0) // Tln leaves Building
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Sending Event because Participant leaves Building";
|
||||
}
|
||||
else
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "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,56 +939,56 @@ void HandlerNBC::sendParticipantEvent(const int aesItemId,
|
||||
|| eventType == ProjectDataManagement::PdmEventType::EventType_HitMine
|
||||
|| eventType == ProjectDataManagement::PdmEventType::EventType_HitN)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "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());
|
||||
int equipmentNumber = m_ddsHandler->participantId2EquipNo(participantData.participantId);
|
||||
if (equipmentNumber <= 0)
|
||||
{
|
||||
WARNING_LOG(m_logger) << "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(m_logger) << "sendParticipantEvent" << eventType
|
||||
<< " participantId=" << participantData.participantId()
|
||||
<< " participantId=" << participantData.participantId
|
||||
<< " AesItemId=" << aesItemId;
|
||||
|
||||
CentralEffectSimulation::ParticipantEvent pe;
|
||||
pe.id(m_ddsHandler->getParticipantEventId());
|
||||
pe.id = m_ddsHandler->getParticipantEventId();
|
||||
|
||||
pe.eventTypeId(eventType.underlying());
|
||||
pe.participantId(participantData.participantId());
|
||||
pe.eventTime(participantData.sampleTime());
|
||||
pe.aesItemId(aesItemId);
|
||||
pe.partyId(participantData.partyId());
|
||||
pe.eventTypeId = eventType;
|
||||
pe.participantId = participantData.participantId;
|
||||
pe.eventTime = participantData.sampleTime;
|
||||
pe.aesItemId = aesItemId;
|
||||
pe.partyId = participantData.partyId;
|
||||
|
||||
if (eventType == ProjectDataManagement::PdmEventType::EventType_BCContamination)
|
||||
{
|
||||
const AreaEffectSimulation::BCContamination &bc = m_ddsHandler->dtcAes()->bCContamination(aesItemId);
|
||||
pe.aesName(bc.name());
|
||||
pe.aesName = bc.name;
|
||||
}
|
||||
else if (eventType == ProjectDataManagement::PdmEventType::EventType_DangerArea)
|
||||
{
|
||||
const AreaEffectSimulation::DangerArea &da = m_ddsHandler->dtcAes()->dangerArea(aesItemId);
|
||||
pe.aesName(da.name());
|
||||
pe.aesName = da.name;
|
||||
}
|
||||
else if (eventType == ProjectDataManagement::PdmEventType::EventType_NContamination)
|
||||
{
|
||||
const AreaEffectSimulation::NContamination &nc = m_ddsHandler->dtcAes()->nContamination(aesItemId);
|
||||
pe.aesName(nc.name());
|
||||
pe.aesName = nc.name;
|
||||
}
|
||||
|
||||
pe.equipmentNumber(equipmentNumber);
|
||||
pe.vulnerability(participantData.vulnerabilityState.underlying());
|
||||
pe.position(participantData.pos());
|
||||
pe.equipmentNumber = equipmentNumber;
|
||||
pe.vulnerability = static_cast<int>(participantData.vulnerabilityState);
|
||||
pe.position = participantData.pos;
|
||||
|
||||
AreaEffectSimulation::AesItem aesItem;
|
||||
m_ddsHandler->dtcAes()->aesItemFromId(aesItemId, aesItem);
|
||||
|
||||
// Criterion for friendly Fire:
|
||||
if (aesItem.partyId() != -1
|
||||
if (aesItem.partyId != -1
|
||||
&& ((eventType == ProjectDataManagement::PdmEventType::EventType_EnterMineArea
|
||||
|| eventType == ProjectDataManagement::PdmEventType::EventType_EnterNuclear
|
||||
|| eventType == ProjectDataManagement::PdmEventType::EventType_HitB
|
||||
@@ -997,17 +997,17 @@ void HandlerNBC::sendParticipantEvent(const int aesItemId,
|
||||
|| eventType == ProjectDataManagement::PdmEventType::EventType_HitEffectSimulation
|
||||
|| eventType == ProjectDataManagement::PdmEventType::EventType_HitMine
|
||||
|| eventType == ProjectDataManagement::PdmEventType::EventType_HitN)
|
||||
&& aesItem.partyId() == participantData.partyId()))
|
||||
pe.friendlyFire(true);
|
||||
&& aesItem.partyId == participantData.partyId))
|
||||
pe.friendlyFire = true;
|
||||
else
|
||||
pe.friendlyFire(false);
|
||||
pe.friendlyFire = false;
|
||||
|
||||
INFO_LOG(m_logger) << "sendParticipantEvent: " << pe
|
||||
<< ", currentMSecsSinceEpoch = " << QDateTime::currentMSecsSinceEpoch()
|
||||
<< ", time difference = " << QDateTime::currentMSecsSinceEpoch() - pe.eventTime();
|
||||
<< ", time difference = " << QDateTime::currentMSecsSinceEpoch() - pe.eventTime;
|
||||
m_ddsHandler->dtsCes()->publish(pe);
|
||||
|
||||
const auto id = pe.id();
|
||||
const auto id = pe.id;
|
||||
QTimer::singleShot(1 * 60 * 1000, this, [id, this]() { m_ddsHandler->dtsCes()->removeParticipantEventByKey(id); });
|
||||
}
|
||||
|
||||
@@ -1019,18 +1019,18 @@ void HandlerNBC::sendEffectTypeEvent(const int aesItemId,
|
||||
int mineFieldBitIndex = 0;
|
||||
|
||||
if (!effectTypeMustBeSend(aesItemId,
|
||||
participantData.participantId(),
|
||||
participantData.participantId,
|
||||
effectType))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Not sending EffectType event " << toString(effectType)
|
||||
<< ", participant: " << participantData.participantId()
|
||||
<< ", participant: " << participantData.participantId
|
||||
<< ", aesItemId: " << aesItemId
|
||||
<< " - already sent";
|
||||
return;
|
||||
}
|
||||
const int ctasEffectType = static_cast<int>(effectType) & 0xffff;
|
||||
DEBUG_LOG(m_logger) << "Sending EffectType event " << toString(effectType)
|
||||
<< ", participant: " << participantData.participantId()
|
||||
<< ", participant: " << participantData.participantId
|
||||
<< ", aesItemId: " << aesItemId
|
||||
<< ", ctasEffectType: " << ctasEffectType;
|
||||
sendCesHitRequest(aesItemId,
|
||||
@@ -1059,7 +1059,7 @@ bool HandlerNBC::eventMustBeSend(int aesItemId,
|
||||
activeEvents.insert(eventType);
|
||||
|
||||
// - remove opposite events (e.g remove Enter event when we leave the area)
|
||||
switch (eventType.underlying())
|
||||
switch (eventType)
|
||||
{
|
||||
case ProjectDataManagement::PdmEventType::EventType_EnterDangerArea:
|
||||
activeEvents.remove(ProjectDataManagement::PdmEventType::EventType_LeaveDangerArea);
|
||||
@@ -1199,7 +1199,7 @@ bool HandlerNBC::inCircle(const QPointF ¢erUtm, const double radius, const Q
|
||||
|
||||
ProjectDataManagement::PdmEventType HandlerNBC::leaveEventTypeForAesType(AreaEffectSimulation::AesType aesTypeId)
|
||||
{
|
||||
switch (aesTypeId.underlying())
|
||||
switch (aesTypeId)
|
||||
{
|
||||
case AreaEffectSimulation::AesType::AtDangerArea:
|
||||
return ProjectDataManagement::PdmEventType::EventType_LeaveDangerArea;
|
||||
@@ -1215,7 +1215,7 @@ ProjectDataManagement::PdmEventType HandlerNBC::leaveEventTypeForAesType(AreaEff
|
||||
|
||||
EffectType HandlerNBC::leaveEffectTypeForAesType(AreaEffectSimulation::AesType aesTypeId)
|
||||
{
|
||||
switch (aesTypeId.underlying())
|
||||
switch (aesTypeId)
|
||||
{
|
||||
case AreaEffectSimulation::AesType::AtBCContamination:
|
||||
return EffectType::BCContaminationLeave;
|
||||
@@ -1233,7 +1233,7 @@ EffectType HandlerNBC::effectTypeForNContaminationArea(const CentralEffectSimula
|
||||
const bool isIndoor)
|
||||
{
|
||||
const AreaEffectSimulation::NContamination &nc = m_ddsHandler->dtcAes()->nContamination(itemView.aesItemId);
|
||||
auto utm = LtsCoordTrans::UtmCoordinate::fromGeographic(nc.impactPosition().lon(), nc.impactPosition().lat(), itemView.zone);
|
||||
auto utm = LtsCoordTrans::UtmCoordinate::fromGeographic(nc.impactPosition.lon, nc.impactPosition.lat, itemView.zone);
|
||||
QPointF impactPositionUtm = QPointF(utm.x, utm.y);
|
||||
DEBUG_LOG(m_logger) << "HandlerNBC::effectTypeForNContaminationArea itemView.radials.size()=" << itemView.radials.size();
|
||||
if (itemView.radials.size() != 3)
|
||||
@@ -1298,7 +1298,7 @@ EffectType HandlerNBC::effectTypeForBCContaminationArea(const CentralEffectSimul
|
||||
return EffectType::BCContaminationEnterFloating;
|
||||
// use real start point for non floating!
|
||||
const auto &bcItem = m_ddsHandler->dtcAes()->bCContamination(itemView.aesItemId);
|
||||
const auto utmImpcat = CentralEffectSimulation::geographic2Utm(bcItem.impactPosition(), itemView.zone);
|
||||
const auto utmImpcat = CentralEffectSimulation::geographic2Utm(bcItem.impactPosition, itemView.zone);
|
||||
const double squareDist = CentralEffectSimulation::getSquareDistance(utmImpcat, participantPosUtmPoint);
|
||||
if (squareDist <= pow(itemView.radials.at(0), 2))
|
||||
{
|
||||
@@ -1361,19 +1361,19 @@ int HandlerNBC::getContaminationFromBuildingRoom(const int buildingId, const int
|
||||
<< " roomId=" << roomId;
|
||||
|
||||
Buildings::BuildingState buildingState = m_ddsHandler->dtcBld()->buildingState(buildingId);
|
||||
if (buildingState.contaminationStates().size() == 0 )
|
||||
if (buildingState.contaminationStates.size() == 0 )
|
||||
return 0;
|
||||
|
||||
|
||||
if (buildingState.contaminationStates().size() == 0)
|
||||
if (buildingState.contaminationStates.size() == 0)
|
||||
return 0;
|
||||
|
||||
for (unsigned int i = 0; i < buildingState.contaminationStates().size(); i++)
|
||||
for (unsigned int i = 0; i < buildingState.contaminationStates.size(); i++)
|
||||
{
|
||||
for (unsigned int j = 0; j < buildingState.contaminationStates()[i].rooms().size(); j++)
|
||||
for (unsigned int j = 0; j < buildingState.contaminationStates[i].rooms.size(); j++)
|
||||
{
|
||||
if (buildingState.contaminationStates()[i].rooms()[j] == roomId)
|
||||
return buildingState.contaminationStates()[i].aesId();
|
||||
if (buildingState.contaminationStates[i].rooms[j] == roomId)
|
||||
return buildingState.contaminationStates[i].aesId;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
@@ -1386,9 +1386,9 @@ void HandlerNBC::onBuildingStateChanged(const Buildings::BuildingState &data, Da
|
||||
return;
|
||||
}
|
||||
|
||||
DEBUG_LOG(m_logger) << "Got BuildingState originatorParticipantId=" << data.originatorParticipantId()
|
||||
<< ", aesId = " << data.aesId()
|
||||
<< ", data.contaminationStates().size()=" << data.contaminationStates().size();
|
||||
DEBUG_LOG(m_logger) << "Got BuildingState originatorParticipantId=" << data.originatorParticipantId
|
||||
<< ", aesId = " << data.aesId
|
||||
<< ", data.contaminationStates().size()=" << data.contaminationStates.size();
|
||||
// Check each participant
|
||||
const QHash<int, CentralEffectSimulation::HandlerParticipant::CesParticipantData> participantsMap = m_handlerParticipant->positions();
|
||||
|
||||
@@ -1397,14 +1397,14 @@ void HandlerNBC::onBuildingStateChanged(const Buildings::BuildingState &data, Da
|
||||
if (m_handlerParticipant->isOutdated(participantPos))
|
||||
continue;
|
||||
|
||||
if (participantPos.buildingId() == 0)
|
||||
if (participantPos.buildingId == 0)
|
||||
continue;
|
||||
|
||||
int aesId = getContaminationFromBuildingRoom(participantPos.buildingId(), participantPos.roomId());
|
||||
int aesId = getContaminationFromBuildingRoom(participantPos.buildingId, participantPos.roomId);
|
||||
const CentralEffectSimulation::AesItemViewUtm itemView = m_aesItemViews.value(aesId);
|
||||
QHash<int, bool> aesIds = m_participantAes.value(participantPos.participantId());
|
||||
QHash<int, bool> aesIds = m_participantAes.value(participantPos.participantId);
|
||||
aesIds.insert(aesId, true);
|
||||
m_participantAes.insert(participantPos.participantId(), aesIds);
|
||||
m_participantAes.insert(participantPos.participantId, aesIds);
|
||||
onNewIndoorParticipantPosition(participantPos);
|
||||
}
|
||||
|
||||
@@ -1413,26 +1413,26 @@ void HandlerNBC::onBuildingStateChanged(const Buildings::BuildingState &data, Da
|
||||
void HandlerNBC::onNewIndoorParticipantPosition(const CentralEffectSimulation::HandlerParticipant::CesParticipantData &participantData)
|
||||
{
|
||||
bool enterBuilding = false;
|
||||
if ( m_lastRoomId.value(participantData.participantId()) == 0)
|
||||
if ( m_lastRoomId.value(participantData.participantId) == 0)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "m_lastRoomId Enter Building m_isInContaminatedRoom.contains participantId=" << participantData.participantId()
|
||||
<< " roomId=" << participantData.roomId()
|
||||
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());
|
||||
m_lastRoomId.insert(participantData.participantId(), participantData.roomId());
|
||||
m_isInContaminatedRoom.remove(participantData.participantId);
|
||||
m_lastRoomId.insert(participantData.participantId, participantData.roomId);
|
||||
enterBuilding = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "m_lastRoomId.contains(" << m_lastRoomId.contains(participantData.participantId())
|
||||
<< " roomId=" << m_lastRoomId.value(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(m_logger) << "++++++++ onNewIndoorParticipantPosition participantId=" << participantData.participantId()
|
||||
<< " buildingId=" << participantData.buildingId()
|
||||
<< " roomId=" << participantData.roomId()
|
||||
<< " reportingSource=" << participantData.reportingSource()
|
||||
int aesId = getContaminationFromBuildingRoom(participantData.buildingId, participantData.roomId);
|
||||
DEBUG_LOG(m_logger) << "++++++++ onNewIndoorParticipantPosition participantId=" << participantData.participantId
|
||||
<< " buildingId=" << participantData.buildingId
|
||||
<< " roomId=" << participantData.roomId
|
||||
<< " reportingSource=" << participantData.reportingSource
|
||||
<< " Raum ist Kontaminiert: aesId=" << aesId;
|
||||
if ( aesId == 0)
|
||||
{
|
||||
@@ -1444,9 +1444,9 @@ void HandlerNBC::onNewIndoorParticipantPosition(const CentralEffectSimulation::H
|
||||
if (enterBuilding)
|
||||
{
|
||||
QHash<int, QSet<EffectType>> effectTypeHash = m_effectTypeStates.value(aesId);
|
||||
if ( effectTypeHash.contains(participantData.participantId()))
|
||||
if ( effectTypeHash.contains(participantData.participantId))
|
||||
{
|
||||
effectTypeHash.remove(participantData.participantId());
|
||||
effectTypeHash.remove(participantData.participantId);
|
||||
}
|
||||
m_effectTypeStates.insert(aesId, effectTypeHash);
|
||||
}
|
||||
@@ -1456,9 +1456,9 @@ void HandlerNBC::onNewIndoorParticipantPosition(const CentralEffectSimulation::H
|
||||
|
||||
if (aesId > 0 && !m_aesItemViews.contains(aesId))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "m_isInContaminatedRoom insert participantId=" << participantData.participantId()
|
||||
DEBUG_LOG(m_logger) << "m_isInContaminatedRoom insert participantId=" << participantData.participantId
|
||||
<< " aesId=" << aesId;
|
||||
m_isInContaminatedRoom.insert(participantData.participantId(), aesId);
|
||||
m_isInContaminatedRoom.insert(participantData.participantId, aesId);
|
||||
}
|
||||
|
||||
if (aesId > 0)
|
||||
@@ -1466,16 +1466,16 @@ void HandlerNBC::onNewIndoorParticipantPosition(const CentralEffectSimulation::H
|
||||
AreaEffectSimulation::AesItemView aesItemView;
|
||||
m_ddsHandler->dtcAes()->aesItemViewFromEntityId(aesId,AreaEffectSimulation::AesType::AtUnknown, aesItemView );
|
||||
|
||||
AreaEffectSimulation::AesType aesTypeId = aesItemView.aesTypeId();
|
||||
AreaEffectSimulation::AesType aesTypeId = aesItemView.aesTypeId;
|
||||
|
||||
DEBUG_LOG(m_logger) << "onNewIndoorParticipantPosition sendEnterEvent aesTypeId=" << aesTypeId;
|
||||
sendEnterEvent(aesId,aesTypeId, participantData, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (m_participantAes.contains(participantData.participantId()))
|
||||
if (m_participantAes.contains(participantData.participantId))
|
||||
{
|
||||
QHash<int, bool> aesIds = m_participantAes.value(participantData.participantId());
|
||||
QHash<int, bool> aesIds = m_participantAes.value(participantData.participantId);
|
||||
// leave aesArea
|
||||
QHashIterator<int, bool> i(aesIds);
|
||||
while (i.hasNext())
|
||||
|
||||
Reference in new issue
Block a user