Adds immediate migration results in progress
This commit is contained in:
2102 files changed
+17482
-15071
No files matched your search
+73
-73
@@ -83,7 +83,7 @@ ModuleTestEffectCluster::ModuleTestEffectCluster(int domainId, int exerciseId)
|
||||
this,
|
||||
[this]()
|
||||
{
|
||||
DEBUG_LOG() << "Wirkfeldplanung";
|
||||
DEBUG_LOG(m_logger) << "Wirkfeldplanung";
|
||||
doEffectClusterModifyRequest();
|
||||
});
|
||||
}
|
||||
@@ -91,28 +91,28 @@ ModuleTestEffectCluster::ModuleTestEffectCluster(int domainId, int exerciseId)
|
||||
void ModuleTestEffectCluster::onEffectClusterModifyReply(const Core::FunctionReplyObject &replyObject)
|
||||
{
|
||||
m_replyError = replyObject.error();
|
||||
DEBUG_LOG() << " got reply - onEffectClusterModifyReply: " << m_replyError << ", aesItemId=" << replyObject.id();
|
||||
DEBUG_LOG(m_logger) << " got reply - onEffectClusterModifyReply: " << m_replyError << ", aesItemId=" << replyObject.id();
|
||||
m_aesItemId = replyObject.id();
|
||||
if (!replyObject.str().empty())
|
||||
ERROR_LOG() << " got reply - onEffectClusterModifyReply: " << replyObject.translated();
|
||||
ERROR_LOG(m_logger) << " got reply - onEffectClusterModifyReply: " << replyObject.translated();
|
||||
}
|
||||
|
||||
void ModuleTestEffectCluster::onAcknowledgeExternalAesItemReply(const Core::FunctionReplyObject &replyObject)
|
||||
{
|
||||
m_replyError = replyObject.error();
|
||||
DEBUG_LOG() << " got reply - onAcknowledgeExternalAesItemReply: " << m_replyError;
|
||||
DEBUG_LOG(m_logger) << " got reply - onAcknowledgeExternalAesItemReply: " << m_replyError;
|
||||
sendTabExFire();
|
||||
// AES::EffectState von ES_Received -> ES_Created
|
||||
if (!replyObject.str().empty())
|
||||
ERROR_LOG() << " got reply - onAcknowledgeExternalAesItemReply: " << replyObject.translated();
|
||||
ERROR_LOG(m_logger) << " got reply - onAcknowledgeExternalAesItemReply: " << replyObject.translated();
|
||||
}
|
||||
|
||||
void ModuleTestEffectCluster::onModifyPartyDataReply(const Core::FunctionReplyObject &replyObject)
|
||||
{
|
||||
m_replyError = replyObject.error();
|
||||
DEBUG_LOG() << " got reply - onModifyPartyDataReply: " << m_replyError << " " << replyObject.additionalInfo();
|
||||
DEBUG_LOG(m_logger) << " got reply - onModifyPartyDataReply: " << m_replyError << " " << replyObject.additionalInfo();
|
||||
if (!replyObject.str().empty())
|
||||
ERROR_LOG() << " got reply - onModifyPartyDataReply: " << replyObject.translated();
|
||||
ERROR_LOG(m_logger) << " got reply - onModifyPartyDataReply: " << replyObject.translated();
|
||||
if (!m_participantChangeRequestDone)
|
||||
{
|
||||
participantChangeRequest();
|
||||
@@ -123,24 +123,24 @@ void ModuleTestEffectCluster::onModifyPartyDataReply(const Core::FunctionReplyOb
|
||||
void ModuleTestEffectCluster::onModifyParticipantDataReply(const Core::FunctionReplyObject &replyObject)
|
||||
{
|
||||
m_replyError = replyObject.error();
|
||||
DEBUG_LOG() << " \n\ngot reply - onModifyParticipantDataReply error: " << m_replyError << ", additionalInfo: " << replyObject.additionalInfo();
|
||||
DEBUG_LOG(m_logger) << " \n\ngot reply - onModifyParticipantDataReply error: " << m_replyError << ", additionalInfo: " << replyObject.additionalInfo();
|
||||
if (!replyObject.str().empty())
|
||||
ERROR_LOG() << " got reply - onModifyParticipantDataReply: " << replyObject.translated();
|
||||
DEBUG_LOG() << "onModifyParticipantDataReply => Set Participant Pos";
|
||||
ERROR_LOG(m_logger) << " got reply - onModifyParticipantDataReply: " << replyObject.translated();
|
||||
DEBUG_LOG(m_logger) << "onModifyParticipantDataReply => Set Participant Pos";
|
||||
QJsonArray jsonArray = QJsonDocument::fromJson(QByteArray::fromStdString(replyObject.additionalInfo())).object().value(QLatin1String("participants")).toArray();
|
||||
DEBUG_LOG() << "available_in_exercise jsonDocument.size()=" << jsonArray.size();
|
||||
DEBUG_LOG(m_logger) << "available_in_exercise jsonDocument.size()=" << jsonArray.size();
|
||||
// ParticipantId aus dem Result bestimmen, keine Unit
|
||||
// Dieser einfache Test arbeitet mit einem Participant
|
||||
for (auto it = jsonArray.constBegin(); it != jsonArray.constEnd(); ++it)
|
||||
{
|
||||
int participantId = it->toInt();
|
||||
DEBUG_LOG() << "participantId=" << participantId;
|
||||
DEBUG_LOG(m_logger) << "participantId=" << participantId;
|
||||
ParticipantManagement::Participant participant = m_ppmDtc->participant(participantId);
|
||||
if (m_ppmDtc->type(participant.typeId()).typeClass().underlying() != ParticipantManagement::TypeClass::Unit)
|
||||
{
|
||||
DEBUG_LOG() << "m_participant1.id=" << participantId;
|
||||
DEBUG_LOG(m_logger) << "m_participant1.id=" << participantId;
|
||||
m_participant1.id(participantId); // wichtig zum loeschen
|
||||
DEBUG_LOG() << "m_participantId keine Unit=" << participantId;
|
||||
DEBUG_LOG(m_logger) << "m_participantId keine Unit=" << participantId;
|
||||
setParticipantPos(participantId);
|
||||
setEquipmentGearCharge(participantId);
|
||||
|
||||
@@ -150,7 +150,7 @@ void ModuleTestEffectCluster::onModifyParticipantDataReply(const Core::FunctionR
|
||||
}
|
||||
else
|
||||
{
|
||||
DEBUG_LOG() << "m_participant0.id=" << participantId;
|
||||
DEBUG_LOG(m_logger) << "m_participant0.id=" << participantId;
|
||||
m_participant0.id(participantId); // wichtig zum loeschen
|
||||
}
|
||||
}
|
||||
@@ -168,7 +168,7 @@ void ModuleTestEffectCluster::onAesItemViewChanged(const AesItemView &aesItemVie
|
||||
if (aesItemView.aesItemId() != m_aesItemId)
|
||||
return;
|
||||
|
||||
DEBUG_LOG() << " got onAesItemViewChanged: "
|
||||
DEBUG_LOG(m_logger) << " got onAesItemViewChanged: "
|
||||
<< ", aesItemId=" << aesItemView.aesItemId() << ", aesType=" << aesType << ", effectStateId=" << aesItemView.effectStateId();
|
||||
|
||||
QCOMPARE(aesItemView.effectStateId(), m_effectStates[m_effectStateCounter]);
|
||||
@@ -176,14 +176,14 @@ void ModuleTestEffectCluster::onAesItemViewChanged(const AesItemView &aesItemVie
|
||||
|
||||
if (aesItemView.effectStateId() == AreaEffectSimulation::AesEffectState::EsReceived)
|
||||
{
|
||||
DEBUG_LOG() << "sendAcknowledgeExternalAesItemRequest aesItemId=" << aesItemView.aesItemId();
|
||||
DEBUG_LOG(m_logger) << "sendAcknowledgeExternalAesItemRequest aesItemId=" << aesItemView.aesItemId();
|
||||
sendAcknowledgeExternalAesItemRequest(aesItemView.aesItemId());
|
||||
}
|
||||
}
|
||||
|
||||
void ModuleTestEffectCluster::sendTabExFire()
|
||||
{
|
||||
DEBUG_LOG() << "sendTabExFire";
|
||||
DEBUG_LOG(m_logger) << "sendTabExFire";
|
||||
TrainingAreaBase::EX_Fire exFire;
|
||||
exFire.effectorId(m_effectorId); // Kenner z.B B1
|
||||
exFire.identifier(m_identifier.toStdString()); // Verein z.B 451100
|
||||
@@ -199,16 +199,16 @@ void ModuleTestEffectCluster::onEffectsChanged(const Effects &effects, DataModif
|
||||
if (modType == DataModification::eRemoved)
|
||||
return;
|
||||
AreaEffectSimulation::AesType_def::type aesType = effects.aesTypeId().underlying();
|
||||
DEBUG_LOG() << " got onEffectsChanged - m_data: " << m_data.id() << ", aesType=" << aesType;
|
||||
DEBUG_LOG(m_logger) << " got onEffectsChanged - m_data: " << m_data.id() << ", aesType=" << aesType;
|
||||
++m_counterDds.cntEffectClusterEffects;
|
||||
|
||||
m_effects = effects;
|
||||
DEBUG_LOG() << " got onEffectsChanged - m_effects: " << m_effects;
|
||||
DEBUG_LOG(m_logger) << " got onEffectsChanged - m_effects: " << m_effects;
|
||||
}
|
||||
|
||||
void ModuleTestEffectCluster::onChargeEffectChanged(const ChargeEffect &chargeEffect, DataModification modType)
|
||||
{
|
||||
DEBUG_LOG() << "onChargeEffectChanged state=" << chargeEffect.state();
|
||||
DEBUG_LOG(m_logger) << "onChargeEffectChanged state=" << chargeEffect.state();
|
||||
if (modType == DataModification::eRemoved)
|
||||
return;
|
||||
if (chargeEffect.state() == AreaEffectSimulation::AesEffectState::EsActivated)
|
||||
@@ -225,7 +225,7 @@ void ModuleTestEffectCluster::onChargeEffectChanged(const ChargeEffect &chargeEf
|
||||
}
|
||||
else if (chargeEffect.state() == AreaEffectSimulation::AesEffectState::EsExpired)
|
||||
participantDeleteRequest();
|
||||
DEBUG_LOG() << " got onEffectsChanged - m_effects: " << m_effects;
|
||||
DEBUG_LOG(m_logger) << " got onEffectsChanged - m_effects: " << m_effects;
|
||||
}
|
||||
|
||||
void ModuleTestEffectCluster::onTrajectoryTimeAwareChanged(const TrajectoryTimeAware &data, DataModification modType)
|
||||
@@ -236,12 +236,12 @@ void ModuleTestEffectCluster::onTrajectoryTimeAwareChanged(const TrajectoryTimeA
|
||||
|
||||
++m_counterDds.cntTrajectory;
|
||||
|
||||
DEBUG_LOG() << " got TrajectoryTimeAwareChanged - data: " << data.id() << ", cntTrajectory=" << m_counterDds.cntTrajectory;
|
||||
DEBUG_LOG(m_logger) << " got TrajectoryTimeAwareChanged - data: " << data.id() << ", cntTrajectory=" << m_counterDds.cntTrajectory;
|
||||
}
|
||||
|
||||
void ModuleTestEffectCluster::dumpCnt()
|
||||
{
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " Counter: "
|
||||
DEBUG_LOG(m_logger) << Q_FUNC_INFO << " Counter: "
|
||||
<< " cntEffectCluster = " << m_counterDds.cntEffectCluster << ", cntAtEffectCluster = " << m_counterDds.cntAtEffectCluster
|
||||
<< ", cntGunToTargetLine = " << m_counterDds.cntAtEffectClusterGunToTargetLine << ", cntClusterEffects = " << m_counterDds.cntEffectClusterEffects
|
||||
<< ", cntTrajectory = " << m_counterDds.cntTrajectory;
|
||||
@@ -258,7 +258,7 @@ bool ModuleTestEffectCluster::waitForData(const std::function<bool()> &func, int
|
||||
|
||||
for (int i = 0; i < retryCount; ++i)
|
||||
{
|
||||
TRACE_LOG() << " waitForData - i: " << i;
|
||||
TRACE_LOG(m_logger) << " waitForData - i: " << i;
|
||||
if (func())
|
||||
return true;
|
||||
QTest::qWait(1000);
|
||||
@@ -299,7 +299,7 @@ EffectCluster ModuleTestEffectCluster::getEcForTneVerification(const QString &ea
|
||||
|
||||
QPointF bottomLeft(Polygons::centerPoint2BottomLeft(cp.geographic(), width, height, rot));
|
||||
|
||||
DEBUG_LOG() << " bottomLeft" << bottomLeft;
|
||||
DEBUG_LOG(m_logger) << " bottomLeft" << bottomLeft;
|
||||
|
||||
eaData.area().cornerBottomLeft(Core::GeoPosition(bottomLeft.x(), bottomLeft.y(), 0.0));
|
||||
eaData.area().height(height);
|
||||
@@ -359,23 +359,23 @@ std::vector<Core::RelativePositionRelativeTime> ModuleTestEffectCluster::parseTr
|
||||
}
|
||||
}
|
||||
points.push_back(p);
|
||||
DEBUG_LOG() << "Punkt gelesen: offsetY" << p.offsetX() << ", offsetY" << p.offsetY() << ", offsetZ" << p.offsetZ() << ", time=" << p.relativeTime();
|
||||
DEBUG_LOG(m_logger) << "Punkt gelesen: offsetY" << p.offsetX() << ", offsetY" << p.offsetY() << ", offsetZ" << p.offsetZ() << ", time=" << p.relativeTime();
|
||||
}
|
||||
}
|
||||
|
||||
if (xml.hasError())
|
||||
{
|
||||
DEBUG_LOG() << "XML Fehler:" << xml.errorString();
|
||||
DEBUG_LOG(m_logger) << "XML Fehler:" << xml.errorString();
|
||||
}
|
||||
DEBUG_LOG() << "file.close()";
|
||||
DEBUG_LOG(m_logger) << "file.close()";
|
||||
file.close();
|
||||
DEBUG_LOG() << "return points";
|
||||
DEBUG_LOG(m_logger) << "return points";
|
||||
return points;
|
||||
}
|
||||
|
||||
int ModuleTestEffectCluster::sendAcknowledgeExternalAesItemRequest(int aesItemId)
|
||||
{
|
||||
DEBUG_LOG() << "sendAcknowledgeExternalAesItemRequest aesItemId=" << aesItemId;
|
||||
DEBUG_LOG(m_logger) << "sendAcknowledgeExternalAesItemRequest aesItemId=" << aesItemId;
|
||||
int ret = m_aesFtc->acknowledgeExternalAesItemRequest(AcknowledgeExternalAesItemRequest(aesItemId), this);
|
||||
return ret;
|
||||
}
|
||||
@@ -387,9 +387,9 @@ int ModuleTestEffectCluster::doEffectClusterModifyRequest()
|
||||
m_reference = dateTimeString;
|
||||
|
||||
if (eaData.effectStart().is_set())
|
||||
INFO_LOG() << " effectClusterModifyRequest with effectStart: " << QDateTime::fromMSecsSinceEpoch(eaData.effectStart().get()).toString();
|
||||
INFO_LOG(m_logger) << " effectClusterModifyRequest with effectStart: " << QDateTime::fromMSecsSinceEpoch(eaData.effectStart().get()).toString();
|
||||
else
|
||||
INFO_LOG() << " effectClusterModifyRequest with effectStart: not set ";
|
||||
INFO_LOG(m_logger) << " effectClusterModifyRequest with effectStart: not set ";
|
||||
|
||||
FlightCurve fc;
|
||||
// if (eaData.flightCurve().is_set())
|
||||
@@ -439,7 +439,7 @@ int ModuleTestEffectCluster::doEffectClusterModifyRequest()
|
||||
AreaEffectSimulation::EffectorData effector;
|
||||
effector.angleOfFall(0);
|
||||
effector.participantId(m_participant1.id()); // Participant
|
||||
DEBUG_LOG() << "effector.participantId(m_participant1.id()=" << m_participant1.id();
|
||||
DEBUG_LOG(m_logger) << "effector.participantId(m_participant1.id()=" << m_participant1.id();
|
||||
|
||||
effector.flightTime(39526.3);
|
||||
effector.peakHeight(2002.0);
|
||||
@@ -454,26 +454,26 @@ int ModuleTestEffectCluster::doEffectClusterModifyRequest()
|
||||
effector.mhpPosition(mhpPosition);
|
||||
effector.trajectoryRelative(trajectory);
|
||||
|
||||
DEBUG_LOG() << "effector";
|
||||
DEBUG_LOG(m_logger) << "effector";
|
||||
|
||||
std::vector<AreaEffectSimulation::EffectorData> effectors;
|
||||
effectors.push_back(effector);
|
||||
|
||||
DEBUG_LOG() << "Nach effector";
|
||||
DEBUG_LOG(m_logger) << "Nach effector";
|
||||
|
||||
eaData.id(0);
|
||||
eaData.effectSourceId(ProjectDataManagement::EffectSource::ES_ADLER);
|
||||
eaData.firePurposeId(2);
|
||||
eaData.partyId(4);
|
||||
eaData.participantId(m_participant0.id()); // Unit
|
||||
DEBUG_LOG() << "eaData.participantId(m_participant0.id()=" << m_participant0.id();
|
||||
DEBUG_LOG(m_logger) << "eaData.participantId(m_participant0.id()=" << m_participant0.id();
|
||||
eaData.externalId(7);
|
||||
eaData.effectMarkingInTa(1);
|
||||
|
||||
eaData.name(dateTimeString.toStdString());
|
||||
eaData.element(dateTimeString.toStdString());
|
||||
|
||||
DEBUG_LOG() << "Vor send effectClusterModifyRequest";
|
||||
DEBUG_LOG(m_logger) << "Vor send effectClusterModifyRequest";
|
||||
|
||||
int ret = m_aesFtc->effectClusterModifyRequest(EffectClusterModifyRequest(eaData.id(),
|
||||
eaData.name(),
|
||||
@@ -493,7 +493,7 @@ int ModuleTestEffectCluster::doEffectClusterModifyRequest()
|
||||
eaData.effectMarkingInTa(),
|
||||
eaData.properties()),
|
||||
this);
|
||||
DEBUG_LOG() << "send effectClusterModifyRequest ret=" << ret;
|
||||
DEBUG_LOG(m_logger) << "send effectClusterModifyRequest ret=" << ret;
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -502,31 +502,31 @@ void ModuleTestEffectCluster::waitForEffectStates(int lineNumber, int durPrep, i
|
||||
// expected condition:
|
||||
if (!waitForData([this]() { return m_replyError == false; }, 1))
|
||||
{
|
||||
ERROR_LOG() << "Error on request"
|
||||
ERROR_LOG(m_logger) << "Error on request"
|
||||
<< ", lineNumber = " << lineNumber;
|
||||
return;
|
||||
}
|
||||
|
||||
INFO_LOG() << Q_FUNC_INFO << " waiting for EsPrepared...";
|
||||
INFO_LOG(m_logger) << Q_FUNC_INFO << " waiting for EsPrepared...";
|
||||
if (!waitForData([this]() { return m_data.effectStateId() == AreaEffectSimulation::AesEffectState_def::EsPrepared; }, durPrep))
|
||||
{
|
||||
ERROR_LOG() << "Timeout waiting for EsPrepared of explosion cluster with id " << m_data.id() << ", lineNumber = " << lineNumber;
|
||||
ERROR_LOG(m_logger) << "Timeout waiting for EsPrepared of explosion cluster with id " << m_data.id() << ", lineNumber = " << lineNumber;
|
||||
QVERIFY2(false, "ERROR, exit");
|
||||
return;
|
||||
}
|
||||
|
||||
INFO_LOG() << Q_FUNC_INFO << " waiting for EsActivated...";
|
||||
INFO_LOG(m_logger) << Q_FUNC_INFO << " waiting for EsActivated...";
|
||||
if (!waitForData([this]() { return m_data.effectStateId() == AreaEffectSimulation::AesEffectState_def::EsActivated; }, durAct))
|
||||
{
|
||||
ERROR_LOG() << "Timeout waiting for EsActivated of explosion cluster with id " << m_data.id() << ", lineNumber = " << lineNumber;
|
||||
ERROR_LOG(m_logger) << "Timeout waiting for EsActivated of explosion cluster with id " << m_data.id() << ", lineNumber = " << lineNumber;
|
||||
QVERIFY2(false, "ERROR, exit");
|
||||
return;
|
||||
}
|
||||
|
||||
INFO_LOG() << Q_FUNC_INFO << " waiting for EsExpired...";
|
||||
INFO_LOG(m_logger) << Q_FUNC_INFO << " waiting for EsExpired...";
|
||||
if (!waitForData([this]() { return m_data.effectStateId() == AreaEffectSimulation::AesEffectState_def::EsExpired; }, durExp))
|
||||
{
|
||||
ERROR_LOG() << "Timeout waiting for EsExpired of explosion cluster with id " << m_data.id() << ", lineNumber = " << lineNumber;
|
||||
ERROR_LOG(m_logger) << "Timeout waiting for EsExpired of explosion cluster with id " << m_data.id() << ", lineNumber = " << lineNumber;
|
||||
QVERIFY2(false, "ERROR, exit");
|
||||
return;
|
||||
}
|
||||
@@ -534,7 +534,7 @@ void ModuleTestEffectCluster::waitForEffectStates(int lineNumber, int durPrep, i
|
||||
|
||||
void ModuleTestEffectCluster::disconnectFromParty()
|
||||
{
|
||||
DEBUG_LOG() << "PPM::ModifyPartyDataRequest";
|
||||
DEBUG_LOG(m_logger) << "PPM::ModifyPartyDataRequest";
|
||||
|
||||
ParticipantManagement::Party party;
|
||||
|
||||
@@ -559,14 +559,14 @@ void ModuleTestEffectCluster::disconnectFromParty()
|
||||
|
||||
if (!m_ppmFtc->modifyPartyDataRequest(req, this))
|
||||
{
|
||||
ERROR_LOG() << "Error creating party data";
|
||||
ERROR_LOG(m_logger) << "Error creating party data";
|
||||
// failExit();
|
||||
}
|
||||
}
|
||||
|
||||
void ModuleTestEffectCluster::connectToParty()
|
||||
{
|
||||
DEBUG_LOG() << "PPM::ModifyPartyDataRequest";
|
||||
DEBUG_LOG(m_logger) << "PPM::ModifyPartyDataRequest";
|
||||
|
||||
ParticipantManagement::Party party;
|
||||
|
||||
@@ -592,14 +592,14 @@ void ModuleTestEffectCluster::connectToParty()
|
||||
|
||||
if (!m_ppmFtc->modifyPartyDataRequest(req, this))
|
||||
{
|
||||
ERROR_LOG() << "Error creating party data";
|
||||
ERROR_LOG(m_logger) << "Error creating party data";
|
||||
// failExit();
|
||||
}
|
||||
}
|
||||
|
||||
void ModuleTestEffectCluster::participantChangeRequest()
|
||||
{
|
||||
DEBUG_LOG() << "PPM::participantChangerequest";
|
||||
DEBUG_LOG(m_logger) << "PPM::participantChangerequest";
|
||||
|
||||
m_participant0.id(0);
|
||||
m_participant0.partyId(4);
|
||||
@@ -643,14 +643,14 @@ void ModuleTestEffectCluster::participantChangeRequest()
|
||||
req.data(data);
|
||||
if (!m_ppmFtc->modifyParticipantDataRequest(req, this))
|
||||
{
|
||||
ERROR_LOG() << "Error creating party data";
|
||||
ERROR_LOG(m_logger) << "Error creating party data";
|
||||
// failExit();
|
||||
}
|
||||
}
|
||||
|
||||
void ModuleTestEffectCluster::participantDeleteRequest()
|
||||
{
|
||||
DEBUG_LOG() << "PPM::participantDeleteRequest";
|
||||
DEBUG_LOG(m_logger) << "PPM::participantDeleteRequest";
|
||||
|
||||
m_participant0.isDeleted(true);
|
||||
|
||||
@@ -664,14 +664,14 @@ void ModuleTestEffectCluster::participantDeleteRequest()
|
||||
req.data(data);
|
||||
if (!m_ppmFtc->modifyParticipantDataRequest(req, this))
|
||||
{
|
||||
ERROR_LOG() << "Error creating party data";
|
||||
ERROR_LOG(m_logger) << "Error creating party data";
|
||||
// failExit();
|
||||
}
|
||||
}
|
||||
|
||||
void ModuleTestEffectCluster::setParticipantPos(int participantId)
|
||||
{
|
||||
DEBUG_LOG() << "setupParticipants";
|
||||
DEBUG_LOG(m_logger) << "setupParticipants";
|
||||
TrainingAreaBase::TabPosition position;
|
||||
Core::GeoPosition geoPos;
|
||||
TrainingAreaBase::EquipmentPosition pos;
|
||||
@@ -680,7 +680,7 @@ void ModuleTestEffectCluster::setParticipantPos(int participantId)
|
||||
geoPos.lat(0.91579597);
|
||||
geoPos.z(0.0);
|
||||
|
||||
DEBUG_LOG() << " initTestCase_data1 ...";
|
||||
DEBUG_LOG(m_logger) << " initTestCase_data1 ...";
|
||||
pos.equipmentNumber(participantId * -1); // ParticipantId
|
||||
pos.sampleTime(QDateTime::currentMSecsSinceEpoch());
|
||||
position.reportingSource(Core::PositionReportingSource::SetByOperator);
|
||||
@@ -691,7 +691,7 @@ void ModuleTestEffectCluster::setParticipantPos(int participantId)
|
||||
|
||||
void ModuleTestEffectCluster::setEquipmentGearCharge(int participantId)
|
||||
{
|
||||
DEBUG_LOG() << "setupEquipmentGearCharge";
|
||||
DEBUG_LOG(m_logger) << "setupEquipmentGearCharge";
|
||||
TrainingAreaBase::EquipmentGearChargeState egs;
|
||||
TrainingAreaBase::GearCharge charge;
|
||||
std::vector<TrainingAreaBase::GearCharge> charges;
|
||||
@@ -729,7 +729,7 @@ void ModuleTestEffectCluster::setEquipmentGearCharge(int participantId)
|
||||
|
||||
void ModuleTestEffectCluster::onPartyChanged(const ParticipantManagement::Party &data, DataModification modType)
|
||||
{
|
||||
DEBUG_LOG() << "onPartyChanged:" << data;
|
||||
DEBUG_LOG(m_logger) << "onPartyChanged:" << data;
|
||||
// Remove Participant:
|
||||
if (modType == DataModification::eRemoved)
|
||||
{
|
||||
@@ -741,14 +741,14 @@ void ModuleTestEffectCluster::onPartyChanged(const ParticipantManagement::Party
|
||||
return;
|
||||
}
|
||||
|
||||
DEBUG_LOG() << "onPartyChanged id= " << data.id();
|
||||
DEBUG_LOG(m_logger) << "onPartyChanged id= " << data.id();
|
||||
if (m_ppmDtc->saaConnectedState(data.id()) == ParticipantManagement::ConnectState::Connected)
|
||||
{
|
||||
DEBUG_LOG() << "onPartyChanged saaConnectedState == connected";
|
||||
DEBUG_LOG(m_logger) << "onPartyChanged saaConnectedState == connected";
|
||||
}
|
||||
else if (m_ppmDtc->saaConnectedState(data.id()) == ParticipantManagement::ConnectState::Disconnected)
|
||||
{
|
||||
DEBUG_LOG() << "onPartyChanged saaConnectedState == disconnected => connectToParty";
|
||||
DEBUG_LOG(m_logger) << "onPartyChanged saaConnectedState == disconnected => connectToParty";
|
||||
connectToParty();
|
||||
}
|
||||
}
|
||||
@@ -762,7 +762,7 @@ void ModuleTestEffectCluster::initTestCase()
|
||||
// DdsConnector
|
||||
//
|
||||
|
||||
DEBUG_LOG() << "DDSConnector: m_domainId " << m_domainId << ", m_exerciseId " << m_exerciseId;
|
||||
DEBUG_LOG(m_logger) << "DDSConnector: m_domainId " << m_domainId << ", m_exerciseId " << m_exerciseId;
|
||||
|
||||
QFile file(s_REQUEST_SPL_FILE);
|
||||
const bool bFileExists = file.exists();
|
||||
@@ -774,14 +774,14 @@ void ModuleTestEffectCluster::initTestCase()
|
||||
QVERIFY2(bInit, "ERROR, ddsConnector.init failed!!");
|
||||
if (!bInit)
|
||||
{
|
||||
ERROR_LOG() << " ERROR, ddsConnector.init failed!!";
|
||||
ERROR_LOG(m_logger) << " ERROR, ddsConnector.init failed!!";
|
||||
return;
|
||||
}
|
||||
INFO_LOG() << " ddsConnector.init successfull";
|
||||
INFO_LOG(m_logger) << " ddsConnector.init successfull";
|
||||
|
||||
// cmd
|
||||
m_ddsConnector->initPublisherSubscriber();
|
||||
INFO_LOG() << " ddsConnector.initPublisherSubscriber done";
|
||||
INFO_LOG(m_logger) << " ddsConnector.initPublisherSubscriber done";
|
||||
|
||||
//
|
||||
// Aes
|
||||
@@ -802,12 +802,12 @@ void ModuleTestEffectCluster::initTestCase()
|
||||
|
||||
m_aesDtc->enableAesItemView();
|
||||
m_aesDtc->enableChargeEffect();
|
||||
DEBUG_LOG() << " waitForHistoricalDataAesItemView... ";
|
||||
DEBUG_LOG(m_logger) << " waitForHistoricalDataAesItemView... ";
|
||||
m_aesDtc->waitForHistoricalDataAesItemView(2000);
|
||||
DEBUG_LOG() << " waitForHistoricalDataAesItemView... Done";
|
||||
DEBUG_LOG(m_logger) << " waitForHistoricalDataAesItemView... Done";
|
||||
|
||||
QMap<qint32, AreaEffectSimulation::AesItemView> aesItemViewsCont = m_aesDtc->aesItemViews();
|
||||
DEBUG_LOG() << " aesItemViewsCont.size() " << aesItemViewsCont.size();
|
||||
DEBUG_LOG(m_logger) << " aesItemViewsCont.size() " << aesItemViewsCont.size();
|
||||
|
||||
//
|
||||
// PDM
|
||||
@@ -832,13 +832,13 @@ void ModuleTestEffectCluster::initTestCase()
|
||||
QVERIFY2(bRet, "ERROR, enableAll m_exmDtc failed!!");
|
||||
|
||||
m_exmDtc->waitForHistoricalDataExercise(2000);
|
||||
DEBUG_LOG() << " waitForHistoricalDataExercise... Done";
|
||||
DEBUG_LOG(m_logger) << " waitForHistoricalDataExercise... Done";
|
||||
|
||||
const ExerciseManagement::Exercise &exercise = m_exmDtc->exercise(m_exerciseId);
|
||||
QVERIFY2(exercise.id() == m_exerciseId, "ERROR, exercise failed!!");
|
||||
m_traingAreaId = exercise.trainingAreaId();
|
||||
|
||||
DEBUG_LOG() << " ExerciseManagement"
|
||||
DEBUG_LOG(m_logger) << " ExerciseManagement"
|
||||
<< ", m_traingAreaId = " << m_traingAreaId;
|
||||
//
|
||||
// PPM ParticipantManagement
|
||||
@@ -861,7 +861,7 @@ void ModuleTestEffectCluster::initTestCase()
|
||||
bRet = bRet && m_tabDts->enableAll();
|
||||
QVERIFY2(bRet, "ERROR, m_tabDts enableAll failed!!");
|
||||
|
||||
DEBUG_LOG() << "disconnectFromParty";
|
||||
DEBUG_LOG(m_logger) << "disconnectFromParty";
|
||||
disconnectFromParty();
|
||||
// connectToParty();
|
||||
|
||||
@@ -896,9 +896,9 @@ void ModuleTestEffectCluster::cleanupTestCase()
|
||||
// finish last (dds) calls:
|
||||
waitForData([]() { return false; }, 10);
|
||||
|
||||
INFO_LOG() << " ddsConnector destroy...";
|
||||
INFO_LOG(m_logger) << " ddsConnector destroy...";
|
||||
m_ddsConnector.reset();
|
||||
INFO_LOG() << " ddsConnector destroy...DONE";
|
||||
INFO_LOG(m_logger) << " ddsConnector destroy...DONE";
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
|
||||
+2
@@ -61,6 +61,8 @@ public:
|
||||
ModuleTestEffectCluster(int domainId, int exerciseId);
|
||||
|
||||
protected:
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
void onEffectClusterModifyReply(const Core::FunctionReplyObject &replyObject) override;
|
||||
void onAcknowledgeExternalAesItemReply(const Core::FunctionReplyObject &replyObject) override;
|
||||
void onModifyPartyDataReply(const Core::FunctionReplyObject &replyObject) override;
|
||||
|
||||
Reference in new issue
Block a user