\hypertarget{QMEM_8c}{
\section{QMEM.c File Reference}
\label{QMEM_8c}\index{QMEM.c@{QMEM.c}}
}
Interpret MEM package SSR telemetry.  


{\tt \#include $<$string.h$>$}\par
{\tt \#include $<$LSF/LSF.h$>$}\par
{\tt \#include $<$LSF/LSF\_\-ids.h$>$}\par
{\tt \#include $<$PBI/Endianness.h$>$}\par
{\tt \#include $<$QMEM/QMEM.h$>$}\par
\subsection*{Classes}
\begin{CompactItemize}
\item 
struct \hyperlink{struct__QMEM__Dump__Ident}{\_\-QMEM\_\-Dump\_\-Ident}
\begin{CompactList}\small\item\em Indentifying information for a memory dump. \item\end{CompactList}\item 
struct \hyperlink{struct__QMEM__Dump__Desc}{\_\-QMEM\_\-Dump\_\-Desc}
\begin{CompactList}\small\item\em Description of a memory dump. \item\end{CompactList}\item 
struct \hyperlink{struct__QMEM__Context}{\_\-QMEM\_\-Context}
\begin{CompactList}\small\item\em Context of a datagram parsing operation. \item\end{CompactList}\end{CompactItemize}
\subsection*{Defines}
\begin{CompactItemize}
\item 
\hypertarget{QMEM_8c_cb3c0f6dd50eb836bd25cb2a22420d82}{
\#define \hyperlink{QMEM_8c_cb3c0f6dd50eb836bd25cb2a22420d82}{QMEM\_\-CONTEXT\_\-VALID\_\-KEY}~(('Q'$<$$<$24)+('C'$<$$<$16)+('T'$<$$<$8)+'X')}
\label{QMEM_8c_cb3c0f6dd50eb836bd25cb2a22420d82}

\begin{CompactList}\small\item\em Value that indicates a parsing context is valid. \item\end{CompactList}\item 
\hypertarget{QMEM_8c_1bc6c052f64b945f574c0a0f1d2012cf}{
\#define \hyperlink{QMEM_8c_1bc6c052f64b945f574c0a0f1d2012cf}{QMEM\_\-MAX\_\-DATAGRAM\_\-BYTES}~(2048)}
\label{QMEM_8c_1bc6c052f64b945f574c0a0f1d2012cf}

\begin{CompactList}\small\item\em Maximum size, in bytes, of a memory dump datagram. \item\end{CompactList}\item 
\hypertarget{QMEM_8c_df3aa607f6730f6794f11b31a2361b60}{
\#define \hyperlink{QMEM_8c_df3aa607f6730f6794f11b31a2361b60}{QMEM\_\-MAX\_\-DUMP\_\-DATA\_\-BYTES}~(QMEM\_\-MAX\_\-DATAGRAM\_\-BYTES)}
\label{QMEM_8c_df3aa607f6730f6794f11b31a2361b60}

\begin{CompactList}\small\item\em Maximum amount, in bytes, of dump data within a datagram. \item\end{CompactList}\end{CompactItemize}
\subsection*{Typedefs}
\begin{CompactItemize}
\item 
\hypertarget{QMEM_8c_97a04ef935ee62bb9dae4e050f4566d3}{
typedef enum \hyperlink{QMEM_8c_70a5b76cd8621fd71f1e416afe0adee4}{\_\-QMEM\_\-Contribution\_\-Id} \hyperlink{QMEM_8c_97a04ef935ee62bb9dae4e050f4566d3}{QMEM\_\-Contribution\_\-Id}}
\label{QMEM_8c_97a04ef935ee62bb9dae4e050f4566d3}

\begin{CompactList}\small\item\em Typedef for \_\-QMEM\_\-Contribution\_\-Id. \item\end{CompactList}\item 
\hypertarget{QMEM_8c_4523eb346c317c6e462c26ca538d609f}{
typedef enum \hyperlink{QMEM_8c_a71d3309daa232e2d7d41c8293eeac3f}{\_\-QMEM\_\-Parse\_\-State} \hyperlink{QMEM_8c_4523eb346c317c6e462c26ca538d609f}{QMEM\_\-Parse\_\-State}}
\label{QMEM_8c_4523eb346c317c6e462c26ca538d609f}

\begin{CompactList}\small\item\em Typedef for \_\-QMEM\_\-Parse\_\-State. \item\end{CompactList}\item 
\hypertarget{QMEM_8c_68e1321ea8d4589ccd7739b48f0949a4}{
typedef struct \hyperlink{struct__QMEM__Dump__Ident}{\_\-QMEM\_\-Dump\_\-Ident} \hyperlink{QMEM_8c_68e1321ea8d4589ccd7739b48f0949a4}{QMEM\_\-Dump\_\-Ident}}
\label{QMEM_8c_68e1321ea8d4589ccd7739b48f0949a4}

\begin{CompactList}\small\item\em Typedef for \hyperlink{struct__QMEM__Dump__Ident}{\_\-QMEM\_\-Dump\_\-Ident}. \item\end{CompactList}\item 
\hypertarget{QMEM_8c_f9d38e0a5f28e2ff60fd75491cb24ba3}{
typedef struct \hyperlink{struct__QMEM__Dump__Desc}{\_\-QMEM\_\-Dump\_\-Desc} \hyperlink{QMEM_8c_f9d38e0a5f28e2ff60fd75491cb24ba3}{QMEM\_\-Dump\_\-Desc}}
\label{QMEM_8c_f9d38e0a5f28e2ff60fd75491cb24ba3}

\begin{CompactList}\small\item\em Typedef for \hyperlink{struct__QMEM__Dump__Desc}{\_\-QMEM\_\-Dump\_\-Desc}. \item\end{CompactList}\end{CompactItemize}
\subsection*{Enumerations}
\begin{CompactItemize}
\item 
enum \hyperlink{QMEM_8c_70a5b76cd8621fd71f1e416afe0adee4}{\_\-QMEM\_\-Contribution\_\-Id} \{ \par
\hyperlink{QMEM_8c_70a5b76cd8621fd71f1e416afe0adee43bba5b170bf97699123d9a5af776be8f}{QMEM\_\-CTB\_\-ID\_\-DESC} =  1, 
\par
\hyperlink{QMEM_8c_70a5b76cd8621fd71f1e416afe0adee4a5be54cf849de0755b6d7be5db0131e8}{QMEM\_\-CTB\_\-ID\_\-DATA} =  2
 \}
\begin{CompactList}\small\item\em Identifiers of the MEM datagram contributions. \item\end{CompactList}\item 
enum \hyperlink{QMEM_8c_a71d3309daa232e2d7d41c8293eeac3f}{\_\-QMEM\_\-Parse\_\-State} \{ \par
\hyperlink{QMEM_8c_a71d3309daa232e2d7d41c8293eeac3fb29ab34dd9988f152ca4d03e11dd0879}{QMEM\_\-STATE\_\-UNKNOWN} =  0, 
\par
\hyperlink{QMEM_8c_a71d3309daa232e2d7d41c8293eeac3f5b4a96ed35b5b5776f4d2af2850079c0}{QMEM\_\-STATE\_\-START} =  1, 
\par
\hyperlink{QMEM_8c_a71d3309daa232e2d7d41c8293eeac3f226b661247e51a927c4d6ca4e3b5bfcc}{QMEM\_\-STATE\_\-DESC} =  2, 
\par
\hyperlink{QMEM_8c_a71d3309daa232e2d7d41c8293eeac3f3a79fd9464514a386fac9e3a49024786}{QMEM\_\-STATE\_\-DATA} =  3
 \}
\begin{CompactList}\small\item\em Memory dump parser states. \item\end{CompactList}\end{CompactItemize}
\subsection*{Functions}
\begin{CompactItemize}
\item 
static int \hyperlink{QMEM_8c_3a3058dcbe5e59b9c0080443a11d370b}{qmem\_\-context\_\-is\_\-valid} (const \hyperlink{struct__QMEM__Context}{QMEM\_\-Context} $\ast$context\_\-p)
\begin{CompactList}\small\item\em Validate a parsing context. \item\end{CompactList}\item 
static void \hyperlink{QMEM_8c_96de55403c3a95e281f76ad424b1dba4}{qmem\_\-swap\_\-copy} (unsigned char $\ast$dst\_\-p, const unsigned char $\ast$src\_\-p, unsigned int num\_\-bytes)
\begin{CompactList}\small\item\em Copy and byte-swap a buffer of data. \item\end{CompactList}\item 
static void \hyperlink{QMEM_8c_5e0172bcec9b828e98c7e982271b56cb}{qmem\_\-swap\_\-check} (unsigned char $\ast$dst\_\-p, const unsigned char $\ast$src\_\-p, unsigned int num\_\-bytes, int swapped)
\begin{CompactList}\small\item\em Copy and possibly byte-swap a buffer of data. \item\end{CompactList}\item 
unsigned int \hyperlink{QMEM_8c_cefee4ac5c76c9f4369c7673344f34df}{QMEM\_\-sizeof\_\-context} (void)
\begin{CompactList}\small\item\em Return the size of a parsing context. \item\end{CompactList}\item 
unsigned int \hyperlink{QMEM_8c_fe13ad62e7de48ae6c47b7e1db1e4d86}{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_8c_b8b70be855b42464264e7073152ea791}{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_9cf0d939265e22e7e411acfc632e7f88}{QMEM\_\-Status} \hyperlink{QMEM_8c_e4ba85ae387c8dbb667b185090499af2}{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 
static \hyperlink{QMEM_8h_9cf0d939265e22e7e411acfc632e7f88}{QMEM\_\-Status} \hyperlink{QMEM_8c_1a5ed54cc52e45558cb20db1dda39850}{qmem\_\-check\_\-identity} (const LSF\_\-identity $\ast$act\_\-id\_\-p, unsigned int exp\_\-type\_\-id, unsigned int exp\_\-version, unsigned int exp\_\-dir)
\begin{CompactList}\small\item\em Validate an 'identity' value from a header. \item\end{CompactList}\item 
\hyperlink{QMEM_8h_9cf0d939265e22e7e411acfc632e7f88}{QMEM\_\-Status} \hyperlink{QMEM_8c_53679b243631a43e96c804c7047dcda6}{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 
static \hyperlink{QMEM_8h_9cf0d939265e22e7e411acfc632e7f88}{QMEM\_\-Status} \hyperlink{QMEM_8c_3ffeb842b229a32b460a0860ab3f810c}{qmem\_\-parse\_\-desc\_\-ctb} (\hyperlink{struct__QMEM__Context}{QMEM\_\-Context} $\ast$context\_\-p, const LSF\_\-contribution $\ast$ctb\_\-p, LSF\_\-contribution\_\-hdr $\ast$hdr\_\-p, int dgm\_\-swapped)
\begin{CompactList}\small\item\em Parse a memory dump description contribution. \item\end{CompactList}\item 
static \hyperlink{QMEM_8h_9cf0d939265e22e7e411acfc632e7f88}{QMEM\_\-Status} \hyperlink{QMEM_8c_6a6fb7a26c1b71e457ba8f6e2f362763}{qmem\_\-parse\_\-data\_\-ctb} (\hyperlink{struct__QMEM__Context}{QMEM\_\-Context} $\ast$context\_\-p, const LSF\_\-contribution $\ast$ctb\_\-p, LSF\_\-contribution\_\-hdr $\ast$hdr\_\-p, int dgm\_\-swapped)
\begin{CompactList}\small\item\em Parse a memory dump data contribution. \item\end{CompactList}\item 
\hyperlink{QMEM_8h_9cf0d939265e22e7e411acfc632e7f88}{QMEM\_\-Status} \hyperlink{QMEM_8c_7bbf8bf42614148f7692f0372b05973e}{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_9cf0d939265e22e7e411acfc632e7f88}{QMEM\_\-Status} \hyperlink{QMEM_8c_08afda5d118e817fbfa5e7fb02fd9d26}{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_9cf0d939265e22e7e411acfc632e7f88}{QMEM\_\-Status} \hyperlink{QMEM_8c_f5e6f4901990c83c2bc0407b63b34c9a}{QMEM\_\-status} (const \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_787b4ee952720b29778a5a6df77cd420}{QMEM\_\-Lat\_\-Unit} \hyperlink{QMEM_8c_34ad321715cd1c3d708cc858be5473e5}{QMEM\_\-lat\_\-unit} (const \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_8c_e3064c19efd188b6c2536b877088e8fd}{QMEM\_\-tran\_\-id} (const \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_8c_dac321f2c0b76fdd8959c3621613449e}{QMEM\_\-cmd\_\-fcode} (const \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_8c_06134f623eac42dd2201c233c2ac840d}{QMEM\_\-start\_\-addr} (const \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_8c_9c81028b68f7000111ea373c6d23312a}{QMEM\_\-num\_\-datagrams} (const \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_8c_de1fec08f718172012f617891672b346}{QMEM\_\-bytes\_\-dumped} (const \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_8c_8f142a5900831ddd5848c2425795b249}{QMEM\_\-bytes\_\-available} (const \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_8c_45bc9709216dce8a873e756ee8ead80d}{QMEM\_\-data\_\-buf} (const \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}
Interpret MEM package SSR telemetry. 



\footnotesize\begin{verbatim}
**  CVS $Id: QMEM.c,v 1.3 2011/03/30 23:56:36 russell Exp $
**  \end{verbatim}
\normalsize


These functions interpret the memory dump telemetry sent to the SSR. 

\subsection{Enumeration Type Documentation}
\hypertarget{QMEM_8c_70a5b76cd8621fd71f1e416afe0adee4}{
\index{QMEM.c@{QMEM.c}!\_\-QMEM\_\-Contribution\_\-Id@{\_\-QMEM\_\-Contribution\_\-Id}}
\index{\_\-QMEM\_\-Contribution\_\-Id@{\_\-QMEM\_\-Contribution\_\-Id}!QMEM.c@{QMEM.c}}
\subsubsection[{\_\-QMEM\_\-Contribution\_\-Id}]{\setlength{\rightskip}{0pt plus 5cm}enum {\bf \_\-QMEM\_\-Contribution\_\-Id}}}
\label{QMEM_8c_70a5b76cd8621fd71f1e416afe0adee4}


Identifiers of the MEM datagram contributions. 

\begin{Desc}
\item[Enumerator: ]\par
\begin{description}
\index{QMEM\_\-CTB\_\-ID\_\-DESC@{QMEM\_\-CTB\_\-ID\_\-DESC}!QMEM.c@{QMEM.c}}\index{QMEM.c@{QMEM.c}!QMEM\_\-CTB\_\-ID\_\-DESC@{QMEM\_\-CTB\_\-ID\_\-DESC}}\item[{\em 
\hypertarget{QMEM_8c_70a5b76cd8621fd71f1e416afe0adee43bba5b170bf97699123d9a5af776be8f}{
QMEM\_\-CTB\_\-ID\_\-DESC}
\label{QMEM_8c_70a5b76cd8621fd71f1e416afe0adee43bba5b170bf97699123d9a5af776be8f}
}]Memory dump description contribution. \index{QMEM\_\-CTB\_\-ID\_\-DATA@{QMEM\_\-CTB\_\-ID\_\-DATA}!QMEM.c@{QMEM.c}}\index{QMEM.c@{QMEM.c}!QMEM\_\-CTB\_\-ID\_\-DATA@{QMEM\_\-CTB\_\-ID\_\-DATA}}\item[{\em 
\hypertarget{QMEM_8c_70a5b76cd8621fd71f1e416afe0adee4a5be54cf849de0755b6d7be5db0131e8}{
QMEM\_\-CTB\_\-ID\_\-DATA}
\label{QMEM_8c_70a5b76cd8621fd71f1e416afe0adee4a5be54cf849de0755b6d7be5db0131e8}
}]Memory dump data contribution. \end{description}
\end{Desc}

\hypertarget{QMEM_8c_a71d3309daa232e2d7d41c8293eeac3f}{
\index{QMEM.c@{QMEM.c}!\_\-QMEM\_\-Parse\_\-State@{\_\-QMEM\_\-Parse\_\-State}}
\index{\_\-QMEM\_\-Parse\_\-State@{\_\-QMEM\_\-Parse\_\-State}!QMEM.c@{QMEM.c}}
\subsubsection[{\_\-QMEM\_\-Parse\_\-State}]{\setlength{\rightskip}{0pt plus 5cm}enum {\bf \_\-QMEM\_\-Parse\_\-State}}}
\label{QMEM_8c_a71d3309daa232e2d7d41c8293eeac3f}


Memory dump parser states. 

\begin{Desc}
\item[Enumerator: ]\par
\begin{description}
\index{QMEM\_\-STATE\_\-UNKNOWN@{QMEM\_\-STATE\_\-UNKNOWN}!QMEM.c@{QMEM.c}}\index{QMEM.c@{QMEM.c}!QMEM\_\-STATE\_\-UNKNOWN@{QMEM\_\-STATE\_\-UNKNOWN}}\item[{\em 
\hypertarget{QMEM_8c_a71d3309daa232e2d7d41c8293eeac3fb29ab34dd9988f152ca4d03e11dd0879}{
QMEM\_\-STATE\_\-UNKNOWN}
\label{QMEM_8c_a71d3309daa232e2d7d41c8293eeac3fb29ab34dd9988f152ca4d03e11dd0879}
}]Parser state is unknown. \index{QMEM\_\-STATE\_\-START@{QMEM\_\-STATE\_\-START}!QMEM.c@{QMEM.c}}\index{QMEM.c@{QMEM.c}!QMEM\_\-STATE\_\-START@{QMEM\_\-STATE\_\-START}}\item[{\em 
\hypertarget{QMEM_8c_a71d3309daa232e2d7d41c8293eeac3f5b4a96ed35b5b5776f4d2af2850079c0}{
QMEM\_\-STATE\_\-START}
\label{QMEM_8c_a71d3309daa232e2d7d41c8293eeac3f5b4a96ed35b5b5776f4d2af2850079c0}
}]Waiting for description contribution. \index{QMEM\_\-STATE\_\-DESC@{QMEM\_\-STATE\_\-DESC}!QMEM.c@{QMEM.c}}\index{QMEM.c@{QMEM.c}!QMEM\_\-STATE\_\-DESC@{QMEM\_\-STATE\_\-DESC}}\item[{\em 
\hypertarget{QMEM_8c_a71d3309daa232e2d7d41c8293eeac3f226b661247e51a927c4d6ca4e3b5bfcc}{
QMEM\_\-STATE\_\-DESC}
\label{QMEM_8c_a71d3309daa232e2d7d41c8293eeac3f226b661247e51a927c4d6ca4e3b5bfcc}
}]Waiting for data contribution. \index{QMEM\_\-STATE\_\-DATA@{QMEM\_\-STATE\_\-DATA}!QMEM.c@{QMEM.c}}\index{QMEM.c@{QMEM.c}!QMEM\_\-STATE\_\-DATA@{QMEM\_\-STATE\_\-DATA}}\item[{\em 
\hypertarget{QMEM_8c_a71d3309daa232e2d7d41c8293eeac3f3a79fd9464514a386fac9e3a49024786}{
QMEM\_\-STATE\_\-DATA}
\label{QMEM_8c_a71d3309daa232e2d7d41c8293eeac3f3a79fd9464514a386fac9e3a49024786}
}]Waiting to start next datagram. \end{description}
\end{Desc}



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


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}


References \_\-QMEM\_\-Context::bytes\_\-available, and qmem\_\-context\_\-is\_\-valid().\hypertarget{QMEM_8c_de1fec08f718172012f617891672b346}{
\index{QMEM.c@{QMEM.c}!QMEM\_\-bytes\_\-dumped@{QMEM\_\-bytes\_\-dumped}}
\index{QMEM\_\-bytes\_\-dumped@{QMEM\_\-bytes\_\-dumped}!QMEM.c@{QMEM.c}}
\subsubsection[{QMEM\_\-bytes\_\-dumped}]{\setlength{\rightskip}{0pt plus 5cm}unsigned int QMEM\_\-bytes\_\-dumped (const {\bf QMEM\_\-Context} $\ast$ {\em context\_\-p})}}
\label{QMEM_8c_de1fec08f718172012f617891672b346}


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}


References \_\-QMEM\_\-Context::bytes\_\-dumped, and qmem\_\-context\_\-is\_\-valid().\hypertarget{QMEM_8c_1a5ed54cc52e45558cb20db1dda39850}{
\index{QMEM.c@{QMEM.c}!qmem\_\-check\_\-identity@{qmem\_\-check\_\-identity}}
\index{qmem\_\-check\_\-identity@{qmem\_\-check\_\-identity}!QMEM.c@{QMEM.c}}
\subsubsection[{qmem\_\-check\_\-identity}]{\setlength{\rightskip}{0pt plus 5cm}{\bf QMEM\_\-Status} qmem\_\-check\_\-identity (const LSF\_\-identity $\ast$ {\em act\_\-id\_\-p}, \/  unsigned int {\em exp\_\-type\_\-id}, \/  unsigned int {\em exp\_\-version}, \/  unsigned int {\em exp\_\-dir})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{QMEM_8c_1a5ed54cc52e45558cb20db1dda39850}


Validate an 'identity' value from a header. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em act\_\-id\_\-p}]Pointer to the actual identity value. \item[{\em exp\_\-type\_\-id}]Expected type\_\-id value. \item[{\em exp\_\-version}]Expected version value. \item[{\em exp\_\-dir}]Expected dir value.\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]QMEM\_\-Status value. \end{Desc}


References QMEM\_\-STATUS\_\-BAD\_\-DIR, QMEM\_\-STATUS\_\-BAD\_\-HDR, QMEM\_\-STATUS\_\-BAD\_\-TYPE, QMEM\_\-STATUS\_\-BAD\_\-VER, and QMEM\_\-STATUS\_\-OK.

Referenced by qmem\_\-parse\_\-data\_\-ctb(), qmem\_\-parse\_\-desc\_\-ctb(), and QMEM\_\-start\_\-parsing().\hypertarget{QMEM_8c_dac321f2c0b76fdd8959c3621613449e}{
\index{QMEM.c@{QMEM.c}!QMEM\_\-cmd\_\-fcode@{QMEM\_\-cmd\_\-fcode}}
\index{QMEM\_\-cmd\_\-fcode@{QMEM\_\-cmd\_\-fcode}!QMEM.c@{QMEM.c}}
\subsubsection[{QMEM\_\-cmd\_\-fcode}]{\setlength{\rightskip}{0pt plus 5cm}unsigned int QMEM\_\-cmd\_\-fcode (const {\bf QMEM\_\-Context} $\ast$ {\em context\_\-p})}}
\label{QMEM_8c_dac321f2c0b76fdd8959c3621613449e}


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}


References \_\-QMEM\_\-Context::desc, \_\-QMEM\_\-Context::desc\_\-valid, \_\-QMEM\_\-Dump\_\-Desc::idents, and qmem\_\-context\_\-is\_\-valid().\hypertarget{QMEM_8c_3a3058dcbe5e59b9c0080443a11d370b}{
\index{QMEM.c@{QMEM.c}!qmem\_\-context\_\-is\_\-valid@{qmem\_\-context\_\-is\_\-valid}}
\index{qmem\_\-context\_\-is\_\-valid@{qmem\_\-context\_\-is\_\-valid}!QMEM.c@{QMEM.c}}
\subsubsection[{qmem\_\-context\_\-is\_\-valid}]{\setlength{\rightskip}{0pt plus 5cm}int qmem\_\-context\_\-is\_\-valid (const {\bf QMEM\_\-Context} $\ast$ {\em context\_\-p})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{QMEM_8c_3a3058dcbe5e59b9c0080443a11d370b}


Validate a parsing context. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em context\_\-p}]Pointer to parsing context.\end{description}
\end{Desc}
\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em 0}]Parsing context is invalid. \item[{\em 1}]Parsing context is valid. \end{description}
\end{Desc}


References \_\-QMEM\_\-Context::key, and QMEM\_\-CONTEXT\_\-VALID\_\-KEY.

Referenced by QMEM\_\-bytes\_\-available(), QMEM\_\-bytes\_\-dumped(), QMEM\_\-cmd\_\-fcode(), QMEM\_\-data\_\-buf(), QMEM\_\-lat\_\-unit(), QMEM\_\-num\_\-datagrams(), QMEM\_\-parse\_\-contribution(), qmem\_\-parse\_\-data\_\-ctb(), qmem\_\-parse\_\-desc\_\-ctb(), QMEM\_\-start\_\-addr(), QMEM\_\-start\_\-parsing(), QMEM\_\-status(), and QMEM\_\-tran\_\-id().\hypertarget{QMEM_8c_45bc9709216dce8a873e756ee8ead80d}{
\index{QMEM.c@{QMEM.c}!QMEM\_\-data\_\-buf@{QMEM\_\-data\_\-buf}}
\index{QMEM\_\-data\_\-buf@{QMEM\_\-data\_\-buf}!QMEM.c@{QMEM.c}}
\subsubsection[{QMEM\_\-data\_\-buf}]{\setlength{\rightskip}{0pt plus 5cm}unsigned char $\ast$ QMEM\_\-data\_\-buf (const {\bf QMEM\_\-Context} $\ast$ {\em context\_\-p})}}
\label{QMEM_8c_45bc9709216dce8a873e756ee8ead80d}


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}


References \_\-QMEM\_\-Context::data\_\-buf\_\-p, and qmem\_\-context\_\-is\_\-valid().\hypertarget{QMEM_8c_e4ba85ae387c8dbb667b185090499af2}{
\index{QMEM.c@{QMEM.c}!QMEM\_\-init\_\-context@{QMEM\_\-init\_\-context}}
\index{QMEM\_\-init\_\-context@{QMEM\_\-init\_\-context}!QMEM.c@{QMEM.c}}
\subsubsection[{QMEM\_\-init\_\-context}]{\setlength{\rightskip}{0pt plus 5cm}{\bf QMEM\_\-Status} QMEM\_\-init\_\-context ({\bf QMEM\_\-Context} $\ast$ {\em context\_\-p}, \/  unsigned char $\ast$ {\em data\_\-buf\_\-p}, \/  unsigned int {\em data\_\-buf\_\-bytes})}}
\label{QMEM_8c_e4ba85ae387c8dbb667b185090499af2}


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}


References \_\-QMEM\_\-Context::data\_\-buf\_\-bytes, \_\-QMEM\_\-Context::data\_\-buf\_\-p, \_\-QMEM\_\-Context::key, QMEM\_\-CONTEXT\_\-VALID\_\-KEY, QMEM\_\-STATE\_\-START, QMEM\_\-STATUS\_\-OK, \_\-QMEM\_\-Context::state, and \_\-QMEM\_\-Context::status.\hypertarget{QMEM_8c_34ad321715cd1c3d708cc858be5473e5}{
\index{QMEM.c@{QMEM.c}!QMEM\_\-lat\_\-unit@{QMEM\_\-lat\_\-unit}}
\index{QMEM\_\-lat\_\-unit@{QMEM\_\-lat\_\-unit}!QMEM.c@{QMEM.c}}
\subsubsection[{QMEM\_\-lat\_\-unit}]{\setlength{\rightskip}{0pt plus 5cm}{\bf QMEM\_\-Lat\_\-Unit} QMEM\_\-lat\_\-unit (const {\bf QMEM\_\-Context} $\ast$ {\em context\_\-p})}}
\label{QMEM_8c_34ad321715cd1c3d708cc858be5473e5}


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}


References \_\-QMEM\_\-Context::desc, \_\-QMEM\_\-Context::desc\_\-valid, \_\-QMEM\_\-Dump\_\-Desc::idents, qmem\_\-context\_\-is\_\-valid(), and QMEM\_\-LAT\_\-UNIT\_\-UNKNOWN.\hypertarget{QMEM_8c_9c81028b68f7000111ea373c6d23312a}{
\index{QMEM.c@{QMEM.c}!QMEM\_\-num\_\-datagrams@{QMEM\_\-num\_\-datagrams}}
\index{QMEM\_\-num\_\-datagrams@{QMEM\_\-num\_\-datagrams}!QMEM.c@{QMEM.c}}
\subsubsection[{QMEM\_\-num\_\-datagrams}]{\setlength{\rightskip}{0pt plus 5cm}unsigned int QMEM\_\-num\_\-datagrams (const {\bf QMEM\_\-Context} $\ast$ {\em context\_\-p})}}
\label{QMEM_8c_9c81028b68f7000111ea373c6d23312a}


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}


References \_\-QMEM\_\-Context::num\_\-datagrams, and qmem\_\-context\_\-is\_\-valid().\hypertarget{QMEM_8c_7bbf8bf42614148f7692f0372b05973e}{
\index{QMEM.c@{QMEM.c}!QMEM\_\-parse\_\-contribution@{QMEM\_\-parse\_\-contribution}}
\index{QMEM\_\-parse\_\-contribution@{QMEM\_\-parse\_\-contribution}!QMEM.c@{QMEM.c}}
\subsubsection[{QMEM\_\-parse\_\-contribution}]{\setlength{\rightskip}{0pt plus 5cm}{\bf QMEM\_\-Status} QMEM\_\-parse\_\-contribution ({\bf QMEM\_\-Context} $\ast$ {\em context\_\-p}, \/  const LSF\_\-contribution $\ast$ {\em ctb\_\-p}, \/  unsigned int {\em dgm\_\-bytes}, \/  int {\em dgm\_\-swapped})}}
\label{QMEM_8c_7bbf8bf42614148f7692f0372b05973e}


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_f5e6f4901990c83c2bc0407b63b34c9a}{QMEM\_\-status()}, \hyperlink{QMEM_8c_34ad321715cd1c3d708cc858be5473e5}{QMEM\_\-lat\_\-unit()}, etc. functions to extract information about the datagram. 

