61 using ComponentPlugin::ComponentPlugin;
65 unsigned long guiTaskPeriod = 10);
69 unsigned long guiTaskPeriod = 10);
73 unsigned long guiTaskPeriod = 10);
78 const std::string& name,
80 unsigned long guiTaskPeriod = 10)
83 <<
"'. writing data to 0x" << &
data <<
" (type: "
84 << simox::meta::get_type_name<T>() <<
')';
92 <<
"updating remote tab '" << nam
93 <<
"'. writing data to 0x" << ptr <<
" (type: "
94 << simox::meta::get_type_name<T>() <<
')';
102 enable_if_auto_gui_cfg<T>
104 unsigned long guiTaskPeriod = 10)
110 enable_if_auto_gui_cfg<T>
112 const std::string& name,
114 unsigned long guiTaskPeriod = 10)
117 <<
"'. writing data to 0x" << &
data <<
" (type: "
118 << simox::meta::get_type_name<T>() <<
')';
125 ARMARX_DEBUG << deactivateSpam(1)
126 <<
"updating remote tab '" << nam
127 <<
"'. writing data to 0x" << ptr <<
" (type: "
128 << simox::meta::get_type_name<T>() <<
')';
129 prx.receiveUpdates();
130 prx.getValue(ptr->getWriteBuffer(), nam);
138 enable_if_auto_gui_cfg<T>
141 unsigned long guiTaskPeriod = 10)
146 template<
class T,
class LockableT>
147 enable_if_auto_gui_cfg<T>
149 const std::string& name,
152 unsigned long guiTaskPeriod = 10)
155 <<
"'. writing data to 0x" << &
data <<
" (type: "
156 << simox::meta::get_type_name<T>() <<
')';
157 std::lock_guard lock{mutex};
164 ARMARX_DEBUG << deactivateSpam(1)
165 <<
"updating remote tab '" << nam
166 <<
"'. writing data to 0x" << ptr <<
" (type: "
167 << simox::meta::get_type_name<T>() <<
')';
168 prx.receiveUpdates();
170 std::lock_guard<LockableT> lock{*mtx};
171 prx.getValue(ptr->getWriteBuffer(), nam);
179 template<
class T,
class LockableT>
180 enable_if_auto_gui_cfg<T>
184 unsigned long guiTaskPeriod = 10)
186 createOrUpdateTab(
"",
data, mutex, guiTaskPeriod);
193 bool hasTab(
const std::string& name =
"");
195 void removeTab(
const std::string& name =
"");
197 const RemoteGuiInterfacePrx& getRemoteGui()
const;
199 void preOnInitComponent()
override;
200 void preOnConnectComponent()
override;
201 void postOnConnectComponent()
override;
202 void postOnDisconnectComponent()
override;
213 unsigned long taskPeriod{10};
222 std::string tabName(
const std::string& name);
223 void create(
const std::string& name, TabData& td);
224 void remove(
const std::string& name, TabData& td);
228 static constexpr
auto _propertyName =
"RemoteGuiName";
229 RemoteGuiInterfacePrx _remoteGui;
230 mutable std::recursive_mutex _tabsMutex;
231 std::map<std::string, TabData> _tabs;