TSP: The Transport Sample Protocol



Main Page | Modules | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

tsp_provider_init.c File Reference

#include "tsp_sys_headers.h"
#include "tsp_provider.h"
#include "tsp_request.h"
#include "tsp_server.h"
#include "tsp_provider_init.h"

Go to the source code of this file.

Functions

int TSP_provider_init (int *argc, char **argv[])
 Main initialisation function for a TSP provider.

int TSP_provider_run (int spawn_mode)
 Main run function for a TSP provider.

char ** TSP_provider_urls (int pub_mode)
 Universal Resource Locators of a TSP provider.


Detailed Description

Header
/cvsroot/tsp/tsp/src/core/ctrl_init/tsp_provider_init.c,v 1.10 2004/10/04 08:56:07 tractobob Exp

-----------------------------------------------------------------------

TSP Library - core components for a generic Transport Sampling Protocol.

Copyright (c) 2002 Yves DUFRENNE, Stephane GALLES, Eric NOULARD and Robert PAGNOT

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

-----------------------------------------------------------------------

Project : TSP Maintainer : tsp@astrium.eads.net Component : Provider

-----------------------------------------------------------------------

Purpose : Function calls to launch a TSP Provider program in the 'main'

-----------------------------------------------------------------------

Definition in file tsp_provider_init.c.


Function Documentation

int TSP_provider_init int *  argc,
char **  argv[]
 

Main initialisation function for a TSP provider.

Call this function at the start of your main function with the received argc/argv. Then use the modified argc/argv.

Parameters:
argc You must provide the real argc before using it
argv You must provide the real argv before using it
Returns:
TRUE or FALSE. OK = TRUE.

Definition at line 46 of file tsp_provider_init.c.

References TSP_provider_rqh_manager_init().

Referenced by bb_tsp_provider_initialise().

int TSP_provider_run int  spawn_mode  ) 
 

Main run function for a TSP provider.

Call this function to launch the provider after the initialisation

Parameters:
spawn_mode 
  • 0x00 simple non blocking mode, a separate thread will be spawned in order to handle TSP request. The default TSP asynchronous request channel is used.
  • 0x01 simple blocking mode, this function will block forever.
  • 0x10 dynamic non blocking mode, several separate thread will be spawned in order to handle TSP request on several TSP asynchronous request channel (ONC RPC, XML RPC, SOAP, CORBA,...). The number of thread launched may vary dynamically.
  • 0x11 dynamic blocking mode, this function will block forever.
Returns:
TRUE or FALSE. OK = TRUE.

Definition at line 65 of file tsp_provider_init.c.

References TSP_provider_rqh_manager_install(), TSP_provider_rqh_manager_refresh(), and TSP_provider_rqh_manager_waitend().

Referenced by bb_tsp_provider_initialise().

char** TSP_provider_urls int  pub_mode  ) 
 

Universal Resource Locators of a TSP provider.

Call this function to select a mode of URLs publication after the initialisation. Function always returns a string table of URLs

Parameters:
pub_mode 
  • 0x0000 do nothing else.
  • 0x0010 print to stdout.
  • 0x0100 publish to local SNMP agent (TODO).
Returns:
String table or NULL.

Definition at line 130 of file tsp_provider_init.c.

References TSP_provider_rqh_manager_get_nb_running(), and TSP_provider_rqh_manager_get_url().

Framework Home Page.


Beware !! TSP wave is coming...