26#include <condition_variable>
31#include <ArmarXCore/interface/components/SimpleStatechartExecutorInterface.h>
32#include <ArmarXCore/interface/statechart/RemoteStateOffererIce.h>
48 "PackagesForVariantLibraries",
49 "ArmarXCore, ArmarXGui, RobotAPI",
50 "Comma-seperated list of packages that are used for loading nessecary libraries "
71 virtual public armarx::SimpleStatechartExecutorInterface
78 const Ice::Current&)
override;
80 const std::string& stateName,
81 const StateParameterMap& inputArguments,
82 const Ice::Current&)
override;
85 StatechartExecutionResult
90 const Ice::Current&)
override;
95 return "SimpleStatechartExecutor";
105 void statechartTask();
107 checkIfLibraryNeedsToBeLoaded(
const StateParameterIceBasePtr parameter)
const;
108 bool isCurrentStateIdValid()
const;
111 mutable std::mutex _finishedMutex;
112 mutable std::condition_variable _finishedCondition;
115 StatechartExecutionResult _lastResult;
116 StateParameterMap _lastOutputParameters;
120 RemoteStateOffererInterfacePrx _prx;
123 Ice::StringSeq _packages;
125 std::map<std::string, DynamicLibraryPtr> _loadedDynamicLibraries;
Default component property definition container.
ComponentPropertyDefinitions(std::string prefix, bool hasObjectNameParameter=true)
Baseclass for all ArmarX ManagedIceObjects requiring properties.
std::string prefix
Prefix of the properties such as namespace, domain, component name, etc.
PropertyDefinition< PropertyType > & defineOptionalProperty(const std::string &name, PropertyType defaultValue, const std::string &description="", PropertyDefinitionBase::PropertyConstness constness=PropertyDefinitionBase::eConstant)
IceUtil::Handle< RunningTask< T > > pointer_type
Shared pointer type for convenience.
SimpleStatechartExecutorPropertyDefinitions(std::string prefix)
This component provides interface functions to execute a statechart, stop the currently running state...
void onInitComponent() override
Pure virtual hook for the subclass.
StringVariantContainerBaseMap getSetOutputParameters(const Ice::Current &) override
bool hasExecutionFinished(const Ice::Current &) override
StateParameterMap getOutputParameters(const Ice::Current &) override
void ensureVariantLibrariesAreLoaded(const StateParameterMap &inputArguments, const Ice::Current &) override
armarx::PropertyDefinitionsPtr createPropertyDefinitions() override
bool startStatechart(const std::string &proxyName, const std::string &stateName, const StateParameterMap &inputArguments, const Ice::Current &) override
void onConnectComponent() override
Pure virtual hook for the subclass.
StatechartExecutionResult waitUntilStatechartExecutionIsFinished(const Ice::Current &) override
void preloadLibrariesFromHumanNames(const StringList &typeNames, const Ice::Current &) override
void onExitComponent() override
Hook for subclass.
std::string getDefaultName() const override
Retrieve default name of component.
void stopImmediatly(const Ice::Current &) override
This file offers overloads of toIce() and fromIce() functions for STL container types.
IceUtil::Handle< class PropertyDefinitionContainer > PropertyDefinitionsPtr
PropertyDefinitions smart pointer type.
std::shared_ptr< VariantInfo > VariantInfoPtr