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