GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> CDM / V0-2-6 > cdm / rhel5-32
#include <CMX/CMX_asBuiltPub.h>
Defines | |
#define | CDM_K_NONE (0xffff) |
Typedefs | |
typedef struct _CDM_Database | CDM_Database |
Typedef for struct _CDM_Database. | |
typedef unsigned int | CDM_cb_ScanDatabase (CDM_Database *cdb, void *prm) |
Signature for an CDM database scanning callback routine. | |
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_Database * | CDM_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 *cdm) |
Insert a CDM database into the database list. | |
CDM_Database * | CDM_loadDatabase (const char *fil, unsigned int opt) |
Load a CDM database. | |
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. | |
unsigned int | CDM_unloadDatabase (CDM_Database *cdb) |
Unload a CDM database. |
CVS $Id: CDM_pubdefs.h,v 1.7 2011/03/24 22:25:27 apw Exp $
unsigned int CDM_countInstance | ( | unsigned short | schema | ) |
Count instances of a CDM database with a given schema.
schema | (in) Database schema |
x | Number of instances |
References _CDM_Database::next, and _CDM_Database::schema.
CMX_asBuiltIdentity* CDM_findCAB | ( | CDM_Database * | cdb | ) |
Return the link to the CMX as built identity block.
cdb | (in) CDM database handle |
x | CMX as built identity block pointer | |
0 | Cannot find the CMX as built identity block |
References _CDM_Database::cab, and _CDM_Database::name.
Referenced by CDM_getKey(), CDM_loadDatabase(), and CDM_unloadDatabase().
CDM_Database* CDM_findDatabase | ( | unsigned short | schema, | |
unsigned short | instance | |||
) |
Find a CDM database by schema and instance.
schema | (in) Database schema | |
instance | (in) Database instance number |
x | Handle for database | |
NULL | Database not found |
References _CDM_Database::instance, _CDM_Database::next, and _CDM_Database::schema.
Referenced by CDM_insertDatabase().
const void* CDM_getData | ( | CDM_Database * | cdb | ) |
Return a pointer to the data block of a CDM database instance.
cdb | (in) CDM database handle |
x | Pointer to database data block | |
NULL | Invalid database handle |
References _CDM_Database::check, and _CDM_Database::data.
short CDM_getInstance | ( | CDM_Database * | cdb | ) |
Return the instance number of a CDM database instance.
cdb | (in) CDM database handle |
x | Instance number | |
CDM_K_NONE | Invalid database handle |
References _CDM_Database::check, and _CDM_Database::instance.
unsigned int CDM_getKey | ( | CDM_Database * | cdb | ) |
Return the file key of a CDM database instance.
cdb | (in) CDM database handle |
x | File key | |
0 | File key not found |
References _CDM_Database::cab, CDM_findCAB(), and _CDM_Database::check.
short CDM_getSchema | ( | CDM_Database * | cdb | ) |
Return the schema number of a CDM database instance.
cdb | (in) CDM database handle |
x | Database schema number | |
CDM_K_NONE | Invalid database handle |
References _CDM_Database::check, and _CDM_Database::schema.
short CDM_getVersion | ( | CDM_Database * | cdb | ) |
Return the version of a CDM database instance.
cdb | (in) CDM database handle |
x | Database version | |
CDM_K_NONE | Invalid database handle |
References _CDM_Database::check, and _CDM_Database::version.
void CDM_insertDatabase | ( | CDM_Database * | cdm | ) |
Insert a CDM database into the database list.
cdm | (in) CDM database handle |
References CDM_findDatabase(), CDM_unloadDatabase(), _CDM_Database::check, _CDM_Database::instance, _CDM_Database::next, and _CDM_Database::schema.
CDM_Database* CDM_loadDatabase | ( | const char * | fil, | |
unsigned int | opt | |||
) |
Load a CDM database.
fil | (in) Filename | |
opt | (in) Options (none currently defined) |
x | Handle for database instance | |
NULL | Failure |
References CDM_findCAB(), CDM_root, and _CDM_Database::next.
void CDM_removeDatabase | ( | CDM_Database * | old | ) |
Remove a CDM database from the database list.
old | (in) CDM database handle |
References _CDM_Database::cab, _CDM_Database::check, and _CDM_Database::next.
unsigned int CDM_scanDatabase | ( | CDM_cb_ScanDatabase * | rtn, | |
void * | prm | |||
) |
Scan though the database instance list.
rtn | (in) Scan callback routine | |
prm | (in) Scan callback routine parameter |
x | Return code from last scan call made. |
References _CDM_Database::next.
unsigned int CDM_unloadDatabase | ( | CDM_Database * | cdb | ) |
Unload a CDM database.
cdb | (in) CDM database handle |
CDM_HANDLE | Invalid database handle | |
CDM_SUCCESS | Success | |
CDM_UNLOAD | Database unload failed |
References CDM_findCAB(), _CDM_Database::check, _CDM_Database::instance, and _CDM_Database::schema.
Referenced by CDM_insertDatabase().