Specify how DWork vector is used in S-function
ssDWorkUsageType ssSetDWorkUsageType(SimStruct *S, int_T vector, ssDWorkUsageType type)
S
SimStruct representing an S-Function block.
vector
Index of the Dwork vector.
type
Usage type of the DWork vector.
The usage type entered in type
.
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.
C, C++
For more information on using DWork vectors, see How to Use DWork Vectors.