MemoryToIceAdapter Class Reference

Helps connecting a Memory server to the Ice interface. More...

#include <RobotAPI/libraries/armem/server/MemoryToIceAdapter.h>

Public Member Functions

data::AddSegmentResult addSegment (const data::AddSegmentInput &input, bool addCoreSegments=false)
 
data::AddSegmentsResult addSegments (const data::AddSegmentsInput &input, bool addCoreSegments=false)
 
armem::CommitResult commit (const armem::Commit &commit)
 
data::CommitResult commit (const data::Commit &commitIce)
 
data::CommitResult commit (const data::Commit &commitIce, Time timeArrived)
 
armem::CommitResult commitLocking (const armem::Commit &commit)
 
data::CommitResult commitLocking (const data::Commit &commitIce)
 
data::CommitResult commitLocking (const data::Commit &commitIce, Time timeArrived)
 
dto::DirectlyStoreResult directlyStore (const dto::DirectlyStoreInput &directlStoreInput)
 
prediction::data::EngineSupportMap getAvailableEngines ()
 
dto::RecordStatusResult getRecordStatus ()
 
armem::structure::data::GetServerStructureResult getServerStructure ()
 
const MemoryOperationStatisticsgetStatistics () const
 Get statistics for memory operations (commits and queries)
 
 MemoryToIceAdapter (server::wm::Memory *workingMemory=nullptr, server::ltm::Memory *longtermMemory=nullptr)
 Construct an MemoryToIceAdapter from an existing Memory.
 
prediction::data::PredictionResultSeq predict (prediction::data::PredictionRequestSeq requests)
 
query::data::Result query (const armem::query::data::Input &input)
 
client::QueryResult query (const client::QueryInput &input)
 
query::data::Result queryLTM (const armem::query::data::Input &input, bool storeIntoWM)
 Query the LTMs of the memory server.
 
armem::CommitResult reloadAllFromLTM ()
 Loads all core segments and their data from the LTM.
 
armem::CommitResult reloadCoreSegmentsFromLTM (std::list< std::string > &coreSegmentname)
 Only load specific core segments and their data from the LTM.
 
