\hypertarget{QMEM_8h}{
\section{QMEM.h File Reference}
\label{QMEM_8h}\index{QMEM.h@{QMEM.h}}
}
Public interface to the MEM package SSR telemetry interpreter. 

{\tt \#include \char`\"{}LSF/LSF.h\char`\"{}}\par
{\tt \#include \char`\"{}LSF/LSF\_\-ids.h\char`\"{}}\par


Include dependency graph for QMEM.h:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=114pt]{QMEM_8h__incl}
\end{center}
\end{figure}


This graph shows which files directly or indirectly include this file:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=101pt]{QMEM_8h__dep__incl}
\end{center}
\end{figure}
\subsection*{Typedefs}
\begin{CompactItemize}
\item 
\hypertarget{QMEM_8h_a0}{
typedef enum \hyperlink{QMEM_8h_a38}{\_\-QMEM\_\-Status} \hyperlink{QMEM_8h_a0}{QMEM\_\-Status}}
\label{QMEM_8h_a0}

\begin{CompactList}\small\item\em Typedef for \_\-QMEM\_\-Status. \item\end{CompactList}\item 
\hypertarget{QMEM_8h_a1}{
typedef enum \hyperlink{QMEM_8h_a39}{\_\-QMEM\_\-Lat\_\-Unit} \hyperlink{QMEM_8h_a1}{QMEM\_\-Lat\_\-Unit}}
\label{QMEM_8h_a1}

\begin{CompactList}\small\item\em Typedef for \_\-QMEM\_\-Lat\_\-Unit. \item\end{CompactList}\item 
\hypertarget{QMEM_8h_a2}{
typedef enum \hyperlink{QMEM_8h_a40}{\_\-QMEM\_\-Datagram\_\-Id} \hyperlink{QMEM_8h_a2}{QMEM\_\-Datagram\_\-Id}}
\label{QMEM_8h_a2}

\begin{CompactList}\small\item\em Typedef for \_\-QMEM\_\-Datagram\_\-Id. \item\end{CompactList}\item 
\hypertarget{QMEM_8h_a3}{
typedef \hyperlink{struct__QMEM__Context}{\_\-QMEM\_\-Context} \hyperlink{QMEM_8h_a3}{QMEM\_\-Context}}
\label{QMEM_8h_a3}

\begin{CompactList}\small\item\em Typedef for opaque parsing context. \item\end{CompactList}\end{CompactItemize}
\subsection*{Enumerations}
\begin{CompactItemize}
\item 
enum \hyperlink{QMEM_8h_a38}{\_\-QMEM\_\-Status} \{ \par
\hyperlink{QMEM_8h_a38a4}{QMEM\_\-STATUS\_\-OK} =  0, 
\par
\hyperlink{QMEM_8h_a38a5}{QMEM\_\-STATUS\_\-BAD\_\-CTX} =  -1, 
\par
\hyperlink{QMEM_8h_a38a6}{QMEM\_\-STATUS\_\-SHORT} =  -2, 
\par
\hyperlink{QMEM_8h_a38a7}{QMEM\_\-STATUS\_\-TRUNCATED} =  -3, 
\par
\hyperlink{QMEM_8h_a38a8}{QMEM\_\-STATUS\_\-BAD\_\-DIR} =  -4, 
\par
\hyperlink{QMEM_8h_a38a9}{QMEM\_\-STATUS\_\-BAD\_\-TYPE} =  -5, 
\par
\hyperlink{QMEM_8h_a38a10}{QMEM\_\-STATUS\_\-BAD\_\-VER} =  -6, 
\par
\hyperlink{QMEM_8h_a38a11}{QMEM\_\-STATUS\_\-BAD\_\-HDR} =  -7, 
\par
\hyperlink{QMEM_8h_a38a12}{QMEM\_\-STATUS\_\-INCOMPLETE} =  -8, 
\par
\hyperlink{QMEM_8h_a38a13}{QMEM\_\-STATUS\_\-NULL\_\-PTR} =  -9, 
\par
\hyperlink{QMEM_8h_a38a14}{QMEM\_\-STATUS\_\-BAD\_\-CTB\_\-LEN} =  -10, 
\par
\hyperlink{QMEM_8h_a38a15}{QMEM\_\-STATUS\_\-NOT\_\-NEXT} =  -11
 \}
\begin{CompactList}\small\item\em QMEM function status codes. \item\end{CompactList}\item 
enum \hyperlink{QMEM_8h_a39}{\_\-QMEM\_\-Lat\_\-Unit} \{ \par
\hyperlink{QMEM_8h_a39a16}{QMEM\_\-LAT\_\-UNIT\_\-UNKNOWN} =  -1, 
\par
\hyperlink{QMEM_8h_a39a17}{QMEM\_\-LAT\_\-UNIT\_\-SIU} =  0, 
\par
\hyperlink{QMEM_8h_a39a18}{QMEM\_\-LAT\_\-UNIT\_\-EPU\_\-0} =  1, 
\par
\hyperlink{QMEM_8h_a39a19}{QMEM\_\-LAT\_\-UNIT\_\-EPU\_\-1} =  2, 
\par
\hyperlink{QMEM_8h_a39a20}{QMEM\_\-LAT\_\-UNIT\_\-EPU\_\-2} =  3
 \}
