Main Content

ssSetDWorkUsageType

Specify how DWork vector is used in S-function

Syntax

ssDWorkUsageType ssSetDWorkUsageType(SimStruct *S, int_T vector,
 ssDWorkUsageType type)

Arguments

S

SimStruct that represents an S-Function block.

vector

Index of the Dwork vector.

type

Usage type of the DWork vector.

Returns

The usage type entered in type.

Description

Use this function in mdlInitializeSizes to set the usage type for the DWork vector specified by vector. Permissible values are:

  • SS_DWORK_USED_AS_DWORK

    The DWork vector is used as a Dwork vector. This is the default value.

  • SS_DWORK_USED_AS_DSTATE

    The DWork vector is used to store the block's discrete states.

  • SS_DWORK_USED_AS_SCRATCH

    The DWork vector is used as a temporary scratch work vector.

  • SS_DWORK_USED_AS_MODE

    The DWork vector is used as a mode vector.

For more information on using DWork vectors, see How to Use DWork Vectors.

Languages

C, C++

Examples

For more information on using DWork vectors, see How to Use DWork Vectors.

Version History

Introduced in R2007a