References qmem\_\-context\_\-is\_\-valid(), QMEM\_\-CTB\_\-ID\_\-DATA, QMEM\_\-CTB\_\-ID\_\-DESC, qmem\_\-parse\_\-data\_\-ctb(), qmem\_\-parse\_\-desc\_\-ctb(), QMEM\_\-STATUS\_\-BAD\_\-TYPE, QMEM\_\-STATUS\_\-NULL\_\-PTR, QMEM\_\-STATUS\_\-OK, QMEM\_\-STATUS\_\-SHORT, QMEM\_\-STATUS\_\-TRUNCATED, qmem\_\-swap\_\-check(), and \_\-QMEM\_\-Context::status.

Referenced by QMEM\_\-parse\_\-datagram().\hypertarget{QMEM_8c_6a6fb7a26c1b71e457ba8f6e2f362763}{
\index{QMEM.c@{QMEM.c}!qmem\_\-parse\_\-data\_\-ctb@{qmem\_\-parse\_\-data\_\-ctb}}
\index{qmem\_\-parse\_\-data\_\-ctb@{qmem\_\-parse\_\-data\_\-ctb}!QMEM.c@{QMEM.c}}
\subsubsection[{qmem\_\-parse\_\-data\_\-ctb}]{\setlength{\rightskip}{0pt plus 5cm}{\bf QMEM\_\-Status} qmem\_\-parse\_\-data\_\-ctb ({\bf QMEM\_\-Context} $\ast$ {\em context\_\-p}, \/  const LSF\_\-contribution $\ast$ {\em ctb\_\-p}, \/  LSF\_\-contribution\_\-hdr $\ast$ {\em hdr\_\-p}, \/  int {\em dgm\_\-swapped})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{QMEM_8c_6a6fb7a26c1b71e457ba8f6e2f362763}


Parse a memory dump data contribution. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em context\_\-p}]Ptr to the parsing context. \item[{\em ctb\_\-p}]Ptr to the contribution. \item[{\em hdr\_\-p}]Ptr to the contribution header in proper byte order. \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}


