Main Content

ssGetSimMode

Get the simulation mode of an S-Function block

Syntax

SS_SimMode ssGetSimMode(SimStruct *S)

Arguments

S

SimStruct that represents an S-Function block or a Simulink® model.

Returns

An enumerated value of type SS_SimMode.

Description

Use to query the simulation mode of the block represented by S. Possible return values are:

  • SS_SIMMODE_NORMAL

    Running a normal Simulink simulation

  • SS_SIMMODE_SIZES_CALL_ONLY

    Invoked by the editor to obtain the number of ports

  • SS_SIMMODE_RTWGEN

    Generating code regardless of the simulation mode

  • SS_SIMMODE_EXTERNAL

    Running an external mode simulation

Languages

C, C++

Examples

See the S-function vsfunc.c used in sfcndemo_vsfunc.

Version History

Introduced before R2006a