\hypertarget{TOC_8h}{
\section{TOC.h File Reference}
\label{TOC_8h}\index{TOC.h@{TOC.h}}
}
TimeOut Control, prototypes and public data structures.  


{\tt \#include $<$PBS/TOV.h$>$}\par
{\tt \#include $<$PBS/TOC\_\-comdefs.h$>$}\par
\subsection*{Classes}
\begin{CompactItemize}
\item 
struct \hyperlink{struct__TOC__cvt__s}{\_\-TOC\_\-cvt\_\-s}
\begin{CompactList}\small\item\em Structure specifying the conversion of an small range timeout (TOS) to a timeout value (TOV), via user provided TOV\_\-cvt\_\-s function. \item\end{CompactList}\item 
struct \hyperlink{struct__TOC__cvt__v}{\_\-TOC\_\-cvt\_\-v}
\begin{CompactList}\small\item\em Structure specifying the timeout is being provided as an immediate timeout value (TOV). \item\end{CompactList}\item 
struct \hyperlink{struct__TOC__cvt__x}{\_\-TOC\_\-cvt\_\-x}
\begin{CompactList}\small\item\em Structure specifying the conversion of an unsigned int to a timeout value (TOV), via user provided TOV\_\-cvt\_\-x style function. \item\end{CompactList}\item 
union \hyperlink{union__TOC__cvt}{\_\-TOC\_\-cvt}
\begin{CompactList}\small\item\em A union of the all the converter styles. \item\end{CompactList}\item 
struct \hyperlink{struct__TOC}{\_\-TOC}
\begin{CompactList}\small\item\em The timeout conversion control structure. \item\end{CompactList}\end{CompactItemize}
\subsection*{Typedefs}
\begin{CompactItemize}
\item 
typedef enum \hyperlink{TOC_8h_53f414e5c233515013c5ae5961c982a6}{\_\-TOC\_\-style} \hyperlink{TOC_8h_88c29e62e5a8b8ce6a5a493cb6aae64b}{TOC\_\-style}
\item 
typedef struct \hyperlink{struct__TOC__cvt__s}{\_\-TOC\_\-cvt\_\-s} \hyperlink{TOC_8h_0cd273763f72b783550380465f268585}{TOC\_\-cvt\_\-s}
\begin{CompactList}\small\item\em Typedef for struct {\em \hyperlink{struct__TOC__cvt__s}{\_\-TOC\_\-cvt\_\-s}\/}. \item\end{CompactList}\item 
typedef struct \hyperlink{struct__TOC__cvt__v}{\_\-TOC\_\-cvt\_\-v} \hyperlink{TOC_8h_bf99afdd019dece6c7faa314a8dcb98b}{TOC\_\-cvt\_\-v}
\begin{CompactList}\small\item\em Typedef for struct {\em \hyperlink{struct__TOC__cvt__v}{\_\-TOC\_\-cvt\_\-v}\/}. \item\end{CompactList}\item 
typedef struct \hyperlink{struct__TOC__cvt__x}{\_\-TOC\_\-cvt\_\-x} \hyperlink{TOC_8h_bbe9301ad2ca80e1655826d126b4a8ec}{TOC\_\-cvt\_\-x}
\begin{CompactList}\small\item\em Typedef for struct {\em \hyperlink{struct__TOC__cvt__x}{\_\-TOC\_\-cvt\_\-x}\/}. \item\end{CompactList}\item 
\hypertarget{TOC_8h_2fd36c0bdf0a8de2f0f342b681d407e5}{
typedef union \hyperlink{union__TOC__cvt}{\_\-TOC\_\-cvt} \hyperlink{TOC_8h_2fd36c0bdf0a8de2f0f342b681d407e5}{TOC\_\-cvt}}
\label{TOC_8h_2fd36c0bdf0a8de2f0f342b681d407e5}

\begin{CompactList}\small\item\em Typedef for union {\em \hyperlink{union__TOC__cvt}{\_\-TOC\_\-cvt}\/}. \item\end{CompactList}\end{CompactItemize}
\subsection*{Enumerations}
\begin{CompactItemize}
\item 
enum \hyperlink{TOC_8h_53f414e5c233515013c5ae5961c982a6}{\_\-TOC\_\-style} \{ \par
\hyperlink{TOC_8h_53f414e5c233515013c5ae5961c982a6a5849855c20011802a300fb7109544d0}{TOC\_\-K\_\-STYLE\_\-S} =  -1, 
\par
\hyperlink{TOC_8h_53f414e5c233515013c5ae5961c982a6f750a295d2c6ec9f346214a4402ca915}{TOC\_\-K\_\-STYLE\_\-V} =  0, 
\par
\hyperlink{TOC_8h_53f414e5c233515013c5ae5961c982a6c5902b6a9132352c324e6b84ffd8d956}{TOC\_\-K\_\-STYLE\_\-X} =  1
 \}
\begin{CompactList}\small\item\em Enumerates the different way that a timeout may be specified. \item\end{CompactList}\end{CompactItemize}
\subsection*{Functions}
\begin{CompactItemize}
\item 
void \hyperlink{TOC_8h_bc05db7937771439b03446205a55cc1d}{TOC\_\-set\_\-s} (\hyperlink{struct__TOC}{TOC} $\ast$toc, \hyperlink{TOV_8h_e2333f8380ee66c994cd27844296cc76}{TOV\_\-cvt\_\-s} fnc, \hyperlink{TOC__comdefs_8h_f11a28b6d71a01ed512f1252b1f14daf}{TOS} tmo)
\begin{CompactList}\small\item\em Sets the TOV converter and value for small range timeouts. \item\end{CompactList}\item 
void \hyperlink{TOC_8h_0d0cc997fdefd509ee1061e1310feeb8}{TOC\_\-set\_\-v} (\hyperlink{struct__TOC}{TOC} $\ast$toc, \hyperlink{TOV_8h_8px-xxx-xxx_3892d8eb40cbdd76345c0e4177fbf430}{TOV} tmo)
\begin{CompactList}\small\item\em Sets the TOV converter and value for an immediate TOV. \item\end{CompactList}\item 
void \hyperlink{TOC_8h_62348e42a1e3a980bf1033848ff72c25}{TOC\_\-set\_\-x} (\hyperlink{struct__TOC}{TOC} $\ast$toc, \hyperlink{TOV_8h_cb6f86a9d57b32a9a1848d950d21571f}{TOV\_\-cvt\_\-x} fnc, \hyperlink{TOC__comdefs_8h_4fc8eab7a9466e043602161f554a2f65}{TOX} tmo)
\begin{CompactList}\small\item\em Sets the TOV converter and value for extended range timeouts. \item\end{CompactList}\item 
void \hyperlink{TOC_8h_4e93e09d405d0dd92e5f3f941ccd973d}{TOC\_\-reset\_\-tos} (\hyperlink{struct__TOC}{TOC} $\ast$toc, \hyperlink{TOC__comdefs_8h_f11a28b6d71a01ed512f1252b1f14daf}{TOS} tmo)
\begin{CompactList}\small\item\em Resets the small range timeout value. The timeout conversion routine is assumed to be have previously set using TOC\_\-set\_\-s. \item\end{CompactList}\item 
void \hyperlink{TOC_8h_d6763fac9958badcc8b5040f8fdce858}{TOC\_\-reset\_\-tov} (\hyperlink{struct__TOC}{TOC} $\ast$toc, \hyperlink{TOV_8h_8px-xxx-xxx_3892d8eb40cbdd76345c0e4177fbf430}{TOV} tmo)
\begin{CompactList}\small\item\em Resets the immediate timeout value. The timeout conversion routine is assumed to be have previously set using TOC\_\-set\_\-v. \item\end{CompactList}\item 
void \hyperlink{TOC_8h_79b9619ad40e8d7313472b44d3f5e3c7}{TOC\_\-reset\_\-tox} (\hyperlink{struct__TOC}{TOC} $\ast$toc, \hyperlink{TOC__comdefs_8h_4fc8eab7a9466e043602161f554a2f65}{TOX} tmo)
\begin{CompactList}\small\item\em Resets the extended range timeout value. The timeout conversion routine is assumed to be have previously set using TOC\_\-set\_\-x. \item\end{CompactList}\item 
\hyperlink{TOV_8h_8px-xxx-xxx_3892d8eb40cbdd76345c0e4177fbf430}{TOV} \hyperlink{TOC_8h_c196d1c14cdbe074720673c88d4446a5}{TOC\_\-compute} (const \hyperlink{struct__TOC}{TOC} $\ast$toc)
\begin{CompactList}\small\item\em Computes the timeout value (TOV) specified by the timeout control structure. \item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}
TimeOut Control, prototypes and public data structures. 

\begin{Desc}
\item[Author:]JJRussell - \href{mailto:russell@slac.stanford.edu}{\tt russell@slac.stanford.edu}\end{Desc}


\footnotesize\begin{verbatim}

    CVS $Id: TOC.h,v 1.5 2011/03/24 23:05:44 apw Exp $
\end{verbatim}
\normalsize


\begin{Desc}
\item[SYNOPSIS]Provides a set of utility functions to define a timeout control structure. This structure is passed to most all routines that requirement implement a timeout. It serves as a universal method to convert a variety of time representations to a TimeOut Value, TOV. \end{Desc}


\subsection{Typedef Documentation}
\hypertarget{TOC_8h_0cd273763f72b783550380465f268585}{
\index{TOC.h@{TOC.h}!TOC\_\-cvt\_\-s@{TOC\_\-cvt\_\-s}}
\index{TOC\_\-cvt\_\-s@{TOC\_\-cvt\_\-s}!TOC.h@{TOC.h}}
\subsubsection[{TOC\_\-cvt\_\-s}]{\setlength{\rightskip}{0pt plus 5cm}{\bf TOC\_\-cvt\_\-s}}}
\label{TOC_8h_0cd273763f72b783550380465f268585}


Typedef for struct {\em \hyperlink{struct__TOC__cvt__s}{\_\-TOC\_\-cvt\_\-s}\/}. 

This is one of the conversion styles, specified by TOC\_\-styles, e.g. {\em TOC\_\-K\_\-STYLE\_\-CVT\_\-S\/}. \hypertarget{TOC_8h_bf99afdd019dece6c7faa314a8dcb98b}{
\index{TOC.h@{TOC.h}!TOC\_\-cvt\_\-v@{TOC\_\-cvt\_\-v}}
\index{TOC\_\-cvt\_\-v@{TOC\_\-cvt\_\-v}!TOC.h@{TOC.h}}
\subsubsection[{TOC\_\-cvt\_\-v}]{\setlength{\rightskip}{0pt plus 5cm}{\bf TOC\_\-cvt\_\-v}}}
\label{TOC_8h_bf99afdd019dece6c7faa314a8dcb98b}


Typedef for struct {\em \hyperlink{struct__TOC__cvt__v}{\_\-TOC\_\-cvt\_\-v}\/}. 

This is one of the conversion styles, specified by TOC\_\-styles, e.g. {\em TOC\_\-K\_\-STYLE\_\-CVT\_\-V\/}. \hypertarget{TOC_8h_bbe9301ad2ca80e1655826d126b4a8ec}{
\index{TOC.h@{TOC.h}!TOC\_\-cvt\_\-x@{TOC\_\-cvt\_\-x}}
\index{TOC\_\-cvt\_\-x@{TOC\_\-cvt\_\-x}!TOC.h@{TOC.h}}
\subsubsection[{TOC\_\-cvt\_\-x}]{\setlength{\rightskip}{0pt plus 5cm}{\bf TOC\_\-cvt\_\-x}}}
\label{TOC_8h_bbe9301ad2ca80e1655826d126b4a8ec}


Typedef for struct {\em \hyperlink{struct__TOC__cvt__x}{\_\-TOC\_\-cvt\_\-x}\/}. 

This is one of the conversion styles, specified by TOC\_\-styles, e.g. {\em TOC\_\-K\_\-STYLE\_\-CVT\_\-X\/}. \hypertarget{TOC_8h_88c29e62e5a8b8ce6a5a493cb6aae64b}{
\index{TOC.h@{TOC.h}!TOC\_\-style@{TOC\_\-style}}
\index{TOC\_\-style@{TOC\_\-style}!TOC.h@{TOC.h}}
\subsubsection[{TOC\_\-style}]{\setlength{\rightskip}{0pt plus 5cm}{\bf TOC\_\-style}}}
\label{TOC_8h_88c29e62e5a8b8ce6a5a493cb6aae64b}


brief Typedef for enum {\em \_\-TOC\_\-style\/} 

\begin{Desc}
\item[Warning:]This is an internal only data structure. \end{Desc}


\subsection{Enumeration Type Documentation}
\hypertarget{TOC_8h_53f414e5c233515013c5ae5961c982a6}{
\index{TOC.h@{TOC.h}!\_\-TOC\_\-style@{\_\-TOC\_\-style}}
\index{\_\-TOC\_\-style@{\_\-TOC\_\-style}!TOC.h@{TOC.h}}
\subsubsection[{\_\-TOC\_\-style}]{\setlength{\rightskip}{0pt plus 5cm}enum {\bf \_\-TOC\_\-style}}}
\label{TOC_8h_53f414e5c233515013c5ae5961c982a6}


Enumerates the different way that a timeout may be specified. 

\begin{Desc}
\item[Enumerator: ]\par
\begin{description}
\index{TOC\_\-K\_\-STYLE\_\-S@{TOC\_\-K\_\-STYLE\_\-S}!TOC.h@{TOC.h}}\index{TOC.h@{TOC.h}!TOC\_\-K\_\-STYLE\_\-S@{TOC\_\-K\_\-STYLE\_\-S}}\item[{\em 
\hypertarget{TOC_8h_53f414e5c233515013c5ae5961c982a6a5849855c20011802a300fb7109544d0}{
TOC\_\-K\_\-STYLE\_\-S}
\label{TOC_8h_53f414e5c233515013c5ae5961c982a6a5849855c20011802a300fb7109544d0}
}]Convert using a TOV\_\-cvt\_\-s function \index{TOC\_\-K\_\-STYLE\_\-V@{TOC\_\-K\_\-STYLE\_\-V}!TOC.h@{TOC.h}}\index{TOC.h@{TOC.h}!TOC\_\-K\_\-STYLE\_\-V@{TOC\_\-K\_\-STYLE\_\-V}}\item[{\em 
\hypertarget{TOC_8h_53f414e5c233515013c5ae5961c982a6f750a295d2c6ec9f346214a4402ca915}{
TOC\_\-K\_\-STYLE\_\-V}
\label{TOC_8h_53f414e5c233515013c5ae5961c982a6f750a295d2c6ec9f346214a4402ca915}
}]Value is already a TOV \index{TOC\_\-K\_\-STYLE\_\-X@{TOC\_\-K\_\-STYLE\_\-X}!TOC.h@{TOC.h}}\index{TOC.h@{TOC.h}!TOC\_\-K\_\-STYLE\_\-X@{TOC\_\-K\_\-STYLE\_\-X}}\item[{\em 
\hypertarget{TOC_8h_53f414e5c233515013c5ae5961c982a6c5902b6a9132352c324e6b84ffd8d956}{
TOC\_\-K\_\-STYLE\_\-X}
\label{TOC_8h_53f414e5c233515013c5ae5961c982a6c5902b6a9132352c324e6b84ffd8d956}
}]Convert using a TOV\_\-cvt\_\-x function \end{description}
\end{Desc}



\subsection{Function Documentation}
\hypertarget{TOC_8h_c196d1c14cdbe074720673c88d4446a5}{
\index{TOC.h@{TOC.h}!TOC\_\-compute@{TOC\_\-compute}}
\index{TOC\_\-compute@{TOC\_\-compute}!TOC.h@{TOC.h}}
\subsubsection[{TOC\_\-compute}]{\setlength{\rightskip}{0pt plus 5cm}{\bf TOV} TOC\_\-compute (const {\bf TOC} $\ast$ {\em toc})}}
\label{TOC_8h_c196d1c14cdbe074720673c88d4446a5}


Computes the timeout value (TOV) specified by the timeout control structure. 

\begin{Desc}
\item[Returns:]The timeout value specified by the timeout control structure\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em toc}]The timeout control structure \end{description}
\end{Desc}