References \_\-QMEM\_\-Context::bytes\_\-available, \_\-QMEM\_\-Context::bytes\_\-dumped, \_\-QMEM\_\-Context::data\_\-buf\_\-bytes, \_\-QMEM\_\-Context::data\_\-buf\_\-p, \_\-QMEM\_\-Context::num\_\-datagrams, qmem\_\-check\_\-identity(), qmem\_\-context\_\-is\_\-valid(), QMEM\_\-CTB\_\-ID\_\-DATA, QMEM\_\-STATE\_\-DATA, QMEM\_\-STATE\_\-DESC, QMEM\_\-STATUS\_\-BAD\_\-CTX, QMEM\_\-STATUS\_\-BAD\_\-HDR, QMEM\_\-STATUS\_\-OK, qmem\_\-swap\_\-copy(), \_\-QMEM\_\-Context::state, and \_\-QMEM\_\-Context::status.

Referenced by QMEM\_\-parse\_\-contribution().\hypertarget{QMEM_8c_08afda5d118e817fbfa5e7fb02fd9d26}{
\index{QMEM.c@{QMEM.c}!QMEM\_\-parse\_\-datagram@{QMEM\_\-parse\_\-datagram}}
\index{QMEM\_\-parse\_\-datagram@{QMEM\_\-parse\_\-datagram}!QMEM.c@{QMEM.c}}
\subsubsection[{QMEM\_\-parse\_\-datagram}]{\setlength{\rightskip}{0pt plus 5cm}{\bf QMEM\_\-Status} QMEM\_\-parse\_\-datagram ({\bf QMEM\_\-Context} $\ast$ {\em context\_\-p}, \/  const LSF\_\-datagram $\ast$ {\em dgm\_\-p}, \/  unsigned int {\em dgm\_\-bytes}, \/  int {\em dgm\_\-swapped})}}
\label{QMEM_8c_08afda5d118e817fbfa5e7fb02fd9d26}


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_53679b243631a43e96c804c7047dcda6}{QMEM\_\-start\_\-parsing()} and \hyperlink{QMEM_8c_7bbf8bf42614148f7692f0372b05973e}{QMEM\_\-parse\_\-contribution()} functions to walk through and parse an entire memory dump datagram. The \hyperlink{QMEM_8c_f5e6f4901990c83c2bc0407b63b34c9a}{QMEM\_\-status()}, \hyperlink{QMEM_8c_34ad321715cd1c3d708cc858be5473e5}{QMEM\_\-lat\_\-unit()}, etc. functions can then be used to extract information about the datagram. 

