GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> RIM / V3-1-2 > rim / linux-gcc


Interface   Data Structures   File List   Data Fields   Globals  

RIM_rim.c File Reference

Provides the RIM functionality. More...

#include <RIM_p.h>
#include <RIM_descriptions.ic>
#include <RIM_AG_init_p.h>
#include <RIM_AG_number_p.h>
#include <RIM_AG_regEnums_p.h>
#include <PBI/Endianness.h>
#include <PBI/PTR.h>
#include <string.h>

Enumerations

enum  {
  TRC_CSR_ZERO_H = 0x00000003,
  TRC_CSR_ZERO_L = 0xa0000000
}

Functions

size_t sizeofStore (void)
 Calculate the "payload" of RIM.
size_t roundUp (size_t size)
 Round up a buffer size to a multiple of 64-bits (8 bytes).
char * align (char *next)
 Align a pointer to the next 64-bit aligned block.
size_t RIM_sizeof (void)
 Calculate the footprint of the RIM structure.
RIMRIM_construct (void *buffer)
 Initialise a block of memory as a RIM object.
void RIM_clear (RIM *rim)
 Clear out the map and data portions of the RIM structure.


Detailed Description

Provides the RIM functionality.

Author:
James Swain & Owen Saxton
$Id: RIM_rim.c,v 1.3 2011/03/27 06:51:29 saxton Exp $

Function Documentation

char * align ( char *  next  ) 

Align a pointer to the next 64-bit aligned block.

Parameters:
next Ptr to the next data block
Returns:
Pointer to the next 64-bit aligned block

Referenced by RIM_construct().

void RIM_clear ( RIM rim  ) 

Clear out the map and data portions of the RIM structure.

Parameters:
rim Pointer to the RIM object to clear

References RIM_clearMap(), and RIM_setReg().

RIM* RIM_construct ( void *  buffer  ) 

Initialise a block of memory as a RIM object.

Parameters:
buffer Pointer to uninitialised memory to use for the RIM structure
Returns:
The address of the initialised RIM structure, or NULL if the buffer is misaligned

References align(), RIM_constructMap(), RIM_cptDesc(), RIM_number(), RIM_setReg(), sizeofCpt(), and sizeofStore().

size_t RIM_sizeof ( void   ) 

Calculate the footprint of the RIM structure.

Returns:
Amount of memory required to hold the RIM structure

References RIM_sizeofMap(), roundUp(), and sizeofStore().

size_t roundUp ( size_t  size  ) 

Round up a buffer size to a multiple of 64-bits (8 bytes).

Parameters:
size Unrounded size
Returns:
Rounded size

Referenced by RIM_sizeof(), and sizeofStore().

size_t sizeofStore ( void   ) 

Calculate the "payload" of RIM.

Returns:
Amount of memory required to hold the RIM storage

References RIM_cptDesc(), RIM_number(), roundUp(), and sizeofCpt().

Referenced by RIM_construct(), and RIM_sizeof().


Generated on Fri Sep 30 18:27:32 2011 by  doxygen 1.5.8