Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members

ServerMain_T.hh File Reference


Detailed Description

Contains a function template for setting up and running a single object server.

Definition in file ServerMain_T.hh.

Include dependency graph for ServerMain_T.hh:

Include dependency graph

Go to the source code of this file.

Classes

struct  ServerMainData
struct  ServerMainDefaults

Functions

void sigexit_handler (int sig)
 Handler for SIGINT/SIGTERM signals.

void server_main_usage (char *prog_name, struct ServerMainDefaults &smd)
 Output the usage message for this program to standard error.

template<class T, class U> int server_main (struct ServerMainDefaults &smd, int argc, char *argv[])
 Template function for a server that exports a single object.


Variables

ServerMainData server_main_data


Function Documentation

template<class T, class U>
int server_main struct ServerMainDefaults &  smd,
int  argc,
char *  argv[]
 

Template function for a server that exports a single object.

Parameters:
T The object implementation class. The constructor is expected to take a 'const char *' argument that contains the object name.
U The object's _var smart pointer class.
smd The defaults for the command line parameters.
argc The argc passed to the real main.
argv The argv passed to the real main.
Returns:
EXIT_FAILURE or runs for forever.

Definition at line 132 of file ServerMain_T.hh.

References cpu_reserve_attr::compute_time, cpu_reserve_attr::deadline, rk_reserve_param::enf_mode, orb, cpu_reserve_attr::period, cpu_reserve_attr::processor, rk_reserve_param::rep_mode, require, cpu_reserve_attr::reserve_type, NamingHelper< T >::resolve_init(), RK_ANY_CPU, rk_cpu_reserve_create(), rk_reserve_t, rk_resource_set_attach_process(), rk_resource_set_create(), rk_resource_set_destroy(), rk_resource_set_t, RSV_SOFT, rk_reserve_param::sch_mode, server_main_usage(), and sigexit_handler().

Here is the call graph for this function:

void server_main_usage char *  prog_name,
struct ServerMainDefaults &  smd
 

Output the usage message for this program to standard error.

Parameters:
prog_name The program name, as given on the command line.
smd The default values for this program.

Definition at line 86 of file ServerMain_T.hh.

References require.

Referenced by server_main().

void sigexit_handler int  sig  ) 
 

Handler for SIGINT/SIGTERM signals.

Parameters:
sig The actual signal received.

Definition at line 67 of file ServerMain_T.hh.

References require, and rk_resource_set_destroy().

Referenced by server_main().

Here is the call graph for this function:


Generated on Mon Dec 1 16:30:21 2003 for CPU Broker by doxygen 1.3.4