GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > CDM / V0-2-2

Constituent: cdm     Tag: sun-gcc


Interface   Data Structures   File List   Data Fields   Globals  

CDM_utility.c File Reference

Collection of functions to support CDM database management. More...

#include <stdio.h>
#include <string.h>
#include "CDM/CDM_msgs.h"
#include "CDM/CDM_pubdefs.h"
#include "CDM_prvdefs.h"

Include dependency graph for CDM_utility.c:


Functions

unsigned int CDM_countInstance (unsigned short schema)
 Count instances of a CDM database with a given schema.
CMX_asBuiltIdentity * CDM_findCAB (CDM_Database *cdb)
 Return the link to the CMX as built identity block.
CDM_DatabaseCDM_findDatabase (unsigned short schema, unsigned short instance)
 Find a CDM database by schema and instance.
const void * CDM_getData (CDM_Database *cdb)
 Return a pointer to the data block of a CDM database instance.
short CDM_getInstance (CDM_Database *cdb)
 Return the instance number of a CDM database instance.
unsigned int CDM_getKey (CDM_Database *cdb)
 Return the file key of a CDM database instance.
short CDM_getSchema (CDM_Database *cdb)
 Return the schema number of a CDM database instance.
short CDM_getVersion (CDM_Database *cdb)
 Return the version of a CDM database instance.
void CDM_insertDatabase (CDM_Database *new)
 Insert a CDM database into the database list.
void CDM_removeDatabase (CDM_Database *old)
 Remove a CDM database from the database list.
unsigned int CDM_scanDatabase (CDM_cb_ScanDatabase *rtn, void *prm)
 Scan though the database instance list.

Variables

_CDM_DatabaseCDM_root = NULL
 Head of database (singly-linked) list.

Detailed Description

Collection of functions to support CDM database management.

CVS $Id: CDM_utility.c,v 1.3 2005/11/17 02:38:36 apw Exp $

Function Documentation

unsigned int CDM_countInstance unsigned short  schema  ) 
 

Count instances of a CDM database with a given schema.

Parameters:
schema (in) Database schema
Return values:
x Number of instances
Count the number of database instances with the given schema.

CMX_asBuiltIdentity* CDM_findCAB CDM_Database cdb  ) 
 

Return the link to the CMX as built identity block.

Parameters:
cdb (in) CDM database handle
Return values:
x CMX as built identity block pointer
0 Cannot find the CMX as built identity block

CDM_Database * CDM_findDatabase unsigned short  schema,
unsigned short  instance
 

Find a CDM database by schema and instance.

Parameters:
schema (in) Database schema
instance (in) Database instance number
Return values:
x Handle for database
NULL Database not found
Find a CDM database by schema and instance.

const void * CDM_getData CDM_Database cdb  ) 
 

Return a pointer to the data block of a CDM database instance.

Parameters:
cdb (in) CDM database handle
Return values:
x Pointer to database data block
NULL Invalid database handle

short CDM_getInstance CDM_Database cdb  ) 
 

Return the instance number of a CDM database instance.

Parameters:
cdb (in) CDM database handle
Return values:
x Instance number
CDM_K_NONE Invalid database handle

unsigned int CDM_getKey CDM_Database cdb  ) 
 

Return the file key of a CDM database instance.

Parameters:
cdb (in) CDM database handle
Return values:
x File key
0 File key not found

short CDM_getSchema CDM_Database cdb  ) 
 

Return the schema number of a CDM database instance.

Parameters:
cdb (in) CDM database handle
Return values:
x Database schema number
CDM_K_NONE Invalid database handle

short CDM_getVersion CDM_Database cdb  ) 
 

Return the version of a CDM database instance.

Parameters:
cdb (in) CDM database handle
Return values:
x Database version
CDM_K_NONE Invalid database handle

void CDM_insertDatabase CDM_Database new  ) 
 

Insert a CDM database into the database list.

Parameters:
new (in) CDM database handle
Insert a CDM database instance into the database list.

void CDM_removeDatabase CDM_Database old  ) 
 

Remove a CDM database from the database list.

Parameters:
old (in) CDM database handle
Remove a CDM database instance from the database list.

unsigned int CDM_scanDatabase CDM_cb_ScanDatabase rtn,
void *  prm
 

Scan though the database instance list.

Parameters:
rtn (in) Scan callback routine
prm (in) Scan callback routine parameter
Return values:
x Return code from last scan call made.
CDM_scanDatabase() scans through the CDM database instance list, calling the provided callback routine for each member. The scan is aborted if the callback routine returns a failure code (least significant bit set).


Generated on Tue Mar 7 20:22:47 2006 by  doxygen 1.4.4