\hypertarget{QPIG_8h}{
\section{QPIG.h File Reference}
\label{QPIG_8h}\index{QPIG.h@{QPIG.h}}
}
Interface to power state updating routines.  


{\tt \#include $<$QPIG/state.h$>$}\par
{\tt \#include $<$LSF/LSF.h$>$}\par
\subsection*{Typedefs}
\begin{CompactItemize}
\item 
\hypertarget{QPIG_8h_57cea3bf06d8521d8966d7c8b914496c}{
typedef struct \hyperlink{struct__QPIG}{\_\-QPIG} \hyperlink{QPIG_8h_57cea3bf06d8521d8966d7c8b914496c}{QPIG}}
\label{QPIG_8h_57cea3bf06d8521d8966d7c8b914496c}

\begin{CompactList}\small\item\em Data type for QPIG context block. \item\end{CompactList}\end{CompactItemize}
\subsection*{Functions}
\begin{CompactItemize}
\item 
\hyperlink{struct__QPIG}{QPIG} $\ast$ \hyperlink{QPIG_8h_0415b8a381cc6a9e87298addb8278238}{QPIG\_\-alloc} (void)
\begin{CompactList}\small\item\em Allocate and construct the QPIG context block. \item\end{CompactList}\item 
\hyperlink{struct__QPIG}{QPIG} $\ast$ \hyperlink{QPIG_8h_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_8h_ca64085fefe09ea2996bca05e61cf028}{QPIG\_\-destruct} (\hyperlink{struct__QPIG}{QPIG} $\ast$qpig)
\begin{CompactList}\small\item\em Destroy the QPIG context block. \item\end{CompactList}\item 
unsigned int \hyperlink{QPIG_8h_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 
const \hyperlink{struct__QPIG__state}{QPIG\_\-state} $\ast$ \hyperlink{QPIG_8h_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 
void \hyperlink{QPIG_8h_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 
int \hyperlink{QPIG_8h_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}
Interface to power state updating routines. 

\begin{Desc}
\item[Author:]James Swain \& Owen Saxton\end{Desc}
\begin{Desc}
\item[Id]\hyperlink{QPIG_8h}{QPIG.h},v 1.4 2011/03/29 20:25:28 saxton Exp \end{Desc}


\subsection{Function Documentation}
\hypertarget{QPIG_8h_0415b8a381cc6a9e87298addb8278238}{
\index{QPIG.h@{QPIG.h}!QPIG\_\-alloc@{QPIG\_\-alloc}}
\index{QPIG\_\-alloc@{QPIG\_\-alloc}!QPIG.h@{QPIG.h}}
\subsubsection[{QPIG\_\-alloc}]{\setlength{\rightskip}{0pt plus 5cm}{\bf QPIG}$\ast$ QPIG\_\-alloc (void)}}
\label{QPIG_8h_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_8h_5107c5ea505f1b5c472c47301a1aa680}{
\index{QPIG.h@{QPIG.h}!QPIG\_\-construct@{QPIG\_\-construct}}
\index{QPIG\_\-construct@{QPIG\_\-construct}!QPIG.h@{QPIG.h}}
\subsubsection[{QPIG\_\-construct}]{\setlength{\rightskip}{0pt plus 5cm}{\bf QPIG}$\ast$ QPIG\_\-construct ({\bf QPIG} $\ast$ {\em qpig}, \/  void $\ast$ {\em prm})}}
\label{QPIG_8h_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_8h_ca64085fefe09ea2996bca05e61cf028}{
\index{QPIG.h@{QPIG.h}!QPIG\_\-destruct@{QPIG\_\-destruct}}
\index{QPIG\_\-destruct@{QPIG\_\-destruct}!QPIG.h@{QPIG.h}}
\subsubsection[{QPIG\_\-destruct}]{\setlength{\rightskip}{0pt plus 5cm}void QPIG\_\-destruct ({\bf QPIG} $\ast$ {\em qpig})}}
\label{QPIG_8h_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_8h_7d446acf77046ab89058a0f93a38ff32}{
\index{QPIG.h@{QPIG.h}!QPIG\_\-sizeof@{QPIG\_\-sizeof}}
\index{QPIG\_\-sizeof@{QPIG\_\-sizeof}!QPIG.h@{QPIG.h}}
\subsubsection[{QPIG\_\-sizeof}]{\setlength{\rightskip}{0pt plus 5cm}unsigned int QPIG\_\-sizeof (void $\ast$ {\em prm})}}
\label{QPIG_8h_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_8h_34d32f45e6c3243fc95abda06ae4dc02}{
\index{QPIG.h@{QPIG.h}!QPIG\_\-stateGet@{QPIG\_\-stateGet}}
\index{QPIG\_\-stateGet@{QPIG\_\-stateGet}!QPIG.h@{QPIG.h}}
\subsubsection[{QPIG\_\-stateGet}]{\setlength{\rightskip}{0pt plus 5cm}const {\bf QPIG\_\-state}$\ast$ QPIG\_\-stateGet (const {\bf QPIG} $\ast$ {\em qpig})}}
\label{QPIG_8h_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_8h_ac856cb3bd4b59ad7544098a4437f73f}{
\index{QPIG.h@{QPIG.h}!QPIG\_\-updateAtDatagram@{QPIG\_\-updateAtDatagram}}
\index{QPIG\_\-updateAtDatagram@{QPIG\_\-updateAtDatagram}!QPIG.h@{QPIG.h}}
\subsubsection[{QPIG\_\-updateAtDatagram}]{\setlength{\rightskip}{0pt plus 5cm}void QPIG\_\-updateAtDatagram ({\bf QPIG} $\ast$ {\em qpig}, \/  const LSF\_\-datagram $\ast$ {\em dgm})}}
\label{QPIG_8h_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_8h_a0b9f18d4602116478ab78ac75dcb4fe}{
\index{QPIG.h@{QPIG.h}!QPIG\_\-versionGet@{QPIG\_\-versionGet}}
\index{QPIG\_\-versionGet@{QPIG\_\-versionGet}!QPIG.h@{QPIG.h}}
\subsubsection[{QPIG\_\-versionGet}]{\setlength{\rightskip}{0pt plus 5cm}int QPIG\_\-versionGet (const {\bf QPIG} $\ast$ {\em qpig})}}
\label{QPIG_8h_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.