/* * Define here the outputs for the module */ #ifndef _INPUTS_H #define _INPUTS_H /** Type declaration */ typedef struct { float re; float im; }symbolIN; /*Defined according the data needs*/ #define INPUT_MAX_DATA 4096 /*Max buffer size for data symbols*/ #define INPUT_MAX_CONTROL 1 /*Max buffer size for control symbols*/ /* buffer for data */ symbolIN input_data[INPUT_MAX_DATA]; /*DATA BUFFER*/ CChannel control_channel; /*CONTROL BUFFER*/ /* defined interfaces functions*/ int get_datain_length(); int process_inputdata(); int get_controlin_length(); int process_inputcontrol(); /** configure input interfaces */ /*Better define first control flow: Flows processed according definition position*/ struct utils_itf input_itfs[] = { {"control_flow_in", /**<< Name of the interface */ sizeof(CChannel), /**<< Size of the sample (in bytes) */ INPUT_MAX_CONTROL, /**<< Pointer where to store data */ &control_channel, /**<< Buffer for data */ get_controlin_length, /**Returns number of samples to read from flow Set to NULL to read all */ process_inputcontrol, /**<< Function to process data */ }, { "data_flow_in", /**<< Name of the interface */ sizeof(symbolIN), /**<< Size of the sample, in bytes */ INPUT_MAX_DATA, /**<< Max buffer length in samples */ input_data, /**<< Pointer where to store data */ get_datain_length, /**<< Returns number of samples to read from flow Set to NULL to read all */ process_inputdata, /**<< Function to process the data */ }, {NULL, 0, 0, 0, 0, 0}}; /** =============== End ================ */ #endif /* _INPUTS_H */