/** Sample output interfaces configuration file. * * This file configures static output interfaces. In general, data types will be * parametrizable (with an initialization parameter). Therefore, here we will * declare the output_data buffer as a simple byte. In the processing function, * typetools library will convert from a variable type to an internal type. * * If the component only generates data in a certain type, you * MUST INDICATE it in this file as a comment. * * Read sw_api/include/swapi_utils.h and http://flexnets.upc.edu/trac/wiki/ObjectDeveloperGuide * for more documentation on how to use this file * */ /** see input.h */ typedef char output1_t; #define OUTPUT_MAX_DATA (100*1024) /*Max Number of data symbols*/ output1_t output_data[OUTPUT_MAX_DATA]; /** The value returned by this function indicates the amount of samples to * read from the output_data buffer and send through the interface * after all input processing functinos finished. */ int get_output_length(); /** This function is called before sending output data. It can be used to * generate data on modules without an input interface */ int output_process(int len); /** configure output interfaces */ struct utils_itf output_itfs[] = { {"output", /** Name of the interface */ sizeof(output1_t), /** Sample size */ OUTPUT_MAX_DATA, /** Maximum number of samples (buffer size) */ output_data, /** Buffer pointer */ get_output_length, /** Pointer to the function to get length */ output_process, /** Pointer to the function to generate data */ }, {NULL, 0, 0, 0, 0, 0}};