|
|
Reads data from a memory server. More...
#include <RobotAPI/libraries/armem/client/Reader.h>
Public Member Functions | |
| server::dto::DirectlyStoreResult | directlyStore (const server::dto::DirectlyStoreInput &input) const |
| QueryResult | getAll (armem::query::DataMode dataMode=armem::query::DataMode::WithData) const |
| Get the whole memory content. | |
| QueryResult | getAllLatestSnapshots (armem::query::DataMode dataMode=armem::query::DataMode::WithData) const |
| Get all latest snapshots in the memory. | |
| std::map< MemoryID, std::vector< PredictionEngine > > | getAvailablePredictionEngines () const |
| Get the list of prediction engines supported by the memory. | |
| std::optional< wm::EntitySnapshot > | getLatestSnapshotIn (const MemoryID &id, armem::query::DataMode dataMode=armem::query::DataMode::WithData) const |
| Get the latest snapshot under the given memory ID. | |
| std::optional< wm::EntitySnapshot > | getLatestSnapshotOf (const std::vector< MemoryID > &snapshotIDs) const |
| Query the given snapshot and return the latest existing snapshot. | |
| QueryResult | getLatestSnapshotsIn (const MemoryID &id, armem::query::DataMode dataMode=armem::query::DataMode::WithData) const |
| Get the latest snapshots under the given memory ID. | |
| operator bool () const | |
| std::vector< PredictionResult > | predict (const std::vector< PredictionRequest > &requests) const |
| Get a prediction for the state of multiple entity instances in the future. | |
| QueryResult | query (armem::query::data::MemoryQueryPtr query, armem::client::MemoryNameSystem &mns, int recursionDepth=-1) const |
| QueryResult | query (armem::query::data::MemoryQueryPtr query, armem::query::DataMode dataMode=armem::query::DataMode::WithData) const |
| armem::query::data::Result | query (const armem::query::data::Input &input) const |
| armem::query::data::Result | query (const armem::query::data::Input &input, armem::client::MemoryNameSystem &mns, int recursionDepth=-1) const |
| QueryResult | query (const armem::query::data::MemoryQuerySeq &queries, armem::client::MemoryNameSystem &mns, int recursionDepth=-1) const |
| QueryResult | query (const armem::query::data::MemoryQuerySeq &queries, armem::query::DataMode dataMode=armem::query::DataMode::WithData) const |
| QueryResult | query (const QueryBuilder &queryBuilder) const |
| QueryResult | query (const QueryBuilder &queryBuilder, armem::client::MemoryNameSystem &mns, int recursionDepth=-1) const |
| QueryResult | query (const QueryInput &input) const |
| Perform a query on the WM. | |
| QueryResult | query (const QueryInput &input, armem::client::MemoryNameSystem &mns, int recursionDepth=-1) const |
| Perform a query with recursive memory link resolution. | |
| armem::query::data::Result | queryLTM (const armem::query::data::Input &input, bool storeIntoWM=false) const |
| Queries the linked ltms. | |
| QueryResult | queryLTM (const QueryInput &input, bool storeIntoWM=false) const |
| Queries the linked ltms. | |
| QueryResult | queryMemoryIDs (const std::vector< MemoryID > &ids, armem::query::DataMode dataMode=armem::query::DataMode::WithData) const |
| Query a specific set of memory IDs. | |
| Reader (const Reader &)=default | |
| Construct a memory reader. | |
| Reader (server::ReadingMemoryInterfacePrx readingMemory=nullptr, server::PredictingMemoryInterfacePrx predictingMemory=nullptr, server::ReadingLongTermMemoryInterfacePrx readingLtmMemory=nullptr) | |
| void | setPredictingMemory (server::PredictingMemoryInterfacePrx predictingMemory) |
| void | setReadingLtmMemory (server::ReadingLongTermMemoryInterfacePrx readingLtmMemory) |
| void | setReadingMemory (server::ReadingMemoryInterfacePrx readingMemory) |
| void | startRecording () const |
| void | stopRecording () const |
Public Attributes | |
| server::PredictingMemoryInterfacePrx | predictionPrx |
| server::ReadingLongTermMemoryInterfacePrx | readingLtmPrx |
| server::ReadingMemoryInterfacePrx | readingPrx |
Construct a memory reader.
| memory | The memory proxy. |
Here is the call graph for this function:
Here is the caller graph for this function:| Reader | ( | server::ReadingMemoryInterfacePrx | readingMemory = nullptr, |
| server::PredictingMemoryInterfacePrx | predictingMemory = nullptr, | ||
| server::ReadingLongTermMemoryInterfacePrx | readingLtmMemory = nullptr ) |
Definition at line 59 of file Reader.cpp.
| server::dto::DirectlyStoreResult directlyStore | ( | const server::dto::DirectlyStoreInput & | input | ) | const |
Definition at line 500 of file Reader.cpp.
| QueryResult getAll | ( | armem::query::DataMode | dataMode = armem::query::DataMode::WithData | ) | const |
Get the whole memory content.
| dataMode | With or without data. |
Definition at line 489 of file Reader.cpp.
Here is the call graph for this function:| QueryResult getAllLatestSnapshots | ( | armem::query::DataMode | dataMode = armem::query::DataMode::WithData | ) | const |
Get all latest snapshots in the memory.
| dataMode | With or without data. |
Definition at line 478 of file Reader.cpp.
Here is the call graph for this function:| std::map< MemoryID, std::vector< PredictionEngine > > getAvailablePredictionEngines | ( | ) | const |
Get the list of prediction engines supported by the memory.
The predictionPrx must not be null when calling this function.
Definition at line 621 of file Reader.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| std::optional< wm::EntitySnapshot > getLatestSnapshotIn | ( | const MemoryID & | id, |
| armem::query::DataMode | dataMode = armem::query::DataMode::WithData ) const |
Get the latest snapshot under the given memory ID.
| id | A memory, core segment, provider segment or entity ID. |
| dataMode | With or without data. |
Definition at line 449 of file Reader.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| std::optional< wm::EntitySnapshot > getLatestSnapshotOf | ( | const std::vector< MemoryID > & | snapshotIDs | ) | const |
Query the given snapshot and return the latest existing snapshot.
| snapshotIDs | The snapshot (or entity) IDs. |
Definition at line 397 of file Reader.cpp.
Here is the call graph for this function:| QueryResult getLatestSnapshotsIn | ( | const MemoryID & | id, |
| armem::query::DataMode | dataMode = armem::query::DataMode::WithData ) const |
Get the latest snapshots under the given memory ID.
| id | A memory, core segment, provider segment or entity ID. |
| dataMode | With or without data. |
Definition at line 427 of file Reader.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| std::vector< PredictionResult > predict | ( | const std::vector< PredictionRequest > & | requests | ) | const |
Get a prediction for the state of multiple entity instances in the future.
The timestamp to predict the entities' state at is given via the snapshot given in the MemoryID.
The predictionPrx must not be null when calling this function.
| requests | a list of requests for entity instance predictions |
Definition at line 577 of file Reader.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| QueryResult query | ( | armem::query::data::MemoryQueryPtr | query, |
| armem::client::MemoryNameSystem & | mns, | ||
| int | recursionDepth = -1 ) const |
Definition at line 222 of file Reader.cpp.
Here is the call graph for this function:| QueryResult query | ( | armem::query::data::MemoryQueryPtr | query, |
| armem::query::DataMode | dataMode = armem::query::DataMode::WithData ) const |
| armem::query::data::Result query | ( | const armem::query::data::Input & | input | ) | const |
Definition at line 125 of file Reader.cpp.
| armem::query::data::Result query | ( | const armem::query::data::Input & | input, |
| armem::client::MemoryNameSystem & | mns, | ||
| int | recursionDepth = -1 ) const |
Definition at line 185 of file Reader.cpp.
Here is the call graph for this function:| QueryResult query | ( | const armem::query::data::MemoryQuerySeq & | queries, |
| armem::client::MemoryNameSystem & | mns, | ||
| int | recursionDepth = -1 ) const |
Definition at line 230 of file Reader.cpp.
Here is the call graph for this function:| QueryResult query | ( | const armem::query::data::MemoryQuerySeq & | queries, |
| armem::query::DataMode | dataMode = armem::query::DataMode::WithData ) const |
| QueryResult query | ( | const QueryBuilder & | queryBuilder | ) | const |
| QueryResult query | ( | const QueryBuilder & | queryBuilder, |
| armem::client::MemoryNameSystem & | mns, | ||
| int | recursionDepth = -1 ) const |
Definition at line 240 of file Reader.cpp.
Here is the call graph for this function:| QueryResult query | ( | const QueryInput & | input | ) | const |
Perform a query on the WM.
Definition at line 119 of file Reader.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| QueryResult query | ( | const QueryInput & | input, |
| armem::client::MemoryNameSystem & | mns, | ||
| int | recursionDepth = -1 ) const |
Perform a query with recursive memory link resolution.
Resolves the links in the query result using the given MemoryNameSystem and inserts the data into the MemoryLink objects' data fields. If the inserted data also contains links, those will be resolved as well up to and including the given recursion depth. Link cycles are detected; the first repeated memory ID will not be inserted into the data. Setting the recursion depth to -1 is equivalent to an infinite recursion depth.
Standalone MemoryID subobjects are ignored; only MemoryIDs inside of MemoryLink subobjects are resolved. Empty or unresolvable MemoryIDs are ignored - this includes MemoryIDs whose Entity fields are not set. If the data associated with a MemoryID could not be retrieved or its type does not match the template type of the MemoryLink, it is ignored.
| input | the query to perform |
| mns | the MemoryNameSystem to use when resolving MemoryLinks |
| recursionDepth | how many layers of MemoryLinks to resolve |
Definition at line 177 of file Reader.cpp.
Here is the call graph for this function:| armem::query::data::Result queryLTM | ( | const armem::query::data::Input & | input, |
| bool | storeIntoWM = false ) const |
Queries the linked ltms.
| storeIntoWM | if true the ltm result is also commited to the wm en if recording mode is disabled |
Definition at line 89 of file Reader.cpp.
| QueryResult queryLTM | ( | const QueryInput & | input, |
| bool | storeIntoWM = false ) const |
Queries the linked ltms.
| storeIntoWM | if true the ltm result is also commited to the wm en if recording mode is disabled |
Definition at line 83 of file Reader.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| QueryResult queryMemoryIDs | ( | const std::vector< MemoryID > & | ids, |
| armem::query::DataMode | dataMode = armem::query::DataMode::WithData ) const |
Query a specific set of memory IDs.
Each ID can refer to an entity, a snapshot or an instance. When not referring to an entity instance, the latest snapshot and first instance will be queried, respectively.
All memory IDs must refer to the memory this reader is reading from. If an ID refers to another memory, the query will not find it and it will not be part of the result.
| ids | The entity, snapshot or instance IDs. |
| dataMode | Whether to include instance data or just meta data. |
Definition at line 374 of file Reader.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| void setPredictingMemory | ( | server::PredictingMemoryInterfacePrx | predictingMemory | ) |
Definition at line 571 of file Reader.cpp.
| void setReadingLtmMemory | ( | server::ReadingLongTermMemoryInterfacePrx | readingLtmMemory | ) |
Here is the call graph for this function:| void setReadingMemory | ( | server::ReadingMemoryInterfacePrx | readingMemory | ) |
Definition at line 565 of file Reader.cpp.
| void startRecording | ( | ) | const |
Definition at line 517 of file Reader.cpp.
| void stopRecording | ( | ) | const |
Definition at line 544 of file Reader.cpp.