\hypertarget{state_8h}{
\section{state.h File Reference}
\label{state_8h}\index{state.h@{state.h}}
}
Structures that make up the PIG datagram sent to the SSR by PIG\_\-record.  


{\tt \#include $<$unistd.h$>$}\par
{\tt \#include $<$stdio.h$>$}\par
\subsection*{Classes}
\begin{CompactItemize}
\item 
struct \hyperlink{struct__QPIG__cruState__V0}{\_\-QPIG\_\-cruState\_\-V0}
\begin{CompactList}\small\item\em State of the CRU - version 0. \item\end{CompactList}\item 
struct \hyperlink{struct__QPIG__pduState__V0}{\_\-QPIG\_\-pduState\_\-V0}
\begin{CompactList}\small\item\em State of the PDU - version 0. \item\end{CompactList}\item 
struct \hyperlink{struct__QPIG__ebmState__V0}{\_\-QPIG\_\-ebmState\_\-V0}
\begin{CompactList}\small\item\em Structure used to record the state of the EBM - version 0. \item\end{CompactList}\item 
struct \hyperlink{structQPIG__dbState__V0}{QPIG\_\-dbState\_\-V0}
\begin{CompactList}\small\item\em Structure holding registers configured by PIG\_\-DB - version 0. \item\end{CompactList}\item 
struct \hyperlink{struct__QPIG__pwrState__V0}{\_\-QPIG\_\-pwrState\_\-V0}
\begin{CompactList}\small\item\em Structure holding the power registers - version 0. \item\end{CompactList}\item 
struct \hyperlink{struct__QPIG__pwrState__V1}{\_\-QPIG\_\-pwrState\_\-V1}
\begin{CompactList}\small\item\em Structure holding the power registers - version 1. \item\end{CompactList}\item 
struct \hyperlink{struct__QPIG__cruState}{\_\-QPIG\_\-cruState}
\begin{CompactList}\small\item\em Structure holding the state of the CRU. \item\end{CompactList}\item 
struct \hyperlink{struct__QPIG__pduState}{\_\-QPIG\_\-pduState}
\begin{CompactList}\small\item\em Structure holding the state of the PDU. \item\end{CompactList}\item 
struct \hyperlink{struct__QPIG__ebmState}{\_\-QPIG\_\-ebmState}
\begin{CompactList}\small\item\em Structure used to record the state of the EBM. \item\end{CompactList}\item 
struct \hyperlink{structQPIG__dbState}{QPIG\_\-dbState}
\begin{CompactList}\small\item\em Structure holding the registers configured by PIG\_\-DB. \item\end{CompactList}\item 
struct \hyperlink{struct__QPIG__pwrState}{\_\-QPIG\_\-pwrState}
\begin{CompactList}\small\item\em Structure holding the power registers. \item\end{CompactList}\item 
struct \hyperlink{struct__QPIG__state__V0}{\_\-QPIG\_\-state\_\-V0}
\begin{CompactList}\small\item\em Combination of structures encapsulating the current state of the registers manipulated by PIG - version 0. \item\end{CompactList}\item 
struct \hyperlink{struct__QPIG__state__V1}{\_\-QPIG\_\-state\_\-V1}
\begin{CompactList}\small\item\em Combination of structures encapsulating the current state of the registers manipulated by PIG - version 1. \item\end{CompactList}\item 
struct \hyperlink{struct__QPIG__state}{\_\-QPIG\_\-state}
\begin{CompactList}\small\item\em Combination of structures encapsulating the current state of the registers manipulated by PIG. \item\end{CompactList}\end{CompactItemize}
\subsection*{Typedefs}
\begin{CompactItemize}
\item 
\hypertarget{state_8h_ccc044cf4fce7c7d61dc0cfe54537917}{
typedef struct \hyperlink{struct__QPIG__cruState__V0}{\_\-QPIG\_\-cruState\_\-V0} \hyperlink{state_8h_ccc044cf4fce7c7d61dc0cfe54537917}{QPIG\_\-cruState\_\-V0}}
\label{state_8h_ccc044cf4fce7c7d61dc0cfe54537917}

\begin{CompactList}\small\item\em State of the CRU - version 0. \item\end{CompactList}\item 
\hypertarget{state_8h_ef05d55f87f95b2690b5450985d31ca8}{
typedef struct \hyperlink{struct__QPIG__pduState__V0}{\_\-QPIG\_\-pduState\_\-V0} \hyperlink{state_8h_ef05d55f87f95b2690b5450985d31ca8}{QPIG\_\-pduState\_\-V0}}
\label{state_8h_ef05d55f87f95b2690b5450985d31ca8}

\begin{CompactList}\small\item\em State of the PDU - version 0. \item\end{CompactList}\item 
\hypertarget{state_8h_496c2a3e3284f7d6799e38d54cd8229f}{
typedef struct \hyperlink{struct__QPIG__ebmState__V0}{\_\-QPIG\_\-ebmState\_\-V0} \hyperlink{state_8h_496c2a3e3284f7d6799e38d54cd8229f}{QPIG\_\-ebmState\_\-V0}}
\label{state_8h_496c2a3e3284f7d6799e38d54cd8229f}

\begin{CompactList}\small\item\em Structure used to record the state of the EBM - version 0. \item\end{CompactList}\item 
\hypertarget{state_8h_f8b66025f215c5d340f358ed5a572b4b}{
typedef struct \hyperlink{struct__QPIG__pwrState__V0}{\_\-QPIG\_\-pwrState\_\-V0} \hyperlink{state_8h_f8b66025f215c5d340f358ed5a572b4b}{QPIG\_\-pwrState\_\-V0}}
\label{state_8h_f8b66025f215c5d340f358ed5a572b4b}

\begin{CompactList}\small\item\em Structure holding the power registers - version 0. \item\end{CompactList}\item 
\hypertarget{state_8h_f5fafb64f8ae58912ba4d7f17ea3609d}{
typedef struct \hyperlink{struct__QPIG__pwrState__V1}{\_\-QPIG\_\-pwrState\_\-V1} \hyperlink{state_8h_f5fafb64f8ae58912ba4d7f17ea3609d}{QPIG\_\-pwrState\_\-V1}}
\label{state_8h_f5fafb64f8ae58912ba4d7f17ea3609d}

\begin{CompactList}\small\item\em Structure holding the power registers - version 1. \item\end{CompactList}\item 
\hypertarget{state_8h_9a5645378f8a9d895e497192e7acf006}{
typedef struct \hyperlink{struct__QPIG__cruState}{\_\-QPIG\_\-cruState} \hyperlink{state_8h_9a5645378f8a9d895e497192e7acf006}{QPIG\_\-cruState}}
\label{state_8h_9a5645378f8a9d895e497192e7acf006}

\begin{CompactList}\small\item\em Structure holding the state of the CRU. \item\end{CompactList}\item 
\hypertarget{state_8h_9a4434342f09e382c1200cf4f5c367f6}{
typedef struct \hyperlink{struct__QPIG__pduState}{\_\-QPIG\_\-pduState} \hyperlink{state_8h_9a4434342f09e382c1200cf4f5c367f6}{QPIG\_\-pduState}}
\label{state_8h_9a4434342f09e382c1200cf4f5c367f6}

\begin{CompactList}\small\item\em Structure holding the state of the PDU. \item\end{CompactList}\item 
\hypertarget{state_8h_12f365ff810db1d33750ee6901f283b8}{
typedef struct \hyperlink{struct__QPIG__ebmState}{\_\-QPIG\_\-ebmState} \hyperlink{state_8h_12f365ff810db1d33750ee6901f283b8}{QPIG\_\-ebmState}}
\label{state_8h_12f365ff810db1d33750ee6901f283b8}

\begin{CompactList}\small\item\em Structure used to record the state of the EBM. \item\end{CompactList}\item 
\hypertarget{state_8h_a875302f153a25ad4d784a3ec3dc5fed}{
typedef struct \hyperlink{struct__QPIG__pwrState}{\_\-QPIG\_\-pwrState} \hyperlink{state_8h_a875302f153a25ad4d784a3ec3dc5fed}{QPIG\_\-pwrState}}
\label{state_8h_a875302f153a25ad4d784a3ec3dc5fed}

\begin{CompactList}\small\item\em Structure holding the power registers. \item\end{CompactList}\item 
\hypertarget{state_8h_ba5f032c6bcff13a44e315be66c3375d}{
typedef struct \hyperlink{struct__QPIG__state__V0}{\_\-QPIG\_\-state\_\-V0} \hyperlink{state_8h_ba5f032c6bcff13a44e315be66c3375d}{QPIG\_\-state\_\-V0}}
\label{state_8h_ba5f032c6bcff13a44e315be66c3375d}

\begin{CompactList}\small\item\em Combination of structures encapsulating the current state of the registers manipulated by PIG - version 0. \item\end{CompactList}\item 
\hypertarget{state_8h_60b1ffc2402cf2a9ba49da74d5a7ee02}{
typedef struct \hyperlink{struct__QPIG__state__V1}{\_\-QPIG\_\-state\_\-V1} \hyperlink{state_8h_60b1ffc2402cf2a9ba49da74d5a7ee02}{QPIG\_\-state\_\-V1}}
\label{state_8h_60b1ffc2402cf2a9ba49da74d5a7ee02}

\begin{CompactList}\small\item\em Combination of structures encapsulating the current state of the registers manipulated by PIG - version 1. \item\end{CompactList}\item 
\hypertarget{state_8h_31ba4aeef507390bc13656a200d59215}{
typedef struct \hyperlink{struct__QPIG__state}{\_\-QPIG\_\-state} \hyperlink{state_8h_31ba4aeef507390bc13656a200d59215}{QPIG\_\-state}}
\label{state_8h_31ba4aeef507390bc13656a200d59215}

\begin{CompactList}\small\item\em Combination of structures encapsulating the current state of the registers manipulated by PIG. \item\end{CompactList}\end{CompactItemize}
\subsection*{Enumerations}
\begin{CompactItemize}
\item 
enum \{ \par
\hyperlink{state_8h_06fc87d81c62e9abb8790b6e5713c55b9d939b2316aaabeaf4cd3a290f853044}{QPIG\_\-N\_\-PDU} =  2, 
\par
\hyperlink{state_8h_06fc87d81c62e9abb8790b6e5713c55b97fe65098b083cf1bee166b83e93a05c}{QPIG\_\-N\_\-TEM} =  16, 
\par
\hyperlink{state_8h_06fc87d81c62e9abb8790b6e5713c55b2d6ffc56144a948e2201c0b041a2be99}{QPIG\_\-N\_\-CCC} =  4, 
\par
\hyperlink{state_8h_06fc87d81c62e9abb8790b6e5713c55b98b86f9fa5145b953da76d0b4ad7679f}{QPIG\_\-N\_\-TCC} =  8, 
\par
\hyperlink{state_8h_06fc87d81c62e9abb8790b6e5713c55b895a0a401c73b2536df6a83f3f15b8f5}{QPIG\_\-N\_\-FREE} =  12
 \}
\begin{CompactList}\small\item\em Detector constants. \item\end{CompactList}\item 
enum \{ \textbf{QPIG\_\-CURR\_\-VERSION} =  2
 \}
\begin{CompactList}\small\item\em Current version of the register state data. \item\end{CompactList}\end{CompactItemize}
\subsection*{Functions}
\begin{CompactItemize}
\item 
\hyperlink{struct__QPIG__state}{QPIG\_\-state} $\ast$ \hyperlink{state_8h_adc3ecbd0ae617ceb242b88c24e8d6dd}{QPIG\_\-allocState} (void)
\begin{CompactList}\small\item\em Allocate memory for a QPIG\_\-state structure and construct it as such. \item\end{CompactList}\item 
\hyperlink{struct__QPIG__state}{QPIG\_\-state} $\ast$ \hyperlink{state_8h_6810c75cfa258237290c8d667e449307}{QPIG\_\-constructState} (void $\ast$buffer)
\begin{CompactList}\small\item\em Construct a QPIG\_\-state structure in the memory provided. \item\end{CompactList}\item 
void \hyperlink{state_8h_b710f08e6ee07684138002301dd0cdb2}{QPIG\_\-destructState} (\hyperlink{struct__QPIG__state}{QPIG\_\-state} $\ast$state)
\begin{CompactList}\small\item\em Release resources associated with the QPIG\_\-state structure. \item\end{CompactList}\item 
const unsigned int $\ast$ \hyperlink{state_8h_c54de82c8f4ce0d9fccbbaba8c6d9e9f}{QPIG\_\-recoverState} (\hyperlink{struct__QPIG__state}{QPIG\_\-state} $\ast$state, int version, const unsigned int $\ast$buf)
\begin{CompactList}\small\item\em Copy the state information from the buffer. \item\end{CompactList}\item 
void \hyperlink{state_8h_8a27d1aeb9d9b9e8c5c9b9c83fe4d243}{QPIG\_\-reportState} (unsigned int secs, int version, const \hyperlink{struct__QPIG__state}{QPIG\_\-state} $\ast$state, FILE $\ast$fp)
\begin{CompactList}\small\item\em Write a formatted ASCII description of the state. \item\end{CompactList}\item 
size\_\-t \hyperlink{state_8h_c908f18c7d442ff12e718dd69814528b}{QPIG\_\-sizeofState} (void)
\begin{CompactList}\small\item\em Return the size of the QPIG state structure. \item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}
Structures that make up the PIG datagram sent to the SSR by PIG\_\-record. 

\begin{Desc}
\item[Author:]James Swain \& Owen Saxton\end{Desc}
\begin{Desc}
\item[Id]\hyperlink{state_8h}{state.h},v 1.4 2009/02/27 19:26:00 saxton Exp \end{Desc}


\subsection{Enumeration Type Documentation}
\hypertarget{state_8h_06fc87d81c62e9abb8790b6e5713c55b}{
\subsubsection[{"@0}]{\setlength{\rightskip}{0pt plus 5cm}anonymous enum}}
\label{state_8h_06fc87d81c62e9abb8790b6e5713c55b}


Detector constants. 

\begin{Desc}
\item[Enumerator: ]\par
\begin{description}
\index{QPIG\_\-N\_\-PDU@{QPIG\_\-N\_\-PDU}!state.h@{state.h}}\index{state.h@{state.h}!QPIG\_\-N\_\-PDU@{QPIG\_\-N\_\-PDU}}\item[{\em 
\hypertarget{state_8h_06fc87d81c62e9abb8790b6e5713c55b9d939b2316aaabeaf4cd3a290f853044}{
QPIG\_\-N\_\-PDU}
\label{state_8h_06fc87d81c62e9abb8790b6e5713c55b9d939b2316aaabeaf4cd3a290f853044}
}]Number of PDUs. \index{QPIG\_\-N\_\-TEM@{QPIG\_\-N\_\-TEM}!state.h@{state.h}}\index{state.h@{state.h}!QPIG\_\-N\_\-TEM@{QPIG\_\-N\_\-TEM}}\item[{\em 
\hypertarget{state_8h_06fc87d81c62e9abb8790b6e5713c55b97fe65098b083cf1bee166b83e93a05c}{
QPIG\_\-N\_\-TEM}
\label{state_8h_06fc87d81c62e9abb8790b6e5713c55b97fe65098b083cf1bee166b83e93a05c}
}]Number of TEMs. \index{QPIG\_\-N\_\-CCC@{QPIG\_\-N\_\-CCC}!state.h@{state.h}}\index{state.h@{state.h}!QPIG\_\-N\_\-CCC@{QPIG\_\-N\_\-CCC}}\item[{\em 
\hypertarget{state_8h_06fc87d81c62e9abb8790b6e5713c55b2d6ffc56144a948e2201c0b041a2be99}{
QPIG\_\-N\_\-CCC}
\label{state_8h_06fc87d81c62e9abb8790b6e5713c55b2d6ffc56144a948e2201c0b041a2be99}
}]Number of CCCs. \index{QPIG\_\-N\_\-TCC@{QPIG\_\-N\_\-TCC}!state.h@{state.h}}\index{state.h@{state.h}!QPIG\_\-N\_\-TCC@{QPIG\_\-N\_\-TCC}}\item[{\em 
\hypertarget{state_8h_06fc87d81c62e9abb8790b6e5713c55b98b86f9fa5145b953da76d0b4ad7679f}{
QPIG\_\-N\_\-TCC}
\label{state_8h_06fc87d81c62e9abb8790b6e5713c55b98b86f9fa5145b953da76d0b4ad7679f}
}]Number of TCCs. \index{QPIG\_\-N\_\-FREE@{QPIG\_\-N\_\-FREE}!state.h@{state.h}}\index{state.h@{state.h}!QPIG\_\-N\_\-FREE@{QPIG\_\-N\_\-FREE}}\item[{\em 
\hypertarget{state_8h_06fc87d81c62e9abb8790b6e5713c55b895a0a401c73b2536df6a83f3f15b8f5}{
QPIG\_\-N\_\-FREE}
\label{state_8h_06fc87d81c62e9abb8790b6e5713c55b895a0a401c73b2536df6a83f3f15b8f5}
}]Number of FREE boards. \end{description}
\end{Desc}



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


Allocate memory for a QPIG\_\-state structure and construct it as such. 

\begin{Desc}
\item[Returns:]Allocated QPIG\_\-state structure \end{Desc}


References QPIG\_\-constructState(), and QPIG\_\-sizeofState().\hypertarget{state_8h_6810c75cfa258237290c8d667e449307}{
\index{state.h@{state.h}!QPIG\_\-constructState@{QPIG\_\-constructState}}
\index{QPIG\_\-constructState@{QPIG\_\-constructState}!state.h@{state.h}}
\subsubsection[{QPIG\_\-constructState}]{\setlength{\rightskip}{0pt plus 5cm}{\bf QPIG\_\-state}$\ast$ QPIG\_\-constructState (void $\ast$ {\em buffer})}}
\label{state_8h_6810c75cfa258237290c8d667e449307}


Construct a QPIG\_\-state structure in the memory provided. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em buffer}]block of memory to use for the QPIG\_\-state structure\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]Pointer to an initialised QPIG\_\-state structure \end{Desc}


References QPIG\_\-sizeofState().

Referenced by QPIG\_\-allocState(), and QPIG\_\-construct().\hypertarget{state_8h_b710f08e6ee07684138002301dd0cdb2}{
\index{state.h@{state.h}!QPIG\_\-destructState@{QPIG\_\-destructState}}
\index{QPIG\_\-destructState@{QPIG\_\-destructState}!state.h@{state.h}}
\subsubsection[{QPIG\_\-destructState}]{\setlength{\rightskip}{0pt plus 5cm}void QPIG\_\-destructState ({\bf QPIG\_\-state} $\ast$ {\em state})}}
\label{state_8h_b710f08e6ee07684138002301dd0cdb2}


Release resources associated with the QPIG\_\-state structure. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em state}]Pointer to a QPIG\_\-state structure created using \hyperlink{state_8h_adc3ecbd0ae617ceb242b88c24e8d6dd}{QPIG\_\-allocState()} \end{description}
\end{Desc}
\hypertarget{state_8h_c54de82c8f4ce0d9fccbbaba8c6d9e9f}{
\index{state.h@{state.h}!QPIG\_\-recoverState@{QPIG\_\-recoverState}}
\index{QPIG\_\-recoverState@{QPIG\_\-recoverState}!state.h@{state.h}}
\subsubsection[{QPIG\_\-recoverState}]{\setlength{\rightskip}{0pt plus 5cm}const unsigned int$\ast$ QPIG\_\-recoverState ({\bf QPIG\_\-state} $\ast$ {\em state}, \/  int {\em version}, \/  const unsigned int $\ast$ {\em buf})}}
\label{state_8h_c54de82c8f4ce0d9fccbbaba8c6d9e9f}


