59 using ComponentPlugin::ComponentPlugin;
63 unsigned long guiTaskPeriod = 10);
65 const RemoteGui::WidgetPtr& widget,
67 unsigned long guiTaskPeriod = 10);
70 const RemoteGui::WidgetPtr& widget,
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>() <<
')';
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);
133 template <
class T,
class LockableT>
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)
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;
194 RemoteGui::WidgetPtr widget;
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>
SpamFilterDataPtr deactivateSpam(SpamFilterDataPtr const &spamFilter, float deactivationDurationSec, const std::string &identifier, bool deactivate)
ManagedIceObject(ManagedIceObject const &other)
IceUtil::Handle< PeriodicTask< T > > pointer_type
Shared pointer type for convenience.
RemoteGuiComponentPluginUser()
bool hasRemoteGuiTab(const std::string &name="")
void removeRemoteGuiTab(const std::string &name="")
void createOrUpdateRemoteGuiTab(Ts &&... ts)
const armarx::plugins::RemoteGuiComponentPlugin & getRemoteGuiPlugin() const
RemoteGuiComponentPlugin::TabTask RemoteGuiTabTask
RemoteGui::TabProxy & getRemoteGuiTab(const std::string &name="")
const RemoteGuiInterfacePrx & getRemoteGui() const
armarx::plugins::RemoteGuiComponentPlugin RemoteGuiComponentPlugin
ValueProxy< T > getValue(std::string const &name)
Same as the TripleBuffer, but partial writes of the data structure are ok. The write operation may be...
enable_if_auto_gui_cfg< T > createOrUpdateTab(const std::string &name, WriteBufferedTripleBuffer< T > &data, LockableT &mutex, unsigned long guiTaskPeriod=10)
enable_if_auto_gui_cfg< T > createOrUpdateTab(WriteBufferedTripleBuffer< T > &data, unsigned long guiTaskPeriod=10)
std::enable_if_t< meta::cfg::gui_definition_create< T >::value > enable_if_auto_gui_cfg
std::function< void(RemoteGui::TabProxy &)> TabTask
void createOrUpdateTab(const RemoteGui::WidgetPtr &widget, TabTask guiTaskFnc, unsigned long guiTaskPeriod=10)
enable_if_auto_gui_cfg< T > createOrUpdateTab(const std::string &name, WriteBufferedTripleBuffer< T > &data, unsigned long guiTaskPeriod=10)
enable_if_auto_gui_cfg< T > createOrUpdateTab(WriteBufferedTripleBuffer< T > &data, LockableT &mutex, unsigned long guiTaskPeriod=10)
enable_if_auto_gui_cfg< T > createOrUpdateTab(T &data, unsigned long guiTaskPeriod=10)
enable_if_auto_gui_cfg< T > createOrUpdateTab(const std::string &name, T &data, unsigned long guiTaskPeriod=10)
#define ARMARX_INFO
The normal logging level.
#define ARMARX_DEBUG
The logging level for output that is only interesting while debugging.
RemoteGui::WidgetPtr MakeGuiConfig(const std::string &name, const T &val)
This file is part of ArmarX.
This file offers overloads of toIce() and fromIce() functions for STL container types.
IceUtil::Handle< class PropertyDefinitionContainer > PropertyDefinitionsPtr
PropertyDefinitions smart pointer type.