Products & Services Solutions Academia Support User Community Company

Learn more about Simulink   

ssSetInputPortOptimOpts - Specify reusability of the memory allocated to the input port of an S-function

Syntax

void ssSetInputPortOptimOpts(SimStruct *S, int_T port, uint_T val)

Arguments

S

SimStruct representing an S-Function block.

port

Index of an input port of S.

val

Reusability of port. Permissible values are

  • SS_NOT_REUSABLE_AND_GLOBAL

  • SS_REUSABLE_AND_LOCAL

  • SS_REUSABLE_AND_GLOBAL

  • SS_NOT_REUSABLE_AND_LOCAL

Description

Use this macro to specify the reusability and scope of the memory allocated to an S-function input port. The reusability indicates if the memory associated with the input port can be overwritten, or not. You must indicate an input port is reusable if you use the ssSetInputPortOverWritable macro to specify the input port's memory can be overwritten by one of the output ports.

The Simulink engine disregards the memory scope setting, instead treating all S-function ports as global during simulation.

Languages

C, C++

Example

See the S-function matlabroot/toolbox/simulink/simdemos/simfeatures/src/sfun_multirate.c used in sfcndemo_sfun_multirate.mdl and the S-function matlabroot/toolbox/simulink/simdemos/simfeatures/src/sdotproduct.c used in sfcndemo_sdotproduct.mdl.

See Also

ssGetInputPortOptimOpts, ssSetOutputPortOptimOpts, ssSetInputPortOverWritable

  


Related Products & Applications

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS