\hypertarget{classModule}{
\section{Module Class Reference}
\label{classModule}\index{Module@{Module}}
}


A class for managing router manager modules.  




{\ttfamily \#include $<$module\_\-manager.hh$>$}

Inheritance diagram for Module:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=2.000000cm]{classModule}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{classModule_a6c5ba81179ba4625a95e18bbd3701d0d}{Module} (\hyperlink{classModuleManager}{ModuleManager} \&mmgr, const string \&name, const string \&path, const string \&expath, bool verbose)
\begin{DoxyCompactList}\small\item\em Constructor. \item\end{DoxyCompactList}\item 
\hypertarget{classModule_a7c9d9c096786d127590fdd8aa2b7d681}{
virtual \hyperlink{classModule_a7c9d9c096786d127590fdd8aa2b7d681}{$\sim$Module} ()}
\label{classModule_a7c9d9c096786d127590fdd8aa2b7d681}

\begin{DoxyCompactList}\small\item\em The default destructor. \item\end{DoxyCompactList}\item 
void \hyperlink{classModule_a78b24480cf7624a29577dc57a513aaf5}{new\_\-status} (ModuleStatus new\_\-status)
\begin{DoxyCompactList}\small\item\em Set new status for \hyperlink{protocolthe-p}{the} module. \item\end{DoxyCompactList}\item 
string \hyperlink{classModule_a0550987aa26ceea234a59a63fa09c0c0}{str} () const 
\begin{DoxyCompactList}\small\item\em Convert \hyperlink{protocolthe-p}{the} module information to a string. \item\end{DoxyCompactList}\item 
\hyperlink{classModuleManager}{ModuleManager} \& \hyperlink{classModule_a70c6f0cf2479fae4df228844a3d0a4f3}{module\_\-manager} () const 
\begin{DoxyCompactList}\small\item\em Get a reference to \hyperlink{protocolthe-p}{the} module manager (\hyperlink{classModuleManager}{ModuleManager}). \item\end{DoxyCompactList}\item 
const string \& \hyperlink{classModule_a2bcc9968f7d425c5c3feb5fa3fdc91e4}{expath} () const 
\begin{DoxyCompactList}\small\item\em Get \hyperlink{protocolthe-p}{the} expanded absolute path to \hyperlink{protocolthe-p}{the} executable program. \item\end{DoxyCompactList}\item 
int \hyperlink{classModule_a1dbf402546d32200c88b13266553bf13}{execute} (bool do\_\-exec, bool is\_\-verification, XorpCallback1$<$ void, bool $>$::RefPtr cb)
\begin{DoxyCompactList}\small\item\em Execute \hyperlink{protocolthe-p}{the} module. \item\end{DoxyCompactList}\item 
int \hyperlink{classModule_a5e27bd9dc5cee2d13545f49b877b8e88}{restart} ()
\begin{DoxyCompactList}\small\item\em Restart \hyperlink{protocolthe-p}{the} module. \item\end{DoxyCompactList}\item 
void \hyperlink{classModule_a3fcf951603c21df80f7fdf21c115bb06}{terminate} (XorpCallback0$<$ void $>$::RefPtr cb)
\begin{DoxyCompactList}\small\item\em Terminate \hyperlink{protocolthe-p}{the} module. \item\end{DoxyCompactList}\item 
void \hyperlink{classModule_abcaaeb4726a6cc36dd10a2442343445f}{terminate\_\-with\_\-prejudice} (XorpCallback0$<$ void $>$::RefPtr cb)
\begin{DoxyCompactList}\small\item\em Terminate \hyperlink{protocolthe-p}{the} module with prejudice. \item\end{DoxyCompactList}\item 
void \hyperlink{classModule_aeca40a2350037a2dfd32a31691860c95}{module\_\-exited} (bool success, bool is\_\-signal\_\-terminated, int term\_\-signal, bool is\_\-coredumped)
\begin{DoxyCompactList}\small\item\em A method called when \hyperlink{protocolthe-p}{the} corresponding process has exited. \item\end{DoxyCompactList}\item 
void \hyperlink{classModule_ab564b58983cf76381c31c46c1f39b736}{module\_\-stopped} (int stop\_\-signal)
\begin{DoxyCompactList}\small\item\em A method called when \hyperlink{protocolthe-p}{the} corresponding process has been stopped. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Private Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classModule_a7d16e458af5d287919d4b7cbec3f2882}{
void {\bfseries module\_\-restart\_\-cb} (bool success)}
\label{classModule_a7d16e458af5d287919d4b7cbec3f2882}

