Skip to content
Snippets Groups Projects
Commit 1fbec4be authored by Christian Dreher's avatar Christian Dreher
Browse files

feature: Register a memory listener topic and pass it to the memory adapter.

parent 3a144955
No related branches found
No related tags found
3 merge requests!102ArMem Memory Updates,!100Memory QueryBuilder,!99Memory subscriptions
......@@ -13,6 +13,13 @@ namespace armarx::armem::plugins
MemoryComponentPlugin::~MemoryComponentPlugin()
{}
void MemoryComponentPlugin::postCreatePropertyDefinitions(PropertyDefinitionsPtr& properties)
{
properties->topic(memoryListener);
}
void MemoryComponentPlugin::postOnConnectComponent()
{
MemoryComponentPluginUser& parent = this->parent<MemoryComponentPluginUser>();
......@@ -20,6 +27,7 @@ namespace armarx::armem::plugins
{
registerMemory(parent);
}
parent.iceMemory.setMemoryListener(memoryListener);
}
......
......@@ -5,6 +5,7 @@
#include <ArmarXCore/core/Component.h>
#include <RobotAPI/interface/armem/MemoryInterface.h>
#include <RobotAPI/interface/armem/MemoryListenerInterface.h>
#include <RobotAPI/interface/armem/MemoryNameSystemInterface.h>
#include "../memory/Memory.h"
......@@ -28,6 +29,8 @@ namespace armarx::armem::plugins
using MemoryNameSystemClientPlugin::MemoryNameSystemClientPlugin;
virtual ~MemoryComponentPlugin() override;
void postCreatePropertyDefinitions(PropertyDefinitionsPtr& properties) override;
void postOnConnectComponent() override;
void preOnDisconnectComponent() override;
......@@ -44,6 +47,7 @@ namespace armarx::armem::plugins
*/
data::RemoveMemoryResult removeMemory(MemoryComponentPluginUser& parent);
MemoryListenerInterfacePrx memoryListener;
};
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment