\hypertarget{QPIG_8c}{
\section{QPIG.c File Reference}
\label{QPIG_8c}\index{QPIG.c@{QPIG.c}}
}
Manages the handling of PIG register state datagrams.  


{\tt \#include $<$QPIG\_\-p.h$>$}\par
{\tt \#include $<$QPIG/QPIG.h$>$}\par
{\tt \#include $<$QPIG/state.h$>$}\par
{\tt \#include $<$LSF/LSF.h$>$}\par
{\tt \#include $<$LSF/LSF\_\-ids.h$>$}\par
{\tt \#include $<$LSF/LSF\_\-scan.h$>$}\par
{\tt \#include $<$stdio.h$>$}\par
{\tt \#include $<$stdlib.h$>$}\par
\subsection*{Functions}
\begin{CompactItemize}
\item 
\hyperlink{struct__QPIG}{QPIG} $\ast$ \hyperlink{QPIG_8c_0415b8a381cc6a9e87298addb8278238}{QPIG\_\-alloc} (void)
\begin{CompactList}\small\item\em Allocate and construct the QPIG context block. \item\end{CompactList}\item 
unsigned int \hyperlink{QPIG_8c_7d446acf77046ab89058a0f93a38ff32}{QPIG\_\-sizeof} (void $\ast$prm)
\begin{CompactList}\small\item\em Return the size, in bytes, of the QPIG context block. \item\end{CompactList}\item 
\hyperlink{struct__QPIG}{QPIG} $\ast$ \hyperlink{QPIG_8c_5107c5ea505f1b5c472c47301a1aa680}{QPIG\_\-construct} (\hyperlink{struct__QPIG}{QPIG} $\ast$qpig, void $\ast$prm)
\begin{CompactList}\small\item\em Construct (initialize) the QPIG context block. \item\end{CompactList}\item 
void \hyperlink{QPIG_8c_ca64085fefe09ea2996bca05e61cf028}{QPIG\_\-destruct} (\hyperlink{struct__QPIG}{QPIG} $\ast$qpig)
\begin{CompactList}\small\item\em Destroy the QPIG context block. \item\end{CompactList}\item 
void \hyperlink{QPIG_8c_ac856cb3bd4b59ad7544098a4437f73f}{QPIG\_\-updateAtDatagram} (\hyperlink{struct__QPIG}{QPIG} $\ast$qpig, const LSF\_\-datagram $\ast$dgm)
\begin{CompactList}\small\item\em Update the register state information in the QPIG context. \item\end{CompactList}\item 
const \hyperlink{struct__QPIG__state}{QPIG\_\-state} $\ast$ \hyperlink{QPIG_8c_34d32f45e6c3243fc95abda06ae4dc02}{QPIG\_\-stateGet} (const \hyperlink{struct__QPIG}{QPIG} $\ast$qpig)
\begin{CompactList}\small\item\em Return the address of the QPIG register state data. \item\end{CompactList}\item 
int \hyperlink{QPIG_8c_a0b9f18d4602116478ab78ac75dcb4fe}{QPIG\_\-versionGet} (const \hyperlink{struct__QPIG}{QPIG} $\ast$qpig)
\begin{CompactList}\small\item\em Return the version of the QPIG register state data. \item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}
Manages the handling of PIG register state datagrams. 

\begin{Desc}
\item[Author:]James Swain \& Owen Saxton\end{Desc}
\begin{Desc}
\item[Id]\hyperlink{QPIG_8c}{QPIG.c},v 1.5 2011/03/29 20:29:04 saxton Exp \end{Desc}


\subsection{Function Documentation}
\hypertarget{QPIG_8c_0415b8a381cc6a9e87298addb8278238}{
\index{QPIG.c@{QPIG.c}!QPIG\_\-alloc@{QPIG\_\-alloc}}
\index{QPIG\_\-alloc@{QPIG\_\-alloc}!QPIG.c@{QPIG.c}}
\subsubsection[{QPIG\_\-alloc}]{\setlength{\rightskip}{0pt plus 5cm}{\bf QPIG}$\ast$ QPIG\_\-alloc (void)}}
\label{QPIG_8c_0415b8a381cc6a9e87298addb8278238}


Allocate and construct the QPIG context block. 

\begin{Desc}
\item[Returns:]A pointer to the new QPIG context block (context handle) \end{Desc}


References QPIG\_\-construct().\hypertarget{QPIG_8c_5107c5ea505f1b5c472c47301a1aa680}{
\index{QPIG.c@{QPIG.c}!QPIG\_\-construct@{QPIG\_\-construct}}
\index{QPIG\_\-construct@{QPIG\_\-construct}!QPIG.c@{QPIG.c}}
\subsubsection[{QPIG\_\-construct}]{\setlength{\rightskip}{0pt plus 5cm}{\bf QPIG}$\ast$ QPIG\_\-construct ({\bf QPIG} $\ast$ {\em qpig}, \/  void $\ast$ {\em prm})}}
\label{QPIG_8c_5107c5ea505f1b5c472c47301a1aa680}


Construct (initialize) the QPIG context block. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em qpig}]The block to initialize; if specified as NULL, one will be allocated.\item[{\em prm}]A run-time set parameter used to stylize the configuration (not used)\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]The QPIG context handle \end{Desc}


References \_\-QPIG::free, QPIG\_\-constructState(), QPIG\_\-sizeof(), \_\-QPIG::state, and \_\-QPIG::version.

Referenced by QPIG\_\-alloc().\hypertarget{QPIG_8c_ca64085fefe09ea2996bca05e61cf028}{
\index{QPIG.c@{QPIG.c}!QPIG\_\-destruct@{QPIG\_\-destruct}}
\index{QPIG\_\-destruct@{QPIG\_\-destruct}!QPIG.c@{QPIG.c}}
\subsubsection[{QPIG\_\-destruct}]{\setlength{\rightskip}{0pt plus 5cm}void QPIG\_\-destruct ({\bf QPIG} $\ast$ {\em qpig})}}
\label{QPIG_8c_ca64085fefe09ea2996bca05e61cf028}


Destroy the QPIG context block. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em qpig}]The QPIG context handle. \end{description}
\end{Desc}


References \_\-QPIG::free.\hypertarget{QPIG_8c_7d446acf77046ab89058a0f93a38ff32}{
\index{QPIG.c@{QPIG.c}!QPIG\_\-sizeof@{QPIG\_\-sizeof}}
\index{QPIG\_\-sizeof@{QPIG\_\-sizeof}!QPIG.c@{QPIG.c}}
\subsubsection[{QPIG\_\-sizeof}]{\setlength{\rightskip}{0pt plus 5cm}unsigned int QPIG\_\-sizeof (void $\ast$ {\em prm})}}
\label{QPIG_8c_7d446acf77046ab89058a0f93a38ff32}


Return the size, in bytes, of the QPIG context block. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em prm}]A run-time set parameter used to stylize the configuration\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]The size, in bytes, of the context block \end{Desc}


