Adds immediate migration results in progress

This commit is contained in:
torsten committed 2026-08-19 11:18:24 +02:00
1 parent 8453e104c5
commit 3bb6e89496
2102 files changed
+17482 -15071

No files matched your search

@@ -39,7 +39,7 @@ MrkTests::~MrkTests()
//-----------------------------------------------------------------------------
bool MrkTests::init(int domainId, int exerciseId, int testId, int markerId, int snapshotId)
{
INFO_LOG() << "MrkTests::init() "
INFO_LOG(m_logger) << "MrkTests::init() "
<< " domainId:" << domainId
<< " exerciseId:" << exerciseId
<< " testId: " << testId
@@ -58,18 +58,18 @@ bool MrkTests::init(int domainId, int exerciseId, int testId, int markerId, int
m_ddsConnector->initPublisherSubscriber();
// Access to FTC
DEBUG_LOG() << "create ftc";
DEBUG_LOG(m_logger) << "create ftc";
m_ftc = MarkerManagement::Interface::Ftc::create(m_ddsConnector);
DEBUG_LOG() << "init ftc";
DEBUG_LOG(m_logger) << "init ftc";
bool bRet = m_ftc->enableAll();
DEBUG_LOG() << "init end - bRet = " << bRet;
DEBUG_LOG(m_logger) << "init end - bRet = " << bRet;
// Access to DTC
DEBUG_LOG() << "create dtc";
DEBUG_LOG(m_logger) << "create dtc";
m_dtc = MarkerManagement::Interface::Dtc::create(m_ddsConnector);
DEBUG_LOG() << "init dtc";
DEBUG_LOG(m_logger) << "init dtc";
bRet = m_dtc->enableAll();
DEBUG_LOG() << "init end - bRet = " << bRet;
DEBUG_LOG(m_logger) << "init end - bRet = " << bRet;
return bRet;
} // end of init()
@@ -77,7 +77,7 @@ bool MrkTests::init(int domainId, int exerciseId, int testId, int markerId, int
//-----------------------------------------------------------------------------
void MrkTests::startTest()
{
INFO_LOG() << "startTest() exerciseId:" << m_exerciseId
INFO_LOG(m_logger) << "startTest() exerciseId:" << m_exerciseId
<< " testId:" << m_testId
<< " markerId:" << m_markerId
;
@@ -112,10 +112,10 @@ void MrkTests::tryCreate()
MarkerModifyRequest data;
getMarkerCreateRequestData(data);
INFO_LOG() << "trying to send MarkerCreateRequest";
INFO_LOG(m_logger) << "trying to send MarkerCreateRequest";
if (!m_ftc->markerModifyRequest(data, this))
{
ERROR_LOG() << "Error requesting create data";
ERROR_LOG(m_logger) << "Error requesting create data";
failExit();
}
} // end of tryCreate()
@@ -127,10 +127,10 @@ void MrkTests::tryModify()
MarkerModifyRequest data;
getMarkerModifyRequestData(data);
INFO_LOG() << "trying to send MarkerModifyRequest for markerId:" << data.id();
INFO_LOG(m_logger) << "trying to send MarkerModifyRequest for markerId:" << data.id();
if (!m_ftc->markerModifyRequest(data, this))
{
ERROR_LOG() << "Error requesting modify data for markerId:" << data.id();
ERROR_LOG(m_logger) << "Error requesting modify data for markerId:" << data.id();
failExit();
}
} // end of tryModify()
@@ -143,10 +143,10 @@ void MrkTests::tryRemove()
data.id(m_markerId);
INFO_LOG() << "trying to send remove request for markerId:" << data.id();
INFO_LOG(m_logger) << "trying to send remove request for markerId:" << data.id();
if (!m_ftc->markerRemoveRequest(data, this))
{
ERROR_LOG() << "Error requesting remove data for markerId:" << data.id();
ERROR_LOG(m_logger) << "Error requesting remove data for markerId:" << data.id();
failExit();
}
} // end of tryRemove()
@@ -155,22 +155,22 @@ void MrkTests::tryRemove()
void MrkTests::tryGetAllMarkers()
{
m_eTestStep = eGetAllMarkers;
DEBUG_LOG() << "trying to get all markers";
DEBUG_LOG(m_logger) << "trying to get all markers";
m_dtc->waitForHistoricalDataMarker();
const QMap<qint32, MarkerManagement::Marker> map = m_dtc->markers();
if (map.isEmpty())
{
ERROR_LOG() << "Error requesting all marker data";
ERROR_LOG(m_logger) << "Error requesting all marker data";
QTimer::singleShot(0, qApp, &QCoreApplication::quit);
return;
}
INFO_LOG() << "Amout of existing markers:" << map.size();
INFO_LOG(m_logger) << "Amout of existing markers:" << map.size();
m_markerId = map.firstKey();
for (auto it = map.begin(); it != map.end(); ++it)
{
INFO_LOG() << "Mrk(" << it.key() << ") :"
INFO_LOG(m_logger) << "Mrk(" << it.key() << ") :"
<< " note:" << it.value().note()
<< " operatorId:" << it.value().operatorId()
<< " timeStamp:" << it.value().timeStamp()
@@ -185,14 +185,14 @@ void MrkTests::tryGetAllMarkers()
//-----------------------------------------------------------------------------
void MrkTests::tryGetMarker()
{
DEBUG_LOG() << "trying to get marker with id:" << m_markerId;
DEBUG_LOG(m_logger) << "trying to get marker with id:" << m_markerId;
if (m_testId > 1)
m_eTestStep = eGetMarker;
if (m_markerId <= 0)
{
ERROR_LOG() << "invalid markerId - test aborted.";
ERROR_LOG(m_logger) << "invalid markerId - test aborted.";
failExit();
}
@@ -201,12 +201,12 @@ void MrkTests::tryGetMarker()
if (data.id() <= 0)
{
ERROR_LOG() << "Error receiving data for markerId " << m_markerId << " returnVal:" << data.id();
ERROR_LOG(m_logger) << "Error receiving data for markerId " << m_markerId << " returnVal:" << data.id();
failExit();
}
else
{
INFO_LOG() << "Mrk(" << data.id() << ") :"
INFO_LOG(m_logger) << "Mrk(" << data.id() << ") :"
<< " note:" << data.note()
<< " operatorId:" << data.operatorId()
<< " timeStamp:" << data.timeStamp()
@@ -220,7 +220,7 @@ void MrkTests::tryGetMarker()
{
if (! onCompareCreatedData(data))
{
ERROR_LOG() << "Compare created data failed!";
ERROR_LOG(m_logger) << "Compare created data failed!";
failExit();
}
else
@@ -233,7 +233,7 @@ void MrkTests::tryGetMarker()
{
if (! onCompareModifiedData(data))
{
ERROR_LOG() << "Compare modified data failed!";
ERROR_LOG(m_logger) << "Compare modified data failed!";
failExit();
}
else
@@ -263,10 +263,10 @@ void MrkTests::tryCreateSnapshot()
data.timeStamp(QDateTime::currentMSecsSinceEpoch());
data.planOverlay("Plan Overlay");
INFO_LOG() << "trying to send SnapshotCreateRequest";
INFO_LOG(m_logger) << "trying to send SnapshotCreateRequest";
if (!m_ftc->snapshotModifyRequest(data, this))
{
ERROR_LOG() << "Error requesting create data";
ERROR_LOG(m_logger) << "Error requesting create data";
failExit();
}
} // end of tryCreateSnapshot()
@@ -282,10 +282,10 @@ void MrkTests::tryModifySnapshot()
data.description("Dies ist ein Test modify");
data.planOverlay("Plan Overlay updated");
INFO_LOG() << "trying to send SnapshotModifyRequest for snapshotId:" << data.id();
INFO_LOG(m_logger) << "trying to send SnapshotModifyRequest for snapshotId:" << data.id();
if (!m_ftc->snapshotModifyRequest(data, this))
{
ERROR_LOG() << "Error requesting modify data for snapshotId:" << data.id();
ERROR_LOG(m_logger) << "Error requesting modify data for snapshotId:" << data.id();
failExit();
}
} // end of tryModifySnapshot()
@@ -298,10 +298,10 @@ void MrkTests::tryRemoveSnapshot()
data.id(m_snapshotId);
INFO_LOG() << "trying to send remove request for snapshotId:" << data.id();
INFO_LOG(m_logger) << "trying to send remove request for snapshotId:" << data.id();
if (!m_ftc->snapshotRemoveRequest(data, this))
{
ERROR_LOG() << "Error requesting remove data for snapshotId:" << data.id();
ERROR_LOG(m_logger) << "Error requesting remove data for snapshotId:" << data.id();
failExit();
}
} // end of tryRemoveSnapshot()
@@ -310,19 +310,19 @@ void MrkTests::tryRemoveSnapshot()
//-----------------------------------------------------------------------------
void MrkTests::onMarkerCreateReply(const Core::FunctionReplyObject &replyObject)
{
INFO_LOG() << "Got createReply with id " << replyObject.id()
INFO_LOG(m_logger) << "Got createReply with id " << replyObject.id()
<< " and errorString " << replyObject.translated();
m_markerId = replyObject.id();
if (replyObject.error())
{
ERROR_LOG() << "Error requesting create data";
ERROR_LOG(m_logger) << "Error requesting create data";
failExit();
return;
}
else
DEBUG_LOG() << "Requesting create data ok. Got new id:" << replyObject.id() << " ... ok.";
DEBUG_LOG(m_logger) << "Requesting create data ok. Got new id:" << replyObject.id() << " ... ok.";
if (m_testId == 0)
// QTimer::singleShot(0, this, &MrkTests::tryModify()));
@@ -338,17 +338,17 @@ void MrkTests::onMarkerModifyReply(const Core::FunctionReplyObject &replyObject)
if (m_eTestStep == TestStep::eCreate)
return onMarkerCreateReply(replyObject);
INFO_LOG() << "Got modifyRequest with id " << replyObject.id()
INFO_LOG(m_logger) << "Got modifyRequest with id " << replyObject.id()
<< " and errorString " << replyObject.translated();
if (replyObject.error())
{
ERROR_LOG() << "Error requesting modify data for id:" << replyObject.id();
ERROR_LOG(m_logger) << "Error requesting modify data for id:" << replyObject.id();
failExit();
return;
}
else
DEBUG_LOG() << "Requesting modify data for id:" << replyObject.id() << " ... ok.";
DEBUG_LOG(m_logger) << "Requesting modify data for id:" << replyObject.id() << " ... ok.";
if (m_testId == 0)
// QTimer::singleShot(0, this, &MrkTests::tryDelete()));
@@ -361,17 +361,17 @@ void MrkTests::onMarkerModifyReply(const Core::FunctionReplyObject &replyObject)
//-----------------------------------------------------------------------------
void MrkTests::onMarkerRemoveReply(const Core::FunctionReplyObject &replyObject)
{
INFO_LOG() << "Got removeReply with id " << replyObject.id()
INFO_LOG(m_logger) << "Got removeReply with id " << replyObject.id()
<< " and errorString " << replyObject.translated();
if (replyObject.error())
{
ERROR_LOG() << "Error requesting remove data for markerId:" << replyObject.id();
ERROR_LOG(m_logger) << "Error requesting remove data for markerId:" << replyObject.id();
failExit();
return;
}
else
DEBUG_LOG() << "Requesting remove data for markerId:" << replyObject.id() << " ... ok.";
DEBUG_LOG(m_logger) << "Requesting remove data for markerId:" << replyObject.id() << " ... ok.";
if (m_testId == 0)
{
@@ -386,19 +386,19 @@ void MrkTests::onMarkerRemoveReply(const Core::FunctionReplyObject &replyObject)
//-----------------------------------------------------------------------------
void MrkTests::onSnapshotCreateReply(const Core::FunctionReplyObject &replyObject)
{
INFO_LOG() << "Got createReply with id " << replyObject.id()
INFO_LOG(m_logger) << "Got createReply with id " << replyObject.id()
<< " and errorString " << replyObject.translated();
m_snapshotId = replyObject.id();
if (replyObject.error())
{
ERROR_LOG() << "Error requesting create data";
ERROR_LOG(m_logger) << "Error requesting create data";
failExit();
return;
}
else
DEBUG_LOG() << "Requesting create data ok. Got new id:" << replyObject.id() << " ... ok.";
DEBUG_LOG(m_logger) << "Requesting create data ok. Got new id:" << replyObject.id() << " ... ok.";
if (m_testId == 0)
QTimer::singleShot(0, this, &MrkTests::tryModifySnapshot);
@@ -413,17 +413,17 @@ void MrkTests::onSnapshotModifyReply(const Core::FunctionReplyObject &replyObjec
if (m_eTestStep == TestStep::eCreate)
return onSnapshotCreateReply(replyObject);
INFO_LOG() << "Got modifyRequest with id " << replyObject.id()
INFO_LOG(m_logger) << "Got modifyRequest with id " << replyObject.id()
<< " and errorString " << replyObject.translated();
if (replyObject.error())
{
ERROR_LOG() << "Error requesting modify data for id:" << replyObject.id();
ERROR_LOG(m_logger) << "Error requesting modify data for id:" << replyObject.id();
failExit();
return;
}
else
DEBUG_LOG() << "Requesting modify data for id:" << replyObject.id() << " ... ok.";
DEBUG_LOG(m_logger) << "Requesting modify data for id:" << replyObject.id() << " ... ok.";
if (m_testId == 0)
QTimer::singleShot(0, this, &MrkTests::tryRemoveSnapshot);
@@ -435,21 +435,21 @@ void MrkTests::onSnapshotModifyReply(const Core::FunctionReplyObject &replyObjec
//-----------------------------------------------------------------------------
void MrkTests::onSnapshotRemoveReply(const Core::FunctionReplyObject &replyObject)
{
INFO_LOG() << "Got removeReply with id " << replyObject.id()
INFO_LOG(m_logger) << "Got removeReply with id " << replyObject.id()
<< " and errorString " << replyObject.translated();
if (replyObject.error())
{
ERROR_LOG() << "Error requesting remove data for markerId:" << replyObject.id();
ERROR_LOG(m_logger) << "Error requesting remove data for markerId:" << replyObject.id();
failExit();
return;
}
else
DEBUG_LOG() << "Requesting remove data for markerId:" << replyObject.id() << " ... ok.";
DEBUG_LOG(m_logger) << "Requesting remove data for markerId:" << replyObject.id() << " ... ok.";
if (m_testId == 0)
{
INFO_LOG() << "***** FTC/TDC test successfully finished. (used snapshotId:" << replyObject.id() << ") *****";
INFO_LOG(m_logger) << "***** FTC/TDC test successfully finished. (used snapshotId:" << replyObject.id() << ") *****";
// ansonsten verheriger Ausstieg mit Errorlog.
}
@@ -461,21 +461,21 @@ void MrkTests::onSnapshotRemoveReply(const Core::FunctionReplyObject &replyObjec
//-----------------------------------------------------------------------------
void MrkTests::onReceiveMarkerChanged(const Marker &data, DataModification modType)
{
// INFO_LOG() << "onReceiveMarkerChanged() markerId:" << data.id()
// INFO_LOG(m_logger) << "onReceiveMarkerChanged() markerId:" << data.id()
// << " modificationType: = " << (int)modType<< " received";
switch (modType)
{
case DataModification::eAdded:
INFO_LOG() << "*** Marker added received. markerId:" << data.id();
INFO_LOG(m_logger) << "*** Marker added received. markerId:" << data.id();
break;
case DataModification::eModified:
INFO_LOG() << "*** Marker modified received. markerId:" << data.id();
INFO_LOG(m_logger) << "*** Marker modified received. markerId:" << data.id();
break;
case DataModification::eRemoved:
INFO_LOG() << "*** Marker removed received. markerId:" << data.id();
INFO_LOG(m_logger) << "*** Marker removed received. markerId:" << data.id();
break;
}
@@ -534,7 +534,7 @@ void MrkTests::getMarkerModifyRequestData(MarkerModifyRequest &data)
//-----------------------------------------------------------------------------
bool MrkTests::onCompareCreatedData(Marker &data)
{
DEBUG_LOG() << "start onCompareCreatedData() for id :" << data.id();
DEBUG_LOG(m_logger) << "start onCompareCreatedData() for id :" << data.id();
// Vergleicht die zurueckgelesen Datan mit den statischen create Daten
@@ -558,7 +558,7 @@ bool MrkTests::onCompareCreatedData(Marker &data)
if (createData.descriptions().size() != data.descriptions().size())
{
ERROR_LOG() << "Error onCompareCreatedData() different number of description data.";
ERROR_LOG(m_logger) << "Error onCompareCreatedData() different number of description data.";
failExit();
return false;
}
@@ -575,7 +575,7 @@ bool MrkTests::onCompareCreatedData(Marker &data)
if (got.content() != expected.content())
{
ERROR_LOG() << "Content for description does not match: "
ERROR_LOG(m_logger) << "Content for description does not match: "
<< got.content() << " - "
<< expected.content();
failExit();
@@ -585,12 +585,12 @@ bool MrkTests::onCompareCreatedData(Marker &data)
}
if (foundCount != 3)
{
ERROR_LOG() << "Did not found all three expected descriptions";
ERROR_LOG(m_logger) << "Did not found all three expected descriptions";
failExit();
return false;
}
DEBUG_LOG() << "successfull finished onCompareCreatedData() for id :" << data.id();
DEBUG_LOG(m_logger) << "successfull finished onCompareCreatedData() for id :" << data.id();
return true;
} // end of onCompareCreatedData()
@@ -598,7 +598,7 @@ bool MrkTests::onCompareCreatedData(Marker &data)
//-----------------------------------------------------------------------------
bool MrkTests::onCompareModifiedData(Marker &data)
{
DEBUG_LOG() << "start onCompareModifiedData() for id :" << data.id();
DEBUG_LOG(m_logger) << "start onCompareModifiedData() for id :" << data.id();
MarkerModifyRequest modifyData;
@@ -632,7 +632,7 @@ bool MrkTests::onCompareModifiedData(Marker &data)
if (got.content() != expected.content())
{
ERROR_LOG() << "Content for description does not match: "
ERROR_LOG(m_logger) << "Content for description does not match: "
<< got.content() << " - "
<< expected.content();
failExit();
@@ -642,12 +642,12 @@ bool MrkTests::onCompareModifiedData(Marker &data)
}
if (foundCount != 3)
{
ERROR_LOG() << "Did not found all three expected descriptions";
ERROR_LOG(m_logger) << "Did not found all three expected descriptions";
failExit();
return false;
}
DEBUG_LOG() << "successfull finished onCompareModifiedData() for id :" << data.id();
DEBUG_LOG(m_logger) << "successfull finished onCompareModifiedData() for id :" << data.id();
return true;
} // end of onCompareModifiedData()
@@ -65,6 +65,7 @@ protected Q_SLOTS:
void onReceiveMarkerChanged(const Marker &data, DataModification modType);
protected:
NGL::INGLLogger &m_logger;
// Callbackfunctions for FTC
void onMarkerCreateReply(const Core::FunctionReplyObject &replyObject);
void onMarkerModifyReply(const Core::FunctionReplyObject &replyObject) override final;