\begin{CompactList}\small\item\em Identifiers of the LAT units that can produce MEM datagrams. \item\end{CompactList}\item 
enum \hyperlink{QMEM_8h_a40}{\_\-QMEM\_\-Datagram\_\-Id} \{ \hyperlink{QMEM_8h_a40a21}{QMEM\_\-DGM\_\-ID\_\-DUMP} =  LSF\_\-ID\_\-K\_\-MEM
 \}
\begin{CompactList}\small\item\em Identifiers of the MEM datagrams. \item\end{CompactList}\end{CompactItemize}
\subsection*{Functions}
\begin{CompactItemize}
\item 
unsigned int \hyperlink{QMEM_8h_a22}{QMEM\_\-sizeof\_\-context} (void)
\begin{CompactList}\small\item\em Return the size of a parsing context. \item\end{CompactList}\item 
unsigned int \hyperlink{QMEM_8h_a23}{QMEM\_\-sizeof\_\-max\_\-dump\_\-data} (void)
\begin{CompactList}\small\item\em Return the maximum amount of dump data within a datagram. \item\end{CompactList}\item 
unsigned int \hyperlink{QMEM_8h_a24}{QMEM\_\-sizeof\_\-max\_\-datagram} (void)
\begin{CompactList}\small\item\em Return the maximum size of a memory dump datagram. \item\end{CompactList}\item 
\hyperlink{QMEM_8h_a0}{QMEM\_\-Status} \hyperlink{QMEM_8h_a25}{QMEM\_\-init\_\-context} (\hyperlink{struct__QMEM__Context}{QMEM\_\-Context} $\ast$context\_\-p, unsigned char $\ast$data\_\-buf\_\-p, unsigned int data\_\-buf\_\-bytes)
\begin{CompactList}\small\item\em Initialize a parsing context. \item\end{CompactList}\item 
\hyperlink{QMEM_8h_a0}{QMEM\_\-Status} \hyperlink{QMEM_8h_a26}{QMEM\_\-start\_\-parsing} (\hyperlink{struct__QMEM__Context}{QMEM\_\-Context} $\ast$context\_\-p, const LSF\_\-datagram $\ast$dgm\_\-p, unsigned int dgm\_\-bytes, int dgm\_\-swapped)
\begin{CompactList}\small\item\em Start parsing a datagram. \item\end{CompactList}\item 
\hyperlink{QMEM_8h_a0}{QMEM\_\-Status} \hyperlink{QMEM_8h_a27}{QMEM\_\-parse\_\-contribution} (\hyperlink{struct__QMEM__Context}{QMEM\_\-Context} $\ast$context\_\-p, const LSF\_\-contribution $\ast$ctb\_\-p, unsigned int dgm\_\-bytes, int dgm\_\-swapped)
\begin{CompactList}\small\item\em Parse a contribution within a datagram. \item\end{CompactList}\item 
\hyperlink{QMEM_8h_a0}{QMEM\_\-Status} \hyperlink{QMEM_8h_a28}{QMEM\_\-parse\_\-datagram} (\hyperlink{struct__QMEM__Context}{QMEM\_\-Context} $\ast$context\_\-p, const LSF\_\-datagram $\ast$dgm\_\-p, unsigned int dgm\_\-bytes, int dgm\_\-swapped)
\begin{CompactList}\small\item\em Parse an entire memory dump datagram. \item\end{CompactList}\item 
\hyperlink{QMEM_8h_a0}{QMEM\_\-Status} \hyperlink{QMEM_8h_a29}{QMEM\_\-status} (\hyperlink{struct__QMEM__Context}{QMEM\_\-Context} $\ast$context\_\-p)
\begin{CompactList}\small\item\em Return the status of the parsing of the current datagram. \item\end{CompactList}\item 
\hyperlink{QMEM_8h_a1}{QMEM\_\-Lat\_\-Unit} \hyperlink{QMEM_8h_a30}{QMEM\_\-lat\_\-unit} (\hyperlink{struct__QMEM__Context}{QMEM\_\-Context} $\ast$context\_\-p)
\begin{CompactList}\small\item\em Return the LAT unit that sent a memory dump. \item\end{CompactList}\item 
unsigned int \hyperlink{QMEM_8h_a31}{QMEM\_\-tran\_\-id} (\hyperlink{struct__QMEM__Context}{QMEM\_\-Context} $\ast$context\_\-p)
\begin{CompactList}\small\item\em Return the transaction ID value from the telecommand that requested a memory dump. \item\end{CompactList}\item 
unsigned int \hyperlink{QMEM_8h_a32}{QMEM\_\-cmd\_\-fcode} (\hyperlink{struct__QMEM__Context}{QMEM\_\-Context} $\ast$context\_\-p)
\begin{CompactList}\small\item\em Return the function code of the telecommand that requested a memory dump. \item\end{CompactList}\item 
unsigned int \hyperlink{QMEM_8h_a33}{QMEM\_\-start\_\-addr} (\hyperlink{struct__QMEM__Context}{QMEM\_\-Context} $\ast$context\_\-p)
\begin{CompactList}\small\item\em Return the starting address of a memory dump. \item\end{CompactList}\item 
unsigned int \hyperlink{QMEM_8h_a34}{QMEM\_\-num\_\-datagrams} (\hyperlink{struct__QMEM__Context}{QMEM\_\-Context} $\ast$context\_\-p)
\begin{CompactList}\small\item\em Return the number of datagrams parsed for the memory dump. \item\end{CompactList}\item 
unsigned int \hyperlink{QMEM_8h_a35}{QMEM\_\-bytes\_\-dumped} (\hyperlink{struct__QMEM__Context}{QMEM\_\-Context} $\ast$context\_\-p)
\begin{CompactList}\small\item\em Return the number of bytes dumped. \item\end{CompactList}\item 
unsigned int \hyperlink{QMEM_8h_a36}{QMEM\_\-bytes\_\-available} (\hyperlink{struct__QMEM__Context}{QMEM\_\-Context} $\ast$context\_\-p)
\begin{CompactList}\small\item\em Return the number of dumped bytes that were saved. \item\end{CompactList}\item 
unsigned char $\ast$ \hyperlink{QMEM_8h_a37}{QMEM\_\-data\_\-buf} (\hyperlink{struct__QMEM__Context}{QMEM\_\-Context} $\ast$context\_\-p)
\begin{CompactList}\small\item\em Return a pointer to a buffer containing saved dump data. \item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}
Public interface to the MEM package SSR telemetry interpreter. 



