Writing S-Functions | ![]() ![]() |
Building an Ada S-Function
To use your Ada S-function with Simulink, you must build a MATLAB executable (MEX) file from the Ada source code for the S-function. Use the MATLAB mex
command to perform this step.
The mex
syntax for building an Ada S-function MEX file is
mex [-v] [-g] -ada SFCN.ads
where SFCN.ads
is the name of the S-function's package specification.
For example, to build the timestwo
S-function example that comes with Simulink, enter the command
mex -ada timestwo.ads
![]() | Writing Callback Methods in Ada | Using an Ada S-Function in a Model | ![]() |