GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > MEM / V5-6-0

Constituent: mem_base     Tag: mv2304


Interface   Data Structures   File List   Data Fields   Globals  

memcommon.c File Reference

Code common to MEM functions. More...

#include <string.h>
#include "CCSDS/CCSDS_pkt.h"
#include "MEM/MEM.h"
#include "MEM/MEM_cmddefs.h"
#include "MEM/MEM_msgs.h"
#include "MSG/MSG_pubdefs.h"
#include "mempriv.h"

Include dependency graph for memcommon.c:


Functions

void MEM_CreateDescriptor (MEM_Descriptor *md, const MEM_Memmap map, const caddr_t addr, const size_t bytes)
 Create a generic memory descriptor.
unsigned int MEM_CreateDescriptorFromDumpCommand (MEM_Descriptor *md_p, const void *pkt_p)
 Create a memory descriptor from a dump command.

Detailed Description

Code common to MEM functions.

  CVS $Id: memcommon.c,v 1.11 2005/04/14 21:53:08 dmay Exp $
  

Function Documentation

void MEM_CreateDescriptor MEM_Descriptor md,
const MEM_Memmap  map,
const caddr_t  addr,
const size_t  bytes
 

Create a 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.

Parameters:
md Pointer to location to build the descriptor.
map Type of memory.
addr Starting memory address.
bytes Size of memory, in bytes.

unsigned int MEM_CreateDescriptorFromDumpCommand MEM_Descriptor md_p,
const void *  pkt_p
 

Create a memory descriptor from a 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.

Parameters:
md_p Pointer to location to build the descriptor.
pkt_p Pointer to valid memory dump command packet.


Generated on Tue Nov 8 22:36:24 2005 by  doxygen 1.4.4