Get a pointer from a block's pointer work vector
void *ssGetPWorkValue(SimStruct *S, int_T idx)
SimStruct representing an S-Function block.
Index of the pointer returned by this function.
void *) element of the PWork vector
at the index
Use to access an element of the pointer work vector used by
the block represented by
S. The vector consists
of elements of type
void * and is of length
Typically, this vector is initialized in
mdlUpdate, and used in
You can use this macro in the simulation loop,
mdlStart routines. A return value of
that no value was assigned into the
of the pointer work vector.
The following statement
void* v = ssGetPWorkValue(S, 0);
is equivalent to
void** wv = ssGetPWork(S); void* v = wv;