Referenced by RW\_\-\_\-tmr\_\-wait().\hypertarget{TOC_8h_4e93e09d405d0dd92e5f3f941ccd973d}{
\index{TOC.h@{TOC.h}!TOC\_\-reset\_\-tos@{TOC\_\-reset\_\-tos}}
\index{TOC\_\-reset\_\-tos@{TOC\_\-reset\_\-tos}!TOC.h@{TOC.h}}
\subsubsection[{TOC\_\-reset\_\-tos}]{\setlength{\rightskip}{0pt plus 5cm}void TOC\_\-reset\_\-tos ({\bf TOC} $\ast$ {\em toc}, \/  {\bf TOS} {\em tmo})}}
\label{TOC_8h_4e93e09d405d0dd92e5f3f941ccd973d}


Resets the small range timeout value. The timeout conversion routine is assumed to be have previously set using TOC\_\-set\_\-s. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em toc}]The target Timeout control structure. \item[{\em tmo}]The new small range timeout value to convert.\end{description}
\end{Desc}
\begin{Desc}
\item[Warning:]No check is made to assure that the conversion style is TOC\_\-K\_\-STYLE\_\-S. It is the user's responsibility to ensure this. \end{Desc}
\hypertarget{TOC_8h_d6763fac9958badcc8b5040f8fdce858}{
\index{TOC.h@{TOC.h}!TOC\_\-reset\_\-tov@{TOC\_\-reset\_\-tov}}
\index{TOC\_\-reset\_\-tov@{TOC\_\-reset\_\-tov}!TOC.h@{TOC.h}}
\subsubsection[{TOC\_\-reset\_\-tov}]{\setlength{\rightskip}{0pt plus 5cm}void TOC\_\-reset\_\-tov ({\bf TOC} $\ast$ {\em toc}, \/  {\bf TOV} {\em tmo})}}
\label{TOC_8h_d6763fac9958badcc8b5040f8fdce858}


