SMACC2
|
#include <smacc_state.hpp>
Public Member Functions | |
virtual ISmaccStateMachine & | getStateMachine ()=0 |
virtual std::string | getName ()=0 |
ISmaccState * | getParentState () |
rclcpp::Node::SharedPtr & | getNode () |
rclcpp::Logger | getLogger () |
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< 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 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_ |
const smacc2::introspection::SmaccStateInfo * | stateInfo_ |
Definition at line 25 of file smacc_state.hpp.
std::shared_ptr< TBehavior > smacc2::ISmaccState::configure | ( | Args &&... | args | ) |
Definition at line 39 of file smacc_state_impl.hpp.
References getLogger(), and THIS_STATE_NAME.
Referenced by smacc2::SmaccState< MostDerived, Context, InnerInitial, historyMode >::configure_orthogonal(), and smacc2::SmaccState< MostDerived, Context, InnerInitial, historyMode >::configure_orthogonal_runtime().
std::shared_ptr< TEventGenerator > smacc2::ISmaccState::createEventGenerator | ( | TEvArgs... | args | ) |
Definition at line 117 of file smacc_state_impl.hpp.
References eventGenerators_.
std::shared_ptr< TStateReactor > smacc2::ISmaccState::createStateReactor | ( | TEvArgs... | args | ) |
Definition at line 156 of file smacc_state_impl.hpp.
References stateReactors_.
std::shared_ptr< TStateReactor > smacc2::ISmaccState::createStateReactor | ( | TEvArgs... | args | ) |
Definition at line 107 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::ISmaccOrthogonal::initState(), and smacc2::ISmaccStateMachine::propagateEventToStateReactors().
TEventGenerator * smacc2::ISmaccState::getEventGenerator |
Definition at line 178 of file smacc_state_impl.hpp.
References eventGenerators_.
|
inline |
Definition at line 82 of file smacc_state.hpp.
References eventGenerators_.
Referenced by smacc2::SignalDetector::findUpdatableStateElements().
bool smacc2::ISmaccState::getGlobalSMData | ( | std::string | name, |
T & | ret | ||
) |
Definition at line 92 of file smacc_state_impl.hpp.
References smacc2::ISmaccStateMachine::getGlobalSMData(), and getStateMachine().
|
inline |
Definition at line 36 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::StateReactor::getLogger(), notifyTransitionFromTransitionTypeInfo(), requiresClient(), and smacc2::SmaccState< MostDerived, Context, InnerInitial, historyMode >::SmaccState().
|
pure virtual |
|
inline |
Definition at line 34 of file smacc_state.hpp.
References node_.
Referenced by smacc2::StateReactor::getNode().
TOrthogonal * smacc2::ISmaccState::getOrthogonal |
Definition at line 172 of file smacc_state_impl.hpp.
References smacc2::ISmaccStateMachine::getOrthogonal(), and getStateMachine().
|
inline |
Definition at line 32 of file smacc_state.hpp.
References parentState_.
Referenced by smacc2::ISmaccStateMachine::propagateEventToStateReactors().
|
pure virtual |
Implemented in smacc2::SmaccState< MostDerived, Context, InnerInitial, historyMode >.
Referenced by getGlobalSMData(), getOrthogonal(), notifyTransitionFromTransitionTypeInfo(), postEvent(), requiresClient(), requiresComponent(), setGlobalSMData(), and smacc2::StateReactor::setOutputEvent().
TStateReactor * smacc2::ISmaccState::getStateReactor |
Definition at line 190 of file smacc_state_impl.hpp.
References eventGenerators_.
|
inline |
Definition at line 80 of file smacc_state.hpp.
References stateReactors_.
Referenced by smacc2::SignalDetector::findUpdatableStateElements(), and smacc2::ISmaccStateMachine::propagateEventToStateReactors().
void smacc2::ISmaccState::notifyTransition |
Definition at line 227 of file smacc_state_impl.hpp.
References 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().
void smacc2::ISmaccState::postEvent |
Definition at line 220 of file smacc_state_impl.hpp.
References getStateMachine(), and smacc2::ISmaccStateMachine::postEvent().
void smacc2::ISmaccState::postEvent | ( | const EventType & | ev | ) |
Definition at line 214 of file smacc_state_impl.hpp.
References getStateMachine(), and smacc2::ISmaccStateMachine::postEvent().
Referenced by smacc2::SmaccEventGenerator::postEvent(), and smacc2::StateReactor::postEvent().
void smacc2::ISmaccState::requiresClient | ( | SmaccClientType *& | storage | ) |
Definition at line 72 of file smacc_state_impl.hpp.
References smacc2::introspection::demangleSymbol(), getLogger(), smacc2::ISmaccStateMachine::getOrthogonals(), and getStateMachine().
void smacc2::ISmaccState::requiresComponent | ( | SmaccComponentType *& | storage | ) |
Definition at line 65 of file smacc_state_impl.hpp.
References getStateMachine(), and smacc2::ISmaccStateMachine::requiresComponent().
void smacc2::ISmaccState::setGlobalSMData | ( | std::string | name, |
T | value | ||
) |
Definition at line 100 of file smacc_state_impl.hpp.
References getStateMachine(), and smacc2::ISmaccStateMachine::setGlobalSMData().
|
protected |
Definition at line 100 of file smacc_state.hpp.
Referenced by createEventGenerator(), getEventGenerator(), getEventGenerators(), and getStateReactor().
|
protected |
Definition at line 98 of file smacc_state.hpp.
Referenced by getLogger(), and smacc2::SmaccState< MostDerived, Context, InnerInitial, historyMode >::SmaccState().
|
protected |
Definition at line 97 of file smacc_state.hpp.
Referenced by getNode(), and smacc2::SmaccState< MostDerived, Context, InnerInitial, historyMode >::SmaccState().
|
protected |
Definition at line 102 of file smacc_state.hpp.
Referenced by getParentState(), smacc2::SmaccState< MostDerived, Context, InnerInitial, historyMode >::getParentState(), and smacc2::SmaccState< MostDerived, Context, InnerInitial, historyMode >::SmaccState().
|
protected |
Definition at line 104 of file smacc_state.hpp.
Referenced by notifyTransitionFromTransitionTypeInfo(), and smacc2::SmaccState< MostDerived, Context, InnerInitial, historyMode >::SmaccState().
|
protected |
Definition at line 99 of file smacc_state.hpp.
Referenced by createStateReactor(), and getStateReactors().