GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > LSE / V1-3-4

Constituent: lser     Tag: rad750


Interface   Data Structures   File List   Data Fields   Globals  

LFR_key.c File Reference

Indirect file reference key utilities. More...

#include "LSE/LFR_key.h"
#include "PBI/Endianness.h"
#include "CMX/CMX_asBuiltPub.h"
#include "CDM/CDM_pubdefs.h"

Include dependency graph for LFR_key.c:


Data Structures

struct  _LFR_keyGeneric
 The structure of key of a generic key. More...
struct  _LFR_keyFmx
 The structure of key of an FMX key. More...
struct  _LFR_keyCmx
 The structure of key of type LFR_KEYTYPE_K_CMX. More...
struct  _LFR_key
 Union of all key types. More...

Typedefs

typedef enum _LFR_KEYVAL_K LFR_KEYVAL_K
 Typedef for enum LFR_KEYVAL_K.
typedef _LFR_keyGeneric LFR_keyGeneric
 Typedef for struct _LFR_keyGeneric.
typedef _LFR_keyFmx LFR_keyFmx
 Typedef for struct _LFR_keyFmx.
typedef _LFR_keyCmx LFR_keyCmx
 Typedef for struct _LFR_keyCmx.
typedef _LFR_key LFR_key
 Typedef for union _LFR_key.

Enumerations

enum  _LFR_KEYVAL_K {
  LFR_KEYVAL_K_UNDEFINED = 0x00ffffff,
  LFR_KEYVAL_K_FMX_UNDEFINED = LFR_KEYVAL_K_UNDEFINED,
  LFR_KEYVAL_K_CMX_UNDEFINED = LFR_KEYVAL_K_UNDEFINED,
  LFR_KEYVAL_K_CMX_UNKNOWN = 0x00fffffe,
  LFR_KEYVAL_K_CMX_DEV = 0x00fffffd,
  LFR_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 LFR_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.
LFR_KEYTYPE_K LFR_keyTypeGet (unsigned int key)
 Query function to return the encoded key type.
unsigned int LFR_keyUserGet (unsigned int key)
 Query function to return the encoded user field.
LFR_KEYCMX_BRANCH_K LFR_keyCmxBranchGet (unsigned int key)
 Query function to return the branch type.
unsigned int LFR_keyCmxVersionGet (unsigned int key)
 Query function to return the version.
unsigned int LFR_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: LFR_key.c,v 1.3 2006/11/19 15:46:17 russell Exp $

Typedef Documentation

LFR_keyFmx
 

Typedef for struct _LFR_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 _LFR_KEYVAL_K
 

Enumerates special key values.

Enumerator:
LFR_KEYVAL_K_UNDEFINED  Key is undefined
LFR_KEYVAL_K_FMX_UNDEFINED  FMX key is undefined
LFR_KEYVAL_K_CMX_UNDEFINED  CMX tag is undefined
LFR_KEYVAL_K_CMX_UNKNOWN  CMX tag is not from any known branch
LFR_KEYVAL_K_CMX_DEV  CMX tag is from the development branch
LFR_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

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 LFR_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

LFR_KEYCMX_BRANCH_K LFR_keyCmxBranchGet unsigned int  key  ) 
 

Query function to return the branch type.

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

unsigned int LFR_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 LFR_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 LFR_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

LFR_KEYTYPE_K LFR_keyTypeGet unsigned int  key  ) 
 

Query function to return the encoded key type.

Return values:
LFR_KEYTYPE_K_FMX 
LFR_KEYTYPE_K_CMX 
Parameters:
key The key to query

unsigned int LFR_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 LFR_KEYTYPE_K_NONE.


Generated on Thu Oct 18 03:56:05 2007 by  doxygen 1.4.4