\hypertarget{memcommon_8c}{
\section{memcommon.c File Reference}
\label{memcommon_8c}\index{memcommon.c@{memcommon.c}}
}
Code common to MEM functions.  


{\tt \#include $<$string.h$>$}\par
{\tt \#include \char`\"{}CCSDS/CCSDS\_\-pkt.h\char`\"{}}\par
{\tt \#include \char`\"{}MEM/MEM.h\char`\"{}}\par
{\tt \#include \char`\"{}MEM/MEM\_\-cmddefs.h\char`\"{}}\par
{\tt \#include \char`\"{}MEM/MEM\_\-msgs.h\char`\"{}}\par
{\tt \#include \char`\"{}MSG/MSG\_\-pubdefs.h\char`\"{}}\par
{\tt \#include \char`\"{}mempriv.h\char`\"{}}\par


Include dependency graph for memcommon.c:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=332pt]{memcommon_8c__incl}
\end{center}
\end{figure}
\subsection*{Functions}
\begin{CompactItemize}
\item 
void \hyperlink{memcommon_8c_a0}{MEM\_\-Create\-Descriptor} (\hyperlink{struct__MEM__Descriptor}{MEM\_\-Descriptor} $\ast$md, const \hyperlink{MEM_8h_a4}{MEM\_\-Memmap} map, const caddr\_\-t addr, const size\_\-t bytes)
\begin{CompactList}\small\item\em Create generic memory descriptor. \item\end{CompactList}\item 
unsigned int \hyperlink{memcommon_8c_a1}{MEM\_\-Create\-Descriptor\-From\-Dump\-Command} (\hyperlink{struct__MEM__Descriptor}{MEM\_\-Descriptor} $\ast$md\_\-p, const void $\ast$pkt\_\-p)
\begin{CompactList}\small\item\em Create memory descriptor from a memory dump command. \item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}
Code common to MEM functions. 



\footnotesize\begin{verbatim}
  CVS $Id: memcommon.c,v 1.11 2005/04/14 21:53:08 dmay Exp $
  \end{verbatim}\normalsize


\subsection{Function Documentation}
\hypertarget{memcommon_8c_a0}{
\index{memcommon.c@{memcommon.c}!MEM_CreateDescriptor@{MEM\_\-CreateDescriptor}}
\index{MEM_CreateDescriptor@{MEM\_\-CreateDescriptor}!memcommon.c@{memcommon.c}}
\subsubsection[MEM\_\-CreateDescriptor]{\setlength{\rightskip}{0pt plus 5cm}void MEM\_\-Create\-Descriptor (\hyperlink{struct__MEM__Descriptor}{MEM\_\-Descriptor} $\ast$ {\em md}, const \hyperlink{MEM_8h_a4}{MEM\_\-Memmap} {\em map}, const caddr\_\-t {\em addr}, const size\_\-t {\em bytes})}}
\label{memcommon_8c_a0}


Create generic memory descriptor. 

Create a generic memory descriptor. This can be used to create any type of memory descriptor, but for those with extended data (such as a PCI configuration space descriptor), the extended data must be added by the caller. This function simply copies its arguments to the corresponding members of the memory descriptor.

There is no argument checking, a user can create a completely bogus memory descriptor with this call. It is up to the routines that use the memory descriptor to validate it.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em md}]Pointer to location to build the descriptor. \item[{\em map}]Type of memory. \item[{\em addr}]Starting memory address. \item[{\em bytes}]Size of memory, in bytes. \end{description}
\end{Desc}
\hypertarget{memcommon_8c_a1}{
\index{memcommon.c@{memcommon.c}!MEM_CreateDescriptorFromDumpCommand@{MEM\_\-CreateDescriptorFromDumpCommand}}
\index{MEM_CreateDescriptorFromDumpCommand@{MEM\_\-CreateDescriptorFromDumpCommand}!memcommon.c@{memcommon.c}}
\subsubsection[MEM\_\-CreateDescriptorFromDumpCommand]{\setlength{\rightskip}{0pt plus 5cm}unsigned int MEM\_\-Create\-Descriptor\-From\-Dump\-Command (\hyperlink{struct__MEM__Descriptor}{MEM\_\-Descriptor} $\ast$ {\em md\_\-p}, const void $\ast$ {\em pkt\_\-p})}}
\label{memcommon_8c_a1}


Create memory descriptor from a memory dump command. 

This function creates a memory descriptor for use during a memory dump. It converts a valid memory dump command packet to a memory descriptor that describes the memory specified in the memory dump command.

It is assumed that the memory dump command packet has been validated.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em md\_\-p}]Pointer to location to build the descriptor. \item[{\em pkt\_\-p}]Pointer to valid memory dump command packet. \end{description}
\end{Desc}


Here is the call graph for this function:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=230pt]{memcommon_8c_a1_cgraph}
\end{center}
\end{figure}
