GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > EFC / V4-1-2

Constituent: filter     Tag: sun-gcc


Interface   Data Structures   File List   Data Fields   Globals  

EFR_key.c File Reference

Indirect file reference key utilities. More...

#include "EFC/EFR_key.h"
#include "PBI/Endianness.h"
#include "CMX/CMX_asBuiltPub.h"
#include "CDM/CDM_pubdefs.h"

Include dependency graph for EFR_key.c:


Data Structures

struct  _EFR_keyGeneric
 The structure of key of a generic key. More...
struct  _EFR_keyFmx
 The structure of key of an FMX key. More...
struct  _EFR_keyCmx
 The structure of key of type EFR_KEYTYPE_K_CMX. More...
struct  _EFR_key
 Union of all key types. More...

Typedefs

typedef enum _EFR_KEYVAL_K EFR_KEYVAL_K
 Typedef for enum EFR_KEYVAL_K.
typedef _EFR_keyGeneric EFR_keyGeneric
 Typedef for struct _EFR_keyGeneric.
typedef _EFR_keyFmx EFR_keyFmx
 Typedef for struct _EFR_keyFmx.
typedef _EFR_keyCmx EFR_keyCmx
 Typedef for struct _EFR_keyCmx.
typedef _EFR_key EFR_key
 Typedef for union _EFR_key.

Enumerations

enum  _EFR_KEYVAL_K {
  EFR_KEYVAL_K_UNDEFINED = 0x00ffffff,
  EFR_KEYVAL_K_FMX_UNDEFINED = EFR_KEYVAL_K_UNDEFINED,
  EFR_KEYVAL_K_CMX_UNDEFINED = EFR_KEYVAL_K_UNDEFINED,
  EFR_KEYVAL_K_CMX_UNKNOWN = 0x00fffffe,
  EFR_KEYVAL_K_CMX_DEV = 0x00fffffd,
  EFR_KEYVAL_K_CMX_TEST = 0x00fffffc
}
 Enumerates special key values. More...

Functions

static __inline unsigned int fmxKeyGet (struct _CDM_Database *cdb, unsigned char user)
 Returns the FMX key associated with the file.
static __inline unsigned int cmxKeyGet (struct _CDM_Database *cdb, unsigned char user)
 Returns the CMX key associated with the file.
unsigned int EFR_keyGet (struct _CDM_Database *cdb, unsigned char user)
 Returns the key associated with the file. This may be either an FMX or CMX style key, with the FMX key, if it exists, given the perference.
EFR_KEYTYPE_K EFR_keyTypeGet (unsigned int key)
 Query function to return the encoded key type.
unsigned int EFR_keyUserGet (unsigned int key)
 Query function to return the encoded user field.
EFR_KEYCMX_BRANCH_K EFR_keyCmxBranchGet (unsigned int key)
 Query function to return the branch type.
unsigned int EFR_keyCmxVersionGet (unsigned int key)
 Query function to return the version.
unsigned int EFR_keyFmxKeyGet (unsigned int key)
 Query function to return FMX key value.

Detailed Description

Indirect file reference key utilities.

Author:
JJRussell - russell@slac.stanford.edu
   CVS $Id: EFR_key.c,v 1.1 2007/10/10 23:40:43 russell Exp $

Typedef Documentation

EFR_keyFmx
 

Typedef for struct _EFR_keyFmx.

Note:
Technically an FMX key can only be 22-bits. I have defined the value as 24-bits, not sure if it which is better the 22 or 24 bit definition.


Enumeration Type Documentation

enum _EFR_KEYVAL_K
 

Enumerates special key values.

Enumerator:
EFR_KEYVAL_K_UNDEFINED  Key is undefined
EFR_KEYVAL_K_FMX_UNDEFINED  FMX key is undefined
EFR_KEYVAL_K_CMX_UNDEFINED  CMX tag is undefined
EFR_KEYVAL_K_CMX_UNKNOWN  CMX tag is not from any known branch
EFR_KEYVAL_K_CMX_DEV  CMX tag is from the development branch
EFR_KEYVAL_K_CMX_TEST  CMX tag is from a user test branch, translation in this case may be a bit dicey, since the user test branch stem is not captured


Function Documentation

static __inline unsigned int cmxKeyGet struct _CDM_Database *  cdb,
unsigned char  user
[static]
 

Returns the CMX key associated with the file.

Returns:
The CMX key. The value field of the key should be check to see if the key was resolved.
Parameters:
cdb The CMX database to query for the key
user A small integer (typically less than 31, that will be associated with the key. This is meant to help resolves files of similar types that may reside in different directories

EFR_KEYCMX_BRANCH_K EFR_keyCmxBranchGet unsigned int  key  ) 
 

Query function to return the branch type.

Returns:
One of the enumeratin EFR_KEYCMX_BRANCH_K
Parameters:
key The key to query

unsigned int EFR_keyCmxVersionGet unsigned int  key  ) 
 

Query function to return the version.

Returns:
The packed version number
Parameters:
key The key to query
Warning:
This function is valid if and only this is a CMX key from the production branch. It is the user responsibility to verify this before calling this function.

unsigned int EFR_keyFmxKeyGet unsigned int  key  ) 
 

Query function to return FMX key value.

Returns:
The FMX key value
Parameters:
key The key to query
Warning:
This function is valid if and only this is a FMX key. It is the user responsibility to verify this before calling this function.

unsigned int EFR_keyGet struct _CDM_Database *  cdb,
unsigned char  user
 

Returns the key associated with the file. This may be either an FMX or CMX style key, with the FMX key, if it exists, given the perference.

Returns:
The key
Parameters:
cdb The CMX database to query for the key
user A small integer (typically less than 31, that will be associated with the key. This is meant to help resolves files of similar types that may reside in different directories

EFR_KEYTYPE_K EFR_keyTypeGet unsigned int  key  ) 
 

Query function to return the encoded key type.

Return values:
EFR_KEYTYPE_K_FMX 
EFR_KEYTYPE_K_CMX 
Parameters:
key The key to query

unsigned int EFR_keyUserGet unsigned int  key  ) 
 

Query function to return the encoded user field.

Returns:
The user user field
Parameters:
key The key to query
Warning:
This function assumes the user has checked the check type for being valid, i.e. not EFR_KEYTYPE_K_NONE.

static __inline unsigned int fmxKeyGet struct _CDM_Database *  cdb,
unsigned char  user
[static]
 

Returns the FMX key associated with the file.

Returns:
The FMX key or EFR_KEYVLA_K_UNDEFINED if there is no FMX key
Parameters:
cdb The CMX database to query for the key
user A small integer (typically less than 31, that will be associated with the key. This is meant to help resolves files of similar types that may reside in different directories


Generated on Thu Sep 4 01:45:48 2008 by  doxygen 1.4.4