class rcUtil

Class that encapsulates a few useful utility functions for the run control

Public Methods

static void addCmdToCleanupScript( const char *pcCommand )
Subroutine to add a general command to the cleanup script
static void addCrateToCleanupScript( const char *name )
Subroutine to add a crate reboot to the cleanup script
static void addFileToCleanupScript( const char* pcFilename )
Subroutine to add a file to the cleanup script, which removes it
static void addToCleanupScript( pid_t thePid )
Subroutine used to register all processes that are forked off in order to build up the delete script RC_CLEANUP_SCRIPT
static int convertStringToBool( const char *aString, bool &bValue )
Converts a string such as "on","off","true","false" to a bool variable if the string makes sense
static int execFile( const char *pcFile )
Subroutine to execute the commands found in the file pcFile
static int isFileOk( const char *pcFile, int iMode )
Checks whether the file is accessible in the desired mode
static void waitForUserInput( const char* pcMsg )
Routine that prints out a message and waits for a user acknowledgement on stdin

Documentation

Class that encapsulates a few useful utility functions for the run control.

The functions are written as static member functions.

static void addToCleanupScript( pid_t thePid )
Subroutine used to register all processes that are forked off in order to build up the delete script RC_CLEANUP_SCRIPT

static void addFileToCleanupScript( const char* pcFilename )
Subroutine to add a file to the cleanup script, which removes it

static void addCrateToCleanupScript( const char *name )
Subroutine to add a crate reboot to the cleanup script

static void addCmdToCleanupScript( const char *pcCommand )
Subroutine to add a general command to the cleanup script

static int execFile( const char *pcFile )
Subroutine to execute the commands found in the file pcFile

static int isFileOk( const char *pcFile, int iMode )
Checks whether the file is accessible in the desired mode
Returns:
rcSuccess if yes, rcFailure otherwise.

static int convertStringToBool( const char *aString, bool &bValue )
Converts a string such as "on","off","true","false" to a bool variable if the string makes sense
Returns:
rcSuccess: string makes sense, rcFailure: otherwise

static void waitForUserInput( const char* pcMsg )
Routine that prints out a message and waits for a user acknowledgement on stdin. This is used when process stages and process units run in step mode.


This class has no child classes.

alphabetic index hierarchy of classes


this page has been generated automatically by doc++

(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de