( type, my_msg ) class rcMain

Class that encapsulates the main loop of the run control

Public Fields

static bool bAcceptStdinCommands
True if we accept commands from stdin
static bool bGlobalDebug
True if the control is started with the global -dbg flag

Public Methods

inline static bool exitOnFatal()
Returns true if the run control is configured such that we exit upon a fatal error
static int getNextRunNumber()
Returns the run number for the next run of the partition taking into account that several partitions are running in parallel
static void PartitionStartupDenied( const char *pcReason, ostream &os = cout )
Prints out a message to ostream giving the reason why we cannot start a partition
FATAL static int printWelcomeMsg( ostream &os = cout )
At startup time, we print a welcome message
static int processCommandFile( const char *pcFile )
Reads the run control commands from a file and sends them to rcProcess_command for execution
static int rcCleanup()
Called at exit to delete all the objects and cleanup the mess we produced
static void rcConfigHelp()
Prints the online configuration help message to stdout
static int rcCreate_persistent_obj( const char *filename, const char *Granule_name = NULL )
Creates the persistent objects for the run control
static int rcDump_objects()
Dumps all known objects to stdout
static void rcHelp()
Prints the online help message on stdout
static int rcInit_corba( const char* pcServerTag = NULL )
Initialises the corba layer
static int rcInit_createObjmgr( const char *name )
Creates the object manager in the run control
static int rcInitialise()
Initialises all of run control
static int rcMainLoop()
Main event loop in which we check whether a corba event has arrived or an event from stdin has been read (if we accept commands from stdin)
static int rcProcess_command( char *cmd )
Parses and processes a command from the standard input
static void requestShutdown()
Sets an internal flag to true, which eventually will lead to an orderly shutdown
static bool ShutdownRequested()
Returns true if a shutdown has been requested

Protected Methods

static void OrbixFix( int fd)
An Orbix kludge to allow the run control to fork off other processes
static int rcConfiguration_command( char *cmd )
Processes a configuration command read from stdin
static int rcProcess_corba_event()
Checks whether we received a corba event and if so processes it
static int read_next_command()
Reads the next command from stdin if there is one

Private Fields

static bool bFirstDownload
Bool variable used to determined whether we are downloading for the first time and we therefore don't bother to present the download options to the user
static char* pcCppDirective
C preprocessor directive as obtained from the command line arguments

Documentation

Class that encapsulates the main loop of the run control. The functions are written as static member function, i.e. there is no object rcMain and therefore no constructor.

Note that the definition of static members are in serveral files, to keep the file size not too long.

FATAL static int printWelcomeMsg( ostream &os = cout )
At startup time, we print a welcome message. The file \$RC_DOC/rc_news.txt is also opened and if found printed on the output stream os.

static int rcInitialise()
Initialises all of run control

static int rcMainLoop()
Main event loop in which we check whether a corba event has arrived or an event from stdin has been read (if we accept commands from stdin)

static int rcCleanup()
Called at exit to delete all the objects and cleanup the mess we produced

static int rcDump_objects()
Dumps all known objects to stdout. Gives a lot of output.

static void rcHelp()
Prints the online help message on stdout

static void rcConfigHelp()
Prints the online configuration help message to stdout

inline static bool exitOnFatal()
Returns true if the run control is configured such that we exit upon a fatal error

static void requestShutdown()
Sets an internal flag to true, which eventually will lead to an orderly shutdown

static bool ShutdownRequested()
Returns true if a shutdown has been requested

static int rcInit_corba( const char* pcServerTag = NULL )
Initialises the corba layer. If we run multiple copies in parallel, we must provide a unique tag pcServerTag (0...n)

static int rcInit_createObjmgr( const char *name )
Creates the object manager in the run control. Its function is to interface with the nameserver and event notifier.

static int rcCreate_persistent_obj( const char *filename, const char *Granule_name = NULL )
Creates the persistent objects for the run control. They are currently read from a file, which can either be the generic.pcf file or the description of a granule.

static int processCommandFile( const char *pcFile )
Reads the run control commands from a file and sends them to rcProcess_command for execution
Returns:
rcSuccess for success, rcFailure otherwise.

static int rcProcess_command( char *cmd )
Parses and processes a command from the standard input

static bool bAcceptStdinCommands
True if we accept commands from stdin. In that case we keep polling read_next_command.

static bool bGlobalDebug
True if the control is started with the global -dbg flag

static int getNextRunNumber()
Returns the run number for the next run of the partition taking into account that several partitions are running in parallel

static void PartitionStartupDenied( const char *pcReason, ostream &os = cout )
Prints out a message to ostream giving the reason why we cannot start a partition

static int rcConfiguration_command( char *cmd )
Processes a configuration command read from stdin

static int read_next_command()
Reads the next command from stdin if there is one

static int rcProcess_corba_event()
Checks whether we received a corba event and if so processes it

static void OrbixFix( int fd)
An Orbix kludge to allow the run control to fork off other processes. Note: This may not be needed in future orbix versions (CW - April 99).

static bool bFirstDownload
Bool variable used to determined whether we are downloading for the first time and we therefore don't bother to present the download options to the user

static char* pcCppDirective
C preprocessor directive as obtained from the command line arguments


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