\hypertarget{QSTD_8c}{
\section{QSTD.c File Reference}
\label{QSTD_8c}\index{QSTD.c@{QSTD.c}}
}
Decodes the Science Statistics (Physics) for the handlers. 

{\tt \#include \char`\"{}QSSP/QSTD.h\char`\"{}}\par
{\tt \#include \char`\"{}QSSP/QSSP\_\-span.h\char`\"{}}\par
{\tt \#include \char`\"{}QSSP/QSTD\_\-labels.h\char`\"{}}\par
{\tt \#include \char`\"{}QSTD\_\-pvtdefs.h\char`\"{}}\par
{\tt \#include \char`\"{}dprintf.h\char`\"{}}\par
{\tt \#include \char`\"{}QSP/QFCP\_\-cache.h\char`\"{}}\par
{\tt \#include \char`\"{}QSD/QFR\_\-file.h\char`\"{}}\par
{\tt \#include \char`\"{}QSD/QFC\_\-member.h\char`\"{}}\par
{\tt \#include \char`\"{}EFC/EFS\_\-ids.h\char`\"{}}\par
{\tt \#include \char`\"{}LSF/LSF.h\char`\"{}}\par
{\tt \#include \char`\"{}LSF/LSF\_\-scan.h\char`\"{}}\par
{\tt \#include \char`\"{}LSF/LSF\_\-reason.h\char`\"{}}\par
{\tt \#include \char`\"{}LDT/BFU.h\char`\"{}}\par
{\tt \#include $<$string.h$>$}\par
{\tt \#include $<$stdlib.h$>$}\par


Include dependency graph for QSTD.c:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=349pt]{QSTD_8c__incl}
\end{center}
\end{figure}
\subsection*{Defines}
\begin{CompactItemize}
\item 
\hypertarget{QSTD_8c_a0}{
\#define {\bf RND\_\-8}(\_\-v)~((\_\-v + 7) \& $\sim$0x7)}
\label{QSTD_8c_a0}

\end{CompactItemize}
\subsection*{Typedefs}
\begin{CompactItemize}
\item 
typedef const unsigned int $\ast$($\ast$ \hyperlink{QSTD_8c_a1}{Decode\-Sample\-V0} )(\hyperlink{struct__QSTD}{QSTD} $\ast$qstd, \hyperlink{struct__QSTD__sampleV0}{QSTD\_\-sample\-V0} $\ast$sample, const unsigned int $\ast$dat, unsigned char bridge)
\begin{CompactList}\small\item\em Signature to decode a statistics sample from the input data. \item\end{CompactList}\end{CompactItemize}
\subsection*{Functions}
\begin{CompactItemize}
\item 
static \_\-\_\-inline QFCP\_\-cache $\ast$ \hyperlink{QSTD_8c_a2}{qstd\_\-file\_\-cache\_\-get} (void)
\begin{CompactList}\small\item\em Returns a pointer to the file cache. \item\end{CompactList}\item 
static const unsigned int $\ast$ \hyperlink{QSTD_8c_a3}{decode\_\-stats\-V0\_\-norm} (\hyperlink{struct__QSTD}{QSTD} $\ast$qstd, \hyperlink{struct__QSTD__statisticsV0}{QSTD\_\-statistics\-V0} $\ast$stats, const unsigned int $\ast$dat, unsigned char bridge)
\begin{CompactList}\small\item\em Decodes a normal (not differenced) statistics record. \item\end{CompactList}\item 
static const unsigned int $\ast$ \hyperlink{QSTD_8c_a4}{decode\_\-stats\-V0\_\-diff} (\hyperlink{struct__QSTD}{QSTD} $\ast$qstd, \hyperlink{struct__QSTD__statisticsV0}{QSTD\_\-statistics\-V0} $\ast$stats, const unsigned int $\ast$dat, unsigned char bridge)
\begin{CompactList}\small\item\em Decodes the statistics in difference format. \item\end{CompactList}\item 
static const unsigned int $\ast$ \hyperlink{QSTD_8c_a5}{decode\_\-sample\-V0\_\-0} (\hyperlink{struct__QSTD}{QSTD} $\ast$qstd, \hyperlink{struct__QSTD__sampleV0}{QSTD\_\-sample\-V0} $\ast$sample, const unsigned int $\ast$dat, unsigned char bridge)
\begin{CompactList}\small\item\em Decodes a format 0 sample record. \item\end{CompactList}\item 
static const unsigned int $\ast$ \hyperlink{QSTD_8c_a6}{decode\_\-sample\-V0\_\-1} (\hyperlink{struct__QSTD}{QSTD} $\ast$qstd, \hyperlink{struct__QSTD__sampleV0}{QSTD\_\-sample\-V0} $\ast$sample, const unsigned int $\ast$dat, unsigned char bridge)
\begin{CompactList}\small\item\em Decodes a format 1 sample record. \item\end{CompactList}\item 
static const unsigned int $\ast$ \hyperlink{QSTD_8c_a7}{decode\_\-sample\-V0\_\-2} (\hyperlink{struct__QSTD}{QSTD} $\ast$qstd, \hyperlink{struct__QSTD__sampleV0}{QSTD\_\-sample\-V0} $\ast$sample, const unsigned int $\ast$dat, unsigned char bridge)
\begin{CompactList}\small\item\em Decodes a format 2 sample record. \item\end{CompactList}\item 
\hyperlink{struct__QSTD}{QSTD} $\ast$ \hyperlink{QSTD_8c_a8}{QSTD\_\-alloc} (void $\ast$must\_\-be\_\-null)
\begin{CompactList}\small\item\em Allocates and constructs a QSTD handle. \item\end{CompactList}\item 
\hyperlink{struct__QSTD}{QSTD} $\ast$ \hyperlink{QSTD_8c_a9}{QSTD\_\-construct} (\hyperlink{struct__QSTD}{QSTD} $\ast$qstd, void $\ast$must\_\-be\_\-null)
\begin{CompactList}\small\item\em The constructor for a QSTD control structure. \item\end{CompactList}\item 
void \hyperlink{QSTD_8c_a10}{QSTD\_\-destruct} (\hyperlink{struct__QSTD}{QSTD} $\ast$qstd)
\begin{CompactList}\small\item\em The destructor for a QSTD control structure. \item\end{CompactList}\item 
const \hyperlink{struct__QSTD__ctx}{QSTD\_\-ctx} $\ast$ \hyperlink{QSTD_8c_a11}{QSTD\_\-ctx\-Get} (const \hyperlink{struct__QSTD}{QSTD} $\ast$qstd)
\begin{CompactList}\small\item\em Locates the statistics context (meta-data). \item\end{CompactList}\item 
int \hyperlink{QSTD_8c_a12}{QSTD\_\-sizeof} (void $\ast$must\_\-be\_\-null)
\begin{CompactList}\small\item\em Returns the size, in bytes, of a QSTD control structure. \item\end{CompactList}\item 
const LSF\_\-contribution $\ast$ \hyperlink{QSTD_8c_a13}{QSTD\_\-update\-At\-Datagram} (\hyperlink{struct__QSTD}{QSTD} $\ast$qstd, const LSF\_\-datagram $\ast$dgm)
\begin{CompactList}\small\item\em Updates the context at datagram time. \item\end{CompactList}\item 
int \hyperlink{QSTD_8c_a14}{QSTD\_\-update\-At\-Contribution} (\hyperlink{struct__QSTD}{QSTD} $\ast$qstd, const LSF\_\-contribution $\ast$ctb)
\begin{CompactList}\small\item\em Updates the context at datagram time. \item\end{CompactList}\item 
static \_\-\_\-inline void \hyperlink{QSTD_8c_a15}{qstd\_\-sample\-V0\_\-add} (\hyperlink{struct__QSTD__sampleV0}{QSTD\_\-sample\-V0} $\ast$dst, const \hyperlink{struct__QSTD__sampleV0}{QSTD\_\-sample\-V0} $\ast$src)
\begin{CompactList}\small\item\em Adds the source sample to the destination sample. \item\end{CompactList}\item 
static \_\-\_\-inline int \hyperlink{QSTD_8c_a16}{qstd\_\-sample\-V0\_\-decode} (\hyperlink{struct__QSTD}{QSTD} $\ast$qstd, unsigned int type\_\-id, unsigned char bridge, const unsigned int $\ast$dat)
\begin{CompactList}\small\item\em Decodes the statistics data. \item\end{CompactList}\item 
int \hyperlink{QSTD_8c_a17}{QSTD\_\-update\-At\-Record} (\hyperlink{struct__QSTD}{QSTD} $\ast$qstd, const LSF\_\-record $\ast$rec)
\begin{CompactList}\small\item\em Updates the context at record time. \item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}
Decodes the Science Statistics (Physics) for the handlers. 

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


\footnotesize\begin{verbatim}   CVS $Id: QSTD.c,v 1.1 2008/06/10 22:25:45 russell Exp $
\end{verbatim}
\normalsize


\subsection{Typedef Documentation}
\hypertarget{QSTD_8c_a1}{
\index{QSTD.c@{QSTD.c}!DecodeSampleV0@{DecodeSampleV0}}
\index{DecodeSampleV0@{DecodeSampleV0}!QSTD.c@{QSTD.c}}
\subsubsection[DecodeSampleV0]{\setlength{\rightskip}{0pt plus 5cm}const unsigned int $\ast$($\ast$ \hyperlink{QSTD_8c_a1}{Decode\-Sample\-V0})(\hyperlink{struct__QSTD}{QSTD} $\ast$qstd, \hyperlink{struct__QSTD__sampleV0}{QSTD\_\-sample\-V0} $\ast$sample, const unsigned int $\ast$dat, unsigned char bridge)}}
\label{QSTD_8c_a1}


Signature to decode a statistics sample from the input data. 

\begin{Desc}
\item[Returns:]The next decode location\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em qstd}]The QSTD context handle \item[{\em sample}]The structure to receive the decoded data from \item[{\em dat}]The input data \item[{\em bridge}]The bridge word, contains decoding options\end{description}
\end{Desc}


\subsection{Function Documentation}
\hypertarget{QSTD_8c_a5}{
\index{QSTD.c@{QSTD.c}!decode_sampleV0_0@{decode\_\-sampleV0\_\-0}}
\index{decode_sampleV0_0@{decode\_\-sampleV0\_\-0}!QSTD.c@{QSTD.c}}
\subsubsection[decode\_\-sampleV0\_\-0]{\setlength{\rightskip}{0pt plus 5cm}static const unsigned int $\ast$ decode\_\-sample\-V0\_\-0 (\hyperlink{struct__QSTD}{QSTD} $\ast$ {\em qstd}, \hyperlink{struct__QSTD__sampleV0}{QSTD\_\-sample\-V0} $\ast$ {\em sample}, const unsigned int $\ast$ {\em dat}, unsigned char {\em bridge})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{QSTD_8c_a5}


Decodes a format 0 sample record. 

\begin{Desc}
\item[Returns:]The next address to decode from\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em qstd}]The decoding context \item[{\em sample}]The data structure to receive the decoded statistics \item[{\em dat}]The statistics data \item[{\em bridge}]The record's bridge word\end{description}
\end{Desc}
\hypertarget{QSTD_8c_a6}{
\index{QSTD.c@{QSTD.c}!decode_sampleV0_1@{decode\_\-sampleV0\_\-1}}
\index{decode_sampleV0_1@{decode\_\-sampleV0\_\-1}!QSTD.c@{QSTD.c}}
\subsubsection[decode\_\-sampleV0\_\-1]{\setlength{\rightskip}{0pt plus 5cm}static const unsigned int $\ast$ decode\_\-sample\-V0\_\-1 (\hyperlink{struct__QSTD}{QSTD} $\ast$ {\em qstd}, \hyperlink{struct__QSTD__sampleV0}{QSTD\_\-sample\-V0} $\ast$ {\em sample}, const unsigned int $\ast$ {\em dat}, unsigned char {\em bridge})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{QSTD_8c_a6}


Decodes a format 1 sample record. 

\begin{Desc}
\item[Returns:]The next address to decode from\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em qstd}]The decoding context \item[{\em sample}]The data structure to receive the decoded statistics \item[{\em dat}]The statistics data \item[{\em bridge}]The record's bridge word\end{description}
\end{Desc}
\hypertarget{QSTD_8c_a7}{
\index{QSTD.c@{QSTD.c}!decode_sampleV0_2@{decode\_\-sampleV0\_\-2}}
\index{decode_sampleV0_2@{decode\_\-sampleV0\_\-2}!QSTD.c@{QSTD.c}}
\subsubsection[decode\_\-sampleV0\_\-2]{\setlength{\rightskip}{0pt plus 5cm}static const unsigned int $\ast$ decode\_\-sample\-V0\_\-2 (\hyperlink{struct__QSTD}{QSTD} $\ast$ {\em qstd}, \hyperlink{struct__QSTD__sampleV0}{QSTD\_\-sample\-V0} $\ast$ {\em sample}, const unsigned int $\ast$ {\em dat}, unsigned char {\em bridge})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{QSTD_8c_a7}


Decodes a format 2 sample record. 

\begin{Desc}
\item[Returns:]The next address to decode from\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em qstd}]The decoding context \item[{\em sample}]The data structure to receive the decoded statistics \item[{\em dat}]The statistics data \item[{\em bridge}]The record's bridge word\end{description}
\end{Desc}
\hypertarget{QSTD_8c_a4}{
\index{QSTD.c@{QSTD.c}!decode_statsV0_diff@{decode\_\-statsV0\_\-diff}}
\index{decode_statsV0_diff@{decode\_\-statsV0\_\-diff}!QSTD.c@{QSTD.c}}
\subsubsection[decode\_\-statsV0\_\-diff]{\setlength{\rightskip}{0pt plus 5cm}static const unsigned int $\ast$ decode\_\-stats\-V0\_\-diff (\hyperlink{struct__QSTD}{QSTD} $\ast$ {\em qstd}, \hyperlink{struct__QSTD__statisticsV0}{QSTD\_\-statistics\-V0} $\ast$ {\em stats}, const unsigned int $\ast$ {\em dat}, unsigned char {\em bridge})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{QSTD_8c_a4}


Decodes the statistics in difference format. 

\begin{Desc}
\item[Returns:]The next address to decode from\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em qstd}]The decoding context \item[{\em stats}]The data structure to receive the decoded statistics \item[{\em dat}]The statistics data \item[{\em bridge}]The record's bridge word\end{description}
\end{Desc}
\hypertarget{QSTD_8c_a3}{
\index{QSTD.c@{QSTD.c}!decode_statsV0_norm@{decode\_\-statsV0\_\-norm}}
\index{decode_statsV0_norm@{decode\_\-statsV0\_\-norm}!QSTD.c@{QSTD.c}}
\subsubsection[decode\_\-statsV0\_\-norm]{\setlength{\rightskip}{0pt plus 5cm}static const unsigned int $\ast$ decode\_\-stats\-V0\_\-norm (\hyperlink{struct__QSTD}{QSTD} $\ast$ {\em qstd}, \hyperlink{struct__QSTD__statisticsV0}{QSTD\_\-statistics\-V0} $\ast$ {\em stats}, const unsigned int $\ast$ {\em dat}, unsigned char {\em bridge})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{QSTD_8c_a3}


Decodes a normal (not differenced) statistics record. 

\begin{Desc}
\item[Returns:]The next address to decode from\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em qstd}]The decoding context \item[{\em stats}]The data structure to receive the decoded statistics \item[{\em dat}]The statistics data \item[{\em bridge}]The record's bridge word\end{description}
\end{Desc}
\hypertarget{QSTD_8c_a8}{
\index{QSTD.c@{QSTD.c}!QSTD_alloc@{QSTD\_\-alloc}}
\index{QSTD_alloc@{QSTD\_\-alloc}!QSTD.c@{QSTD.c}}
\subsubsection[QSTD\_\-alloc]{\setlength{\rightskip}{0pt plus 5cm}\hyperlink{struct__QSTD}{QSTD} $\ast$ QSTD\_\-alloc (void $\ast$ {\em must\_\-be\_\-null})}}
\label{QSTD_8c_a8}


Allocates and constructs a QSTD handle. 

\begin{Desc}
\item[Returns:]Pointer to the allocated handle\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em must\_\-be\_\-null}]Reserved for future use.\end{description}
\end{Desc}
\hypertarget{QSTD_8c_a9}{
\index{QSTD.c@{QSTD.c}!QSTD_construct@{QSTD\_\-construct}}
\index{QSTD_construct@{QSTD\_\-construct}!QSTD.c@{QSTD.c}}
\subsubsection[QSTD\_\-construct]{\setlength{\rightskip}{0pt plus 5cm}\hyperlink{struct__QSTD}{QSTD} $\ast$ QSTD\_\-construct (\hyperlink{struct__QSTD}{QSTD} $\ast$ {\em qstd}, void $\ast$ {\em must\_\-be\_\-null})}}
\label{QSTD_8c_a9}


The constructor for a QSTD control structure. 

\begin{Desc}
\item[Returns:]Pointer to the QSTD control structure\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em qstd}]The control structure to be constructed. If NULL, a control structure will be allocated \item[{\em must\_\-be\_\-null}]Reserved for future use.\end{description}
\end{Desc}
\hypertarget{QSTD_8c_a11}{
\index{QSTD.c@{QSTD.c}!QSTD_ctxGet@{QSTD\_\-ctxGet}}
\index{QSTD_ctxGet@{QSTD\_\-ctxGet}!QSTD.c@{QSTD.c}}
\subsubsection[QSTD\_\-ctxGet]{\setlength{\rightskip}{0pt plus 5cm}const \hyperlink{struct__QSTD__ctx}{QSTD\_\-ctx} $\ast$ QSTD\_\-ctx\-Get (const \hyperlink{struct__QSTD}{QSTD} $\ast$ {\em qstd})}}
\label{QSTD_8c_a11}


Locates the statistics context (meta-data). 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em qstd}]The statistics context\end{description}
\end{Desc}
\hypertarget{QSTD_8c_a10}{
\index{QSTD.c@{QSTD.c}!QSTD_destruct@{QSTD\_\-destruct}}
\index{QSTD_destruct@{QSTD\_\-destruct}!QSTD.c@{QSTD.c}}
\subsubsection[QSTD\_\-destruct]{\setlength{\rightskip}{0pt plus 5cm}void QSTD\_\-destruct (\hyperlink{struct__QSTD}{QSTD} $\ast$ {\em qstd})}}
\label{QSTD_8c_a10}


The destructor for a QSTD control structure. 

\begin{Desc}
\item[Returns:]Pointer to the QSS control structure\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em qstd}]The control structure to be destructed.\end{description}
\end{Desc}
\hypertarget{QSTD_8c_a2}{
\index{QSTD.c@{QSTD.c}!qstd_file_cache_get@{qstd\_\-file\_\-cache\_\-get}}
\index{qstd_file_cache_get@{qstd\_\-file\_\-cache\_\-get}!QSTD.c@{QSTD.c}}
\subsubsection[qstd\_\-file\_\-cache\_\-get]{\setlength{\rightskip}{0pt plus 5cm}static \_\-\_\-inline QFCP\_\-cache $\ast$ qstd\_\-file\_\-cache\_\-get (void)\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{QSTD_8c_a2}


Returns a pointer to the file cache. 

\begin{Desc}
\item[Returns:]The file cache\end{Desc}
This routine return the handle, creating it if necessary. This not really the right architecture. This needs to be part of a QSS global environment. This can't be accomplished at this time because it would require a backwardly incompatiable change to QSSP\_\-construct.\hypertarget{QSTD_8c_a15}{
\index{QSTD.c@{QSTD.c}!qstd_sampleV0_add@{qstd\_\-sampleV0\_\-add}}
\index{qstd_sampleV0_add@{qstd\_\-sampleV0\_\-add}!QSTD.c@{QSTD.c}}
\subsubsection[qstd\_\-sampleV0\_\-add]{\setlength{\rightskip}{0pt plus 5cm}static \_\-\_\-inline void qstd\_\-sample\-V0\_\-add (\hyperlink{struct__QSTD__sampleV0}{QSTD\_\-sample\-V0} $\ast$ {\em dst}, const \hyperlink{struct__QSTD__sampleV0}{QSTD\_\-sample\-V0} $\ast$ {\em src})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{QSTD_8c_a15}


Adds the source sample to the destination sample. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em dst}]The destination sample \item[{\em src}]The source sample\end{description}
\end{Desc}
\hypertarget{QSTD_8c_a16}{
\index{QSTD.c@{QSTD.c}!qstd_sampleV0_decode@{qstd\_\-sampleV0\_\-decode}}
\index{qstd_sampleV0_decode@{qstd\_\-sampleV0\_\-decode}!QSTD.c@{QSTD.c}}
\subsubsection[qstd\_\-sampleV0\_\-decode]{\setlength{\rightskip}{0pt plus 5cm}static \_\-\_\-inline int qstd\_\-sample\-V0\_\-decode (\hyperlink{struct__QSTD}{QSTD} $\ast$ {\em qstd}, unsigned int {\em type\_\-id}, unsigned char {\em bridge}, const unsigned int $\ast$ {\em dat})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{QSTD_8c_a16}


Decodes the statistics data. 

\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em If}]not negative, then the sample type (QSTD\_\-TYPE\_\-K) \item[{\em If}]negative\end{description}
\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em qstd}]The QSTD context handle \item[{\em type\_\-id}]0 = just the set of values 1 = the difference between the current and last set \item[{\em bridge}]bit 0 0 = normal record; 1 = global record \item[{\em dat}]The statistics data\end{description}
\end{Desc}
\hypertarget{QSTD_8c_a12}{
\index{QSTD.c@{QSTD.c}!QSTD_sizeof@{QSTD\_\-sizeof}}
\index{QSTD_sizeof@{QSTD\_\-sizeof}!QSTD.c@{QSTD.c}}
\subsubsection[QSTD\_\-sizeof]{\setlength{\rightskip}{0pt plus 5cm}int QSTD\_\-sizeof (void $\ast$ {\em must\_\-be\_\-null})}}
\label{QSTD_8c_a12}


Returns the size, in bytes, of a QSTD control structure. 

\begin{Desc}
\item[Returns:]The size, in bytes, of a QSTD control structure\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em must\_\-be\_\-null}]Parameter reserved for future use\end{description}
\end{Desc}
\hypertarget{QSTD_8c_a14}{
\index{QSTD.c@{QSTD.c}!QSTD_updateAtContribution@{QSTD\_\-updateAtContribution}}
\index{QSTD_updateAtContribution@{QSTD\_\-updateAtContribution}!QSTD.c@{QSTD.c}}
\subsubsection[QSTD\_\-updateAtContribution]{\setlength{\rightskip}{0pt plus 5cm}int QSTD\_\-update\-At\-Contribution (\hyperlink{struct__QSTD}{QSTD} $\ast$ {\em qstd}, const LSF\_\-contribution $\ast$ {\em ctb})}}
\label{QSTD_8c_a14}


Updates the context at datagram time. 

\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em If}]have a statistics sample contribution, the number of records in the contribution. \item[{\em $>$0,if}]have a record contributor \item[{\em =0,if}]have the contribution context \item[{\em -1,if}]unrecognized\end{description}
\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em qstd}]The statistics context to update. \item[{\em ctb}]The statistics contribution\end{description}
\end{Desc}
\hypertarget{QSTD_8c_a13}{
\index{QSTD.c@{QSTD.c}!QSTD_updateAtDatagram@{QSTD\_\-updateAtDatagram}}
\index{QSTD_updateAtDatagram@{QSTD\_\-updateAtDatagram}!QSTD.c@{QSTD.c}}
\subsubsection[QSTD\_\-updateAtDatagram]{\setlength{\rightskip}{0pt plus 5cm}const LSF\_\-contribution $\ast$ QSTD\_\-update\-At\-Datagram (\hyperlink{struct__QSTD}{QSTD} $\ast$ {\em qstd}, const LSF\_\-datagram $\ast$ {\em dgm})}}
\label{QSTD_8c_a13}


Updates the context at datagram time. 

\begin{Desc}
\item[Returns:]The contribution to resume processsing at\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em qstd}]The statistics context to update. \item[{\em dgm}]The statistics datagram\end{description}
\end{Desc}
\hypertarget{QSTD_8c_a17}{
\index{QSTD.c@{QSTD.c}!QSTD_updateAtRecord@{QSTD\_\-updateAtRecord}}
\index{QSTD_updateAtRecord@{QSTD\_\-updateAtRecord}!QSTD.c@{QSTD.c}}
\subsubsection[QSTD\_\-updateAtRecord]{\setlength{\rightskip}{0pt plus 5cm}int QSTD\_\-update\-At\-Record (\hyperlink{struct__QSTD}{QSTD} $\ast$ {\em qstd}, const LSF\_\-record $\ast$ {\em rec})}}
\label{QSTD_8c_a17}


Updates the context at record time. 

\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em Non-negative}]values indicate are one of the QSTD\_\-type's \item[{\em Negative}]values indicate an unsuccessful update\end{description}
\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em qstd}]The statistics context to update. \item[{\em rec}]The statistics record\end{description}
\end{Desc}
