|
|
Interface functions for the longterm memory classes. More...
#include <RobotAPI/libraries/armem/server/ltm/detail/MemoryBase.h>
Inheritance diagram for MemoryBase< _CoreSegmentT >:Classes | |
| struct | Properties |
| struct | Statistics |
Public Types | |
| using | CoreSegmentT = _CoreSegmentT |
Public Member Functions | |
| void | configure () |
| initialize config | |
| virtual void | createPropertyDefinitions (PropertyDefinitionsPtr &defs, const std::string &prefix) |
| default parameters. Implementation should use the configuration to configure | |
| void | disable () |
| disable this LTM | |
| void | enable () |
| enable this LTM | |
| std::shared_ptr< CoreSegmentT > | findCoreSegment (const std::string &coreSegmentName) const |
| find core segment | |
| bool | forEachCoreSegment (std::function< void(CoreSegmentT &)> func) const |
| iterate over all core segments of this ltm | |
| DebugObserverInterfacePrx | getDebugObserver () const |
| Get the current debug observer (may be nullptr) | |
| std::map< std::string, processor::SnapshotFilter::FilterStatistics > | getFilterStatistics () |
| RecordingMode | getRecordingMode () const |
| Statistics | getStatistics () const |
| bool | hasCoreSegment (const std::string &coreSegmentName) const |
| check if core segment exists | |
| bool | isRecording () const |
| armem::wm::Memory | loadAllAndResolve () |
| return the full ltm as a wm::Memory and resolves the references the ltm may be huge, use with caution | |
| void | loadAllAndResolve (armem::wm::Memory &memory) |
| void | loadAllAndResolve (armem::wm::Memory &memory, std::list< std::string > coreSegmentNames) |
| armem::wm::Memory | loadAllReferences () |
| return the full ltm as a wm::Memory with only references the ltm may be huge, use with caution | |
| void | loadAllReferences (armem::wm::Memory &memory) |
| armem::wm::Memory | loadLatestNReferences (int n) |
| void | loadLatestNReferences (int n, armem::wm::Memory &memory) |
| void | loadLatestNReferences (int n, armem::wm::Memory &memory, std::list< std::string > coreSegNames) |
| void | loadOnStartup () |
| MemoryBase (const std::string &exportName, const MemoryID &id) | |
| virtual void | resetStatistics () |
| statistics | |
| void | resolve (armem::wm::Memory &memory) |
| convert the references of the input into a wm::Memory | |
| void | setDebugObserver (DebugObserverInterfacePrx observer) |
| Set an optional debug observer for timing measurements. | |
| void | setRecordingMode (const RecordingMode m) |
| void | setRecordingMode (const std::string &m) |
| void | startRecording () |
| enable/disable | |
| void | stopRecording () |
| void | store (const armem::server::wm::Memory &serverMemory) |
| append a wm::Memory instance to the ltm | |
| void | store (std::shared_ptr< const armem::wm::Memory > memory) |
| append a wm::Memory instance to the ltm (asynchronously via thread pool) | |
| void | storeSnapshotsAsync (const std::string &memoryName, const std::vector< wm::EntitySnapshot > &snapshots, const std::vector< mixin::PendingConversion::SegmentMetadata > &segmentMetadata) |
| Store snapshots with deferred conversion (happens in async thread) This is more efficient than calling store() with a pre-converted Memory because the expensive toMemory() conversion happens off the critical path. | |
Public Member Functions inherited from MemoryItem | |
| virtual std::string | getExportName () const |
| MemoryID | getMemoryID () const |
| MemoryID | id () const |
| MemoryItem (const std::string &exportName, const MemoryID &) | |
| MemoryItem (const std::string &exportName, const MemoryID &, const std::shared_ptr< Processors > &) | |
| std::string | name () const |
| void | setExportName (const std::string &n) |
| void | setMemoryID (const MemoryID &) |
| void | setMemoryName (const std::string &memoryName) |
| virtual | ~MemoryItem ()=default |
Static Public Member Functions | |
| static std::string | getLevelName () |
| get level name1 | |
Public Attributes | |
| struct armarx::armem::server::ltm::detail::MemoryBase::Properties | p |
Protected Member Functions | |
| virtual void | _configure (const nlohmann::json &) |
| configuration | |
| virtual void | _directlyStore (const armem::wm::Memory &memory, bool simulatedVersion=false)=0 |
| virtual void | _disable () |
| virtual void | _enable () |
| virtual void | _enqueueForAsyncStorage (std::shared_ptr< const armem::wm::Memory > memory)=0 |
| virtual void | _enqueuePendingConversion (mixin::PendingConversion pending)=0 |
| virtual std::shared_ptr< CoreSegmentT > | _implFindCoreSegment (const std::string &coreSegmentName) const =0 |
| virtual bool | _implForEachCoreSegment (std::function< void(CoreSegmentT &)> func) const =0 |
| virtual bool | _implHasCoreSegment (const std::string &coreSegmentName) const =0 |
| virtual void | _loadAllReferences (armem::wm::Memory &memory)=0 |
| virtual void | _loadAllReferences (armem::wm::Memory &memory, std::list< std::string > coreSegNames)=0 |
| virtual void | _loadLatestNReferences (int n, armem::wm::Memory &memory)=0 |
| virtual void | _loadLatestNReferences (int n, armem::wm::Memory &memory, std::list< std::string > coreSegNames)=0 |
| virtual void | _loadOnStartup ()=0 |
| virtual void | _resolve (armem::wm::Memory &memory)=0 |
| virtual void | _setExportName (const std::string &) |
| virtual void | _store (const armem::wm::Memory &memory)=0 |
Protected Member Functions inherited from MemoryItem | |
| virtual void | _setMemoryID (const MemoryID &) |
Protected Attributes | |
| DebugObserverInterfacePrx | debugObserver |
| Optional debug observer for timing measurements. | |
| std::atomic_bool | enabled = true |
| RecordingMode | recordingMode = RecordingMode::CONSOLIDATE_REMOVED |
| Statistics | statistics |
Protected Attributes inherited from MemoryItem | |
| std::shared_ptr< Processors > | processors |
Interface functions for the longterm memory classes.
Definition at line 49 of file MemoryBase.h.
| using CoreSegmentT = _CoreSegmentT |
Definition at line 65 of file MemoryBase.h.
|
inline |
Definition at line 67 of file MemoryBase.h.
|
inlineprotectedvirtual |
configuration
Reimplemented in Memory.
Definition at line 531 of file MemoryBase.h.
Here is the caller graph for this function:
|
protectedpure virtual |
Implemented in Memory.
|
inlineprotectedvirtual |
Reimplemented in Memory.
Definition at line 541 of file MemoryBase.h.
Here is the caller graph for this function:
|
inlineprotectedvirtual |
Reimplemented in Memory.
Definition at line 536 of file MemoryBase.h.
Here is the caller graph for this function:
|
protectedpure virtual |
|
protectedpure virtual |
|
protectedpure virtual |
|
protectedpure virtual |
|
protectedpure virtual |
|
protectedpure virtual |
|
protectedpure virtual |
Implemented in Memory.
|
protectedpure virtual |
|
protectedpure virtual |
Implemented in Memory.
|
protectedpure virtual |
|
protectedpure virtual |
|
inlineprotectedvirtual |
Reimplemented from MemoryItem.
Reimplemented in Memory.
Definition at line 546 of file MemoryBase.h.
|
protectedpure virtual |
Implemented in Memory.
|
inline |
initialize config
Definition at line 107 of file MemoryBase.h.
|
inlinevirtual |
default parameters. Implementation should use the configuration to configure
Reimplemented in Memory.
Definition at line 394 of file MemoryBase.h.
|
inline |
disable this LTM
Definition at line 159 of file MemoryBase.h.
Here is the caller graph for this function:
|
inline |
enable this LTM
Definition at line 140 of file MemoryBase.h.
Here is the caller graph for this function:
|
inline |
find core segment
Definition at line 387 of file MemoryBase.h.
|
inline |
iterate over all core segments of this ltm
Definition at line 373 of file MemoryBase.h.
|
inline |
Get the current debug observer (may be nullptr)
Definition at line 522 of file MemoryBase.h.
|
inline |
Definition at line 463 of file MemoryBase.h.
|
inlinestatic |
get level name1
Definition at line 485 of file MemoryBase.h.
|
inline |
Definition at line 100 of file MemoryBase.h.
|
inline |
Definition at line 457 of file MemoryBase.h.
|
inline |
check if core segment exists
Definition at line 380 of file MemoryBase.h.
|
inline |
|
inline |
return the full ltm as a wm::Memory and resolves the references the ltm may be huge, use with caution
Definition at line 223 of file MemoryBase.h.
Here is the caller graph for this function:
|
inline |
Definition at line 231 of file MemoryBase.h.
|
inline |
Definition at line 240 of file MemoryBase.h.
|
inline |
return the full ltm as a wm::Memory with only references the ltm may be huge, use with caution
Definition at line 177 of file MemoryBase.h.
Here is the caller graph for this function:
|
inline |
Definition at line 185 of file MemoryBase.h.
|
inline |
|
inline |
Definition at line 213 of file MemoryBase.h.
|
inline |
Definition at line 205 of file MemoryBase.h.
|
inline |
Definition at line 491 of file MemoryBase.h.
|
inlinevirtual |
statistics
Definition at line 449 of file MemoryBase.h.
|
inline |
convert the references of the input into a wm::Memory
Definition at line 250 of file MemoryBase.h.
|
inline |
Set an optional debug observer for timing measurements.
| observer | The debug observer proxy (can be nullptr to disable) |
This allows optional timing reporting to a debug observer. If set, you can report timing information like:
Definition at line 513 of file MemoryBase.h.
Here is the caller graph for this function:
|
inline |
Definition at line 94 of file MemoryBase.h.
|
inline |
|
inline |
enable/disable
Definition at line 427 of file MemoryBase.h.
Here is the caller graph for this function:
|
inline |
Definition at line 435 of file MemoryBase.h.
|
inline |
append a wm::Memory instance to the ltm
Definition at line 302 of file MemoryBase.h.
|
inline |
append a wm::Memory instance to the ltm (asynchronously via thread pool)
Definition at line 259 of file MemoryBase.h.
Here is the caller graph for this function:
|
inline |
Store snapshots with deferred conversion (happens in async thread) This is more efficient than calling store() with a pre-converted Memory because the expensive toMemory() conversion happens off the critical path.
IMPORTANT: This method does NOT access the WM structure to avoid deadlocks. The caller must pre-extract metadata before calling this method.
Definition at line 316 of file MemoryBase.h.
|
protected |
Optional debug observer for timing measurements.
Definition at line 620 of file MemoryBase.h.
|
protected |
Definition at line 615 of file MemoryBase.h.
| struct armarx::armem::server::ltm::detail::MemoryBase::Properties p |
|
protected |
Definition at line 617 of file MemoryBase.h.
|
mutableprotected |
Definition at line 613 of file MemoryBase.h.