SMACC2
Loading...
Searching...
No Matches
Static Public Member Functions | List of all members
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 427 of file smacc_state_machine_info.hpp.

429{
430 //rclcpp::Duration(1).sleep();
431 auto currentname = demangledTypeName<InitialStateType>();
432
433 std::shared_ptr<SmaccStateInfo> targetState;
434
435 if (!rootInitialNode)
436 {
437 if (parentState->stateMachine_->containsState<InitialStateType>())
438 {
439 // it already exist: break;
440 return;
441 }
442
443 targetState = parentState->createChildState<InitialStateType>();
444 }
445 else
446 {
447 targetState = parentState;
448 }
449
450 CallOnDefinition<InitialStateType>();
451
452 typedef
453 typename std::remove_pointer<decltype(InitialStateType::smacc_inner_type)>::type InnerType;
454 processSubState<InnerType>(targetState);
455
456 // -------------------- REACTIONS --------------------
457 typedef typename InitialStateType::reactions reactions;
458 // RCLCPP_INFO_STREAM(getLogger(),"state machine initial state reactions: "
459 // << demangledTypeName<reactions>());
460
461 processTransitions<reactions>(targetState);
462}

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

Here is the caller graph for this function:

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