Resets the immediate timeout value. The timeout conversion routine is assumed to be have previously set using TOC\_\-set\_\-v. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em toc}]The target Timeout control structure. \item[{\em tmo}]The new extended range timeout value to convert.\end{description}
\end{Desc}
\begin{Desc}
\item[Warning:]No check is made to assure that the conversion style is TOC\_\-K\_\-STYLE\_\-V. It is the user's responsibility to ensure this. \end{Desc}
\hypertarget{TOC_8h_79b9619ad40e8d7313472b44d3f5e3c7}{
\index{TOC.h@{TOC.h}!TOC\_\-reset\_\-tox@{TOC\_\-reset\_\-tox}}
\index{TOC\_\-reset\_\-tox@{TOC\_\-reset\_\-tox}!TOC.h@{TOC.h}}
\subsubsection[{TOC\_\-reset\_\-tox}]{\setlength{\rightskip}{0pt plus 5cm}void TOC\_\-reset\_\-tox ({\bf TOC} $\ast$ {\em toc}, \/  {\bf TOX} {\em tmo})}}
\label{TOC_8h_79b9619ad40e8d7313472b44d3f5e3c7}


Resets the extended range timeout value. The timeout conversion routine is assumed to be have previously set using TOC\_\-set\_\-x. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em toc}]The target Timeout control structure \item[{\em tmo}]The new extended range timeout value to convert.\end{description}
\end{Desc}
\begin{Desc}
\item[Warning:]No check is made to assure that the conversion style is TOC\_\-K\_\-STYLE\_\-X. It is the user's responsibility to ensure this. \end{Desc}
\hypertarget{TOC_8h_bc05db7937771439b03446205a55cc1d}{
\index{TOC.h@{TOC.h}!TOC\_\-set\_\-s@{TOC\_\-set\_\-s}}
\index{TOC\_\-set\_\-s@{TOC\_\-set\_\-s}!TOC.h@{TOC.h}}
\subsubsection[{TOC\_\-set\_\-s}]{\setlength{\rightskip}{0pt plus 5cm}void TOC\_\-set\_\-s ({\bf TOC} $\ast$ {\em toc}, \/  {\bf TOV\_\-cvt\_\-s} {\em fnc}, \/  {\bf TOS} {\em tos})}}
\label{TOC_8h_bc05db7937771439b03446205a55cc1d}


