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
+95
-96
@@ -51,7 +51,6 @@ IsmTests::IsmTests(QObject *parent)
|
||||
, m_structureElementId(0)
|
||||
, m_indexNo(0)
|
||||
, m_bTestsSuccessful(true)
|
||||
, m_logger(getLogger("Test"))
|
||||
{
|
||||
qRegisterMetaType<Core::FunctionReply>("Core::FunctionReply");
|
||||
}
|
||||
@@ -64,7 +63,7 @@ IsmTests::~IsmTests()
|
||||
// ------------------------------------------------------------------------------
|
||||
bool IsmTests::init(int domainId, int testId, int assetId, int mainStructureElementId, int structureElementId, int indexNo)
|
||||
{
|
||||
INFO_LOG(m_logger) << "init begin";
|
||||
INFO_LOG() << "init begin";
|
||||
|
||||
m_testId = testId;
|
||||
m_assetId = assetId;
|
||||
@@ -82,30 +81,30 @@ bool IsmTests::init(int domainId, int testId, int assetId, int mainStructureElem
|
||||
m_dbHandler = std::make_shared<DbHandler>();
|
||||
if(!m_dbHandler->init(0, Settings::settings()))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Initialisation dbHandler failed.";
|
||||
ERROR_LOG() << "Initialisation dbHandler failed.";
|
||||
return false;
|
||||
}
|
||||
DEBUG_LOG(m_logger) << "Initialisation dbHandler succesful.";
|
||||
DEBUG_LOG() << "Initialisation dbHandler succesful.";
|
||||
m_db = m_dbHandler->db();
|
||||
|
||||
TRACE_LOG(m_logger) << "create dtc";
|
||||
TRACE_LOG() << "create dtc";
|
||||
m_dtc = InfrastructureManagement::Interface::Dtc::create(m_ddsConnector);
|
||||
TRACE_LOG(m_logger) << "init dtc";
|
||||
TRACE_LOG() << "init dtc";
|
||||
bool bRet = m_dtc->enableAll();
|
||||
TRACE_LOG(m_logger) << "init dtc end - bRet = " << bRet;
|
||||
TRACE_LOG() << "init dtc end - bRet = " << bRet;
|
||||
|
||||
TRACE_LOG(m_logger) << "create ftc";
|
||||
TRACE_LOG() << "create ftc";
|
||||
m_ftc = InfrastructureManagement::Interface::Ftc::create(m_ddsConnector);
|
||||
TRACE_LOG(m_logger) << "init ftc";
|
||||
TRACE_LOG() << "init ftc";
|
||||
bRet &= m_ftc->enableAll();
|
||||
TRACE_LOG(m_logger) << "init ftc end - bRet = " << bRet;
|
||||
TRACE_LOG() << "init ftc end - bRet = " << bRet;
|
||||
|
||||
DEBUG_LOG(m_logger) << "########### Domain Id = " << domainId;
|
||||
DEBUG_LOG(m_logger) << "########### Test Id = " << testId;
|
||||
DEBUG_LOG(m_logger) << "########### Asset Id = " << assetId;
|
||||
DEBUG_LOG(m_logger) << "########### Main Structure Element Id = " << mainStructureElementId;
|
||||
DEBUG_LOG(m_logger) << "########### Structure Element Id = " << structureElementId;
|
||||
DEBUG_LOG(m_logger) << "########### Index No = " << indexNo;
|
||||
DEBUG_LOG() << "########### Domain Id = " << domainId;
|
||||
DEBUG_LOG() << "########### Test Id = " << testId;
|
||||
DEBUG_LOG() << "########### Asset Id = " << assetId;
|
||||
DEBUG_LOG() << "########### Main Structure Element Id = " << mainStructureElementId;
|
||||
DEBUG_LOG() << "########### Structure Element Id = " << structureElementId;
|
||||
DEBUG_LOG() << "########### Index No = " << indexNo;
|
||||
|
||||
return bRet;
|
||||
}
|
||||
@@ -113,7 +112,7 @@ bool IsmTests::init(int domainId, int testId, int assetId, int mainStructureElem
|
||||
// ------------------------------------------------------------------------------
|
||||
void IsmTests::startTest()
|
||||
{
|
||||
INFO_LOG(m_logger) << "********* startTest **************";
|
||||
INFO_LOG() << "********* startTest **************";
|
||||
// main structure elements
|
||||
switch (m_testId)
|
||||
{
|
||||
@@ -180,7 +179,7 @@ void IsmTests::startTest()
|
||||
failExit();
|
||||
break;
|
||||
}
|
||||
INFO_LOG(m_logger) << "********* endTest **************";
|
||||
INFO_LOG() << "********* endTest **************";
|
||||
QTimer::singleShot(0, qApp, &QCoreApplication::quit);
|
||||
}
|
||||
|
||||
@@ -198,7 +197,7 @@ static void addElementToRequest(MainStructureElementModifyRequest &request,
|
||||
// ------------------------------------------------------------------------------
|
||||
void IsmTests::tryCreateMainStructureElement()
|
||||
{
|
||||
INFO_LOG(m_logger) << "trying to send MainStructureElementCreateRequest";
|
||||
INFO_LOG() << "trying to send MainStructureElementCreateRequest";
|
||||
|
||||
MainStructureElementModifyRequest data;
|
||||
|
||||
@@ -444,7 +443,7 @@ void IsmTests::tryCreateMainStructureElement()
|
||||
|
||||
// if (!m_ftc->mainStructureElementModifyRequest(data, this))
|
||||
// {
|
||||
// ERROR_LOG(m_logger) << "Error requesting create data (building)";
|
||||
// ERROR_LOG() << "Error requesting create data (building)";
|
||||
// failExit();
|
||||
// }
|
||||
|
||||
@@ -454,18 +453,18 @@ void IsmTests::tryCreateMainStructureElement()
|
||||
// ------------------------------------------------------------------------------
|
||||
void IsmTests::tryModifyMainStructureElement()
|
||||
{
|
||||
INFO_LOG(m_logger) << "trying to send MainStructureElementModifyRequest ";
|
||||
INFO_LOG() << "trying to send MainStructureElementModifyRequest ";
|
||||
m_dtc->waitForHistoricalDataMainStructureElement();
|
||||
InfrastructureManagement::MainStructureElement mse = m_dtc->mainStructureElement(m_mainStructureElementId);
|
||||
InfrastructureManagement::MainStructureElementModifyRequest data;
|
||||
|
||||
if (mse.id() == 0)
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error requesting modify data";
|
||||
ERROR_LOG() << "Error requesting modify data";
|
||||
failExit();
|
||||
}
|
||||
|
||||
DEBUG_LOG(m_logger) << "Modify MainStructureElement with id = " << mse.id();
|
||||
DEBUG_LOG() << "Modify MainStructureElement with id = " << mse.id();
|
||||
|
||||
// creating ModifyRequest
|
||||
data.id(mse.id());
|
||||
@@ -485,7 +484,7 @@ void IsmTests::tryModifyMainStructureElement()
|
||||
m_replyFinished = false;
|
||||
if (!m_ftc->mainStructureElementModifyRequest(data, this))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error requesting modify data";
|
||||
ERROR_LOG() << "Error requesting modify data";
|
||||
failExit();
|
||||
}
|
||||
|
||||
@@ -501,7 +500,7 @@ void IsmTests::tryModifyMainStructureElement()
|
||||
for (size_t i = 0; i < mse.elements().size(); ++i)
|
||||
{
|
||||
se = mse.elements().at(i);
|
||||
DEBUG_LOG(m_logger) << "Updating barcode for element (" << i << ") with old barcode = " << se.barcode();
|
||||
DEBUG_LOG() << "Updating barcode for element (" << i << ") with old barcode = " << se.barcode();
|
||||
|
||||
se.barcode("BARCODE");
|
||||
seData.elements().push_back(se);
|
||||
@@ -509,7 +508,7 @@ void IsmTests::tryModifyMainStructureElement()
|
||||
|
||||
if (!m_ftc->structureElementModifyRequest(seData, this))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error requesting modify data";
|
||||
ERROR_LOG() << "Error requesting modify data";
|
||||
failExit();
|
||||
}
|
||||
|
||||
@@ -519,20 +518,20 @@ void IsmTests::tryModifyMainStructureElement()
|
||||
// ------------------------------------------------------------------------------
|
||||
void IsmTests::tryRemoveMainStructureElement()
|
||||
{
|
||||
INFO_LOG(m_logger) << "trying to send MainStructureElementRemoveRequest for mse id = " << m_mainStructureElementId;
|
||||
INFO_LOG() << "trying to send MainStructureElementRemoveRequest for mse id = " << m_mainStructureElementId;
|
||||
|
||||
m_dtc->waitForHistoricalDataMainStructureElement();
|
||||
InfrastructureManagement::MainStructureElement mse = m_dtc->mainStructureElement(m_mainStructureElementId);
|
||||
|
||||
if (mse.id() == 0)
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Cannot find main structure element with id = " << m_mainStructureElementId;
|
||||
ERROR_LOG() << "Cannot find main structure element with id = " << m_mainStructureElementId;
|
||||
failExit();
|
||||
}
|
||||
|
||||
if (!m_ftc->mainStructureElementRemoveRequest(MainStructureElementRemoveRequest(m_mainStructureElementId), this))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error requesting delete data";
|
||||
ERROR_LOG() << "Error requesting delete data";
|
||||
failExit();
|
||||
}
|
||||
|
||||
@@ -542,7 +541,7 @@ void IsmTests::tryRemoveMainStructureElement()
|
||||
// ------------------------------------------------------------------------------
|
||||
void IsmTests::tryCreateBridge()
|
||||
{
|
||||
INFO_LOG(m_logger) << "trying to send MainStructureElementCreateRequest";
|
||||
INFO_LOG() << "trying to send MainStructureElementCreateRequest";
|
||||
|
||||
MainStructureElementModifyRequest data;
|
||||
|
||||
@@ -575,7 +574,7 @@ void IsmTests::tryCreateBridge()
|
||||
|
||||
if (!m_ftc->mainStructureElementModifyRequest(data, this))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error requesting create data (bridge)";
|
||||
ERROR_LOG() << "Error requesting create data (bridge)";
|
||||
failExit();
|
||||
}
|
||||
|
||||
@@ -586,18 +585,18 @@ void IsmTests::tryCreateBridge()
|
||||
// ------------------------------------------------------------------------------
|
||||
void IsmTests::tryChangeBridgeStatus()
|
||||
{
|
||||
INFO_LOG(m_logger) << "trying to send MainStructureElementModifyBridgeStatusRequest ";
|
||||
INFO_LOG() << "trying to send MainStructureElementModifyBridgeStatusRequest ";
|
||||
m_dtc->waitForHistoricalDataMainStructureElement();
|
||||
InfrastructureManagement::MainStructureElement mse = m_dtc->mainStructureElement(m_mainStructureElementId);
|
||||
InfrastructureManagement::MainStructureElementModifyBridgeStatusRequest data;
|
||||
|
||||
if (mse.id() == 0)
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error requesting modify data";
|
||||
ERROR_LOG() << "Error requesting modify data";
|
||||
failExit();
|
||||
}
|
||||
|
||||
DEBUG_LOG(m_logger) << "Modify MainStructureElement with id = " << mse.id();
|
||||
DEBUG_LOG() << "Modify MainStructureElement with id = " << mse.id();
|
||||
|
||||
// creating ModifyRequest
|
||||
data.id(mse.id());
|
||||
@@ -609,7 +608,7 @@ void IsmTests::tryChangeBridgeStatus()
|
||||
m_replyFinished = false;
|
||||
if (!m_ftc->mainStructureElementModifyBridgeStatusRequest(data, this))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error requesting modify bridge status";
|
||||
ERROR_LOG() << "Error requesting modify bridge status";
|
||||
failExit();
|
||||
}
|
||||
|
||||
@@ -623,7 +622,7 @@ void IsmTests::tryChangeBridgeStatus()
|
||||
// ------------------------------------------------------------------------------
|
||||
void IsmTests::tryCreateAsset()
|
||||
{
|
||||
INFO_LOG(m_logger) << "trying to send AssetCreateRequest";
|
||||
INFO_LOG() << "trying to send AssetCreateRequest";
|
||||
|
||||
InstrumentationAssetModifyRequest data;
|
||||
|
||||
@@ -634,7 +633,7 @@ void IsmTests::tryCreateAsset()
|
||||
|
||||
if (!m_ftc->instrumentationAssetModifyRequest(data, this))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error requesting create data";
|
||||
ERROR_LOG() << "Error requesting create data";
|
||||
failExit();
|
||||
}
|
||||
|
||||
@@ -647,7 +646,7 @@ void IsmTests::tryCreateAsset()
|
||||
|
||||
if (!m_ftc->instrumentationAssetModifyRequest(data, this))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error requesting create data";
|
||||
ERROR_LOG() << "Error requesting create data";
|
||||
failExit();
|
||||
}
|
||||
|
||||
@@ -660,7 +659,7 @@ void IsmTests::tryCreateAsset()
|
||||
|
||||
if (!m_ftc->instrumentationAssetModifyRequest(data, this))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error requesting create data";
|
||||
ERROR_LOG() << "Error requesting create data";
|
||||
failExit();
|
||||
}
|
||||
|
||||
@@ -673,7 +672,7 @@ void IsmTests::tryCreateAsset()
|
||||
|
||||
if (!m_ftc->instrumentationAssetModifyRequest(data, this))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error requesting create data";
|
||||
ERROR_LOG() << "Error requesting create data";
|
||||
failExit();
|
||||
}
|
||||
|
||||
@@ -684,21 +683,21 @@ void IsmTests::tryCreateAsset()
|
||||
// ------------------------------------------------------------------------------
|
||||
void IsmTests::tryModifyAsset()
|
||||
{
|
||||
INFO_LOG(m_logger) << "trying to send asset modify request ";
|
||||
INFO_LOG() << "trying to send asset modify request ";
|
||||
|
||||
DEBUG_LOG(m_logger) << "m_assetId = " << m_assetId;
|
||||
DEBUG_LOG() << "m_assetId = " << m_assetId;
|
||||
|
||||
m_dtc->waitForHistoricalDataInstrumentationAsset();
|
||||
const InfrastructureManagement::InstrumentationAsset &ast = m_dtc->instrumentationAsset(m_assetId);
|
||||
// const InfrastructureManagement::InstrumentationAsset &ast1 = m_dtc->instrumentationAssets()[m_assetId];
|
||||
InfrastructureManagement::InstrumentationAssetModifyRequest data;
|
||||
|
||||
DEBUG_LOG(m_logger) << "ast.id() = " << ast.id();
|
||||
// DEBUG_LOG(m_logger) << "ast1.id() = " << ast1.id();
|
||||
DEBUG_LOG() << "ast.id() = " << ast.id();
|
||||
// DEBUG_LOG() << "ast1.id() = " << ast1.id();
|
||||
|
||||
if (ast.id() == 0)
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Cannot find Asset Id = " << m_assetId;
|
||||
ERROR_LOG() << "Cannot find Asset Id = " << m_assetId;
|
||||
failExit();
|
||||
}
|
||||
else
|
||||
@@ -715,7 +714,7 @@ void IsmTests::tryModifyAsset()
|
||||
|
||||
if (!m_ftc->instrumentationAssetModifyRequest(InstrumentationAssetModifyRequest(data), this))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error requesting modify data";
|
||||
ERROR_LOG() << "Error requesting modify data";
|
||||
failExit();
|
||||
}
|
||||
|
||||
@@ -726,20 +725,20 @@ void IsmTests::tryModifyAsset()
|
||||
// ------------------------------------------------------------------------------
|
||||
void IsmTests::tryRemoveAsset()
|
||||
{
|
||||
INFO_LOG(m_logger) << "trying to send AssetRemoveRequest for id = " << m_assetId;
|
||||
INFO_LOG() << "trying to send AssetRemoveRequest for id = " << m_assetId;
|
||||
|
||||
m_dtc->waitForHistoricalDataInstrumentationAsset();
|
||||
const InfrastructureManagement::InstrumentationAsset &ast = m_dtc->instrumentationAsset(m_assetId);
|
||||
|
||||
if (ast.id() == 0)
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Cannot find Asset Id = " << m_assetId;
|
||||
ERROR_LOG() << "Cannot find Asset Id = " << m_assetId;
|
||||
failExit();
|
||||
}
|
||||
|
||||
if (!m_ftc->instrumentationAssetRemoveRequest(InstrumentationAssetRemoveRequest(m_assetId), this))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error requesting delete data";
|
||||
ERROR_LOG() << "Error requesting delete data";
|
||||
failExit();
|
||||
}
|
||||
QTest::qWait(1000);
|
||||
@@ -748,21 +747,21 @@ void IsmTests::tryRemoveAsset()
|
||||
// ------------------------------------------------------------------------------
|
||||
void IsmTests::tryUnmountAsset()
|
||||
{
|
||||
INFO_LOG(m_logger) << "trying to send asset state modify request ";
|
||||
INFO_LOG() << "trying to send asset state modify request ";
|
||||
|
||||
DEBUG_LOG(m_logger) << "m_assetId = " << m_assetId;
|
||||
DEBUG_LOG() << "m_assetId = " << m_assetId;
|
||||
|
||||
m_dtc->waitForHistoricalDataInstrumentationAsset();
|
||||
const InfrastructureManagement::InstrumentationAsset &ast = m_dtc->instrumentationAsset(m_assetId);
|
||||
// const InfrastructureManagement::InstrumentationAsset &ast1 = m_dtc->instrumentationAssets()[m_assetId];
|
||||
InfrastructureManagement::InstrumentationAssetSetStateRequest data;
|
||||
|
||||
DEBUG_LOG(m_logger) << "ast.id() = " << ast.id();
|
||||
// DEBUG_LOG(m_logger) << "ast1.id() = " << ast1.id();
|
||||
DEBUG_LOG() << "ast.id() = " << ast.id();
|
||||
// DEBUG_LOG() << "ast1.id() = " << ast1.id();
|
||||
|
||||
if (ast.id() == 0)
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Cannot find Asset Id = " << m_assetId;
|
||||
ERROR_LOG() << "Cannot find Asset Id = " << m_assetId;
|
||||
failExit();
|
||||
}
|
||||
else
|
||||
@@ -772,7 +771,7 @@ void IsmTests::tryUnmountAsset()
|
||||
|
||||
if (!m_ftc->instrumentationAssetSetStateRequest(InstrumentationAssetSetStateRequest(data), this))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error requesting set asset state";
|
||||
ERROR_LOG() << "Error requesting set asset state";
|
||||
failExit();
|
||||
}
|
||||
|
||||
@@ -784,7 +783,7 @@ void IsmTests::tryUnmountAsset()
|
||||
// ------------------------------------------------------------------------------
|
||||
void IsmTests::tryCreateMountingPointAsset()
|
||||
{
|
||||
INFO_LOG(m_logger) << "trying to send AssetCreateRequest";
|
||||
INFO_LOG() << "trying to send AssetCreateRequest";
|
||||
|
||||
MountingPointAssetModifyRequest data;
|
||||
|
||||
@@ -794,7 +793,7 @@ void IsmTests::tryCreateMountingPointAsset()
|
||||
|
||||
if (!m_ftc->mountingPointAssetModifyRequest(data, this))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error requesting create data";
|
||||
ERROR_LOG() << "Error requesting create data";
|
||||
failExit();
|
||||
}
|
||||
|
||||
@@ -804,20 +803,20 @@ void IsmTests::tryCreateMountingPointAsset()
|
||||
// ------------------------------------------------------------------------------
|
||||
void IsmTests::tryRemoveMountingPointAsset()
|
||||
{
|
||||
INFO_LOG(m_logger) << "trying to send MountingPointAssetRemoveRequest ";
|
||||
INFO_LOG() << "trying to send MountingPointAssetRemoveRequest ";
|
||||
|
||||
m_dtc->waitForHistoricalDataMountingPointAsset();
|
||||
if (!m_dtc->getMountingPointAssetId(m_structureElementId, m_assetId, m_mountingPointAssetId))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Cannot find requested mounting point asset";
|
||||
ERROR_LOG() << "Cannot find requested mounting point asset";
|
||||
failExit();
|
||||
}
|
||||
|
||||
DEBUG_LOG(m_logger) << "MountingPointAsset Id = " << m_mountingPointAssetId;
|
||||
DEBUG_LOG() << "MountingPointAsset Id = " << m_mountingPointAssetId;
|
||||
|
||||
if (!m_ftc->mountingPointAssetRemoveRequest(MountingPointAssetRemoveRequest(m_mountingPointAssetId), this))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error requesting delete data";
|
||||
ERROR_LOG() << "Error requesting delete data";
|
||||
failExit();
|
||||
}
|
||||
|
||||
@@ -828,7 +827,7 @@ void IsmTests::tryRemoveMountingPointAsset()
|
||||
// ------------------------------------------------------------------------------
|
||||
void IsmTests::tryCreateMainSchedule()
|
||||
{
|
||||
INFO_LOG(m_logger) << "trying to send MainScheduleCreateRequest";
|
||||
INFO_LOG() << "trying to send MainScheduleCreateRequest";
|
||||
|
||||
MainScheduleModifyRequest data0, data1, data2;
|
||||
|
||||
@@ -843,7 +842,7 @@ void IsmTests::tryCreateMainSchedule()
|
||||
|
||||
if (!m_ftc->mainScheduleModifyRequest(data1, this))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error requesting create data";
|
||||
ERROR_LOG() << "Error requesting create data";
|
||||
failExit();
|
||||
}
|
||||
|
||||
@@ -860,7 +859,7 @@ void IsmTests::tryCreateMainSchedule()
|
||||
|
||||
if (!m_ftc->mainScheduleModifyRequest(data2, this))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error requesting create data";
|
||||
ERROR_LOG() << "Error requesting create data";
|
||||
failExit();
|
||||
}
|
||||
|
||||
@@ -876,7 +875,7 @@ void IsmTests::tryCreateMainSchedule()
|
||||
|
||||
if (!m_ftc->mainScheduleModifyRequest(data0, this))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error requesting create data";
|
||||
ERROR_LOG() << "Error requesting create data";
|
||||
failExit();
|
||||
}
|
||||
|
||||
@@ -886,16 +885,16 @@ void IsmTests::tryCreateMainSchedule()
|
||||
// ------------------------------------------------------------------------------
|
||||
void IsmTests::tryModifyMainSchedule()
|
||||
{
|
||||
INFO_LOG(m_logger) << "trying to send mounting point schedule modify request ";
|
||||
INFO_LOG() << "trying to send mounting point schedule modify request ";
|
||||
|
||||
m_dtc->waitForHistoricalDataMainSchedule();
|
||||
// using m_assetId as main schedule id
|
||||
InfrastructureManagement::MainSchedule ast = m_dtc->mainSchedule(m_assetId);
|
||||
InfrastructureManagement::MainScheduleModifyRequest data;
|
||||
|
||||
DEBUG_LOG(m_logger) << "m_assetId = " << m_assetId;
|
||||
DEBUG_LOG() << "m_assetId = " << m_assetId;
|
||||
|
||||
DEBUG_LOG(m_logger) << "ast.id() = " << ast.id();
|
||||
DEBUG_LOG() << "ast.id() = " << ast.id();
|
||||
|
||||
// creating ModifyRequest
|
||||
if (ast.id() > 0)
|
||||
@@ -914,13 +913,13 @@ void IsmTests::tryModifyMainSchedule()
|
||||
|
||||
if (!m_ftc->mainScheduleModifyRequest(MainScheduleModifyRequest(data), this))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error requesting modify data";
|
||||
ERROR_LOG() << "Error requesting modify data";
|
||||
failExit();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Cannot find main schedule id = " << m_assetId;
|
||||
ERROR_LOG() << "Cannot find main schedule id = " << m_assetId;
|
||||
failExit();
|
||||
}
|
||||
QTest::qWait(1000);
|
||||
@@ -929,16 +928,16 @@ void IsmTests::tryModifyMainSchedule()
|
||||
// ------------------------------------------------------------------------------
|
||||
void IsmTests::tryChangeStatusSchedule()
|
||||
{
|
||||
INFO_LOG(m_logger) << "trying to send mounting point schedule modify request ";
|
||||
INFO_LOG() << "trying to send mounting point schedule modify request ";
|
||||
|
||||
m_dtc->waitForHistoricalDataMainSchedule();
|
||||
// using m_assetId as main schedule id
|
||||
InfrastructureManagement::MainSchedule ast = m_dtc->mainSchedule(m_assetId);
|
||||
InfrastructureManagement::MainScheduleModifyRequest data;
|
||||
|
||||
DEBUG_LOG(m_logger) << "m_assetId = " << m_assetId;
|
||||
DEBUG_LOG() << "m_assetId = " << m_assetId;
|
||||
|
||||
DEBUG_LOG(m_logger) << "ast.id() = " << ast.id();
|
||||
DEBUG_LOG() << "ast.id() = " << ast.id();
|
||||
|
||||
// creating ModifyRequest
|
||||
if (ast.id() > 0)
|
||||
@@ -975,13 +974,13 @@ void IsmTests::tryChangeStatusSchedule()
|
||||
|
||||
if (!m_ftc->mainScheduleModifyRequest(MainScheduleModifyRequest(data), this))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error requesting modify data";
|
||||
ERROR_LOG() << "Error requesting modify data";
|
||||
failExit();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Cannot find main schedule id = " << m_assetId;
|
||||
ERROR_LOG() << "Cannot find main schedule id = " << m_assetId;
|
||||
failExit();
|
||||
}
|
||||
QTest::qWait(1000);
|
||||
@@ -990,20 +989,20 @@ void IsmTests::tryChangeStatusSchedule()
|
||||
// ------------------------------------------------------------------------------
|
||||
void IsmTests::tryRemoveMainSchedule()
|
||||
{
|
||||
INFO_LOG(m_logger) << "trying to send MainScheduleRemoveRequest for id = " << m_assetId;
|
||||
INFO_LOG() << "trying to send MainScheduleRemoveRequest for id = " << m_assetId;
|
||||
|
||||
m_dtc->waitForHistoricalDataMainSchedule();
|
||||
InfrastructureManagement::MainSchedule ast = m_dtc->mainSchedule(m_assetId);
|
||||
|
||||
if (ast.id() == 0)
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Cannot find main schedule id = " << m_assetId;
|
||||
ERROR_LOG() << "Cannot find main schedule id = " << m_assetId;
|
||||
failExit();
|
||||
}
|
||||
|
||||
if (!m_ftc->mainScheduleRemoveRequest(MainScheduleRemoveRequest(m_assetId), this))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error requesting delete data";
|
||||
ERROR_LOG() << "Error requesting delete data";
|
||||
failExit();
|
||||
}
|
||||
QTest::qWait(1000);
|
||||
@@ -1012,20 +1011,20 @@ void IsmTests::tryRemoveMainSchedule()
|
||||
// ------------------------------------------------------------------------------
|
||||
void IsmTests::tryCopySchedule()
|
||||
{
|
||||
INFO_LOG(m_logger) << "trying to copy schedule";
|
||||
INFO_LOG() << "trying to copy schedule";
|
||||
|
||||
m_dtc->waitForHistoricalDataMainSchedule();
|
||||
// using m_assetId as main schedule id
|
||||
InfrastructureManagement::MainSchedule ms = m_dtc->mainSchedule(m_assetId);
|
||||
|
||||
DEBUG_LOG(m_logger) << "scheduleId = " << m_assetId;
|
||||
DEBUG_LOG(m_logger) << "ms.id() = " << ms.id();
|
||||
DEBUG_LOG() << "scheduleId = " << m_assetId;
|
||||
DEBUG_LOG() << "ms.id() = " << ms.id();
|
||||
|
||||
int newId = m_db->copySchedule(ms.id());
|
||||
|
||||
if (newId <= 0)
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error copy schedule, code = " << newId;
|
||||
ERROR_LOG() << "Error copy schedule, code = " << newId;
|
||||
failExit();
|
||||
}
|
||||
|
||||
@@ -1035,26 +1034,26 @@ void IsmTests::tryCopySchedule()
|
||||
// ------------------------------------------------------------------------------
|
||||
void IsmTests::checkSchedule()
|
||||
{
|
||||
ERROR_LOG(m_logger) << "check instrumentation plan";
|
||||
ERROR_LOG() << "check instrumentation plan";
|
||||
|
||||
m_dtc->waitForHistoricalDataMainSchedule();
|
||||
|
||||
// using m_assetId as main schedule id
|
||||
InfrastructureManagement::MainSchedule ms = m_dtc->mainSchedule(m_assetId);
|
||||
|
||||
DEBUG_LOG(m_logger) << "scheduleId = " << m_assetId;
|
||||
DEBUG_LOG(m_logger) << "ms.id() = " << ms.id();
|
||||
DEBUG_LOG() << "scheduleId = " << m_assetId;
|
||||
DEBUG_LOG() << "ms.id() = " << ms.id();
|
||||
|
||||
QList<MountingPointPlan> diff;
|
||||
bool ok = m_dtc->getScheduleDifferences(m_assetId, diff);
|
||||
|
||||
if (ok)
|
||||
ERROR_LOG(m_logger) << "Instrumentation plan complete!";
|
||||
ERROR_LOG() << "Instrumentation plan complete!";
|
||||
else
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Instrumentation plan not complete !!!";
|
||||
ERROR_LOG() << "Instrumentation plan not complete !!!";
|
||||
for (const MountingPointPlan &mpp : std::as_const(diff))
|
||||
ERROR_LOG(m_logger) << "Diff - # mpp.structureElementId() = " << mpp.structureElementId();
|
||||
ERROR_LOG() << "Diff - # mpp.structureElementId() = " << mpp.structureElementId();
|
||||
}
|
||||
|
||||
QTest::qWait(1000);
|
||||
@@ -1065,7 +1064,7 @@ void IsmTests::checkSchedule()
|
||||
// ------------------------------------------------------------------------------
|
||||
void IsmTests::tryCreateMountingPointPlan()
|
||||
{
|
||||
INFO_LOG(m_logger) << "trying to send MountingPointPlanCreateRequest";
|
||||
INFO_LOG() << "trying to send MountingPointPlanCreateRequest";
|
||||
|
||||
MountingPointPlanModifyRequest data;
|
||||
|
||||
@@ -1075,7 +1074,7 @@ void IsmTests::tryCreateMountingPointPlan()
|
||||
|
||||
if (!m_ftc->mountingPointPlanModifyRequest(data, this))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error requesting create data";
|
||||
ERROR_LOG() << "Error requesting create data";
|
||||
failExit();
|
||||
}
|
||||
|
||||
@@ -1087,7 +1086,7 @@ void IsmTests::tryCreateMountingPointPlan()
|
||||
|
||||
if (!m_ftc->mountingPointPlanModifyRequest(data, this))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error requesting create data";
|
||||
ERROR_LOG() << "Error requesting create data";
|
||||
failExit();
|
||||
}
|
||||
|
||||
@@ -1099,7 +1098,7 @@ void IsmTests::tryCreateMountingPointPlan()
|
||||
// ------------------------------------------------------------------------------
|
||||
void IsmTests::onError(const QString &reason)
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Got Reply error: " << reason;
|
||||
ERROR_LOG() << "Got Reply error: " << reason;
|
||||
failExit();
|
||||
}
|
||||
|
||||
@@ -1111,7 +1110,7 @@ void IsmTests::onCreateReply(const Core::FunctionReplyObject &replyObject)
|
||||
onError(replyObject.translated());
|
||||
return;
|
||||
}
|
||||
INFO_LOG(m_logger) << "Got createReply with id " << replyObject.id()
|
||||
INFO_LOG() << "Got createReply with id " << replyObject.id()
|
||||
<< " and errorString " << replyObject.translated();
|
||||
QTimer::singleShot(0, qApp, &QCoreApplication::quit);
|
||||
}
|
||||
@@ -1125,7 +1124,7 @@ void IsmTests::onModifyReply(const Core::FunctionReplyObject &replyObject)
|
||||
onError(replyObject.translated());
|
||||
return;
|
||||
}
|
||||
INFO_LOG(m_logger) << "Got modifyRequest with id " << replyObject.id()
|
||||
INFO_LOG() << "Got modifyRequest with id " << replyObject.id()
|
||||
<< " and errorString " << replyObject.translated();
|
||||
QTimer::singleShot(0, qApp, &QCoreApplication::quit);
|
||||
}
|
||||
@@ -1138,7 +1137,7 @@ void IsmTests::onRemoveReply(const Core::FunctionReplyObject &replyObject)
|
||||
onError(replyObject.translated());
|
||||
return;
|
||||
}
|
||||
INFO_LOG(m_logger) << "Got removeReply with id " << replyObject.id()
|
||||
INFO_LOG() << "Got removeReply with id " << replyObject.id()
|
||||
<< " and errorString " << replyObject.translated();
|
||||
QTimer::singleShot(0, qApp, &QCoreApplication::quit);
|
||||
}
|
||||
@@ -1146,7 +1145,7 @@ void IsmTests::onRemoveReply(const Core::FunctionReplyObject &replyObject)
|
||||
// ------------------------------------------------------------------------------
|
||||
void IsmTests::failExit()
|
||||
{
|
||||
ERROR_LOG(m_logger) << "FAIL EXIT !";
|
||||
ERROR_LOG() << "FAIL EXIT !";
|
||||
m_bTestsSuccessful = false;
|
||||
QTimer::singleShot(0, qApp, &QCoreApplication::quit);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user