GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> TRD / V0-0-1 > trd / rhel5-32


Interface   Data Structures   File List   Data Fields   Globals  

TRD_pubdefs.h File Reference

Public definitions for the TRD (turbo-reset database) facility. More...


Typedefs

typedef struct _TRD_Row TRD_Row
 Typedef for struct _TRD_Row.
typedef void TRD_cb_Reset (unsigned short fmt, unsigned short len, const void *dat)
 Signature for a TRD reset routine.

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.
unsigned int TRD_initialize (void)
 Initialize the tracing facility.
unsigned int TRD_rowCreate (TRD_Row **row, const char *rtn, unsigned short fmt, unsigned short len, const void *dat)
 Create a row in the database.
unsigned int TRD_rowDelete (TRD_Row *row)
 Delete a row in the database.
unsigned int TRD_rowModifyData (TRD_Row *row, unsigned short fmt, unsigned short len, const void *dat)
 Modify a row in the database.


Detailed Description

Public definitions for the TRD (turbo-reset database) facility.

CVS $Id: TRD_pubdefs.h,v 1.1.1.1 2008/10/03 01:04:33 apw Exp $
Author:
A.P.Waite

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.

References _TRD_BufferHeader::acs, _TRD_Row::buf, _TRD_Control::buf, _TRD_RowHeader::fmt, _TRD_BufferHeader::frm, _TRD_Row::hdr, _TRD_RowHeader::len, _TRD_BufferHeader::len, _TRD_Control::mtx, _TRD_RowHeader::off, _TRD_Control::sib, _TRD_Control::state, TRD_CTL_INITIALIZED, TRD_databaseSpace(), and TRD_tcb.

unsigned int TRD_databaseWrite ( unsigned int  vol  ) 

unsigned int TRD_initialize ( void   ) 

Initialize the tracing facility.

Return values:
TRD_ADDHOOK Cannot add task switch hook routine
TRD_ALLOCMEM Cannot allocate memory
TRD_ALLOCMTX Cannot allocate mutex
TRD_BADSTATE Invalid state for operation
TRD_SUCCESS Success
TRD_initialize() builds up the necessary resources.

References _TRD_Control::buf, _TRD_Control::db, _TRD_Control::fak, _TRD_Control::mtx, _TRD_Control::rwi, _TRD_Control::sib, _TRD_Control::state, TRD_CTL_BROKEN, TRD_CTL_INITIALIZED, TRD_CTL_UNINITIALIZED, and TRD_fakeTffsRawio().

unsigned int TRD_rowCreate ( TRD_Row **  hnd,
const char *  rtn,
unsigned short  fmt,
unsigned short  len,
const void *  dat 
)

Create a row in the database.

Parameters:
hnd (in/out) Row handle
rtn (in) Name of a callback routine
fmt (in) Format of data to follow
len (in) Length (bytes) of data to follow
dat (in) Data
TRD_rowCreate() creates a new row in the database.

References _TRD_Control::bit, _TRD_Row::buf, _TRD_RowHeader::chk, _TRD_Control::cnt, _TRD_Control::db, _TRD_RowHeader::fmt, _TRD_Row::hdr, _TRD_RowHeader::idx, _TRD_RowHeader::len, _TRD_Control::mtx, _TRD_RowHeader::off, _TRD_Control::state, TRD_CTL_INITIALIZED, TRD_tcb, and validRoutineName().

unsigned int TRD_rowDelete ( TRD_Row row  ) 

Delete a row in the database.

Parameters:
row (in) Row (handle) to delete
TRD_rowDelete() deletes an existing row in the database.

References _TRD_Control::bit, _TRD_RowHeader::chk, _TRD_Row::hdr, _TRD_Control::mtx, _TRD_Control::state, TRD_CTL_INITIALIZED, TRD_tcb, and validRowHandle().

unsigned int TRD_rowModifyData ( TRD_Row row,
unsigned short  fmt,
unsigned short  len,
const void *  dat 
)

Modify a row in the database.

Parameters:
row (in) Row handle
fmt (in) Format of data to follow
len (in) Length (bytes) of data to follow
dat (in) Data
TRD_rowModifyData() modifies (replaces) the data stored with a database row.

References _TRD_Row::buf, _TRD_Control::cnt, _TRD_RowHeader::fmt, _TRD_Row::hdr, _TRD_RowHeader::idx, _TRD_RowHeader::len, _TRD_Control::mtx, _TRD_RowHeader::off, _TRD_Control::state, TRD_CTL_INITIALIZED, TRD_tcb, and validRowHandle().


Generated on Tue Nov 29 20:12:17 2011 by  doxygen 1.5.8