Main Content

ssGetOutputPortSampleTime

Get the sample time of an output port

Syntax

real_T ssGetOutputPortSampleTime(SimStruct *S, int_T outputPortIdx)

Arguments

S

SimStruct representing an S-Function block.

outputPortIdx

Index of an output port.

Returns

Areal_Tvalue indicating the sample time of the output port specified by the indexoutputPortIdx.

Description

Use in any routine (exceptmdlInitializeSizes) to determine the sample time of an output port. You should use this macro only if you have specified the sample times as port-based. UsessGetSampleTimeto determine the sample time of S-functions that do not use port-based sample times.

语言

C, C++

Example

See the S-functionsfun_multirate.cused insfcndemo_sfun_multirate.

H版istory

Introduced before R2006a