MemoryBase< _CoreSegmentT > Class Template Referenceabstract

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 More...
 
virtual void createPropertyDefinitions (PropertyDefinitionsPtr &defs, const std::string &prefix)
 default parameters. Implementation should use the configuration to configure More...
 
void disable ()
 disable this LTM More...
 
void enable ()
 enable this LTM More...
 
virtual std::unique_ptr< CoreSegmentTfindCoreSegment (const std::string &) const =0
 find core segment More...
 
virtual bool forEachCoreSegment (std::function< void(CoreSegmentT &)> func) const =0
 iterate over all core segments of this ltm More...
 
std::map< std::string, processor::SnapshotFilter::FilterStatisticsgetFilterStatistics ()
 
Statistics getStatistics () const
 
virtual bool hasCoreSegment (const std::string &) const =0
 check if core segment exists More...
 
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 More...
 
void loadAllAndResolve (armem::wm::Memory &memory)
 
armem::wm::Memory loadAllReferences ()
 return the full ltm as a wm::Memory with only references the ltm may be huge, use with caution More...
 
void loadAllReferences (armem::wm::Memory &memory)
 
 MemoryBase (const std::string &exportName, const MemoryID &id)
 
virtual void resetStatistics ()
 statistics More...
 
void resolve (armem::wm::Memory &memory)
 convert the references of the input into a wm::Memory More...
 
void startRecording ()
 enable/disable More...
 
void stopRecording ()
 
void store (const armem::server::wm::Memory &serverMemory)
 append a wm::Memory instance to the ltm More...
 
void store (const armem::wm::Memory &memory)
 append a wm::Memory instance to the ltm More...
 
- 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 More...
 

Public Attributes

struct armarx::armem::server::ltm::detail::MemoryBase::Properties p
 

Protected Member Functions

virtual void _configure (const nlohmann::json &)
 configuration More...
 
virtual void _directlyStore (const armem::wm::Memory &memory)=0
 
virtual void _disable ()
 
virtual void _enable ()
 
virtual void _loadAllReferences (armem::wm::Memory &memory)=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

std::atomic_bool enabled = false
 
std::recursive_mutex ltm_mutex
 
Statistics statistics
 
- Protected Attributes inherited from MemoryItem
std::shared_ptr< Processorsprocessors
 

Detailed Description

template<class _CoreSegmentT>
class armarx::armem::server::ltm::detail::MemoryBase< _CoreSegmentT >

Interface functions for the longterm memory classes.

Definition at line 27 of file MemoryBase.h.

Member Typedef Documentation

◆ CoreSegmentT

using CoreSegmentT = _CoreSegmentT

Definition at line 43 of file MemoryBase.h.

Constructor & Destructor Documentation

◆ MemoryBase()

MemoryBase ( const std::string &  exportName,
const MemoryID id 
)
inline

Definition at line 45 of file MemoryBase.h.

Member Function Documentation

◆ _configure()

virtual void _configure ( const nlohmann::json &  )
inlineprotectedvirtual

configuration

Reimplemented in Memory.

Definition at line 276 of file MemoryBase.h.

+ Here is the caller graph for this function:

◆ _directlyStore()

virtual void _directlyStore ( const armem::wm::Memory memory)
protectedpure virtual

Implemented in Memory.

+ Here is the caller graph for this function:

◆ _disable()

virtual void _disable ( )
inlineprotectedvirtual

Reimplemented in Memory.

Definition at line 286 of file MemoryBase.h.

+ Here is the caller graph for this function:

◆ _enable()

virtual void _enable ( )
inlineprotectedvirtual

Reimplemented in Memory.

Definition at line 281 of file MemoryBase.h.

+ Here is the caller graph for this function:

◆ _loadAllReferences()

virtual void _loadAllReferences ( armem::wm::Memory memory)
protectedpure virtual

Implemented in Memory.

+ Here is the caller graph for this function:

◆ _resolve()

virtual void _resolve ( armem::wm::Memory memory)
protectedpure virtual

Implemented in Memory.

+ Here is the caller graph for this function:

◆ _setExportName()

virtual void _setExportName ( const std::string &  )
inlineprotectedvirtual

Reimplemented from MemoryItem.

Reimplemented in Memory.

Definition at line 291 of file MemoryBase.h.

