GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > TRD / V0-0-0

Constituent: trd     Tag: rad750


Interface   Data Structures   File List   Data Fields   Globals  

TRD_database.c File Reference

Facilities to save/restore a TRD (turbo-reset database) database. More...

#include <string.h>
#include "CAB/CAB_lookupPub.h"
#include "MDB/MDB_pubdefs.h"
#include "PBS/FFS.ih"
#include "PBS/MTX.h"
#include "TRD/TRD_msgs.h"
#include "ZLIB/zlib.h"
#include "TRD_prvdefs.h"

Include dependency graph for TRD_database.c:


Defines

#define MEMMAP_BHDR_BASE_OFFSET   (0x00000000)
#define MEMMAP_BHDR_SIZE   (256)
#define MEMMAP_BHDR_RESET_PTR_OFFSET   (0x00000024)
#define MEMMAP_BHDR_RESET_SIZE_OFFSET   (0x00000028)
#define TFFS_PHYSICAL_READ   (0)
#define TFFS_PHYSICAL_WRITE   (0)
#define OK   (0)

Functions

unsigned int TRD_databaseRead (unsigned int vol)
 Read the TRD database from non-volatile memory and execute.
unsigned int TRD_databaseWrite (unsigned int vol)
 Write the TRD database to non-volatile memory.
int TRD_fakeTffsRawio (int tffsDriveNo, int functionNo, int arg0, int arg1, int arg3)
 TFFS raw IO routine (pure fakery for use on unix hosts).
unsigned int TRD_databaseSpace (TRD_Control *tcb, unsigned int vol, unsigned int *off, unsigned int *siz)
 Identify save/restore space in EEPROM.

Detailed Description

Facilities to save/restore a TRD (turbo-reset database) database.

CVS $Id: TRD_database.c,v 1.1.1.1 2008/10/03 01:04:33 apw Exp $
Author:
A.P.Waite
TRD_database.c provides facilities to save and restore a TRD (turbo-reset database). For environments lacking a SIB, this code will go through the motions, but it will not attempt to actually save/restore a database via non-volatile (EEPROM) memory.

Function Documentation

unsigned int TRD_databaseRead unsigned int  vol  ) 
 

Read the TRD database from non-volatile memory and execute.

Parameters:
vol (in) TFFS volume. Must be either 2 (/mm0) or 3 (/mm1)
TRD_databaseRead() reads back and executes a TRD database.

unsigned int TRD_databaseSpace TRD_Control tcb,
unsigned int  vol,
unsigned int *  off,
unsigned int *  siz
 

Identify save/restore space in EEPROM.

Parameters:
tcb (in) TRD control block
vol (in) EEPROM bank (/mm0, /mm1 convention)
off (out) Offset to database in EEPROM
siz (out) Maximum allowed size of database in EEPROM
TRD_databaseWrite() writes out a TRD database.
Parameters:
vol  TRD control block
off  EEPROM bank (/mm0, /mm1 convention)
siz  Offset to database in EEPROM Maximum size of database in EEPROM

unsigned int TRD_databaseWrite unsigned int  vol  ) 
 

Write the TRD database to non-volatile memory.

Parameters:
vol (in) TFFS volume. Must be either 2 (/mm0) or 3 (/mm1)
TRD_databaseWrite() writes out a TRD database.

int TRD_fakeTffsRawio int  tffsDriveNo,
int  functionNo,
int  arg0,
int  arg1,
int  arg3
 

TFFS raw IO routine (pure fakery for use on unix hosts).

Parameters:
tffsDriveNo (in) Routine name
functionNo (in)
arg0 (in)
arg1 (in)
arg3 (in)
Return values:
-1 Routine name is invalid
x Length of name (like strlen())
validRoutineName() validates a routine name
Parameters:
functionNo  TrueFFS drive number
arg0  TrueFFS function code
arg1  Argument 0
arg3  Argument 1 Argument 2


Generated on Fri Oct 3 01:18:28 2008 by  doxygen 1.4.4