| Contents | Index |
void *ssGetPWorkValue(SimStruct *S, int_T idx)
The (void *) element of the PWork vector at the index idx.
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 ssGetNumPWork(S). Typically, this vector is initialized in mdlStart or mdlInitializeConditions, updated in mdlUpdate, and used in mdlOutputs. You can use this macro in the simulation loop, mdlInitializeConditions, or mdlStart routines. A return value of NULL indicates that no value was assigned into the idx element of the pointer work vector.
C, C++
The following statement
void* v = ssGetPWorkValue(S, 0);
is equivalent to
void** wv = ssGetPWork(S); void* v = wv[0];
ssGetNumPWork, ssGetPWork, ssSetPWorkValue

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |