GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> FMX / V4-0-14 > fmxshr / rhel5-32


Interface   Data Structures   File List   Data Fields   Globals  

Defines | Functions
FMX_command.c File Reference

Command interfaces. More...

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <mysql.h>
#include <FMX/FMX_msgs.h>
#include <MDB/MDB_pubdefs.h>
#include <FMX_diction.h>
#include <FMX_prvdefs.h>

Defines

#define FMX_L_DAT_MODNAM   (8)

Functions

static unsigned int findCDMbyKey (FMX_Connection *ucb, unsigned int key, FMX_EnumTable *num, unsigned int absolute, char *nambuf, unsigned int bufmax, unsigned int *namlen)
 Return the filename of a CDM file corresponding to key.
static unsigned int scanFilesByKeyCompound (FMX_Connection *ucb, unsigned int key, const char *dir, FMX_cb_scanFilesByKey *rtn, void *prm)
 Scan files for a compound key (the key itself, not its members)
static unsigned int scanFilesByKeyModule (FMX_Connection *ucb, unsigned int key, const char *dir, FMX_cb_scanFilesByKey *rtn, void *prm)
 Scan files for a module key.
static unsigned int scanFilesByKeySimple (FMX_Connection *ucb, unsigned int key, const char *dir, FMX_cb_scanFilesByKey *rtn, void *prm)
 Scan files for a simple key.
static unsigned int scanCompoundMembers (FMX_Connection *ucb, unsigned int key, const char *tag, unsigned int flight, void *rtn, void *prm)
 Scan the members of a compound file.
static unsigned int scanFOFmembers (FMX_Connection *ucb, unsigned int key, unsigned int flight, FMX_cb_scanFOFmembers *rtn, void *prm)
 Scan the members of a "file-of-files".
static unsigned int scanSBSmembers (FMX_Connection *ucb, unsigned int key, const char *tag, unsigned int flight, FMX_cb_scanSBSmembers *rtn, void *prm)
 Scan the members of a secondary boot script.
unsigned int FMX_findCDMbyKey (FMX_Connection *ucb, unsigned int key, const char *tag, unsigned int absolute, char *nambuf, unsigned int bufmax, unsigned int *namlen)
 Return the filename of a CDM file corresponding to key.
unsigned int FMX_scanFilesByKey (FMX_Connection *ucb, unsigned int key, FMX_cb_scanFilesByKey *rtn, void *prm)
 Scan all files with logical key key.
unsigned int FMX_scanFOFmembers (FMX_Connection *ucb, unsigned int key, unsigned int flight, FMX_cb_scanFOFmembers *rtn, void *prm)
 Scan the members of a "file-of-files" compounf file.
unsigned int FMX_scanSBSmembers (FMX_Connection *ucb, unsigned int key, const char *tag, unsigned int flight, FMX_cb_scanSBSmembers *rtn, void *prm)
 Scan the members of a secondary boot script.

Detailed Description

Command interfaces.

CVS $Id: FMX_command.c,v 1.9 2011/03/25 20:42:51 apw Exp $
Author:
A.P.Waite

Function Documentation

static unsigned int findCDMbyKey ( FMX_Connection ucb,
unsigned int  key,
FMX_EnumTable num,
unsigned int  absolute,
char *  nambuf,
unsigned int  bufmax,
unsigned int *  namlen 
) [static]

Return the filename of a CDM file corresponding to key.

Parameters:
ucb(in) Database connection handle
key(in) Logical key to find
num(in) Architecture tag enumeration entry
absolute(in) Request absolute file name
nambuf(in) Buffer into which to place the file name
bufmax(in) Length of nambuf
namlen(in) Actual length of file name
Return values:
FMX_CDMNOTLogical key does not resolve to a CDM file
FMX_SUCCESSSuccess
FMX_KEYNOTInvalid logical file key

References FMX_makeVisible(), _FMX_Tag::index, _FMX_Connection::mysql, _FMX_Tag::name, _FMX_Connection::root, and _FMX_EnumTable::tag.

Referenced by FMX_findCDMbyKey().

unsigned int FMX_findCDMbyKey ( FMX_Connection ucb,
unsigned int  key,
const char *  tag,
unsigned int  absolute,
char *  nambuf,
unsigned int  bufmax,
unsigned int *  namlen 
)