Referenced by QPIG\_\-construct().\hypertarget{QPIG_8c_34d32f45e6c3243fc95abda06ae4dc02}{
\index{QPIG.c@{QPIG.c}!QPIG\_\-stateGet@{QPIG\_\-stateGet}}
\index{QPIG\_\-stateGet@{QPIG\_\-stateGet}!QPIG.c@{QPIG.c}}
\subsubsection[{QPIG\_\-stateGet}]{\setlength{\rightskip}{0pt plus 5cm}const {\bf QPIG\_\-state}$\ast$ QPIG\_\-stateGet (const {\bf QPIG} $\ast$ {\em qpig})}}
\label{QPIG_8c_34d32f45e6c3243fc95abda06ae4dc02}


Return the address of the QPIG register state data. 

This routine is just an accessor to keep the structure of QPIG private.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em qpig}]The QPIG context handle\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]A pointer to the QPIG register state data \end{Desc}


References \_\-QPIG::state.\hypertarget{QPIG_8c_ac856cb3bd4b59ad7544098a4437f73f}{
\index{QPIG.c@{QPIG.c}!QPIG\_\-updateAtDatagram@{QPIG\_\-updateAtDatagram}}
\index{QPIG\_\-updateAtDatagram@{QPIG\_\-updateAtDatagram}!QPIG.c@{QPIG.c}}
\subsubsection[{QPIG\_\-updateAtDatagram}]{\setlength{\rightskip}{0pt plus 5cm}void QPIG\_\-updateAtDatagram ({\bf QPIG} $\ast$ {\em qpig}, \/  const LSF\_\-datagram $\ast$ {\em dgm})}}
\label{QPIG_8c_ac856cb3bd4b59ad7544098a4437f73f}


Update the register state information in the QPIG context. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em qpig}]The QPIG context handle\item[{\em dgm}]The PIG register state datagram \end{description}
\end{Desc}


References QPIG\_\-recoverState(), \_\-QPIG::state, and \_\-QPIG::version.\hypertarget{QPIG_8c_a0b9f18d4602116478ab78ac75dcb4fe}{
\index{QPIG.c@{QPIG.c}!QPIG\_\-versionGet@{QPIG\_\-versionGet}}
\index{QPIG\_\-versionGet@{QPIG\_\-versionGet}!QPIG.c@{QPIG.c}}
\subsubsection[{QPIG\_\-versionGet}]{\setlength{\rightskip}{0pt plus 5cm}int QPIG\_\-versionGet (const {\bf QPIG} $\ast$ {\em qpig})}}
\label{QPIG_8c_a0b9f18d4602116478ab78ac75dcb4fe}


Return the version of the QPIG register state data. 

This routine is just an accessor to keep the structure of QPIG private.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em qpig}]The QPIG context handle\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]The version of the QPIG register state data \end{Desc}


References \_\-QPIG::version.