SMACC2
Loading...
Searching...
No Matches
smacc2::introspection::WalkStatesExecutor< InitialStateType > Struct Template Reference

#include <smacc_state_machine_info.hpp>

Collaboration diagram for smacc2::introspection::WalkStatesExecutor< InitialStateType >:
Collaboration graph

Static Public Member Functions

static void walkStates (std::shared_ptr< SmaccStateInfo > &currentState, bool rootInitialNode)
 

Detailed Description

template<typename InitialStateType>
struct smacc2::introspection::WalkStatesExecutor< InitialStateType >

Definition at line 125 of file smacc_state_machine_info.hpp.

Member Function Documentation

◆ walkStates()

template<typename InitialStateType >
void smacc2::introspection::WalkStatesExecutor< InitialStateType >::walkStates ( std::shared_ptr< SmaccStateInfo > & currentState,
bool rootInitialNode )
static

Definition at line 467 of file smacc_state_machine_info.hpp.

469{
470 //rclcpp::Duration(1).sleep();
471 auto currentname = demangledTypeName<InitialStateType>();
472
473 std::shared_ptr<SmaccStateInfo> targetState;
474
475 if (!rootInitialNode)
476 {
477 if (parentState->stateMachine_->containsState<InitialStateType>())
478 {
479 // it already exist: break;
480 return;
481 }
482
483 targetState = parentState->createChildState<InitialStateType>();
484 }
485 else
486 {
487 targetState = parentState;
488 }
489
491
492 typedef
493 typename std::remove_pointer<decltype(InitialStateType::smacc_inner_type)>::type InnerType;
494 processSubState<InnerType>(targetState);
495
496 // -------------------- REACTIONS --------------------
497 typedef typename InitialStateType::reactions reactions;
498 // RCLCPP_INFO_STREAM(getLogger(),"state machine initial state reactions: "
499 // << demangledTypeName<reactions>());
500
502}
disable_if< boost::mpl::is_sequence< T > >::type processSubState(std::shared_ptr< SmaccStateInfo > &parentState)
enable_if< boost::mpl::is_sequence< T > >::type processTransitions(std::shared_ptr< SmaccStateInfo > &sourceState)
std::enable_if< HasOnDefinition< T >::value, void >::type CallOnDefinition()
std::string demangledTypeName()

References smacc2::introspection::CallOnDefinition(), smacc2::introspection::demangledTypeName(), smacc2::introspection::processSubState(), and smacc2::introspection::processTransitions().

Referenced by smacc2::introspection::SmaccStateMachineInfo::buildStateMachineInfo(), smacc2::introspection::AddSubState::operator()(), smacc2::introspection::processSubState(), and smacc2::introspection::processTransitionAux().

Here is the call graph for this function:
Here is the caller graph for this function:

The documentation for this struct was generated from the following file: