|
SMACC2
|
#include <smacc_state.hpp>


Public Member Functions | |
| ISmaccState ()=default | |
| virtual | ~ISmaccState ()=default |
| ISmaccState (const ISmaccState &)=delete | |
| ISmaccState & | operator= (const ISmaccState &)=delete |
| ISmaccState (ISmaccState &&)=delete | |
| ISmaccState & | operator= (ISmaccState &&)=delete |
| virtual ISmaccStateMachine & | getStateMachine ()=0 |
| virtual std::string | getName ()=0 |
| ISmaccState * | getParentState () |
| rclcpp::Node::SharedPtr & | getNode () |
| rclcpp::Logger | getLogger () |
| bool | initializationFailed () const |
| virtual std::string | getClassName () |
| template<typename TOrthogonal , typename TBehavior , typename... Args> | |
| std::shared_ptr< TBehavior > | configure (Args &&... args) |
| template<typename SmaccComponentType > | |
| void | requiresComponent (SmaccComponentType *&storage, ComponentRequirement requirementType=ComponentRequirement::SOFT) |
| template<typename SmaccComponentType > | |
| void | requiresComponent (const std::string &name, SmaccComponentType *&storage, ComponentRequirement requirementType=ComponentRequirement::SOFT) |
| template<typename SmaccClientType > | |
| void | requiresClient (SmaccClientType *&storage) |
| template<typename T > | |
| bool | getGlobalSMData (const std::string &name, T &ret) |
| template<typename T > | |
| void | setGlobalSMData (const std::string &name, T value) |
| template<typename TStateReactor , typename TTriggerEvent , typename TEventList , typename... TEvArgs> | |
| std::shared_ptr< TStateReactor > | createStateReactor (TEvArgs... args) |
| template<typename TStateReactor , typename... TEvArgs> | |
| std::shared_ptr< TStateReactor > | createStateReactor (TEvArgs... args) |
| template<typename TEventGenerator , typename... TEvArgs> | |
| std::shared_ptr< TEventGenerator > | createEventGenerator (TEvArgs... args) |
| template<typename EventType > | |
| void | postEvent (const EventType &ev) |
| template<typename EventType > | |
| void | postEvent () |
| template<typename TransitionType > | |
| void | notifyTransition () |
| void | notifyTransitionFromTransitionTypeInfo (std::shared_ptr< smacc2::introspection::TypeInfo > &transitionTypeInfo) |
| std::vector< std::shared_ptr< StateReactor > > & | getStateReactors () |
| std::vector< std::shared_ptr< SmaccEventGenerator > > & | getEventGenerators () |
| template<typename TOrthogonal > | |
| TOrthogonal * | getOrthogonal () |
| template<typename TOrthogonal , typename TClientBehavior > | |
| TClientBehavior * | getClientBehavior (int index=0) |
| template<typename TEventGenerator > | |
| TEventGenerator * | getEventGenerator () |
| template<typename TStateReactor > | |
| TStateReactor * | getStateReactor () |
Protected Attributes | |
| rclcpp::Node::SharedPtr | node_ |
| std::shared_ptr< rclcpp::Logger > | logger_ |
| std::vector< std::shared_ptr< StateReactor > > | stateReactors_ |
| std::vector< std::shared_ptr< smacc2::SmaccEventGenerator > > | eventGenerators_ |
| ISmaccState * | parentState_ = nullptr |
| bool | initializationFailed_ = false |
| const smacc2::introspection::SmaccStateInfo * | stateInfo_ = nullptr |
Definition at line 25 of file smacc_state.hpp.
|
default |
|
virtualdefault |
|
delete |
|
delete |
| std::shared_ptr< TBehavior > smacc2::ISmaccState::configure | ( | Args &&... | args | ) |
Definition at line 35 of file smacc_state_impl.hpp.
References smacc2::introspection::demangledTypeName(), getLogger(), smacc2::ISmaccClientBehavior::getName(), getOrthogonal(), smacc2::makeEvent(), smacc2::ISmaccClientBehavior::postEvent(), smacc2::ISmaccClientBehavior::postInitializationFailureEventFn_, and THIS_STATE_NAME.
Referenced by smacc2::SmaccState< MostDerived, Context, InnerInitial, historyMode >::configure_orthogonal(), smacc2::SmaccState< MostDerived, Context, InnerInitial, historyMode >::configure_orthogonal_runtime(), and smacc2::SmaccState< MostDerived, Context, InnerInitial, historyMode >::configure_orthogonal_runtime().