References QMEM\_\-parse\_\-contribution(), QMEM\_\-start\_\-parsing(), QMEM\_\-STATUS\_\-OK, and qmem\_\-swap\_\-check().\hypertarget{QMEM_8c_3ffeb842b229a32b460a0860ab3f810c}{
\index{QMEM.c@{QMEM.c}!qmem\_\-parse\_\-desc\_\-ctb@{qmem\_\-parse\_\-desc\_\-ctb}}
\index{qmem\_\-parse\_\-desc\_\-ctb@{qmem\_\-parse\_\-desc\_\-ctb}!QMEM.c@{QMEM.c}}
\subsubsection[{qmem\_\-parse\_\-desc\_\-ctb}]{\setlength{\rightskip}{0pt plus 5cm}{\bf QMEM\_\-Status} qmem\_\-parse\_\-desc\_\-ctb ({\bf QMEM\_\-Context} $\ast$ {\em context\_\-p}, \/  const LSF\_\-contribution $\ast$ {\em ctb\_\-p}, \/  LSF\_\-contribution\_\-hdr $\ast$ {\em hdr\_\-p}, \/  int {\em dgm\_\-swapped})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{QMEM_8c_3ffeb842b229a32b460a0860ab3f810c}


Parse a memory dump description contribution. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em context\_\-p}]Pointer to the parsing context. \item[{\em ctb\_\-p}]Pointer to the contribution. \item[{\em hdr\_\-p}]Ptr to the contribution header in proper byte order. \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}