\footnotesize\begin{verbatim}**  CVS $Id: QMEM.h,v 1.1.1.1 2005/12/13 21:46:08 dmay Exp $
**  \end{verbatim}
\normalsize


Defines the public interface to the functions that interpret the memory dump telemetry sent to the SSR.

\subsection{Enumeration Type Documentation}
\hypertarget{QMEM_8h_a40}{
\index{QMEM.h@{QMEM.h}!_QMEM_Datagram_Id@{\_\-QMEM\_\-Datagram\_\-Id}}
\index{_QMEM_Datagram_Id@{\_\-QMEM\_\-Datagram\_\-Id}!QMEM.h@{QMEM.h}}
\subsubsection[\_\-QMEM\_\-Datagram\_\-Id]{\setlength{\rightskip}{0pt plus 5cm}enum \hyperlink{QMEM_8h_a40}{\_\-QMEM\_\-Datagram\_\-Id}}}
\label{QMEM_8h_a40}


Identifiers of the MEM datagrams. 

\begin{Desc}
\item[Enumerator: ]\par
\begin{description}
\index{QMEM_DGM_ID_DUMP@{QMEM\_\-DGM\_\-ID\_\-DUMP}!QMEM.h@{QMEM.h}}\index{QMEM.h@{QMEM.h}!QMEM_DGM_ID_DUMP@{QMEM\_\-DGM\_\-ID\_\-DUMP}}\item[{\em 
\hypertarget{QMEM_8h_a40a21}{
QMEM\_\-DGM\_\-ID\_\-DUMP}
\label{QMEM_8h_a40a21}
}]Memory dump datagram. \end{description}
\end{Desc}

\hypertarget{QMEM_8h_a39}{
\index{QMEM.h@{QMEM.h}!_QMEM_Lat_Unit@{\_\-QMEM\_\-Lat\_\-Unit}}
\index{_QMEM_Lat_Unit@{\_\-QMEM\_\-Lat\_\-Unit}!QMEM.h@{QMEM.h}}
\subsubsection[\_\-QMEM\_\-Lat\_\-Unit]{\setlength{\rightskip}{0pt plus 5cm}enum \hyperlink{QMEM_8h_a39}{\_\-QMEM\_\-Lat\_\-Unit}}}
\label{QMEM_8h_a39}


Identifiers of the LAT units that can produce MEM datagrams. 

