Go to the documentation of this file.
34 class StateController;
36 template <
typename Type>
117 std::string
getTransitionID(
const std::string& eventName,
const std::string sourceStateName)
const;
118 bool findTransition(
const std::string& eventName,
const std::string sourceStateName, TransitionIceBase& transition);
127 void enter(
const StringVariantContainerBaseMap& tempInputParameters = StringVariantContainerBaseMap());
174 std::unique_ptr<Impl>
cimpl;
TransitionError __validateTransition(const TransitionIceBase &transition, const EventPtr event, const StateIceBasePtr &sourceState, const StateIceBasePtr &destinationState) const
virtual void __processEvent(const EventPtr event, bool buffered=false)
Main function to control the statemachine/state.
StateControllerPtr __getParentState() const
Getter function that automatically casts the parentState member of StateBase into StateControllerPtr.
bool findTransition(const std::string &eventName, const std::string sourceStateName, TransitionIceBase &transition)
virtual void __enqueueEvent(const EventPtr event)
std::function< void(StateController *state, const StateIceBasePtr &nextState, const StateIceBasePtr &previousState)> transitionFunction
std::map< std::string, transitionFunction > TransitionFunctionMap
void disableStateReporting(bool disable=true)
Disables the reporting to profilers for this states during state visits.
bool isRunningTaskFinished() const
Checks whether the run() function has already finished.
std::set< ProfilerPtr > ProfilerSet
virtual bool _baseOnBreak(const EventPtr evt)
Called by StateControllerprocessEvent()-function or parentstate. Must NOT be called by user.
virtual void _baseOnExit()
Called by StateController::processEvent()-function or parentstate. Must NOT be called by user.
void __printTransitionError(const TransitionError &transitionError, const EventPtr &event) const
bool __checkExistenceOfTransition(const TransitionIceBase &transition)
void disableRunFunction()
disableRunFunction sets useRunFunction to false and waits (blocking) for the current StateBase::run()...
virtual void __substatesFinished(const EventPtr ev)
Function that gets called, when a state enters a FinalSubstate. Virtual function, so that RemoteState...
Class that holds states, which offer functionality for other states over Ice.
std::string getTransitionID(const TransitionIceBase &t) const
virtual bool __breakActiveSubstate(const EventPtr event)
bool isRunningTaskStopped() const
isRunningTaskStopped checks whether the RunningTask, that executes run() is requested to stop.
This class contains a statechart and provides the interfaces to distributed components.
void __waitForRemoteStates() const
void addTransitionFunction(const TransitionIceBase &t, transitionFunction function)
This Statetype is used to create a state instance that represents a state that is located in another ...
DynamicRemoteStates can be used to connect to remote statecharts dynamically at runtime.
void removeProfilerRecursive(Profiler::ProfilerPtr profiler, int recursiveLevels=0)
bool __findValidTransition(const EventPtr &event, const StateIceBasePtr &sourceState, TransitionIceBase &resultTransition, TransitionError &error) const
bool __applyMappings(const StateControllerPtr &srcState, const TransitionIceBase &t, const EventPtr &event, TransitionError &error)
Apply the mappings during a transitions.
~StateController() override
Vertex source(const detail::edge_base< Directed, Vertex > &e, const PCG &)
std::unique_ptr< Impl > cimpl
virtual bool __getUnbreakableBufferStati() const
Before:Function to get the unbreakable-buffer status of all parent state - recursively.
virtual void __processBufferedEvents()
Processes buffered events, that could not be processed immediately due to unbreakable substates.
virtual void __finalize(const EventPtr event)
Function that gets called, when a state enters a FinalSubstate. Virtual function, so that RemoteState...
virtual void _removeInstalledConditions()
This function is implemented in StateUtil and removes all conditions that have been installed in onEn...
void enter(const StringVariantContainerBaseMap &tempInputParameters=StringVariantContainerBaseMap())
Function to set the statemachine in the first state and call OnEnter().
std::shared_ptr< Profiler > ProfilerPtr
void waitForRunningTaskToFinish() const
Waits until the run-function has finished.
void addProfilerRecursive(Profiler::ProfilerPtr profiler, int recursiveLevels=0)
addProfilerRecursive recursively adds a new armarx::Profiler::Profiler object as armarx::StateControl...
The StatechartEventDistributor class is used to distribute incomming events (via Ice) to the correct ...
virtual unsigned int __getUnbreakableBufferSize() const
IceInternal::Handle< StateController > StateControllerPtr
virtual void __notifyEventBufferedDueToUnbreakableState(bool eventBuffered=true)
This file offers overloads of toIce() and fromIce() functions for STL container types.
virtual void _baseOnEnter()
Called by StateControllerprocessEvent()-function or parentstate.
void waitForStateToFinish(int timeoutMs=-1) const
waitForStateToFinish waits until this thread has finished (i.e.