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 MemoryOperationStatistics & getStatistics () const
 Get statistics for memory operations (commits and queries)
 
 MemoryToIceAdapter (server::wm::Memory *workingMemory, server::ltm::Memory *longtermMemory)
 Construct a 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::Memory * longtermMemory
 
client::MemoryListenerInterfacePrx memoryListenerTopic
 
server::wm::Memory * workingMemory
 

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

Constructor & Destructor Documentation

◆ MemoryToIceAdapter()

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

Construct a MemoryToIceAdapter from an existing Memory.

Both pointers are non-owning and must be non-null: the commit and query paths dereference them unconditionally. This is checked in the constructor.

Member Function Documentation

◆ addSegment()

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

◆ addSegments()

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

◆ commit() [1/3]

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

◆ commit() [2/3]

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

◆ commit() [3/3]

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

◆ commitLocking() [1/3]

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

◆ commitLocking() [2/3]

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

◆ commitLocking() [3/3]

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

◆ directlyStore()

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

◆ getAvailableEngines()

prediction::data::EngineSupportMap getAvailableEngines ( )

◆ getRecordStatus()

dto::RecordStatusResult getRecordStatus ( )

◆ getServerStructure()

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

◆ getStatistics()

const MemoryOperationStatistics & getStatistics ( ) const
inline

Get statistics for memory operations (commits and queries)

◆ predict()

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

◆ query() [1/2]

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

◆ query() [2/2]

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

◆ 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.

◆ reloadAllFromLTM()

armem::CommitResult reloadAllFromLTM ( )

Loads all core segments and their data from the LTM.

◆ reloadCoreSegmentsFromLTM()

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

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

◆ 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'

◆ reloadPropertyDefinedCoreSegmentsFromLTM()

armem::CommitResult reloadPropertyDefinedCoreSegmentsFromLTM ( )

◆ 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.

◆ resetStatistics()

void resetStatistics ( )
inline

Reset statistics counters.

◆ setMemoryListener()

void setMemoryListener ( client::MemoryListenerInterfacePrx memoryListenerTopic)

◆ startRecord()

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

◆ stopRecord()

dto::StopRecordResult stopRecord ( )

Member Data Documentation

◆ longtermMemory

server::ltm::Memory* longtermMemory

◆ memoryListenerTopic

client::MemoryListenerInterfacePrx memoryListenerTopic

◆ workingMemory

server::wm::Memory* workingMemory

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