Получение количества адресатов функциональных вызовов.
int_T ssGetCallSystemNumFcnCallDestinations(SimStruct *S, int_T elemIdx)
SSimStruct, представляющий S-функциональный блок
elemIdxОтсчитываемый от нуля индекс элемента, выводимый на первый выходной порт.
int_T
Используется для определения количества адресатов вызова функции, когда сигнал вызова функции разделяется блоком разделения вызова функции.
C, C++
static void mdlOutputs(SimStruct *S, int_T tid) {
/*
* The second output port outputs the number of blocks
* being called to Out3
*/
real_T *y = ssGetOutputPortRealSignal(S, 1);
int_T numFC = ssGetCallSystemNumFcnCallDestinations(S, 0);
y[0] = (real_T)numFC;
UNUSED_PARAMETER(tid);
/* The first output (function-call port) makes a function-call */
if (!ssCallSystem(S,0)) {
/* Error occurred which will be reported by Simulink */
}
}