Chapter 5 Generated Code ArchitectureAutoCode Reference 5-38 ni.comParameterized UCB CalloutA UCB can be defined with %var parameterized data for the UCB’s realparameters (RP) and integer parameters (IP). When used, AutoCodegenerates code that passes the %var variable as the actual of the UCBcallout. A new option, -ucbparams, creates a temporary array within thesubsystem code and passes the temporary arrays as actuals of the UCBcallout. The temporary arrays are initialized with the values of the %varwhen the code was generated. Using the temporary arrays allows the UCBto change its RP/IP parameters without affecting the %var.Example 5-18 clarifies this. Assume a UCB is parameterized with the %varnamed floatdata for the UCB’s real parameters and the %var namedintegerdata for the UCB’s integer parameters.Example 5-18 Relevant Code for UCB Call/*-------------------------------------*//* USRxx(INFO,T,U,NU,X,XDOT,NX,Y,NY,RP,IP) */usr01(&I->usr01_13_i, TIME, &usr01_13_u[0], 1, &dummp_f[0],&dummy_f[0], 0, &usr01_13_y[0], 1, &floatdata[0],&integerdata[0]);/*-------------------------------------*/Relevant code for UCB call with -ucbparams option/*------------------------------------------------------------*/static RT_INTEGER I_P[4];static RT_FLOAT R_P[3];static const RT_INTEGER _I_P[4] = {3, 5, 30, 40};static const RT_FLOAT _R_P[3] = {2.05, 3.45, 7.63};if (SUBSYS_PREINIT[1]) {for( cnt=0;cnt<4;cnt++) {I_P[cnt] = _I_P[cnt];}for( cnt=0;cnt<3;cnt++) {R_P[cnt] = _R_P[cnt];}}/* USRxx(INFO,T,U,NU,X,XDOT,NX,Y,NY,RP,IP)*/usr01(&I->usr01_13_i, TIME, &usr01_13_u[0], 1, &dummp_f[0], &dummy_f[0],0, &usr01_13_y[0], 1, &R_P[0], &I_P[0]);/*------------------------------------------------------------*/