ComponentPlugin.cpp
Go to the documentation of this file.
1 #include "ComponentPlugin.h"
2 
3 #include <memory>
4 
9 
17 
18 // ComponentPlugin
19 
21 {
22 
23  ComponentPlugin::ComponentPlugin(armarx::ManagedIceObject& parent, const std::string& prefix) :
24  armarx::ComponentPlugin(parent, prefix)
25  {
26  addPlugin(armemPlugin);
27  addPlugin(robotUnitPlugin);
28  }
29 
30 
32 
33  void
35  {
36  armemPlugin->postCreatePropertyDefinitions(properties);
37  robotUnitPlugin->postCreatePropertyDefinitions(properties);
38  }
39 
40  void
42  {
43  armemPlugin->preOnInitComponent();
44  robotUnitPlugin->preOnInitComponent();
45  }
46 
47  void
49  {
50  armemPlugin->preOnConnectComponent();
51  robotUnitPlugin->preOnConnectComponent();
52 
53  ARMARX_INFO << "Reader: connecting to memory";
54  configReader = memory::config::Reader(armemPlugin->getMemoryNameSystemClient());
55 
56  ARMARX_INFO << "Writer: connecting to memory";
57  configWriter = memory::config::Writer(armemPlugin->getMemoryNameSystemClient());
58  }
59 
60 
61  // ComponentPluginUser
62 
64  {
66  addPlugin(plugin);
67  }
68 
71  {
72  ARMARX_CHECK_NOT_NULL(plugin);
73  return *plugin;
74  }
75 
76 
78 
79 } // namespace armarx::control::client
Plugin.h
armarx::control::client::ComponentPluginUser::~ComponentPluginUser
~ComponentPluginUser() override
armarx::armem::client::plugins::Plugin::getMemoryNameSystemClient
MemoryNameSystem & getMemoryNameSystemClient()
Get the MNS client.
Definition: Plugin.cpp:92
MemoryID.h
ARMARX_CHECK_NOT_NULL
#define ARMARX_CHECK_NOT_NULL(ptr)
This macro evaluates whether ptr is not null and if it turns out to be false it will throw an Express...
Definition: ExpressionException.h:206
trace.h
armarx::armem::client::plugins::Plugin::preOnInitComponent
void preOnInitComponent() override
Definition: Plugin.cpp:46
armarx::control::client
This file is part of ArmarX.
Definition: ComponentPlugin.cpp:20
MemoryNameSystem.h
armarx::ManagedIceObject::addPlugin
PluginT * addPlugin(const std::string prefix="", ParamsT &&...params)
Definition: ManagedIceObject.h:182
armarx::armem::client::plugins::Plugin::preOnConnectComponent
void preOnConnectComponent() override
Definition: Plugin.cpp:58
armarx::ManagedIceObjectPlugin::addPlugin
PluginT * addPlugin(const std::string prefix="", ParamsT &&...params)
Definition: ManagedIceObjectPlugin.h:104
armarx::control::client::ComponentPlugin
Definition: ComponentPlugin.h:69
ARMARX_TRACE
#define ARMARX_TRACE
Definition: trace.h:69
armarx::control::client::ComponentPlugin::ComponentPlugin
ComponentPlugin(ManagedIceObject &parent, const std::string &prefix)
Definition: ComponentPlugin.cpp:23
armarx::control::client::ComponentPlugin::postCreatePropertyDefinitions
void postCreatePropertyDefinitions(armarx::PropertyDefinitionsPtr &properties) override
Definition: ComponentPlugin.cpp:34
armarx::control::client::ComponentPluginUser::getControlComponentPlugin
ComponentPlugin & getControlComponentPlugin()
Definition: ComponentPlugin.cpp:70
Component.h
armarx::control::client::ComponentPlugin::~ComponentPlugin
~ComponentPlugin() override
ExpressionException.h
armarx::plugins::RobotUnitComponentPlugin::postCreatePropertyDefinitions
void postCreatePropertyDefinitions(PropertyDefinitionsPtr &properties) override
Definition: RobotUnitComponentPlugin.cpp:93
armarx::ManagedIceObject
The ManagedIceObject is the base class for all ArmarX objects.
Definition: ManagedIceObject.h:163
ARMARX_INFO
#define ARMARX_INFO
Definition: Logging.h:174
armarx::plugins::RobotUnitComponentPlugin::preOnConnectComponent
void preOnConnectComponent() override
Definition: RobotUnitComponentPlugin.cpp:84
PropertyDefinitionContainer.h
IceUtil::Handle< class PropertyDefinitionContainer >
armarx::plugins::RobotUnitComponentPlugin::preOnInitComponent
void preOnInitComponent() override
Definition: RobotUnitComponentPlugin.cpp:70
PluginUser.h
armarx::control::client::ComponentPluginUser::ComponentPluginUser
ComponentPluginUser()
Definition: ComponentPlugin.cpp:63
ComponentPlugin.h
MemoryNameSystem.h
armarx::control::client::ComponentPlugin::preOnInitComponent
void preOnInitComponent() override
Definition: ComponentPlugin.cpp:41
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:28
RobotUnitComponentPlugin.h
ListeningPluginUser.h
armarx::control::client::ComponentPlugin::preOnConnectComponent
void preOnConnectComponent() override
Definition: ComponentPlugin.cpp:48
armarx::armem::client::plugins::Plugin::postCreatePropertyDefinitions
void postCreatePropertyDefinitions(PropertyDefinitionsPtr &properties) override
Definition: Plugin.cpp:26