| std::shared_ptr< TEventGenerator > smacc2::ISmaccState::createEventGenerator | ( | TEvArgs... | args | ) |
Definition at line 131 of file smacc_state_impl.hpp.
References eventGenerators_.
| std::shared_ptr< TStateReactor > smacc2::ISmaccState::createStateReactor | ( | TEvArgs... | args | ) |
Definition at line 170 of file smacc_state_impl.hpp.
References stateReactors_.
| std::shared_ptr< TStateReactor > smacc2::ISmaccState::createStateReactor | ( | TEvArgs... | args | ) |
Definition at line 123 of file smacc_state_impl.hpp.
References stateReactors_.
|
virtual |
Definition at line 26 of file smacc_state.cpp.
References smacc2::introspection::demangleSymbol().
Referenced by smacc2::ISmaccClientBehavior::getTraceStateName(), smacc2::ISmaccOrthogonal::initState(), and smacc2::ISmaccStateMachine::propagateEventToStateReactors().


| TClientBehavior * smacc2::ISmaccState::getClientBehavior | ( | int | index = 0 | ) |
Definition at line 192 of file smacc_state_impl.hpp.
References smacc2::ISmaccStateMachine::getClientBehavior(), and getStateMachine().

| TEventGenerator * smacc2::ISmaccState::getEventGenerator | ( | ) |
Definition at line 198 of file smacc_state_impl.hpp.
References eventGenerators_.
|
inline |
Definition at line 106 of file smacc_state.hpp.
References eventGenerators_.
Referenced by smacc2::SignalDetector::findUpdatableStateElements().

| bool smacc2::ISmaccState::getGlobalSMData | ( | const std::string & | name, |
| T & | ret ) |
Definition at line 108 of file smacc_state_impl.hpp.
References smacc2::ISmaccStateMachine::getGlobalSMData(), and getStateMachine().

|
inline |
Definition at line 46 of file smacc_state.hpp.
References logger_.
Referenced by smacc2::SmaccState< MostDerived, Context, InnerInitial, historyMode >::checkWhileLoopConditionAndThrowEvent(), configure(), smacc2::SmaccState< MostDerived, Context, InnerInitial, historyMode >::entryStateInternal(), smacc2::SmaccState< MostDerived, Context, InnerInitial, historyMode >::exit(), smacc2::StateReactor::getLogger(), notifyTransitionFromTransitionTypeInfo(), smacc2::SmaccState< MostDerived, Context, InnerInitial, historyMode >::onInitializationFailure(), requiresClient(), and smacc2::SmaccState< MostDerived, Context, InnerInitial, historyMode >::SmaccState().

|
pure virtual |
Implemented in smacc2::SmaccState< MostDerived, Context, InnerInitial, historyMode >.
Referenced by cl_nav2z::CbAbsoluteRotate::onEntry(), cl_nav2z::CbNavigateForward::onEntry(), cl_nav2z::CbNavigateGlobalPosition::onEntry(), cl_nav2z::CbRotate::onEntry(), and cl_nav2z::CpWaypointNavigator::sendNextGoal().

|
inline |
Definition at line 44 of file smacc_state.hpp.
References node_.
Referenced by smacc2::StateReactor::getNode().

| TOrthogonal * smacc2::ISmaccState::getOrthogonal | ( | ) |
Definition at line 186 of file smacc_state_impl.hpp.
References smacc2::ISmaccStateMachine::getOrthogonal(), and getStateMachine().
Referenced by configure(), and smacc2::client_behaviors::CbSequence::then().


|
inline |
Definition at line 42 of file smacc_state.hpp.
References parentState_.
Referenced by smacc2::ISmaccStateMachine::propagateEventToStateReactors().

|
pure virtual |
Implemented in smacc2::SmaccState< MostDerived, Context, InnerInitial, historyMode >.
Referenced by getClientBehavior(), getGlobalSMData(), getOrthogonal(), notifyTransitionFromTransitionTypeInfo(), postEvent(), postEvent(), requiresClient(), requiresComponent(), requiresComponent(), setGlobalSMData(), and smacc2::StateReactor::setOutputEvent().

| TStateReactor * smacc2::ISmaccState::getStateReactor | ( | ) |
Definition at line 210 of file smacc_state_impl.hpp.
References eventGenerators_.
|
inline |
Definition at line 104 of file smacc_state.hpp.
References stateReactors_.
Referenced by smacc2::SignalDetector::findUpdatableStateElements(), and smacc2::ISmaccStateMachine::propagateEventToStateReactors().

|
inline |
Definition at line 48 of file smacc_state.hpp.
References initializationFailed_.
Referenced by smacc2::SmaccState< MostDerived, Context, InnerInitial, historyMode >::entryStateInternal().