Return the filename of a CDM file corresponding to key.

Parameters:
ucb(in) Database connection handle
key(in) Logical file key to scan
tag(in) Architecture tag name
absolute(in) Request absolute file name
nambuf(in) Buffer into which to place the file name
bufmax(in) Length of nambuf
namlen(in) Actual length of file name
Return values:
FMX_NULLPNTRNULL pointer
FMX_SUCCESSSuccess
FMX_TAGTYPEUnknown architecture (tag) type
FMX_UCBNOTInvalid connection block

References findCDMbyKey(), FMX_ENUM_TABLE_TAG, FMX_findEnumByName(), FMX_rollback(), and _FMX_Connection::self.

unsigned int FMX_scanFilesByKey ( FMX_Connection ucb,
unsigned int  key,
FMX_cb_scanFilesByKey rtn,
void *  prm 
)

Scan all files with logical key key.

Parameters:
ucb(in) Database connection handle
key(in) Logical file key to scan
rtn(in) Callback routine
prm(in) Callback routine parameter
Return values:
FMX_ALLOCMEMCannot allocate sufficient memory (dynamic)
FMX_FILEGRPUnrecognized file group
FMX_KEYNOTInvalid logical file key
FMX_SUCCESSSuccess
FMX_TAGMISSUnknown tag type (database inconsistency?)
FMX_UCBNOTInvalid connection block

References _FMX_EnumTable::filetype, FMX_ENUM_TABLE_FILETYPE, FMX_findEnumByIndex(), FMX_GRP_COMPOUND, FMX_GRP_MODULE, FMX_GRP_SIMPLE, FMX_rollback(), _FMX_Filetype::group, _FMX_Connection::mysql, scanFilesByKeyCompound(), scanFilesByKeyModule(), scanFilesByKeySimple(), and _FMX_Connection::self.

unsigned int FMX_scanFOFmembers ( FMX_Connection ucb,
unsigned int  key,
unsigned int  flight,
FMX_cb_scanFOFmembers rtn,
void *  prm 
)

Scan the members of a "file-of-files" compounf file.

Parameters:
ucb(in) Database connection handle
key(in) Resolved file key for the "file-of-files"
flight(in) Scan the ground/flight files (boolean)
rtn(in) Callback routine
prm(in) Callback routine parameter
Return values:
FMX_ALLOCMEMCannot allocate sufficient memory (dynamic)
FMX_FILEGRPUnrecognized file group
FMX_KEYNOTInvalid logical file key
FMX_SUCCESSSuccess
FMX_TAGMISSUnknown tag type (database inconsistency?)
FMX_UCBNOTInvalid connection block

References scanCompoundMembers().

unsigned int FMX_scanSBSmembers ( FMX_Connection ucb,
unsigned int  key,
const char *  tag,
unsigned int  flight,
FMX_cb_scanSBSmembers rtn,
void *  prm 
)

Scan the members of a secondary boot script.

Parameters:
ucb(in) Database connection handle
key(in) Resolved file key for the secondary boot script
tag(in) Architecture tag name for which to resolve files
flight(in) Scan the ground/flight files (boolean)
rtn(in) Callback routine
prm(in) Callback routine parameter
Return values:
FMX_ALLOCMEMCannot allocate sufficient memory (dynamic)
FMX_FILEGRPUnrecognized file group
FMX_KEYNOTInvalid logical file key
FMX_SUCCESSSuccess
FMX_TAGMISSUnknown tag type (database inconsistency?)
FMX_UCBNOTInvalid connection block

References scanCompoundMembers().

unsigned int scanCompoundMembers ( FMX_Connection ucb,
unsigned int  key,
const char *  tag,
unsigned int  flight,
void *  rtn,
void *  prm 
) [static]

Scan the members of a compound file.

Parameters:
ucb(in) Database connection handle
key(in) Resolved file key for the compound file
tag(in) Architecture tag name (NULL if "fof")
flight(in) Scan the ground/flight files (boolean)
rtn(in) Callback routine
prm(in) Callback routine parameter
Return values:
FMX_ALLOCMEMCannot allocate sufficient memory (dynamic)
FMX_FILEGRPUnrecognized file group
FMX_KEYNOTInvalid logical file key
FMX_SUCCESSSuccess
FMX_TAGMISSUnknown tag type (database inconsistency?)
FMX_UCBNOTInvalid connection block