References \_\-QMEM\_\-Dump\_\-Desc::address, \_\-QMEM\_\-Context::bytes\_\-dumped, \_\-QMEM\_\-Context::desc, \_\-QMEM\_\-Context::desc\_\-valid, \_\-QMEM\_\-Dump\_\-Desc::idents, qmem\_\-check\_\-identity(), qmem\_\-context\_\-is\_\-valid(), QMEM\_\-CTB\_\-ID\_\-DESC, QMEM\_\-STATE\_\-DESC, QMEM\_\-STATE\_\-START, QMEM\_\-STATUS\_\-BAD\_\-CTB\_\-LEN, QMEM\_\-STATUS\_\-BAD\_\-CTX, QMEM\_\-STATUS\_\-BAD\_\-HDR, QMEM\_\-STATUS\_\-NOT\_\-NEXT, QMEM\_\-STATUS\_\-OK, qmem\_\-swap\_\-check(), \_\-QMEM\_\-Context::state, and \_\-QMEM\_\-Context::status.

Referenced by QMEM\_\-parse\_\-contribution().\hypertarget{QMEM_8c_cefee4ac5c76c9f4369c7673344f34df}{
\index{QMEM.c@{QMEM.c}!QMEM\_\-sizeof\_\-context@{QMEM\_\-sizeof\_\-context}}
\index{QMEM\_\-sizeof\_\-context@{QMEM\_\-sizeof\_\-context}!QMEM.c@{QMEM.c}}
\subsubsection[{QMEM\_\-sizeof\_\-context}]{\setlength{\rightskip}{0pt plus 5cm}unsigned int QMEM\_\-sizeof\_\-context (void)}}
\label{QMEM_8c_cefee4ac5c76c9f4369c7673344f34df}


