GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> QSP / dev > qsp / sun-gcc


Interface   Data Structures   File List   Data Fields   Globals  

QFCH_cache.h File Reference

Interface to the cache of event handler master and configuration files (QFHC => File Cache, Handlers). More...


Typedefs

typedef struct _QSP_templates QSP_templates
 Typedef for struct _QSP_templates.
typedef struct _QFCH_cache QFCH_cache
 Typedef for struct _QFCH_cache.
typedef struct _QFC_cache QFC_cache
typedef struct _QFC_file QFC_file
typedef struct _QFR_fileCtx QFR_fileCtx

Functions

int QFCH_sizeof (int depth)
 Returns the size, in bytes, of a handler file cache.
void * QFCH_construct (QFCH_cache *cache, int depth)
 Constructs a handler cache of the requested depth.
void QFCH_destruct (QFCH_cache *cache)
 Destroys the cache.
QFC_cache * QFCH_masterLocate (QFCH_cache *cache, unsigned int hid)
 Returns a pointer to the requested handler's master cache.
QFC_cache * QFCH_cfgLocate (QFCH_cache *cache, unsigned int hid, unsigned int cid)
 Returns a pointer to the requested handler's configuration cache.
int QFCH_masterResolve (QFCH_cache *cache, QFR_fileCtx *qfr, QFC_file *file, unsigned int key, const QSP_templates *templates, unsigned int hid)
 Resolves the reference for the requested handler's master file.
int QFCH_cfgResolve (QFCH_cache *cache, QFR_fileCtx *qfr, QFC_file *file, unsigned int key, const QSP_templates *templates, unsigned int hid, unsigned int cid)
 Resolves the reference for the requested handler's configuration file.


Detailed Description

Interface to the cache of event handler master and configuration files (QFHC => File Cache, Handlers).

Author:
JJRussell - russell@slac.stanford.edu

   CVS $Id: QFCH_cache.h,v 1.2 2008/06/09 19:59:57 russell Exp $

Function Documentation

QFC_cache * QFCH_cfgLocate ( QFCH_cache cache,
unsigned int  hid,
unsigned int  cid 
)

Returns a pointer to the requested handler's configuration cache.

Returns:
A pointer to the requested handler's master cache or NULL if the hid is invalid (>= 32) or cid is invalid (>= 32)
Parameters:
cache The handler's file cache
hid The handler identifier
cid The configuration identifier

References _QFCH_cache::cfgs.

int QFCH_cfgResolve ( QFCH_cache cache,
QFR_fileCtx *  qfr,
QFC_file *  file,
unsigned int  key,
const QSP_templates templates,
unsigned int  hid,
unsigned int  cid 
)

Resolves the reference for the requested handler's configuration file.

Return values:
== 0, if successful
== -1, if reference could not be resolved
Parameters:
cache The handler's file cache
qfr File resolution context (usually holds the FMX handle)
file The file structure to receive the resolved file
key The file key
templates The templates to build a file name from. This is only used when the key is a CMX style key
hid The handler identifier
cid The configuration identifier

References _QFCH_cache::cfgs.

void * QFCH_construct ( QFCH_cache cache,
int  depth 
)

Constructs a handler cache of the requested depth.

Returns:
Pointer to the next available memory location after the constructed cache
Parameters:
cache The memory in which the cache will be constructed. It is assumed that this memory has been properly sized using QFCH_sizeof.
depth The depth of the cache

References _QFCH_cache::cfgs, and _QFCH_cache::masters.

void QFCH_destruct ( QFCH_cache cache  ) 

Destroys the cache.

Parameters:
cache The cache to destroy

References _QFCH_cache::cfgs, and _QFCH_cache::masters.

QFC_cache * QFCH_masterLocate ( QFCH_cache cache,
unsigned int  hid 
)

Returns a pointer to the requested handler's master cache.

Returns:
A pointer to the requested handler's master cache or NULL if the hid is invalid (>= 32)
Parameters:
cache The handler's file cache
hid The handler identifier

References _QFCH_cache::masters.

int QFCH_masterResolve ( QFCH_cache cache,
QFR_fileCtx *  qfr,
QFC_file *  file,
unsigned int  key,
const QSP_templates templates,
unsigned int  hid 
)

Resolves the reference for the requested handler's master file.

Return values:
== 0, if successful
== -1, if reference could not be resolved
Parameters:
cache The handler's file cache
qfr File resolution context (usually holds the FMX handle)
file The file structure to receive the resolved file
key The file key
templates The names to build a file name from. This is only used when the key is a CMX style key
hid The handler identifier

References _QFCH_cache::masters.

int QFCH_sizeof ( int  depth  ) 

Returns the size, in bytes, of a handler file cache.

Returns:
The size, in bytes, of a handler file cache
Parameters:
depth The depth of the cache. This determines how many versions of each file may be cached at any given time.


Generated on Mon Mar 28 16:03:42 2011 by  doxygen 1.5.8