TSP: The Transport Sample Protocol



Configuration File Library
[TSP Libraries]

Collaboration diagram for Configuration File Library:The TSP configuration file library API. More...


Modules

 TSP config file tool
 A simple command line tool used to display TSP configuration files.

Data Structures

struct  TspCfg
 TspCfg_T. More...
struct  TspCfgProvider
 TspCfgProvider_T. More...
struct  TspCfgProviderList
 TspCfgProvider_list_T. More...
struct  TspCfgSampleList
 TspCfgSampleProviderList_T. More...

Typedefs

typedef TspCfg TspCfg_T
 TspCfg_T.
typedef TspCfgProvider TspCfgProvider_T
 TspCfgProvider_T.
typedef TspCfgProviderList TspCfgProviderList_T
 TspCfgProvider_list_T.
typedef TspCfgSampleList TspCfgSampleList_T
 TspCfgSampleProviderList_T.

Functions

int32_t TSP_TspCfg_delete (TspCfg_T **tspConfig)
 delete the data.
int32_t TSP_TspCfg_finalize (TspCfg_T *tspConfig)
 destroy the tspconfig
TspCfgProviderList_TTSP_TspCfg_getProviderList (TspCfg_T *tspConfig)
 get the provider list
TSP_sample_symbol_info_list_tTSP_TspCfg_getProviderSampleList (TspCfg_T *tspConfig, char *provider_name)
 get the sample list of the provider
int32_t TSP_TspCfg_initialize (TspCfg_T *tspConfig, xmlDoc *cfg_tree)
 create and initialize the tspConfig
int32_t TSP_TspCfg_load (TspCfg_T *tspConfig, char *filename)
 Open and parse xml config File, and load in the TSP config structure all the provider and all the sample describe in the XML file.
TspCfg_TTSP_TspCfg_new (xmlDoc *cfg_tree)
 memory allocation
int32_t TSP_TspCfg_save (TspCfg_T *tspConfig, char *output_filename)
 save the xml tree in the output file
int32_t TSP_TspCfgProvider_delete (TspCfgProvider_T **provider)
 delete a provider
int32_t TSP_TspCfgProvider_finalize (TspCfgProvider_T *provider)
 destroy a provider
int32_t TSP_TspCfgProvider_initialize (TspCfgProvider_T *provider, char *name, char *url, int32_t implicit_period, int32_t length)
 initialize a provider
TspCfgProvider_TTSP_TspCfgProvider_new (char *name, char *url, int32_t implicit_period, int32_t length)
 create a provider
int32_t TSP_TspCfgProviderList_delete (TspCfgProviderList_T **provider_list)
 destroy provider list
int32_t TSP_TspCfgProviderList_finalize (TspCfgProviderList_T *provider_list)
 create and initialize the tspConfig
int32_t TSP_TspCfgProviderList_initialize (TspCfgProviderList_T *tspCfgProviderList, int32_t length)
 create and initialize the tspConfig
TspCfgProviderList_TTSP_TspCfgProviderList_new (int32_t length)
 create provider list
int32_t TSP_TspCfgSampleList_delete (TspCfgSampleList_T **sample)
 destroy a sample
int32_t TSP_TspCfgSampleList_finalize (TspCfgSampleList_T *sample)
 destroy a sample
int32_t TSP_TspCfgSampleList_initialize (TspCfgSampleList_T *tspCfgSampleList, int32_t implicit_period, int32_t implicit_phase, char *implicit_type, char *implicit_access, char *implicit_provider, char *renamed, char *name)
 initialize a sample
TspCfgSampleList_TTSP_TspCfgSampleList_new (int32_t implicit_period, int32_t implicit_phase, char *implicit_type, char *implicit_access, char *implicit_provider, char *renamed, char *name)
 create a sample


Detailed Description

The TSP configuration file library API.


Typedef Documentation

typedef struct TspCfg TspCfg_T

TspCfg_T.

a TSP config structure: contain the data of the xml file after parse an XML config file load by the function: TSP_TspCfg_load

typedef struct TspCfgProvider TspCfgProvider_T

TspCfgProvider_T.

a TSP config structure: describe a provider this data are extract from the XML file

typedef struct TspCfgProviderList TspCfgProviderList_T

TspCfgProvider_list_T.

a TSP config structure: contain the provider list

typedef struct TspCfgSampleList TspCfgSampleList_T

TspCfgSampleProviderList_T.

a TSP config structure: describe the data and parameter of a sample this data are extract from the XML file


Function Documentation

int32_t TSP_TspCfg_delete ( TspCfg_T **  tspConfig  ) 

delete the data.

Parameters:
[in,out] tspConfig tsp config to destroy
return TSP_STATUS_OK if ok

int32_t TSP_TspCfg_finalize ( TspCfg_T tspConfig  ) 

destroy the tspconfig

Parameters:
[in,out] tspConfig the xmlconfig who contain the information about the file
Returns:
TSP_STATUS_OK if OK

TspCfgProviderList_T* TSP_TspCfg_getProviderList ( TspCfg_T tspConfig  ) 

get the provider list

Parameters:
[in] tspConfig the tspconfig file who contain the information about the providers and sample
Returns:
the provider list

