SMACC2
|
#include <smacc_state_base.hpp>
Classes | |
struct | my_context |
Public Types | |
typedef Context | TContext |
typedef Context::inner_context_type | context_type |
typedef context_type::state_iterator | state_iterator |
typedef InnerInitial | LastDeepState |
typedef base_type::outermost_context_base_type | outermost_context_base_type |
typedef base_type::inner_context_ptr_type | inner_context_ptr_type |
typedef base_type::context_ptr_type | context_ptr_type |
typedef base_type::inner_initial_list | inner_initial_list |
Public Member Functions | |
SmaccState ()=delete | |
SmaccState (my_context ctx) | |
virtual | ~SmaccState () |
const smacc2::introspection::SmaccStateInfo * | getStateInfo () |
std::string | getName () override |
std::string | getFullName () |
std::string | getShortName () |
virtual ISmaccState * | getParentState () |
void | exit () |
void | runtimeConfigure () |
void | onEntry () |
void | onExit () |
template<typename T > | |
bool | getGlobalSMData (std::string name, T &ret) |
template<typename T > | |
void | setGlobalSMData (std::string name, T value) |
template<typename SmaccComponentType > | |
void | requiresComponent (SmaccComponentType *&storage) |
virtual ISmaccStateMachine & | getStateMachine () |
void | checkWhileLoopConditionAndThrowEvent (bool(MostDerived::*conditionFn)()) |
void | throwSequenceFinishedEvent () |
Public Member Functions inherited from smacc2::ISmaccState | |
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 () |
Static Public Member Functions | |
template<typename TOrthogonal , typename TBehavior > | |
static void | configure_orthogonal_runtime (std::function< void(TBehavior &bh, MostDerived &)> initializationFunction) |
template<typename TOrthogonal , typename TBehavior > | |
static void | configure_orthogonal_runtime (std::function< void(TBehavior &bh)> initializationFunction) |
template<typename TOrthogonal , typename TBehavior , typename... Args> | |
static void | configure_orthogonal (Args &&... args) |
template<typename TStateReactor , typename TOutputEvent , typename TInputEventList , typename... TArgs> | |
static std::shared_ptr< smacc2::introspection::StateReactorHandler > | static_createStateReactor (TArgs... args) |
template<typename TEventGenerator , typename... TUArgs> | |
static std::shared_ptr< smacc2::introspection::EventGeneratorHandler > | static_createEventGenerator (TUArgs... args) |
template<typename TStateReactor , typename... TUArgs> | |
static std::shared_ptr< smacc2::introspection::StateReactorHandler > | static_createStateReactor_aux (TUArgs... args) |
static void | initial_deep_construct (outermost_context_base_type &outermostContextBase) |
static void | deep_construct (const context_ptr_type &pContext, outermost_context_base_type &outermostContextBase) |
static inner_context_ptr_type | shallow_construct (const context_ptr_type &pContext, outermost_context_base_type &outermostContextBase) |
Public Attributes | |
bool | finishStateThrown |
InnerInitial * | smacc_inner_type |
Private Types | |
typedef sc::simple_state< MostDerived, Context, InnerInitial, historyMode > | base_type |
Private Member Functions | |
void | entryStateInternal () |
Static Private Member Functions | |
template<typename TOrthogonal , typename TBehavior > | |
static void | configure_orthogonal_internal (std::function< void(ISmaccState *state)> initializationFunction) |
Additional Inherited Members | |
Protected Attributes inherited from smacc2::ISmaccState | |
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 39 of file smacc_state_base.hpp.
|
private |
Definition at line 42 of file smacc_state_base.hpp.
typedef base_type::context_ptr_type smacc2::SmaccState< MostDerived, Context, InnerInitial, historyMode >::context_ptr_type |
Definition at line 357 of file smacc_state_base.hpp.
typedef Context::inner_context_type smacc2::SmaccState< MostDerived, Context, InnerInitial, historyMode >::context_type |
Definition at line 46 of file smacc_state_base.hpp.
typedef base_type::inner_context_ptr_type smacc2::SmaccState< MostDerived, Context, InnerInitial, historyMode >::inner_context_ptr_type |
Definition at line 356 of file smacc_state_base.hpp.
typedef base_type::inner_initial_list smacc2::SmaccState< MostDerived, Context, InnerInitial, historyMode >::inner_initial_list |
Definition at line 358 of file smacc_state_base.hpp.
typedef InnerInitial smacc2::SmaccState< MostDerived, Context, InnerInitial, historyMode >::LastDeepState |
Definition at line 49 of file smacc_state_base.hpp.
typedef base_type::outermost_context_base_type smacc2::SmaccState< MostDerived, Context, InnerInitial, historyMode >::outermost_context_base_type |
Definition at line 355 of file smacc_state_base.hpp.
typedef context_type::state_iterator smacc2::SmaccState< MostDerived, Context, InnerInitial, historyMode >::state_iterator |
Definition at line 47 of file smacc_state_base.hpp.
typedef Context smacc2::SmaccState< MostDerived, Context, InnerInitial, historyMode >::TContext |
Definition at line 45 of file smacc_state_base.hpp.
|
delete |
|
inline |
Definition at line 65 of file smacc_state_base.hpp.
References smacc2::utils::cleanShortTypeName(), smacc2::SmaccState< MostDerived, Context, InnerInitial, historyMode >::finishStateThrown, smacc2::ISmaccState::getLogger(), smacc2::ISmaccStateMachine::getNode(), smacc2::SmaccState< MostDerived, Context, InnerInitial, historyMode >::getStateInfo(), smacc2::SmaccState< MostDerived, Context, InnerInitial, historyMode >::getStateMachine(), smacc2::ISmaccState::logger_, smacc2::ISmaccState::node_, smacc2::ISmaccState::parentState_, smacc2::SmaccState< MostDerived, Context, InnerInitial, historyMode >::my_context::pContext_, STATE_NAME, and smacc2::ISmaccState::stateInfo_.
|
inlinevirtual |
Definition at line 92 of file smacc_state_base.hpp.
|
inline |
Definition at line 330 of file smacc_state_base.hpp.
References smacc2::ISmaccState::getLogger(), and STATE_NAME.
|
inlinestatic |
Definition at line 205 of file smacc_state_base.hpp.
References smacc2::ISmaccState::configure().
|
inlinestaticprivate |
Definition at line 392 of file smacc_state_base.hpp.
References smacc2::introspection::ClientBehaviorInfoEntry::behaviorType, smacc2::utils::cleanShortTypeName(), smacc2::introspection::ClientBehaviorInfoEntry::factoryFunction, smacc2::introspection::ClientBehaviorInfoEntry::orthogonalType, and smacc2::introspection::SmaccStateInfo::staticBehaviorInfo.
|
inlinestatic |
Definition at line 192 of file smacc_state_base.hpp.
References smacc2::ISmaccState::configure().
|
inlinestatic |
Definition at line 179 of file smacc_state_base.hpp.
References smacc2::ISmaccState::configure().
|
inlinestatic |
Definition at line 366 of file smacc_state_base.hpp.
References smacc2::SmaccState< MostDerived, Context, InnerInitial, historyMode >::shallow_construct().
Referenced by smacc2::SmaccState< MostDerived, Context, InnerInitial, historyMode >::initial_deep_construct().
|
inlineprivate |
Definition at line 413 of file smacc_state_base.hpp.
References smacc2::utils::cleanShortTypeName(), smacc2::introspection::demangleSymbol(), smacc2::introspection::SmaccStateInfo::eventGeneratorsInfo, smacc2::ISmaccState::getLogger(), smacc2::ISmaccStateMachine::getOrthogonals(), smacc2::SmaccState< MostDerived, Context, InnerInitial, historyMode >::getStateMachine(), smacc2::ISmaccStateMachine::notifyOnRuntimeConfigurationFinished(), smacc2::ISmaccStateMachine::notifyOnRuntimeConfigured(), smacc2::ISmaccStateMachine::notifyOnStateEntryEnd(), smacc2::ISmaccStateMachine::notifyOnStateEntryStart(), smacc2::SmaccState< MostDerived, Context, InnerInitial, historyMode >::onEntry(), smacc2::SmaccState< MostDerived, Context, InnerInitial, historyMode >::runtimeConfigure(), smacc2_state_onRuntimeConfigure_end, smacc2_state_onRuntimeConfigure_start, STATE_NAME, smacc2::introspection::SmaccStateInfo::stateReactorsInfo, smacc2::introspection::SmaccStateInfo::staticBehaviorInfo, and TRACEPOINT().
|
inline |
Definition at line 123 of file smacc_state_base.hpp.
References smacc2::SmaccState< MostDerived, Context, InnerInitial, historyMode >::getStateMachine(), smacc2::ISmaccStateMachine::notifyOnStateExited(), smacc2::ISmaccStateMachine::notifyOnStateExitting(), smacc2_state_onExit_end, smacc2_state_onExit_start, smacc2::standardOnExit(), STATE_NAME, and TRACEPOINT().
|
inline |
Definition at line 111 of file smacc_state_base.hpp.
References smacc2::introspection::demangleSymbol().
|
inline |
Definition at line 158 of file smacc_state_base.hpp.
|
inlineoverridevirtual |
Implements smacc2::ISmaccState.
Definition at line 109 of file smacc_state_base.hpp.
References smacc2::SmaccState< MostDerived, Context, InnerInitial, historyMode >::getShortName().
|
inlinevirtual |
Definition at line 115 of file smacc_state_base.hpp.
References smacc2::ISmaccState::parentState_.
|
inline |
Definition at line 113 of file smacc_state_base.hpp.
References smacc2::utils::cleanShortTypeName().
Referenced by smacc2::SmaccState< MostDerived, Context, InnerInitial, historyMode >::getName().
|
inline |
Definition at line 94 of file smacc_state_base.hpp.
References smacc2::SmaccState< MostDerived, Context, InnerInitial, historyMode >::getStateMachine(), smacc2::ISmaccStateMachine::getStateMachineInfo(), and smacc2::introspection::SmaccStateMachineInfo::states.
Referenced by smacc2::SmaccState< MostDerived, Context, InnerInitial, historyMode >::SmaccState().
|
inlinevirtual |
Implements smacc2::ISmaccState.
Definition at line 176 of file smacc_state_base.hpp.
Referenced by smacc2::SmaccState< MostDerived, Context, InnerInitial, historyMode >::entryStateInternal(), smacc2::SmaccState< MostDerived, Context, InnerInitial, historyMode >::exit(), smacc2::SmaccState< MostDerived, Context, InnerInitial, historyMode >::getStateInfo(), and smacc2::SmaccState< MostDerived, Context, InnerInitial, historyMode >::SmaccState().
|
inlinestatic |
Definition at line 360 of file smacc_state_base.hpp.
References smacc2::SmaccState< MostDerived, Context, InnerInitial, historyMode >::deep_construct().
|
inline |
Definition at line 151 of file smacc_state_base.hpp.
Referenced by smacc2::SmaccState< MostDerived, Context, InnerInitial, historyMode >::entryStateInternal().
|
inline |
Definition at line 155 of file smacc_state_base.hpp.
|
inline |
Definition at line 171 of file smacc_state_base.hpp.
|
inline |
Definition at line 147 of file smacc_state_base.hpp.
Referenced by smacc2::SmaccState< MostDerived, Context, InnerInitial, historyMode >::entryStateInternal().
|
inline |
Definition at line 165 of file smacc_state_base.hpp.
|
inlinestatic |
Definition at line 374 of file smacc_state_base.hpp.
References smacc2_state_onEntry_end, smacc2_state_onEntry_start, STATE_NAME, and TRACEPOINT().
Referenced by smacc2::SmaccState< MostDerived, Context, InnerInitial, historyMode >::deep_construct().
|
inlinestatic |
Definition at line 271 of file smacc_state_base.hpp.
References smacc2::introspection::SmaccStateInfo::eventGeneratorsInfo.
|
inlinestatic |
Definition at line 217 of file smacc_state_base.hpp.
References smacc2::introspection::globalNh_, and smacc2::introspection::SmaccStateInfo::stateReactorsInfo.
|
inlinestatic |
Definition at line 301 of file smacc_state_base.hpp.
References smacc2::introspection::globalNh_, and smacc2::introspection::SmaccStateInfo::stateReactorsInfo.
|
inline |
Definition at line 348 of file smacc_state_base.hpp.
bool smacc2::SmaccState< MostDerived, Context, InnerInitial, historyMode >::finishStateThrown |
Definition at line 51 of file smacc_state_base.hpp.
Referenced by smacc2::SmaccState< MostDerived, Context, InnerInitial, historyMode >::SmaccState().
InnerInitial* smacc2::SmaccState< MostDerived, Context, InnerInitial, historyMode >::smacc_inner_type |
Definition at line 52 of file smacc_state_base.hpp.