Motorola DSP Developer's Kit    

Input Objects

Pointers to MOTDSP_Input objects only are declared outside the try block of the mdlOutputs function.

For example,

Before creating MOTDSP_Input objects declare InputPtrsType pointers to all possible input ports using the specific Simulink 'ss' macros.

For example, for input Port 1 use

and, for input Port 2

Also, you must declare a pointer to an mxArray for each possible input port.

Then use the support functions MOTDSP_CreateComplexMatrix or MOTDSP_CreateRealMatrix to create a valid matrix after checking its type:

Remember to clear the memory created for each mxArray by calling the mxDestroyArray function.

Finally, create a pointer to right hand side (prhs) MEX equivalent variable before mapping the input ports to variables. For example,

Information about the variables is accessed by the supplied methods as described previously in MATLAB MEX-Files.


 Simulink S-Function MEX-Files Output Objects