Skip to Main Content Skip to Search
Product Documentation

ssSetInputPortOverWritable - Specify whether one of an S-function's input ports can be overwritten by one of its output ports

Syntax

void ssSetInputPortOverWritable(SimStruct *S, int_T port, int_T
 isOverwritable)

Arguments

S

SimStruct representing an S-Function block.

port

Index of the input port whose overwritability is being set.

isOverwritable

Value specifying whether port is overwritable.

Description

Use in mdlInitializeSizes (after ssSetNumInputPorts) to specify whether port is overwritable by one of the S-function's output ports. The Simulink engine uses this setting as one criterion in determining whether one of the output ports of this S-function can share memory with port. If isOverwritable=1 and the other criteria are satisfied, the engine allocates a common block of memory for the input port and one of the S-function's output ports, thus reducing simulation memory requirements. The default is isOverwritable=0, which means that port cannot share memory with any of the S-function's output ports.

Languages

C, C++

Example

See the S-function sfun_multirate.c used in sfcndemo_sfun_multirate.mdl and the S-function sdotproduct.c used in sfcndemo_sdotproduct.mdl.

See Also

ssSetNumInputPorts, ssSetInputPortOptimOpts, ssSetOutputPortOptimOpts, ssGetInputPortBufferDstPort

  


Related Products & Applications

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

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