| void smacc2::ISmaccState::notifyTransition | ( | ) |
Definition at line 237 of file smacc_state_impl.hpp.
References smacc2::introspection::TypeInfo::getTypeInfoFromType(), and notifyTransitionFromTransitionTypeInfo().

| void smacc2::ISmaccState::notifyTransitionFromTransitionTypeInfo | ( | std::shared_ptr< smacc2::introspection::TypeInfo > & | transitionTypeInfo | ) |
Definition at line 28 of file smacc_state.cpp.
References getLogger(), getStateMachine(), smacc2::ISmaccStateMachine::publishTransition(), and stateInfo_.
Referenced by notifyTransition().


|
delete |
|
delete |
| void smacc2::ISmaccState::postEvent | ( | ) |
Definition at line 230 of file smacc_state_impl.hpp.
References getStateMachine(), and smacc2::ISmaccStateMachine::postEvent().
Referenced by smacc2::SmaccState< MostDerived, Context, InnerInitial, historyMode >::checkWhileLoopConditionAndThrowEvent(), and smacc2::SmaccState< MostDerived, Context, InnerInitial, historyMode >::throwSequenceFinishedEvent().


| void smacc2::ISmaccState::postEvent | ( | const EventType & | ev | ) |
Definition at line 224 of file smacc_state_impl.hpp.
References getStateMachine(), and smacc2::ISmaccStateMachine::postEvent().
Referenced by smacc2::SmaccEventGenerator::postEvent(), smacc2::SmaccEventGenerator::postEvent(), smacc2::StateReactor::postEvent(), and smacc2::StateReactor::postEvent().


| void smacc2::ISmaccState::requiresClient | ( | SmaccClientType *& | storage | ) |
Definition at line 85 of file smacc_state_impl.hpp.
References smacc2::introspection::demangleSymbol(), getLogger(), smacc2::ISmaccStateMachine::getOrthogonals(), and getStateMachine().

| void smacc2::ISmaccState::requiresComponent | ( | const std::string & | name, |
| SmaccComponentType *& | storage, | ||
| ComponentRequirement | requirementType = ComponentRequirement::SOFT ) |
Definition at line 77 of file smacc_state_impl.hpp.
References getStateMachine(), and smacc2::ISmaccStateMachine::requiresComponent().

| void smacc2::ISmaccState::requiresComponent | ( | SmaccComponentType *& | storage, |
| ComponentRequirement | requirementType = ComponentRequirement::SOFT ) |
Definition at line 70 of file smacc_state_impl.hpp.
References getStateMachine(), and smacc2::ISmaccStateMachine::requiresComponent().

| void smacc2::ISmaccState::setGlobalSMData | ( | const std::string & | name, |
| T | value ) |
Definition at line 116 of file smacc_state_impl.hpp.
References getStateMachine(), and smacc2::ISmaccStateMachine::setGlobalSMData().

|
protected |
Definition at line 130 of file smacc_state.hpp.
Referenced by createEventGenerator(), getEventGenerator(), getEventGenerators(), and getStateReactor().
|
protected |
Definition at line 135 of file smacc_state.hpp.
Referenced by smacc2::SmaccState< MostDerived, Context, InnerInitial, historyMode >::entryStateInternal(), smacc2::SmaccState< MostDerived, Context, InnerInitial, historyMode >::exit(), initializationFailed(), and smacc2::SmaccState< MostDerived, Context, InnerInitial, historyMode >::onInitializationFailure().
|
protected |
Definition at line 128 of file smacc_state.hpp.
Referenced by getLogger(), and smacc2::SmaccState< MostDerived, Context, InnerInitial, historyMode >::SmaccState().
|
protected |
Definition at line 127 of file smacc_state.hpp.
Referenced by getNode(), and smacc2::SmaccState< MostDerived, Context, InnerInitial, historyMode >::SmaccState().
|
protected |
Definition at line 132 of file smacc_state.hpp.
Referenced by smacc2::SmaccState< MostDerived, Context, InnerInitial, historyMode >::entryStateInternal(), getParentState(), smacc2::SmaccState< MostDerived, Context, InnerInitial, historyMode >::getParentState(), and smacc2::SmaccState< MostDerived, Context, InnerInitial, historyMode >::SmaccState().
|
protected |
Definition at line 137 of file smacc_state.hpp.
Referenced by notifyTransitionFromTransitionTypeInfo(), and smacc2::SmaccState< MostDerived, Context, InnerInitial, historyMode >::SmaccState().
|
protected |
Definition at line 129 of file smacc_state.hpp.
Referenced by createStateReactor(), and getStateReactors().