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
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
The memory name system (MNS) client.
std::string getMemoryNameSystemName()
Get the name of the MNS component.
Definition Plugin.cpp:74
void postCreatePropertyDefinitions(PropertyDefinitionsPtr &properties) override
Definition Plugin.cpp:23
mns::MemoryNameSystemInterfacePrx getMemoryNameSystemProxy()
Get the MNS proxy.
Definition Plugin.cpp:80
bool isMemoryNameSystemEnabled()
Indicate whether the Memory Name System (MNS) is enabled.
Definition Plugin.cpp:68
MemoryNameSystem & getMemoryNameSystemClient()
Get the MNS client.
Definition Plugin.cpp:89
Plugin(ManagedIceObject &parent, std::string pre)
Definition Plugin.cpp:14
This file is part of ArmarX.
IceUtil::Handle< class PropertyDefinitionContainer > PropertyDefinitionsPtr
PropertyDefinitions smart pointer type.