59 using ComponentPlugin::ComponentPlugin;
63 unsigned long guiTaskPeriod = 10);
67 unsigned long guiTaskPeriod = 10);
71 unsigned long guiTaskPeriod = 10);
77 ARMARX_INFO <<
"create remote tab '" << name <<
"'. writing data to 0x" << &
data
78 <<
" (type: " << simox::meta::get_type_name<T>() <<
')';
86 <<
"'. writing data to 0x" << ptr
87 <<
" (type: " << simox::meta::get_type_name<T>() <<
')';
95 enable_if_auto_gui_cfg<T>
102 enable_if_auto_gui_cfg<T>
105 unsigned long guiTaskPeriod = 10)
107 ARMARX_INFO <<
"create remote tab '" << name <<
"'. writing data to 0x" << &
data
108 <<
" (type: " << simox::meta::get_type_name<T>() <<
')';
115 ARMARX_DEBUG << deactivateSpam(1) <<
"updating remote tab '" << nam
116 <<
"'. writing data to 0x" << ptr
117 <<
" (type: " << simox::meta::get_type_name<T>() <<
')';
118 prx.receiveUpdates();
119 prx.getValue(ptr->getWriteBuffer(), nam);
127 enable_if_auto_gui_cfg<T>
133 template <
class T,
class LockableT>
134 enable_if_auto_gui_cfg<T>
138 unsigned long guiTaskPeriod = 10)
140 ARMARX_INFO <<
"create remote tab '" << name <<
"'. writing data to 0x" << &
data
141 <<
" (type: " << simox::meta::get_type_name<T>() <<
')';
142 std::lock_guard lock{mutex};
149 ARMARX_DEBUG << deactivateSpam(1) <<
"updating remote tab '" << nam
150 <<
"'. writing data to 0x" << ptr
151 <<
" (type: " << simox::meta::get_type_name<T>() <<
')';
152 prx.receiveUpdates();
154 std::lock_guard<LockableT> lock{*mtx};
155 prx.getValue(ptr->getWriteBuffer(), nam);
163 template <
class T,
class LockableT>
164 enable_if_auto_gui_cfg<T>
167 unsigned long guiTaskPeriod = 10)
169 createOrUpdateTab(
"",
data, mutex, guiTaskPeriod);
174 bool hasTab(
const std::string& name =
"");
176 void removeTab(
const std::string& name =
"");
178 const RemoteGuiInterfacePrx& getRemoteGui()
const;
181 void preOnInitComponent()
override;
182 void preOnConnectComponent()
override;
183 void postOnConnectComponent()
override;
184 void postOnDisconnectComponent()
override;
195 unsigned long taskPeriod{10};
204 std::string tabName(
const std::string& name);
205 void create(
const std::string& name, TabData& td);
206 void remove(
const std::string& name, TabData& td);
210 static constexpr
auto _propertyName =
"RemoteGuiName";
211 RemoteGuiInterfacePrx _remoteGui;
212 mutable std::recursive_mutex _tabsMutex;
213 std::map<std::string, TabData> _tabs;
237 template <
class... Ts>