Plugin.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <RobotAPI/interface/armem/mns/MemoryNameSystemInterface.h>
5 
7 
8 #include <string>
9 
10 
12 {
13 
14  /**
15  * @brief A component plugin offering client-side access to to the
16  * working memory system by providing a Memory Name System (MNS) client.
17  *
18  * @see MemoryNameSystem
19  */
20  class Plugin :
22  {
23  public:
24 
25  Plugin(ManagedIceObject& parent, std::string pre);
26  virtual ~Plugin() override;
27 
28 
29  void postCreatePropertyDefinitions(PropertyDefinitionsPtr& properties) override;
30 
31  void preOnInitComponent() override;
32  void preOnConnectComponent() override;
33 
34 
35  public:
36 
37  /**
38  * @brief Get the MNS client.
39  *
40  * Only valid when enabled.
41  */
44 
45 
46  /**
47  * @brief Indicate whether the Memory Name System (MNS) is enabled.
48  */
50 
51  /**
52  * @brief Get the name of the MNS component.
53  */
54  std::string getMemoryNameSystemName();
55 
56  /**
57  * @brief Get the MNS proxy.
58  * @return The MNS proxy when MNS is enabled, nullptr when MNS is disabled.
59  */
60  mns::MemoryNameSystemInterfacePrx getMemoryNameSystemProxy();
61 
62 
63  private:
64 
65  /// The MNS client.
66  MemoryNameSystem memoryNameSystem;
67 
68  bool memoryNameSystemEnabled = true;
69  std::string memoryNameSystemName = "MemoryNameSystem";
70 
71 
72  static constexpr const char* PROPERTY_MNS_ENABLED_NAME = "mns.MemoryNameSystemEnabled";
73  static constexpr const char* PROPERTY_MNS_NAME_NAME = "mns.MemoryNameSystemName";
74 
75  };
76 
77 }
armarx::armem::client::plugins::Plugin::getMemoryNameSystemName
std::string getMemoryNameSystemName()
Get the name of the MNS component.
Definition: Plugin.cpp:76
armarx::armem::client::plugins::Plugin::isMemoryNameSystemEnabled
bool isMemoryNameSystemEnabled()
Indicate whether the Memory Name System (MNS) is enabled.
Definition: Plugin.cpp:69
armarx::armem::client::plugins::Plugin::getMemoryNameSystemClient
MemoryNameSystem & getMemoryNameSystemClient()
Get the MNS client.
Definition: Plugin.cpp:92
armarx::ManagedIceObjectPlugin::parent
ManagedIceObject & parent()
Definition: ManagedIceObjectPlugin.cpp:69
armarx::armem::client::plugins::Plugin::getMemoryNameSystemProxy
mns::MemoryNameSystemInterfacePrx getMemoryNameSystemProxy()
Get the MNS proxy.
Definition: Plugin.cpp:83
armarx::armem::client::plugins::Plugin::preOnInitComponent
void preOnInitComponent() override
Definition: Plugin.cpp:46
armarx::armem::client::plugins::Plugin::preOnConnectComponent
void preOnConnectComponent() override
Definition: Plugin.cpp:58
armarx::ComponentPlugin
Definition: ComponentPlugin.h:38
armarx::armem::client::plugins::Plugin::Plugin
Plugin(ManagedIceObject &parent, std::string pre)
Definition: Plugin.cpp:15
armarx::ManagedIceObject
The ManagedIceObject is the base class for all ArmarX objects.
Definition: ManagedIceObject.h:163
IceUtil::Handle< class PropertyDefinitionContainer >
armarx::armem::client::plugins
This file is part of ArmarX.
Definition: forward_declarations.h:24
armarx::armem::client::MemoryNameSystem
The memory name system (MNS) client.
Definition: MemoryNameSystem.h:69
ComponentPlugin.h
MemoryNameSystem.h
armarx::armem::client::plugins::Plugin::~Plugin
virtual ~Plugin() override
Definition: Plugin.cpp:22
armarx::armem::client::plugins::Plugin
A component plugin offering client-side access to to the working memory system by providing a Memory ...
Definition: Plugin.h:20
armarx::armem::client::plugins::Plugin::postCreatePropertyDefinitions
void postCreatePropertyDefinitions(PropertyDefinitionsPtr &properties) override
Definition: Plugin.cpp:26