Copy the state information from the buffer. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em state}]Pointer to a state structure\item[{\em version}]The version of the state data.\item[{\em buf}]Pointer to the context data\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]Pointer to the next word in the buffer \end{Desc}


References \_\-QPIG\_\-pduState\_\-V0::acd, \_\-QPIG\_\-pduState::acd, \_\-QPIG\_\-pwrState::acd\_\-dac, \_\-QPIG\_\-pwrState\_\-V0::acd\_\-hv, \_\-QPIG\_\-pwrState::acd\_\-hv, \_\-QPIG\_\-pwrState\_\-V1::acd\_\-on, \_\-QPIG\_\-pwrState::acd\_\-on, \_\-QPIG\_\-pwrState\_\-V0::acd\_\-saa, \_\-QPIG\_\-pwrState::acd\_\-saa, \_\-QPIG\_\-pwrState\_\-V0::aem, \_\-QPIG\_\-pwrState::aem, QPIG\_\-dbState\_\-V0::aem\_\-event\_\-timeout, QPIG\_\-dbState::aem\_\-event\_\-timeout, QPIG\_\-dbState\_\-V0::aem\_\-response\_\-timeout, QPIG\_\-dbState::aem\_\-response\_\-timeout, \_\-QPIG\_\-pwrState\_\-V0::cal, \_\-QPIG\_\-pwrState::cal, \_\-QPIG\_\-pwrState\_\-V1::cal\_\-on, \_\-QPIG\_\-pwrState::cal\_\-on, QPIG\_\-dbState\_\-V0::ccc\_\-event\_\-timeouts, QPIG\_\-dbState::ccc\_\-event\_\-timeouts, \_\-QPIG\_\-cruState\_\-V0::command, \_\-QPIG\_\-cruState::command, \_\-QPIG\_\-ebmState\_\-V0::contributors, \_\-QPIG\_\-ebmState::contributors, \_\-QPIG\_\-pduState\_\-V0::crates, \_\-QPIG\_\-pduState::crates, \_\-QPIG\_\-state\_\-V0::cru, \_\-QPIG\_\-state::cru, \_\-QPIG\_\-ebmState\_\-V0::destinations, \_\-QPIG\_\-ebmState::destinations, \_\-QPIG\_\-state\_\-V0::ebm, \_\-QPIG\_\-state::ebm, QPIG\_\-dbState\_\-V0::ebm\_\-timeout, QPIG\_\-dbState::ebm\_\-timeout, \_\-QPIG\_\-ebmState\_\-V0::inputs, \_\-QPIG\_\-ebmState::inputs, \_\-QPIG\_\-state\_\-V0::pdb, \_\-QPIG\_\-state::pdb, \_\-QPIG\_\-state\_\-V0::pdu, \_\-QPIG\_\-state::pdu, \_\-QPIG\_\-state\_\-V0::pwr, \_\-QPIG\_\-state\_\-V1::pwr, \_\-QPIG\_\-state::pwr, \_\-QPIG\_\-cruState\_\-V0::response, \_\-QPIG\_\-cruState::response, \_\-QPIG\_\-pwrState\_\-V0::sib, \_\-QPIG\_\-pwrState::sib, QPIG\_\-dbState\_\-V0::tcc\_\-event\_\-timeouts, QPIG\_\-dbState::tcc\_\-event\_\-timeouts, \_\-QPIG\_\-pwrState\_\-V0::tem, \_\-QPIG\_\-pwrState::tem, QPIG\_\-dbState\_\-V0::tem\_\-configuration, QPIG\_\-dbState::tem\_\-configuration, \_\-QPIG\_\-pduState\_\-V0::tems, \_\-QPIG\_\-pduState::tems, \_\-QPIG\_\-pwrState\_\-V0::tkr, \_\-QPIG\_\-pwrState::tkr, \_\-QPIG\_\-pwrState\_\-V1::tkr\_\-on, and \_\-QPIG\_\-pwrState::tkr\_\-on.

