| Motorola DSP Developer's Kit | ![]() |
Declaring Input and Output Objects
Pointers to MOTDSP_Input or MOTDSP_Output objects are created outside the try block of the MEX-file for all possible input and output arguments.
MOTDSP_Input* a = PTR_NIL; MOTDSP_Input* b = PTR_NIL; MOTDSP_Output* y = PTR_NIL; MOTDSP_Output* index = PTR_NIL;
Validation. Outside the try block, the MOTDSP_Config class parses the argument list and provides methods to gain access to the actual arguments. Use the supplied MOTDSP_CONFIG macro. This generates the following variables for use throughout the MEX-file.
char* MOTDSP_cmdfile = config.GetCommandFile();char* MOTDSP_partname = config.GetProcessorType();int MOTDSP_data_inputs = config.GetFixedInputs();int MOTDSP_dsptype = config.GetDspFamilyType();
Inside the try block, the MOTDSP_FuncVar class validates the function arguments. Use the supplied MOTDSP_FUNCVAR(nrhs,nlhs) macro.
| MATLAB MEX-Files | Instantiating Input and Output Objects | ![]() |