References _FMX_EnumTable::filetype, FMX_ENUM_TABLE_FILETYPE, FMX_findEnumByIndex(), FMX_rollback(), _FMX_Connection::mysql, _FMX_Filetype::name, s_fof, s_sbs, scanFOFmembers(), scanSBSmembers(), and _FMX_Connection::self.

Referenced by FMX_scanFOFmembers(), and FMX_scanSBSmembers().

static unsigned int scanFilesByKeyCompound ( FMX_Connection ucb,
unsigned int  key,
const char *  dir,
FMX_cb_scanFilesByKey rtn,
void *  prm 
) [static]

Scan files for a compound key (the key itself, not its members)

Parameters:
ucb(in) Database connection handle
key(in) Logical file key to scan
dir(in) Directory name associated with file type
rtn(in) Callback routine
prm(in) Callback routine parameter
Return values:
FMX_SUCCESSSuccess

References FMX_CAP_MOD_NONE, FMX_GRP_COMPOUND, FMX_makeVisible(), and _FMX_Connection::mysql.

Referenced by FMX_scanFilesByKey().

static unsigned int scanFilesByKeyModule ( FMX_Connection ucb,
unsigned int  key,
const char *  dir,
FMX_cb_scanFilesByKey rtn,
void *  prm 
) [static]

Scan files for a module key.

Parameters:
ucb(in) Database connection handle
key(in) Logical file key to scan
dir(in) Directory name associated with file type
rtn(in) Callback routine
prm(in) Callback routine parameter
Return values:
FMX_SUCCESSSuccess
FMX_TAGMISSUnknown tag type (database inconsistency?)

References FMX_ENUM_TABLE_TAG, FMX_findEnumByIndex(), FMX_GRP_MODULE, FMX_makeVisible(), _FMX_Connection::mysql, _FMX_Tag::name, and _FMX_EnumTable::tag.

Referenced by FMX_scanFilesByKey().

static unsigned int scanFilesByKeySimple ( FMX_Connection ucb,
unsigned int  key,
const char *  dir,
FMX_cb_scanFilesByKey rtn,
void *  prm 
) [static]

Scan files for a simple key.

Parameters:
ucb(in) Connection handle
key(in) Logical file key to scan
dir(in) Directory name associated with file type
rtn(in) Callback routine
prm(in) Callback routine parameter
Return values:
FMX_SUCCESSSuccess

References FMX_CAP_MOD_NONE, FMX_GRP_SIMPLE, FMX_makeVisible(), and _FMX_Connection::mysql.

Referenced by FMX_scanFilesByKey().

static unsigned int scanFOFmembers ( FMX_Connection ucb,
unsigned int  key,
unsigned int  flight,
FMX_cb_scanFOFmembers rtn,
void *  prm 
) [static]

Scan the members of a "file-of-files".

Parameters:
ucb(in) Database connection handle
key(in) Resolved file key for the "file-of-files"
flight(in) Scan the ground/flight files (boolean)
rtn(in) Callback routine
prm(in) Callback routine parameter
Return values:
FMX_SUCCESSSuccess

References FMX_makeVisible(), _FMX_Connection::mysql, s_export, and s_import.

Referenced by scanCompoundMembers().

static unsigned int scanSBSmembers ( FMX_Connection ucb,
unsigned int  key,
const char *  tag,
unsigned int  flight,
FMX_cb_scanSBSmembers rtn,
void *  prm 
) [static]

Scan the members of a secondary boot script.

Parameters:
ucb(in) Database connection handle
key(in) Resolved file key for the secondary boot script
tag(in) Architecture tag name
flight(in) Scan the ground/flight files (boolean)
rtn(in) Callback routine
prm(in) Callback routine parameter
Return values:
FMX_SUCCESSSuccess
FMX_TAGMISSUnknown tag type (database inconsistency?)

References FMX_ENUM_TABLE_TAG, FMX_findEnumByName(), FMX_makeVisible(), _FMX_Tag::index, _FMX_Connection::mysql, s_export, s_import, and _FMX_EnumTable::tag.

Referenced by scanCompoundMembers().