diff --git a/source/RobotAPI/libraries/armem/server/MemoryToIceAdapter.cpp b/source/RobotAPI/libraries/armem/server/MemoryToIceAdapter.cpp index 68904e536e5a5b8d7fc6a38a92ed77655dd1d2fd..bd982e10f95a5703ea4bf99eb7b90cf1735fc20b 100644 --- a/source/RobotAPI/libraries/armem/server/MemoryToIceAdapter.cpp +++ b/source/RobotAPI/libraries/armem/server/MemoryToIceAdapter.cpp @@ -12,7 +12,7 @@ namespace armarx::armem::server { - MemoryToIceAdapter::MemoryToIceAdapter(wm::Memory* workingmemory, ltm::Memory* longtermmemory) : workingmemory(workingmemory), longtermmemory(longtermmemory) + MemoryToIceAdapter::MemoryToIceAdapter(wm::Memory* workingmemory, ltm::Memory* longtermmemory) : workingMemory(workingmemory), longtermMemory(longtermmemory) { } @@ -20,7 +20,7 @@ namespace armarx::armem::server void MemoryToIceAdapter::setMemoryListener(client::MemoryListenerInterfacePrx memoryListener) { - this->memoryListener = memoryListener; + this->memoryListenerTopic = memoryListener; } @@ -29,20 +29,20 @@ namespace armarx::armem::server MemoryToIceAdapter::addSegment(const data::AddSegmentInput& input, bool addCoreSegments) { ARMARX_DEBUG << "Adding segment '" << input.coreSegmentName << "/" << input.providerSegmentName << "'."; - ARMARX_CHECK_NOT_NULL(workingmemory); + ARMARX_CHECK_NOT_NULL(workingMemory); data::AddSegmentResult output; armem::wm::CoreSegment* coreSegment = nullptr; try { - coreSegment = &workingmemory->getCoreSegment(input.coreSegmentName); + coreSegment = &workingMemory->getCoreSegment(input.coreSegmentName); } catch (const armem::error::MissingEntry& e) { if (addCoreSegments) { - coreSegment = &workingmemory->addCoreSegment(input.coreSegmentName); + coreSegment = &workingMemory->addCoreSegment(input.coreSegmentName); } else { @@ -71,7 +71,7 @@ namespace armarx::armem::server } armem::MemoryID segmentID; - segmentID.memoryName = workingmemory->name(); + segmentID.memoryName = workingMemory->name(); segmentID.coreSegmentName = input.coreSegmentName; segmentID.providerSegmentName = input.providerSegmentName; @@ -84,7 +84,7 @@ namespace armarx::armem::server data::AddSegmentsResult MemoryToIceAdapter::addSegments(const data::AddSegmentsInput& input, bool addCoreSegments) { - ARMARX_CHECK_NOT_NULL(workingmemory); + ARMARX_CHECK_NOT_NULL(workingMemory); data::AddSegmentsResult output; for (const auto& i : input) @@ -97,7 +97,7 @@ namespace armarx::armem::server data::CommitResult MemoryToIceAdapter::commit(const data::Commit& commitIce, Time timeArrived) { - ARMARX_CHECK_NOT_NULL(workingmemory); + ARMARX_CHECK_NOT_NULL(workingMemory); armem::Commit commit; armem::fromIce(commitIce, commit, timeArrived); @@ -121,7 +121,7 @@ namespace armarx::armem::server MemoryToIceAdapter::commit(const armem::Commit& commit) { std::vector<data::MemoryID> updatedIDs; - const bool publishUpdates = memoryListener; + const bool publishUpdates = memoryListenerTopic; CommitResult commitResult; for (const EntityUpdate& update : commit.updates) @@ -129,7 +129,7 @@ namespace armarx::armem::server EntityUpdateResult& result = commitResult.results.emplace_back(); try { - MemoryID snapshotID = workingmemory->update(update); + MemoryID snapshotID = workingMemory->update(update); result.success = true; result.snapshotID = snapshotID; @@ -150,7 +150,7 @@ namespace armarx::armem::server if (publishUpdates) { - memoryListener->memoryUpdated(updatedIDs); + memoryListenerTopic->memoryUpdated(updatedIDs); } return commitResult; @@ -161,18 +161,18 @@ namespace armarx::armem::server armem::query::data::Result MemoryToIceAdapter::query(const armem::query::data::Input& input) { - ARMARX_CHECK_NOT_NULL(workingmemory); + ARMARX_CHECK_NOT_NULL(workingMemory); armem::wm::query_proc::MemoryQueryProcessor processor( input.withData ? armem::DataMode::WithData : armem::DataMode::NoData); - return processor.process(input, *workingmemory); + return processor.process(input, *workingMemory); } // LTM LOADING query::data::Result MemoryToIceAdapter::load(const armem::query::data::Input& query) { - ARMARX_CHECK_NOT_NULL(longtermmemory); + ARMARX_CHECK_NOT_NULL(longtermMemory); query::data::Result output; output.success = true; @@ -182,8 +182,8 @@ namespace armarx::armem::server // LTM STORING data::StoreResult MemoryToIceAdapter::store(const armem::data::StoreInput& input) { - ARMARX_CHECK_NOT_NULL(workingmemory); - ARMARX_CHECK_NOT_NULL(longtermmemory); + ARMARX_CHECK_NOT_NULL(workingMemory); + ARMARX_CHECK_NOT_NULL(longtermMemory); data::StoreResult output; armem::query::data::Result queryResult = this->query(input.query); @@ -191,7 +191,7 @@ namespace armarx::armem::server { wm::Memory m; fromIce(queryResult.memory, m); - longtermmemory->append(m); + longtermMemory->append(m); } else { diff --git a/source/RobotAPI/libraries/armem/server/MemoryToIceAdapter.h b/source/RobotAPI/libraries/armem/server/MemoryToIceAdapter.h index 0e22503872001e384a9a9e62f13f280bf0ba17c4..36a2081aec732b9b6d348d56a53f280446a02502 100644 --- a/source/RobotAPI/libraries/armem/server/MemoryToIceAdapter.h +++ b/source/RobotAPI/libraries/armem/server/MemoryToIceAdapter.h @@ -22,9 +22,9 @@ namespace armarx::armem::server public: /// Construct an MemoryToIceAdapter from an existing Memory. - MemoryToIceAdapter(wm::Memory* workingmemory = nullptr, ltm::Memory* longtermmemory = nullptr); + MemoryToIceAdapter(wm::Memory* workingMemory = nullptr, ltm::Memory* longtermMemory = nullptr); - void setMemoryListener(client::MemoryListenerInterfacePrx memoryListener); + void setMemoryListener(client::MemoryListenerInterfacePrx memoryListenerTopic); // WRITING @@ -50,10 +50,10 @@ namespace armarx::armem::server public: - wm::Memory* workingmemory; - ltm::Memory* longtermmemory; + wm::Memory* workingMemory; + ltm::Memory* longtermMemory; - client::MemoryListenerInterfacePrx memoryListener; + client::MemoryListenerInterfacePrx memoryListenerTopic; };