Referenced by QPIG\_\-updateAtDatagram().\hypertarget{state_8h_8a27d1aeb9d9b9e8c5c9b9c83fe4d243}{
\index{state.h@{state.h}!QPIG\_\-reportState@{QPIG\_\-reportState}}
\index{QPIG\_\-reportState@{QPIG\_\-reportState}!state.h@{state.h}}
\subsubsection[{QPIG\_\-reportState}]{\setlength{\rightskip}{0pt plus 5cm}void QPIG\_\-reportState (unsigned int {\em secs}, \/  int {\em version}, \/  const {\bf QPIG\_\-state} $\ast$ {\em state}, \/  FILE $\ast$ {\em fp})}}
\label{state_8h_8a27d1aeb9d9b9e8c5c9b9c83fe4d243}


Write a formatted ASCII description of the state. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em secs}]The time the state was sent (spacecraft time)\item[{\em version}]The version of the state data.\item[{\em state}]Pointer to a state structure\item[{\em fp}]Pointer to the output file \end{description}
\end{Desc}


References \_\-QPIG\_\-state::cru, \_\-QPIG\_\-state::ebm, \_\-QPIG\_\-state::pdb, \_\-QPIG\_\-state::pdu, and \_\-QPIG\_\-state::pwr.\hypertarget{state_8h_c908f18c7d442ff12e718dd69814528b}{
\index{state.h@{state.h}!QPIG\_\-sizeofState@{QPIG\_\-sizeofState}}
\index{QPIG\_\-sizeofState@{QPIG\_\-sizeofState}!state.h@{state.h}}
\subsubsection[{QPIG\_\-sizeofState}]{\setlength{\rightskip}{0pt plus 5cm}size\_\-t QPIG\_\-sizeofState (void)}}
\label{state_8h_c908f18c7d442ff12e718dd69814528b}


Return the size of the QPIG state structure. 

\begin{Desc}
\item[Returns:]Size of memory block required to hold the structure \end{Desc}


Referenced by QPIG\_\-allocState(), and QPIG\_\-constructState().