I am trying to send a pointer between two connected S-functions. The idea is to create an array wihtin one S-function and send its pointer to other connected S-functions in order to write the results in the same memory allocation. The problem is that when configuring the ouput/input ports, the only types accepted are the following, and it doesn't seem possible to define a port as a pointer:
Integer Data Type ID (DTypeId) Built-in Data Type
In my case i want to to rasterize primitives on a frame memory. For that, I generate an array (frame) in one S-function, and send its pointer to other S-functions that draw on the frame rectangles, characters, lines, etc.
The datatypes you list are the only datatypes recognised as a simulink signal (at least by default).
Your choices are
- output an integer representing the correct number of byes for your pointer and have your subsequent S-Functions know how to correctly handle the integer as a pointer. (This may change on a platform by platform basis).
- register a custom datatype using the ssRegisterDatatype macro.
This approach specifically precludes doing any code generation (with Simulink Coder).