GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > FMX / V3-3-0

Constituent: fmxshr     Tag: sun-gcc


Interface   Data Structures   File List   Data Fields   Globals  

FMX_enum.c File Reference

Access functions to the various enumerations in the database. More...

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include <unistd.h>
#include "mysql.h"
#include "FMX/FMX_msgs.h"
#include "FMX/FMX_pubdefs.h"
#include "MDB/MDB_pubdefs.h"
#include "FMX_prvdefs.h"

Include dependency graph for FMX_enum.c:


Data Structures

struct  _FMX_LoadEnum
 Enumeration specific load instructions. More...

Typedefs

typedef unsigned int FMX_cb_LoadEnum (FMX_Connection *ucb, FMX_EnumTableList tbl, MYSQL_RES *result)
 Signature for a routine to load an enumeration table.
typedef _FMX_LoadEnum FMX_LoadEnum
 Typedef for struct _FMX_LoadEnum.

Functions

static unsigned int loadDevice (FMX_Connection *ucb, FMX_EnumTableList tbl, MYSQL_RES *result)
 Load a device enumeration table into memory.
static unsigned int loadFiletype (FMX_Connection *ucb, FMX_EnumTableList tbl, MYSQL_RES *result)
 Load a filetype enumeration table into memory.
static unsigned int loadHost (FMX_Connection *ucb, FMX_EnumTableList tbl, MYSQL_RES *result)
 Load a host enumeration table into memory.
static unsigned int loadInstrument (FMX_Connection *ucb, FMX_EnumTableList tbl, MYSQL_RES *result)
 Load an instrument enumeration table into memory.
static unsigned int loadNode (FMX_Connection *ucb, FMX_EnumTableList tbl, MYSQL_RES *result)
 Load a node enumeration table into memory.
static unsigned int loadTag (FMX_Connection *ucb, FMX_EnumTableList tbl, MYSQL_RES *result)
 Load a tag enumeration table into memory.
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.

Variables

FMX_LoadEnum loadEnum [FMX_L_ENUM_TABLES]

Detailed Description

Access functions to the various enumerations in the database.

CVS $Id: FMX_enum.c,v 1.1 2006/09/29 23:20:22 apw Exp $
Author:
A.P.Waite

Function Documentation

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

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

void FMX_freeEnumTable FMX_Connection ucb,
FMX_EnumTableList  tbl
 

Free an enumeration table.

Parameters:
ucb (in) User connection block
tbl (in) Index of table to free

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

static unsigned int loadDevice FMX_Connection ucb,
FMX_EnumTableList  tbl,
MYSQL_RES *  result
[static]
 

Load a device enumeration table into memory.

Parameters:
ucb (in) User connection block
tbl (in) Table to load
result (in) Result list from SQL query
Return values:
FMX_ALLOCMEM Cannot allocate device table strings
FMX_BRDTYPE Unknown board type (this program needs to catch up)
FMX_DVCTYPE Unknown device type (this program needs to catch up)
FMX_SUCCESS Success

static unsigned int loadFiletype FMX_Connection ucb,
FMX_EnumTableList  tbl,
MYSQL_RES *  result
[static]
 

Load a filetype enumeration table into memory.

Parameters:
ucb (in) User connection block
tbl (in) Table to load
result (in) Result list from SQL query
Return values:
FMX_ALLOCMEM Cannot allocate device table strings
FMX_SUCCESS Success

static unsigned int loadHost FMX_Connection ucb,
FMX_EnumTableList  tbl,
MYSQL_RES *  result
[static]
 

Load a host enumeration table into memory.

Parameters:
ucb (in) User connection block
tbl (in) Table to load
result (in) Result list from SQL query
Return values:
FMX_ALLOCMEM Cannot allocate device table strings
FMX_SUCCESS Success

static unsigned int loadInstrument FMX_Connection ucb,
FMX_EnumTableList  tbl,
MYSQL_RES *  result
[static]
 

Load an instrument enumeration table into memory.

Parameters:
ucb (in) User connection block
tbl (in) Table to load
result (in) Result list from SQL query
Return values:
FMX_ALLOCMEM Cannot allocate device table strings
FMX_SUCCESS Success

static unsigned int loadNode FMX_Connection ucb,
FMX_EnumTableList  tbl,
MYSQL_RES *  result
[static]
 

Load a node enumeration table into memory.

Parameters:
ucb (in) User connection block
tbl (in) Table to load
result (in) Result list from SQL query
Return values:
FMX_ALLOCMEM Cannot allocate device table strings
FMX_SUCCESS Success

static unsigned int loadTag FMX_Connection ucb,
FMX_EnumTableList  tbl,
MYSQL_RES *  result
[static]
 

Load a tag enumeration table into memory.

Parameters:
ucb (in) User connection block
tbl (in) Table to load
result (in) Result list from SQL query
Return values:
FMX_ALLOCMEM Cannot allocate device table strings
FMX_SUCCESS Success


Variable Documentation

FMX_LoadEnum loadEnum[FMX_L_ENUM_TABLES]
 

Initial value:

 {



    { "device,     name, type,      board",                     "device",     &loadDevice     },
    { "filetype,   name, directory, member, comment",           "filetype",   &loadFiletype   },
    { "host,       name, master,    proxy,  port",              "host",       &loadHost       },
    { "instrument, name, towers,    host,   location, comment", "instrument", &loadInstrument },
    { "node,       name, address",                              "node",       &loadNode       },
    { "tag,        name, vxworks",                              "tag",        &loadTag        }
}


Generated on Fri Apr 20 05:39:33 2007 by  doxygen 1.4.4