Remove unused code from the Release 2 scope modules
Trim mostly-deletion changes (~700 lines) across the modules the Release 2 build compiles: unused telegrams and receiver/handler code in TrainingAreaBase (telegrams, recv_from_dds_aes/fts, ism/main/pdm/position handlers), dead members in SqlBrowser and ProjectDataManagement, unused LtsPluginManager loader paths, LtsSession unit-test, WlsTetra and DdsView cleanups, plus the stale include_directories removal in Lts/CMakeLists.txt. Continues the Release 2 source prune (keep only what the build compiles). Excluded from this commit by design: the machine-specific .envrc (MIGRATE_PIPELINE_ROOT path fix stays uncommitted) and the untracked qt5-before/ reference tree.
This commit is contained in:
1 parent
e60a860283
commit
84f8cfb41f
45 files changed
+30
-724
No files matched your search
@@ -1,6 +1,4 @@
|
||||
|
||||
|
||||
|
||||
#include "ism_handler.h"
|
||||
#include <utility>
|
||||
#include "main_handler.h"
|
||||
@@ -42,20 +40,6 @@ bool IsmHandler::init()
|
||||
ERROR_LOG(m_logger) << "Can not read data from ISM";
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -77,8 +61,6 @@ IsmHandler::OpsData IsmHandler::dataFromOpsCode(int ipsCode)
|
||||
int assetId = m_dtcIsm->getAssetIdFromOpticalCode(ipsCode);
|
||||
OpsData opsData;
|
||||
|
||||
|
||||
|
||||
if ( assetId < 0)
|
||||
{
|
||||
WARNING_LOG(m_logger) << "No asset for ops code=" << ipsCode << " found";
|
||||
@@ -87,14 +69,6 @@ IsmHandler::OpsData IsmHandler::dataFromOpsCode(int ipsCode)
|
||||
opsData.opsCode = ipsCode;
|
||||
opsData.assetId = assetId;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
DEBUG_LOG(m_logger) << "OpsData.structureElementId=" << opsData.structureElementId
|
||||
<< " assetId=" << opsData.assetId
|
||||
<< " mountingPointTypeId=" << opsData.mountingPointTypeId
|
||||
@@ -102,14 +76,11 @@ IsmHandler::OpsData IsmHandler::dataFromOpsCode(int ipsCode)
|
||||
<< " mainStructureElementId=" << opsData.mainStructureElementId
|
||||
<< " roomId=" << opsData.roomId;
|
||||
|
||||
{
|
||||
|
||||
|
||||
{
|
||||
DEBUG_LOG(m_logger) <<"---------------- UPDATE OPS-Data ------------------";
|
||||
updateOpsData(opsData, true);
|
||||
opsData= m_opsData[opsData.opsCode] ;
|
||||
}
|
||||
|
||||
return opsData;
|
||||
}
|
||||
|
||||
@@ -171,10 +142,8 @@ void IsmHandler::onMountingPointAssetChanged(const InfrastructureManagement::Mou
|
||||
case DataModification::eModified:
|
||||
{
|
||||
OpsData opsData;
|
||||
|
||||
opsData.opsCode = m_dtcIsm->getOpticalCodeFromAssetId(data.assetId);
|
||||
opsData.assetId = data.assetId;
|
||||
|
||||
updateOpsData(opsData, true);
|
||||
break;
|
||||
}
|
||||
@@ -189,8 +158,6 @@ void IsmHandler::onMountingPointAssetChanged(const InfrastructureManagement::Mou
|
||||
|
||||
void IsmHandler::rotateBuildingFootprint(int mseId)
|
||||
{
|
||||
|
||||
|
||||
if ( m_relBuildingFootprintsRotated.contains(mseId))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << " mainStructureElements.Rotate already done id=" << mseId;
|
||||
@@ -225,7 +192,6 @@ void IsmHandler::rotateBuildingFootprint(int mseId)
|
||||
|
||||
void IsmHandler::onMainStructureElementChanged(const InfrastructureManagement::MainStructureElement &data, DataModification modType)
|
||||
{
|
||||
|
||||
switch (modType)
|
||||
{
|
||||
case DataModification::eAdded:
|
||||
@@ -234,9 +200,7 @@ void IsmHandler::onMainStructureElementChanged(const InfrastructureManagement::M
|
||||
int exerciseId = m_mainHandler->ddsHandler()->getExerciseId();
|
||||
if ( !m_dtcIsm->isElementAssignedToExercise(data, exerciseId))
|
||||
{
|
||||
INFO_LOG(m_logger) << "HandlerBuildingData::onMainStructureElementChanged() id=" << data.id << " remove";
|
||||
|
||||
|
||||
INFO_LOG(m_logger) << "HandlerBuildingData::onMainStructureElementChanged() id=" << data.id << " remove";
|
||||
m_buildingBoundingBoxes.remove(data.id);
|
||||
m_relBuildingFootprints.remove(data.id);
|
||||
m_relBuildingFootprintsRotated.remove((data.id));
|
||||
@@ -250,7 +214,6 @@ void IsmHandler::onMainStructureElementChanged(const InfrastructureManagement::M
|
||||
continue;
|
||||
removeOpsDataByStructureElementId(se.id);
|
||||
}
|
||||
|
||||
|
||||
QMutableHashIterator<int, OpsData> iter(m_opsData);
|
||||
while (iter.hasNext())
|
||||
@@ -267,10 +230,6 @@ void IsmHandler::onMainStructureElementChanged(const InfrastructureManagement::M
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
for (const InfrastructureManagement::StructureElement &se : data.elements)
|
||||
{
|
||||
if (se.mountingPointTypeId != InfrastructureManagement::MountingPointType::IndoorIPS &&
|
||||
@@ -284,9 +243,7 @@ void IsmHandler::onMainStructureElementChanged(const InfrastructureManagement::M
|
||||
updateOpsData(it.value());
|
||||
}
|
||||
DEBUG_LOG(m_logger) << " mainStructureElements Vor Rotate id=" << data.id;
|
||||
QMap<int, InfrastructureManagement::MainFootprint> mainFootprints = m_dtcIsm->getFootprintsByExerciseId(exerciseId);
|
||||
|
||||
|
||||
QMap<int, InfrastructureManagement::MainFootprint> mainFootprints = m_dtcIsm->getFootprintsByExerciseId(exerciseId);
|
||||
if (mainFootprints.contains(data.id))
|
||||
{
|
||||
rotateBuildingFootprint(data.id);
|
||||
@@ -315,9 +272,7 @@ void IsmHandler::onMainFootprintChanged(const InfrastructureManagement::MainFoot
|
||||
{
|
||||
case DataModification::eAdded:
|
||||
case DataModification::eModified:
|
||||
{
|
||||
|
||||
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "mainStructureElements onMainFootprintChanged id=" << data.id;
|
||||
double minX = 0;
|
||||
double maxX = 0;
|
||||
@@ -445,11 +400,8 @@ void IsmHandler::updateOpsData(OpsData &data, bool force)
|
||||
|
||||
const auto &mainStructureElements = m_dtcIsm->mainStructureElements();
|
||||
|
||||
|
||||
for (const auto &mse : std::as_const(mainStructureElements))
|
||||
{
|
||||
|
||||
|
||||
if (!force && !m_dtcIsm->isElementAssignedToExercise(mse, exerciseId))
|
||||
continue;
|
||||
for (const InfrastructureManagement::StructureElement &se : mse.elements)
|
||||
@@ -500,13 +452,9 @@ bool IsmHandler::posInExtendedBuildingFootprint(int mainStructureElementId, cons
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
DEBUG_LOG(m_logger) << "mainStructureElementId=" << mainStructureElementId
|
||||
<< " position=" << position;
|
||||
|
||||
|
||||
int exerciseId = m_mainHandler->ddsHandler()->getExerciseId();
|
||||
|
||||
InfrastructureManagement::MainStructureElement mse = m_dtcIsm->mainStructureElement(mainStructureElementId);
|
||||
@@ -516,29 +464,21 @@ bool IsmHandler::posInExtendedBuildingFootprint(int mainStructureElementId, cons
|
||||
if (!m_buildingBoundingBoxes.contains(mainStructureElementId))
|
||||
return false;
|
||||
|
||||
|
||||
TetraIcd::RelativePosition relBldgPosition = m_mainHandler->posHandler()->geographicToRelative(mse.geoPosition);
|
||||
TetraIcd::RelativePosition relPosition = m_mainHandler->posHandler()->geographicToRelative(position);
|
||||
DEBUG_LOG(m_logger) << "relBldgPosition=" << relBldgPosition.offsetX << "/" << relBldgPosition.offsetY
|
||||
<< ", relPosition=" << relPosition.offsetX << "/" << relPosition.offsetY;
|
||||
|
||||
QPointF relPositionMgrs(relPosition.offsetX, relPosition.offsetY);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
QPolygonF relBuildingFootprint = m_relBuildingFootprintsRotated[mainStructureElementId];
|
||||
QPointF relPositionF(relPosition.offsetX - relBldgPosition.offsetX, relPosition.offsetY - relBldgPosition.offsetY);
|
||||
|
||||
if (relBuildingFootprint.containsPoint(relPositionF, Qt::OddEvenFill))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Position is inside Building-Footprint";
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
DEBUG_LOG(m_logger) << "relBuildingFootprint.size=" << relBuildingFootprint.size();
|
||||
for (int i = 0; i < relBuildingFootprint.size() ; i++)
|
||||
{
|
||||
@@ -613,6 +553,4 @@ double IsmHandler::squareLen(const QPointF &p1, const QPointF &p2)
|
||||
double vy = p2.y() - p1.y();
|
||||
return vx * vx + vy * vy;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user