ESO Recipe Execution Tool  3.13
Functions
EsoRex Parameter Processing Functions

Functions

int params_parse_config_file (cpl_parameterlist *param_list, const char *file_name)
 Parse esorex caller configuration file. More...
 
int params_parse_config_environment (cpl_parameterlist *param_list)
 Parse caller configuration environment. More...
 
int params_parse_config_commandline (cpl_parameterlist *param_list, char *recipe_name, er_stringarray_t *set_of_frames_filenames, int argc, char *argv[], int f_caller)
 Parse esorex caller commandline. More...
 
void params_parse_config_postprocess (cpl_parameterlist *param_list)
 Postprocess parameter list after reading configuration data from file, environment and commandline. More...
 
int params_handle_parameters (char *plugin_name, cpl_parameterlist *param_list)
 Validates and handles parameters. More...
 
int params_process_configuration (cpl_parameterlist *caller_parameter_list, char *global_conf_file, char *local_conf_file, int argc, char *argv[], char *plugin_name, er_stringarray_t *set_of_frames_filenames)
 Processes configuration data for caller. More...
 

Detailed Description

EsoRex Parameter Processing Functions

Function Documentation

int params_handle_parameters ( char *  plugin_name,
cpl_parameterlist *  param_list 
)

Validates and handles parameters.

Parameters
param_listList of Parameters
plugin_nameName of recipe specified on command line
Return values
0if successfull, !=0 otherwise

Function performs the necessary operations based on the values stored in the caller parameter list. All parameters are validated and those which can immediately be processed will be. All others are postponed until the Plugin is executed.

int params_parse_config_commandline ( cpl_parameterlist *  param_list,
char *  recipe_name,
er_stringarray_t set_of_frames_filenames,
int  argc,
char *  argv[],
int  f_caller 
)

Parse esorex caller commandline.

Parameters
param_listList of Parameters
argcCount of arguments given on command line
argvArray of arguments given on command line
f_callerBoolean indicating if parsing should begin from the recipe name argument or not.
Return values
recipe_nameName of the recipe given on the command line
set_of_frames_filenamesSet of strings containing filenames of set of frames
Returns
None

Function parses command file arguments given in argv for keyword-value pairs. If a keyword is found that is present in the param_list the value found is stored as current value of the parameter in the parameter list param_list. The recipe name found is returned in recipe_name. set_of_frames_filenames contains a set of filenames, filenames point to a set-of-frames file.

int params_parse_config_environment ( cpl_parameterlist *  param_list)

Parse caller configuration environment.

Parameters
param_listList of Parameters
Returns
None

Function searches shell environment for keyword, value pairs If a keyword is found that is present in the param_list the value found is stored as current value of the parameter in the parameter list param_list.

int params_parse_config_file ( cpl_parameterlist *  param_list,
const char *  file_name 
)

Parse esorex caller configuration file.

Parameters
param_listList of Parameters
file_nameName of File to parse
Returns
?????

Function searches in file file_name for keyword, value pairs If a keyword is found that is present in the param_list the value found is stored as current value of the parameter in the parameter list param_list.

void params_parse_config_postprocess ( cpl_parameterlist *  param_list)

Postprocess parameter list after reading configuration data from file, environment and commandline.

Parameters
param_listList of Parameters
Returns
None

Function searches param_list for parameter for which no argument was given either in a file, in a environment variable or on the command line. If such a parameter is found the default value is copied to the current value.

int params_process_configuration ( cpl_parameterlist *  caller_parameter_list,
char *  global_conf_file,
char *  local_conf_file,
int  argc,
char *  argv[],
char *  plugin_name,
er_stringarray_t set_of_frames_filenames 
)

Processes configuration data for caller.

Parameters
caller_parameter_listList of Parameters necessary for caller
global_conf_fileFQFN for global configuration file
local_conf_fileFQFN for local i.e. user specific configuration file
argcCount of commandline arguments
argvHandle to commandline aguments
Return values
plugin_nameName of recipe specified on command line
set_of_frames_filenamesArray of SOF filenames specified on commandline
Returns
0 if successfull, !=0 otherwise