Migrates remaining services and plugins to generated rtiddsgen API
Converts accessor calls to plain member access across the residual service set.
This commit is contained in:
104 files changed
+2424
-2430
No files matched your search
+80
-80
@@ -128,10 +128,10 @@ void MrkTests::tryModify()
|
||||
MarkerModifyRequest data;
|
||||
getMarkerModifyRequestData(data);
|
||||
|
||||
INFO_LOG(m_logger) << "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(m_logger) << "Error requesting modify data for markerId:" << data.id();
|
||||
ERROR_LOG(m_logger) << "Error requesting modify data for markerId:" << data.id;
|
||||
failExit();
|
||||
}
|
||||
} // end of tryModify()
|
||||
@@ -142,12 +142,12 @@ void MrkTests::tryRemove()
|
||||
m_eTestStep = eRemove;
|
||||
MarkerRemoveRequest data;
|
||||
|
||||
data.id(m_markerId);
|
||||
data.id = m_markerId;
|
||||
|
||||
INFO_LOG(m_logger) << "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(m_logger) << "Error requesting remove data for markerId:" << data.id();
|
||||
ERROR_LOG(m_logger) << "Error requesting remove data for markerId:" << data.id;
|
||||
failExit();
|
||||
}
|
||||
} // end of tryRemove()
|
||||
@@ -172,11 +172,11 @@ void MrkTests::tryGetAllMarkers()
|
||||
for (auto it = map.begin(); it != map.end(); ++it)
|
||||
{
|
||||
INFO_LOG(m_logger) << "Mrk(" << it.key() << ") :"
|
||||
<< " note:" << it.value().note()
|
||||
<< " operatorId:" << it.value().operatorId()
|
||||
<< " timeStamp:" << it.value().timeStamp()
|
||||
<< " timeStampOffset:" << it.value().timeStampOffset()
|
||||
<< " description count:" << it.value().descriptions().size();
|
||||
<< " note:" << it.value().note
|
||||
<< " operatorId:" << it.value().operatorId
|
||||
<< " timeStamp:" << it.value().timeStamp
|
||||
<< " timeStampOffset:" << it.value().timeStampOffset
|
||||
<< " description count:" << it.value().descriptions.size();
|
||||
}
|
||||
|
||||
QTimer::singleShot(0, qApp, &QCoreApplication::quit);
|
||||
@@ -200,18 +200,18 @@ void MrkTests::tryGetMarker()
|
||||
m_dtc->waitForHistoricalDataMarker();
|
||||
MarkerManagement::Marker data = m_dtc->marker(m_markerId);
|
||||
|
||||
if (data.id() <= 0)
|
||||
if (data.id <= 0)
|
||||
{
|
||||
ERROR_LOG(m_logger) << "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(m_logger) << "Mrk(" << data.id() << ") :"
|
||||
<< " note:" << data.note()
|
||||
<< " operatorId:" << data.operatorId()
|
||||
<< " timeStamp:" << data.timeStamp()
|
||||
<< " timeStampOffset:" << data.timeStampOffset()
|
||||
INFO_LOG(m_logger) << "Mrk(" << data.id << ") :"
|
||||
<< " note:" << data.note
|
||||
<< " operatorId:" << data.operatorId
|
||||
<< " timeStamp:" << data.timeStamp
|
||||
<< " timeStampOffset:" << data.timeStampOffset
|
||||
;
|
||||
}
|
||||
|
||||
@@ -256,13 +256,13 @@ void MrkTests::tryCreateSnapshot()
|
||||
m_eTestStep = eCreate;
|
||||
Snapshot data;
|
||||
|
||||
data.id(0); // create
|
||||
data.name("Snapshot 1");
|
||||
data.description("Dies ist ein Test");
|
||||
data.mapSettings("78000 92000 xxxx");
|
||||
data.operatorId(100);
|
||||
data.timeStamp(QDateTime::currentMSecsSinceEpoch());
|
||||
data.planOverlay("Plan Overlay");
|
||||
data.id = 0; // create
|
||||
data.name = "Snapshot 1";
|
||||
data.description = "Dies ist ein Test";
|
||||
data.mapSettings = "78000 92000 xxxx";
|
||||
data.operatorId = 100;
|
||||
data.timeStamp = QDateTime::currentMSecsSinceEpoch();
|
||||
data.planOverlay = "Plan Overlay";
|
||||
|
||||
INFO_LOG(m_logger) << "trying to send SnapshotCreateRequest";
|
||||
if (!m_ftc->snapshotModifyRequest(data, this))
|
||||
@@ -278,15 +278,15 @@ void MrkTests::tryModifySnapshot()
|
||||
m_eTestStep = eModify;
|
||||
Snapshot data;
|
||||
|
||||
data.id(m_snapshotId);
|
||||
data.name("Snapshot modify");
|
||||
data.description("Dies ist ein Test modify");
|
||||
data.planOverlay("Plan Overlay updated");
|
||||
data.id = m_snapshotId;
|
||||
data.name = "Snapshot modify";
|
||||
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(m_logger) << "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(m_logger) << "Error requesting modify data for snapshotId:" << data.id;
|
||||
failExit();
|
||||
}
|
||||
} // end of tryModifySnapshot()
|
||||
@@ -297,12 +297,12 @@ void MrkTests::tryRemoveSnapshot()
|
||||
m_eTestStep = eRemove;
|
||||
SnapshotRemoveRequest data;
|
||||
|
||||
data.id(m_snapshotId);
|
||||
data.id = m_snapshotId;
|
||||
|
||||
INFO_LOG(m_logger) << "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(m_logger) << "Error requesting remove data for snapshotId:" << data.id();
|
||||
ERROR_LOG(m_logger) << "Error requesting remove data for snapshotId:" << data.id;
|
||||
failExit();
|
||||
}
|
||||
} // end of tryRemoveSnapshot()
|
||||
@@ -468,15 +468,15 @@ void MrkTests::onReceiveMarkerChanged(const Marker &data, DataModification modTy
|
||||
switch (modType)
|
||||
{
|
||||
case DataModification::eAdded:
|
||||
INFO_LOG(m_logger) << "*** Marker added received. markerId:" << data.id();
|
||||
INFO_LOG(m_logger) << "*** Marker added received. markerId:" << data.id;
|
||||
break;
|
||||
|
||||
case DataModification::eModified:
|
||||
INFO_LOG(m_logger) << "*** Marker modified received. markerId:" << data.id();
|
||||
INFO_LOG(m_logger) << "*** Marker modified received. markerId:" << data.id;
|
||||
break;
|
||||
|
||||
case DataModification::eRemoved:
|
||||
INFO_LOG(m_logger) << "*** Marker removed received. markerId:" << data.id();
|
||||
INFO_LOG(m_logger) << "*** Marker removed received. markerId:" << data.id;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -489,10 +489,10 @@ void MrkTests::getMarkerCreateRequestData(MarkerModifyRequest &data)
|
||||
if (m_testId == 0)
|
||||
currentTime = currentTime / 10;
|
||||
|
||||
data.note("TestMarkerCreate");
|
||||
data.operatorId(100);
|
||||
data.timeStamp(currentTime);
|
||||
data.timeStampOffset(33000);
|
||||
data.note = "TestMarkerCreate";
|
||||
data.operatorId = 100;
|
||||
data.timeStamp = currentTime;
|
||||
data.timeStampOffset = 33000;
|
||||
|
||||
getMarkerDescriptionCreateRequestData(data);
|
||||
|
||||
@@ -502,15 +502,15 @@ void MrkTests::getMarkerCreateRequestData(MarkerModifyRequest &data)
|
||||
void MrkTests::getMarkerDescriptionCreateRequestData(MarkerModifyRequest &data)
|
||||
{
|
||||
// Info: FK fuer markerId wird in object_marker gesetzt.
|
||||
data.descriptions().resize(3);
|
||||
data.descriptions()[0].markerType(MarkerManagement::MarkerType::Audio);
|
||||
data.descriptions()[0].content("Audio07, Audio08*, Audio09");
|
||||
data.descriptions.resize(3);
|
||||
data.descriptions[0].markerType = MarkerManagement::MarkerType::Audio;
|
||||
data.descriptions[0].content("Audio07, Audio08*, Audio09");
|
||||
|
||||
data.descriptions()[1].markerType(MarkerManagement::MarkerType::Video);
|
||||
data.descriptions()[1].content("cam07, cam08, cam09*");
|
||||
data.descriptions[1].markerType = MarkerManagement::MarkerType::Video;
|
||||
data.descriptions[1].content("cam07, cam08, cam09*");
|
||||
|
||||
data.descriptions()[2].markerType(MarkerManagement::MarkerType::Video);
|
||||
data.descriptions()[2].content("cam06, cam07, cam08, cam09*");
|
||||
data.descriptions[2].markerType = MarkerManagement::MarkerType::Video;
|
||||
data.descriptions[2].content("cam06, cam07, cam08, cam09*");
|
||||
} // end of getMarkerDescriptionCreateRequestData()
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -520,22 +520,22 @@ void MrkTests::getMarkerModifyRequestData(MarkerModifyRequest &data)
|
||||
if (m_testId == 0)
|
||||
currentTime = currentTime / 10;
|
||||
|
||||
data.id(m_markerId);
|
||||
data.note("TestMarkerModify");
|
||||
data.operatorId(100);
|
||||
data.timeStamp(currentTime * 1000);
|
||||
data.timeStampOffset(77 * 1000);
|
||||
data.id = m_markerId;
|
||||
data.note = "TestMarkerModify";
|
||||
data.operatorId = 100;
|
||||
data.timeStamp = currentTime * 1000;
|
||||
data.timeStampOffset = 77 * 1000;
|
||||
|
||||
getMarkerDescriptionCreateRequestData(data);
|
||||
for (auto &desc : data.descriptions())
|
||||
desc.content(std::string("+++MOD+++") + desc.content());
|
||||
for (auto &desc : data.descriptions)
|
||||
desc.content = std::string("+++MOD+++") + desc.content;
|
||||
|
||||
} // end of getMarkerModifyRequestData()
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
bool MrkTests::onCompareCreatedData(Marker &data)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "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
|
||||
|
||||
@@ -543,21 +543,21 @@ bool MrkTests::onCompareCreatedData(Marker &data)
|
||||
|
||||
getMarkerCreateRequestData(createData);
|
||||
|
||||
if (createData.note() != data.note())
|
||||
if (createData.note != data.note)
|
||||
return false;
|
||||
|
||||
if (createData.operatorId() != data.operatorId())
|
||||
if (createData.operatorId != data.operatorId)
|
||||
return false;
|
||||
|
||||
if (createData.timeStamp() != data.timeStamp())
|
||||
if (createData.timeStamp != data.timeStamp)
|
||||
return false;
|
||||
|
||||
if (createData.timeStampOffset() != data.timeStampOffset())
|
||||
if (createData.timeStampOffset != data.timeStampOffset)
|
||||
return false;
|
||||
|
||||
// Descriptions vergleichen
|
||||
|
||||
if (createData.descriptions().size() != data.descriptions().size())
|
||||
if (createData.descriptions.size() != data.descriptions.size())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error onCompareCreatedData() different number of description data.";
|
||||
failExit();
|
||||
@@ -565,20 +565,20 @@ bool MrkTests::onCompareCreatedData(Marker &data)
|
||||
}
|
||||
|
||||
int foundCount = 0;
|
||||
for (const auto &expected : createData.descriptions())
|
||||
for (const auto &expected : createData.descriptions)
|
||||
{
|
||||
for (const auto &got : data.descriptions())
|
||||
for (const auto &got : data.descriptions)
|
||||
{
|
||||
// we've got one description per type
|
||||
if (got.markerType() != expected.markerType())
|
||||
if (got.markerType != expected.markerType)
|
||||
continue;
|
||||
++foundCount;
|
||||
|
||||
if (got.content() != expected.content())
|
||||
if (got.content != expected.content)
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Content for description does not match: "
|
||||
<< got.content() << " - "
|
||||
<< expected.content();
|
||||
<< got.content << " - "
|
||||
<< expected.content;
|
||||
failExit();
|
||||
return false;
|
||||
}
|
||||
@@ -591,7 +591,7 @@ bool MrkTests::onCompareCreatedData(Marker &data)
|
||||
return false;
|
||||
}
|
||||
|
||||
DEBUG_LOG(m_logger) << "successfull finished onCompareCreatedData() for id :" << data.id();
|
||||
DEBUG_LOG(m_logger) << "successfull finished onCompareCreatedData() for id :" << data.id;
|
||||
|
||||
return true;
|
||||
} // end of onCompareCreatedData()
|
||||
@@ -599,43 +599,43 @@ bool MrkTests::onCompareCreatedData(Marker &data)
|
||||
//-----------------------------------------------------------------------------
|
||||
bool MrkTests::onCompareModifiedData(Marker &data)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "start onCompareModifiedData() for id :" << data.id();
|
||||
DEBUG_LOG(m_logger) << "start onCompareModifiedData() for id :" << data.id;
|
||||
|
||||
MarkerModifyRequest modifyData;
|
||||
|
||||
getMarkerModifyRequestData(modifyData);
|
||||
|
||||
if (modifyData.id() != data.id())
|
||||
if (modifyData.id != data.id)
|
||||
return false;
|
||||
|
||||
if (modifyData.note() != data.note())
|
||||
if (modifyData.note != data.note)
|
||||
return false;
|
||||
|
||||
if (modifyData.operatorId() != data.operatorId())
|
||||
if (modifyData.operatorId != data.operatorId)
|
||||
return false;
|
||||
|
||||
if (modifyData.timeStamp() != data.timeStamp())
|
||||
if (modifyData.timeStamp != data.timeStamp)
|
||||
return false;
|
||||
|
||||
if (modifyData.timeStampOffset() != data.timeStampOffset())
|
||||
if (modifyData.timeStampOffset != data.timeStampOffset)
|
||||
return false;
|
||||
|
||||
// Alle Descriptions zu dieser MarkerId holen ...
|
||||
int foundCount = 0;
|
||||
for (const auto &expected : modifyData.descriptions())
|
||||
for (const auto &expected : modifyData.descriptions)
|
||||
{
|
||||
for (const auto &got : data.descriptions())
|
||||
for (const auto &got : data.descriptions)
|
||||
{
|
||||
// we've got one description per type
|
||||
if (got.markerType() != expected.markerType())
|
||||
if (got.markerType != expected.markerType)
|
||||
continue;
|
||||
++foundCount;
|
||||
|
||||
if (got.content() != expected.content())
|
||||
if (got.content != expected.content)
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Content for description does not match: "
|
||||
<< got.content() << " - "
|
||||
<< expected.content();
|
||||
<< got.content << " - "
|
||||
<< expected.content;
|
||||
failExit();
|
||||
return false;
|
||||
}
|
||||
@@ -648,7 +648,7 @@ bool MrkTests::onCompareModifiedData(Marker &data)
|
||||
return false;
|
||||
}
|
||||
|
||||
DEBUG_LOG(m_logger) << "successfull finished onCompareModifiedData() for id :" << data.id();
|
||||
DEBUG_LOG(m_logger) << "successfull finished onCompareModifiedData() for id :" << data.id;
|
||||
|
||||
return true;
|
||||
} // end of onCompareModifiedData()
|
||||
|
||||
@@ -53,8 +53,8 @@ bool HandlerMarker::init()
|
||||
// TODO: select descBymarkerId
|
||||
for (const Database::MrkMarkerDescription &desc : qAsConst(dataDescriptionVec))
|
||||
{
|
||||
if (desc.markerId == ddsMoData.id())
|
||||
ddsMoData.descriptions().push_back(ObjectMarker::toDdsData(desc));
|
||||
if (desc.markerId == ddsMoData.id)
|
||||
ddsMoData.descriptions.push_back(ObjectMarker::toDdsData(desc));
|
||||
}
|
||||
|
||||
ObjectMarker *ifs(new ObjectMarker(m_ddsHandler, m_db));
|
||||
@@ -91,7 +91,7 @@ void HandlerMarker::onMarkerModifyRequest(const rti::core::SampleIdentity &cooki
|
||||
const Marker &request)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "MarkerModifyRequest: " << request;
|
||||
auto ret = request.id() > 0 ? markerModifyRequest(request) : markerCreateRequest(request);
|
||||
auto ret = request.id > 0 ? markerModifyRequest(request) : markerCreateRequest(request);
|
||||
if (ret.error())
|
||||
WARNING_LOG(m_logger) << ret();
|
||||
m_ddsHandler->fts()->markerModifyReply(cookie, ret);
|
||||
@@ -120,10 +120,10 @@ Core::FunctionReplyObject HandlerMarker::markerCreateRequest(const Marker &reque
|
||||
|
||||
Core::FunctionReplyObject HandlerMarker::markerModifyRequest(const Marker &request)
|
||||
{
|
||||
ObjectMarker *ifs = m_objectMarkerMap.value(request.id());
|
||||
ObjectMarker *ifs = m_objectMarkerMap.value(request.id);
|
||||
if (ifs == nullptr)
|
||||
return Core::FunctionReplyObject(request.id(),
|
||||
tr_lts("dds", "Marker with id %1 not found")).arg(request.id());
|
||||
return Core::FunctionReplyObject(request.id,
|
||||
tr_lts("dds", "Marker with id %1 not found")).arg(request.id);
|
||||
|
||||
return ifs->updateObject(request);
|
||||
} // end of markerModifyRequest()
|
||||
@@ -142,13 +142,13 @@ void HandlerMarker::onMarkerRemoveRequest(const rti::core::SampleIdentity &cooki
|
||||
|
||||
Core::FunctionReplyObject HandlerMarker::markerRemoveRequest(const Core::RemoveElementRequest &request)
|
||||
{
|
||||
ObjectMarker *ifs = m_objectMarkerMap.value(request.id());
|
||||
ObjectMarker *ifs = m_objectMarkerMap.value(request.id);
|
||||
if (ifs == nullptr)
|
||||
return Core::FunctionReplyObject(request.id(),
|
||||
tr_lts("dds", "Marker with id %1 not found")).arg(request.id());
|
||||
return Core::FunctionReplyObject(request.id,
|
||||
tr_lts("dds", "Marker with id %1 not found")).arg(request.id);
|
||||
|
||||
if (m_ddsHandler->topicLockMaster()->isLocked(ifs->getData(), m_ddsHandler->ddsConnector()->getPartitionId()))
|
||||
return Core::FunctionReplyObject(request.id(), tr_lts("dds", "Marker '%1' is used by another user!")).arg(ifs->getName());
|
||||
return Core::FunctionReplyObject(request.id, tr_lts("dds", "Marker '%1' is used by another user!")).arg(ifs->getName());
|
||||
|
||||
const Core::FunctionReplyObject ret = ifs->removeObject();
|
||||
|
||||
@@ -157,7 +157,7 @@ Core::FunctionReplyObject HandlerMarker::markerRemoveRequest(const Core::RemoveE
|
||||
|
||||
// delete ObjectMarker
|
||||
delete ifs;
|
||||
m_objectMarkerMap.remove(request.id());
|
||||
m_objectMarkerMap.remove(request.id);
|
||||
|
||||
return ret;
|
||||
} // end of onMarkerRemoveRequest()
|
||||
|
||||
@@ -67,7 +67,7 @@ void HandlerSnapshot::onSnapshotModifyRequest(const rti::core::SampleIdentity &c
|
||||
const Snapshot &request)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "SnapshotModifyRequest: " << request;
|
||||
auto ret = request.id() > 0 ? snapshotModifyRequest(request) : snapshotCreateRequest(request);
|
||||
auto ret = request.id > 0 ? snapshotModifyRequest(request) : snapshotCreateRequest(request);
|
||||
if (ret.error())
|
||||
WARNING_LOG(m_logger) << ret();
|
||||
m_ddsHandler->fts()->snapshotModifyReply(cookie, ret);
|
||||
@@ -91,26 +91,26 @@ Core::FunctionReplyObject HandlerSnapshot::snapshotCreateRequest(const Snapshot
|
||||
|
||||
Core::FunctionReplyObject HandlerSnapshot::snapshotModifyRequest(const Snapshot &request)
|
||||
{
|
||||
ObjectSnapshot *ifs = m_objectSnapshotMap.value(request.id());
|
||||
ObjectSnapshot *ifs = m_objectSnapshotMap.value(request.id);
|
||||
if (ifs == nullptr)
|
||||
return Core::FunctionReplyObject(request.id(), tr_lts("dds", "Snapshot with id %1 not found")).arg(request.id());
|
||||
return Core::FunctionReplyObject(request.id, tr_lts("dds", "Snapshot with id %1 not found")).arg(request.id);
|
||||
|
||||
Snapshot ddsData = ifs->getData();
|
||||
ddsData.name(request.name());
|
||||
ddsData.description(request.description());
|
||||
ddsData.fileContentId(request.fileContentId());
|
||||
ddsData.name = request.name;
|
||||
ddsData.description = request.description;
|
||||
ddsData.fileContentId = request.fileContentId;
|
||||
|
||||
if (request.mapSettings().size() > 0)
|
||||
ddsData.mapSettings(request.mapSettings());
|
||||
if (request.mapSettings.size() > 0)
|
||||
ddsData.mapSettings = request.mapSettings;
|
||||
|
||||
if (request.movementTracks().size() > 0)
|
||||
ddsData.movementTracks(request.movementTracks());
|
||||
if (request.movementTracks.size() > 0)
|
||||
ddsData.movementTracks = request.movementTracks;
|
||||
|
||||
if (request.planOverlay().size() > 0)
|
||||
ddsData.planOverlay(request.planOverlay());
|
||||
if (request.planOverlay.size() > 0)
|
||||
ddsData.planOverlay = request.planOverlay;
|
||||
|
||||
if (request.filter().size() > 0)
|
||||
ddsData.filter(request.filter());
|
||||
if (request.filter.size() > 0)
|
||||
ddsData.filter = request.filter;
|
||||
|
||||
return ifs->updateObject(ddsData);
|
||||
} // end of onSnapshotModifyRequest()
|
||||
@@ -119,17 +119,17 @@ 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(m_logger) << "onSnapshotRemoveRequest() id:" << request.id;
|
||||
|
||||
Core::FunctionReplyObject ret;
|
||||
ObjectSnapshot *ifs = m_objectSnapshotMap.value(request.id());
|
||||
ObjectSnapshot *ifs = m_objectSnapshotMap.value(request.id);
|
||||
if (ifs == nullptr)
|
||||
ret = Core::FunctionReplyObject(request.id(), tr_lts("dds", "Snapshot with id %1 not found")).arg(request.id());
|
||||
ret = Core::FunctionReplyObject(request.id, tr_lts("dds", "Snapshot with id %1 not found")).arg(request.id);
|
||||
else
|
||||
{
|
||||
if (m_ddsHandler->topicLockMaster()->isLocked(ifs->getData(), m_ddsHandler->ddsConnector()->getPartitionId()))
|
||||
{
|
||||
ret = Core::FunctionReplyObject(request.id(), tr_lts("dds", "Snapshot '%1' is used by another user!")).arg(ifs->getName());
|
||||
ret = Core::FunctionReplyObject(request.id, tr_lts("dds", "Snapshot '%1' is used by another user!")).arg(ifs->getName());
|
||||
m_ddsHandler->fts()->snapshotRemoveReply(cookie, ret);
|
||||
return;
|
||||
}
|
||||
@@ -142,7 +142,7 @@ void HandlerSnapshot::onSnapshotRemoveRequest(const rti::core::SampleIdentity &c
|
||||
{
|
||||
// delete ObjectSnapshot
|
||||
delete ifs;
|
||||
m_objectSnapshotMap.remove(request.id());
|
||||
m_objectSnapshotMap.remove(request.id);
|
||||
}
|
||||
|
||||
m_ddsHandler->fts()->snapshotRemoveReply(cookie, ret);
|
||||
|
||||
@@ -23,7 +23,7 @@ ObjectMarker::ObjectMarker(const std::shared_ptr<DdsHandler> &ddsHandler, const
|
||||
|
||||
ObjectMarker::~ObjectMarker()
|
||||
{
|
||||
m_ddsHandler->dts()->removeMarkerByKey(m_dataMarkerObject.id());
|
||||
m_ddsHandler->dts()->removeMarkerByKey(m_dataMarkerObject.id);
|
||||
} // end of dtor()
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
@@ -31,7 +31,7 @@ Core::FunctionReplyObject ObjectMarker::createObject(const Marker &data)
|
||||
{
|
||||
m_dataMarkerObject = data;
|
||||
|
||||
if (data.id() <= 0)
|
||||
if (data.id <= 0)
|
||||
{
|
||||
Database::MrkMarker dbDataMarker = toDbData(data);
|
||||
DBTransaction trans(m_db->database());
|
||||
@@ -39,15 +39,15 @@ Core::FunctionReplyObject ObjectMarker::createObject(const Marker &data)
|
||||
return Core::FunctionReplyObject(0, tr_lts("dds", "Error inserting MrkMarker-data into database"));
|
||||
|
||||
// Neue DB Id in lokale Struktur uebernehmen
|
||||
m_dataMarkerObject.id(dbDataMarker.id);
|
||||
m_dataMarkerObject.id = dbDataMarker.id;
|
||||
DEBUG_LOG(m_logger) << "New MarkerId: " << dbDataMarker.id;
|
||||
|
||||
DEBUG_LOG(m_logger) << "Handle MarkerDescription for markerId:" << dbDataMarker.id << " number of depending descriptions: " << data.descriptions().size();
|
||||
DEBUG_LOG(m_logger) << "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)
|
||||
for (size_t i = 0; i < data.descriptions.size(); ++i)
|
||||
{
|
||||
MarkerDescription &mrkDesc = m_dataMarkerObject.descriptions()[i];
|
||||
MarkerDescription &mrkDesc = m_dataMarkerObject.descriptions[i];
|
||||
Database::MrkMarkerDescription dbDataDesc = toDbData(mrkDesc);
|
||||
|
||||
// Struct MarkerDescription vorbereiten
|
||||
@@ -56,7 +56,7 @@ Core::FunctionReplyObject ObjectMarker::createObject(const Marker &data)
|
||||
if (!m_db->insert(dbDataDesc))
|
||||
return Core::FunctionReplyObject(0, tr_lts("dds", "Error inserting MarkerDescription-data into database"));
|
||||
// Neue DB Id in lokale Struktur uebernehmen
|
||||
mrkDesc.id(dbDataDesc.id);
|
||||
mrkDesc.id = dbDataDesc.id;
|
||||
}
|
||||
|
||||
trans.commit();
|
||||
@@ -65,7 +65,7 @@ Core::FunctionReplyObject ObjectMarker::createObject(const Marker &data)
|
||||
// Publish Data via DTS
|
||||
onPublishData();
|
||||
|
||||
return Core::FunctionReplyObject(m_dataMarkerObject.id());
|
||||
return Core::FunctionReplyObject(m_dataMarkerObject.id);
|
||||
|
||||
} // end of createObject()
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -73,49 +73,49 @@ Core::FunctionReplyObject ObjectMarker::createObject(const Marker &data)
|
||||
Core::FunctionReplyObject ObjectMarker::updateObject(const Marker &data)
|
||||
{
|
||||
if (!isValid())
|
||||
return Core::FunctionReplyObject(data.id(), tr_lts("dds", "Object not valid/blocked"));
|
||||
return Core::FunctionReplyObject(data.id, tr_lts("dds", "Object not valid/blocked"));
|
||||
|
||||
const Database::MrkMarker dbDataMarker = toDbData(data);
|
||||
auto newData = data;
|
||||
|
||||
DBTransaction trans(m_db->database());
|
||||
if (!m_db->update(dbDataMarker))
|
||||
return Core::FunctionReplyObject(data.id(), tr_lts("dds", "Error updating MrkMarker-data into database"));
|
||||
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(m_logger) << "Data changed for markerId: " << m_dataMarkerObject.id;
|
||||
|
||||
|
||||
INFO_LOG(m_logger) << "Handle MarkerDescriptions for markerId:" << data.id()
|
||||
INFO_LOG(m_logger) << "Handle MarkerDescriptions for markerId:" << data.id
|
||||
<< ". Number of pending descriptions (new/previous):"
|
||||
<< data.descriptions().size() << "/" << m_dataMarkerObject.descriptions().size();
|
||||
<< data.descriptions.size() << "/" << m_dataMarkerObject.descriptions.size();
|
||||
|
||||
// Descriptions mit id -> schon vorhanden
|
||||
// Desctiptions ohne id -> neu einfügen
|
||||
for (auto &desc : newData.descriptions())
|
||||
for (auto &desc : newData.descriptions)
|
||||
{
|
||||
Database::MrkMarkerDescription dbDesc = toDbData(desc);
|
||||
dbDesc.markerId = dbDataMarker.id; // FK auf MarkerId
|
||||
if (desc.id() > 0)
|
||||
if (desc.id > 0)
|
||||
{
|
||||
// immer update ...
|
||||
if (!m_db->update(dbDesc))
|
||||
return Core::FunctionReplyObject(data.id(), tr_lts("dds", "Error updating MrkMarkerDescription-data into database"));
|
||||
return Core::FunctionReplyObject(data.id, tr_lts("dds", "Error updating MrkMarkerDescription-data into database"));
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!m_db->insert(dbDesc))
|
||||
return Core::FunctionReplyObject(data.id(), tr_lts("dds", "Error inserting MarkerDescription-data into database"));
|
||||
desc.id(dbDesc.id);
|
||||
return Core::FunctionReplyObject(data.id, tr_lts("dds", "Error inserting MarkerDescription-data into database"));
|
||||
desc.id = dbDesc.id;
|
||||
}
|
||||
}
|
||||
|
||||
// jetzt noch prüfen ob ggf. etwas rausgefallen ist
|
||||
for (const auto &oldDesc : m_dataMarkerObject.descriptions())
|
||||
for (const auto &oldDesc : m_dataMarkerObject.descriptions)
|
||||
{
|
||||
bool bFound = false;
|
||||
for (const auto &newDesc : newData.descriptions())
|
||||
for (const auto &newDesc : newData.descriptions)
|
||||
{
|
||||
if (newDesc.id() == oldDesc.id())
|
||||
if (newDesc.id == oldDesc.id)
|
||||
{
|
||||
bFound = true;
|
||||
break;
|
||||
@@ -123,11 +123,11 @@ Core::FunctionReplyObject ObjectMarker::updateObject(const Marker &data)
|
||||
}
|
||||
if (!bFound)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Description with id " << oldDesc.id() << " was removed - removing from db";
|
||||
if (!m_db->removeMrkMarkerDescription(oldDesc.id()))
|
||||
return Core::FunctionReplyObject(data.id(),
|
||||
DEBUG_LOG(m_logger) << "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"))
|
||||
.arg(oldDesc.id());
|
||||
.arg(oldDesc.id);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -138,54 +138,54 @@ Core::FunctionReplyObject ObjectMarker::updateObject(const Marker &data)
|
||||
// Publish Data via DTS
|
||||
onPublishData();
|
||||
|
||||
return Core::FunctionReplyObject(m_dataMarkerObject.id());
|
||||
return Core::FunctionReplyObject(m_dataMarkerObject.id);
|
||||
} // end of updateObject()
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
Core::FunctionReplyObject ObjectMarker::removeObject()
|
||||
{
|
||||
if (isUsed())
|
||||
return Core::FunctionReplyObject(m_dataMarkerObject.id(), tr_lts("dds", "Marker still in use"));
|
||||
return Core::FunctionReplyObject(m_dataMarkerObject.id, tr_lts("dds", "Marker still in use"));
|
||||
|
||||
// MarkerDescription werden automatisch entfernt (ON DELETE CASCADE)
|
||||
if (!m_db->removeMrkMarker(m_dataMarkerObject.id()))
|
||||
return Core::FunctionReplyObject(m_dataMarkerObject.id(), tr_lts("dds", "Marker with id %1 can not be removed")).arg(m_dataMarkerObject.id());
|
||||
if (!m_db->removeMrkMarker(m_dataMarkerObject.id))
|
||||
return Core::FunctionReplyObject(m_dataMarkerObject.id, tr_lts("dds", "Marker with id %1 can not be removed")).arg(m_dataMarkerObject.id);
|
||||
|
||||
m_ddsHandler->dts()->removeMarkerByKey(m_dataMarkerObject.id());
|
||||
m_ddsHandler->dts()->removeMarkerByKey(m_dataMarkerObject.id);
|
||||
|
||||
return Core::FunctionReplyObject(m_dataMarkerObject.id());
|
||||
return Core::FunctionReplyObject(m_dataMarkerObject.id);
|
||||
} // end of removeObject()
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
Core::FunctionReplyObject ObjectMarker::setUsed(bool isUsed)
|
||||
{
|
||||
if (!isValid())
|
||||
return Core::FunctionReplyObject(m_dataMarkerObject.id(), tr_lts("dds", "Trying to update an already removed Marker object"));
|
||||
return Core::FunctionReplyObject(m_dataMarkerObject.id, tr_lts("dds", "Trying to update an already removed Marker object"));
|
||||
|
||||
m_dataMarkerObject.isUsed(isUsed);
|
||||
m_dataMarkerObject.isUsed = isUsed;
|
||||
|
||||
// Publish Data via DTS
|
||||
onPublishData();
|
||||
|
||||
return Core::FunctionReplyObject(m_dataMarkerObject.id());
|
||||
return Core::FunctionReplyObject(m_dataMarkerObject.id);
|
||||
} // end of setUsed()
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
bool ObjectMarker::isValid() const
|
||||
{
|
||||
return m_dataMarkerObject.id() > 0;
|
||||
return m_dataMarkerObject.id > 0;
|
||||
} // end of isValid()
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
bool ObjectMarker::isUsed() const
|
||||
{
|
||||
return m_dataMarkerObject.isUsed();
|
||||
return m_dataMarkerObject.isUsed;
|
||||
} // end of isUsed()
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
void ObjectMarker::onPublishData()
|
||||
{
|
||||
INFO_LOG(m_logger) << "Publish MrkMarker-data to dds markerId:" << m_dataMarkerObject.id() ;
|
||||
INFO_LOG(m_logger) << "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";
|
||||
@@ -202,16 +202,16 @@ Database::MrkMarker ObjectMarker::toDbData(const Marker &ddsData)
|
||||
{
|
||||
Database::MrkMarker dbData;
|
||||
|
||||
dbData.id = ddsData.id();
|
||||
dbData.operatorId = ddsData.operatorId();
|
||||
dbData.note = QString::fromStdString(ddsData.note());
|
||||
dbData.timeStamp = ddsData.timeStamp();
|
||||
dbData.timeStampOffset = ddsData.timeStampOffset();
|
||||
dbData.mapSettings = QString::fromStdString(ddsData.mapSettings());
|
||||
dbData.filter = QString::fromStdString(ddsData.filter());
|
||||
dbData.position.setX(ddsData.position().lon());
|
||||
dbData.position.setY(ddsData.position().lat());
|
||||
dbData.fileContentId = ddsData.fileContentId();
|
||||
dbData.id = ddsData.id;
|
||||
dbData.operatorId = ddsData.operatorId;
|
||||
dbData.note = QString::fromStdString(ddsData.note);
|
||||
dbData.timeStamp = ddsData.timeStamp;
|
||||
dbData.timeStampOffset = ddsData.timeStampOffset;
|
||||
dbData.mapSettings = QString::fromStdString(ddsData.mapSettings);
|
||||
dbData.filter = QString::fromStdString(ddsData.filter);
|
||||
dbData.position.setX(ddsData.position.lon);
|
||||
dbData.position.setY(ddsData.position.lat);
|
||||
dbData.fileContentId = ddsData.fileContentId;
|
||||
|
||||
return dbData;
|
||||
} // end of toDbData()
|
||||
@@ -222,19 +222,19 @@ Marker ObjectMarker::toDdsData(const Database::MrkMarker &dbData)
|
||||
{
|
||||
Marker ddsData;
|
||||
|
||||
ddsData.id(dbData.id);
|
||||
ddsData.operatorId(dbData.operatorId);
|
||||
ddsData.note(dbData.note.toStdString());
|
||||
ddsData.timeStamp(dbData.timeStamp);
|
||||
ddsData.timeStampOffset(dbData.timeStampOffset);
|
||||
ddsData.mapSettings(dbData.mapSettings.toStdString());
|
||||
ddsData.filter(dbData.filter.toStdString());
|
||||
ddsData.position(Core::GeoPosition(dbData.position.x(), dbData.position.y(), 0.0));
|
||||
ddsData.fileContentId(dbData.fileContentId);
|
||||
ddsData.id = dbData.id;
|
||||
ddsData.operatorId = dbData.operatorId;
|
||||
ddsData.note = dbData.note.toStdString();
|
||||
ddsData.timeStamp = dbData.timeStamp;
|
||||
ddsData.timeStampOffset = dbData.timeStampOffset;
|
||||
ddsData.mapSettings = dbData.mapSettings.toStdString();
|
||||
ddsData.filter = dbData.filter.toStdString();
|
||||
ddsData.position = Core::GeoPosition(dbData.position.x(), dbData.position.y(), 0.0);
|
||||
ddsData.fileContentId = dbData.fileContentId;
|
||||
|
||||
// init data not in db
|
||||
ddsData.isDeleted(false);
|
||||
ddsData.isUsed(false);
|
||||
ddsData.isDeleted = false;
|
||||
ddsData.isUsed = false;
|
||||
|
||||
return ddsData;
|
||||
} // end of toDdsData()
|
||||
@@ -245,9 +245,9 @@ Database::MrkMarkerDescription ObjectMarker::toDbData(const MarkerDescription &d
|
||||
{
|
||||
Database::MrkMarkerDescription dbData;
|
||||
|
||||
dbData.id = ddsData.id();
|
||||
dbData.markerTypeId = ddsData.markerType();
|
||||
dbData.content = QString::fromStdString(ddsData.content());
|
||||
dbData.id = ddsData.id;
|
||||
dbData.markerTypeId = ddsData.markerType;
|
||||
dbData.content = QString::fromStdString(ddsData.content);
|
||||
|
||||
return dbData;
|
||||
} // end of toDbData()
|
||||
@@ -258,9 +258,9 @@ MarkerDescription ObjectMarker::toDdsData(const Database::MrkMarkerDescription &
|
||||
{
|
||||
MarkerDescription ddsData;
|
||||
|
||||
ddsData.id(dbData.id);
|
||||
ddsData.markerType(dbData.markerTypeId);
|
||||
ddsData.content(dbData.content.toStdString());
|
||||
ddsData.id = dbData.id;
|
||||
ddsData.markerType = dbData.markerTypeId;
|
||||
ddsData.content = dbData.content.toStdString();
|
||||
|
||||
return ddsData;
|
||||
} // end of toDdsData()
|
||||
|
||||
@@ -32,9 +32,9 @@ public:
|
||||
|
||||
Core::FunctionReplyObject setUsed(bool isUsed);
|
||||
|
||||
qint32 getId() const { return m_dataMarkerObject.id(); }
|
||||
qint32 getId() const { return m_dataMarkerObject.id; }
|
||||
Marker getData() const { return m_dataMarkerObject; }
|
||||
QString getName() const { return QString::fromStdString(m_dataMarkerObject.name()); }
|
||||
QString getName() const { return QString::fromStdString(m_dataMarkerObject.name); }
|
||||
|
||||
bool isValid() const;
|
||||
bool isUsed() const;
|
||||
|
||||
@@ -22,7 +22,7 @@ ObjectSnapshot::ObjectSnapshot(const std::shared_ptr<DdsHandler> &ddsHandler, co
|
||||
|
||||
ObjectSnapshot::~ObjectSnapshot()
|
||||
{
|
||||
m_ddsHandler->dts()->removeSnapshotByKey(m_dataSnapshot.id());
|
||||
m_ddsHandler->dts()->removeSnapshotByKey(m_dataSnapshot.id);
|
||||
} // end of dtor()
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
@@ -37,13 +37,13 @@ Core::FunctionReplyObject ObjectSnapshot::createObject(const MarkerManagement::S
|
||||
return Core::FunctionReplyObject(0, tr_lts("dds", "Error inserting Snapshot-data into database"));
|
||||
}
|
||||
// Neue DB Id in lokale Struktur uebernehmen
|
||||
m_dataSnapshot.id(dbDataSnapshot.id);
|
||||
m_dataSnapshot.id = dbDataSnapshot.id;
|
||||
DEBUG_LOG(m_logger) << "New SnapshotrId: " << dbDataSnapshot.id;
|
||||
|
||||
// Publish Data via DTS
|
||||
onPublishData();
|
||||
|
||||
return Core::FunctionReplyObject(m_dataSnapshot.id());
|
||||
return Core::FunctionReplyObject(m_dataSnapshot.id);
|
||||
|
||||
} // end of createObject()
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -51,45 +51,45 @@ Core::FunctionReplyObject ObjectSnapshot::createObject(const MarkerManagement::S
|
||||
Core::FunctionReplyObject ObjectSnapshot::updateObject(const Snapshot &data)
|
||||
{
|
||||
if (!isValid())
|
||||
return Core::FunctionReplyObject(data.id(), tr_lts("dds", "Object not valid"));
|
||||
return Core::FunctionReplyObject(data.id, tr_lts("dds", "Object not valid"));
|
||||
|
||||
Database::MrkSnapshot dbDataSnapshot = toDbData(data);
|
||||
|
||||
if (!m_db->update(dbDataSnapshot))
|
||||
return Core::FunctionReplyObject(data.id(), tr_lts("dds", "Error updating MrkSnapshot-data into database"));
|
||||
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(m_logger) << "Data changed for snapshotId: " << m_dataSnapshot.id;
|
||||
|
||||
// Publish Data via DTS
|
||||
onPublishData();
|
||||
|
||||
return Core::FunctionReplyObject(m_dataSnapshot.id());
|
||||
return Core::FunctionReplyObject(m_dataSnapshot.id);
|
||||
} // end of updateObject()
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
Core::FunctionReplyObject ObjectSnapshot::removeObject()
|
||||
{
|
||||
if (!m_db->removeMrkSnapshot(m_dataSnapshot.id()))
|
||||
return Core::FunctionReplyObject(m_dataSnapshot.id(), tr_lts("dds", "Snapshot with id %1 can not be removed")).arg(m_dataSnapshot.id());
|
||||
if (!m_db->removeMrkSnapshot(m_dataSnapshot.id))
|
||||
return Core::FunctionReplyObject(m_dataSnapshot.id, tr_lts("dds", "Snapshot with id %1 can not be removed")).arg(m_dataSnapshot.id);
|
||||
|
||||
//m_ddsHandler->dts()->startTransaction();
|
||||
m_ddsHandler->dts()->removeSnapshotByKey(m_dataSnapshot.id());
|
||||
m_ddsHandler->dts()->removeSnapshotByKey(m_dataSnapshot.id);
|
||||
|
||||
return Core::FunctionReplyObject(m_dataSnapshot.id());
|
||||
return Core::FunctionReplyObject(m_dataSnapshot.id);
|
||||
} // end of removeObject()
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
bool ObjectSnapshot::isValid() const
|
||||
{
|
||||
return m_dataSnapshot.id() > 0;
|
||||
return m_dataSnapshot.id > 0;
|
||||
} // end of isValid()
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
||||
void ObjectSnapshot::onPublishData()
|
||||
{
|
||||
INFO_LOG(m_logger) << "Publish MrkSnapshot -data to dds snapshotId:" << m_dataSnapshot.id() ;
|
||||
INFO_LOG(m_logger) << "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";
|
||||
@@ -106,16 +106,16 @@ Database::MrkSnapshot ObjectSnapshot::toDbData(const Snapshot &ddsData)
|
||||
{
|
||||
Database::MrkSnapshot dbData;
|
||||
|
||||
dbData.id = ddsData.id();
|
||||
dbData.operatorId = ddsData.operatorId();
|
||||
dbData.name = QString::fromStdString(ddsData.name());
|
||||
dbData.description = QString::fromStdString(ddsData.description());
|
||||
dbData.fileContentId = ddsData.fileContentId();
|
||||
dbData.timeStamp = ddsData.timeStamp();
|
||||
dbData.mapSettings = QString::fromStdString(ddsData.mapSettings());
|
||||
dbData.movementTracks = QString::fromStdString(ddsData.movementTracks());
|
||||
dbData.filter = QString::fromStdString(ddsData.filter());
|
||||
dbData.planOverlay = QString::fromStdString(ddsData.planOverlay());
|
||||
dbData.id = ddsData.id;
|
||||
dbData.operatorId = ddsData.operatorId;
|
||||
dbData.name = QString::fromStdString(ddsData.name);
|
||||
dbData.description = QString::fromStdString(ddsData.description);
|
||||
dbData.fileContentId = ddsData.fileContentId;
|
||||
dbData.timeStamp = ddsData.timeStamp;
|
||||
dbData.mapSettings = QString::fromStdString(ddsData.mapSettings);
|
||||
dbData.movementTracks = QString::fromStdString(ddsData.movementTracks);
|
||||
dbData.filter = QString::fromStdString(ddsData.filter);
|
||||
dbData.planOverlay = QString::fromStdString(ddsData.planOverlay);
|
||||
|
||||
return dbData;
|
||||
} // end of toDbData()
|
||||
@@ -126,17 +126,17 @@ Snapshot ObjectSnapshot::toDdsData(const Database::MrkSnapshot &dbData)
|
||||
{
|
||||
Snapshot ddsData;
|
||||
|
||||
ddsData.id(dbData.id);
|
||||
ddsData.operatorId(dbData.operatorId);
|
||||
ddsData.name(dbData.name.toStdString());
|
||||
ddsData.description(dbData.description.toStdString());
|
||||
ddsData.fileContentId(dbData.fileContentId);
|
||||
ddsData.timeStamp(dbData.timeStamp);
|
||||
ddsData.mapSettings(dbData.mapSettings.toStdString());
|
||||
ddsData.movementTracks(dbData.movementTracks.toStdString());
|
||||
ddsData.id = dbData.id;
|
||||
ddsData.operatorId = dbData.operatorId;
|
||||
ddsData.name = dbData.name.toStdString();
|
||||
ddsData.description = dbData.description.toStdString();
|
||||
ddsData.fileContentId = dbData.fileContentId;
|
||||
ddsData.timeStamp = dbData.timeStamp;
|
||||
ddsData.mapSettings = dbData.mapSettings.toStdString();
|
||||
ddsData.movementTracks = dbData.movementTracks.toStdString();
|
||||
|
||||
ddsData.filter(dbData.filter.toStdString());
|
||||
ddsData.planOverlay(dbData.planOverlay.toStdString());
|
||||
ddsData.filter = dbData.filter.toStdString();
|
||||
ddsData.planOverlay = dbData.planOverlay.toStdString();
|
||||
|
||||
return ddsData;
|
||||
} // end of toDdsData()
|
||||
|
||||
@@ -30,9 +30,9 @@ public:
|
||||
Core::FunctionReplyObject updateObject(const MarkerManagement::Snapshot &data);
|
||||
Core::FunctionReplyObject removeObject();
|
||||
|
||||
qint32 getId() const{ return m_dataSnapshot.id(); }
|
||||
qint32 getId() const{ return m_dataSnapshot.id; }
|
||||
Snapshot getData() const { return m_dataSnapshot; }
|
||||
QString getName() const { return QString::fromStdString(m_dataSnapshot.name()); }
|
||||
QString getName() const { return QString::fromStdString(m_dataSnapshot.name); }
|
||||
|
||||
bool isValid() const;
|
||||
|
||||
|
||||
Reference in new issue
Block a user