armem::CommitResult reloadFromLTMOnStartup ()
 Triggers a reload (.
 
armem::CommitResult reloadPropertyDefinedCoreSegmentsFromLTM ()
 
void reportDebugMetrics ()
 Report all debug metrics to the debug observer.
 
void resetStatistics ()
 Reset statistics counters.
 
void setMemoryListener (client::MemoryListenerInterfacePrx memoryListenerTopic)
 
dto::StartRecordResult startRecord (const dto::StartRecordInput &startRecordInput)
 
dto::StopRecordResult stopRecord ()
 

Public Attributes

server::ltm::MemorylongtermMemory
 
client::MemoryListenerInterfacePrx memoryListenerTopic
 
server::wm::MemoryworkingMemory
 

Detailed Description

Helps connecting a Memory server to the Ice interface.

This involves conversion of ice types to C++ types as well as catchin exceptions and converting them to error messages

Definition at line 99 of file MemoryToIceAdapter.h.

Constructor & Destructor Documentation

◆ MemoryToIceAdapter()

MemoryToIceAdapter ( server::wm::Memory * workingMemory = nullptr,
server::ltm::Memory * longtermMemory = nullptr )

Construct an MemoryToIceAdapter from an existing Memory.

Definition at line 88 of file MemoryToIceAdapter.cpp.

Member Function Documentation

◆ addSegment()

data::AddSegmentResult addSegment ( const data::AddSegmentInput & input,
bool addCoreSegments = false )

Definition at line 102 of file MemoryToIceAdapter.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addSegments()

data::AddSegmentsResult addSegments ( const data::AddSegmentsInput & input,
bool addCoreSegments = false )

Definition at line 164 of file MemoryToIceAdapter.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ commit() [1/3]

armem::CommitResult commit ( const armem::Commit & commit)

Definition at line 222 of file MemoryToIceAdapter.cpp.

+ Here is the call graph for this function:

◆ commit() [2/3]

data::CommitResult commit ( const data::Commit & commitIce)

Definition at line 215 of file MemoryToIceAdapter.cpp.

+ Here is the call graph for this function:

◆ commit() [3/3]

data::CommitResult commit ( const data::Commit & commitIce,
Time timeArrived )

Definition at line 178 of file MemoryToIceAdapter.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ commitLocking() [1/3]

armem::CommitResult commitLocking ( const armem::Commit & commit)

Definition at line 273 of file MemoryToIceAdapter.cpp.

+ Here is the call graph for this function:

◆ commitLocking() [2/3]

data::CommitResult commitLocking ( const data::Commit & commitIce)

Definition at line 266 of file MemoryToIceAdapter.cpp.

+ Here is the call graph for this function:

◆ commitLocking() [3/3]

data::CommitResult commitLocking ( const data::Commit & commitIce,
Time timeArrived )

Definition at line 229 of file MemoryToIceAdapter.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ directlyStore()

dto::DirectlyStoreResult directlyStore ( const dto::DirectlyStoreInput & directlStoreInput)

Definition at line 765 of file MemoryToIceAdapter.cpp.

+ Here is the call graph for this function:

◆ getAvailableEngines()

prediction::data::EngineSupportMap getAvailableEngines ( )

Definition at line 890 of file MemoryToIceAdapter.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getRecordStatus()

dto::RecordStatusResult getRecordStatus ( )

Definition at line 847 of file MemoryToIceAdapter.cpp.

+ Here is the caller graph for this function:

◆ getServerStructure()

armem::structure::data::GetServerStructureResult getServerStructure ( )

Definition at line 637 of file MemoryToIceAdapter.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getStatistics()

const MemoryOperationStatistics & getStatistics ( ) const
inline

Get statistics for memory operations (commits and queries)

Definition at line 169 of file MemoryToIceAdapter.h.

◆ predict()

prediction::data::PredictionResultSeq predict ( prediction::data::PredictionRequestSeq requests)

Definition at line 882 of file MemoryToIceAdapter.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ query() [1/2]

armem::query::data::Result query ( const armem::query::data::Input & input)

Definition at line 528 of file MemoryToIceAdapter.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ query() [2/2]

client::QueryResult query ( const client::QueryInput & input)

Definition at line 629 of file MemoryToIceAdapter.cpp.

+ Here is the call graph for this function:

◆ queryLTM()

armem::query::data::Result queryLTM ( const armem::query::data::Input & input,
bool storeIntoWM )

Query the LTMs of the memory server.

Stored into WM if recording mode is enabled.

Parameters
storeIntoWMif set the result is also stored into the wm, no matter the recording mode.

Definition at line 593 of file MemoryToIceAdapter.cpp.

+ Here is the call graph for this function:

◆ reloadAllFromLTM()

armem::CommitResult reloadAllFromLTM ( )

Loads all core segments and their data from the LTM.

Definition at line 668 of file MemoryToIceAdapter.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ reloadCoreSegmentsFromLTM()

armem::CommitResult reloadCoreSegmentsFromLTM ( std::list< std::string > & coreSegmentname)

Only load specific core segments and their data from the LTM.

Definition at line 688 of file MemoryToIceAdapter.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ reloadFromLTMOnStartup()

armem::CommitResult reloadFromLTMOnStartup ( )

Triggers a reload (.

See also
reloadFromLTM) only if load on startup property is set. Loads only the core segments defined in the property 'loadedCoreSegments'

Definition at line 744 of file MemoryToIceAdapter.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ reloadPropertyDefinedCoreSegmentsFromLTM()

armem::CommitResult reloadPropertyDefinedCoreSegmentsFromLTM ( )

Definition at line 719 of file MemoryToIceAdapter.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ reportDebugMetrics()

void reportDebugMetrics ( )

Report all debug metrics to the debug observer.

This should be called periodically (e.g., every second) to update the debug observer with current memory performance metrics.

Definition at line 920 of file MemoryToIceAdapter.cpp.

◆ resetStatistics()

void resetStatistics ( )
inline

Reset statistics counters.

Definition at line 172 of file MemoryToIceAdapter.h.

◆ setMemoryListener()

void setMemoryListener ( client::MemoryListenerInterfacePrx memoryListenerTopic)

Definition at line 95 of file MemoryToIceAdapter.cpp.

◆ startRecord()

dto::StartRecordResult startRecord ( const dto::StartRecordInput & startRecordInput)

Definition at line 780 of file MemoryToIceAdapter.cpp.

+ Here is the caller graph for this function:

◆ stopRecord()

dto::StopRecordResult stopRecord ( )

Definition at line 794 of file MemoryToIceAdapter.cpp.

+ Here is the caller graph for this function:

Member Data Documentation

◆ longtermMemory

server::ltm::Memory* longtermMemory

Definition at line 184 of file MemoryToIceAdapter.h.

◆ memoryListenerTopic

client::MemoryListenerInterfacePrx memoryListenerTopic

Definition at line 186 of file MemoryToIceAdapter.h.

◆ workingMemory

server::wm::Memory* workingMemory

Definition at line 183 of file MemoryToIceAdapter.h.


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