SMACC
|
#include <smacc_state.h>
Public Member Functions | |
virtual ISmaccStateMachine & | getStateMachine ()=0 |
ISmaccState * | getParentState () |
ros::NodeHandle & | getROSNode () |
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) |
template<typename SmaccClientType > | |
void | requiresClient (SmaccClientType *&storage) |
template<typename T > | |
bool | getGlobalSMData (std::string name, T &ret) |
template<typename T > | |
void | setGlobalSMData (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< smacc::introspection::TypeInfo > &transitionTypeInfo) |
std::vector< std::shared_ptr< StateReactor > > & | getStateReactors () |
std::vector< std::shared_ptr< SmaccEventGenerator > > & | getEventGenerators () |
template<typename T > | |
bool | getParam (std::string param_name, T ¶m_storage) |
template<typename T > | |
void | setParam (std::string param_name, T param_val) |
template<typename T > | |
bool | param (std::string param_name, T ¶m_val, const T &default_val) const |
template<typename TOrthogonal > | |
TOrthogonal * | getOrthogonal () |
template<typename TEventGenerator > | |
TEventGenerator * | getEventGenerator () |
template<typename TStateReactor > | |
TStateReactor * | getStateReactor () |
Protected Attributes | |
std::vector< std::shared_ptr< StateReactor > > | stateReactors_ |
std::vector< std::shared_ptr< smacc::SmaccEventGenerator > > | eventGenerators_ |
ros::NodeHandle | nh |
ros::NodeHandle | contextNh |
ISmaccState * | parentState_ |
const smacc::introspection::SmaccStateInfo * | stateInfo_ |
Definition at line 11 of file smacc_state.h.
std::shared_ptr< TBehavior > smacc::ISmaccState::configure | ( | Args &&... | args | ) |
Definition at line 48 of file smacc_state_impl.h.
References THIS_STATE_NAME.
Referenced by smacc::SmaccState< MostDerived, Context, InnerInitial, historyMode >::configure_orthogonal(), and smacc::SmaccState< MostDerived, Context, InnerInitial, historyMode >::configure_orthogonal_runtime().
std::shared_ptr< TEventGenerator > smacc::ISmaccState::createEventGenerator | ( | TEvArgs... | args | ) |
Definition at line 120 of file smacc_state_impl.h.
References eventGenerators_.
std::shared_ptr< TStateReactor > smacc::ISmaccState::createStateReactor | ( | TEvArgs... | args | ) |
Definition at line 143 of file smacc_state_impl.h.
References stateReactors_.
std::shared_ptr< TStateReactor > smacc::ISmaccState::createStateReactor | ( | TEvArgs... | args | ) |
Definition at line 110 of file smacc_state_impl.h.
References stateReactors_.
|
virtual |
Definition at line 6 of file smacc_state.cpp.
References smacc::introspection::demangleSymbol().
Referenced by smacc::ISmaccOrthogonal::initState(), and smacc::ISmaccStateMachine::propagateEventToStateReactors().
TEventGenerator * smacc::ISmaccState::getEventGenerator |
Definition at line 168 of file smacc_state_impl.h.
References eventGenerators_.
|
inline |
Definition at line 62 of file smacc_state.h.
References eventGenerators_.
Referenced by smacc::SignalDetector::findUpdatableStateElements().
bool smacc::ISmaccState::getGlobalSMData | ( | std::string | name, |
T & | ret | ||
) |
Definition at line 95 of file smacc_state_impl.h.
References smacc::ISmaccStateMachine::getGlobalSMData(), and getStateMachine().
TOrthogonal * smacc::ISmaccState::getOrthogonal |
Definition at line 161 of file smacc_state_impl.h.
References smacc::ISmaccStateMachine::getOrthogonal(), and getStateMachine().
bool smacc::ISmaccState::getParam | ( | std::string | param_name, |
T & | param_storage | ||
) |
Definition at line 24 of file smacc_state_impl.h.
References nh.
Referenced by cl_move_base_z::CbNavigateGlobalPosition::readStartPoseFromParameterServer().
|
inline |
Definition at line 16 of file smacc_state.h.
References parentState_.
Referenced by smacc::ISmaccStateMachine::propagateEventToStateReactors().
|
inline |
|
pure virtual |
Implemented in smacc::SmaccState< MostDerived, Context, InnerInitial, historyMode >.
Referenced by getGlobalSMData(), getOrthogonal(), notifyTransitionFromTransitionTypeInfo(), postEvent(), requiresClient(), requiresComponent(), setGlobalSMData(), and smacc::StateReactor::setOutputEvent().
TStateReactor * smacc::ISmaccState::getStateReactor |
Definition at line 181 of file smacc_state_impl.h.
References stateReactors_.
|
inline |
Definition at line 60 of file smacc_state.h.
References stateReactors_.
Referenced by smacc::SignalDetector::findUpdatableStateElements(), and smacc::ISmaccStateMachine::propagateEventToStateReactors().
void smacc::ISmaccState::notifyTransition |
Definition at line 219 of file smacc_state_impl.h.
References notifyTransitionFromTransitionTypeInfo().
void smacc::ISmaccState::notifyTransitionFromTransitionTypeInfo | ( | std::shared_ptr< smacc::introspection::TypeInfo > & | transitionTypeInfo | ) |
Definition at line 11 of file smacc_state.cpp.
References getStateMachine(), smacc::ISmaccStateMachine::publishTransition(), and stateInfo_.
Referenced by notifyTransition().
bool smacc::ISmaccState::param | ( | std::string | param_name, |
T & | param_val, | ||
const T & | default_val | ||
) | const |
Definition at line 40 of file smacc_state_impl.h.
References nh.
Referenced by cl_move_base_z::CbAbsoluteRotate::onEntry(), cl_move_base_z::CbNavigateBackwards::onEntry(), cl_move_base_z::CbNavigateForward::onEntry(), and cl_move_base_z::CbRotate::onEntry().
void smacc::ISmaccState::postEvent |
Definition at line 212 of file smacc_state_impl.h.
References getStateMachine(), and smacc::ISmaccStateMachine::postEvent().
void smacc::ISmaccState::postEvent | ( | const EventType & | ev | ) |
Definition at line 206 of file smacc_state_impl.h.
References getStateMachine(), and smacc::ISmaccStateMachine::postEvent().
Referenced by smacc::SmaccEventGenerator::postEvent(), and smacc::StateReactor::postEvent().
void smacc::ISmaccState::requiresClient | ( | SmaccClientType *& | storage | ) |
Definition at line 78 of file smacc_state_impl.h.
References smacc::introspection::demangleSymbol(), smacc::ISmaccStateMachine::getOrthogonals(), and getStateMachine().
void smacc::ISmaccState::requiresComponent | ( | SmaccComponentType *& | storage | ) |
Definition at line 71 of file smacc_state_impl.h.
References getStateMachine(), and smacc::ISmaccStateMachine::requiresComponent().
void smacc::ISmaccState::setGlobalSMData | ( | std::string | name, |
T | value | ||
) |
Definition at line 103 of file smacc_state_impl.h.
References getStateMachine(), and smacc::ISmaccStateMachine::setGlobalSMData().
void smacc::ISmaccState::setParam | ( | std::string | param_name, |
T | param_val | ||
) |
Definition at line 32 of file smacc_state_impl.h.
References nh.
Referenced by smacc::SmaccState< MostDerived, Context, InnerInitial, historyMode >::entryStateInternal().
|
protected |
Definition at line 91 of file smacc_state.h.
Referenced by smacc::SmaccState< MostDerived, Context, InnerInitial, historyMode >::entryStateInternal(), and smacc::SmaccState< MostDerived, Context, InnerInitial, historyMode >::SmaccState().
|
protected |
Definition at line 87 of file smacc_state.h.
Referenced by createEventGenerator(), getEventGenerator(), and getEventGenerators().
|
protected |
Definition at line 89 of file smacc_state.h.
Referenced by smacc::SmaccState< MostDerived, Context, InnerInitial, historyMode >::entryStateInternal(), getParam(), getROSNode(), param(), and setParam().
|
protected |
Definition at line 93 of file smacc_state.h.
Referenced by getParentState(), smacc::SmaccState< MostDerived, Context, InnerInitial, historyMode >::getParentState(), and smacc::SmaccState< MostDerived, Context, InnerInitial, historyMode >::SmaccState().
|
protected |
Definition at line 95 of file smacc_state.h.
Referenced by notifyTransitionFromTransitionTypeInfo(), and smacc::SmaccState< MostDerived, Context, InnerInitial, historyMode >::SmaccState().
|
protected |
Definition at line 86 of file smacc_state.h.
Referenced by createStateReactor(), getStateReactor(), and getStateReactors().