\begin{Desc}
\item[Enumerator: ]\par
\begin{description}
\index{QMEM_LAT_UNIT_UNKNOWN@{QMEM\_\-LAT\_\-UNIT\_\-UNKNOWN}!QMEM.h@{QMEM.h}}\index{QMEM.h@{QMEM.h}!QMEM_LAT_UNIT_UNKNOWN@{QMEM\_\-LAT\_\-UNIT\_\-UNKNOWN}}\item[{\em 
\hypertarget{QMEM_8h_a39a16}{
QMEM\_\-LAT\_\-UNIT\_\-UNKNOWN}
\label{QMEM_8h_a39a16}
}]Unknown \index{QMEM_LAT_UNIT_SIU@{QMEM\_\-LAT\_\-UNIT\_\-SIU}!QMEM.h@{QMEM.h}}\index{QMEM.h@{QMEM.h}!QMEM_LAT_UNIT_SIU@{QMEM\_\-LAT\_\-UNIT\_\-SIU}}\item[{\em 
\hypertarget{QMEM_8h_a39a17}{
QMEM\_\-LAT\_\-UNIT\_\-SIU}
\label{QMEM_8h_a39a17}
}]SIU \index{QMEM_LAT_UNIT_EPU_0@{QMEM\_\-LAT\_\-UNIT\_\-EPU\_\-0}!QMEM.h@{QMEM.h}}\index{QMEM.h@{QMEM.h}!QMEM_LAT_UNIT_EPU_0@{QMEM\_\-LAT\_\-UNIT\_\-EPU\_\-0}}\item[{\em 
\hypertarget{QMEM_8h_a39a18}{
QMEM\_\-LAT\_\-UNIT\_\-EPU\_\-0}
\label{QMEM_8h_a39a18}
}]EPU 0 \index{QMEM_LAT_UNIT_EPU_1@{QMEM\_\-LAT\_\-UNIT\_\-EPU\_\-1}!QMEM.h@{QMEM.h}}\index{QMEM.h@{QMEM.h}!QMEM_LAT_UNIT_EPU_1@{QMEM\_\-LAT\_\-UNIT\_\-EPU\_\-1}}\item[{\em 
\hypertarget{QMEM_8h_a39a19}{
QMEM\_\-LAT\_\-UNIT\_\-EPU\_\-1}
\label{QMEM_8h_a39a19}
}]EPU 1 \index{QMEM_LAT_UNIT_EPU_2@{QMEM\_\-LAT\_\-UNIT\_\-EPU\_\-2}!QMEM.h@{QMEM.h}}\index{QMEM.h@{QMEM.h}!QMEM_LAT_UNIT_EPU_2@{QMEM\_\-LAT\_\-UNIT\_\-EPU\_\-2}}\item[{\em 
\hypertarget{QMEM_8h_a39a20}{
QMEM\_\-LAT\_\-UNIT\_\-EPU\_\-2}
\label{QMEM_8h_a39a20}
}]EPU 2 \end{description}
\end{Desc}

\hypertarget{QMEM_8h_a38}{
\index{QMEM.h@{QMEM.h}!_QMEM_Status@{\_\-QMEM\_\-Status}}
\index{_QMEM_Status@{\_\-QMEM\_\-Status}!QMEM.h@{QMEM.h}}
\subsubsection[\_\-QMEM\_\-Status]{\setlength{\rightskip}{0pt plus 5cm}enum \hyperlink{QMEM_8h_a38}{\_\-QMEM\_\-Status}}}
\label{QMEM_8h_a38}


QMEM function status codes. 