TSP_sample_symbol_info_list_t* TSP_TspCfg_getProviderSampleList ( TspCfg_T tspConfig,
char *  provider_name 
)

get the sample list of the provider

Parameters:
[in] tspConfig the xmlconfig file who contain the information about the providers and sample
[in] provider_name we want the symbol list of this provider
Returns:
the sample list of the provider

int32_t TSP_TspCfg_initialize ( TspCfg_T tspConfig,
xmlDoc *  cfg_tree 
)

create and initialize the tspConfig

Parameters:
[in,out] tspConfig tsp config to initialize
[in] cfg_tree xmlDoc
Returns:
TSP_STATUS_OK if OK

int32_t TSP_TspCfg_load ( TspCfg_T tspConfig,
char *  filename 
)

Open and parse xml config File, and load in the TSP config structure all the provider and all the sample describe in the XML file.

Parameters:
[in,out] tspConfig the xmlconfig which contains the information about the TSP configuration
[in] filename xml file
Returns:
TSP_STATUS_OK if OK

TspCfg_T* TSP_TspCfg_new ( xmlDoc *  cfg_tree  ) 

memory allocation

Parameters:
[in] cfg_tree xmlDoc
Returns:
the tsp config

int32_t TSP_TspCfg_save ( TspCfg_T tspConfig,
char *  output_filename 
)

save the xml tree in the output file

Parameters:
[in] tspConfig the xmlconfig who contain the information about the file
[in] output_filename the xml output file
Returns:
TSP_STATUS_OK if OK

int32_t TSP_TspCfgProvider_delete ( TspCfgProvider_T **  provider  ) 

delete a provider

Parameters:
[in,out] provider provider to destroy
Returns:
TSP_STATUS_OK if OK

int32_t TSP_TspCfgProvider_finalize ( TspCfgProvider_T provider  ) 

destroy a provider

Parameters:
[in] provider provider to destroy
Returns:
TSP_STATUS_OK if OK

int32_t TSP_TspCfgProvider_initialize ( TspCfgProvider_T provider,
char *  name,
char *  url,
int32_t  implicit_period,
int32_t  length 
)

initialize a provider

Parameters:
[in,out] provider provider to initialize
[in] name provider name
[in] url provider url
[in] implicit_period implicit period
[in] length number of sample
Returns:
TSP_STATUS_OK if OK

TspCfgProvider_T* TSP_TspCfgProvider_new ( char *  name,
char *  url,
int32_t  implicit_period,
int32_t  length 
)

create a provider

Parameters:
[in] name provider name
[in] url provider url
[in] implicit_period implicit period
[in] length number of sample
Returns:
a provider

int32_t TSP_TspCfgProviderList_delete ( TspCfgProviderList_T **  provider_list  ) 

destroy provider list

Parameters:
[in,out] provider_list provider list to destroy
Returns:
TSP_STATUS_OK if OK

int32_t TSP_TspCfgProviderList_finalize ( TspCfgProviderList_T provider_list  ) 

create and initialize the tspConfig

Parameters:
[in] provider_list provider list to destroy
Returns:
TSP_STATUS_OK if OK

int32_t TSP_TspCfgProviderList_initialize ( TspCfgProviderList_T tspCfgProviderList,
int32_t  length 
)

create and initialize the tspConfig

Parameters:
[in,out] tspCfgProviderList provider list
[in] length number of provider
Returns:
TSP_STATUS_OK if OK

TspCfgProviderList_T* TSP_TspCfgProviderList_new ( int32_t  length  ) 

create provider list

Parameters:
[in] length number of provider
Returns:
the provider list

int32_t TSP_TspCfgSampleList_delete ( TspCfgSampleList_T **  sample  ) 

destroy a sample

Parameters:
[in,out] sample sample to destroy
Returns:
TSP_STATUS_OK if OK

int32_t TSP_TspCfgSampleList_finalize ( TspCfgSampleList_T sample  ) 

destroy a sample

Parameters:
[in] sample sample to destroy
Returns:
TSP_STATUS_OK if OK

int32_t TSP_TspCfgSampleList_initialize ( TspCfgSampleList_T tspCfgSampleList,
int32_t  implicit_period,
int32_t  implicit_phase,
char *  implicit_type,
char *  implicit_access,
char *  implicit_provider,
char *  renamed,
char *  name 
)

initialize a sample

Parameters:
[in,out] tspCfgSampleList sample to initialize
[in] implicit_period implicit period
[in] implicit_phase implicit phase
[in] implicit_type implicit type
[in] implicit_access implicit access
[in] implicit_provider implicit provider
[in] renamed renamed
[in] name name
Returns:
TSP_STATUS_OK if OK

TspCfgSampleList_T* TSP_TspCfgSampleList_new ( int32_t  implicit_period,
int32_t  implicit_phase,
char *  implicit_type,
char *  implicit_access,
char *  implicit_provider,
char *  renamed,
char *  name 
)

create a sample

Parameters:
[in] implicit_period implicit period
[in] implicit_phase implicit phase
[in] implicit_type implicit type
[in] implicit_access implicit access
[in] implicit_provider implicit provider
[in] renamed renamed
[in] name name
Returns:
a sample

Framework Home Page.


Beware !! TSP wave is coming...