3 #include <RobotAPI/libraries/armem_skills/aron/Statechart.aron.generated.h>
9 Base(iceMemory,
"StatechartListener",
"Transitions", arondto::Statechart::
Transition::ToAronType())
16 defs->optional(p.statechartCoreSegmentName,
"StatechartCoreSegmentName",
"Name of the core segment for statecharts.");
17 defs->optional(p.statechartTransitionsProviderSegmentName,
"TransitionsProviderSegmentName",
"Name of the provider segment for statechart transitions.");
18 defs->optional(p.statechartTransitionsTopicName,
"tpc.sub.ProfilerListener",
"Name of the ProfilerListenerInterface topics to subscribe.");
32 const std::string& entityName = getStatechartName(t.targetStateIdentifier);
38 update.referencedTime = transitionTime;
39 skills::arondto::Statechart::Transition
data;
55 for (
const auto& t : transitions)
61 std::string StatechartListenerProviderSegment::getStatechartName(std::string stateName)
63 const std::string delimiter =
"->";
64 const int maxLevels = 2;
68 std::string statechartName;
69 while ((pos = stateName.find(delimiter)) != std::string::npos && levels < maxLevels)
73 statechartName += delimiter;
75 statechartName += stateName.substr(0, pos);
76 stateName.erase(0, pos + delimiter.length());
80 return statechartName;