\begin{Desc}
\item[Enumerator: ]\par
\begin{description}
\index{QMEM_STATUS_OK@{QMEM\_\-STATUS\_\-OK}!QMEM.h@{QMEM.h}}\index{QMEM.h@{QMEM.h}!QMEM_STATUS_OK@{QMEM\_\-STATUS\_\-OK}}\item[{\em 
\hypertarget{QMEM_8h_a38a4}{
QMEM\_\-STATUS\_\-OK}
\label{QMEM_8h_a38a4}
}]Function completed successfully.\index{QMEM_STATUS_BAD_CTX@{QMEM\_\-STATUS\_\-BAD\_\-CTX}!QMEM.h@{QMEM.h}}\index{QMEM.h@{QMEM.h}!QMEM_STATUS_BAD_CTX@{QMEM\_\-STATUS\_\-BAD\_\-CTX}}\item[{\em 
\hypertarget{QMEM_8h_a38a5}{
QMEM\_\-STATUS\_\-BAD\_\-CTX}
\label{QMEM_8h_a38a5}
}]The parsing context is invalid.\index{QMEM_STATUS_SHORT@{QMEM\_\-STATUS\_\-SHORT}!QMEM.h@{QMEM.h}}\index{QMEM.h@{QMEM.h}!QMEM_STATUS_SHORT@{QMEM\_\-STATUS\_\-SHORT}}\item[{\em 
\hypertarget{QMEM_8h_a38a6}{
QMEM\_\-STATUS\_\-SHORT}
\label{QMEM_8h_a38a6}
}]The datagram is too short to contain an expected header or contribution body.\index{QMEM_STATUS_TRUNCATED@{QMEM\_\-STATUS\_\-TRUNCATED}!QMEM.h@{QMEM.h}}\index{QMEM.h@{QMEM.h}!QMEM_STATUS_TRUNCATED@{QMEM\_\-STATUS\_\-TRUNCATED}}\item[{\em 
\hypertarget{QMEM_8h_a38a7}{
QMEM\_\-STATUS\_\-TRUNCATED}
\label{QMEM_8h_a38a7}
}]The datagram is truncated such that it is shorter than the size indicated by one of its headers.\index{QMEM_STATUS_BAD_DIR@{QMEM\_\-STATUS\_\-BAD\_\-DIR}!QMEM.h@{QMEM.h}}\index{QMEM.h@{QMEM.h}!QMEM_STATUS_BAD_DIR@{QMEM\_\-STATUS\_\-BAD\_\-DIR}}\item[{\em 
\hypertarget{QMEM_8h_a38a8}{
QMEM\_\-STATUS\_\-BAD\_\-DIR}
\label{QMEM_8h_a38a8}
}]One of the headers within the datagram contains an invalid 'dir' value.\index{QMEM_STATUS_BAD_TYPE@{QMEM\_\-STATUS\_\-BAD\_\-TYPE}!QMEM.h@{QMEM.h}}\index{QMEM.h@{QMEM.h}!QMEM_STATUS_BAD_TYPE@{QMEM\_\-STATUS\_\-BAD\_\-TYPE}}\item[{\em 
\hypertarget{QMEM_8h_a38a9}{
QMEM\_\-STATUS\_\-BAD\_\-TYPE}
\label{QMEM_8h_a38a9}
}]One of the headers within the datagram contains an invalid 'type\_\-id' value.\index{QMEM_STATUS_BAD_VER@{QMEM\_\-STATUS\_\-BAD\_\-VER}!QMEM.h@{QMEM.h}}\index{QMEM.h@{QMEM.h}!QMEM_STATUS_BAD_VER@{QMEM\_\-STATUS\_\-BAD\_\-VER}}\item[{\em 
\hypertarget{QMEM_8h_a38a10}{
QMEM\_\-STATUS\_\-BAD\_\-VER}
\label{QMEM_8h_a38a10}
}]One of the headers within the datagram contains an invalid 'version' value.\index{QMEM_STATUS_BAD_HDR@{QMEM\_\-STATUS\_\-BAD\_\-HDR}!QMEM.h@{QMEM.h}}\index{QMEM.h@{QMEM.h}!QMEM_STATUS_BAD_HDR@{QMEM\_\-STATUS\_\-BAD\_\-HDR}}\item[{\em 
\hypertarget{QMEM_8h_a38a11}{
QMEM\_\-STATUS\_\-BAD\_\-HDR}
\label{QMEM_8h_a38a11}
}]One of the headers within the datagram contains an invalid value.\index{QMEM_STATUS_INCOMPLETE@{QMEM\_\-STATUS\_\-INCOMPLETE}!QMEM.h@{QMEM.h}}\index{QMEM.h@{QMEM.h}!QMEM_STATUS_INCOMPLETE@{QMEM\_\-STATUS\_\-INCOMPLETE}}\item[{\em 
\hypertarget{QMEM_8h_a38a12}{
QMEM\_\-STATUS\_\-INCOMPLETE}
\label{QMEM_8h_a38a12}
}]The datagram is missing one or more contributions.\index{QMEM_STATUS_NULL_PTR@{QMEM\_\-STATUS\_\-NULL\_\-PTR}!QMEM.h@{QMEM.h}}\index{QMEM.h@{QMEM.h}!QMEM_STATUS_NULL_PTR@{QMEM\_\-STATUS\_\-NULL\_\-PTR}}\item[{\em 
\hypertarget{QMEM_8h_a38a13}{
QMEM\_\-STATUS\_\-NULL\_\-PTR}
\label{QMEM_8h_a38a13}
}]A pointer parameter was NULL.\index{QMEM_STATUS_BAD_CTB_LEN@{QMEM\_\-STATUS\_\-BAD\_\-CTB\_\-LEN}!QMEM.h@{QMEM.h}}\index{QMEM.h@{QMEM.h}!QMEM_STATUS_BAD_CTB_LEN@{QMEM\_\-STATUS\_\-BAD\_\-CTB\_\-LEN}}\item[{\em 
\hypertarget{QMEM_8h_a38a14}{
QMEM\_\-STATUS\_\-BAD\_\-CTB\_\-LEN}
\label{QMEM_8h_a38a14}
}]One of the contribution headers within the datagram contains an invalid length value.\index{QMEM_STATUS_NOT_NEXT@{QMEM\_\-STATUS\_\-NOT\_\-NEXT}!QMEM.h@{QMEM.h}}\index{QMEM.h@{QMEM.h}!QMEM_STATUS_NOT_NEXT@{QMEM\_\-STATUS\_\-NOT\_\-NEXT}}\item[{\em 
\hypertarget{QMEM_8h_a38a15}{
QMEM\_\-STATUS\_\-NOT\_\-NEXT}
\label{QMEM_8h_a38a15}
}]The dump data from the datagram does not immediately follow the data that has already been dumped within the current context.\end{description}
\end{Desc}