Return the size of a parsing context. 

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


Return the maximum size of a memory dump datagram. 

\begin{Desc}
\item[Returns:]Maximum size, in bytes, of a memory dump datagram. \end{Desc}


References QMEM\_\-MAX\_\-DATAGRAM\_\-BYTES.\hypertarget{QMEM_8c_fe13ad62e7de48ae6c47b7e1db1e4d86}{
\index{QMEM.c@{QMEM.c}!QMEM\_\-sizeof\_\-max\_\-dump\_\-data@{QMEM\_\-sizeof\_\-max\_\-dump\_\-data}}
\index{QMEM\_\-sizeof\_\-max\_\-dump\_\-data@{QMEM\_\-sizeof\_\-max\_\-dump\_\-data}!QMEM.c@{QMEM.c}}
\subsubsection[{QMEM\_\-sizeof\_\-max\_\-dump\_\-data}]{\setlength{\rightskip}{0pt plus 5cm}unsigned int QMEM\_\-sizeof\_\-max\_\-dump\_\-data (void)}}
\label{QMEM_8c_fe13ad62e7de48ae6c47b7e1db1e4d86}


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}


References QMEM\_\-MAX\_\-DUMP\_\-DATA\_\-BYTES.\hypertarget{QMEM_8c_06134f623eac42dd2201c233c2ac840d}{
\index{QMEM.c@{QMEM.c}!QMEM\_\-start\_\-addr@{QMEM\_\-start\_\-addr}}
\index{QMEM\_\-start\_\-addr@{QMEM\_\-start\_\-addr}!QMEM.c@{QMEM.c}}
\subsubsection[{QMEM\_\-start\_\-addr}]{\setlength{\rightskip}{0pt plus 5cm}unsigned int QMEM\_\-start\_\-addr (const {\bf QMEM\_\-Context} $\ast$ {\em context\_\-p})}}
\label{QMEM_8c_06134f623eac42dd2201c233c2ac840d}


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}


