FIR/Percentile predictor.

Data Structures

struct  firperc_params_struct
 Parameters for firperc predictor. More...
struct  firperc_struct
 FIR-Percentile predictor class definition. More...

Files

file  firperc.h
 

Private interface for the FIR-Percentile predictor.


file  firperc_lib.h
 

Public interface for the FIR-Percentile predictor.


Defines

#define FIRPERC_DEF_DISCARDED   0
 Default number of discarded samples to get percentile.
#define FIRPERC_DEF_SAMPLESIZE   3
 Default number of discarded samples to get percentile.

Typedefs

typedef struct
firperc_params_struct 
firperc_params_t
 Parameters for firperc predictor.
typedef struct firperc_struct firperc_t
 FIR-Percentile predictor class definition.

Functions

qos_rv firperc_register (void)
 Register the FIR-Percentile class with the framework.
qos_rv firperc_init (qmgr_pred_t *self, qmgr_pred_params_t *self_params)
 Initialize a firperc object.
qos_rv firperc_final (qmgr_pred_t *self)
 Virtual destructor for a firperc object.
qos_rv firperc_add_sample (qmgr_pred_t *pred, qres_time_t new_sample)
 Virtual add_sample function for firperc object.
qres_time_t firperc_get_exp_value (qmgr_pred_t *pred)
qos_rv firperc_set_defaults (void)
 Configures a FIR-Percentile predictor with default parameters.
qos_rv firperc_set_coeffs (int *coeffs, int coeffs_num)
 Sets the FIRPERC coefficients.
qos_rv firperc_set_sample_size (int sample_size)
 Set sample size for percentile estimation.
qos_rv firperc_set_discarded (int num)
 Set discarded for percentile estimation.

Function Documentation

qos_rv firperc_add_sample ( qmgr_pred_t pred,
qres_time_t  new_sample 
)

Virtual add_sample function for firperc object.

Todo:
2 versions of this function could be created, one for the initial transitory when the window is not yet full, and another to be used when the window is full. By replacing the function pointer in the virtual table, this would avoid one comparison in the function at each call.
qos_rv firperc_init ( qmgr_pred_t self,
qmgr_pred_params_t self_params 
)

Initialize a firperc object.

Parameters:
params Set of parameters passed by the QMGR Library. When in kernel-space, self is a pointer to user-space.
Returns:
QOS_OK or one of the predefined error-codes.
qos_rv firperc_set_coeffs ( int *  coeffs,
int  coeffs_num 
)

Sets the FIRPERC coefficients.

Parameters:
coeffs An integer array containing the FIRPERC coefficients, in temporal order, i.e., coeffs[coeffs_num-1] is applied to the latest sample, coeffs[coeffs_num-2] is applied to the previous one, and so on.
coeffs_num Number of coefficients
qos_rv firperc_set_defaults ( void   ) 

Configures a FIR-Percentile predictor with default parameters.

Tells to the QoS library to use a FIR-Percentile predictor with a default set of parameters.

Generated on Mon Aug 2 22:38:48 2010 for qosmgr by  doxygen 1.6.3