/* * 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 24 /** 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 0 #define OUTPUTDATALENGTH 1152 /** Values for signalflow * #define DATAFLOW 10 //bits * #define SAMPLES 20 //Digital signal processing samples */ /*Values for signaltype*/ /** Signal types * #define FROMTEXTFILE 11 //Data flow from text file * #define FROMPATTERN 12 //Always the same byte pattern * #define NUMBEREDSEQ 13 * #define SEN 21 * #define COS 22 * #define RECT 23 * #define CUSTOM 24 */ ControlGEN_SOURCEr1_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_BITSTREAM, /** transporttypeOUT * Define the data output transport type */ DATAFLOW, /** crtl.signalflow*/ FROMTEXTFILE, /** ctrl.signaltype*/ /** <--------------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}, {"data_typeIN",STAT_TYPE_INT,1, &ctrl.transporttypeIN}, {"num_dataIN",STAT_TYPE_INT,1, &ctrl.inputdatalength}, {"data_typeOUT",STAT_TYPE_INT,1, &ctrl.transporttypeOUT}, {"num_dataOUT",STAT_TYPE_INT,1, &ctrl.outputdatalength}, {"time_SLOT",STAT_TYPE_INT,1, &ctrl.time_slot}, {"signalflow",STAT_TYPE_INT,1, &ctrl.signalflow}, {"signaltype",STAT_TYPE_INT,1, &ctrl.signaltype}, {NULL, 0, 0, 0}}; struct utils_stat stats[] = { {NULL, 0, 0, 0, 0, 0}}; #endif /* _STATS_H */