Main Page | Modules | Data Structures | File List | Data Fields | Globals

Database Functions


Functions

int cperfdmf_connectDB (char *password)
int cperfdmf_getApplications (cperfdmf_application_t **applications, int *numApplications)
int cperfdmf_getExperiments (cperfdmf_experiment_t **experiments, int *numExperiments, int applicationId)
int cperfdmf_getTrials (cperfdmf_trial_t **trials, int *numTrials, int experimentId)
int cperfdmf_loadTrial (int trialId)
int cperfdmf_saveApplication (cperfdmf_application_t *application)
int cperfdmf_saveExperiment (cperfdmf_experiment_t *experiment)
int cperfdmf_saveTrial (cperfdmf_trial_t *trial)
int cperfdmf_uploadTauOutput (int *trialId, char *path, int experimentId)
int cperfdmf_deleteApplication (int applicationId)
int cperfdmf_deleteExperiment (int experimentId)
int cperfdmf_deleteTrial (int trialId)
void cperfdmf_freeApplicationList (cperfdmf_application_t *applications, int numApplications)
void cperfdmf_freeExperimentList (cperfdmf_experiment_t *experiments, int numExperiments)
void cperfdmf_freeTrialList (cperfdmf_trial_t *trials, int numTrials)

Function Documentation

int cperfdmf_connectDB char *  password  ) 
 

Connect to the database

Parameters:
password [in] password for user given in configFile, if you want to use the db_password from the configFile, set the password to NULL.
Return values:
CPERFDMF_OK ok
CPERFDMF_ERR_INTERNAL_ERROR something went wrong (bad password?), use cperfdmf_getExtendedError() for details

int cperfdmf_deleteApplication int  applicationId  ) 
 

Delete application from the database

Parameters:
applicationId [in] integer. The identifier of the application to be deleted.
Return values:
CPERFDMF_OK ok
CPERFDMF_ERR_DB_NOT_INITIALIZED the database has not been initialized
CPERFDMF_ERR_INTERNAL_ERROR use getExtendedError() for details

int cperfdmf_deleteExperiment int  experimentId  ) 
 

Delete experiment from the database

Parameters:
experimentId [in] integer. The identifier of the experiment to be deleted.
Return values:
CPERFDMF_OK ok
CPERFDMF_ERR_DB_NOT_INITIALIZED the database has not been initialized
CPERFDMF_ERR_INTERNAL_ERROR use getExtendedError() for details

void cperfdmf_freeApplicationList cperfdmf_application_t applications,
int  numApplications
 

Helper function to free an array of applications

Parameters:
applications [in] array of cperfdmf_application_t to be free'd.
numApplications [in] integer, number of applications to be free'd.

void cperfdmf_freeExperimentList cperfdmf_experiment_t experiments,
int  numExperiments
 

Helper function to free an array of experiments

Parameters:
experiments [in] array of cperfdmf_experiment_t to be free'd.
numExperiments [in] integer, number of experiments to be free'd.

void cperfdmf_freeTrialList cperfdmf_trial_t trials,
int  numTrials
 

Helper function to free an array of trials

Parameters:
trials [in] array of cperfdmf_trial_t to be free'd.
numTrials [in] integer, number of trials to be free'd.

int cperfdmf_getApplications cperfdmf_application_t **  applications,
int *  numApplications
 

Retrieve the applications from the database

Parameters:
applications [out] pointer to an array of type cperfdmf_application_t. The array will be allocated and generated by the API. The user may free it at any time.
numApplications [out] pointer to an integer. The value will be written with the number of applications returned.
Return values:
CPERFDMF_OK ok
CPERFDMF_ERR_INTERNAL_ERROR use cperfdmf_getExtendedError() for details

int cperfdmf_getExperiments cperfdmf_experiment_t **  experiments,
int *  numExperiments,
int  applicationId
 

Retrieve the experiments for a given application

Parameters:
experiments [out] pointer to an array of type cperfdmf_experiment_t. The array will be allocated and generated by the API. The user may free it at any time.
numExperiments [out] pointer to an integer. The value will be written with the number of applications returned.
applicationId [in] integer. The Identifier of application from which to load the exteriments.
Return values:
CPERFDMF_OK ok
CPERFDMF_ERR_DB_NOT_INITIALIZED the database has not been initialized
CPERFDMF_ERR_INTERNAL_ERROR use getExtendedError() for details

int cperfdmf_getTrials cperfdmf_trial_t **  trials,
int *  numTrials,
int  experimentId
 

Retrieve the trials for a given experiment

Parameters:
trials [out] pointer to an array of type cperfdmf_trial_t. The array will be allocated and generated by the API. The user may free it at any time.
numTrials [out] pointer to an integer. The value will be written wit the number of trials returned.
experimentId [in] integer. The identifier of the experiment from which to load the trials.
Return values:
CPERFDMF_OK ok
CPERFDMF_ERR_DB_NOT_INITIALIZED the database has not been initialized
CPERFDMF_ERR_INTERNAL_ERROR use getExtendedError() for details

int cperfdmf_loadTrial int  trialId  ) 
 

Set the trial for subsequent calls

Parameters:
trialId [in] integer. The identifier of the trial to be selected.
Return values:
CPERFDMF_OK ok
CPERFDMF_ERR_DB_NOT_INITIALIZED the database has not been initialized
CPERFDMF_ERR_INTERNAL_ERROR use getExtendedError() for details

int cperfdmf_saveApplication cperfdmf_application_t application  ) 
 

Save application metadata to the database

Parameters:
application [in/out] pointer to a cperfdmf_application_t. To create a new application, set the id (appId) to -1, after the call appId will be set to the id stored in the database.
Return values:
CPERFDMF_OK ok
CPERFDMF_ERR_DB_NOT_INITIALIZED the database has not been initialized
CPERFDMF_ERR_INTERNAL_ERROR use getExtendedError() for details

int cperfdmf_saveExperiment cperfdmf_experiment_t experiment  ) 
 

Save experiment metadata to the database

Parameters:
experiment [in/out] pointer to a cperfdmf_experiment_t. To create a new experiment, set the id (expId) to -1, after the call expId will be set to the id stored in the database.
Return values:
CPERFDMF_OK ok
CPERFDMF_ERR_DB_NOT_INITIALIZED the database has not been initialized
CPERFDMF_ERR_INTERNAL_ERROR use getExtendedError() for details

int cperfdmf_saveTrial cperfdmf_trial_t trial  ) 
 

Save trial metadata to the database

Parameters:
trial [in/out] pointer to a cperfdmf_trial_t.
Return values:
CPERFDMF_OK ok
CPERFDMF_ERR_DB_NOT_INITIALIZED the database has not been initialized
CPERFDMF_ERR_INTERNAL_ERROR use getExtendedError() for details

int cperfdmf_uploadTauOutput int *  trialId,
char *  path,
int  experimentId
 

Upload a TAU output session (profile.*.*.*) to the database

Parameters:
trialId [out] pointer to an integer. Will be filled in with the ID of the trial created.
path [in] directory containing profile files
experimentId [in] Which experiment to associate this trial with.
Return values:
CPERFDMF_OK ok
CPERFDMF_ERR_DB_NOT_INITIALIZED the database has not been initialized
CPERFDMF_ERR_INTERNAL_ERROR use getExtendedError() for details


Generated on Fri Sep 2 11:27:17 2005 for C API for PerfDMF by  doxygen 1.3.9.1