Main Content

ssCallSystemWithTid

Call the update and outputs methods of a function-call subsystem

Syntax

int_T ssCallSystemWithTid(SimStruct *S, int_T element, int_T tid)

Arguments

S

SimStruct that represents an S-Function block.

element

Index of the output port element corresponding to the function-call subsystem.

tid

Task ID.

Returns

An int_T 1 if successful; otherwise, 0.

Description

Use in mdlOutputs to call the update and outputs methods of a function-call subsystem connected to the S-function. The invoking syntax is

if (!ssCallSystemWithTid(S, element, tid)) {
  /* Error occurred which will be reported by the Simulink engine*/
  return;
}

See Implement Function-Call Subsystems with S-Functions for more information on how to use ssCallSystemWithTid.

Note

ssCallSystemWithTid can only be used with function-call subsystems that either hold or inherit their states, based on the setting of the States when enabling parameter of the function-call subsystem's Trigger block. If the function-call subsystem needs to have its states reset upon enabling, the S-function must explicitly enable and disable the function-call subsystem using ssSetExplicitFCSSCtrl, ssEnableSystemWithTid and ssDisableSystemWithTid.

Languages

C, C++

Examples

See the S-function sfun_fcncall.c.

Version History

Introduced before R2006a