48 std::string contextString;
50 bool checkEventIsHandled(
const EventPtr& event)
const;
61 template <
class EventClass>
65 EventPtr event =
new EventClass(this->stateName);
71 const std::string& eventName,
72 const StringVariantContainerBaseMap& properties = StringVariantContainerBaseMap());
86 template <
class Event
class>
105 template <
class Event
class>
106 ActionEventIdentifier
112 ActionEventIdentifier
115 template <
class Event
class>
116 ActionEventIdentifier
134 template <
class Event>
153 std::vector<ConditionIdentifier> __installedConditionIdentifiers;
154 std::vector<ChannelRefBasePtr> __installedTimerChannelRefs;
155 std::vector<ChannelRefBasePtr> __installedCounterChannelRefs;
157 void _removeInstalledConditions()
override;
The ChannelRef class is a reference to a channel on an Observer.
friend class StateUtility
ConditionIdentifier installCondition(const Term &condition, const std::string &desc="")
Utility function to install a condition on the distributed conditionhandler.
ActionEventIdentifier setCounterEvent(int counterThreshold, int initialValue=0)
void removeCondition(ConditionIdentifier conditionId)
Utility function to remove an installed condition on the distributed conditionhandler.
void removeCounterEvent(const ActionEventIdentifier &id)
void removeTimeoutEvent(const ActionEventIdentifier &id)
ActionEventIdentifier setTimeoutEvent(int timeoutDurationMs, const EventPtr &evt)
Utility function to start a timer on the systemObserver and register an event on the conditionHandler...
EventPtr createEvent()
Utility function to create a new Event.
void sendEvent(StateBasePtr eventProcessor=nullptr)
ActionEventIdentifier setCounterEvent(int counterThreshold, const EventPtr &evt, int initialValue=0)
ActionEventIdentifier setTimeoutEvent(int timeoutDurationMs)
ConditionIdentifier installCondition(const Term &condition, const EventPtr evt, const std::string &desc="")
Utility function to install a condition on the distributed conditionhandler.
void sendEvent(const EventPtr event, StateBasePtr eventProcessor=nullptr)
Function to send an event to a specific state from an onEnter()-function. Must not be called anywhere...
This class contains a statechart and provides the interfaces to distributed components.
Terms are part of the user front end of the ArmarX condition mechanism.
This file offers overloads of toIce() and fromIce() functions for STL container types.
IceInternal::Handle< StatechartContext > StatechartContextPtr
IceInternal::Handle< ChannelRef > ChannelRefPtr
IceInternal::Handle< Event > EventPtr
Typedef of EventPtr as IceInternal::Handle<Event> for convenience.
IceInternal::Handle< StateBase > StateBasePtr
Struct for the return value of setCounter/TimerEvent.
ChannelRefBasePtr actionId
ConditionIdentifier conditionId