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)
 
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 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 _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

std::atomic_bool enabled = true
 
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 28 of file MemoryBase.h.

Member Typedef Documentation

◆ CoreSegmentT

using CoreSegmentT = _CoreSegmentT

Definition at line 44 of file MemoryBase.h.

Constructor & Destructor Documentation

◆ MemoryBase()

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

Definition at line 46 of file MemoryBase.h.

Member Function Documentation

◆ _configure()

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

configuration

Reimplemented in Memory.

Definition at line 318 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 328 of file MemoryBase.h.

+ Here is the caller graph for this function:

◆ _enable()

virtual void _enable ( )
inlineprotectedvirtual

Reimplemented in Memory.

Definition at line 323 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:

◆ _loadLatestNReferences() [1/2]

virtual void _loadLatestNReferences ( int  n,
armem::wm::Memory memory 
)
protectedpure virtual

Implemented in Memory.

+ Here is the caller graph for this function:

◆ _loadLatestNReferences() [2/2]

virtual void _loadLatestNReferences ( int  n,
armem::wm::Memory memory,
std::list< std::string >  coreSegNames 
)
protectedpure virtual

Implemented in Memory.

◆ _loadOnStartup()

virtual void _loadOnStartup ( )
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 333 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 53 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 232 of file MemoryBase.h.

◆ disable()

void disable ( )
inline

disable this LTM

Definition at line 105 of file MemoryBase.h.

+ Here is the caller graph for this function:

◆ enable()

void enable ( )
inline

enable this LTM

Definition at line 86 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 282 of file MemoryBase.h.

◆ getLevelName()

static std::string getLevelName ( )
inlinestatic

get level name1

Definition at line 304 of file MemoryBase.h.

◆ getStatistics()

Statistics getStatistics ( ) const
inline

Definition at line 276 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 261 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 168 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 176 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 123 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 131 of file MemoryBase.h.

◆ loadLatestNReferences() [1/3]

armem::wm::Memory loadLatestNReferences ( int  n)
inline

Definition at line 141 of file MemoryBase.h.

+ Here is the caller graph for this function:

◆ loadLatestNReferences() [2/3]

void loadLatestNReferences ( int  n,
armem::wm::Memory memory 
)
inline

Definition at line 157 of file MemoryBase.h.

◆ loadLatestNReferences() [3/3]

void loadLatestNReferences ( int  n,
armem::wm::Memory memory,
std::list< std::string >  coreSegNames 
)
inline

Definition at line 150 of file MemoryBase.h.

◆ loadOnStartup()

void loadOnStartup ( )
inline

Definition at line 310 of file MemoryBase.h.

◆ resetStatistics()

virtual void resetStatistics ( )
inlinevirtual

statistics

Definition at line 268 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 186 of file MemoryBase.h.

◆ startRecording()

void startRecording ( )
inline

enable/disable

Definition at line 246 of file MemoryBase.h.

+ Here is the caller graph for this function:

◆ stopRecording()

void stopRecording ( )
inline

Definition at line 254 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 214 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 195 of file MemoryBase.h.

+ Here is the caller graph for this function:

Member Data Documentation

◆ enabled

std::atomic_bool enabled = true
protected

Definition at line 368 of file MemoryBase.h.

◆ ltm_mutex

std::recursive_mutex ltm_mutex
mutableprotected

Definition at line 364 of file MemoryBase.h.

◆ p

◆ statistics

Statistics statistics
mutableprotected

Definition at line 366 of file MemoryBase.h.


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