34#include <ArmarXGui/interface/RemoteGuiInterface.h>
44 static const std::string PROPERTY_NAME =
"RemoteGuiName";
89 if (!properties->hasDefinition(PROPERTY_NAME))
91 properties->defineOptionalProperty<std::string>(
92 "RemoteGuiName",
"RemoteGuiProvider",
"Name of the remote gui provider");
104 std::string
const& name,
108 if (!
plugin->remoteGuiObject)
110 throw armarx::LocalException()
111 <<
"You tried to create a RemoteGui tab before the component was initialized.\n"
112 <<
"You can start creating tabs once you have entered your onConnectComponent().";
123 throw armarx::LocalException()
124 <<
"There is already a RunningTask which has not been stopped.";
128 runningTask->start();
129 plugin->runningTask = runningTask;
137 return !RunningTaskPtr::dynamicCast(
plugin->runningTask)->isStopped();
151 for (
auto& tab :
plugin->tabs)
153 tab.second->receiveUpdates();
156 for (
auto& tab :
plugin->tabs)
158 tab.second->sendUpdates();
160 c.waitForCycleDuration();
This util class helps with keeping a cycle time during a control cycle.
ManagedIceObject & parent()
PluginT * addPlugin(const std::string prefix="", ParamsT &&... params)
IceUtil::Handle< RunningTask< LightweightRemoteGuiComponentPluginUser > > pointer_type
This file is part of ArmarX.
This file offers overloads of toIce() and fromIce() functions for STL container types.
RunningTaskT::pointer_type RunningTaskPtr
IceUtil::Handle< class PropertyDefinitionContainer > PropertyDefinitionsPtr
PropertyDefinitions smart pointer type.
RunningTask< LightweightRemoteGuiComponentPluginUser > RunningTaskT
plugins::LightweightRemoteGuiComponentPlugin * plugin
bool RemoteGui_isRunning()
void RemoteGui_startRunningTask()
void RemoteGui_createTab(std::string const &name, RemoteGui::Client::Widget const &rootWidget, RemoteGui::Client::Tab *tab)
int RemoteGui_updatePeriodInMS
virtual void RemoteGui_update()=0
LightweightRemoteGuiComponentPluginUser()
std::unique_ptr< TabImpl > impl
void create(std::string const &name, Ice::ObjectPrx const &remoteGuiObject, Widget const &rootWidget)
void postOnDisconnectComponent() override
void preOnInitComponent() override
void preOnConnectComponent() override
void postOnConnectComponent() override
void postCreatePropertyDefinitions(PropertyDefinitionsPtr &properties) override
IceUtil::Handle< IceUtil::Shared > runningTask
Ice::ObjectPrx remoteGuiObject
void preOnDisconnectComponent() override