\end{DoxyCompactItemize}
\subsection*{Private Attributes}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classModule_a94fe890427ad522ce45c9bca0854b47b}{
\hyperlink{classModuleManager}{ModuleManager} \& {\bfseries \_\-mmgr}}
\label{classModule_a94fe890427ad522ce45c9bca0854b47b}

\item 
\hypertarget{classModule_afa9f9c4b777f71867b72026a767059f2}{
string {\bfseries \_\-path}}
\label{classModule_afa9f9c4b777f71867b72026a767059f2}

\item 
\hypertarget{classModule_ac4d34e3d7196104f1e6b75f95ff6c9bb}{
string {\bfseries \_\-expath}}
\label{classModule_ac4d34e3d7196104f1e6b75f95ff6c9bb}

\item 
\hypertarget{classModule_a0d4b09fb9daad88e5ec3a61f32ca953d}{
bool {\bfseries \_\-do\_\-exec}}
\label{classModule_a0d4b09fb9daad88e5ec3a61f32ca953d}

\item 
\hypertarget{classModule_adbb0e1d1ac44bade6d933201432b59b2}{
bool {\bfseries \_\-verbose}}
\label{classModule_adbb0e1d1ac44bade6d933201432b59b2}

\item 
\hypertarget{classModule_a5e5bd82eac461581a3fa1c6bca2f09e7}{
\hyperlink{classXorpTimer}{XorpTimer} {\bfseries \_\-shutdown\_\-timer}}
\label{classModule_a5e5bd82eac461581a3fa1c6bca2f09e7}

\item 
\hypertarget{classModule_ac46d4bd2a2797156159475b43ff76f27}{
XorpCallback0$<$ void $>$::RefPtr {\bfseries \_\-terminate\_\-cb}}
\label{classModule_ac46d4bd2a2797156159475b43ff76f27}

\end{DoxyCompactItemize}
\subsection*{Static Private Attributes}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classModule_a1bb5e94e29dd28f4c10362cbaeceee39}{
static const \hyperlink{classTimeVal}{TimeVal} {\bfseries SHUTDOWN\_\-TIMEOUT\_\-TIMEVAL} = \hyperlink{classTimeVal}{TimeVal}(2, 0)}
\label{classModule_a1bb5e94e29dd28f4c10362cbaeceee39}

\end{DoxyCompactItemize}


\subsection{Detailed Description}
A class for managing router manager modules. 

\subsection{Constructor \& Destructor Documentation}
\hypertarget{classModule_a6c5ba81179ba4625a95e18bbd3701d0d}{
\index{Module@{Module}!Module@{Module}}
\index{Module@{Module}!Module@{Module}}
\subsubsection[{Module}]{\setlength{\rightskip}{0pt plus 5cm}Module::Module (
\begin{DoxyParamCaption}
\item[{{\bf ModuleManager} \&}]{mmgr, }
\item[{const string \&}]{name, }
\item[{const string \&}]{path, }
\item[{const string \&}]{expath, }
\item[{bool}]{verbose}
\end{DoxyParamCaption}
)}}
\label{classModule_a6c5ba81179ba4625a95e18bbd3701d0d}


Constructor. 


\begin{DoxyParams}{Parameters}
{\em mmgr} & \hyperlink{protocolthe-p}{the} module manager (\hyperlink{classModuleManager}{ModuleManager}) to use. \\
\hline
{\em name} & \hyperlink{protocolthe-p}{the} module name. \\
\hline
{\em path} & \hyperlink{protocolthe-p}{the} path to \hyperlink{protocolthe-p}{the} executable program for this module. \\
\hline
{\em expath} & \hyperlink{protocolthe-p}{the} expanded absolute path to \hyperlink{protocolthe-p}{the} executable program for this module. \\
\hline
{\em verbose} & if true, then output trace messages. \\
\hline
\end{DoxyParams}


\subsection{Member Function Documentation}
\hypertarget{classModule_a1dbf402546d32200c88b13266553bf13}{
\index{Module@{Module}!execute@{execute}}
\index{execute@{execute}!Module@{Module}}
\subsubsection[{execute}]{\setlength{\rightskip}{0pt plus 5cm}int Module::execute (
\begin{DoxyParamCaption}
\item[{bool}]{do\_\-exec, }
\item[{bool}]{is\_\-verification, }
\item[{XorpCallback1$<$ void, bool $>$::RefPtr}]{cb}
\end{DoxyParamCaption}
)}}
\label{classModule_a1dbf402546d32200c88b13266553bf13}


