Initialization Parameters


Functions

int InitParamFile (void)
int CloseParamFile (void)
int GetParam (char *ParamName, void *ParamValue, int ParamType, int ParamLen)

Detailed Description

This collection of functions are used to obtain object's initialization parameter values. Parameters are those variables that do change (sustantially) the behaviour of the object and require long execution times to be performed (at least bigger than one time slot).

As this parametrization can't be performed at real-time, a special initialization phase is defined (INIT) so the object can take its time to perform such parametrization.

An example of this can be computing filter coefficients given a band of pass. It is obvious that this operation can't be performed at real-time.

Before obtaining this values, STATSMAN daemons must read the file (system file) where this parameters are kept. This operation has to explicity be done by the object calling the InitParamFile() function.


Function Documentation

int CloseParamFile ( void   ) 

Close Parameter Configuration File.

Deallocates resources regarding parameter usage. Any more parameter can be obtained after this function has been called.

Returns:
1 if ok 0 if error

int GetParam ( char *  ParamName,
void *  ParamValue,
int  ParamType,
int  ParamLen 
)

Obtain a parameter value.

Get an initialization parameter value.

Parameters:
ParamName Name of the parameter.
ParamValue Pointer where to save data.
ParamType One of the following (STAT_TYPE_INT, _FLOAT, _CHAR)
ParamLen Length of the expected parameter, in bytes.
Returns:
1 if ok, 0 if error

int InitParamFile ( void   ) 

Initiates Parameter Configuration File.

Initiates the procedure to read the configuration file and allocate resources. After the object has called this function, it can obtain parameter values using the GetParam function.

Returns:
1 if ok 0 if error


Generated on Thu Jul 29 19:37:21 2010 for ALOESoftwareAPI(SWAPI) by  doxygen 1.5.5