\subsection{Function Documentation}
\hypertarget{QMEM_8h_a36}{
\index{QMEM.h@{QMEM.h}!QMEM_bytes_available@{QMEM\_\-bytes\_\-available}}
\index{QMEM_bytes_available@{QMEM\_\-bytes\_\-available}!QMEM.h@{QMEM.h}}
\subsubsection[QMEM\_\-bytes\_\-available]{\setlength{\rightskip}{0pt plus 5cm}unsigned int QMEM\_\-bytes\_\-available (\hyperlink{struct__QMEM__Context}{QMEM\_\-Context} $\ast$ {\em context\_\-p})}}
\label{QMEM_8h_a36}


Return the number of dumped bytes that were saved. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em context\_\-p}]Pointer to a parsing context.\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]Number of bytes saved.\end{Desc}
\hypertarget{QMEM_8h_a35}{
\index{QMEM.h@{QMEM.h}!QMEM_bytes_dumped@{QMEM\_\-bytes\_\-dumped}}
\index{QMEM_bytes_dumped@{QMEM\_\-bytes\_\-dumped}!QMEM.h@{QMEM.h}}
\subsubsection[QMEM\_\-bytes\_\-dumped]{\setlength{\rightskip}{0pt plus 5cm}unsigned int QMEM\_\-bytes\_\-dumped (\hyperlink{struct__QMEM__Context}{QMEM\_\-Context} $\ast$ {\em context\_\-p})}}
\label{QMEM_8h_a35}


Return the number of bytes dumped. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em context\_\-p}]Pointer to a parsing context.\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]Number of bytes dumped.\end{Desc}
\hypertarget{QMEM_8h_a32}{
\index{QMEM.h@{QMEM.h}!QMEM_cmd_fcode@{QMEM\_\-cmd\_\-fcode}}
\index{QMEM_cmd_fcode@{QMEM\_\-cmd\_\-fcode}!QMEM.h@{QMEM.h}}
\subsubsection[QMEM\_\-cmd\_\-fcode]{\setlength{\rightskip}{0pt plus 5cm}unsigned int QMEM\_\-cmd\_\-fcode (\hyperlink{struct__QMEM__Context}{QMEM\_\-Context} $\ast$ {\em context\_\-p})}}
\label{QMEM_8h_a32}


Return the function code of the telecommand that requested a memory dump. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em context\_\-p}]Pointer to a parsing context.\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]Function code value.\end{Desc}
\hypertarget{QMEM_8h_a37}{
\index{QMEM.h@{QMEM.h}!QMEM_data_buf@{QMEM\_\-data\_\-buf}}
\index{QMEM_data_buf@{QMEM\_\-data\_\-buf}!QMEM.h@{QMEM.h}}
\subsubsection[QMEM\_\-data\_\-buf]{\setlength{\rightskip}{0pt plus 5cm}unsigned char$\ast$ QMEM\_\-data\_\-buf (\hyperlink{struct__QMEM__Context}{QMEM\_\-Context} $\ast$ {\em context\_\-p})}}
\label{QMEM_8h_a37}


Return a pointer to a buffer containing saved dump data. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em context\_\-p}]Pointer to a parsing context.\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]Pointer to dump data buffer.\end{Desc}
\hypertarget{QMEM_8h_a25}{
\index{QMEM.h@{QMEM.h}!QMEM_init_context@{QMEM\_\-init\_\-context}}
\index{QMEM_init_context@{QMEM\_\-init\_\-context}!QMEM.h@{QMEM.h}}
\subsubsection[QMEM\_\-init\_\-context]{\setlength{\rightskip}{0pt plus 5cm}\hyperlink{QMEM_8h_a0}{QMEM\_\-Status} QMEM\_\-init\_\-context (\hyperlink{struct__QMEM__Context}{QMEM\_\-Context} $\ast$ {\em context\_\-p}, unsigned char $\ast$ {\em data\_\-buf\_\-p}, unsigned int {\em data\_\-buf\_\-bytes})}}
\label{QMEM_8h_a25}


Initialize a parsing context. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em context\_\-p}]Pointer to the parsing context to initialize. \item[{\em data\_\-buf\_\-p}]Pointer to a buffer to save dumped data. \item[{\em data\_\-buf\_\-bytes}]Size of the data\_\-buf\_\-p buffer.\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]QMEM\_\-Status value.\end{Desc}
\hypertarget{QMEM_8h_a30}{
\index{QMEM.h@{QMEM.h}!QMEM_lat_unit@{QMEM\_\-lat\_\-unit}}
\index{QMEM_lat_unit@{QMEM\_\-lat\_\-unit}!QMEM.h@{QMEM.h}}
\subsubsection[QMEM\_\-lat\_\-unit]{\setlength{\rightskip}{0pt plus 5cm}\hyperlink{QMEM_8h_a1}{QMEM\_\-Lat\_\-Unit} QMEM\_\-lat\_\-unit (\hyperlink{struct__QMEM__Context}{QMEM\_\-Context} $\ast$ {\em context\_\-p})}}
\label{QMEM_8h_a30}


