Go to the documentation of this file.
29 #include "../core/application/Application.h"
30 #include "../statechart/StatechartObjectFactories.h"
31 #include "../observers/ObserverObjectFactories.h"
32 #include "../observers/exceptions/local/InvalidChannelException.h"
33 #include "../observers/variant/DatafieldRef.h"
43 defineOptionalProperty<int>(
"ProfilingDepth", -1,
"-1 to profile all hierarchy levels; any positive number to stop profiling after a certain depth in the state hierarchy");
52 setTag(
"StatechartContext");
66 void StatechartContext::onInitComponent()
90 void StatechartContext::onConnectComponent()
107 void StatechartContext::onDisconnectComponent()
112 void StatechartContext::onExitComponent()
126 observerMap[observerName] = getProxy<ObserverInterfacePrx>(observerName);
129 return observerMap[observerName]->getDataFields(identifierList);
136 observerMap[identifier->observerName] = getProxy<ObserverInterfacePrx>(identifier->observerName);
139 return observerMap[identifier->observerName]->getDataField(identifier);
144 ObserverInterfacePrx obs;
151 obs = getProxy<ObserverInterfacePrx>(observerName);
152 ObserverInterfacePrx::checkedCast(obs);
204 return selectedStatechartProfile;
210 selectedStatechartProfile =
value;
::std::vector< ::armarx::DataFieldIdentifierBasePtr > DataFieldIdentifierBaseList
VariantBasePtr getDataFromObserver(const DataFieldIdentifierBasePtr &identifier) override
virtual void onConnectStatechart()=0
onConnectStatechart is called before armarx::StatechartContext::startStatechart() and after armarx::S...
virtual void onInitStatechartContext()
onInitStatechartonInitStatechartContext can be implemented by subclasses
void setReportingTopic(std::string reportingTopic)
SystemObserverInterfacePrx systemObserverPrx
ArmarXManagerPtr getArmarXManager() const
Returns the ArmarX manager used to add and remove components.
std::string getObserverName() const
Retrieve observer name.
std::shared_ptr< class StatechartProfile > StatechartProfilePtr
ConditionHandlerInterfacePrx conditionHandlerPrx
Profiler::ProfilerPtr getProfiler() const
getProfiler returns an instance of armarx::Profiler
std::shared_ptr< LoggingStrategy > LoggingStrategyPtr
ChannelRefPtr getChannelRef(const std::string &observerName, const std::string &channelName) override
const StatechartProfilePtr & getSelectedStatechartProfile() const
std::string getChannelName() const
Retrieve channel name.
bool setToplevelState(const armarx::StatePtr &newToplevelState, StringVariantContainerBaseMap startParameters=StringVariantContainerBaseMap())
setToplevelState initializes newToplevelState with the current StatechartContext and the current Stat...
void startStatechart()
startStatechart actives both, the toplevel startchart stored in the variable statechart and the State...
static void _setStatechartContext(StatechartContext *__context)
std::string reportingTopic
StatechartEventDistributorPtr eventDistributor
The EventListenerInterface instance, that receives events from observers and redirects them to the co...
std::shared_ptr< Value > value()
std::string getDataFieldName() const
Retrieve datafield name.
const LogSender::manipulator flush
std::unordered_map< std::string, ObserverInterfacePrx > observerMap
const VariantTypeId ChannelRef
StatechartContextPropertyDefinitions(std::string prefix)
DatafieldRefPtr getDatafieldRef(const DataFieldIdentifier &datafieldIdentifier) override
virtual void onExitStatechart()
onExitStatechart can be implemented by subclasses
Profiler::ProfilerPtr stateReporter
~StatechartContext() override
const VariantTypeId DatafieldRef
PropertyDefinitionsPtr createPropertyDefinitions() override
std::string getConfigIdentifier()
Retrieve config identifier for this component as set in constructor.
StatechartManagerPtr statechartManager
Default component property definition container.
void offeringTopic(const std::string &name)
Registers a topic for retrival after initialization.
TimedVariantBaseList getDataListFromObserver(std::string observerName, const DataFieldIdentifierBaseList &identifierList) override
void setSelectedStatechartProfile(const StatechartProfilePtr &value)
virtual void onInitStatechart()=0
onInitStatechart this method is called when the statechart is started.
std::string getName() const
Retrieve name of object.
bool autoEnterToplevelState
void setTag(const LogTag &tag)
virtual void onConnectStatechartContext()
onConnectStatechartContext can be implemented by subclasses
IceUtil::Handle< class PropertyDefinitionContainer > PropertyDefinitionsPtr
PropertyDefinitions smart pointer type.
bool usingProxy(const std::string &name, const std::string &endpoints="")
Registers a proxy for retrieval after initialization and adds it to the dependency list.
This file offers overloads of toIce() and fromIce() functions for STL container types.
The StatechartContextPropertyDefinitions class contains properties associated with all statecharts.
DataFieldIdentifier provide the basis to identify data field within a distributed ArmarX scenario.
void setAutoEnterToplevelState(bool autoEnter)
setAutoStartStatechart controls whether the toplevelstate is automatically entered,...