ssGetSimMode

Get the simulation mode of an S-Function block

Syntax

SS_SimMode ssGetSimMode(SimStruct *S)

Arguments

S

SimStruct representing 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++

Example

See the S-function vsfunc.cvsfunc.c used in sfcndemo_vsfuncsfcndemo_vsfunc.

Was this topic helpful?