2018-10-18 11:10:01 -05:00
\hypertarget { classKite_ 1_ 1RoutingEventLoop} { } \subsection { Routing\+ Event\+ Loop Class Reference}
\label { classKite_ 1_ 1RoutingEventLoop} \index { Routing\+ Event\+ Loop@{ Routing\+ Event\+ Loop} }
2018-06-06 11:42:26 -05:00
2018-10-18 11:10:01 -05:00
Simple loop dectector for \mbox { \hyperlink { classKite_ 1_ 1RoutingEvent} { Routing\+ Event} } .
2018-06-06 11:42:26 -05:00
\subsubsection * { Public Member Functions}
\begin { DoxyCompactItemize}
\item
2018-10-18 11:10:01 -05:00
\mbox { \hyperlink { classKite_ 1_ 1RoutingEventLoop_ aa33efa06ccc2175e35eff7ac6dadffb6} { Routing\+ Event\+ Loop} } (size\+ \_ \+ t depth=10, int limit=20)
2018-06-06 11:42:26 -05:00
\item
2018-10-18 11:10:01 -05:00
bool \mbox { \hyperlink { classKite_ 1_ 1RoutingEventLoop_ a78155a2b0119ac92d377fa404e348a98} { is\+ Looping} } () const
2018-06-06 11:42:26 -05:00
\item
2018-10-18 11:10:01 -05:00
int \mbox { \hyperlink { classKite_ 1_ 1RoutingEventLoop_ a5744f7f01d26947fb0765bc5d1e2c3bd} { get\+ Max\+ Count} } () const
2018-06-06 11:42:26 -05:00
\item
2018-10-18 11:10:01 -05:00
const std\+ ::vector$ < $ Element $ > $ \& \mbox { \hyperlink { classKite_ 1_ 1RoutingEventLoop_ a7411a9e20edba3f3eeceb237dec86ff3} { get\+ Elements} } () const
2018-06-06 11:42:26 -05:00
\item
2018-10-18 11:10:01 -05:00
void \mbox { \hyperlink { classKite_ 1_ 1RoutingEventLoop_ ad684b7c05480897bdbd86a5fb8363c72} { update} } (size\+ \_ \+ t id)
2018-06-06 11:42:26 -05:00
\item
2018-10-18 11:10:01 -05:00
void \mbox { \hyperlink { classKite_ 1_ 1RoutingEventLoop_ a9b6582ce996327c65bf532396ca11b61} { erase} } (size\+ \_ \+ t id)
2018-06-06 11:42:26 -05:00
\end { DoxyCompactItemize}
\subsubsection { Detailed Description}
2018-10-18 11:10:01 -05:00
Simple loop dectector for \mbox { \hyperlink { classKite_ 1_ 1RoutingEvent} { Routing\+ Event} } .
2018-06-06 11:42:26 -05:00
2018-10-18 11:10:01 -05:00
The \mbox { \hyperlink { classKite_ 1_ 1RoutingEventLoop} { Routing\+ Event\+ Loop} } can be roughly understood as a truncated histogram of the { \ttfamily depth} last (in the time meaning) greatest riped up elements.
2018-06-06 11:42:26 -05:00
2018-10-18 11:10:01 -05:00
The loop detector keep track of the { \ttfamily depth} \mbox { \hyperlink { classKite_ 1_ 1TrackElement} { Track\+ Element} } with the greatest processing count. \mbox { \hyperlink { classKite_ 1_ 1TrackElement} { Track\+ Element} } are just identified through the { \ttfamily id} of their associated Auto\+ Segment. Each entry in the loop table contains\+ :
2018-06-06 11:42:26 -05:00
\begin { DoxyItemize}
2018-10-18 11:10:01 -05:00
\item The { \ttfamily id} of the associated \mbox { \hyperlink { classKite_ 1_ 1TrackSegment} { Track\+ Segment} } (\textbf { Katabatic\+ ::\+ Auto\+ Segment} ).
2018-06-06 11:42:26 -05:00
\item The { \ttfamily count} of times it has been processed
\item The { \ttfamily timestamp} of the latest time it has been updated.
\end { DoxyItemize}
The table (implemented as { \ttfamily vector$ < $ $ > $ } ) it kept sorted on the timestamp (decreasing). Whenever there is more than { \ttfamily depth} elements in the table, the oldest one are discarted (regardless of their count). Obviously, there are pathological cases into which a loop cannot be detected, but so far it has not happened so a more robust approach seems not necessary at this time.
2018-10-18 11:10:01 -05:00
Whenever the count of an element reaches { \ttfamily count\+ Limit} , the looping flag is set. It will remains set unless the faulty element is manually removed.
2018-06-06 11:42:26 -05:00
\subsubsection { Constructor \& Destructor Documentation}
2018-10-18 11:10:01 -05:00
\mbox { \Hypertarget { classKite_ 1_ 1RoutingEventLoop_ aa33efa06ccc2175e35eff7ac6dadffb6} \label { classKite_ 1_ 1RoutingEventLoop_ aa33efa06ccc2175e35eff7ac6dadffb6} }
\index { Kite\+ ::\+ Routing\+ Event\+ Loop@{ Kite\+ ::\+ Routing\+ Event\+ Loop} !Routing\+ Event\+ Loop@{ Routing\+ Event\+ Loop} }
\index { Routing\+ Event\+ Loop@{ Routing\+ Event\+ Loop} !Kite\+ ::\+ Routing\+ Event\+ Loop@{ Kite\+ ::\+ Routing\+ Event\+ Loop} }
\paragraph { \texorpdfstring { Routing\+ Event\+ Loop()} { RoutingEventLoop()} }
{ \footnotesize \ttfamily \mbox { \hyperlink { classKite_ 1_ 1RoutingEventLoop} { Routing\+ Event\+ Loop} } (\begin { DoxyParamCaption} \item [{size\+\_\+t}] { depth = { \ttfamily 10} , } \item [{int}] { count\+ Limit = { \ttfamily 20} } \end { DoxyParamCaption} )}
Construct a loop detector that handle { \ttfamily depth} differents segments and has a looping threshold of { \ttfamily count\+ Limit} .
2018-06-06 11:42:26 -05:00
\subsubsection { Member Function Documentation}
2018-10-18 11:10:01 -05:00
\mbox { \Hypertarget { classKite_ 1_ 1RoutingEventLoop_ a78155a2b0119ac92d377fa404e348a98} \label { classKite_ 1_ 1RoutingEventLoop_ a78155a2b0119ac92d377fa404e348a98} }
\index { Kite\+ ::\+ Routing\+ Event\+ Loop@{ Kite\+ ::\+ Routing\+ Event\+ Loop} !is\+ Looping@{ is\+ Looping} }
\index { is\+ Looping@{ is\+ Looping} !Kite\+ ::\+ Routing\+ Event\+ Loop@{ Kite\+ ::\+ Routing\+ Event\+ Loop} }
\paragraph { \texorpdfstring { is\+ Looping()} { isLooping()} }
{ \footnotesize \ttfamily bool is\+ Looping (\begin { DoxyParamCaption} { } \end { DoxyParamCaption} ) const\hspace { 0.3cm} { \ttfamily [inline]} }
{ \bfseries Returns\+ :} { \bfseries true} if the loop threshold has been reached for at least one element.
Referenced by Routing\+ Event\+ ::process().
\mbox { \Hypertarget { classKite_ 1_ 1RoutingEventLoop_ a5744f7f01d26947fb0765bc5d1e2c3bd} \label { classKite_ 1_ 1RoutingEventLoop_ a5744f7f01d26947fb0765bc5d1e2c3bd} }
\index { Kite\+ ::\+ Routing\+ Event\+ Loop@{ Kite\+ ::\+ Routing\+ Event\+ Loop} !get\+ Max\+ Count@{ get\+ Max\+ Count} }
\index { get\+ Max\+ Count@{ get\+ Max\+ Count} !Kite\+ ::\+ Routing\+ Event\+ Loop@{ Kite\+ ::\+ Routing\+ Event\+ Loop} }
\paragraph { \texorpdfstring { get\+ Max\+ Count()} { getMaxCount()} }
{ \footnotesize \ttfamily int get\+ Max\+ Count (\begin { DoxyParamCaption} { } \end { DoxyParamCaption} ) const\hspace { 0.3cm} { \ttfamily [inline]} }
2018-06-06 11:42:26 -05:00
The maximal count an element as reached so far.
2018-10-18 11:10:01 -05:00
Referenced by Routing\+ Event\+ ::process().
\mbox { \Hypertarget { classKite_ 1_ 1RoutingEventLoop_ a7411a9e20edba3f3eeceb237dec86ff3} \label { classKite_ 1_ 1RoutingEventLoop_ a7411a9e20edba3f3eeceb237dec86ff3} }
\index { Kite\+ ::\+ Routing\+ Event\+ Loop@{ Kite\+ ::\+ Routing\+ Event\+ Loop} !get\+ Elements@{ get\+ Elements} }
\index { get\+ Elements@{ get\+ Elements} !Kite\+ ::\+ Routing\+ Event\+ Loop@{ Kite\+ ::\+ Routing\+ Event\+ Loop} }
\paragraph { \texorpdfstring { get\+ Elements()} { getElements()} }
{ \footnotesize \ttfamily const std\+ ::vector$ < $ Element $ > $ \& get\+ Elements (\begin { DoxyParamCaption} { } \end { DoxyParamCaption} ) const\hspace { 0.3cm} { \ttfamily [inline]} }
2018-06-06 11:42:26 -05:00
The complete table elements.
2018-10-18 11:10:01 -05:00
Referenced by Routing\+ Event\+ ::process().
\mbox { \Hypertarget { classKite_ 1_ 1RoutingEventLoop_ ad684b7c05480897bdbd86a5fb8363c72} \label { classKite_ 1_ 1RoutingEventLoop_ ad684b7c05480897bdbd86a5fb8363c72} }
\index { Kite\+ ::\+ Routing\+ Event\+ Loop@{ Kite\+ ::\+ Routing\+ Event\+ Loop} !update@{ update} }
\index { update@{ update} !Kite\+ ::\+ Routing\+ Event\+ Loop@{ Kite\+ ::\+ Routing\+ Event\+ Loop} }
\paragraph { \texorpdfstring { update()} { update()} }
{ \footnotesize \ttfamily void update (\begin { DoxyParamCaption} \item [{size\+\_\+t}] { id } \end { DoxyParamCaption} )}
2018-06-06 11:42:26 -05:00
Update the loop, telling that element { \ttfamily id} has appreared one more time.
2018-10-18 11:10:01 -05:00
Referenced by Routing\+ Event\+ ::process().
\mbox { \Hypertarget { classKite_ 1_ 1RoutingEventLoop_ a9b6582ce996327c65bf532396ca11b61} \label { classKite_ 1_ 1RoutingEventLoop_ a9b6582ce996327c65bf532396ca11b61} }
\index { Kite\+ ::\+ Routing\+ Event\+ Loop@{ Kite\+ ::\+ Routing\+ Event\+ Loop} !erase@{ erase} }
\index { erase@{ erase} !Kite\+ ::\+ Routing\+ Event\+ Loop@{ Kite\+ ::\+ Routing\+ Event\+ Loop} }
\paragraph { \texorpdfstring { erase()} { erase()} }
{ \footnotesize \ttfamily void erase (\begin { DoxyParamCaption} \item [{size\+\_\+t}] { id } \end { DoxyParamCaption} )}
2018-06-06 11:42:26 -05:00
Remove the entry related to element { \ttfamily id} in the table. The state of the table is fully recomputed after the removal (looping flag \& maximum count).
2018-10-18 11:10:01 -05:00
This method is used when a loop has been encountered, presumably on element { \ttfamily id} , and we want to continue. To avoid the loop detector yelling at each check, the associated \mbox { \hyperlink { classKite_ 1_ 1TrackElement} { Track\+ Element} } should be invalidated and it\textquotesingle { } s reference removed from the table.
2018-06-06 11:42:26 -05:00
2018-10-18 11:10:01 -05:00
Referenced by Routing\+ Event\+ ::process().
2018-06-06 11:42:26 -05:00
2018-10-18 11:10:01 -05:00
The documentation for this class was generated from the following files\+ :\begin { DoxyCompactItemize}
2018-06-06 11:42:26 -05:00
\item
2018-10-18 11:10:01 -05:00
Routing\+ Event\+ Loop.\+ h\item
Routing\+ Event\+ Loop.\+ cpp\item
Routing\+ Event\+ Loop.\+ dox\end { DoxyCompactItemize}