References \_\-QMEM\_\-Dump\_\-Desc::address, \_\-QMEM\_\-Context::desc, \_\-QMEM\_\-Context::desc\_\-valid, and qmem\_\-context\_\-is\_\-valid().\hypertarget{QMEM_8c_53679b243631a43e96c804c7047dcda6}{
\index{QMEM.c@{QMEM.c}!QMEM\_\-start\_\-parsing@{QMEM\_\-start\_\-parsing}}
\index{QMEM\_\-start\_\-parsing@{QMEM\_\-start\_\-parsing}!QMEM.c@{QMEM.c}}
\subsubsection[{QMEM\_\-start\_\-parsing}]{\setlength{\rightskip}{0pt plus 5cm}{\bf QMEM\_\-Status} QMEM\_\-start\_\-parsing ({\bf QMEM\_\-Context} $\ast$ {\em context\_\-p}, \/  const LSF\_\-datagram $\ast$ {\em dgm\_\-p}, \/  unsigned int {\em dgm\_\-bytes}, \/  int {\em dgm\_\-swapped})}}
\label{QMEM_8c_53679b243631a43e96c804c7047dcda6}


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}


References qmem\_\-check\_\-identity(), qmem\_\-context\_\-is\_\-valid(), QMEM\_\-STATE\_\-START, QMEM\_\-STATUS\_\-NULL\_\-PTR, QMEM\_\-STATUS\_\-OK, QMEM\_\-STATUS\_\-SHORT, QMEM\_\-STATUS\_\-TRUNCATED, qmem\_\-swap\_\-check(), \_\-QMEM\_\-Context::state, and \_\-QMEM\_\-Context::status.

Referenced by QMEM\_\-parse\_\-datagram().\hypertarget{QMEM_8c_f5e6f4901990c83c2bc0407b63b34c9a}{
\index{QMEM.c@{QMEM.c}!QMEM\_\-status@{QMEM\_\-status}}
\index{QMEM\_\-status@{QMEM\_\-status}!QMEM.c@{QMEM.c}}
\subsubsection[{QMEM\_\-status}]{\setlength{\rightskip}{0pt plus 5cm}{\bf QMEM\_\-Status} QMEM\_\-status (const {\bf QMEM\_\-Context} $\ast$ {\em context\_\-p})}}
\label{QMEM_8c_f5e6f4901990c83c2bc0407b63b34c9a}


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}


References qmem\_\-context\_\-is\_\-valid(), QMEM\_\-STATE\_\-DATA, QMEM\_\-STATUS\_\-BAD\_\-CTX, QMEM\_\-STATUS\_\-INCOMPLETE, QMEM\_\-STATUS\_\-OK, \_\-QMEM\_\-Context::state, and \_\-QMEM\_\-Context::status.\hypertarget{QMEM_8c_5e0172bcec9b828e98c7e982271b56cb}{
\index{QMEM.c@{QMEM.c}!qmem\_\-swap\_\-check@{qmem\_\-swap\_\-check}}
\index{qmem\_\-swap\_\-check@{qmem\_\-swap\_\-check}!QMEM.c@{QMEM.c}}
\subsubsection[{qmem\_\-swap\_\-check}]{\setlength{\rightskip}{0pt plus 5cm}void qmem\_\-swap\_\-check (unsigned char $\ast$ {\em dst\_\-p}, \/  const unsigned char $\ast$ {\em src\_\-p}, \/  unsigned int {\em num\_\-bytes}, \/  int {\em swapped})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{QMEM_8c_5e0172bcec9b828e98c7e982271b56cb}


Copy and possibly byte-swap a buffer of data. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em dst\_\-p}]Pointer to destination buffer. \item[{\em src\_\-p}]Pointer to source buffer. \item[{\em num\_\-bytes}]Number of bytes to copy and byte-swap. \item[{\em swapped}]Flag indicating that data is already swapped.\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]Nothing. \end{Desc}


References qmem\_\-swap\_\-copy().

Referenced by QMEM\_\-parse\_\-contribution(), QMEM\_\-parse\_\-datagram(), qmem\_\-parse\_\-desc\_\-ctb(), and QMEM\_\-start\_\-parsing().\hypertarget{QMEM_8c_96de55403c3a95e281f76ad424b1dba4}{
\index{QMEM.c@{QMEM.c}!qmem\_\-swap\_\-copy@{qmem\_\-swap\_\-copy}}
\index{qmem\_\-swap\_\-copy@{qmem\_\-swap\_\-copy}!QMEM.c@{QMEM.c}}
\subsubsection[{qmem\_\-swap\_\-copy}]{\setlength{\rightskip}{0pt plus 5cm}void qmem\_\-swap\_\-copy (unsigned char $\ast$ {\em dst\_\-p}, \/  const unsigned char $\ast$ {\em src\_\-p}, \/  unsigned int {\em num\_\-bytes})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{QMEM_8c_96de55403c3a95e281f76ad424b1dba4}


Copy and byte-swap a buffer of data. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em dst\_\-p}]Pointer to destination buffer. \item[{\em src\_\-p}]Pointer to source buffer. \item[{\em num\_\-bytes}]Number of bytes to copy and byte-swap.\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]Nothing. \end{Desc}


Referenced by qmem\_\-parse\_\-data\_\-ctb(), and qmem\_\-swap\_\-check().\hypertarget{QMEM_8c_e3064c19efd188b6c2536b877088e8fd}{
\index{QMEM.c@{QMEM.c}!QMEM\_\-tran\_\-id@{QMEM\_\-tran\_\-id}}
\index{QMEM\_\-tran\_\-id@{QMEM\_\-tran\_\-id}!QMEM.c@{QMEM.c}}
\subsubsection[{QMEM\_\-tran\_\-id}]{\setlength{\rightskip}{0pt plus 5cm}unsigned int QMEM\_\-tran\_\-id (const {\bf QMEM\_\-Context} $\ast$ {\em context\_\-p})}}
\label{QMEM_8c_e3064c19efd188b6c2536b877088e8fd}


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}


References \_\-QMEM\_\-Context::desc, \_\-QMEM\_\-Context::desc\_\-valid, \_\-QMEM\_\-Dump\_\-Desc::idents, and qmem\_\-context\_\-is\_\-valid().