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
@@ -32,7 +32,7 @@ CODEGEN_TOPIC_TYPEDEFS(SRCS_common ${xml_FILE})
|
||||
# generate mrk_[d|f]tc.h
|
||||
CODEGEN_CLIENT_TOPICS_IFC(SRCS_common ${xml_FILE})
|
||||
|
||||
NGL_ADD_LIBRARY(AAR SV WS svcMrkCommon SHARED ${SRCS_common})
|
||||
NGL_ADD_LIBRARY2(AAR SV WS svcMrkCommon SHARED ${SRCS_common})
|
||||
NGL_TARGET_INCLUDE_DIRECTORIES(svcMrkCommon
|
||||
PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../
|
||||
@@ -60,7 +60,7 @@ SET(SRCS_client
|
||||
# generate mrk_[d|f]tc_impl.[cpp|h]
|
||||
CODEGEN_CLIENT_TOPICS_IMPL(SRCS_client ${xml_FILE})
|
||||
|
||||
NGL_ADD_LIBRARY(AAR SV WS svcMrkClient SHARED ${SRCS_client})
|
||||
NGL_ADD_LIBRARY2(AAR SV WS svcMrkClient SHARED ${SRCS_client})
|
||||
NGL_TARGET_INCLUDE_DIRECTORIES(svcMrkClient
|
||||
PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../
|
||||
@@ -105,7 +105,7 @@ CODEGEN_SERVER_TOPICS(SRCS_server ${xml_FILE})
|
||||
# Generate mrk.sql, mrk.xml
|
||||
CODEGEN_SQL(SRCS_server ${xml_FILE})
|
||||
|
||||
NGL_ADD_LIBRARY(AAR SV svcMrkServer SHARED ${SRCS_server})
|
||||
NGL_ADD_LIBRARY2(AAR SV svcMrkServer SHARED ${SRCS_server})
|
||||
NGL_TARGET_INCLUDE_DIRECTORIES(svcMrkServer
|
||||
PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../
|
||||
|
||||
+62
-63
@@ -27,7 +27,6 @@ MrkTests::MrkTests(QObject *parent)
|
||||
, m_markerId(0)
|
||||
, m_eTestStep(eUnknown)
|
||||
, m_bTestsSuccessful(true)
|
||||
, m_logger(getLogger("MrkTests"))
|
||||
{
|
||||
qRegisterMetaType<Core::FunctionReply>("Core::FunctionReply");
|
||||
} // end of ctor()
|
||||
@@ -40,7 +39,7 @@ MrkTests::~MrkTests()
|
||||
//-----------------------------------------------------------------------------
|
||||
bool MrkTests::init(int domainId, int exerciseId, int testId, int markerId, int snapshotId)
|
||||
{
|
||||
INFO_LOG(m_logger) << "MrkTests::init() "
|
||||
INFO_LOG() << "MrkTests::init() "
|
||||
<< " domainId:" << domainId
|
||||
<< " exerciseId:" << exerciseId
|
||||
<< " testId: " << testId
|
||||
@@ -59,18 +58,18 @@ bool MrkTests::init(int domainId, int exerciseId, int testId, int markerId, int
|
||||
m_ddsConnector->initPublisherSubscriber();
|
||||
|
||||
// Access to FTC
|
||||
DEBUG_LOG(m_logger) << "create ftc";
|
||||
DEBUG_LOG() << "create ftc";
|
||||
m_ftc = MarkerManagement::Interface::Ftc::create(m_ddsConnector);
|
||||
DEBUG_LOG(m_logger) << "init ftc";
|
||||
DEBUG_LOG() << "init ftc";
|
||||
bool bRet = m_ftc->enableAll();
|
||||
DEBUG_LOG(m_logger) << "init end - bRet = " << bRet;
|
||||
DEBUG_LOG() << "init end - bRet = " << bRet;
|
||||
|
||||
// Access to DTC
|
||||
DEBUG_LOG(m_logger) << "create dtc";
|
||||
DEBUG_LOG() << "create dtc";
|
||||
m_dtc = MarkerManagement::Interface::Dtc::create(m_ddsConnector);
|
||||
DEBUG_LOG(m_logger) << "init dtc";
|
||||
DEBUG_LOG() << "init dtc";
|
||||
bRet = m_dtc->enableAll();
|
||||
DEBUG_LOG(m_logger) << "init end - bRet = " << bRet;
|
||||
DEBUG_LOG() << "init end - bRet = " << bRet;
|
||||
|
||||
return bRet;
|
||||
} // end of init()
|
||||
@@ -78,7 +77,7 @@ bool MrkTests::init(int domainId, int exerciseId, int testId, int markerId, int
|
||||
//-----------------------------------------------------------------------------
|
||||
void MrkTests::startTest()
|
||||
{
|
||||
INFO_LOG(m_logger) << "startTest() exerciseId:" << m_exerciseId
|
||||
INFO_LOG() << "startTest() exerciseId:" << m_exerciseId
|
||||
<< " testId:" << m_testId
|
||||
<< " markerId:" << m_markerId
|
||||
;
|
||||
@@ -113,10 +112,10 @@ void MrkTests::tryCreate()
|
||||
MarkerModifyRequest data;
|
||||
getMarkerCreateRequestData(data);
|
||||
|
||||
INFO_LOG(m_logger) << "trying to send MarkerCreateRequest";
|
||||
INFO_LOG() << "trying to send MarkerCreateRequest";
|
||||
if (!m_ftc->markerModifyRequest(data, this))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error requesting create data";
|
||||
ERROR_LOG() << "Error requesting create data";
|
||||
failExit();
|
||||
}
|
||||
} // end of tryCreate()
|
||||
@@ -128,10 +127,10 @@ void MrkTests::tryModify()
|
||||
MarkerModifyRequest data;
|
||||
getMarkerModifyRequestData(data);
|
||||
|
||||
INFO_LOG(m_logger) << "trying to send MarkerModifyRequest for markerId:" << data.id();
|
||||
INFO_LOG() << "trying to send MarkerModifyRequest for markerId:" << data.id();
|
||||
if (!m_ftc->markerModifyRequest(data, this))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error requesting modify data for markerId:" << data.id();
|
||||
ERROR_LOG() << "Error requesting modify data for markerId:" << data.id();
|
||||
failExit();
|
||||
}
|
||||
} // end of tryModify()
|
||||
@@ -144,10 +143,10 @@ void MrkTests::tryRemove()
|
||||
|
||||
data.id(m_markerId);
|
||||
|
||||
INFO_LOG(m_logger) << "trying to send remove request for markerId:" << data.id();
|
||||
INFO_LOG() << "trying to send remove request for markerId:" << data.id();
|
||||
if (!m_ftc->markerRemoveRequest(data, this))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error requesting remove data for markerId:" << data.id();
|
||||
ERROR_LOG() << "Error requesting remove data for markerId:" << data.id();
|
||||
failExit();
|
||||
}
|
||||
} // end of tryRemove()
|
||||
@@ -156,22 +155,22 @@ void MrkTests::tryRemove()
|
||||
void MrkTests::tryGetAllMarkers()
|
||||
{
|
||||
m_eTestStep = eGetAllMarkers;
|
||||
DEBUG_LOG(m_logger) << "trying to get all markers";
|
||||
DEBUG_LOG() << "trying to get all markers";
|
||||
|
||||
m_dtc->waitForHistoricalDataMarker();
|
||||
const QMap<qint32, MarkerManagement::Marker> map = m_dtc->markers();
|
||||
if (map.isEmpty())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error requesting all marker data";
|
||||
ERROR_LOG() << "Error requesting all marker data";
|
||||
QTimer::singleShot(0, qApp, &QCoreApplication::quit);
|
||||
return;
|
||||
}
|
||||
|
||||
INFO_LOG(m_logger) << "Amout of existing markers:" << map.size();
|
||||
INFO_LOG() << "Amout of existing markers:" << map.size();
|
||||
m_markerId = map.firstKey();
|
||||
for (auto it = map.begin(); it != map.end(); ++it)
|
||||
{
|
||||
INFO_LOG(m_logger) << "Mrk(" << it.key() << ") :"
|
||||
INFO_LOG() << "Mrk(" << it.key() << ") :"
|
||||
<< " note:" << it.value().note()
|
||||
<< " operatorId:" << it.value().operatorId()
|
||||
<< " timeStamp:" << it.value().timeStamp()
|
||||
@@ -186,14 +185,14 @@ void MrkTests::tryGetAllMarkers()
|
||||
//-----------------------------------------------------------------------------
|
||||
void MrkTests::tryGetMarker()
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "trying to get marker with id:" << m_markerId;
|
||||
DEBUG_LOG() << "trying to get marker with id:" << m_markerId;
|
||||
|
||||
if (m_testId > 1)
|
||||
m_eTestStep = eGetMarker;
|
||||
|
||||
if (m_markerId <= 0)
|
||||
{
|
||||
ERROR_LOG(m_logger) << "invalid markerId - test aborted.";
|
||||
ERROR_LOG() << "invalid markerId - test aborted.";
|
||||
failExit();
|
||||
}
|
||||
|
||||
@@ -202,12 +201,12 @@ void MrkTests::tryGetMarker()
|
||||
|
||||
if (data.id() <= 0)
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error receiving data for markerId " << m_markerId << " returnVal:" << data.id();
|
||||
ERROR_LOG() << "Error receiving data for markerId " << m_markerId << " returnVal:" << data.id();
|
||||
failExit();
|
||||
}
|
||||
else
|
||||
{
|
||||
INFO_LOG(m_logger) << "Mrk(" << data.id() << ") :"
|
||||
INFO_LOG() << "Mrk(" << data.id() << ") :"
|
||||
<< " note:" << data.note()
|
||||
<< " operatorId:" << data.operatorId()
|
||||
<< " timeStamp:" << data.timeStamp()
|
||||
@@ -221,7 +220,7 @@ void MrkTests::tryGetMarker()
|
||||
{
|
||||
if (! onCompareCreatedData(data))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Compare created data failed!";
|
||||
ERROR_LOG() << "Compare created data failed!";
|
||||
failExit();
|
||||
}
|
||||
else
|
||||
@@ -234,7 +233,7 @@ void MrkTests::tryGetMarker()
|
||||
{
|
||||
if (! onCompareModifiedData(data))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Compare modified data failed!";
|
||||
ERROR_LOG() << "Compare modified data failed!";
|
||||
failExit();
|
||||
}
|
||||
else
|
||||
@@ -264,10 +263,10 @@ void MrkTests::tryCreateSnapshot()
|
||||
data.timeStamp(QDateTime::currentMSecsSinceEpoch());
|
||||
data.planOverlay("Plan Overlay");
|
||||
|
||||
INFO_LOG(m_logger) << "trying to send SnapshotCreateRequest";
|
||||
INFO_LOG() << "trying to send SnapshotCreateRequest";
|
||||
if (!m_ftc->snapshotModifyRequest(data, this))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error requesting create data";
|
||||
ERROR_LOG() << "Error requesting create data";
|
||||
failExit();
|
||||
}
|
||||
} // end of tryCreateSnapshot()
|
||||
@@ -283,10 +282,10 @@ void MrkTests::tryModifySnapshot()
|
||||
data.description("Dies ist ein Test modify");
|
||||
data.planOverlay("Plan Overlay updated");
|
||||
|
||||
INFO_LOG(m_logger) << "trying to send SnapshotModifyRequest for snapshotId:" << data.id();
|
||||
INFO_LOG() << "trying to send SnapshotModifyRequest for snapshotId:" << data.id();
|
||||
if (!m_ftc->snapshotModifyRequest(data, this))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error requesting modify data for snapshotId:" << data.id();
|
||||
ERROR_LOG() << "Error requesting modify data for snapshotId:" << data.id();
|
||||
failExit();
|
||||
}
|
||||
} // end of tryModifySnapshot()
|
||||
@@ -299,10 +298,10 @@ void MrkTests::tryRemoveSnapshot()
|
||||
|
||||
data.id(m_snapshotId);
|
||||
|
||||
INFO_LOG(m_logger) << "trying to send remove request for snapshotId:" << data.id();
|
||||
INFO_LOG() << "trying to send remove request for snapshotId:" << data.id();
|
||||
if (!m_ftc->snapshotRemoveRequest(data, this))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error requesting remove data for snapshotId:" << data.id();
|
||||
ERROR_LOG() << "Error requesting remove data for snapshotId:" << data.id();
|
||||
failExit();
|
||||
}
|
||||
} // end of tryRemoveSnapshot()
|
||||
@@ -311,19 +310,19 @@ void MrkTests::tryRemoveSnapshot()
|
||||
//-----------------------------------------------------------------------------
|
||||
void MrkTests::onMarkerCreateReply(const Core::FunctionReplyObject &replyObject)
|
||||
{
|
||||
INFO_LOG(m_logger) << "Got createReply with id " << replyObject.id()
|
||||
INFO_LOG() << "Got createReply with id " << replyObject.id()
|
||||
<< " and errorString " << replyObject.translated();
|
||||
|
||||
m_markerId = replyObject.id();
|
||||
|
||||
if (replyObject.error())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error requesting create data";
|
||||
ERROR_LOG() << "Error requesting create data";
|
||||
failExit();
|
||||
return;
|
||||
}
|
||||
else
|
||||
DEBUG_LOG(m_logger) << "Requesting create data ok. Got new id:" << replyObject.id() << " ... ok.";
|
||||
DEBUG_LOG() << "Requesting create data ok. Got new id:" << replyObject.id() << " ... ok.";
|
||||
|
||||
if (m_testId == 0)
|
||||
// QTimer::singleShot(0, this, &MrkTests::tryModify()));
|
||||
@@ -339,17 +338,17 @@ void MrkTests::onMarkerModifyReply(const Core::FunctionReplyObject &replyObject)
|
||||
if (m_eTestStep == TestStep::eCreate)
|
||||
return onMarkerCreateReply(replyObject);
|
||||
|
||||
INFO_LOG(m_logger) << "Got modifyRequest with id " << replyObject.id()
|
||||
INFO_LOG() << "Got modifyRequest with id " << replyObject.id()
|
||||
<< " and errorString " << replyObject.translated();
|
||||
|
||||
if (replyObject.error())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error requesting modify data for id:" << replyObject.id();
|
||||
ERROR_LOG() << "Error requesting modify data for id:" << replyObject.id();
|
||||
failExit();
|
||||
return;
|
||||
}
|
||||
else
|
||||
DEBUG_LOG(m_logger) << "Requesting modify data for id:" << replyObject.id() << " ... ok.";
|
||||
DEBUG_LOG() << "Requesting modify data for id:" << replyObject.id() << " ... ok.";
|
||||
|
||||
if (m_testId == 0)
|
||||
// QTimer::singleShot(0, this, &MrkTests::tryDelete()));
|
||||
@@ -362,17 +361,17 @@ void MrkTests::onMarkerModifyReply(const Core::FunctionReplyObject &replyObject)
|
||||
//-----------------------------------------------------------------------------
|
||||
void MrkTests::onMarkerRemoveReply(const Core::FunctionReplyObject &replyObject)
|
||||
{
|
||||
INFO_LOG(m_logger) << "Got removeReply with id " << replyObject.id()
|
||||
INFO_LOG() << "Got removeReply with id " << replyObject.id()
|
||||
<< " and errorString " << replyObject.translated();
|
||||
|
||||
if (replyObject.error())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error requesting remove data for markerId:" << replyObject.id();
|
||||
ERROR_LOG() << "Error requesting remove data for markerId:" << replyObject.id();
|
||||
failExit();
|
||||
return;
|
||||
}
|
||||
else
|
||||
DEBUG_LOG(m_logger) << "Requesting remove data for markerId:" << replyObject.id() << " ... ok.";
|
||||
DEBUG_LOG() << "Requesting remove data for markerId:" << replyObject.id() << " ... ok.";
|
||||
|
||||
if (m_testId == 0)
|
||||
{
|
||||
@@ -387,19 +386,19 @@ void MrkTests::onMarkerRemoveReply(const Core::FunctionReplyObject &replyObject)
|
||||
//-----------------------------------------------------------------------------
|
||||
void MrkTests::onSnapshotCreateReply(const Core::FunctionReplyObject &replyObject)
|
||||
{
|
||||
INFO_LOG(m_logger) << "Got createReply with id " << replyObject.id()
|
||||
INFO_LOG() << "Got createReply with id " << replyObject.id()
|
||||
<< " and errorString " << replyObject.translated();
|
||||
|
||||
m_snapshotId = replyObject.id();
|
||||
|
||||
if (replyObject.error())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error requesting create data";
|
||||
ERROR_LOG() << "Error requesting create data";
|
||||
failExit();
|
||||
return;
|
||||
}
|
||||
else
|
||||
DEBUG_LOG(m_logger) << "Requesting create data ok. Got new id:" << replyObject.id() << " ... ok.";
|
||||
DEBUG_LOG() << "Requesting create data ok. Got new id:" << replyObject.id() << " ... ok.";
|
||||
|
||||
if (m_testId == 0)
|
||||
QTimer::singleShot(0, this, &MrkTests::tryModifySnapshot);
|
||||
@@ -414,17 +413,17 @@ void MrkTests::onSnapshotModifyReply(const Core::FunctionReplyObject &replyObjec
|
||||
if (m_eTestStep == TestStep::eCreate)
|
||||
return onSnapshotCreateReply(replyObject);
|
||||
|
||||
INFO_LOG(m_logger) << "Got modifyRequest with id " << replyObject.id()
|
||||
INFO_LOG() << "Got modifyRequest with id " << replyObject.id()
|
||||
<< " and errorString " << replyObject.translated();
|
||||
|
||||
if (replyObject.error())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error requesting modify data for id:" << replyObject.id();
|
||||
ERROR_LOG() << "Error requesting modify data for id:" << replyObject.id();
|
||||
failExit();
|
||||
return;
|
||||
}
|
||||
else
|
||||
DEBUG_LOG(m_logger) << "Requesting modify data for id:" << replyObject.id() << " ... ok.";
|
||||
DEBUG_LOG() << "Requesting modify data for id:" << replyObject.id() << " ... ok.";
|
||||
|
||||
if (m_testId == 0)
|
||||
QTimer::singleShot(0, this, &MrkTests::tryRemoveSnapshot);
|
||||
@@ -436,21 +435,21 @@ void MrkTests::onSnapshotModifyReply(const Core::FunctionReplyObject &replyObjec
|
||||
//-----------------------------------------------------------------------------
|
||||
void MrkTests::onSnapshotRemoveReply(const Core::FunctionReplyObject &replyObject)
|
||||
{
|
||||
INFO_LOG(m_logger) << "Got removeReply with id " << replyObject.id()
|
||||
INFO_LOG() << "Got removeReply with id " << replyObject.id()
|
||||
<< " and errorString " << replyObject.translated();
|
||||
|
||||
if (replyObject.error())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error requesting remove data for markerId:" << replyObject.id();
|
||||
ERROR_LOG() << "Error requesting remove data for markerId:" << replyObject.id();
|
||||
failExit();
|
||||
return;
|
||||
}
|
||||
else
|
||||
DEBUG_LOG(m_logger) << "Requesting remove data for markerId:" << replyObject.id() << " ... ok.";
|
||||
DEBUG_LOG() << "Requesting remove data for markerId:" << replyObject.id() << " ... ok.";
|
||||
|
||||
if (m_testId == 0)
|
||||
{
|
||||
INFO_LOG(m_logger) << "***** FTC/TDC test successfully finished. (used snapshotId:" << replyObject.id() << ") *****";
|
||||
INFO_LOG() << "***** FTC/TDC test successfully finished. (used snapshotId:" << replyObject.id() << ") *****";
|
||||
// ansonsten verheriger Ausstieg mit Errorlog.
|
||||
}
|
||||
|
||||
@@ -462,21 +461,21 @@ void MrkTests::onSnapshotRemoveReply(const Core::FunctionReplyObject &replyObjec
|
||||
//-----------------------------------------------------------------------------
|
||||
void MrkTests::onReceiveMarkerChanged(const Marker &data, DataModification modType)
|
||||
{
|
||||
// INFO_LOG(m_logger) << "onReceiveMarkerChanged() markerId:" << data.id()
|
||||
// INFO_LOG() << "onReceiveMarkerChanged() markerId:" << data.id()
|
||||
// << " modificationType: = " << (int)modType<< " received";
|
||||
|
||||
switch (modType)
|
||||
{
|
||||
case DataModification::eAdded:
|
||||
INFO_LOG(m_logger) << "*** Marker added received. markerId:" << data.id();
|
||||
INFO_LOG() << "*** Marker added received. markerId:" << data.id();
|
||||
break;
|
||||
|
||||
case DataModification::eModified:
|
||||
INFO_LOG(m_logger) << "*** Marker modified received. markerId:" << data.id();
|
||||
INFO_LOG() << "*** Marker modified received. markerId:" << data.id();
|
||||
break;
|
||||
|
||||
case DataModification::eRemoved:
|
||||
INFO_LOG(m_logger) << "*** Marker removed received. markerId:" << data.id();
|
||||
INFO_LOG() << "*** Marker removed received. markerId:" << data.id();
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -535,7 +534,7 @@ void MrkTests::getMarkerModifyRequestData(MarkerModifyRequest &data)
|
||||
//-----------------------------------------------------------------------------
|
||||
bool MrkTests::onCompareCreatedData(Marker &data)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "start onCompareCreatedData() for id :" << data.id();
|
||||
DEBUG_LOG() << "start onCompareCreatedData() for id :" << data.id();
|
||||
|
||||
// Vergleicht die zurueckgelesen Datan mit den statischen create Daten
|
||||
|
||||
@@ -559,7 +558,7 @@ bool MrkTests::onCompareCreatedData(Marker &data)
|
||||
|
||||
if (createData.descriptions().size() != data.descriptions().size())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error onCompareCreatedData() different number of description data.";
|
||||
ERROR_LOG() << "Error onCompareCreatedData() different number of description data.";
|
||||
failExit();
|
||||
return false;
|
||||
}
|
||||
@@ -576,7 +575,7 @@ bool MrkTests::onCompareCreatedData(Marker &data)
|
||||
|
||||
if (got.content() != expected.content())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Content for description does not match: "
|
||||
ERROR_LOG() << "Content for description does not match: "
|
||||
<< got.content() << " - "
|
||||
<< expected.content();
|
||||
failExit();
|
||||
@@ -586,12 +585,12 @@ bool MrkTests::onCompareCreatedData(Marker &data)
|
||||
}
|
||||
if (foundCount != 3)
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Did not found all three expected descriptions";
|
||||
ERROR_LOG() << "Did not found all three expected descriptions";
|
||||
failExit();
|
||||
return false;
|
||||
}
|
||||
|
||||
DEBUG_LOG(m_logger) << "successfull finished onCompareCreatedData() for id :" << data.id();
|
||||
DEBUG_LOG() << "successfull finished onCompareCreatedData() for id :" << data.id();
|
||||
|
||||
return true;
|
||||
} // end of onCompareCreatedData()
|
||||
@@ -599,7 +598,7 @@ bool MrkTests::onCompareCreatedData(Marker &data)
|
||||
//-----------------------------------------------------------------------------
|
||||
bool MrkTests::onCompareModifiedData(Marker &data)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "start onCompareModifiedData() for id :" << data.id();
|
||||
DEBUG_LOG() << "start onCompareModifiedData() for id :" << data.id();
|
||||
|
||||
MarkerModifyRequest modifyData;
|
||||
|
||||
@@ -633,7 +632,7 @@ bool MrkTests::onCompareModifiedData(Marker &data)
|
||||
|
||||
if (got.content() != expected.content())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Content for description does not match: "
|
||||
ERROR_LOG() << "Content for description does not match: "
|
||||
<< got.content() << " - "
|
||||
<< expected.content();
|
||||
failExit();
|
||||
@@ -643,12 +642,12 @@ bool MrkTests::onCompareModifiedData(Marker &data)
|
||||
}
|
||||
if (foundCount != 3)
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Did not found all three expected descriptions";
|
||||
ERROR_LOG() << "Did not found all three expected descriptions";
|
||||
failExit();
|
||||
return false;
|
||||
}
|
||||
|
||||
DEBUG_LOG(m_logger) << "successfull finished onCompareModifiedData() for id :" << data.id();
|
||||
DEBUG_LOG() << "successfull finished onCompareModifiedData() for id :" << data.id();
|
||||
|
||||
return true;
|
||||
} // end of onCompareModifiedData()
|
||||
|
||||
@@ -105,8 +105,6 @@ private:
|
||||
} m_eTestStep;
|
||||
|
||||
bool m_bTestsSuccessful;
|
||||
NGL::INGLLogger &m_logger;
|
||||
|
||||
};
|
||||
|
||||
} // namespace MarkerManagement
|
||||
@@ -13,18 +13,17 @@ namespace MarkerManagement
|
||||
|
||||
DdsHandler::DdsHandler(const std::shared_ptr<DDSConnector::DdsConnector> &ddsConnector)
|
||||
: m_ddsConnector(ddsConnector)
|
||||
, m_logger(getLogger("DdsHandler"))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "DdsHandler(" << m_ddsConnector->getDomainId() << ") for partition: " << m_ddsConnector->getDefaultPartition();
|
||||
DEBUG_LOG() << "DdsHandler(" << m_ddsConnector->getDomainId() << ") for partition: " << m_ddsConnector->getDefaultPartition();
|
||||
}
|
||||
|
||||
bool DdsHandler::init(const QStringList &qosFileList)
|
||||
{
|
||||
INFO_LOG(m_logger) << "--- Start MarkerManagement DDSHandler.";
|
||||
INFO_LOG() << "--- Start MarkerManagement DDSHandler.";
|
||||
|
||||
if (!m_ddsConnector->init(qosFileList))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error initializing dds connections - aborting";
|
||||
ERROR_LOG() << "Error initializing dds connections - aborting";
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -37,10 +36,10 @@ bool DdsHandler::init(const QStringList &qosFileList)
|
||||
m_ddsFts = MarkerManagement::Interface::Fts::create(m_ddsConnector);
|
||||
|
||||
bool bRet = m_ddsDts->enableAll();
|
||||
INFO_LOG(m_logger) << "Dts initialised";
|
||||
INFO_LOG() << "Dts initialised";
|
||||
|
||||
bRet &= m_ddsFts->enableAll();
|
||||
INFO_LOG(m_logger) << "Fts initialised";
|
||||
INFO_LOG() << "Fts initialised";
|
||||
|
||||
return bRet;
|
||||
}
|
||||
|
||||
@@ -33,8 +33,6 @@ private:
|
||||
std::shared_ptr<Core::TopicLockMaster> m_topicLockMaster;
|
||||
std::shared_ptr<MarkerManagement::Interface::Dts> m_ddsDts;
|
||||
std::shared_ptr<MarkerManagement::Interface::Fts> m_ddsFts;
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
};
|
||||
|
||||
} // namespace MarkerManagement
|
||||
@@ -20,7 +20,6 @@ HandlerMarker::HandlerMarker(const std::shared_ptr<DdsHandler> &ddsHandler,
|
||||
, Interface::Fts::MarkerRemoveRequestHandler(ddsHandler->fts())
|
||||
, m_ddsHandler(ddsHandler)
|
||||
, m_db(db)
|
||||
, m_logger(getLogger("HandlerMarker"))
|
||||
{
|
||||
} // end of ctor()
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -33,14 +32,14 @@ HandlerMarker::~HandlerMarker()
|
||||
|
||||
bool HandlerMarker::init()
|
||||
{
|
||||
INFO_LOG(m_logger) << "--- Start MarkerManagement HandlerMarker.";
|
||||
INFO_LOG() << "--- Start MarkerManagement HandlerMarker.";
|
||||
|
||||
QVector<Database::MrkMarkerDescription> dataDescriptionVec;
|
||||
|
||||
// read all marker from database
|
||||
if (!m_db->select(dataDescriptionVec))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error reading data from database!";
|
||||
ERROR_LOG() << "Error reading data from database!";
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -64,7 +63,7 @@ bool HandlerMarker::init()
|
||||
if (ret.error())
|
||||
{
|
||||
delete ifs;
|
||||
ERROR_LOG(m_logger) << ret();
|
||||
ERROR_LOG() << ret();
|
||||
bRet = false;
|
||||
return;
|
||||
}
|
||||
@@ -72,15 +71,15 @@ bool HandlerMarker::init()
|
||||
};
|
||||
if (!m_db->select(cb) || !bRet)
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error reading data from database!";
|
||||
ERROR_LOG() << "Error reading data from database!";
|
||||
return false;
|
||||
}
|
||||
|
||||
DEBUG_LOG(m_logger) << "m_objectMarkerMap.size() = " << m_objectMarkerMap.size();
|
||||
DEBUG_LOG() << "m_objectMarkerMap.size() = " << m_objectMarkerMap.size();
|
||||
|
||||
if (m_ddsHandler->fts() == nullptr)
|
||||
{
|
||||
ERROR_LOG(m_logger) << "m_ddsHandler->fts() == nullptr!";
|
||||
ERROR_LOG() << "m_ddsHandler->fts() == nullptr!";
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -91,10 +90,10 @@ bool HandlerMarker::init()
|
||||
void HandlerMarker::onMarkerModifyRequest(const rti::core::SampleIdentity &cookie,
|
||||
const Marker &request)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "MarkerModifyRequest: " << request;
|
||||
DEBUG_LOG() << "MarkerModifyRequest: " << request;
|
||||
auto ret = request.id() > 0 ? markerModifyRequest(request) : markerCreateRequest(request);
|
||||
if (ret.error())
|
||||
WARNING_LOG(m_logger) << ret();
|
||||
WARNING_LOG() << ret();
|
||||
m_ddsHandler->fts()->markerModifyReply(cookie, ret);
|
||||
}
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -133,10 +132,10 @@ Core::FunctionReplyObject HandlerMarker::markerModifyRequest(const Marker &reque
|
||||
void HandlerMarker::onMarkerRemoveRequest(const rti::core::SampleIdentity &cookie,
|
||||
const Core::RemoveElementRequest &request)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "MarkerRemoveRequest: " << request;
|
||||
DEBUG_LOG() << "MarkerRemoveRequest: " << request;
|
||||
auto ret = markerRemoveRequest(request);
|
||||
if (ret.error())
|
||||
WARNING_LOG(m_logger) << ret();
|
||||
WARNING_LOG() << ret();
|
||||
m_ddsHandler->fts()->markerRemoveReply(cookie, ret);
|
||||
}
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
@@ -41,8 +41,6 @@ private: // methods
|
||||
private: // attributes
|
||||
std::shared_ptr<DdsHandler> m_ddsHandler;
|
||||
std::shared_ptr<DatabaseInterface> m_db;
|
||||
NGL::INGLLogger &m_logger;
|
||||
|
||||
QHash<int, ObjectMarker *> m_objectMarkerMap;
|
||||
};
|
||||
|
||||
|
||||
@@ -19,7 +19,6 @@ HandlerSnapshot::HandlerSnapshot(const std::shared_ptr<DdsHandler> &ddsHandler,
|
||||
, Interface::Fts::SnapshotRemoveRequestHandler(ddsHandler->fts())
|
||||
, m_ddsHandler(ddsHandler)
|
||||
, m_db(db)
|
||||
, m_logger(getLogger("HandlerSnapshot"))
|
||||
{
|
||||
} // end of ctor()
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -32,7 +31,7 @@ HandlerSnapshot::~HandlerSnapshot()
|
||||
|
||||
bool HandlerSnapshot::init()
|
||||
{
|
||||
INFO_LOG(m_logger) << "--- Start MarkerManagement HandlerSnapshot.";
|
||||
INFO_LOG() << "--- Start MarkerManagement HandlerSnapshot.";
|
||||
|
||||
bool bRet = true;
|
||||
// create markerObjects
|
||||
@@ -45,7 +44,7 @@ bool HandlerSnapshot::init()
|
||||
if (ret.error())
|
||||
{
|
||||
delete ifs;
|
||||
ERROR_LOG(m_logger) << ret();
|
||||
ERROR_LOG() << ret();
|
||||
bRet = false;
|
||||
return;
|
||||
}
|
||||
@@ -53,11 +52,11 @@ bool HandlerSnapshot::init()
|
||||
};
|
||||
if (!m_db->select(cb) || !bRet)
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error reading data from database!";
|
||||
ERROR_LOG() << "Error reading data from database!";
|
||||
return false;
|
||||
}
|
||||
|
||||
DEBUG_LOG(m_logger) << "m_objectSnapshotMap.size() = " << m_objectSnapshotMap.size();
|
||||
DEBUG_LOG() << "m_objectSnapshotMap.size() = " << m_objectSnapshotMap.size();
|
||||
|
||||
return true;
|
||||
} // end of init()
|
||||
@@ -66,10 +65,10 @@ bool HandlerSnapshot::init()
|
||||
void HandlerSnapshot::onSnapshotModifyRequest(const rti::core::SampleIdentity &cookie,
|
||||
const Snapshot &request)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "SnapshotModifyRequest: " << request;
|
||||
DEBUG_LOG() << "SnapshotModifyRequest: " << request;
|
||||
auto ret = request.id() > 0 ? snapshotModifyRequest(request) : snapshotCreateRequest(request);
|
||||
if (ret.error())
|
||||
WARNING_LOG(m_logger) << ret();
|
||||
WARNING_LOG() << ret();
|
||||
m_ddsHandler->fts()->snapshotModifyReply(cookie, ret);
|
||||
|
||||
} // end of onSnapshotModifyRequest()
|
||||
@@ -119,7 +118,7 @@ Core::FunctionReplyObject HandlerSnapshot::snapshotModifyRequest(const Snapshot
|
||||
void HandlerSnapshot::onSnapshotRemoveRequest(const rti::core::SampleIdentity &cookie,
|
||||
const Core::RemoveElementRequest &request)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "onSnapshotRemoveRequest() id:" << request.id();
|
||||
DEBUG_LOG() << "onSnapshotRemoveRequest() id:" << request.id();
|
||||
|
||||
Core::FunctionReplyObject ret;
|
||||
ObjectSnapshot *ifs = m_objectSnapshotMap.value(request.id());
|
||||
@@ -137,7 +136,7 @@ void HandlerSnapshot::onSnapshotRemoveRequest(const rti::core::SampleIdentity &c
|
||||
}
|
||||
|
||||
if (ret.error())
|
||||
ERROR_LOG(m_logger) << ret();
|
||||
ERROR_LOG() << ret();
|
||||
else
|
||||
{
|
||||
// delete ObjectSnapshot
|
||||
|
||||
@@ -40,8 +40,6 @@ private: // methods
|
||||
private: // attributes
|
||||
std::shared_ptr<DdsHandler> m_ddsHandler;
|
||||
std::shared_ptr<DatabaseInterface> m_db;
|
||||
NGL::INGLLogger &m_logger;
|
||||
|
||||
QHash<int, ObjectSnapshot *> m_objectSnapshotMap;
|
||||
};
|
||||
|
||||
|
||||
@@ -36,14 +36,14 @@ Initialization::~Initialization()
|
||||
|
||||
bool Initialization::initialize(const std::shared_ptr<DDSConnector::DdsConnector> &ddsConnector, const QSqlDatabase &sqlDb)
|
||||
{
|
||||
INFO_LOG(m_logger) << "--- Start MarkerManagement Initialization.";
|
||||
INFO_LOG() << "--- Start MarkerManagement Initialization.";
|
||||
|
||||
// initialize DDS
|
||||
// for MarkerManagement => exerciseId = partitionId
|
||||
m_ddsHandler = std::make_shared<DdsHandler>(ddsConnector);
|
||||
if (!m_ddsHandler->init())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Initialisation DdsHandler failed.";
|
||||
ERROR_LOG() << "Initialisation DdsHandler failed.";
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ bool Initialization::initialize(const std::shared_ptr<DDSConnector::DdsConnector
|
||||
m_dbHandler = std::make_shared<DbHandler>();
|
||||
if (!m_dbHandler->init(ddsConnector->getPartitionId(), sqlDb))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Initialisation dbHandler failed.";
|
||||
ERROR_LOG() << "Initialisation dbHandler failed.";
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -61,7 +61,7 @@ bool Initialization::initialize(const std::shared_ptr<DDSConnector::DdsConnector
|
||||
m_handlerMarker.reset(new HandlerMarker(m_ddsHandler, m_dbHandler->db()));
|
||||
m_handlerSnapshot.reset(new HandlerSnapshot(m_ddsHandler, m_dbHandler->db()));
|
||||
|
||||
INFO_LOG(m_logger) << "MRK Handler initialized.";
|
||||
INFO_LOG() << "MRK Handler initialized.";
|
||||
|
||||
return true;
|
||||
} // end of initialize()
|
||||
@@ -72,16 +72,16 @@ bool Initialization::loadFromDatabase()
|
||||
{
|
||||
if (!m_handlerMarker || !m_handlerMarker->init())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Initialisation HandlerMarker failed.";
|
||||
ERROR_LOG() << "Initialisation HandlerMarker failed.";
|
||||
return false;
|
||||
}
|
||||
if (!m_handlerSnapshot || !m_handlerSnapshot->init())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Initialisation HandlerSnapshot failed.";
|
||||
ERROR_LOG() << "Initialisation HandlerSnapshot failed.";
|
||||
return false;
|
||||
}
|
||||
|
||||
INFO_LOG(m_logger) << "MRK Handler initialized.";
|
||||
INFO_LOG() << "MRK Handler initialized.";
|
||||
return true;
|
||||
} // end of loadFromDatabase()
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
@@ -41,8 +41,5 @@ private: // attributes
|
||||
std::shared_ptr<DdsHandler> m_ddsHandler;
|
||||
std::unique_ptr<HandlerMarker> m_handlerMarker;
|
||||
std::unique_ptr<HandlerSnapshot> m_handlerSnapshot;
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
|
||||
};
|
||||
} // namespace MarkerManagement
|
||||
@@ -9,7 +9,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <NGLLogger/INGLLogger.h>
|
||||
#include "mrk_export.h"
|
||||
#include "svcmrkcommon_export.h"
|
||||
|
||||
namespace MarkerManagement
|
||||
{
|
||||
|
||||
@@ -16,7 +16,6 @@ namespace MarkerManagement
|
||||
ObjectMarker::ObjectMarker(const std::shared_ptr<DdsHandler> &ddsHandler, const std::shared_ptr<DatabaseInterface> &db)
|
||||
: m_ddsHandler(ddsHandler)
|
||||
, m_db(db)
|
||||
, m_logger(getLogger("ObjectMarker"))
|
||||
{
|
||||
} // end of ctor()
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -40,9 +39,9 @@ Core::FunctionReplyObject ObjectMarker::createObject(const Marker &data)
|
||||
|
||||
// Neue DB Id in lokale Struktur uebernehmen
|
||||
m_dataMarkerObject.id(dbDataMarker.id);
|
||||
DEBUG_LOG(m_logger) << "New MarkerId: " << dbDataMarker.id;
|
||||
DEBUG_LOG() << "New MarkerId: " << dbDataMarker.id;
|
||||
|
||||
DEBUG_LOG(m_logger) << "Handle MarkerDescription for markerId:" << dbDataMarker.id << " number of depending descriptions: " << data.descriptions().size();
|
||||
DEBUG_LOG() << "Handle MarkerDescription for markerId:" << dbDataMarker.id << " number of depending descriptions: " << data.descriptions().size();
|
||||
|
||||
// Behandlung von MarkerDescription
|
||||
for (size_t i = 0; i < data.descriptions().size(); ++i)
|
||||
@@ -82,10 +81,10 @@ Core::FunctionReplyObject ObjectMarker::updateObject(const Marker &data)
|
||||
if (!m_db->update(dbDataMarker))
|
||||
return Core::FunctionReplyObject(data.id(), tr_lts("dds", "Error updating MrkMarker-data into database"));
|
||||
|
||||
DEBUG_LOG(m_logger) << "Data changed for markerId: " << m_dataMarkerObject.id();
|
||||
DEBUG_LOG() << "Data changed for markerId: " << m_dataMarkerObject.id();
|
||||
|
||||
|
||||
INFO_LOG(m_logger) << "Handle MarkerDescriptions for markerId:" << data.id()
|
||||
INFO_LOG() << "Handle MarkerDescriptions for markerId:" << data.id()
|
||||
<< ". Number of pending descriptions (new/previous):"
|
||||
<< data.descriptions().size() << "/" << m_dataMarkerObject.descriptions().size();
|
||||
|
||||
@@ -123,7 +122,7 @@ Core::FunctionReplyObject ObjectMarker::updateObject(const Marker &data)
|
||||
}
|
||||
if (!bFound)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Description with id " << oldDesc.id() << " was removed - removing from db";
|
||||
DEBUG_LOG() << "Description with id " << oldDesc.id() << " was removed - removing from db";
|
||||
if (!m_db->removeMrkMarkerDescription(oldDesc.id()))
|
||||
return Core::FunctionReplyObject(data.id(),
|
||||
tr_lts("dds", "MarkerDescription with id %1 can not be removed"))
|
||||
@@ -185,10 +184,10 @@ bool ObjectMarker::isUsed() const
|
||||
|
||||
void ObjectMarker::onPublishData()
|
||||
{
|
||||
INFO_LOG(m_logger) << "Publish MrkMarker-data to dds markerId:" << m_dataMarkerObject.id() ;
|
||||
INFO_LOG() << "Publish MrkMarker-data to dds markerId:" << m_dataMarkerObject.id() ;
|
||||
|
||||
if (!m_ddsHandler->dts()->publish(m_dataMarkerObject))
|
||||
WARNING_LOG(m_logger) << "Error publishing MrkMarker-data to dds";
|
||||
WARNING_LOG() << "Error publishing MrkMarker-data to dds";
|
||||
|
||||
} // end of onPublishData()
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
#include "dds_handler.h"
|
||||
#include "mrk_db.h"
|
||||
#include <DDS/Core/function_reply_object.h>
|
||||
#include <DDS/Core/core_types.h>
|
||||
|
||||
// Generated
|
||||
#include <MarkerManagement/mrk_db.h>
|
||||
@@ -54,8 +54,5 @@ private:
|
||||
std::shared_ptr<DdsHandler> m_ddsHandler;
|
||||
std::shared_ptr<DatabaseInterface> m_db;
|
||||
Marker m_dataMarkerObject;
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
|
||||
};
|
||||
} // namespace MarkerManagement
|
||||
@@ -15,7 +15,6 @@ namespace MarkerManagement
|
||||
ObjectSnapshot::ObjectSnapshot(const std::shared_ptr<DdsHandler> &ddsHandler, const std::shared_ptr<DatabaseInterface> &db)
|
||||
: m_ddsHandler(ddsHandler)
|
||||
, m_db(db)
|
||||
, m_logger(getLogger("ObjectSnapshot"))
|
||||
{
|
||||
} // end of ctor()
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -38,7 +37,7 @@ Core::FunctionReplyObject ObjectSnapshot::createObject(const MarkerManagement::S
|
||||
}
|
||||
// Neue DB Id in lokale Struktur uebernehmen
|
||||
m_dataSnapshot.id(dbDataSnapshot.id);
|
||||
DEBUG_LOG(m_logger) << "New SnapshotrId: " << dbDataSnapshot.id;
|
||||
DEBUG_LOG() << "New SnapshotrId: " << dbDataSnapshot.id;
|
||||
|
||||
// Publish Data via DTS
|
||||
onPublishData();
|
||||
@@ -59,7 +58,7 @@ Core::FunctionReplyObject ObjectSnapshot::updateObject(const Snapshot &data)
|
||||
return Core::FunctionReplyObject(data.id(), tr_lts("dds", "Error updating MrkSnapshot-data into database"));
|
||||
|
||||
m_dataSnapshot = data;
|
||||
DEBUG_LOG(m_logger) << "Data changed for snapshotId: " << m_dataSnapshot.id();
|
||||
DEBUG_LOG() << "Data changed for snapshotId: " << m_dataSnapshot.id();
|
||||
|
||||
// Publish Data via DTS
|
||||
onPublishData();
|
||||
@@ -89,10 +88,10 @@ bool ObjectSnapshot::isValid() const
|
||||
|
||||
void ObjectSnapshot::onPublishData()
|
||||
{
|
||||
INFO_LOG(m_logger) << "Publish MrkSnapshot -data to dds snapshotId:" << m_dataSnapshot.id() ;
|
||||
INFO_LOG() << "Publish MrkSnapshot -data to dds snapshotId:" << m_dataSnapshot.id() ;
|
||||
|
||||
if (!m_ddsHandler->dts()->publish(m_dataSnapshot))
|
||||
ERROR_LOG(m_logger) << "Error publishing MrkMarker-data to dds";
|
||||
ERROR_LOG() << "Error publishing MrkMarker-data to dds";
|
||||
|
||||
} // end of onPublishData()
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
#include <QVector>
|
||||
#include "dds_handler.h"
|
||||
#include "mrk_db.h"
|
||||
#include <DDS/Core/function_reply_object.h>
|
||||
#include <DDS/Core/core_types.h>
|
||||
|
||||
// Generated
|
||||
#include <MarkerManagement/mrk_db.h>
|
||||
@@ -48,8 +48,5 @@ private:
|
||||
std::shared_ptr<DdsHandler> m_ddsHandler;
|
||||
std::shared_ptr<DatabaseInterface> m_db;
|
||||
MarkerManagement::Snapshot m_dataSnapshot;
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
|
||||
};
|
||||
} // namespace MarkerManagement
|
||||
Reference in new issue
Block a user