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