2018-08-19 06:27:09 -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-08-19 06:27:09 -05:00
Simple loop dectector for \hyperlink { classKite_ 1_ 1RoutingEvent} { Routing\- Event} .
2018-06-06 11:42:26 -05:00
\subsubsection * { Public Member Functions}
\begin { DoxyCompactItemize}
\item
2018-08-19 06:27:09 -05:00
\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-08-19 06:27:09 -05:00
bool \hyperlink { classKite_ 1_ 1RoutingEventLoop_ aad73ed3e38029feb236cae2527cb5f4e} { is\- Looping} () const
2018-06-06 11:42:26 -05:00
\item
2018-08-19 06:27:09 -05:00
int \hyperlink { classKite_ 1_ 1RoutingEventLoop_ a62ba5a4c63978e4c8c71fdf0205700a5} { get\- Max\- Count} () const
2018-06-06 11:42:26 -05:00
\item
2018-08-19 06:27:09 -05:00
const std\- ::vector$ < $ Element $ > $ \& \hyperlink { classKite_ 1_ 1RoutingEventLoop_ a110c8ec6ec51ce13950962d1d79051fc} { get\- Elements} () const
2018-06-06 11:42:26 -05:00
\item
2018-08-19 06:27:09 -05:00
void \hyperlink { classKite_ 1_ 1RoutingEventLoop_ ad684b7c05480897bdbd86a5fb8363c72} { update} (size\- \_ \- t id)
2018-06-06 11:42:26 -05:00
\item
2018-08-19 06:27:09 -05:00
void \hyperlink { classKite_ 1_ 1RoutingEventLoop_ a9b6582ce996327c65bf532396ca11b61} { erase} (size\- \_ \- t id)
2018-06-06 11:42:26 -05:00
\end { DoxyCompactItemize}
\subsubsection { Detailed Description}
2018-08-19 06:27:09 -05:00
Simple loop dectector for \hyperlink { classKite_ 1_ 1RoutingEvent} { Routing\- Event} .
2018-06-06 11:42:26 -05:00
2018-08-19 06:27:09 -05:00
The \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-08-19 06:27:09 -05:00
The loop detector keep track of the { \ttfamily depth} \hyperlink { classKite_ 1_ 1TrackElement} { Track\- Element} with the greatest processing count. \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-08-19 06:27:09 -05:00
\item The { \ttfamily id} of the associated \hyperlink { classKite_ 1_ 1TrackSegment} { Track\- Segment} ({ \bf 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-08-19 06:27:09 -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-08-19 06:27:09 -05:00
\hypertarget { 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::RoutingEventLoop@{ Kite\- ::\- Routing\- Event\- Loop} }
\paragraph [{Routing\-Event\-Loop}] { \setlength { \rightskip } { 0pt plus 5cm} { \bf Routing\- Event\- Loop} (
\begin { DoxyParamCaption}
\item [{size\-\_\-t}] { depth = { \ttfamily 10} , }
\item [{int}] { count\- Limit = { \ttfamily 20} }
\end { DoxyParamCaption}
)} } \label { classKite_ 1_ 1RoutingEventLoop_ aa33efa06ccc2175e35eff7ac6dadffb6}
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-08-19 06:27:09 -05:00
\hypertarget { classKite_ 1_ 1RoutingEventLoop_ aad73ed3e38029feb236cae2527cb5f4e} { \index { Kite\- ::\- Routing\- Event\- Loop@{ Kite\- ::\- Routing\- Event\- Loop} !is\- Looping@{ is\- Looping} }
\index { is\- Looping@{ is\- Looping} !Kite::RoutingEventLoop@{ Kite\- ::\- Routing\- Event\- Loop} }
\paragraph [{is\-Looping}] { \setlength { \rightskip } { 0pt plus 5cm} bool is\- Looping (
\begin { DoxyParamCaption}
{ }
\end { DoxyParamCaption}
) const\hspace { 0.3cm} { \ttfamily [inline]} } } \label { classKite_ 1_ 1RoutingEventLoop_ aad73ed3e38029feb236cae2527cb5f4e}
{ \bfseries Returns\- :} { \bfseries true} if the loop threshold has been reached for at least one element.
Referenced by Routing\- Event\- ::process().
\hypertarget { classKite_ 1_ 1RoutingEventLoop_ a62ba5a4c63978e4c8c71fdf0205700a5} { \index { Kite\- ::\- Routing\- Event\- Loop@{ Kite\- ::\- Routing\- Event\- Loop} !get\- Max\- Count@{ get\- Max\- Count} }
\index { get\- Max\- Count@{ get\- Max\- Count} !Kite::RoutingEventLoop@{ Kite\- ::\- Routing\- Event\- Loop} }
\paragraph [{get\-Max\-Count}] { \setlength { \rightskip } { 0pt plus 5cm} int get\- Max\- Count (
\begin { DoxyParamCaption}
{ }
\end { DoxyParamCaption}
) const\hspace { 0.3cm} { \ttfamily [inline]} } } \label { classKite_ 1_ 1RoutingEventLoop_ a62ba5a4c63978e4c8c71fdf0205700a5}
2018-06-06 11:42:26 -05:00
The maximal count an element as reached so far.
2018-08-19 06:27:09 -05:00
Referenced by Routing\- Event\- ::process().
2018-06-06 11:42:26 -05:00
2018-08-19 06:27:09 -05:00
\hypertarget { classKite_ 1_ 1RoutingEventLoop_ a110c8ec6ec51ce13950962d1d79051fc} { \index { Kite\- ::\- Routing\- Event\- Loop@{ Kite\- ::\- Routing\- Event\- Loop} !get\- Elements@{ get\- Elements} }
\index { get\- Elements@{ get\- Elements} !Kite::RoutingEventLoop@{ Kite\- ::\- Routing\- Event\- Loop} }
\paragraph [{get\-Elements}] { \setlength { \rightskip } { 0pt plus 5cm} const std\- ::vector$ < $ Element $ > $ \& get\- Elements (
\begin { DoxyParamCaption}
{ }
\end { DoxyParamCaption}
) const\hspace { 0.3cm} { \ttfamily [inline]} } } \label { classKite_ 1_ 1RoutingEventLoop_ a110c8ec6ec51ce13950962d1d79051fc}
2018-06-06 11:42:26 -05:00
The complete table elements.
2018-08-19 06:27:09 -05:00
Referenced by Routing\- Event\- ::process().
2018-06-06 11:42:26 -05:00
2018-08-19 06:27:09 -05:00
\hypertarget { classKite_ 1_ 1RoutingEventLoop_ ad684b7c05480897bdbd86a5fb8363c72} { \index { Kite\- ::\- Routing\- Event\- Loop@{ Kite\- ::\- Routing\- Event\- Loop} !update@{ update} }
\index { update@{ update} !Kite::RoutingEventLoop@{ Kite\- ::\- Routing\- Event\- Loop} }
\paragraph [{update}] { \setlength { \rightskip } { 0pt plus 5cm} void update (
\begin { DoxyParamCaption}
\item [{size\-\_\-t}] { id}
\end { DoxyParamCaption}
)} } \label { classKite_ 1_ 1RoutingEventLoop_ ad684b7c05480897bdbd86a5fb8363c72}
2018-06-06 11:42:26 -05:00
Update the loop, telling that element { \ttfamily id} has appreared one more time.
2018-08-19 06:27:09 -05:00
Referenced by Routing\- Event\- ::process().
2018-06-06 11:42:26 -05:00
2018-08-19 06:27:09 -05:00
\hypertarget { classKite_ 1_ 1RoutingEventLoop_ a9b6582ce996327c65bf532396ca11b61} { \index { Kite\- ::\- Routing\- Event\- Loop@{ Kite\- ::\- Routing\- Event\- Loop} !erase@{ erase} }
\index { erase@{ erase} !Kite::RoutingEventLoop@{ Kite\- ::\- Routing\- Event\- Loop} }
\paragraph [{erase}] { \setlength { \rightskip } { 0pt plus 5cm} void erase (
\begin { DoxyParamCaption}
\item [{size\-\_\-t}] { id}
\end { DoxyParamCaption}
)} } \label { classKite_ 1_ 1RoutingEventLoop_ a9b6582ce996327c65bf532396ca11b61}
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-08-19 06:27:09 -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 \hyperlink { classKite_ 1_ 1TrackElement} { Track\- Element} should be invalidated and it's reference removed from the table.
2018-06-06 11:42:26 -05:00
2018-08-19 06:27:09 -05:00
Referenced by Routing\- Event\- ::process().
2018-06-06 11:42:26 -05:00
2018-08-19 06:27:09 -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-08-19 06:27:09 -05:00
Routing\- Event\- Loop.\- h\item
Routing\- Event\- Loop.\- cpp\item
Routing\- Event\- Loop.\- dox\end { DoxyCompactItemize}