SMACC
Loading...
Searching...
No Matches
Static Public Member Functions | List of all members
smacc::introspection::WalkStatesExecutor< InitialStateType > Struct Template Reference

#include <smacc_state_machine_info.h>

Collaboration diagram for smacc::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 smacc::introspection::WalkStatesExecutor< InitialStateType >

Definition at line 95 of file smacc_state_machine_info.h.

Member Function Documentation

◆ walkStates()

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

Definition at line 367 of file smacc_state_machine_info.h.

368{
369 //ros::Duration(1).sleep();
370 auto currentname = demangledTypeName<InitialStateType>();
371
372 std::shared_ptr<SmaccStateInfo> targetState;
373
374 if (!rootInitialNode)
375 {
376 if (parentState->stateMachine_->containsState<InitialStateType>())
377 {
378 // it already exist: break;
379 return;
380 }
381
382 targetState = parentState->createChildState<InitialStateType>();
383 }
384 else
385 {
386 targetState = parentState;
387 }
388
389 CallOnDefinition<InitialStateType>();
390
391 typedef typename std::remove_pointer<decltype(InitialStateType::smacc_inner_type)>::type InnerType;
392 processSubState<InnerType>(targetState);
393
394 // -------------------- REACTIONS --------------------
395 typedef typename InitialStateType::reactions reactions;
396 //ROS_INFO_STREAM("state machine initial state reactions: "<< demangledTypeName<reactions>());
397
398 processTransitions<reactions>(targetState);
399}

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

Here is the caller graph for this function:

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