Migrates CentralEffectSimulation to generated rtiddsgen API

Converts accessor calls to plain member access across ces service.
This commit is contained in:
berrux-dev committed 2026-09-21 02:45:54 +02:00
1 parent 40f767fc4d
commit 2df80f90a7
24 files changed
+752 -752

No files matched your search

@@ -146,7 +146,7 @@ void CesTests::startTest()
if (m_testId <= 1) // AES-Hit On Buildings area explosions if (m_testId <= 1) // AES-Hit On Buildings area explosions
{ {
m_countHitOnBuildingReply = 0; m_countHitOnBuildingReply = 0;
m_aesType = AreaEffectSimulation::AesType_def::AtExplosionArea; m_aesType = AreaEffectSimulation::AesType::AtExplosionArea;
QTimer::singleShot(0, this, &CesTests::tryCreateMainStructureElement); QTimer::singleShot(0, this, &CesTests::tryCreateMainStructureElement);
QTimer::singleShot(0, this, &CesTests::tryCreateMainFootprint); QTimer::singleShot(0, this, &CesTests::tryCreateMainFootprint);
QTimer::singleShot(0, this, &CesTests::tryCreateChargeType); QTimer::singleShot(0, this, &CesTests::tryCreateChargeType);
@@ -158,7 +158,7 @@ void CesTests::startTest()
{ {
m_countHitOnBuildingReply = 0; m_countHitOnBuildingReply = 0;
m_explosionSingle = m_housePos.geographic(5, 5); m_explosionSingle = m_housePos.geographic(5, 5);
m_aesType = AreaEffectSimulation::AesType_def::AtExplosionSingle; m_aesType = AreaEffectSimulation::AesType::AtExplosionSingle;
QTimer::singleShot(0, this, &CesTests::tryCreateMainStructureElement); QTimer::singleShot(0, this, &CesTests::tryCreateMainStructureElement);
QTimer::singleShot(0, this, &CesTests::tryCreateMainFootprint); QTimer::singleShot(0, this, &CesTests::tryCreateMainFootprint);
QTimer::singleShot(0, this, &CesTests::tryCreateChargeType); QTimer::singleShot(0, this, &CesTests::tryCreateChargeType);
@@ -186,7 +186,7 @@ void CesTests::startTest()
// 2) AreaEffectSimulation::ExplosionArea // 2) AreaEffectSimulation::ExplosionArea
QTimer::singleShot(300, this, &CesTests::tryCreateExplosionArea); QTimer::singleShot(300, this, &CesTests::tryCreateExplosionArea);
// 3) AreaEffectSimulation::AesItemView AtExplosionArea // 3) AreaEffectSimulation::AesItemView AtExplosionArea
m_aesType = AreaEffectSimulation::AesType_def::AtExplosionArea; m_aesType = AreaEffectSimulation::AesType::AtExplosionArea;
// is not used for AtExplosionAreaSingleExplosions on participant // is not used for AtExplosionAreaSingleExplosions on participant
// 4) AreaEffectSimulation::AesItemView AtExplosionAreaSingleExplosions // 4) AreaEffectSimulation::AesItemView AtExplosionAreaSingleExplosions
m_aesItemId = 5; m_aesItemId = 5;
@@ -201,7 +201,7 @@ void CesTests::startTest()
m_participantIndex = 0; m_participantIndex = 0;
m_buildingId = 0; // Criterium outside Buildings: buildingId = 0 m_buildingId = 0; // Criterium outside Buildings: buildingId = 0
m_explosionSingle = m_housePos.geographic(-2, -2); m_explosionSingle = m_housePos.geographic(-2, -2);
m_aesType = AreaEffectSimulation::AesType_def::AtExplosionAreaSingleExplosions; m_aesType = AreaEffectSimulation::AesType::AtExplosionAreaSingleExplosions;
QTimer::singleShot(0, this, &CesTests::tryCreateParticipant); QTimer::singleShot(0, this, &CesTests::tryCreateParticipant);
QTimer::singleShot(50, this, &CesTests::tryCreateDynamicParticipantData); QTimer::singleShot(50, this, &CesTests::tryCreateDynamicParticipantData);
QTimer::singleShot(100, this, &CesTests::tryCreateParticipantPosition); QTimer::singleShot(100, this, &CesTests::tryCreateParticipantPosition);
@@ -233,7 +233,7 @@ void CesTests::startTest()
m_participantIndex = 0; m_participantIndex = 0;
m_buildingId = 0; // Criterium outside Buildings: buildingId = 0 m_buildingId = 0; // Criterium outside Buildings: buildingId = 0
m_roomId = 0; m_roomId = 0;
m_aesType = AreaEffectSimulation::AesType_def::AtBCContamination; m_aesType = AreaEffectSimulation::AesType::AtBCContamination;
m_chargeTypeId = 341; m_chargeTypeId = 341;
QTimer::singleShot(0, this, [this]() { tryCreateAesItemViewBC(); }); QTimer::singleShot(0, this, [this]() { tryCreateAesItemViewBC(); });
QTimer::singleShot(50, this, &CesTests::tryCreateDynamicParticipantData); QTimer::singleShot(50, this, &CesTests::tryCreateDynamicParticipantData);
@@ -252,7 +252,7 @@ void CesTests::startTest()
m_participantIndex = 0; m_participantIndex = 0;
m_buildingId = 0; // Criterium outside Buildings: buildingId = 0 m_buildingId = 0; // Criterium outside Buildings: buildingId = 0
m_aesType = AreaEffectSimulation::AesType_def::AtBCContamination; m_aesType = AreaEffectSimulation::AesType::AtBCContamination;
m_chargeTypeId = 341; m_chargeTypeId = 341;
QTimer::singleShot(00, this, &CesTests::tryCreateDynamicParticipantData); QTimer::singleShot(00, this, &CesTests::tryCreateDynamicParticipantData);
QTimer::singleShot(100, this, &CesTests::tryCreateParticipant); QTimer::singleShot(100, this, &CesTests::tryCreateParticipant);
@@ -279,7 +279,7 @@ void CesTests::startTest()
m_participantIndex = 0; m_participantIndex = 0;
m_buildingId = 0; // Criterium outside Buildings: buildingId = 0 m_buildingId = 0; // Criterium outside Buildings: buildingId = 0
m_roomId = 0; m_roomId = 0;
m_aesType = AreaEffectSimulation::AesType_def::AtMineAreaSingleMines; m_aesType = AreaEffectSimulation::AesType::AtMineAreaSingleMines;
m_chargeTypeId = 40; m_chargeTypeId = 40;
QTimer::singleShot(0, this, &CesTests::tryCreateChargeType); QTimer::singleShot(0, this, &CesTests::tryCreateChargeType);
QTimer::singleShot(0, this, &CesTests::tryCreateAesItemViewSM); // SingleMines QTimer::singleShot(0, this, &CesTests::tryCreateAesItemViewSM); // SingleMines
@@ -312,7 +312,7 @@ void CesTests::startTest()
m_participantIndex = 0; m_participantIndex = 0;
m_buildingId = 0; // Criterium outside Buildings: buildingId = 0 m_buildingId = 0; // Criterium outside Buildings: buildingId = 0
m_roomId = 0; m_roomId = 0;
m_aesType = AreaEffectSimulation::AesType_def::AtNContamination; m_aesType = AreaEffectSimulation::AesType::AtNContamination;
m_chargeTypeId = 341; m_chargeTypeId = 341;
QTimer::singleShot(0, this, [this]() { tryCreateAesItemViewBC(); }); QTimer::singleShot(0, this, [this]() { tryCreateAesItemViewBC(); });
QTimer::singleShot(50, this, &CesTests::tryCreateDynamicParticipantData); QTimer::singleShot(50, this, &CesTests::tryCreateDynamicParticipantData);
@@ -332,7 +332,7 @@ void CesTests::startTest()
m_participantIndex = 0; m_participantIndex = 0;
m_buildingId = 0; // Criterium outside Buildings: buildingId = 0 m_buildingId = 0; // Criterium outside Buildings: buildingId = 0
m_roomId = 0; m_roomId = 0;
m_aesType = AreaEffectSimulation::AesType_def::AtFunctionalArea; m_aesType = AreaEffectSimulation::AesType::AtFunctionalArea;
m_chargeTypeId = 411; m_chargeTypeId = 411;
QTimer::singleShot(0, this, [this]() { tryCreateAesItemViewBC(); }); QTimer::singleShot(0, this, [this]() { tryCreateAesItemViewBC(); });
QTimer::singleShot(100, this, &CesTests::tryCreateDynamicParticipantData); QTimer::singleShot(100, this, &CesTests::tryCreateDynamicParticipantData);
@@ -359,7 +359,7 @@ void CesTests::startTest()
m_participantIndex = 0; m_participantIndex = 0;
m_buildingId = 0; // Criterium outside Buildings: buildingId = 0 m_buildingId = 0; // Criterium outside Buildings: buildingId = 0
m_roomId = 0; m_roomId = 0;
m_aesType = AreaEffectSimulation::AesType_def::AtFunctionalArea; m_aesType = AreaEffectSimulation::AesType::AtFunctionalArea;
m_chargeTypeId = 411; m_chargeTypeId = 411;
QTimer::singleShot(0, this, [this]() { tryCreateAesItemViewBC(); }); QTimer::singleShot(0, this, [this]() { tryCreateAesItemViewBC(); });
QTimer::singleShot(100, this, &CesTests::tryCreateDynamicParticipantData); QTimer::singleShot(100, this, &CesTests::tryCreateDynamicParticipantData);
@@ -367,7 +367,7 @@ void CesTests::startTest()
QTimer::singleShot(300, this, &CesTests::tryCreateParticipantPosition); QTimer::singleShot(300, this, &CesTests::tryCreateParticipantPosition);
QTimer::singleShot(400, this, &CesTests::tryCreateParticipantPosition); QTimer::singleShot(400, this, &CesTests::tryCreateParticipantPosition);
QTimer::singleShot(500, this, &CesTests::tryCreateParticipantPosition); QTimer::singleShot(500, this, &CesTests::tryCreateParticipantPosition);
QTimer::singleShot(600, this, [this]() { tryCreateAesItemViewBC(AreaEffectSimulation::AesEffectState_def::EsExpired); }); QTimer::singleShot(600, this, [this]() { tryCreateAesItemViewBC(AreaEffectSimulation::AesEffectState::EsExpired); });
QTimer::singleShot(700, this, &CesTests::checkParticipantEvent); QTimer::singleShot(700, this, &CesTests::checkParticipantEvent);
} }
else if (m_testId == 12) // AesType::AtFunctionalArea Participant leave FunctionalArea else if (m_testId == 12) // AesType::AtFunctionalArea Participant leave FunctionalArea
@@ -387,7 +387,7 @@ void CesTests::startTest()
m_participantIndex = 0; // Only last 2 Positions m_participantIndex = 0; // Only last 2 Positions
m_buildingId = 0; // Criterium outside Buildings: buildingId = 0 m_buildingId = 0; // Criterium outside Buildings: buildingId = 0
m_roomId = 0; m_roomId = 0;
m_aesType = AreaEffectSimulation::AesType_def::AtFunctionalArea; m_aesType = AreaEffectSimulation::AesType::AtFunctionalArea;
m_chargeTypeId = 411; m_chargeTypeId = 411;
QTimer::singleShot(0, this, [this]() { tryCreateAesItemViewBC(); }); QTimer::singleShot(0, this, [this]() { tryCreateAesItemViewBC(); });
QTimer::singleShot(100, this, &CesTests::tryCreateDynamicParticipantData); QTimer::singleShot(100, this, &CesTests::tryCreateDynamicParticipantData);
@@ -435,7 +435,7 @@ void CesTests::startTest()
m_participantIndex = 0; m_participantIndex = 0;
m_buildingId = 0; // Criterium outside Buildings: buildingId = 0 m_buildingId = 0; // Criterium outside Buildings: buildingId = 0
m_roomId = 0; m_roomId = 0;
m_aesType = AreaEffectSimulation::AesType_def::AtDangerArea; m_aesType = AreaEffectSimulation::AesType::AtDangerArea;
m_chargeTypeId = 411; m_chargeTypeId = 411;
QTimer::singleShot(0, this, &CesTests::tryCreateAesItemView); QTimer::singleShot(0, this, &CesTests::tryCreateAesItemView);
//QTimer::singleShot(100, this, &CesTests::tryCreateDynamicParticipantData); //QTimer::singleShot(100, this, &CesTests::tryCreateDynamicParticipantData);
@@ -457,13 +457,13 @@ void CesTests::tryCreateTriggeredExplosion()
AreaEffectSimulation::TriggeredImpacts ti; AreaEffectSimulation::TriggeredImpacts ti;
// publish new triggered explosions data here // publish new triggered explosions data here
ti.id(m_aesItemId); ti.id = m_aesItemId;
ti.aesItemId(m_aesItemId); ti.aesItemId = m_aesItemId;
ti.aesTypeId(AreaEffectSimulation::AesType::AtExplosionAreaSingleExplosions); ti.aesTypeId = AreaEffectSimulation::AesType::AtExplosionAreaSingleExplosions;
ti.sampleTime(QDateTime::currentMSecsSinceEpoch()); ti.sampleTime = QDateTime::currentMSecsSinceEpoch();
ti.impactCount(3); ti.impactCount = 3;
ti.bitfield().resize(1); ti.bitfield.resize(1);
ti.bitfield()[0] = 0; // 0 = Mine active ti.bitfield[0] = 0; // 0 = Mine active
DEBUG_LOG(m_logger) << "Publishing TriggeredExplosions: " << ti; DEBUG_LOG(m_logger) << "Publishing TriggeredExplosions: " << ti;
if (!m_aesDts->publish(ti)) if (!m_aesDts->publish(ti))
@@ -473,9 +473,9 @@ void CesTests::tryCreateTriggeredExplosion()
void CesTests::tryCreateExplosionArea() void CesTests::tryCreateExplosionArea()
{ {
AreaEffectSimulation::ExplosionArea ea; AreaEffectSimulation::ExplosionArea ea;
ea.id(m_aesItemId); ea.id = m_aesItemId;
ea.participantId(m_originatorParticipantId); // In ddsview <not set> ea.participantId = m_originatorParticipantId; // In ddsview <not set>
ea.effectStateId(AreaEffectSimulation::AesEffectState::inner_enum::EsPrepared); ea.effectStateId = AreaEffectSimulation::AesEffectState::EsPrepared;
DEBUG_LOG(m_logger) << "Publishing ExplosionArea: " << ea; DEBUG_LOG(m_logger) << "Publishing ExplosionArea: " << ea;
if (!m_aesDts->publish(ea)) if (!m_aesDts->publish(ea))
@@ -485,26 +485,26 @@ void CesTests::tryCreateExplosionArea()
void CesTests::tryCreateExplosionSinglePrepared() void CesTests::tryCreateExplosionSinglePrepared()
{ {
m_aiv = AreaEffectSimulation::AesItemView(); m_aiv = AreaEffectSimulation::AesItemView();
m_aiv.aesItemId(m_aesItemId); m_aiv.aesItemId = m_aesItemId;
m_aiv.id(m_aesItemId); m_aiv.id = m_aesItemId;
m_aiv.effectStateId(AreaEffectSimulation::AesEffectState_def::EsPrepared); m_aiv.effectStateId = AreaEffectSimulation::AesEffectState::EsPrepared;
m_aiv.aesTypeId(m_aesType); m_aiv.aesTypeId = m_aesType;
m_aiv.partyId(5); m_aiv.partyId = 5;
m_aiv.boundingBoxBottomLeft(Core::GeoPosition2D(m_explosionSingle.x(), m_explosionSingle.y())); m_aiv.boundingBoxBottomLeft = Core::GeoPosition2D(m_explosionSingle.x(), m_explosionSingle.y());
m_aiv.boundingBoxTopRight(Core::GeoPosition2D(m_explosionSingle.x(), m_explosionSingle.y())); m_aiv.boundingBoxTopRight = Core::GeoPosition2D(m_explosionSingle.x(), m_explosionSingle.y());
m_aiv.sampleTime(QDateTime::currentMSecsSinceEpoch()); m_aiv.sampleTime = QDateTime::currentMSecsSinceEpoch();
m_aiv.chargeStruct().chargeTypeId(m_chargeTypeId); m_aiv.chargeStruct.chargeTypeId = m_chargeTypeId;
setPos(m_aiv.form(), m_explosionSingle); setPos(m_aiv.form, m_explosionSingle);
if (!m_aesDts->publish(m_aiv)) if (!m_aesDts->publish(m_aiv))
failExit("Error publishing AesItemView"); failExit("Error publishing AesItemView");
m_es = AreaEffectSimulation::ExplosionSingle(); m_es = AreaEffectSimulation::ExplosionSingle();
m_es.id(m_aesItemId); m_es.id = m_aesItemId;
m_es.participantId(m_originatorParticipantId); // In ddsview <not set> m_es.participantId = m_originatorParticipantId; // In ddsview <not set>
m_es.effectStateId(AreaEffectSimulation::AesEffectState_def::EsPrepared); m_es.effectStateId = AreaEffectSimulation::AesEffectState::EsPrepared;
m_es.impactPosition(Core::GeoPosition2D(m_explosionSingle.x(), m_explosionSingle.y())); m_es.impactPosition = Core::GeoPosition2D(m_explosionSingle.x(), m_explosionSingle.y());
m_es.sampleTime(QDateTime::currentMSecsSinceEpoch()); m_es.sampleTime = QDateTime::currentMSecsSinceEpoch();
m_es.chargeStruct().chargeTypeId(m_chargeTypeId); m_es.chargeStruct.chargeTypeId = m_chargeTypeId;
DEBUG_LOG(m_logger) << "Publishing ExplosionSingle: " << m_es; DEBUG_LOG(m_logger) << "Publishing ExplosionSingle: " << m_es;
if (!m_aesDts->publish(m_es)) if (!m_aesDts->publish(m_es))
@@ -514,13 +514,13 @@ void CesTests::tryCreateExplosionSinglePrepared()
void CesTests::tryCreateExplosionSingle() void CesTests::tryCreateExplosionSingle()
{ {
// tryCreateExplosionSinglePrepared() must be called before! // tryCreateExplosionSinglePrepared() must be called before!
m_aiv.effectStateId(AreaEffectSimulation::AesEffectState_def::EsActivated); m_aiv.effectStateId = AreaEffectSimulation::AesEffectState::EsActivated;
m_aiv.sampleTime(QDateTime::currentMSecsSinceEpoch()); m_aiv.sampleTime = QDateTime::currentMSecsSinceEpoch();
if (!m_aesDts->publish(m_aiv)) if (!m_aesDts->publish(m_aiv))
failExit("Error publishing AesItemView"); failExit("Error publishing AesItemView");
m_es.effectStateId(AreaEffectSimulation::AesEffectState_def::EsActivated); m_es.effectStateId = AreaEffectSimulation::AesEffectState::EsActivated;
m_es.sampleTime(QDateTime::currentMSecsSinceEpoch()); m_es.sampleTime = QDateTime::currentMSecsSinceEpoch();
DEBUG_LOG(m_logger) << "Publishing ExplosionSingle: " << m_es; DEBUG_LOG(m_logger) << "Publishing ExplosionSingle: " << m_es;
if (!m_aesDts->publish(m_es)) if (!m_aesDts->publish(m_es))
@@ -532,21 +532,21 @@ void CesTests::tryCreateAesItemView()
INFO_LOG(m_logger) << "trying to send AesItemView AtExplosionArea"; INFO_LOG(m_logger) << "trying to send AesItemView AtExplosionArea";
m_aiv = AreaEffectSimulation::AesItemView(); m_aiv = AreaEffectSimulation::AesItemView();
m_aiv.aesItemId(m_aesItemId); m_aiv.aesItemId = m_aesItemId;
m_aiv.id(m_aesItemId); m_aiv.id = m_aesItemId;
m_aiv.effectStateId(AreaEffectSimulation::AesEffectState_def::EsActivated); m_aiv.effectStateId = AreaEffectSimulation::AesEffectState::EsActivated;
m_aiv.aesTypeId(m_aesType); m_aiv.aesTypeId = m_aesType;
m_aiv.partyId(5); m_aiv.partyId = 5;
QPointF bl = m_housePos.geographic(-10, -10); QPointF bl = m_housePos.geographic(-10, -10);
QPointF tr = m_housePos.geographic(30, 30); QPointF tr = m_housePos.geographic(30, 30);
m_aiv.boundingBoxBottomLeft(Core::GeoPosition2D(bl.x(), bl.y())); m_aiv.boundingBoxBottomLeft = Core::GeoPosition2D(bl.x(), bl.y());
m_aiv.boundingBoxTopRight(Core::GeoPosition2D(tr.x(), tr.y())); m_aiv.boundingBoxTopRight = Core::GeoPosition2D(tr.x(), tr.y());
m_aiv.sampleTime(QDateTime::currentMSecsSinceEpoch()); m_aiv.sampleTime = QDateTime::currentMSecsSinceEpoch();
m_aiv.chargeStruct().chargeTypeId(m_chargeTypeId); m_aiv.chargeStruct.chargeTypeId = m_chargeTypeId;
setPos(m_aiv.form(), m_housePos.geographic(-10, -10)); setPos(m_aiv.form, m_housePos.geographic(-10, -10));
setPos(m_aiv.form(), m_housePos.geographic(-10, 30)); setPos(m_aiv.form, m_housePos.geographic(-10, 30));
setPos(m_aiv.form(), m_housePos.geographic(30, 30)); setPos(m_aiv.form, m_housePos.geographic(30, 30));
setPos(m_aiv.form(), m_housePos.geographic(30, -10)); setPos(m_aiv.form, m_housePos.geographic(30, -10));
DEBUG_LOG(m_logger) << "Publishing AesItemView: " << m_aiv; DEBUG_LOG(m_logger) << "Publishing AesItemView: " << m_aiv;
if (!m_aesDts->publish(m_aiv)) if (!m_aesDts->publish(m_aiv))
@@ -556,14 +556,14 @@ void CesTests::tryCreateAesItemView()
void CesTests::tryCreateChargeType() void CesTests::tryCreateChargeType()
{ {
ProjectDataManagement::ChargeType ct; ProjectDataManagement::ChargeType ct;
ct.id(m_chargeTypeId); ct.id = m_chargeTypeId;
ct.properties("{\"impactRadius\":5}"); ct.properties = "{\"impactRadius\":5}";
DEBUG_LOG(m_logger) << "Publishing ChargeType: " << ct; DEBUG_LOG(m_logger) << "Publishing ChargeType: " << ct;
if (!m_pdmDts->publish(ct)) if (!m_pdmDts->publish(ct))
failExit("Error publishing ChargeType"); failExit("Error publishing ChargeType");
ct.id(40); // old charge type 10040 -> 40, hard-codded?! ct.id = 40; // old charge type 10040 -> 40, hard-codded?!
ct.properties("{\"impactRadius\":6}"); ct.properties = "{\"impactRadius\":6}";
DEBUG_LOG(m_logger) << "Publishing ChargeType: " << ct; DEBUG_LOG(m_logger) << "Publishing ChargeType: " << ct;
if (!m_pdmDts->publish(ct)) if (!m_pdmDts->publish(ct))
failExit("Error publishing ChargeType"); failExit("Error publishing ChargeType");
@@ -572,25 +572,25 @@ void CesTests::tryCreateChargeType()
void CesTests::tryCreateAesItemViewSingleExplosions() void CesTests::tryCreateAesItemViewSingleExplosions()
{ {
m_aiv = AreaEffectSimulation::AesItemView(); m_aiv = AreaEffectSimulation::AesItemView();
m_aiv.effectStateId(AreaEffectSimulation::AesEffectState_def::EsActivated); m_aiv.effectStateId = AreaEffectSimulation::AesEffectState::EsActivated;
m_aiv.aesItemId(m_aesItemId); m_aiv.aesItemId = m_aesItemId;
m_aiv.id(m_aesItemId); m_aiv.id = m_aesItemId;
m_aiv.aesTypeId(AreaEffectSimulation::AesType::AtExplosionAreaSingleExplosions); m_aiv.aesTypeId = AreaEffectSimulation::AesType::AtExplosionAreaSingleExplosions;
m_aiv.partyId(5); m_aiv.partyId = 5;
QPointF bl = m_housePos.geographic(-10, -10); QPointF bl = m_housePos.geographic(-10, -10);
QPointF tr = m_housePos.geographic(30, 30); QPointF tr = m_housePos.geographic(30, 30);
m_aiv.boundingBoxBottomLeft(Core::GeoPosition2D(bl.x(), bl.y())); m_aiv.boundingBoxBottomLeft = Core::GeoPosition2D(bl.x(), bl.y());
m_aiv.boundingBoxTopRight(Core::GeoPosition2D(tr.x(), tr.y())); m_aiv.boundingBoxTopRight = Core::GeoPosition2D(tr.x(), tr.y());
m_aiv.chargeStruct().chargeTypeId(m_chargeTypeId); m_aiv.chargeStruct.chargeTypeId = m_chargeTypeId;
m_aiv.sampleTime(QDateTime::currentMSecsSinceEpoch()); m_aiv.sampleTime = QDateTime::currentMSecsSinceEpoch();
setPos(m_aiv.form(), m_housePos.geographic(-10, -10)); setPos(m_aiv.form, m_housePos.geographic(-10, -10));
setPos(m_aiv.form(), m_housePos.geographic(0, 0)); setPos(m_aiv.form, m_housePos.geographic(0, 0));
setPos(m_aiv.form(), m_housePos.geographic(5, 5)); setPos(m_aiv.form, m_housePos.geographic(5, 5));
setPos(m_aiv.form(), m_housePos.geographic(-10, 10)); setPos(m_aiv.form, m_housePos.geographic(-10, 10));
setPos(m_aiv.form(), m_housePos.geographic(-10, 20)); setPos(m_aiv.form, m_housePos.geographic(-10, 20));
setPos(m_aiv.form(), m_housePos.geographic(-10, 30)); setPos(m_aiv.form, m_housePos.geographic(-10, 30));
DEBUG_LOG(m_logger) << "Publishing AesItemView: " << m_aiv; DEBUG_LOG(m_logger) << "Publishing AesItemView: " << m_aiv;
if (!m_aesDts->publish(m_aiv)) if (!m_aesDts->publish(m_aiv))
@@ -600,21 +600,21 @@ void CesTests::tryCreateAesItemViewSingleExplosions()
void CesTests::tryCreateAesItemViewBC(AreaEffectSimulation::AesEffectState desiredState) void CesTests::tryCreateAesItemViewBC(AreaEffectSimulation::AesEffectState desiredState)
{ {
m_aiv = AreaEffectSimulation::AesItemView(); m_aiv = AreaEffectSimulation::AesItemView();
m_aiv.aesItemId(m_aesItemId); m_aiv.aesItemId = m_aesItemId;
m_aiv.id(m_aesItemId); m_aiv.id = m_aesItemId;
m_aiv.aesTypeId(m_aesType); m_aiv.aesTypeId = m_aesType;
m_aiv.effectStateId(desiredState); m_aiv.effectStateId = desiredState;
QPointF bl = m_housePos.geographic(-10, -10); QPointF bl = m_housePos.geographic(-10, -10);
QPointF tr = m_housePos.geographic(30, 30); QPointF tr = m_housePos.geographic(30, 30);
m_aiv.boundingBoxBottomLeft(Core::GeoPosition2D(bl.x(), bl.y())); m_aiv.boundingBoxBottomLeft = Core::GeoPosition2D(bl.x(), bl.y());
m_aiv.boundingBoxTopRight(Core::GeoPosition2D(tr.x(), tr.y())); m_aiv.boundingBoxTopRight = Core::GeoPosition2D(tr.x(), tr.y());
m_aiv.chargeStruct().chargeTypeId(m_chargeTypeId); m_aiv.chargeStruct.chargeTypeId = m_chargeTypeId;
m_aiv.sampleTime(QDateTime::currentMSecsSinceEpoch()); m_aiv.sampleTime = QDateTime::currentMSecsSinceEpoch();
setPos(m_aiv.form(), m_housePos.geographic(3, 3)); setPos(m_aiv.form, m_housePos.geographic(3, 3));
setPos(m_aiv.form(), m_housePos.geographic(3, 35)); setPos(m_aiv.form, m_housePos.geographic(3, 35));
setPos(m_aiv.form(), m_housePos.geographic(35, 35)); setPos(m_aiv.form, m_housePos.geographic(35, 35));
setPos(m_aiv.form(), m_housePos.geographic(35, 3)); setPos(m_aiv.form, m_housePos.geographic(35, 3));
DEBUG_LOG(m_logger) << "Publishing AesItemView: " << m_aiv; DEBUG_LOG(m_logger) << "Publishing AesItemView: " << m_aiv;
if (!m_aesDts->publish(m_aiv)) if (!m_aesDts->publish(m_aiv))
@@ -624,22 +624,22 @@ void CesTests::tryCreateAesItemViewBC(AreaEffectSimulation::AesEffectState desir
void CesTests::tryCreateAesItemViewSM() void CesTests::tryCreateAesItemViewSM()
{ {
m_aiv = AreaEffectSimulation::AesItemView(); m_aiv = AreaEffectSimulation::AesItemView();
m_aiv.aesItemId(m_aesItemId); m_aiv.aesItemId = m_aesItemId;
m_aiv.id(m_aesItemId); m_aiv.id = m_aesItemId;
m_aiv.aesTypeId( AreaEffectSimulation::AesType_def::AtMineArea); m_aiv.aesTypeId = AreaEffectSimulation::AesType::AtMineArea;
m_aiv.effectStateId(AreaEffectSimulation::AesEffectState_def::EsActivated); m_aiv.effectStateId = AreaEffectSimulation::AesEffectState::EsActivated;
QPointF bl = m_housePos.geographic(-10, -10); QPointF bl = m_housePos.geographic(-10, -10);
QPointF tr = m_housePos.geographic(30, 30); QPointF tr = m_housePos.geographic(30, 30);
m_aiv.boundingBoxBottomLeft(Core::GeoPosition2D(bl.x(), bl.y())); m_aiv.boundingBoxBottomLeft = Core::GeoPosition2D(bl.x(), bl.y());
m_aiv.boundingBoxTopRight(Core::GeoPosition2D(tr.x(), tr.y())); m_aiv.boundingBoxTopRight = Core::GeoPosition2D(tr.x(), tr.y());
m_aiv.chargeStruct().chargeTypeId(m_chargeTypeId); m_aiv.chargeStruct.chargeTypeId = m_chargeTypeId;
m_aiv.sampleTime(QDateTime::currentMSecsSinceEpoch()); m_aiv.sampleTime = QDateTime::currentMSecsSinceEpoch();
// Position of each mine // Position of each mine
setPos(m_aiv.form(), m_housePos.geographic(3, 3)); setPos(m_aiv.form, m_housePos.geographic(3, 3));
setPos(m_aiv.form(), m_housePos.geographic(3, 35)); setPos(m_aiv.form, m_housePos.geographic(3, 35));
setPos(m_aiv.form(), m_housePos.geographic(35, 35)); setPos(m_aiv.form, m_housePos.geographic(35, 35));
setPos(m_aiv.form(), m_housePos.geographic(35, 3)); setPos(m_aiv.form, m_housePos.geographic(35, 3));
DEBUG_LOG(m_logger) << "Publishing AesItemView: " << m_aiv; DEBUG_LOG(m_logger) << "Publishing AesItemView: " << m_aiv;
if (!m_aesDts->publish(m_aiv)) if (!m_aesDts->publish(m_aiv))
@@ -651,22 +651,22 @@ void CesTests::tryCreateAesItemViewMA()
INFO_LOG(m_logger) << "trying to send AesItemView AtMineArea"; INFO_LOG(m_logger) << "trying to send AesItemView AtMineArea";
m_aiv = AreaEffectSimulation::AesItemView(); m_aiv = AreaEffectSimulation::AesItemView();
m_aiv.aesItemId(m_aesItemId); m_aiv.aesItemId = m_aesItemId;
m_aiv.id(m_aesItemId); m_aiv.id = m_aesItemId;
m_aiv.aesTypeId(m_aesType); m_aiv.aesTypeId = m_aesType;
m_aiv.effectStateId(AreaEffectSimulation::AesEffectState_def::EsActivated); m_aiv.effectStateId = AreaEffectSimulation::AesEffectState::EsActivated;
QPointF bl = m_housePos.geographic(-10, -10); QPointF bl = m_housePos.geographic(-10, -10);
QPointF tr = m_housePos.geographic(30, 30); QPointF tr = m_housePos.geographic(30, 30);
m_aiv.boundingBoxBottomLeft(Core::GeoPosition2D(bl.x(), bl.y())); m_aiv.boundingBoxBottomLeft = Core::GeoPosition2D(bl.x(), bl.y());
m_aiv.boundingBoxTopRight(Core::GeoPosition2D(tr.x(), tr.y())); m_aiv.boundingBoxTopRight = Core::GeoPosition2D(tr.x(), tr.y());
m_aiv.chargeStruct().chargeTypeId(m_chargeTypeId); m_aiv.chargeStruct.chargeTypeId = m_chargeTypeId;
m_aiv.sampleTime(QDateTime::currentMSecsSinceEpoch()); m_aiv.sampleTime = QDateTime::currentMSecsSinceEpoch();
// Form of mine Area // Form of mine Area
setPos(m_aiv.form(), m_housePos.geographic(1, 1)); setPos(m_aiv.form, m_housePos.geographic(1, 1));
setPos(m_aiv.form(), m_housePos.geographic(1, 37)); setPos(m_aiv.form, m_housePos.geographic(1, 37));
setPos(m_aiv.form(), m_housePos.geographic(37, 37)); setPos(m_aiv.form, m_housePos.geographic(37, 37));
setPos(m_aiv.form(), m_housePos.geographic(37, 1)); setPos(m_aiv.form, m_housePos.geographic(37, 1));
DEBUG_LOG(m_logger) << "Publishing AesItemView: " << m_aiv; DEBUG_LOG(m_logger) << "Publishing AesItemView: " << m_aiv;
if (!m_aesDts->publish(m_aiv)) if (!m_aesDts->publish(m_aiv))
@@ -679,17 +679,17 @@ void CesTests::tryCreateAesItemViewMA()
void CesTests::tryCreateBorderline() void CesTests::tryCreateBorderline()
{ {
AreaEffectSimulation::Borderline bl; AreaEffectSimulation::Borderline bl;
bl.id(m_aesItemId); bl.id = m_aesItemId;
bl.name("Borderline"); bl.name = "Borderline";
bl.operatorId(20); bl.operatorId = 20;
bl.partyId(1); bl.partyId = 1;
bl.effectStateId(AreaEffectSimulation::AesEffectState_def::EsCreated); bl.effectStateId = AreaEffectSimulation::AesEffectState::EsCreated;
setPos(bl.segments(), m_housePos.geographic(3, 3)); setPos(bl.segments, m_housePos.geographic(3, 3));
setPos(bl.segments(), m_housePos.geographic(4, 4)); setPos(bl.segments, m_housePos.geographic(4, 4));
setPos(bl.segments(), m_housePos.geographic(5, 3)); setPos(bl.segments, m_housePos.geographic(5, 3));
bl.isDeleted(false); bl.isDeleted = false;
DEBUG_LOG(m_logger) << "Publishing BorderLine: " << bl; DEBUG_LOG(m_logger) << "Publishing BorderLine: " << bl;
if (!m_aesDts->publish(bl)) if (!m_aesDts->publish(bl))
failExit("Error publishing Borderline"); failExit("Error publishing Borderline");
@@ -697,18 +697,18 @@ void CesTests::tryCreateBorderline()
void CesTests::tryCreateMainStructureElement() void CesTests::tryCreateMainStructureElement()
{ {
m_mse.id(555); m_mse.id = 555;
m_mse.name("Building 56"); m_mse.name = "Building 56";
m_mse.isDeleted(false); m_mse.isDeleted = false;
m_mse.isUsed(false); m_mse.isUsed = false;
m_mse.description("\"street\":\"Brueggeweg\":\"56\""); m_mse.description = "\"street\":\"Brueggeweg\":\"56\"";
m_mse.structureElementId(1); m_mse.structureElementId = 1;
m_mse.geoPosition().lat(m_housePos.geographic().y()); m_mse.geoPosition.lat = m_housePos.geographic().y();
m_mse.geoPosition().lon(m_housePos.geographic().x()); m_mse.geoPosition.lon = m_housePos.geographic().x();
m_mse.geoPosition().z(0); m_mse.geoPosition.z = 0;
m_mse.angle(318.83); m_mse.angle = 318.83;
m_mse.modelId(1337); m_mse.modelId = 1337;
m_mse.externalWlsId(0); m_mse.externalWlsId = 0;
DEBUG_LOG(m_logger) << "Publishing MainStructureElement: " << m_mse; DEBUG_LOG(m_logger) << "Publishing MainStructureElement: " << m_mse;
if (!m_ismDts->publish(m_mse)) if (!m_ismDts->publish(m_mse))
failExit("Error publishing MainStructureElement"); failExit("Error publishing MainStructureElement");
@@ -717,28 +717,28 @@ void CesTests::tryCreateMainStructureElement()
void CesTests::tryCreateMainFootprint() void CesTests::tryCreateMainFootprint()
{ {
InfrastructureManagement::MainFootprint mf; InfrastructureManagement::MainFootprint mf;
mf.id(555); mf.id = 555;
mf.isDeleted(false); mf.isDeleted = false;
mf.isUsed(false); mf.isUsed = false;
mf.structureElementId(1); mf.structureElementId = 1;
mf.elements().resize(4); mf.elements.resize(4);
InfrastructureManagement::FootprintElement elem; InfrastructureManagement::FootprintElement elem;
elem.id(1); elem.id = 1;
elem.relPosition(Core::RelativePosition(0.0, 0.0, 0.0)); elem.relPosition = Core::RelativePosition(0.0, 0.0, 0.0);
mf.elements().push_back(elem); mf.elements.push_back(elem);
elem.id(2); elem.id = 2;
elem.relPosition(Core::RelativePosition(10.0, 0.0, 0.0)); elem.relPosition = Core::RelativePosition(10.0, 0.0, 0.0);
mf.elements().push_back(elem); mf.elements.push_back(elem);
elem.id(3); elem.id = 3;
elem.relPosition(Core::RelativePosition(10.0, 10.0, 0.0)); elem.relPosition = Core::RelativePosition(10.0, 10.0, 0.0);
mf.elements().push_back(elem); mf.elements.push_back(elem);
elem.id(4); elem.id = 4;
elem.relPosition(Core::RelativePosition(0.0, 10.0, 0.0)); elem.relPosition = Core::RelativePosition(0.0, 10.0, 0.0);
mf.elements().push_back(elem); mf.elements.push_back(elem);
DEBUG_LOG(m_logger) << "Publishing MainFootprint: " << mf; DEBUG_LOG(m_logger) << "Publishing MainFootprint: " << mf;
if (!m_ismDts->publish(mf)) if (!m_ismDts->publish(mf))
@@ -752,12 +752,12 @@ void CesTests::tryCreateDynamicParticipantData()
ParticipantManagement::DynamicParticipantData dp; ParticipantManagement::DynamicParticipantData dp;
ParticipantManagement::StateInformation si; ParticipantManagement::StateInformation si;
si.stateTime(QDateTime::currentMSecsSinceEpoch()); si.stateTime = QDateTime::currentMSecsSinceEpoch();
si.vulnerabilityState(ProjectDataManagement::VulnerabilityState_def::CombatReady); si.vulnerabilityState = ProjectDataManagement::VulnerabilityState::VulnerabilityState_CombatReady;
dp.participantId(m_participants[m_participantIndex].participantId); dp.participantId = m_participants[m_participantIndex].participantId;
dp.stateHistory().push_back(si); dp.stateHistory.push_back(si);
dp.sampleTime(si.stateTime()); dp.sampleTime = si.stateTime;
DEBUG_LOG(m_logger) << "Publishing DynamicParticipantData: " << dp; DEBUG_LOG(m_logger) << "Publishing DynamicParticipantData: " << dp;
if (!m_ppmDts->publish(dp)) if (!m_ppmDts->publish(dp))
@@ -773,15 +773,15 @@ void CesTests::tryCreateParticipantPosition()
QPointF posF = m_housePos.geographic(m_participants[m_participantIndex].relX, QPointF posF = m_housePos.geographic(m_participants[m_participantIndex].relX,
m_participants[m_participantIndex].relY); m_participants[m_participantIndex].relY);
const Core::GeoPosition pos(Core::GeoPosition(posF.x(), posF.y(), 0)); const Core::GeoPosition pos(Core::GeoPosition(posF.x(), posF.y(), 0));
pp.buildingId(m_buildingId); pp.buildingId = m_buildingId;
pp.participantId(m_participants[m_participantIndex].participantId); pp.participantId = m_participants[m_participantIndex].participantId;
pp.participantTypeId(78); pp.participantTypeId = 78;
pp.partyId(5); pp.partyId = 5;
m_participantIndex++; m_participantIndex++;
pp.roomId(m_roomId); pp.roomId = m_roomId;
pp.sampleTime(QDateTime::currentMSecsSinceEpoch()); pp.sampleTime = QDateTime::currentMSecsSinceEpoch();
pp.pos(pos); pp.pos = pos;
m_expectedPosition[pp.participantId()] = Core::GeoPosition2D(posF.x(), posF.y()); m_expectedPosition[pp.participantId] = Core::GeoPosition2D(posF.x(), posF.y());
DEBUG_LOG(m_logger) << "Publishing ParticipantPosition: " << pp; DEBUG_LOG(m_logger) << "Publishing ParticipantPosition: " << pp;
if (!m_ppmDts->publish(pp)) if (!m_ppmDts->publish(pp))
@@ -795,23 +795,23 @@ void CesTests::tryCreateBuildingState()
Buildings::BuildingState bs; Buildings::BuildingState bs;
Buildings::RoomState rs; Buildings::RoomState rs;
bs.id(m_moutObjectId); bs.id = m_moutObjectId;
bs.aesId(m_moutObjectId); bs.aesId = m_moutObjectId;
bs.originatorParticipantId(2000); bs.originatorParticipantId = 2000;
bs.chargeTypeId(m_chargeTypeId); bs.chargeTypeId = m_chargeTypeId;
bs.damagePercent(100); bs.damagePercent = 100;
bs.damagePercentOld(0); bs.damagePercentOld = 0;
bs.vulnerabilityState(ProjectDataManagement::VulnerabilityState::CatastrophicKill); bs.vulnerabilityState = ProjectDataManagement::VulnerabilityState::VulnerabilityState_CatastrophicKill;
rs.id(m_roomId); rs.id = m_roomId;
rs.damagePercent(80); rs.damagePercent = 80;
rs.remainingEffectPercent(90); rs.remainingEffectPercent = 90;
bs.roomStates().push_back(rs); bs.roomStates.push_back(rs);
rs.id(m_roomId+1); rs.id = m_roomId+1;
rs.damagePercent(80); rs.damagePercent = 80;
rs.remainingEffectPercent(60); rs.remainingEffectPercent = 60;
bs.roomStates().push_back(rs); bs.roomStates.push_back(rs);
DEBUG_LOG(m_logger) << "Publishing BuildingState: " << bs; DEBUG_LOG(m_logger) << "Publishing BuildingState: " << bs;
if (!m_bldDts->publish(bs)) if (!m_bldDts->publish(bs))
@@ -821,8 +821,8 @@ void CesTests::tryCreateBuildingState()
static inline bool isSamePosition(const Core::GeoPosition2D &p1, static inline bool isSamePosition(const Core::GeoPosition2D &p1,
const Core::GeoPosition2D &p2) const Core::GeoPosition2D &p2)
{ {
return (qFuzzyCompare(p1.lat(), p2.lat()) && return (qFuzzyCompare(p1.lat, p2.lat) &&
qFuzzyCompare(p1.lon(), p2.lon())); qFuzzyCompare(p1.lon, p2.lon));
} }
// ///////////////////////////////////////////////////// // /////////////////////////////////////////////////////
@@ -830,7 +830,7 @@ static inline bool isSamePosition(const Core::GeoPosition2D &p1,
void CesTests::onSendCesHitOnBuildingRequest(const rti::core::SampleIdentity &cookie, void CesTests::onSendCesHitOnBuildingRequest(const rti::core::SampleIdentity &cookie,
const Buildings::SendCesHitOnBuildingRequest &request) const Buildings::SendCesHitOnBuildingRequest &request)
{ {
const QDateTime dateTime(QDateTime::fromMSecsSinceEpoch(request.effectTime())); const QDateTime dateTime(QDateTime::fromMSecsSinceEpoch(request.effectTime));
// debug und co // debug und co
m_countHitOnBuildingReply++; m_countHitOnBuildingReply++;
@@ -838,19 +838,19 @@ void CesTests::onSendCesHitOnBuildingRequest(const rti::core::SampleIdentity &co
<< " request: " << request << ", " << " request: " << request << ", "
<< dateTime.toString(QStringLiteral("dd.MM.yy - hh:mm:ss.zzz")) << "\n"; << dateTime.toString(QStringLiteral("dd.MM.yy - hh:mm:ss.zzz")) << "\n";
if (request.buildingId() != m_mse.id()) if (request.buildingId != m_mse.id)
{ {
failExit(QStringLiteral("Invalid building id %1 - %2").arg(request.buildingId()).arg(m_mse.id())); failExit(QStringLiteral("Invalid building id %1 - %2").arg(request.buildingId).arg(m_mse.id));
return; return;
} }
if (request.chargeTypeId() != m_chargeTypeId) if (request.chargeTypeId != m_chargeTypeId)
{ {
failExit(QStringLiteral("Invalid chargeType id %1 - %2").arg(request.chargeTypeId()).arg(m_chargeTypeId)); failExit(QStringLiteral("Invalid chargeType id %1 - %2").arg(request.chargeTypeId).arg(m_chargeTypeId));
return; return;
} }
if (request.aesId() != m_aesItemId) if (request.aesId != m_aesItemId)
{ {
failExit(QStringLiteral("Invalid aes id %1 - %2").arg(request.aesId()).arg(m_aesItemId)); failExit(QStringLiteral("Invalid aes id %1 - %2").arg(request.aesId).arg(m_aesItemId));
return; return;
} }
@@ -859,9 +859,9 @@ void CesTests::onSendCesHitOnBuildingRequest(const rti::core::SampleIdentity &co
{ {
case 1: case 1:
{ {
for (const auto &impact : m_aiv.form()) for (const auto &impact : m_aiv.form)
{ {
if (isSamePosition(impact, request.impactPosition())) if (isSamePosition(impact, request.impactPosition))
{ {
if (m_countHitOnBuildingReply == 2) if (m_countHitOnBuildingReply == 2)
ExitSuccess(); ExitSuccess();
@@ -872,7 +872,7 @@ void CesTests::onSendCesHitOnBuildingRequest(const rti::core::SampleIdentity &co
break; break;
} }
case 2: case 2:
if (isSamePosition(m_es.impactPosition(), request.impactPosition())) if (isSamePosition(m_es.impactPosition, request.impactPosition))
ExitSuccess(); ExitSuccess();
else else
failExit("Got building hit on unknown position"); failExit("Got building hit on unknown position");
@@ -897,11 +897,11 @@ void CesTests::onSendCesHitRequest(const rti::core::SampleIdentity &cookie,
} }
*/ */
// debug und co // debug und co
const QDateTime dateTime(QDateTime::fromMSecsSinceEpoch(request.effectTime())); const QDateTime dateTime(QDateTime::fromMSecsSinceEpoch(request.effectTime));
DEBUG_LOG(m_logger) << "onSendCesHitRequest" << "\n" DEBUG_LOG(m_logger) << "onSendCesHitRequest" << "\n"
<< " request: " << request << ", " << " request: " << request << ", "
<< dateTime.toString(QStringLiteral("dd.MM.yy - hh:mm:ss.zzz")) << "\n"; << dateTime.toString(QStringLiteral("dd.MM.yy - hh:mm:ss.zzz")) << "\n";
if (request.remainEffectPercent()) if (request.remainEffectPercent)
switch (m_testId) switch (m_testId)
{ {
@@ -910,11 +910,11 @@ void CesTests::onSendCesHitRequest(const rti::core::SampleIdentity &cookie,
case 7: case 7:
case 9: case 9:
{ {
if (request.chargeTypeId() != m_chargeTypeId) if (request.chargeTypeId != m_chargeTypeId)
failExit(QStringLiteral("Invalid chargeType id %1 - %2").arg(request.chargeTypeId()).arg(m_chargeTypeId)); failExit(QStringLiteral("Invalid chargeType id %1 - %2").arg(request.chargeTypeId).arg(m_chargeTypeId));
else if (request.aesId() != m_aesItemId) else if (request.aesId != m_aesItemId)
failExit(QStringLiteral("Invalid aes id %1 - %2").arg(request.chargeTypeId()).arg(m_chargeTypeId)); failExit(QStringLiteral("Invalid aes id %1 - %2").arg(request.chargeTypeId).arg(m_chargeTypeId));
else if (isSamePosition(m_expectedPosition.value(request.participantId()), request.position().position())) else if (isSamePosition(m_expectedPosition.value(request.participantId), request.position.position))
ExitSuccess(); ExitSuccess();
else else
failExit("Got wrong impact position"); failExit("Got wrong impact position");
@@ -923,7 +923,7 @@ void CesTests::onSendCesHitRequest(const rti::core::SampleIdentity &cookie,
case 10: case 10:
{ {
// 3 x Enter // 3 x Enter
if (request.remainEffectPercent() == 1) if (request.remainEffectPercent == 1)
m_replyEnterFunctionalArea ++; m_replyEnterFunctionalArea ++;
DEBUG_LOG(m_logger)<< "m_replyEnterFunctionalArea=" << m_replyEnterFunctionalArea; DEBUG_LOG(m_logger)<< "m_replyEnterFunctionalArea=" << m_replyEnterFunctionalArea;
if (m_replyEnterFunctionalArea == 3) if (m_replyEnterFunctionalArea == 3)
@@ -948,20 +948,20 @@ void CesTests::checkParticipantEvent()
switch (m_testId) switch (m_testId)
{ {
case 8: case 8:
expectedType = ProjectDataManagement::PdmEventType::EnterMineArea; expectedType = ProjectDataManagement::PdmEventType::EventType_MineArea;
break; break;
case 10: case 10:
expectedType = ProjectDataManagement::PdmEventType::EnterFunctionalArea; expectedType = ProjectDataManagement::PdmEventType::EventType_FunctionalArea;
break; break;
case 11: case 11:
case 12: case 12:
expectedType = ProjectDataManagement::PdmEventType::LeaveFunctionalArea; expectedType = ProjectDataManagement::PdmEventType::EventType_FunctionalArea;
break; break;
case 13: case 13:
expectedType = ProjectDataManagement::PdmEventType::CrossLocalBorderline; expectedType = ProjectDataManagement::PdmEventType::EventType_CrossLocalBorderline;
break; break;
case 14: case 14:
expectedType = ProjectDataManagement::PdmEventType::EnterDangerArea; expectedType = ProjectDataManagement::PdmEventType::EventType_DangerArea;
break; break;
default: default:
// nothing // nothing
@@ -977,7 +977,7 @@ void CesTests::checkParticipantEvent()
std::function<bool(const CentralEffectSimulation::ParticipantEvent &data)> cb = std::function<bool(const CentralEffectSimulation::ParticipantEvent &data)> cb =
[&bRet, expectedType](const CentralEffectSimulation::ParticipantEvent &pe) -> bool [&bRet, expectedType](const CentralEffectSimulation::ParticipantEvent &pe) -> bool
{ {
if (pe.eventTypeId() == expectedType) if (pe.eventTypeId == expectedType)
{ {
bRet = true; bRet = true;
return true; return true;
@@ -1000,18 +1000,18 @@ void CesTests::checkParticipantEvent()
void CesTests::tryCreateParticipant() void CesTests::tryCreateParticipant()
{ {
ParticipantManagement::Type ty; ParticipantManagement::Type ty;
ty.id(78); ty.id = 78;
ty.typeClass(ParticipantManagement::TypeClass_def::WeaponSystem); ty.typeClass = ParticipantManagement::TypeClass::WeaponSystem;
m_ppmDts->publish(ty); m_ppmDts->publish(ty);
ParticipantManagement::Participant pt; ParticipantManagement::Participant pt;
pt.id(m_participants[m_participantIndex].participantId); pt.id = m_participants[m_participantIndex].participantId;
pt.equipmentNumber(m_participants[m_participantIndex].equipmentNumber); pt.equipmentNumber = m_participants[m_participantIndex].equipmentNumber;
pt.partyId(4); pt.partyId = 4;
pt.typeId(ty.id()); // Leo pt.typeId = ty.id; // Leo
pt.isDeleted(false); pt.isDeleted = false;
pt.isSimulated(false); pt.isSimulated = false;
pt.equipmentNumber(4711); pt.equipmentNumber = 4711;
DEBUG_LOG(m_logger) << "Publishing Participant:" << pt; DEBUG_LOG(m_logger) << "Publishing Participant:" << pt;
if (!m_ppmDts->publish(pt)) if (!m_ppmDts->publish(pt))
@@ -56,7 +56,7 @@ protected Q_SLOTS:
void tryCreateMainStructureElement(); void tryCreateMainStructureElement();
void tryCreateMainFootprint(); void tryCreateMainFootprint();
void tryCreateChargeType(); void tryCreateChargeType();
void tryCreateAesItemViewBC(AreaEffectSimulation::AesEffectState desiredState = AreaEffectSimulation::AesEffectState_def::EsActivated); void tryCreateAesItemViewBC(AreaEffectSimulation::AesEffectState desiredState = AreaEffectSimulation::AesEffectState::EsActivated);
void tryCreateAesItemViewSM(); void tryCreateAesItemViewSM();
void tryCreateAesItemViewMA(); void tryCreateAesItemViewMA();
// //////////////////////// // ////////////////////////
@@ -152,11 +152,11 @@ void CesTestsBlockedAreas::tryCreateDynamicParticipantData()
const qint64 time = QDateTime::currentMSecsSinceEpoch(); const qint64 time = QDateTime::currentMSecsSinceEpoch();
const rti::core::int64 esTime = static_cast<rti::core::int64>(time); const rti::core::int64 esTime = static_cast<rti::core::int64>(time);
ParticipantManagement::StateInformation si; ParticipantManagement::StateInformation si;
si.stateTime(esTime); si.stateTime = esTime;
si.vulnerabilityState(ProjectDataManagement::VulnerabilityState_def::CatastrophicKill); si.vulnerabilityState = ProjectDataManagement::VulnerabilityState::VulnerabilityState_CatastrophicKill;
dp.participantId(m_participants[m_DynamicParticipantIndex].participantId); dp.participantId = m_participants[m_DynamicParticipantIndex].participantId;
dp.stateHistory().push_back(si); dp.stateHistory.push_back(si);
dp.sampleTime(esTime); dp.sampleTime = esTime;
m_DynamicParticipantIndex++; m_DynamicParticipantIndex++;
DEBUG_LOG(m_logger) << "Publishing DynamicParticipantData"; DEBUG_LOG(m_logger) << "Publishing DynamicParticipantData";
@@ -175,13 +175,13 @@ void CesTestsBlockedAreas::tryCreateParticipantPositionOutside()
const qint64 time = QDateTime::currentMSecsSinceEpoch(); const qint64 time = QDateTime::currentMSecsSinceEpoch();
const rti::core::int64 posTime = static_cast<rti::core::int64>(time); const rti::core::int64 posTime = static_cast<rti::core::int64>(time);
const Core::GeoPosition pos(0.15527934, 0.92597385, 1.0); const Core::GeoPosition pos(0.15527934, 0.92597385, 1.0);
pp.buildingId(0); pp.buildingId = 0;
pp.participantId(5); pp.participantId = 5;
pp.partyId(2); pp.partyId = 2;
pp.roomId(0); pp.roomId = 0;
m_participantIndex++; m_participantIndex++;
pp.sampleTime(posTime); pp.sampleTime = posTime;
pp.pos(pos); pp.pos = pos;
DEBUG_LOG(m_logger) << "Publishing ParticipantPosition"; DEBUG_LOG(m_logger) << "Publishing ParticipantPosition";
if (!m_ppmDts->publish(pp)) if (!m_ppmDts->publish(pp))
@@ -199,13 +199,13 @@ void CesTestsBlockedAreas::tryCreateParticipantPosition()
const qint64 time = QDateTime::currentMSecsSinceEpoch(); const qint64 time = QDateTime::currentMSecsSinceEpoch();
const rti::core::int64 posTime = static_cast<rti::core::int64>(time); const rti::core::int64 posTime = static_cast<rti::core::int64>(time);
const Core::GeoPosition pos(0.15527550, 0.92597466, 1.0); const Core::GeoPosition pos(0.15527550, 0.92597466, 1.0);
pp.buildingId(301); pp.buildingId = 301;
pp.participantId(5); pp.participantId = 5;
pp.partyId(2); pp.partyId = 2;
pp.roomId(41); pp.roomId = 41;
m_participantIndex++; m_participantIndex++;
pp.sampleTime(posTime); pp.sampleTime = posTime;
pp.pos(pos); pp.pos = pos;
DEBUG_LOG(m_logger) << "Publishing ParticipantPosition"; DEBUG_LOG(m_logger) << "Publishing ParticipantPosition";
if (!m_ppmDts->publish(pp)) if (!m_ppmDts->publish(pp))
@@ -221,8 +221,8 @@ void CesTestsBlockedAreas::tryCreateParticipantPosition()
void CesTestsBlockedAreas::tryCreateParticipant() void CesTestsBlockedAreas::tryCreateParticipant()
{ {
ParticipantManagement::Participant pt; ParticipantManagement::Participant pt;
pt.id(m_participants[m_participantIndex].participantId); pt.id = m_participants[m_participantIndex].participantId;
pt.equipmentNumber(m_participants[m_participantIndex].equipmentNumber); pt.equipmentNumber = m_participants[m_participantIndex].equipmentNumber;
DEBUG_LOG(m_logger) << "Publishing Participant"; DEBUG_LOG(m_logger) << "Publishing Participant";
if (!m_ppmDts->publish(pt)) if (!m_ppmDts->publish(pt))
@@ -238,16 +238,16 @@ void CesTestsBlockedAreas::tryCreateBuildingStateInit()
{ {
Buildings::BuildingState bs; Buildings::BuildingState bs;
bs.id(301); // BuildingId bs.id = 301; // BuildingId
bs.structureElementId(26); bs.structureElementId = 26;
bs.aesId(100); bs.aesId = 100;
bs.aesId(0); bs.aesId = 0;
bs.originatorParticipantId(2000); bs.originatorParticipantId = 2000;
bs.chargeTypeId(4); bs.chargeTypeId = 4;
bs.damagePercent(0); bs.damagePercent = 0;
bs.damagePercentOld(0); bs.damagePercentOld = 0;
bs.vulnerabilityState(ProjectDataManagement::VulnerabilityState::CombatReady); bs.vulnerabilityState = ProjectDataManagement::VulnerabilityState::VulnerabilityState_CombatReady;
bs.sampleTime(QDateTime::currentMSecsSinceEpoch()); bs.sampleTime = QDateTime::currentMSecsSinceEpoch();
DEBUG_LOG(m_logger) << "Publishing BuildingState"; DEBUG_LOG(m_logger) << "Publishing BuildingState";
if (!m_bldDts->publish(bs)) if (!m_bldDts->publish(bs))
@@ -262,22 +262,22 @@ void CesTestsBlockedAreas::tryCreateBuildingState()
Buildings::BuildingState bs; Buildings::BuildingState bs;
Buildings::RoomState rs; Buildings::RoomState rs;
bs.id(301); // BuildingId bs.id = 301; // BuildingId
bs.structureElementId(26); bs.structureElementId = 26;
bs.aesId(100); bs.aesId = 100;
bs.aesId(0); bs.aesId = 0;
bs.originatorParticipantId(2000); bs.originatorParticipantId = 2000;
bs.chargeTypeId(4); bs.chargeTypeId = 4;
bs.damagePercent(60); bs.damagePercent = 60;
bs.damagePercentOld(0); bs.damagePercentOld = 0;
bs.vulnerabilityState(ProjectDataManagement::VulnerabilityState::CombatReady); bs.vulnerabilityState = ProjectDataManagement::VulnerabilityState::VulnerabilityState_CombatReady;
bs.roomStates().resize(1); bs.roomStates.resize(1);
rs.id(41); // RoomId rs.id = 41; // RoomId
rs.damagePercent(90); rs.damagePercent = 90;
rs.remainingEffectPercent(90); rs.remainingEffectPercent = 90;
bs.roomStates()[0] = rs; bs.roomStates[0] = rs;
bs.sampleTime(QDateTime::currentMSecsSinceEpoch()); bs.sampleTime = QDateTime::currentMSecsSinceEpoch();
DEBUG_LOG(m_logger) << "Publishing BuildingState"; DEBUG_LOG(m_logger) << "Publishing BuildingState";
if (!m_bldDts->publish(bs)) if (!m_bldDts->publish(bs))
@@ -150,14 +150,14 @@ void CesTestsBoobyTrap::tryCreateParticipantPosition()
QPointF posF = m_refPos.geographic(m_participants[m_participantIndex].relX, QPointF posF = m_refPos.geographic(m_participants[m_participantIndex].relX,
m_participants[m_participantIndex].relY); m_participants[m_participantIndex].relY);
const Core::GeoPosition pos(Core::GeoPosition(posF.x(), posF.y(), 0)); const Core::GeoPosition pos(Core::GeoPosition(posF.x(), posF.y(), 0));
pp.buildingId(m_participants[m_participantIndex].buildingId); pp.buildingId = m_participants[m_participantIndex].buildingId;
pp.participantId(m_participants[m_participantIndex].participantId); pp.participantId = m_participants[m_participantIndex].participantId;
pp.participantTypeId(m_participants[m_participantIndex].participantTypeId); pp.participantTypeId = m_participants[m_participantIndex].participantTypeId;
pp.partyId(m_participants[m_participantIndex].partyId); pp.partyId = m_participants[m_participantIndex].partyId;
pp.roomId(m_participants[m_participantIndex].roomId); pp.roomId = m_participants[m_participantIndex].roomId;
m_participantIndex++; m_participantIndex++;
pp.sampleTime(posTime); pp.sampleTime = posTime;
pp.pos(pos); pp.pos = pos;
DEBUG_LOG(m_logger) << "Publishing ParticipantPosition[" << m_participantIndex << "]" DEBUG_LOG(m_logger) << "Publishing ParticipantPosition[" << m_participantIndex << "]"
<< " pos=" << posF.x() << "/" << posF.y(); << " pos=" << posF.x() << "/" << posF.y();
@@ -202,25 +202,25 @@ void CesTestsBoobyTrap::tryCreateAesItemViewBoobyTrap()
INFO_LOG(m_logger) << "trying to send AesItemView tryCreateAesItemViewBoobyTrap"; INFO_LOG(m_logger) << "trying to send AesItemView tryCreateAesItemViewBoobyTrap";
AreaEffectSimulation::AesItemView iv; AreaEffectSimulation::AesItemView iv;
iv.effectStateId(AreaEffectSimulation::AesEffectState_def::EsActivated); iv.effectStateId = AreaEffectSimulation::AesEffectState::EsActivated;
iv.aesItemId(m_aesItemId); iv.aesItemId = m_aesItemId;
iv.id(m_aesItemId); iv.id = m_aesItemId;
iv.aesTypeId(AreaEffectSimulation::AesType::AtBoobyTrap); iv.aesTypeId = AreaEffectSimulation::AesType::AtBoobyTrap;
iv.partyId(5); iv.partyId = 5;
QPointF bl = m_refPos.geographic(-10, -10); QPointF bl = m_refPos.geographic(-10, -10);
QPointF tr = m_refPos.geographic(30, 30); QPointF tr = m_refPos.geographic(30, 30);
iv.boundingBoxBottomLeft(Core::GeoPosition2D(bl.x(), bl.y())); iv.boundingBoxBottomLeft = Core::GeoPosition2D(bl.x(), bl.y());
iv.boundingBoxTopRight(Core::GeoPosition2D(tr.x(), tr.y())); iv.boundingBoxTopRight = Core::GeoPosition2D(tr.x(), tr.y());
iv.chargeStruct().chargeTypeId(m_chargeTypeId); iv.chargeStruct.chargeTypeId = m_chargeTypeId;
iv.sampleTime(QDateTime::currentMSecsSinceEpoch()); iv.sampleTime = QDateTime::currentMSecsSinceEpoch();
iv.effectStart ( QDateTime::currentMSecsSinceEpoch() + 2000); iv.effectStart = QDateTime::currentMSecsSinceEpoch() + 2000;
setPos(iv.form(), m_refPos.geographic(-10, -10)); setPos(iv.form, m_refPos.geographic(-10, -10));
setPos(iv.form(), m_refPos.geographic(-10, 30)); setPos(iv.form, m_refPos.geographic(-10, 30));
setPos(iv.form(), m_refPos.geographic( 10, 30)); setPos(iv.form, m_refPos.geographic( 10, 30));
setPos(iv.form(), m_refPos.geographic( 10, -10)); setPos(iv.form, m_refPos.geographic( 10, -10));
DEBUG_LOG(m_logger) << "Publishing AesItemView"; DEBUG_LOG(m_logger) << "Publishing AesItemView";
if (!m_aesDts->publish(iv)) if (!m_aesDts->publish(iv))
@@ -235,21 +235,21 @@ void CesTestsBoobyTrap::tryCreateAesBoobyTrap()
INFO_LOG(m_logger) << "trying to send AesItemView tryCreateAesBoobyTrap"; INFO_LOG(m_logger) << "trying to send AesItemView tryCreateAesBoobyTrap";
AreaEffectSimulation::BoobyTrap iv; AreaEffectSimulation::BoobyTrap iv;
iv.effectStateId(AreaEffectSimulation::AesEffectState_def::EsActivated); iv.effectStateId = AreaEffectSimulation::AesEffectState::EsActivated;
iv.id(m_aesItemId); iv.id = m_aesItemId;
iv.partyId(5); iv.partyId = 5;
QPointF bl = m_refPos.geographic(10, 10); QPointF bl = m_refPos.geographic(10, 10);
iv.impactPosition(Core::GeoPosition2D(bl.x(), bl.y())); iv.impactPosition = Core::GeoPosition2D(bl.x(), bl.y());
iv.chargeStruct().chargeTypeId(m_chargeTypeId); iv.chargeStruct.chargeTypeId = m_chargeTypeId;
iv.sampleTime(QDateTime::currentMSecsSinceEpoch()); iv.sampleTime = QDateTime::currentMSecsSinceEpoch();
iv.isCentral(true); iv.isCentral = true;
iv.impactRadius(10.0); iv.impactRadius = 10.0;
iv.triggerRadius(2.0); iv.triggerRadius = 2.0;
iv.centralAngle(90.0); iv.centralAngle = 90.0;
iv.effectDuration(3600000); iv.effectDuration = 3600000;
iv.effectStart ( QDateTime::currentMSecsSinceEpoch() + 2000); iv.effectStart = QDateTime::currentMSecsSinceEpoch() + 2000;
DEBUG_LOG(m_logger) << "Publishing AesItemView"; DEBUG_LOG(m_logger) << "Publishing AesItemView";
@@ -266,25 +266,25 @@ void CesTestsBoobyTrap::tryCreateAesItemViewBoobyTrapSecondary()
INFO_LOG(m_logger) << "trying to send AesItemView tryCreateAesItemViewBoobyTrapSecondary"; INFO_LOG(m_logger) << "trying to send AesItemView tryCreateAesItemViewBoobyTrapSecondary";
AreaEffectSimulation::AesItemView iv; AreaEffectSimulation::AesItemView iv;
iv.effectStateId(AreaEffectSimulation::AesEffectState_def::EsActivated); iv.effectStateId = AreaEffectSimulation::AesEffectState::EsActivated;
iv.aesItemId(m_aesItemId); iv.aesItemId = m_aesItemId;
iv.id(m_aesItemId+1); iv.id = m_aesItemId+1;
iv.aesTypeId(AreaEffectSimulation::AesType::AtBoobyTrapSecondary); iv.aesTypeId = AreaEffectSimulation::AesType::AtBoobyTrapSecondary;
iv.partyId(5); iv.partyId = 5;
QPointF bl = m_refPos.geographic(-20, -20); QPointF bl = m_refPos.geographic(-20, -20);
QPointF tr = m_refPos.geographic(40, 40); QPointF tr = m_refPos.geographic(40, 40);
iv.boundingBoxBottomLeft(Core::GeoPosition2D(bl.x(), bl.y())); iv.boundingBoxBottomLeft = Core::GeoPosition2D(bl.x(), bl.y());
iv.boundingBoxTopRight(Core::GeoPosition2D(tr.x(), tr.y())); iv.boundingBoxTopRight = Core::GeoPosition2D(tr.x(), tr.y());
iv.chargeStruct().chargeTypeId(m_chargeTypeId); iv.chargeStruct.chargeTypeId = m_chargeTypeId;
iv.sampleTime(QDateTime::currentMSecsSinceEpoch()); iv.sampleTime = QDateTime::currentMSecsSinceEpoch();
iv.effectStart ( QDateTime::currentMSecsSinceEpoch() + 2000); iv.effectStart = QDateTime::currentMSecsSinceEpoch() + 2000;
setPos(iv.form(), m_refPos.geographic(-20, -20)); setPos(iv.form, m_refPos.geographic(-20, -20));
setPos(iv.form(), m_refPos.geographic(-20, 20)); setPos(iv.form, m_refPos.geographic(-20, 20));
setPos(iv.form(), m_refPos.geographic( 50, 50)); setPos(iv.form, m_refPos.geographic( 50, 50));
setPos(iv.form(), m_refPos.geographic( 50, -20)); setPos(iv.form, m_refPos.geographic( 50, -20));
DEBUG_LOG(m_logger) << "Publishing AesItemView"; DEBUG_LOG(m_logger) << "Publishing AesItemView";
if (!m_aesDts->publish(iv)) if (!m_aesDts->publish(iv))
@@ -297,18 +297,18 @@ void CesTestsBoobyTrap::tryCreateAesItemViewBoobyTrapSecondary()
void CesTestsBoobyTrap::onEventChanged(const CentralEffectSimulation::ParticipantEvent &eventData, DataModification modType) void CesTestsBoobyTrap::onEventChanged(const CentralEffectSimulation::ParticipantEvent &eventData, DataModification modType)
{ {
DEBUG_LOG(m_logger) << "onParticipantEventChanged participantId=" << eventData.participantId() DEBUG_LOG(m_logger) << "onParticipantEventChanged participantId=" << eventData.participantId
<< " eventType=" << eventData.eventTypeId() << " eventType=" << eventData.eventTypeId
<< " aesItemId=" << eventData.aesItemId(); << " aesItemId=" << eventData.aesItemId;
if (modType == DataModification::eRemoved || if (modType == DataModification::eRemoved ||
modType == DataModification::eModified) modType == DataModification::eModified)
return; return;
if (eventData.eventTypeId() == ProjectDataManagement::PdmEventType_def::HitMine) if (eventData.eventTypeId == ProjectDataManagement::PdmEventType::HitMine)
{ {
m_countEventBoobyTrap ++; m_countEventBoobyTrap ++;
DEBUG_LOG(m_logger) << "m_countEventBoobyTrap=" << m_countEventBoobyTrap DEBUG_LOG(m_logger) << "m_countEventBoobyTrap=" << m_countEventBoobyTrap
<< " eventData.aesItemId()=" << eventData.aesItemId() << " eventData.aesItemId()=" << eventData.aesItemId
<< " eventData.participantId()=" << eventData.participantId(); << " eventData.participantId()=" << eventData.participantId;
} }
} }
@@ -178,11 +178,11 @@ void CesTestsGasPipe::tryCreateDynamicParticipantData()
const qint64 time = QDateTime::currentMSecsSinceEpoch(); const qint64 time = QDateTime::currentMSecsSinceEpoch();
const rti::core::int64 esTime = static_cast<rti::core::int64>(time); const rti::core::int64 esTime = static_cast<rti::core::int64>(time);
ParticipantManagement::StateInformation si; ParticipantManagement::StateInformation si;
si.stateTime(esTime); si.stateTime = esTime;
si.vulnerabilityState(ProjectDataManagement::VulnerabilityState_def::CatastrophicKill); si.vulnerabilityState = ProjectDataManagement::VulnerabilityState::VulnerabilityState_CatastrophicKill;
dp.participantId(m_participants[m_DynamicParticipantIndex].participantId); dp.participantId = m_participants[m_DynamicParticipantIndex].participantId;
dp.stateHistory().push_back(si); dp.stateHistory.push_back(si);
dp.sampleTime(esTime); dp.sampleTime = esTime;
m_DynamicParticipantIndex++; m_DynamicParticipantIndex++;
DEBUG_LOG(m_logger) << "Publishing DynamicParticipantData"; DEBUG_LOG(m_logger) << "Publishing DynamicParticipantData";
@@ -203,14 +203,14 @@ void CesTestsGasPipe::tryCreateParticipantPosition()
QPointF posF = m_refPos.geographic(m_participants[m_participantIndex].relX, QPointF posF = m_refPos.geographic(m_participants[m_participantIndex].relX,
m_participants[m_participantIndex].relY); m_participants[m_participantIndex].relY);
const Core::GeoPosition pos(Core::GeoPosition(posF.x(), posF.y(), 0)); const Core::GeoPosition pos(Core::GeoPosition(posF.x(), posF.y(), 0));
pp.buildingId(m_participants[m_participantIndex].buildingId); pp.buildingId = m_participants[m_participantIndex].buildingId;
pp.participantId(m_participants[m_participantIndex].participantId); pp.participantId = m_participants[m_participantIndex].participantId;
pp.participantTypeId(m_participants[m_participantIndex].participantTypeId); pp.participantTypeId = m_participants[m_participantIndex].participantTypeId;
pp.partyId(m_participants[m_participantIndex].partyId); pp.partyId = m_participants[m_participantIndex].partyId;
pp.roomId(m_participants[m_participantIndex].roomId); pp.roomId = m_participants[m_participantIndex].roomId;
m_participantIndex++; m_participantIndex++;
pp.sampleTime(posTime); pp.sampleTime = posTime;
pp.pos(pos); pp.pos = pos;
DEBUG_LOG(m_logger) << "Publishing ParticipantPosition"; DEBUG_LOG(m_logger) << "Publishing ParticipantPosition";
if (!m_ppmDts->publish(pp)) if (!m_ppmDts->publish(pp))
@@ -226,8 +226,8 @@ void CesTestsGasPipe::tryCreateParticipantPosition()
void CesTestsGasPipe::tryCreateParticipant() void CesTestsGasPipe::tryCreateParticipant()
{ {
ParticipantManagement::Participant pt; ParticipantManagement::Participant pt;
pt.id(m_id); pt.id = m_id;
pt.equipmentNumber(m_equipmentNumber); pt.equipmentNumber = m_equipmentNumber;
DEBUG_LOG(m_logger) << "Publishing Participant"; DEBUG_LOG(m_logger) << "Publishing Participant";
if (!m_ppmDts->publish(pt)) if (!m_ppmDts->publish(pt))
@@ -267,11 +267,11 @@ void CesTestsGasPipe::checkParticipantEvent()
void CesTestsGasPipe::tryCreateTypeVehicle() void CesTestsGasPipe::tryCreateTypeVehicle()
{ {
ParticipantManagement::Type ty; ParticipantManagement::Type ty;
ty.id(35); ty.id = 35;
ty.typeClass(ParticipantManagement::TypeClass::inner_enum::GroundVehicle); ty.typeClass = ParticipantManagement::TypeClass::GroundVehicle;
ty.equipmentTypeId(35); ty.equipmentTypeId = 35;
ty.symbol("1001"); ty.symbol = "1001";
ty.name("HMMWV Utility"); ty.name = "HMMWV Utility";
DEBUG_LOG(m_logger) << "Publishing Type"; DEBUG_LOG(m_logger) << "Publishing Type";
@@ -288,11 +288,11 @@ void CesTestsGasPipe::tryCreateTypeVehicle()
void CesTestsGasPipe::tryCreateTypeSoldier() void CesTestsGasPipe::tryCreateTypeSoldier()
{ {
ParticipantManagement::Type ty; ParticipantManagement::Type ty;
ty.id(11); ty.id = 11;
ty.typeClass(ParticipantManagement::TypeClass::inner_enum::Human); ty.typeClass = ParticipantManagement::TypeClass::Human;
ty.equipmentTypeId(30); ty.equipmentTypeId = 30;
ty.symbol("1001"); ty.symbol = "1001";
ty.name("Soldier"); ty.name = "Soldier";
DEBUG_LOG(m_logger) << "Publishing Type"; DEBUG_LOG(m_logger) << "Publishing Type";
@@ -312,25 +312,25 @@ void CesTestsGasPipe::tryCreateAesItemViewGasPipe()
INFO_LOG(m_logger) << "trying to send AesItemView AtExplosionAreaSingleExplosions"; INFO_LOG(m_logger) << "trying to send AesItemView AtExplosionAreaSingleExplosions";
AreaEffectSimulation::AesItemView iv; AreaEffectSimulation::AesItemView iv;
iv.effectStateId(AreaEffectSimulation::AesEffectState_def::EsActivated); iv.effectStateId = AreaEffectSimulation::AesEffectState::EsActivated;
iv.aesItemId(m_aesItemId); iv.aesItemId = m_aesItemId;
iv.id(m_aesItemId); iv.id = m_aesItemId;
iv.aesTypeId(AreaEffectSimulation::AesType::AtGasPipe); iv.aesTypeId = AreaEffectSimulation::AesType::AtGasPipe;
iv.partyId(5); iv.partyId = 5;
QPointF bl = m_refPos.geographic(-10, -10); QPointF bl = m_refPos.geographic(-10, -10);
QPointF tr = m_refPos.geographic(30, 30); QPointF tr = m_refPos.geographic(30, 30);
iv.boundingBoxBottomLeft(Core::GeoPosition2D(bl.x(), bl.y())); iv.boundingBoxBottomLeft = Core::GeoPosition2D(bl.x(), bl.y());
iv.boundingBoxTopRight(Core::GeoPosition2D(tr.x(), tr.y())); iv.boundingBoxTopRight = Core::GeoPosition2D(tr.x(), tr.y());
iv.chargeStruct().chargeTypeId(m_chargeTypeId); iv.chargeStruct.chargeTypeId = m_chargeTypeId;
iv.sampleTime(QDateTime::currentMSecsSinceEpoch()); iv.sampleTime = QDateTime::currentMSecsSinceEpoch();
iv.effectStart ( QDateTime::currentMSecsSinceEpoch() + 2000); iv.effectStart = QDateTime::currentMSecsSinceEpoch() + 2000;
setPos(iv.form(), m_refPos.geographic(-10, -10)); setPos(iv.form, m_refPos.geographic(-10, -10));
setPos(iv.form(), m_refPos.geographic(-10, 30)); setPos(iv.form, m_refPos.geographic(-10, 30));
setPos(iv.form(), m_refPos.geographic( 10, 30)); setPos(iv.form, m_refPos.geographic( 10, 30));
setPos(iv.form(), m_refPos.geographic( 10, -10)); setPos(iv.form, m_refPos.geographic( 10, -10));
DEBUG_LOG(m_logger) << "Publishing AesItemView"; DEBUG_LOG(m_logger) << "Publishing AesItemView";
if (!m_aesDts->publish(iv)) if (!m_aesDts->publish(iv))
@@ -344,8 +344,8 @@ void CesTestsGasPipe::tryCreateChargeType()
{ {
DEBUG_LOG(m_logger) << "Publishing ChargeType"; DEBUG_LOG(m_logger) << "Publishing ChargeType";
ProjectDataManagement::ChargeType ct; ProjectDataManagement::ChargeType ct;
ct.id(m_chargeTypeId); ct.id = m_chargeTypeId;
ct.properties("{\"impactRadius\":25,\"impactEdgeLength\":50,\"isSmart\":true,\"searchRadius\":150}"); ct.properties = "{\"impactRadius\":25,\"impactEdgeLength\":50,\"isSmart\":true,\"searchRadius\":150}";
if (!m_pdmDts->publish(ct)) if (!m_pdmDts->publish(ct))
{ {
ERROR_LOG(m_logger) << "Error publish ChargeType"; ERROR_LOG(m_logger) << "Error publish ChargeType";
@@ -355,12 +355,12 @@ void CesTestsGasPipe::tryCreateChargeType()
void CesTestsGasPipe::onEventChanged(const CentralEffectSimulation::ParticipantEvent &eventData, DataModification modType) void CesTestsGasPipe::onEventChanged(const CentralEffectSimulation::ParticipantEvent &eventData, DataModification modType)
{ {
DEBUG_LOG(m_logger) << "onParticipantEventChanged participantId=" << eventData.participantId() DEBUG_LOG(m_logger) << "onParticipantEventChanged participantId=" << eventData.participantId
<< " eventType=" << eventData.eventTypeId(); << " eventType=" << eventData.eventTypeId;
if (modType == DataModification::eRemoved || if (modType == DataModification::eRemoved ||
modType == DataModification::eModified) modType == DataModification::eModified)
return; return;
if (eventData.eventTypeId() == ProjectDataManagement::PdmEventType_def::HitGasPipe) if (eventData.eventTypeId == ProjectDataManagement::PdmEventType::HitGasPipe)
{ {
m_countEventGasPipe ++; m_countEventGasPipe ++;
DEBUG_LOG(m_logger) << "m_countEventGasPipe=" << m_countEventGasPipe; DEBUG_LOG(m_logger) << "m_countEventGasPipe=" << m_countEventGasPipe;
@@ -137,11 +137,11 @@ void CesTestsGeopairing::startTest()
void CesTestsGeopairing::tryCreateMeteoData() void CesTestsGeopairing::tryCreateMeteoData()
{ {
MeteoDataManagement::MeteoData md; MeteoDataManagement::MeteoData md;
md.id(1); md.id = 1;
md.windSpeed(0.0); md.windSpeed = 0.0;
md.windDirection(0.0); md.windDirection = 0.0;
md.temperature(20.0); md.temperature = 20.0;
md.pressure(1013); md.pressure = 1013;
DEBUG_LOG(m_logger) << "Publishing MeteoData"; DEBUG_LOG(m_logger) << "Publishing MeteoData";
if (!m_mdmDts->publish(md)) if (!m_mdmDts->publish(md))
{ {
@@ -159,13 +159,13 @@ void CesTestsGeopairing::tryCreateSoldierPosition()
const rti::core::int64 posTime = static_cast<rti::core::int64>(time); const rti::core::int64 posTime = static_cast<rti::core::int64>(time);
double lon = 0.15530400; double lon = 0.15530400;
double lat = 0.92601500; double lat = 0.92601500;
pp.participantId(5); pp.participantId = 5;
pp.participantTypeId(55); pp.participantTypeId = 55;
pp.pos().lon(lon); pp.pos.lon = lon;
pp.pos().lat(lat); pp.pos.lat = lat;
pp.partyId(2); pp.partyId = 2;
pp.roomId(0); pp.roomId = 0;
pp.sampleTime(posTime); pp.sampleTime = posTime;
DEBUG_LOG(m_logger) << "Publishing ParticipantPosition"; DEBUG_LOG(m_logger) << "Publishing ParticipantPosition";
if (!m_ppmDts->publish(pp)) if (!m_ppmDts->publish(pp))
@@ -184,13 +184,13 @@ void CesTestsGeopairing::tryCreateAircraftPosition()
const rti::core::int64 posTime = static_cast<rti::core::int64>(time); const rti::core::int64 posTime = static_cast<rti::core::int64>(time);
double lon = 0.15488; double lon = 0.15488;
double lat = 0.925742; double lat = 0.925742;
pp.participantId(61); pp.participantId = 61;
pp.participantTypeId(130); pp.participantTypeId = 130;
pp.pos().lon(lon); pp.pos.lon = lon;
pp.pos().lat(lat); pp.pos.lat = lat;
pp.partyId(2); pp.partyId = 2;
pp.roomId(0); pp.roomId = 0;
pp.sampleTime(posTime); pp.sampleTime = posTime;
DEBUG_LOG(m_logger) << "Publishing ParticipantPosition"; DEBUG_LOG(m_logger) << "Publishing ParticipantPosition";
if (!m_ppmDts->publish(pp)) if (!m_ppmDts->publish(pp))
@@ -207,7 +207,7 @@ void CesTestsGeopairing::tryCreateGeopairingData()
TrainingAreaBase::GeopairingData gd; TrainingAreaBase::GeopairingData gd;
const qint64 time = QDateTime::currentMSecsSinceEpoch(); const qint64 time = QDateTime::currentMSecsSinceEpoch();
const rti::core::int64 posTime = static_cast<rti::core::int64>(time); const rti::core::int64 posTime = static_cast<rti::core::int64>(time);
gd.payload().resize(18); gd.payload.resize(18);
// Fire_Report: TimerTick=58908 AmmuniationType=4 Azimut=79,7 Elevation=67,1 Temperatur=25 RoundsAmm1=0 RoundsAmm2=7 // Fire_Report: TimerTick=58908 AmmuniationType=4 Azimut=79,7 Elevation=67,1 Temperatur=25 RoundsAmm1=0 RoundsAmm2=7
// E3 01 1C E6 04 9F 02 00 00 1D 03 00 00 19 00 00 00 07 // E3 01 1C E6 04 9F 02 00 00 1D 03 00 00 19 00 00 00 07
// 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 // 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
@@ -231,30 +231,30 @@ void CesTestsGeopairing::tryCreateGeopairingData()
gd.payload()[17] = 0x07; // */ gd.payload()[17] = 0x07; // */
gd.payload()[0] = 0xE3; gd.payload[0] = 0xE3;
gd.payload()[1] = 0x01; gd.payload[1] = 0x01;
gd.payload()[2] = 0xe5; gd.payload[2] = 0xe5;
gd.payload()[3] = 0x96; gd.payload[3] = 0x96;
gd.payload()[4] = 0x12; gd.payload[4] = 0x12;
gd.payload()[5] = 0x75; gd.payload[5] = 0x75;
gd.payload()[6] = 0x03; gd.payload[6] = 0x03;
gd.payload()[7] = 0x00; gd.payload[7] = 0x00;
gd.payload()[8] = 0x00; gd.payload[8] = 0x00;
gd.payload()[9] = 0x0e; gd.payload[9] = 0x0e;
gd.payload()[10] = 0x0d; gd.payload[10] = 0x0d;
gd.payload()[11] = 0x00; gd.payload[11] = 0x00;
gd.payload()[12] = 0x00; gd.payload[12] = 0x00;
gd.payload()[13] = 0x24; gd.payload[13] = 0x24;
gd.payload()[14] = 0x00; gd.payload[14] = 0x00;
gd.payload()[15] = 0x00; gd.payload[15] = 0x00;
gd.payload()[16] = 0x00; gd.payload[16] = 0x00;
gd.payload()[17] = 0x00; gd.payload[17] = 0x00;
gd.sampleTime(posTime); gd.sampleTime = posTime;
gd.equipmentNumber(1001); gd.equipmentNumber = 1001;
QPointF posF = m_housePos.geographic(10,10); QPointF posF = m_housePos.geographic(10,10);
const Core::GeoPosition pos(Core::GeoPosition(posF.x(), posF.y(), 0)); const Core::GeoPosition pos(Core::GeoPosition(posF.x(), posF.y(), 0));
gd.position(pos); gd.position = pos;
DEBUG_LOG(m_logger) << "Publishing GeopairingData"; DEBUG_LOG(m_logger) << "Publishing GeopairingData";
if (!m_tabDts->publish(gd)) if (!m_tabDts->publish(gd))
@@ -273,7 +273,7 @@ void CesTestsGeopairing::tryCreateGeopairingDataIGLA()
TrainingAreaBase::GeopairingData gd; TrainingAreaBase::GeopairingData gd;
const qint64 time = QDateTime::currentMSecsSinceEpoch(); const qint64 time = QDateTime::currentMSecsSinceEpoch();
const rti::core::int64 posTime = static_cast<rti::core::int64>(time); const rti::core::int64 posTime = static_cast<rti::core::int64>(time);
gd.payload().resize(18); gd.payload.resize(18);
// Original aus UAE LogViewer Script // Original aus UAE LogViewer Script
/*gd.payload()[0] = 0xE3; /*gd.payload()[0] = 0xE3;
@@ -318,31 +318,31 @@ void CesTestsGeopairing::tryCreateGeopairingDataIGLA()
*/ */
// Daten, wie bei Test1. Sollte ja dann im Zielbereich liegen. // Daten, wie bei Test1. Sollte ja dann im Zielbereich liegen.
gd.payload()[0] = 0xE3; gd.payload[0] = 0xE3;
gd.payload()[1] = 0x03; // IGLA gd.payload[1] = 0x03; // IGLA
gd.payload()[2] = 0x1c; gd.payload[2] = 0x1c;
gd.payload()[3] = 0xe6; gd.payload[3] = 0xe6;
gd.payload()[4] = 0x04; gd.payload[4] = 0x04;
gd.payload()[5] = 0x32; gd.payload[5] = 0x32;
gd.payload()[6] = 0x00; gd.payload[6] = 0x00;
gd.payload()[7] = 0x00; gd.payload[7] = 0x00;
gd.payload()[8] = 0x00; gd.payload[8] = 0x00;
gd.payload()[9] = 0x00; gd.payload[9] = 0x00;
gd.payload()[10] = 0x00; gd.payload[10] = 0x00;
gd.payload()[11] = 0x00; gd.payload[11] = 0x00;
gd.payload()[12] = 0x00; gd.payload[12] = 0x00;
gd.payload()[13] = 0x19; gd.payload[13] = 0x19;
gd.payload()[14] = 0x00; gd.payload[14] = 0x00;
gd.payload()[15] = 0x00; gd.payload[15] = 0x00;
gd.payload()[16] = 0x02; // Button Change over point pressed gd.payload[16] = 0x02; // Button Change over point pressed
gd.payload()[17] = 0x00; gd.payload[17] = 0x00;
gd.sampleTime(posTime); gd.sampleTime = posTime;
gd.equipmentNumber(1001); gd.equipmentNumber = 1001;
double lon = 0.15530364; double lon = 0.15530364;
double lat = 0.92601523; double lat = 0.92601523;
gd.position().lon(lon); gd.position.lon = lon;
gd.position().lat(lat); gd.position.lat = lat;
DEBUG_LOG(m_logger) << "Publishing GeopairingData"; DEBUG_LOG(m_logger) << "Publishing GeopairingData";
if (!m_tabDts->publish(gd)) if (!m_tabDts->publish(gd))
@@ -361,34 +361,34 @@ void CesTestsGeopairing::tryCreateGeopairingDataMK19()
TrainingAreaBase::GeopairingData gd; TrainingAreaBase::GeopairingData gd;
const qint64 time = QDateTime::currentMSecsSinceEpoch(); const qint64 time = QDateTime::currentMSecsSinceEpoch();
const rti::core::int64 posTime = static_cast<rti::core::int64>(time); const rti::core::int64 posTime = static_cast<rti::core::int64>(time);
gd.payload().resize(18); gd.payload.resize(18);
gd.payload()[0] = 0xE3; gd.payload[0] = 0xE3;
gd.payload()[1] = 0x05; // MK 19 gd.payload[1] = 0x05; // MK 19
gd.payload()[2] = 0x1c; gd.payload[2] = 0x1c;
gd.payload()[3] = 0xe6; gd.payload[3] = 0xe6;
gd.payload()[4] = 0x04; gd.payload[4] = 0x04;
gd.payload()[5] = 0x32; gd.payload[5] = 0x32;
gd.payload()[6] = 0x00; gd.payload[6] = 0x00;
gd.payload()[7] = 0x00; gd.payload[7] = 0x00;
gd.payload()[8] = 0x00; gd.payload[8] = 0x00;
gd.payload()[9] = 0x00; gd.payload[9] = 0x00;
gd.payload()[10] = 0x00; gd.payload[10] = 0x00;
gd.payload()[11] = 0x00; gd.payload[11] = 0x00;
gd.payload()[12] = 0x00; gd.payload[12] = 0x00;
gd.payload()[13] = 0x19; gd.payload[13] = 0x19;
gd.payload()[14] = 0x00; gd.payload[14] = 0x00;
gd.payload()[15] = 0x00; gd.payload[15] = 0x00;
gd.payload()[16] = 0x02; // Button Change over point pressed gd.payload[16] = 0x02; // Button Change over point pressed
gd.payload()[17] = 0x00; gd.payload[17] = 0x00;
gd.sampleTime(posTime); gd.sampleTime = posTime;
gd.equipmentNumber(1001); gd.equipmentNumber = 1001;
double lon = 0.15530364; double lon = 0.15530364;
double lat = 0.92601523; double lat = 0.92601523;
gd.position().lon(lon); gd.position.lon = lon;
gd.position().lat(lat); gd.position.lat = lat;
DEBUG_LOG(m_logger) << "Publishing GeopairingData"; DEBUG_LOG(m_logger) << "Publishing GeopairingData";
if (!m_tabDts->publish(gd)) if (!m_tabDts->publish(gd))
@@ -407,15 +407,15 @@ void CesTestsGeopairing::checkGeopairing()
QMap < int ,AreaEffectSimulation::ExplosionSingle> explosionSingles = m_aesDtc->explosionSingles(); QMap < int ,AreaEffectSimulation::ExplosionSingle> explosionSingles = m_aesDtc->explosionSingles();
INFO_LOG(m_logger) << "explosionSingles.size()" << explosionSingles.size(); INFO_LOG(m_logger) << "explosionSingles.size()" << explosionSingles.size();
AreaEffectSimulation::ExplosionSingle explosionSingle = explosionSingles.last(); AreaEffectSimulation::ExplosionSingle explosionSingle = explosionSingles.last();
DEBUG_LOG(m_logger) << "explosionSingle.lat=" << explosionSingle.impactPosition().lat() DEBUG_LOG(m_logger) << "explosionSingle.lat=" << explosionSingle.impactPosition.lat
<< " lon=" << explosionSingle.impactPosition().lon(); << " lon=" << explosionSingle.impactPosition.lon;
switch (m_testId) switch (m_testId)
{ {
case 1: case 1:
{ {
if ( (explosionSingle.impactPosition().lat() > 0.9 && explosionSingle.impactPosition().lat() < 1.0) if ( (explosionSingle.impactPosition.lat > 0.9 && explosionSingle.impactPosition.lat < 1.0)
&& (explosionSingle.impactPosition().lon() > 0.1 && explosionSingle.impactPosition().lon() < 0.2)) && (explosionSingle.impactPosition.lon > 0.1 && explosionSingle.impactPosition.lon < 0.2))
{ {
ExitSuccess(); ExitSuccess();
return; return;
@@ -132,13 +132,13 @@ void CesTestsGeopairing::tryCreateSoldierPosition()
const rti::core::int64 posTime = static_cast<rti::core::int64>(time); const rti::core::int64 posTime = static_cast<rti::core::int64>(time);
double lon = 0.15530400; double lon = 0.15530400;
double lat = 0.92601500; double lat = 0.92601500;
pp.participantId(5); pp.participantId = 5;
pp.participantTypeId(55); pp.participantTypeId = 55;
pp.pos().lon(lon); pp.pos.lon = lon;
pp.pos().lat(lat); pp.pos.lat = lat;
pp.partyId(2); pp.partyId = 2;
pp.roomId(0); pp.roomId = 0;
pp.sampleTime(posTime); pp.sampleTime = posTime;
DEBUG_LOG(m_logger) << "Publishing ParticipantPosition"; DEBUG_LOG(m_logger) << "Publishing ParticipantPosition";
if (!m_ppmDts->publish(pp)) if (!m_ppmDts->publish(pp))
@@ -157,13 +157,13 @@ void CesTestsGeopairing::tryCreateAircraftPosition()
const rti::core::int64 posTime = static_cast<rti::core::int64>(time); const rti::core::int64 posTime = static_cast<rti::core::int64>(time);
double lon = 0.15488; double lon = 0.15488;
double lat = 0.925742; double lat = 0.925742;
pp.participantId(61); pp.participantId = 61;
pp.participantTypeId(130); pp.participantTypeId = 130;
pp.pos().lon(lon); pp.pos.lon = lon;
pp.pos().lat(lat); pp.pos.lat = lat;
pp.partyId(2); pp.partyId = 2;
pp.roomId(0); pp.roomId = 0;
pp.sampleTime(posTime); pp.sampleTime = posTime;
DEBUG_LOG(m_logger) << "Publishing ParticipantPosition"; DEBUG_LOG(m_logger) << "Publishing ParticipantPosition";
if (!m_ppmDts->publish(pp)) if (!m_ppmDts->publish(pp))
@@ -180,37 +180,37 @@ void CesTestsGeopairing::tryCreateGeopairingData()
TrainingAreaBase::GeopairingData gd; TrainingAreaBase::GeopairingData gd;
const qint64 time = QDateTime::currentMSecsSinceEpoch(); const qint64 time = QDateTime::currentMSecsSinceEpoch();
const rti::core::int64 posTime = static_cast<rti::core::int64>(time); const rti::core::int64 posTime = static_cast<rti::core::int64>(time);
gd.payload().resize(18); gd.payload.resize(18);
gd.payload()[0] = 227; gd.payload[0] = 227;
gd.payload()[1] = 1; gd.payload[1] = 1;
gd.payload()[2] = 28; gd.payload[2] = 28;
gd.payload()[3] = 230; gd.payload[3] = 230;
gd.payload()[4] = 4; gd.payload[4] = 4;
gd.payload()[5] = 159; gd.payload[5] = 159;
gd.payload()[6] = 2; gd.payload[6] = 2;
gd.payload()[7] = 0; gd.payload[7] = 0;
gd.payload()[8] = 0; gd.payload[8] = 0;
gd.payload()[9] = 29; gd.payload[9] = 29;
gd.payload()[10] = 3; gd.payload[10] = 3;
gd.payload()[11] = 0; gd.payload[11] = 0;
gd.payload()[12] = 0; gd.payload[12] = 0;
gd.payload()[13] = 25; gd.payload[13] = 25;
gd.payload()[14] = 0; gd.payload[14] = 0;
gd.payload()[15] = 0; gd.payload[15] = 0;
gd.payload()[16] = 0; gd.payload[16] = 0;
gd.payload()[17] = 7; gd.payload[17] = 7;
//Utm Nordwert: 76400 //Utm Nordwert: 76400
//Utm Ostwert : 92000 //Utm Ostwert : 92000
gd.sampleTime(posTime); gd.sampleTime = posTime;
gd.equipmentNumber(1001); gd.equipmentNumber = 1001;
// lon: 0.154997430779329, lat: 0.925671430121431] // lon: 0.154997430779329, lat: 0.925671430121431]
double lon = 0.154997430779329; double lon = 0.154997430779329;
double lat = 0.925671430121431; double lat = 0.925671430121431;
gd.position().lon(lon); gd.position.lon = lon;
gd.position().lat(lat); gd.position.lat = lat;
DEBUG_LOG(m_logger) << "Publishing GeopairingData"; DEBUG_LOG(m_logger) << "Publishing GeopairingData";
if (!m_tabDts->publish(gd)) if (!m_tabDts->publish(gd))
@@ -229,35 +229,35 @@ void CesTestsGeopairing::tryCreateGeopairingDataIGLA()
TrainingAreaBase::GeopairingData gd; TrainingAreaBase::GeopairingData gd;
const qint64 time = QDateTime::currentMSecsSinceEpoch(); const qint64 time = QDateTime::currentMSecsSinceEpoch();
const rti::core::int64 posTime = static_cast<rti::core::int64>(time); const rti::core::int64 posTime = static_cast<rti::core::int64>(time);
gd.payload().resize(18); gd.payload.resize(18);
// Original aus UAE LogViewer Script // Original aus UAE LogViewer Script
gd.payload()[0] = 227; gd.payload[0] = 227;
gd.payload()[1] = 2; gd.payload[1] = 2;
gd.payload()[2] = 28; gd.payload[2] = 28;
gd.payload()[3] = 230; gd.payload[3] = 230;
gd.payload()[4] = 4; gd.payload[4] = 4;
gd.payload()[5] = 159; gd.payload[5] = 159;
gd.payload()[6] = 2; gd.payload[6] = 2;
gd.payload()[7] = 0; gd.payload[7] = 0;
gd.payload()[8] = 0; gd.payload[8] = 0;
gd.payload()[9] = 29; gd.payload[9] = 29;
gd.payload()[10] = 3; gd.payload[10] = 3;
gd.payload()[11] = 0; gd.payload[11] = 0;
gd.payload()[12] = 0; gd.payload[12] = 0;
gd.payload()[13] = 25; gd.payload[13] = 25;
gd.payload()[14] = 0; gd.payload[14] = 0;
gd.payload()[15] = 0; gd.payload[15] = 0;
gd.payload()[16] = 5; gd.payload[16] = 5;
gd.payload()[17] = 7; gd.payload[17] = 7;
gd.sampleTime(posTime); gd.sampleTime = posTime;
gd.equipmentNumber(1001); gd.equipmentNumber = 1001;
double lon = 0.15530364; double lon = 0.15530364;
double lat = 0.92601523; double lat = 0.92601523;
gd.position().lon(lon); gd.position.lon = lon;
gd.position().lat(lat); gd.position.lat = lat;
DEBUG_LOG(m_logger) << "Publishing GeopairingData"; DEBUG_LOG(m_logger) << "Publishing GeopairingData";
if (!m_tabDts->publish(gd)) if (!m_tabDts->publish(gd))
@@ -275,35 +275,35 @@ void CesTestsGeopairing::tryCreateGeopairingDataIGLATarget()
TrainingAreaBase::GeopairingData gd; TrainingAreaBase::GeopairingData gd;
const qint64 time = QDateTime::currentMSecsSinceEpoch(); const qint64 time = QDateTime::currentMSecsSinceEpoch();
const rti::core::int64 posTime = static_cast<rti::core::int64>(time); const rti::core::int64 posTime = static_cast<rti::core::int64>(time);
gd.payload().resize(18); gd.payload.resize(18);
// Original aus UAE LogViewer Script // Original aus UAE LogViewer Script
gd.payload()[0] = 227; gd.payload[0] = 227;
gd.payload()[1] = 3; gd.payload[1] = 3;
gd.payload()[2] = 28; gd.payload[2] = 28;
gd.payload()[3] = 230; gd.payload[3] = 230;
gd.payload()[4] = 4; gd.payload[4] = 4;
gd.payload()[5] = 159; gd.payload[5] = 159;
gd.payload()[6] = 2; gd.payload[6] = 2;
gd.payload()[7] = 0; gd.payload[7] = 0;
gd.payload()[8] = 0; gd.payload[8] = 0;
gd.payload()[9] = 29; gd.payload[9] = 29;
gd.payload()[10] = 3; gd.payload[10] = 3;
gd.payload()[11] = 0; gd.payload[11] = 0;
gd.payload()[12] = 0; gd.payload[12] = 0;
gd.payload()[13] = 25; gd.payload[13] = 25;
gd.payload()[14] = 0; gd.payload[14] = 0;
gd.payload()[15] = 0; gd.payload[15] = 0;
gd.payload()[16] = 5; gd.payload[16] = 5;
gd.payload()[17] = 7; gd.payload[17] = 7;
gd.sampleTime(posTime); gd.sampleTime = posTime;
gd.equipmentNumber(1001); gd.equipmentNumber = 1001;
double lon = 0.15530364; double lon = 0.15530364;
double lat = 0.92601523; double lat = 0.92601523;
gd.position().lon(lon); gd.position.lon = lon;
gd.position().lat(lat); gd.position.lat = lat;
DEBUG_LOG(m_logger) << "Publishing GeopairingData"; DEBUG_LOG(m_logger) << "Publishing GeopairingData";
if (!m_tabDts->publish(gd)) if (!m_tabDts->publish(gd))
@@ -322,34 +322,34 @@ void CesTestsGeopairing::tryCreateGeopairingDataMK19()
TrainingAreaBase::GeopairingData gd; TrainingAreaBase::GeopairingData gd;
const qint64 time = QDateTime::currentMSecsSinceEpoch(); const qint64 time = QDateTime::currentMSecsSinceEpoch();
const rti::core::int64 posTime = static_cast<rti::core::int64>(time); const rti::core::int64 posTime = static_cast<rti::core::int64>(time);
gd.payload().resize(18); gd.payload.resize(18);
gd.payload()[0] = 227; gd.payload[0] = 227;
gd.payload()[1] = 5; gd.payload[1] = 5;
gd.payload()[2] = 28; gd.payload[2] = 28;
gd.payload()[3] = 230; gd.payload[3] = 230;
gd.payload()[4] = 4; gd.payload[4] = 4;
gd.payload()[5] = 159; gd.payload[5] = 159;
gd.payload()[6] = 2; gd.payload[6] = 2;
gd.payload()[7] = 0; gd.payload[7] = 0;
gd.payload()[8] = 0; gd.payload[8] = 0;
gd.payload()[9] = 29; gd.payload[9] = 29;
gd.payload()[10] = 3; gd.payload[10] = 3;
gd.payload()[11] = 0; gd.payload[11] = 0;
gd.payload()[12] = 0; gd.payload[12] = 0;
gd.payload()[13] = 25; gd.payload[13] = 25;
gd.payload()[14] = 0; gd.payload[14] = 0;
gd.payload()[15] = 0; gd.payload[15] = 0;
gd.payload()[16] = 5; gd.payload[16] = 5;
gd.payload()[17] = 7; gd.payload[17] = 7;
gd.sampleTime(posTime); gd.sampleTime = posTime;
gd.equipmentNumber(1001); gd.equipmentNumber = 1001;
double lon = 0.15488; double lon = 0.15488;
double lat = 0.925742; double lat = 0.925742;
gd.position().lon(lon); gd.position.lon = lon;
gd.position().lat(lat); gd.position.lat = lat;
DEBUG_LOG(m_logger) << "Publishing GeopairingData"; DEBUG_LOG(m_logger) << "Publishing GeopairingData";
if (!m_tabDts->publish(gd)) if (!m_tabDts->publish(gd))
@@ -373,10 +373,10 @@ void CesTestsGeopairing::checkGeopairing()
QMap < int ,AreaEffectSimulation::ExplosionSingle> explosionSingles = m_aesDtc->explosionSingles(); QMap < int ,AreaEffectSimulation::ExplosionSingle> explosionSingles = m_aesDtc->explosionSingles();
INFO_LOG(m_logger) << "explosionSingles.size()" << explosionSingles.size(); INFO_LOG(m_logger) << "explosionSingles.size()" << explosionSingles.size();
AreaEffectSimulation::ExplosionSingle explosionSingle = explosionSingles.last(); AreaEffectSimulation::ExplosionSingle explosionSingle = explosionSingles.last();
DEBUG_LOG(m_logger) << "explosionSingle.lat=" << explosionSingle.impactPosition().lat() DEBUG_LOG(m_logger) << "explosionSingle.lat=" << explosionSingle.impactPosition.lat
<< " lon=" << explosionSingle.impactPosition().lon(); << " lon=" << explosionSingle.impactPosition.lon;
if ( (explosionSingle.impactPosition().lat() > 0.9 && explosionSingle.impactPosition().lat() < 1.0) if ( (explosionSingle.impactPosition.lat > 0.9 && explosionSingle.impactPosition.lat < 1.0)
&& (explosionSingle.impactPosition().lon() > 0.1 && explosionSingle.impactPosition().lon() < 0.2)) && (explosionSingle.impactPosition.lon > 0.1 && explosionSingle.impactPosition.lon < 0.2))
{ {
ExitSuccess(); ExitSuccess();
return; return;
@@ -217,11 +217,11 @@ void CesTestsMineAreas::tryCreateDynamicParticipantData()
const qint64 time = QDateTime::currentMSecsSinceEpoch(); const qint64 time = QDateTime::currentMSecsSinceEpoch();
const rti::core::int64 esTime = static_cast<rti::core::int64>(time); const rti::core::int64 esTime = static_cast<rti::core::int64>(time);
ParticipantManagement::StateInformation si; ParticipantManagement::StateInformation si;
si.stateTime(esTime); si.stateTime = esTime;
si.vulnerabilityState(ProjectDataManagement::VulnerabilityState_def::CatastrophicKill); si.vulnerabilityState = ProjectDataManagement::VulnerabilityState::VulnerabilityState_CatastrophicKill;
dp.participantId(m_participants[m_DynamicParticipantIndex].participantId); dp.participantId = m_participants[m_DynamicParticipantIndex].participantId;
dp.stateHistory().push_back(si); dp.stateHistory.push_back(si);
dp.sampleTime(esTime); dp.sampleTime = esTime;
m_DynamicParticipantIndex++; m_DynamicParticipantIndex++;
DEBUG_LOG(m_logger) << "Publishing DynamicParticipantData"; DEBUG_LOG(m_logger) << "Publishing DynamicParticipantData";
@@ -242,14 +242,14 @@ void CesTestsMineAreas::tryCreateParticipantPosition()
QPointF posF = m_refPos.geographic(m_participants[m_participantIndex].relX, QPointF posF = m_refPos.geographic(m_participants[m_participantIndex].relX,
m_participants[m_participantIndex].relY); m_participants[m_participantIndex].relY);
const Core::GeoPosition pos(Core::GeoPosition(posF.x(), posF.y(), 0)); const Core::GeoPosition pos(Core::GeoPosition(posF.x(), posF.y(), 0));
pp.buildingId(m_participants[m_participantIndex].buildingId); pp.buildingId = m_participants[m_participantIndex].buildingId;
pp.participantId(m_participants[m_participantIndex].participantId); pp.participantId = m_participants[m_participantIndex].participantId;
pp.participantTypeId(m_participants[m_participantIndex].participantTypeId); pp.participantTypeId = m_participants[m_participantIndex].participantTypeId;
pp.partyId(m_participants[m_participantIndex].partyId); pp.partyId = m_participants[m_participantIndex].partyId;
pp.roomId(m_participants[m_participantIndex].roomId); pp.roomId = m_participants[m_participantIndex].roomId;
m_participantIndex++; m_participantIndex++;
pp.sampleTime(posTime); pp.sampleTime = posTime;
pp.pos(pos); pp.pos = pos;
DEBUG_LOG(m_logger) << "Publishing ParticipantPosition"; DEBUG_LOG(m_logger) << "Publishing ParticipantPosition";
if (!m_ppmDts->publish(pp)) if (!m_ppmDts->publish(pp))
@@ -265,8 +265,8 @@ void CesTestsMineAreas::tryCreateParticipantPosition()
void CesTestsMineAreas::tryCreateParticipant() void CesTestsMineAreas::tryCreateParticipant()
{ {
ParticipantManagement::Participant pt; ParticipantManagement::Participant pt;
pt.id(m_id); pt.id = m_id;
pt.equipmentNumber(m_equipmentNumber); pt.equipmentNumber = m_equipmentNumber;
DEBUG_LOG(m_logger) << "Publishing Participant"; DEBUG_LOG(m_logger) << "Publishing Participant";
if (!m_ppmDts->publish(pt)) if (!m_ppmDts->publish(pt))
@@ -306,11 +306,11 @@ void CesTestsMineAreas::checkParticipantEvent()
void CesTestsMineAreas::tryCreateTypeVehicle() void CesTestsMineAreas::tryCreateTypeVehicle()
{ {
ParticipantManagement::Type ty; ParticipantManagement::Type ty;
ty.id(35); ty.id = 35;
ty.typeClass(ParticipantManagement::TypeClass::inner_enum::GroundVehicle); ty.typeClass = ParticipantManagement::TypeClass::GroundVehicle;
ty.equipmentTypeId(35); ty.equipmentTypeId = 35;
ty.symbol("1001"); ty.symbol = "1001";
ty.name("HMMWV Utility"); ty.name = "HMMWV Utility";
DEBUG_LOG(m_logger) << "Publishing Type"; DEBUG_LOG(m_logger) << "Publishing Type";
@@ -327,11 +327,11 @@ void CesTestsMineAreas::tryCreateTypeVehicle()
void CesTestsMineAreas::tryCreateTypeSoldier() void CesTestsMineAreas::tryCreateTypeSoldier()
{ {
ParticipantManagement::Type ty; ParticipantManagement::Type ty;
ty.id(11); ty.id = 11;
ty.typeClass(ParticipantManagement::TypeClass::inner_enum::Human); ty.typeClass = ParticipantManagement::TypeClass::Human;
ty.equipmentTypeId(30); ty.equipmentTypeId = 30;
ty.symbol("1001"); ty.symbol = "1001";
ty.name("Soldier"); ty.name = "Soldier";
DEBUG_LOG(m_logger) << "Publishing Type"; DEBUG_LOG(m_logger) << "Publishing Type";
@@ -351,25 +351,25 @@ void CesTestsMineAreas::tryCreateAesItemViewMineArea()
INFO_LOG(m_logger) << "trying to send AesItemView AtExplosionAreaSingleExplosions"; INFO_LOG(m_logger) << "trying to send AesItemView AtExplosionAreaSingleExplosions";
AreaEffectSimulation::AesItemView iv; AreaEffectSimulation::AesItemView iv;
iv.effectStateId(AreaEffectSimulation::AesEffectState_def::EsActivated); iv.effectStateId = AreaEffectSimulation::AesEffectState::EsActivated;
iv.aesItemId(m_aesItemId); iv.aesItemId = m_aesItemId;
iv.id(m_aesItemId); iv.id = m_aesItemId;
iv.aesTypeId(AreaEffectSimulation::AesType::AtMineArea); iv.aesTypeId = AreaEffectSimulation::AesType::AtMineArea;
iv.partyId(5); iv.partyId = 5;
QPointF bl = m_refPos.geographic(-10, -10); QPointF bl = m_refPos.geographic(-10, -10);
QPointF tr = m_refPos.geographic(30, 30); QPointF tr = m_refPos.geographic(30, 30);
iv.boundingBoxBottomLeft(Core::GeoPosition2D(bl.x(), bl.y())); iv.boundingBoxBottomLeft = Core::GeoPosition2D(bl.x(), bl.y());
iv.boundingBoxTopRight(Core::GeoPosition2D(tr.x(), tr.y())); iv.boundingBoxTopRight = Core::GeoPosition2D(tr.x(), tr.y());
iv.chargeStruct().chargeTypeId(m_chargeTypeId); iv.chargeStruct.chargeTypeId = m_chargeTypeId;
iv.sampleTime(QDateTime::currentMSecsSinceEpoch()); iv.sampleTime = QDateTime::currentMSecsSinceEpoch();
iv.effectStart ( QDateTime::currentMSecsSinceEpoch() + 2000); iv.effectStart = QDateTime::currentMSecsSinceEpoch() + 2000;
setPos(iv.form(), m_refPos.geographic(-10, -10)); setPos(iv.form, m_refPos.geographic(-10, -10));
setPos(iv.form(), m_refPos.geographic(-10, 30)); setPos(iv.form, m_refPos.geographic(-10, 30));
setPos(iv.form(), m_refPos.geographic( 10, 30)); setPos(iv.form, m_refPos.geographic( 10, 30));
setPos(iv.form(), m_refPos.geographic( 10, -10)); setPos(iv.form, m_refPos.geographic( 10, -10));
DEBUG_LOG(m_logger) << "Publishing AesItemView"; DEBUG_LOG(m_logger) << "Publishing AesItemView";
if (!m_aesDts->publish(iv)) if (!m_aesDts->publish(iv))
@@ -383,8 +383,8 @@ void CesTestsMineAreas::tryCreateChargeType()
{ {
DEBUG_LOG(m_logger) << "Publishing ChargeType"; DEBUG_LOG(m_logger) << "Publishing ChargeType";
ProjectDataManagement::ChargeType ct; ProjectDataManagement::ChargeType ct;
ct.id(m_chargeTypeId); ct.id = m_chargeTypeId;
ct.properties("{\"impactRadius\":25,\"impactEdgeLength\":50,\"isSmart\":true,\"searchRadius\":150}"); ct.properties = "{\"impactRadius\":25,\"impactEdgeLength\":50,\"isSmart\":true,\"searchRadius\":150}";
if (!m_pdmDts->publish(ct)) if (!m_pdmDts->publish(ct))
{ {
ERROR_LOG(m_logger) << "Error publish ChargeType"; ERROR_LOG(m_logger) << "Error publish ChargeType";
@@ -394,12 +394,12 @@ void CesTestsMineAreas::tryCreateChargeType()
void CesTestsMineAreas::onEventChanged(const CentralEffectSimulation::ParticipantEvent &eventData, DataModification modType) void CesTestsMineAreas::onEventChanged(const CentralEffectSimulation::ParticipantEvent &eventData, DataModification modType)
{ {
DEBUG_LOG(m_logger) << "onParticipantEventChanged participantId=" << eventData.participantId() DEBUG_LOG(m_logger) << "onParticipantEventChanged participantId=" << eventData.participantId
<< " eventType=" << eventData.eventTypeId(); << " eventType=" << eventData.eventTypeId;
if (modType == DataModification::eRemoved || if (modType == DataModification::eRemoved ||
modType == DataModification::eModified) modType == DataModification::eModified)
return; return;
if (eventData.eventTypeId() == ProjectDataManagement::PdmEventType_def::HitGasPipe) if (eventData.eventTypeId == ProjectDataManagement::PdmEventType::HitGasPipe)
{ {
m_countEventMineAreas ++; m_countEventMineAreas ++;
DEBUG_LOG(m_logger) << "m_countEventMineAreas=" << m_countEventMineAreas; DEBUG_LOG(m_logger) << "m_countEventMineAreas=" << m_countEventMineAreas;
@@ -184,11 +184,11 @@ void CesTestsOwnership::tryCreateDynamicParticipantData()
const qint64 time = QDateTime::currentMSecsSinceEpoch(); const qint64 time = QDateTime::currentMSecsSinceEpoch();
const rti::core::int64 esTime = static_cast<rti::core::int64>(time); const rti::core::int64 esTime = static_cast<rti::core::int64>(time);
ParticipantManagement::StateInformation si; ParticipantManagement::StateInformation si;
si.stateTime(esTime); si.stateTime = esTime;
si.vulnerabilityState(ProjectDataManagement::VulnerabilityState_def::CatastrophicKill); si.vulnerabilityState = ProjectDataManagement::VulnerabilityState::VulnerabilityState_CatastrophicKill;
dp.participantId(m_participants[m_DynamicParticipantIndex].participantId); dp.participantId = m_participants[m_DynamicParticipantIndex].participantId;
dp.stateHistory().push_back(si); dp.stateHistory.push_back(si);
dp.sampleTime(esTime); dp.sampleTime = esTime;
m_DynamicParticipantIndex++; m_DynamicParticipantIndex++;
DEBUG_LOG(m_logger) << "Publishing DynamicParticipantData"; DEBUG_LOG(m_logger) << "Publishing DynamicParticipantData";
@@ -209,13 +209,13 @@ void CesTestsOwnership::tryCreateParticipantPosition()
QPointF posF = m_housePos.geographic(m_participants[m_participantIndex].relX, QPointF posF = m_housePos.geographic(m_participants[m_participantIndex].relX,
m_participants[m_participantIndex].relY); m_participants[m_participantIndex].relY);
const Core::GeoPosition pos(Core::GeoPosition(posF.x(), posF.y(), 0)); const Core::GeoPosition pos(Core::GeoPosition(posF.x(), posF.y(), 0));
pp.buildingId(m_participants[m_participantIndex].buildingId); pp.buildingId = m_participants[m_participantIndex].buildingId;
pp.participantId(m_participants[m_participantIndex].participantId); pp.participantId = m_participants[m_participantIndex].participantId;
pp.partyId(m_participants[m_participantIndex].partyId); pp.partyId = m_participants[m_participantIndex].partyId;
pp.roomId(m_participants[m_participantIndex].roomId); pp.roomId = m_participants[m_participantIndex].roomId;
m_participantIndex++; m_participantIndex++;
pp.sampleTime(posTime); pp.sampleTime = posTime;
pp.pos(pos); pp.pos = pos;
DEBUG_LOG(m_logger) << "Publishing ParticipantPosition"; DEBUG_LOG(m_logger) << "Publishing ParticipantPosition";
if (!m_ppmDts->publish(pp)) if (!m_ppmDts->publish(pp))
@@ -231,8 +231,8 @@ void CesTestsOwnership::tryCreateParticipantPosition()
void CesTestsOwnership::tryCreateParticipant() void CesTestsOwnership::tryCreateParticipant()
{ {
ParticipantManagement::Participant pt; ParticipantManagement::Participant pt;
pt.id(m_participants[m_participantIndex].participantId); pt.id = m_participants[m_participantIndex].participantId;
pt.equipmentNumber(m_participants[m_participantIndex].equipmentNumber); pt.equipmentNumber = m_participants[m_participantIndex].equipmentNumber;
DEBUG_LOG(m_logger) << "Publishing Participant"; DEBUG_LOG(m_logger) << "Publishing Participant";
if (!m_ppmDts->publish(pt)) if (!m_ppmDts->publish(pt))
@@ -101,17 +101,17 @@ void cesTestsSimulatedMovement::checkParticipantEvent()
m_cesDtc->waitForHistoricalDataParticipantEvent(); m_cesDtc->waitForHistoricalDataParticipantEvent();
CentralEffectSimulation::ParticipantEvent participantEvent0 = m_cesDtc->participantEvent(0); CentralEffectSimulation::ParticipantEvent participantEvent0 = m_cesDtc->participantEvent(0);
CentralEffectSimulation::ParticipantEvent participantEvent1 = m_cesDtc->participantEvent(1); CentralEffectSimulation::ParticipantEvent participantEvent1 = m_cesDtc->participantEvent(1);
INFO_LOG(m_logger) << "Recived ParicipantEvent equipmentNumber:" << participantEvent0.equipmentNumber() INFO_LOG(m_logger) << "Recived ParicipantEvent equipmentNumber:" << participantEvent0.equipmentNumber
<< " eventType=" << participantEvent0.eventTypeId(); << " eventType=" << participantEvent0.eventTypeId;
INFO_LOG(m_logger) << "Recived ParicipantEvent equipmentNumber:" << participantEvent1.equipmentNumber() INFO_LOG(m_logger) << "Recived ParicipantEvent equipmentNumber:" << participantEvent1.equipmentNumber
<< " eventType=" << participantEvent1.eventTypeId(); << " eventType=" << participantEvent1.eventTypeId;
switch (m_testId) switch (m_testId)
{ {
case 1: case 1:
case 2: case 2:
if (participantEvent0.eventTypeId() == ProjectDataManagement::PdmEventType::HitEffectSimulation if (participantEvent0.eventTypeId == ProjectDataManagement::PdmEventType::EventType_HitEffectSimulation
&& participantEvent1.eventTypeId() == ProjectDataManagement::PdmEventType::HitEffectSimulation) && participantEvent1.eventTypeId == ProjectDataManagement::PdmEventType::EventType_HitEffectSimulation)
ExitSuccess(); ExitSuccess();
break; break;
default: default:
@@ -148,23 +148,23 @@ void cesTestsSimulatedMovement::trySimulatedMovementModifyRequest()
QPointF posF2 = m_housePos.geographic(5, 5); QPointF posF2 = m_housePos.geographic(5, 5);
const Core::GeoPosition2D pos2(Core::GeoPosition2D(posF2.x(), posF2.y())); const Core::GeoPosition2D pos2(Core::GeoPosition2D(posF2.x(), posF2.y()));
seg0.delay(5); seg0.delay = 5;
seg0.name("seg0"); seg0.name = "seg0";
seg0.speed(1.1); seg0.speed = 1.1;
//m_speed += 1.0; //m_speed += 1.0;
seg0.position(pos0); seg0.position = pos0;
CentralEffectSimulation::SimulatedMovementSegment seg1; CentralEffectSimulation::SimulatedMovementSegment seg1;
seg1.delay(5); seg1.delay = 5;
seg1.name("seg1"); seg1.name = "seg1";
seg1.speed(1.2); seg1.speed = 1.2;
//m_speed += 1.0; //m_speed += 1.0;
seg1.position(pos1); seg1.position = pos1;
CentralEffectSimulation::SimulatedMovementSegment seg2; CentralEffectSimulation::SimulatedMovementSegment seg2;
seg2.delay(6); seg2.delay = 6;
seg2.name("seg2"); seg2.name = "seg2";
seg2.speed(1.3); seg2.speed = 1.3;
//m_speed += 1.0; //m_speed += 1.0;
seg2.position(pos2); seg2.position = pos2;
std::vector<CentralEffectSimulation::SimulatedMovementSegment> segments; std::vector<CentralEffectSimulation::SimulatedMovementSegment> segments;
segments.push_back(seg0); segments.push_back(seg0);
@@ -172,14 +172,14 @@ void cesTestsSimulatedMovement::trySimulatedMovementModifyRequest()
//segments[2] = seg2; //segments[2] = seg2;
SimulatedMovementModifyRequest req; SimulatedMovementModifyRequest req;
req.id(id); req.id = id;
req.name(name); req.name = name;
req.startTime(startTime); req.startTime = startTime;
req.participantId(participantId); req.participantId = participantId;
req.segments(segments); req.segments = segments;
req.repeat(repeat); req.repeat = repeat;
req.jumpToStart(jumpToStart); req.jumpToStart = jumpToStart;
req.nextPoint(nextPoint); req.nextPoint = nextPoint;
if (!m_cesFtc->simulatedMovementModifyRequest(req, this)) if (!m_cesFtc->simulatedMovementModifyRequest(req, this))
{ {
@@ -208,8 +208,8 @@ void cesTestsSimulatedMovement::trySimulatedMovementRemoveRequest()
void cesTestsSimulatedMovement::tryCreateParticipant() void cesTestsSimulatedMovement::tryCreateParticipant()
{ {
ParticipantManagement::Participant pt; ParticipantManagement::Participant pt;
pt.id(m_participantId); pt.id = m_participantId;
pt.partyId(5); pt.partyId = 5;
DEBUG_LOG(m_logger) << "Publishing Participant"; DEBUG_LOG(m_logger) << "Publishing Participant";
if (!m_ppmDts->publish(pt)) if (!m_ppmDts->publish(pt))
@@ -179,11 +179,11 @@ void CesTestsSmart::tryCreateDynamicParticipantData()
const qint64 time = QDateTime::currentMSecsSinceEpoch(); const qint64 time = QDateTime::currentMSecsSinceEpoch();
const rti::core::int64 esTime = static_cast<rti::core::int64>(time); const rti::core::int64 esTime = static_cast<rti::core::int64>(time);
ParticipantManagement::StateInformation si; ParticipantManagement::StateInformation si;
si.stateTime(esTime); si.stateTime = esTime;
si.vulnerabilityState(ProjectDataManagement::VulnerabilityState_def::CatastrophicKill); si.vulnerabilityState = ProjectDataManagement::VulnerabilityState::VulnerabilityState_CatastrophicKill;
dp.participantId(m_participants[m_DynamicParticipantIndex].participantId); dp.participantId = m_participants[m_DynamicParticipantIndex].participantId;
dp.stateHistory().push_back(si); dp.stateHistory.push_back(si);
dp.sampleTime(esTime); dp.sampleTime = esTime;
m_DynamicParticipantIndex++; m_DynamicParticipantIndex++;
DEBUG_LOG(m_logger) << "Publishing DynamicParticipantData"; DEBUG_LOG(m_logger) << "Publishing DynamicParticipantData";
@@ -204,14 +204,14 @@ void CesTestsSmart::tryCreateParticipantPosition()
QPointF posF = m_housePos.geographic(m_participants[m_participantIndex].relX, QPointF posF = m_housePos.geographic(m_participants[m_participantIndex].relX,
m_participants[m_participantIndex].relY); m_participants[m_participantIndex].relY);
const Core::GeoPosition pos(Core::GeoPosition(posF.x(), posF.y(), 0)); const Core::GeoPosition pos(Core::GeoPosition(posF.x(), posF.y(), 0));
pp.buildingId(m_participants[m_participantIndex].buildingId); pp.buildingId = m_participants[m_participantIndex].buildingId;
pp.participantId(m_participants[m_participantIndex].participantId); pp.participantId = m_participants[m_participantIndex].participantId;
pp.participantTypeId(m_participants[m_participantIndex].participantTypeId); pp.participantTypeId = m_participants[m_participantIndex].participantTypeId;
pp.partyId(m_participants[m_participantIndex].partyId); pp.partyId = m_participants[m_participantIndex].partyId;
pp.roomId(m_participants[m_participantIndex].roomId); pp.roomId = m_participants[m_participantIndex].roomId;
m_participantIndex++; m_participantIndex++;
pp.sampleTime(posTime); pp.sampleTime = posTime;
pp.pos(pos); pp.pos = pos;
DEBUG_LOG(m_logger) << "Publishing ParticipantPosition"; DEBUG_LOG(m_logger) << "Publishing ParticipantPosition";
if (!m_ppmDts->publish(pp)) if (!m_ppmDts->publish(pp))
@@ -227,8 +227,8 @@ void CesTestsSmart::tryCreateParticipantPosition()
void CesTestsSmart::tryCreateParticipant() void CesTestsSmart::tryCreateParticipant()
{ {
ParticipantManagement::Participant pt; ParticipantManagement::Participant pt;
pt.id(21); pt.id = 21;
pt.equipmentNumber(61); pt.equipmentNumber = 61;
DEBUG_LOG(m_logger) << "Publishing Participant"; DEBUG_LOG(m_logger) << "Publishing Participant";
if (!m_ppmDts->publish(pt)) if (!m_ppmDts->publish(pt))
@@ -248,15 +248,15 @@ void CesTestsSmart::checkParticipantEvent()
for ( int i = 0; i < m_cesDtc->participantEvents().size(); i++) for ( int i = 0; i < m_cesDtc->participantEvents().size(); i++)
{ {
CentralEffectSimulation::ParticipantEvent participantEvent = m_cesDtc->participantEvent(i); CentralEffectSimulation::ParticipantEvent participantEvent = m_cesDtc->participantEvent(i);
INFO_LOG(m_logger) << "Recived ParicipantEvent equipmentNumber:"<<participantEvent.equipmentNumber() INFO_LOG(m_logger) << "Recived ParicipantEvent equipmentNumber:"<<participantEvent.equipmentNumber
<< " eventType="<<participantEvent.eventTypeId(); << " eventType="<<participantEvent.eventTypeId;
} }
switch (m_testId) switch (m_testId)
{ {
case 1: case 1:
if ( participantEvent0.eventTypeId()==ProjectDataManagement::PdmEventType::HitEffectSimulation if ( participantEvent0.eventTypeId==ProjectDataManagement::PdmEventType::EventType_HitEffectSimulation
&& participantEvent1.eventTypeId()==ProjectDataManagement::PdmEventType::HitEffectSimulation) && participantEvent1.eventTypeId==ProjectDataManagement::PdmEventType::EventType_HitEffectSimulation)
{ {
ExitSuccess(); ExitSuccess();
} }
@@ -277,11 +277,11 @@ void CesTestsSmart::checkParticipantEvent()
void CesTestsSmart::tryCreateTypeVehicle() void CesTestsSmart::tryCreateTypeVehicle()
{ {
ParticipantManagement::Type ty; ParticipantManagement::Type ty;
ty.id(35); ty.id = 35;
ty.typeClass(ParticipantManagement::TypeClass::inner_enum::GroundVehicle); ty.typeClass = ParticipantManagement::TypeClass::GroundVehicle;
ty.equipmentTypeId(35); ty.equipmentTypeId = 35;
ty.symbol("1001"); ty.symbol = "1001";
ty.name("HMMWV Utility"); ty.name = "HMMWV Utility";
DEBUG_LOG(m_logger) << "Publishing Type"; DEBUG_LOG(m_logger) << "Publishing Type";
@@ -298,11 +298,11 @@ void CesTestsSmart::tryCreateTypeVehicle()
void CesTestsSmart::tryCreateTypeSoldier() void CesTestsSmart::tryCreateTypeSoldier()
{ {
ParticipantManagement::Type ty; ParticipantManagement::Type ty;
ty.id(11); ty.id = 11;
ty.typeClass(ParticipantManagement::TypeClass::inner_enum::Human); ty.typeClass = ParticipantManagement::TypeClass::Human;
ty.equipmentTypeId(30); ty.equipmentTypeId = 30;
ty.symbol("1001"); ty.symbol = "1001";
ty.name("Soldier"); ty.name = "Soldier";
DEBUG_LOG(m_logger) << "Publishing Type"; DEBUG_LOG(m_logger) << "Publishing Type";
@@ -322,27 +322,27 @@ void CesTestsSmart::tryCreateAesItemViewSingleExplosion()
INFO_LOG(m_logger) << "trying to send AesItemView AtExplosionAreaSingleExplosions"; INFO_LOG(m_logger) << "trying to send AesItemView AtExplosionAreaSingleExplosions";
AreaEffectSimulation::AesItemView iv; AreaEffectSimulation::AesItemView iv;
iv.effectStateId(AreaEffectSimulation::AesEffectState_def::EsActivated); iv.effectStateId = AreaEffectSimulation::AesEffectState::EsActivated;
iv.aesItemId(m_aesItemId); iv.aesItemId = m_aesItemId;
iv.id(m_aesItemId); iv.id = m_aesItemId;
iv.aesTypeId(AreaEffectSimulation::AesType::AtExplosionAreaSingleExplosions); iv.aesTypeId = AreaEffectSimulation::AesType::AtExplosionAreaSingleExplosions;
iv.partyId(5); iv.partyId = 5;
QPointF bl = m_housePos.geographic(-10, -10); QPointF bl = m_housePos.geographic(-10, -10);
QPointF tr = m_housePos.geographic(30, 30); QPointF tr = m_housePos.geographic(30, 30);
iv.boundingBoxBottomLeft(Core::GeoPosition2D(bl.x(), bl.y())); iv.boundingBoxBottomLeft = Core::GeoPosition2D(bl.x(), bl.y());
iv.boundingBoxTopRight(Core::GeoPosition2D(tr.x(), tr.y())); iv.boundingBoxTopRight = Core::GeoPosition2D(tr.x(), tr.y());
iv.chargeStruct().chargeTypeId(m_chargeTypeId); iv.chargeStruct.chargeTypeId = m_chargeTypeId;
iv.sampleTime(QDateTime::currentMSecsSinceEpoch()); iv.sampleTime = QDateTime::currentMSecsSinceEpoch();
iv.effectStart ( QDateTime::currentMSecsSinceEpoch() + 2000); iv.effectStart = QDateTime::currentMSecsSinceEpoch() + 2000;
setPos(iv.form(), m_housePos.geographic(-10, -10)); setPos(iv.form, m_housePos.geographic(-10, -10));
setPos(iv.form(), m_housePos.geographic(0, 0)); setPos(iv.form, m_housePos.geographic(0, 0));
setPos(iv.form(), m_housePos.geographic(5, 5)); setPos(iv.form, m_housePos.geographic(5, 5));
setPos(iv.form(), m_housePos.geographic(-10, 10)); setPos(iv.form, m_housePos.geographic(-10, 10));
setPos(iv.form(), m_housePos.geographic(-10, 20)); setPos(iv.form, m_housePos.geographic(-10, 20));
setPos(iv.form(), m_housePos.geographic(-10, 30)); setPos(iv.form, m_housePos.geographic(-10, 30));
DEBUG_LOG(m_logger) << "Publishing AesItemView"; DEBUG_LOG(m_logger) << "Publishing AesItemView";
if (!m_aesDts->publish(iv)) if (!m_aesDts->publish(iv))
@@ -356,8 +356,8 @@ void CesTestsSmart::tryCreateChargeType()
{ {
DEBUG_LOG(m_logger) << "Publishing ChargeType"; DEBUG_LOG(m_logger) << "Publishing ChargeType";
ProjectDataManagement::ChargeType ct; ProjectDataManagement::ChargeType ct;
ct.id(m_chargeTypeId); ct.id = m_chargeTypeId;
ct.properties("{\"impactRadius\":25,\"impactEdgeLength\":50,\"isSmart\":true,\"searchRadius\":150}"); ct.properties = "{\"impactRadius\":25,\"impactEdgeLength\":50,\"isSmart\":true,\"searchRadius\":150}";
if (!m_pdmDts->publish(ct)) if (!m_pdmDts->publish(ct))
{ {
ERROR_LOG(m_logger) << "Error publish ChargeType"; ERROR_LOG(m_logger) << "Error publish ChargeType";
@@ -372,16 +372,16 @@ void CesTestsSmart::tryCreatePrepareExplosionSingle()
const qint64 time = QDateTime::currentMSecsSinceEpoch(); const qint64 time = QDateTime::currentMSecsSinceEpoch();
const rti::core::int64 esTime = static_cast<rti::core::int64>(time); const rti::core::int64 esTime = static_cast<rti::core::int64>(time);
es.id(m_aesItemId); es.id = m_aesItemId;
es.participantId(m_originatorParticipantId); // In ddsview <not set> es.participantId = m_originatorParticipantId; // In ddsview <not set>
es.effectStateId(AreaEffectSimulation::AesEffectState_def::EsPrepared); es.effectStateId = AreaEffectSimulation::AesEffectState::EsPrepared;
es.name("Smart tryCreatePrepareExplosionSingle"); es.name = "Smart tryCreatePrepareExplosionSingle";
es.impactPosition(Core::GeoPosition2D(m_explosionSingle.x(), m_explosionSingle.y())); es.impactPosition = Core::GeoPosition2D(m_explosionSingle.x(), m_explosionSingle.y());
es.sampleTime(esTime); es.sampleTime = esTime;
es.chargeStruct().chargeTypeId(m_chargeTypeId); es.chargeStruct.chargeTypeId = m_chargeTypeId;
es.isCentral(true); es.isCentral = true;
es.effectStart ( QDateTime::currentMSecsSinceEpoch() + 2000); es.effectStart = QDateTime::currentMSecsSinceEpoch() + 2000;
DEBUG_LOG(m_logger) << "Publishing ExplosionSingle"; DEBUG_LOG(m_logger) << "Publishing ExplosionSingle";
if (!m_aesDts->publish(es)) if (!m_aesDts->publish(es))
@@ -398,18 +398,18 @@ void CesTestsSmart::tryCreateExplosionSingle()
const qint64 time = QDateTime::currentMSecsSinceEpoch(); const qint64 time = QDateTime::currentMSecsSinceEpoch();
const rti::core::int64 esTime = static_cast<rti::core::int64>(time); const rti::core::int64 esTime = static_cast<rti::core::int64>(time);
es.id(m_aesItemId); es.id = m_aesItemId;
es.name("Smart tryCreateExplosionSingle"); es.name = "Smart tryCreateExplosionSingle";
es.participantId(m_originatorParticipantId); // In ddsview <not set> es.participantId = m_originatorParticipantId; // In ddsview <not set>
es.effectStateId(AreaEffectSimulation::AesEffectState_def::EsActivated); es.effectStateId = AreaEffectSimulation::AesEffectState::EsActivated;
es.effectStart ( QDateTime::currentMSecsSinceEpoch() + 2000); es.effectStart = QDateTime::currentMSecsSinceEpoch() + 2000;
es.isCentral(true); es.isCentral = true;
es.impactPosition(Core::GeoPosition2D(m_explosionSingle.x(), m_explosionSingle.y())); es.impactPosition = Core::GeoPosition2D(m_explosionSingle.x(), m_explosionSingle.y());
es.sampleTime(esTime); es.sampleTime = esTime;
es.chargeStruct().chargeTypeId(m_chargeTypeId); es.chargeStruct.chargeTypeId = m_chargeTypeId;
DEBUG_LOG(m_logger) << "Publishing ExplosionSingle"; DEBUG_LOG(m_logger) << "Publishing ExplosionSingle";
if (!m_aesDts->publish(es)) if (!m_aesDts->publish(es))
@@ -430,20 +430,20 @@ void CesTestsSmart::onSendCesHitRequest(const rti::core::SampleIdentity &cookie,
const TrainingAreaBase::SendCesHitRequest &request) const TrainingAreaBase::SendCesHitRequest &request)
{ {
// debug und co // debug und co
qint64 msecs = (qint64) request.effectTime(); qint64 msecs = (qint64) request.effectTime;
QDateTime dateTime; QDateTime dateTime;
dateTime.setMSecsSinceEpoch(msecs); dateTime.setMSecsSinceEpoch(msecs);
DEBUG_LOG(m_logger) << "onSendCesHitRequest" << "\n" DEBUG_LOG(m_logger) << "onSendCesHitRequest" << "\n"
<< " request.aesId() = " << request.aesId() << "\n" << " request.aesId() = " << request.aesId << "\n"
<< " request.chargeTypeId() = " << request.chargeTypeId() << "\n" << " request.chargeTypeId() = " << request.chargeTypeId << "\n"
<< " request.equipmentNumber() = " << request.equipmentNumber() << "\n" << " request.equipmentNumber() = " << request.equipmentNumber << "\n"
<< " request.originatorEquipmentNumber() = " << request.originatorEquipmentNumber() << "\n" << " request.originatorEquipmentNumber() = " << request.originatorEquipmentNumber << "\n"
<< " request.originatorPosition() = " << request.position() << "\n" << " request.originatorPosition() = " << request.position << "\n"
<< " request.effectTime()= " << request.effectTime() << " " << " request.effectTime()= " << request.effectTime << " "
<< dateTime.toString(QStringLiteral("dd.MM.yy - hh:mm:ss.zzz")) << "\n" << dateTime.toString(QStringLiteral("dd.MM.yy - hh:mm:ss.zzz")) << "\n"
<< " request.remainEffectPercent() = " << request.remainEffectPercent(); << " request.remainEffectPercent() = " << request.remainEffectPercent;
m_tabFts->sendCesHitReply(cookie, Core::FunctionReplyObject(request.equipmentNumber())); m_tabFts->sendCesHitReply(cookie, Core::FunctionReplyObject(request.equipmentNumber));
ExitSuccess(); ExitSuccess();
} }
@@ -198,7 +198,7 @@ void HandlerParticipantBorderline::sendParticipantEvent(const BorderlineUtm &bor
HandlerParticipantBorderline::BorderlineUtm::BorderlineUtm(const AreaEffectSimulation::Borderline &bl) HandlerParticipantBorderline::BorderlineUtm::BorderlineUtm(const AreaEffectSimulation::Borderline &bl)
: id(bl.id()) : id(bl.id())
, operatorId(bl.operatorId()) , operatorId(bl.operatorId())
, partyId(bl.partyId().is_set() ? bl.partyId().get() : -1) , partyId(bl.partyId.is_set() ? bl.partyId.get() : -1)
, name(QString::fromStdString(bl.name())) , name(QString::fromStdString(bl.name()))
{ {
points.reserve(bl.segments().size()); points.reserve(bl.segments().size());
@@ -108,10 +108,10 @@ void HandlerAesData::onBoobyTrapChanged(const AreaEffectSimulation::BoobyTrap &d
<< " data.id=" << data.id() << " data.id=" << data.id()
<< " effectStateId=" << data.effectStateId(); << " effectStateId=" << data.effectStateId();
if (!data.effectStart().is_set()) if (!data.effectStart.is_set())
return; return;
if ((m_ddsHandler->currentPartitionTime() - (data.effectStart().get() + data.effectDuration())) > 2000) if ((m_ddsHandler->currentPartitionTime() - (data.effectStart.get() + data.effectDuration())) > 2000)
{ {
INFO_LOG(m_logger) << "onBoobyTrap outdated"; INFO_LOG(m_logger) << "onBoobyTrap outdated";
return; return;
@@ -154,17 +154,17 @@ void HandlerAesData::onAesItemViewChanged(const AreaEffectSimulation::AesItemVie
{ {
DEBUG_LOG(m_logger) << "AtOffRouteMineSecondary id=" << data.id() / 1000; DEBUG_LOG(m_logger) << "AtOffRouteMineSecondary id=" << data.id() / 1000;
auto offRouteMine = m_ddsHandler->dtcAes()->offRouteMine((int)(data.id() / 1000)); auto offRouteMine = m_ddsHandler->dtcAes()->offRouteMine((int)(data.id() / 1000));
if (!offRouteMine.effectStart().is_set()) if (!offRouteMine.effectStart.is_set())
{ {
DEBUG_LOG(m_logger) << "!offRouteMine.effectStart().is_set()"; DEBUG_LOG(m_logger) << "!offRouteMine.effectStart.is_set()";
return; return;
} }
DEBUG_LOG(m_logger) << " currentPartitionTime=" << m_ddsHandler->currentPartitionTime() DEBUG_LOG(m_logger) << " currentPartitionTime=" << m_ddsHandler->currentPartitionTime()
<< " effectStart=" << offRouteMine.effectStart() << " effectStart=" << offRouteMine.effectStart()
<< " effectDuration=" << offRouteMine.effectDuration() << " effectDuration=" << offRouteMine.effectDuration()
<< " diff = " << m_ddsHandler->currentPartitionTime() - (offRouteMine.effectStart().get() + offRouteMine.effectDuration()) ; << " diff = " << m_ddsHandler->currentPartitionTime() - (offRouteMine.effectStart.get() + offRouteMine.effectDuration()) ;
if ((m_ddsHandler->currentPartitionTime() - (offRouteMine.effectStart().get() + offRouteMine.effectDuration())) < 2000) if ((m_ddsHandler->currentPartitionTime() - (offRouteMine.effectStart.get() + offRouteMine.effectDuration())) < 2000)
{ {
DEBUG_LOG(m_logger) << "AtBoobyTrapSecondary Mine wird ausgeloeset."; DEBUG_LOG(m_logger) << "AtBoobyTrapSecondary Mine wird ausgeloeset.";
checkBuildingsHit(data); checkBuildingsHit(data);
@@ -181,17 +181,17 @@ void HandlerAesData::onAesItemViewChanged(const AreaEffectSimulation::AesItemVie
DEBUG_LOG(m_logger) << "AtBoobyTrapSecondary id=" << data.id() / 1000; DEBUG_LOG(m_logger) << "AtBoobyTrapSecondary id=" << data.id() / 1000;
//auto offRouteMine = m_ddsHandler->dtcAes()->offRouteMine((int) (data.id() / 1000)); //auto offRouteMine = m_ddsHandler->dtcAes()->offRouteMine((int) (data.id() / 1000));
auto boobyTrap = m_ddsHandler->dtcAes()->boobyTrap((int)(data.id() / 1000)); auto boobyTrap = m_ddsHandler->dtcAes()->boobyTrap((int)(data.id() / 1000));
if (!boobyTrap.effectStart().is_set()) if (!boobyTrap.effectStart.is_set())
{ {
DEBUG_LOG(m_logger) << "!offRouteMine.effectStart().is_set()"; DEBUG_LOG(m_logger) << "!offRouteMine.effectStart.is_set()";
return; return;
} }
DEBUG_LOG(m_logger) << " currentPartitionTime=" << m_ddsHandler->currentPartitionTime() DEBUG_LOG(m_logger) << " currentPartitionTime=" << m_ddsHandler->currentPartitionTime()
<< " effectStart=" << boobyTrap.effectStart() << " effectStart=" << boobyTrap.effectStart()
<< " effectDuration=" << boobyTrap.effectDuration() << " effectDuration=" << boobyTrap.effectDuration()
<< " diff = " << m_ddsHandler->currentPartitionTime() - (boobyTrap.effectStart().get() + boobyTrap.effectDuration()) ; << " diff = " << m_ddsHandler->currentPartitionTime() - (boobyTrap.effectStart.get() + boobyTrap.effectDuration()) ;
if ((m_ddsHandler->currentPartitionTime() - (boobyTrap.effectStart().get() + boobyTrap.effectDuration())) < 2000) if ((m_ddsHandler->currentPartitionTime() - (boobyTrap.effectStart.get() + boobyTrap.effectDuration())) < 2000)
{ {
DEBUG_LOG(m_logger) << "AtBoobyTrapSecondary Mine wird ausgeloeset."; DEBUG_LOG(m_logger) << "AtBoobyTrapSecondary Mine wird ausgeloeset.";
checkBuildingsHit(data); checkBuildingsHit(data);
@@ -360,7 +360,7 @@ void HandlerParticipantArea::onDusSingleMineChanged(const AreaEffectSimulation::
CentralEffectSimulation::AesItemViewUtm itemView; CentralEffectSimulation::AesItemViewUtm itemView;
itemView.aesItemId = data.id(); itemView.aesItemId = data.id();
itemView.chargeTypeId = data.chargeTypeId(); itemView.chargeTypeId = data.chargeTypeId();
itemView.partyId = data.partyId().is_set() ? data.partyId().get() : -1; itemView.partyId = data.partyId.is_set() ? data.partyId.get() : -1;
itemView.aesTypeId = AreaEffectSimulation::AesType_def::AtDusSingleMine; itemView.aesTypeId = AreaEffectSimulation::AesType_def::AtDusSingleMine;
itemView.effectStart = QDateTime::currentDateTimeUtc().toMSecsSinceEpoch(); itemView.effectStart = QDateTime::currentDateTimeUtc().toMSecsSinceEpoch();
itemView.formMines.push_back(CentralEffectSimulation::geographic2Utm(data.position(), &itemView.zone)); itemView.formMines.push_back(CentralEffectSimulation::geographic2Utm(data.position(), &itemView.zone));
@@ -724,8 +724,8 @@ void HandlerParticipantArea::onExplosionAreaChanged(const AreaEffectSimulation::
return; return;
DEBUG_LOG(m_logger) << "Got ExplosionArea, m_aesItemId2partIdMap.insert " << data.id() << " / " << data.participantId(); DEBUG_LOG(m_logger) << "Got ExplosionArea, m_aesItemId2partIdMap.insert " << data.id() << " / " << data.participantId();
if (data.participantId().is_set()) if (data.participantId.is_set())
m_aesItemId2partIdMap.insert(data.id(), data.participantId().get()); m_aesItemId2partIdMap.insert(data.id(), data.participantId.get());
else else
m_aesItemId2partIdMap.remove(data.id()); m_aesItemId2partIdMap.remove(data.id());
} // onExplosionAreaChanged } // onExplosionAreaChanged
@@ -1072,7 +1072,7 @@ void HandlerParticipantArea::sendCesHitRequest(const AreaEffectSimulation::AesIt
); );
TrainingAreaBase::SendCesHitRequest requestTab( TrainingAreaBase::SendCesHitRequest requestTab(
equipmentNumber, participantPosition.participantId(), legacyChargeTypeId, itemView.aesItemId(), originatorEquipmentNumber, equipmentNumber, participantPosition.participantId(), legacyChargeTypeId, itemView.aesItemId(), originatorEquipmentNumber,
remaining, pos, effectTime, itemView.partyId().get(), mineFieldBitIndex remaining, pos, effectTime, itemView.partyId.get(), mineFieldBitIndex
); );
DEBUG_LOG(m_logger) << " participantId=" << participantPosition.participantId() << " chargeTypeId=" << itemView.chargeTypeId() DEBUG_LOG(m_logger) << " participantId=" << participantPosition.participantId() << " chargeTypeId=" << itemView.chargeTypeId()
<< " legacyChargeTypeId=" << legacyChargeTypeId; << " legacyChargeTypeId=" << legacyChargeTypeId;
@@ -399,8 +399,8 @@ void HandlerExplosions::calculateImpact(const AreaEffectSimulation::ChargeEffect
// if we get the equipmentNumber from the participant we will send this (needed by tab) // if we get the equipmentNumber from the participant we will send this (needed by tab)
// if not fall back to participantId, not negated yet as it's not tested and probalbly handled by the TNE // if not fall back to participantId, not negated yet as it's not tested and probalbly handled by the TNE
const ParticipantManagement::Participant &part = m_ddsHandler->dtcPpm()->participant(data.originatorId()); const ParticipantManagement::Participant &part = m_ddsHandler->dtcPpm()->participant(data.originatorId());
if (part.equipmentNumber().is_set()) if (part.equipmentNumber.is_set())
requestTab.originatorEquipmentNumber(part.equipmentNumber().get()); requestTab.originatorEquipmentNumber(part.equipmentNumber.get());
else else
{ {
WARNING_LOG(m_logger) << "Sending CesHitRequest without EquipNo, using negative ParticipantID : " << data.originatorId(); WARNING_LOG(m_logger) << "Sending CesHitRequest without EquipNo, using negative ParticipantID : " << data.originatorId();
@@ -912,7 +912,7 @@ void HandlerExplosions::calculateSmartEffect(const AreaEffectSimulation::Effects
<< ", aesItem= " << aesItem; << ", aesItem= " << aesItem;
calculateSmartExplosion(effects.aesItemId(), calculateSmartExplosion(effects.aesItemId(),
aesItem.chargeStruct(), aesItem.chargeStruct(),
aesItem.partyId().is_set() ? aesItem.partyId().get() : 0, aesItem.partyId.is_set() ? aesItem.partyId.get() : 0,
Core::GeoPosition(se.position().lon(), se.position().lat(), 0), Core::GeoPosition(se.position().lon(), se.position().lat(), 0),
effects.sampleTime()); effects.sampleTime());
} // for } // for
@@ -1591,8 +1591,8 @@ void HandlerExplosions::sendCesHitRequest(const CentralEffectSimulation::AesItem
if (eventType == ProjectDataManagement::EventType::EnterHazardDistance) if (eventType == ProjectDataManagement::EventType::EnterHazardDistance)
{ {
const auto &ec = m_ddsHandler->dtcAes().get()->explosionCluster(itemView.aesItemId); const auto &ec = m_ddsHandler->dtcAes().get()->explosionCluster(itemView.aesItemId);
if (ec.effectStart().is_set()) if (ec.effectStart.is_set())
effectTime2 = ec.effectStart().get() / 1000; // msec to sec effectTime2 = ec.effectStart.get() / 1000; // msec to sec
} }
@@ -94,7 +94,7 @@ void HandlerVulcano::onExplosionClusterChanged(const AreaEffectSimulation::Explo
|| (data.effectStateId() == AreaEffectSimulation::AesEffectState_def::EsActivated)) || (data.effectStateId() == AreaEffectSimulation::AesEffectState_def::EsActivated))
return; return;
if (!data.effectStart().is_set()) if (!data.effectStart.is_set())
{ {
DEBUG_LOG(m_logger) << "No effectStart"; DEBUG_LOG(m_logger) << "No effectStart";
return; return;
@@ -107,10 +107,10 @@ void HandlerVulcano::onExplosionClusterChanged(const AreaEffectSimulation::Explo
if (!m_ddsHandler->isLaserGuidable(data.chargeStruct())) if (!m_ddsHandler->isLaserGuidable(data.chargeStruct()))
return; return;
if (!data.flightCurve().is_set() || !data.laserGuiding().is_set()) if (!data.flightCurve.is_set() || !data.laserGuiding.is_set())
return; return;
const AreaEffectSimulation::FlightCurve &fcData = data.flightCurve().get(); const AreaEffectSimulation::FlightCurve &fcData = data.flightCurve.get();
const AreaEffectSimulation::LaserGuiding &lgData = data.laserGuiding().get(); const AreaEffectSimulation::LaserGuiding &lgData = data.laserGuiding.get();
DEBUG_LOG(m_logger) << "\n onExplosionClusterChanged id=" << data.id() DEBUG_LOG(m_logger) << "\n onExplosionClusterChanged id=" << data.id()
<< " AesEffectState=" << data.effectStateId() << " AesEffectState=" << data.effectStateId()
@@ -137,7 +137,7 @@ void HandlerVulcano::onExplosionClusterChanged(const AreaEffectSimulation::Explo
m_aesTimers.insert(data.id(), timer); m_aesTimers.insert(data.id(), timer);
timer->setProperty("aesId", aesId); timer->setProperty("aesId", aesId);
{ {
long long effectStart = data.effectStart().is_set() ? data.effectStart().get() : 0; long long effectStart = data.effectStart.is_set() ? data.effectStart.get() : 0;
long long calculatedFlightDurationMSec = fcData.calculatedFlightDuration(); long long calculatedFlightDurationMSec = fcData.calculatedFlightDuration();
long long currentPartitionTime = m_ddsHandler->currentPartitionTime(); long long currentPartitionTime = m_ddsHandler->currentPartitionTime();
const int timerTimeout = effectStart - calculatedFlightDurationMSec - currentPartitionTime; const int timerTimeout = effectStart - calculatedFlightDurationMSec - currentPartitionTime;
@@ -160,9 +160,9 @@ void HandlerVulcano::onFiringTimeTimeout()
const auto &myEC = m_explosionCluster.value(aesId); const auto &myEC = m_explosionCluster.value(aesId);
if (myEC.id() != aesId) if (myEC.id() != aesId)
return; return;
if (!myEC.flightCurve().is_set()) if (!myEC.flightCurve.is_set())
return; return;
const AreaEffectSimulation::FlightCurve &fcData = myEC.flightCurve().get(); const AreaEffectSimulation::FlightCurve &fcData = myEC.flightCurve.get();
//auto dtcPpm = m_ddsHandler->dtcPpm(); //auto dtcPpm = m_ddsHandler->dtcPpm();
//auto participantId = dtcPpm.get()->getParticipantFromPrf(prf); //auto participantId = dtcPpm.get()->getParticipantFromPrf(prf);
@@ -211,7 +211,7 @@ void HandlerVulcano::onFiringTimeTimeout()
// Flugzeit zwischen TAP(') und Einschlag // Flugzeit zwischen TAP(') und Einschlag
int timeDiffTapToExplosion = relTimeExplosion - relTimeTap; int timeDiffTapToExplosion = relTimeExplosion - relTimeTap;
// Somit ist die absolute Zeit am TAP(') die Startzeit abzüglich der Flugzeit // Somit ist die absolute Zeit am TAP(') die Startzeit abzüglich der Flugzeit
int absTimeAtTap = myEC.effectStart().get() - timeDiffTapToExplosion; int absTimeAtTap = myEC.effectStart.get() - timeDiffTapToExplosion;
// Und die ist in wieviel Sekunden? // Und die ist in wieviel Sekunden?
int relTimeToTap = absTimeAtTap - m_ddsHandler->currentPartitionTime(); int relTimeToTap = absTimeAtTap - m_ddsHandler->currentPartitionTime();
DEBUG_LOG(m_logger) << "timer->start timeout= " << relTimeToTap DEBUG_LOG(m_logger) << "timer->start timeout= " << relTimeToTap
@@ -231,9 +231,9 @@ void HandlerVulcano::onTrajectoryTimeAwareTimeout()
const auto &myEC = m_explosionCluster.value(aesId); const auto &myEC = m_explosionCluster.value(aesId);
if (myEC.id() != aesId) if (myEC.id() != aesId)
return; return;
if (!myEC.laserGuiding().is_set()) if (!myEC.laserGuiding.is_set())
return; return;
const AreaEffectSimulation::LaserGuiding &lgData = myEC.laserGuiding().get(); const AreaEffectSimulation::LaserGuiding &lgData = myEC.laserGuiding.get();
const int prf = lgData.lcAttack(); const int prf = lgData.lcAttack();
@@ -203,8 +203,8 @@ void HandlerFunctionalAreas::onAesItemViewChanged(const AreaEffectSimulation::Ae
isSupplyTruck = true; isSupplyTruck = true;
} }
auto aesItemViewUtm(CentralEffectSimulation::AesItemViewUtm::create(data, m_aesItemViews[data.aesItemId()], 0, isSupplyTruck)); auto aesItemViewUtm(CentralEffectSimulation::AesItemViewUtm::create(data, m_aesItemViews[data.aesItemId()], 0, isSupplyTruck));
if (fa.participantId().is_set()) if (fa.participantId.is_set())
aesItemViewUtm.participantId = fa.participantId().get(); aesItemViewUtm.participantId = fa.participantId.get();
if (!m_aesPolygonEncloseBuilding.contains(data.aesItemId())) if (!m_aesPolygonEncloseBuilding.contains(data.aesItemId()))
{ {
@@ -882,7 +882,7 @@ void HandlerMineAreas::sendCesHitRequest(const AreaEffectSimulation::AesItemView
TrainingAreaBase::SendCesHitRequest requestTab( TrainingAreaBase::SendCesHitRequest requestTab(
equipmentNumber, participantPosition.participantId(), legacyChargeTypeId, itemView.aesItemId(), originatorEquipmentNumber, equipmentNumber, participantPosition.participantId(), legacyChargeTypeId, itemView.aesItemId(), originatorEquipmentNumber,
remaining, pos, effectTime, eventType, itemView.partyId().get(), mineFieldBitIndex remaining, pos, effectTime, eventType, itemView.partyId.get(), mineFieldBitIndex
); );
DEBUG_LOG(m_logger) << " participantId=" << participantPosition.participantId() << " chargeTypeId=" << itemView.chargeStruct().chargeTypeId() DEBUG_LOG(m_logger) << " participantId=" << participantPosition.participantId() << " chargeTypeId=" << itemView.chargeStruct().chargeTypeId()
<< " legacyChargeTypeId=" << legacyChargeTypeId; << " legacyChargeTypeId=" << legacyChargeTypeId;
@@ -825,8 +825,8 @@ void HandlerNBC::sendCesHitRequest(const int aesItemId,
int32_t legacyChargeTypeId = 0; int32_t legacyChargeTypeId = 0;
int32_t partyId = 0; int32_t partyId = 0;
if ( aesItem.partyId().is_set()) if ( aesItem.partyId.is_set())
partyId = aesItem.partyId().get(); partyId = aesItem.partyId.get();
legacyChargeTypeId = m_ddsHandler->getLegacyIdFromChargeTypeId(aesItem.chargeStruct()); legacyChargeTypeId = m_ddsHandler->getLegacyIdFromChargeTypeId(aesItem.chargeStruct());
DEBUG_LOG(m_logger) << "sendCesHitRequest Settings::calculateCentralAes=" DEBUG_LOG(m_logger) << "sendCesHitRequest Settings::calculateCentralAes="
<< " insideWlsArea=" << std::boolalpha << participantData.insideWlsArea() << " insideWlsArea=" << std::boolalpha << participantData.insideWlsArea()
@@ -279,8 +279,8 @@ void HandlerParticipantBuilding::sendCesHitToParticipant(const Buildings::Buildi
requestTab.originatorEquipmentNumber(originatorEquipNo); requestTab.originatorEquipmentNumber(originatorEquipNo);
requestTab.participantId(participantId); requestTab.participantId(participantId);
int32_t partyId = 0; int32_t partyId = 0;
if ( aesItem.partyId().is_set()) if ( aesItem.partyId.is_set())
partyId = aesItem.partyId().get(); partyId = aesItem.partyId.get();
requestTab.partyId(partyId); requestTab.partyId(partyId);
requestTab.position(pos); requestTab.position(pos);
@@ -95,7 +95,7 @@ void DdsHandlerTargetAreas::onParticipantChanged(const ParticipantManagement::Pa
if (modType == DataModification::eRemoved) if (modType == DataModification::eRemoved)
m_partId2EquipNoMap.remove(data.id()); m_partId2EquipNoMap.remove(data.id());
else else
m_partId2EquipNoMap[data.id()] = data.equipmentNumber().is_set() ? data.equipmentNumber().get() : 0; m_partId2EquipNoMap[data.id()] = data.equipmentNumber.is_set() ? data.equipmentNumber.get() : 0;
if (m_logger.isTraceEnabled()) if (m_logger.isTraceEnabled())
{ {
@@ -29,7 +29,7 @@ AesItemViewUtm AesItemViewUtm::create(const AreaEffectSimulation::AesItemView &a
//ret.zone; //ret.zone;
ret.aesItemId = aiv.aesItemId(); ret.aesItemId = aiv.aesItemId();
ret.chargeStruct = aiv.chargeStruct(); ret.chargeStruct = aiv.chargeStruct();
ret.partyId = aiv.partyId().is_set() ? aiv.partyId().get() : -1; ret.partyId = aiv.partyId.is_set() ? aiv.partyId.get() : -1;
ret.dusMineId = -1; ret.dusMineId = -1;
ret.isSupplyTruck = isSupplyTruck; ret.isSupplyTruck = isSupplyTruck;
ret.aesTypeId = aiv.aesTypeId(); ret.aesTypeId = aiv.aesTypeId();
@@ -100,7 +100,7 @@
</topicType> </topicType>
<topicType name="ParticipantEvent" isDataObject="1" autosubscribe="0" routeToClient="1" routeToServer="0" routeInReplay="0"> <topicType name="ParticipantEvent" isDataObject="1" autosubscribe="0" routeToClient="1" routeToServer="0" routeInReplay="0">
<column name="aesItemId" idlType="long"/> <column name="aesItemId" idlType="long"/>
<column name="eventTypeId" idlType="ProjectDataManagement::EventType"/> <column name="eventTypeId" idlType="ProjectDataManagement::PdmEventType"/>
<column name="participantId" idlType="long"/> <column name="participantId" idlType="long"/>
<column name="eventTime" idlType="long long"/> <column name="eventTime" idlType="long long"/>
<column name="friendlyFire" idlType="boolean"/> <column name="friendlyFire" idlType="boolean"/>
@@ -126,7 +126,7 @@ void HandlerParticipant::onParticipantPositionChanged(const ParticipantManagemen
return; return;
// [GUEZE-3102] Aufgesessene Teilnehmer bekommen den Schaden vom Fahrzeug, auf dem sie aufgesessen sind. // [GUEZE-3102] Aufgesessene Teilnehmer bekommen den Schaden vom Fahrzeug, auf dem sie aufgesessen sind.
if (data.mountedOn().is_set()) if (data.mountedOn.is_set())
return; return;
int floorId = m_handlerBuildingData->getFloorIdFromRoomId(data.roomId()); int floorId = m_handlerBuildingData->getFloorIdFromRoomId(data.roomId());
int lastFloorId; int lastFloorId;