◆ _store()

virtual void _store ( const armem::wm::Memory memory)
protectedpure virtual

Implemented in Memory.

◆ configure()

void configure ( )
inline

initialize config

Definition at line 52 of file MemoryBase.h.

+ Here is the caller graph for this function:

◆ createPropertyDefinitions()

virtual void createPropertyDefinitions ( PropertyDefinitionsPtr defs,
const std::string &  prefix 
)
inlinevirtual

default parameters. Implementation should use the configuration to configure

Reimplemented in Memory.

Definition at line 201 of file MemoryBase.h.

◆ disable()

void disable ( )
inline

disable this LTM

Definition at line 101 of file MemoryBase.h.

+ Here is the caller graph for this function:

◆ enable()

void enable ( )
inline

enable this LTM

Definition at line 82 of file MemoryBase.h.

+ Here is the caller graph for this function:

◆ findCoreSegment()

virtual std::unique_ptr<CoreSegmentT> findCoreSegment ( const std::string &  ) const
pure virtual

find core segment

Implemented in Memory.

◆ forEachCoreSegment()

virtual bool forEachCoreSegment ( std::function< void(CoreSegmentT &)>  func) const
pure virtual

iterate over all core segments of this ltm

Implemented in Memory.

◆ getFilterStatistics()

std::map<std::string, processor::SnapshotFilter::FilterStatistics> getFilterStatistics ( )
inline

Definition at line 246 of file MemoryBase.h.

◆ getLevelName()

static std::string getLevelName ( )
inlinestatic

get level name1

Definition at line 268 of file MemoryBase.h.

◆ getStatistics()

Statistics getStatistics ( ) const
inline

Definition at line 240 of file MemoryBase.h.

◆ hasCoreSegment()

virtual bool hasCoreSegment ( const std::string &  ) const
pure virtual

check if core segment exists

Implemented in Memory.

◆ isRecording()

bool isRecording ( ) const
inline

Definition at line 225 of file MemoryBase.h.

+ Here is the caller graph for this function:

◆ loadAllAndResolve() [1/2]

armem::wm::Memory loadAllAndResolve ( )
inline

return the full ltm as a wm::Memory and resolves the references the ltm may be huge, use with caution

Definition at line 137 of file MemoryBase.h.

+ Here is the caller graph for this function:

◆ loadAllAndResolve() [2/2]

void loadAllAndResolve ( armem::wm::Memory memory)
inline

Definition at line 145 of file MemoryBase.h.

◆ loadAllReferences() [1/2]

armem::wm::Memory loadAllReferences ( )
inline

return the full ltm as a wm::Memory with only references the ltm may be huge, use with caution

Definition at line 119 of file MemoryBase.h.

+ Here is the caller graph for this function:

◆ loadAllReferences() [2/2]

void loadAllReferences ( armem::wm::Memory memory)
inline

Definition at line 127 of file MemoryBase.h.

◆ resetStatistics()

virtual void resetStatistics ( )
inlinevirtual

statistics

Definition at line 232 of file MemoryBase.h.

◆ resolve()

void resolve ( armem::wm::Memory memory)
inline

convert the references of the input into a wm::Memory

Definition at line 155 of file MemoryBase.h.

◆ startRecording()

void startRecording ( )
inline

enable/disable

Definition at line 210 of file MemoryBase.h.

+ Here is the caller graph for this function:

◆ stopRecording()

void stopRecording ( )
inline

Definition at line 218 of file MemoryBase.h.

◆ store() [1/2]

void store ( const armem::server::wm::Memory serverMemory)
inline

append a wm::Memory instance to the ltm

Definition at line 183 of file MemoryBase.h.

◆ store() [2/2]

void store ( const armem::wm::Memory memory)
inline

append a wm::Memory instance to the ltm

Definition at line 164 of file MemoryBase.h.

+ Here is the caller graph for this function:

Member Data Documentation

◆ enabled

std::atomic_bool enabled = false
protected

Definition at line 317 of file MemoryBase.h.

◆ ltm_mutex

std::recursive_mutex ltm_mutex
mutableprotected

Definition at line 313 of file MemoryBase.h.

◆ p

◆ statistics

Statistics statistics
mutableprotected

Definition at line 315 of file MemoryBase.h.


The documentation for this class was generated from the following file: