Migrates AreaEffectSimulation to generated rtiddsgen API

Converts accessor calls to plain member access across aes service and plugin.
This commit is contained in:
berrux-dev committed 2026-09-21 02:45:07 +02:00
1 parent e8d07af320
commit 472f537313
102 files changed
+3307 -3313

No files matched your search

@@ -61,13 +61,13 @@ double distanceMeter(const LtsCoordTrans::UtmCoordinate &utmCoord1, const LtsCoo
double distanceMeter(const Core::GeoPosition &geoPos, const LtsCoordTrans::UtmCoordinate &utmCoord)
{
const LtsCoordTrans::UtmCoordinate &utmPos = LtsCoordTrans::UtmCoordinate::fromGeographic(geoPos.lon(), geoPos.lat());
const LtsCoordTrans::UtmCoordinate &utmPos = LtsCoordTrans::UtmCoordinate::fromGeographic(geoPos.lon, geoPos.lat);
return distanceMeter(utmPos, utmCoord);
}
double distanceMeter(const Core::GeoPosition2D &geoPos2D, const LtsCoordTrans::UtmCoordinate &utmCoord)
{
const LtsCoordTrans::UtmCoordinate &utmPos = LtsCoordTrans::UtmCoordinate::fromGeographic(geoPos2D.lon(), geoPos2D.lat());
const LtsCoordTrans::UtmCoordinate &utmPos = LtsCoordTrans::UtmCoordinate::fromGeographic(geoPos2D.lon, geoPos2D.lat);
return distanceMeter(utmPos, utmCoord);
}
@@ -136,10 +136,10 @@ void ModuleTestEffectCluster::onModifyParticipantDataReply(const Core::FunctionR
int participantId = it->toInt();
DEBUG_LOG(m_logger) << "participantId=" << participantId;
ParticipantManagement::Participant participant = m_ppmDtc->participant(participantId);
if (m_ppmDtc->type(participant.typeId()).typeClass().underlying() != ParticipantManagement::TypeClass::Unit)
if (m_ppmDtc->type(participant.typeId).typeClass != ParticipantManagement::TypeClass::Unit)
{
DEBUG_LOG(m_logger) << "m_participant1.id=" << participantId;
m_participant1.id(participantId); // wichtig zum loeschen
m_participant1.id = participantId; // wichtig zum loeschen
DEBUG_LOG(m_logger) << "m_participantId keine Unit=" << participantId;
setParticipantPos(participantId);
setEquipmentGearCharge(participantId);
@@ -151,7 +151,7 @@ void ModuleTestEffectCluster::onModifyParticipantDataReply(const Core::FunctionR
else
{
DEBUG_LOG(m_logger) << "m_participant0.id=" << participantId;
m_participant0.id(participantId); // wichtig zum loeschen
m_participant0.id = participantId; // wichtig zum loeschen
}
}
}
@@ -161,23 +161,23 @@ void ModuleTestEffectCluster::onAesItemViewChanged(const AesItemView &aesItemVie
if (modType == DataModification::eRemoved)
return;
AreaEffectSimulation::AesType_def::type aesType = aesItemView.aesTypeId().underlying();
if (aesType != AreaEffectSimulation::AesType_def::AtEffectCluster)
AreaEffectSimulation::AesType::type aesType = aesItemView.aesTypeId().underlying();
if (aesType != AreaEffectSimulation::AesType::AtEffectCluster)
return;
if (aesItemView.aesItemId() != m_aesItemId)
if (aesItemView.aesItemId != m_aesItemId)
return;
DEBUG_LOG(m_logger) << " got onAesItemViewChanged: "
<< ", aesItemId=" << aesItemView.aesItemId() << ", aesType=" << aesType << ", effectStateId=" << aesItemView.effectStateId();
<< ", aesItemId=" << aesItemView.aesItemId << ", aesType=" << aesType << ", effectStateId=" << aesItemView.effectStateId;
QCOMPARE(aesItemView.effectStateId(), m_effectStates[m_effectStateCounter]);
QCOMPARE(aesItemView.effectStateId, m_effectStates[m_effectStateCounter]);
m_effectStateCounter++;
if (aesItemView.effectStateId() == AreaEffectSimulation::AesEffectState::EsReceived)
if (aesItemView.effectStateId == AreaEffectSimulation::AesEffectState::EsReceived)
{
DEBUG_LOG(m_logger) << "sendAcknowledgeExternalAesItemRequest aesItemId=" << aesItemView.aesItemId();
sendAcknowledgeExternalAesItemRequest(aesItemView.aesItemId());
DEBUG_LOG(m_logger) << "sendAcknowledgeExternalAesItemRequest aesItemId=" << aesItemView.aesItemId;
sendAcknowledgeExternalAesItemRequest(aesItemView.aesItemId);
}
}
@@ -185,11 +185,11 @@ void ModuleTestEffectCluster::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
exFire.reference(m_reference.toStdString()); // UUID Feuerkampf
exFire.equipmentNumber(m_participant1.id() * -1);
exFire.sampleTime(QDateTime::currentMSecsSinceEpoch() + 500);
exFire.effectorId = m_effectorId; // Kenner z.B B1
exFire.identifier = m_identifier.toStdString(); // Verein z.B 451100
exFire.reference = m_reference.toStdString(); // UUID Feuerkampf
exFire.equipmentNumber = m_participant1.id * -1;
exFire.sampleTime = QDateTime::currentMSecsSinceEpoch() + 500;
m_tabDts->publish(exFire);
}
@@ -198,8 +198,8 @@ void ModuleTestEffectCluster::onEffectsChanged(const Effects &effects, DataModif
{
if (modType == DataModification::eRemoved)
return;
AreaEffectSimulation::AesType_def::type aesType = effects.aesTypeId().underlying();
DEBUG_LOG(m_logger) << " got onEffectsChanged - m_data: " << m_data.id() << ", aesType=" << aesType;
AreaEffectSimulation::AesType::type aesType = effects.aesTypeId().underlying();
DEBUG_LOG(m_logger) << " got onEffectsChanged - m_data: " << m_data.id << ", aesType=" << aesType;
++m_counterDds.cntEffectClusterEffects;
m_effects = effects;
@@ -208,22 +208,22 @@ void ModuleTestEffectCluster::onEffectsChanged(const Effects &effects, DataModif
void ModuleTestEffectCluster::onChargeEffectChanged(const ChargeEffect &chargeEffect, DataModification modType)
{
DEBUG_LOG(m_logger) << "onChargeEffectChanged state=" << chargeEffect.state();
DEBUG_LOG(m_logger) << "onChargeEffectChanged state=" << chargeEffect.state;
if (modType == DataModification::eRemoved)
return;
if (chargeEffect.state() == AreaEffectSimulation::AesEffectState::EsActivated)
if (chargeEffect.state == AreaEffectSimulation::AesEffectState::EsActivated)
{
// Compare Position
// mhpPosition.lon(0.201958);
// mhpPosition.lat(0.915263);
// mhpPosition.z(88.0);
double lon = qRound64(chargeEffect.position().lon() * 100000) / 100000.0; // Nur die ersten 5 Nachkommastellen beruecksichtigen
double lat = qRound64(chargeEffect.position().lat() * 100000) / 100000.0;
double lon = qRound64(chargeEffect.position.lon * 100000) / 100000.0; // Nur die ersten 5 Nachkommastellen beruecksichtigen
double lat = qRound64(chargeEffect.position.lat * 100000) / 100000.0;
QCOMPARE(lon, 0.20196);
QCOMPARE(lat, 0.91526);
QCOMPARE(chargeEffect.position().z(), 88.0);
QCOMPARE(chargeEffect.position.z, 88.0);
}
else if (chargeEffect.state() == AreaEffectSimulation::AesEffectState::EsExpired)
else if (chargeEffect.state == AreaEffectSimulation::AesEffectState::EsExpired)
participantDeleteRequest();
DEBUG_LOG(m_logger) << " got onEffectsChanged - m_effects: " << m_effects;
}
@@ -231,12 +231,12 @@ void ModuleTestEffectCluster::onChargeEffectChanged(const ChargeEffect &chargeEf
void ModuleTestEffectCluster::onTrajectoryTimeAwareChanged(const TrajectoryTimeAware &data, DataModification modType)
{
Q_UNUSED(modType);
if (data.id() == -1)
if (data.id == -1)
return;
++m_counterDds.cntTrajectory;
DEBUG_LOG(m_logger) << " 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()
@@ -269,24 +269,24 @@ bool ModuleTestEffectCluster::waitForData(const std::function<bool()> &func, int
EffectCluster ModuleTestEffectCluster::getEcForTneVerification(const QString &eaName, double rotation)
{
AreaEffectSimulation::EffectCluster eaData;
eaData.id(0);
eaData.id = 0;
eaData.effectStart((time(nullptr) + 30) * 1000); // msec
eaData.effectStart = (time(nullptr) + 30) * 1000; // msec
QString name(eaName);
name += QString::number(eaData.effectStart().get());
eaData.name(name.toStdString());
name += QString::number(eaData.effectStart.get());
eaData.name = name.toStdString();
eaData.effectDuration(10000); // 10 seconds
eaData.effectDuration = 10000; // 10 seconds
// eaData.chargeStruct().chargeTypeId(s_ChargeTypeId1);
// eaData.chargeStruct().igniterTypeId(s_IgniterTypeProximity);
eaData.partyId(2);
eaData.participantId(7);
eaData.partyId = 2;
eaData.participantId = 7;
// SubStruct FlightCurve
FlightCurve fc;
fc.requestedRelativePeakHeight(100);
fc.requestedRelativePeakHeight = 100;
// siehe auch: GUEZE-2311 Verifikation des Algorithmus bzgl. MTPs zw. TNE und EXCON.
const double height = 100; // Y
@@ -301,15 +301,15 @@ EffectCluster ModuleTestEffectCluster::getEcForTneVerification(const QString &ea
DEBUG_LOG(m_logger) << " bottomLeft" << bottomLeft;
eaData.area().cornerBottomLeft(Core::GeoPosition(bottomLeft.x(), bottomLeft.y(), 0.0));
eaData.area().height(height);
eaData.area().width(width);
eaData.area().rotation(rot);
eaData.area.cornerBottomLeft(Core::GeoPosition(bottomLeft.x(), bottomLeft.y(), 0.0));
eaData.area.height = height;
eaData.area.width = width;
eaData.area.rotation = rot;
eaData.explosionGeometry(AreaEffectSimulation::AesExplosionGeometry_def::EgArea);
eaData.tla(0); // aka zop
eaData.explosionGeometry = AreaEffectSimulation::AesExplosionGeometry::EgArea;
eaData.tla = 0; // aka zop
eaData.externalId(0);
eaData.externalId = 0;
return eaData;
}
@@ -349,17 +349,17 @@ std::vector<Core::RelativePositionRelativeTime> ModuleTestEffectCluster::parseTr
QString val = xml.readElementText();
if (name == QStringLiteral("lon"))
p.offsetX(val.toDouble());
p.offsetX = val.toDouble();
else if (name == QStringLiteral("lat"))
p.offsetY(val.toDouble());
p.offsetY = val.toDouble();
else if (name == QStringLiteral("z"))
p.offsetZ(val.toDouble());
p.offsetZ = val.toDouble();
else if (name == QStringLiteral("relativeTime"))
p.relativeTime(val.toDouble());
p.relativeTime = val.toDouble();
}
}
points.push_back(p);
DEBUG_LOG(m_logger) << "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;
}
}
@@ -386,14 +386,14 @@ int ModuleTestEffectCluster::doEffectClusterModifyRequest()
QString dateTimeString = QDateTime::currentDateTime().toString(QStringLiteral("dd.MM.yyyy hh:mm"));
m_reference = dateTimeString;
if (eaData.effectStart().is_set())
INFO_LOG(m_logger) << " effectClusterModifyRequest with effectStart: " << QDateTime::fromMSecsSinceEpoch(eaData.effectStart().get()).toString();
if (eaData.effectStart.is_set())
INFO_LOG(m_logger) << " effectClusterModifyRequest with effectStart: " << QDateTime::fromMSecsSinceEpoch(eaData.effectStart.get()).toString();
else
INFO_LOG(m_logger) << " effectClusterModifyRequest with effectStart: not set ";
FlightCurve fc;
// if (eaData.flightCurve().is_set())
// fc = eaData.flightCurve().get();
// if (eaData.flightCurve.is_set())
// fc = eaData.flightCurve.get();
QJsonObject obj;
obj[QStringLiteral("effectSource")] = 1;
@@ -410,49 +410,49 @@ int ModuleTestEffectCluster::doEffectClusterModifyRequest()
QString propertiesStr = QString::fromStdString(QJsonDocument(obj).toJson(QJsonDocument::Compact).toStdString());
eaData.properties(propertiesStr.toStdString());
eaData.properties = propertiesStr.toStdString();
AreaEffectSimulation::ChargeStruct chargeStruct;
chargeStruct.chargeTypeId(367);
chargeStruct.igniterTypeId(1);
chargeStruct.igniterFunctionId(2);
chargeStruct.chargeTypeId = 367;
chargeStruct.igniterTypeId = 1;
chargeStruct.igniterFunctionId = 2;
Core::GeoPosition mhpPosition;
mhpPosition.lon(0.201958);
mhpPosition.lat(0.915263);
mhpPosition.z(88.0);
mhpPosition.lon = 0.201958;
mhpPosition.lat = 0.915263;
mhpPosition.z = 88.0;
Core::GeoPosition2D cornerBottomLeft;
cornerBottomLeft.lon(0.201951);
cornerBottomLeft.lat(0.915259);
cornerBottomLeft.lon = 0.201951;
cornerBottomLeft.lat = 0.915259;
AreaEffectSimulation::Area area;
area.cornerBottomLeft(cornerBottomLeft);
area.width(50);
area.height(50);
area.rotation(0);
eaData.area(area);
area.cornerBottomLeft = cornerBottomLeft;
area.width = 50;
area.height = 50;
area.rotation = 0;
eaData.area = area;
eaData.explosionGeometry(AreaEffectSimulation::AesExplosionGeometry::EgPoint);
eaData.explosionGeometry = AreaEffectSimulation::AesExplosionGeometry::EgPoint;
std::vector<Core::RelativePositionRelativeTime> trajectory = parseTrajectory(s_REQUEST_SPL_FILE);
AreaEffectSimulation::EffectorData effector;
effector.angleOfFall(0);
effector.participantId(m_participant1.id()); // Participant
DEBUG_LOG(m_logger) << "effector.participantId(m_participant1.id()=" << m_participant1.id();
effector.angleOfFall = 0;
effector.participantId = m_participant1.id; // Participant
DEBUG_LOG(m_logger) << "effector.participantId(m_participant1.id()=" << m_participant1.id;
effector.flightTime(39526.3);
effector.peakHeight(2002.0);
effector.interval(0);
effector.chargeStruct(chargeStruct);
effector.chargeAmount(1);
effector.mhpScatterLenght(3.08314e-316);
effector.mhpScatterWidth(8.76302e-315);
effector.mhpScatterLengthDetonationHeight(9.69057e-316);
effector.mhpScatterWidthDetonationHeight(8.76638e-315);
effector.mhpRotation(-45.4373);
effector.mhpPosition(mhpPosition);
effector.trajectoryRelative(trajectory);
effector.flightTime = 39526.3;
effector.peakHeight = 2002.0;
effector.interval = 0;
effector.chargeStruct = chargeStruct;
effector.chargeAmount = 1;
effector.mhpScatterLenght = 3.08314e-316;
effector.mhpScatterWidth = 8.76302e-315;
effector.mhpScatterLengthDetonationHeight = 9.69057e-316;
effector.mhpScatterWidthDetonationHeight = 8.76638e-315;
effector.mhpRotation = -45.4373;
effector.mhpPosition = mhpPosition;
effector.trajectoryRelative = trajectory;
DEBUG_LOG(m_logger) << "effector";
@@ -461,37 +461,37 @@ int ModuleTestEffectCluster::doEffectClusterModifyRequest()
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(m_logger) << "eaData.participantId(m_participant0.id()=" << m_participant0.id();
eaData.externalId(7);
eaData.effectMarkingInTa(1);
eaData.id = 0;
eaData.effectSourceId = ProjectDataManagement::EffectSource::ES_ADLER;
eaData.firePurposeId = 2;
eaData.partyId = 4;
eaData.participantId = m_participant0.id; // Unit
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());
eaData.name = dateTimeString.toStdString();
eaData.element = dateTimeString.toStdString();
DEBUG_LOG(m_logger) << "Vor send effectClusterModifyRequest";
int ret = m_aesFtc->effectClusterModifyRequest(EffectClusterModifyRequest(eaData.id(),
eaData.name(),
eaData.element(),
eaData.effectStart(),
eaData.effectDuration(),
eaData.effectSourceId(),
eaData.area(),
eaData.explosionGeometry(), // AimPoint, Radial, Area, Line, Point
eaData.tla(), // ZielOrtungsGenauigkeit
int ret = m_aesFtc->effectClusterModifyRequest(EffectClusterModifyRequest(eaData.id,
eaData.name,
eaData.element,
eaData.effectStart,
eaData.effectDuration,
eaData.effectSourceId,
eaData.area,
eaData.explosionGeometry, // AimPoint, Radial, Area, Line, Point
eaData.tla, // ZielOrtungsGenauigkeit
effectors,
eaData.firePurposeId(), // FirePurpose: blenden, niederhalten, vernichten
eaData.partyId(),
eaData.participantId(),
eaData.firePurposeId, // FirePurpose: blenden, niederhalten, vernichten
eaData.partyId,
eaData.participantId,
{}, // esmParticipantIds
eaData.externalId(),
eaData.effectMarkingInTa(),
eaData.properties()),
eaData.externalId,
eaData.effectMarkingInTa,
eaData.properties),
this);
DEBUG_LOG(m_logger) << "send effectClusterModifyRequest ret=" << ret;
return ret;
@@ -508,25 +508,25 @@ void ModuleTestEffectCluster::waitForEffectStates(int lineNumber, int durPrep, i
}
INFO_LOG(m_logger) << LOGFUNCTION << " waiting for EsPrepared...";
if (!waitForData([this]() { return m_data.effectStateId() == AreaEffectSimulation::AesEffectState_def::EsPrepared; }, durPrep))
if (!waitForData([this]() { return m_data.effectStateId == AreaEffectSimulation::AesEffectState::EsPrepared; }, durPrep))
{
ERROR_LOG(m_logger) << "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(m_logger) << LOGFUNCTION << " waiting for EsActivated...";
if (!waitForData([this]() { return m_data.effectStateId() == AreaEffectSimulation::AesEffectState_def::EsActivated; }, durAct))
if (!waitForData([this]() { return m_data.effectStateId == AreaEffectSimulation::AesEffectState::EsActivated; }, durAct))
{
ERROR_LOG(m_logger) << "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(m_logger) << LOGFUNCTION << " waiting for EsExpired...";
if (!waitForData([this]() { return m_data.effectStateId() == AreaEffectSimulation::AesEffectState_def::EsExpired; }, durExp))
if (!waitForData([this]() { return m_data.effectStateId == AreaEffectSimulation::AesEffectState::EsExpired; }, durExp))
{
ERROR_LOG(m_logger) << "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;
}
@@ -538,24 +538,24 @@ void ModuleTestEffectCluster::disconnectFromParty()
ParticipantManagement::Party party;
party.name("GREEN");
party.role(ParticipantManagement::Role::Neutral);
party.color(-16711936);
party.fadingColor(-6553701);
party.name = "GREEN";
party.role = ParticipantManagement::Role::Neutral;
party.color = -16711936;
party.fadingColor = -6553701;
ModifyPartyDataRequest req;
req.id(m_partyId);
req.name(party.name());
req.color(party.color());
req.fadingColor(party.fadingColor());
req.role(party.role());
req.isUsedBy(true);
req.sampleTime(QDateTime::currentMSecsSinceEpoch());
req.id = m_partyId;
req.name = party.name;
req.color = party.color;
req.fadingColor = party.fadingColor;
req.role = party.role;
req.isUsedBy = true;
req.sampleTime = QDateTime::currentMSecsSinceEpoch();
const HlaForceIdentifierEnum hlaId = HlaForceIdentifierEnum::Neutral_1;
req.hlaForceIdentifier(hlaId);
req.hlaForceIdentifier = hlaId;
QString properties = QStringLiteral("{\"Adler\": {\"wsId\": 3, \"SaaName\": \"UI Test\", \"assetId\": -1, \"saaName\": \"SAA1@GUEZ.DE\", \"szenarName\": \"UI Test\", "
"\"isSaaConnected\": 1, \"saaConnectedState\": 2}}");
req.properties(properties.toStdString());
req.properties = properties.toStdString();
if (!m_ppmFtc->modifyPartyDataRequest(req, this))
{
@@ -570,25 +570,25 @@ void ModuleTestEffectCluster::connectToParty()
ParticipantManagement::Party party;
party.name("GREEN");
party.role(ParticipantManagement::Role::Neutral);
party.color(-16711936);
party.fadingColor(-6553701);
party.name = "GREEN";
party.role = ParticipantManagement::Role::Neutral;
party.color = -16711936;
party.fadingColor = -6553701;
ModifyPartyDataRequest req;
req.id(m_partyId);
req.name(party.name());
req.color(party.color());
req.fadingColor(party.fadingColor());
req.role(party.role());
req.isUsedBy(true);
req.sampleTime(QDateTime::currentMSecsSinceEpoch());
req.id = m_partyId;
req.name = party.name;
req.color = party.color;
req.fadingColor = party.fadingColor;
req.role = party.role;
req.isUsedBy = true;
req.sampleTime = QDateTime::currentMSecsSinceEpoch();
const HlaForceIdentifierEnum hlaId = HlaForceIdentifierEnum::Neutral_1;
req.hlaForceIdentifier(hlaId);
req.hlaForceIdentifier = hlaId;
QString properties = QStringLiteral("{\"Adler\": {\"wsId\": 3, \"SaaName\": \"UI Test\", \"assetId\": -1, \"saaName\": \"SAA1@GUEZ.DE\", \"szenarName\": \"UI Test\", "
"\"isSaaConnected\": 2, \"isVerbund\": true, \"saaConnectedState\": 4}}");
req.properties(properties.toStdString());
req.properties = properties.toStdString();
if (!m_ppmFtc->modifyPartyDataRequest(req, this))
{
@@ -601,46 +601,46 @@ void ModuleTestEffectCluster::participantChangeRequest()
{
DEBUG_LOG(m_logger) << "PPM::participantChangerequest";
m_participant0.id(0);
m_participant0.partyId(4);
m_participant0.hierarchyNumber(1);
m_participant0.typeId(182);
m_participant0.externalId(0);
m_participant0.symbol(QStringLiteral("AP6D|CMPL|10011000001308000000").toStdString());
m_participant0.name(QStringLiteral("451200").toStdString());
m_participant0.identification(QStringLiteral("").toStdString());
m_participant0.designator(QStringLiteral("451200").toStdString()), m_participant0.tacticalIdentifier(QStringLiteral("451200").toStdString());
m_participant0.info(QStringLiteral("").toStdString());
m_participant0.assignState(ParticipantManagement::ParticipantAssignState::NotAssigned);
m_participant0.isSimulated(false);
m_participant0.isDeleted(false);
m_participant0.properties(QStringLiteral("").toStdString());
m_participant0.modId(1138783559);
m_participant0.superiorModId(0);
m_participant0.id = 0;
m_participant0.partyId = 4;
m_participant0.hierarchyNumber = 1;
m_participant0.typeId = 182;
m_participant0.externalId = 0;
m_participant0.symbol = QStringLiteral("AP6D|CMPL|10011000001308000000").toStdString();
m_participant0.name = QStringLiteral("451200").toStdString();
m_participant0.identification = QStringLiteral("").toStdString();
m_participant0.designator = QStringLiteral("451200").toStdString(), m_participant0.tacticalIdentifier = QStringLiteral("451200").toStdString();
m_participant0.info = QStringLiteral("").toStdString();
m_participant0.assignState = ParticipantManagement::ParticipantAssignState::NotAssigned;
m_participant0.isSimulated = false;
m_participant0.isDeleted = false;
m_participant0.properties = QStringLiteral("").toStdString();
m_participant0.modId = 1138783559;
m_participant0.superiorModId = 0;
m_participant1.id(0);
m_participant1.partyId(4);
m_participant1.hierarchyNumber(1);
m_participant1.typeId(188);
m_participant1.externalId(0);
m_participant1.symbol(QStringLiteral("AP6D|CMPL|10011500001114020000").toStdString());
m_participant1.name(QStringLiteral("C3").toStdString());
m_participant1.identification(QStringLiteral("").toStdString());
m_participant1.designator(QStringLiteral("C3").toStdString()), m_participant1.tacticalIdentifier(QStringLiteral("451200").toStdString());
m_participant1.info(QStringLiteral("").toStdString());
m_participant1.assignState(ParticipantManagement::ParticipantAssignState::NotAssigned);
m_participant1.isSimulated(false);
m_participant1.isDeleted(false);
m_participant1.properties(QStringLiteral("").toStdString());
m_participant1.modId(1390608527);
m_participant1.superiorModId(1138783559);
m_participant1.id = 0;
m_participant1.partyId = 4;
m_participant1.hierarchyNumber = 1;
m_participant1.typeId = 188;
m_participant1.externalId = 0;
m_participant1.symbol = QStringLiteral("AP6D|CMPL|10011500001114020000").toStdString();
m_participant1.name = QStringLiteral("C3").toStdString();
m_participant1.identification = QStringLiteral("").toStdString();
m_participant1.designator = QStringLiteral("C3").toStdString(), m_participant1.tacticalIdentifier = QStringLiteral("451200").toStdString();
m_participant1.info = QStringLiteral("").toStdString();
m_participant1.assignState = ParticipantManagement::ParticipantAssignState::NotAssigned;
m_participant1.isSimulated = false;
m_participant1.isDeleted = false;
m_participant1.properties = QStringLiteral("").toStdString();
m_participant1.modId = 1390608527;
m_participant1.superiorModId = 1138783559;
ModifyParticipantDataRequest req;
std::vector<ParticipantManagement::ParticipantData> data;
data.push_back(m_participant0);
data.push_back(m_participant1);
req.requestId(548288706);
req.data(data);
req.requestId = 548288706;
req.data = data;
if (!m_ppmFtc->modifyParticipantDataRequest(req, this))
{
ERROR_LOG(m_logger) << "Error creating party data";
@@ -652,16 +652,16 @@ void ModuleTestEffectCluster::participantDeleteRequest()
{
DEBUG_LOG(m_logger) << "PPM::participantDeleteRequest";
m_participant0.isDeleted(true);
m_participant0.isDeleted = true;
m_participant1.isDeleted(true);
m_participant1.isDeleted = true;
ModifyParticipantDataRequest req;
std::vector<ParticipantManagement::ParticipantData> data;
data.push_back(m_participant0);
data.push_back(m_participant1);
req.requestId(548288707);
req.data(data);
req.requestId = 548288707;
req.data = data;
if (!m_ppmFtc->modifyParticipantDataRequest(req, this))
{
ERROR_LOG(m_logger) << "Error creating party data";
@@ -676,16 +676,16 @@ void ModuleTestEffectCluster::setParticipantPos(int participantId)
Core::GeoPosition geoPos;
TrainingAreaBase::EquipmentPosition pos;
geoPos.lon(0.20110363);
geoPos.lat(0.91579597);
geoPos.z(0.0);
geoPos.lon = 0.20110363;
geoPos.lat = 0.91579597;
geoPos.z = 0.0;
DEBUG_LOG(m_logger) << " initTestCase_data1 ...";
pos.equipmentNumber(participantId * -1); // ParticipantId
pos.sampleTime(QDateTime::currentMSecsSinceEpoch());
position.reportingSource(Core::PositionReportingSource::SetByOperator);
position.position(geoPos);
pos.position(position);
pos.equipmentNumber = participantId * -1; // ParticipantId
pos.sampleTime = QDateTime::currentMSecsSinceEpoch();
position.reportingSource = Core::PositionReportingSource::SetByOperator;
position.position = geoPos;
pos.position = position;
m_tabDts->publish(pos);
}
@@ -696,34 +696,34 @@ void ModuleTestEffectCluster::setEquipmentGearCharge(int participantId)
TrainingAreaBase::GearCharge charge;
std::vector<TrainingAreaBase::GearCharge> charges;
egs.equipmentNumber(participantId * -1); // ParticipantId
egs.sampleTime(QDateTime::currentMSecsSinceEpoch());
egs.equipmentNumber = participantId * -1; // ParticipantId
egs.sampleTime = QDateTime::currentMSecsSinceEpoch();
charges.resize(7);
charge.gearId(138);
charge.gearTypeId(801);
charge.chargeTypeId(367);
charge.remain(50);
charge.gearId = 138;
charge.gearTypeId = 801;
charge.chargeTypeId = 367;
charge.remain = 50;
charges.push_back(charge); // 0
charge.chargeTypeId(366);
charge.chargeTypeId = 366;
charges.push_back(charge); // 1
charge.chargeTypeId(361);
charge.chargeTypeId = 361;
charges.push_back(charge); // 2
charge.chargeTypeId(362);
charge.chargeTypeId = 362;
charges.push_back(charge); // 3
charge.chargeTypeId(363);
charge.chargeTypeId = 363;
charges.push_back(charge); // 4
charge.chargeTypeId(364);
charge.chargeTypeId = 364;
charges.push_back(charge); // 5
charge.chargeTypeId(365);
charge.chargeTypeId = 365;
charges.push_back(charge); // 6
egs.charge(charges);
egs.charge = charges;
m_tabDts->publish(egs);
}
@@ -736,17 +736,17 @@ void ModuleTestEffectCluster::onPartyChanged(const ParticipantManagement::Party
return;
}
if (data.id() != m_partyId)
if (data.id != m_partyId)
{
return;
}
DEBUG_LOG(m_logger) << "onPartyChanged id= " << data.id();
if (m_ppmDtc->saaConnectedState(data.id()) == ParticipantManagement::ConnectState::Connected)
DEBUG_LOG(m_logger) << "onPartyChanged id= " << data.id;
if (m_ppmDtc->saaConnectedState(data.id) == ParticipantManagement::ConnectState::Connected)
{
DEBUG_LOG(m_logger) << "onPartyChanged saaConnectedState == connected";
}
else if (m_ppmDtc->saaConnectedState(data.id()) == ParticipantManagement::ConnectState::Disconnected)
else if (m_ppmDtc->saaConnectedState(data.id) == ParticipantManagement::ConnectState::Disconnected)
{
DEBUG_LOG(m_logger) << "onPartyChanged saaConnectedState == disconnected => connectToParty";
connectToParty();
@@ -835,8 +835,8 @@ void ModuleTestEffectCluster::initTestCase()
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();
QVERIFY2(exercise.id == m_exerciseId, "ERROR, exercise failed!!");
m_traingAreaId = exercise.trainingAreaId;
DEBUG_LOG(m_logger) << " ExerciseManagement"
<< ", m_traingAreaId = " << m_traingAreaId;