/* * File: stats.h * Author: ismael * * Created on 18 de mayo de 2009, 12:18 */ //#include "itf_types.h" #ifndef _STATS_H #define _STATS_H /**CONFIGURATION: There exist three ways to configure the module: * 1) By using a control module. The command structure is defined at itf_types.h. * Performed when data is received by the control interface. Printing of * variables value done at that time. * 2) By means of stats.h. It setup the default values. * 3) By means of params files. These params can be updated at run time by means * of the set command under runph prompt */ /** Control of the stats.h configuration*/ #define TRUE 1 #define FALSE 0 int configSTATS=TRUE; /** Configured by stats.h. At init or run time the * configSTATS value is checked. If TRUE configuration * and variables printing is done one time. */ /** Control of printing input/output data array options*/ #define NUMCOLS 16 /** Number of columns of printting*/ #define PRINT 1 /** Printing choice*/ #define NOPRINT 0 /** Non printing choice*/ #define NUM_TS 0 /** Time slot to start printing. This value must be * higher than the position of such module in the * processing chain this */ #define NUM_TS_PRINTS 100 /** Number of time slots to print*/ int printting=NOPRINT; /** Print data input/output buffer*/ int numTS2print=NUM_TS; /** Initialize module variables to default value */ /** Values for "status" * #define NONACTIVE 0 * #define ACTIVE 1 //Defines a module as active * #define TEST_FLOW 2 //Test flows: Bypass data flow mode * #define TEST_PROCESS 3 //Test Module Process */ #define TIMESLOT 0 #define INPUTDATALENGTH 2304 #define OUTPUTDATALENGTH 0 ControlMODULENAME_h ctrl = { ACTIVE, /** crtl.status: Values according previous table */ TIMESLOT, /** crtl.time_slot */ INPUTDATALENGTH, /** crtl.inputdatalength */ OUTPUTDATALENGTH, /** crtl.outputdatalength */ TYPE_BITSTREAM, /** crtl.transporttypeIN * Define the data input transport type */ TYPE_FLOAT /** transporttypeOUT * Define the data output transport type */ /** <--------------Additional initialization of module control variables here according defined struct at itf_types.h*/ }; /** Variables update by the params file. If does not exist the default values * are those defined at stats.h file */ struct utils_param params[] = { {"module_status",STAT_TYPE_INT,1, &ctrl.status}, {"config_STATS",STAT_TYPE_INT,1, &configSTATS}, {"datatypeIN",STAT_TYPE_INT,1, &ctrl.transporttypeIN}, {"num_dataIN",STAT_TYPE_INT,1, &ctrl.inputdatalength}, {"datatypeOUT",STAT_TYPE_INT,1, &ctrl.transporttypeOUT}, {"num_dataOUT",STAT_TYPE_INT,1, &ctrl.outputdatalength}, {"time_SLOT",STAT_TYPE_INT,1, &ctrl.time_slot}, {NULL, 0, 0, 0}}; struct utils_stat stats[] = { {NULL, 0, 0, 0, 0, 0}}; #endif /* _STATS_H */