Finite impulse response (FIR) predictor.

Data Structures

struct  fir_params_struct
 Parameters for fir predictor. More...
struct  fir_struct
 Finite Impulse Response predictor class definition. More...

Files

file  fir.h
 

Private interface for the Finite Impulse Response predictor.


file  fir_lib.h
 

Public interface for the Finite Impulse Response predictor.


Typedefs

typedef struct fir_params_struct fir_params_t
 Parameters for fir predictor.
typedef struct fir_struct fir_t
 Finite Impulse Response predictor class definition.

Functions

qos_rv fir_register (void)
 Register the Finite Impulse Response class with the framework.
qos_rv fir_init (void *self, void *params)
 Initialize a fir object.
qos_rv fir_final (qmgr_pred_t *self)
 Virtual destructor for a fir object.
qos_rv fir_add_sample (qmgr_pred_t *pred, qres_time_t new_sample)
 Virtual add_sample function for fir object.
qres_time_t fir_get_exp_value (qmgr_pred_t *pred)
qos_rv fir_set_defaults (void)
 Configures a Finite Impulse Response predictor with default parameters.
qos_rv fir_set_coeffs (int *coeffs, int coeffs_num)
 Sets the FIR coefficients.

Function Documentation

qos_rv fir_add_sample ( qmgr_pred_t pred,
qres_time_t  new_sample 
)

Virtual add_sample function for fir 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 fir_init ( void *  self,
void *  params 
)

Initialize a fir 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 fir_set_coeffs ( int *  coeffs,
int  coeffs_num 
)

Sets the FIR coefficients.

Parameters:
coeffs An integer array containing the FIR 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 fir_set_defaults ( void   ) 

Configures a Finite Impulse Response predictor with default parameters.

Tells to the QoS library to use a Finite Impulse Response predictor with a default set of parameters.

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