| Contents | Index |
uint_T ssGetBlockReduction(SimStruct *S)
The result of this function depends on when it is invoked. When invoked before the simulation loop has started, i.e., in mdlSetWorkWidths or earlier, this macro returns 1 if the block has previously requested that it be reduced. When invoked after the simulation loop has begun, this macro returns 1 if the block has actually been reduced, i.e., eliminated from the list of blocks to be executed during the simulation loop. Otherwise, returns 0.
Use to determine if a block requested block reduction, or to determine if the block has already been reduced.
Note If a block has been reduced, the only callback method invoked for the block after the simulation loop has begun is the block's mdlTerminate method. Further, the Simulink engine invokes the mdlTerminate method only if the block has set its SS_OPTION_CALL_TERMINATE_ON_EXIT option, using ssSetOptions. Thus, if your block needs to determine whether it has actually been reduced, it must set the SS_OPTION_CALL_TERMINATE_ON_EXIT option before the simulation loop has begun and invoke ssGetBlockReduction in its mdlTerminate method. |
C, C++

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 |