Adds immediate migration results in progress
This commit is contained in:
2102 files changed
+17482
-15071
No files matched your search
+12
-13
@@ -13,19 +13,18 @@
|
||||
namespace TargetAreas
|
||||
{
|
||||
|
||||
DdsHandlerTargetAreas::DdsHandlerTargetAreas(int domainId, int exerciseId)
|
||||
: m_ddsConnector(std::make_shared<DDSConnector::DdsConnector>(domainId, IDL::PartitionType::Exercise, exerciseId))
|
||||
DdsHandlerTargetAreas::DdsHandlerTargetAreas(int domainId, int exerciseId) : m_ddsConnector(std::make_shared<DDSConnector::DdsConnector>(domainId, IDL::PartitionType::Exercise, exerciseId))
|
||||
, m_participantEventId(0)
|
||||
, m_exerciseId(exerciseId)
|
||||
{
|
||||
DEBUG_LOG() << "DdsHandlerTargetAreas(" << domainId << ") for partition: " << m_ddsConnector->getDefaultPartition();
|
||||
, m_exerciseId(exerciseId),
|
||||
m_logger(NGL::NGLLoggerBootstrap::getLogger()) {
|
||||
DEBUG_LOG(m_logger) << "DdsHandlerTargetAreas(" << domainId << ") for partition: " << m_ddsConnector->getDefaultPartition();
|
||||
}
|
||||
|
||||
bool DdsHandlerTargetAreas::init(const QStringList &qosFileList)
|
||||
{
|
||||
if (!m_ddsConnector->init(qosFileList))
|
||||
{
|
||||
ERROR_LOG() << "Error initializing dds connections - aborting";
|
||||
ERROR_LOG(m_logger) << "Error initializing dds connections - aborting";
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -46,28 +45,28 @@ bool DdsHandlerTargetAreas::init(const QStringList &qosFileList)
|
||||
!m_ftcTab->enableSendParticipantBeStillWarning() ||
|
||||
!m_ftcTab->enableSendControlData())
|
||||
{
|
||||
ERROR_LOG() << "Could not enable SendCesHit";
|
||||
ERROR_LOG(m_logger) << "Could not enable SendCesHit";
|
||||
return false;
|
||||
}
|
||||
m_dtcPpm = ParticipantManagement::Interface::Dtc::create(m_ddsConnector);
|
||||
if (!m_dtcPpm->enableDynamicParticipantData())
|
||||
{
|
||||
ERROR_LOG() << "Could not initialize ParticipantManagement enableDynamicParticipantData data topic client";
|
||||
ERROR_LOG(m_logger) << "Could not initialize ParticipantManagement enableDynamicParticipantData data topic client";
|
||||
return false;
|
||||
}
|
||||
if (!m_dtcPpm->enableParticipantPosition())
|
||||
{
|
||||
ERROR_LOG() << "Could not initialize ParticipantManagement enableParticipantPosition data topic client";
|
||||
ERROR_LOG(m_logger) << "Could not initialize ParticipantManagement enableParticipantPosition data topic client";
|
||||
return false;
|
||||
}
|
||||
if (!m_dtcPpm->enableParticipant())
|
||||
{
|
||||
ERROR_LOG() << "Could not initialize ParticipantManagement enableParticipant data topic client";
|
||||
ERROR_LOG(m_logger) << "Could not initialize ParticipantManagement enableParticipant data topic client";
|
||||
return false;
|
||||
}
|
||||
if (!m_dtcPpm->enableType())
|
||||
{
|
||||
ERROR_LOG() << "Could not initialize ParticipantManagement enableType data topic client";
|
||||
ERROR_LOG(m_logger) << "Could not initialize ParticipantManagement enableType data topic client";
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -100,7 +99,7 @@ void DdsHandlerTargetAreas::onParticipantChanged(const ParticipantManagement::Pa
|
||||
{
|
||||
for (auto i = m_partId2EquipNoMap.begin(); i != m_partId2EquipNoMap.end(); ++i)
|
||||
{
|
||||
TRACE_LOG() << " partId2EquipNoMap.size(): " << m_partId2EquipNoMap.size()
|
||||
TRACE_LOG(m_logger) << " partId2EquipNoMap.size(): " << m_partId2EquipNoMap.size()
|
||||
<< " partId: " << i.key()
|
||||
<< " eqNo: " << i.value();
|
||||
}
|
||||
@@ -117,7 +116,7 @@ int DdsHandlerTargetAreas::participantId2EquipNo(const int participantId) const
|
||||
{
|
||||
int ret = m_partId2EquipNoMap.value(participantId, 0);
|
||||
if (ret > 0)
|
||||
INFO_LOG() << "participantId2EquipNo participantId=" << participantId
|
||||
INFO_LOG(m_logger) << "participantId2EquipNo participantId=" << participantId
|
||||
<< " EquipmentNumber=" << ret;
|
||||
return ret;
|
||||
} // end of participantId2EquipNo()
|
||||
|
||||
+2
@@ -53,6 +53,8 @@ private Q_SLOTS:
|
||||
void onParticipantChanged(const ParticipantManagement::Participant &data, DataModification modType);
|
||||
|
||||
private:
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
std::shared_ptr<DDSConnector::DdsConnector> m_ddsConnector;
|
||||
std::shared_ptr<Core::TopicLockMaster> m_topicLockMaster;
|
||||
std::shared_ptr<Core::Interface::Dtc> m_dtcCore;
|
||||
|
||||
+44
-44
@@ -75,7 +75,7 @@ bool HandlerTargetAreas::init()
|
||||
};
|
||||
dtcPpm->targetInformations(cb);
|
||||
}
|
||||
INFO_LOG() << "HandlerTargetAreas::init() finished. "
|
||||
INFO_LOG(m_logger) << "HandlerTargetAreas::init() finished. "
|
||||
<< " m_positionsMap.size(): " << m_positionsMap.size();
|
||||
return true;
|
||||
} // end of init()
|
||||
@@ -83,10 +83,10 @@ bool HandlerTargetAreas::init()
|
||||
|
||||
void HandlerTargetAreas::onParticipantPositionChanged(const ParticipantManagement::ParticipantPosition &data, DataModification modType)
|
||||
{
|
||||
DEBUG_LOG() << "onParticipantPositionChanged: " << data;
|
||||
DEBUG_LOG(m_logger) << "onParticipantPositionChanged: " << data;
|
||||
if (modType == DataModification::eRemoved)
|
||||
{
|
||||
DEBUG_LOG() << "m_participantsOutsideMap.remove participantId: " << data.participantId();
|
||||
DEBUG_LOG(m_logger) << "m_participantsOutsideMap.remove participantId: " << data.participantId();
|
||||
//m_participantsOutsideMap.remove(data.participantId());
|
||||
}
|
||||
else
|
||||
@@ -101,11 +101,11 @@ void HandlerTargetAreas::onParticipantPositionChanged(const ParticipantManagemen
|
||||
partPos.lastGeoPosition = partPosOld.pos(); // save previous position
|
||||
// replace
|
||||
*it = partPos;
|
||||
DEBUG_LOG() << "m_positionsMap.replace=" << data.participantId();
|
||||
DEBUG_LOG(m_logger) << "m_positionsMap.replace=" << data.participantId();
|
||||
}
|
||||
else
|
||||
{
|
||||
DEBUG_LOG() << "m_positionsMap.insert=" << data.participantId();
|
||||
DEBUG_LOG(m_logger) << "m_positionsMap.insert=" << data.participantId();
|
||||
m_positionsMap.insert(data.participantId(), partPos);
|
||||
}
|
||||
|
||||
@@ -113,9 +113,9 @@ void HandlerTargetAreas::onParticipantPositionChanged(const ParticipantManagemen
|
||||
if (equipmentNumber > 0)
|
||||
checkShootbackAreaPosition(data);
|
||||
else
|
||||
INFO_LOG() << "Teilnehmer hat keine Ausstattungsnummer";
|
||||
INFO_LOG(m_logger) << "Teilnehmer hat keine Ausstattungsnummer";
|
||||
|
||||
INFO_LOG() << "onParticipantPositionChanged()"
|
||||
INFO_LOG(m_logger) << "onParticipantPositionChanged()"
|
||||
<< " participantId; " << data.participantId()
|
||||
<< " participantTypeId: " << data.participantTypeId()
|
||||
<< " partyId: " << data.partyId()
|
||||
@@ -130,7 +130,7 @@ void HandlerTargetAreas::onParticipantChanged(const ParticipantManagement::Parti
|
||||
// Remove Participant:
|
||||
if (modType == DataModification::eRemoved || data.isDeleted())
|
||||
{
|
||||
DEBUG_LOG() << "onParticipantChanged m_positionsMap.remove id=" << data.id();
|
||||
DEBUG_LOG(m_logger) << "onParticipantChanged m_positionsMap.remove id=" << data.id();
|
||||
m_participantData.remove(data.id());
|
||||
m_positionsMap.remove(data.id());
|
||||
return;
|
||||
@@ -148,12 +148,12 @@ void HandlerTargetAreas::onParticipantChanged(const ParticipantManagement::Parti
|
||||
pos.partyId(data.partyId());
|
||||
pos.participantId(data.id());
|
||||
pos.participantTypeId(data.typeId());
|
||||
DEBUG_LOG() << "onParticipantChanged"
|
||||
DEBUG_LOG(m_logger) << "onParticipantChanged"
|
||||
<< " id=" << data.id()
|
||||
<< " typeId=" << data.typeId()
|
||||
<< " designator=" << data.designator();
|
||||
if (typeClass == ParticipantManagement::TypeClass_def::Target)
|
||||
DEBUG_LOG() << "Typeclass = Target";
|
||||
DEBUG_LOG(m_logger) << "Typeclass = Target";
|
||||
}
|
||||
|
||||
void HandlerTargetAreas::onTypeChanged(const ParticipantManagement::Type &data, DataModification modType)
|
||||
@@ -161,20 +161,20 @@ void HandlerTargetAreas::onTypeChanged(const ParticipantManagement::Type &data,
|
||||
if (modType == DataModification::eRemoved)
|
||||
return;
|
||||
m_typeMap.insert(data.id(), data.typeClass());
|
||||
DEBUG_LOG() << "m_typeMap.size()" << m_typeMap.size()
|
||||
DEBUG_LOG(m_logger) << "m_typeMap.size()" << m_typeMap.size()
|
||||
<< " equipmentTypeId=" << data.id()
|
||||
<< " typeClass=" << data.typeClass();
|
||||
}
|
||||
|
||||
void HandlerTargetAreas::onTargetInformationChanged(const ParticipantManagement::TargetInformation &data, DataModification modType)
|
||||
{
|
||||
DEBUG_LOG() << "onTargetInformationChanged"
|
||||
DEBUG_LOG(m_logger) << "onTargetInformationChanged"
|
||||
<< " participantId=" << data.participantId()
|
||||
<< " data.shootbackAreas().size()=" << data.shootbackAreas().size();
|
||||
|
||||
if (modType == DataModification::eRemoved)
|
||||
{
|
||||
DEBUG_LOG() << "m_participantsOutsideMap.remove participantId: " << data.participantId();
|
||||
DEBUG_LOG(m_logger) << "m_participantsOutsideMap.remove participantId: " << data.participantId();
|
||||
m_shootbackTargets.remove(data.participantId());
|
||||
return;
|
||||
}
|
||||
@@ -189,7 +189,7 @@ void HandlerTargetAreas::onTargetInformationChanged(const ParticipantManagement:
|
||||
// assign shootbackAreasUtm
|
||||
for (unsigned int i = 0; i < data.shootbackAreas().size(); i++)
|
||||
{
|
||||
DEBUG_LOG() << " shootbackAreas i=" << i;
|
||||
DEBUG_LOG(m_logger) << " shootbackAreas i=" << i;
|
||||
ParticipantManagement::ShootbackArea shootbackArea = data.shootbackAreas().at(i);
|
||||
QPolygonF shootbackAreaUtm;
|
||||
|
||||
@@ -202,7 +202,7 @@ void HandlerTargetAreas::onTargetInformationChanged(const ParticipantManagement:
|
||||
|
||||
for (int i = 0; i < shootbackAreaUtm.size(); i++)
|
||||
{
|
||||
DEBUG_LOG() << "i=" << i
|
||||
DEBUG_LOG(m_logger) << "i=" << i
|
||||
<< " x=" << shootbackAreaUtm[i].x()
|
||||
<< " y=" << shootbackAreaUtm[i].y()
|
||||
<< " zone=" << m_zone;
|
||||
@@ -211,7 +211,7 @@ void HandlerTargetAreas::onTargetInformationChanged(const ParticipantManagement:
|
||||
}
|
||||
|
||||
m_shootbackTargets.insert(data.participantId(), shootbackTarget);
|
||||
DEBUG_LOG() << "newShootbackTarget participantId=" << data.participantId()
|
||||
DEBUG_LOG(m_logger) << "newShootbackTarget participantId=" << data.participantId()
|
||||
<< " shootbackTarget.participantId=" << shootbackTarget.participantId
|
||||
<< " shootbackTarget.targetInformation.participantId()=" << shootbackTarget.targetInformation.participantId()
|
||||
<< " shootbackTarget.targetInformation.prewarningInterval()=" << shootbackTarget.targetInformation.prewarningInterval()
|
||||
@@ -237,10 +237,10 @@ int HandlerTargetAreas::getParticipantId(int equipentNumber)
|
||||
|
||||
void HandlerTargetAreas::printQPolygon(const QPolygonF polygon)
|
||||
{
|
||||
DEBUG_LOG() << "printQPolygon polygon.size()=" << polygon.size();
|
||||
DEBUG_LOG(m_logger) << "printQPolygon polygon.size()=" << polygon.size();
|
||||
for (int i = 0; i < polygon.size(); i++)
|
||||
{
|
||||
DEBUG_LOG() << "printQPolygon i=" << i
|
||||
DEBUG_LOG(m_logger) << "printQPolygon i=" << i
|
||||
<< " x=" << polygon[i].x()
|
||||
<< " y=" << polygon[i].y();
|
||||
}
|
||||
@@ -248,7 +248,7 @@ void HandlerTargetAreas::printQPolygon(const QPolygonF polygon)
|
||||
|
||||
void HandlerTargetAreas::printShootbackTarget(const ShootbackTarget &shootbackTarget)
|
||||
{
|
||||
DEBUG_LOG() << "ShootbackTarget "
|
||||
DEBUG_LOG(m_logger) << "ShootbackTarget "
|
||||
<< ", targetParticipantId=" << shootbackTarget.participantId
|
||||
<< ", shootbackAreasUtm.size=" << shootbackTarget.shootbackAreasUtm.size();
|
||||
for (int i = 0; i < shootbackTarget.shootbackAreasUtm.size(); i++)
|
||||
@@ -261,7 +261,7 @@ void HandlerTargetAreas::printShootbackTarget(const ShootbackTarget &shootbackTa
|
||||
|
||||
void HandlerTargetAreas::printShootbackAreas()
|
||||
{
|
||||
DEBUG_LOG() << "printShootbackAreas--------------------";
|
||||
DEBUG_LOG(m_logger) << "printShootbackAreas--------------------";
|
||||
QHashIterator<int, ShootbackTarget> it(m_shootbackTargets);
|
||||
while (it.hasNext())
|
||||
{
|
||||
@@ -269,14 +269,14 @@ void HandlerTargetAreas::printShootbackAreas()
|
||||
ShootbackTarget shootbackTarget = it.value();
|
||||
printShootbackTarget(shootbackTarget);
|
||||
}
|
||||
DEBUG_LOG() << "ENDE printShootbackAreas--------------------";
|
||||
DEBUG_LOG(m_logger) << "ENDE printShootbackAreas--------------------";
|
||||
}
|
||||
|
||||
bool HandlerTargetAreas::checkPosInShootbackTarget(const ShootbackTarget &shootbackTarget,
|
||||
const QPointF &participantPosUtm)
|
||||
{
|
||||
bool inside = false;
|
||||
DEBUG_LOG() << "checkPosInShootbackTarget ShootbackTarget "
|
||||
DEBUG_LOG(m_logger) << "checkPosInShootbackTarget ShootbackTarget "
|
||||
<< ", targetParticipantId=" << shootbackTarget.participantId
|
||||
<< ", shootbackAreasUtm.size=" << shootbackTarget.shootbackAreasUtm.size();
|
||||
for (int i = 0; i < shootbackTarget.shootbackAreasUtm.size(); i++)
|
||||
@@ -285,7 +285,7 @@ bool HandlerTargetAreas::checkPosInShootbackTarget(const ShootbackTarget &shootb
|
||||
printQPolygon(shootbackTarget.shootbackAreasUtm.at(i));
|
||||
if (shootbackTarget.shootbackAreasUtm.at(i).containsPoint(participantPosUtm, Qt::OddEvenFill))
|
||||
{
|
||||
DEBUG_LOG() << "inside = true";
|
||||
DEBUG_LOG(m_logger) << "inside = true";
|
||||
inside = true;
|
||||
}
|
||||
}
|
||||
@@ -296,7 +296,7 @@ void HandlerTargetAreas::checkShootbackAreaPosition(const ParticipantManagement:
|
||||
{
|
||||
int participantId = data.participantId();
|
||||
int equipmentNumber = m_ddsHandler->participantId2EquipNo(data.participantId());
|
||||
DEBUG_LOG() << "checkShootbackAreaPosition id= " << data.participantId()
|
||||
DEBUG_LOG(m_logger) << "checkShootbackAreaPosition id= " << data.participantId()
|
||||
<< ", equipmentNumber=" << equipmentNumber
|
||||
<< ", sampleTime=" << data.sampleTime()
|
||||
<< ", time difference = " << QDateTime::currentMSecsSinceEpoch() - data.sampleTime();
|
||||
@@ -308,7 +308,7 @@ void HandlerTargetAreas::checkShootbackAreaPosition(const ParticipantManagement:
|
||||
|
||||
printShootbackAreas();
|
||||
|
||||
DEBUG_LOG() << "Participant pos=" << posActual.pos().lat() << "/" << posActual.pos().lon()
|
||||
DEBUG_LOG(m_logger) << "Participant pos=" << posActual.pos().lat() << "/" << posActual.pos().lon()
|
||||
<< ", Utm=" << participantPosUtm.x() << "/" << participantPosUtm.y()
|
||||
<< " m_zone=" << m_zone;
|
||||
|
||||
@@ -322,20 +322,20 @@ void HandlerTargetAreas::checkShootbackAreaPosition(const ParticipantManagement:
|
||||
int targetPreWarningInterval = shootbackTarget.targetInformation.prewarningInterval() * 1000;
|
||||
int targetTimeToEffectInterval = shootbackTarget.targetInformation.takedownInterval() * 1000;
|
||||
|
||||
DEBUG_LOG() << "ShootbackArea ParticipantID=" << shootbackTarget.participantId
|
||||
DEBUG_LOG(m_logger) << "ShootbackArea ParticipantID=" << shootbackTarget.participantId
|
||||
<< " shootbackTarget.shootbackAreasUtm.size()=" << shootbackTarget.shootbackAreasUtm.size()
|
||||
<< " size= " << it.value().shootbackAreasUtm.size();
|
||||
printShootbackTarget(shootbackTarget);
|
||||
if (checkPosInShootbackTarget(shootbackTarget, participantPosUtm))
|
||||
{
|
||||
// START TARGET TIMER
|
||||
DEBUG_LOG() << "Participant ist in ShootbackArea"
|
||||
DEBUG_LOG(m_logger) << "Participant ist in ShootbackArea"
|
||||
<< ", ParticipantId= " << participantId
|
||||
<< ", ShootbackTargetId=" << shootbackTarget.participantId;
|
||||
if (m_targetTimers.contains(participantId))
|
||||
if (m_targetTimers.value(participantId)->getTimerState() != TargetTimer::TimerState::NOT_ACTIVE)
|
||||
return;
|
||||
DEBUG_LOG() << "START TIMER PARTICIPANT_ID=" << participantId
|
||||
DEBUG_LOG(m_logger) << "START TIMER PARTICIPANT_ID=" << participantId
|
||||
<< " targetPreWarningInterval=" << targetPreWarningInterval
|
||||
<< " targetTimeToEffectInterval=" << targetTimeToEffectInterval
|
||||
<< " m_targetTimers.insert(" << participantId << ")";
|
||||
@@ -355,14 +355,14 @@ void HandlerTargetAreas::checkShootbackAreaPosition(const ParticipantManagement:
|
||||
else
|
||||
{
|
||||
// STOP TARGET TIMER
|
||||
DEBUG_LOG() << "Participant ist nicht in ShootbackArea"
|
||||
DEBUG_LOG(m_logger) << "Participant ist nicht in ShootbackArea"
|
||||
<< ", ParticipantId= " << data.participantId()
|
||||
<< ", ShootbackTargetId=" << shootbackTarget.participantId
|
||||
<< ", m_targetTimers.size=" << m_targetTimers.size()
|
||||
<< ", m_targetTimers.contains(participantId)=" << m_targetTimers.contains(participantId);
|
||||
if (!m_targetTimers.contains(participantId))
|
||||
{
|
||||
DEBUG_LOG() << "continue";
|
||||
DEBUG_LOG(m_logger) << "continue";
|
||||
continue;
|
||||
}
|
||||
else
|
||||
@@ -372,7 +372,7 @@ void HandlerTargetAreas::checkShootbackAreaPosition(const ParticipantManagement:
|
||||
{
|
||||
targetTimer->deleteLater();
|
||||
m_targetTimers.remove(participantId);
|
||||
DEBUG_LOG() << "STOP TIMER PARTICIPANT_ID=" << participantId
|
||||
DEBUG_LOG(m_logger) << "STOP TIMER PARTICIPANT_ID=" << participantId
|
||||
<< " m_targetTimers.remove(" << participantId << ")";
|
||||
}
|
||||
}
|
||||
@@ -383,17 +383,17 @@ void HandlerTargetAreas::checkShootbackAreaPosition(const ParticipantManagement:
|
||||
void HandlerTargetAreas::onSendControlDataReply(const Core::FunctionReplyObject &replyObject)
|
||||
{
|
||||
//if (replyObject.error())
|
||||
// WARNING_LOG() << "Can not send hit on participant to training area: " << replyObject();
|
||||
// WARNING_LOG(m_logger) << "Can not send hit on participant to training area: " << replyObject();
|
||||
//else
|
||||
DEBUG_LOG() << "onSendControlDataReply for id " << replyObject.id() << " success";
|
||||
DEBUG_LOG(m_logger) << "onSendControlDataReply for id " << replyObject.id() << " success";
|
||||
}
|
||||
|
||||
void HandlerTargetAreas::onSendCesHitInformationReply(const Core::FunctionReplyObject &replyObject)
|
||||
{
|
||||
//if (replyObject.error())
|
||||
// WARNING_LOG() << "Can not send hit on participant to training area: " << replyObject();
|
||||
// WARNING_LOG(m_logger) << "Can not send hit on participant to training area: " << replyObject();
|
||||
//else
|
||||
DEBUG_LOG() << "onSendCesHitInformationReply for id " << replyObject.id() << " success";
|
||||
DEBUG_LOG(m_logger) << "onSendCesHitInformationReply for id " << replyObject.id() << " success";
|
||||
}
|
||||
|
||||
|
||||
@@ -402,7 +402,7 @@ void HandlerTargetAreas::sendRequestsToTab(int participantId,
|
||||
int countBlink,
|
||||
int effectPercent)
|
||||
{
|
||||
DEBUG_LOG() << "MainWindow::on_Timer1finished participantId=" << participantId
|
||||
DEBUG_LOG(m_logger) << "MainWindow::on_Timer1finished participantId=" << participantId
|
||||
<< " targetParticipantId =" << targetParticipantId;
|
||||
ParticipantManagement::Participant participant = m_participantData.value(participantId);
|
||||
//ShootbackTarget shootbackTarget = m_shootbackTargets.value(participantId);
|
||||
@@ -454,14 +454,14 @@ void HandlerTargetAreas::sendRequestsToTab(int participantId,
|
||||
TrainingAreaBase::SendCesHitRequest hr;
|
||||
hr.aesId(1);
|
||||
|
||||
INFO_LOG() << "sendCesHitRequest: " << hr;
|
||||
INFO_LOG(m_logger) << "sendCesHitRequest: " << hr;
|
||||
ftcTab->sendCesHitRequest(hr, this);
|
||||
|
||||
}
|
||||
|
||||
void HandlerTargetAreas::on_preWarningIntervalFinished(int participantId, int targetParticipantId)
|
||||
{
|
||||
DEBUG_LOG() << "MainWindow::on_Timer1finished participantId=" << participantId
|
||||
DEBUG_LOG(m_logger) << "MainWindow::on_Timer1finished participantId=" << participantId
|
||||
<< " targetParticipantId =" << targetParticipantId;
|
||||
ParticipantManagement::Participant participant = m_participantData.value(participantId);
|
||||
ShootbackTarget shootbackTarget = m_shootbackTargets.value(targetParticipantId);
|
||||
@@ -500,17 +500,17 @@ void HandlerTargetAreas::on_preWarningIntervalFinished(int participantId, int ta
|
||||
|
||||
void HandlerTargetAreas::on_TimeToEffectFinished(int participantId, int targetParticipantId)
|
||||
{
|
||||
DEBUG_LOG() << "HandlerTargetAreas::on_TimeToEffectFinished participantId=" << participantId
|
||||
DEBUG_LOG(m_logger) << "HandlerTargetAreas::on_TimeToEffectFinished participantId=" << participantId
|
||||
<< " targetParticipantId=" << targetParticipantId;
|
||||
|
||||
DEBUG_LOG() << "MainWindow::on_Timer1finished participantId=" << participantId
|
||||
DEBUG_LOG(m_logger) << "MainWindow::on_Timer1finished participantId=" << participantId
|
||||
<< " targetParticipantId =" << targetParticipantId;
|
||||
ParticipantManagement::Participant participant = m_participantData.value(participantId);
|
||||
ShootbackTarget shootbackTarget = m_shootbackTargets.value(targetParticipantId);
|
||||
uint8_t countBlink = 1;
|
||||
int32_t effectPercent = 0;
|
||||
|
||||
DEBUG_LOG() << " shootbackTarget.participantId=" << shootbackTarget.participantId
|
||||
DEBUG_LOG(m_logger) << " shootbackTarget.participantId=" << shootbackTarget.participantId
|
||||
<< " shootbackTarget.targetInformation.participantId()=" << shootbackTarget.targetInformation.participantId()
|
||||
<< " shootbackTarget.targetInformation.prewarningInterval()=" << shootbackTarget.targetInformation.prewarningInterval()
|
||||
<< " prewarningEffect=" << shootbackTarget.targetInformation.prewarningEffect()
|
||||
@@ -540,11 +540,11 @@ void HandlerTargetAreas::on_TimeToEffectFinished(int participantId, int targetPa
|
||||
|
||||
void HandlerTargetAreas::onSendCesHitReply(const Core::FunctionReplyObject &replyObject)
|
||||
{
|
||||
INFO_LOG() << "HandlerTargetAreas::onSendCesHitReply";
|
||||
INFO_LOG(m_logger) << "HandlerTargetAreas::onSendCesHitReply";
|
||||
//if (replyObject.error())
|
||||
// WARNING_LOG() << "Can not send hit on participant to training area: " << replyObject();
|
||||
// WARNING_LOG(m_logger) << "Can not send hit on participant to training area: " << replyObject();
|
||||
//else
|
||||
DEBUG_LOG() << "onSendCesHitReply for id " << replyObject.id() << " success";
|
||||
DEBUG_LOG(m_logger) << "onSendCesHitReply for id " << replyObject.id() << " success";
|
||||
}
|
||||
|
||||
} // namespace TargetAreas
|
||||
+1
@@ -62,6 +62,7 @@ public:
|
||||
|
||||
};
|
||||
protected:
|
||||
NGL::INGLLogger &m_logger;
|
||||
void onSendControlDataReply(const Core::FunctionReplyObject &reply) override final;
|
||||
void onSendCesHitInformationReply(const Core::FunctionReplyObject &reply) override final;
|
||||
void onSendCesHitReply(const Core::FunctionReplyObject &replyObject) override final;
|
||||
|
||||
+6
-6
@@ -41,7 +41,7 @@ bool TargetAreasInterfaceImpl::init(int domain_id, int exerciseId)
|
||||
{
|
||||
m_domainId = domain_id;
|
||||
m_exerciseId = exerciseId;
|
||||
INFO_LOG() << "TargetAreasInterfaceImpl::init()"
|
||||
INFO_LOG(m_logger) << "TargetAreasInterfaceImpl::init()"
|
||||
<< " m_domainId=" << m_domainId
|
||||
<< " m_exerciseId=" << m_exerciseId;
|
||||
|
||||
@@ -49,7 +49,7 @@ bool TargetAreasInterfaceImpl::init(int domain_id, int exerciseId)
|
||||
m_ddsHandlerTargetAreas = std::make_shared<DdsHandlerTargetAreas>(m_domainId, m_exerciseId);
|
||||
if (!m_ddsHandlerTargetAreas->init())
|
||||
{
|
||||
ERROR_LOG() << "Initialisation DdsHandler failed.";
|
||||
ERROR_LOG(m_logger) << "Initialisation DdsHandler failed.";
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -57,11 +57,11 @@ bool TargetAreasInterfaceImpl::init(int domain_id, int exerciseId)
|
||||
|
||||
if (!m_handlerTargetAreas->init())
|
||||
{
|
||||
ERROR_LOG() << "Initialisation HandlerTargetAreas failed.";
|
||||
ERROR_LOG(m_logger) << "Initialisation HandlerTargetAreas failed.";
|
||||
return false;
|
||||
}
|
||||
|
||||
INFO_LOG() << "TargetAreasInterfaceImpl::init() return true";
|
||||
INFO_LOG(m_logger) << "TargetAreasInterfaceImpl::init() return true";
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -69,8 +69,8 @@ QString TargetAreasInterfaceImpl::echo(const QString &message)
|
||||
{
|
||||
|
||||
QString ret(QStringLiteral("<<<< %1 >>>> TargetAreasInterfaceImpl::echo").arg(message));
|
||||
INFO_LOG() << "TargetAreasInterfaceImpl::echo return:" << ret;
|
||||
DEBUG_LOG() << "DEBUG: TargetAreasInterfaceImpl::echo return:" << ret;
|
||||
INFO_LOG(m_logger) << "TargetAreasInterfaceImpl::echo return:" << ret;
|
||||
DEBUG_LOG(m_logger) << "DEBUG: TargetAreasInterfaceImpl::echo return:" << ret;
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
+1
@@ -48,6 +48,7 @@ private Q_SLOTS:
|
||||
bool init(int domain_id, int exerciseId) override;
|
||||
private:
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
private:
|
||||
CentralEffectSimulation::Plugin::DataProvider *m_pdp;
|
||||
std::shared_ptr<DDSConnector::DdsConnector> m_ddsConnector;
|
||||
|
||||
Reference in new issue
Block a user