Return the LAT unit that sent a memory dump. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em context\_\-p}]Pointer to a parsing context.\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]LAT unit value.\end{Desc}
\hypertarget{QMEM_8h_a34}{
\index{QMEM.h@{QMEM.h}!QMEM_num_datagrams@{QMEM\_\-num\_\-datagrams}}
\index{QMEM_num_datagrams@{QMEM\_\-num\_\-datagrams}!QMEM.h@{QMEM.h}}
\subsubsection[QMEM\_\-num\_\-datagrams]{\setlength{\rightskip}{0pt plus 5cm}unsigned int QMEM\_\-num\_\-datagrams (\hyperlink{struct__QMEM__Context}{QMEM\_\-Context} $\ast$ {\em context\_\-p})}}
\label{QMEM_8h_a34}


Return the number of datagrams parsed for the memory dump. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em context\_\-p}]Pointer to a parsing context.\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]Number of datagrams parsed.\end{Desc}
\hypertarget{QMEM_8h_a27}{
\index{QMEM.h@{QMEM.h}!QMEM_parse_contribution@{QMEM\_\-parse\_\-contribution}}
\index{QMEM_parse_contribution@{QMEM\_\-parse\_\-contribution}!QMEM.h@{QMEM.h}}
\subsubsection[QMEM\_\-parse\_\-contribution]{\setlength{\rightskip}{0pt plus 5cm}\hyperlink{QMEM_8h_a0}{QMEM\_\-Status} QMEM\_\-parse\_\-contribution (\hyperlink{struct__QMEM__Context}{QMEM\_\-Context} $\ast$ {\em context\_\-p}, const LSF\_\-contribution $\ast$ {\em ctb\_\-p}, unsigned int {\em dgm\_\-bytes}, int {\em dgm\_\-swapped})}}
\label{QMEM_8h_a27}


Parse a contribution within a datagram. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em context\_\-p}]Pointer to the parsing context for the datagram. \item[{\em ctb\_\-p}]Pointer to the contribution. \item[{\em dgm\_\-bytes}]Remaining size, in bytes, of the datagram. \item[{\em dgm\_\-swapped}]Flag that datagram data is already byte-swapped.\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]QMEM\_\-Status value.\end{Desc}
This function can be used as a callback by an external datagram parser when it reaches each contribution header of a memory dump datagram. The opaque context will be updated with the information found in the contribution. When the external parser reaches the end of the datagram, it can use the \hyperlink{QMEM_8c_a26}{QMEM\_\-status()}, \hyperlink{QMEM_8c_a27}{QMEM\_\-lat\_\-unit()}, etc. functions to extract information about the datagram.\hypertarget{QMEM_8h_a28}{
\index{QMEM.h@{QMEM.h}!QMEM_parse_datagram@{QMEM\_\-parse\_\-datagram}}
\index{QMEM_parse_datagram@{QMEM\_\-parse\_\-datagram}!QMEM.h@{QMEM.h}}
\subsubsection[QMEM\_\-parse\_\-datagram]{\setlength{\rightskip}{0pt plus 5cm}\hyperlink{QMEM_8h_a0}{QMEM\_\-Status} QMEM\_\-parse\_\-datagram (\hyperlink{struct__QMEM__Context}{QMEM\_\-Context} $\ast$ {\em context\_\-p}, const LSF\_\-datagram $\ast$ {\em dgm\_\-p}, unsigned int {\em dgm\_\-bytes}, int {\em dgm\_\-swapped})}}
\label{QMEM_8h_a28}


Parse an entire memory dump datagram. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em context\_\-p}]Pointer to a parsing context for the datagram. \item[{\em dgm\_\-p}]Pointer to the datagram. \item[{\em dgm\_\-bytes}]Size, in bytes, of the datagram. \item[{\em dgm\_\-swapped}]Flag that datagram data is already byte-swapped.\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]QMEM\_\-Status value.\end{Desc}
This function uses the \hyperlink{QMEM_8c_a21}{QMEM\_\-start\_\-parsing()} and \hyperlink{QMEM_8c_a24}{QMEM\_\-parse\_\-contribution()} functions to walk through and parse an entire memory dump datagram. The \hyperlink{QMEM_8c_a26}{QMEM\_\-status()}, \hyperlink{QMEM_8c_a27}{QMEM\_\-lat\_\-unit()}, etc. functions can then be used to extract information about the datagram.\hypertarget{QMEM_8h_a22}{
\index{QMEM.h@{QMEM.h}!QMEM_sizeof_context@{QMEM\_\-sizeof\_\-context}}
\index{QMEM_sizeof_context@{QMEM\_\-sizeof\_\-context}!QMEM.h@{QMEM.h}}
\subsubsection[QMEM\_\-sizeof\_\-context]{\setlength{\rightskip}{0pt plus 5cm}unsigned int QMEM\_\-sizeof\_\-context (void)}}
\label{QMEM_8h_a22}


Return the size of a parsing context. 

