36 template <
typename Type>
59 const StateIceBasePtr& nextState,
60 const StateIceBasePtr& previousState)>;
119 const std::string sourceStateName)
const;
121 const std::string sourceStateName,
122 TransitionIceBase& transition);
131 void enter(
const StringVariantContainerBaseMap& tempInputParameters =
132 StringVariantContainerBaseMap());
234 const TransitionIceBase& t,
242 const StateIceBasePtr& sourceState,
243 TransitionIceBase& resultTransition,
247 const StateIceBasePtr& sourceState,
248 const StateIceBasePtr& destinationState)
const;
272 template <
class EventType,
class StateType>
274 template <
typename ContextType>
The armarx::Profiler::Profiler class can be used for timing executions within the ArmarX framework.
The StateController class processes events and controls the statechart flow.
virtual void __notifyEventBufferedDueToUnbreakableState(bool eventBuffered=true)
void __printTransitionError(const TransitionError &transitionError, const EventPtr &event) const
virtual void __enqueueEvent(const EventPtr event)
friend class StatechartManager
std::function< void(StateController *state, const StateIceBasePtr &nextState, const StateIceBasePtr &previousState)> transitionFunction
virtual bool __getUnbreakableBufferStati() const
Before:Function to get the unbreakable-buffer status of all parent state - recursively.
std::string getTransitionID(const TransitionIceBase &t) const
virtual bool __breakActiveSubstate(const EventPtr event)
virtual void _baseOnExit()
Called by StateController::processEvent()-function or parentstate. Must NOT be called by user.
bool findTransition(const std::string &eventName, const std::string sourceStateName, TransitionIceBase &transition)
virtual void _removeInstalledConditions()
This function is implemented in StateUtil and removes all conditions that have been installed in onEn...
virtual void __finalize(const EventPtr event)
Function that gets called, when a state enters a FinalSubstate. Virtual function, so that RemoteState...
virtual void __processBufferedEvents()
Processes buffered events, that could not be processed immediately due to unbreakable substates.
void disableStateReporting(bool disable=true)
Disables the reporting to profilers for this states during state visits.
virtual void __processEvent(const EventPtr event, bool buffered=false)
Main function to control the statemachine/state.
std::unique_ptr< Impl > cimpl
bool isRunningTaskStopped() const
isRunningTaskStopped checks whether the RunningTask, that executes run() is requested to stop.
void waitForStateToFinish(int timeoutMs=-1) const
waitForStateToFinish waits until this thread has finished (i.e.
void enter(const StringVariantContainerBaseMap &tempInputParameters=StringVariantContainerBaseMap())
Function to set the statemachine in the first state and call OnEnter().
virtual unsigned int __getUnbreakableBufferSize() const
TransitionError __validateTransition(const TransitionIceBase &transition, const EventPtr event, const StateIceBasePtr &sourceState, const StateIceBasePtr &destinationState) const
void waitForRunningTaskToFinish() const
Waits until the run-function has finished.
friend class FinalStateBase
bool __findValidTransition(const EventPtr &event, const StateIceBasePtr &sourceState, TransitionIceBase &resultTransition, TransitionError &error) const
void __waitForRemoteStates() const
friend class StatechartContext
void disableRunFunction()
disableRunFunction sets useRunFunction to false and waits (blocking) for the current StateBase::run()...
virtual void _baseOnEnter()
Called by StateControllerprocessEvent()-function or parentstate.
bool __applyMappings(const StateControllerPtr &srcState, const TransitionIceBase &t, const EventPtr &event, TransitionError &error)
Apply the mappings during a transitions.
friend class StateUtility
~StateController() override
StateControllerPtr __getParentState() const
Getter function that automatically casts the parentState member of StateBase into StateControllerPtr.
void addProfilerRecursive(Profiler::ProfilerPtr profiler, int recursiveLevels=0)
addProfilerRecursive recursively adds a new armarx::Profiler::Profiler object as armarx::StateControl...
bool __checkExistenceOfTransition(const TransitionIceBase &transition)
bool isRunningTaskFinished() const
Checks whether the run() function has already finished.
std::map< std::string, transitionFunction > TransitionFunctionMap
void removeProfilerRecursive(Profiler::ProfilerPtr profiler, int recursiveLevels=0)
friend class DynamicRemoteState
virtual bool _baseOnBreak(const EventPtr evt)
Called by StateControllerprocessEvent()-function or parentstate. Must NOT be called by user.
friend class StatechartEventDistributor
friend class RemoteStateOfferer
void addTransitionFunction(const TransitionIceBase &t, transitionFunction function)
virtual void __substatesFinished(const EventPtr ev)
Function that gets called, when a state enters a FinalSubstate. Virtual function, so that RemoteState...
std::shared_ptr< Profiler > ProfilerPtr
std::set< ProfilerPtr > ProfilerSet
This file offers overloads of toIce() and fromIce() functions for STL container types.
IceInternal::Handle< Event > EventPtr
Typedef of EventPtr as IceInternal::Handle<Event> for convenience.
IceInternal::Handle< StateController > StateControllerPtr