Get an element of a block's integer work vector
int_T ssGetIWorkValue(SimStruct *S, int_T idx)
SimStruct representing an S-Function block.
Index of the element returned by this function.
int_T value stored in the
idx element of
the integer work vector for this S-function. Returns
NULL if no
value was assigned into the
idx element of the IWork
Use this macro in the simulation loop,
mdlStart routines to obtain an element of the IWork vector.
The vector consists of elements of type
int_T and is of length
ssGetNumIWork(S). Typically, this vector is initialized in
mdlUpdate, and used in
The following statement
int_T v = ssGetIWorkValue(S, 0);
is equivalent to
int_T* wv = ssGetIWork(S); int_T v = wv;