ssWriteRTWWorkVect
Write work vectors to the
filemodel.rtw
Syntax
int_T ssWriteRTWWorkVect(SimStruct *S, const char_T *vectName, int_T nNames, const char_T *name1, int_T size1, ..., const char_T * nameN, int_T sizeN)
Arguments
SSimStruct that represents an S-Function block.
vectNameName of the work vector (must be
RWork,IWork, orPWork).nNamesNumber of names (see the next argument).
name1 ... nameNNames of groups of work vector elements.
size1 ... sizeNSize of each element group (the total of the sizes must equal the size of the work vector).
Returns
An int_T (1 or 0) or
boolean_T (true or
false) indicating the success or failure of the
function.
Description
Use this function in mdlRTW to write work vectors to this
S-function's file. For
example:model.rtw
static void mdlRTW(SimStruct *S)
{
if (!ssWriteRTWWorkVect(S, "RWork", 1 /* nNames */,
"InputAtLastUpdate", ssGetNumRWork(S))) {
return;
}
/*
This registration of the symbol "InputAtLastUpdate"
allows sfunmem.tlc to call
LibBlockRWork(InputAtLastUpdate,[...])
*/
}Languages
C, C++
Examples
See the S-function sfunmem.c used in sfcndemo_sfunmem.
See Also
Version History
Introduced before R2006a