MemoryNameSystem.cpp
Go to the documentation of this file.
1 /*
2  * This file is part of ArmarX.
3  *
4  * ArmarX is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License version 2 as
6  * published by the Free Software Foundation.
7  *
8  * ArmarX is distributed in the hope that it will be useful, but
9  * WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program. If not, see <http://www.gnu.org/licenses/>.
15  *
16  * @package RobotAPI::ArmarXObjects::MemoryNameSystem
17  * @author Rainer Kartmann ( rainer dot kartmann at kit dot edu )
18  * @date 2020
19  * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
20  * GNU General Public License
21  */
22 
23 #include "MemoryNameSystem.h"
24 
26 
27 #include <SimoxUtility/algorithm/string.h>
28 
30 
31 
32 namespace armarx::armem
33 {
34 
36  {
38 
39  return defs;
40  }
41 
42 
44  {
45  return "MemoryNameSystem";
46  }
47 
48 
49 
51  {
52  }
53 
54 
56  {
59  }
60 
61 
63  {
64  }
65 
66 
68  {
69  }
70 
71 
72  mns::dto::RegisterServerResult MemoryNameSystem::registerServer(
73  const mns::dto::RegisterServerInput& input, const Ice::Current& c)
74  {
75  mns::dto::RegisterServerResult result = PluginUser::registerServer(input, c);
76  tab.rebuild = true;
77  return result;
78  }
79 
80 
81  mns::dto::RemoveServerResult MemoryNameSystem::removeServer(
82  const mns::dto::RemoveServerInput& input, const Ice::Current& c)
83  {
84  mns::dto::RemoveServerResult result = PluginUser::removeServer(input, c);
85  tab.rebuild = true;
86  return result;
87  }
88 
89 
90 
91  // REMOTE GUI
92 
94  {
95  using namespace armarx::RemoteGui::Client;
96 
97  std::scoped_lock lock(mnsMutex);
99 
100  VBoxLayout root = {grid, VSpacer()};
101  RemoteGui_createTab(getName(), root, &tab);
102  }
103 
104 
106  {
107  if (tab.rebuild.exchange(false))
108  {
110  }
111  }
112 
113 }
armarx::armem::MemoryNameSystem::onInitComponent
void onInitComponent() override
Definition: MemoryNameSystem.cpp:50
armarx::RemoteGui::Client::VBoxLayout
Definition: Widgets.h:167
armarx::armem::MemoryNameSystem::RemoteGui_update
void RemoteGui_update() override
Definition: MemoryNameSystem.cpp:105
armarx::armem
Definition: LegacyRobotStateMemoryAdapter.cpp:31
c
constexpr T c
Definition: UnscentedKalmanFilterTest.cpp:43
MemoryNameSystem.h
armarx::RemoteGui::Client::VSpacer
Definition: Widgets.h:204
armarx::armem::MemoryNameSystem::createRemoteGuiTab
void createRemoteGuiTab()
Definition: MemoryNameSystem.cpp:93
armarx::armem::MemoryNameSystem::createPropertyDefinitions
armarx::PropertyDefinitionsPtr createPropertyDefinitions() override
Definition: MemoryNameSystem.cpp:35
armarx::armem::mns::plugins::PluginUser::mns
MemoryNameSystem & mns()
Definition: PluginUser.cpp:58
armarx::RemoteGui::Client::GridLayout
Definition: Widgets.h:186
armarx::armem::MemoryNameSystem::onConnectComponent
void onConnectComponent() override
Definition: MemoryNameSystem.cpp:55
armarx::armem::MemoryNameSystem::getDefaultName
std::string getDefaultName() const override
Definition: MemoryNameSystem.cpp:43
armarx::aron::input
ReaderT::InputType & input
Definition: rw.h:19
armarx::armem::MemoryNameSystem::onExitComponent
void onExitComponent() override
Definition: MemoryNameSystem.cpp:67
error.h
armarx::armem::mns::MemoryNameSystem::RemoteGui_buildInfoGrid
armarx::RemoteGui::Client::GridLayout RemoteGui_buildInfoGrid()
Builds a RemoteGui grid containing information about registered memories.
Definition: MemoryNameSystem.cpp:53
armarx::armem::mns::plugins::PluginUser::mnsMutex
std::mutex mnsMutex
Definition: PluginUser.h:44
armarx::armem::MemoryNameSystem::registerServer
mns::dto::RegisterServerResult registerServer(const mns::dto::RegisterServerInput &input, const Ice::Current &) override
Definition: MemoryNameSystem.cpp:72
armarx::LightweightRemoteGuiComponentPluginUser::RemoteGui_startRunningTask
void RemoteGui_startRunningTask()
Definition: LightweightRemoteGuiComponentPlugin.cpp:110
ExpressionException.h
armarx::Component::getConfigIdentifier
std::string getConfigIdentifier()
Retrieve config identifier for this component as set in constructor.
Definition: Component.cpp:74
armarx::armem::MemoryNameSystem::removeServer
mns::dto::RemoveServerResult removeServer(const mns::dto::RemoveServerInput &input, const Ice::Current &) override
Definition: MemoryNameSystem.cpp:81
armarx::ComponentPropertyDefinitions
Default component property definition container.
Definition: Component.h:70
armarx::armem::MemoryNameSystem::onDisconnectComponent
void onDisconnectComponent() override
Definition: MemoryNameSystem.cpp:62
armarx::LightweightRemoteGuiComponentPluginUser::RemoteGui_createTab
void RemoteGui_createTab(std::string const &name, RemoteGui::Client::Widget const &rootWidget, RemoteGui::Client::Tab *tab)
Definition: LightweightRemoteGuiComponentPlugin.cpp:95
IceUtil::Handle< class PropertyDefinitionContainer >
armarx::ManagedIceObject::getName
std::string getName() const
Retrieve name of object.
Definition: ManagedIceObject.cpp:107
armarx::RemoteGui::Client
Definition: EigenWidgets.cpp:8