Ada S-Functions --------------- The directory matlabroot/simulink/ada/ contains all the files required for building Ada S-Functions. We currently support the GNAT Ada95 compiler for Windows NT, Solaris and GNU-Linux platforms. This implementation requires the GNAT Ada95 compiler Version 3.12 (or higher). The binaries distributed by GNAT come with both the C and Ada compilers. Note that you can obtain a free copy of the GNAT Ada compiler from the GNAT ftp site (ftp://cs.nyu.edu/pub/gnat). You can also purchase a professional version from Ada Core Technologies (www.gnat.com). We interface your Ada code to Simulink by creating a dynamic link library (.dll) on the PC or shared object on Unix. We use the term MEX (Matlab executable) to refer to a dynamically linked binary built specifically for Matlab/Simulink. The API for Ada S-functions consist of both C and Ada code. The C code is used as a gateway between Simulink and your Ada code. We use standard Ada95 pragmas for interfacing the Ada to the C code. On your part, you need to write the Ada S-Function as a package, with a body and a spec, 'sfcn.adb' and 'sfcn.ads', respectively. The following command builds an Ada S-Function sfcn.ads[b] into a MEX-File mex [-v] [-g] -ada sfcn.ads where the optional switches, -v prints all the compiler and linker commands and output, and -g builds the MEX-File with debugging symbols included. Once you have successfully built the Ada S-Function into a MEX-File, you can use this MEX-File as an S-Function in the Simulink S-function block. Please refer to the Simulink documentation for more information about S-Functions. See the source code for the example Ada S-Functions in the sub-directories under the matlabroot/simulink/ada/examples/ directory. Also see the example simulink model that demonstrates Ada S-Functions: sfcndemo_ada_simple_lookup You can open this model by simply typing the above line at the MATLAB prompt. This model lives in matlabroot/toolbox/simulink/simdemos/ directory as sfcndemo_ada_simple_lookup.mdl Any feedback (bugs, enhancements, etc) regarding this new feature will be greatly appreciated. You can contact The MathWorks at the following addresses: support@mathworks.com Technical Support suggest@mathowrks.com Product Enhancement Suggestions bugs@mathworks.com Bug reports doc@mathworks.com Documentation Error Reports info@mathworks.com Sales, Pricing and General Information Murali Yeddanapudi murali@mathworks.com Copyright (c) 1984-2000 The MathWorks, Inc. $Revision: 1.6 $ $Date: 2000/08/04 17:17:30 $ eof: README