/** Sample ALOE component implementation file Specific module code */ /** Include general data type library */ #include "typetools.h" #include "itf_types.h" /** GLOBAL VARIABLES & BUFFERS*/ /** INITIALIZATION FUNCTION. EXECUTED DURING INIT PHASE*/ void init_my_prog() { } /** USER FUNCTION. EXECUTED DURING RUN PHASE*/ /** Module function generic format * Returns the output length or -1 if error */ int my_prog(void *pdatain, void *pdataout,\ int processingtypeIN, int processingtypeOUT,\ int inputlength, ControlMODULENAME_h myctrl) { int i, outputlength; float *input_f, *output_f; char *input_c, *output_c; int *input_i, *output_i; short *input_s, *output_s; int Dtype; /**Properly typecast your input data pointer and check the input data type*/ if(processingtypeIN==TYPE_BIT8)input_c=(char *)pdatain; else { printf("MODULENAME.my_prog(): ERROR INPUT DATA TYPE NON VALID\n"); return(-1); } if(processingtypeOUT==TYPE_FLOAT)output_f=(char *)pdataout; else { printf("MODULENAME.my_prog(): ERROR OUTPUT DATA TYPE NON VALID\n"); return(-1); } //*YOUR CODE*/ /** Following lines only for example purposes*/ if(processingtypeOUT==TYPE_FLOAT) for(i=0; i