Writing S-Functions    

Ada S-Function Specification

The specification specifies the methods that the Ada S-function uses and implements. The specification must specify that the Ada S-function uses the Simulink package, which defines data types and functions that the S-function can use to access the internal data structure (SimStruct) that Simulink uses to store information about the S-function (see SimStruct Functions). The specification and body of the Simulink package reside in the matlabroot/simulink/ada/interface/ directory.

The specification should also specify each callback method that the S-function implements as an Ada procedure exported to C. The following is an example of an Ada S-function specification that meets these requirements.


  Ada S-Function Source File Format Ada S-Function Body