35#define THIS_STATE_NAME ((demangleSymbol(typeid(*this).name()).c_str()))
56 getLogger(),
"[%s] Skipping client behavior creation in orthogonal [%s]. It does not exist.",
63template <
typename SmaccComponentType>
70template <
typename SmaccClientType>
84 "[%s] Client of type '%s' not found in any orthogonal of the current state machine. This may "
85 "produce a segmentation fault if the returned reference is used.",
108 auto sr = std::make_shared<TStateReactor>(
args...);
118 auto eg = std::make_shared<TEventGenerator>(
args...);
124template <
typename TEventList>
130 template <
typename T>
133 auto evinfo = std::make_shared<SmaccEventInfo>(TypeInfo::getTypeInfoFromType<T>());
141template <
typename TEventList>
147 template <
typename T>
157 auto sr = std::make_shared<TStateReactor>(
args...);
158 sr->initialize(
this);
161 using boost::mpl::_1;
162 using wrappedList =
typename boost::mpl::transform<TEventList, _1>::type;
164 boost::mpl::for_each<wrappedList>(
op);
170template <
typename TOrthogonal>
176template <
typename TOrthogonal,
typename TClientBehavior>
182template <
typename TEventGenerator>
189 if (
ret !=
nullptr)
break;
194template <
typename TStateReactor>
201 if (
ret !=
nullptr)
break;
218template <
typename EventType>
224template <
typename EventType>
231template <
typename TransitionType>
234 auto transitionType = TypeInfo::getTypeInfoFromType<TransitionType>();
rclcpp::Logger getLogger()
TClientBehavior * getClientBehavior(int index=0)
std::shared_ptr< TEventGenerator > createEventGenerator(TEvArgs... args)
std::vector< std::shared_ptr< StateReactor > > stateReactors_
bool getGlobalSMData(std::string name, T &ret)
std::shared_ptr< TBehavior > configure(Args &&... args)
void requiresClient(SmaccClientType *&storage)
std::shared_ptr< TStateReactor > createStateReactor(TEvArgs... args)
TOrthogonal * getOrthogonal()
void requiresComponent(SmaccComponentType *&storage)
TStateReactor * getStateReactor()
virtual ISmaccStateMachine & getStateMachine()=0
std::vector< std::shared_ptr< smacc2::SmaccEventGenerator > > eventGenerators_
void setGlobalSMData(std::string name, T value)
TEventGenerator * getEventGenerator()
void notifyTransitionFromTransitionTypeInfo(std::shared_ptr< smacc2::introspection::TypeInfo > &transitionTypeInfo)
std::string demangleSymbol()
smacc2::SmaccStateReactorInfo * srInfo_
AddTEventTypeStateReactorInfo(smacc2::SmaccStateReactorInfo *srInfo)
smacc2::StateReactor * sr_
AddTEventTypeStateReactor(smacc2::StateReactor *sr)
std::vector< std::shared_ptr< SmaccEventInfo > > sourceEventTypes