\begin{Desc}
\item[Returns:]Size, in bytes, of a parsing context.\end{Desc}
\hypertarget{QMEM_8h_a24}{
\index{QMEM.h@{QMEM.h}!QMEM_sizeof_max_datagram@{QMEM\_\-sizeof\_\-max\_\-datagram}}
\index{QMEM_sizeof_max_datagram@{QMEM\_\-sizeof\_\-max\_\-datagram}!QMEM.h@{QMEM.h}}
\subsubsection[QMEM\_\-sizeof\_\-max\_\-datagram]{\setlength{\rightskip}{0pt plus 5cm}unsigned int QMEM\_\-sizeof\_\-max\_\-datagram (void)}}
\label{QMEM_8h_a24}


Return the maximum size of a memory dump datagram. 

\begin{Desc}
\item[Returns:]Maximum size, in bytes, of a memory dump datagram.\end{Desc}
\hypertarget{QMEM_8h_a23}{
\index{QMEM.h@{QMEM.h}!QMEM_sizeof_max_dump_data@{QMEM\_\-sizeof\_\-max\_\-dump\_\-data}}
\index{QMEM_sizeof_max_dump_data@{QMEM\_\-sizeof\_\-max\_\-dump\_\-data}!QMEM.h@{QMEM.h}}
\subsubsection[QMEM\_\-sizeof\_\-max\_\-dump\_\-data]{\setlength{\rightskip}{0pt plus 5cm}unsigned int QMEM\_\-sizeof\_\-max\_\-dump\_\-data (void)}}
\label{QMEM_8h_a23}


Return the maximum amount of dump data within a datagram. 

\begin{Desc}
\item[Returns:]Maximum amount, in bytes, of dump data within a datagram.\end{Desc}
\hypertarget{QMEM_8h_a33}{
\index{QMEM.h@{QMEM.h}!QMEM_start_addr@{QMEM\_\-start\_\-addr}}
\index{QMEM_start_addr@{QMEM\_\-start\_\-addr}!QMEM.h@{QMEM.h}}
\subsubsection[QMEM\_\-start\_\-addr]{\setlength{\rightskip}{0pt plus 5cm}unsigned int QMEM\_\-start\_\-addr (\hyperlink{struct__QMEM__Context}{QMEM\_\-Context} $\ast$ {\em context\_\-p})}}
\label{QMEM_8h_a33}


Return the starting address of a memory dump. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em context\_\-p}]Pointer to a parsing context.\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]Starting address value.\end{Desc}
\hypertarget{QMEM_8h_a26}{
\index{QMEM.h@{QMEM.h}!QMEM_start_parsing@{QMEM\_\-start\_\-parsing}}
\index{QMEM_start_parsing@{QMEM\_\-start\_\-parsing}!QMEM.h@{QMEM.h}}
\subsubsection[QMEM\_\-start\_\-parsing]{\setlength{\rightskip}{0pt plus 5cm}\hyperlink{QMEM_8h_a0}{QMEM\_\-Status} QMEM\_\-start\_\-parsing (\hyperlink{struct__QMEM__Context}{QMEM\_\-Context} $\ast$ {\em context\_\-p}, const LSF\_\-datagram $\ast$ {\em dgm\_\-p}, unsigned int {\em dgm\_\-bytes}, int {\em dgm\_\-swapped})}}
\label{QMEM_8h_a26}


Start parsing a datagram. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em context\_\-p}]Pointer to a parsing context for the datagram. \item[{\em dgm\_\-p}]Pointer to the datagram. \item[{\em dgm\_\-bytes}]Size, in bytes, of the datagram. \item[{\em dgm\_\-swapped}]Flag that datagram data is already byte-swapped.\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]QMEM\_\-Status value.\end{Desc}
\hypertarget{QMEM_8h_a29}{
\index{QMEM.h@{QMEM.h}!QMEM_status@{QMEM\_\-status}}
\index{QMEM_status@{QMEM\_\-status}!QMEM.h@{QMEM.h}}
\subsubsection[QMEM\_\-status]{\setlength{\rightskip}{0pt plus 5cm}\hyperlink{QMEM_8h_a0}{QMEM\_\-Status} QMEM\_\-status (\hyperlink{struct__QMEM__Context}{QMEM\_\-Context} $\ast$ {\em context\_\-p})}}
\label{QMEM_8h_a29}


Return the status of the parsing of the current datagram. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em context\_\-p}]Pointer to a parsing context.\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]Current parsing status.\end{Desc}
\hypertarget{QMEM_8h_a31}{
\index{QMEM.h@{QMEM.h}!QMEM_tran_id@{QMEM\_\-tran\_\-id}}
\index{QMEM_tran_id@{QMEM\_\-tran\_\-id}!QMEM.h@{QMEM.h}}
\subsubsection[QMEM\_\-tran\_\-id]{\setlength{\rightskip}{0pt plus 5cm}unsigned int QMEM\_\-tran\_\-id (\hyperlink{struct__QMEM__Context}{QMEM\_\-Context} $\ast$ {\em context\_\-p})}}
\label{QMEM_8h_a31}


Return the transaction ID value from the telecommand that requested a memory dump. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em context\_\-p}]Pointer to a parsing context.\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]Transaction ID value.\end{Desc}