Sets the TOV converter and value for small range timeouts. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em toc}]The target Timeout control structure \item[{\em fnc}]The extended range to TOV converter function. \item[{\em tos}]The value to convert \end{description}
\end{Desc}
\hypertarget{TOC_8h_0d0cc997fdefd509ee1061e1310feeb8}{
\index{TOC.h@{TOC.h}!TOC\_\-set\_\-v@{TOC\_\-set\_\-v}}
\index{TOC\_\-set\_\-v@{TOC\_\-set\_\-v}!TOC.h@{TOC.h}}
\subsubsection[{TOC\_\-set\_\-v}]{\setlength{\rightskip}{0pt plus 5cm}void TOC\_\-set\_\-v ({\bf TOC} $\ast$ {\em toc}, \/  {\bf TOV} {\em tmo})}}
\label{TOC_8h_0d0cc997fdefd509ee1061e1310feeb8}


Sets the TOV converter and value for an immediate TOV. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em toc}]The target Timeout control structure \item[{\em tmo}]The TOV value to set. \end{description}
\end{Desc}
\hypertarget{TOC_8h_62348e42a1e3a980bf1033848ff72c25}{
\index{TOC.h@{TOC.h}!TOC\_\-set\_\-x@{TOC\_\-set\_\-x}}
\index{TOC\_\-set\_\-x@{TOC\_\-set\_\-x}!TOC.h@{TOC.h}}
\subsubsection[{TOC\_\-set\_\-x}]{\setlength{\rightskip}{0pt plus 5cm}void TOC\_\-set\_\-x ({\bf TOC} $\ast$ {\em toc}, \/  {\bf TOV\_\-cvt\_\-x} {\em fnc}, \/  {\bf TOX} {\em tmo})}}
\label{TOC_8h_62348e42a1e3a980bf1033848ff72c25}


Sets the TOV converter and value for extended range timeouts. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em toc}]The target Timeout control structure. \item[{\em fnc}]The extended range to TOV converter. \item[{\em tmo}]The extended range timeout value to convert. \end{description}
\end{Desc}
