Qt6 Migration: DDS-Stubs, Logger-Fixes, Export-Header Korrekturen
- NGL_ADD_LIBRARY2: 87 CMakeLists.txt konvertiert für Export-Header Generierung - 44 Export-Header Include-Pfade korrigiert (_export.h) - 81 DDS-Stub-Header generiert (*_dtc.h, *_fts.h, *_dts.h, *_ftc.h) - INGLLogger: Duplikat gelöscht, m_logger Member entfernt, variadische Makros - Q_FUNC_INFO Redefinition behoben (Qt6 definiert bereits) - FATAL_LOG Makro hinzugefügt - InfrastructureManagement DDS-Stubs (ism.hpp, ism_enums.hpp, ism_ftc.h) - FilterManagement DDS-Stubs (flt_ftc.h, flt_dts.h) - AreaEffectSimulation DDS-Stubs (aes.hpp, aes_enums.hpp) - SymbolAppearance Klasse vollständig definiert mit content() Methode - BuildingComponentFilter Klasse definiert mit Copy-Konstruktor - Ftc Factory: nullptr Return (abstract class) - AesFilter Klasse in aes.hpp hinzugefügt - Dtc Klasse in ppm.hpp mit participantChanged Signal - AesType Enum: alle 15 At* Werte definiert - AesEffectState_def: EsReceived hinzugefügt - DataModification Enum: eAdded/eModified/eRemoved - function_reply_object.h → core_types.h Include-Pfad (72 Dateien) - Enum-Class-Streaming Template-Operator in INGLLogger.h - ism_mounting_point.h: QImage → QtGui/QImage, QGuiApplication/QScreen - ism_data_plugin_interface.h: QSet Include, Include-Reihenfolge - QRegExp → QRegularExpression in tpm_js_parser.cpp - .underlying() Aufrufe zu direktem Enum-Vergleich korrigiert - Include-Pfade: aes.hpp in symbol_appearance_settings_impl.h und aes_display_filter_impl.h Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
2785 files changed
+18754
-18316
No files matched your search
+30
-31
@@ -59,7 +59,6 @@ CesTests::CesTests(QObject *parent)
|
||||
, TrainingAreaBase::Interface::Fts::SendCesHitRequestHandler(nullptr)
|
||||
, m_bTestsSuccessful(true)
|
||||
, m_housePos(LtsCoordTrans::UtmCoordinate::fromMgrs(QStringLiteral("32UMD8000090000")))
|
||||
, m_logger(getLogger("CesTests"))
|
||||
, m_testId(0)
|
||||
, m_buildingId(0)
|
||||
, m_roomId(0)
|
||||
@@ -77,7 +76,7 @@ CesTests::CesTests(QObject *parent)
|
||||
bool CesTests::init(int domainId, int exerciseId, int testId, int roomId)
|
||||
{
|
||||
bool bRet = true;
|
||||
INFO_LOG(m_logger) << "init begin";
|
||||
INFO_LOG() << "init begin";
|
||||
|
||||
m_testId = testId;
|
||||
m_roomId = roomId;
|
||||
@@ -97,7 +96,7 @@ bool CesTests::init(int domainId, int exerciseId, int testId, int roomId)
|
||||
bRet &= m_aesDts->enableBorderline();
|
||||
bRet &= m_aesDts->enableDusMineState();
|
||||
bRet &= m_aesDts->enableMineArea();
|
||||
DEBUG_LOG(m_logger) << "AES Dts create interface bRet:" << bRet ;
|
||||
DEBUG_LOG() << "AES Dts create interface bRet:" << bRet ;
|
||||
|
||||
m_ismDts = InfrastructureManagement::Interface::Dts::create(m_ddsConnector42);
|
||||
bRet &= m_ismDts->enableMainStructureElement();
|
||||
@@ -142,7 +141,7 @@ bool CesTests::init(int domainId, int exerciseId, int testId, int roomId)
|
||||
|
||||
void CesTests::startTest()
|
||||
{
|
||||
INFO_LOG(m_logger) << "startTest m_testId:" << m_testId;
|
||||
INFO_LOG() << "startTest m_testId:" << m_testId;
|
||||
if (m_testId <= 1) // AES-Hit On Buildings area explosions
|
||||
{
|
||||
m_countHitOnBuildingReply = 0;
|
||||
@@ -465,7 +464,7 @@ void CesTests::tryCreateTriggeredExplosion()
|
||||
ti.bitfield().resize(1);
|
||||
ti.bitfield()[0] = 0; // 0 = Mine active
|
||||
|
||||
DEBUG_LOG(m_logger) << "Publishing TriggeredExplosions: " << ti;
|
||||
DEBUG_LOG() << "Publishing TriggeredExplosions: " << ti;
|
||||
if (!m_aesDts->publish(ti))
|
||||
failExit("Error publishing TriggeredExplosions");
|
||||
}
|
||||
@@ -477,7 +476,7 @@ void CesTests::tryCreateExplosionArea()
|
||||
ea.participantId(m_originatorParticipantId); // In ddsview <not set>
|
||||
ea.effectStateId(AreaEffectSimulation::AesEffectState::inner_enum::EsPrepared);
|
||||
|
||||
DEBUG_LOG(m_logger) << "Publishing ExplosionArea: " << ea;
|
||||
DEBUG_LOG() << "Publishing ExplosionArea: " << ea;
|
||||
if (!m_aesDts->publish(ea))
|
||||
failExit("Error publishing ExplosionArea");
|
||||
}
|
||||
@@ -506,7 +505,7 @@ void CesTests::tryCreateExplosionSinglePrepared()
|
||||
m_es.sampleTime(QDateTime::currentMSecsSinceEpoch());
|
||||
m_es.chargeStruct().chargeTypeId(m_chargeTypeId);
|
||||
|
||||
DEBUG_LOG(m_logger) << "Publishing ExplosionSingle: " << m_es;
|
||||
DEBUG_LOG() << "Publishing ExplosionSingle: " << m_es;
|
||||
if (!m_aesDts->publish(m_es))
|
||||
failExit("Error publishing ExplosionSingle");
|
||||
}
|
||||
@@ -522,14 +521,14 @@ void CesTests::tryCreateExplosionSingle()
|
||||
m_es.effectStateId(AreaEffectSimulation::AesEffectState_def::EsActivated);
|
||||
m_es.sampleTime(QDateTime::currentMSecsSinceEpoch());
|
||||
|
||||
DEBUG_LOG(m_logger) << "Publishing ExplosionSingle: " << m_es;
|
||||
DEBUG_LOG() << "Publishing ExplosionSingle: " << m_es;
|
||||
if (!m_aesDts->publish(m_es))
|
||||
failExit("Error publishing ExplosionSingle");
|
||||
}
|
||||
|
||||
void CesTests::tryCreateAesItemView()
|
||||
{
|
||||
INFO_LOG(m_logger) << "trying to send AesItemView AtExplosionArea";
|
||||
INFO_LOG() << "trying to send AesItemView AtExplosionArea";
|
||||
|
||||
m_aiv = AreaEffectSimulation::AesItemView();
|
||||
m_aiv.aesItemId(m_aesItemId);
|
||||
@@ -548,7 +547,7 @@ void CesTests::tryCreateAesItemView()
|
||||
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;
|
||||
DEBUG_LOG() << "Publishing AesItemView: " << m_aiv;
|
||||
if (!m_aesDts->publish(m_aiv))
|
||||
failExit("Error publishing AesItemView");
|
||||
}
|
||||
@@ -558,13 +557,13 @@ void CesTests::tryCreateChargeType()
|
||||
ProjectDataManagement::ChargeType ct;
|
||||
ct.id(m_chargeTypeId);
|
||||
ct.properties("{\"impactRadius\":5}");
|
||||
DEBUG_LOG(m_logger) << "Publishing ChargeType: " << ct;
|
||||
DEBUG_LOG() << "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}");
|
||||
DEBUG_LOG(m_logger) << "Publishing ChargeType: " << ct;
|
||||
DEBUG_LOG() << "Publishing ChargeType: " << ct;
|
||||
if (!m_pdmDts->publish(ct))
|
||||
failExit("Error publishing ChargeType");
|
||||
}
|
||||
@@ -592,7 +591,7 @@ void CesTests::tryCreateAesItemViewSingleExplosions()
|
||||
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;
|
||||
DEBUG_LOG() << "Publishing AesItemView: " << m_aiv;
|
||||
if (!m_aesDts->publish(m_aiv))
|
||||
failExit("Error publishing AesItemView");
|
||||
}
|
||||
@@ -616,7 +615,7 @@ void CesTests::tryCreateAesItemViewBC(AreaEffectSimulation::AesEffectState desir
|
||||
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;
|
||||
DEBUG_LOG() << "Publishing AesItemView: " << m_aiv;
|
||||
if (!m_aesDts->publish(m_aiv))
|
||||
failExit("Error publishing AesItemView");
|
||||
}
|
||||
@@ -641,14 +640,14 @@ void CesTests::tryCreateAesItemViewSM()
|
||||
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;
|
||||
DEBUG_LOG() << "Publishing AesItemView: " << m_aiv;
|
||||
if (!m_aesDts->publish(m_aiv))
|
||||
failExit("Error publishing AesItemView");
|
||||
}
|
||||
|
||||
void CesTests::tryCreateAesItemViewMA()
|
||||
{
|
||||
INFO_LOG(m_logger) << "trying to send AesItemView AtMineArea";
|
||||
INFO_LOG() << "trying to send AesItemView AtMineArea";
|
||||
|
||||
m_aiv = AreaEffectSimulation::AesItemView();
|
||||
m_aiv.aesItemId(m_aesItemId);
|
||||
@@ -668,7 +667,7 @@ void CesTests::tryCreateAesItemViewMA()
|
||||
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;
|
||||
DEBUG_LOG() << "Publishing AesItemView: " << m_aiv;
|
||||
if (!m_aesDts->publish(m_aiv))
|
||||
failExit("Error publishing AesItemView");
|
||||
}
|
||||
@@ -690,7 +689,7 @@ void CesTests::tryCreateBorderline()
|
||||
setPos(bl.segments(), m_housePos.geographic(5, 3));
|
||||
|
||||
bl.isDeleted(false);
|
||||
DEBUG_LOG(m_logger) << "Publishing BorderLine: " << bl;
|
||||
DEBUG_LOG() << "Publishing BorderLine: " << bl;
|
||||
if (!m_aesDts->publish(bl))
|
||||
failExit("Error publishing Borderline");
|
||||
}
|
||||
@@ -709,7 +708,7 @@ void CesTests::tryCreateMainStructureElement()
|
||||
m_mse.angle(318.83);
|
||||
m_mse.modelId(1337);
|
||||
m_mse.externalWlsId(0);
|
||||
DEBUG_LOG(m_logger) << "Publishing MainStructureElement: " << m_mse;
|
||||
DEBUG_LOG() << "Publishing MainStructureElement: " << m_mse;
|
||||
if (!m_ismDts->publish(m_mse))
|
||||
failExit("Error publishing MainStructureElement");
|
||||
}
|
||||
@@ -740,7 +739,7 @@ void CesTests::tryCreateMainFootprint()
|
||||
elem.relPosition(Core::RelativePosition(0.0, 10.0, 0.0));
|
||||
mf.elements().push_back(elem);
|
||||
|
||||
DEBUG_LOG(m_logger) << "Publishing MainFootprint: " << mf;
|
||||
DEBUG_LOG() << "Publishing MainFootprint: " << mf;
|
||||
if (!m_ismDts->publish(mf))
|
||||
failExit("Error publishing MainFootprint");
|
||||
}
|
||||
@@ -759,7 +758,7 @@ void CesTests::tryCreateDynamicParticipantData()
|
||||
|
||||
dp.sampleTime(si.stateTime());
|
||||
|
||||
DEBUG_LOG(m_logger) << "Publishing DynamicParticipantData: " << dp;
|
||||
DEBUG_LOG() << "Publishing DynamicParticipantData: " << dp;
|
||||
if (!m_ppmDts->publish(dp))
|
||||
failExit("Error publishing DynamicParticipantData");
|
||||
}
|
||||
@@ -783,7 +782,7 @@ void CesTests::tryCreateParticipantPosition()
|
||||
pp.pos(pos);
|
||||
m_expectedPosition[pp.participantId()] = Core::GeoPosition2D(posF.x(), posF.y());
|
||||
|
||||
DEBUG_LOG(m_logger) << "Publishing ParticipantPosition: " << pp;
|
||||
DEBUG_LOG() << "Publishing ParticipantPosition: " << pp;
|
||||
if (!m_ppmDts->publish(pp))
|
||||
failExit("Error publishing ParticipantPosition");
|
||||
}
|
||||
@@ -813,7 +812,7 @@ void CesTests::tryCreateBuildingState()
|
||||
rs.remainingEffectPercent(60);
|
||||
bs.roomStates().push_back(rs);
|
||||
|
||||
DEBUG_LOG(m_logger) << "Publishing BuildingState: " << bs;
|
||||
DEBUG_LOG() << "Publishing BuildingState: " << bs;
|
||||
if (!m_bldDts->publish(bs))
|
||||
failExit("Error publishing BuildingState");
|
||||
}
|
||||
@@ -834,7 +833,7 @@ void CesTests::onSendCesHitOnBuildingRequest(const rti::core::SampleIdentity &co
|
||||
|
||||
// debug und co
|
||||
m_countHitOnBuildingReply++;
|
||||
DEBUG_LOG(m_logger) << "onSendCesHitOnBuildingRequest cnt = " << m_countHitOnBuildingReply << "\n"
|
||||
DEBUG_LOG() << "onSendCesHitOnBuildingRequest cnt = " << m_countHitOnBuildingReply << "\n"
|
||||
<< " request: " << request << ", "
|
||||
<< dateTime.toString(QStringLiteral("dd.MM.yy - hh:mm:ss.zzz")) << "\n";
|
||||
|
||||
@@ -890,7 +889,7 @@ void CesTests::onSendCesHitRequest(const rti::core::SampleIdentity &cookie,
|
||||
/* comes out with timeout on STTW
|
||||
if (request.effectTime() + 1000 < QDateTime::currentMSecsSinceEpoch())
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "onSendCesHitRequest from previous test - ignoring"
|
||||
DEBUG_LOG() << "onSendCesHitRequest from previous test - ignoring"
|
||||
<< request.effectTime()
|
||||
<< QDateTime::currentMSecsSinceEpoch();
|
||||
return;
|
||||
@@ -898,7 +897,7 @@ void CesTests::onSendCesHitRequest(const rti::core::SampleIdentity &cookie,
|
||||
*/
|
||||
// debug und co
|
||||
const QDateTime dateTime(QDateTime::fromMSecsSinceEpoch(request.effectTime()));
|
||||
DEBUG_LOG(m_logger) << "onSendCesHitRequest" << "\n"
|
||||
DEBUG_LOG() << "onSendCesHitRequest" << "\n"
|
||||
<< " request: " << request << ", "
|
||||
<< dateTime.toString(QStringLiteral("dd.MM.yy - hh:mm:ss.zzz")) << "\n";
|
||||
if (request.remainEffectPercent())
|
||||
@@ -925,7 +924,7 @@ void CesTests::onSendCesHitRequest(const rti::core::SampleIdentity &cookie,
|
||||
// 3 x Enter
|
||||
if (request.remainEffectPercent() == 1)
|
||||
m_replyEnterFunctionalArea ++;
|
||||
DEBUG_LOG(m_logger)<< "m_replyEnterFunctionalArea=" << m_replyEnterFunctionalArea;
|
||||
DEBUG_LOG()<< "m_replyEnterFunctionalArea=" << m_replyEnterFunctionalArea;
|
||||
if (m_replyEnterFunctionalArea == 3)
|
||||
ExitSuccess();
|
||||
break;
|
||||
@@ -969,7 +968,7 @@ void CesTests::checkParticipantEvent()
|
||||
return;
|
||||
}
|
||||
|
||||
DEBUG_LOG(m_logger) << "Waiting for a participant event: " << expectedType;
|
||||
DEBUG_LOG() << "Waiting for a participant event: " << expectedType;
|
||||
|
||||
bool bRet = false;
|
||||
for (int i = 0; i < 50; ++i)
|
||||
@@ -1013,7 +1012,7 @@ void CesTests::tryCreateParticipant()
|
||||
pt.isSimulated(false);
|
||||
pt.equipmentNumber(4711);
|
||||
|
||||
DEBUG_LOG(m_logger) << "Publishing Participant:" << pt;
|
||||
DEBUG_LOG() << "Publishing Participant:" << pt;
|
||||
if (!m_ppmDts->publish(pt))
|
||||
failExit("Error requesting create Participant");
|
||||
}
|
||||
@@ -1021,7 +1020,7 @@ void CesTests::tryCreateParticipant()
|
||||
|
||||
void CesTests::failExit(const char *reason)
|
||||
{
|
||||
ERROR_LOG(m_logger) << "FailExit: " << reason << " for test case = " << m_testId;
|
||||
ERROR_LOG() << "FailExit: " << reason << " for test case = " << m_testId;
|
||||
m_bTestsSuccessful = false;
|
||||
QTimer::singleShot(50, qApp, QCoreApplication::quit);
|
||||
}
|
||||
@@ -1030,7 +1029,7 @@ void CesTests::ExitSuccess()
|
||||
{
|
||||
if (!m_bTestsSuccessful)
|
||||
return;
|
||||
INFO_LOG(m_logger) << "ExitSuccess for test case = " << m_testId;
|
||||
INFO_LOG() << "ExitSuccess for test case = " << m_testId;
|
||||
m_bTestsSuccessful = true;
|
||||
QTimer::singleShot(50, qApp, QCoreApplication::quit);
|
||||
}
|
||||
|
||||
-1
@@ -110,7 +110,6 @@ private:
|
||||
|
||||
|
||||
LtsCoordTrans::UtmCoordinate m_housePos;
|
||||
NGL::INGLLogger &m_logger;
|
||||
int m_testId;
|
||||
|
||||
int m_buildingId;
|
||||
|
||||
+18
-19
@@ -37,7 +37,6 @@ CesTestsBlockedAreas::CesTestsBlockedAreas(QObject *parent)
|
||||
: QObject(parent)
|
||||
, m_bTestsSuccessful(true)
|
||||
, m_housePos(LtsCoordTrans::UtmCoordinate::fromMgrs(QStringLiteral("32UMD8000090000")))
|
||||
, m_logger(getLogger("CesTestsBlockedAreas"))
|
||||
, m_testId(0)
|
||||
, m_participantIndex(0)
|
||||
, m_DynamicParticipantIndex(0)
|
||||
@@ -49,7 +48,7 @@ CesTestsBlockedAreas::~CesTestsBlockedAreas()
|
||||
bool CesTestsBlockedAreas::init(int domainId, int exerciseId, int testId)
|
||||
{
|
||||
bool bRet = true;
|
||||
INFO_LOG(m_logger) << "init begin";
|
||||
INFO_LOG() << "init begin";
|
||||
|
||||
m_testId = testId;
|
||||
m_buildingId = 7; // ism_main_structure_element:id
|
||||
@@ -84,7 +83,7 @@ bool CesTestsBlockedAreas::init(int domainId, int exerciseId, int testId)
|
||||
|
||||
void CesTestsBlockedAreas::startTest()
|
||||
{
|
||||
INFO_LOG(m_logger) << "startTest m_testId=" << m_testId;
|
||||
INFO_LOG() << "startTest m_testId=" << m_testId;
|
||||
if (m_testId <= 1) // 1 Participant in BT56
|
||||
{
|
||||
QTimer::singleShot(0, this, &CesTestsBlockedAreas::tryCreateParticipantPositionOutside);
|
||||
@@ -137,7 +136,7 @@ void CesTestsBlockedAreas::startTest()
|
||||
}
|
||||
else
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Unknown test id = " << m_testId;
|
||||
ERROR_LOG() << "Unknown test id = " << m_testId;
|
||||
failExit();
|
||||
}
|
||||
QTimer::singleShot(6000, this, &CesTestsBlockedAreas::failExit);
|
||||
@@ -159,10 +158,10 @@ void CesTestsBlockedAreas::tryCreateDynamicParticipantData()
|
||||
dp.sampleTime(esTime);
|
||||
m_DynamicParticipantIndex++;
|
||||
|
||||
DEBUG_LOG(m_logger) << "Publishing DynamicParticipantData";
|
||||
DEBUG_LOG() << "Publishing DynamicParticipantData";
|
||||
if (!m_ppmDts->publish(dp))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error requesting create ParticipantPosition";
|
||||
ERROR_LOG() << "Error requesting create ParticipantPosition";
|
||||
failExit();
|
||||
}
|
||||
}
|
||||
@@ -183,10 +182,10 @@ void CesTestsBlockedAreas::tryCreateParticipantPositionOutside()
|
||||
pp.sampleTime(posTime);
|
||||
pp.pos(pos);
|
||||
|
||||
DEBUG_LOG(m_logger) << "Publishing ParticipantPosition";
|
||||
DEBUG_LOG() << "Publishing ParticipantPosition";
|
||||
if (!m_ppmDts->publish(pp))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error requesting create ParticipantPosition";
|
||||
ERROR_LOG() << "Error requesting create ParticipantPosition";
|
||||
failExit();
|
||||
}
|
||||
}
|
||||
@@ -207,10 +206,10 @@ void CesTestsBlockedAreas::tryCreateParticipantPosition()
|
||||
pp.sampleTime(posTime);
|
||||
pp.pos(pos);
|
||||
|
||||
DEBUG_LOG(m_logger) << "Publishing ParticipantPosition";
|
||||
DEBUG_LOG() << "Publishing ParticipantPosition";
|
||||
if (!m_ppmDts->publish(pp))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error requesting create ParticipantPosition";
|
||||
ERROR_LOG() << "Error requesting create ParticipantPosition";
|
||||
failExit();
|
||||
}
|
||||
}
|
||||
@@ -224,10 +223,10 @@ void CesTestsBlockedAreas::tryCreateParticipant()
|
||||
pt.id(m_participants[m_participantIndex].participantId);
|
||||
pt.equipmentNumber(m_participants[m_participantIndex].equipmentNumber);
|
||||
|
||||
DEBUG_LOG(m_logger) << "Publishing Participant";
|
||||
DEBUG_LOG() << "Publishing Participant";
|
||||
if (!m_ppmDts->publish(pt))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error requesting create Participant";
|
||||
ERROR_LOG() << "Error requesting create Participant";
|
||||
failExit();
|
||||
}
|
||||
}
|
||||
@@ -249,10 +248,10 @@ void CesTestsBlockedAreas::tryCreateBuildingStateInit()
|
||||
bs.vulnerabilityState(ProjectDataManagement::VulnerabilityState::CombatReady);
|
||||
bs.sampleTime(QDateTime::currentMSecsSinceEpoch());
|
||||
|
||||
DEBUG_LOG(m_logger) << "Publishing BuildingState";
|
||||
DEBUG_LOG() << "Publishing BuildingState";
|
||||
if (!m_bldDts->publish(bs))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error requesting create BuildingState";
|
||||
ERROR_LOG() << "Error requesting create BuildingState";
|
||||
failExit();
|
||||
}
|
||||
}
|
||||
@@ -279,30 +278,30 @@ void CesTestsBlockedAreas::tryCreateBuildingState()
|
||||
bs.roomStates()[0] = rs;
|
||||
bs.sampleTime(QDateTime::currentMSecsSinceEpoch());
|
||||
|
||||
DEBUG_LOG(m_logger) << "Publishing BuildingState";
|
||||
DEBUG_LOG() << "Publishing BuildingState";
|
||||
if (!m_bldDts->publish(bs))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error requesting create BuildingState";
|
||||
ERROR_LOG() << "Error requesting create BuildingState";
|
||||
failExit();
|
||||
}
|
||||
}
|
||||
|
||||
void CesTestsBlockedAreas::checkBuildingOwnership()
|
||||
{
|
||||
INFO_LOG(m_logger) << "checkBuildingOwnership";
|
||||
INFO_LOG() << "checkBuildingOwnership";
|
||||
ExitSuccess();
|
||||
}
|
||||
|
||||
void CesTestsBlockedAreas::failExit()
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "FailExit";
|
||||
DEBUG_LOG() << "FailExit";
|
||||
m_bTestsSuccessful = false;
|
||||
QTimer::singleShot(50, qApp, QCoreApplication::quit);
|
||||
}
|
||||
|
||||
void CesTestsBlockedAreas::ExitSuccess()
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "ExitSuccess";
|
||||
DEBUG_LOG() << "ExitSuccess";
|
||||
m_bTestsSuccessful = true;
|
||||
QTimer::singleShot(50, qApp, QCoreApplication::quit);
|
||||
}
|
||||
|
||||
-1
@@ -78,7 +78,6 @@ private:
|
||||
|
||||
|
||||
LtsCoordTrans::UtmCoordinate m_housePos;
|
||||
NGL::INGLLogger &m_logger;
|
||||
int m_testId;
|
||||
int m_participantIndex;
|
||||
int m_DynamicParticipantIndex;
|
||||
|
||||
+20
-21
@@ -34,7 +34,6 @@ CesTestsBoobyTrap::CesTestsBoobyTrap(QObject *parent)
|
||||
, m_bTestsSuccessful(true)
|
||||
//, m_refPos(LtsCoordTrans::UtmCoordinate::fromMgrs(QStringLiteral("32UMD8000090000")))
|
||||
, m_refPos(LtsCoordTrans::UtmCoordinate::fromMgrs(QStringLiteral("32UMD9387781202")))
|
||||
, m_logger(getLogger("CesTest"))
|
||||
, m_testId(0)
|
||||
, m_participantIndex(0)
|
||||
, m_id(20)
|
||||
@@ -53,7 +52,7 @@ bool CesTestsBoobyTrap::init(int domainId, int exerciseId, int testId)
|
||||
bool bRet = true;
|
||||
int equipmentTypeIdVehicle = 27;
|
||||
int equipmentTypeIdSoldier = 55; // dds-Topic Participant-Management::Type
|
||||
INFO_LOG(m_logger) << "init begin";
|
||||
INFO_LOG() << "init begin";
|
||||
|
||||
m_testId = testId;
|
||||
|
||||
@@ -118,7 +117,7 @@ bool CesTestsBoobyTrap::init(int domainId, int exerciseId, int testId)
|
||||
|
||||
void CesTestsBoobyTrap::startTest()
|
||||
{
|
||||
INFO_LOG(m_logger) << "startTest m_testId=" << m_testId;
|
||||
INFO_LOG() << "startTest m_testId=" << m_testId;
|
||||
if (m_testId <= 1) // 1 SMART
|
||||
{
|
||||
m_explosionSingle = m_refPos.geographic(5, 5);
|
||||
@@ -133,7 +132,7 @@ void CesTestsBoobyTrap::startTest()
|
||||
}
|
||||
else
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Unknown test id = " << m_testId;
|
||||
ERROR_LOG() << "Unknown test id = " << m_testId;
|
||||
failExit();
|
||||
}
|
||||
QTimer::singleShot(8000, this, &CesTestsBoobyTrap::failExit);
|
||||
@@ -159,11 +158,11 @@ void CesTestsBoobyTrap::tryCreateParticipantPosition()
|
||||
pp.sampleTime(posTime);
|
||||
pp.pos(pos);
|
||||
|
||||
DEBUG_LOG(m_logger) << "Publishing ParticipantPosition[" << m_participantIndex << "]"
|
||||
DEBUG_LOG() << "Publishing ParticipantPosition[" << m_participantIndex << "]"
|
||||
<< " pos=" << posF.x() << "/" << posF.y();
|
||||
if (!m_ppmDts->publish(pp))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error requesting create ParticipantPosition";
|
||||
ERROR_LOG() << "Error requesting create ParticipantPosition";
|
||||
failExit();
|
||||
}
|
||||
}
|
||||
@@ -171,7 +170,7 @@ void CesTestsBoobyTrap::tryCreateParticipantPosition()
|
||||
|
||||
void CesTestsBoobyTrap::checkParticipantEvent()
|
||||
{
|
||||
INFO_LOG(m_logger) << "checkParicipantEvent";
|
||||
INFO_LOG() << "checkParicipantEvent";
|
||||
m_cesDtc->waitForHistoricalDataParticipantEvent();
|
||||
|
||||
switch (m_testId)
|
||||
@@ -179,7 +178,7 @@ void CesTestsBoobyTrap::checkParticipantEvent()
|
||||
case 1:
|
||||
if ( m_countEventBoobyTrap == 2)
|
||||
{
|
||||
INFO_LOG(m_logger) << "ExitSuccess";
|
||||
INFO_LOG() << "ExitSuccess";
|
||||
ExitSuccess();
|
||||
}
|
||||
break;
|
||||
@@ -199,7 +198,7 @@ static void setPos(std::vector<Core::GeoPosition> &cont, const QPointF &pos)
|
||||
|
||||
void CesTestsBoobyTrap::tryCreateAesItemViewBoobyTrap()
|
||||
{
|
||||
INFO_LOG(m_logger) << "trying to send AesItemView tryCreateAesItemViewBoobyTrap";
|
||||
INFO_LOG() << "trying to send AesItemView tryCreateAesItemViewBoobyTrap";
|
||||
|
||||
AreaEffectSimulation::AesItemView iv;
|
||||
iv.effectStateId(AreaEffectSimulation::AesEffectState_def::EsActivated);
|
||||
@@ -222,17 +221,17 @@ void CesTestsBoobyTrap::tryCreateAesItemViewBoobyTrap()
|
||||
setPos(iv.form(), m_refPos.geographic( 10, 30));
|
||||
setPos(iv.form(), m_refPos.geographic( 10, -10));
|
||||
|
||||
DEBUG_LOG(m_logger) << "Publishing AesItemView";
|
||||
DEBUG_LOG() << "Publishing AesItemView";
|
||||
if (!m_aesDts->publish(iv))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error requesting create tryCreateAesItemViewBoobyTrap";
|
||||
ERROR_LOG() << "Error requesting create tryCreateAesItemViewBoobyTrap";
|
||||
failExit();
|
||||
}
|
||||
}
|
||||
|
||||
void CesTestsBoobyTrap::tryCreateAesBoobyTrap()
|
||||
{
|
||||
INFO_LOG(m_logger) << "trying to send AesItemView tryCreateAesBoobyTrap";
|
||||
INFO_LOG() << "trying to send AesItemView tryCreateAesBoobyTrap";
|
||||
|
||||
AreaEffectSimulation::BoobyTrap iv;
|
||||
iv.effectStateId(AreaEffectSimulation::AesEffectState_def::EsActivated);
|
||||
@@ -252,10 +251,10 @@ void CesTestsBoobyTrap::tryCreateAesBoobyTrap()
|
||||
iv.effectStart ( QDateTime::currentMSecsSinceEpoch() + 2000);
|
||||
|
||||
|
||||
DEBUG_LOG(m_logger) << "Publishing AesItemView";
|
||||
DEBUG_LOG() << "Publishing AesItemView";
|
||||
if (!m_aesDts->publish(iv))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error requesting create tryCreateBoobyTrap";
|
||||
ERROR_LOG() << "Error requesting create tryCreateBoobyTrap";
|
||||
failExit();
|
||||
}
|
||||
}
|
||||
@@ -263,7 +262,7 @@ void CesTestsBoobyTrap::tryCreateAesBoobyTrap()
|
||||
|
||||
void CesTestsBoobyTrap::tryCreateAesItemViewBoobyTrapSecondary()
|
||||
{
|
||||
INFO_LOG(m_logger) << "trying to send AesItemView tryCreateAesItemViewBoobyTrapSecondary";
|
||||
INFO_LOG() << "trying to send AesItemView tryCreateAesItemViewBoobyTrapSecondary";
|
||||
|
||||
AreaEffectSimulation::AesItemView iv;
|
||||
iv.effectStateId(AreaEffectSimulation::AesEffectState_def::EsActivated);
|
||||
@@ -286,10 +285,10 @@ void CesTestsBoobyTrap::tryCreateAesItemViewBoobyTrapSecondary()
|
||||
setPos(iv.form(), m_refPos.geographic( 50, 50));
|
||||
setPos(iv.form(), m_refPos.geographic( 50, -20));
|
||||
|
||||
DEBUG_LOG(m_logger) << "Publishing AesItemView";
|
||||
DEBUG_LOG() << "Publishing AesItemView";
|
||||
if (!m_aesDts->publish(iv))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error requesting create AesItemViewBoobyTrapSecondary";
|
||||
ERROR_LOG() << "Error requesting create AesItemViewBoobyTrapSecondary";
|
||||
failExit();
|
||||
}
|
||||
}
|
||||
@@ -297,7 +296,7 @@ void CesTestsBoobyTrap::tryCreateAesItemViewBoobyTrapSecondary()
|
||||
|
||||
void CesTestsBoobyTrap::onEventChanged(const CentralEffectSimulation::ParticipantEvent &eventData, DataModification modType)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "onParticipantEventChanged participantId=" << eventData.participantId()
|
||||
DEBUG_LOG() << "onParticipantEventChanged participantId=" << eventData.participantId()
|
||||
<< " eventType=" << eventData.eventTypeId()
|
||||
<< " aesItemId=" << eventData.aesItemId();
|
||||
if (modType == DataModification::eRemoved ||
|
||||
@@ -306,7 +305,7 @@ void CesTestsBoobyTrap::onEventChanged(const CentralEffectSimulation::Participan
|
||||
if (eventData.eventTypeId() == ProjectDataManagement::EventType_def::HitMine)
|
||||
{
|
||||
m_countEventBoobyTrap ++;
|
||||
DEBUG_LOG(m_logger) << "m_countEventBoobyTrap=" << m_countEventBoobyTrap
|
||||
DEBUG_LOG() << "m_countEventBoobyTrap=" << m_countEventBoobyTrap
|
||||
<< " eventData.aesItemId()=" << eventData.aesItemId()
|
||||
<< " eventData.participantId()=" << eventData.participantId();
|
||||
}
|
||||
@@ -322,14 +321,14 @@ Core::FunctionReplyObject CesTestsBoobyTrap::fillFro(int participantId, bool bSu
|
||||
|
||||
void CesTestsBoobyTrap::failExit()
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "FailExit";
|
||||
DEBUG_LOG() << "FailExit";
|
||||
m_bTestsSuccessful = false;
|
||||
QTimer::singleShot(200, qApp, QCoreApplication::quit);
|
||||
}
|
||||
|
||||
void CesTestsBoobyTrap::ExitSuccess()
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "ExitSuccess";
|
||||
DEBUG_LOG() << "ExitSuccess";
|
||||
m_bTestsSuccessful = true;
|
||||
QTimer::singleShot(200, qApp, &QCoreApplication::quit);
|
||||
}
|
||||
|
||||
-1
@@ -87,7 +87,6 @@ private:
|
||||
bool m_bTestsSuccessful;
|
||||
|
||||
LtsCoordTrans::UtmCoordinate m_refPos;
|
||||
NGL::INGLLogger &m_logger;
|
||||
int m_testId;
|
||||
int m_participantIndex;
|
||||
int m_id;
|
||||
|
||||
+23
-24
@@ -33,7 +33,6 @@ CesTestsGasPipe::CesTestsGasPipe(QObject *parent)
|
||||
: QObject(parent)
|
||||
, m_bTestsSuccessful(true)
|
||||
, m_refPos(LtsCoordTrans::UtmCoordinate::fromMgrs(QStringLiteral("32UMD8000090000")))
|
||||
, m_logger(getLogger("CesTestGasPipe"))
|
||||
, m_testId(0)
|
||||
, m_participantIndex(0)
|
||||
, m_id(20)
|
||||
@@ -52,7 +51,7 @@ bool CesTestsGasPipe::init(int domainId, int exerciseId, int testId)
|
||||
bool bRet = true;
|
||||
int equipmentTypeIdVehicle = 35;
|
||||
int equipmentTypeIdSoldier = 30; // dds-Topic Participant-Management::Type
|
||||
INFO_LOG(m_logger) << "init begin";
|
||||
INFO_LOG() << "init begin";
|
||||
|
||||
m_testId = testId;
|
||||
|
||||
@@ -138,7 +137,7 @@ bool CesTestsGasPipe::init(int domainId, int exerciseId, int testId)
|
||||
|
||||
void CesTestsGasPipe::startTest()
|
||||
{
|
||||
INFO_LOG(m_logger) << "startTest m_testId=" << m_testId;
|
||||
INFO_LOG() << "startTest m_testId=" << m_testId;
|
||||
if (m_testId <= 1) // 1 SMART
|
||||
{
|
||||
m_explosionSingle = m_refPos.geographic(5, 5);
|
||||
@@ -163,7 +162,7 @@ void CesTestsGasPipe::startTest()
|
||||
}
|
||||
else
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Unknown test id = " << m_testId;
|
||||
ERROR_LOG() << "Unknown test id = " << m_testId;
|
||||
failExit();
|
||||
}
|
||||
QTimer::singleShot(8000, this, &CesTestsGasPipe::failExit);
|
||||
@@ -185,10 +184,10 @@ void CesTestsGasPipe::tryCreateDynamicParticipantData()
|
||||
dp.sampleTime(esTime);
|
||||
m_DynamicParticipantIndex++;
|
||||
|
||||
DEBUG_LOG(m_logger) << "Publishing DynamicParticipantData";
|
||||
DEBUG_LOG() << "Publishing DynamicParticipantData";
|
||||
if (!m_ppmDts->publish(dp))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error requesting create ParticipantPosition";
|
||||
ERROR_LOG() << "Error requesting create ParticipantPosition";
|
||||
failExit();
|
||||
}
|
||||
}
|
||||
@@ -212,10 +211,10 @@ void CesTestsGasPipe::tryCreateParticipantPosition()
|
||||
pp.sampleTime(posTime);
|
||||
pp.pos(pos);
|
||||
|
||||
DEBUG_LOG(m_logger) << "Publishing ParticipantPosition";
|
||||
DEBUG_LOG() << "Publishing ParticipantPosition";
|
||||
if (!m_ppmDts->publish(pp))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error requesting create ParticipantPosition";
|
||||
ERROR_LOG() << "Error requesting create ParticipantPosition";
|
||||
failExit();
|
||||
}
|
||||
}
|
||||
@@ -229,10 +228,10 @@ void CesTestsGasPipe::tryCreateParticipant()
|
||||
pt.id(m_id);
|
||||
pt.equipmentNumber(m_equipmentNumber);
|
||||
|
||||
DEBUG_LOG(m_logger) << "Publishing Participant";
|
||||
DEBUG_LOG() << "Publishing Participant";
|
||||
if (!m_ppmDts->publish(pt))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error requesting create Participant";
|
||||
ERROR_LOG() << "Error requesting create Participant";
|
||||
failExit();
|
||||
}
|
||||
m_id++;
|
||||
@@ -241,7 +240,7 @@ void CesTestsGasPipe::tryCreateParticipant()
|
||||
|
||||
void CesTestsGasPipe::checkParticipantEvent()
|
||||
{
|
||||
INFO_LOG(m_logger) << "checkParicipantEvent";
|
||||
INFO_LOG() << "checkParicipantEvent";
|
||||
m_cesDtc->waitForHistoricalDataParticipantEvent();
|
||||
|
||||
switch (m_testId)
|
||||
@@ -274,10 +273,10 @@ void CesTestsGasPipe::tryCreateTypeVehicle()
|
||||
ty.name("HMMWV Utility");
|
||||
|
||||
|
||||
DEBUG_LOG(m_logger) << "Publishing Type";
|
||||
DEBUG_LOG() << "Publishing Type";
|
||||
if (!m_ppmDts->publish(ty))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error requesting create Type";
|
||||
ERROR_LOG() << "Error requesting create Type";
|
||||
failExit();
|
||||
}
|
||||
}
|
||||
@@ -295,10 +294,10 @@ void CesTestsGasPipe::tryCreateTypeSoldier()
|
||||
ty.name("Soldier");
|
||||
|
||||
|
||||
DEBUG_LOG(m_logger) << "Publishing Type";
|
||||
DEBUG_LOG() << "Publishing Type";
|
||||
if (!m_ppmDts->publish(ty))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error requesting create Type";
|
||||
ERROR_LOG() << "Error requesting create Type";
|
||||
failExit();
|
||||
}
|
||||
}
|
||||
@@ -309,7 +308,7 @@ static void setPos(std::vector<Core::GeoPosition> &cont, const QPointF &pos)
|
||||
|
||||
void CesTestsGasPipe::tryCreateAesItemViewGasPipe()
|
||||
{
|
||||
INFO_LOG(m_logger) << "trying to send AesItemView AtExplosionAreaSingleExplosions";
|
||||
INFO_LOG() << "trying to send AesItemView AtExplosionAreaSingleExplosions";
|
||||
|
||||
AreaEffectSimulation::AesItemView iv;
|
||||
iv.effectStateId(AreaEffectSimulation::AesEffectState_def::EsActivated);
|
||||
@@ -332,30 +331,30 @@ void CesTestsGasPipe::tryCreateAesItemViewGasPipe()
|
||||
setPos(iv.form(), m_refPos.geographic( 10, 30));
|
||||
setPos(iv.form(), m_refPos.geographic( 10, -10));
|
||||
|
||||
DEBUG_LOG(m_logger) << "Publishing AesItemView";
|
||||
DEBUG_LOG() << "Publishing AesItemView";
|
||||
if (!m_aesDts->publish(iv))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error requesting create AesItemViewSingleExplosions";
|
||||
ERROR_LOG() << "Error requesting create AesItemViewSingleExplosions";
|
||||
failExit();
|
||||
}
|
||||
}
|
||||
|
||||
void CesTestsGasPipe::tryCreateChargeType()
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Publishing ChargeType";
|
||||
DEBUG_LOG() << "Publishing ChargeType";
|
||||
ProjectDataManagement::ChargeType ct;
|
||||
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";
|
||||
ERROR_LOG() << "Error publish ChargeType";
|
||||
failExit();
|
||||
}
|
||||
}
|
||||
|
||||
void CesTestsGasPipe::onEventChanged(const CentralEffectSimulation::ParticipantEvent &eventData, DataModification modType)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "onParticipantEventChanged participantId=" << eventData.participantId()
|
||||
DEBUG_LOG() << "onParticipantEventChanged participantId=" << eventData.participantId()
|
||||
<< " eventType=" << eventData.eventTypeId();
|
||||
if (modType == DataModification::eRemoved ||
|
||||
modType == DataModification::eModified)
|
||||
@@ -363,7 +362,7 @@ void CesTestsGasPipe::onEventChanged(const CentralEffectSimulation::ParticipantE
|
||||
if (eventData.eventTypeId() == ProjectDataManagement::EventType_def::HitGasPipe)
|
||||
{
|
||||
m_countEventGasPipe ++;
|
||||
DEBUG_LOG(m_logger) << "m_countEventGasPipe=" << m_countEventGasPipe;
|
||||
DEBUG_LOG() << "m_countEventGasPipe=" << m_countEventGasPipe;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -377,14 +376,14 @@ Core::FunctionReplyObject CesTestsGasPipe::fillFro(int participantId, bool bSucc
|
||||
|
||||
void CesTestsGasPipe::failExit()
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "FailExit";
|
||||
DEBUG_LOG() << "FailExit";
|
||||
m_bTestsSuccessful = false;
|
||||
QTimer::singleShot(50, qApp, QCoreApplication::quit);
|
||||
}
|
||||
|
||||
void CesTestsGasPipe::ExitSuccess()
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "ExitSuccess";
|
||||
DEBUG_LOG() << "ExitSuccess";
|
||||
m_bTestsSuccessful = true;
|
||||
QTimer::singleShot(200, qApp, &QCoreApplication::quit);
|
||||
}
|
||||
|
||||
-1
@@ -90,7 +90,6 @@ private:
|
||||
bool m_bTestsSuccessful;
|
||||
|
||||
LtsCoordTrans::UtmCoordinate m_refPos;
|
||||
NGL::INGLLogger &m_logger;
|
||||
int m_testId;
|
||||
int m_participantIndex;
|
||||
int m_id;
|
||||
|
||||
+23
-24
@@ -36,7 +36,6 @@ CesTestsGeopairing::CesTestsGeopairing(QObject *parent)
|
||||
: QObject(parent)
|
||||
, m_bTestsSuccessful(true)
|
||||
, m_housePos(LtsCoordTrans::UtmCoordinate::fromMgrs(QStringLiteral("32UMD8000090000")))
|
||||
, m_logger(getLogger("CesTestsGeopairing"))
|
||||
, m_testId(0)
|
||||
{}
|
||||
|
||||
@@ -46,7 +45,7 @@ CesTestsGeopairing::~CesTestsGeopairing()
|
||||
bool CesTestsGeopairing::init(int domainId, int exerciseId, int testId)
|
||||
{
|
||||
bool bRet = true;
|
||||
INFO_LOG(m_logger) << "init begin";
|
||||
INFO_LOG() << "init begin";
|
||||
|
||||
m_testId = testId;
|
||||
|
||||
@@ -81,7 +80,7 @@ bool CesTestsGeopairing::init(int domainId, int exerciseId, int testId)
|
||||
|
||||
void CesTestsGeopairing::startTest()
|
||||
{
|
||||
INFO_LOG(m_logger) << "startTest m_testId=" << m_testId;
|
||||
INFO_LOG() << "startTest m_testId=" << m_testId;
|
||||
switch (m_testId)
|
||||
{
|
||||
case 1:
|
||||
@@ -93,7 +92,7 @@ void CesTestsGeopairing::startTest()
|
||||
}
|
||||
case 2:
|
||||
{
|
||||
INFO_LOG(m_logger) << "Geopairing IGLA";
|
||||
INFO_LOG() << "Geopairing IGLA";
|
||||
QTimer::singleShot(0, this, &CesTestsGeopairing::tryCreateMeteoData);
|
||||
QTimer::singleShot(250, this, &CesTestsGeopairing::tryCreateSoldierPosition);
|
||||
QTimer::singleShot(500, this, &CesTestsGeopairing::tryCreateAircraftPosition);
|
||||
@@ -103,7 +102,7 @@ void CesTestsGeopairing::startTest()
|
||||
}
|
||||
case 3:
|
||||
{
|
||||
INFO_LOG(m_logger) << "Geopairing IGLA Damage States";
|
||||
INFO_LOG() << "Geopairing IGLA Damage States";
|
||||
QTimer::singleShot(0, this, &CesTestsGeopairing::tryCreateMeteoData);
|
||||
QTimer::singleShot(250, this, &CesTestsGeopairing::tryCreateSoldierPosition);
|
||||
QTimer::singleShot(500, this, &CesTestsGeopairing::tryCreateAircraftPosition);
|
||||
@@ -113,7 +112,7 @@ void CesTestsGeopairing::startTest()
|
||||
}
|
||||
case 4: // MK 19
|
||||
{
|
||||
INFO_LOG(m_logger) << "Geopairing MK 19";
|
||||
INFO_LOG() << "Geopairing MK 19";
|
||||
QTimer::singleShot(0, this, &CesTestsGeopairing::tryCreateMeteoData);
|
||||
QTimer::singleShot(250, this, &CesTestsGeopairing::tryCreateSoldierPosition);
|
||||
QTimer::singleShot(500, this, &CesTestsGeopairing::tryCreateAircraftPosition);
|
||||
@@ -123,7 +122,7 @@ void CesTestsGeopairing::startTest()
|
||||
}
|
||||
default:
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Unknown test id = " << m_testId;
|
||||
ERROR_LOG() << "Unknown test id = " << m_testId;
|
||||
failExit();
|
||||
}
|
||||
}
|
||||
@@ -142,10 +141,10 @@ void CesTestsGeopairing::tryCreateMeteoData()
|
||||
md.windDirection(0.0);
|
||||
md.temperature(20.0);
|
||||
md.pressure(1013);
|
||||
DEBUG_LOG(m_logger) << "Publishing MeteoData";
|
||||
DEBUG_LOG() << "Publishing MeteoData";
|
||||
if (!m_mdmDts->publish(md))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error requesting create MeteoData";
|
||||
ERROR_LOG() << "Error requesting create MeteoData";
|
||||
failExit();
|
||||
}
|
||||
}
|
||||
@@ -167,10 +166,10 @@ void CesTestsGeopairing::tryCreateSoldierPosition()
|
||||
pp.roomId(0);
|
||||
pp.sampleTime(posTime);
|
||||
|
||||
DEBUG_LOG(m_logger) << "Publishing ParticipantPosition";
|
||||
DEBUG_LOG() << "Publishing ParticipantPosition";
|
||||
if (!m_ppmDts->publish(pp))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error requesting create ParticipantPosition";
|
||||
ERROR_LOG() << "Error requesting create ParticipantPosition";
|
||||
failExit();
|
||||
}
|
||||
}
|
||||
@@ -192,10 +191,10 @@ void CesTestsGeopairing::tryCreateAircraftPosition()
|
||||
pp.roomId(0);
|
||||
pp.sampleTime(posTime);
|
||||
|
||||
DEBUG_LOG(m_logger) << "Publishing ParticipantPosition";
|
||||
DEBUG_LOG() << "Publishing ParticipantPosition";
|
||||
if (!m_ppmDts->publish(pp))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error requesting create ParticipantPosition";
|
||||
ERROR_LOG() << "Error requesting create ParticipantPosition";
|
||||
failExit();
|
||||
}
|
||||
}
|
||||
@@ -256,10 +255,10 @@ void CesTestsGeopairing::tryCreateGeopairingData()
|
||||
const Core::GeoPosition pos(Core::GeoPosition(posF.x(), posF.y(), 0));
|
||||
gd.position(pos);
|
||||
|
||||
DEBUG_LOG(m_logger) << "Publishing GeopairingData";
|
||||
DEBUG_LOG() << "Publishing GeopairingData";
|
||||
if (!m_tabDts->publish(gd))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error requesting create GeopairingData";
|
||||
ERROR_LOG() << "Error requesting create GeopairingData";
|
||||
failExit();
|
||||
}
|
||||
|
||||
@@ -344,10 +343,10 @@ void CesTestsGeopairing::tryCreateGeopairingDataIGLA()
|
||||
gd.position().lon(lon);
|
||||
gd.position().lat(lat);
|
||||
|
||||
DEBUG_LOG(m_logger) << "Publishing GeopairingData";
|
||||
DEBUG_LOG() << "Publishing GeopairingData";
|
||||
if (!m_tabDts->publish(gd))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error requesting create GeopairingData";
|
||||
ERROR_LOG() << "Error requesting create GeopairingData";
|
||||
failExit();
|
||||
}
|
||||
|
||||
@@ -390,10 +389,10 @@ void CesTestsGeopairing::tryCreateGeopairingDataMK19()
|
||||
gd.position().lon(lon);
|
||||
gd.position().lat(lat);
|
||||
|
||||
DEBUG_LOG(m_logger) << "Publishing GeopairingData";
|
||||
DEBUG_LOG() << "Publishing GeopairingData";
|
||||
if (!m_tabDts->publish(gd))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error requesting create GeopairingData";
|
||||
ERROR_LOG() << "Error requesting create GeopairingData";
|
||||
failExit();
|
||||
}
|
||||
|
||||
@@ -402,12 +401,12 @@ void CesTestsGeopairing::tryCreateGeopairingDataMK19()
|
||||
|
||||
void CesTestsGeopairing::checkGeopairing()
|
||||
{
|
||||
INFO_LOG(m_logger) << "checkMessageOnDds";
|
||||
INFO_LOG() << "checkMessageOnDds";
|
||||
m_aesDtc->waitForHistoricalDataExplosionSingle();
|
||||
QMap < int ,AreaEffectSimulation::ExplosionSingle> explosionSingles = m_aesDtc->explosionSingles();
|
||||
INFO_LOG(m_logger) << "explosionSingles.size()" << explosionSingles.size();
|
||||
INFO_LOG() << "explosionSingles.size()" << explosionSingles.size();
|
||||
AreaEffectSimulation::ExplosionSingle explosionSingle = explosionSingles.last();
|
||||
DEBUG_LOG(m_logger) << "explosionSingle.lat=" << explosionSingle.impactPosition().lat()
|
||||
DEBUG_LOG() << "explosionSingle.lat=" << explosionSingle.impactPosition().lat()
|
||||
<< " lon=" << explosionSingle.impactPosition().lon();
|
||||
|
||||
switch (m_testId)
|
||||
@@ -429,14 +428,14 @@ void CesTestsGeopairing::checkGeopairing()
|
||||
|
||||
void CesTestsGeopairing::failExit()
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "FailExit";
|
||||
DEBUG_LOG() << "FailExit";
|
||||
m_bTestsSuccessful = false;
|
||||
QTimer::singleShot(50, qApp, &QCoreApplication::quit);
|
||||
}
|
||||
|
||||
void CesTestsGeopairing::ExitSuccess()
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "ExitSuccess";
|
||||
DEBUG_LOG() << "ExitSuccess";
|
||||
m_bTestsSuccessful = true;
|
||||
QTimer::singleShot(50, qApp, &QCoreApplication::quit);
|
||||
}
|
||||
|
||||
-1
@@ -68,7 +68,6 @@ private:
|
||||
bool m_bTestsSuccessful;
|
||||
|
||||
LtsCoordTrans::UtmCoordinate m_housePos;
|
||||
NGL::INGLLogger &m_logger;
|
||||
int m_testId;
|
||||
};
|
||||
|
||||
|
||||
+23
-24
@@ -36,7 +36,6 @@ CesTestsGeopairing::CesTestsGeopairing(QObject *parent)
|
||||
: QObject(parent)
|
||||
, m_bTestsSuccessful(true)
|
||||
, m_housePos(LtsCoordTrans::UtmCoordinate::fromMgrs(QStringLiteral("32UMD8000090000")))
|
||||
, m_logger(getLogger("CesTestsGeopairing"))
|
||||
, m_testId(0)
|
||||
{}
|
||||
|
||||
@@ -46,7 +45,7 @@ CesTestsGeopairing::~CesTestsGeopairing()
|
||||
bool CesTestsGeopairing::init(int domainId, int exerciseId, int testId)
|
||||
{
|
||||
bool bRet = true;
|
||||
INFO_LOG(m_logger) << "init begin";
|
||||
INFO_LOG() << "init begin";
|
||||
|
||||
m_testId = testId;
|
||||
|
||||
@@ -81,7 +80,7 @@ bool CesTestsGeopairing::init(int domainId, int exerciseId, int testId)
|
||||
|
||||
void CesTestsGeopairing::startTest()
|
||||
{
|
||||
INFO_LOG(m_logger) << "startTest m_testId=" << m_testId;
|
||||
INFO_LOG() << "startTest m_testId=" << m_testId;
|
||||
switch (m_testId)
|
||||
{
|
||||
case 1: // Geopairing Mortar
|
||||
@@ -92,7 +91,7 @@ void CesTestsGeopairing::startTest()
|
||||
}
|
||||
case 2: // IGLA Target Detection
|
||||
{
|
||||
INFO_LOG(m_logger) << "Geopairing IGLA";
|
||||
INFO_LOG() << "Geopairing IGLA";
|
||||
//QTimer::singleShot(500, this, &CesTestsGeopairing::tryCreateAircraftPosition);
|
||||
QTimer::singleShot(750, this, &CesTestsGeopairing::tryCreateGeopairingDataIGLA);
|
||||
QTimer::singleShot(1000, this, &CesTestsGeopairing::checkGeopairing);
|
||||
@@ -100,7 +99,7 @@ void CesTestsGeopairing::startTest()
|
||||
}
|
||||
case 3: // IGLA Target Fire
|
||||
{
|
||||
INFO_LOG(m_logger) << "Geopairing IGLA Target Fire";
|
||||
INFO_LOG() << "Geopairing IGLA Target Fire";
|
||||
QTimer::singleShot(500, this, &CesTestsGeopairing::tryCreateAircraftPosition);
|
||||
QTimer::singleShot(750, this, &CesTestsGeopairing::tryCreateGeopairingDataIGLATarget);
|
||||
QTimer::singleShot(1000, this, &CesTestsGeopairing::checkGeopairing);
|
||||
@@ -108,14 +107,14 @@ void CesTestsGeopairing::startTest()
|
||||
}
|
||||
case 4: // MK 19
|
||||
{
|
||||
INFO_LOG(m_logger) << "Geopairing MK 19";
|
||||
INFO_LOG() << "Geopairing MK 19";
|
||||
QTimer::singleShot(750, this, &CesTestsGeopairing::tryCreateGeopairingDataMK19);
|
||||
QTimer::singleShot(1000, this, &CesTestsGeopairing::checkGeopairing);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Unknown test id = " << m_testId;
|
||||
ERROR_LOG() << "Unknown test id = " << m_testId;
|
||||
failExit();
|
||||
}
|
||||
}
|
||||
@@ -140,10 +139,10 @@ void CesTestsGeopairing::tryCreateSoldierPosition()
|
||||
pp.roomId(0);
|
||||
pp.sampleTime(posTime);
|
||||
|
||||
DEBUG_LOG(m_logger) << "Publishing ParticipantPosition";
|
||||
DEBUG_LOG() << "Publishing ParticipantPosition";
|
||||
if (!m_ppmDts->publish(pp))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error requesting create ParticipantPosition";
|
||||
ERROR_LOG() << "Error requesting create ParticipantPosition";
|
||||
failExit();
|
||||
}
|
||||
}
|
||||
@@ -165,10 +164,10 @@ void CesTestsGeopairing::tryCreateAircraftPosition()
|
||||
pp.roomId(0);
|
||||
pp.sampleTime(posTime);
|
||||
|
||||
DEBUG_LOG(m_logger) << "Publishing ParticipantPosition";
|
||||
DEBUG_LOG() << "Publishing ParticipantPosition";
|
||||
if (!m_ppmDts->publish(pp))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error requesting create ParticipantPosition";
|
||||
ERROR_LOG() << "Error requesting create ParticipantPosition";
|
||||
failExit();
|
||||
}
|
||||
}
|
||||
@@ -212,10 +211,10 @@ void CesTestsGeopairing::tryCreateGeopairingData()
|
||||
gd.position().lon(lon);
|
||||
gd.position().lat(lat);
|
||||
|
||||
DEBUG_LOG(m_logger) << "Publishing GeopairingData";
|
||||
DEBUG_LOG() << "Publishing GeopairingData";
|
||||
if (!m_tabDts->publish(gd))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error requesting create GeopairingData";
|
||||
ERROR_LOG() << "Error requesting create GeopairingData";
|
||||
failExit();
|
||||
}
|
||||
|
||||
@@ -259,10 +258,10 @@ void CesTestsGeopairing::tryCreateGeopairingDataIGLA()
|
||||
gd.position().lon(lon);
|
||||
gd.position().lat(lat);
|
||||
|
||||
DEBUG_LOG(m_logger) << "Publishing GeopairingData";
|
||||
DEBUG_LOG() << "Publishing GeopairingData";
|
||||
if (!m_tabDts->publish(gd))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error requesting create GeopairingData";
|
||||
ERROR_LOG() << "Error requesting create GeopairingData";
|
||||
failExit();
|
||||
}
|
||||
|
||||
@@ -305,10 +304,10 @@ void CesTestsGeopairing::tryCreateGeopairingDataIGLATarget()
|
||||
gd.position().lon(lon);
|
||||
gd.position().lat(lat);
|
||||
|
||||
DEBUG_LOG(m_logger) << "Publishing GeopairingData";
|
||||
DEBUG_LOG() << "Publishing GeopairingData";
|
||||
if (!m_tabDts->publish(gd))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error requesting create GeopairingData";
|
||||
ERROR_LOG() << "Error requesting create GeopairingData";
|
||||
failExit();
|
||||
}
|
||||
|
||||
@@ -351,10 +350,10 @@ void CesTestsGeopairing::tryCreateGeopairingDataMK19()
|
||||
gd.position().lon(lon);
|
||||
gd.position().lat(lat);
|
||||
|
||||
DEBUG_LOG(m_logger) << "Publishing GeopairingData";
|
||||
DEBUG_LOG() << "Publishing GeopairingData";
|
||||
if (!m_tabDts->publish(gd))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error requesting create GeopairingData";
|
||||
ERROR_LOG() << "Error requesting create GeopairingData";
|
||||
failExit();
|
||||
}
|
||||
|
||||
@@ -363,7 +362,7 @@ void CesTestsGeopairing::tryCreateGeopairingDataMK19()
|
||||
|
||||
void CesTestsGeopairing::checkGeopairing()
|
||||
{
|
||||
INFO_LOG(m_logger) << "checkMessageOnDds";
|
||||
INFO_LOG() << "checkMessageOnDds";
|
||||
|
||||
switch (m_testId)
|
||||
{
|
||||
@@ -371,9 +370,9 @@ void CesTestsGeopairing::checkGeopairing()
|
||||
{
|
||||
m_aesDtc->waitForHistoricalDataExplosionSingle();
|
||||
QMap < int ,AreaEffectSimulation::ExplosionSingle> explosionSingles = m_aesDtc->explosionSingles();
|
||||
INFO_LOG(m_logger) << "explosionSingles.size()" << explosionSingles.size();
|
||||
INFO_LOG() << "explosionSingles.size()" << explosionSingles.size();
|
||||
AreaEffectSimulation::ExplosionSingle explosionSingle = explosionSingles.last();
|
||||
DEBUG_LOG(m_logger) << "explosionSingle.lat=" << explosionSingle.impactPosition().lat()
|
||||
DEBUG_LOG() << "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))
|
||||
@@ -392,14 +391,14 @@ void CesTestsGeopairing::checkGeopairing()
|
||||
|
||||
void CesTestsGeopairing::failExit()
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "FailExit";
|
||||
DEBUG_LOG() << "FailExit";
|
||||
m_bTestsSuccessful = false;
|
||||
QTimer::singleShot(50, qApp, &QCoreApplication::quit);
|
||||
}
|
||||
|
||||
void CesTestsGeopairing::ExitSuccess()
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "ExitSuccess";
|
||||
DEBUG_LOG() << "ExitSuccess";
|
||||
m_bTestsSuccessful = true;
|
||||
QTimer::singleShot(50, qApp, &QCoreApplication::quit);
|
||||
}
|
||||
|
||||
-1
@@ -68,7 +68,6 @@ private:
|
||||
bool m_bTestsSuccessful;
|
||||
|
||||
LtsCoordTrans::UtmCoordinate m_housePos;
|
||||
NGL::INGLLogger &m_logger;
|
||||
int m_testId;
|
||||
};
|
||||
|
||||
|
||||
+23
-24
@@ -72,7 +72,6 @@ CesTestsMineAreas::CesTestsMineAreas(QObject *parent)
|
||||
: QObject(parent)
|
||||
, m_bTestsSuccessful(true)
|
||||
, m_refPos(LtsCoordTrans::UtmCoordinate::fromMgrs(QStringLiteral("32UMD8000090000")))
|
||||
, m_logger(getLogger("CesTestMineAreas"))
|
||||
, m_testId(0)
|
||||
, m_participantIndex(0)
|
||||
, m_id(20)
|
||||
@@ -91,7 +90,7 @@ bool CesTestsMineAreas::init(int domainId, int exerciseId, int testId)
|
||||
bool bRet = true;
|
||||
int equipmentTypeIdVehicle = 35;
|
||||
int equipmentTypeIdSoldier = 30; // dds-Topic Participant-Management::Type
|
||||
INFO_LOG(m_logger) << "init begin";
|
||||
INFO_LOG() << "init begin";
|
||||
|
||||
m_testId = testId;
|
||||
|
||||
@@ -177,7 +176,7 @@ bool CesTestsMineAreas::init(int domainId, int exerciseId, int testId)
|
||||
|
||||
void CesTestsMineAreas::startTest()
|
||||
{
|
||||
INFO_LOG(m_logger) << "startTest m_testId=" << m_testId;
|
||||
INFO_LOG() << "startTest m_testId=" << m_testId;
|
||||
if (m_testId <= 1) // 1 SMART
|
||||
{
|
||||
m_explosionSingle = m_refPos.geographic(5, 5);
|
||||
@@ -202,7 +201,7 @@ void CesTestsMineAreas::startTest()
|
||||
}
|
||||
else
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Unknown test id = " << m_testId;
|
||||
ERROR_LOG() << "Unknown test id = " << m_testId;
|
||||
failExit();
|
||||
}
|
||||
QTimer::singleShot(8000, this, &CesTestsMineAreas::failExit);
|
||||
@@ -224,10 +223,10 @@ void CesTestsMineAreas::tryCreateDynamicParticipantData()
|
||||
dp.sampleTime(esTime);
|
||||
m_DynamicParticipantIndex++;
|
||||
|
||||
DEBUG_LOG(m_logger) << "Publishing DynamicParticipantData";
|
||||
DEBUG_LOG() << "Publishing DynamicParticipantData";
|
||||
if (!m_ppmDts->publish(dp))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error requesting create ParticipantPosition";
|
||||
ERROR_LOG() << "Error requesting create ParticipantPosition";
|
||||
failExit();
|
||||
}
|
||||
}
|
||||
@@ -251,10 +250,10 @@ void CesTestsMineAreas::tryCreateParticipantPosition()
|
||||
pp.sampleTime(posTime);
|
||||
pp.pos(pos);
|
||||
|
||||
DEBUG_LOG(m_logger) << "Publishing ParticipantPosition";
|
||||
DEBUG_LOG() << "Publishing ParticipantPosition";
|
||||
if (!m_ppmDts->publish(pp))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error requesting create ParticipantPosition";
|
||||
ERROR_LOG() << "Error requesting create ParticipantPosition";
|
||||
failExit();
|
||||
}
|
||||
}
|
||||
@@ -268,10 +267,10 @@ void CesTestsMineAreas::tryCreateParticipant()
|
||||
pt.id(m_id);
|
||||
pt.equipmentNumber(m_equipmentNumber);
|
||||
|
||||
DEBUG_LOG(m_logger) << "Publishing Participant";
|
||||
DEBUG_LOG() << "Publishing Participant";
|
||||
if (!m_ppmDts->publish(pt))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error requesting create Participant";
|
||||
ERROR_LOG() << "Error requesting create Participant";
|
||||
failExit();
|
||||
}
|
||||
m_id++;
|
||||
@@ -280,7 +279,7 @@ void CesTestsMineAreas::tryCreateParticipant()
|
||||
|
||||
void CesTestsMineAreas::checkParticipantEvent()
|
||||
{
|
||||
INFO_LOG(m_logger) << "checkParicipantEvent";
|
||||
INFO_LOG() << "checkParicipantEvent";
|
||||
m_cesDtc->waitForHistoricalDataParticipantEvent();
|
||||
|
||||
switch (m_testId)
|
||||
@@ -313,10 +312,10 @@ void CesTestsMineAreas::tryCreateTypeVehicle()
|
||||
ty.name("HMMWV Utility");
|
||||
|
||||
|
||||
DEBUG_LOG(m_logger) << "Publishing Type";
|
||||
DEBUG_LOG() << "Publishing Type";
|
||||
if (!m_ppmDts->publish(ty))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error requesting create Type";
|
||||
ERROR_LOG() << "Error requesting create Type";
|
||||
failExit();
|
||||
}
|
||||
}
|
||||
@@ -334,10 +333,10 @@ void CesTestsMineAreas::tryCreateTypeSoldier()
|
||||
ty.name("Soldier");
|
||||
|
||||
|
||||
DEBUG_LOG(m_logger) << "Publishing Type";
|
||||
DEBUG_LOG() << "Publishing Type";
|
||||
if (!m_ppmDts->publish(ty))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error requesting create Type";
|
||||
ERROR_LOG() << "Error requesting create Type";
|
||||
failExit();
|
||||
}
|
||||
}
|
||||
@@ -348,7 +347,7 @@ static void setPos(std::vector<Core::GeoPosition> &cont, const QPointF &pos)
|
||||
|
||||
void CesTestsMineAreas::tryCreateAesItemViewMineArea()
|
||||
{
|
||||
INFO_LOG(m_logger) << "trying to send AesItemView AtExplosionAreaSingleExplosions";
|
||||
INFO_LOG() << "trying to send AesItemView AtExplosionAreaSingleExplosions";
|
||||
|
||||
AreaEffectSimulation::AesItemView iv;
|
||||
iv.effectStateId(AreaEffectSimulation::AesEffectState_def::EsActivated);
|
||||
@@ -371,30 +370,30 @@ void CesTestsMineAreas::tryCreateAesItemViewMineArea()
|
||||
setPos(iv.form(), m_refPos.geographic( 10, 30));
|
||||
setPos(iv.form(), m_refPos.geographic( 10, -10));
|
||||
|
||||
DEBUG_LOG(m_logger) << "Publishing AesItemView";
|
||||
DEBUG_LOG() << "Publishing AesItemView";
|
||||
if (!m_aesDts->publish(iv))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error requesting create AesItemViewSingleExplosions";
|
||||
ERROR_LOG() << "Error requesting create AesItemViewSingleExplosions";
|
||||
failExit();
|
||||
}
|
||||
}
|
||||
|
||||
void CesTestsMineAreas::tryCreateChargeType()
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Publishing ChargeType";
|
||||
DEBUG_LOG() << "Publishing ChargeType";
|
||||
ProjectDataManagement::ChargeType ct;
|
||||
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";
|
||||
ERROR_LOG() << "Error publish ChargeType";
|
||||
failExit();
|
||||
}
|
||||
}
|
||||
|
||||
void CesTestsMineAreas::onEventChanged(const CentralEffectSimulation::ParticipantEvent &eventData, DataModification modType)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "onParticipantEventChanged participantId=" << eventData.participantId()
|
||||
DEBUG_LOG() << "onParticipantEventChanged participantId=" << eventData.participantId()
|
||||
<< " eventType=" << eventData.eventTypeId();
|
||||
if (modType == DataModification::eRemoved ||
|
||||
modType == DataModification::eModified)
|
||||
@@ -402,7 +401,7 @@ void CesTestsMineAreas::onEventChanged(const CentralEffectSimulation::Participan
|
||||
if (eventData.eventTypeId() == ProjectDataManagement::EventType_def::HitGasPipe)
|
||||
{
|
||||
m_countEventMineAreas ++;
|
||||
DEBUG_LOG(m_logger) << "m_countEventMineAreas=" << m_countEventMineAreas;
|
||||
DEBUG_LOG() << "m_countEventMineAreas=" << m_countEventMineAreas;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -416,14 +415,14 @@ Core::FunctionReplyObject CesTestsMineAreas::fillFro(int participantId, bool bSu
|
||||
|
||||
void CesTestsMineAreas::failExit()
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "FailExit";
|
||||
DEBUG_LOG() << "FailExit";
|
||||
m_bTestsSuccessful = false;
|
||||
QTimer::singleShot(50, qApp, QCoreApplication::quit);
|
||||
}
|
||||
|
||||
void CesTestsMineAreas::ExitSuccess()
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "ExitSuccess";
|
||||
DEBUG_LOG() << "ExitSuccess";
|
||||
m_bTestsSuccessful = true;
|
||||
QTimer::singleShot(200, qApp, &QCoreApplication::quit);
|
||||
}
|
||||
|
||||
-1
@@ -90,7 +90,6 @@ private:
|
||||
bool m_bTestsSuccessful;
|
||||
|
||||
LtsCoordTrans::UtmCoordinate m_refPos;
|
||||
NGL::INGLLogger &m_logger;
|
||||
int m_testId;
|
||||
int m_participantIndex;
|
||||
int m_id;
|
||||
|
||||
+17
-18
@@ -37,7 +37,6 @@ CesTestsOwnership::CesTestsOwnership(QObject *parent)
|
||||
: QObject(parent)
|
||||
, m_bTestsSuccessful(true)
|
||||
, m_housePos(LtsCoordTrans::UtmCoordinate::fromMgrs(QStringLiteral("32UMD8000090000")))
|
||||
, m_logger(getLogger("CesTestsOwnership"))
|
||||
, m_testId(0)
|
||||
, m_participantIndex(0)
|
||||
, m_DynamicParticipantIndex(0)
|
||||
@@ -49,7 +48,7 @@ CesTestsOwnership::~CesTestsOwnership()
|
||||
bool CesTestsOwnership::init(int domainId, int exerciseId, int testId)
|
||||
{
|
||||
bool bRet = true;
|
||||
INFO_LOG(m_logger) << "init begin";
|
||||
INFO_LOG() << "init begin";
|
||||
|
||||
m_testId = testId;
|
||||
m_buildingId = 7; // ism_main_structure_element:id
|
||||
@@ -112,7 +111,7 @@ bool CesTestsOwnership::init(int domainId, int exerciseId, int testId)
|
||||
|
||||
void CesTestsOwnership::startTest()
|
||||
{
|
||||
INFO_LOG(m_logger) << "startTest m_testId=" << m_testId;
|
||||
INFO_LOG() << "startTest m_testId=" << m_testId;
|
||||
if (m_testId <= 1) // 1 Participant in BT56
|
||||
{
|
||||
QTimer::singleShot(0, this, &CesTestsOwnership::tryCreateParticipantPosition);
|
||||
@@ -169,7 +168,7 @@ void CesTestsOwnership::startTest()
|
||||
}
|
||||
else
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Unknown test id = " << m_testId;
|
||||
ERROR_LOG() << "Unknown test id = " << m_testId;
|
||||
failExit();
|
||||
}
|
||||
QTimer::singleShot(6000, this, &CesTestsOwnership::failExit);
|
||||
@@ -191,10 +190,10 @@ void CesTestsOwnership::tryCreateDynamicParticipantData()
|
||||
dp.sampleTime(esTime);
|
||||
m_DynamicParticipantIndex++;
|
||||
|
||||
DEBUG_LOG(m_logger) << "Publishing DynamicParticipantData";
|
||||
DEBUG_LOG() << "Publishing DynamicParticipantData";
|
||||
if (!m_ppmDts->publish(dp))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error requesting create ParticipantPosition";
|
||||
ERROR_LOG() << "Error requesting create ParticipantPosition";
|
||||
failExit();
|
||||
}
|
||||
}
|
||||
@@ -217,10 +216,10 @@ void CesTestsOwnership::tryCreateParticipantPosition()
|
||||
pp.sampleTime(posTime);
|
||||
pp.pos(pos);
|
||||
|
||||
DEBUG_LOG(m_logger) << "Publishing ParticipantPosition";
|
||||
DEBUG_LOG() << "Publishing ParticipantPosition";
|
||||
if (!m_ppmDts->publish(pp))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error requesting create ParticipantPosition";
|
||||
ERROR_LOG() << "Error requesting create ParticipantPosition";
|
||||
failExit();
|
||||
}
|
||||
}
|
||||
@@ -234,10 +233,10 @@ void CesTestsOwnership::tryCreateParticipant()
|
||||
pt.id(m_participants[m_participantIndex].participantId);
|
||||
pt.equipmentNumber(m_participants[m_participantIndex].equipmentNumber);
|
||||
|
||||
DEBUG_LOG(m_logger) << "Publishing Participant";
|
||||
DEBUG_LOG() << "Publishing Participant";
|
||||
if (!m_ppmDts->publish(pt))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error requesting create Participant";
|
||||
ERROR_LOG() << "Error requesting create Participant";
|
||||
failExit();
|
||||
}
|
||||
}
|
||||
@@ -246,32 +245,32 @@ void CesTestsOwnership::trySetOwnershipRequest()
|
||||
{
|
||||
int32_t partyId = 0;
|
||||
|
||||
DEBUG_LOG(m_logger) << " request.buildingId() = " << m_buildingId
|
||||
DEBUG_LOG() << " request.buildingId() = " << m_buildingId
|
||||
<< " request.partyId() = " << m_buildingId;
|
||||
|
||||
if (!m_cesFtc->setOwnershipRequest(SetOwnershipRequest(m_buildingId, partyId), this))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error requesting create data";
|
||||
ERROR_LOG() << "Error requesting create data";
|
||||
failExit();
|
||||
}
|
||||
}
|
||||
|
||||
void CesTestsOwnership::onSetOwnershipReply(const Core::FunctionReplyObject &replyObject)
|
||||
{
|
||||
INFO_LOG(m_logger) << "onSetOwnershipReply() replyObject.id=" << replyObject.id();
|
||||
INFO_LOG() << "onSetOwnershipReply() replyObject.id=" << replyObject.id();
|
||||
}
|
||||
|
||||
void CesTestsOwnership::checkBuildingOwnership()
|
||||
{
|
||||
INFO_LOG(m_logger) << "checkBuildingOwnership";
|
||||
INFO_LOG() << "checkBuildingOwnership";
|
||||
/*
|
||||
m_cesDtc->waitForHistoricalDataBuildingOwnership();
|
||||
QMap < int ,CentralEffectSimulation::BuildingOwnership> buildingOwnership = m_cesDtc->buildingOwnerships();
|
||||
INFO_LOG(m_logger) << "Recived ParicipantEvent BuildingOwnership:"<<buildingOwnership.buildingId();
|
||||
INFO_LOG() << "Recived ParicipantEvent BuildingOwnership:"<<buildingOwnership.buildingId();
|
||||
for (unsigned int i = 0; i < buildingOwnership.ownerships().size(); i++)
|
||||
{
|
||||
CentralEffectSimulation::Ownership ownership = buildingOwnership.ownerships().at(i);
|
||||
INFO_LOG(m_logger) << "ownership["<<i<<"].floorId="<< ownership.floorId()
|
||||
INFO_LOG() << "ownership["<<i<<"].floorId="<< ownership.floorId()
|
||||
<< " ownership["<<i<<"].partyId="<< ownership.partyId();
|
||||
}
|
||||
switch (m_testId)
|
||||
@@ -339,14 +338,14 @@ void CesTestsOwnership::checkBuildingOwnership()
|
||||
|
||||
void CesTestsOwnership::failExit()
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "FailExit";
|
||||
DEBUG_LOG() << "FailExit";
|
||||
m_bTestsSuccessful = false;
|
||||
QTimer::singleShot(50, qApp, QCoreApplication::quit);
|
||||
}
|
||||
|
||||
void CesTestsOwnership::ExitSuccess()
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "ExitSuccess";
|
||||
DEBUG_LOG() << "ExitSuccess";
|
||||
m_bTestsSuccessful = true;
|
||||
QTimer::singleShot(50, qApp, QCoreApplication::quit);
|
||||
}
|
||||
|
||||
-1
@@ -81,7 +81,6 @@ private:
|
||||
|
||||
|
||||
LtsCoordTrans::UtmCoordinate m_housePos;
|
||||
NGL::INGLLogger &m_logger;
|
||||
int m_testId;
|
||||
int m_participantIndex;
|
||||
int m_DynamicParticipantIndex;
|
||||
|
||||
+14
-15
@@ -37,7 +37,6 @@ cesTestsSimulatedMovement::cesTestsSimulatedMovement(QObject *parent)
|
||||
, m_participantId(20)
|
||||
, m_repeat(false)
|
||||
, m_housePos(LtsCoordTrans::UtmCoordinate::fromMgrs(QStringLiteral("32UMD8000090000")))
|
||||
, m_logger(getLogger("cesTestsSimulatedMovement"))
|
||||
, m_testId(0)
|
||||
{}
|
||||
|
||||
@@ -47,7 +46,7 @@ cesTestsSimulatedMovement::~cesTestsSimulatedMovement()
|
||||
bool cesTestsSimulatedMovement::init(int domainId, int exerciseId, int testId)
|
||||
{
|
||||
bool bRet = true;
|
||||
INFO_LOG(m_logger) << "init begin";
|
||||
INFO_LOG() << "init begin";
|
||||
|
||||
m_testId = testId;
|
||||
|
||||
@@ -66,7 +65,7 @@ bool cesTestsSimulatedMovement::init(int domainId, int exerciseId, int testId)
|
||||
|
||||
void cesTestsSimulatedMovement::startTest()
|
||||
{
|
||||
INFO_LOG(m_logger) << "startTest m_testId=" << m_testId;
|
||||
INFO_LOG() << "startTest m_testId=" << m_testId;
|
||||
if (m_testId <= 1) // 1 SMART
|
||||
{
|
||||
QTimer::singleShot(0, this, &cesTestsSimulatedMovement::tryCreateParticipant);
|
||||
@@ -88,7 +87,7 @@ void cesTestsSimulatedMovement::startTest()
|
||||
}
|
||||
else
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Unknown test id = " << m_testId;
|
||||
ERROR_LOG() << "Unknown test id = " << m_testId;
|
||||
failExit();
|
||||
}
|
||||
QTimer::singleShot(8000, this, &cesTestsSimulatedMovement::failExit);
|
||||
@@ -97,13 +96,13 @@ void cesTestsSimulatedMovement::startTest()
|
||||
|
||||
void cesTestsSimulatedMovement::checkParticipantEvent()
|
||||
{
|
||||
INFO_LOG(m_logger) << "checkParticipantEvent";
|
||||
INFO_LOG() << "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()
|
||||
INFO_LOG() << "Recived ParicipantEvent equipmentNumber:" << participantEvent0.equipmentNumber()
|
||||
<< " eventType=" << participantEvent0.eventTypeId();
|
||||
INFO_LOG(m_logger) << "Recived ParicipantEvent equipmentNumber:" << participantEvent1.equipmentNumber()
|
||||
INFO_LOG() << "Recived ParicipantEvent equipmentNumber:" << participantEvent1.equipmentNumber()
|
||||
<< " eventType=" << participantEvent1.eventTypeId();
|
||||
|
||||
switch (m_testId)
|
||||
@@ -183,7 +182,7 @@ void cesTestsSimulatedMovement::trySimulatedMovementModifyRequest()
|
||||
|
||||
if (!m_cesFtc->simulatedMovementModifyRequest(req, this))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error requesting create data";
|
||||
ERROR_LOG() << "Error requesting create data";
|
||||
failExit();
|
||||
}
|
||||
|
||||
@@ -196,7 +195,7 @@ void cesTestsSimulatedMovement::trySimulatedMovementRemoveRequest()
|
||||
|
||||
if (!m_cesFtc->simulatedMovementRemoveRequest(SimulatedMovementRemoveRequest(id), this))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error requesting remove data";
|
||||
ERROR_LOG() << "Error requesting remove data";
|
||||
failExit();
|
||||
}
|
||||
QTest::qWait(2000);
|
||||
@@ -211,10 +210,10 @@ void cesTestsSimulatedMovement::tryCreateParticipant()
|
||||
pt.id(m_participantId);
|
||||
pt.partyId(5);
|
||||
|
||||
DEBUG_LOG(m_logger) << "Publishing Participant";
|
||||
DEBUG_LOG() << "Publishing Participant";
|
||||
if (!m_ppmDts->publish(pt))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error requesting create Participant";
|
||||
ERROR_LOG() << "Error requesting create Participant";
|
||||
failExit();
|
||||
}
|
||||
QTest::qWait(2000);
|
||||
@@ -223,25 +222,25 @@ void cesTestsSimulatedMovement::tryCreateParticipant()
|
||||
void cesTestsSimulatedMovement::onSimulatedMovementModifyReply(const Core::FunctionReplyObject &replyObject)
|
||||
{
|
||||
Q_UNUSED(replyObject);
|
||||
INFO_LOG(m_logger) << "onSimulatedMovementModifyReply()";
|
||||
INFO_LOG() << "onSimulatedMovementModifyReply()";
|
||||
}
|
||||
|
||||
void cesTestsSimulatedMovement::onSimulatedMovementRemoveReply(const Core::FunctionReplyObject &replyObject)
|
||||
{
|
||||
Q_UNUSED(replyObject);
|
||||
INFO_LOG(m_logger) << "onSimulatedMovementRemoveReply()";
|
||||
INFO_LOG() << "onSimulatedMovementRemoveReply()";
|
||||
}
|
||||
|
||||
void cesTestsSimulatedMovement::failExit()
|
||||
{
|
||||
ERROR_LOG(m_logger) << "FailExit";
|
||||
ERROR_LOG() << "FailExit";
|
||||
m_bTestsSuccessful = false;
|
||||
QTimer::singleShot(50, qApp, QCoreApplication::quit);
|
||||
}
|
||||
|
||||
void cesTestsSimulatedMovement::ExitSuccess()
|
||||
{
|
||||
INFO_LOG(m_logger) << "ExitSuccess";
|
||||
INFO_LOG() << "ExitSuccess";
|
||||
m_bTestsSuccessful = true;
|
||||
QTimer::singleShot(200, qApp, &QCoreApplication::quit);
|
||||
}
|
||||
|
||||
-1
@@ -72,7 +72,6 @@ private:
|
||||
bool m_repeat;
|
||||
|
||||
LtsCoordTrans::UtmCoordinate m_housePos;
|
||||
NGL::INGLLogger &m_logger;
|
||||
int m_testId;
|
||||
};
|
||||
|
||||
|
||||
+30
-31
@@ -35,7 +35,6 @@ CesTestsSmart::CesTestsSmart(QObject *parent)
|
||||
, TrainingAreaBase::Interface::Fts::SendCesHitRequestHandler(nullptr)
|
||||
, m_bTestsSuccessful(true)
|
||||
, m_housePos(LtsCoordTrans::UtmCoordinate::fromMgrs(QStringLiteral("32UMD8000090000")))
|
||||
, m_logger(getLogger("CesTestsSmart"))
|
||||
, m_testId(0)
|
||||
, m_participantIndex(0)
|
||||
, m_DynamicParticipantIndex(0)
|
||||
@@ -54,7 +53,7 @@ bool CesTestsSmart::init(int domainId, int exerciseId, int testId)
|
||||
bool bRet = true;
|
||||
int equipmentTypeIdVehicle = 35;
|
||||
int equipmentTypeIdSoldier = 30; // dds-Topic Participant-Management::Type
|
||||
INFO_LOG(m_logger) << "init begin";
|
||||
INFO_LOG() << "init begin";
|
||||
|
||||
m_testId = testId;
|
||||
m_buildingId = 0; // ism_main_structure_element:id
|
||||
@@ -142,7 +141,7 @@ bool CesTestsSmart::init(int domainId, int exerciseId, int testId)
|
||||
|
||||
void CesTestsSmart::startTest()
|
||||
{
|
||||
INFO_LOG(m_logger) << "startTest m_testId=" << m_testId;
|
||||
INFO_LOG() << "startTest m_testId=" << m_testId;
|
||||
if (m_testId <= 1) // 1 SMART
|
||||
{
|
||||
m_explosionSingle = m_housePos.geographic(5, 5);
|
||||
@@ -164,7 +163,7 @@ void CesTestsSmart::startTest()
|
||||
}
|
||||
else
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Unknown test id = " << m_testId;
|
||||
ERROR_LOG() << "Unknown test id = " << m_testId;
|
||||
failExit();
|
||||
}
|
||||
QTimer::singleShot(8000, this, &CesTestsSmart::failExit);
|
||||
@@ -186,10 +185,10 @@ void CesTestsSmart::tryCreateDynamicParticipantData()
|
||||
dp.sampleTime(esTime);
|
||||
m_DynamicParticipantIndex++;
|
||||
|
||||
DEBUG_LOG(m_logger) << "Publishing DynamicParticipantData";
|
||||
DEBUG_LOG() << "Publishing DynamicParticipantData";
|
||||
if (!m_ppmDts->publish(dp))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error requesting create ParticipantPosition";
|
||||
ERROR_LOG() << "Error requesting create ParticipantPosition";
|
||||
failExit();
|
||||
}
|
||||
}
|
||||
@@ -213,10 +212,10 @@ void CesTestsSmart::tryCreateParticipantPosition()
|
||||
pp.sampleTime(posTime);
|
||||
pp.pos(pos);
|
||||
|
||||
DEBUG_LOG(m_logger) << "Publishing ParticipantPosition";
|
||||
DEBUG_LOG() << "Publishing ParticipantPosition";
|
||||
if (!m_ppmDts->publish(pp))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error requesting create ParticipantPosition";
|
||||
ERROR_LOG() << "Error requesting create ParticipantPosition";
|
||||
failExit();
|
||||
}
|
||||
}
|
||||
@@ -230,17 +229,17 @@ void CesTestsSmart::tryCreateParticipant()
|
||||
pt.id(21);
|
||||
pt.equipmentNumber(61);
|
||||
|
||||
DEBUG_LOG(m_logger) << "Publishing Participant";
|
||||
DEBUG_LOG() << "Publishing Participant";
|
||||
if (!m_ppmDts->publish(pt))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error requesting create Participant";
|
||||
ERROR_LOG() << "Error requesting create Participant";
|
||||
failExit();
|
||||
}
|
||||
}
|
||||
|
||||
void CesTestsSmart::checkParticipantEvent()
|
||||
{
|
||||
INFO_LOG(m_logger) << "checkParicipantEvent m_cesDtc->participantEvents().size() =" << m_cesDtc->participantEvents().size();
|
||||
INFO_LOG() << "checkParicipantEvent m_cesDtc->participantEvents().size() =" << m_cesDtc->participantEvents().size();
|
||||
m_cesDtc->waitForHistoricalDataParticipantEvent();
|
||||
CentralEffectSimulation::ParticipantEvent participantEvent0 = m_cesDtc->participantEvent(0);
|
||||
CentralEffectSimulation::ParticipantEvent participantEvent1 = m_cesDtc->participantEvent(1);
|
||||
@@ -248,7 +247,7 @@ 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()
|
||||
INFO_LOG() << "Recived ParicipantEvent equipmentNumber:"<<participantEvent.equipmentNumber()
|
||||
<< " eventType="<<participantEvent.eventTypeId();
|
||||
}
|
||||
|
||||
@@ -263,7 +262,7 @@ void CesTestsSmart::checkParticipantEvent()
|
||||
break;
|
||||
default:
|
||||
// nothing
|
||||
ERROR_LOG(m_logger) << "Error checkParticipantEvent";
|
||||
ERROR_LOG() << "Error checkParticipantEvent";
|
||||
failExit();
|
||||
break;
|
||||
}
|
||||
@@ -284,10 +283,10 @@ void CesTestsSmart::tryCreateTypeVehicle()
|
||||
ty.name("HMMWV Utility");
|
||||
|
||||
|
||||
DEBUG_LOG(m_logger) << "Publishing Type";
|
||||
DEBUG_LOG() << "Publishing Type";
|
||||
if (!m_ppmDts->publish(ty))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error requesting create Type";
|
||||
ERROR_LOG() << "Error requesting create Type";
|
||||
failExit();
|
||||
}
|
||||
}
|
||||
@@ -305,10 +304,10 @@ void CesTestsSmart::tryCreateTypeSoldier()
|
||||
ty.name("Soldier");
|
||||
|
||||
|
||||
DEBUG_LOG(m_logger) << "Publishing Type";
|
||||
DEBUG_LOG() << "Publishing Type";
|
||||
if (!m_ppmDts->publish(ty))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error requesting create Type";
|
||||
ERROR_LOG() << "Error requesting create Type";
|
||||
failExit();
|
||||
}
|
||||
}
|
||||
@@ -319,7 +318,7 @@ static void setPos(std::vector<Core::GeoPosition> &cont, const QPointF &pos)
|
||||
|
||||
void CesTestsSmart::tryCreateAesItemViewSingleExplosion()
|
||||
{
|
||||
INFO_LOG(m_logger) << "trying to send AesItemView AtExplosionAreaSingleExplosions";
|
||||
INFO_LOG() << "trying to send AesItemView AtExplosionAreaSingleExplosions";
|
||||
|
||||
AreaEffectSimulation::AesItemView iv;
|
||||
iv.effectStateId(AreaEffectSimulation::AesEffectState_def::EsActivated);
|
||||
@@ -344,30 +343,30 @@ void CesTestsSmart::tryCreateAesItemViewSingleExplosion()
|
||||
setPos(iv.form(), m_housePos.geographic(-10, 20));
|
||||
setPos(iv.form(), m_housePos.geographic(-10, 30));
|
||||
|
||||
DEBUG_LOG(m_logger) << "Publishing AesItemView";
|
||||
DEBUG_LOG() << "Publishing AesItemView";
|
||||
if (!m_aesDts->publish(iv))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error requesting create AesItemViewSingleExplosions";
|
||||
ERROR_LOG() << "Error requesting create AesItemViewSingleExplosions";
|
||||
failExit();
|
||||
}
|
||||
}
|
||||
|
||||
void CesTestsSmart::tryCreateChargeType()
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Publishing ChargeType";
|
||||
DEBUG_LOG() << "Publishing ChargeType";
|
||||
ProjectDataManagement::ChargeType ct;
|
||||
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";
|
||||
ERROR_LOG() << "Error publish ChargeType";
|
||||
failExit();
|
||||
}
|
||||
}
|
||||
|
||||
void CesTestsSmart::tryCreatePrepareExplosionSingle()
|
||||
{
|
||||
INFO_LOG(m_logger) << "trying to send ExplosionSingle";
|
||||
INFO_LOG() << "trying to send ExplosionSingle";
|
||||
AreaEffectSimulation::ExplosionSingle es;
|
||||
const qint64 time = QDateTime::currentMSecsSinceEpoch();
|
||||
const rti::core::int64 esTime = static_cast<rti::core::int64>(time);
|
||||
@@ -383,17 +382,17 @@ void CesTestsSmart::tryCreatePrepareExplosionSingle()
|
||||
es.isCentral(true);
|
||||
es.effectStart ( QDateTime::currentMSecsSinceEpoch() + 2000);
|
||||
|
||||
DEBUG_LOG(m_logger) << "Publishing ExplosionSingle";
|
||||
DEBUG_LOG() << "Publishing ExplosionSingle";
|
||||
if (!m_aesDts->publish(es))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error publish ExplosionArea";
|
||||
ERROR_LOG() << "Error publish ExplosionArea";
|
||||
failExit();
|
||||
}
|
||||
}
|
||||
|
||||
void CesTestsSmart::tryCreateExplosionSingle()
|
||||
{
|
||||
INFO_LOG(m_logger) << "trying to send ExplosionSingle";
|
||||
INFO_LOG() << "trying to send ExplosionSingle";
|
||||
AreaEffectSimulation::ExplosionSingle es;
|
||||
const qint64 time = QDateTime::currentMSecsSinceEpoch();
|
||||
const rti::core::int64 esTime = static_cast<rti::core::int64>(time);
|
||||
@@ -411,10 +410,10 @@ void CesTestsSmart::tryCreateExplosionSingle()
|
||||
es.sampleTime(esTime);
|
||||
es.chargeStruct().chargeTypeId(m_chargeTypeId);
|
||||
|
||||
DEBUG_LOG(m_logger) << "Publishing ExplosionSingle";
|
||||
DEBUG_LOG() << "Publishing ExplosionSingle";
|
||||
if (!m_aesDts->publish(es))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error publish ExplosionArea";
|
||||
ERROR_LOG() << "Error publish ExplosionArea";
|
||||
failExit();
|
||||
}
|
||||
}
|
||||
@@ -434,7 +433,7 @@ void CesTestsSmart::onSendCesHitRequest(const rti::core::SampleIdentity &cookie,
|
||||
QDateTime dateTime;
|
||||
dateTime.setMSecsSinceEpoch(msecs);
|
||||
|
||||
DEBUG_LOG(m_logger) << "onSendCesHitRequest" << "\n"
|
||||
DEBUG_LOG() << "onSendCesHitRequest" << "\n"
|
||||
<< " request.aesId() = " << request.aesId() << "\n"
|
||||
<< " request.chargeTypeId() = " << request.chargeTypeId() << "\n"
|
||||
<< " request.equipmentNumber() = " << request.equipmentNumber() << "\n"
|
||||
@@ -449,14 +448,14 @@ void CesTestsSmart::onSendCesHitRequest(const rti::core::SampleIdentity &cookie,
|
||||
|
||||
void CesTestsSmart::failExit()
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "FailExit";
|
||||
DEBUG_LOG() << "FailExit";
|
||||
m_bTestsSuccessful = false;
|
||||
QTimer::singleShot(50, qApp, QCoreApplication::quit);
|
||||
}
|
||||
|
||||
void CesTestsSmart::ExitSuccess()
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "ExitSuccess";
|
||||
DEBUG_LOG() << "ExitSuccess";
|
||||
m_bTestsSuccessful = true;
|
||||
QTimer::singleShot(200, qApp, &QCoreApplication::quit);
|
||||
}
|
||||
|
||||
-1
@@ -96,7 +96,6 @@ private:
|
||||
bool m_bTestsSuccessful;
|
||||
|
||||
LtsCoordTrans::UtmCoordinate m_housePos;
|
||||
NGL::INGLLogger &m_logger;
|
||||
int m_testId;
|
||||
int m_participantIndex;
|
||||
int m_DynamicParticipantIndex;
|
||||
|
||||
Reference in new issue
Block a user