9 std::optional<armarx::armem::wm::Memory>
15 reader =
mns.getReader(memoryID);
28 ARMARX_WARNING <<
"Could not query memory for ID " << memoryID <<
", "
33 std::optional<std::pair<armarx::aron::data::DictPtr, armarx::aron::type::ObjectPtr>>
37 const auto* instance =
memory.findLatestInstance(memoryID);
38 if (instance ==
nullptr)
45 const auto* providerSegment =
memory.findProviderSegment(memoryID);
46 if (providerSegment ==
nullptr)
51 if (!providerSegment->hasAronType())
53 const auto* coreSegment =
memory.findCoreSegment(memoryID);
54 if (coreSegment ==
nullptr || !coreSegment->hasAronType())
58 aronType = coreSegment->aronType();
62 aronType = providerSegment->aronType();
65 return {{aronData, aronType}};
The memory name system (MNS) client.
Reads data from a memory server.
QueryResult queryMemoryIDs(const std::vector< MemoryID > &ids, armem::query::DataMode dataMode=armem::query::DataMode::WithData) const
Query a specific set of memory IDs.
Indicates that a query to the Memory Name System failed.
static std::string makeMsg(const MemoryID &memoryID, const std::string &errorMessage="")
Client-side working memory.
Brief description of class memory.
#define ARMARX_WARNING
The logging level for unexpected behaviour, but not a serious problem.
client::QueryResult ClientQueryResult
std::optional< std::pair< armarx::aron::data::DictPtr, armarx::aron::type::ObjectPtr > > extractDataAndType(const armarx::armem::wm::Memory &memory, const armarx::armem::MemoryID &memoryID)
get the data and type of the given MemoryID in the given Memory.
std::optional< armarx::armem::wm::Memory > resolveID(armarx::armem::client::MemoryNameSystem &mns, const armarx::armem::MemoryID &memoryID)
resolve a single MemoryID with the given MemoryNameSystem.
std::shared_ptr< Dict > DictPtr
std::shared_ptr< Object > ObjectPtr
wm::Memory memory
The slice of the memory that matched the query.