GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> FMX / V4-0-13 > fmxshr / rhel5-64


Interface   Data Structures   File List   Data Fields   Globals  

FMX_prvdefs.h File Reference

Private definitions for the FMX package. More...

#include <mysql.h>
#include <FMX/FMX_pubdefs.h>
#include <MDB/MDB_macdefs.h>

Classes

struct  _FMX_Common
 An index/name pair, common to all enumeration tables. More...
struct  _FMX_Device
 A row in the in-memory device table. More...
struct  _FMX_Filetype
 A row in the in-memory filetype table. More...
struct  _FMX_Host
 A row in the in-memory host table. More...
struct  _FMX_Instrument
 A row in the in-memory instrument table. More...
struct  _FMX_Node
 A row in the in-memory node table. More...
struct  _FMX_Tag
 A row in the in-memory filetype table. More...
struct  _FMX_EnumTable
 Union of the various enumeration tables. More...
struct  _FMX_EnumTableControl
 Control structure for an enumeration table. More...
struct  _FMX_Connection
 FMX user connection block. More...
struct  _FMX_Control
 FMX control block. More...

Defines

#define FMX_DOIT(_mysql, _query)
 Compact from of the mysql_query() call.
#define FMX_STOR(_mysql, _result, _nrow)
 Compact form of the mysql_store_result()/mysql_num_rows() calls.

Typedefs

typedef enum _FMX_DeviceBoard FMX_DeviceBoard
 Typedef for enum _FMX_DeviceBoard.
typedef enum _FMX_DeviceType FMX_DeviceType
 Typedef for enum _FMX_DeviceType.
typedef enum _FMX_TagType FMX_TagType
 Typedef for enum _FMX_TagType.
typedef enum _FMX_UserAccess FMX_UserAccess
 Typedef for enum _FMX_UserAccess.
typedef enum _FMX_TableState FMX_TableState
 Typedef for enum _FMX_TableState.
typedef struct _FMX_Common FMX_Common
 Typedef for struct _FMX_TableHeader.
typedef struct _FMX_Device FMX_Device
 Typedef for struct _FMX_Device.
typedef struct _FMX_Filetype FMX_Filetype
 Typedef for struct _FMX_Filetype.
typedef struct _FMX_Host FMX_Host
 Typedef for struct _FMX_Host.
typedef struct _FMX_Instrument FMX_Instrument
 Typedef for struct _FMX_Instrument.
typedef struct _FMX_Node FMX_Node
 Typedef for struct _FMX_Node.
typedef struct _FMX_Tag FMX_Tag
 Typedef for struct _FMX_Tag.
typedef union _FMX_EnumTable FMX_EnumTable
 Typedef for struct _FMX_EnumTable.
typedef struct
_FMX_EnumTableControl 
FMX_EnumTableControl
 Typedef for struct _FMX_EnumTableControl.
typedef struct _FMX_Control FMX_Control
 Typedef for struct _FMX_Control.

Enumerations

enum  _FMX_DeviceBoard {
  FMX_DVC_BRD_UNKNOWN = -1,
  FMX_DVC_BRD_CPU = 0,
  FMX_DVC_BRD_SIB = 1
}
 Enumeration of the boards on which devices can appear. More...
enum  _FMX_DeviceType {
  FMX_DVC_TYP_UNKNOWN = -1,
  FMX_DVC_TYP_VOLATILE = 0,
  FMX_DVC_TYP_PERSISTENT = 1
}
 Enumeration of device persistence types. More...
enum  _FMX_TagType {
  FMX_TAG_UNKNOWN = -1,
  FMX_TAG_HOST = 0,
  FMX_TAG_EMBEDDED = 1
}
 Enumeration of device persistence types. More...
enum  _FMX_UserAccess {
  FMX_USR_OPTICIAN = 0x01,
  FMX_USR_LOGICIAN = 0x02,
  FMX_USR_PHYSICIAN = 0x04,
  FMX_USR_TECHNICIAN = 0x08
}
 Enumeration of user access control bits/masks. More...
enum  _FMX_TableState {
  FMX_TBL_UNINITIALIZED = 0,
  FMX_TBL_INITIALIZED = 1
}
 Enumeration of user access control bits/masks. More...

Functions

unsigned int FMX_commit (FMX_Connection *ucb)
 Commit a SQL transaction.
unsigned int FMX_rollback (FMX_Connection *ucb)
 Rollback a SQL transaction.
unsigned int FMX_findEnumByIndex (FMX_Connection *ucb, FMX_EnumTableList tbl, unsigned int index, FMX_EnumTable **num)
 Return a pointer to an FMX_Device.
unsigned int FMX_findEnumByName (FMX_Connection *ucb, FMX_EnumTableList tbl, const char *name, FMX_EnumTable **num)
 Return a pointer to an FMX_Device.
void FMX_freeEnumTable (FMX_Connection *ucb, FMX_EnumTableList tbl)
 Free an enumeration table.
unsigned int FMX_loadEnumTable (FMX_Connection *ucb, FMX_EnumTableList tbl)
 Load an enumeration table into memory.
unsigned int FMX_makeVisible (FMX_Connection *ucb, const char *rel)
 Ensure that a file rele reported by FMX is visible.

Variables

FMX_ControlFMX_fcb
 FMX (singleton) control block.


Detailed Description

Private definitions for the FMX package.

CVS $Id: FMX_prvdefs.h,v 1.3 2011/03/25 20:42:51 apw Exp $
Author:
A.P.Waite

Define Documentation

#define FMX_DOIT ( _mysql,
_query   ) 

Value:

if( mysql_query( (_mysql), (_query) ) ) \
{ \
    return( _msg_report( FMX_SQLERROR, 0, 2, \
             mysql_errno( (_mysql) ), mysql_error( (_mysql) ) ) ); \
}
Compact from of the mysql_query() call.

#define FMX_STOR ( _mysql,
_result,
_nrow   ) 

Value:

if( ( (_result) = mysql_store_result( (_mysql) ) ) == NULL ) \
{ \
    return( _msg_report( FMX_SQLERROR, 0, 2, \
             mysql_errno( (_mysql) ), mysql_error( (_mysql) ) ) ); \
} \
(_nrow) = mysql_num_rows( (_result) );
Compact form of the mysql_store_result()/mysql_num_rows() calls.


Enumeration Type Documentation

Enumeration of the boards on which devices can appear.

Enumerator:
FMX_DVC_BRD_UNKNOWN  Unknown storage board
FMX_DVC_BRD_CPU  CPU board
FMX_DVC_BRD_SIB  SIB board

Enumeration of device persistence types.

Enumerator:
FMX_DVC_TYP_UNKNOWN  Unknown persistence type
FMX_DVC_TYP_VOLATILE  Volatile storage
FMX_DVC_TYP_PERSISTENT  Persistent storage

Enumeration of user access control bits/masks.

Enumerator:
FMX_TBL_UNINITIALIZED  Table uninitialized
FMX_TBL_INITIALIZED  Table initialized

Enumeration of device persistence types.

Enumerator:
FMX_TAG_UNKNOWN  Unknown tag group membership
FMX_TAG_HOST  A host tag
FMX_TAG_EMBEDDED  An embedded tag

Enumeration of user access control bits/masks.

Enumerator:
FMX_USR_OPTICIAN  Optician (select) access
FMX_USR_LOGICIAN  Logican access
FMX_USR_PHYSICIAN  Physician access
FMX_USR_TECHNICIAN  Technician access


Function Documentation

unsigned int FMX_commit ( FMX_Connection ucb  ) 

Commit a SQL transaction.

Parameters:
ucb (in) Connection handle
Return values:
FMX_COMTFAIL SQL "commit" failed
FMX_SUCCESS Success
FMX_UCBNOT Invalid connection block

References FMX_freeEnumTable(), FMX_L_ENUM_TABLES, _FMX_Connection::mysql, and _FMX_Connection::self.

unsigned int FMX_findEnumByIndex ( FMX_Connection ucb,
FMX_EnumTableList  tbl,
unsigned int  index,
FMX_EnumTable **  num 
)

Return a pointer to an FMX_Device.

Parameters:
ucb (in) User connection block
tbl (in) Index of table to search
index (in) Index of object to look up
num (in) Pointer to row in table
Return values:
FMX_ENUMINDX Could not find index in table
FMX_ENUMTABL Invalid enumeration table index
FMX_SUCCESS Success
FMX_UCBNOT Invalid user connection block

References _FMX_EnumTableControl::cnt, _FMX_EnumTable::common, FMX_L_ENUM_TABLES, FMX_loadEnumTable(), FMX_TBL_INITIALIZED, _FMX_Common::index, _FMX_Connection::self, _FMX_EnumTableControl::state, _FMX_Connection::table, and _FMX_EnumTableControl::top.

Referenced by FMX_scanFilesByKey(), scanCompoundMembers(), and scanFilesByKeyModule().

unsigned int FMX_findEnumByName ( FMX_Connection ucb,
FMX_EnumTableList  tbl,
const char *  name,
FMX_EnumTable **  num 
)

Return a pointer to an FMX_Device.

Parameters:
ucb (in) User connection block
tbl (in) Index of table to search
name (in) Name of object to look up
num (in) Pointer to row in table
Return values:
FMX_ENUMNAME Could not find name in table
FMX_ENUMTABL Invalid enumeration table index
FMX_SUCCESS Success
FMX_UCBNOT Invalid user connection block

References _FMX_EnumTableControl::cnt, _FMX_EnumTable::common, FMX_L_ENUM_TABLES, FMX_loadEnumTable(), FMX_TBL_INITIALIZED, _FMX_Common::name, _FMX_Connection::self, _FMX_EnumTableControl::state, _FMX_Connection::table, and _FMX_EnumTableControl::top.

Referenced by FMX_findCDMbyKey(), and scanSBSmembers().

void FMX_freeEnumTable ( FMX_Connection ucb,
FMX_EnumTableList  tbl 
)

unsigned int FMX_loadEnumTable ( FMX_Connection ucb,
FMX_EnumTableList  tbl 
)

Load an enumeration table into memory.

Parameters:
ucb (in) User connection block
tbl (in) Index of table to load
Return values:
FMX_ALLOCMEM Cannot allocate enumeration table
FMX_ENUMTABL Invalid enumeration table index
FMX_SUCCESS Success
FMX_UCBNOT Invalid user connection block

References FMX_L_ENUM_TABLES, FMX_TBL_INITIALIZED, _FMX_LoadEnum::load, _FMX_Connection::mysql, _FMX_Connection::self, _FMX_EnumTableControl::state, _FMX_Connection::table, and _FMX_EnumTableControl::top.

Referenced by FMX_findEnumByIndex(), and FMX_findEnumByName().

unsigned int FMX_makeVisible ( FMX_Connection ucb,
const char *  rel 
)

Ensure that a file rele reported by FMX is visible.

Parameters:
ucb (in) Connection handle
rel (in) Name of visible file (FMX_C_FDB relative)
Return values:
FMX_SUCCESS Success
FMX_UCBNOT Invalid connection block

References _FMX_Connection::mysql, and _FMX_Connection::root.

Referenced by findCDMbyKey(), scanFilesByKeyCompound(), scanFilesByKeyModule(), scanFilesByKeySimple(), scanFOFmembers(), and scanSBSmembers().

unsigned int FMX_rollback ( FMX_Connection ucb  ) 

Rollback a SQL transaction.

Parameters:
ucb (in) Connection handle
Return values:
FMX_ROLLFAIL SQL "rollback" failed
FMX_SUCCESS Success
FMX_UCBNOT Invalid connection block

References FMX_freeEnumTable(), FMX_L_ENUM_TABLES, _FMX_Connection::mysql, and _FMX_Connection::self.

Referenced by FMX_findCDMbyKey(), FMX_scanFilesByKey(), and scanCompoundMembers().


Generated on Wed Apr 13 12:24:05 2011 by  doxygen 1.5.8