Execute \hyperlink{protocolthe-p}{the} module. 


\begin{DoxyParams}{Parameters}
{\em do\_\-exec} & if true then indeed execute \hyperlink{protocolthe-p}{the} executable program, otherwise just process \hyperlink{protocolthe-p}{the} execution machinery. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
XORP\_\-OK on success, otherwise XORP\_\-ERROR. 
\end{DoxyReturn}
\hypertarget{classModule_a2bcc9968f7d425c5c3feb5fa3fdc91e4}{
\index{Module@{Module}!expath@{expath}}
\index{expath@{expath}!Module@{Module}}
\subsubsection[{expath}]{\setlength{\rightskip}{0pt plus 5cm}const string\& Module::expath (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classModule_a2bcc9968f7d425c5c3feb5fa3fdc91e4}


Get \hyperlink{protocolthe-p}{the} expanded absolute path to \hyperlink{protocolthe-p}{the} executable program. 

\begin{DoxyReturn}{Returns}
\hyperlink{protocolthe-p}{the} expanded absolute path to \hyperlink{protocolthe-p}{the} executable program. 
\end{DoxyReturn}
\hypertarget{classModule_aeca40a2350037a2dfd32a31691860c95}{
\index{Module@{Module}!module\_\-exited@{module\_\-exited}}
\index{module\_\-exited@{module\_\-exited}!Module@{Module}}
\subsubsection[{module\_\-exited}]{\setlength{\rightskip}{0pt plus 5cm}void Module::module\_\-exited (
\begin{DoxyParamCaption}
\item[{bool}]{success, }
\item[{bool}]{is\_\-signal\_\-terminated, }
\item[{int}]{term\_\-signal, }
\item[{bool}]{is\_\-coredumped}
\end{DoxyParamCaption}
)}}
\label{classModule_aeca40a2350037a2dfd32a31691860c95}


A method called when \hyperlink{protocolthe-p}{the} corresponding process has exited. 


\begin{DoxyParams}{Parameters}
{\em success} & if true, \hyperlink{protocolthe-p}{the} exit status of \hyperlink{protocolthe-p}{the} process indicates success, otherwise failure. \\
\hline
{\em is\_\-signal\_\-terminated} & if true \hyperlink{protocolthe-p}{the} process has been terminated by a signal. \\
\hline
{\em term\_\-signal} & if is\_\-signal\_\-terminated is true, this contains \hyperlink{protocolthe-p}{the} terminating signal. \\
\hline
{\em is\_\-coredumped} & if true \hyperlink{protocolthe-p}{the} process has generated a coredump. \\
\hline
\end{DoxyParams}
\hypertarget{classModule_a70c6f0cf2479fae4df228844a3d0a4f3}{
\index{Module@{Module}!module\_\-manager@{module\_\-manager}}
\index{module\_\-manager@{module\_\-manager}!Module@{Module}}
\subsubsection[{module\_\-manager}]{\setlength{\rightskip}{0pt plus 5cm}{\bf ModuleManager}\& Module::module\_\-manager (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classModule_a70c6f0cf2479fae4df228844a3d0a4f3}


Get a reference to \hyperlink{protocolthe-p}{the} module manager (\hyperlink{classModuleManager}{ModuleManager}). 

\begin{DoxyReturn}{Returns}
a reference to \hyperlink{protocolthe-p}{the} module manager. 
\end{DoxyReturn}
\hypertarget{classModule_ab564b58983cf76381c31c46c1f39b736}{
\index{Module@{Module}!module\_\-stopped@{module\_\-stopped}}
\index{module\_\-stopped@{module\_\-stopped}!Module@{Module}}
\subsubsection[{module\_\-stopped}]{\setlength{\rightskip}{0pt plus 5cm}void Module::module\_\-stopped (
\begin{DoxyParamCaption}
\item[{int}]{stop\_\-signal}
\end{DoxyParamCaption}
)}}
\label{classModule_ab564b58983cf76381c31c46c1f39b736}


A method called when \hyperlink{protocolthe-p}{the} corresponding process has been stopped. 


\begin{DoxyParams}{Parameters}
{\em stop\_\-signal} & \hyperlink{protocolthe-p}{the} signal that has stopped \hyperlink{protocolthe-p}{the} process. \\
\hline
\end{DoxyParams}
\hypertarget{classModule_a78b24480cf7624a29577dc57a513aaf5}{
\index{Module@{Module}!new\_\-status@{new\_\-status}}
\index{new\_\-status@{new\_\-status}!Module@{Module}}
\subsubsection[{new\_\-status}]{\setlength{\rightskip}{0pt plus 5cm}void Module::new\_\-status (
\begin{DoxyParamCaption}
\item[{ModuleStatus}]{new\_\-status}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}virtual\mbox{]}}}}
\label{classModule_a78b24480cf7624a29577dc57a513aaf5}


Set new status for \hyperlink{protocolthe-p}{the} module. 


\begin{DoxyParams}{Parameters}
{\em new\_\-status} & \hyperlink{protocolthe-p}{the} new status for \hyperlink{protocolthe-p}{the} module. \\
\hline
\end{DoxyParams}


Reimplemented from \hyperlink{classGenericModule}{GenericModule}.

\hypertarget{classModule_a5e27bd9dc5cee2d13545f49b877b8e88}{
\index{Module@{Module}!restart@{restart}}
\index{restart@{restart}!Module@{Module}}
\subsubsection[{restart}]{\setlength{\rightskip}{0pt plus 5cm}int Module::restart (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}
\label{classModule_a5e27bd9dc5cee2d13545f49b877b8e88}


Restart \hyperlink{protocolthe-p}{the} module. 

\begin{DoxyReturn}{Returns}
XORP\_\-OK on success, otherwise XORP\_\-ERROR. 
\end{DoxyReturn}
\hypertarget{classModule_a0550987aa26ceea234a59a63fa09c0c0}{
\index{Module@{Module}!str@{str}}
\index{str@{str}!Module@{Module}}
\subsubsection[{str}]{\setlength{\rightskip}{0pt plus 5cm}string Module::str (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}virtual\mbox{]}}}}
\label{classModule_a0550987aa26ceea234a59a63fa09c0c0}


Convert \hyperlink{protocolthe-p}{the} module information to a string. 

\begin{DoxyReturn}{Returns}
a string with \hyperlink{protocolthe-p}{the} module information. 
\end{DoxyReturn}


Reimplemented from \hyperlink{classGenericModule}{GenericModule}.

\hypertarget{classModule_a3fcf951603c21df80f7fdf21c115bb06}{
\index{Module@{Module}!terminate@{terminate}}
\index{terminate@{terminate}!Module@{Module}}
\subsubsection[{terminate}]{\setlength{\rightskip}{0pt plus 5cm}void Module::terminate (
\begin{DoxyParamCaption}
\item[{XorpCallback0$<$ void $>$::RefPtr}]{cb}
\end{DoxyParamCaption}
)}}
\label{classModule_a3fcf951603c21df80f7fdf21c115bb06}


Terminate \hyperlink{protocolthe-p}{the} module. 


\begin{DoxyParams}{Parameters}
{\em cb} & \hyperlink{protocolthe-p}{the} callback to execute after \hyperlink{protocolthe-p}{the} module is terminated. \\
\hline
\end{DoxyParams}
\hypertarget{classModule_abcaaeb4726a6cc36dd10a2442343445f}{
\index{Module@{Module}!terminate\_\-with\_\-prejudice@{terminate\_\-with\_\-prejudice}}
\index{terminate\_\-with\_\-prejudice@{terminate\_\-with\_\-prejudice}!Module@{Module}}
\subsubsection[{terminate\_\-with\_\-prejudice}]{\setlength{\rightskip}{0pt plus 5cm}void Module::terminate\_\-with\_\-prejudice (
\begin{DoxyParamCaption}
\item[{XorpCallback0$<$ void $>$::RefPtr}]{cb}
\end{DoxyParamCaption}
)}}
\label{classModule_abcaaeb4726a6cc36dd10a2442343445f}


Terminate \hyperlink{protocolthe-p}{the} module with prejudice. 


\begin{DoxyParams}{Parameters}
{\em cb} & \hyperlink{protocolthe-p}{the} callback to execute after \hyperlink{protocolthe-p}{the} module is terminated. \\
\hline
\end{DoxyParams}


The documentation for this class was generated from the following files:\begin{DoxyCompactItemize}
\item 
/home/greearb/git/xorp.ct.github/xorp/rtrmgr/module\_\-manager.hh\item 
/home/greearb/git/xorp.ct.github/xorp/rtrmgr/module\_\-manager.cc\end{DoxyCompactItemize}
