Adds immediate migration results in progress
This commit is contained in:
2102 files changed
+17482
-15071
No files matched your search
+7
-7
@@ -91,14 +91,14 @@ bool BuildingModel::init(
|
||||
)
|
||||
{
|
||||
m_buildingId = buildingId;
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START, m_buildingId=" << m_buildingId;
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START, m_buildingId=" << m_buildingId;
|
||||
|
||||
m_angle = mse.angle() * M_PI / 180.;
|
||||
m_refPosGeo = mse.geoPosition();
|
||||
m_refPosUtm = LtsCoordTrans::UtmCoordinate::fromGeographic(mse.geoPosition().lon(), mse.geoPosition().lat());
|
||||
m_refPos = {m_refPosUtm.x, m_refPosUtm.y, m_refPosGeo.z()};
|
||||
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " START, m_buildingId=" << m_buildingId
|
||||
DEBUG_LOG(m_logger) << Q_FUNC_INFO << " START, m_buildingId=" << m_buildingId
|
||||
<< ", m_angle=" << m_angle
|
||||
<< ", m_refPosGeo=" << m_refPosGeo
|
||||
<< ", m_refPos=" << m_refPos;
|
||||
@@ -108,7 +108,7 @@ bool BuildingModel::init(
|
||||
m_footprint << QPointF(footprintElement.relPosition().offsetX(), footprintElement.relPosition().offsetY());
|
||||
if (m_footprint.isEmpty())
|
||||
{
|
||||
ERROR_LOG() << "Error reading MainFootprint for building " << m_buildingId;
|
||||
ERROR_LOG(m_logger) << "Error reading MainFootprint for building " << m_buildingId;
|
||||
return false;
|
||||
} // if
|
||||
m_boundingRect = m_footprint.boundingRect();
|
||||
@@ -117,7 +117,7 @@ bool BuildingModel::init(
|
||||
// QByteArray array = qUncompress(QByteArray::fromRawData(reinterpret_cast<const char*>(&data[0]), data.size()));
|
||||
if (!BuildingControlUnit::VWM::XmlReader::readBuilding(vmd, *this))
|
||||
{
|
||||
ERROR_LOG() << "Error reading VulnerabilityModelData for building " << m_buildingId;
|
||||
ERROR_LOG(m_logger) << "Error reading VulnerabilityModelData for building " << m_buildingId;
|
||||
return false;
|
||||
} // if
|
||||
|
||||
@@ -130,7 +130,7 @@ bool BuildingModel::init(
|
||||
if (point.z() > m_height)
|
||||
m_height = point.z();
|
||||
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END, m_buildingId=" << m_buildingId;
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END, m_buildingId=" << m_buildingId;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -141,7 +141,7 @@ bool BuildingModel::init(
|
||||
|
||||
bool BuildingModel::hasIntersectionSimplified(const LtsUtils::QPoint3D &start, const LtsUtils::QPoint3D &end) const
|
||||
{
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " m_buildingId=" << m_buildingId
|
||||
DEBUG_LOG(m_logger) << Q_FUNC_INFO << " m_buildingId=" << m_buildingId
|
||||
<< ", start=" << start << ", end=" << end;
|
||||
|
||||
// keep origin of QRect (topLeft) in mind:
|
||||
@@ -230,7 +230,7 @@ bool BuildingModel::hasIntersection(const LtsUtils::QPoint3D &start, const LtsUt
|
||||
|
||||
bool bHasIntersection = BuildingControlUnit::VWM::Math::hasIntersection(start, end, rooms());
|
||||
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " m_buildingId=" << m_buildingId
|
||||
DEBUG_LOG(m_logger) << Q_FUNC_INFO << " m_buildingId=" << m_buildingId
|
||||
<< ", start=" << start << ", end=" << end
|
||||
<< ", rooms().size()" << rooms().size()
|
||||
<< ", bHasIntersection=" << bHasIntersection;
|
||||
|
||||
+80
-80
@@ -91,7 +91,7 @@ bool HandlerAesData::init()
|
||||
|
||||
void HandlerAesData::onBoobyTrapChanged(const AreaEffectSimulation::BoobyTrap &data, DataModification modType)
|
||||
{
|
||||
DEBUG_LOG() << "onBoobyTrapChanged"
|
||||
DEBUG_LOG(m_logger) << "onBoobyTrapChanged"
|
||||
<< " id=" << data.id()
|
||||
<< " impactPosition=" << data.impactPosition()
|
||||
<< " impactRadius=" << data.impactRadius()
|
||||
@@ -105,7 +105,7 @@ void HandlerAesData::onBoobyTrapChanged(const AreaEffectSimulation::BoobyTrap &d
|
||||
if (!data.triggered())
|
||||
return;
|
||||
|
||||
INFO_LOG() << "HandlerParticipantBoobyTrap::onBoobyTrapChanged"
|
||||
INFO_LOG(m_logger) << "HandlerParticipantBoobyTrap::onBoobyTrapChanged"
|
||||
<< " data.id=" << data.id()
|
||||
<< " effectStateId=" << data.effectStateId();
|
||||
|
||||
@@ -114,7 +114,7 @@ void HandlerAesData::onBoobyTrapChanged(const AreaEffectSimulation::BoobyTrap &d
|
||||
|
||||
if ((m_ddsHandler->currentPartitionTime() - (data.effectStart().get() + data.effectDuration())) > 2000)
|
||||
{
|
||||
INFO_LOG() << "onBoobyTrap outdated";
|
||||
INFO_LOG(m_logger) << "onBoobyTrap outdated";
|
||||
return;
|
||||
}
|
||||
AreaEffectSimulation::AesItemView itemView;
|
||||
@@ -131,16 +131,16 @@ void HandlerAesData::onBoobyTrapChanged(const AreaEffectSimulation::BoobyTrap &d
|
||||
|
||||
void HandlerAesData::onAesItemViewChanged(const AreaEffectSimulation::AesItemView &data, DataModification modType)
|
||||
{
|
||||
DEBUG_LOG() << "onAesItemViewChanged"
|
||||
DEBUG_LOG(m_logger) << "onAesItemViewChanged"
|
||||
<< " data.aesTypeId()=" << data.aesTypeId();
|
||||
if (modType != DataModification::eAdded &&
|
||||
modType != DataModification::eModified)
|
||||
return;
|
||||
|
||||
DEBUG_LOG() << "Got AesItemView: " << data.effectStateId();
|
||||
DEBUG_LOG(m_logger) << "Got AesItemView: " << data.effectStateId();
|
||||
if (data.effectStateId() == AreaEffectSimulation::AesEffectState::EsExpired)
|
||||
{
|
||||
INFO_LOG() << "AesEffectState_def::EsExpired"
|
||||
INFO_LOG(m_logger) << "AesEffectState_def::EsExpired"
|
||||
<< " currentPartitionTime=" << m_ddsHandler->currentPartitionTime()
|
||||
<< " effectStart=" << data.effectStart()
|
||||
<< " diff = " << m_ddsHandler->currentPartitionTime() - data.effectStart() ;
|
||||
@@ -153,61 +153,61 @@ void HandlerAesData::onAesItemViewChanged(const AreaEffectSimulation::AesItemVie
|
||||
|
||||
if (data.aesTypeId() == AreaEffectSimulation::AesType_def::AtOffRouteMineSecondary)
|
||||
{
|
||||
DEBUG_LOG() << "AtOffRouteMineSecondary id=" << data.id() / 1000;
|
||||
DEBUG_LOG(m_logger) << "AtOffRouteMineSecondary id=" << data.id() / 1000;
|
||||
auto offRouteMine = m_ddsHandler->dtcAes()->offRouteMine((int)(data.id() / 1000));
|
||||
if (!offRouteMine.effectStart().is_set())
|
||||
{
|
||||
DEBUG_LOG() << "!offRouteMine.effectStart().is_set()";
|
||||
DEBUG_LOG(m_logger) << "!offRouteMine.effectStart().is_set()";
|
||||
return;
|
||||
}
|
||||
DEBUG_LOG() << " currentPartitionTime=" << m_ddsHandler->currentPartitionTime()
|
||||
DEBUG_LOG(m_logger) << " currentPartitionTime=" << m_ddsHandler->currentPartitionTime()
|
||||
<< " effectStart=" << offRouteMine.effectStart()
|
||||
<< " effectDuration=" << offRouteMine.effectDuration()
|
||||
<< " diff = " << m_ddsHandler->currentPartitionTime() - (offRouteMine.effectStart().get() + offRouteMine.effectDuration()) ;
|
||||
|
||||
if ((m_ddsHandler->currentPartitionTime() - (offRouteMine.effectStart().get() + offRouteMine.effectDuration())) < 2000)
|
||||
{
|
||||
DEBUG_LOG() << "AtBoobyTrapSecondary Mine wird ausgeloeset.";
|
||||
DEBUG_LOG(m_logger) << "AtBoobyTrapSecondary Mine wird ausgeloeset.";
|
||||
checkBuildingsHit(data);
|
||||
}
|
||||
else
|
||||
{
|
||||
DEBUG_LOG() << "outdated return";
|
||||
DEBUG_LOG(m_logger) << "outdated return";
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (data.aesTypeId() == AreaEffectSimulation::AesType_def::AtBoobyTrapSecondary)
|
||||
{
|
||||
DEBUG_LOG() << "AtBoobyTrapSecondary id=" << data.id() / 1000;
|
||||
DEBUG_LOG(m_logger) << "AtBoobyTrapSecondary id=" << data.id() / 1000;
|
||||
//auto offRouteMine = m_ddsHandler->dtcAes()->offRouteMine((int) (data.id() / 1000));
|
||||
auto boobyTrap = m_ddsHandler->dtcAes()->boobyTrap((int)(data.id() / 1000));
|
||||
if (!boobyTrap.effectStart().is_set())
|
||||
{
|
||||
DEBUG_LOG() << "!offRouteMine.effectStart().is_set()";
|
||||
DEBUG_LOG(m_logger) << "!offRouteMine.effectStart().is_set()";
|
||||
return;
|
||||
}
|
||||
DEBUG_LOG() << " currentPartitionTime=" << m_ddsHandler->currentPartitionTime()
|
||||
DEBUG_LOG(m_logger) << " currentPartitionTime=" << m_ddsHandler->currentPartitionTime()
|
||||
<< " effectStart=" << boobyTrap.effectStart()
|
||||
<< " effectDuration=" << boobyTrap.effectDuration()
|
||||
<< " diff = " << m_ddsHandler->currentPartitionTime() - (boobyTrap.effectStart().get() + boobyTrap.effectDuration()) ;
|
||||
|
||||
if ((m_ddsHandler->currentPartitionTime() - (boobyTrap.effectStart().get() + boobyTrap.effectDuration())) < 2000)
|
||||
{
|
||||
DEBUG_LOG() << "AtBoobyTrapSecondary Mine wird ausgeloeset.";
|
||||
DEBUG_LOG(m_logger) << "AtBoobyTrapSecondary Mine wird ausgeloeset.";
|
||||
checkBuildingsHit(data);
|
||||
}
|
||||
else
|
||||
{
|
||||
DEBUG_LOG() << "outdated return";
|
||||
DEBUG_LOG(m_logger) << "outdated return";
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
DEBUG_LOG() << "removeStates data";
|
||||
DEBUG_LOG(m_logger) << "removeStates data";
|
||||
removeStates(data);
|
||||
DEBUG_LOG() << "m_aesItemViewsUtm remove id" << data.aesItemId();
|
||||
DEBUG_LOG(m_logger) << "m_aesItemViewsUtm remove id" << data.aesItemId();
|
||||
m_aesItemViewsUtm.remove(data.aesItemId());
|
||||
}
|
||||
}
|
||||
@@ -217,7 +217,7 @@ void HandlerAesData::removeStates(const AreaEffectSimulation::AesItemView &data)
|
||||
{
|
||||
if (data.aesTypeId() != AreaEffectSimulation::AesType_def::AtExplosionArea)
|
||||
return;
|
||||
DEBUG_LOG() << "Remove aesItemId=" << data.aesItemId();
|
||||
DEBUG_LOG(m_logger) << "Remove aesItemId=" << data.aesItemId();
|
||||
// remove State for each building
|
||||
for (CentralEffectSimulation::BitfieldStates &bfs : m_bitfieldStatesBld)
|
||||
bfs.remove(data.aesItemId());
|
||||
@@ -228,7 +228,7 @@ void HandlerAesData::calculateBuildingExplosion(const AreaEffectSimulation::Char
|
||||
const int id)
|
||||
{
|
||||
const double impactRadius = m_ddsHandler->chargeTypeRadius(chargeStruct);
|
||||
DEBUG_LOG() << "Handle ExplosionSingle (EsActivated)"
|
||||
DEBUG_LOG(m_logger) << "Handle ExplosionSingle (EsActivated)"
|
||||
<< ", m_handlerBuildingData.getFootprints().size =" << m_handlerBuildingData->getFootprints().size();
|
||||
|
||||
QHash<int, CentralEffectSimulation::HandlerBuildingData::Footprint> footprints = m_handlerBuildingData->getFootprints();
|
||||
@@ -241,7 +241,7 @@ void HandlerAesData::calculateBuildingExplosion(const AreaEffectSimulation::Char
|
||||
const Core::GeoPosition2D impactPosition2D(impactPosition.lon(), impactPosition.lat());
|
||||
if (inFootprint(impactPosition, footprint, impactRadius))
|
||||
{
|
||||
DEBUG_LOG() << "ftc sendCESHitOnBuilding mseId = " << footprint.mseId
|
||||
DEBUG_LOG(m_logger) << "ftc sendCESHitOnBuilding mseId = " << footprint.mseId
|
||||
<< " chargeTypeId = " << chargeStruct.chargeTypeId()
|
||||
<< " id = " << id
|
||||
<< " currentPartitionTime = " << m_ddsHandler->currentPartitionTime()
|
||||
@@ -260,9 +260,9 @@ void HandlerAesData::calculateBuildingExplosion(const AreaEffectSimulation::Char
|
||||
m_ddsHandler->ftcBld()->sendCesHitOnBuildingRequest(requestBld, this);
|
||||
}
|
||||
else
|
||||
DEBUG_LOG() << "Not sendCESHitOnBuilding mseId = " << footprint.mseId;
|
||||
DEBUG_LOG(m_logger) << "Not sendCESHitOnBuilding mseId = " << footprint.mseId;
|
||||
|
||||
DEBUG_LOG() << "boundingBoxImpact.contains(footprint)";
|
||||
DEBUG_LOG(m_logger) << "boundingBoxImpact.contains(footprint)";
|
||||
|
||||
} // for
|
||||
|
||||
@@ -275,7 +275,7 @@ void HandlerAesData::startTimer(int id, int msec) {
|
||||
// Timeout-Slot mit echtem SLOT
|
||||
connect(timer, &QTimer::timeout, this, &HandlerAesData::onStartTimeReached);
|
||||
timer->start(msec);
|
||||
DEBUG_LOG() << "Timer " << id << " gestartet fuer " << msec << " ms.";
|
||||
DEBUG_LOG(m_logger) << "Timer " << id << " gestartet fuer " << msec << " ms.";
|
||||
}
|
||||
|
||||
void HandlerAesData::onStartTimeReached()
|
||||
@@ -288,7 +288,7 @@ void HandlerAesData::onStartTimeReached()
|
||||
if (!bOk)
|
||||
return;
|
||||
|
||||
DEBUG_LOG() << "Timer " << chargeEffectId << " ausgeloest!";
|
||||
DEBUG_LOG(m_logger) << "Timer " << chargeEffectId << " ausgeloest!";
|
||||
|
||||
// Timer stoppen und loeschen
|
||||
AreaEffectSimulation::ChargeEffect data = m_chargeEffects.value(chargeEffectId);
|
||||
@@ -300,12 +300,12 @@ void HandlerAesData::onStartTimeReached()
|
||||
|
||||
void HandlerAesData::onChargeEffectChanged(const AreaEffectSimulation::ChargeEffect &data, DataModification modType)
|
||||
{
|
||||
DEBUG_LOG() << "HandlerExplosions::onChargeEffectChanged";
|
||||
DEBUG_LOG(m_logger) << "HandlerExplosions::onChargeEffectChanged";
|
||||
if (modType == DataModification::eRemoved)
|
||||
return;
|
||||
const long long effectStart = data.effectStart();
|
||||
|
||||
DEBUG_LOG() << "HandlerExplosions::onChargeEffectChanged"
|
||||
DEBUG_LOG(m_logger) << "HandlerExplosions::onChargeEffectChanged"
|
||||
<< ", effectStart=" << effectStart
|
||||
<< ", currentPartitionTime=" << m_ddsHandler->currentPartitionTime();
|
||||
|
||||
@@ -313,14 +313,14 @@ void HandlerAesData::onChargeEffectChanged(const AreaEffectSimulation::ChargeEff
|
||||
// Startzeit in der Vergangenheit: aktuelle Zeit - 3 Sekunden
|
||||
if ( effectStart < m_ddsHandler->currentPartitionTime() - TIMEDIFFVALID )
|
||||
{
|
||||
DEBUG_LOG() << "Startzeit in der Vergangenheit: aktuelle Zeit - 3 Sekunden";
|
||||
DEBUG_LOG(m_logger) << "Startzeit in der Vergangenheit: aktuelle Zeit - 3 Sekunden";
|
||||
return;
|
||||
}
|
||||
// Startzeit entspricht der aktuellen Zeit
|
||||
if ( effectStart > m_ddsHandler->currentPartitionTime() - TIMEDIFFVALID
|
||||
&& effectStart < m_ddsHandler->currentPartitionTime() + data.effectDuration() )
|
||||
{
|
||||
DEBUG_LOG() << "Startzeit entspricht der aktuellen Zeit";
|
||||
DEBUG_LOG(m_logger) << "Startzeit entspricht der aktuellen Zeit";
|
||||
AreaEffectSimulation::ChargeStruct chargeStruct;
|
||||
chargeStruct.chargeTypeId(data.chargeTypeId());
|
||||
chargeStruct.igniterTypeId(data.igniterTypeId());
|
||||
@@ -330,13 +330,13 @@ void HandlerAesData::onChargeEffectChanged(const AreaEffectSimulation::ChargeEff
|
||||
else if (effectStart > m_ddsHandler->currentPartitionTime() + data.effectDuration())
|
||||
{
|
||||
// Start mit Timer
|
||||
DEBUG_LOG() << "Startzeit in der Zukunft"
|
||||
DEBUG_LOG(m_logger) << "Startzeit in der Zukunft"
|
||||
<< ", id :" << data.id()
|
||||
<< ", duration=" << effectStart - m_ddsHandler->currentPartitionTime();
|
||||
m_chargeEffects.insert(data.id(), data);
|
||||
startTimer(data.id(), effectStart - m_ddsHandler->currentPartitionTime());
|
||||
}
|
||||
DEBUG_LOG() << "END onChargeEffectChanged";
|
||||
DEBUG_LOG(m_logger) << "END onChargeEffectChanged";
|
||||
|
||||
}
|
||||
|
||||
@@ -352,7 +352,7 @@ void HandlerAesData::onExplosionSingleChanged(const AreaEffectSimulation::Explos
|
||||
|
||||
if (data.effectStateId() == AreaEffectSimulation::AesEffectState_def::EsRemoved)
|
||||
{
|
||||
DEBUG_LOG() << "Remove SingleExplosion";
|
||||
DEBUG_LOG(m_logger) << "Remove SingleExplosion";
|
||||
m_explosionSingleState.remove(data.id());
|
||||
return;
|
||||
}
|
||||
@@ -361,12 +361,12 @@ void HandlerAesData::onExplosionSingleChanged(const AreaEffectSimulation::Explos
|
||||
m_explosionSingleState.value(data.id()) == AreaEffectSimulation::AesEffectState_def::EsFired) &&
|
||||
data.effectStateId() == AreaEffectSimulation::AesEffectState_def::EsActivated)
|
||||
{
|
||||
DEBUG_LOG() << "Handle SingleExplosion";
|
||||
DEBUG_LOG(m_logger) << "Handle SingleExplosion";
|
||||
handleExplosion = true;
|
||||
}
|
||||
m_explosionSingleState.insert(data.id(), data.effectStateId());
|
||||
|
||||
DEBUG_LOG() << "Got ExplosionSingle";
|
||||
DEBUG_LOG(m_logger) << "Got ExplosionSingle";
|
||||
if (handleExplosion)
|
||||
{
|
||||
calculateBuildingExplosion(data.chargeStruct(), data.impactPosition(), data.id());
|
||||
@@ -375,7 +375,7 @@ void HandlerAesData::onExplosionSingleChanged(const AreaEffectSimulation::Explos
|
||||
|
||||
void HandlerAesData::onAirSupportImpactChanged(const AreaEffectSimulation::AirSupportImpact &data, DataModification modType)
|
||||
{
|
||||
DEBUG_LOG() << "Got onAirSupportImpactChanged()";
|
||||
DEBUG_LOG(m_logger) << "Got onAirSupportImpactChanged()";
|
||||
AreaEffectSimulation::ExplosionSingle esData;
|
||||
esData.id(data.id());
|
||||
esData.chargeStruct().chargeTypeId(data.chargeStruct().chargeTypeId());
|
||||
@@ -390,20 +390,20 @@ void HandlerAesData::onTriggeredImpactsChanged(const AreaEffectSimulation::Trigg
|
||||
modType != DataModification::eModified)
|
||||
return;
|
||||
|
||||
DEBUG_LOG() << "Got TriggeredImpacts";
|
||||
DEBUG_LOG(m_logger) << "Got TriggeredImpacts";
|
||||
preCalculateImpacts(data);
|
||||
}
|
||||
|
||||
void HandlerAesData::onEffectsChanged(const AreaEffectSimulation::Effects &effects, DataModification modType)
|
||||
{
|
||||
TRACE_LOG() << " Got Effects " << effects;
|
||||
TRACE_LOG(m_logger) << " Got Effects " << effects;
|
||||
if (modType == DataModification::eRemoved)
|
||||
return;
|
||||
|
||||
if (effects.aesTypeId().underlying() != AreaEffectSimulation::AesType_def::AtExplosionClusterSingleExplosions)
|
||||
return;
|
||||
|
||||
DEBUG_LOG() << " Got typechecked effects " << effects;
|
||||
DEBUG_LOG(m_logger) << " Got typechecked effects " << effects;
|
||||
|
||||
// calculate for every building of our exercise:
|
||||
const QHash<int, CentralEffectSimulation::HandlerBuildingData::Footprint> &footprints = m_handlerBuildingData->getFootprints();
|
||||
@@ -451,9 +451,9 @@ bool HandlerAesData::inFootprint(const Core::GeoPosition2D &geoPosition,
|
||||
// if (m_logger.isDebugEnabled())
|
||||
// {
|
||||
// const QPointF utmBuilding(CentralEffectSimulation::geographic2Utm(footPrint.geoPosition, footPrint.zone));
|
||||
// DEBUG_LOG() << "Impact (x/y)=" << CentralEffectSimulation::debug(impact - utmBuilding);
|
||||
// DEBUG_LOG(m_logger) << "Impact (x/y)=" << CentralEffectSimulation::debug(impact - utmBuilding);
|
||||
// for (int i = 0; i < footPrint.polyUtm.length(); i++)
|
||||
// DEBUG_LOG() << " poly (x/y)=" << CentralEffectSimulation::debug(footPrint.polyUtm[i] - utmBuilding);
|
||||
// DEBUG_LOG(m_logger) << " poly (x/y)=" << CentralEffectSimulation::debug(footPrint.polyUtm[i] - utmBuilding);
|
||||
// }
|
||||
|
||||
// Check, if hit direct on building
|
||||
@@ -472,7 +472,7 @@ void HandlerAesData::preCalculateImpacts(const AreaEffectSimulation::TriggeredIm
|
||||
{
|
||||
if (data.id() <= 0)
|
||||
return;
|
||||
DEBUG_LOG() << "preCalculateImpacts";
|
||||
DEBUG_LOG(m_logger) << "preCalculateImpacts";
|
||||
// Find AES ItemView and set Bounding-Box of Aes-Field
|
||||
|
||||
const int aesItemId = data.aesItemId();
|
||||
@@ -485,7 +485,7 @@ void HandlerAesData::preCalculateImpacts(const AreaEffectSimulation::TriggeredIm
|
||||
if (!dtcAes->aesItemViewFromEntityId(aesItemId, data.aesTypeId(), aesItemView))
|
||||
{
|
||||
static long msgCnt = 0;
|
||||
WARNING_LOG() << "TriggeredExplosions.aesItemId=" << data.aesItemId() << " No aesItemView available"
|
||||
WARNING_LOG(m_logger) << "TriggeredExplosions.aesItemId=" << data.aesItemId() << " No aesItemView available"
|
||||
<< " (cnt=" << ++msgCnt << ")";
|
||||
return;
|
||||
}
|
||||
@@ -504,39 +504,39 @@ void HandlerAesData::preCalculateImpacts(const AreaEffectSimulation::TriggeredIm
|
||||
void HandlerAesData::onSendCesHitOnBuildingReply(const Core::FunctionReplyObject &replyObject)
|
||||
{
|
||||
if (replyObject.error())
|
||||
WARNING_LOG() << "Can not send hit on building to building service: " << replyObject()
|
||||
WARNING_LOG(m_logger) << "Can not send hit on building to building service: " << replyObject()
|
||||
<< ", m_handlerBuildingData.getFootprints().size()" << m_handlerBuildingData->getFootprints().size();
|
||||
else
|
||||
DEBUG_LOG() << "onSendCesHitOnBuildingReply for id " << replyObject.id() << " success\n"
|
||||
DEBUG_LOG(m_logger) << "onSendCesHitOnBuildingReply for id " << replyObject.id() << " success\n"
|
||||
<< " replyObject.str() = " << replyObject.str();
|
||||
}
|
||||
|
||||
void HandlerAesData::onSendCesHit3DonBuildingReply(const Core::FunctionReplyObject &replyObject)
|
||||
{
|
||||
DEBUG_LOG() << "m_handlerBuildingData.getFootprints() size " << m_handlerBuildingData->getFootprints().size();
|
||||
DEBUG_LOG(m_logger) << "m_handlerBuildingData.getFootprints() size " << m_handlerBuildingData->getFootprints().size();
|
||||
|
||||
if (replyObject.error())
|
||||
WARNING_LOG() << "Can not send hit3D on building to building service: " << replyObject()
|
||||
WARNING_LOG(m_logger) << "Can not send hit3D on building to building service: " << replyObject()
|
||||
<< ", m_handlerBuildingData.getFootprints().size()" << m_handlerBuildingData->getFootprints().size();
|
||||
else
|
||||
DEBUG_LOG() << "onSendCesHit3DonBuildingReply for id " << replyObject.id() << " success\n"
|
||||
DEBUG_LOG(m_logger) << "onSendCesHit3DonBuildingReply for id " << replyObject.id() << " success\n"
|
||||
<< " replyObject.str() = " << replyObject.str();
|
||||
}
|
||||
|
||||
void HandlerAesData::onSendCesHitInformationReply(const Core::FunctionReplyObject &reply)
|
||||
{
|
||||
if (reply.error())
|
||||
WARNING_LOG() << "onSendCesHitInformationReply for id " << reply.id() << " failed: " << reply.str();
|
||||
WARNING_LOG(m_logger) << "onSendCesHitInformationReply for id " << reply.id() << " failed: " << reply.str();
|
||||
else
|
||||
DEBUG_LOG() << "onSendCesHitInformationReply for id " << reply.id() << " successful";
|
||||
DEBUG_LOG(m_logger) << "onSendCesHitInformationReply for id " << reply.id() << " successful";
|
||||
}
|
||||
|
||||
void HandlerAesData::onSetBuildingStatesReply(const Core::FunctionReplyObject &reply)
|
||||
{
|
||||
if (reply.error())
|
||||
WARNING_LOG() << "onSetBuildingStatesReply for id " << reply.id() << " failed: " << reply.str();
|
||||
WARNING_LOG(m_logger) << "onSetBuildingStatesReply for id " << reply.id() << " failed: " << reply.str();
|
||||
else
|
||||
DEBUG_LOG() << "onSetBuildingStatesReply for id " << reply.id() << " successful";
|
||||
DEBUG_LOG(m_logger) << "onSetBuildingStatesReply for id " << reply.id() << " successful";
|
||||
}
|
||||
|
||||
// calculate impacts for one building
|
||||
@@ -560,26 +560,26 @@ void HandlerAesData::calculateImpacts(const AreaEffectSimulation::TriggeredImpac
|
||||
{
|
||||
bIsExplosionCluster = true;
|
||||
ignFuncBase = igniterFunctionBaseExplosionCluster(aesItemId); // assume that fuseType does not differ within a single ExplosionArea
|
||||
DEBUG_LOG() << "Calculate, bIsExplosionCluster = " << bIsExplosionCluster
|
||||
DEBUG_LOG(m_logger) << "Calculate, bIsExplosionCluster = " << bIsExplosionCluster
|
||||
<< ", ignFuncBase = " << ignFuncBase;
|
||||
}
|
||||
else if (s_relevantTypes.contains(data.aesTypeId().underlying()))
|
||||
DEBUG_LOG() << "Calculate";
|
||||
DEBUG_LOG(m_logger) << "Calculate";
|
||||
else
|
||||
{
|
||||
DEBUG_LOG() << "No Calculation";
|
||||
DEBUG_LOG(m_logger) << "No Calculation";
|
||||
return;
|
||||
}
|
||||
|
||||
if (aesItemId != aesItemView.aesItemId())
|
||||
{
|
||||
WARNING_LOG() << "mismatch: "
|
||||
WARNING_LOG(m_logger) << "mismatch: "
|
||||
<< ", TriggeredExplosions.aesItemId=" << data.aesItemId()
|
||||
<< ", AesItemView.aesItemId=" << aesItemView.aesItemId();
|
||||
return;
|
||||
}
|
||||
|
||||
DEBUG_LOG() << "calculateImpacts mseId=" << footprint.mseId << " aesItemId " << aesItemId
|
||||
DEBUG_LOG(m_logger) << "calculateImpacts mseId=" << footprint.mseId << " aesItemId " << aesItemId
|
||||
<< ", bIsExplosionCluster = " << bIsExplosionCluster;
|
||||
|
||||
// get position(s) of impact(s):
|
||||
@@ -587,7 +587,7 @@ void HandlerAesData::calculateImpacts(const AreaEffectSimulation::TriggeredImpac
|
||||
CentralEffectSimulation::BitfieldStates &bitfieldStates = m_bitfieldStatesBld[footprint.mseId];
|
||||
QSet<int> &bitfieldState = bitfieldStates[aesItemId];
|
||||
for (int i : std::as_const(bitfieldState))
|
||||
DEBUG_LOG() << "bitfieldState for " << aesItemId << ": " << i;
|
||||
DEBUG_LOG(m_logger) << "bitfieldState for " << aesItemId << ": " << i;
|
||||
|
||||
for (int32_t bitFieldIdx = 0; bitFieldIdx < data.impactCount(); ++bitFieldIdx)
|
||||
{
|
||||
@@ -600,7 +600,7 @@ void HandlerAesData::calculateImpacts(const AreaEffectSimulation::TriggeredImpac
|
||||
continue;
|
||||
|
||||
const Core::GeoPosition &impactPosition = aesItemView.form()[bitFieldIdx];
|
||||
DEBUG_LOG() << Q_FUNC_INFO
|
||||
DEBUG_LOG(m_logger) << Q_FUNC_INFO
|
||||
<< " impactPosition: lat/lon" << impactPosition.lat() << "/" << impactPosition.lon() << " z=" << impactPosition.z()
|
||||
<< " UTM=" << CentralEffectSimulation::debug(CentralEffectSimulation::geographic2Utm(impactPosition));
|
||||
|
||||
@@ -609,13 +609,13 @@ void HandlerAesData::calculateImpacts(const AreaEffectSimulation::TriggeredImpac
|
||||
const double impactRadius = m_ddsHandler->chargeTypeRadius(aesItemView.chargeStruct());
|
||||
if (inFootprint(impactPosition, footprint, impactRadius))
|
||||
{
|
||||
DEBUG_LOG() << "In Footprint of mseId = " << footprint.mseId;
|
||||
DEBUG_LOG(m_logger) << "In Footprint of mseId = " << footprint.mseId;
|
||||
if (!bitfieldState.contains(bitFieldIdx))
|
||||
{
|
||||
DEBUG_LOG() << "m_bitfieldStates.insert(aesItemId=" << aesItemId << ", bitfieldState)" << " bitFieldIdx=" << bitFieldIdx;
|
||||
DEBUG_LOG(m_logger) << "m_bitfieldStates.insert(aesItemId=" << aesItemId << ", bitfieldState)" << " bitFieldIdx=" << bitFieldIdx;
|
||||
bitfieldState.insert(bitFieldIdx);
|
||||
|
||||
DEBUG_LOG() << "sendCesHit mseId = " << footprint.mseId
|
||||
DEBUG_LOG(m_logger) << "sendCesHit mseId = " << footprint.mseId
|
||||
<< ", aesItemId=" << aesItemId
|
||||
<< ", bitFieldIdx= " << bitFieldIdx
|
||||
<< ", ignFuncBase = " << ignFuncBase;
|
||||
@@ -656,7 +656,7 @@ void HandlerAesData::calculateImpacts(const AreaEffectSimulation::TriggeredImpac
|
||||
detonationDistance,
|
||||
QStringLiteral("properties").toStdString());
|
||||
|
||||
DEBUG_LOG() << "sendCesHit3DonBuildingRequest for aesItemId=" << aesItemId
|
||||
DEBUG_LOG(m_logger) << "sendCesHit3DonBuildingRequest for aesItemId=" << aesItemId
|
||||
<< " bitFieldIdx= " << bitFieldIdx
|
||||
<< ", requestBld= " << requestBld;
|
||||
|
||||
@@ -675,7 +675,7 @@ void HandlerAesData::calculateImpacts(const AreaEffectSimulation::TriggeredImpac
|
||||
Core::GeoPosition(impactPosition.lon(), impactPosition.lat(), 0.0),
|
||||
QStringLiteral("properties").toStdString());
|
||||
|
||||
DEBUG_LOG() << "sendCesHitOnBuildingRequest for aesItemId=" << aesItemId
|
||||
DEBUG_LOG(m_logger) << "sendCesHitOnBuildingRequest for aesItemId=" << aesItemId
|
||||
<< " bitFieldIdx= " << bitFieldIdx
|
||||
<< ", impactPosition= " << impactPosition;
|
||||
|
||||
@@ -684,7 +684,7 @@ void HandlerAesData::calculateImpacts(const AreaEffectSimulation::TriggeredImpac
|
||||
|
||||
}
|
||||
else
|
||||
DEBUG_LOG() << "NOT in Footprint of mseId = " << footprint.mseId;
|
||||
DEBUG_LOG(m_logger) << "NOT in Footprint of mseId = " << footprint.mseId;
|
||||
// if (inFootprint(impactPosition
|
||||
} // foreach Impact
|
||||
} // for (int32_t bitFieldId
|
||||
@@ -696,7 +696,7 @@ void HandlerAesData::calculateImpacts(const AreaEffectSimulation::Effects &effec
|
||||
return;
|
||||
|
||||
const int aesItemId = effects.aesItemId();
|
||||
DEBUG_LOG() << "calculateImpacts mseId=" << footprint.mseId << " data.aesItemId() " << aesItemId;
|
||||
DEBUG_LOG(m_logger) << "calculateImpacts mseId=" << footprint.mseId << " data.aesItemId() " << aesItemId;
|
||||
|
||||
const AreaEffectSimulation::ExplosionCluster &ec = m_ddsHandler->dtcAes()->explosionCluster(effects.aesItemId());
|
||||
if (ec.id() != aesItemId)
|
||||
@@ -741,19 +741,19 @@ void HandlerAesData::calculateImpacts(const AreaEffectSimulation::Effects &effec
|
||||
QString mseIdAsStr;
|
||||
for (auto mseId : buildingIdsInBetween)
|
||||
mseIdAsStr += QString(QStringLiteral("_coveredByMseId_%1;")).arg(mseId);
|
||||
DEBUG_LOG() << "findBuildingsBetween returns mseIdAsStr =" << mseIdAsStr;
|
||||
DEBUG_LOG(m_logger) << "findBuildingsBetween returns mseIdAsStr =" << mseIdAsStr;
|
||||
|
||||
|
||||
const ProjectDataManagement::BuildingChargeEffect &bldgChargeEffect = m_ddsHandler->dtcPdm()->getBuildingChargeEffectByChargeTypeId(ec.chargeStruct().chargeTypeId());
|
||||
if (bldgChargeEffect.id() <= 0)
|
||||
ERROR_LOG() << "getBuildingChargeEffectByChargeTypeId failed, chargeTypeId not found: =" << ec.chargeStruct().chargeTypeId();
|
||||
ERROR_LOG(m_logger) << "getBuildingChargeEffectByChargeTypeId failed, chargeTypeId not found: =" << ec.chargeStruct().chargeTypeId();
|
||||
|
||||
|
||||
qint32 destructiveFactor = bldgChargeEffect.destructiveFactor();
|
||||
qint32 penetrationFactor = bldgChargeEffect.penetrationFactor();
|
||||
|
||||
if ((destructiveFactor <= 0) || (penetrationFactor <= 0))
|
||||
WARNING_LOG() << "getBuildingChargeEffectByChargeTypeId failed, destructiveFactor or penetrationFactor invalid"
|
||||
WARNING_LOG(m_logger) << "getBuildingChargeEffectByChargeTypeId failed, destructiveFactor or penetrationFactor invalid"
|
||||
<< ", destructiveFactor = " << destructiveFactor
|
||||
<< ", penetrationFactor = " << penetrationFactor;
|
||||
|
||||
@@ -784,7 +784,7 @@ void HandlerAesData::calculateImpacts(const AreaEffectSimulation::Effects &effec
|
||||
Core::GeoPosition(impactPositionGeo.lon(), impactPositionGeo.lat(), 0.0),
|
||||
properties.toStdString());
|
||||
|
||||
DEBUG_LOG() << "sendCesHitOnBuildingRequest for aesItemId=" << aesItemId
|
||||
DEBUG_LOG(m_logger) << "sendCesHitOnBuildingRequest for aesItemId=" << aesItemId
|
||||
<< " bitFieldIdx= " << indexBitFieldIdx
|
||||
<< ", impactPositionGeo= " << impactPositionGeo
|
||||
<< ", chargeTypeId= " << ec.chargeStruct().chargeTypeId()
|
||||
@@ -831,7 +831,7 @@ void HandlerAesData::calculateImpacts(const AreaEffectSimulation::Effects &effec
|
||||
detonationDistance,
|
||||
properties.toStdString());
|
||||
|
||||
DEBUG_LOG() << "SendCesHit3DonBuildingRequest for aesItemId=" << aesItemId
|
||||
DEBUG_LOG(m_logger) << "SendCesHit3DonBuildingRequest for aesItemId=" << aesItemId
|
||||
<< " bitFieldIdx= " << indexBitFieldIdx
|
||||
<< ", impactPosition= " << impactPositionGeo
|
||||
<< ", zPlacement= " << zPlacement
|
||||
@@ -851,9 +851,9 @@ void HandlerAesData::checkBuildingsHit(const AreaEffectSimulation::AesItemView &
|
||||
const int exerciseId = m_ddsHandler->getExerciseId();
|
||||
QPolygonF polyGeo;
|
||||
|
||||
DEBUG_LOG() << "checkBuildingsHit " << ", aesItemId=" << data.aesItemId();
|
||||
DEBUG_LOG(m_logger) << "checkBuildingsHit " << ", aesItemId=" << data.aesItemId();
|
||||
|
||||
DEBUG_LOG() << "AtBoobyTrapSecondary data.form().size()=" << data.form().size();
|
||||
DEBUG_LOG(m_logger) << "AtBoobyTrapSecondary data.form().size()=" << data.form().size();
|
||||
// BoobyTrap
|
||||
polyGeo.reserve(data.form().size());
|
||||
for (const auto &pointGeo : std::as_const(data.form()))
|
||||
@@ -861,7 +861,7 @@ void HandlerAesData::checkBuildingsHit(const AreaEffectSimulation::AesItemView &
|
||||
QPointF point;
|
||||
point.setX(pointGeo.lon());
|
||||
point.setY(pointGeo.lat());
|
||||
DEBUG_LOG() << "point= " << point.x() << "/" << point.y();
|
||||
DEBUG_LOG(m_logger) << "point= " << point.x() << "/" << point.y();
|
||||
polyGeo.append(point);
|
||||
}
|
||||
|
||||
@@ -869,13 +869,13 @@ void HandlerAesData::checkBuildingsHit(const AreaEffectSimulation::AesItemView &
|
||||
bool isGroundLevel = true;
|
||||
const QVector<int> &buildingIdsInside = m_ddsHandler->dtcIsm()->getBuildingByPolygon(exerciseId, polyGeo, completeEnclosed, isGroundLevel);
|
||||
|
||||
DEBUG_LOG() << "buildingsInside.size=" << buildingIdsInside.size()
|
||||
DEBUG_LOG(m_logger) << "buildingsInside.size=" << buildingIdsInside.size()
|
||||
<< " exerciseId=" << exerciseId;
|
||||
// only include buildings within the radius
|
||||
|
||||
for (const int buildingId : std::as_const(buildingIdsInside))
|
||||
{
|
||||
DEBUG_LOG() << " BuildingId=" << buildingId;
|
||||
DEBUG_LOG(m_logger) << " BuildingId=" << buildingId;
|
||||
Buildings::Building tmpBldg;
|
||||
tmpBldg.buildingId(buildingId);
|
||||
|
||||
@@ -898,7 +898,7 @@ void HandlerAesData::checkBuildingsHit(const AreaEffectSimulation::AesItemView &
|
||||
QPointF pointGeo = impactPosPoint.geographic();
|
||||
impactPosition.lon(pointGeo.x());
|
||||
impactPosition.lat(pointGeo.y());
|
||||
DEBUG_LOG() << "impactPosition lon/lat=" << impactPosition.lon() << "/" << impactPosition.lat()
|
||||
DEBUG_LOG(m_logger) << "impactPosition lon/lat=" << impactPosition.lon() << "/" << impactPosition.lat()
|
||||
<< " impactPosPoint.zone" << impactPosPoint.zone
|
||||
<< " impactPosPoint=" << impactPosPoint.x << "/" << impactPosPoint.y
|
||||
<< " topRight=" << topRight.x << "/" << topRight.y
|
||||
@@ -916,7 +916,7 @@ void HandlerAesData::checkBuildingsHit(const AreaEffectSimulation::AesItemView &
|
||||
QStringLiteral("properties").toStdString());
|
||||
|
||||
|
||||
DEBUG_LOG() << "sendCesHitOnBuildingRequest for aesItemId=" << data.aesItemId()
|
||||
DEBUG_LOG(m_logger) << "sendCesHitOnBuildingRequest for aesItemId=" << data.aesItemId()
|
||||
<< ", impactPosition= " << impactPosition;
|
||||
m_ddsHandler->ftcBld()->sendCesHitOnBuildingRequest(requestBld, this);
|
||||
}
|
||||
@@ -934,7 +934,7 @@ QVector<int> HandlerAesData::findBuildingsBetween(const LtsCoordTrans::LtsCoordi
|
||||
const LtsCoordTrans::LtsCoordinate targetFootprintPos =
|
||||
LtsCoordTrans::LtsCoordinate::fromUtm(targetFootprint.polyUtm.first(), targetFootprint.zone, 0.0);
|
||||
|
||||
DEBUG_LOG() << "findBuildingsBetween" << " START impactPosition " << impactPositionUTM.mgrs()
|
||||
DEBUG_LOG(m_logger) << "findBuildingsBetween" << " START impactPosition " << impactPositionUTM.mgrs()
|
||||
<< ", maybe effected mseId is = " << targetFootprint.mseId
|
||||
<< " with targetFootprintPos = " << targetFootprintPos.utmCoordinate().mgrs();
|
||||
|
||||
@@ -976,14 +976,14 @@ QVector<int> HandlerAesData::findBuildingsBetween(const LtsCoordTrans::LtsCoordi
|
||||
const bool intersects = impactToFootprintLineMetric.intersects(footprintToCheck.polyUtm);
|
||||
#endif
|
||||
|
||||
DEBUG_LOG() << "findBuildingsBetween"
|
||||
DEBUG_LOG(m_logger) << "findBuildingsBetween"
|
||||
<< " to mseId " << footprintToCheck.mseId
|
||||
<< " with curFpTargetPos " << impactPosition.utmCoordinate().mgrs()
|
||||
<< " -> intersects = " << intersects;
|
||||
|
||||
if (intersects)
|
||||
{
|
||||
DEBUG_LOG() << "findBuildingsBetween"
|
||||
DEBUG_LOG(m_logger) << "findBuildingsBetween"
|
||||
<< " regarding impactPosition " << impactPositionUTM.mgrs()
|
||||
<< " and mseId " << targetFootprint.mseId
|
||||
<< " is concealed/covered by footpriont of mseId = " << footprintToCheck.mseId;
|
||||
|
||||
+61
-61
@@ -52,19 +52,19 @@ HandlerBuildingModel::HandlerBuildingModel(
|
||||
, m_aesDataHandler(aesDataHandler)
|
||||
, m_logger(CentralEffectSimulation::getLogger("Plugin.Buildings.HandlerBuildingModel"))
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
HandlerBuildingModel::~HandlerBuildingModel()
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
bool HandlerBuildingModel::init()
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
std::shared_ptr<InfrastructureManagement::Interface::Dtc> dtcIsm = m_ddsHandler->dtcIsm();
|
||||
|
||||
dtcIsm->waitForHistoricalDataMainStructureElement(1000);
|
||||
@@ -77,16 +77,16 @@ bool HandlerBuildingModel::init()
|
||||
onMainStructureElementChanged(data, DataModification::eAdded);
|
||||
});
|
||||
|
||||
INFO_LOG() << "HandlerBuildingModel is running."
|
||||
INFO_LOG(m_logger) << "HandlerBuildingModel is running."
|
||||
<< ", m_buildingModels.size() = " << m_buildingModels.size();
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
return true;
|
||||
}
|
||||
|
||||
HandlerBuildingModelInterface::LineBuildingIntersectionResult HandlerBuildingModel::getLineBuildingIntersection(
|
||||
const std::vector<Core::GeoPosition> &line, const std::string &requestIdOpt)
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
|
||||
CentralEffectSimulation::GetLineBuildingIntersectionRequest newRequest;
|
||||
newRequest.line(line);
|
||||
@@ -105,13 +105,13 @@ HandlerBuildingModelInterface::LineBuildingIntersectionResult HandlerBuildingMod
|
||||
result.errorParams = reply.errorParams();
|
||||
result.intersection = reply.intersection();
|
||||
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
return result;
|
||||
}
|
||||
|
||||
HandlerBuildingModelInterface::LineBuildingIntersectsResult HandlerBuildingModel::getLineBuildingIntersects(const std::vector<Core::GeoPosition> &line, const std::string &requestIdOpt)
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
|
||||
CentralEffectSimulation::GetLineBuildingIntersectionRequest newRequest;
|
||||
newRequest.line(line);
|
||||
@@ -130,7 +130,7 @@ HandlerBuildingModelInterface::LineBuildingIntersectsResult HandlerBuildingModel
|
||||
result.errorParams = reply.errorParams();
|
||||
result.intersects = ! std::isnan(reply.intersection().lat()); // ! std::isnan
|
||||
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -138,7 +138,7 @@ void HandlerBuildingModel::onMainStructureElementChanged(const InfrastructureMan
|
||||
{
|
||||
const int mseBldgId = data.id();
|
||||
|
||||
TRACE_LOG() << "MainStructureElement === " << data;
|
||||
TRACE_LOG(m_logger) << "MainStructureElement === " << data;
|
||||
|
||||
// Always delete m_buildingModels-entry
|
||||
BuildingModel *buildingModelPtr = m_buildingModels.value((mseBldgId));
|
||||
@@ -147,7 +147,7 @@ void HandlerBuildingModel::onMainStructureElementChanged(const InfrastructureMan
|
||||
|
||||
if (modType == DataModification::eRemoved)
|
||||
{
|
||||
DEBUG_LOG() << "Building not added or modified id=" << mseBldgId;
|
||||
DEBUG_LOG(m_logger) << "Building not added or modified id=" << mseBldgId;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -163,7 +163,7 @@ void HandlerBuildingModel::onMainStructureElementChanged(const InfrastructureMan
|
||||
const Core::GeoPosition &geoPos = data.geoPosition();
|
||||
if (qFuzzyIsNull(geoPos.z()))
|
||||
{
|
||||
INFO_LOG() << "BuildingId " << mseBldgId
|
||||
INFO_LOG(m_logger) << "BuildingId " << mseBldgId
|
||||
<< " kann übersprungen werden, da von Hand importiert."
|
||||
<< ", name: '" << data.name() << "'"
|
||||
<< ", name: '" << data.description() << "'";
|
||||
@@ -175,17 +175,17 @@ void HandlerBuildingModel::onMainStructureElementChanged(const InfrastructureMan
|
||||
const int exerciseId = m_ddsHandler->getExerciseId();
|
||||
if (m_ddsHandler->dtcIsm()->isElementAssignedToExercise(data, exerciseId))
|
||||
{
|
||||
DEBUG_LOG() << "BuildingId " << mseBldgId
|
||||
DEBUG_LOG(m_logger) << "BuildingId " << mseBldgId
|
||||
<< ", in Exercise";
|
||||
}
|
||||
else
|
||||
{
|
||||
DEBUG_LOG() << "BuildingId " << mseBldgId
|
||||
DEBUG_LOG(m_logger) << "BuildingId " << mseBldgId
|
||||
<< ", not in Exercise";
|
||||
return;
|
||||
}
|
||||
|
||||
DEBUG_LOG() << "HandlerBuildingData::onMainStructureElementChanged() id=" << mseBldgId
|
||||
DEBUG_LOG(m_logger) << "HandlerBuildingData::onMainStructureElementChanged() id=" << mseBldgId
|
||||
<< " properties=" << data.properties();
|
||||
|
||||
|
||||
@@ -195,7 +195,7 @@ void HandlerBuildingModel::onMainStructureElementChanged(const InfrastructureMan
|
||||
|
||||
// InfrastructureManagement::VulnerabilityModelData vulnerabilityModelDataEle;
|
||||
QByteArray vulnerabilityModelData = m_ddsHandler->dtcIsm()->getVulnerabilityModelData(data.id());
|
||||
TRACE_LOG() << "vulnerabilityModelData=" << vulnerabilityModelData
|
||||
TRACE_LOG(m_logger) << "vulnerabilityModelData=" << vulnerabilityModelData
|
||||
<< " id=" << data.id();
|
||||
|
||||
|
||||
@@ -211,27 +211,27 @@ void HandlerBuildingModel::onMainStructureElementChanged(const InfrastructureMan
|
||||
// } // for
|
||||
// if (id == -1)
|
||||
// {
|
||||
// WARNING_LOG() << "Missing VulnerabilityModelData for building " << mseBldgId << ". Skip building.";
|
||||
// WARNING_LOG(m_logger) << "Missing VulnerabilityModelData for building " << mseBldgId << ". Skip building.";
|
||||
// return;
|
||||
// } // if
|
||||
|
||||
const InfrastructureManagement::MainFootprint &mainFootprint = m_ddsHandler->dtcIsm()->getFootprintsByExerciseId(exerciseId).value(mseBldgId);
|
||||
|
||||
DEBUG_LOG() << "BuildingId " << mseBldgId;
|
||||
DEBUG_LOG(m_logger) << "BuildingId " << mseBldgId;
|
||||
|
||||
BuildingModel *buildingModel = new BuildingModel(this);
|
||||
const InfrastructureManagement::MainStructureElement &mse = data;
|
||||
if (!buildingModel->init(mainFootprint, mse, vulnerabilityModelData, mseBldgId))
|
||||
{
|
||||
WARNING_LOG() << "Initializing BuildingModel failed for building " << mseBldgId << ". Skipping building.";
|
||||
WARNING_LOG(m_logger) << "Initializing BuildingModel failed for building " << mseBldgId << ". Skipping building.";
|
||||
return;
|
||||
}
|
||||
// if
|
||||
|
||||
INFO_LOG() << "Inserting BuildingModel for building " << mseBldgId;
|
||||
INFO_LOG(m_logger) << "Inserting BuildingModel for building " << mseBldgId;
|
||||
m_buildingModels.insert(mseBldgId, buildingModel);
|
||||
|
||||
INFO_LOG() << "onMainStructureElementChanged: "
|
||||
INFO_LOG(m_logger) << "onMainStructureElementChanged: "
|
||||
<< ", m_buildingModels.size() = " << m_buildingModels.size();
|
||||
}
|
||||
|
||||
@@ -245,7 +245,7 @@ void HandlerBuildingModel::onGetLineBuildingIntersectionRequest(const rti::core:
|
||||
const CentralEffectSimulation::GetLineBuildingIntersectionRequest &request)
|
||||
{
|
||||
const int exerciseId = m_ddsHandler->getExerciseId();
|
||||
DEBUG_LOG() << "START onGetLineBuildingIntersectionRequest" << ", exerciseId = " << exerciseId << ", request '" << request.requestId() << "'";
|
||||
DEBUG_LOG(m_logger) << "START onGetLineBuildingIntersectionRequest" << ", exerciseId = " << exerciseId << ", request '" << request.requestId() << "'";
|
||||
|
||||
const bool justForLineOfSight = false;
|
||||
const CentralEffectSimulation::GetLineBuildingIntersectionReply &reply = getLineBuildingIntersectionInternal(request, justForLineOfSight);
|
||||
@@ -253,14 +253,14 @@ void HandlerBuildingModel::onGetLineBuildingIntersectionRequest(const rti::core:
|
||||
// sendReply
|
||||
m_ddsHandler->ftsCes()->getLineBuildingIntersectionReply(cookie, reply);
|
||||
|
||||
DEBUG_LOG() << "END onGetLineBuildingIntersectionRequest, request '" << request.requestId() << "'";
|
||||
DEBUG_LOG(m_logger) << "END onGetLineBuildingIntersectionRequest, request '" << request.requestId() << "'";
|
||||
}
|
||||
|
||||
void HandlerBuildingModel::onGetLineBuildingIntersectsRequest(const rti::core::SampleIdentity &cookie,
|
||||
const CentralEffectSimulation::GetLineBuildingIntersectsRequest &request)
|
||||
{
|
||||
const int exerciseId = m_ddsHandler->getExerciseId();
|
||||
DEBUG_LOG() << "START onGetLineBuildingIntersectsRequest" << ", exerciseId = " << exerciseId << ", request '" << request.requestId() << "'";
|
||||
DEBUG_LOG(m_logger) << "START onGetLineBuildingIntersectsRequest" << ", exerciseId = " << exerciseId << ", request '" << request.requestId() << "'";
|
||||
|
||||
|
||||
CentralEffectSimulation::GetLineBuildingIntersectionRequest newRequest;
|
||||
@@ -280,7 +280,7 @@ void HandlerBuildingModel::onGetLineBuildingIntersectsRequest(const rti::core::S
|
||||
|
||||
m_ddsHandler->ftsCes()->getLineBuildingIntersectsReply(cookie, newReply);
|
||||
|
||||
DEBUG_LOG() << "END onGetLineBuildingIntersectsRequest, request '" << request.requestId() << "'";
|
||||
DEBUG_LOG(m_logger) << "END onGetLineBuildingIntersectsRequest, request '" << request.requestId() << "'";
|
||||
}
|
||||
|
||||
|
||||
@@ -301,7 +301,7 @@ CentralEffectSimulation::GetLineBuildingIntersectionReply HandlerBuildingModel::
|
||||
|
||||
const int exerciseId = m_ddsHandler->getExerciseId();
|
||||
|
||||
DEBUG_LOG() << "START getLineBuildingIntersectionInternal" << ", exerciseId = " << exerciseId << ", request '" << request.requestId() << "'"
|
||||
DEBUG_LOG(m_logger) << "START getLineBuildingIntersectionInternal" << ", exerciseId = " << exerciseId << ", request '" << request.requestId() << "'"
|
||||
<< ", request.line().size() = " << request.line().size();
|
||||
|
||||
CentralEffectSimulation::GetLineBuildingIntersectionReply reply;
|
||||
@@ -315,7 +315,7 @@ CentralEffectSimulation::GetLineBuildingIntersectionReply HandlerBuildingModel::
|
||||
if (polylineRef.size() < 2)
|
||||
{
|
||||
reply.errorString("insufficiant number of points");
|
||||
WARNING_LOG() << "getLineBuildingIntersectionInternal" << ", exerciseId = " << exerciseId << ", request '" << request.requestId() << "'"
|
||||
WARNING_LOG(m_logger) << "getLineBuildingIntersectionInternal" << ", exerciseId = " << exerciseId << ", request '" << request.requestId() << "'"
|
||||
<< ", error: '" << reply.errorString() << "'";
|
||||
return reply;
|
||||
}
|
||||
@@ -332,9 +332,9 @@ CentralEffectSimulation::GetLineBuildingIntersectionReply HandlerBuildingModel::
|
||||
|
||||
if (m_logger.isDebugEnabled())
|
||||
{
|
||||
DEBUG_LOG() << "relevantBuildings.size=" << relevantBuildings.size();
|
||||
DEBUG_LOG(m_logger) << "relevantBuildings.size=" << relevantBuildings.size();
|
||||
for (const int bldgId : std::as_const(relevantBuildings))
|
||||
DEBUG_LOG() << "relevantBuilding: bldgId = " << bldgId;
|
||||
DEBUG_LOG(m_logger) << "relevantBuilding: bldgId = " << bldgId;
|
||||
}
|
||||
|
||||
|
||||
@@ -364,7 +364,7 @@ CentralEffectSimulation::GetLineBuildingIntersectionReply HandlerBuildingModel::
|
||||
const Core::GeoPosition &segStart = polylineRef[lineSegmentIdx];
|
||||
const Core::GeoPosition &segEnd = polylineRef[lineSegmentIdx + 1];
|
||||
|
||||
DEBUG_LOG() << " lineSegmentIdx=" << lineSegmentIdx
|
||||
DEBUG_LOG(m_logger) << " lineSegmentIdx=" << lineSegmentIdx
|
||||
<< ", start=" << segStart
|
||||
<< " , end=" << segEnd;
|
||||
|
||||
@@ -375,11 +375,11 @@ CentralEffectSimulation::GetLineBuildingIntersectionReply HandlerBuildingModel::
|
||||
BuildingModel *buildingModel = m_buildingModels.value(bldgId, nullptr);
|
||||
if (!buildingModel)
|
||||
{
|
||||
WARNING_LOG() << " buildingModel not found, bldgId=" << bldgId;
|
||||
WARNING_LOG(m_logger) << " buildingModel not found, bldgId=" << bldgId;
|
||||
continue;
|
||||
}
|
||||
|
||||
DEBUG_LOG() << " buildingModel->buildingId=" << buildingModel->buildingId()
|
||||
DEBUG_LOG(m_logger) << " buildingModel->buildingId=" << buildingModel->buildingId()
|
||||
<< " , HEIGHT = " << buildingModel-> height();
|
||||
|
||||
|
||||
@@ -391,7 +391,7 @@ CentralEffectSimulation::GetLineBuildingIntersectionReply HandlerBuildingModel::
|
||||
// if buildingState is not found, assume intact:
|
||||
if (/*(buildingState.id() == bldgId) && */(buildingState.damagePercent() >= 80))
|
||||
{
|
||||
WARNING_LOG() << " buildingModel->buildingId=" << buildingModel->buildingId()
|
||||
WARNING_LOG(m_logger) << " buildingModel->buildingId=" << buildingModel->buildingId()
|
||||
<< ", lineSegmentIdx=" << lineSegmentIdx
|
||||
<< ", damagePercent > 80% (" << buildingState.damagePercent() << ")";
|
||||
continue;
|
||||
@@ -436,29 +436,29 @@ CentralEffectSimulation::GetLineBuildingIntersectionReply HandlerBuildingModel::
|
||||
const LtsUtils::QPoint3D &relStart = buildingModel->fromGeographic(segStart); // lift / lift_zValueToIfNegative
|
||||
const LtsUtils::QPoint3D &relEnd = buildingModel->fromGeographic(segEnd); // lift / lift_zValueToIfNegative
|
||||
|
||||
DEBUG_LOG() << " buildingModel->buildingId=" << buildingModel->buildingId()
|
||||
DEBUG_LOG(m_logger) << " buildingModel->buildingId=" << buildingModel->buildingId()
|
||||
<< ", lineSegmentIdx=" << lineSegmentIdx;
|
||||
|
||||
DEBUG_LOG() << " segStart=" << segStart << " relStart=" << relStart;
|
||||
DEBUG_LOG() << " segEnd =" << segEnd << " relEnd=" << relEnd;
|
||||
DEBUG_LOG(m_logger) << " segStart=" << segStart << " relStart=" << relStart;
|
||||
DEBUG_LOG(m_logger) << " segEnd =" << segEnd << " relEnd=" << relEnd;
|
||||
|
||||
if (!buildingModel->hasIntersectionSimplified(relStart, relEnd)) // check height and footprint
|
||||
continue;
|
||||
|
||||
DEBUG_LOG() << " buildingModel->buildingId=" << buildingModel->buildingId()
|
||||
DEBUG_LOG(m_logger) << " buildingModel->buildingId=" << buildingModel->buildingId()
|
||||
<< ", lineSegmentIdx=" << lineSegmentIdx
|
||||
<< ", hasIntersectionSimplified was true";
|
||||
|
||||
const Core::GeoPosition &intersection = buildingModel->intersection(relStart, relEnd); // assume intersection and calculate
|
||||
|
||||
DEBUG_LOG() << " buildingModel->buildingId=" << buildingModel->buildingId()
|
||||
DEBUG_LOG(m_logger) << " buildingModel->buildingId=" << buildingModel->buildingId()
|
||||
<< ", lineSegmentIdx=" << lineSegmentIdx
|
||||
<< ", intersection = " << intersection;
|
||||
|
||||
if (!BuildingModel::isValid(intersection)) // no intersection
|
||||
continue;
|
||||
|
||||
DEBUG_LOG() << " buildingModel->buildingId=" << buildingModel->buildingId()
|
||||
DEBUG_LOG(m_logger) << " buildingModel->buildingId=" << buildingModel->buildingId()
|
||||
<< ", lineSegmentIdx=" << lineSegmentIdx
|
||||
<< ", has valid intersection = " << intersection;
|
||||
if (buildingIdOut)
|
||||
@@ -468,7 +468,7 @@ CentralEffectSimulation::GetLineBuildingIntersectionReply HandlerBuildingModel::
|
||||
if (justForLineOfSight)
|
||||
{
|
||||
reply.intersection(intersection);
|
||||
DEBUG_LOG() << "END getLineBuildingIntersectionInternal, return due to justForLineOfSight " << request.requestId() << "'";
|
||||
DEBUG_LOG(m_logger) << "END getLineBuildingIntersectionInternal, return due to justForLineOfSight " << request.requestId() << "'";
|
||||
return reply;
|
||||
}
|
||||
// : justForLineOfSight
|
||||
@@ -477,9 +477,9 @@ CentralEffectSimulation::GetLineBuildingIntersectionReply HandlerBuildingModel::
|
||||
if (dist < distance) // new intersection is closer than the last one
|
||||
{
|
||||
if (buildingId == -1) // first intersection found
|
||||
DEBUG_LOG() << "Building " << buildingModel->buildingId() << " was hit.";
|
||||
DEBUG_LOG(m_logger) << "Building " << buildingModel->buildingId() << " was hit.";
|
||||
else // this building "covers" the last one found
|
||||
DEBUG_LOG() << "Building " << buildingModel->buildingId() << " was hit prior to building " << buildingId << ".";
|
||||
DEBUG_LOG(m_logger) << "Building " << buildingModel->buildingId() << " was hit prior to building " << buildingId << ".";
|
||||
buildingId = buildingModel->buildingId();
|
||||
distance = dist;
|
||||
reply.intersection(intersection);
|
||||
@@ -491,7 +491,7 @@ CentralEffectSimulation::GetLineBuildingIntersectionReply HandlerBuildingModel::
|
||||
} // for (const int bldgId : std::as_const(relevantBuildings))
|
||||
} // for(lineIt = polylineRef.begin(); lineIt != polylineRef.end()-1; ++lineIt)
|
||||
|
||||
DEBUG_LOG() << "END getLineBuildingIntersectionInternal, request '" << request.requestId() << "'"
|
||||
DEBUG_LOG(m_logger) << "END getLineBuildingIntersectionInternal, request '" << request.requestId() << "'"
|
||||
<< " buildingIdOut=" << *buildingIdOut;
|
||||
|
||||
return reply;
|
||||
@@ -506,10 +506,10 @@ void HandlerBuildingModel::onDetonationLocationRequest(
|
||||
const rti::core::SampleIdentity &cookie, const CentralEffectSimulation::DetonationLocationRequest &request
|
||||
)
|
||||
{
|
||||
DEBUG_LOG() << "Received DetonationLocationRequest for aesId: " << request.id();
|
||||
DEBUG_LOG(m_logger) << "Received DetonationLocationRequest for aesId: " << request.id();
|
||||
const CentralEffectSimulation::DetonationLocationReply reply = handleDetonationLocationRequest(request);
|
||||
if (!reply.errorString().empty())
|
||||
WARNING_LOG() << "DetonationLocationRequest for aesId " << request.id() << " failed: " << reply.errorString();
|
||||
WARNING_LOG(m_logger) << "DetonationLocationRequest for aesId " << request.id() << " failed: " << reply.errorString();
|
||||
// if
|
||||
m_ddsHandler->ftsCes()->detonationLocationReply(cookie, reply);
|
||||
}
|
||||
@@ -517,7 +517,7 @@ void HandlerBuildingModel::onDetonationLocationRequest(
|
||||
CentralEffectSimulation::DetonationLocationReply HandlerBuildingModel::handleDetonationLocationRequest(const CentralEffectSimulation::DetonationLocationRequest &request) const
|
||||
{
|
||||
const int exerciseId = m_ddsHandler->getExerciseId();
|
||||
DEBUG_LOG() << " handleDetonationLocationRequest request=" << request
|
||||
DEBUG_LOG(m_logger) << " handleDetonationLocationRequest request=" << request
|
||||
<< ", m_buildingModels.size() = " << m_buildingModels.size();
|
||||
// AES::
|
||||
// ExplosionCluster most likely has serveral impacts and therefore several trajectories.
|
||||
@@ -542,7 +542,7 @@ CentralEffectSimulation::DetonationLocationReply HandlerBuildingModel::handleDet
|
||||
|
||||
if (reqTrajRef.size() < 2)
|
||||
{
|
||||
ERROR_LOG() << " handleDetonationLocationRequest request.trajectory() invalid, size =" << reqTrajRef.size();
|
||||
ERROR_LOG(m_logger) << " handleDetonationLocationRequest request.trajectory() invalid, size =" << reqTrajRef.size();
|
||||
return reply;
|
||||
}
|
||||
|
||||
@@ -572,17 +572,17 @@ CentralEffectSimulation::DetonationLocationReply HandlerBuildingModel::handleDet
|
||||
const bool bHasBuildingIntersection = BuildingModel::isValid(bldgIntersectionCoord.geoPosition());
|
||||
if (bHasBuildingIntersection)
|
||||
{
|
||||
DEBUG_LOG() << "RESULT: Trajectory: hasBuildingIntersection YES, at: " << bldgIntersectionCoord.mgrs()
|
||||
DEBUG_LOG(m_logger) << "RESULT: Trajectory: hasBuildingIntersection YES, at: " << bldgIntersectionCoord.mgrs()
|
||||
<< " buildingId=" << buildingId;
|
||||
}
|
||||
else
|
||||
{
|
||||
DEBUG_LOG() << "RESULT: Trajectory: hasBuildingIntersection NO";
|
||||
DEBUG_LOG(m_logger) << "RESULT: Trajectory: hasBuildingIntersection NO";
|
||||
|
||||
const bool bIsInTrainingOrCentralArea = true;
|
||||
if (bIsInTrainingOrCentralArea)
|
||||
{
|
||||
DEBUG_LOG() << "RESULT: integrate free area...";
|
||||
DEBUG_LOG(m_logger) << "RESULT: integrate free area...";
|
||||
|
||||
// free area and FuseType_def::IfbDelay:
|
||||
// We can´t move the detonation point _below_ the surface.
|
||||
@@ -610,13 +610,13 @@ CentralEffectSimulation::DetonationLocationReply HandlerBuildingModel::handleDet
|
||||
{
|
||||
if (!bHasBuildingIntersection)
|
||||
{
|
||||
DEBUG_LOG() << "detonationLocation on ground" << detonationLocation.geoPosition()
|
||||
DEBUG_LOG(m_logger) << "detonationLocation on ground" << detonationLocation.geoPosition()
|
||||
<< std::fixed << std::setprecision(3)
|
||||
<< ", heightOverElevation = " << detonationLocation.heightOverElevation();
|
||||
Q_ASSERT_X(std::fabs(detonationLocation.heightOverElevation()) < 1.0, "handleDetonationLocationRequest", "heightOverElevation is to high");
|
||||
}
|
||||
|
||||
DEBUG_LOG() << "Trajectory bAdjusted/bHasBuildingIntersection: " << bHasBuildingIntersection
|
||||
DEBUG_LOG(m_logger) << "Trajectory bAdjusted/bHasBuildingIntersection: " << bHasBuildingIntersection
|
||||
<< ", igniterFunctionBase: " << ignFuncBase
|
||||
<< ", detonationDistance: " << detonationDistance
|
||||
<< ", reqTrajRef.size():" << reqTrajRef.size() << " back: " << reqTrajRef.back()
|
||||
@@ -632,7 +632,7 @@ CentralEffectSimulation::DetonationLocationReply HandlerBuildingModel::handleDet
|
||||
// instead of backtrackTrajectory(), use simply resize and push_back(bldgIntersectionCoord)
|
||||
std::vector<Core::GeoPosition> trajectoryCopy = reqTrajRef;
|
||||
|
||||
DEBUG_LOG() << "validSizeOfOriginalTraj is below zero: " << validSizeOfOriginalTraj << ", exerciseId " << exerciseId << ", buildingId=" << buildingId;
|
||||
DEBUG_LOG(m_logger) << "validSizeOfOriginalTraj is below zero: " << validSizeOfOriginalTraj << ", exerciseId " << exerciseId << ", buildingId=" << buildingId;
|
||||
|
||||
// in case of hasBuildingIntersection
|
||||
if (validSizeOfOriginalTraj > 0)
|
||||
@@ -644,7 +644,7 @@ CentralEffectSimulation::DetonationLocationReply HandlerBuildingModel::handleDet
|
||||
// adjust detonationLocation by taking detonationDistance (!= 0) into account:
|
||||
detonationLocation = LtsCoordTrans::LtsCoordinate(calculateDetonationLocation(trajectoryCopy, detonationDistance));
|
||||
|
||||
DEBUG_LOG() << "Trajectory bAdjusted/bHasBuildingIntersection: " << bHasBuildingIntersection
|
||||
DEBUG_LOG(m_logger) << "Trajectory bAdjusted/bHasBuildingIntersection: " << bHasBuildingIntersection
|
||||
<< ", igniterFunctionBase: " << ignFuncBase
|
||||
<< ", detonationDistance: " << detonationDistance
|
||||
<< ", trajectoryCopy.size()=" << trajectoryCopy.size() << " back: " << trajectoryCopy.back()
|
||||
@@ -661,12 +661,12 @@ CentralEffectSimulation::DetonationLocationReply HandlerBuildingModel::handleDet
|
||||
|
||||
Core::GeoPosition HandlerBuildingModel::calculateDetonationLocation(const std::vector<Core::GeoPosition> &trajectoryGeometry, double detonationDistance) const
|
||||
{
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " START";
|
||||
DEBUG_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
|
||||
const int geometrySize = trajectoryGeometry.size();
|
||||
if (geometrySize < 3)
|
||||
{
|
||||
ERROR_LOG() << Q_FUNC_INFO << ", trajectoryGeometry not sufficiant";
|
||||
ERROR_LOG(m_logger) << Q_FUNC_INFO << ", trajectoryGeometry not sufficiant";
|
||||
return {};
|
||||
}
|
||||
|
||||
@@ -683,7 +683,7 @@ Core::GeoPosition HandlerBuildingModel::calculateDetonationLocation(const std::v
|
||||
|
||||
QVector3D flightVec = segEnd - segStart;
|
||||
|
||||
INFO_LOG() << "flightVec1 "
|
||||
INFO_LOG(m_logger) << "flightVec1 "
|
||||
<< ", utm1 " << utm1 << " , z " << p1.z()
|
||||
<< ", utm2 " << utm2 << " , z " << p2.z()
|
||||
<< ", flightVec " << flightVec;
|
||||
@@ -721,7 +721,7 @@ Core::GeoPosition HandlerBuildingModel::calculateDetonationLocation(const std::v
|
||||
const QPointF &pointDeto = utmDeto.geographic();
|
||||
Core::GeoPosition geoPosDeto(pointDeto.x(), pointDeto.y(), detonationLoc.z());
|
||||
|
||||
DEBUG_LOG() << "flightVec2 "
|
||||
DEBUG_LOG(m_logger) << "flightVec2 "
|
||||
<< ", utm1 " << utm1 << " , z " << p1.z()
|
||||
<< ", utm2 " << utm2 << " , z " << p2.z()
|
||||
<< ", flightVec " << flightVec
|
||||
@@ -774,7 +774,7 @@ Core::GeoPosition HandlerBuildingModel::backtrackTrajectory(const std::vector<Co
|
||||
return startGeo;
|
||||
} // for
|
||||
|
||||
WARNING_LOG() << "Backtracing trajectory for proximity fuse type failed.";
|
||||
WARNING_LOG(m_logger) << "Backtracing trajectory for proximity fuse type failed.";
|
||||
return startGeo;
|
||||
}
|
||||
*/
|
||||
|
||||
+32
-32
@@ -30,7 +30,7 @@ HandlerBuildingOwnership::HandlerBuildingOwnership(const std::shared_ptr<Central
|
||||
, m_db(db)
|
||||
, m_logger(CentralEffectSimulation::getLogger("Plugin.Buildings.HandlerBuildingOwnership"))
|
||||
{
|
||||
INFO_LOG() << "HandlerBuildingOwnership::HandlerBuildingOwnership";
|
||||
INFO_LOG(m_logger) << "HandlerBuildingOwnership::HandlerBuildingOwnership";
|
||||
} // end of ctor()
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
@@ -41,10 +41,10 @@ HandlerBuildingOwnership::~HandlerBuildingOwnership()
|
||||
|
||||
bool HandlerBuildingOwnership::init()
|
||||
{
|
||||
INFO_LOG() << "HandlerBuildingOwnership::init";
|
||||
INFO_LOG(m_logger) << "HandlerBuildingOwnership::init";
|
||||
auto dtcIsm = m_ddsHandler->dtcIsm();
|
||||
|
||||
DEBUG_LOG() << "init";
|
||||
DEBUG_LOG(m_logger) << "init";
|
||||
loadOwnershipsFromDb();
|
||||
|
||||
connect(m_handlerParticipant.get(), &CentralEffectSimulation::HandlerParticipant::newOutdoorPosition,
|
||||
@@ -83,7 +83,7 @@ bool HandlerBuildingOwnership::init()
|
||||
void HandlerBuildingOwnership::onSetOwnershipRequest(const rti::core::SampleIdentity &cookie,
|
||||
const CentralEffectSimulation::SetOwnershipRequest &request)
|
||||
{
|
||||
INFO_LOG() << "onSetOwnershipRequest: " << request;
|
||||
INFO_LOG(m_logger) << "onSetOwnershipRequest: " << request;
|
||||
|
||||
// remove Ownership, if partyId == 0
|
||||
if (request.partyId() == 0)
|
||||
@@ -103,7 +103,7 @@ void HandlerBuildingOwnership::onParticipantPositionChanged(const CentralEffectS
|
||||
{
|
||||
|
||||
const int participantId = partPos.participantId();
|
||||
INFO_LOG() << "BuildingOwnership onParticipantPositionChanged participantId=" << participantId
|
||||
INFO_LOG(m_logger) << "BuildingOwnership onParticipantPositionChanged participantId=" << participantId
|
||||
<< " vulnerabilityState=" << partPos.vulnerabilityState
|
||||
<< " buildingId=" << partPos.buildingId()
|
||||
<< " notfightMode=" << partPos.notfightMode;
|
||||
@@ -121,7 +121,7 @@ void HandlerBuildingOwnership::onParticipantPositionChanged(const CentralEffectS
|
||||
|
||||
int newOwnership = calculateOwnershipByParticipantId(participantId);
|
||||
checkAndSendOwnership(newOwnership, floorId);
|
||||
INFO_LOG() << "END BuildingOwnership onParticipantPositionChanged participantId=" << participantId
|
||||
INFO_LOG(m_logger) << "END BuildingOwnership onParticipantPositionChanged participantId=" << participantId
|
||||
<< " vulnerabilityState=" << partPos.vulnerabilityState;
|
||||
} // end of onParticipantPositionChanged()
|
||||
|
||||
@@ -131,7 +131,7 @@ void HandlerBuildingOwnership::onParticipantPositionChanged(const CentralEffectS
|
||||
// ///////////////////////////////////
|
||||
void HandlerBuildingOwnership::onMainStructureElementChanged(const InfrastructureManagement::MainStructureElement &data, DataModification modType)
|
||||
{
|
||||
INFO_LOG() << "onMainStructureElementChanged id=" << data.id()
|
||||
INFO_LOG(m_logger) << "onMainStructureElementChanged id=" << data.id()
|
||||
<< " modelId =" << data.modelId();
|
||||
if (modType == DataModification::eRemoved || data.modelId() <= 0)
|
||||
{
|
||||
@@ -140,7 +140,7 @@ void HandlerBuildingOwnership::onMainStructureElementChanged(const Infrastructur
|
||||
}
|
||||
|
||||
QJsonArray jsonArray = QJsonDocument::fromJson(QByteArray::fromStdString(data.properties())).object().value(QLatin1String("available_in_exercise")).toArray();
|
||||
DEBUG_LOG() << "available_in_exercise jsonDocument.size()=" << jsonArray.size();
|
||||
DEBUG_LOG(m_logger) << "available_in_exercise jsonDocument.size()=" << jsonArray.size();
|
||||
QVector<int> result;
|
||||
result.reserve(jsonArray.size());
|
||||
|
||||
@@ -154,11 +154,11 @@ void HandlerBuildingOwnership::onMainStructureElementChanged(const Infrastructur
|
||||
|
||||
for (auto it = jsonArray.constBegin(); it != jsonArray.constEnd(); ++it)
|
||||
{
|
||||
DEBUG_LOG() << "available_in_exercise jsonDocument=" << it->toInt();
|
||||
DEBUG_LOG(m_logger) << "available_in_exercise jsonDocument=" << it->toInt();
|
||||
if (m_ddsHandler->getExerciseId() != it->toInt())
|
||||
continue;
|
||||
|
||||
DEBUG_LOG() << "Got MainStructureElement"
|
||||
DEBUG_LOG(m_logger) << "Got MainStructureElement"
|
||||
<< " data.id()=" << data.id()
|
||||
<< " data.modelId=" << data.modelId();
|
||||
if (!m_buildingOwnership.contains(data.id()))
|
||||
@@ -176,7 +176,7 @@ void HandlerBuildingOwnership::onMainStructureElementChanged(const Infrastructur
|
||||
|
||||
void HandlerBuildingOwnership::onParticipantLeavesBuilding(const int participantId)
|
||||
{
|
||||
INFO_LOG() << "BuildingOwnership onParticipantLeavesBuilding participantId=" << participantId;
|
||||
INFO_LOG(m_logger) << "BuildingOwnership onParticipantLeavesBuilding participantId=" << participantId;
|
||||
auto it = m_participantFloor.find(participantId);
|
||||
if (it == m_participantFloor.end())
|
||||
return;
|
||||
@@ -184,26 +184,26 @@ void HandlerBuildingOwnership::onParticipantLeavesBuilding(const int participant
|
||||
|
||||
const int floorId = it.value();
|
||||
const int newOwnership = calculateOwnershipByFloorId(floorId);
|
||||
DEBUG_LOG() << "newOwnership=" << newOwnership;
|
||||
DEBUG_LOG(m_logger) << "newOwnership=" << newOwnership;
|
||||
if (newOwnership > 0)
|
||||
checkAndSendOwnership(newOwnership, floorId);
|
||||
} // end of onParticipantLeavesBuilding()
|
||||
|
||||
int HandlerBuildingOwnership::calculateOwnershipByParticipantId(const int participantId)
|
||||
{
|
||||
INFO_LOG() << "BuildingOwnership calculateOwnershipByParticipantId participantId=" << participantId;
|
||||
INFO_LOG(m_logger) << "BuildingOwnership calculateOwnershipByParticipantId participantId=" << participantId;
|
||||
CentralEffectSimulation::HandlerParticipant::CesParticipantData partPos = m_handlerParticipant->position(participantId);
|
||||
return calculateOwnershipByFloorId(m_handlerBuildingData->getFloorIdFromRoomId(partPos.roomId()));
|
||||
}
|
||||
|
||||
int HandlerBuildingOwnership::calculateOwnershipByFloorId(const int floorId)
|
||||
{
|
||||
INFO_LOG() << "BuildingOwnership calculateOwnershipByFloorId floorId=" << floorId;
|
||||
INFO_LOG(m_logger) << "BuildingOwnership calculateOwnershipByFloorId floorId=" << floorId;
|
||||
int ownership = -1;
|
||||
if (floorId == -1)
|
||||
return ownership;
|
||||
|
||||
DEBUG_LOG() << "calculateOwnership floorId = " << floorId;
|
||||
DEBUG_LOG(m_logger) << "calculateOwnership floorId = " << floorId;
|
||||
|
||||
QHash <int, int> partyCount; // key = Party, value= Count of Participants;
|
||||
// Suche alle Participants in der Etage
|
||||
@@ -235,7 +235,7 @@ int HandlerBuildingOwnership::calculateOwnershipByFloorId(const int floorId)
|
||||
|
||||
int HandlerBuildingOwnership::getOwnership(int buildingId, int floorId) const
|
||||
{
|
||||
INFO_LOG() << "BuildingOwnership getOwnership buildingId=" << buildingId
|
||||
INFO_LOG(m_logger) << "BuildingOwnership getOwnership buildingId=" << buildingId
|
||||
<< " floorId=" << floorId;
|
||||
auto itBldg = m_buildingOwnership.find(buildingId);
|
||||
if (itBldg == m_buildingOwnership.end())
|
||||
@@ -251,18 +251,18 @@ int HandlerBuildingOwnership::getOwnership(int buildingId, int floorId) const
|
||||
|
||||
void HandlerBuildingOwnership::checkAndSendOwnership(const int newOwnership, const int floorId)
|
||||
{
|
||||
INFO_LOG() << "BuildingOwnership checkAndSendOwnership";
|
||||
INFO_LOG(m_logger) << "BuildingOwnership checkAndSendOwnership";
|
||||
if (floorId < 0) // outside building
|
||||
return;
|
||||
const int buildingId = m_handlerBuildingData->getBuildingIdFromFloorId(floorId);
|
||||
if (buildingId < 0)
|
||||
{
|
||||
WARNING_LOG() << "Could not find building for floor with id " << floorId << " - ignoring";
|
||||
WARNING_LOG(m_logger) << "Could not find building for floor with id " << floorId << " - ignoring";
|
||||
return;
|
||||
}
|
||||
// prüfe, ob sich die Farbe geändert hat.
|
||||
const int oldOwnership = getOwnership(buildingId, floorId);
|
||||
DEBUG_LOG() << "checkAndSendOwnership buildingId = "
|
||||
DEBUG_LOG(m_logger) << "checkAndSendOwnership buildingId = "
|
||||
<< buildingId
|
||||
<< " floorId=" << floorId
|
||||
<< " oldOwnership=" << oldOwnership
|
||||
@@ -273,23 +273,23 @@ void HandlerBuildingOwnership::checkAndSendOwnership(const int newOwnership, con
|
||||
saveBuildingOwnership(floorId, newOwnership, buildingId);
|
||||
// und Meldung verschicken.
|
||||
sendBuildingOwnership(buildingId);
|
||||
DEBUG_LOG() << "new Building Ownership";
|
||||
DEBUG_LOG(m_logger) << "new Building Ownership";
|
||||
}
|
||||
}
|
||||
|
||||
void HandlerBuildingOwnership::updateOwnerships(CentralEffectSimulation::BuildingOwnership *bo)
|
||||
{
|
||||
INFO_LOG() << "BuildingOwnership updateOwnerships";
|
||||
INFO_LOG(m_logger) << "BuildingOwnership updateOwnerships";
|
||||
QMap <int, int> ownershipMap;
|
||||
|
||||
const QVector<int> floors = m_handlerBuildingData->getFloorsFromBuilding(bo->buildingId());
|
||||
DEBUG_LOG() << "updateOwnerships floors.size= " << floors.size();
|
||||
DEBUG_LOG(m_logger) << "updateOwnerships floors.size= " << floors.size();
|
||||
for (const int floorId : floors)
|
||||
ownershipMap[floorId] = 0;
|
||||
|
||||
for (const CentralEffectSimulation::Ownership &ownership : bo->ownerships())
|
||||
{
|
||||
DEBUG_LOG() << "updateOwnerships floorId=" << ownership.floorId() << ": " << ownership.partyId();
|
||||
DEBUG_LOG(m_logger) << "updateOwnerships floorId=" << ownership.floorId() << ": " << ownership.partyId();
|
||||
ownershipMap[ownership.floorId()] = ownership.partyId();
|
||||
}
|
||||
|
||||
@@ -299,7 +299,7 @@ void HandlerBuildingOwnership::updateOwnerships(CentralEffectSimulation::Buildin
|
||||
CentralEffectSimulation::Ownership ownership;
|
||||
for (auto it = ownershipMap.cbegin(); it != ownershipMap.cend(); ++it)
|
||||
{
|
||||
DEBUG_LOG() << it.key() << ": " << it.value();
|
||||
DEBUG_LOG(m_logger) << it.key() << ": " << it.value();
|
||||
ownership.floorId(it.key());
|
||||
ownership.partyId(it.value());
|
||||
bo->ownerships().push_back(ownership);
|
||||
@@ -308,7 +308,7 @@ void HandlerBuildingOwnership::updateOwnerships(CentralEffectSimulation::Buildin
|
||||
}
|
||||
void HandlerBuildingOwnership::saveBuildingOwnership(int floorId, int partyId, int buildingId)
|
||||
{
|
||||
INFO_LOG() << "saveBuildingOwnership floorId: " << floorId
|
||||
INFO_LOG(m_logger) << "saveBuildingOwnership floorId: " << floorId
|
||||
<< ", partyId: " << partyId
|
||||
<< ", buildingId: " << buildingId;
|
||||
|
||||
@@ -349,7 +349,7 @@ void HandlerBuildingOwnership::saveBuildingOwnership(int floorId, int partyId, i
|
||||
|
||||
void HandlerBuildingOwnership::sendBuildingOwnership(int buildingId)
|
||||
{
|
||||
INFO_LOG() << "sendBuildingOwnership for building: " << buildingId;
|
||||
INFO_LOG(m_logger) << "sendBuildingOwnership for building: " << buildingId;
|
||||
CentralEffectSimulation::BuildingOwnership bo = m_buildingOwnership.value(buildingId);
|
||||
bo.buildingId(buildingId);
|
||||
bo.sampleTime(QDateTime::currentMSecsSinceEpoch());
|
||||
@@ -363,7 +363,7 @@ void HandlerBuildingOwnership::sendBuildingOwnership(int buildingId)
|
||||
///
|
||||
bool HandlerBuildingOwnership::loadOwnershipsFromDb()
|
||||
{
|
||||
INFO_LOG() << "HandlerBuildingOwnership::loadOwnershipsFromDb ";
|
||||
INFO_LOG(m_logger) << "HandlerBuildingOwnership::loadOwnershipsFromDb ";
|
||||
m_buildingOwnership.clear();
|
||||
auto cbBo = [this](const CentralEffectSimulation::Database::CesOwnership & bo)
|
||||
{
|
||||
@@ -371,7 +371,7 @@ bool HandlerBuildingOwnership::loadOwnershipsFromDb()
|
||||
};
|
||||
if (!m_db->select(cbBo))
|
||||
{
|
||||
ERROR_LOG() << "Error reading data from database 'CesOwnership'";
|
||||
ERROR_LOG(m_logger) << "Error reading data from database 'CesOwnership'";
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
@@ -379,7 +379,7 @@ bool HandlerBuildingOwnership::loadOwnershipsFromDb()
|
||||
|
||||
void HandlerBuildingOwnership::removeFromDbBuildingId(const int buildingId)
|
||||
{
|
||||
INFO_LOG() << "HandlerBuildingOwnership::removeFromDbBuildingId buildingId: " << buildingId;
|
||||
INFO_LOG(m_logger) << "HandlerBuildingOwnership::removeFromDbBuildingId buildingId: " << buildingId;
|
||||
m_db->removeCesOwnershipByBuildingId(buildingId);
|
||||
}
|
||||
|
||||
@@ -389,7 +389,7 @@ void HandlerBuildingOwnership::insertInDb(const CentralEffectSimulation::Buildin
|
||||
DBTransaction trans(m_db->database());
|
||||
|
||||
removeFromDbBuildingId(bo.buildingId());
|
||||
INFO_LOG() << "insertInDb buildingId: " << bo.buildingId()
|
||||
INFO_LOG(m_logger) << "insertInDb buildingId: " << bo.buildingId()
|
||||
<< ", bo.ownerships().size(): " << bo.ownerships().size();
|
||||
CentralEffectSimulation::Database::CesOwnership newOwnership;
|
||||
newOwnership.buildingId = bo.buildingId();
|
||||
@@ -398,10 +398,10 @@ void HandlerBuildingOwnership::insertInDb(const CentralEffectSimulation::Buildin
|
||||
newOwnership.id = 0;
|
||||
newOwnership.floorId = ownership.floorId();
|
||||
newOwnership.partyId = ownership.partyId();
|
||||
DEBUG_LOG() << "ownership: floorId = " << newOwnership.floorId
|
||||
DEBUG_LOG(m_logger) << "ownership: floorId = " << newOwnership.floorId
|
||||
<< " partyId = " << newOwnership.partyId;
|
||||
if (!m_db->insert(newOwnership))
|
||||
ERROR_LOG() << "Error adding 'CesOwnership' to database "
|
||||
ERROR_LOG(m_logger) << "Error adding 'CesOwnership' to database "
|
||||
<< " buildingId =" << newOwnership.buildingId
|
||||
<< " floorId = " << newOwnership.floorId
|
||||
<< " partyId = " << newOwnership.partyId;
|
||||
|
||||
+48
-48
@@ -102,7 +102,7 @@ void HandlerContamination::onAesItemViewChanged(const AreaEffectSimulation::AesI
|
||||
modType != DataModification::eModified)
|
||||
return;
|
||||
|
||||
DEBUG_LOG() << "Got AesItemView: " << data.effectStateId()
|
||||
DEBUG_LOG(m_logger) << "Got AesItemView: " << data.effectStateId()
|
||||
<< " data.aesItemId()" << data.aesItemId()
|
||||
<< " data.aesTypeId()" << data.aesTypeId();
|
||||
switch (data.effectStateId().underlying())
|
||||
@@ -116,21 +116,21 @@ void HandlerContamination::onAesItemViewChanged(const AreaEffectSimulation::AesI
|
||||
{
|
||||
chargeHeight = 500.0; // Alle Stockwerke beruecksichtigen
|
||||
chargeDepression = -1000.0; // Alle Kellerraeume beruecksichtigen
|
||||
DEBUG_LOG() << "AtNContamination: chargeHeight=" << chargeHeight
|
||||
DEBUG_LOG(m_logger) << "AtNContamination: chargeHeight=" << chargeHeight
|
||||
<< " chargeDepression=" << chargeDepression;
|
||||
}
|
||||
else
|
||||
{
|
||||
chargeHeight = m_aesBCContaminations.value(data.aesItemId()).upperOffset();
|
||||
chargeDepression = m_aesBCContaminations.value(data.aesItemId()).lowerOffset();
|
||||
DEBUG_LOG() << "BCContaminations: chargeHeight=" << chargeHeight
|
||||
DEBUG_LOG(m_logger) << "BCContaminations: chargeHeight=" << chargeHeight
|
||||
<< " chargeDepression=" << chargeDepression;
|
||||
}
|
||||
|
||||
if (data.aesTypeId() != AreaEffectSimulation::AesType_def::AtBCContamination
|
||||
&& data.aesTypeId() != AreaEffectSimulation::AesType_def::AtNContamination)
|
||||
{
|
||||
DEBUG_LOG() << "return1: AesItemView: " << data.effectStateId();
|
||||
DEBUG_LOG(m_logger) << "return1: AesItemView: " << data.effectStateId();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -139,11 +139,11 @@ void HandlerContamination::onAesItemViewChanged(const AreaEffectSimulation::AesI
|
||||
if (volatilityType != ProjectDataManagement::VolatilityType_def::Resident
|
||||
&& data.aesTypeId() != AreaEffectSimulation::AesType_def::AtNContamination)
|
||||
{
|
||||
DEBUG_LOG() << "return2: AesItemView: " << data.effectStateId();
|
||||
DEBUG_LOG(m_logger) << "return2: AesItemView: " << data.effectStateId();
|
||||
return;
|
||||
}
|
||||
|
||||
DEBUG_LOG() << "HandlerContamination::onAesItemViewChanged data.aesItemId=" << data.aesItemId();
|
||||
DEBUG_LOG(m_logger) << "HandlerContamination::onAesItemViewChanged data.aesItemId=" << data.aesItemId();
|
||||
auto dtcIsm = m_ddsHandler->dtcIsm();
|
||||
// Form in UTM-Polygon wandeln
|
||||
int exerciseId = m_ddsHandler->getExerciseId();
|
||||
@@ -156,7 +156,7 @@ void HandlerContamination::onAesItemViewChanged(const AreaEffectSimulation::AesI
|
||||
bool completeEnclosed = true;
|
||||
bool isGroundLevel = false;
|
||||
const QVector<int> &buildingIds = dtcIsm.get()->getBuildingByPolygon(exerciseId, polygonGeo, completeEnclosed, isGroundLevel);
|
||||
DEBUG_LOG() << "buildingIds.size=" << buildingIds.size();
|
||||
DEBUG_LOG(m_logger) << "buildingIds.size=" << buildingIds.size();
|
||||
for (int buildingId : std::as_const(buildingIds))
|
||||
{
|
||||
calculateBuilding(buildingId, data, chargeHeight, chargeDepression);
|
||||
@@ -181,7 +181,7 @@ void HandlerContamination::calculateBuilding(int buildingId,
|
||||
if (data.aesTypeId() != AreaEffectSimulation::AesType_def::AtBCContamination
|
||||
&& data.aesTypeId() != AreaEffectSimulation::AesType_def::AtNContamination)
|
||||
{
|
||||
DEBUG_LOG() << "return: NO BC-Contamination AesItemView: " << data.effectStateId();
|
||||
DEBUG_LOG(m_logger) << "return: NO BC-Contamination AesItemView: " << data.effectStateId();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -190,27 +190,27 @@ void HandlerContamination::calculateBuilding(int buildingId,
|
||||
&& data.aesTypeId() != AreaEffectSimulation::AesType_def::AtNContamination)
|
||||
return;
|
||||
|
||||
DEBUG_LOG() << "buildingId=" << buildingId;
|
||||
DEBUG_LOG(m_logger) << "buildingId=" << buildingId;
|
||||
effectedRooms.clear();
|
||||
effectedFloors = getEffectedFloors(buildingId, chargeHeight, chargeDepression);
|
||||
for (int effectedFloor : std::as_const(effectedFloors))
|
||||
effectedRooms += dtcIsm.get()->getRoomIdsFromFloorId(buildingId, effectedFloor);
|
||||
if (!effectedRooms.empty())
|
||||
{
|
||||
DEBUG_LOG() << "effectedRooms.size=" << effectedRooms.size();
|
||||
DEBUG_LOG(m_logger) << "effectedRooms.size=" << effectedRooms.size();
|
||||
ProjectDataManagement::VulnerabilityState vulnerabilityState = ProjectDataManagement::VulnerabilityState::CombatReady;
|
||||
|
||||
// [GUEZE-2752] N-Contamination: Only Contamionation inside Range1
|
||||
if (data.aesTypeId() == AreaEffectSimulation::AesType_def::AtNContamination
|
||||
&& !isInsideRange1(buildingId, data.aesItemId()))
|
||||
{
|
||||
DEBUG_LOG() << "!isInsideRange1 buildingId=" << buildingId;
|
||||
DEBUG_LOG(m_logger) << "!isInsideRange1 buildingId=" << buildingId;
|
||||
return;
|
||||
}
|
||||
if (data.aesTypeId() == AreaEffectSimulation::AesType_def::AtBCContamination
|
||||
&& !isInsideBCContamination(buildingId, data.aesItemId()))
|
||||
{
|
||||
DEBUG_LOG() << "AtBCContamination !isInsideRange buildingId=" << buildingId << "return";
|
||||
DEBUG_LOG(m_logger) << "AtBCContamination !isInsideRange buildingId=" << buildingId << "return";
|
||||
return;
|
||||
}
|
||||
if (data.aesTypeId() == AreaEffectSimulation::AesType_def::AtNContamination
|
||||
@@ -220,15 +220,15 @@ void HandlerContamination::calculateBuilding(int buildingId,
|
||||
// Only actual explosion not old N-Fields
|
||||
if ( m_ddsHandler->dtcCore()->partitionTime().timeStamp() < (data.effectStart() + TIME_2_SECONDS))
|
||||
{
|
||||
DEBUG_LOG() << "VulnerabilityState=CatastrophicKill";
|
||||
DEBUG_LOG(m_logger) << "VulnerabilityState=CatastrophicKill";
|
||||
vulnerabilityState = ProjectDataManagement::VulnerabilityState::CatastrophicKill;
|
||||
}
|
||||
}
|
||||
DEBUG_LOG() << "setBuildingContaminationStateRequest buildingId=" << buildingId
|
||||
DEBUG_LOG(m_logger) << "setBuildingContaminationStateRequest buildingId=" << buildingId
|
||||
<< " data.aesTypeId()=" << data.aesTypeId()
|
||||
<< " isInsideInnerCircle(buildingId, data.aesItemId()=" << isInsideInnerCircle(buildingId, data.aesItemId());
|
||||
{
|
||||
DEBUG_LOG() << "isInsideInnerCircle buildingId=" << buildingId;
|
||||
DEBUG_LOG(m_logger) << "isInsideInnerCircle buildingId=" << buildingId;
|
||||
setBuildingContaminationStateRequest(buildingId, data.aesItemId(), vulnerabilityState, effectedRooms);
|
||||
}
|
||||
}
|
||||
@@ -244,7 +244,7 @@ void HandlerContamination::onBuildingStateChanged(const Buildings::BuildingState
|
||||
&& modType != DataModification::eModified)
|
||||
return;
|
||||
|
||||
INFO_LOG() << "onBuildingStateChanged"
|
||||
INFO_LOG(m_logger) << "onBuildingStateChanged"
|
||||
<< " id=" << data.id()
|
||||
<< " aesId=" << data.aesId()
|
||||
<< " contaminationStates().size=" << data.contaminationStates().size();
|
||||
@@ -260,7 +260,7 @@ void HandlerContamination::onBuildingStateChanged(const Buildings::BuildingState
|
||||
{
|
||||
if (aesItemView.effectStateId() == AreaEffectSimulation::AesEffectState::EsActivated)
|
||||
{
|
||||
DEBUG_LOG() << "Wirkfeld aesItemView.id()=" << aesItemView.id()
|
||||
DEBUG_LOG(m_logger) << "Wirkfeld aesItemView.id()=" << aesItemView.id()
|
||||
<< " aesItemView.aesItemId()=" << aesItemView.aesItemId()
|
||||
<< " fuer Gebaeude " << data.id() << " neu berechnen";
|
||||
|
||||
@@ -271,7 +271,7 @@ void HandlerContamination::onBuildingStateChanged(const Buildings::BuildingState
|
||||
{
|
||||
chargeHeight = 500.0; // Alle Stockwerke beruecksichtigen
|
||||
chargeDepression = -1000.0; // Alle Kellerraeume beruecksichtigen
|
||||
DEBUG_LOG() << "AtNContamination: chargeHeight=" << chargeHeight
|
||||
DEBUG_LOG(m_logger) << "AtNContamination: chargeHeight=" << chargeHeight
|
||||
<< " chargeDepression=" << chargeDepression;
|
||||
}
|
||||
else
|
||||
@@ -280,12 +280,12 @@ void HandlerContamination::onBuildingStateChanged(const Buildings::BuildingState
|
||||
{
|
||||
chargeHeight = m_aesBCContaminations.value(aesItemView.aesItemId()).upperOffset();
|
||||
chargeDepression = m_aesBCContaminations.value(aesItemView.aesItemId()).lowerOffset();
|
||||
DEBUG_LOG() << "BCContaminations: chargeHeight=" << chargeHeight
|
||||
DEBUG_LOG(m_logger) << "BCContaminations: chargeHeight=" << chargeHeight
|
||||
<< " chargeDepression=" << chargeDepression;
|
||||
}
|
||||
else
|
||||
{
|
||||
DEBUG_LOG() << "BCContaminations: m_aesBCContaminations not contains:"<< aesItemView.aesItemId();
|
||||
DEBUG_LOG(m_logger) << "BCContaminations: m_aesBCContaminations not contains:"<< aesItemView.aesItemId();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -304,7 +304,7 @@ void HandlerContamination::onBuildingStateChanged(const Buildings::BuildingState
|
||||
if (buildingIds.contains(data.id() ))
|
||||
calculateBuilding(data.id(), aesItemView, chargeHeight, chargeDepression);
|
||||
else
|
||||
DEBUG_LOG() << "Building not in Area BuildingId=" << data.id();
|
||||
DEBUG_LOG(m_logger) << "Building not in Area BuildingId=" << data.id();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -321,7 +321,7 @@ void HandlerContamination::setBuildingContaminationStateRequest(int buildingId,
|
||||
contaminationState.vulnerabilityState(vulnerabilityState);
|
||||
// contaminationState.vulne
|
||||
|
||||
DEBUG_LOG() << "setBuildingContaminationStateRequest"
|
||||
DEBUG_LOG(m_logger) << "setBuildingContaminationStateRequest"
|
||||
<< " buildingId=" << buildingId
|
||||
<< " aesId=" << aesId
|
||||
<< " vulnerabilityState=" << vulnerabilityState
|
||||
@@ -331,7 +331,7 @@ void HandlerContamination::setBuildingContaminationStateRequest(int buildingId,
|
||||
{
|
||||
contaminationState.rooms()[i] = rooms[i];
|
||||
contaminationState.vulnerabilityState(vulnerabilityState);
|
||||
DEBUG_LOG() << " room[" << i << "]=" << rooms[i];
|
||||
DEBUG_LOG(m_logger) << " room[" << i << "]=" << rooms[i];
|
||||
}
|
||||
|
||||
Buildings::SetBuildingContaminationStateRequest requestContamination(
|
||||
@@ -341,7 +341,7 @@ void HandlerContamination::setBuildingContaminationStateRequest(int buildingId,
|
||||
// Senden, wenn fuer das Gebaeude noch keine Contamination vorhanden ist.
|
||||
if (!m_contaminationState.contains(buildingId))
|
||||
{
|
||||
DEBUG_LOG() << "Neue Kontamination BuildingId=" << buildingId
|
||||
DEBUG_LOG(m_logger) << "Neue Kontamination BuildingId=" << buildingId
|
||||
<< " requestContamination aesId=" << requestContamination.contaminationState().aesId();
|
||||
|
||||
m_ddsHandler->ftcBld()->setBuildingContaminationStateRequest(requestContamination, this);
|
||||
@@ -352,19 +352,19 @@ void HandlerContamination::setBuildingContaminationStateRequest(int buildingId,
|
||||
Buildings::SetBuildingContaminationStateRequest lastRequestContamination = m_contaminationState.value(buildingId);
|
||||
if (lastRequestContamination != requestContamination)
|
||||
{
|
||||
DEBUG_LOG() << "Änderung der Kontamination BuildingId=" << buildingId
|
||||
DEBUG_LOG(m_logger) << "Änderung der Kontamination BuildingId=" << buildingId
|
||||
<< " aesId=" << requestContamination.contaminationState().aesId();
|
||||
m_ddsHandler->ftcBld()->setBuildingContaminationStateRequest(requestContamination, this);
|
||||
m_contaminationState.insert(buildingId, requestContamination);
|
||||
return;
|
||||
}
|
||||
DEBUG_LOG() << "Keine Änderung der Kontamination BuildingId=" << buildingId;
|
||||
DEBUG_LOG(m_logger) << "Keine Änderung der Kontamination BuildingId=" << buildingId;
|
||||
}
|
||||
|
||||
QVector<int> HandlerContamination::getEffectedFloors(const int buildingId, const int chargeHeight, const int depression)
|
||||
{
|
||||
auto dtcIsm = m_ddsHandler->dtcIsm();
|
||||
DEBUG_LOG() << "Contaminated-Building=" << buildingId
|
||||
DEBUG_LOG(m_logger) << "Contaminated-Building=" << buildingId
|
||||
<< " chargeHeight=" << chargeHeight
|
||||
<< " depression=" << depression;
|
||||
|
||||
@@ -374,17 +374,17 @@ QVector<int> HandlerContamination::getEffectedFloors(const int buildingId, const
|
||||
for (int floorId : std::as_const(floorIds))
|
||||
{
|
||||
double halfFloorHeight = dtcIsm->getHalfFloorHeight(buildingId, floorId);
|
||||
DEBUG_LOG() << " floorId=" << floorId
|
||||
DEBUG_LOG(m_logger) << " floorId=" << floorId
|
||||
<< " halfFloorHeight=" << halfFloorHeight
|
||||
<< " chargeHeight=" << chargeHeight
|
||||
<< " depression=" << depression;
|
||||
if (depression < 0) // Kellerraeme beruecksichtigen
|
||||
{
|
||||
if (halfFloorHeight > depression)
|
||||
DEBUG_LOG() << "Checke Obergrenze";
|
||||
DEBUG_LOG(m_logger) << "Checke Obergrenze";
|
||||
else
|
||||
{
|
||||
DEBUG_LOG() << "halfFloorHeight > depression floorId=" << floorId << " continue";
|
||||
DEBUG_LOG(m_logger) << "halfFloorHeight > depression floorId=" << floorId << " continue";
|
||||
continue;
|
||||
}
|
||||
}
|
||||
@@ -392,7 +392,7 @@ QVector<int> HandlerContamination::getEffectedFloors(const int buildingId, const
|
||||
{
|
||||
if (halfFloorHeight < 0) // Kellerraeume nicht beruecksichtigen
|
||||
{
|
||||
DEBUG_LOG() << "depression ist nicht < 0"
|
||||
DEBUG_LOG(m_logger) << "depression ist nicht < 0"
|
||||
<< " Kelleretagen nicht beruecksichtigen floorId=" << floorId << " continue";
|
||||
continue;
|
||||
}
|
||||
@@ -407,9 +407,9 @@ QVector<int> HandlerContamination::getEffectedFloors(const int buildingId, const
|
||||
void HandlerContamination::onSetBuildingContaminationStateReply(const Core::FunctionReplyObject &replyObject)
|
||||
{
|
||||
if (replyObject.error())
|
||||
WARNING_LOG() << "Can not send ContaminationStates on building to building service: " << replyObject();
|
||||
WARNING_LOG(m_logger) << "Can not send ContaminationStates on building to building service: " << replyObject();
|
||||
else
|
||||
DEBUG_LOG() << "onSetBuildingContaminationStateReply for id " << replyObject.id() << " success\n"
|
||||
DEBUG_LOG(m_logger) << "onSetBuildingContaminationStateReply for id " << replyObject.id() << " success\n"
|
||||
<< " replyObject.str() = " << replyObject.str();
|
||||
}
|
||||
|
||||
@@ -429,27 +429,27 @@ bool HandlerContamination::isInsideInnerCircle(int buildingId, int aesId)
|
||||
InfrastructureManagement::MainStructureElement mse = m_ddsHandler->dtcIsm()->mainStructureElement(buildingId);
|
||||
AreaEffectSimulation::NContamination nContamination = m_ddsHandler->dtcAes()->nContamination(aesId);
|
||||
|
||||
DEBUG_LOG() << "isInsideInnerCircle borderLengthInner=" << nContamination.borderLengthInner()
|
||||
DEBUG_LOG(m_logger) << "isInsideInnerCircle borderLengthInner=" << nContamination.borderLengthInner()
|
||||
<< " borderLengthOuter=" << nContamination.borderLengthOuter()
|
||||
<< " impactRadius=" << nContamination.impactRadius();
|
||||
|
||||
int zone = -1;
|
||||
const QPointF impactPositionUtm = CentralEffectSimulation::geographic2Utm(nContamination.impactPosition(), zone);
|
||||
DEBUG_LOG() << "impactPositionUtm=" << impactPositionUtm.x() << "/" << impactPositionUtm.y()
|
||||
DEBUG_LOG(m_logger) << "impactPositionUtm=" << impactPositionUtm.x() << "/" << impactPositionUtm.y()
|
||||
<< " zone=" << zone;
|
||||
const QPointF buildingPositionUtm = CentralEffectSimulation::geographic2Utm(mse.geoPosition(), zone);
|
||||
DEBUG_LOG() << "buildingPositionUtm=" << buildingPositionUtm.x() << "/" << buildingPositionUtm.y();
|
||||
DEBUG_LOG(m_logger) << "buildingPositionUtm=" << buildingPositionUtm.x() << "/" << buildingPositionUtm.y();
|
||||
|
||||
double squareDistance = CentralEffectSimulation::getSquareDistance(impactPositionUtm, buildingPositionUtm);
|
||||
|
||||
if (squareDistance < nContamination.impactRadius() * nContamination.impactRadius())
|
||||
{
|
||||
DEBUG_LOG() << "isInsideInnerCircle return true";
|
||||
DEBUG_LOG(m_logger) << "isInsideInnerCircle return true";
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
DEBUG_LOG() << "isInsideInnerCircle return false";
|
||||
DEBUG_LOG(m_logger) << "isInsideInnerCircle return false";
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -462,25 +462,25 @@ bool HandlerContamination::isInsideBCContamination(int buildingId, int aesId)
|
||||
//AreaEffectSimulation::NContamination nContamination = m_ddsHandler->dtcAes()->nContamination(aesId);
|
||||
AreaEffectSimulation::BCContamination bcContamination = m_ddsHandler->dtcAes()->bCContamination(aesId);
|
||||
|
||||
DEBUG_LOG() << " impactRadius=" << bcContamination.impactRadius();
|
||||
DEBUG_LOG(m_logger) << " impactRadius=" << bcContamination.impactRadius();
|
||||
|
||||
int zone = -1;
|
||||
const QPointF impactPositionUtm = CentralEffectSimulation::geographic2Utm(bcContamination.impactPosition(), zone);
|
||||
DEBUG_LOG() << "impactPositionUtm=" << impactPositionUtm.x() << "/" << impactPositionUtm.y()
|
||||
DEBUG_LOG(m_logger) << "impactPositionUtm=" << impactPositionUtm.x() << "/" << impactPositionUtm.y()
|
||||
<< " zone=" << zone;
|
||||
const QPointF buildingPositionUtm = CentralEffectSimulation::geographic2Utm(mse.geoPosition(), zone);
|
||||
DEBUG_LOG() << "buildingPositionUtm=" << buildingPositionUtm.x() << "/" << buildingPositionUtm.y();
|
||||
DEBUG_LOG(m_logger) << "buildingPositionUtm=" << buildingPositionUtm.x() << "/" << buildingPositionUtm.y();
|
||||
|
||||
double squareDistance = CentralEffectSimulation::getSquareDistance(impactPositionUtm, buildingPositionUtm);
|
||||
|
||||
if (squareDistance < bcContamination.impactRadius() * bcContamination.impactRadius())
|
||||
{
|
||||
DEBUG_LOG() << "isInsideInnerCircle return true";
|
||||
DEBUG_LOG(m_logger) << "isInsideInnerCircle return true";
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
DEBUG_LOG() << "isInsideInnerCircle return false";
|
||||
DEBUG_LOG(m_logger) << "isInsideInnerCircle return false";
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -492,27 +492,27 @@ bool HandlerContamination::isInsideRange1(int buildingId, int aesId)
|
||||
InfrastructureManagement::MainStructureElement mse = m_ddsHandler->dtcIsm()->mainStructureElement(buildingId);
|
||||
AreaEffectSimulation::NContamination nContamination = m_ddsHandler->dtcAes()->nContamination(aesId);
|
||||
|
||||
DEBUG_LOG() << "isInsideRange1 borderLengthInner=" << nContamination.borderLengthInner()
|
||||
DEBUG_LOG(m_logger) << "isInsideRange1 borderLengthInner=" << nContamination.borderLengthInner()
|
||||
<< " borderLengthOuter=" << nContamination.borderLengthOuter()
|
||||
<< " impactRadius=" << nContamination.impactRadius();
|
||||
|
||||
int zone = -1;
|
||||
const QPointF impactPositionUtm = CentralEffectSimulation::geographic2Utm(nContamination.impactPosition(), zone);
|
||||
DEBUG_LOG() << "impactPositionUtm=" << impactPositionUtm.x() << "/" << impactPositionUtm.y()
|
||||
DEBUG_LOG(m_logger) << "impactPositionUtm=" << impactPositionUtm.x() << "/" << impactPositionUtm.y()
|
||||
<< " zone=" << zone;
|
||||
const QPointF buildingPositionUtm = CentralEffectSimulation::geographic2Utm(mse.geoPosition(), zone);
|
||||
DEBUG_LOG() << "buildingPositionUtm=" << buildingPositionUtm.x() << "/" << buildingPositionUtm.y();
|
||||
DEBUG_LOG(m_logger) << "buildingPositionUtm=" << buildingPositionUtm.x() << "/" << buildingPositionUtm.y();
|
||||
|
||||
double squareDistance = CentralEffectSimulation::getSquareDistance(impactPositionUtm, buildingPositionUtm);
|
||||
|
||||
if (squareDistance < nContamination.borderLengthInner() * nContamination.borderLengthInner())
|
||||
{
|
||||
DEBUG_LOG() << "isInsideRange1 return true";
|
||||
DEBUG_LOG(m_logger) << "isInsideRange1 return true";
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
DEBUG_LOG() << "isInsideRange1 return false";
|
||||
DEBUG_LOG(m_logger) << "isInsideRange1 return false";
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
+17
-17
@@ -53,13 +53,13 @@ bool CesBuildingsInterfaceImpl::init(int domainId, int exerciseId)
|
||||
{
|
||||
m_domainId = domainId;
|
||||
m_exerciseId = exerciseId;
|
||||
INFO_LOG() << "CesBuildingsInterfaceImpl::init()"
|
||||
INFO_LOG(m_logger) << "CesBuildingsInterfaceImpl::init()"
|
||||
<< " m_domainId=" << m_domainId
|
||||
<< " m_exerciseId=" << m_exerciseId;
|
||||
|
||||
|
||||
// initialize handlerBuildingOwnership
|
||||
INFO_LOG() << "initialize handlerBuildingOwnership ----------------------------";
|
||||
INFO_LOG(m_logger) << "initialize handlerBuildingOwnership ----------------------------";
|
||||
m_handlerBuildingOwnership = std::make_shared<HandlerBuildingOwnership>(m_ddsHandler,
|
||||
m_handlerParticipant,
|
||||
m_handlerBuildingData,
|
||||
@@ -69,47 +69,47 @@ bool CesBuildingsInterfaceImpl::init(int domainId, int exerciseId)
|
||||
|
||||
if (!m_handlerBuildingOwnership->init())
|
||||
{
|
||||
ERROR_LOG() << "Initialisation m_handlerBuildingOwnership failed.";
|
||||
ERROR_LOG(m_logger) << "Initialisation m_handlerBuildingOwnership failed.";
|
||||
return false;
|
||||
}
|
||||
INFO_LOG() << "end initialize handlerBuildingOwnership ----------------------------";
|
||||
INFO_LOG(m_logger) << "end initialize handlerBuildingOwnership ----------------------------";
|
||||
|
||||
// initialize handlerAesData
|
||||
INFO_LOG() << "initialize handlerAesData ----------------------------";
|
||||
INFO_LOG(m_logger) << "initialize handlerAesData ----------------------------";
|
||||
m_handlerAesData = std::make_shared<HandlerAesData>(m_ddsHandler,
|
||||
m_handlerBuildingData,
|
||||
this);
|
||||
if (!m_handlerAesData->init())
|
||||
{
|
||||
ERROR_LOG() << "Initialisation m_handlerAesData failed.";
|
||||
ERROR_LOG(m_logger) << "Initialisation m_handlerAesData failed.";
|
||||
return false;
|
||||
}
|
||||
INFO_LOG() << "end initialize HandlerAesData ----------------------------";
|
||||
INFO_LOG(m_logger) << "end initialize HandlerAesData ----------------------------";
|
||||
|
||||
// initialize handlerAesData
|
||||
INFO_LOG() << "initialize handlerContaminations ----------------------------";
|
||||
INFO_LOG(m_logger) << "initialize handlerContaminations ----------------------------";
|
||||
m_handlerContaminations = std::make_shared<HandlerContamination>(m_ddsHandler,
|
||||
this);
|
||||
|
||||
if (!m_handlerContaminations->init())
|
||||
{
|
||||
ERROR_LOG() << "Initialisation m_handlerContaminations failed.";
|
||||
ERROR_LOG(m_logger) << "Initialisation m_handlerContaminations failed.";
|
||||
return false;
|
||||
}
|
||||
INFO_LOG() << "end initialize HandlerContaminations ----------------------------";
|
||||
INFO_LOG(m_logger) << "end initialize HandlerContaminations ----------------------------";
|
||||
|
||||
|
||||
// initialize handlerBuildingModel
|
||||
INFO_LOG() << "initialize handlerBuildingModel ----------------------------";
|
||||
INFO_LOG(m_logger) << "initialize handlerBuildingModel ----------------------------";
|
||||
m_handlerBuildingModel = std::make_shared<HandlerBuildingModel>(m_ddsHandler,
|
||||
m_handlerAesData,
|
||||
this);
|
||||
if (!m_handlerBuildingModel->init())
|
||||
{
|
||||
ERROR_LOG() << "Initialisation m_handlerBuildingModel failed.";
|
||||
ERROR_LOG(m_logger) << "Initialisation m_handlerBuildingModel failed.";
|
||||
return false;
|
||||
}
|
||||
INFO_LOG() << "end initialize handlerBuildingModel ----------------------------";
|
||||
INFO_LOG(m_logger) << "end initialize handlerBuildingModel ----------------------------";
|
||||
|
||||
|
||||
// Maybe not all MainStructureElements are processed yet.
|
||||
@@ -121,20 +121,20 @@ bool CesBuildingsInterfaceImpl::init(int domainId, int exerciseId)
|
||||
std::shared_ptr<CentralEffectSimulation::ProxyBuilding> proxyBuilding = m_mainHandler->proxyBuilding();
|
||||
if (proxyBuilding)
|
||||
{
|
||||
INFO_LOG() << "set_handlerBuildingModel ----------------------------";
|
||||
INFO_LOG(m_logger) << "set_handlerBuildingModel ----------------------------";
|
||||
proxyBuilding->set_handlerBuildingModel(m_handlerBuildingModel);
|
||||
}
|
||||
});
|
||||
|
||||
INFO_LOG() << "CesBuildingsInterfaceImpl::init() return true";
|
||||
INFO_LOG(m_logger) << "CesBuildingsInterfaceImpl::init() return true";
|
||||
return true;
|
||||
}
|
||||
|
||||
QString CesBuildingsInterfaceImpl::echo(const QString &message)
|
||||
{
|
||||
QString ret(QStringLiteral("<<<< %1 >>>> CentralEffectSimulationBuildingOwnershipInterfaceImpl::echo").arg(message));
|
||||
INFO_LOG() << "CentralEffectSimulationBuildingOwnershipInterfaceImpl::echo return:" << ret;
|
||||
DEBUG_LOG() << "DEBUG: CentralEffectSimulationBuildingOwnershipInterfaceImpl::echo return:" << ret;
|
||||
INFO_LOG(m_logger) << "CentralEffectSimulationBuildingOwnershipInterfaceImpl::echo return:" << ret;
|
||||
DEBUG_LOG(m_logger) << "DEBUG: CentralEffectSimulationBuildingOwnershipInterfaceImpl::echo return:" << ret;
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
+1
@@ -64,6 +64,7 @@ private Q_SLOTS:
|
||||
bool init(int domainId, int exerciseId) override;
|
||||
private:
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
private:
|
||||
CentralEffectSimulation::Plugin::DataProvider *m_pdp{nullptr};
|
||||
std::shared_ptr<DDSConnector::DdsConnector> m_ddsConnector;
|
||||
|
||||
Reference in new issue
Block a user