Content-type: text/html Manpage of RAPIDS

RAPIDS

Section: RAPIDS Application related API (API)
Updated: September 2004
Index  

NAME

rapids_reporterror(), rapids_debugmsg(),
rapids_reportvar(), rapids_algstate(),
- RAPIDS API for user applications
 

DESCRIPTION

The RAPIDS Application Programmer Interface (API) provides various functions that users can use in their applications to report different kinds of events to the RAPIDS Main Display and Control Node (MDCN).

All functions returns immediately after posting the event information into the RAPIDS messaging system

Most of the functions return SUCCESS (1) if successful, else FAILURE(-1) in case of error.

 

How to use them

#include "rapids_api.h"
gcc -I{RAPIDS_API_INCLUDEDIR} ... -L{RAPIDS_API_LIBDIR} -lrmq


where RAPIDS_API_INCLUDEDIR is the directory where "rapids_api.h" is present
and RAPIDS_API_LIBDIR is the directory where librmq.a is present

 

Routines

int rapids_reporterror(int error_level, char* format, ...) ;
Logs an API event reporting an error to the RAPIDS system.

error_level is one of the 3 error_levels: FATAL, SEVERE and WARNING. format corresponds to the format used in standard printf() functions.

int rapids_debugmsg(int debug_level, char* format, ...) ;
Logs an API event to print a debug message to the RAPIDS system.

debug_level is one of the 3 debug_levels: FINE, FINER and and FINEST. format corresponds to the format used in standard printf() functions.

int rapids_reportvar(char* var_name, char* format, ...) ;
Logs an API event to report the value of a certain variable.

var_name is the name of the variable. format corresponds to the format used in standard printf() functions.

The next argument is typically the variable itself.

int rapids_algstatus(char* alg_name, char* status) ;
Logs an API event to report the state of the (current) algorithm being run.

alg_name is the name of the algorithm to be reported. status is the current state of the algorithm as defined by one of the algstatus codes: ALG_START and ALG_END

 

EXAMPLES

#include "rapids_api.h"

int main() {


  int x = 20 ;
  double d = 90.0 ;


  rapids_reporterror(SEVERE, "%s", "This is a grave error") ;


  rapids_debugmsg(FINEST, " two values %d %lf %s ", x, d, __FILE__) ;


  rapids_reportvar("double d", "%lf", d) ;


  rapids_algstatus("main", ALG_START) ;


  return 0 ;

}  

SEE ALSO

printf(2), rmq(2),  

BUGS AND RESTRICTIONS

Still testing


 

Index

NAME
DESCRIPTION
How to use them
Routines
EXAMPLES
SEE ALSO
BUGS AND RESTRICTIONS

This document was created by man2html, using the manual pages.
Time: 11:57:43 GMT, March 25, 2005