Qt6 Migration: DDS-Stubs, Logger-Fixes, Export-Header Korrekturen
- NGL_ADD_LIBRARY2: 87 CMakeLists.txt konvertiert für Export-Header Generierung - 44 Export-Header Include-Pfade korrigiert (_export.h) - 81 DDS-Stub-Header generiert (*_dtc.h, *_fts.h, *_dts.h, *_ftc.h) - INGLLogger: Duplikat gelöscht, m_logger Member entfernt, variadische Makros - Q_FUNC_INFO Redefinition behoben (Qt6 definiert bereits) - FATAL_LOG Makro hinzugefügt - InfrastructureManagement DDS-Stubs (ism.hpp, ism_enums.hpp, ism_ftc.h) - FilterManagement DDS-Stubs (flt_ftc.h, flt_dts.h) - AreaEffectSimulation DDS-Stubs (aes.hpp, aes_enums.hpp) - SymbolAppearance Klasse vollständig definiert mit content() Methode - BuildingComponentFilter Klasse definiert mit Copy-Konstruktor - Ftc Factory: nullptr Return (abstract class) - AesFilter Klasse in aes.hpp hinzugefügt - Dtc Klasse in ppm.hpp mit participantChanged Signal - AesType Enum: alle 15 At* Werte definiert - AesEffectState_def: EsReceived hinzugefügt - DataModification Enum: eAdded/eModified/eRemoved - function_reply_object.h → core_types.h Include-Pfad (72 Dateien) - Enum-Class-Streaming Template-Operator in INGLLogger.h - ism_mounting_point.h: QImage → QtGui/QImage, QGuiApplication/QScreen - ism_data_plugin_interface.h: QSet Include, Include-Reihenfolge - QRegExp → QRegularExpression in tpm_js_parser.cpp - .underlying() Aufrufe zu direktem Enum-Vergleich korrigiert - Include-Pfade: aes.hpp in symbol_appearance_settings_impl.h und aes_display_filter_impl.h Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
2785 files changed
+18754
-18316
No files matched your search
@@ -32,7 +32,7 @@ CODEGEN_TOPIC_TYPEDEFS(SRCS_common ${xml_FILE})
|
||||
# Generate tgt_[d|f]tc.h
|
||||
CODEGEN_CLIENT_TOPICS_IFC(SRCS_common ${xml_FILE})
|
||||
|
||||
NGL_ADD_LIBRARY(AAR SV WS svcTgtCommon SHARED ${SRCS_common})
|
||||
NGL_ADD_LIBRARY2(AAR SV WS svcTgtCommon SHARED ${SRCS_common})
|
||||
NGL_TARGET_INCLUDE_DIRECTORIES(svcTgtCommon
|
||||
PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../
|
||||
@@ -60,7 +60,7 @@ SET(SRCS_client
|
||||
# generate tgt_[d|f]tc.h, tgt_[d|f]tc_impl.[cpp|h]
|
||||
CODEGEN_CLIENT_TOPICS_IMPL(SRCS_client ${xml_FILE})
|
||||
|
||||
NGL_ADD_LIBRARY(AAR SV WS svcTgtClient SHARED ${SRCS_client})
|
||||
NGL_ADD_LIBRARY2(AAR SV WS svcTgtClient SHARED ${SRCS_client})
|
||||
NGL_TARGET_INCLUDE_DIRECTORIES(svcTgtClient
|
||||
PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../
|
||||
@@ -89,7 +89,7 @@ SET(SRCS_server
|
||||
# generate tgt_[d|f]ts.h, tgt_[d|f]ts_impl.[cpp|h]
|
||||
CODEGEN_SERVER_TOPICS(SRCS_server ${xml_FILE})
|
||||
|
||||
NGL_ADD_LIBRARY(AAR SV svcTgtServer SHARED ${SRCS_server})
|
||||
NGL_ADD_LIBRARY2(AAR SV svcTgtServer SHARED ${SRCS_server})
|
||||
NGL_TARGET_INCLUDE_DIRECTORIES(svcTgtServer
|
||||
PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../
|
||||
|
||||
+26
-27
@@ -54,13 +54,12 @@ namespace TargetManagement
|
||||
{
|
||||
TgtTests::TgtTests(QObject *parent)
|
||||
: QObject(parent)
|
||||
, m_logger(getLogger("TgtTests"))
|
||||
{}
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
bool TgtTests::init(int domainId, int testId, int operatorId, int shootbackAreaId)
|
||||
{
|
||||
INFO_LOG(m_logger) << "init begin";
|
||||
INFO_LOG() << "init begin";
|
||||
|
||||
m_testId = testId;
|
||||
m_operatorId = operatorId;
|
||||
@@ -90,7 +89,7 @@ bool TgtTests::init(int domainId, int testId, int operatorId, int shootbackAreaI
|
||||
// ------------------------------------------------------------------
|
||||
void TgtTests::startTest()
|
||||
{
|
||||
INFO_LOG(m_logger) << "startTest m_testId=" << m_testId;
|
||||
INFO_LOG() << "startTest m_testId=" << m_testId;
|
||||
if (m_testId == 1) // Send FTC ConfigureAlarms and EEM Event
|
||||
{
|
||||
QTimer::singleShot(0, this, &TgtTests::tryCreateParticipant);
|
||||
@@ -133,7 +132,7 @@ void TgtTests::tryCreateShootbackArea()
|
||||
|
||||
if (!m_ftcTgt->shootbackAreaModifyRequest(request, this))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error requesting create Shootback Area";
|
||||
ERROR_LOG() << "Error requesting create Shootback Area";
|
||||
failExit();
|
||||
}
|
||||
|
||||
@@ -149,7 +148,7 @@ void TgtTests::tryUpdateShootbackArea()
|
||||
|
||||
if (!m_ftcTgt->shootbackAreaModifyRequest(request, this))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error requesting modify Shootback Area";
|
||||
ERROR_LOG() << "Error requesting modify Shootback Area";
|
||||
failExit();
|
||||
}
|
||||
|
||||
@@ -164,7 +163,7 @@ void TgtTests::tryRemoveShootbackArea()
|
||||
|
||||
if (!m_ftcTgt->shootbackAreaRemoveRequest(request, this))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error requesting remove Shootback Area";
|
||||
ERROR_LOG() << "Error requesting remove Shootback Area";
|
||||
failExit();
|
||||
}
|
||||
|
||||
@@ -173,7 +172,7 @@ void TgtTests::tryRemoveShootbackArea()
|
||||
// ------------------------------------------------------------------
|
||||
void TgtTests::tryRequestTechnicalState()
|
||||
{
|
||||
INFO_LOG(m_logger) << "trying to send createRequest Operator Message";
|
||||
INFO_LOG() << "trying to send createRequest Operator Message";
|
||||
|
||||
ConfigureTargetRequest request;
|
||||
|
||||
@@ -183,7 +182,7 @@ void TgtTests::tryRequestTechnicalState()
|
||||
|
||||
if (!m_ftcTgt->configureTargetRequest(request, this))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error requesting create data";
|
||||
ERROR_LOG() << "Error requesting create data";
|
||||
failExit();
|
||||
}
|
||||
} // tryRequestTechnicalState
|
||||
@@ -191,7 +190,7 @@ void TgtTests::tryRequestTechnicalState()
|
||||
// ------------------------------------------------------------------
|
||||
void TgtTests::tryConfigureTargetMode()
|
||||
{
|
||||
INFO_LOG(m_logger) << "trying to send createRequest Operator Message";
|
||||
INFO_LOG() << "trying to send createRequest Operator Message";
|
||||
|
||||
ConfigureTargetRequest request;
|
||||
|
||||
@@ -204,7 +203,7 @@ void TgtTests::tryConfigureTargetMode()
|
||||
|
||||
if (!m_ftcTgt->configureTargetRequest(request, this))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error requesting create data";
|
||||
ERROR_LOG() << "Error requesting create data";
|
||||
failExit();
|
||||
}
|
||||
} // tryConfigureTargetMode
|
||||
@@ -212,7 +211,7 @@ void TgtTests::tryConfigureTargetMode()
|
||||
// ------------------------------------------------------------------
|
||||
void TgtTests::tryConfigureTargetWeapon()
|
||||
{
|
||||
INFO_LOG(m_logger) << "trying to send createRequest Operator Message";
|
||||
INFO_LOG() << "trying to send createRequest Operator Message";
|
||||
|
||||
ConfigureTargetRequest request;
|
||||
|
||||
@@ -223,7 +222,7 @@ void TgtTests::tryConfigureTargetWeapon()
|
||||
|
||||
if (!m_ftcTgt->configureTargetRequest(request, this))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error requesting create data";
|
||||
ERROR_LOG() << "Error requesting create data";
|
||||
failExit();
|
||||
}
|
||||
} // tryConfigureTargetWeapon
|
||||
@@ -242,7 +241,7 @@ void TgtTests::tryCreateTargetData()
|
||||
|
||||
if (!m_dtsTab->publish(targetData))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error publish targetData";
|
||||
ERROR_LOG() << "Error publish targetData";
|
||||
failExit();
|
||||
}
|
||||
}
|
||||
@@ -250,7 +249,7 @@ void TgtTests::tryCreateTargetData()
|
||||
// ------------------------------------------------------------------
|
||||
void TgtTests::tryCreateParticipant()
|
||||
{
|
||||
INFO_LOG(m_logger) << "trying to create Participant index = " << m_participantIndex;
|
||||
INFO_LOG() << "trying to create Participant index = " << m_participantIndex;
|
||||
ParticipantManagement::Participant participant;
|
||||
participant.id(5);
|
||||
participant.superiorId(0);
|
||||
@@ -259,10 +258,10 @@ void TgtTests::tryCreateParticipant()
|
||||
participant.inferiorIds().at(1) = 3;
|
||||
participant.partyId(5);
|
||||
participant.equipmentNumber(1001);
|
||||
DEBUG_LOG(m_logger) << "Publishing Participant";
|
||||
DEBUG_LOG() << "Publishing Participant";
|
||||
if (!m_dtsPpm->publish(participant))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error publish Participant";
|
||||
ERROR_LOG() << "Error publish Participant";
|
||||
failExit();
|
||||
}
|
||||
m_participantIndex++;
|
||||
@@ -272,11 +271,11 @@ void TgtTests::tryCreateParticipant()
|
||||
// ------------------------------------------------------------------
|
||||
void TgtTests::onShootbackAreaModifyReply(const Core::FunctionReplyObject &replyObject)
|
||||
{
|
||||
INFO_LOG(m_logger) << "onShootbackAreaModifyReply on id " << replyObject.id()
|
||||
INFO_LOG() << "onShootbackAreaModifyReply on id " << replyObject.id()
|
||||
<< " and error = " << replyObject.error();
|
||||
if (replyObject.error())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error onShoobackAreaModifyReply - aborting";
|
||||
ERROR_LOG() << "Error onShoobackAreaModifyReply - aborting";
|
||||
failExit();
|
||||
}
|
||||
|
||||
@@ -287,11 +286,11 @@ void TgtTests::onShootbackAreaModifyReply(const Core::FunctionReplyObject &reply
|
||||
// ------------------------------------------------------------------
|
||||
void TgtTests::onShootbackAreaRemoveReply(const Core::FunctionReplyObject &replyObject)
|
||||
{
|
||||
INFO_LOG(m_logger) << "onShootbackAreaModifyReply on id " << replyObject.id()
|
||||
INFO_LOG() << "onShootbackAreaModifyReply on id " << replyObject.id()
|
||||
<< " and error = " << replyObject.error();
|
||||
if (replyObject.error())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error onShootbackAreaRemoveReply - aborting";
|
||||
ERROR_LOG() << "Error onShootbackAreaRemoveReply - aborting";
|
||||
failExit();
|
||||
}
|
||||
|
||||
@@ -301,10 +300,10 @@ void TgtTests::onShootbackAreaRemoveReply(const Core::FunctionReplyObject &reply
|
||||
// ------------------------------------------------------------------
|
||||
void TgtTests::onConfigureTargetReply(const Core::FunctionReplyObject &replyObject)
|
||||
{
|
||||
INFO_LOG(m_logger) << "onConfigureTargetReply, error = " << replyObject.error();
|
||||
INFO_LOG() << "onConfigureTargetReply, error = " << replyObject.error();
|
||||
if (replyObject.error())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error ConfigureTargets - aborting";
|
||||
ERROR_LOG() << "Error ConfigureTargets - aborting";
|
||||
failExit();
|
||||
}
|
||||
} // onConfigureTargetReply
|
||||
@@ -312,11 +311,11 @@ void TgtTests::onConfigureTargetReply(const Core::FunctionReplyObject &replyObje
|
||||
// ------------------------------------------------------------------
|
||||
void TgtTests::checkAlarm()
|
||||
{
|
||||
INFO_LOG(m_logger) << "checkAlarm";
|
||||
INFO_LOG() << "checkAlarm";
|
||||
m_dtcTgt->waitForHistoricalDataTargetConfig();
|
||||
//qint32 id = 0;
|
||||
/*TargetManagement::Notification notification = m_dtcTgt->notification(id);
|
||||
INFO_LOG(m_logger) << "Recived TargetManagement::Notification: " << notification
|
||||
INFO_LOG() << "Recived TargetManagement::Notification: " << notification
|
||||
<< " testId: " << m_testId;
|
||||
|
||||
switch (m_testId)
|
||||
@@ -324,12 +323,12 @@ void TgtTests::checkAlarm()
|
||||
case 1:
|
||||
case 2:
|
||||
case 3:
|
||||
INFO_LOG(m_logger) << "ExitSuccess";
|
||||
INFO_LOG() << "ExitSuccess";
|
||||
ExitSuccess();
|
||||
break;
|
||||
default:
|
||||
// nothing
|
||||
INFO_LOG(m_logger) << "failExit";
|
||||
INFO_LOG() << "failExit";
|
||||
failExit();
|
||||
break;
|
||||
}*/
|
||||
@@ -345,7 +344,7 @@ void TgtTests::failExit()
|
||||
// ------------------------------------------------------------------
|
||||
void TgtTests::ExitSuccess()
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "SUCCESS";
|
||||
DEBUG_LOG() << "SUCCESS";
|
||||
m_bTestsSuccessful = true;
|
||||
QTimer::singleShot(0, qApp, &QCoreApplication::quit);
|
||||
} // ExitSuccess
|
||||
|
||||
@@ -71,8 +71,6 @@ private:
|
||||
int m_operatorId{-1};
|
||||
int m_participantIndex{0};
|
||||
int m_shootbackAreaId{-1};
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
};
|
||||
|
||||
} // namespace TargetManagement
|
||||
+29
-29
@@ -100,7 +100,7 @@ tgtTestShootbackTarget::~tgtTestShootbackTarget()
|
||||
|
||||
void tgtTestShootbackTarget::initTestCase()
|
||||
{
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " do testing with"
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " do testing with"
|
||||
<< " domainId=" << m_domainId
|
||||
<< " exerciseId=" << m_exerciseId;
|
||||
|
||||
@@ -128,7 +128,7 @@ void tgtTestShootbackTarget::initTestCase()
|
||||
removeTestObjects();
|
||||
|
||||
if (!bRet)
|
||||
FATAL_LOG(m_logger) << LOGFUNCTION << " init failed!!!";
|
||||
FATAL_LOG(m_logger) << Q_FUNC_INFO << " init failed!!!";
|
||||
}
|
||||
|
||||
|
||||
@@ -155,7 +155,7 @@ void tgtTestShootbackTarget::testShootbackArea()
|
||||
|
||||
// time to process reply
|
||||
QTest::qWait(100);
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " got m_replyShootbackAreaId: " << m_replyShootbackAreaId;
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " got m_replyShootbackAreaId: " << m_replyShootbackAreaId;
|
||||
|
||||
|
||||
// modify
|
||||
@@ -169,7 +169,7 @@ void tgtTestShootbackTarget::testShootbackArea()
|
||||
// verify mod
|
||||
{
|
||||
TargetManagement::ShootbackArea modData = m_dtcTgt->shootbackArea(m_replyShootbackAreaId);
|
||||
INFO_LOG(m_logger) << LOGFUNCTION << "modData=" << modData;
|
||||
INFO_LOG() << Q_FUNC_INFO << "modData=" << modData;
|
||||
QVERIFY2((modData.id() == m_replyShootbackAreaId), " shootbackArea failed");
|
||||
QVERIFY2((modData.name().compare(request.name()) == 0), " verify name failed");
|
||||
}
|
||||
@@ -207,7 +207,7 @@ void tgtTestShootbackTarget::testShootbackTarget()
|
||||
|
||||
// time to process reply
|
||||
QTest::qWait(100);
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " got m_replyShootbackTargetId: " << m_replyShootbackTargetId;
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " got m_replyShootbackTargetId: " << m_replyShootbackTargetId;
|
||||
|
||||
|
||||
// modify
|
||||
@@ -220,13 +220,13 @@ void tgtTestShootbackTarget::testShootbackTarget()
|
||||
QSignalSpy spy(m_dtcTgt.get(), &TargetManagement::Interface::Dtc::shootbackTargetChanged);
|
||||
if (spy.count() == 0)
|
||||
spy.wait(2000);
|
||||
INFO_LOG(m_logger) << LOGFUNCTION << "spy.count()=" << spy.count();
|
||||
INFO_LOG() << Q_FUNC_INFO << "spy.count()=" << spy.count();
|
||||
QVERIFY2((spy.count() == 1), " spy failed");
|
||||
|
||||
// verify mod
|
||||
{
|
||||
TargetManagement::ShootbackTarget modData = m_dtcTgt->shootbackTarget(m_replyShootbackTargetId);
|
||||
INFO_LOG(m_logger) << LOGFUNCTION << "modData=" << modData;
|
||||
INFO_LOG() << Q_FUNC_INFO << "modData=" << modData;
|
||||
QVERIFY2((modData.id() == m_replyShootbackTargetId), " shootbackTarget failed");
|
||||
QVERIFY2((modData.name().compare(request.name()) == 0), " verify name failed");
|
||||
}
|
||||
@@ -268,7 +268,7 @@ void tgtTestShootbackTarget::testTargetAreaAssignment()
|
||||
QSignalSpy spy(m_dtcTgt.get(), &TargetManagement::Interface::Dtc::targetAreaAssignmentChanged);
|
||||
if (spy.count() == 0)
|
||||
spy.wait(2000);
|
||||
INFO_LOG(m_logger) << LOGFUNCTION << "spy.count()=" << spy.count();
|
||||
INFO_LOG() << Q_FUNC_INFO << "spy.count()=" << spy.count();
|
||||
QVERIFY2((spy.count() == 1), " spy failed");
|
||||
|
||||
// time to process reply
|
||||
@@ -288,13 +288,13 @@ void tgtTestShootbackTarget::testTargetAreaAssignment()
|
||||
QSignalSpy spy(m_dtcTgt.get(), &TargetManagement::Interface::Dtc::targetAreaAssignmentChanged);
|
||||
if (spy.count() == 0)
|
||||
spy.wait(2000);
|
||||
INFO_LOG(m_logger) << LOGFUNCTION << "spy.count()=" << spy.count();
|
||||
INFO_LOG() << Q_FUNC_INFO << "spy.count()=" << spy.count();
|
||||
QVERIFY2((spy.count() == 1), " spy failed");
|
||||
|
||||
// verify mod
|
||||
{
|
||||
TargetManagement::TargetAreaAssignment modData = m_dtcTgt->targetAreaAssignment(m_replyTargetAreaAssignmentId);
|
||||
INFO_LOG(m_logger) << LOGFUNCTION << "modData=" << modData;
|
||||
INFO_LOG() << Q_FUNC_INFO << "modData=" << modData;
|
||||
QVERIFY2((modData.id() == m_replyTargetAreaAssignmentId), " targetAreaAssignment failed");
|
||||
QVERIFY2((modData.name().compare(request.name()) == 0), " verify name failed");
|
||||
}
|
||||
@@ -321,38 +321,38 @@ void tgtTestShootbackTarget::removeTestObjects()
|
||||
// first, remove all TargetAreaAssignments:
|
||||
{
|
||||
QMap<qint32, TargetManagement::TargetAreaAssignment> allObj = m_dtcTgt->targetAreaAssignments();
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " remove... (" << allObj.size() << " TargetAreaAssignments)";
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " remove... (" << allObj.size() << " TargetAreaAssignments)";
|
||||
for (auto item: std::as_const(allObj))
|
||||
if (item.name().substr(0, 8).compare("UnitTest") == 0)
|
||||
removeAssignment(item.id());
|
||||
QTest::qWait(250); // time to process reply
|
||||
allObj = m_dtcTgt->targetAreaAssignments();
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " remove targetAreaAssignments finished -> " << allObj.size() << " TargetAreaAssignments";
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " remove targetAreaAssignments finished -> " << allObj.size() << " TargetAreaAssignments";
|
||||
}
|
||||
|
||||
// remove all Areas:
|
||||
{
|
||||
QMap<qint32, TargetManagement::ShootbackArea> allObj = m_dtcTgt->shootbackAreas();
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " remove... (" << allObj.size() << " Areas)";
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " remove... (" << allObj.size() << " Areas)";
|
||||
for (auto item: std::as_const(allObj))
|
||||
if (item.name().substr(0, 8).compare("UnitTest") == 0)
|
||||
removeArea(item.id());
|
||||
QTest::qWait(250); // time to process reply
|
||||
allObj = m_dtcTgt->shootbackAreas();
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " remove shootbackAreas finished -> " << allObj.size() << " Areas";
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " remove shootbackAreas finished -> " << allObj.size() << " Areas";
|
||||
}
|
||||
|
||||
// remove all Targets:
|
||||
{
|
||||
QMap<qint32, TargetManagement::ShootbackTarget> allObj = m_dtcTgt->shootbackTargets();
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " remove... (" << allObj.size() << " Targets)";
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " remove... (" << allObj.size() << " Targets)";
|
||||
for (auto item: std::as_const(allObj))
|
||||
if (item.name().substr(0, 8).compare("UnitTest") == 0)
|
||||
removeTarget(item.id());
|
||||
QTest::qWait(250); // time to process reply
|
||||
|
||||
allObj = m_dtcTgt->shootbackTargets();
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " remove shootbackTargets finished -> " << allObj.size() << " Targets";
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " remove shootbackTargets finished -> " << allObj.size() << " Targets";
|
||||
}
|
||||
QTest::qWait(1000); // time to process
|
||||
}
|
||||
@@ -387,7 +387,7 @@ void tgtTestShootbackTarget::createArea(int &areaIdInOut, const QString &name, d
|
||||
|
||||
// time to process reply
|
||||
QTest::qWait(100);
|
||||
INFO_LOG(m_logger) << LOGFUNCTION << " got m_replyShootbackAreaId: " << m_replyShootbackAreaId;
|
||||
INFO_LOG() << Q_FUNC_INFO << " got m_replyShootbackAreaId: " << m_replyShootbackAreaId;
|
||||
|
||||
areaIdInOut = m_replyShootbackAreaId;
|
||||
}
|
||||
@@ -447,7 +447,7 @@ void tgtTestShootbackTarget::createTarget(int &targetIdOut, int targetParticipan
|
||||
|
||||
// time to process reply
|
||||
QTest::qWait(100);
|
||||
INFO_LOG(m_logger) << LOGFUNCTION << " got m_replyShootbackTargetId: " << m_replyShootbackTargetId;
|
||||
INFO_LOG() << Q_FUNC_INFO << " got m_replyShootbackTargetId: " << m_replyShootbackTargetId;
|
||||
|
||||
targetIdOut = m_replyShootbackTargetId;
|
||||
}
|
||||
@@ -515,7 +515,7 @@ void tgtTestShootbackTarget::createAssignment(int areaId, int targetParticipantI
|
||||
|
||||
// time to process reply
|
||||
QTest::qWait(100);
|
||||
INFO_LOG(m_logger) << LOGFUNCTION << " got m_replyTargetAreaAssignmentId: " << m_replyTargetAreaAssignmentId;
|
||||
INFO_LOG() << Q_FUNC_INFO << " got m_replyTargetAreaAssignmentId: " << m_replyTargetAreaAssignmentId;
|
||||
|
||||
assignmentIdOut = m_replyTargetAreaAssignmentId;
|
||||
}
|
||||
@@ -564,7 +564,7 @@ void tgtTestShootbackTarget::moveParticipant(int participantId, double lon, doub
|
||||
if (!m_dtsPpm)
|
||||
return;
|
||||
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " move Participant: id = " << participantId;
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " move Participant: id = " << participantId;
|
||||
ParticipantManagement::ParticipantPosition posReq;
|
||||
posReq.participantId(participantId);
|
||||
posReq.sampleTime(currentSampleTime());
|
||||
@@ -572,7 +572,7 @@ void tgtTestShootbackTarget::moveParticipant(int participantId, double lon, doub
|
||||
posReq.partyId(2); // 0 and 1 will be skipped
|
||||
if (!m_dtsPpm->publish(posReq))
|
||||
{
|
||||
ERROR_LOG(m_logger) << LOGFUNCTION << " Error publish posReq";
|
||||
ERROR_LOG() << Q_FUNC_INFO << " Error publish posReq";
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -727,7 +727,7 @@ void tgtTestShootbackTarget::testPlayerMovesLos()
|
||||
|
||||
// move assigned target 1 slightly:
|
||||
{
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " move target1 ...";
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " move target1 ...";
|
||||
modifyTarget(m_targetDataId1, g_targetParticipantId_1, QStringLiteral("UnitTest-TargetDataId1_Moved"), 0.149, 0.926, 55.0);
|
||||
|
||||
QTest::qWait(250); // time to process
|
||||
@@ -736,7 +736,7 @@ void tgtTestShootbackTarget::testPlayerMovesLos()
|
||||
|
||||
// move (z) assigned target 1 to interrupt line of sight:
|
||||
{
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " move target1 ...";
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " move target1 ...";
|
||||
modifyTarget(m_targetDataId1, g_targetParticipantId_1, QStringLiteral("UnitTest-TargetDataId1_Moved"), 0.152, 0.926, 2.0);
|
||||
|
||||
QTest::qWait(250); // time to process
|
||||
@@ -878,7 +878,7 @@ void tgtTestShootbackTarget::onShootbackAreaModifyReply(const Core::FunctionRepl
|
||||
m_replyShootbackAreaId = reply.id();
|
||||
if (reply.error())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error onShootbackAreaRemoveReply - aborting: '" << reply.str() << "'";
|
||||
ERROR_LOG() << "Error onShootbackAreaRemoveReply - aborting: '" << reply.str() << "'";
|
||||
m_replyShootbackAreaId = -1;
|
||||
}
|
||||
}
|
||||
@@ -888,7 +888,7 @@ void tgtTestShootbackTarget::onShootbackAreaRemoveReply(const Core::FunctionRepl
|
||||
m_replyShootbackAreaId = reply.id();
|
||||
if (reply.error())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error onShootbackAreaRemoveReply - aborting: '" << reply.str() << "'"
|
||||
ERROR_LOG() << "Error onShootbackAreaRemoveReply - aborting: '" << reply.str() << "'"
|
||||
<< ", id="<< reply.id();
|
||||
m_replyShootbackAreaId = -1;
|
||||
}
|
||||
@@ -901,7 +901,7 @@ void tgtTestShootbackTarget::onShootbackTargetModifyReply(const Core::FunctionRe
|
||||
m_replyShootbackTargetId = reply.id();
|
||||
if (reply.error())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error onShootbackAreaRemoveReply - aborting: '" << reply.str() << "'";
|
||||
ERROR_LOG() << "Error onShootbackAreaRemoveReply - aborting: '" << reply.str() << "'";
|
||||
m_replyShootbackTargetId = -1;
|
||||
}
|
||||
}
|
||||
@@ -911,7 +911,7 @@ void tgtTestShootbackTarget::onShootbackTargetRemoveReply(const Core::FunctionRe
|
||||
m_replyShootbackTargetId = reply.id();
|
||||
if (reply.error())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error onShootbackAreaRemoveReply - aborting: '" << reply.str() << "'"
|
||||
ERROR_LOG() << "Error onShootbackAreaRemoveReply - aborting: '" << reply.str() << "'"
|
||||
<< ", id="<< reply.id();
|
||||
m_replyShootbackTargetId = -1;
|
||||
}
|
||||
@@ -924,7 +924,7 @@ void tgtTestShootbackTarget::onTargetAreaAssignmentModifyReply(const Core::Funct
|
||||
m_replyTargetAreaAssignmentId = reply.id();
|
||||
if (reply.error())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error onShootbackAreaRemoveReply - aborting: '" << reply.str() << "'";
|
||||
ERROR_LOG() << "Error onShootbackAreaRemoveReply - aborting: '" << reply.str() << "'";
|
||||
m_replyTargetAreaAssignmentId = -1;
|
||||
}
|
||||
}
|
||||
@@ -934,7 +934,7 @@ void tgtTestShootbackTarget::onTargetAreaAssignmentRemoveReply(const Core::Funct
|
||||
m_replyTargetAreaAssignmentId = reply.id();
|
||||
if (reply.error())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error onShootbackAreaRemoveReply - aborting: '" << reply.str() << "'"
|
||||
ERROR_LOG() << "Error onShootbackAreaRemoveReply - aborting: '" << reply.str() << "'"
|
||||
<< ", id="<< reply.id();
|
||||
m_replyTargetAreaAssignmentId = -1;
|
||||
}
|
||||
|
||||
-3
@@ -124,8 +124,5 @@ private:
|
||||
int m_replyShootbackAreaId = -1;
|
||||
int m_replyShootbackTargetId = -1;
|
||||
int m_replyTargetAreaAssignmentId = -1;
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
|
||||
};
|
||||
} // namespace
|
||||
@@ -16,16 +16,15 @@ namespace TargetManagement
|
||||
|
||||
DdsHandler::DdsHandler(int domainId, int exerciseId)
|
||||
: m_ddsConnector(std::make_shared<DDSConnector::DdsConnector>(domainId, IDL::PartitionType::Exercise, exerciseId))
|
||||
, m_logger(getLogger("DdsHandler"))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "DdsHandler(" << m_ddsConnector->getDomainId() << ") for partition: " << m_ddsConnector->getDefaultPartition();
|
||||
DEBUG_LOG() << "DdsHandler(" << m_ddsConnector->getDomainId() << ") for partition: " << m_ddsConnector->getDefaultPartition();
|
||||
}
|
||||
|
||||
bool DdsHandler::init(const QStringList &qosFileList)
|
||||
{
|
||||
if (!m_ddsConnector->init(qosFileList))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error initializing dds connections - aborting";
|
||||
ERROR_LOG() << "Error initializing dds connections - aborting";
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -44,18 +43,18 @@ bool DdsHandler::init(const QStringList &qosFileList)
|
||||
// DTS Target
|
||||
m_dtsTgt = TargetManagement::Interface::Dts::create(m_ddsConnector);
|
||||
bool bRet = m_dtsTgt->enableAll();
|
||||
INFO_LOG(m_logger) << "Dts initialised";
|
||||
INFO_LOG() << "Dts initialised";
|
||||
|
||||
// FTS Target
|
||||
m_ftsTgt = TargetManagement::Interface::Fts::create(m_ddsConnector);
|
||||
bRet &= m_ftsTgt->enableAll();
|
||||
INFO_LOG(m_logger) << "Fts initialised";
|
||||
INFO_LOG() << "Fts initialised";
|
||||
|
||||
// DTC TrainingAreaBase
|
||||
m_dtcTab = TrainingAreaBase::Interface::Dtc::create(m_ddsConnector);
|
||||
if (!m_dtcTab->enableTargetData())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Could not enable receive TAB";
|
||||
ERROR_LOG() << "Could not enable receive TAB";
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -63,7 +62,7 @@ bool DdsHandler::init(const QStringList &qosFileList)
|
||||
m_ftcTab = TrainingAreaBase::Interface::Ftc::create(m_ddsConnector);
|
||||
if (!m_ftcTab->enableSendTargetData())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Could not enable Send TAB";
|
||||
ERROR_LOG() << "Could not enable Send TAB";
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -76,7 +75,7 @@ bool DdsHandler::init(const QStringList &qosFileList)
|
||||
m_dtcPpm->enableEquipmentType()
|
||||
))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Could not initialize ParticipantManagement enableXXX data topic client";
|
||||
ERROR_LOG() << "Could not initialize ParticipantManagement enableXXX data topic client";
|
||||
return false;
|
||||
}
|
||||
// Get 'static' data for all participants (playerdata)
|
||||
@@ -104,7 +103,7 @@ bool DdsHandler::init(const QStringList &qosFileList)
|
||||
int DdsHandler::participantId2EquipNo(const int participantId) const
|
||||
{
|
||||
int ret = m_partId2EquipNoMap.value(participantId, 0);
|
||||
INFO_LOG(m_logger) << "participantId2EquipNo participantId=" << participantId
|
||||
INFO_LOG() << "participantId2EquipNo participantId=" << participantId
|
||||
<< " EquipmentNumber=" << ret;
|
||||
return ret;
|
||||
} // end of participantId2EquipNo()
|
||||
@@ -112,7 +111,7 @@ int DdsHandler::participantId2EquipNo(const int participantId) const
|
||||
int DdsHandler::equipNo2participantId(const int equipmentNumber) const
|
||||
{
|
||||
int ret = m_equipNo2partIdMap.value(equipmentNumber, 0);
|
||||
INFO_LOG(m_logger) << "EquipNo2participantId equipmentNumber=" << equipmentNumber
|
||||
INFO_LOG() << "EquipNo2participantId equipmentNumber=" << equipmentNumber
|
||||
<< " ParticipantId=" << ret;
|
||||
return ret;
|
||||
} // end of EquipNo2participantId()
|
||||
@@ -122,7 +121,7 @@ int DdsHandler::equipNo2participantId(const int equipmentNumber) const
|
||||
// ///////////////////////////////////
|
||||
void DdsHandler::onParticipantChanged(const ParticipantManagement::Participant &data, DataModification modType)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "onParticipantChanged";
|
||||
DEBUG_LOG() << "onParticipantChanged";
|
||||
if (modType == DataModification::eRemoved)
|
||||
m_partId2EquipNoMap.remove(data.id());
|
||||
else
|
||||
@@ -136,7 +135,7 @@ void DdsHandler::onParticipantChanged(const ParticipantManagement::Participant &
|
||||
{
|
||||
for (auto i = m_partId2EquipNoMap.begin(); i != m_partId2EquipNoMap.end(); ++i)
|
||||
{
|
||||
TRACE_LOG(m_logger) << " partId2EquipNoMap.size(): " << m_partId2EquipNoMap.size()
|
||||
TRACE_LOG() << " partId2EquipNoMap.size(): " << m_partId2EquipNoMap.size()
|
||||
<< " partId: " << i.key()
|
||||
<< " eqNo: " << i.value();
|
||||
}
|
||||
|
||||
@@ -77,8 +77,6 @@ private:
|
||||
|
||||
QMap<int, int> m_partId2EquipNoMap; ///< Reference map participant (player) to equipment number
|
||||
QMap<int, int> m_equipNo2partIdMap; ///< Reference map equipment number (player) to participant
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
};
|
||||
|
||||
} // namespace TargetManagement
|
||||
+14
-15
@@ -19,23 +19,22 @@ HandlerShootbackArea::HandlerShootbackArea(MainHandler *mainHandler)
|
||||
, ShootbackAreaRemoveRequestHandler(mainHandler->dds()->ftsTgt())
|
||||
, m_mainHandler(mainHandler)
|
||||
, m_dtsTgt(m_mainHandler->dds()->dtsTgt())
|
||||
, m_logger(getLogger("HandlerShootbackArea"))
|
||||
{
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
HandlerShootbackArea::~HandlerShootbackArea()
|
||||
{
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
bool HandlerShootbackArea::init()
|
||||
{
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
|
||||
// connect(m_dtcTab.get(), &TrainingAreaBase::Interface::Dtc::targetDataChanged,
|
||||
// this, &HandlerShootbackArea::onTargetDataChanged);
|
||||
@@ -44,13 +43,13 @@ bool HandlerShootbackArea::init()
|
||||
// create objects
|
||||
auto cb = [this, &bRet](const Database::TgtShootbackArea & data)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Reading from DB ShootbackArea with id = " << data.id;
|
||||
DEBUG_LOG() << "Reading from DB ShootbackArea with id = " << data.id;
|
||||
ObjectShootbackArea *ifs(new ObjectShootbackArea(m_mainHandler));
|
||||
Core::FunctionReplyObject ret = ifs->createObject(ObjectShootbackArea::toDdsData(data));
|
||||
if (ret.error())
|
||||
{
|
||||
delete ifs;
|
||||
ERROR_LOG(m_logger) << ret();
|
||||
ERROR_LOG() << ret();
|
||||
bRet = false;
|
||||
return;
|
||||
}
|
||||
@@ -58,10 +57,10 @@ bool HandlerShootbackArea::init()
|
||||
};
|
||||
if (!m_mainHandler->db()->select(cb) || !bRet)
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error reading data from database!";
|
||||
ERROR_LOG() << "Error reading data from database!";
|
||||
return false;
|
||||
}
|
||||
DEBUG_LOG(m_logger) << "m_objectMap.size() = " << m_objectMap.size();
|
||||
DEBUG_LOG() << "m_objectMap.size() = " << m_objectMap.size();
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -80,7 +79,7 @@ void HandlerShootbackArea::onShootbackAreaModifyRequest(const rti::core::SampleI
|
||||
{
|
||||
const auto ret = shootbackAreaModifyRequest(request);
|
||||
if (ret.error())
|
||||
WARNING_LOG(m_logger) << ret();
|
||||
WARNING_LOG() << ret();
|
||||
|
||||
// For ShootbackController
|
||||
emit objectChanged(ret.id(), false);
|
||||
@@ -91,7 +90,7 @@ void HandlerShootbackArea::onShootbackAreaModifyRequest(const rti::core::SampleI
|
||||
//--------------------------------------------------------------------------
|
||||
Core::FunctionReplyObject HandlerShootbackArea::shootbackAreaModifyRequest(const ShootbackArea &request)
|
||||
{
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
// modify
|
||||
if (request.id() > 0)
|
||||
{
|
||||
@@ -110,7 +109,7 @@ Core::FunctionReplyObject HandlerShootbackArea::shootbackAreaModifyRequest(const
|
||||
}
|
||||
else
|
||||
m_objectMap.insert(ifs->getId(), ifs);
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -118,7 +117,7 @@ Core::FunctionReplyObject HandlerShootbackArea::shootbackAreaModifyRequest(const
|
||||
void HandlerShootbackArea::onShootbackAreaRemoveRequest(const rti::core::SampleIdentity &cookie,
|
||||
const Core::RemoveElementRequest &request)
|
||||
{
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " request=" << request;
|
||||
TRACE_LOG() << Q_FUNC_INFO << " request=" << request;
|
||||
|
||||
Core::FunctionReplyObject ret;
|
||||
ObjectShootbackArea *ifs = m_objectMap.value(request.id());
|
||||
@@ -150,7 +149,7 @@ void HandlerShootbackArea::onShootbackAreaRemoveRequest(const rti::core::SampleI
|
||||
ret = ifs->removeObject();
|
||||
|
||||
if (ret.error())
|
||||
ERROR_LOG(m_logger) << ret();
|
||||
ERROR_LOG() << ret();
|
||||
else
|
||||
{
|
||||
// delete Object
|
||||
|
||||
+1
-1
@@ -67,7 +67,7 @@ private: // attributes
|
||||
QHash<int, ObjectShootbackArea *> m_objectMap;
|
||||
MainHandler *m_mainHandler;
|
||||
std::shared_ptr<TargetManagement::Interface::Dts> m_dtsTgt;
|
||||
NGL::INGLLogger &m_logger; ///< Interface to the Logging-Facility
|
||||
|
||||
|
||||
};
|
||||
} // namespace TargetManagement
|
||||
|
||||
+14
-15
@@ -20,23 +20,22 @@ HandlerShootbackTarget::HandlerShootbackTarget(MainHandler *mainHandler)
|
||||
, ShootbackTargetRemoveRequestHandler(mainHandler->dds()->ftsTgt())
|
||||
, m_mainHandler(mainHandler)
|
||||
, m_dtsTgt(m_mainHandler->dds()->dtsTgt())
|
||||
, m_logger(getLogger("HandlerShootbackTarget"))
|
||||
{
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
HandlerShootbackTarget::~HandlerShootbackTarget()
|
||||
{
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
bool HandlerShootbackTarget::init()
|
||||
{
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
|
||||
// connect(m_dtcTab.get(), &TrainingAreaBase::Interface::Dtc::targetDataChanged,
|
||||
// this, &HandlerShootbackTarget::onTargetDataChanged);
|
||||
@@ -45,13 +44,13 @@ bool HandlerShootbackTarget::init()
|
||||
// create objects
|
||||
auto cb = [this, &bRet](const Database::TgtShootbackTarget & data)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Reading from DB ShootbackTarget with id = " << data.id;
|
||||
DEBUG_LOG() << "Reading from DB ShootbackTarget with id = " << data.id;
|
||||
ObjectShootbackTarget *ifs(new ObjectShootbackTarget(m_mainHandler));
|
||||
Core::FunctionReplyObject ret = ifs->createObject(ObjectShootbackTarget::toDdsData(data));
|
||||
if (ret.error())
|
||||
{
|
||||
delete ifs;
|
||||
ERROR_LOG(m_logger) << ret();
|
||||
ERROR_LOG() << ret();
|
||||
bRet = false;
|
||||
return;
|
||||
}
|
||||
@@ -59,10 +58,10 @@ bool HandlerShootbackTarget::init()
|
||||
};
|
||||
if (!m_mainHandler->db()->select(cb) || !bRet)
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error reading data from database!";
|
||||
ERROR_LOG() << "Error reading data from database!";
|
||||
return false;
|
||||
}
|
||||
DEBUG_LOG(m_logger) << "m_objectMap.size() = " << m_objectMap.size();
|
||||
DEBUG_LOG() << "m_objectMap.size() = " << m_objectMap.size();
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -94,7 +93,7 @@ void HandlerShootbackTarget::onShootbackTargetModifyRequest(const rti::core::Sam
|
||||
{
|
||||
const auto ret = shootbackTargetModifyRequest(request);
|
||||
if (ret.error())
|
||||
WARNING_LOG(m_logger) << ret();
|
||||
WARNING_LOG() << ret();
|
||||
else
|
||||
emit objectChanged(ret.id(), false); // For ShootbackController
|
||||
|
||||
@@ -104,7 +103,7 @@ void HandlerShootbackTarget::onShootbackTargetModifyRequest(const rti::core::Sam
|
||||
//--------------------------------------------------------------------------
|
||||
Core::FunctionReplyObject HandlerShootbackTarget::shootbackTargetModifyRequest(const ShootbackTarget &request)
|
||||
{
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
// modify
|
||||
if (request.id() > 0)
|
||||
{
|
||||
@@ -128,7 +127,7 @@ Core::FunctionReplyObject HandlerShootbackTarget::shootbackTargetModifyRequest(c
|
||||
}
|
||||
else
|
||||
m_objectMap.insert(ifs->getId(), ifs);
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -136,7 +135,7 @@ Core::FunctionReplyObject HandlerShootbackTarget::shootbackTargetModifyRequest(c
|
||||
void HandlerShootbackTarget::onShootbackTargetRemoveRequest(const rti::core::SampleIdentity &cookie,
|
||||
const Core::RemoveElementRequest &request)
|
||||
{
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " request=" << request;
|
||||
TRACE_LOG() << Q_FUNC_INFO << " request=" << request;
|
||||
|
||||
Core::FunctionReplyObject ret;
|
||||
ObjectShootbackTarget *ifs = m_objectMap.value(request.id());
|
||||
@@ -167,7 +166,7 @@ void HandlerShootbackTarget::onShootbackTargetRemoveRequest(const rti::core::Sam
|
||||
ret = ifs->removeObject();
|
||||
|
||||
if (ret.error())
|
||||
ERROR_LOG(m_logger) << ret();
|
||||
ERROR_LOG() << ret();
|
||||
else
|
||||
{
|
||||
// delete Object
|
||||
|
||||
+1
-1
@@ -65,7 +65,7 @@ private: // attributes
|
||||
QHash<int, ObjectShootbackTarget *> m_objectMap;
|
||||
MainHandler *m_mainHandler;
|
||||
std::shared_ptr<TargetManagement::Interface::Dts> m_dtsTgt;
|
||||
NGL::INGLLogger &m_logger; ///< Interface to the Logging-Facility
|
||||
|
||||
|
||||
};
|
||||
} // namespace TargetManagement
|
||||
|
||||
+14
-15
@@ -19,23 +19,22 @@ HandlerTargetAreaAssignment::HandlerTargetAreaAssignment(MainHandler *mainHandle
|
||||
, TargetAreaAssignmentRemoveRequestHandler(mainHandler->dds()->ftsTgt())
|
||||
, m_mainHandler(mainHandler)
|
||||
, m_dtsTgt(m_mainHandler->dds()->dtsTgt())
|
||||
, m_logger(getLogger("HandlerTargetAreaAssignment"))
|
||||
{
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
HandlerTargetAreaAssignment::~HandlerTargetAreaAssignment()
|
||||
{
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
bool HandlerTargetAreaAssignment::init()
|
||||
{
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
|
||||
// connect(m_dtcTab.get(), &TrainingAreaBase::Interface::Dtc::targetDataChanged,
|
||||
// this, &HandlerTargetAreaAssignment::onTargetDataChanged);
|
||||
@@ -44,13 +43,13 @@ bool HandlerTargetAreaAssignment::init()
|
||||
// create objects
|
||||
auto cb = [this, &bRet](const Database::TgtTargetAreaAssignment & data)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Reading from DB TargetAreaAssignment with id = " << data.id;
|
||||
DEBUG_LOG() << "Reading from DB TargetAreaAssignment with id = " << data.id;
|
||||
ObjectTargetAreaAssignment *ifs(new ObjectTargetAreaAssignment(m_mainHandler));
|
||||
Core::FunctionReplyObject ret = ifs->createObject(ObjectTargetAreaAssignment::toDdsData(data));
|
||||
if (ret.error())
|
||||
{
|
||||
delete ifs;
|
||||
ERROR_LOG(m_logger) << ret();
|
||||
ERROR_LOG() << ret();
|
||||
bRet = false;
|
||||
return;
|
||||
}
|
||||
@@ -58,10 +57,10 @@ bool HandlerTargetAreaAssignment::init()
|
||||
};
|
||||
if (!m_mainHandler->db()->select(cb) || !bRet)
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error reading data from database!";
|
||||
ERROR_LOG() << "Error reading data from database!";
|
||||
return false;
|
||||
}
|
||||
DEBUG_LOG(m_logger) << "m_objectMap.size() = " << m_objectMap.size();
|
||||
DEBUG_LOG() << "m_objectMap.size() = " << m_objectMap.size();
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -88,7 +87,7 @@ void HandlerTargetAreaAssignment::onTargetAreaAssignmentModifyRequest(const rti:
|
||||
{
|
||||
const auto ret = TargetAreaAssignmentModifyRequest(request);
|
||||
if (ret.error())
|
||||
WARNING_LOG(m_logger) << ret();
|
||||
WARNING_LOG() << ret();
|
||||
else
|
||||
emit objectChanged(ret.id(), false); // For ShootbackController
|
||||
|
||||
@@ -98,7 +97,7 @@ void HandlerTargetAreaAssignment::onTargetAreaAssignmentModifyRequest(const rti:
|
||||
//--------------------------------------------------------------------------
|
||||
Core::FunctionReplyObject HandlerTargetAreaAssignment::TargetAreaAssignmentModifyRequest(const TargetAreaAssignment &request)
|
||||
{
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
// modify
|
||||
if (request.id() > 0)
|
||||
{
|
||||
@@ -117,7 +116,7 @@ Core::FunctionReplyObject HandlerTargetAreaAssignment::TargetAreaAssignmentModif
|
||||
}
|
||||
else
|
||||
m_objectMap.insert(ifs->getId(), ifs);
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -125,7 +124,7 @@ Core::FunctionReplyObject HandlerTargetAreaAssignment::TargetAreaAssignmentModif
|
||||
void HandlerTargetAreaAssignment::onTargetAreaAssignmentRemoveRequest(const rti::core::SampleIdentity &cookie,
|
||||
const Core::RemoveElementRequest &request)
|
||||
{
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " request=" << request;
|
||||
TRACE_LOG() << Q_FUNC_INFO << " request=" << request;
|
||||
|
||||
Core::FunctionReplyObject ret;
|
||||
ObjectTargetAreaAssignment *ifs = m_objectMap.value(request.id());
|
||||
@@ -147,7 +146,7 @@ void HandlerTargetAreaAssignment::onTargetAreaAssignmentRemoveRequest(const rti:
|
||||
ret = ifs->removeObject();
|
||||
|
||||
if (ret.error())
|
||||
ERROR_LOG(m_logger) << ret();
|
||||
ERROR_LOG() << ret();
|
||||
else
|
||||
{
|
||||
// delete Object
|
||||
|
||||
+1
-1
@@ -59,7 +59,7 @@ private: // attributes
|
||||
QHash<int, ObjectTargetAreaAssignment *> m_objectMap;
|
||||
MainHandler *m_mainHandler;
|
||||
std::shared_ptr<TargetManagement::Interface::Dts> m_dtsTgt;
|
||||
NGL::INGLLogger &m_logger; ///< Interface to the Logging-Facility
|
||||
|
||||
|
||||
};
|
||||
} // namespace TargetManagement
|
||||
|
||||
+13
-14
@@ -19,14 +19,13 @@ HandlerTargetConfig::HandlerTargetConfig(const std::shared_ptr<DdsHandler> &ddsH
|
||||
, m_ddsHandler(ddsHandler)
|
||||
, m_dtcTab(ddsHandler->dtcTab())
|
||||
, m_dtsTgt(ddsHandler->dtsTgt())
|
||||
, m_logger(getLogger("HandlerTargetConfig"))
|
||||
{
|
||||
} // end of ctor()
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
bool HandlerTargetConfig::init()
|
||||
{
|
||||
INFO_LOG(m_logger) << "init";
|
||||
INFO_LOG() << "init";
|
||||
connect(m_dtcTab.get(), &TrainingAreaBase::Interface::Dtc::targetDataChanged,
|
||||
this, &HandlerTargetConfig::onTargetDataChanged);
|
||||
|
||||
@@ -41,10 +40,10 @@ void HandlerTargetConfig::onTargetDataChanged(const TrainingAreaBase::TargetData
|
||||
|
||||
uint8_t responseCmd = 100;
|
||||
TargetManagement::TargetConfig tgtTargetData;
|
||||
INFO_LOG(m_logger) << "onTargetDataChanged payload.size=" << targetData.payload().size();
|
||||
INFO_LOG() << "onTargetDataChanged payload.size=" << targetData.payload().size();
|
||||
tgtTargetData.participantId(m_ddsHandler->equipNo2participantId(targetData.equipmentNumber()));
|
||||
for (size_t i = 0; i < targetData.payload().size(); i++)
|
||||
INFO_LOG(m_logger) << "payload[" << i << "]=" << targetData.payload()[i];
|
||||
INFO_LOG() << "payload[" << i << "]=" << targetData.payload()[i];
|
||||
|
||||
if (targetData.payload().size() < 6)
|
||||
return;
|
||||
@@ -52,29 +51,29 @@ void HandlerTargetConfig::onTargetDataChanged(const TrainingAreaBase::TargetData
|
||||
tgtTargetData.tgtCommand(static_cast <TargetManagement::TgtCommand_def::type>(targetData.payload()[0] - responseCmd));
|
||||
tgtTargetData.mode(static_cast <TargetManagement::Mode_def::type>(targetData.payload()[1]));
|
||||
tgtTargetData.weapon(targetData.payload()[2]);
|
||||
INFO_LOG(m_logger) << "tgtTargetData.tgtCommand =" << tgtTargetData.tgtCommand()
|
||||
INFO_LOG() << "tgtTargetData.tgtCommand =" << tgtTargetData.tgtCommand()
|
||||
<< " mode=" << tgtTargetData.mode()
|
||||
<< " weapon=" << tgtTargetData.weapon();
|
||||
if (!m_dtsTgt->publish(tgtTargetData))
|
||||
ERROR_LOG(m_logger) << "Error publish targetData";
|
||||
ERROR_LOG() << "Error publish targetData";
|
||||
} // end of onTargetDataChanged
|
||||
|
||||
void HandlerTargetConfig::onSendTargetDataReply(const Core::FunctionReplyObject &replyObject)
|
||||
{
|
||||
if (replyObject.error())
|
||||
WARNING_LOG(m_logger) << "Can not send target data to target participant : " << replyObject();
|
||||
WARNING_LOG() << "Can not send target data to target participant : " << replyObject();
|
||||
else
|
||||
DEBUG_LOG(m_logger) << "onSendTargetDataReply for id " << replyObject.id() << " success";
|
||||
DEBUG_LOG() << "onSendTargetDataReply for id " << replyObject.id() << " success";
|
||||
}
|
||||
|
||||
// Send to TAB
|
||||
void HandlerTargetConfig::onConfigureTargetRequest(const rti::core::SampleIdentity &cookie,
|
||||
const ConfigureTargetRequest &request)
|
||||
{
|
||||
INFO_LOG(m_logger) << "onConfigureTargetRequest";
|
||||
INFO_LOG() << "onConfigureTargetRequest";
|
||||
Core::FunctionReplyObject reply = Core::FunctionReplyObject(request.id());
|
||||
|
||||
DEBUG_LOG(m_logger) << "HandlerTargetConfig onTargetConfigChanged participantId=" << request.participantId();
|
||||
DEBUG_LOG() << "HandlerTargetConfig onTargetConfigChanged participantId=" << request.participantId();
|
||||
|
||||
TrainingAreaBase::SendTargetDataRequest tgt;
|
||||
const int participantId = request.participantId();
|
||||
@@ -88,7 +87,7 @@ void HandlerTargetConfig::onConfigureTargetRequest(const rti::core::SampleIdenti
|
||||
case TargetManagement::TgtCommand_def::Unknown:
|
||||
case TargetManagement::TgtCommand_def::PlaySound:
|
||||
{
|
||||
WARNING_LOG(m_logger) << "onTargetConfigChanged Command =" << request.tgtCommand() << " not handled.";
|
||||
WARNING_LOG() << "onTargetConfigChanged Command =" << request.tgtCommand() << " not handled.";
|
||||
m_ddsHandler->ftsTgt()->configureTargetReply(cookie, reply);
|
||||
return;
|
||||
}
|
||||
@@ -102,7 +101,7 @@ void HandlerTargetConfig::onConfigureTargetRequest(const rti::core::SampleIdenti
|
||||
{
|
||||
if (!request.mode().is_set())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Set mode requested, but mode ist not set";
|
||||
ERROR_LOG() << "Set mode requested, but mode ist not set";
|
||||
m_ddsHandler->ftsTgt()->configureTargetReply(cookie, Core::FunctionReplyObject(request.participantId(), tr_lts("dds", "Set mode requested, but mode is not set")));
|
||||
return;
|
||||
}
|
||||
@@ -113,7 +112,7 @@ void HandlerTargetConfig::onConfigureTargetRequest(const rti::core::SampleIdenti
|
||||
{
|
||||
if (!request.weapon().is_set())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Set weapon requested, but weapon ist not set";
|
||||
ERROR_LOG() << "Set weapon requested, but weapon ist not set";
|
||||
m_ddsHandler->ftsTgt()->configureTargetReply(cookie, Core::FunctionReplyObject(request.participantId(), tr_lts("dds", "Set weapon requested, but weapon is not set")));
|
||||
return;
|
||||
}
|
||||
@@ -124,7 +123,7 @@ void HandlerTargetConfig::onConfigureTargetRequest(const rti::core::SampleIdenti
|
||||
{
|
||||
if (!request.parameterSet().is_set())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Set parameterset requested, but parameterset ist not set";
|
||||
ERROR_LOG() << "Set parameterset requested, but parameterset ist not set";
|
||||
m_ddsHandler->ftsTgt()->configureTargetReply(cookie, Core::FunctionReplyObject(request.participantId(), tr_lts("dds", "Set parameterset requested, but parameterset is not set")));
|
||||
return;
|
||||
}
|
||||
|
||||
+1
-1
@@ -64,7 +64,7 @@ private: // attributes
|
||||
std::shared_ptr<DdsHandler> m_ddsHandler; ///< Pointer to DDS handler
|
||||
std::shared_ptr<TrainingAreaBase::Interface::Dtc> m_dtcTab;
|
||||
std::shared_ptr<TargetManagement::Interface::Dts> m_dtsTgt;
|
||||
NGL::INGLLogger &m_logger; ///< Interface to the Logging-Facility
|
||||
|
||||
|
||||
};
|
||||
} // namespace TargetManagement
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <NGLLogger/INGLLogger.h>
|
||||
#include "tgt_export.h"
|
||||
#include "svctgtcommon_export.h"
|
||||
|
||||
namespace TargetManagement
|
||||
{
|
||||
|
||||
@@ -22,7 +22,6 @@ MainHandler::MainHandler(QObject *parent)
|
||||
: QObject(parent)
|
||||
, m_ddsHandler(nullptr)
|
||||
, m_dbHandler(nullptr)
|
||||
, m_logger(getLogger("MainHandler"))
|
||||
{}
|
||||
|
||||
MainHandler::~MainHandler()
|
||||
@@ -43,7 +42,7 @@ MainHandler::~MainHandler()
|
||||
|
||||
bool MainHandler::init(int domainId, int exerciseId)
|
||||
{
|
||||
INFO_LOG(m_logger) << "MainHandler::init";
|
||||
INFO_LOG() << "MainHandler::init";
|
||||
|
||||
// initialize database
|
||||
m_dbHandler = std::make_shared<DbHandler>();
|
||||
@@ -54,10 +53,10 @@ bool MainHandler::init(int domainId, int exerciseId)
|
||||
m_ddsHandler = std::make_shared<DdsHandler>(domainId, exerciseId);
|
||||
if (!m_ddsHandler->init())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Initialisation ddsHandler failed.";
|
||||
ERROR_LOG() << "Initialisation ddsHandler failed.";
|
||||
return false;
|
||||
}
|
||||
DEBUG_LOG(m_logger) << "Initialisation ddsHandler succesful.";
|
||||
DEBUG_LOG() << "Initialisation ddsHandler succesful.";
|
||||
|
||||
NOTICE_LOG(m_logger) << "setNewState Core::RunningState::Starting ";
|
||||
m_ddsHandler->pacemaker()->setNewState(Core::RunningState::Starting);
|
||||
@@ -67,7 +66,7 @@ bool MainHandler::init(int domainId, int exerciseId)
|
||||
|
||||
if (!m_handlerTargetConfig->init())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Initialisation HandlerTargetConfig failed.";
|
||||
ERROR_LOG() << "Initialisation HandlerTargetConfig failed.";
|
||||
m_ddsHandler->pacemaker()->setNewState(Core::RunningState::StartingError);
|
||||
return false;
|
||||
}
|
||||
@@ -85,7 +84,7 @@ bool MainHandler::init(int domainId, int exerciseId)
|
||||
QFileInfo fi(elevationFileAbs);
|
||||
if (!fi.exists(elevationFileAbs))
|
||||
{
|
||||
ERROR_LOG(m_logger) << LOGFUNCTION << ", elevationFile '" << elevationFileAbs << "' doesn't exists";
|
||||
ERROR_LOG() << Q_FUNC_INFO << ", elevationFile '" << elevationFileAbs << "' doesn't exists";
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -99,7 +98,7 @@ bool MainHandler::init(int domainId, int exerciseId)
|
||||
|
||||
if (!m_handlerShootbackArea->init())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Initialisation HandlerShootbackArea failed.";
|
||||
ERROR_LOG() << "Initialisation HandlerShootbackArea failed.";
|
||||
m_ddsHandler->pacemaker()->setNewState(Core::RunningState::StartingError);
|
||||
return false;
|
||||
}
|
||||
@@ -109,7 +108,7 @@ bool MainHandler::init(int domainId, int exerciseId)
|
||||
|
||||
if (!m_handlerShootbackTarget->init())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Initialisation HandlerShootbackTarget failed.";
|
||||
ERROR_LOG() << "Initialisation HandlerShootbackTarget failed.";
|
||||
m_ddsHandler->pacemaker()->setNewState(Core::RunningState::StartingError);
|
||||
return false;
|
||||
}
|
||||
@@ -119,7 +118,7 @@ bool MainHandler::init(int domainId, int exerciseId)
|
||||
|
||||
if (!m_handlerTargetAreaAssignment->init())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Initialisation HandlerTargetAreaAssignment failed.";
|
||||
ERROR_LOG() << "Initialisation HandlerTargetAreaAssignment failed.";
|
||||
m_ddsHandler->pacemaker()->setNewState(Core::RunningState::StartingError);
|
||||
return false;
|
||||
}
|
||||
@@ -133,7 +132,7 @@ bool MainHandler::init(int domainId, int exerciseId)
|
||||
|
||||
if (!(initLos && initDds))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Initialisation ShootbackController failed.";
|
||||
ERROR_LOG() << "Initialisation ShootbackController failed.";
|
||||
m_ddsHandler->pacemaker()->setNewState(Core::RunningState::StartingError);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -55,7 +55,5 @@ private:
|
||||
std::shared_ptr<SituationMap::ElevationMap> m_elevationMap;
|
||||
std::shared_ptr<ShootbackController> m_shootbackController;
|
||||
// : L400
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
};
|
||||
} // namespace TargetManagement
|
||||
+14
-15
@@ -15,19 +15,18 @@ namespace TargetManagement
|
||||
{
|
||||
ObjectShootbackArea::ObjectShootbackArea(MainHandler *mainHandler)
|
||||
: m_mainHandler(mainHandler)
|
||||
, m_logger(getLogger("ObjectShootbackArea"))
|
||||
{
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
ObjectShootbackArea::~ObjectShootbackArea()
|
||||
{
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
if (isValid())
|
||||
m_mainHandler->dds()->dtsTgt()->removeShootbackAreaByKey(m_data.id());
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
@@ -45,7 +44,7 @@ bool ObjectShootbackArea::isUsed() const
|
||||
//------------------------------------------------------------------------------
|
||||
Core::FunctionReplyObject ObjectShootbackArea::createObject(const ShootbackArea &data)
|
||||
{
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
m_data = data;
|
||||
|
||||
if (m_data.id() <= 0)
|
||||
@@ -58,20 +57,20 @@ Core::FunctionReplyObject ObjectShootbackArea::createObject(const ShootbackArea
|
||||
return Core::FunctionReplyObject(0, tr_lts("dds", "Error inserting ShootbackArea-data into database"));
|
||||
|
||||
m_data.id(dbData.id);
|
||||
DEBUG_LOG(m_logger) << "New TgtShootbackArea: " << m_data.id();
|
||||
DEBUG_LOG() << "New TgtShootbackArea: " << m_data.id();
|
||||
}
|
||||
|
||||
// Publish Data via DTS
|
||||
onPublishData();
|
||||
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
return Core::FunctionReplyObject(m_data.id());
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
Core::FunctionReplyObject ObjectShootbackArea::updateObject(const ShootbackArea &data)
|
||||
{
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
if (!isValid())
|
||||
return Core::FunctionReplyObject(data.id(), tr_lts("dds", "Object not valid/blocked"));
|
||||
|
||||
@@ -82,12 +81,12 @@ Core::FunctionReplyObject ObjectShootbackArea::updateObject(const ShootbackArea
|
||||
return Core::FunctionReplyObject(data.id(), tr_lts("dds", "Error updating ShootbackArea-data into database"));
|
||||
|
||||
m_data = data;
|
||||
DEBUG_LOG(m_logger) << "Data changed for ShootbackAreaId: " << m_data.id();
|
||||
DEBUG_LOG() << "Data changed for ShootbackAreaId: " << m_data.id();
|
||||
|
||||
// Publish Data via DTS
|
||||
onPublishData();
|
||||
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
return Core::FunctionReplyObject(m_data.id());
|
||||
}
|
||||
|
||||
@@ -108,7 +107,7 @@ Core::FunctionReplyObject ObjectShootbackArea::setUsed(bool isUsed)
|
||||
//------------------------------------------------------------------------------
|
||||
Core::FunctionReplyObject ObjectShootbackArea::removeObject()
|
||||
{
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
if (isUsed())
|
||||
return Core::FunctionReplyObject(m_data.id(), tr_lts("dds", "ShootbackArea still in use"));
|
||||
|
||||
@@ -118,17 +117,17 @@ Core::FunctionReplyObject ObjectShootbackArea::removeObject()
|
||||
if (!m_mainHandler->dds()->dtsTgt()->removeShootbackAreaByKey(m_data.id()))
|
||||
return Core::FunctionReplyObject(m_data.id(), tr_lts("dds", "ShootbackArea with id %1 can not be removed from DDS")).arg(m_data.id());
|
||||
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
return Core::FunctionReplyObject(m_data.id());
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
void ObjectShootbackArea::onPublishData()
|
||||
{
|
||||
TRACE_LOG(m_logger) << "Publish ShootbackArea-data to dds (" << m_data.id() << ") ...";
|
||||
TRACE_LOG() << "Publish ShootbackArea-data to dds (" << m_data.id() << ") ...";
|
||||
|
||||
if (!m_mainHandler->dds()->dtsTgt()->publish(m_data))
|
||||
ERROR_LOG(m_logger) << "Error publishing ShootbackArea-data to dds";
|
||||
ERROR_LOG() << "Error publishing ShootbackArea-data to dds";
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------------------------------------
|
||||
|
||||
+1
-3
@@ -10,7 +10,7 @@
|
||||
#include "dds_handler.h"
|
||||
#include "logger.h"
|
||||
|
||||
#include <DDS/Core/function_reply_object.h>
|
||||
#include <DDS/Core/core_types.h>
|
||||
|
||||
// Generated
|
||||
#include <TargetManagement/tgt.hpp>
|
||||
@@ -53,7 +53,5 @@ protected:
|
||||
private:
|
||||
MainHandler *m_mainHandler;
|
||||
ShootbackArea m_data;
|
||||
NGL::INGLLogger &m_logger;
|
||||
|
||||
};
|
||||
}
|
||||
+14
-15
@@ -15,19 +15,18 @@ namespace TargetManagement
|
||||
{
|
||||
ObjectShootbackTarget::ObjectShootbackTarget(MainHandler *mainHandler)
|
||||
: m_mainHandler(mainHandler)
|
||||
, m_logger(getLogger("ObjectShootbackTarget"))
|
||||
{
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
ObjectShootbackTarget::~ObjectShootbackTarget()
|
||||
{
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
if (isValid())
|
||||
m_mainHandler->dds()->dtsTgt()->removeShootbackTargetByKey(m_data.id());
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
@@ -45,7 +44,7 @@ bool ObjectShootbackTarget::isUsed() const
|
||||
//------------------------------------------------------------------------------
|
||||
Core::FunctionReplyObject ObjectShootbackTarget::createObject(const ShootbackTarget &data)
|
||||
{
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
m_data = data;
|
||||
|
||||
if (m_data.id() <= 0)
|
||||
@@ -58,20 +57,20 @@ Core::FunctionReplyObject ObjectShootbackTarget::createObject(const ShootbackTar
|
||||
return Core::FunctionReplyObject(0, tr_lts("dds", "Error inserting ShootbackTarget-data into database"));
|
||||
|
||||
m_data.id(dbData.id);
|
||||
DEBUG_LOG(m_logger) << "New TgtShootbackTarget: " << m_data.id();
|
||||
DEBUG_LOG() << "New TgtShootbackTarget: " << m_data.id();
|
||||
}
|
||||
|
||||
// Publish Data via DTS
|
||||
onPublishData();
|
||||
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
return Core::FunctionReplyObject(m_data.id());
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
Core::FunctionReplyObject ObjectShootbackTarget::updateObject(const ShootbackTarget &data)
|
||||
{
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START, id=" << data.id()
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START, id=" << data.id()
|
||||
<< " size =" << data.visibleParticipants().size();
|
||||
if (!isValid())
|
||||
return Core::FunctionReplyObject(data.id(), tr_lts("dds", "Object not valid/blocked"));
|
||||
@@ -86,12 +85,12 @@ Core::FunctionReplyObject ObjectShootbackTarget::updateObject(const ShootbackTar
|
||||
}
|
||||
|
||||
m_data = data;
|
||||
DEBUG_LOG(m_logger) << "Data changed for ShootbackTargetId: " << m_data.id();
|
||||
DEBUG_LOG() << "Data changed for ShootbackTargetId: " << m_data.id();
|
||||
|
||||
// Publish Data via DTS
|
||||
onPublishData();
|
||||
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " END, id=" << data.id()
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END, id=" << data.id()
|
||||
<< " size =" << data.visibleParticipants().size();
|
||||
return Core::FunctionReplyObject(m_data.id());
|
||||
}
|
||||
@@ -113,7 +112,7 @@ Core::FunctionReplyObject ObjectShootbackTarget::setUsed(bool isUsed)
|
||||
//------------------------------------------------------------------------------
|
||||
Core::FunctionReplyObject ObjectShootbackTarget::removeObject()
|
||||
{
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
if (isUsed())
|
||||
return Core::FunctionReplyObject(m_data.id(), tr_lts("dds", "ShootbackTarget still in use"));
|
||||
|
||||
@@ -123,7 +122,7 @@ Core::FunctionReplyObject ObjectShootbackTarget::removeObject()
|
||||
if (!m_mainHandler->dds()->dtsTgt()->removeShootbackTargetByKey(m_data.id()))
|
||||
return Core::FunctionReplyObject(m_data.id(), tr_lts("dds", "ShootbackTarget with id %1 can not be removed from DDS")).arg(m_data.id());
|
||||
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
return Core::FunctionReplyObject(m_data.id());
|
||||
}
|
||||
|
||||
@@ -146,10 +145,10 @@ void ObjectShootbackTarget::updateVolatileData(const Core::GeoPosition &position
|
||||
//------------------------------------------------------------------------------
|
||||
void ObjectShootbackTarget::onPublishData()
|
||||
{
|
||||
TRACE_LOG(m_logger) << "Publish ShootbackTarget-data to dds (" << m_data.id() << ") ...";
|
||||
TRACE_LOG() << "Publish ShootbackTarget-data to dds (" << m_data.id() << ") ...";
|
||||
|
||||
if (!m_mainHandler->dds()->dtsTgt()->publish(m_data))
|
||||
ERROR_LOG(m_logger) << "Error publishing ShootbackTarget-data to dds";
|
||||
ERROR_LOG() << "Error publishing ShootbackTarget-data to dds";
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------------------------------------
|
||||
|
||||
+1
-3
@@ -10,7 +10,7 @@
|
||||
#include "dds_handler.h"
|
||||
#include "logger.h"
|
||||
|
||||
#include <DDS/Core/function_reply_object.h>
|
||||
#include <DDS/Core/core_types.h>
|
||||
|
||||
// Generated
|
||||
#include <TargetManagement/tgt.hpp>
|
||||
@@ -59,7 +59,5 @@ protected:
|
||||
private:
|
||||
MainHandler *m_mainHandler;
|
||||
ShootbackTarget m_data;
|
||||
NGL::INGLLogger &m_logger;
|
||||
|
||||
};
|
||||
}
|
||||
+15
-16
@@ -15,19 +15,18 @@ namespace TargetManagement
|
||||
{
|
||||
ObjectTargetAreaAssignment::ObjectTargetAreaAssignment(MainHandler *mainHandler)
|
||||
: m_mainHandler(mainHandler)
|
||||
, m_logger(getLogger("ObjectTargetAreaAssignment"))
|
||||
{
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
ObjectTargetAreaAssignment::~ObjectTargetAreaAssignment()
|
||||
{
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
if (isValid())
|
||||
m_mainHandler->dds()->dtsTgt()->removeTargetAreaAssignmentByKey(m_data.id());
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
@@ -45,7 +44,7 @@ bool ObjectTargetAreaAssignment::isUsed() const
|
||||
//------------------------------------------------------------------------------
|
||||
Core::FunctionReplyObject ObjectTargetAreaAssignment::createObject(const TargetAreaAssignment &data)
|
||||
{
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
m_data = data;
|
||||
|
||||
if (m_data.id() <= 0)
|
||||
@@ -57,7 +56,7 @@ Core::FunctionReplyObject ObjectTargetAreaAssignment::createObject(const TargetA
|
||||
if (!m_mainHandler->db()->insert(dbData))
|
||||
{
|
||||
QString errText = m_mainHandler->db()->getLastError().nativeErrorCode();
|
||||
ERROR_LOG(m_logger) << "Error inserting TargetAreaAssignment into database: " << m_mainHandler->db()->getLastError().text();
|
||||
ERROR_LOG() << "Error inserting TargetAreaAssignment into database: " << m_mainHandler->db()->getLastError().text();
|
||||
if (errText.contains(QStringLiteral("23505")))
|
||||
return Core::FunctionReplyObject(0, tr_lts("dds", "Error inserting TargetAreaAssignment into database: unique key violation for '%1'")).arg(m_data.name());
|
||||
else
|
||||
@@ -65,20 +64,20 @@ Core::FunctionReplyObject ObjectTargetAreaAssignment::createObject(const TargetA
|
||||
}
|
||||
|
||||
m_data.id(dbData.id);
|
||||
DEBUG_LOG(m_logger) << "New TgtTargetAreaAssignment: " << m_data.id();
|
||||
DEBUG_LOG() << "New TgtTargetAreaAssignment: " << m_data.id();
|
||||
}
|
||||
|
||||
// Publish Data via DTS
|
||||
onPublishData();
|
||||
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
return Core::FunctionReplyObject(m_data.id());
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
Core::FunctionReplyObject ObjectTargetAreaAssignment::updateObject(const TargetAreaAssignment &data)
|
||||
{
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
if (!isValid())
|
||||
return Core::FunctionReplyObject(data.id(), tr_lts("dds", "Object not valid/blocked"));
|
||||
|
||||
@@ -89,12 +88,12 @@ Core::FunctionReplyObject ObjectTargetAreaAssignment::updateObject(const TargetA
|
||||
return Core::FunctionReplyObject(data.id(), tr_lts("dds", "Error updating TargetAreaAssignment-data into database"));
|
||||
|
||||
m_data = data;
|
||||
DEBUG_LOG(m_logger) << "Data changed for TargetAreaAssignmentId: " << m_data.id();
|
||||
DEBUG_LOG() << "Data changed for TargetAreaAssignmentId: " << m_data.id();
|
||||
|
||||
// Publish Data via DTS
|
||||
onPublishData();
|
||||
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
return Core::FunctionReplyObject(m_data.id());
|
||||
}
|
||||
|
||||
@@ -115,7 +114,7 @@ Core::FunctionReplyObject ObjectTargetAreaAssignment::setUsed(bool isUsed)
|
||||
//------------------------------------------------------------------------------
|
||||
Core::FunctionReplyObject ObjectTargetAreaAssignment::removeObject()
|
||||
{
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
if (isUsed())
|
||||
return Core::FunctionReplyObject(m_data.id(), tr_lts("dds", "TargetAreaAssignment still in use"));
|
||||
|
||||
@@ -125,17 +124,17 @@ Core::FunctionReplyObject ObjectTargetAreaAssignment::removeObject()
|
||||
if (!m_mainHandler->dds()->dtsTgt()->removeTargetAreaAssignmentByKey(m_data.id()))
|
||||
return Core::FunctionReplyObject(m_data.id(), tr_lts("dds", "TargetAreaAssignment with id %1 can not be removed from DDS")).arg(m_data.id());
|
||||
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
return Core::FunctionReplyObject(m_data.id());
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
void ObjectTargetAreaAssignment::onPublishData()
|
||||
{
|
||||
TRACE_LOG(m_logger) << "Publish TargetAreaAssignment-data to dds (" << m_data.id() << ") ...";
|
||||
TRACE_LOG() << "Publish TargetAreaAssignment-data to dds (" << m_data.id() << ") ...";
|
||||
|
||||
if (!m_mainHandler->dds()->dtsTgt()->publish(m_data))
|
||||
ERROR_LOG(m_logger) << "Error publishing TargetAreaAssignment-data to dds";
|
||||
ERROR_LOG() << "Error publishing TargetAreaAssignment-data to dds";
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------------------------------------
|
||||
|
||||
+1
-3
@@ -10,7 +10,7 @@
|
||||
#include "dds_handler.h"
|
||||
#include "logger.h"
|
||||
|
||||
#include <DDS/Core/function_reply_object.h>
|
||||
#include <DDS/Core/core_types.h>
|
||||
|
||||
// Generated
|
||||
#include <TargetManagement/tgt.hpp>
|
||||
@@ -53,7 +53,5 @@ protected:
|
||||
private:
|
||||
MainHandler *m_mainHandler;
|
||||
TargetAreaAssignment m_data;
|
||||
NGL::INGLLogger &m_logger;
|
||||
|
||||
};
|
||||
}
|
||||
+65
-66
@@ -72,15 +72,14 @@ ShootbackController::ShootbackController(MainHandler *mainHandler)
|
||||
, m_mainHandler(mainHandler)
|
||||
, m_elevationMap(nullptr)
|
||||
, m_losCalculation(nullptr)
|
||||
, m_logger(getLogger("ShootbackController"))
|
||||
{
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
ShootbackController::~ShootbackController()
|
||||
{
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
|
||||
// disconnect external "signals"..
|
||||
disconnect(m_mainHandler->dds()->dtcPpm().get());
|
||||
@@ -92,27 +91,27 @@ ShootbackController::~ShootbackController()
|
||||
delete m_losCalculation;
|
||||
m_losCalculation = nullptr;
|
||||
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
bool ShootbackController::initLOS(SituationMap::ElevationMap *elevationMap)
|
||||
{
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START, elevationMap = " << elevationMap
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START, elevationMap = " << elevationMap
|
||||
<< " isValid = " << elevationMap->isValid();
|
||||
|
||||
if (!elevationMap->isValid())
|
||||
{
|
||||
ERROR_LOG(m_logger) << LOGFUNCTION << " elevationMap not valid -> return";
|
||||
ERROR_LOG() << Q_FUNC_INFO << " elevationMap not valid -> return";
|
||||
return false;
|
||||
}
|
||||
|
||||
delete m_losCalculation;
|
||||
m_elevationMap = elevationMap;
|
||||
|
||||
INFO_LOG(m_logger) << LOGFUNCTION << " m_elevationMap.isValid() =" << m_elevationMap->isValid();
|
||||
INFO_LOG() << Q_FUNC_INFO << " m_elevationMap.isValid() =" << m_elevationMap->isValid();
|
||||
m_losCalculation = new SituationMap::LineOfSightCalculation(m_elevationMap);
|
||||
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -152,7 +151,7 @@ bool ShootbackController::initDds(std::shared_ptr<HandlerShootbackArea> handlerA
|
||||
|
||||
void ShootbackController::onShootbackAreaChanged1(qint32 areaId, bool removed)
|
||||
{
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START" << " shootbackAreaId=" << areaId << " removed=" << removed;
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START" << " shootbackAreaId=" << areaId << " removed=" << removed;
|
||||
|
||||
if (removed)
|
||||
{
|
||||
@@ -169,7 +168,7 @@ void ShootbackController::onShootbackAreaChanged1(qint32 areaId, bool removed)
|
||||
auto it = areaMap.find(areaId);
|
||||
if (it == areaMap.end())
|
||||
{
|
||||
ERROR_LOG(m_logger) << LOGFUNCTION << " obj changes, but connot be found" << " shootbackAreaId=" << areaId;
|
||||
ERROR_LOG() << Q_FUNC_INFO << " obj changes, but connot be found" << " shootbackAreaId=" << areaId;
|
||||
return;
|
||||
}
|
||||
onShootbackAreaChanged2(*(it.value()));
|
||||
@@ -177,13 +176,13 @@ void ShootbackController::onShootbackAreaChanged1(qint32 areaId, bool removed)
|
||||
}
|
||||
|
||||
syncExternal();
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " END" << " shootbackAreaId=" << areaId << " removed=" << removed;
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END" << " shootbackAreaId=" << areaId << " removed=" << removed;
|
||||
}
|
||||
|
||||
void ShootbackController::onShootbackAreaChanged2(const TargetManagement::ObjectShootbackArea &area)
|
||||
{
|
||||
const int areaId = area.getId();
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START" << " shootbackAreaId=" << areaId;
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START" << " shootbackAreaId=" << areaId;
|
||||
|
||||
// handle new/modified area and check all participants:
|
||||
const QMap<qint32, ParticipantManagement::ParticipantPosition> &participantPositions =
|
||||
@@ -194,12 +193,12 @@ void ShootbackController::onShootbackAreaChanged2(const TargetManagement::Object
|
||||
updateInternal_participantPerArea(area, posData);
|
||||
} // for
|
||||
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " END" << " shootbackAreaId=" << areaId;
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END" << " shootbackAreaId=" << areaId;
|
||||
}
|
||||
|
||||
void ShootbackController::onShootbackTargetChanged(qint32 targetId, bool removed)
|
||||
{
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START" << ", targetId=" << targetId << ", removed=" << removed;
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START" << ", targetId=" << targetId << ", removed=" << removed;
|
||||
|
||||
// Note:
|
||||
// updateInternalLos is not required if (removed == true)
|
||||
@@ -215,12 +214,12 @@ void ShootbackController::onShootbackTargetChanged(qint32 targetId, bool removed
|
||||
updateInternalLos({}, {}, {targetId});
|
||||
syncExternal();
|
||||
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " END" << " targetId=" << targetId << " removed=" << removed;
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END" << " targetId=" << targetId << " removed=" << removed;
|
||||
}
|
||||
|
||||
void ShootbackController::onTargetAreaAssignmentChanged(qint32 assignmentId, bool removed)
|
||||
{
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START" << " assignmentId=" << assignmentId << " removed=" << removed;
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START" << " assignmentId=" << assignmentId << " removed=" << removed;
|
||||
|
||||
// Note:
|
||||
// updateInternalLos is not required on removed == true
|
||||
@@ -232,16 +231,16 @@ void ShootbackController::onTargetAreaAssignmentChanged(qint32 assignmentId, boo
|
||||
updateInternalLos({assignmentId}, {}, {});
|
||||
syncExternal();
|
||||
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " END" << " assignmentId=" << assignmentId << " removed=" << removed;
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END" << " assignmentId=" << assignmentId << " removed=" << removed;
|
||||
}
|
||||
|
||||
void ShootbackController::onParticipantPositionChanged(const ParticipantManagement::ParticipantPosition &posData, DataModification modType)
|
||||
{
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " participantId changed, participantId=" << posData << " mod=" << modType;
|
||||
TRACE_LOG() << Q_FUNC_INFO << " participantId changed, participantId=" << posData << " mod=" << modType;
|
||||
|
||||
if (!participantPositionTopicIsValid(posData))
|
||||
{
|
||||
// DEBUG_LOG(m_logger) << LOGFUNCTION << " NOT VALID, participantId=" << posData.participantId();
|
||||
// DEBUG_LOG() << Q_FUNC_INFO << " NOT VALID, participantId=" << posData.participantId();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -250,30 +249,30 @@ void ShootbackController::onParticipantPositionChanged(const ParticipantManageme
|
||||
bool bIsTarget = false;
|
||||
if (isTarget(participantId, bIsTarget) && bIsTarget)
|
||||
{
|
||||
INFO_LOG(m_logger) << LOGFUNCTION << " TARGET, participantId=" << participantId;
|
||||
INFO_LOG() << Q_FUNC_INFO << " TARGET, participantId=" << participantId;
|
||||
|
||||
ObjectShootbackTarget *osbTarget = m_handlerShootbackTarget->dataForTargetParticipantId(participantId);
|
||||
if (!osbTarget)
|
||||
{
|
||||
ERROR_LOG(m_logger) << LOGFUNCTION << " ObjectShootbackTarget not found for participantId=" << participantId;
|
||||
ERROR_LOG() << Q_FUNC_INFO << " ObjectShootbackTarget not found for participantId=" << participantId;
|
||||
return;
|
||||
}
|
||||
osbTarget->updateVolatileData(posData.pos());
|
||||
}
|
||||
|
||||
INFO_LOG(m_logger) << LOGFUNCTION << " participantId=" << participantId << ", isTarget=" << bIsTarget;
|
||||
INFO_LOG() << Q_FUNC_INFO << " participantId=" << participantId << ", isTarget=" << bIsTarget;
|
||||
|
||||
if ((modType == DataModification::eAdded) || (modType == DataModification::eModified))
|
||||
{
|
||||
// update
|
||||
const QHash<int, ObjectShootbackArea *> &objMap = m_handlerShootbackArea->getObjectMap();
|
||||
DEBUG_LOG(m_logger) << LOGFUNCTION << " objMap.size" << objMap.size();
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " objMap.size" << objMap.size();
|
||||
|
||||
QMapIterator< int, QSet<int>> it(m_participantsPerArea);
|
||||
while (it.hasNext())
|
||||
{
|
||||
it.next();
|
||||
DEBUG_LOG(m_logger) << " areaId = " << it.key() << "-> partIdRef VORHERXX" << toString(it.value());
|
||||
DEBUG_LOG() << " areaId = " << it.key() << "-> partIdRef VORHERXX" << toString(it.value());
|
||||
}
|
||||
|
||||
for (const auto &area : std::as_const(objMap))
|
||||
@@ -287,7 +286,7 @@ void ShootbackController::onParticipantPositionChanged(const ParticipantManageme
|
||||
while (it_inner.hasNext())
|
||||
{
|
||||
it_inner.next();
|
||||
DEBUG_LOG(m_logger) << " areaId = " << it_inner.key() << "-> partIdRef NACHHERXX" << toString(it_inner.value());
|
||||
DEBUG_LOG() << " areaId = " << it_inner.key() << "-> partIdRef NACHHERXX" << toString(it_inner.value());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -323,7 +322,7 @@ bool ShootbackController::isTarget(qint32 participantId, bool &bIsTarget) const
|
||||
std::shared_ptr<ParticipantManagement::Interface::Dtc> dtcPpm = m_mainHandler->dds()->dtcPpm();
|
||||
if (!dtcPpm)
|
||||
{
|
||||
ERROR_LOG(m_logger) << LOGFUNCTION << " no dtcPpm, return";
|
||||
ERROR_LOG() << Q_FUNC_INFO << " no dtcPpm, return";
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -373,9 +372,9 @@ void ShootbackController::updateInternal_participantPerArea(const ObjectShootbac
|
||||
QSet<int> &partIdRef = m_participantsPerArea[areaId];
|
||||
bool alreadyInCont = partIdRef.contains(participantId);
|
||||
|
||||
DEBUG_LOG(m_logger) << " areaId = " << area.getId() << " ---> partIdRef VORHER" << toString(partIdRef);
|
||||
DEBUG_LOG() << " areaId = " << area.getId() << " ---> partIdRef VORHER" << toString(partIdRef);
|
||||
|
||||
DEBUG_LOG(m_logger) << LOGFUNCTION << " "
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " "
|
||||
<< " shootbackAreaId=" << areaId
|
||||
<< " shootbackAreaName=" << area.getName()
|
||||
<< " area.position=" << area.getData().position()
|
||||
@@ -388,17 +387,17 @@ void ShootbackController::updateInternal_participantPerArea(const ObjectShootbac
|
||||
{
|
||||
// ENTER
|
||||
partIdRef.insert(participantId);
|
||||
DEBUG_LOG(m_logger) << LOGFUNCTION << " ENTER: participantId=" << participantId << " areaId=" << areaId;
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " ENTER: participantId=" << participantId << " areaId=" << areaId;
|
||||
|
||||
}
|
||||
else if (!contains && alreadyInCont)
|
||||
{
|
||||
// LEAVE
|
||||
DEBUG_LOG(m_logger) << LOGFUNCTION << " ENTER: participantId=" << participantId << " areaId=" << areaId;
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " ENTER: participantId=" << participantId << " areaId=" << areaId;
|
||||
partIdRef.remove(participantId);
|
||||
}
|
||||
|
||||
DEBUG_LOG(m_logger) << " areaId = " << area.getId() << " ---> partIdRef NACHER" << toString(partIdRef);
|
||||
DEBUG_LOG() << " areaId = " << area.getId() << " ---> partIdRef NACHER" << toString(partIdRef);
|
||||
}
|
||||
|
||||
bool ShootbackController::areaContainsPosition(const TargetManagement::ObjectShootbackArea &area,
|
||||
@@ -454,7 +453,7 @@ QSet<int> ShootbackController::areasWithParticipant(qint32 participantId) const
|
||||
|
||||
QSet<int> ShootbackController::assignmentsWithTargetParticipantId(qint32 targetParticipantId) const
|
||||
{
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START" << " targetParticipantId=" << targetParticipantId;
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START" << " targetParticipantId=" << targetParticipantId;
|
||||
|
||||
QSet<int> ret;
|
||||
// all assignments
|
||||
@@ -468,7 +467,7 @@ QSet<int> ShootbackController::assignmentsWithTargetParticipantId(qint32 targetP
|
||||
ret += targetAreaAssignment->getId();
|
||||
} // for
|
||||
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " END" << " areaId=" << targetParticipantId;
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END" << " areaId=" << targetParticipantId;
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -484,7 +483,7 @@ void ShootbackController::updateInternalLos(const QSet<int> &changingAssignmentI
|
||||
const QSet<int> &changingTartgetIds, // ~dynamic
|
||||
int changedParticipantId) // ~dynamic
|
||||
{
|
||||
DEBUG_LOG(m_logger) << LOGFUNCTION << " START"
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " START"
|
||||
<< ", changingAssigmentIds=" << toString(changingAssignmentIds)
|
||||
<< ", changingAreaIds=" << toString(changingAreaIds)
|
||||
<< ", changingTartgetIds=" << toString(changingTartgetIds)
|
||||
@@ -492,13 +491,13 @@ void ShootbackController::updateInternalLos(const QSet<int> &changingAssignmentI
|
||||
|
||||
// loop over every assignment
|
||||
const QHash<int, ObjectTargetAreaAssignment *> &allAssignments = m_handlerTargetAreaAssignment->getObjectMap();
|
||||
DEBUG_LOG(m_logger) << LOGFUNCTION << " allAssignments.size() " << allAssignments.size();
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " allAssignments.size() " << allAssignments.size();
|
||||
|
||||
for (ObjectTargetAreaAssignment *assignment : allAssignments)
|
||||
{
|
||||
if (!assignment)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << LOGFUNCTION << " continue, curAssignment " << assignment->getId();
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " continue, curAssignment " << assignment->getId();
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -506,7 +505,7 @@ void ShootbackController::updateInternalLos(const QSet<int> &changingAssignmentI
|
||||
const int assignmentId = assignment->getId();
|
||||
if (!idIsRelevantHelper(changingAssignmentIds, assignmentId))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << LOGFUNCTION << " continue, curAssignment " << assignment->getId();
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " continue, curAssignment " << assignment->getId();
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -516,7 +515,7 @@ void ShootbackController::updateInternalLos(const QSet<int> &changingAssignmentI
|
||||
const int areaId = assignmentData.areaId();
|
||||
if (!idIsRelevantHelper(changingAreaIds, areaId))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << LOGFUNCTION << " continue, curAssignment " << assignment->getId();
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " continue, curAssignment " << assignment->getId();
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -525,7 +524,7 @@ void ShootbackController::updateInternalLos(const QSet<int> &changingAssignmentI
|
||||
const int targetDataId = m_handlerShootbackTarget->targetDataIdForTargetParticipantId(targetParticpantId);
|
||||
if (!idIsRelevantHelper(changingTartgetIds, targetDataId))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << LOGFUNCTION << " continue, curAssignment " << assignment->getId()
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " continue, curAssignment " << assignment->getId()
|
||||
<< ", changingTartgetIds=" << toString(changingTartgetIds)
|
||||
<< ", targetParticpantId=" << targetParticpantId
|
||||
<< ", targetDataId=" << targetDataId;
|
||||
@@ -537,13 +536,13 @@ void ShootbackController::updateInternalLos(const QSet<int> &changingAssignmentI
|
||||
{
|
||||
// Note: m_participantsPerArea is up-to-date
|
||||
QSet<int> areasWithPart = areasWithParticipant(changedParticipantId);
|
||||
DEBUG_LOG(m_logger) << LOGFUNCTION << " areasWithPart=" << areasWithPart.size();
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " areasWithPart=" << areasWithPart.size();
|
||||
for (auto curAreaId : std::as_const(areasWithPart))
|
||||
DEBUG_LOG(m_logger) << LOGFUNCTION << " -> curAreaId=" << curAreaId;
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " -> curAreaId=" << curAreaId;
|
||||
|
||||
if (!idIsRelevantHelper(areasWithPart, areaId))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << LOGFUNCTION << " continue, curAssignment " << assignment->getId();
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " continue, curAssignment " << assignment->getId();
|
||||
continue;
|
||||
}
|
||||
}
|
||||
@@ -552,11 +551,11 @@ void ShootbackController::updateInternalLos(const QSet<int> &changingAssignmentI
|
||||
// one assignment -> single target, single area, some participants (which are in that single area):
|
||||
|
||||
if (!updateInternalLosSingleAssignment(assignment))
|
||||
ERROR_LOG(m_logger) << LOGFUNCTION << " updateInternalLosSingleAssignment failed, assignmentId=" << assignment->getId();
|
||||
ERROR_LOG() << Q_FUNC_INFO << " updateInternalLosSingleAssignment failed, assignmentId=" << assignment->getId();
|
||||
|
||||
} // for
|
||||
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " END"
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END"
|
||||
<< ", changingAssigmentIds=" << changingAssignmentIds.size()
|
||||
<< ", changingAreaIds=" << changingAreaIds.size()
|
||||
<< ", changingTartgetIds=" << changingTartgetIds.size()
|
||||
@@ -568,14 +567,14 @@ bool ShootbackController::updateInternalLosSingleAssignment(ObjectTargetAreaAssi
|
||||
if (!assignment)
|
||||
return false;
|
||||
const int assignmentId = assignment->getId();
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START, assignmentId=" << assignmentId;
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START, assignmentId=" << assignmentId;
|
||||
|
||||
|
||||
const TargetAreaAssignment &assignmentData = assignment->getData();
|
||||
const int areaId = assignmentData.areaId();
|
||||
const int targetParticipantId = assignmentData.targetParticipantId();
|
||||
|
||||
DEBUG_LOG(m_logger) << LOGFUNCTION << " START, assignmentId=" << assignmentId
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " START, assignmentId=" << assignmentId
|
||||
<< ", areaId = " << areaId
|
||||
<< ", targetParticipantId = " << targetParticipantId;
|
||||
|
||||
@@ -586,14 +585,14 @@ bool ShootbackController::updateInternalLosSingleAssignment(ObjectTargetAreaAssi
|
||||
// Neverless, for this assignment -> area there are no participants visible:
|
||||
// clear container:
|
||||
m_visibleParticipantsPerAssignment[assignmentId] = {};
|
||||
ERROR_LOG(m_logger) << LOGFUNCTION << " no area for areaId=" << areaId;
|
||||
ERROR_LOG() << Q_FUNC_INFO << " no area for areaId=" << areaId;
|
||||
return false;
|
||||
}
|
||||
|
||||
ObjectShootbackTarget *target = m_handlerShootbackTarget->dataForTargetParticipantId(targetParticipantId);
|
||||
if (!target)
|
||||
{
|
||||
ERROR_LOG(m_logger) << LOGFUNCTION << " no target for targetParticipantId=" << targetParticipantId;
|
||||
ERROR_LOG() << Q_FUNC_INFO << " no target for targetParticipantId=" << targetParticipantId;
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -605,7 +604,7 @@ bool ShootbackController::updateInternalLosSingleAssignment(ObjectTargetAreaAssi
|
||||
for (auto participantId : std::as_const(partIdRef))
|
||||
{
|
||||
// check lineOfSight:
|
||||
DEBUG_LOG(m_logger) << LOGFUNCTION << " check lineOfSight for: assignmentId=" << assignmentId
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " check lineOfSight for: assignmentId=" << assignmentId
|
||||
<< ", areaId = " << areaId
|
||||
<< ", targetParticipantId = " << targetParticipantId
|
||||
<< ", participantId=" << participantId;
|
||||
@@ -620,13 +619,13 @@ bool ShootbackController::updateInternalLosSingleAssignment(ObjectTargetAreaAssi
|
||||
|
||||
if (participantPos.participantId() != participantId)
|
||||
{
|
||||
ERROR_LOG(m_logger) << LOGFUNCTION << " no position for participantId=" << participantId;
|
||||
ERROR_LOG() << Q_FUNC_INFO << " no position for participantId=" << participantId;
|
||||
return false;
|
||||
}
|
||||
const Core::GeoPosition &participantGeoPos = participantPos.pos();
|
||||
|
||||
bool visi = lineOfSight(sbTargetGeoPos, participantGeoPos);
|
||||
DEBUG_LOG(m_logger) << LOGFUNCTION << " current targetId = " << target->getId() << " visi = " << visi;
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " current targetId = " << target->getId() << " visi = " << visi;
|
||||
|
||||
if (visi)
|
||||
visiPartCont.insert(participantId);
|
||||
@@ -636,19 +635,19 @@ bool ShootbackController::updateInternalLosSingleAssignment(ObjectTargetAreaAssi
|
||||
|
||||
} // if (m_participantsPerArea.contains(areaId))
|
||||
|
||||
DEBUG_LOG(m_logger) << LOGFUNCTION << " assignmentId = " << assignmentId
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " assignmentId = " << assignmentId
|
||||
<< " visiPartCont.size() " << visiPartCont.size();
|
||||
|
||||
// store at member
|
||||
m_visibleParticipantsPerAssignment[assignmentId] = visiPartCont;
|
||||
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " END, assignmentId=" << assignmentId;
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END, assignmentId=" << assignmentId;
|
||||
return true;
|
||||
}
|
||||
|
||||
QSet<int> ShootbackController::visibleParticipantsPerTargetParticipantId(int targetParticipantId)
|
||||
{
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START, targetParticipantId = " << targetParticipantId;
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START, targetParticipantId = " << targetParticipantId;
|
||||
|
||||
QSet<int> visiPartPerTarget;
|
||||
|
||||
@@ -659,19 +658,19 @@ QSet<int> ShootbackController::visibleParticipantsPerTargetParticipantId(int tar
|
||||
visiPartPerTarget += m_visibleParticipantsPerAssignment[assignmentId];
|
||||
}
|
||||
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " END, targetParticipantId = " << targetParticipantId
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END, targetParticipantId = " << targetParticipantId
|
||||
<< ", visiPartPerTarget = " << toString(visiPartPerTarget);
|
||||
return visiPartPerTarget;
|
||||
}
|
||||
|
||||
void ShootbackController::syncExternal()
|
||||
{
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
|
||||
// loop over all targets
|
||||
const QHash<int, ObjectShootbackTarget *> &allTargets = m_handlerShootbackTarget->getObjectMap();
|
||||
|
||||
INFO_LOG(m_logger) << LOGFUNCTION << " allTargets.size() " << allTargets.size();
|
||||
INFO_LOG() << Q_FUNC_INFO << " allTargets.size() " << allTargets.size();
|
||||
|
||||
for (ObjectShootbackTarget *target : allTargets)
|
||||
{
|
||||
@@ -681,7 +680,7 @@ void ShootbackController::syncExternal()
|
||||
const QSet<int> &visiPartPerTarget = visibleParticipantsPerTargetParticipantId(target->getTargetParticipantId()); // QSet -> unique and sorted
|
||||
std::vector<int32_t> visiPartPerTargetStd;
|
||||
visiPartPerTargetStd.reserve(visiPartPerTarget.size());
|
||||
INFO_LOG(m_logger) << LOGFUNCTION << " targetId " << target->getId() << ", visiPartPerTarget = " << toString(visiPartPerTarget);
|
||||
INFO_LOG() << Q_FUNC_INFO << " targetId " << target->getId() << ", visiPartPerTarget = " << toString(visiPartPerTarget);
|
||||
for (auto id : std::as_const(visiPartPerTarget))
|
||||
visiPartPerTargetStd.push_back(id);
|
||||
|
||||
@@ -690,26 +689,26 @@ void ShootbackController::syncExternal()
|
||||
if (visiPartPerTargetStd != sbTarget.visibleParticipants())
|
||||
{
|
||||
// data has changed
|
||||
INFO_LOG(m_logger) << LOGFUNCTION << " targetId differ -> updateObject..";
|
||||
INFO_LOG(m_logger) << LOGFUNCTION << " visiOld =" << toString(sbTarget.visibleParticipants());
|
||||
INFO_LOG(m_logger) << LOGFUNCTION << " visiNew =" << toString(visiPartPerTargetStd);
|
||||
INFO_LOG() << Q_FUNC_INFO << " targetId differ -> updateObject..";
|
||||
INFO_LOG() << Q_FUNC_INFO << " visiOld =" << toString(sbTarget.visibleParticipants());
|
||||
INFO_LOG() << Q_FUNC_INFO << " visiNew =" << toString(visiPartPerTargetStd);
|
||||
target->updateVolatileData(visiPartPerTargetStd); // update and publish
|
||||
}
|
||||
} // for
|
||||
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
|
||||
bool ShootbackController::lineOfSight(const Core::GeoPosition &observerPos, const Core::GeoPosition &targetPos) const
|
||||
{
|
||||
DEBUG_LOG(m_logger) << LOGFUNCTION << " calculate m_losCalculation = " << m_losCalculation
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " calculate m_losCalculation = " << m_losCalculation
|
||||
<< ", observerPos=" << observerPos
|
||||
<< ", targetPos=" << targetPos;
|
||||
|
||||
if (!m_losCalculation)
|
||||
{
|
||||
ERROR_LOG(m_logger) << LOGFUNCTION << " Error: no m_losCalculation";
|
||||
ERROR_LOG() << Q_FUNC_INFO << " Error: no m_losCalculation";
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -721,7 +720,7 @@ bool ShootbackController::lineOfSight(const Core::GeoPosition &observerPos, cons
|
||||
|
||||
if (!success)
|
||||
{
|
||||
ERROR_LOG(m_logger) << LOGFUNCTION << " calculate failed:"
|
||||
ERROR_LOG() << Q_FUNC_INFO << " calculate failed:"
|
||||
<< " observerPos=" << observerPos
|
||||
<< " targetPos=" << targetPos;
|
||||
return false;
|
||||
|
||||
@@ -97,9 +97,6 @@ private:
|
||||
|
||||
SituationMap::ElevationMap *m_elevationMap; // do not delete at dtor
|
||||
SituationMap::LineOfSightCalculation *m_losCalculation;
|
||||
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
};
|
||||
|
||||
} // namespace TargetManagement
|
||||
Reference in new issue
Block a user