#include "__cf_CMFB.h"
#include "rt_logging_mmi.h"
#include "CMFB_capi.h"
#include <math.h>
#include "CMFB.h"
#include "CMFB_private.h"
#include "CMFB_dt.h"
extern void * CreateDiagnosticAsVoidPtr_wrapper ( const char * id , int nargs
, ... ) ; RTWExtModeInfo * gblRTWExtModeInfo = NULL ; extern boolean_T
gblExtModeStartPktReceived ; void raccelForceExtModeShutdown ( ) { if ( !
gblExtModeStartPktReceived ) { boolean_T stopRequested = false ;
rtExtModeWaitForStartPkt ( gblRTWExtModeInfo , 5 , & stopRequested ) ; }
rtExtModeShutdown ( 5 ) ; } const int_T gblNumToFiles = 0 ; const int_T
gblNumFrFiles = 0 ; const int_T gblNumFrWksBlocks = 0 ;
#ifdef RSIM_WITH_SOLVER_MULTITASKING
boolean_T gbl_raccel_isMultitasking = 1 ;
#else
boolean_T gbl_raccel_isMultitasking = 0 ;
#endif
boolean_T gbl_raccel_tid01eq = 0 ; int_T gbl_raccel_NumST = 6 ; const char_T
* gbl_raccel_Version = "8.12 (R2017a) 16-Feb-2017" ; void
raccel_setup_MMIStateLog ( SimStruct * S ) {
#ifdef UseMMIDataLogging
rt_FillStateSigInfoFromMMI ( ssGetRTWLogInfo ( S ) , & ssGetErrorStatus ( S )
) ;
#else
UNUSED_PARAMETER ( S ) ;
#endif
} static DataMapInfo rt_dataMapInfo ; DataMapInfo * rt_dataMapInfoPtr = &
rt_dataMapInfo ; rtwCAPI_ModelMappingInfo * rt_modelMapInfoPtr = & (
rt_dataMapInfo . mmi ) ; const char * gblSlvrJacPatternFileName =
"slprj//raccel//CMFB//CMFB_Jpattern.mat" ; const int_T gblNumRootInportBlks =
0 ; const int_T gblNumModelInputs = 0 ; extern rtInportTUtable *
gblInportTUtables ; extern const char * gblInportFileName ; const int_T
gblInportDataTypeIdx [ ] = { - 1 } ; const int_T gblInportDims [ ] = { - 1 }
; const int_T gblInportComplex [ ] = { - 1 } ; const int_T
gblInportInterpoFlag [ ] = { - 1 } ; const int_T gblInportContinuous [ ] = {
- 1 } ;
#include "simstruc.h"
#include "fixedpoint.h"
B rtB ; X rtX ; MassMatrix rtMassMatrix ; DW rtDW ; PrevZCX rtPrevZCX ; ExtY
rtY ; static SimStruct model_S ; SimStruct * const rtS = & model_S ;
#ifndef __RTW_UTFREE__  
extern void * utMalloc ( size_t ) ;
#endif
void * rt_TDelayCreateBuf ( int_T numBuffer , int_T bufSz , int_T elemSz ) {
return ( ( void * ) utMalloc ( numBuffer * bufSz * elemSz ) ) ; }
#ifndef __RTW_UTFREE__  
extern void * utMalloc ( size_t ) ; extern void utFree ( void * ) ;
#endif
boolean_T rt_TDelayUpdateTailOrGrowBuf ( int_T * bufSzPtr , int_T * tailPtr ,
int_T * headPtr , int_T * lastPtr , real_T tMinusDelay , real_T * * tBufPtr ,
real_T * * uBufPtr , real_T * * xBufPtr , boolean_T isfixedbuf , boolean_T
istransportdelay , int_T * maxNewBufSzPtr ) { int_T testIdx ; int_T tail = *
tailPtr ; int_T bufSz = * bufSzPtr ; real_T * tBuf = * tBufPtr ; real_T *
xBuf = ( NULL ) ; int_T numBuffer = 2 ; if ( istransportdelay ) { numBuffer =
3 ; xBuf = * xBufPtr ; } testIdx = ( tail < ( bufSz - 1 ) ) ? ( tail + 1 ) :
0 ; if ( ( tMinusDelay <= tBuf [ testIdx ] ) && ! isfixedbuf ) { int_T j ;
real_T * tempT ; real_T * tempU ; real_T * tempX = ( NULL ) ; real_T * uBuf =
* uBufPtr ; int_T newBufSz = bufSz + 1024 ; if ( newBufSz > * maxNewBufSzPtr
) { * maxNewBufSzPtr = newBufSz ; } tempU = ( real_T * ) utMalloc ( numBuffer
* newBufSz * sizeof ( real_T ) ) ; if ( tempU == ( NULL ) ) { return ( false
) ; } tempT = tempU + newBufSz ; if ( istransportdelay ) tempX = tempT +
newBufSz ; for ( j = tail ; j < bufSz ; j ++ ) { tempT [ j - tail ] = tBuf [
j ] ; tempU [ j - tail ] = uBuf [ j ] ; if ( istransportdelay ) tempX [ j -
tail ] = xBuf [ j ] ; } for ( j = 0 ; j < tail ; j ++ ) { tempT [ j + bufSz -
tail ] = tBuf [ j ] ; tempU [ j + bufSz - tail ] = uBuf [ j ] ; if (
istransportdelay ) tempX [ j + bufSz - tail ] = xBuf [ j ] ; } if ( * lastPtr
> tail ) { * lastPtr -= tail ; } else { * lastPtr += ( bufSz - tail ) ; } *
tailPtr = 0 ; * headPtr = bufSz ; utFree ( uBuf ) ; * bufSzPtr = newBufSz ; *
tBufPtr = tempT ; * uBufPtr = tempU ; if ( istransportdelay ) * xBufPtr =
tempX ; } else { * tailPtr = testIdx ; } return ( true ) ; } real_T
rt_TDelayInterpolate ( real_T tMinusDelay , real_T tStart , real_T * tBuf ,
real_T * uBuf , int_T bufSz , int_T * lastIdx , int_T oldestIdx , int_T
newIdx , real_T initOutput , boolean_T discrete , boolean_T
minorStepAndTAtLastMajorOutput ) { int_T i ; real_T yout , t1 , t2 , u1 , u2
; if ( ( newIdx == 0 ) && ( oldestIdx == 0 ) && ( tMinusDelay > tStart ) )
return initOutput ; if ( tMinusDelay <= tStart ) return initOutput ; if ( (
tMinusDelay <= tBuf [ oldestIdx ] ) ) { if ( discrete ) { return ( uBuf [
oldestIdx ] ) ; } else { int_T tempIdx = oldestIdx + 1 ; if ( oldestIdx ==
bufSz - 1 ) tempIdx = 0 ; t1 = tBuf [ oldestIdx ] ; t2 = tBuf [ tempIdx ] ;
u1 = uBuf [ oldestIdx ] ; u2 = uBuf [ tempIdx ] ; if ( t2 == t1 ) { if (
tMinusDelay >= t2 ) { yout = u2 ; } else { yout = u1 ; } } else { real_T f1 =
( t2 - tMinusDelay ) / ( t2 - t1 ) ; real_T f2 = 1.0 - f1 ; yout = f1 * u1 +
f2 * u2 ; } return yout ; } } if ( minorStepAndTAtLastMajorOutput ) { if (
newIdx != 0 ) { if ( * lastIdx == newIdx ) { ( * lastIdx ) -- ; } newIdx -- ;
} else { if ( * lastIdx == newIdx ) { * lastIdx = bufSz - 1 ; } newIdx =
bufSz - 1 ; } } i = * lastIdx ; if ( tBuf [ i ] < tMinusDelay ) { while (
tBuf [ i ] < tMinusDelay ) { if ( i == newIdx ) break ; i = ( i < ( bufSz - 1
) ) ? ( i + 1 ) : 0 ; } } else { while ( tBuf [ i ] >= tMinusDelay ) { i = (
i > 0 ) ? i - 1 : ( bufSz - 1 ) ; } i = ( i < ( bufSz - 1 ) ) ? ( i + 1 ) : 0
; } * lastIdx = i ; if ( discrete ) { double tempEps = ( DBL_EPSILON ) *
128.0 ; double localEps = tempEps * muDoubleScalarAbs ( tBuf [ i ] ) ; if (
tempEps > localEps ) { localEps = tempEps ; } localEps = localEps / 2.0 ; if
( tMinusDelay >= ( tBuf [ i ] - localEps ) ) { yout = uBuf [ i ] ; } else {
if ( i == 0 ) { yout = uBuf [ bufSz - 1 ] ; } else { yout = uBuf [ i - 1 ] ;
} } } else { if ( i == 0 ) { t1 = tBuf [ bufSz - 1 ] ; u1 = uBuf [ bufSz - 1
] ; } else { t1 = tBuf [ i - 1 ] ; u1 = uBuf [ i - 1 ] ; } t2 = tBuf [ i ] ;
u2 = uBuf [ i ] ; if ( t2 == t1 ) { if ( tMinusDelay >= t2 ) { yout = u2 ; }
else { yout = u1 ; } } else { real_T f1 = ( t2 - tMinusDelay ) / ( t2 - t1 )
; real_T f2 = 1.0 - f1 ; yout = f1 * u1 + f2 * u2 ; } } return ( yout ) ; }
#ifndef __RTW_UTFREE__  
extern void utFree ( void * ) ;
#endif
void rt_TDelayFreeBuf ( void * buf ) { utFree ( buf ) ; } real_T
rt_urand_Upu32_Yd_f_pw_snf ( uint32_T * u ) { uint32_T lo ; uint32_T hi ; lo
= * u % 127773U * 16807U ; hi = * u / 127773U * 2836U ; if ( lo < hi ) { * u
= 2147483647U - ( hi - lo ) ; } else { * u = lo - hi ; } return ( real_T ) *
u * 4.6566128752457969E-10 ; } real_T rt_nrand_Upu32_Yd_f_pw_snf ( uint32_T *
u ) { real_T y ; real_T sr ; real_T si ; do { sr = 2.0 *
rt_urand_Upu32_Yd_f_pw_snf ( u ) - 1.0 ; si = 2.0 *
rt_urand_Upu32_Yd_f_pw_snf ( u ) - 1.0 ; si = sr * sr + si * si ; } while (
si > 1.0 ) ; y = muDoubleScalarSqrt ( - 2.0 * muDoubleScalarLog ( si ) / si )
* sr ; return y ; } void MdlInitialize ( void ) { boolean_T tmp ; char *
tmp_p ; uint32_T tseed ; int32_T t ; int32_T i ; real_T tmp_e ; tmp = false ;
if ( tmp ) { i = strcmp ( "ode23t" , ssGetSolverName ( rtS ) ) ; if ( i != 0
) { tmp_p = solver_mismatch_message ( "ode23t" , ssGetSolverName ( rtS ) ) ;
ssSetErrorStatus ( rtS , tmp_p ) ; } } tmp_e = muDoubleScalarFloor ( rtP .
RandomVision_Seed ) ; if ( muDoubleScalarIsNaN ( tmp_e ) ||
muDoubleScalarIsInf ( tmp_e ) ) { tmp_e = 0.0 ; } else { tmp_e =
muDoubleScalarRem ( tmp_e , 4.294967296E+9 ) ; } tseed = tmp_e < 0.0 ? (
uint32_T ) - ( int32_T ) ( uint32_T ) - tmp_e : ( uint32_T ) tmp_e ; i = (
int32_T ) ( tseed >> 16U ) ; t = ( int32_T ) ( tseed & 32768U ) ; tseed = ( (
( ( tseed - ( ( uint32_T ) i << 16U ) ) + t ) << 16U ) + t ) + i ; if ( tseed
< 1U ) { tseed = 1144108930U ; } else { if ( tseed > 2147483646U ) { tseed =
2147483646U ; } } rtDW . gleto30nrn = tseed ; rtDW . etqfqz3gyg =
rt_nrand_Upu32_Yd_f_pw_snf ( & rtDW . gleto30nrn ) * muDoubleScalarSqrt ( rtP
. vision_delay_variance ) + rtP . vision_delay_mean ; rtDW . bw3zazxffe = rtP
. Memory_X0 ; tmp_e = muDoubleScalarFloor ( rtP . RandomAudition_Seed ) ; if
( muDoubleScalarIsNaN ( tmp_e ) || muDoubleScalarIsInf ( tmp_e ) ) { tmp_e =
0.0 ; } else { tmp_e = muDoubleScalarRem ( tmp_e , 4.294967296E+9 ) ; } tseed
= tmp_e < 0.0 ? ( uint32_T ) - ( int32_T ) ( uint32_T ) - tmp_e : ( uint32_T
) tmp_e ; i = ( int32_T ) ( tseed >> 16U ) ; t = ( int32_T ) ( tseed & 32768U
) ; tseed = ( ( ( ( tseed - ( ( uint32_T ) i << 16U ) ) + t ) << 16U ) + t )
+ i ; if ( tseed < 1U ) { tseed = 1144108930U ; } else { if ( tseed >
2147483646U ) { tseed = 2147483646U ; } } rtDW . fjaw1ltyga = tseed ; rtDW .
dhtuvbjzws = rt_nrand_Upu32_Yd_f_pw_snf ( & rtDW . fjaw1ltyga ) *
muDoubleScalarSqrt ( rtP . audition_delay_variance ) + rtP .
audition_delay_mean ; rtDW . dmwj50x0ph = rtP . Memory1_X0 ; tmp_e =
muDoubleScalarFloor ( rtP . RandomTactition_Seed ) ; if ( muDoubleScalarIsNaN
( tmp_e ) || muDoubleScalarIsInf ( tmp_e ) ) { tmp_e = 0.0 ; } else { tmp_e =
muDoubleScalarRem ( tmp_e , 4.294967296E+9 ) ; } tseed = tmp_e < 0.0 ? (
uint32_T ) - ( int32_T ) ( uint32_T ) - tmp_e : ( uint32_T ) tmp_e ; i = (
int32_T ) ( tseed >> 16U ) ; t = ( int32_T ) ( tseed & 32768U ) ; tseed = ( (
( ( tseed - ( ( uint32_T ) i << 16U ) ) + t ) << 16U ) + t ) + i ; if ( tseed
< 1U ) { tseed = 1144108930U ; } else { if ( tseed > 2147483646U ) { tseed =
2147483646U ; } } rtDW . pu0jjhcotu = tseed ; rtDW . hyrr0kb32e =
rt_nrand_Upu32_Yd_f_pw_snf ( & rtDW . pu0jjhcotu ) * muDoubleScalarSqrt ( rtP
. tactition_delay_variance ) + rtP . tactition_delay_mean ; rtDW . d3tsxxr25j
= rtP . Memory2_X0 ; tmp = false ; if ( tmp ) { i = strcmp ( "ode23t" ,
ssGetSolverName ( rtS ) ) ; if ( i != 0 ) { tmp_p = solver_mismatch_message (
"ode23t" , ssGetSolverName ( rtS ) ) ; ssSetErrorStatus ( rtS , tmp_p ) ; } }
rtDW . n1yz4tjnws = rtP . Memory_X0_bd0seodo2d ; for ( i = 0 ; i < 6 ; i ++ )
{ rtB . gi0tajlidf [ i ] = rtP . Merge_InitialOutput ; } rtB . phlju0ch3w [ 0
] = rtP . Merge1_InitialOutput ; rtB . phlju0ch3w [ 1 ] = rtP .
Merge1_InitialOutput ; { static int_T modelMassMatrixIr [ 13 ] = { 0 , 1 , 2
, 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 , 11 , 12 } ; static int_T modelMassMatrixJc
[ 14 ] = { 0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 , 11 , 12 , 13 } ;
static real_T modelMassMatrixPr [ 13 ] = { 1.0 , 1.0 , 1.0 , 1.0 , 1.0 , 1.0
, 1.0 , 1.0 , 1.0 , 1.0 , 1.0 , 1.0 , 1.0 } ; ( void ) memcpy ( rtMassMatrix
. ir , modelMassMatrixIr , 13 * sizeof ( int_T ) ) ; ( void ) memcpy (
rtMassMatrix . jc , modelMassMatrixJc , 14 * sizeof ( int_T ) ) ; ( void )
memcpy ( rtMassMatrix . pr , modelMassMatrixPr , 13 * sizeof ( real_T ) ) ; }
} void MdlEnable ( void ) { rtDW . kuveq4zuwp = 1 ; _ssSetSampleHit ( rtS , 3
, 1 ) ; _ssSetTaskTime ( rtS , 3 , ssGetT ( rtS ) ) ; _ssSetVarNextHitTime (
rtS , 0 , ssGetT ( rtS ) ) ; ; rtDW . c12tpuo23h = 1 ; _ssSetSampleHit ( rtS
, 4 , 1 ) ; _ssSetTaskTime ( rtS , 4 , ssGetT ( rtS ) ) ;
_ssSetVarNextHitTime ( rtS , 1 , ssGetT ( rtS ) ) ; ; } void MdlStart ( void
) { NeuDiagnosticManager * diagnosticManager ; real_T
modelParameters_mSolverTolerance ; real_T modelParameters_mFixedStepSize ;
boolean_T modelParameters_mVariableStepSolver ; NeslSimulator * simulator ;
NeuDiagnosticTree * diagnosticTree ; int32_T tmp ; char * msg ;
NeslSimulationData * simulationData ; real_T time ; real_T time_p ; real_T
time_e ; real_T time_i ; real_T time_m ; real_T time_g ; NeModelParameters
expl_temp ; NeParameterBundle expl_temp_p ; NeModelParameters expl_temp_e ;
NeModelParameters expl_temp_i ; NeParameterBundle expl_temp_m ;
NeModelParameters expl_temp_g ; NeModelParameters expl_temp_j ;
NeModelParameters expl_temp_f ; NeParameterBundle expl_temp_c ; { void * *
slioCatalogueAddr = rt_slioCatalogueAddr ( ) ; void * r2 = ( NULL ) ; void *
* pOSigstreamManagerAddr = ( NULL ) ; const char *
errorCreatingOSigstreamManager = ( NULL ) ; const char *
errorAddingR2SharedResource = ( NULL ) ; * slioCatalogueAddr =
rtwGetNewSlioCatalogue ( rt_GetMatSigLogSelectorFileName ( ) ) ;
errorAddingR2SharedResource = rtwAddR2SharedResource (
rtwGetPointerFromUniquePtr ( rt_slioCatalogue ( ) ) , 1 ) ; if (
errorAddingR2SharedResource != ( NULL ) ) { rtwTerminateSlioCatalogue (
slioCatalogueAddr ) ; * slioCatalogueAddr = ( NULL ) ; ssSetErrorStatus ( rtS
, errorAddingR2SharedResource ) ; return ; } r2 = rtwGetR2SharedResource (
rtwGetPointerFromUniquePtr ( rt_slioCatalogue ( ) ) ) ;
pOSigstreamManagerAddr = rt_GetOSigstreamManagerAddr ( ) ;
errorCreatingOSigstreamManager = rtwOSigstreamManagerCreateInstance (
rt_GetMatSigLogSelectorFileName ( ) , r2 , pOSigstreamManagerAddr ) ; if (
errorCreatingOSigstreamManager != ( NULL ) ) { * pOSigstreamManagerAddr = (
NULL ) ; ssSetErrorStatus ( rtS , errorCreatingOSigstreamManager ) ; return ;
} } simulator = nesl_lease_simulator (
"CMFB/Muscle-Finger-Button-Event/Solver Configuration_2" , 0 , 0 ) ; rtDW .
ofhkw1fpiv = ( void * ) simulator ; modelParameters_mVariableStepSolver =
pointer_is_null ( rtDW . ofhkw1fpiv ) ; if (
modelParameters_mVariableStepSolver ) { CMFB_cde73719_2_gateway ( ) ;
simulator = nesl_lease_simulator (
"CMFB/Muscle-Finger-Button-Event/Solver Configuration_2" , 0 , 0 ) ; rtDW .
ofhkw1fpiv = ( void * ) simulator ; } simulationData =
nesl_create_simulation_data ( ) ; rtDW . am02jbgyuo = ( void * )
simulationData ; diagnosticManager = rtw_create_diagnostics ( ) ; rtDW .
gz11pk43kf = ( void * ) diagnosticManager ; modelParameters_mSolverTolerance
= 0.001 ; modelParameters_mFixedStepSize = 0.0 ;
modelParameters_mVariableStepSolver = true ; simulator = ( NeslSimulator * )
rtDW . ofhkw1fpiv ; diagnosticManager = ( NeuDiagnosticManager * ) rtDW .
gz11pk43kf ; diagnosticTree = neu_diagnostic_manager_get_initial_tree (
diagnosticManager ) ; expl_temp . mVariableStepSolver =
modelParameters_mVariableStepSolver ; expl_temp . mUseSimState = false ;
expl_temp . mStartTime = 0.0 ; expl_temp . mSolverType = NE_SOLVER_TYPE_DAE ;
expl_temp . mSolverTolerance = modelParameters_mSolverTolerance ; expl_temp .
mRTWModifiedTimeStamp = 4.19093061E+8 ; expl_temp . mLoggingMode =
SSC_LOGGING_NONE ; expl_temp . mLoadInitialState = false ; expl_temp .
mLinTrimCompile = false ; expl_temp . mFixedStepSize =
modelParameters_mFixedStepSize ; tmp = nesl_initialize_simulator ( simulator
, expl_temp , diagnosticManager ) ; if ( tmp != 0 ) {
modelParameters_mVariableStepSolver = error_buffer_is_empty (
ssGetErrorStatus ( rtS ) ) ; if ( modelParameters_mVariableStepSolver ) { msg
= rtw_diagnostics_msg ( diagnosticTree ) ; ssSetErrorStatus ( rtS , msg ) ; }
} expl_temp_p . mRealParameters . mN = 0 ; expl_temp_p . mRealParameters . mX
= NULL ; expl_temp_p . mLogicalParameters . mN = 0 ; expl_temp_p .
mLogicalParameters . mX = NULL ; expl_temp_p . mIntegerParameters . mN = 0 ;
expl_temp_p . mIntegerParameters . mX = NULL ; expl_temp_p . mIndexParameters
. mN = 0 ; expl_temp_p . mIndexParameters . mX = NULL ;
nesl_simulator_set_rtps ( ( NeslSimulator * ) rtDW . ofhkw1fpiv , expl_temp_p
) ; simulationData = ( NeslSimulationData * ) rtDW . am02jbgyuo ; time =
ssGetT ( rtS ) ; simulationData -> mData -> mTime . mN = 1 ; simulationData
-> mData -> mTime . mX = & time ; simulationData -> mData -> mContStates . mN
= 1 ; simulationData -> mData -> mContStates . mX = & rtX . ehudnxzvyt ;
simulationData -> mData -> mDiscStates . mN = 0 ; simulationData -> mData ->
mDiscStates . mX = NULL ; simulationData -> mData -> mModeVector . mN = 1 ;
simulationData -> mData -> mModeVector . mX = & rtDW . gimqkbf2sb ;
modelParameters_mVariableStepSolver = ( ssIsMajorTimeStep ( rtS ) &&
ssGetRTWSolverInfo ( rtS ) -> foundContZcEvents ) ; simulationData -> mData
-> mFoundZcEvents = modelParameters_mVariableStepSolver ; simulationData ->
mData -> mIsMajorTimeStep = ssIsMajorTimeStep ( rtS ) ;
modelParameters_mVariableStepSolver = ( ssGetMdlInfoPtr ( rtS ) -> mdlFlags .
solverAssertCheck == 1U ) ; simulationData -> mData -> mIsSolverAssertCheck =
modelParameters_mVariableStepSolver ; modelParameters_mVariableStepSolver =
ssIsSolverCheckingCIC ( rtS ) ; simulationData -> mData ->
mIsSolverCheckingCIC = modelParameters_mVariableStepSolver ;
modelParameters_mVariableStepSolver = ssIsSolverComputingJacobian ( rtS ) ;
simulationData -> mData -> mIsComputingJacobian =
modelParameters_mVariableStepSolver ; simulationData -> mData ->
mIsEvaluatingF0 = ( ssGetEvaluatingF0ForJacobian ( rtS ) != 0 ) ;
modelParameters_mVariableStepSolver = ssIsSolverRequestingReset ( rtS ) ;
simulationData -> mData -> mIsSolverRequestingReset =
modelParameters_mVariableStepSolver ; simulator = ( NeslSimulator * ) rtDW .
ofhkw1fpiv ; diagnosticManager = ( NeuDiagnosticManager * ) rtDW . gz11pk43kf
; diagnosticTree = neu_diagnostic_manager_get_initial_tree (
diagnosticManager ) ; tmp = ne_simulator_method ( simulator ,
NESL_SIM_INITIALIZEONCE , simulationData , diagnosticManager ) ; if ( tmp !=
0 ) { modelParameters_mVariableStepSolver = error_buffer_is_empty (
ssGetErrorStatus ( rtS ) ) ; if ( modelParameters_mVariableStepSolver ) { msg
= rtw_diagnostics_msg ( diagnosticTree ) ; ssSetErrorStatus ( rtS , msg ) ; }
} simulator = nesl_lease_simulator (
"CMFB/Muscle-Finger-Button-Event/Solver Configuration_2" , 2 , 0 ) ; rtDW .
knbm3jrdjc = ( void * ) simulator ; modelParameters_mVariableStepSolver =
pointer_is_null ( rtDW . knbm3jrdjc ) ; if (
modelParameters_mVariableStepSolver ) { CMFB_cde73719_2_gateway ( ) ;
simulator = nesl_lease_simulator (
"CMFB/Muscle-Finger-Button-Event/Solver Configuration_2" , 2 , 0 ) ; rtDW .
knbm3jrdjc = ( void * ) simulator ; } simulationData =
nesl_create_simulation_data ( ) ; rtDW . eoputmkb5y = ( void * )
simulationData ; diagnosticManager = rtw_create_diagnostics ( ) ; rtDW .
otakt00evh = ( void * ) diagnosticManager ; modelParameters_mSolverTolerance
= 0.001 ; modelParameters_mFixedStepSize = 0.0 ;
modelParameters_mVariableStepSolver = true ; simulator = ( NeslSimulator * )
rtDW . knbm3jrdjc ; diagnosticManager = ( NeuDiagnosticManager * ) rtDW .
otakt00evh ; diagnosticTree = neu_diagnostic_manager_get_initial_tree (
diagnosticManager ) ; expl_temp_e . mVariableStepSolver =
modelParameters_mVariableStepSolver ; expl_temp_e . mUseSimState = false ;
expl_temp_e . mStartTime = 0.0 ; expl_temp_e . mSolverType =
NE_SOLVER_TYPE_DAE ; expl_temp_e . mSolverTolerance =
modelParameters_mSolverTolerance ; expl_temp_e . mRTWModifiedTimeStamp =
4.19093061E+8 ; expl_temp_e . mLoggingMode = SSC_LOGGING_NONE ; expl_temp_e .
mLoadInitialState = false ; expl_temp_e . mLinTrimCompile = false ;
expl_temp_e . mFixedStepSize = modelParameters_mFixedStepSize ; tmp =
nesl_initialize_simulator ( simulator , expl_temp_e , diagnosticManager ) ;
if ( tmp != 0 ) { modelParameters_mVariableStepSolver = error_buffer_is_empty
( ssGetErrorStatus ( rtS ) ) ; if ( modelParameters_mVariableStepSolver ) {
msg = rtw_diagnostics_msg ( diagnosticTree ) ; ssSetErrorStatus ( rtS , msg )
; } } simulationData = ( NeslSimulationData * ) rtDW . eoputmkb5y ; time_p =
ssGetT ( rtS ) ; simulationData -> mData -> mTime . mN = 1 ; simulationData
-> mData -> mTime . mX = & time_p ; simulationData -> mData -> mContStates .
mN = 0 ; simulationData -> mData -> mContStates . mX = NULL ; simulationData
-> mData -> mDiscStates . mN = 0 ; simulationData -> mData -> mDiscStates .
mX = NULL ; simulationData -> mData -> mModeVector . mN = 0 ; simulationData
-> mData -> mModeVector . mX = NULL ; modelParameters_mVariableStepSolver = (
ssIsMajorTimeStep ( rtS ) && ssGetRTWSolverInfo ( rtS ) -> foundContZcEvents
) ; simulationData -> mData -> mFoundZcEvents =
modelParameters_mVariableStepSolver ; simulationData -> mData ->
mIsMajorTimeStep = ssIsMajorTimeStep ( rtS ) ;
modelParameters_mVariableStepSolver = ( ssGetMdlInfoPtr ( rtS ) -> mdlFlags .
solverAssertCheck == 1U ) ; simulationData -> mData -> mIsSolverAssertCheck =
modelParameters_mVariableStepSolver ; modelParameters_mVariableStepSolver =
ssIsSolverCheckingCIC ( rtS ) ; simulationData -> mData ->
mIsSolverCheckingCIC = modelParameters_mVariableStepSolver ; simulationData
-> mData -> mIsComputingJacobian = false ; simulationData -> mData ->
mIsEvaluatingF0 = false ; modelParameters_mVariableStepSolver =
ssIsSolverRequestingReset ( rtS ) ; simulationData -> mData ->
mIsSolverRequestingReset = modelParameters_mVariableStepSolver ; simulator =
( NeslSimulator * ) rtDW . knbm3jrdjc ; diagnosticManager = (
NeuDiagnosticManager * ) rtDW . otakt00evh ; diagnosticTree =
neu_diagnostic_manager_get_initial_tree ( diagnosticManager ) ; tmp =
ne_simulator_method ( simulator , NESL_SIM_INITIALIZEONCE , simulationData ,
diagnosticManager ) ; if ( tmp != 0 ) { modelParameters_mVariableStepSolver =
error_buffer_is_empty ( ssGetErrorStatus ( rtS ) ) ; if (
modelParameters_mVariableStepSolver ) { msg = rtw_diagnostics_msg (
diagnosticTree ) ; ssSetErrorStatus ( rtS , msg ) ; } } { int_T j ; { real_T
* pBuffer = ( real_T * ) rt_TDelayCreateBuf ( 2 , 1024 , sizeof ( real_T ) )
; if ( pBuffer == ( NULL ) ) { ssSetErrorStatus ( rtS ,
"vtdelay memory allocation error" ) ; return ; } rtDW . ghetnz132f . Tail = 0
; rtDW . ghetnz132f . Head = 0 ; rtDW . ghetnz132f . Last = 0 ; rtDW .
ghetnz132f . CircularBufSize = 1024 ; for ( j = 0 ; j < 1024 ; j ++ ) {
pBuffer [ j ] = rtP . VariableTimeDelay_InitOutput ; pBuffer [ 1024 + j ] =
ssGetT ( rtS ) ; } rtDW . mvtc05kxt0 . TUbufferPtrs [ 0 ] = ( void * ) &
pBuffer [ 0 ] ; rtDW . mvtc05kxt0 . TUbufferPtrs [ 1 ] = ( void * ) & pBuffer
[ 1024 ] ; } } { int_T j ; { real_T * pBuffer = ( real_T * )
rt_TDelayCreateBuf ( 2 , 1024 , sizeof ( real_T ) ) ; if ( pBuffer == ( NULL
) ) { ssSetErrorStatus ( rtS , "vtdelay memory allocation error" ) ; return ;
} rtDW . mzs2owwteo . Tail = 0 ; rtDW . mzs2owwteo . Head = 0 ; rtDW .
mzs2owwteo . Last = 0 ; rtDW . mzs2owwteo . CircularBufSize = 1024 ; for ( j
= 0 ; j < 1024 ; j ++ ) { pBuffer [ j ] = rtP . VariableTimeDelay1_InitOutput
; pBuffer [ 1024 + j ] = ssGetT ( rtS ) ; } rtDW . fe531iiqaq . TUbufferPtrs
[ 0 ] = ( void * ) & pBuffer [ 0 ] ; rtDW . fe531iiqaq . TUbufferPtrs [ 1 ] =
( void * ) & pBuffer [ 1024 ] ; } } { int_T j ; { real_T * pBuffer = ( real_T
* ) rt_TDelayCreateBuf ( 2 , 1024 , sizeof ( real_T ) ) ; if ( pBuffer == (
NULL ) ) { ssSetErrorStatus ( rtS , "vtdelay memory allocation error" ) ;
return ; } rtDW . njcfvqswzg . Tail = 0 ; rtDW . njcfvqswzg . Head = 0 ; rtDW
. njcfvqswzg . Last = 0 ; rtDW . njcfvqswzg . CircularBufSize = 1024 ; for (
j = 0 ; j < 1024 ; j ++ ) { pBuffer [ j ] = rtP .
VariableTimeDelay2_InitOutput ; pBuffer [ 1024 + j ] = ssGetT ( rtS ) ; }
rtDW . g3fwyfyuwt . TUbufferPtrs [ 0 ] = ( void * ) & pBuffer [ 0 ] ; rtDW .
g3fwyfyuwt . TUbufferPtrs [ 1 ] = ( void * ) & pBuffer [ 1024 ] ; } }
simulator = nesl_lease_simulator (
"CMFB/Muscle-Finger-Button-Event/Solver Configuration_3" , 0 , 0 ) ; rtDW .
ep1wb3gqvb = ( void * ) simulator ; modelParameters_mVariableStepSolver =
pointer_is_null ( rtDW . ep1wb3gqvb ) ; if (
modelParameters_mVariableStepSolver ) { CMFB_cde73719_3_gateway ( ) ;
simulator = nesl_lease_simulator (
"CMFB/Muscle-Finger-Button-Event/Solver Configuration_3" , 0 , 0 ) ; rtDW .
ep1wb3gqvb = ( void * ) simulator ; } simulationData =
nesl_create_simulation_data ( ) ; rtDW . k5nthuztl1 = ( void * )
simulationData ; diagnosticManager = rtw_create_diagnostics ( ) ; rtDW .
b4v4mhacua = ( void * ) diagnosticManager ; modelParameters_mSolverTolerance
= 0.001 ; modelParameters_mFixedStepSize = 0.0 ;
modelParameters_mVariableStepSolver = true ; simulator = ( NeslSimulator * )
rtDW . ep1wb3gqvb ; diagnosticManager = ( NeuDiagnosticManager * ) rtDW .
b4v4mhacua ; diagnosticTree = neu_diagnostic_manager_get_initial_tree (
diagnosticManager ) ; expl_temp_i . mVariableStepSolver =
modelParameters_mVariableStepSolver ; expl_temp_i . mUseSimState = false ;
expl_temp_i . mStartTime = 0.0 ; expl_temp_i . mSolverType =
NE_SOLVER_TYPE_DAE ; expl_temp_i . mSolverTolerance =
modelParameters_mSolverTolerance ; expl_temp_i . mRTWModifiedTimeStamp =
4.19093061E+8 ; expl_temp_i . mLoggingMode = SSC_LOGGING_NONE ; expl_temp_i .
mLoadInitialState = false ; expl_temp_i . mLinTrimCompile = false ;
expl_temp_i . mFixedStepSize = modelParameters_mFixedStepSize ; tmp =
nesl_initialize_simulator ( simulator , expl_temp_i , diagnosticManager ) ;
if ( tmp != 0 ) { modelParameters_mVariableStepSolver = error_buffer_is_empty
( ssGetErrorStatus ( rtS ) ) ; if ( modelParameters_mVariableStepSolver ) {
msg = rtw_diagnostics_msg ( diagnosticTree ) ; ssSetErrorStatus ( rtS , msg )
; } } expl_temp_m . mRealParameters . mN = 0 ; expl_temp_m . mRealParameters
. mX = NULL ; expl_temp_m . mLogicalParameters . mN = 0 ; expl_temp_m .
mLogicalParameters . mX = NULL ; expl_temp_m . mIntegerParameters . mN = 0 ;
expl_temp_m . mIntegerParameters . mX = NULL ; expl_temp_m . mIndexParameters
. mN = 0 ; expl_temp_m . mIndexParameters . mX = NULL ;
nesl_simulator_set_rtps ( ( NeslSimulator * ) rtDW . ep1wb3gqvb , expl_temp_m
) ; simulationData = ( NeslSimulationData * ) rtDW . k5nthuztl1 ; time_e =
ssGetT ( rtS ) ; simulationData -> mData -> mTime . mN = 1 ; simulationData
-> mData -> mTime . mX = & time_e ; simulationData -> mData -> mContStates .
mN = 12 ; simulationData -> mData -> mContStates . mX = ( real_T * ) & rtX .
pc4fzp1l4b ; simulationData -> mData -> mDiscStates . mN = 0 ; simulationData
-> mData -> mDiscStates . mX = NULL ; simulationData -> mData -> mModeVector
. mN = 0 ; simulationData -> mData -> mModeVector . mX = NULL ;
modelParameters_mVariableStepSolver = ( ssIsMajorTimeStep ( rtS ) &&
ssGetRTWSolverInfo ( rtS ) -> foundContZcEvents ) ; simulationData -> mData
-> mFoundZcEvents = modelParameters_mVariableStepSolver ; simulationData ->
mData -> mIsMajorTimeStep = ssIsMajorTimeStep ( rtS ) ;
modelParameters_mVariableStepSolver = ( ssGetMdlInfoPtr ( rtS ) -> mdlFlags .
solverAssertCheck == 1U ) ; simulationData -> mData -> mIsSolverAssertCheck =
modelParameters_mVariableStepSolver ; modelParameters_mVariableStepSolver =
ssIsSolverCheckingCIC ( rtS ) ; simulationData -> mData ->
mIsSolverCheckingCIC = modelParameters_mVariableStepSolver ;
modelParameters_mVariableStepSolver = ssIsSolverComputingJacobian ( rtS ) ;
simulationData -> mData -> mIsComputingJacobian =
modelParameters_mVariableStepSolver ; simulationData -> mData ->
mIsEvaluatingF0 = ( ssGetEvaluatingF0ForJacobian ( rtS ) != 0 ) ;
modelParameters_mVariableStepSolver = ssIsSolverRequestingReset ( rtS ) ;
simulationData -> mData -> mIsSolverRequestingReset =
modelParameters_mVariableStepSolver ; simulator = ( NeslSimulator * ) rtDW .
ep1wb3gqvb ; diagnosticManager = ( NeuDiagnosticManager * ) rtDW . b4v4mhacua
; diagnosticTree = neu_diagnostic_manager_get_initial_tree (
diagnosticManager ) ; tmp = ne_simulator_method ( simulator ,
NESL_SIM_INITIALIZEONCE , simulationData , diagnosticManager ) ; if ( tmp !=
0 ) { modelParameters_mVariableStepSolver = error_buffer_is_empty (
ssGetErrorStatus ( rtS ) ) ; if ( modelParameters_mVariableStepSolver ) { msg
= rtw_diagnostics_msg ( diagnosticTree ) ; ssSetErrorStatus ( rtS , msg ) ; }
} simulator = nesl_lease_simulator (
"CMFB/Muscle-Finger-Button-Event/Solver Configuration_3" , 2 , 0 ) ; rtDW .
mnbjkabvjc = ( void * ) simulator ; modelParameters_mVariableStepSolver =
pointer_is_null ( rtDW . mnbjkabvjc ) ; if (
modelParameters_mVariableStepSolver ) { CMFB_cde73719_3_gateway ( ) ;
simulator = nesl_lease_simulator (
"CMFB/Muscle-Finger-Button-Event/Solver Configuration_3" , 2 , 0 ) ; rtDW .
mnbjkabvjc = ( void * ) simulator ; } simulationData =
nesl_create_simulation_data ( ) ; rtDW . kajpu01vmz = ( void * )
simulationData ; diagnosticManager = rtw_create_diagnostics ( ) ; rtDW .
ez0yeisdgv = ( void * ) diagnosticManager ; modelParameters_mSolverTolerance
= 0.001 ; modelParameters_mFixedStepSize = 0.0 ;
modelParameters_mVariableStepSolver = true ; simulator = ( NeslSimulator * )
rtDW . mnbjkabvjc ; diagnosticManager = ( NeuDiagnosticManager * ) rtDW .
ez0yeisdgv ; diagnosticTree = neu_diagnostic_manager_get_initial_tree (
diagnosticManager ) ; expl_temp_g . mVariableStepSolver =
modelParameters_mVariableStepSolver ; expl_temp_g . mUseSimState = false ;
expl_temp_g . mStartTime = 0.0 ; expl_temp_g . mSolverType =
NE_SOLVER_TYPE_DAE ; expl_temp_g . mSolverTolerance =
modelParameters_mSolverTolerance ; expl_temp_g . mRTWModifiedTimeStamp =
4.19093061E+8 ; expl_temp_g . mLoggingMode = SSC_LOGGING_NONE ; expl_temp_g .
mLoadInitialState = false ; expl_temp_g . mLinTrimCompile = false ;
expl_temp_g . mFixedStepSize = modelParameters_mFixedStepSize ; tmp =
nesl_initialize_simulator ( simulator , expl_temp_g , diagnosticManager ) ;
if ( tmp != 0 ) { modelParameters_mVariableStepSolver = error_buffer_is_empty
( ssGetErrorStatus ( rtS ) ) ; if ( modelParameters_mVariableStepSolver ) {
msg = rtw_diagnostics_msg ( diagnosticTree ) ; ssSetErrorStatus ( rtS , msg )
; } } simulationData = ( NeslSimulationData * ) rtDW . kajpu01vmz ; time_i =
ssGetT ( rtS ) ; simulationData -> mData -> mTime . mN = 1 ; simulationData
-> mData -> mTime . mX = & time_i ; simulationData -> mData -> mContStates .
mN = 0 ; simulationData -> mData -> mContStates . mX = NULL ; simulationData
-> mData -> mDiscStates . mN = 0 ; simulationData -> mData -> mDiscStates .
mX = NULL ; simulationData -> mData -> mModeVector . mN = 0 ; simulationData
-> mData -> mModeVector . mX = NULL ; modelParameters_mVariableStepSolver = (
ssIsMajorTimeStep ( rtS ) && ssGetRTWSolverInfo ( rtS ) -> foundContZcEvents
) ; simulationData -> mData -> mFoundZcEvents =
modelParameters_mVariableStepSolver ; simulationData -> mData ->
mIsMajorTimeStep = ssIsMajorTimeStep ( rtS ) ;
modelParameters_mVariableStepSolver = ( ssGetMdlInfoPtr ( rtS ) -> mdlFlags .
solverAssertCheck == 1U ) ; simulationData -> mData -> mIsSolverAssertCheck =
modelParameters_mVariableStepSolver ; modelParameters_mVariableStepSolver =
ssIsSolverCheckingCIC ( rtS ) ; simulationData -> mData ->
mIsSolverCheckingCIC = modelParameters_mVariableStepSolver ; simulationData
-> mData -> mIsComputingJacobian = false ; simulationData -> mData ->
mIsEvaluatingF0 = false ; modelParameters_mVariableStepSolver =
ssIsSolverRequestingReset ( rtS ) ; simulationData -> mData ->
mIsSolverRequestingReset = modelParameters_mVariableStepSolver ; simulator =
( NeslSimulator * ) rtDW . mnbjkabvjc ; diagnosticManager = (
NeuDiagnosticManager * ) rtDW . ez0yeisdgv ; diagnosticTree =
neu_diagnostic_manager_get_initial_tree ( diagnosticManager ) ; tmp =
ne_simulator_method ( simulator , NESL_SIM_INITIALIZEONCE , simulationData ,
diagnosticManager ) ; if ( tmp != 0 ) { modelParameters_mVariableStepSolver =
error_buffer_is_empty ( ssGetErrorStatus ( rtS ) ) ; if (
modelParameters_mVariableStepSolver ) { msg = rtw_diagnostics_msg (
diagnosticTree ) ; ssSetErrorStatus ( rtS , msg ) ; } } if (
rt_GetOSigstreamManager ( ) != ( NULL ) ) { { void * pAobHierarchyNode0 = (
NULL ) ; { char * pathToTopModel = "" ; void * pSignalProbeCollection = (
NULL ) ; void * pOSigstreamManager = ( NULL ) ; uint_T signalDimensions0 [ 1
] = { 1 } ; rtwAobHierarchyCreateRootNode ( & pAobHierarchyNode0 ) ;
rtwAobHierarchyVerifyNNodes ( pAobHierarchyNode0 , 1 ) ; pOSigstreamManager =
rt_GetOSigstreamManager ( ) ; rtwSignalProbeCollectionCreateInstance (
"DATASET_OUTPORT_LOGGING" , "tmp_raccel_logsout" , "" , "" , pathToTopModel ,
"CMFB/Visual event perception" , 1 , pOSigstreamManager , &
pSignalProbeCollection ) ; rtwSignalProbeCollectionAddElement (
pSignalProbeCollection , "" , "linear" , 1 , 0 , 1 , signalDimensions0 , 0 ,
"" , "double" , "" ) ; rtwSignalProbeCollectionVerifyNLeaves (
pSignalProbeCollection , 1 ) ; rtwSignalProbeCollectionSetAobHierarchy (
pSignalProbeCollection , pAobHierarchyNode0 ) ;
rtwSignalProbeCollectionFinalizeMetaData ( pSignalProbeCollection ) ; rtDW .
cofxnn2uuf . SignalProbe = pSignalProbeCollection ; } } } if (
rt_GetOSigstreamManager ( ) != ( NULL ) ) { { void * pAobHierarchyNode0 = (
NULL ) ; { char * pathToTopModel = "" ; void * pSignalProbeCollection = (
NULL ) ; void * pOSigstreamManager = ( NULL ) ; uint_T signalDimensions0 [ 1
] = { 1 } ; rtwAobHierarchyCreateRootNode ( & pAobHierarchyNode0 ) ;
rtwAobHierarchyVerifyNNodes ( pAobHierarchyNode0 , 1 ) ; pOSigstreamManager =
rt_GetOSigstreamManager ( ) ; rtwSignalProbeCollectionCreateInstance (
"DATASET_OUTPORT_LOGGING" , "tmp_raccel_logsout" , "" , "" , pathToTopModel ,
"CMFB/Audio event perception" , 2 , pOSigstreamManager , &
pSignalProbeCollection ) ; rtwSignalProbeCollectionAddElement (
pSignalProbeCollection , "" , "linear" , 1 , 0 , 1 , signalDimensions0 , 0 ,
"" , "double" , "" ) ; rtwSignalProbeCollectionVerifyNLeaves (
pSignalProbeCollection , 1 ) ; rtwSignalProbeCollectionSetAobHierarchy (
pSignalProbeCollection , pAobHierarchyNode0 ) ;
rtwSignalProbeCollectionFinalizeMetaData ( pSignalProbeCollection ) ; rtDW .
mpcwpukrok . SignalProbe = pSignalProbeCollection ; } } } if (
rt_GetOSigstreamManager ( ) != ( NULL ) ) { { void * pAobHierarchyNode0 = (
NULL ) ; { char * pathToTopModel = "" ; void * pSignalProbeCollection = (
NULL ) ; void * pOSigstreamManager = ( NULL ) ; uint_T signalDimensions0 [ 1
] = { 1 } ; rtwAobHierarchyCreateRootNode ( & pAobHierarchyNode0 ) ;
rtwAobHierarchyVerifyNNodes ( pAobHierarchyNode0 , 1 ) ; pOSigstreamManager =
rt_GetOSigstreamManager ( ) ; rtwSignalProbeCollectionCreateInstance (
"DATASET_OUTPORT_LOGGING" , "tmp_raccel_logsout" , "" , "" , pathToTopModel ,
"CMFB/Tactile event perception" , 3 , pOSigstreamManager , &
pSignalProbeCollection ) ; rtwSignalProbeCollectionAddElement (
pSignalProbeCollection , "" , "linear" , 1 , 0 , 1 , signalDimensions0 , 0 ,
"" , "double" , "" ) ; rtwSignalProbeCollectionVerifyNLeaves (
pSignalProbeCollection , 1 ) ; rtwSignalProbeCollectionSetAobHierarchy (
pSignalProbeCollection , pAobHierarchyNode0 ) ;
rtwSignalProbeCollectionFinalizeMetaData ( pSignalProbeCollection ) ; rtDW .
el1dvatmtk . SignalProbe = pSignalProbeCollection ; } } } if (
rt_GetOSigstreamManager ( ) != ( NULL ) ) { { void * pAobHierarchyNode0 = (
NULL ) ; { char * pathToTopModel = "" ; void * pSignalProbeCollection = (
NULL ) ; void * pOSigstreamManager = ( NULL ) ; uint_T signalDimensions0 [ 1
] = { 1 } ; rtwAobHierarchyCreateRootNode ( & pAobHierarchyNode0 ) ;
rtwAobHierarchyVerifyNNodes ( pAobHierarchyNode0 , 1 ) ; pOSigstreamManager =
rt_GetOSigstreamManager ( ) ; rtwSignalProbeCollectionCreateInstance (
"DATASET_OUTPORT_LOGGING" , "tmp_raccel_logsout" , "" , "" , pathToTopModel ,
"CMFB/Finger displacement" , 4 , pOSigstreamManager , &
pSignalProbeCollection ) ; rtwSignalProbeCollectionAddElement (
pSignalProbeCollection , "" , "linear" , 1 , 0 , 1 , signalDimensions0 , 0 ,
"1" , "double" , "" ) ; rtwSignalProbeCollectionVerifyNLeaves (
pSignalProbeCollection , 1 ) ; rtwSignalProbeCollectionSetAobHierarchy (
pSignalProbeCollection , pAobHierarchyNode0 ) ;
rtwSignalProbeCollectionFinalizeMetaData ( pSignalProbeCollection ) ; rtDW .
hntxrt0njy . SignalProbe = pSignalProbeCollection ; } } } { int_T numCols = 2
; rtDW . bxcvtlkuel . LoggedData = rt_CreateLogVar ( ssGetRTWLogInfo ( rtS )
, ssGetTStart ( rtS ) , ssGetTFinal ( rtS ) , 0.0 , ( & ssGetErrorStatus (
rtS ) ) , "input_event" , SS_DOUBLE , 0 , 0 , 0 , 2 , 1 , ( int_T * ) &
numCols , NO_LOGVALDIMS , ( NULL ) , ( NULL ) , 0 , 1 , 0.0 , 1 ) ; if ( rtDW
. bxcvtlkuel . LoggedData == ( NULL ) ) return ; } { int_T numCols = 2 ; rtDW
. jl2icbilbs . LoggedData = rt_CreateLogVar ( ssGetRTWLogInfo ( rtS ) ,
ssGetTStart ( rtS ) , ssGetTFinal ( rtS ) , 0.0 , ( & ssGetErrorStatus ( rtS
) ) , "ScopeData2" , SS_DOUBLE , 0 , 0 , 0 , 2 , 1 , ( int_T * ) & numCols ,
NO_LOGVALDIMS , ( NULL ) , ( NULL ) , 0 , 1 , 0.0 , 1 ) ; if ( rtDW .
jl2icbilbs . LoggedData == ( NULL ) ) return ; } rtDW . emonwegfxm = - 1 ;
simulator = nesl_lease_simulator (
"CMFB/Muscle-Finger-Button-Event/Solver Configuration_3" , 2 , 1 ) ; rtDW .
aj0rcrzpxy = ( void * ) simulator ; modelParameters_mVariableStepSolver =
pointer_is_null ( rtDW . aj0rcrzpxy ) ; if (
modelParameters_mVariableStepSolver ) { CMFB_cde73719_3_gateway ( ) ;
simulator = nesl_lease_simulator (
"CMFB/Muscle-Finger-Button-Event/Solver Configuration_3" , 2 , 1 ) ; rtDW .
aj0rcrzpxy = ( void * ) simulator ; } simulationData =
nesl_create_simulation_data ( ) ; rtDW . io3q1sfthu = ( void * )
simulationData ; diagnosticManager = rtw_create_diagnostics ( ) ; rtDW .
kd0bfuzule = ( void * ) diagnosticManager ; modelParameters_mSolverTolerance
= 0.001 ; modelParameters_mFixedStepSize = 0.0 ;
modelParameters_mVariableStepSolver = true ; simulator = ( NeslSimulator * )
rtDW . aj0rcrzpxy ; diagnosticManager = ( NeuDiagnosticManager * ) rtDW .
kd0bfuzule ; diagnosticTree = neu_diagnostic_manager_get_initial_tree (
diagnosticManager ) ; expl_temp_j . mVariableStepSolver =
modelParameters_mVariableStepSolver ; expl_temp_j . mUseSimState = false ;
expl_temp_j . mStartTime = 0.0 ; expl_temp_j . mSolverType =
NE_SOLVER_TYPE_DAE ; expl_temp_j . mSolverTolerance =
modelParameters_mSolverTolerance ; expl_temp_j . mRTWModifiedTimeStamp =
4.19093061E+8 ; expl_temp_j . mLoggingMode = SSC_LOGGING_NONE ; expl_temp_j .
mLoadInitialState = false ; expl_temp_j . mLinTrimCompile = false ;
expl_temp_j . mFixedStepSize = modelParameters_mFixedStepSize ; tmp =
nesl_initialize_simulator ( simulator , expl_temp_j , diagnosticManager ) ;
if ( tmp != 0 ) { modelParameters_mVariableStepSolver = error_buffer_is_empty
( ssGetErrorStatus ( rtS ) ) ; if ( modelParameters_mVariableStepSolver ) {
msg = rtw_diagnostics_msg ( diagnosticTree ) ; ssSetErrorStatus ( rtS , msg )
; } } simulationData = ( NeslSimulationData * ) rtDW . io3q1sfthu ; time_m =
ssGetT ( rtS ) ; simulationData -> mData -> mTime . mN = 1 ; simulationData
-> mData -> mTime . mX = & time_m ; simulationData -> mData -> mContStates .
mN = 0 ; simulationData -> mData -> mContStates . mX = NULL ; simulationData
-> mData -> mDiscStates . mN = 0 ; simulationData -> mData -> mDiscStates .
mX = NULL ; simulationData -> mData -> mModeVector . mN = 0 ; simulationData
-> mData -> mModeVector . mX = NULL ; modelParameters_mVariableStepSolver = (
ssIsMajorTimeStep ( rtS ) && ssGetRTWSolverInfo ( rtS ) -> foundContZcEvents
) ; simulationData -> mData -> mFoundZcEvents =
modelParameters_mVariableStepSolver ; simulationData -> mData ->
mIsMajorTimeStep = ssIsMajorTimeStep ( rtS ) ;
modelParameters_mVariableStepSolver = ( ssGetMdlInfoPtr ( rtS ) -> mdlFlags .
solverAssertCheck == 1U ) ; simulationData -> mData -> mIsSolverAssertCheck =
modelParameters_mVariableStepSolver ; modelParameters_mVariableStepSolver =
ssIsSolverCheckingCIC ( rtS ) ; simulationData -> mData ->
mIsSolverCheckingCIC = modelParameters_mVariableStepSolver ; simulationData
-> mData -> mIsComputingJacobian = false ; simulationData -> mData ->
mIsEvaluatingF0 = false ; modelParameters_mVariableStepSolver =
ssIsSolverRequestingReset ( rtS ) ; simulationData -> mData ->
mIsSolverRequestingReset = modelParameters_mVariableStepSolver ; simulator =
( NeslSimulator * ) rtDW . aj0rcrzpxy ; diagnosticManager = (
NeuDiagnosticManager * ) rtDW . kd0bfuzule ; diagnosticTree =
neu_diagnostic_manager_get_initial_tree ( diagnosticManager ) ; tmp =
ne_simulator_method ( simulator , NESL_SIM_INITIALIZEONCE , simulationData ,
diagnosticManager ) ; if ( tmp != 0 ) { modelParameters_mVariableStepSolver =
error_buffer_is_empty ( ssGetErrorStatus ( rtS ) ) ; if (
modelParameters_mVariableStepSolver ) { msg = rtw_diagnostics_msg (
diagnosticTree ) ; ssSetErrorStatus ( rtS , msg ) ; } } { int_T numCols = 2 ;
rtDW . addvjqs5hf . LoggedData = rt_CreateLogVar ( ssGetRTWLogInfo ( rtS ) ,
ssGetTStart ( rtS ) , ssGetTFinal ( rtS ) , 0.0 , ( & ssGetErrorStatus ( rtS
) ) , "finger_acceleration" , SS_DOUBLE , 0 , 0 , 0 , 2 , 1 , ( int_T * ) &
numCols , NO_LOGVALDIMS , ( NULL ) , ( NULL ) , 0 , 1 , 0.0 , 1 ) ; if ( rtDW
. addvjqs5hf . LoggedData == ( NULL ) ) return ; } { int_T numCols = 2 ; rtDW
. ee3g5xwvjl . LoggedData = rt_CreateLogVar ( ssGetRTWLogInfo ( rtS ) ,
ssGetTStart ( rtS ) , ssGetTFinal ( rtS ) , 0.0 , ( & ssGetErrorStatus ( rtS
) ) , "finger_height" , SS_DOUBLE , 0 , 0 , 0 , 2 , 1 , ( int_T * ) & numCols
, NO_LOGVALDIMS , ( NULL ) , ( NULL ) , 0 , 1 , 0.0 , 1 ) ; if ( rtDW .
ee3g5xwvjl . LoggedData == ( NULL ) ) return ; } { int_T numCols = 2 ; rtDW .
nhpmhtywos . LoggedData = rt_CreateLogVar ( ssGetRTWLogInfo ( rtS ) ,
ssGetTStart ( rtS ) , ssGetTFinal ( rtS ) , 0.0 , ( & ssGetErrorStatus ( rtS
) ) , "finger_velocity" , SS_DOUBLE , 0 , 0 , 0 , 2 , 1 , ( int_T * ) &
numCols , NO_LOGVALDIMS , ( NULL ) , ( NULL ) , 0 , 1 , 0.0 , 1 ) ; if ( rtDW
. nhpmhtywos . LoggedData == ( NULL ) ) return ; } { void * slioCatalogue =
rt_slioCatalogue ( ) ? rtwGetPointerFromUniquePtr ( rt_slioCatalogue ( ) ) :
sdiGetSlioCatalogue ( rt_dataMapInfo . mmi . InstanceMap . fullPath ) ; if (
! slioCatalogue || ! rtwDisableStreamingToRepository ( slioCatalogue ) ) { {
sdiSignalSourceInfoU srcInfo ; sdiLabelU loggedName = sdiGetLabelFromChars (
"Ball_xyz" ) ; sdiLabelU origSigName = sdiGetLabelFromChars ( "" ) ;
sdiLabelU propName = sdiGetLabelFromChars ( "" ) ; sdiLabelU blockPath =
sdiGetLabelFromChars ( "CMFB/Muscle-Finger-Button-Event/Sensing/Mux" ) ;
sdiLabelU blockSID = sdiGetLabelFromChars ( "" ) ; sdiLabelU subPath =
sdiGetLabelFromChars ( "" ) ; sdiDims sigDims ; sdiLabelU sigName =
sdiGetLabelFromChars ( "Ball_xyz" ) ; sdiAsyncRepoDataTypeHandle hDT =
sdiAsyncRepoGetBuiltInDataTypeHandle ( DATA_TYPE_DOUBLE ) ; sdiComplexity
sigComplexity = REAL ; sdiSampleTimeContinuity stCont =
SAMPLE_TIME_CONTINUOUS ; int_T sigDimsArray [ 1 ] = { 3 } ; sigDims . nDims =
1 ; sigDims . dimensions = sigDimsArray ; srcInfo . numBlockPathElems = 1 ;
srcInfo . fullBlockPath = ( sdiFullBlkPathU ) & blockPath ; srcInfo . SID = (
sdiSignalIDU ) & blockSID ; srcInfo . subPath = subPath ; srcInfo . portIndex
= 0 + 1 ; srcInfo . signalName = sigName ; srcInfo . sigSourceUUID = 0 ; rtDW
. eaz1lwdqda . AQHandles = sdiAsyncRepoCreateAsyncioQueue ( hDT , & srcInfo ,
rt_dataMapInfo . mmi . InstanceMap . fullPath ,
"f56ae368-12f2-4504-bcb9-f6be40c5e114" , sigComplexity , & sigDims ,
DIMENSIONS_MODE_FIXED , stCont , "1" ) ; if ( rtDW . eaz1lwdqda . AQHandles )
{ sdiSetSignalSampleTimeString ( rtDW . eaz1lwdqda . AQHandles , "Continuous"
, 0.0 , ssGetTFinal ( rtS ) ) ; sdiSetRunStartTime ( rtDW . eaz1lwdqda .
AQHandles , ssGetTaskTime ( rtS , 1 ) ) ; sdiAsyncRepoSetSignalExportSettings
( rtDW . eaz1lwdqda . AQHandles , 1 , 0 ) ; sdiAsyncRepoSetSignalExportName (
rtDW . eaz1lwdqda . AQHandles , loggedName , origSigName , propName ) ; }
sdiFreeLabel ( sigName ) ; sdiFreeLabel ( loggedName ) ; sdiFreeLabel (
origSigName ) ; sdiFreeLabel ( propName ) ; sdiFreeLabel ( blockPath ) ;
sdiFreeLabel ( blockSID ) ; sdiFreeLabel ( subPath ) ; } } { void *
slioCatalogue = rt_slioCatalogue ( ) ? rtwGetPointerFromUniquePtr (
rt_slioCatalogue ( ) ) : sdiGetSlioCatalogue ( rt_dataMapInfo . mmi .
InstanceMap . fullPath ) ; void * treeVector = ( NULL ) ; void * accessor = (
NULL ) ; void * signalDescriptor = ( NULL ) ; void * loggingInterval = ( NULL
) ; char * datasetName = "tmp_raccel_logsout" ; if ( slioCatalogue &&
rtwIsLoggingToFile ( slioCatalogue ) ) { treeVector = rtwGetTreeVector ( ) ;
{ int_T sigDimsArray [ 1 ] = { 3 } ; rtwAddLeafNode ( 0 , "" , "linear" , 0 ,
( unsigned int * ) sigDimsArray , 1 , "double" , "1" , treeVector ) ; }
signalDescriptor = rtwGetSignalDescriptor ( treeVector , 1 , 0 , 1 ,
"Ball_xyz" , "" , rt_dataMapInfo . mmi . InstanceMap . fullPath ,
"CMFB/Muscle-Finger-Button-Event/Sensing/Mux" , 1 ) ; if ( slioCatalogue && !
rt_slioCatalogue ( ) ) { sdiSlioIsLoggingSignal ( rt_dataMapInfo . mmi .
InstanceMap . fullPath , "CMFB/Muscle-Finger-Button-Event/Sensing/Mux" , 1 ,
"Ball_xyz" ) ; } if ( rtwLoggingOverride ( signalDescriptor , slioCatalogue )
) { if ( ssGetRootSS ( rtS ) -> mdlInfo -> rtwLogInfo ) { loggingInterval =
rtliGetLoggingInterval ( ssGetRootSS ( rtS ) -> mdlInfo -> rtwLogInfo ) ; }
else { loggingInterval = sdiGetLoggingIntervals ( rt_dataMapInfo . mmi .
InstanceMap . fullPath ) ; datasetName = "" ; } accessor = rtwGetAccessor (
signalDescriptor , loggingInterval ) ; rtwAddR2Client ( accessor ,
signalDescriptor , slioCatalogue , datasetName ) ; rtDW . eaz1lwdqda .
SlioLTF = accessor ; } } } } { int_T numCols = 2 ; rtDW . dk2fn24cmw .
LoggedData = rt_CreateLogVar ( ssGetRTWLogInfo ( rtS ) , ssGetTStart ( rtS )
, ssGetTFinal ( rtS ) , 0.0 , ( & ssGetErrorStatus ( rtS ) ) ,
"contact_force" , SS_DOUBLE , 0 , 0 , 0 , 2 , 1 , ( int_T * ) & numCols ,
NO_LOGVALDIMS , ( NULL ) , ( NULL ) , 0 , 1 , 0.0 , 1 ) ; if ( rtDW .
dk2fn24cmw . LoggedData == ( NULL ) ) return ; } { int_T numCols = 2 ; rtDW .
eeff4hdnpa . LoggedData = rt_CreateLogVar ( ssGetRTWLogInfo ( rtS ) ,
ssGetTStart ( rtS ) , ssGetTFinal ( rtS ) , 0.0 , ( & ssGetErrorStatus ( rtS
) ) , "finger_pulp_compression" , SS_DOUBLE , 0 , 0 , 0 , 2 , 1 , ( int_T * )
& numCols , NO_LOGVALDIMS , ( NULL ) , ( NULL ) , 0 , 1 , 0.0 , 1 ) ; if (
rtDW . eeff4hdnpa . LoggedData == ( NULL ) ) return ; } { int_T numCols = 2 ;
rtDW . htnghlqgvc . LoggedData = rt_CreateLogVar ( ssGetRTWLogInfo ( rtS ) ,
ssGetTStart ( rtS ) , ssGetTFinal ( rtS ) , 0.0 , ( & ssGetErrorStatus ( rtS
) ) , "button_height" , SS_DOUBLE , 0 , 0 , 0 , 2 , 1 , ( int_T * ) & numCols
, NO_LOGVALDIMS , ( NULL ) , ( NULL ) , 0 , 1 , 0.0 , 1 ) ; if ( rtDW .
htnghlqgvc . LoggedData == ( NULL ) ) return ; } { void * slioCatalogue =
rt_slioCatalogue ( ) ? rtwGetPointerFromUniquePtr ( rt_slioCatalogue ( ) ) :
sdiGetSlioCatalogue ( rt_dataMapInfo . mmi . InstanceMap . fullPath ) ; if (
! slioCatalogue || ! rtwDisableStreamingToRepository ( slioCatalogue ) ) { {
sdiSignalSourceInfoU srcInfo ; sdiLabelU loggedName = sdiGetLabelFromChars (
"Ball_xyz" ) ; sdiLabelU origSigName = sdiGetLabelFromChars ( "" ) ;
sdiLabelU propName = sdiGetLabelFromChars ( "" ) ; sdiLabelU blockPath =
sdiGetLabelFromChars ( "CMFB/Muscle-Finger-Button-Event/Sensing1/Mux" ) ;
sdiLabelU blockSID = sdiGetLabelFromChars ( "" ) ; sdiLabelU subPath =
sdiGetLabelFromChars ( "" ) ; sdiDims sigDims ; sdiLabelU sigName =
sdiGetLabelFromChars ( "Ball_xyz" ) ; sdiAsyncRepoDataTypeHandle hDT =
sdiAsyncRepoGetBuiltInDataTypeHandle ( DATA_TYPE_DOUBLE ) ; sdiComplexity
sigComplexity = REAL ; sdiSampleTimeContinuity stCont =
SAMPLE_TIME_CONTINUOUS ; int_T sigDimsArray [ 1 ] = { 3 } ; sigDims . nDims =
1 ; sigDims . dimensions = sigDimsArray ; srcInfo . numBlockPathElems = 1 ;
srcInfo . fullBlockPath = ( sdiFullBlkPathU ) & blockPath ; srcInfo . SID = (
sdiSignalIDU ) & blockSID ; srcInfo . subPath = subPath ; srcInfo . portIndex
= 0 + 1 ; srcInfo . signalName = sigName ; srcInfo . sigSourceUUID = 0 ; rtDW
. eaz1lwdqdal . AQHandles = sdiAsyncRepoCreateAsyncioQueue ( hDT , & srcInfo
, rt_dataMapInfo . mmi . InstanceMap . fullPath ,
"023370aa-92d5-46d9-ab79-bfad693cbf9a" , sigComplexity , & sigDims ,
DIMENSIONS_MODE_FIXED , stCont , "1" ) ; if ( rtDW . eaz1lwdqdal . AQHandles
) { sdiSetSignalSampleTimeString ( rtDW . eaz1lwdqdal . AQHandles ,
"Continuous" , 0.0 , ssGetTFinal ( rtS ) ) ; sdiSetRunStartTime ( rtDW .
eaz1lwdqdal . AQHandles , ssGetTaskTime ( rtS , 1 ) ) ;
sdiAsyncRepoSetSignalExportSettings ( rtDW . eaz1lwdqdal . AQHandles , 1 , 0
) ; sdiAsyncRepoSetSignalExportName ( rtDW . eaz1lwdqdal . AQHandles ,
loggedName , origSigName , propName ) ; } sdiFreeLabel ( sigName ) ;
sdiFreeLabel ( loggedName ) ; sdiFreeLabel ( origSigName ) ; sdiFreeLabel (
propName ) ; sdiFreeLabel ( blockPath ) ; sdiFreeLabel ( blockSID ) ;
sdiFreeLabel ( subPath ) ; } } { void * slioCatalogue = rt_slioCatalogue ( )
? rtwGetPointerFromUniquePtr ( rt_slioCatalogue ( ) ) : sdiGetSlioCatalogue (
rt_dataMapInfo . mmi . InstanceMap . fullPath ) ; void * treeVector = ( NULL
) ; void * accessor = ( NULL ) ; void * signalDescriptor = ( NULL ) ; void *
loggingInterval = ( NULL ) ; char * datasetName = "tmp_raccel_logsout" ; if (
slioCatalogue && rtwIsLoggingToFile ( slioCatalogue ) ) { treeVector =
rtwGetTreeVector ( ) ; { int_T sigDimsArray [ 1 ] = { 3 } ; rtwAddLeafNode (
0 , "" , "linear" , 0 , ( unsigned int * ) sigDimsArray , 1 , "double" , "1"
, treeVector ) ; } signalDescriptor = rtwGetSignalDescriptor ( treeVector , 1
, 0 , 1 , "Ball_xyz" , "" , rt_dataMapInfo . mmi . InstanceMap . fullPath ,
"CMFB/Muscle-Finger-Button-Event/Sensing1/Mux" , 1 ) ; if ( slioCatalogue &&
! rt_slioCatalogue ( ) ) { sdiSlioIsLoggingSignal ( rt_dataMapInfo . mmi .
InstanceMap . fullPath , "CMFB/Muscle-Finger-Button-Event/Sensing1/Mux" , 1 ,
"Ball_xyz" ) ; } if ( rtwLoggingOverride ( signalDescriptor , slioCatalogue )
) { if ( ssGetRootSS ( rtS ) -> mdlInfo -> rtwLogInfo ) { loggingInterval =
rtliGetLoggingInterval ( ssGetRootSS ( rtS ) -> mdlInfo -> rtwLogInfo ) ; }
else { loggingInterval = sdiGetLoggingIntervals ( rt_dataMapInfo . mmi .
InstanceMap . fullPath ) ; datasetName = "" ; } accessor = rtwGetAccessor (
signalDescriptor , loggingInterval ) ; rtwAddR2Client ( accessor ,
signalDescriptor , slioCatalogue , datasetName ) ; rtDW . eaz1lwdqdal .
SlioLTF = accessor ; } } } } simulator = nesl_lease_simulator (
"CMFB/Muscle-Finger-Button-Event/Solver Configuration_1" , 0 , 0 ) ; rtDW .
n0m4jcoifm = ( void * ) simulator ; modelParameters_mVariableStepSolver =
pointer_is_null ( rtDW . n0m4jcoifm ) ; if (
modelParameters_mVariableStepSolver ) { CMFB_cde73719_1_gateway ( ) ;
simulator = nesl_lease_simulator (
"CMFB/Muscle-Finger-Button-Event/Solver Configuration_1" , 0 , 0 ) ; rtDW .
n0m4jcoifm = ( void * ) simulator ; } simulationData =
nesl_create_simulation_data ( ) ; rtDW . phinmcokxq = ( void * )
simulationData ; diagnosticManager = rtw_create_diagnostics ( ) ; rtDW .
gwhre3ynix = ( void * ) diagnosticManager ; modelParameters_mSolverTolerance
= 0.001 ; modelParameters_mFixedStepSize = 0.0 ;
modelParameters_mVariableStepSolver = true ; simulator = ( NeslSimulator * )
rtDW . n0m4jcoifm ; diagnosticManager = ( NeuDiagnosticManager * ) rtDW .
gwhre3ynix ; diagnosticTree = neu_diagnostic_manager_get_initial_tree (
diagnosticManager ) ; expl_temp_f . mVariableStepSolver =
modelParameters_mVariableStepSolver ; expl_temp_f . mUseSimState = false ;
expl_temp_f . mStartTime = 0.0 ; expl_temp_f . mSolverType =
NE_SOLVER_TYPE_DAE ; expl_temp_f . mSolverTolerance =
modelParameters_mSolverTolerance ; expl_temp_f . mRTWModifiedTimeStamp =
4.19093061E+8 ; expl_temp_f . mLoggingMode = SSC_LOGGING_NONE ; expl_temp_f .
mLoadInitialState = false ; expl_temp_f . mLinTrimCompile = false ;
expl_temp_f . mFixedStepSize = modelParameters_mFixedStepSize ; tmp =
nesl_initialize_simulator ( simulator , expl_temp_f , diagnosticManager ) ;
if ( tmp != 0 ) { modelParameters_mVariableStepSolver = error_buffer_is_empty
( ssGetErrorStatus ( rtS ) ) ; if ( modelParameters_mVariableStepSolver ) {
msg = rtw_diagnostics_msg ( diagnosticTree ) ; ssSetErrorStatus ( rtS , msg )
; } } expl_temp_c . mRealParameters . mN = 0 ; expl_temp_c . mRealParameters
. mX = NULL ; expl_temp_c . mLogicalParameters . mN = 0 ; expl_temp_c .
mLogicalParameters . mX = NULL ; expl_temp_c . mIntegerParameters . mN = 0 ;
expl_temp_c . mIntegerParameters . mX = NULL ; expl_temp_c . mIndexParameters
. mN = 0 ; expl_temp_c . mIndexParameters . mX = NULL ;
nesl_simulator_set_rtps ( ( NeslSimulator * ) rtDW . n0m4jcoifm , expl_temp_c
) ; simulationData = ( NeslSimulationData * ) rtDW . phinmcokxq ; time_g =
ssGetT ( rtS ) ; simulationData -> mData -> mTime . mN = 1 ; simulationData
-> mData -> mTime . mX = & time_g ; simulationData -> mData -> mContStates .
mN = 0 ; simulationData -> mData -> mContStates . mX = NULL ; simulationData
-> mData -> mDiscStates . mN = 0 ; simulationData -> mData -> mDiscStates .
mX = NULL ; simulationData -> mData -> mModeVector . mN = 0 ; simulationData
-> mData -> mModeVector . mX = NULL ; modelParameters_mVariableStepSolver = (
ssIsMajorTimeStep ( rtS ) && ssGetRTWSolverInfo ( rtS ) -> foundContZcEvents
) ; simulationData -> mData -> mFoundZcEvents =
modelParameters_mVariableStepSolver ; simulationData -> mData ->
mIsMajorTimeStep = ssIsMajorTimeStep ( rtS ) ;
modelParameters_mVariableStepSolver = ( ssGetMdlInfoPtr ( rtS ) -> mdlFlags .
solverAssertCheck == 1U ) ; simulationData -> mData -> mIsSolverAssertCheck =
modelParameters_mVariableStepSolver ; modelParameters_mVariableStepSolver =
ssIsSolverCheckingCIC ( rtS ) ; simulationData -> mData ->
mIsSolverCheckingCIC = modelParameters_mVariableStepSolver ; simulationData
-> mData -> mIsComputingJacobian = false ; simulationData -> mData ->
mIsEvaluatingF0 = false ; modelParameters_mVariableStepSolver =
ssIsSolverRequestingReset ( rtS ) ; simulationData -> mData ->
mIsSolverRequestingReset = modelParameters_mVariableStepSolver ; simulator =
( NeslSimulator * ) rtDW . n0m4jcoifm ; diagnosticManager = (
NeuDiagnosticManager * ) rtDW . gwhre3ynix ; diagnosticTree =
neu_diagnostic_manager_get_initial_tree ( diagnosticManager ) ; tmp =
ne_simulator_method ( simulator , NESL_SIM_INITIALIZEONCE , simulationData ,
diagnosticManager ) ; if ( tmp != 0 ) { modelParameters_mVariableStepSolver =
error_buffer_is_empty ( ssGetErrorStatus ( rtS ) ) ; if (
modelParameters_mVariableStepSolver ) { msg = rtw_diagnostics_msg (
diagnosticTree ) ; ssSetErrorStatus ( rtS , msg ) ; } } MdlInitialize ( ) ;
MdlEnable ( ) ; { bool externalInputIsInDatasetFormat = false ; void *
pISigstreamManager = rt_GetISigstreamManager ( ) ;
rtwISigstreamManagerGetInputIsInDatasetFormat ( pISigstreamManager , &
externalInputIsInDatasetFormat ) ; if ( externalInputIsInDatasetFormat ) { }
} } void MdlOutputs ( int_T tid ) { NeslSimulationData * simulationData ;
real_T time ; boolean_T tmp ; real_T tmp_p [ 4 ] ; int_T tmp_e [ 2 ] ;
NeslSimulator * simulator ; NeuDiagnosticManager * diagnosticManager ;
NeuDiagnosticTree * diagnosticTree ; char * msg ; real_T time_p ; real_T
tmp_i [ 6 ] ; int_T tmp_m [ 3 ] ; ZCEventType zcEvent ; real_T time_e ;
real_T tmp_g [ 36 ] ; int_T tmp_j [ 10 ] ; real_T time_i ; real_T tmp_f [ 48
] ; int_T tmp_c [ 11 ] ; real_T time_m ; real_T tmp_k [ 48 ] ; int_T tmp_b [
11 ] ; int8_T rtPrevAction ; int8_T rtAction ; real_T taskTimeV ; uint32_T
numCycles ; real_T ratio ; int32_T i ; real_T tmp_n [ 9 ] ; srClearBC ( rtDW
. m2opywpxzx ) ; srClearBC ( rtDW . gkndwqqs1r ) ; simulationData = (
NeslSimulationData * ) rtDW . am02jbgyuo ; time = ssGetT ( rtS ) ;
simulationData -> mData -> mTime . mN = 1 ; simulationData -> mData -> mTime
. mX = & time ; simulationData -> mData -> mContStates . mN = 1 ;
simulationData -> mData -> mContStates . mX = & rtX . ehudnxzvyt ;
simulationData -> mData -> mDiscStates . mN = 0 ; simulationData -> mData ->
mDiscStates . mX = NULL ; simulationData -> mData -> mModeVector . mN = 1 ;
simulationData -> mData -> mModeVector . mX = & rtDW . gimqkbf2sb ; tmp = (
ssIsMajorTimeStep ( rtS ) && ssGetRTWSolverInfo ( rtS ) -> foundContZcEvents
) ; simulationData -> mData -> mFoundZcEvents = tmp ; simulationData -> mData
-> mIsMajorTimeStep = ssIsMajorTimeStep ( rtS ) ; tmp = ( ssGetMdlInfoPtr (
rtS ) -> mdlFlags . solverAssertCheck == 1U ) ; simulationData -> mData ->
mIsSolverAssertCheck = tmp ; tmp = ssIsSolverCheckingCIC ( rtS ) ;
simulationData -> mData -> mIsSolverCheckingCIC = tmp ; tmp =
ssIsSolverComputingJacobian ( rtS ) ; simulationData -> mData ->
mIsComputingJacobian = tmp ; simulationData -> mData -> mIsEvaluatingF0 = (
ssGetEvaluatingF0ForJacobian ( rtS ) != 0 ) ; tmp = ssIsSolverRequestingReset
( rtS ) ; simulationData -> mData -> mIsSolverRequestingReset = tmp ; tmp_e [
0 ] = 0 ; tmp_p [ 0 ] = rtB . kncqty2hty [ 0 ] ; tmp_p [ 1 ] = rtB .
kncqty2hty [ 1 ] ; tmp_p [ 2 ] = rtB . kncqty2hty [ 2 ] ; tmp_p [ 3 ] = rtB .
kncqty2hty [ 3 ] ; tmp_e [ 1 ] = 4 ; simulationData -> mData -> mInputValues
. mN = 4 ; simulationData -> mData -> mInputValues . mX = & tmp_p [ 0 ] ;
simulationData -> mData -> mInputOffsets . mN = 2 ; simulationData -> mData
-> mInputOffsets . mX = & tmp_e [ 0 ] ; simulationData -> mData -> mOutputs .
mN = 2 ; simulationData -> mData -> mOutputs . mX = & rtB . bhpb2dvpp3 [ 0 ]
; simulationData -> mData -> mSampleHits . mN = 0 ; simulationData -> mData
-> mSampleHits . mX = NULL ; simulationData -> mData ->
mIsFundamentalSampleHit = false ; simulator = ( NeslSimulator * ) rtDW .
ofhkw1fpiv ; diagnosticManager = ( NeuDiagnosticManager * ) rtDW . gz11pk43kf
; diagnosticTree = neu_diagnostic_manager_get_initial_tree (
diagnosticManager ) ; i = ne_simulator_method ( simulator , NESL_SIM_OUTPUTS
, simulationData , diagnosticManager ) ; if ( i != 0 ) { tmp =
error_buffer_is_empty ( ssGetErrorStatus ( rtS ) ) ; if ( tmp ) { msg =
rtw_diagnostics_msg ( diagnosticTree ) ; ssSetErrorStatus ( rtS , msg ) ; } }
simulationData = ( NeslSimulationData * ) rtDW . eoputmkb5y ; time_p = ssGetT
( rtS ) ; simulationData -> mData -> mTime . mN = 1 ; simulationData -> mData
-> mTime . mX = & time_p ; simulationData -> mData -> mContStates . mN = 0 ;
simulationData -> mData -> mContStates . mX = NULL ; simulationData -> mData
-> mDiscStates . mN = 0 ; simulationData -> mData -> mDiscStates . mX = NULL
; simulationData -> mData -> mModeVector . mN = 0 ; simulationData -> mData
-> mModeVector . mX = NULL ; tmp = ( ssIsMajorTimeStep ( rtS ) &&
ssGetRTWSolverInfo ( rtS ) -> foundContZcEvents ) ; simulationData -> mData
-> mFoundZcEvents = tmp ; simulationData -> mData -> mIsMajorTimeStep =
ssIsMajorTimeStep ( rtS ) ; tmp = ( ssGetMdlInfoPtr ( rtS ) -> mdlFlags .
solverAssertCheck == 1U ) ; simulationData -> mData -> mIsSolverAssertCheck =
tmp ; tmp = ssIsSolverCheckingCIC ( rtS ) ; simulationData -> mData ->
mIsSolverCheckingCIC = tmp ; simulationData -> mData -> mIsComputingJacobian
= false ; simulationData -> mData -> mIsEvaluatingF0 = false ; tmp =
ssIsSolverRequestingReset ( rtS ) ; simulationData -> mData ->
mIsSolverRequestingReset = tmp ; tmp_m [ 0 ] = 0 ; tmp_i [ 0 ] = rtB .
kncqty2hty [ 0 ] ; tmp_i [ 1 ] = rtB . kncqty2hty [ 1 ] ; tmp_i [ 2 ] = rtB .
kncqty2hty [ 2 ] ; tmp_i [ 3 ] = rtB . kncqty2hty [ 3 ] ; tmp_m [ 1 ] = 4 ;
tmp_i [ 4 ] = rtB . bhpb2dvpp3 [ 0 ] ; tmp_i [ 5 ] = rtB . bhpb2dvpp3 [ 1 ] ;
tmp_m [ 2 ] = 6 ; simulationData -> mData -> mInputValues . mN = 6 ;
simulationData -> mData -> mInputValues . mX = & tmp_i [ 0 ] ; simulationData
-> mData -> mInputOffsets . mN = 3 ; simulationData -> mData -> mInputOffsets
. mX = & tmp_m [ 0 ] ; simulationData -> mData -> mOutputs . mN = 1 ;
simulationData -> mData -> mOutputs . mX = & rtB . g1wwarzxqu ;
simulationData -> mData -> mSampleHits . mN = 0 ; simulationData -> mData ->
mSampleHits . mX = NULL ; simulationData -> mData -> mIsFundamentalSampleHit
= false ; simulator = ( NeslSimulator * ) rtDW . knbm3jrdjc ;
diagnosticManager = ( NeuDiagnosticManager * ) rtDW . otakt00evh ;
diagnosticTree = neu_diagnostic_manager_get_initial_tree ( diagnosticManager
) ; i = ne_simulator_method ( simulator , NESL_SIM_OUTPUTS , simulationData ,
diagnosticManager ) ; if ( i != 0 ) { tmp = error_buffer_is_empty (
ssGetErrorStatus ( rtS ) ) ; if ( tmp ) { msg = rtw_diagnostics_msg (
diagnosticTree ) ; ssSetErrorStatus ( rtS , msg ) ; } } if ( ssIsSampleHit (
rtS , 2 , 0 ) ) { if ( rtDW . etqfqz3gyg > rtP . Switch3_Threshold ) { rtB .
j4b4dlidnd = rtDW . etqfqz3gyg ; } else { rtB . j4b4dlidnd = rtP .
Constant_Value_jz2p0lxylj ; } } { real_T * * uBuffer = ( real_T * * ) & rtDW
. mvtc05kxt0 . TUbufferPtrs [ 0 ] ; real_T * * tBuffer = ( real_T * * ) &
rtDW . mvtc05kxt0 . TUbufferPtrs [ 1 ] ; real_T simTime = ssGetT ( rtS ) ;
real_T appliedDelay ; appliedDelay = rtB . j4b4dlidnd ; if ( appliedDelay >
rtP . VariableTimeDelay_MaxDelay ) { appliedDelay = rtP .
VariableTimeDelay_MaxDelay ; } if ( appliedDelay < 0.0 ) { appliedDelay = 0.0
; } if ( appliedDelay == 0.0 ) { rtB . ffkfmqmib4 = rtB . g1wwarzxqu ; } else
{ rtB . ffkfmqmib4 = rt_TDelayInterpolate ( simTime - appliedDelay , 0.0 , *
tBuffer , * uBuffer , rtDW . ghetnz132f . CircularBufSize , & rtDW .
ghetnz132f . Last , rtDW . ghetnz132f . Tail , rtDW . ghetnz132f . Head , rtP
. VariableTimeDelay_InitOutput , 0 , ( boolean_T ) ( ssIsMinorTimeStep ( rtS
) && ( ssGetTimeOfLastOutput ( rtS ) == ssGetT ( rtS ) ) ) ) ; } } if (
ssIsSampleHit ( rtS , 1 , 0 ) ) { zcEvent = rt_ZCFcn ( FALLING_ZERO_CROSSING
, & rtPrevZCX . hfotvevkea , ( rtB . ffkfmqmib4 - rtP .
DetectEventwiththreshold_Offset ) ) ; if ( rtDW . buwuj5xff3 == 0 ) { if (
zcEvent != NO_ZCEVENT ) { rtB . fb0jzz1kwz = ! rtB . fb0jzz1kwz ; rtDW .
buwuj5xff3 = 1 ; } else { if ( rtB . fb0jzz1kwz && ( rtB . ffkfmqmib4 != rtP
. DetectEventwiththreshold_Offset ) ) { rtB . fb0jzz1kwz = false ; } } } else
{ if ( rtB . ffkfmqmib4 != rtP . DetectEventwiththreshold_Offset ) { rtB .
fb0jzz1kwz = false ; } rtDW . buwuj5xff3 = 0 ; } rtB . cnd4a0ywbu = rtDW .
bw3zazxffe ; } if ( rtB . fb0jzz1kwz ) { rtB . lg2yozrzfy = ssGetT ( rtS ) ;
} else { rtB . lg2yozrzfy = rtB . cnd4a0ywbu ; } rtY . b3efxrasnj = rtB .
lg2yozrzfy ; if ( ssIsSampleHit ( rtS , 2 , 0 ) ) { if ( rtDW . dhtuvbjzws >
rtP . Switch4_Threshold ) { rtB . azfilu1oz3 = rtDW . dhtuvbjzws ; } else {
rtB . azfilu1oz3 = rtP . Constant_Value_jz2p0lxylj ; } } { real_T * * uBuffer
= ( real_T * * ) & rtDW . fe531iiqaq . TUbufferPtrs [ 0 ] ; real_T * *
tBuffer = ( real_T * * ) & rtDW . fe531iiqaq . TUbufferPtrs [ 1 ] ; real_T
simTime = ssGetT ( rtS ) ; real_T appliedDelay ; appliedDelay = rtB .
azfilu1oz3 ; if ( appliedDelay > rtP . VariableTimeDelay1_MaxDelay ) {
appliedDelay = rtP . VariableTimeDelay1_MaxDelay ; } if ( appliedDelay < 0.0
) { appliedDelay = 0.0 ; } if ( appliedDelay == 0.0 ) { rtB . acaxiwl5f3 =
rtB . g1wwarzxqu ; } else { rtB . acaxiwl5f3 = rt_TDelayInterpolate ( simTime
- appliedDelay , 0.0 , * tBuffer , * uBuffer , rtDW . mzs2owwteo .
CircularBufSize , & rtDW . mzs2owwteo . Last , rtDW . mzs2owwteo . Tail ,
rtDW . mzs2owwteo . Head , rtP . VariableTimeDelay1_InitOutput , 0 , (
boolean_T ) ( ssIsMinorTimeStep ( rtS ) && ( ssGetTimeOfLastOutput ( rtS ) ==
ssGetT ( rtS ) ) ) ) ; } } if ( ssIsSampleHit ( rtS , 1 , 0 ) ) { zcEvent =
rt_ZCFcn ( FALLING_ZERO_CROSSING , & rtPrevZCX . hgpmz33ou3 , ( rtB .
acaxiwl5f3 - rtP . DetectEventwiththreshold1_Offset ) ) ; if ( rtDW .
kne5vma2eo == 0 ) { if ( zcEvent != NO_ZCEVENT ) { rtB . ebzzunjuhk = ! rtB .
ebzzunjuhk ; rtDW . kne5vma2eo = 1 ; } else { if ( rtB . ebzzunjuhk && ( rtB
. acaxiwl5f3 != rtP . DetectEventwiththreshold1_Offset ) ) { rtB . ebzzunjuhk
= false ; } } } else { if ( rtB . acaxiwl5f3 != rtP .
DetectEventwiththreshold1_Offset ) { rtB . ebzzunjuhk = false ; } rtDW .
kne5vma2eo = 0 ; } rtB . fqcimd4vib = rtDW . dmwj50x0ph ; } if ( rtB .
ebzzunjuhk ) { rtB . lw3iu32tom = ssGetT ( rtS ) ; } else { rtB . lw3iu32tom
= rtB . fqcimd4vib ; } rtY . kzkwynbqvv = rtB . lw3iu32tom ; if (
ssIsSampleHit ( rtS , 2 , 0 ) ) { if ( rtDW . hyrr0kb32e > rtP .
Switch5_Threshold ) { rtB . jgtkvkn2a3 = rtDW . hyrr0kb32e ; } else { rtB .
jgtkvkn2a3 = rtP . Constant_Value_jz2p0lxylj ; } } { real_T * * uBuffer = (
real_T * * ) & rtDW . g3fwyfyuwt . TUbufferPtrs [ 0 ] ; real_T * * tBuffer =
( real_T * * ) & rtDW . g3fwyfyuwt . TUbufferPtrs [ 1 ] ; real_T simTime =
ssGetT ( rtS ) ; real_T appliedDelay ; appliedDelay = rtB . jgtkvkn2a3 ; if (
appliedDelay > rtP . VariableTimeDelay2_MaxDelay ) { appliedDelay = rtP .
VariableTimeDelay2_MaxDelay ; } if ( appliedDelay < 0.0 ) { appliedDelay =
0.0 ; } if ( appliedDelay == 0.0 ) { rtB . nzmot1eucf = rtB . g1wwarzxqu ; }
else { rtB . nzmot1eucf = rt_TDelayInterpolate ( simTime - appliedDelay , 0.0
, * tBuffer , * uBuffer , rtDW . njcfvqswzg . CircularBufSize , & rtDW .
njcfvqswzg . Last , rtDW . njcfvqswzg . Tail , rtDW . njcfvqswzg . Head , rtP
. VariableTimeDelay2_InitOutput , 0 , ( boolean_T ) ( ssIsMinorTimeStep ( rtS
) && ( ssGetTimeOfLastOutput ( rtS ) == ssGetT ( rtS ) ) ) ) ; } } if (
ssIsSampleHit ( rtS , 1 , 0 ) ) { zcEvent = rt_ZCFcn ( FALLING_ZERO_CROSSING
, & rtPrevZCX . eisd2o32qt , ( rtB . nzmot1eucf - rtP .
DetectEventwiththreshold2_Offset ) ) ; if ( rtDW . nu3jbog3i2 == 0 ) { if (
zcEvent != NO_ZCEVENT ) { rtB . nfnmf5y0gd = ! rtB . nfnmf5y0gd ; rtDW .
nu3jbog3i2 = 1 ; } else { if ( rtB . nfnmf5y0gd && ( rtB . nzmot1eucf != rtP
. DetectEventwiththreshold2_Offset ) ) { rtB . nfnmf5y0gd = false ; } } }
else { if ( rtB . nzmot1eucf != rtP . DetectEventwiththreshold2_Offset ) {
rtB . nfnmf5y0gd = false ; } rtDW . nu3jbog3i2 = 0 ; } rtB . ptkiczk2vw =
rtDW . d3tsxxr25j ; } if ( rtB . nfnmf5y0gd ) { rtB . ng2tca2qig = ssGetT (
rtS ) ; } else { rtB . ng2tca2qig = rtB . ptkiczk2vw ; } rtY . ks2ych5ttv =
rtB . ng2tca2qig ; simulationData = ( NeslSimulationData * ) rtDW .
k5nthuztl1 ; time_e = ssGetT ( rtS ) ; simulationData -> mData -> mTime . mN
= 1 ; simulationData -> mData -> mTime . mX = & time_e ; simulationData ->
mData -> mContStates . mN = 12 ; simulationData -> mData -> mContStates . mX
= ( real_T * ) & rtX . pc4fzp1l4b ; simulationData -> mData -> mDiscStates .
mN = 0 ; simulationData -> mData -> mDiscStates . mX = NULL ; simulationData
-> mData -> mModeVector . mN = 0 ; simulationData -> mData -> mModeVector .
mX = NULL ; tmp = ( ssIsMajorTimeStep ( rtS ) && ssGetRTWSolverInfo ( rtS )
-> foundContZcEvents ) ; simulationData -> mData -> mFoundZcEvents = tmp ;
simulationData -> mData -> mIsMajorTimeStep = ssIsMajorTimeStep ( rtS ) ; tmp
= ( ssGetMdlInfoPtr ( rtS ) -> mdlFlags . solverAssertCheck == 1U ) ;
simulationData -> mData -> mIsSolverAssertCheck = tmp ; tmp =
ssIsSolverCheckingCIC ( rtS ) ; simulationData -> mData ->
mIsSolverCheckingCIC = tmp ; tmp = ssIsSolverComputingJacobian ( rtS ) ;
simulationData -> mData -> mIsComputingJacobian = tmp ; simulationData ->
mData -> mIsEvaluatingF0 = ( ssGetEvaluatingF0ForJacobian ( rtS ) != 0 ) ;
tmp = ssIsSolverRequestingReset ( rtS ) ; simulationData -> mData ->
mIsSolverRequestingReset = tmp ; tmp_j [ 0 ] = 0 ; tmp_g [ 0 ] = rtB .
ovtibeh1d0 [ 0 ] ; tmp_g [ 1 ] = rtB . ovtibeh1d0 [ 1 ] ; tmp_g [ 2 ] = rtB .
ovtibeh1d0 [ 2 ] ; tmp_g [ 3 ] = rtB . ovtibeh1d0 [ 3 ] ; tmp_j [ 1 ] = 4 ;
tmp_g [ 4 ] = rtB . lqse4ynrzm [ 0 ] ; tmp_g [ 5 ] = rtB . lqse4ynrzm [ 1 ] ;
tmp_g [ 6 ] = rtB . lqse4ynrzm [ 2 ] ; tmp_g [ 7 ] = rtB . lqse4ynrzm [ 3 ] ;
tmp_j [ 2 ] = 8 ; tmp_g [ 8 ] = rtB . ff3f3afyqu [ 0 ] ; tmp_g [ 9 ] = rtB .
ff3f3afyqu [ 1 ] ; tmp_g [ 10 ] = rtB . ff3f3afyqu [ 2 ] ; tmp_g [ 11 ] = rtB
. ff3f3afyqu [ 3 ] ; tmp_j [ 3 ] = 12 ; tmp_g [ 12 ] = rtB . haudqwjsvt [ 0 ]
; tmp_g [ 13 ] = rtB . haudqwjsvt [ 1 ] ; tmp_g [ 14 ] = rtB . haudqwjsvt [ 2
] ; tmp_g [ 15 ] = rtB . haudqwjsvt [ 3 ] ; tmp_j [ 4 ] = 16 ; tmp_g [ 16 ] =
rtB . jd4ipbkqcn [ 0 ] ; tmp_g [ 17 ] = rtB . jd4ipbkqcn [ 1 ] ; tmp_g [ 18 ]
= rtB . jd4ipbkqcn [ 2 ] ; tmp_g [ 19 ] = rtB . jd4ipbkqcn [ 3 ] ; tmp_j [ 5
] = 20 ; tmp_g [ 20 ] = rtB . nmrci2eo0u [ 0 ] ; tmp_g [ 21 ] = rtB .
nmrci2eo0u [ 1 ] ; tmp_g [ 22 ] = rtB . nmrci2eo0u [ 2 ] ; tmp_g [ 23 ] = rtB
. nmrci2eo0u [ 3 ] ; tmp_j [ 6 ] = 24 ; tmp_g [ 24 ] = rtB . k23nignzth [ 0 ]
; tmp_g [ 25 ] = rtB . k23nignzth [ 1 ] ; tmp_g [ 26 ] = rtB . k23nignzth [ 2
] ; tmp_g [ 27 ] = rtB . k23nignzth [ 3 ] ; tmp_j [ 7 ] = 28 ; tmp_g [ 28 ] =
rtB . obhhsomhmg [ 0 ] ; tmp_g [ 29 ] = rtB . obhhsomhmg [ 1 ] ; tmp_g [ 30 ]
= rtB . obhhsomhmg [ 2 ] ; tmp_g [ 31 ] = rtB . obhhsomhmg [ 3 ] ; tmp_j [ 8
] = 32 ; tmp_g [ 32 ] = rtB . ln4c1feyoz [ 0 ] ; tmp_g [ 33 ] = rtB .
ln4c1feyoz [ 1 ] ; tmp_g [ 34 ] = rtB . ln4c1feyoz [ 2 ] ; tmp_g [ 35 ] = rtB
. ln4c1feyoz [ 3 ] ; tmp_j [ 9 ] = 36 ; simulationData -> mData ->
mInputValues . mN = 36 ; simulationData -> mData -> mInputValues . mX = &
tmp_g [ 0 ] ; simulationData -> mData -> mInputOffsets . mN = 10 ;
simulationData -> mData -> mInputOffsets . mX = & tmp_j [ 0 ] ;
simulationData -> mData -> mOutputs . mN = 12 ; simulationData -> mData ->
mOutputs . mX = & rtB . oaw1eysefu [ 0 ] ; simulationData -> mData ->
mSampleHits . mN = 0 ; simulationData -> mData -> mSampleHits . mX = NULL ;
simulationData -> mData -> mIsFundamentalSampleHit = false ; simulator = (
NeslSimulator * ) rtDW . ep1wb3gqvb ; diagnosticManager = (
NeuDiagnosticManager * ) rtDW . b4v4mhacua ; diagnosticTree =
neu_diagnostic_manager_get_initial_tree ( diagnosticManager ) ; i =
ne_simulator_method ( simulator , NESL_SIM_OUTPUTS , simulationData ,
diagnosticManager ) ; if ( i != 0 ) { tmp = error_buffer_is_empty (
ssGetErrorStatus ( rtS ) ) ; if ( tmp ) { msg = rtw_diagnostics_msg (
diagnosticTree ) ; ssSetErrorStatus ( rtS , msg ) ; } } simulationData = (
NeslSimulationData * ) rtDW . kajpu01vmz ; time_i = ssGetT ( rtS ) ;
simulationData -> mData -> mTime . mN = 1 ; simulationData -> mData -> mTime
. mX = & time_i ; simulationData -> mData -> mContStates . mN = 0 ;
simulationData -> mData -> mContStates . mX = NULL ; simulationData -> mData
-> mDiscStates . mN = 0 ; simulationData -> mData -> mDiscStates . mX = NULL
; simulationData -> mData -> mModeVector . mN = 0 ; simulationData -> mData
-> mModeVector . mX = NULL ; tmp = ( ssIsMajorTimeStep ( rtS ) &&
ssGetRTWSolverInfo ( rtS ) -> foundContZcEvents ) ; simulationData -> mData
-> mFoundZcEvents = tmp ; simulationData -> mData -> mIsMajorTimeStep =
ssIsMajorTimeStep ( rtS ) ; tmp = ( ssGetMdlInfoPtr ( rtS ) -> mdlFlags .
solverAssertCheck == 1U ) ; simulationData -> mData -> mIsSolverAssertCheck =
tmp ; tmp = ssIsSolverCheckingCIC ( rtS ) ; simulationData -> mData ->
mIsSolverCheckingCIC = tmp ; simulationData -> mData -> mIsComputingJacobian
= false ; simulationData -> mData -> mIsEvaluatingF0 = false ; tmp =
ssIsSolverRequestingReset ( rtS ) ; simulationData -> mData ->
mIsSolverRequestingReset = tmp ; tmp_c [ 0 ] = 0 ; tmp_f [ 0 ] = rtB .
ovtibeh1d0 [ 0 ] ; tmp_f [ 1 ] = rtB . ovtibeh1d0 [ 1 ] ; tmp_f [ 2 ] = rtB .
ovtibeh1d0 [ 2 ] ; tmp_f [ 3 ] = rtB . ovtibeh1d0 [ 3 ] ; tmp_c [ 1 ] = 4 ;
tmp_f [ 4 ] = rtB . lqse4ynrzm [ 0 ] ; tmp_f [ 5 ] = rtB . lqse4ynrzm [ 1 ] ;
tmp_f [ 6 ] = rtB . lqse4ynrzm [ 2 ] ; tmp_f [ 7 ] = rtB . lqse4ynrzm [ 3 ] ;
tmp_c [ 2 ] = 8 ; tmp_f [ 8 ] = rtB . ff3f3afyqu [ 0 ] ; tmp_f [ 9 ] = rtB .
ff3f3afyqu [ 1 ] ; tmp_f [ 10 ] = rtB . ff3f3afyqu [ 2 ] ; tmp_f [ 11 ] = rtB
. ff3f3afyqu [ 3 ] ; tmp_c [ 3 ] = 12 ; tmp_f [ 12 ] = rtB . haudqwjsvt [ 0 ]
; tmp_f [ 13 ] = rtB . haudqwjsvt [ 1 ] ; tmp_f [ 14 ] = rtB . haudqwjsvt [ 2
] ; tmp_f [ 15 ] = rtB . haudqwjsvt [ 3 ] ; tmp_c [ 4 ] = 16 ; tmp_f [ 16 ] =
rtB . jd4ipbkqcn [ 0 ] ; tmp_f [ 17 ] = rtB . jd4ipbkqcn [ 1 ] ; tmp_f [ 18 ]
= rtB . jd4ipbkqcn [ 2 ] ; tmp_f [ 19 ] = rtB . jd4ipbkqcn [ 3 ] ; tmp_c [ 5
] = 20 ; tmp_f [ 20 ] = rtB . nmrci2eo0u [ 0 ] ; tmp_f [ 21 ] = rtB .
nmrci2eo0u [ 1 ] ; tmp_f [ 22 ] = rtB . nmrci2eo0u [ 2 ] ; tmp_f [ 23 ] = rtB
. nmrci2eo0u [ 3 ] ; tmp_c [ 6 ] = 24 ; tmp_f [ 24 ] = rtB . k23nignzth [ 0 ]
; tmp_f [ 25 ] = rtB . k23nignzth [ 1 ] ; tmp_f [ 26 ] = rtB . k23nignzth [ 2
] ; tmp_f [ 27 ] = rtB . k23nignzth [ 3 ] ; tmp_c [ 7 ] = 28 ; tmp_f [ 28 ] =
rtB . obhhsomhmg [ 0 ] ; tmp_f [ 29 ] = rtB . obhhsomhmg [ 1 ] ; tmp_f [ 30 ]
= rtB . obhhsomhmg [ 2 ] ; tmp_f [ 31 ] = rtB . obhhsomhmg [ 3 ] ; tmp_c [ 8
] = 32 ; tmp_f [ 32 ] = rtB . ln4c1feyoz [ 0 ] ; tmp_f [ 33 ] = rtB .
ln4c1feyoz [ 1 ] ; tmp_f [ 34 ] = rtB . ln4c1feyoz [ 2 ] ; tmp_f [ 35 ] = rtB
. ln4c1feyoz [ 3 ] ; tmp_c [ 9 ] = 36 ; memcpy ( & tmp_f [ 36 ] , & rtB .
oaw1eysefu [ 0 ] , 12U * sizeof ( real_T ) ) ; tmp_c [ 10 ] = 48 ;
simulationData -> mData -> mInputValues . mN = 48 ; simulationData -> mData
-> mInputValues . mX = & tmp_f [ 0 ] ; simulationData -> mData ->
mInputOffsets . mN = 11 ; simulationData -> mData -> mInputOffsets . mX = &
tmp_c [ 0 ] ; simulationData -> mData -> mOutputs . mN = 22 ; simulationData
-> mData -> mOutputs . mX = & rtB . dkhb1g3uk2 [ 0 ] ; simulationData ->
mData -> mSampleHits . mN = 0 ; simulationData -> mData -> mSampleHits . mX =
NULL ; simulationData -> mData -> mIsFundamentalSampleHit = false ; simulator
= ( NeslSimulator * ) rtDW . mnbjkabvjc ; diagnosticManager = (
NeuDiagnosticManager * ) rtDW . ez0yeisdgv ; diagnosticTree =
neu_diagnostic_manager_get_initial_tree ( diagnosticManager ) ; i =
ne_simulator_method ( simulator , NESL_SIM_OUTPUTS , simulationData ,
diagnosticManager ) ; if ( i != 0 ) { tmp = error_buffer_is_empty (
ssGetErrorStatus ( rtS ) ) ; if ( tmp ) { msg = rtw_diagnostics_msg (
diagnosticTree ) ; ssSetErrorStatus ( rtS , msg ) ; } } rtY . n1fvfkzsvm =
rtB . dkhb1g3uk2 [ 17 ] ; if ( ssGetLogOutput ( rtS ) ) { { if (
rtwTimeInLoggingInterval ( rtliGetLoggingInterval ( ssGetRootSS ( rtS ) ->
mdlInfo -> rtwLogInfo ) , ssGetTaskTime ( rtS , 0 ) ) ) { if (
rt_GetOSigstreamManager ( ) != ( NULL ) ) { void * pSignalProbeCollection = (
void * ) rtDW . cofxnn2uuf . SignalProbe ; if (
rtwSignalProbeCollectionGetLoggingIsOn ( pSignalProbeCollection ) ) { {
real_T t ; void * pData ; t = ssGetTaskTime ( rtS , 0 ) ; pData = ( void * )
& rtB . lg2yozrzfy ; rtwSignalProbeCollectionAppendSample (
pSignalProbeCollection , 0 , t , pData ) ; } } } } } } if ( ssGetLogOutput (
rtS ) ) { { if ( rtwTimeInLoggingInterval ( rtliGetLoggingInterval (
ssGetRootSS ( rtS ) -> mdlInfo -> rtwLogInfo ) , ssGetTaskTime ( rtS , 0 ) )
) { if ( rt_GetOSigstreamManager ( ) != ( NULL ) ) { void *
pSignalProbeCollection = ( void * ) rtDW . mpcwpukrok . SignalProbe ; if (
rtwSignalProbeCollectionGetLoggingIsOn ( pSignalProbeCollection ) ) { {
real_T t ; void * pData ; t = ssGetTaskTime ( rtS , 0 ) ; pData = ( void * )
& rtB . lw3iu32tom ; rtwSignalProbeCollectionAppendSample (
pSignalProbeCollection , 0 , t , pData ) ; } } } } } } if ( ssGetLogOutput (
rtS ) ) { { if ( rtwTimeInLoggingInterval ( rtliGetLoggingInterval (
ssGetRootSS ( rtS ) -> mdlInfo -> rtwLogInfo ) , ssGetTaskTime ( rtS , 0 ) )
) { if ( rt_GetOSigstreamManager ( ) != ( NULL ) ) { void *
pSignalProbeCollection = ( void * ) rtDW . el1dvatmtk . SignalProbe ; if (
rtwSignalProbeCollectionGetLoggingIsOn ( pSignalProbeCollection ) ) { {
real_T t ; void * pData ; t = ssGetTaskTime ( rtS , 0 ) ; pData = ( void * )
& rtB . ng2tca2qig ; rtwSignalProbeCollectionAppendSample (
pSignalProbeCollection , 0 , t , pData ) ; } } } } } } if ( ssGetLogOutput (
rtS ) ) { { if ( rtwTimeInLoggingInterval ( rtliGetLoggingInterval (
ssGetRootSS ( rtS ) -> mdlInfo -> rtwLogInfo ) , ssGetTaskTime ( rtS , 0 ) )
) { if ( rt_GetOSigstreamManager ( ) != ( NULL ) ) { void *
pSignalProbeCollection = ( void * ) rtDW . hntxrt0njy . SignalProbe ; if (
rtwSignalProbeCollectionGetLoggingIsOn ( pSignalProbeCollection ) ) { {
real_T t ; void * pData ; t = ssGetTaskTime ( rtS , 0 ) ; pData = ( void * )
& rtB . dkhb1g3uk2 [ 17 ] ; rtwSignalProbeCollectionAppendSample (
pSignalProbeCollection , 0 , t , pData ) ; } } } } } } if ( ssIsSampleHit (
rtS , 1 , 0 ) ) { zcEvent = rt_ZCFcn ( FALLING_ZERO_CROSSING , & rtPrevZCX .
funryl5lzr , ( rtB . g1wwarzxqu - rtP . event_activation_point ) ) ; if (
rtDW . hfur0htjhx == 0 ) { if ( zcEvent != NO_ZCEVENT ) { rtB . dtznv1ysnm =
! rtB . dtznv1ysnm ; rtDW . hfur0htjhx = 1 ; } else { if ( rtB . dtznv1ysnm
&& ( rtB . g1wwarzxqu != rtP . event_activation_point ) ) { rtB . dtznv1ysnm
= false ; } } } else { if ( rtB . g1wwarzxqu != rtP . event_activation_point
) { rtB . dtznv1ysnm = false ; } rtDW . hfur0htjhx = 0 ; } rtB . dxw5unmemm =
rtDW . n1yz4tjnws ; } if ( rtB . dtznv1ysnm ) { rtB . bk01d3421a = ssGetT (
rtS ) ; } else { rtB . bk01d3421a = rtB . dxw5unmemm ; } if ( ssIsSampleHit (
rtS , 3 , 0 ) ) { taskTimeV = ssGetTaskTime ( rtS , 3 ) ; if (
ssGetTNextWasAdjusted ( rtS , 3 ) ) { rtDW . bjcppn1thz =
_ssGetVarNextHitTime ( rtS , 0 ) ; } if ( rtDW . kuveq4zuwp != 0 ) { rtDW .
kuveq4zuwp = 0 ; if ( taskTimeV >= rtP . Agonistsignal_PhaseDelay ) { ratio =
( taskTimeV - rtP . Agonistsignal_PhaseDelay ) / rtP . Agonistsignal_Period ;
numCycles = ( uint32_T ) muDoubleScalarFloor ( ratio ) ; if (
muDoubleScalarAbs ( ( real_T ) ( numCycles + 1U ) - ratio ) < DBL_EPSILON *
ratio ) { numCycles ++ ; } rtDW . kez34bff0k = numCycles ; ratio = ( ( real_T
) numCycles * rtP . Agonistsignal_Period + rtP . Agonistsignal_PhaseDelay ) +
rtP . Agonistsignal_Duty * rtP . Agonistsignal_Period / 100.0 ; if (
taskTimeV < ratio ) { rtDW . blppzjh4qi = 1 ; rtDW . bjcppn1thz = ratio ; }
else { rtDW . blppzjh4qi = 0 ; rtDW . bjcppn1thz = ( real_T ) ( numCycles +
1U ) * rtP . Agonistsignal_Period + rtP . Agonistsignal_PhaseDelay ; } } else
{ rtDW . kez34bff0k = rtP . Agonistsignal_PhaseDelay != 0.0 ? - 1 : 0 ; rtDW
. blppzjh4qi = 0 ; rtDW . bjcppn1thz = rtP . Agonistsignal_PhaseDelay ; } }
else { if ( rtDW . bjcppn1thz <= taskTimeV ) { if ( rtDW . blppzjh4qi == 1 )
{ rtDW . blppzjh4qi = 0 ; rtDW . bjcppn1thz = ( real_T ) ( rtDW . kez34bff0k
+ 1L ) * rtP . Agonistsignal_Period + rtP . Agonistsignal_PhaseDelay ; } else
{ rtDW . kez34bff0k ++ ; rtDW . blppzjh4qi = 1 ; rtDW . bjcppn1thz = ( rtP .
Agonistsignal_Duty * rtP . Agonistsignal_Period * 0.01 + ( real_T ) rtDW .
kez34bff0k * rtP . Agonistsignal_Period ) + rtP . Agonistsignal_PhaseDelay ;
} } } _ssSetVarNextHitTime ( rtS , 0 , rtDW . bjcppn1thz ) ; if ( rtDW .
blppzjh4qi == 1 ) { rtB . lcum0f1yzq = rtP . Agonistsignal_Amp ; } else { rtB
. lcum0f1yzq = 0.0 ; } } if ( ssIsSampleHit ( rtS , 4 , 0 ) ) { taskTimeV =
ssGetTaskTime ( rtS , 4 ) ; if ( ssGetTNextWasAdjusted ( rtS , 4 ) ) { rtDW .
mvmlg1keqv = _ssGetVarNextHitTime ( rtS , 1 ) ; } if ( rtDW . c12tpuo23h != 0
) { rtDW . c12tpuo23h = 0 ; if ( taskTimeV >= rtP .
Antagonistsignal_PhaseDelay ) { ratio = ( taskTimeV - rtP .
Antagonistsignal_PhaseDelay ) / rtP . Antagonistsignal_Period ; numCycles = (
uint32_T ) muDoubleScalarFloor ( ratio ) ; if ( muDoubleScalarAbs ( ( real_T
) ( numCycles + 1U ) - ratio ) < DBL_EPSILON * ratio ) { numCycles ++ ; }
rtDW . dmotnorrwz = numCycles ; ratio = ( ( real_T ) numCycles * rtP .
Antagonistsignal_Period + rtP . Antagonistsignal_PhaseDelay ) + rtP .
Antagonistsignal_Duty * rtP . Antagonistsignal_Period / 100.0 ; if (
taskTimeV < ratio ) { rtDW . epanpl4bo5 = 1 ; rtDW . mvmlg1keqv = ratio ; }
else { rtDW . epanpl4bo5 = 0 ; rtDW . mvmlg1keqv = ( real_T ) ( numCycles +
1U ) * rtP . Antagonistsignal_Period + rtP . Antagonistsignal_PhaseDelay ; }
} else { rtDW . dmotnorrwz = rtP . Antagonistsignal_PhaseDelay != 0.0 ? - 1 :
0 ; rtDW . epanpl4bo5 = 0 ; rtDW . mvmlg1keqv = rtP .
Antagonistsignal_PhaseDelay ; } } else { if ( rtDW . mvmlg1keqv <= taskTimeV
) { if ( rtDW . epanpl4bo5 == 1 ) { rtDW . epanpl4bo5 = 0 ; rtDW . mvmlg1keqv
= ( real_T ) ( rtDW . dmotnorrwz + 1L ) * rtP . Antagonistsignal_Period + rtP
. Antagonistsignal_PhaseDelay ; } else { rtDW . dmotnorrwz ++ ; rtDW .
epanpl4bo5 = 1 ; rtDW . mvmlg1keqv = ( rtP . Antagonistsignal_Duty * rtP .
Antagonistsignal_Period * 0.01 + ( real_T ) rtDW . dmotnorrwz * rtP .
Antagonistsignal_Period ) + rtP . Antagonistsignal_PhaseDelay ; } } }
_ssSetVarNextHitTime ( rtS , 1 , rtDW . mvmlg1keqv ) ; if ( rtDW . epanpl4bo5
== 1 ) { rtB . a0ravldnd5 = rtP . Antagonistsignal_Amp ; } else { rtB .
a0ravldnd5 = 0.0 ; } } if ( ssIsSampleHit ( rtS , 1 , 0 ) ) { if (
ssGetLogOutput ( rtS ) ) { real_T u [ 2 ] ; u [ 0 ] = ssGetTaskTime ( rtS , 1
) ; ; u [ 1 ] = rtB . dtznv1ysnm ; rt_UpdateLogVar ( ( LogVar * ) rtDW .
bxcvtlkuel . LoggedData , u , 0 ) ; } } if ( ssGetLogOutput ( rtS ) ) {
real_T u [ 2 ] ; u [ 0 ] = ssGetTaskTime ( rtS , 0 ) ; ; u [ 1 ] = rtB .
bk01d3421a ; rt_UpdateLogVar ( ( LogVar * ) rtDW . jl2icbilbs . LoggedData ,
u , 0 ) ; } rtB . ddf5weqqxh = rtB . dkhb1g3uk2 [ 18 ] * rtP .
Constant1_Value_gmm3vtgsci ; if ( ssIsMajorTimeStep ( rtS ) ) { taskTimeV =
rtB . ddf5weqqxh ; rtDW . c43hnhs1tt = 0 ; if ( rtP . u_Value < rtB .
ddf5weqqxh ) { taskTimeV = rtP . u_Value ; rtDW . c43hnhs1tt = 1 ; } rtB .
enehfixmbf = taskTimeV ; } else { taskTimeV = rtB . ddf5weqqxh ; if ( rtDW .
c43hnhs1tt == 1 ) { taskTimeV = rtP . u_Value ; } rtB . enehfixmbf =
taskTimeV ; } rtB . dltpuuez3p = rtB . enehfixmbf / 0.56 + 1.0 ; if (
ssIsMajorTimeStep ( rtS ) ) { taskTimeV = rtB . dltpuuez3p ; rtDW .
h45q1yctgy = 0 ; if ( rtP . u_Value > rtB . dltpuuez3p ) { taskTimeV = rtP .
u_Value ; rtDW . h45q1yctgy = 1 ; } rtB . hknddjbcya = taskTimeV ; } else {
taskTimeV = rtB . dltpuuez3p ; if ( rtDW . h45q1yctgy == 1 ) { taskTimeV =
rtP . u_Value ; } rtB . hknddjbcya = taskTimeV ; } rtB . jybpri32es = rtB .
a0ravldnd5 * rtP . PCSA * rtB . hknddjbcya ; rtB . obckf3tx3n = rtP .
push_begin_height - rtB . dkhb1g3uk2 [ 17 ] ; if ( ssIsMajorTimeStep ( rtS )
) { rtDW . hsfrwxsya2 = rtB . obckf3tx3n >= rtP . Lman ? 1 : rtB . obckf3tx3n
> - rtP . Lman ? 0 : - 1 ; } rtB . pndpkympxv = rtDW . hsfrwxsya2 == 1 ? rtP
. Lman : rtDW . hsfrwxsya2 == - 1 ? - rtP . Lman : rtB . obckf3tx3n ; rtB .
bv1nxloayu = ( muDoubleScalarExp ( 6.0 * rtB . pndpkympxv / 0.07 ) - 1.0 ) *
0.0056000000000000008 + 0.0044800000000000005 * rtB . ddf5weqqxh / 0.07 ; if
( ssIsMajorTimeStep ( rtS ) ) { taskTimeV = rtB . bv1nxloayu ; rtDW .
k1bl1fbklv = 0 ; if ( rtP . u_Value > rtB . bv1nxloayu ) { taskTimeV = rtP .
u_Value ; rtDW . k1bl1fbklv = 1 ; } rtB . lkidmpnzm3 = taskTimeV ; } else {
taskTimeV = rtB . bv1nxloayu ; if ( rtDW . k1bl1fbklv == 1 ) { taskTimeV =
rtP . u_Value ; } rtB . lkidmpnzm3 = taskTimeV ; } rtB . lfj33tlvhv = rtB .
jybpri32es + rtB . lkidmpnzm3 ; rtB . jvcmeesayb [ 0 ] = rtB . lfj33tlvhv ;
rtB . jvcmeesayb [ 1 ] = 0.0 ; rtB . jvcmeesayb [ 2 ] = 0.0 ; rtB .
jvcmeesayb [ 3 ] = 0.0 ; if ( ssIsMajorTimeStep ( rtS ) ) { taskTimeV = rtB .
dkhb1g3uk2 [ 18 ] ; rtDW . e25kemaqnj = 0 ; if ( rtP . u_Value_puyaicdqcr <
taskTimeV ) { taskTimeV = rtP . u_Value_puyaicdqcr ; rtDW . e25kemaqnj = 1 ;
} rtB . f155hqiy51 = taskTimeV ; } else { taskTimeV = rtB . dkhb1g3uk2 [ 18 ]
; if ( rtDW . e25kemaqnj == 1 ) { taskTimeV = rtP . u_Value_puyaicdqcr ; }
rtB . f155hqiy51 = taskTimeV ; } rtB . ezqhral2zf = rtB . f155hqiy51 / 0.56 +
1.0 ; if ( ssIsMajorTimeStep ( rtS ) ) { taskTimeV = rtB . ezqhral2zf ; rtDW
. csingavmu2 = 0 ; if ( rtP . u_Value_puyaicdqcr > rtB . ezqhral2zf ) {
taskTimeV = rtP . u_Value_puyaicdqcr ; rtDW . csingavmu2 = 1 ; } rtB .
lgeftqg1v2 = taskTimeV ; } else { taskTimeV = rtB . ezqhral2zf ; if ( rtDW .
csingavmu2 == 1 ) { taskTimeV = rtP . u_Value_puyaicdqcr ; } rtB . lgeftqg1v2
= taskTimeV ; } rtB . dmbfswqcfr = rtB . lcum0f1yzq * rtP . PCSA * rtB .
lgeftqg1v2 ; rtB . km0glefxt3 = rtB . obckf3tx3n * rtP .
Constant_Value_fmgxt5d2cm ; if ( ssIsMajorTimeStep ( rtS ) ) { rtDW .
b4jf3ud3ai = rtB . km0glefxt3 >= rtP . Lmag ? 1 : rtB . km0glefxt3 > - rtP .
Lmag ? 0 : - 1 ; } rtB . dxtj5vmuky = rtDW . b4jf3ud3ai == 1 ? rtP . Lmag :
rtDW . b4jf3ud3ai == - 1 ? - rtP . Lmag : rtB . km0glefxt3 ; rtB . gv02hfb5em
= ( muDoubleScalarExp ( 6.0 * rtB . dxtj5vmuky / 0.07 ) - 1.0 ) *
0.0056000000000000008 + 0.0044800000000000005 * rtB . dkhb1g3uk2 [ 18 ] /
0.07 ; if ( ssIsMajorTimeStep ( rtS ) ) { taskTimeV = rtB . gv02hfb5em ; rtDW
. jdv5kllov0 = 0 ; if ( rtP . u_Value_puyaicdqcr > rtB . gv02hfb5em ) {
taskTimeV = rtP . u_Value_puyaicdqcr ; rtDW . jdv5kllov0 = 1 ; } rtB .
gqssabhyzg = taskTimeV ; } else { taskTimeV = rtB . gv02hfb5em ; if ( rtDW .
jdv5kllov0 == 1 ) { taskTimeV = rtP . u_Value_puyaicdqcr ; } rtB . gqssabhyzg
= taskTimeV ; } rtB . kx55es4mfd = ( 0.0 - rtB . dmbfswqcfr ) - rtB .
gqssabhyzg ; rtB . lizpk2b4uw [ 0 ] = rtB . kx55es4mfd ; rtB . lizpk2b4uw [ 1
] = 0.0 ; rtB . lizpk2b4uw [ 2 ] = 0.0 ; rtB . lizpk2b4uw [ 3 ] = 0.0 ; rtB .
m1bkcpwqiw = 0.0 ; rtB . m1bkcpwqiw += rtB . jvcmeesayb [ 0 ] ; rtB .
m1bkcpwqiw += rtB . lizpk2b4uw [ 0 ] ; rtB . ovtibeh1d0 [ 0 ] = rtB .
m1bkcpwqiw ; rtB . ovtibeh1d0 [ 1 ] = 0.0 ; rtB . ovtibeh1d0 [ 2 ] = 0.0 ;
rtB . ovtibeh1d0 [ 3 ] = 0.0 ; taskTimeV = muDoubleScalarAbs ( rtB .
dkhb1g3uk2 [ 2 ] ) ; rtB . lne41ncyjt = rtP . button_wide / 2.0 - taskTimeV ;
rtB . khnnoboyvh = muDoubleScalarAbs ( rtB . dkhb1g3uk2 [ 1 ] ) ; rtB .
otp04ddd2k = ( rtP . button_depth / 2.0 + rtP . finger_radius ) - rtB .
khnnoboyvh ; if ( ssIsMajorTimeStep ( rtS ) ) { if ( rtB . otp04ddd2k > rtP .
DeadZone_End ) { rtDW . lhqsqhxrqp = 1 ; } else if ( rtB . otp04ddd2k >= rtP
. DeadZone_Start ) { rtDW . lhqsqhxrqp = 0 ; } else { rtDW . lhqsqhxrqp = - 1
; } } if ( rtDW . lhqsqhxrqp == 1 ) { rtB . ntxdrltybo = rtB . otp04ddd2k -
rtP . DeadZone_End ; } else if ( rtDW . lhqsqhxrqp == - 1 ) { rtB .
ntxdrltybo = rtB . otp04ddd2k - rtP . DeadZone_Start ; } else { rtB .
ntxdrltybo = 0.0 ; } rtB . pisp2otaoh = muDoubleScalarSign ( rtB . dkhb1g3uk2
[ 1 ] ) ; rtB . b0otiiurvg = rtB . pisp2otaoh * rtB . dkhb1g3uk2 [ 3 ] ; rtB
. gcpiprsbxc = rtP . Gain2_Gain * rtB . b0otiiurvg ; rtB . orna5w35wg =
muDoubleScalarSign ( rtB . dkhb1g3uk2 [ 3 ] ) ; memcpy ( & tmp_n [ 0 ] , &
rtB . dkhb1g3uk2 [ 5 ] , 9U * sizeof ( real_T ) ) ; rtB . kbz50beppj [ 0 ] =
tmp_n [ 0 ] ; rtB . kbz50beppj [ 1 ] = tmp_n [ 3 ] ; rtPrevAction = rtDW .
emonwegfxm ; if ( ssIsMajorTimeStep ( rtS ) ) { rtAction = ( int8_T ) ! ( (
rtB . lne41ncyjt > 0.0 ) && ( rtB . ntxdrltybo > 0.0 ) ) ; rtDW . emonwegfxm
= rtAction ; } else { rtAction = rtDW . emonwegfxm ; } if ( rtPrevAction !=
rtAction ) { switch ( rtPrevAction ) { case 0 : ssSetSolverNeedsReset ( rtS )
; break ; case 1 : ssSetSolverNeedsReset ( rtS ) ; break ; } } switch (
rtAction ) { case 0 : if ( rtAction != rtPrevAction ) { if ( ssGetTaskTime (
rtS , 0 ) != ssGetTStart ( rtS ) ) { ssSetSolverNeedsReset ( rtS ) ; } } if (
( rtB . ntxdrltybo < 0.0 ) && ( rtP . Nonlinear_pen_exp > muDoubleScalarFloor
( rtP . Nonlinear_pen_exp ) ) ) { taskTimeV = - muDoubleScalarPower ( - rtB .
ntxdrltybo , rtP . Nonlinear_pen_exp ) ; } else { taskTimeV =
muDoubleScalarPower ( rtB . ntxdrltybo , rtP . Nonlinear_pen_exp ) ; } rtB .
ijclnjata3 = rtP . Fingerpulpspringanddamper_k_contact * taskTimeV ; if ( rtB
. gcpiprsbxc > rtP . Saturation_UpperSat ) { rtB . dn2eeflde4 = rtP .
Saturation_UpperSat ; } else if ( rtB . gcpiprsbxc < rtP .
Saturation_LowerSat ) { rtB . dn2eeflde4 = rtP . Saturation_LowerSat ; } else
{ rtB . dn2eeflde4 = rtB . gcpiprsbxc ; } rtB . demqnvvopw = - rtP .
Fingerpulpspringanddamper_b_contact * rtB . dn2eeflde4 ; if (
ssIsMajorTimeStep ( rtS ) ) { rtDW . dxaou25ip4 = rtB . ntxdrltybo >= rtP .
Nonlinear_pen_full_damping ? 1 : rtB . ntxdrltybo > rtP .
Smoothstep_step_start ? 0 : - 1 ; } rtB . eu52xasafz = rtDW . dxaou25ip4 == 1
? rtP . Nonlinear_pen_full_damping : rtDW . dxaou25ip4 == - 1 ? rtP .
Smoothstep_step_start : rtB . ntxdrltybo ; rtB . klwwh1rt5y = rtB .
eu52xasafz - rtP . Smoothstep_step_start ; rtB . hrh50kmxao = rtB .
klwwh1rt5y / rtB . dvamdxl0x3 ; rtB . ased5x5frn = rtP . Gain_Gain * rtB .
hrh50kmxao ; rtB . omnibro2dp = rtP . Constant_Value - rtB . ased5x5frn ; rtB
. k0nqph0ofz = rtB . omnibro2dp * rtB . hrh50kmxao * rtB . hrh50kmxao * rtB .
duw30np3p4 ; rtB . lxpmqcshqb = rtB . k0nqph0ofz + rtP . Smoothstep_min_out ;
rtB . oz5sen2cqn = rtB . lxpmqcshqb * rtB . demqnvvopw ; rtB . pvrh0j2hcu =
rtB . pisp2otaoh * rtB . ijclnjata3 ; rtB . k4y1faj3l4 = rtB . orna5w35wg *
rtB . oz5sen2cqn ; rtB . poxbb1abbg = rtB . pvrh0j2hcu + rtB . k4y1faj3l4 ;
rtB . hkgyogfg4u = rtB . poxbb1abbg * rtB . dkhb1g3uk2 [ 2 ] ; rtB .
gi0tajlidf [ 3 ] = rtP . Constant1_Value + rtB . poxbb1abbg ; rtB .
h042zqh0s4 [ 0 ] = rtB . poxbb1abbg * rtB . kbz50beppj [ 0 ] ; rtB .
aflsggcafr [ 0 ] = rtP . Components_Gain [ 0 ] * rtB . kbz50beppj [ 0 ] ; rtB
. h042zqh0s4 [ 1 ] = rtB . poxbb1abbg * rtB . kbz50beppj [ 1 ] ; rtB .
aflsggcafr [ 1 ] = rtP . Components_Gain [ 1 ] * rtB . kbz50beppj [ 1 ] ; if
( ssIsSampleHit ( rtS , 1 , 0 ) ) { if ( rtB . dkhb1g3uk2 [ 1 ] > 0.0 ) {
rtDW . lhl4atwnmo = 1 ; } else if ( rtB . dkhb1g3uk2 [ 1 ] < 0.0 ) { rtDW .
lhl4atwnmo = - 1 ; } else { rtDW . lhl4atwnmo = 0 ; } rtB . n1hec2ya3v = rtDW
. lhl4atwnmo ; } rtB . el1gzliv0x = rtP . Constant_Value_jslrqyekbt * rtB .
n1hec2ya3v ; rtB . cchbj1pjnr [ 0 ] = rtB . aflsggcafr [ 0 ] * rtB .
n1hec2ya3v ; rtB . fcti3g1e1q [ 0 ] = rtB . cchbj1pjnr [ 0 ] * rtP .
Constant_Value_jslrqyekbt ; rtB . cchbj1pjnr [ 1 ] = rtB . aflsggcafr [ 1 ] *
rtB . n1hec2ya3v ; rtB . fcti3g1e1q [ 1 ] = rtB . cchbj1pjnr [ 1 ] * rtP .
Constant_Value_jslrqyekbt ; if ( ssIsSampleHit ( rtS , 1 , 0 ) ) { rtB .
gi0tajlidf [ 2 ] = - rtP . finger_radius * rtP . Constant_Value_jslrqyekbt ;
if ( rtB . dkhb1g3uk2 [ 1 ] > 0.0 ) { rtDW . l2cypdvrzk = 1 ; } else if ( rtB
. dkhb1g3uk2 [ 1 ] < 0.0 ) { rtDW . l2cypdvrzk = - 1 ; } else { rtDW .
l2cypdvrzk = 0 ; } } rtB . phtz1bri3h = rtP . Gain_Gain_m4a4dchbue * rtB .
hkgyogfg4u ; rtB . gi0tajlidf [ 5 ] = rtB . aoxyesm2hl + rtB . phtz1bri3h ;
rtB . gi0tajlidf [ 0 ] = rtB . h042zqh0s4 [ 0 ] + rtB . fcti3g1e1q [ 1 ] ;
rtB . gi0tajlidf [ 1 ] = rtB . h042zqh0s4 [ 1 ] + rtB . fcti3g1e1q [ 0 ] ;
rtB . gi0tajlidf [ 4 ] = rtB . el1gzliv0x + rtP . Constant_Value_ezbvxkm0ar ;
rtB . dzojlhjhgl = muDoubleScalarAbs ( rtB . poxbb1abbg ) ; rtB . phlju0ch3w
[ 0 ] = rtB . dzojlhjhgl + rtP . Constant_Value_clsubbfyrf ; rtB . phlju0ch3w
[ 1 ] = rtP . Constant_Value_jslrqyekbt + rtP . Constant_Value_clsubbfyrf ;
if ( ssIsMajorTimeStep ( rtS ) ) { srUpdateBC ( rtDW . m2opywpxzx ) ; } break
; case 1 : if ( rtAction != rtPrevAction ) { if ( ssGetTaskTime ( rtS , 0 )
!= ssGetTStart ( rtS ) ) { ssSetSolverNeedsReset ( rtS ) ; } } if (
ssIsSampleHit ( rtS , 1 , 0 ) ) { rtB . phlju0ch3w [ 0 ] = rtP . Zeros1_Value
[ 0 ] ; rtB . phlju0ch3w [ 1 ] = rtP . Zeros1_Value [ 1 ] ; for ( i = 0 ; i <
6 ; i ++ ) { rtB . gi0tajlidf [ i ] = rtP . Zeros_Value [ i ] ; } } if (
ssIsMajorTimeStep ( rtS ) ) { srUpdateBC ( rtDW . gkndwqqs1r ) ; } break ; }
rtB . fw5lgjovg4 [ 0 ] = rtP . Gain1_Gain * rtB . gi0tajlidf [ 0 ] ; rtB .
fw5lgjovg4 [ 1 ] = rtP . Gain1_Gain * rtB . gi0tajlidf [ 1 ] ; rtB .
fw5lgjovg4 [ 2 ] = rtP . Gain1_Gain * rtB . gi0tajlidf [ 2 ] ; rtB .
lqse4ynrzm [ 0 ] = rtB . fw5lgjovg4 [ 0 ] ; rtB . lqse4ynrzm [ 1 ] = 0.0 ;
rtB . lqse4ynrzm [ 2 ] = 0.0 ; rtB . lqse4ynrzm [ 3 ] = 0.0 ; rtB .
ff3f3afyqu [ 0 ] = rtB . fw5lgjovg4 [ 1 ] ; rtB . ff3f3afyqu [ 1 ] = 0.0 ;
rtB . ff3f3afyqu [ 2 ] = 0.0 ; rtB . ff3f3afyqu [ 3 ] = 0.0 ; rtB .
haudqwjsvt [ 0 ] = rtP . Constant_Value_pwldezlbwh ; rtB . haudqwjsvt [ 1 ] =
0.0 ; rtB . haudqwjsvt [ 2 ] = 0.0 ; if ( ssIsMajorTimeStep ( rtS ) ) { rtDW
. cx1gri5vnc [ 0 ] = ! ( rtB . haudqwjsvt [ 0 ] == rtDW . cx1gri5vnc [ 1 ] )
; rtDW . cx1gri5vnc [ 1 ] = rtB . haudqwjsvt [ 0 ] ; } rtB . haudqwjsvt [ 0 ]
= rtDW . cx1gri5vnc [ 1 ] ; rtB . haudqwjsvt [ 3 ] = rtDW . cx1gri5vnc [ 0 ]
; rtB . jd4ipbkqcn [ 0 ] = rtB . fw5lgjovg4 [ 2 ] ; rtB . jd4ipbkqcn [ 1 ] =
0.0 ; rtB . jd4ipbkqcn [ 2 ] = 0.0 ; rtB . jd4ipbkqcn [ 3 ] = 0.0 ; rtB .
ho1b12vbc2 [ 0 ] = rtP . Gain_Gain_inbizvofh5 * rtB . gi0tajlidf [ 3 ] ; rtB
. ho1b12vbc2 [ 1 ] = rtP . Gain_Gain_inbizvofh5 * rtB . gi0tajlidf [ 4 ] ;
rtB . ho1b12vbc2 [ 2 ] = rtP . Gain_Gain_inbizvofh5 * rtB . gi0tajlidf [ 5 ]
; rtB . nmrci2eo0u [ 0 ] = rtB . ho1b12vbc2 [ 0 ] ; rtB . nmrci2eo0u [ 1 ] =
0.0 ; rtB . nmrci2eo0u [ 2 ] = 0.0 ; rtB . nmrci2eo0u [ 3 ] = 0.0 ; rtB .
k23nignzth [ 0 ] = rtB . ho1b12vbc2 [ 1 ] ; rtB . k23nignzth [ 1 ] = 0.0 ;
rtB . k23nignzth [ 2 ] = 0.0 ; rtB . k23nignzth [ 3 ] = 0.0 ; rtB .
obhhsomhmg [ 0 ] = rtP . Constant_Value_pwldezlbwh ; rtB . obhhsomhmg [ 1 ] =
0.0 ; rtB . obhhsomhmg [ 2 ] = 0.0 ; if ( ssIsMajorTimeStep ( rtS ) ) { rtDW
. lwpz4sngkt [ 0 ] = ! ( rtB . obhhsomhmg [ 0 ] == rtDW . lwpz4sngkt [ 1 ] )
; rtDW . lwpz4sngkt [ 1 ] = rtB . obhhsomhmg [ 0 ] ; } rtB . obhhsomhmg [ 0 ]
= rtDW . lwpz4sngkt [ 1 ] ; rtB . obhhsomhmg [ 3 ] = rtDW . lwpz4sngkt [ 0 ]
; rtB . ln4c1feyoz [ 0 ] = rtB . ho1b12vbc2 [ 2 ] ; rtB . ln4c1feyoz [ 1 ] =
0.0 ; rtB . ln4c1feyoz [ 2 ] = 0.0 ; rtB . ln4c1feyoz [ 3 ] = 0.0 ;
simulationData = ( NeslSimulationData * ) rtDW . io3q1sfthu ; time_m = ssGetT
( rtS ) ; simulationData -> mData -> mTime . mN = 1 ; simulationData -> mData
-> mTime . mX = & time_m ; simulationData -> mData -> mContStates . mN = 0 ;
simulationData -> mData -> mContStates . mX = NULL ; simulationData -> mData
-> mDiscStates . mN = 0 ; simulationData -> mData -> mDiscStates . mX = NULL
; simulationData -> mData -> mModeVector . mN = 0 ; simulationData -> mData
-> mModeVector . mX = NULL ; tmp = ( ssIsMajorTimeStep ( rtS ) &&
ssGetRTWSolverInfo ( rtS ) -> foundContZcEvents ) ; simulationData -> mData
-> mFoundZcEvents = tmp ; simulationData -> mData -> mIsMajorTimeStep =
ssIsMajorTimeStep ( rtS ) ; tmp = ( ssGetMdlInfoPtr ( rtS ) -> mdlFlags .
solverAssertCheck == 1U ) ; simulationData -> mData -> mIsSolverAssertCheck =
tmp ; tmp = ssIsSolverCheckingCIC ( rtS ) ; simulationData -> mData ->
mIsSolverCheckingCIC = tmp ; simulationData -> mData -> mIsComputingJacobian
= false ; simulationData -> mData -> mIsEvaluatingF0 = false ; tmp =
ssIsSolverRequestingReset ( rtS ) ; simulationData -> mData ->
mIsSolverRequestingReset = tmp ; tmp_b [ 0 ] = 0 ; tmp_k [ 0 ] = rtB .
ovtibeh1d0 [ 0 ] ; tmp_k [ 1 ] = rtB . ovtibeh1d0 [ 1 ] ; tmp_k [ 2 ] = rtB .
ovtibeh1d0 [ 2 ] ; tmp_k [ 3 ] = rtB . ovtibeh1d0 [ 3 ] ; tmp_b [ 1 ] = 4 ;
tmp_k [ 4 ] = rtB . lqse4ynrzm [ 0 ] ; tmp_k [ 5 ] = rtB . lqse4ynrzm [ 1 ] ;
tmp_k [ 6 ] = rtB . lqse4ynrzm [ 2 ] ; tmp_k [ 7 ] = rtB . lqse4ynrzm [ 3 ] ;
tmp_b [ 2 ] = 8 ; tmp_k [ 8 ] = rtB . ff3f3afyqu [ 0 ] ; tmp_k [ 9 ] = rtB .
ff3f3afyqu [ 1 ] ; tmp_k [ 10 ] = rtB . ff3f3afyqu [ 2 ] ; tmp_k [ 11 ] = rtB
. ff3f3afyqu [ 3 ] ; tmp_b [ 3 ] = 12 ; tmp_k [ 12 ] = rtB . haudqwjsvt [ 0 ]
; tmp_k [ 13 ] = rtB . haudqwjsvt [ 1 ] ; tmp_k [ 14 ] = rtB . haudqwjsvt [ 2
] ; tmp_k [ 15 ] = rtB . haudqwjsvt [ 3 ] ; tmp_b [ 4 ] = 16 ; tmp_k [ 16 ] =
rtB . jd4ipbkqcn [ 0 ] ; tmp_k [ 17 ] = rtB . jd4ipbkqcn [ 1 ] ; tmp_k [ 18 ]
= rtB . jd4ipbkqcn [ 2 ] ; tmp_k [ 19 ] = rtB . jd4ipbkqcn [ 3 ] ; tmp_b [ 5
] = 20 ; tmp_k [ 20 ] = rtB . nmrci2eo0u [ 0 ] ; tmp_k [ 21 ] = rtB .
nmrci2eo0u [ 1 ] ; tmp_k [ 22 ] = rtB . nmrci2eo0u [ 2 ] ; tmp_k [ 23 ] = rtB
. nmrci2eo0u [ 3 ] ; tmp_b [ 6 ] = 24 ; tmp_k [ 24 ] = rtB . k23nignzth [ 0 ]
; tmp_k [ 25 ] = rtB . k23nignzth [ 1 ] ; tmp_k [ 26 ] = rtB . k23nignzth [ 2
] ; tmp_k [ 27 ] = rtB . k23nignzth [ 3 ] ; tmp_b [ 7 ] = 28 ; tmp_k [ 28 ] =
rtB . obhhsomhmg [ 0 ] ; tmp_k [ 29 ] = rtB . obhhsomhmg [ 1 ] ; tmp_k [ 30 ]
= rtB . obhhsomhmg [ 2 ] ; tmp_k [ 31 ] = rtB . obhhsomhmg [ 3 ] ; tmp_b [ 8
] = 32 ; tmp_k [ 32 ] = rtB . ln4c1feyoz [ 0 ] ; tmp_k [ 33 ] = rtB .
ln4c1feyoz [ 1 ] ; tmp_k [ 34 ] = rtB . ln4c1feyoz [ 2 ] ; tmp_k [ 35 ] = rtB
. ln4c1feyoz [ 3 ] ; tmp_b [ 9 ] = 36 ; memcpy ( & tmp_k [ 36 ] , & rtB .
oaw1eysefu [ 0 ] , 12U * sizeof ( real_T ) ) ; tmp_b [ 10 ] = 48 ;
simulationData -> mData -> mInputValues . mN = 48 ; simulationData -> mData
-> mInputValues . mX = & tmp_k [ 0 ] ; simulationData -> mData ->
mInputOffsets . mN = 11 ; simulationData -> mData -> mInputOffsets . mX = &
tmp_b [ 0 ] ; simulationData -> mData -> mOutputs . mN = 1 ; simulationData
-> mData -> mOutputs . mX = & rtB . c2smay1wnk ; simulationData -> mData ->
mSampleHits . mN = 0 ; simulationData -> mData -> mSampleHits . mX = NULL ;
simulationData -> mData -> mIsFundamentalSampleHit = false ; simulator = (
NeslSimulator * ) rtDW . aj0rcrzpxy ; diagnosticManager = (
NeuDiagnosticManager * ) rtDW . kd0bfuzule ; diagnosticTree =
neu_diagnostic_manager_get_initial_tree ( diagnosticManager ) ; i =
ne_simulator_method ( simulator , NESL_SIM_OUTPUTS , simulationData ,
diagnosticManager ) ; if ( i != 0 ) { tmp = error_buffer_is_empty (
ssGetErrorStatus ( rtS ) ) ; if ( tmp ) { msg = rtw_diagnostics_msg (
diagnosticTree ) ; ssSetErrorStatus ( rtS , msg ) ; } } if ( ssGetLogOutput (
rtS ) ) { real_T u [ 2 ] ; u [ 0 ] = ssGetTaskTime ( rtS , 0 ) ; ; u [ 1 ] =
rtB . c2smay1wnk ; rt_UpdateLogVar ( ( LogVar * ) rtDW . addvjqs5hf .
LoggedData , u , 0 ) ; } if ( ssGetLogOutput ( rtS ) ) { real_T u [ 2 ] ; u [
0 ] = ssGetTaskTime ( rtS , 0 ) ; ; u [ 1 ] = rtB . dkhb1g3uk2 [ 17 ] ;
rt_UpdateLogVar ( ( LogVar * ) rtDW . ee3g5xwvjl . LoggedData , u , 0 ) ; }
if ( ssGetLogOutput ( rtS ) ) { real_T u [ 2 ] ; u [ 0 ] = ssGetTaskTime (
rtS , 0 ) ; ; u [ 1 ] = rtB . dkhb1g3uk2 [ 18 ] ; rt_UpdateLogVar ( ( LogVar
* ) rtDW . nhpmhtywos . LoggedData , u , 0 ) ; } if ( ssIsSampleHit ( rtS , 1
, 0 ) ) { { if ( ssGetLogOutput ( rtS ) ) { sdiSlioSdiWriteSignal ( rtDW .
eaz1lwdqda . AQHandles , rtDW . eaz1lwdqda . SlioLTF , 0 , ssGetTaskTime (
rtS , 1 ) , ( void * ) & rtB . dkhb1g3uk2 [ 15 ] ) ; } } } if (
ssGetLogOutput ( rtS ) ) { real_T u [ 2 ] ; u [ 0 ] = ssGetTaskTime ( rtS , 0
) ; ; u [ 1 ] = rtB . phlju0ch3w [ 0 ] ; rt_UpdateLogVar ( ( LogVar * ) rtDW
. dk2fn24cmw . LoggedData , u , 0 ) ; } if ( ssGetLogOutput ( rtS ) ) {
real_T u [ 2 ] ; u [ 0 ] = ssGetTaskTime ( rtS , 0 ) ; ; u [ 1 ] = rtB .
ntxdrltybo ; rt_UpdateLogVar ( ( LogVar * ) rtDW . eeff4hdnpa . LoggedData ,
u , 0 ) ; } if ( ssGetLogOutput ( rtS ) ) { real_T u [ 2 ] ; u [ 0 ] =
ssGetTaskTime ( rtS , 0 ) ; ; u [ 1 ] = rtB . dkhb1g3uk2 [ 21 ] ;
rt_UpdateLogVar ( ( LogVar * ) rtDW . htnghlqgvc . LoggedData , u , 0 ) ; }
if ( ssIsSampleHit ( rtS , 1 , 0 ) ) { { if ( ssGetLogOutput ( rtS ) ) {
sdiSlioSdiWriteSignal ( rtDW . eaz1lwdqdal . AQHandles , rtDW . eaz1lwdqdal .
SlioLTF , 0 , ssGetTaskTime ( rtS , 1 ) , ( void * ) & rtB . dkhb1g3uk2 [ 19
] ) ; } } } rtB . kncqty2hty [ 0 ] = rtB . dkhb1g3uk2 [ 14 ] ; rtB .
kncqty2hty [ 1 ] = 0.0 ; rtB . kncqty2hty [ 2 ] = 0.0 ; rtB . kncqty2hty [ 3
] = 0.0 ; if ( ssIsMajorTimeStep ( rtS ) ) { rtDW . ffh01ooqox = ( rtB .
bk01d3421a > rtP . Switch_Threshold ) ; } if ( rtDW . ffh01ooqox ) {
taskTimeV = rtB . bk01d3421a ; } else { taskTimeV = rtP .
Penaltyfailedtohit_Value ; } rtB . p4zys2fkma = rtB . oirs135cyq - taskTimeV
; if ( ssIsMajorTimeStep ( rtS ) ) { rtDW . ozvgyexdyx = ( rtB . p4zys2fkma
>= 0.0 ) ; } rtB . jvwqdmto1x = rtDW . ozvgyexdyx > 0 ? rtB . p4zys2fkma : -
rtB . p4zys2fkma ; UNUSED_PARAMETER ( tid ) ; } void MdlOutputsTID5 ( int_T
tid ) { rtB . oirs135cyq = rtP . Goalonsettime_Value ; rtB . dvamdxl0x3 = rtP
. Nonlinear_pen_full_damping - rtP . Smoothstep_step_start ; rtB . duw30np3p4
= rtP . Smoothstep_max_out - rtP . Smoothstep_min_out ; rtB . aoxyesm2hl =
rtP . button_depth / 2.0 * rtP . Constant_Value_jslrqyekbt ; UNUSED_PARAMETER
( tid ) ; } void MdlUpdate ( int_T tid ) { NeslSimulationData *
simulationData ; real_T time ; boolean_T tmp ; real_T tmp_p [ 4 ] ; int_T
tmp_e [ 2 ] ; NeslSimulator * simulator ; NeuDiagnosticManager *
diagnosticManager ; NeuDiagnosticTree * diagnosticTree ; int32_T tmp_i ; char
* msg ; simulationData = ( NeslSimulationData * ) rtDW . am02jbgyuo ; time =
ssGetT ( rtS ) ; simulationData -> mData -> mTime . mN = 1 ; simulationData
-> mData -> mTime . mX = & time ; simulationData -> mData -> mContStates . mN
= 1 ; simulationData -> mData -> mContStates . mX = & rtX . ehudnxzvyt ;
simulationData -> mData -> mDiscStates . mN = 0 ; simulationData -> mData ->
mDiscStates . mX = NULL ; simulationData -> mData -> mModeVector . mN = 1 ;
simulationData -> mData -> mModeVector . mX = & rtDW . gimqkbf2sb ; tmp = (
ssIsMajorTimeStep ( rtS ) && ssGetRTWSolverInfo ( rtS ) -> foundContZcEvents
) ; simulationData -> mData -> mFoundZcEvents = tmp ; simulationData -> mData
-> mIsMajorTimeStep = ssIsMajorTimeStep ( rtS ) ; tmp = ( ssGetMdlInfoPtr (
rtS ) -> mdlFlags . solverAssertCheck == 1U ) ; simulationData -> mData ->
mIsSolverAssertCheck = tmp ; tmp = ssIsSolverCheckingCIC ( rtS ) ;
simulationData -> mData -> mIsSolverCheckingCIC = tmp ; tmp =
ssIsSolverComputingJacobian ( rtS ) ; simulationData -> mData ->
mIsComputingJacobian = tmp ; simulationData -> mData -> mIsEvaluatingF0 = (
ssGetEvaluatingF0ForJacobian ( rtS ) != 0 ) ; tmp = ssIsSolverRequestingReset
( rtS ) ; simulationData -> mData -> mIsSolverRequestingReset = tmp ; tmp_e [
0 ] = 0 ; tmp_p [ 0 ] = rtB . kncqty2hty [ 0 ] ; tmp_p [ 1 ] = rtB .
kncqty2hty [ 1 ] ; tmp_p [ 2 ] = rtB . kncqty2hty [ 2 ] ; tmp_p [ 3 ] = rtB .
kncqty2hty [ 3 ] ; tmp_e [ 1 ] = 4 ; simulationData -> mData -> mInputValues
. mN = 4 ; simulationData -> mData -> mInputValues . mX = & tmp_p [ 0 ] ;
simulationData -> mData -> mInputOffsets . mN = 2 ; simulationData -> mData
-> mInputOffsets . mX = & tmp_e [ 0 ] ; simulator = ( NeslSimulator * ) rtDW
. ofhkw1fpiv ; diagnosticManager = ( NeuDiagnosticManager * ) rtDW .
gz11pk43kf ; diagnosticTree = neu_diagnostic_manager_get_initial_tree (
diagnosticManager ) ; tmp_i = ne_simulator_method ( simulator ,
NESL_SIM_UPDATE , simulationData , diagnosticManager ) ; if ( tmp_i != 0 ) {
tmp = error_buffer_is_empty ( ssGetErrorStatus ( rtS ) ) ; if ( tmp ) { msg =
rtw_diagnostics_msg ( diagnosticTree ) ; ssSetErrorStatus ( rtS , msg ) ; } }
if ( ssIsSampleHit ( rtS , 2 , 0 ) ) { rtDW . etqfqz3gyg =
rt_nrand_Upu32_Yd_f_pw_snf ( & rtDW . gleto30nrn ) * muDoubleScalarSqrt ( rtP
. vision_delay_variance ) + rtP . vision_delay_mean ; } { real_T * * uBuffer
= ( real_T * * ) & rtDW . mvtc05kxt0 . TUbufferPtrs [ 0 ] ; real_T * *
tBuffer = ( real_T * * ) & rtDW . mvtc05kxt0 . TUbufferPtrs [ 1 ] ; real_T *
* xBuffer = ( NULL ) ; real_T simTime = ssGetT ( rtS ) ; real_T appliedDelay
; appliedDelay = rtB . j4b4dlidnd ; if ( appliedDelay > rtP .
VariableTimeDelay_MaxDelay ) { appliedDelay = rtP .
VariableTimeDelay_MaxDelay ; } rtDW . ghetnz132f . Head = ( ( rtDW .
ghetnz132f . Head < ( rtDW . ghetnz132f . CircularBufSize - 1 ) ) ? ( rtDW .
ghetnz132f . Head + 1 ) : 0 ) ; if ( rtDW . ghetnz132f . Head == rtDW .
ghetnz132f . Tail ) { if ( ! rt_TDelayUpdateTailOrGrowBuf ( & rtDW .
ghetnz132f . CircularBufSize , & rtDW . ghetnz132f . Tail , & rtDW .
ghetnz132f . Head , & rtDW . ghetnz132f . Last , simTime - rtP .
VariableTimeDelay_MaxDelay , tBuffer , uBuffer , xBuffer , ( boolean_T ) 0 ,
( boolean_T ) 0 , & rtDW . ghetnz132f . MaxNewBufSize ) ) { ssSetErrorStatus
( rtS , "vtdelay memory allocation error" ) ; return ; } } ( * tBuffer ) [
rtDW . ghetnz132f . Head ] = simTime ; ( * uBuffer ) [ rtDW . ghetnz132f .
Head ] = rtB . g1wwarzxqu ; } if ( ssIsSampleHit ( rtS , 1 , 0 ) ) { rtDW .
bw3zazxffe = rtB . lg2yozrzfy ; } if ( ssIsSampleHit ( rtS , 2 , 0 ) ) { rtDW
. dhtuvbjzws = rt_nrand_Upu32_Yd_f_pw_snf ( & rtDW . fjaw1ltyga ) *
muDoubleScalarSqrt ( rtP . audition_delay_variance ) + rtP .
audition_delay_mean ; } { real_T * * uBuffer = ( real_T * * ) & rtDW .
fe531iiqaq . TUbufferPtrs [ 0 ] ; real_T * * tBuffer = ( real_T * * ) & rtDW
. fe531iiqaq . TUbufferPtrs [ 1 ] ; real_T * * xBuffer = ( NULL ) ; real_T
simTime = ssGetT ( rtS ) ; real_T appliedDelay ; appliedDelay = rtB .
azfilu1oz3 ; if ( appliedDelay > rtP . VariableTimeDelay1_MaxDelay ) {
appliedDelay = rtP . VariableTimeDelay1_MaxDelay ; } rtDW . mzs2owwteo . Head
= ( ( rtDW . mzs2owwteo . Head < ( rtDW . mzs2owwteo . CircularBufSize - 1 )
) ? ( rtDW . mzs2owwteo . Head + 1 ) : 0 ) ; if ( rtDW . mzs2owwteo . Head ==
rtDW . mzs2owwteo . Tail ) { if ( ! rt_TDelayUpdateTailOrGrowBuf ( & rtDW .
mzs2owwteo . CircularBufSize , & rtDW . mzs2owwteo . Tail , & rtDW .
mzs2owwteo . Head , & rtDW . mzs2owwteo . Last , simTime - rtP .
VariableTimeDelay1_MaxDelay , tBuffer , uBuffer , xBuffer , ( boolean_T ) 0 ,
( boolean_T ) 0 , & rtDW . mzs2owwteo . MaxNewBufSize ) ) { ssSetErrorStatus
( rtS , "vtdelay memory allocation error" ) ; return ; } } ( * tBuffer ) [
rtDW . mzs2owwteo . Head ] = simTime ; ( * uBuffer ) [ rtDW . mzs2owwteo .
Head ] = rtB . g1wwarzxqu ; } if ( ssIsSampleHit ( rtS , 1 , 0 ) ) { rtDW .
dmwj50x0ph = rtB . lw3iu32tom ; } if ( ssIsSampleHit ( rtS , 2 , 0 ) ) { rtDW
. hyrr0kb32e = rt_nrand_Upu32_Yd_f_pw_snf ( & rtDW . pu0jjhcotu ) *
muDoubleScalarSqrt ( rtP . tactition_delay_variance ) + rtP .
tactition_delay_mean ; } { real_T * * uBuffer = ( real_T * * ) & rtDW .
g3fwyfyuwt . TUbufferPtrs [ 0 ] ; real_T * * tBuffer = ( real_T * * ) & rtDW
. g3fwyfyuwt . TUbufferPtrs [ 1 ] ; real_T * * xBuffer = ( NULL ) ; real_T
simTime = ssGetT ( rtS ) ; real_T appliedDelay ; appliedDelay = rtB .
jgtkvkn2a3 ; if ( appliedDelay > rtP . VariableTimeDelay2_MaxDelay ) {
appliedDelay = rtP . VariableTimeDelay2_MaxDelay ; } rtDW . njcfvqswzg . Head
= ( ( rtDW . njcfvqswzg . Head < ( rtDW . njcfvqswzg . CircularBufSize - 1 )
) ? ( rtDW . njcfvqswzg . Head + 1 ) : 0 ) ; if ( rtDW . njcfvqswzg . Head ==
rtDW . njcfvqswzg . Tail ) { if ( ! rt_TDelayUpdateTailOrGrowBuf ( & rtDW .
njcfvqswzg . CircularBufSize , & rtDW . njcfvqswzg . Tail , & rtDW .
njcfvqswzg . Head , & rtDW . njcfvqswzg . Last , simTime - rtP .
VariableTimeDelay2_MaxDelay , tBuffer , uBuffer , xBuffer , ( boolean_T ) 0 ,
( boolean_T ) 0 , & rtDW . njcfvqswzg . MaxNewBufSize ) ) { ssSetErrorStatus
( rtS , "vtdelay memory allocation error" ) ; return ; } } ( * tBuffer ) [
rtDW . njcfvqswzg . Head ] = simTime ; ( * uBuffer ) [ rtDW . njcfvqswzg .
Head ] = rtB . g1wwarzxqu ; } if ( ssIsSampleHit ( rtS , 1 , 0 ) ) { rtDW .
d3tsxxr25j = rtB . ng2tca2qig ; rtDW . n1yz4tjnws = rtB . bk01d3421a ; }
UNUSED_PARAMETER ( tid ) ; } void MdlUpdateTID5 ( int_T tid ) {
UNUSED_PARAMETER ( tid ) ; } void MdlDerivatives ( void ) {
NeslSimulationData * simulationData ; real_T time ; boolean_T tmp ; real_T
tmp_p [ 4 ] ; int_T tmp_e [ 2 ] ; NeslSimulator * simulator ;
NeuDiagnosticManager * diagnosticManager ; NeuDiagnosticTree * diagnosticTree
; int32_T tmp_i ; char * msg ; real_T time_p ; real_T tmp_m [ 36 ] ; int_T
tmp_g [ 10 ] ; XDot * _rtXdot ; _rtXdot = ( ( XDot * ) ssGetdX ( rtS ) ) ;
simulationData = ( NeslSimulationData * ) rtDW . am02jbgyuo ; time = ssGetT (
rtS ) ; simulationData -> mData -> mTime . mN = 1 ; simulationData -> mData
-> mTime . mX = & time ; simulationData -> mData -> mContStates . mN = 1 ;
simulationData -> mData -> mContStates . mX = & rtX . ehudnxzvyt ;
simulationData -> mData -> mDiscStates . mN = 0 ; simulationData -> mData ->
mDiscStates . mX = NULL ; simulationData -> mData -> mModeVector . mN = 1 ;
simulationData -> mData -> mModeVector . mX = & rtDW . gimqkbf2sb ; tmp = (
ssIsMajorTimeStep ( rtS ) && ssGetRTWSolverInfo ( rtS ) -> foundContZcEvents
) ; simulationData -> mData -> mFoundZcEvents = tmp ; simulationData -> mData
-> mIsMajorTimeStep = ssIsMajorTimeStep ( rtS ) ; tmp = ( ssGetMdlInfoPtr (
rtS ) -> mdlFlags . solverAssertCheck == 1U ) ; simulationData -> mData ->
mIsSolverAssertCheck = tmp ; tmp = ssIsSolverCheckingCIC ( rtS ) ;
simulationData -> mData -> mIsSolverCheckingCIC = tmp ; tmp =
ssIsSolverComputingJacobian ( rtS ) ; simulationData -> mData ->
mIsComputingJacobian = tmp ; simulationData -> mData -> mIsEvaluatingF0 = (
ssGetEvaluatingF0ForJacobian ( rtS ) != 0 ) ; tmp = ssIsSolverRequestingReset
( rtS ) ; simulationData -> mData -> mIsSolverRequestingReset = tmp ; tmp_e [
0 ] = 0 ; tmp_p [ 0 ] = rtB . kncqty2hty [ 0 ] ; tmp_p [ 1 ] = rtB .
kncqty2hty [ 1 ] ; tmp_p [ 2 ] = rtB . kncqty2hty [ 2 ] ; tmp_p [ 3 ] = rtB .
kncqty2hty [ 3 ] ; tmp_e [ 1 ] = 4 ; simulationData -> mData -> mInputValues
. mN = 4 ; simulationData -> mData -> mInputValues . mX = & tmp_p [ 0 ] ;
simulationData -> mData -> mInputOffsets . mN = 2 ; simulationData -> mData
-> mInputOffsets . mX = & tmp_e [ 0 ] ; simulationData -> mData -> mDx . mN =
1 ; simulationData -> mData -> mDx . mX = & _rtXdot -> ehudnxzvyt ; simulator
= ( NeslSimulator * ) rtDW . ofhkw1fpiv ; diagnosticManager = (
NeuDiagnosticManager * ) rtDW . gz11pk43kf ; diagnosticTree =
neu_diagnostic_manager_get_initial_tree ( diagnosticManager ) ; tmp_i =
ne_simulator_method ( simulator , NESL_SIM_DERIVATIVES , simulationData ,
diagnosticManager ) ; if ( tmp_i != 0 ) { tmp = error_buffer_is_empty (
ssGetErrorStatus ( rtS ) ) ; if ( tmp ) { msg = rtw_diagnostics_msg (
diagnosticTree ) ; ssSetErrorStatus ( rtS , msg ) ; } } { } { } { }
simulationData = ( NeslSimulationData * ) rtDW . k5nthuztl1 ; time_p = ssGetT
( rtS ) ; simulationData -> mData -> mTime . mN = 1 ; simulationData -> mData
-> mTime . mX = & time_p ; simulationData -> mData -> mContStates . mN = 12 ;
simulationData -> mData -> mContStates . mX = ( real_T * ) & rtX . pc4fzp1l4b
; simulationData -> mData -> mDiscStates . mN = 0 ; simulationData -> mData
-> mDiscStates . mX = NULL ; simulationData -> mData -> mModeVector . mN = 0
; simulationData -> mData -> mModeVector . mX = NULL ; tmp = (
ssIsMajorTimeStep ( rtS ) && ssGetRTWSolverInfo ( rtS ) -> foundContZcEvents
) ; simulationData -> mData -> mFoundZcEvents = tmp ; simulationData -> mData
-> mIsMajorTimeStep = ssIsMajorTimeStep ( rtS ) ; tmp = ( ssGetMdlInfoPtr (
rtS ) -> mdlFlags . solverAssertCheck == 1U ) ; simulationData -> mData ->
mIsSolverAssertCheck = tmp ; tmp = ssIsSolverCheckingCIC ( rtS ) ;
simulationData -> mData -> mIsSolverCheckingCIC = tmp ; tmp =
ssIsSolverComputingJacobian ( rtS ) ; simulationData -> mData ->
mIsComputingJacobian = tmp ; simulationData -> mData -> mIsEvaluatingF0 = (
ssGetEvaluatingF0ForJacobian ( rtS ) != 0 ) ; tmp = ssIsSolverRequestingReset
( rtS ) ; simulationData -> mData -> mIsSolverRequestingReset = tmp ; tmp_g [
0 ] = 0 ; tmp_m [ 0 ] = rtB . ovtibeh1d0 [ 0 ] ; tmp_m [ 1 ] = rtB .
ovtibeh1d0 [ 1 ] ; tmp_m [ 2 ] = rtB . ovtibeh1d0 [ 2 ] ; tmp_m [ 3 ] = rtB .
ovtibeh1d0 [ 3 ] ; tmp_g [ 1 ] = 4 ; tmp_m [ 4 ] = rtB . lqse4ynrzm [ 0 ] ;
tmp_m [ 5 ] = rtB . lqse4ynrzm [ 1 ] ; tmp_m [ 6 ] = rtB . lqse4ynrzm [ 2 ] ;
tmp_m [ 7 ] = rtB . lqse4ynrzm [ 3 ] ; tmp_g [ 2 ] = 8 ; tmp_m [ 8 ] = rtB .
ff3f3afyqu [ 0 ] ; tmp_m [ 9 ] = rtB . ff3f3afyqu [ 1 ] ; tmp_m [ 10 ] = rtB
. ff3f3afyqu [ 2 ] ; tmp_m [ 11 ] = rtB . ff3f3afyqu [ 3 ] ; tmp_g [ 3 ] = 12
; tmp_m [ 12 ] = rtB . haudqwjsvt [ 0 ] ; tmp_m [ 13 ] = rtB . haudqwjsvt [ 1
] ; tmp_m [ 14 ] = rtB . haudqwjsvt [ 2 ] ; tmp_m [ 15 ] = rtB . haudqwjsvt [
3 ] ; tmp_g [ 4 ] = 16 ; tmp_m [ 16 ] = rtB . jd4ipbkqcn [ 0 ] ; tmp_m [ 17 ]
= rtB . jd4ipbkqcn [ 1 ] ; tmp_m [ 18 ] = rtB . jd4ipbkqcn [ 2 ] ; tmp_m [ 19
] = rtB . jd4ipbkqcn [ 3 ] ; tmp_g [ 5 ] = 20 ; tmp_m [ 20 ] = rtB .
nmrci2eo0u [ 0 ] ; tmp_m [ 21 ] = rtB . nmrci2eo0u [ 1 ] ; tmp_m [ 22 ] = rtB
. nmrci2eo0u [ 2 ] ; tmp_m [ 23 ] = rtB . nmrci2eo0u [ 3 ] ; tmp_g [ 6 ] = 24
; tmp_m [ 24 ] = rtB . k23nignzth [ 0 ] ; tmp_m [ 25 ] = rtB . k23nignzth [ 1
] ; tmp_m [ 26 ] = rtB . k23nignzth [ 2 ] ; tmp_m [ 27 ] = rtB . k23nignzth [
3 ] ; tmp_g [ 7 ] = 28 ; tmp_m [ 28 ] = rtB . obhhsomhmg [ 0 ] ; tmp_m [ 29 ]
= rtB . obhhsomhmg [ 1 ] ; tmp_m [ 30 ] = rtB . obhhsomhmg [ 2 ] ; tmp_m [ 31
] = rtB . obhhsomhmg [ 3 ] ; tmp_g [ 8 ] = 32 ; tmp_m [ 32 ] = rtB .
ln4c1feyoz [ 0 ] ; tmp_m [ 33 ] = rtB . ln4c1feyoz [ 1 ] ; tmp_m [ 34 ] = rtB
. ln4c1feyoz [ 2 ] ; tmp_m [ 35 ] = rtB . ln4c1feyoz [ 3 ] ; tmp_g [ 9 ] = 36
; simulationData -> mData -> mInputValues . mN = 36 ; simulationData -> mData
-> mInputValues . mX = & tmp_m [ 0 ] ; simulationData -> mData ->
mInputOffsets . mN = 10 ; simulationData -> mData -> mInputOffsets . mX = &
tmp_g [ 0 ] ; simulationData -> mData -> mDx . mN = 12 ; simulationData ->
mData -> mDx . mX = ( real_T * ) & _rtXdot -> pc4fzp1l4b ; simulator = (
NeslSimulator * ) rtDW . ep1wb3gqvb ; diagnosticManager = (
NeuDiagnosticManager * ) rtDW . b4v4mhacua ; diagnosticTree =
neu_diagnostic_manager_get_initial_tree ( diagnosticManager ) ; tmp_i =
ne_simulator_method ( simulator , NESL_SIM_DERIVATIVES , simulationData ,
diagnosticManager ) ; if ( tmp_i != 0 ) { tmp = error_buffer_is_empty (
ssGetErrorStatus ( rtS ) ) ; if ( tmp ) { msg = rtw_diagnostics_msg (
diagnosticTree ) ; ssSetErrorStatus ( rtS , msg ) ; } } } void MdlProjection
( void ) { NeslSimulationData * simulationData ; real_T time ; boolean_T tmp
; real_T tmp_p [ 36 ] ; int_T tmp_e [ 10 ] ; NeslSimulator * simulator ;
NeuDiagnosticManager * diagnosticManager ; NeuDiagnosticTree * diagnosticTree
; int32_T tmp_i ; char * msg ; simulationData = ( NeslSimulationData * ) rtDW
. k5nthuztl1 ; time = ssGetT ( rtS ) ; simulationData -> mData -> mTime . mN
= 1 ; simulationData -> mData -> mTime . mX = & time ; simulationData ->
mData -> mContStates . mN = 12 ; simulationData -> mData -> mContStates . mX
= ( real_T * ) & rtX . pc4fzp1l4b ; simulationData -> mData -> mDiscStates .
mN = 0 ; simulationData -> mData -> mDiscStates . mX = NULL ; simulationData
-> mData -> mModeVector . mN = 0 ; simulationData -> mData -> mModeVector .
mX = NULL ; tmp = ( ssIsMajorTimeStep ( rtS ) && ssGetRTWSolverInfo ( rtS )
-> foundContZcEvents ) ; simulationData -> mData -> mFoundZcEvents = tmp ;
simulationData -> mData -> mIsMajorTimeStep = ssIsMajorTimeStep ( rtS ) ; tmp
= ( ssGetMdlInfoPtr ( rtS ) -> mdlFlags . solverAssertCheck == 1U ) ;
simulationData -> mData -> mIsSolverAssertCheck = tmp ; tmp =
ssIsSolverCheckingCIC ( rtS ) ; simulationData -> mData ->
mIsSolverCheckingCIC = tmp ; tmp = ssIsSolverComputingJacobian ( rtS ) ;
simulationData -> mData -> mIsComputingJacobian = tmp ; simulationData ->
mData -> mIsEvaluatingF0 = ( ssGetEvaluatingF0ForJacobian ( rtS ) != 0 ) ;
tmp = ssIsSolverRequestingReset ( rtS ) ; simulationData -> mData ->
mIsSolverRequestingReset = tmp ; tmp_e [ 0 ] = 0 ; tmp_p [ 0 ] = rtB .
ovtibeh1d0 [ 0 ] ; tmp_p [ 1 ] = rtB . ovtibeh1d0 [ 1 ] ; tmp_p [ 2 ] = rtB .
ovtibeh1d0 [ 2 ] ; tmp_p [ 3 ] = rtB . ovtibeh1d0 [ 3 ] ; tmp_e [ 1 ] = 4 ;
tmp_p [ 4 ] = rtB . lqse4ynrzm [ 0 ] ; tmp_p [ 5 ] = rtB . lqse4ynrzm [ 1 ] ;
tmp_p [ 6 ] = rtB . lqse4ynrzm [ 2 ] ; tmp_p [ 7 ] = rtB . lqse4ynrzm [ 3 ] ;
tmp_e [ 2 ] = 8 ; tmp_p [ 8 ] = rtB . ff3f3afyqu [ 0 ] ; tmp_p [ 9 ] = rtB .
ff3f3afyqu [ 1 ] ; tmp_p [ 10 ] = rtB . ff3f3afyqu [ 2 ] ; tmp_p [ 11 ] = rtB
. ff3f3afyqu [ 3 ] ; tmp_e [ 3 ] = 12 ; tmp_p [ 12 ] = rtB . haudqwjsvt [ 0 ]
; tmp_p [ 13 ] = rtB . haudqwjsvt [ 1 ] ; tmp_p [ 14 ] = rtB . haudqwjsvt [ 2
] ; tmp_p [ 15 ] = rtB . haudqwjsvt [ 3 ] ; tmp_e [ 4 ] = 16 ; tmp_p [ 16 ] =
rtB . jd4ipbkqcn [ 0 ] ; tmp_p [ 17 ] = rtB . jd4ipbkqcn [ 1 ] ; tmp_p [ 18 ]
= rtB . jd4ipbkqcn [ 2 ] ; tmp_p [ 19 ] = rtB . jd4ipbkqcn [ 3 ] ; tmp_e [ 5
] = 20 ; tmp_p [ 20 ] = rtB . nmrci2eo0u [ 0 ] ; tmp_p [ 21 ] = rtB .
nmrci2eo0u [ 1 ] ; tmp_p [ 22 ] = rtB . nmrci2eo0u [ 2 ] ; tmp_p [ 23 ] = rtB
. nmrci2eo0u [ 3 ] ; tmp_e [ 6 ] = 24 ; tmp_p [ 24 ] = rtB . k23nignzth [ 0 ]
; tmp_p [ 25 ] = rtB . k23nignzth [ 1 ] ; tmp_p [ 26 ] = rtB . k23nignzth [ 2
] ; tmp_p [ 27 ] = rtB . k23nignzth [ 3 ] ; tmp_e [ 7 ] = 28 ; tmp_p [ 28 ] =
rtB . obhhsomhmg [ 0 ] ; tmp_p [ 29 ] = rtB . obhhsomhmg [ 1 ] ; tmp_p [ 30 ]
= rtB . obhhsomhmg [ 2 ] ; tmp_p [ 31 ] = rtB . obhhsomhmg [ 3 ] ; tmp_e [ 8
] = 32 ; tmp_p [ 32 ] = rtB . ln4c1feyoz [ 0 ] ; tmp_p [ 33 ] = rtB .
ln4c1feyoz [ 1 ] ; tmp_p [ 34 ] = rtB . ln4c1feyoz [ 2 ] ; tmp_p [ 35 ] = rtB
. ln4c1feyoz [ 3 ] ; tmp_e [ 9 ] = 36 ; simulationData -> mData ->
mInputValues . mN = 36 ; simulationData -> mData -> mInputValues . mX = &
tmp_p [ 0 ] ; simulationData -> mData -> mInputOffsets . mN = 10 ;
simulationData -> mData -> mInputOffsets . mX = & tmp_e [ 0 ] ; simulator = (
NeslSimulator * ) rtDW . ep1wb3gqvb ; diagnosticManager = (
NeuDiagnosticManager * ) rtDW . b4v4mhacua ; diagnosticTree =
neu_diagnostic_manager_get_initial_tree ( diagnosticManager ) ; tmp_i =
ne_simulator_method ( simulator , NESL_SIM_PROJECTION , simulationData ,
diagnosticManager ) ; if ( tmp_i != 0 ) { tmp = error_buffer_is_empty (
ssGetErrorStatus ( rtS ) ) ; if ( tmp ) { msg = rtw_diagnostics_msg (
diagnosticTree ) ; ssSetErrorStatus ( rtS , msg ) ; } } } void
MdlForcingFunction ( void ) { NeslSimulationData * simulationData ; real_T
time ; boolean_T tmp ; real_T tmp_p [ 4 ] ; int_T tmp_e [ 2 ] ; NeslSimulator
* simulator ; NeuDiagnosticManager * diagnosticManager ; NeuDiagnosticTree *
diagnosticTree ; int32_T tmp_i ; char * msg ; real_T time_p ; real_T tmp_m [
36 ] ; int_T tmp_g [ 10 ] ; XDot * _rtXdot ; _rtXdot = ( ( XDot * ) ssGetdX (
rtS ) ) ; simulationData = ( NeslSimulationData * ) rtDW . am02jbgyuo ; time
= ssGetT ( rtS ) ; simulationData -> mData -> mTime . mN = 1 ; simulationData
-> mData -> mTime . mX = & time ; simulationData -> mData -> mContStates . mN
= 1 ; simulationData -> mData -> mContStates . mX = & rtX . ehudnxzvyt ;
simulationData -> mData -> mDiscStates . mN = 0 ; simulationData -> mData ->
mDiscStates . mX = NULL ; simulationData -> mData -> mModeVector . mN = 1 ;
simulationData -> mData -> mModeVector . mX = & rtDW . gimqkbf2sb ; tmp = (
ssIsMajorTimeStep ( rtS ) && ssGetRTWSolverInfo ( rtS ) -> foundContZcEvents
) ; simulationData -> mData -> mFoundZcEvents = tmp ; simulationData -> mData
-> mIsMajorTimeStep = ssIsMajorTimeStep ( rtS ) ; tmp = ( ssGetMdlInfoPtr (
rtS ) -> mdlFlags . solverAssertCheck == 1U ) ; simulationData -> mData ->
mIsSolverAssertCheck = tmp ; tmp = ssIsSolverCheckingCIC ( rtS ) ;
simulationData -> mData -> mIsSolverCheckingCIC = tmp ; tmp =
ssIsSolverComputingJacobian ( rtS ) ; simulationData -> mData ->
mIsComputingJacobian = tmp ; simulationData -> mData -> mIsEvaluatingF0 = (
ssGetEvaluatingF0ForJacobian ( rtS ) != 0 ) ; tmp = ssIsSolverRequestingReset
( rtS ) ; simulationData -> mData -> mIsSolverRequestingReset = tmp ; tmp_e [
0 ] = 0 ; tmp_p [ 0 ] = rtB . kncqty2hty [ 0 ] ; tmp_p [ 1 ] = rtB .
kncqty2hty [ 1 ] ; tmp_p [ 2 ] = rtB . kncqty2hty [ 2 ] ; tmp_p [ 3 ] = rtB .
kncqty2hty [ 3 ] ; tmp_e [ 1 ] = 4 ; simulationData -> mData -> mInputValues
. mN = 4 ; simulationData -> mData -> mInputValues . mX = & tmp_p [ 0 ] ;
simulationData -> mData -> mInputOffsets . mN = 2 ; simulationData -> mData
-> mInputOffsets . mX = & tmp_e [ 0 ] ; simulationData -> mData -> mDx . mN =
1 ; simulationData -> mData -> mDx . mX = & _rtXdot -> ehudnxzvyt ; simulator
= ( NeslSimulator * ) rtDW . ofhkw1fpiv ; diagnosticManager = (
NeuDiagnosticManager * ) rtDW . gz11pk43kf ; diagnosticTree =
neu_diagnostic_manager_get_initial_tree ( diagnosticManager ) ; tmp_i =
ne_simulator_method ( simulator , NESL_SIM_FORCINGFUNCTION , simulationData ,
diagnosticManager ) ; if ( tmp_i != 0 ) { tmp = error_buffer_is_empty (
ssGetErrorStatus ( rtS ) ) ; if ( tmp ) { msg = rtw_diagnostics_msg (
diagnosticTree ) ; ssSetErrorStatus ( rtS , msg ) ; } } { } { } { }
simulationData = ( NeslSimulationData * ) rtDW . k5nthuztl1 ; time_p = ssGetT
( rtS ) ; simulationData -> mData -> mTime . mN = 1 ; simulationData -> mData
-> mTime . mX = & time_p ; simulationData -> mData -> mContStates . mN = 12 ;
simulationData -> mData -> mContStates . mX = ( real_T * ) & rtX . pc4fzp1l4b
; simulationData -> mData -> mDiscStates . mN = 0 ; simulationData -> mData
-> mDiscStates . mX = NULL ; simulationData -> mData -> mModeVector . mN = 0
; simulationData -> mData -> mModeVector . mX = NULL ; tmp = (
ssIsMajorTimeStep ( rtS ) && ssGetRTWSolverInfo ( rtS ) -> foundContZcEvents
) ; simulationData -> mData -> mFoundZcEvents = tmp ; simulationData -> mData
-> mIsMajorTimeStep = ssIsMajorTimeStep ( rtS ) ; tmp = ( ssGetMdlInfoPtr (
rtS ) -> mdlFlags . solverAssertCheck == 1U ) ; simulationData -> mData ->
mIsSolverAssertCheck = tmp ; tmp = ssIsSolverCheckingCIC ( rtS ) ;
simulationData -> mData -> mIsSolverCheckingCIC = tmp ; tmp =
ssIsSolverComputingJacobian ( rtS ) ; simulationData -> mData ->
mIsComputingJacobian = tmp ; simulationData -> mData -> mIsEvaluatingF0 = (
ssGetEvaluatingF0ForJacobian ( rtS ) != 0 ) ; tmp = ssIsSolverRequestingReset
( rtS ) ; simulationData -> mData -> mIsSolverRequestingReset = tmp ; tmp_g [
0 ] = 0 ; tmp_m [ 0 ] = rtB . ovtibeh1d0 [ 0 ] ; tmp_m [ 1 ] = rtB .
ovtibeh1d0 [ 1 ] ; tmp_m [ 2 ] = rtB . ovtibeh1d0 [ 2 ] ; tmp_m [ 3 ] = rtB .
ovtibeh1d0 [ 3 ] ; tmp_g [ 1 ] = 4 ; tmp_m [ 4 ] = rtB . lqse4ynrzm [ 0 ] ;
tmp_m [ 5 ] = rtB . lqse4ynrzm [ 1 ] ; tmp_m [ 6 ] = rtB . lqse4ynrzm [ 2 ] ;
tmp_m [ 7 ] = rtB . lqse4ynrzm [ 3 ] ; tmp_g [ 2 ] = 8 ; tmp_m [ 8 ] = rtB .
ff3f3afyqu [ 0 ] ; tmp_m [ 9 ] = rtB . ff3f3afyqu [ 1 ] ; tmp_m [ 10 ] = rtB
. ff3f3afyqu [ 2 ] ; tmp_m [ 11 ] = rtB . ff3f3afyqu [ 3 ] ; tmp_g [ 3 ] = 12
; tmp_m [ 12 ] = rtB . haudqwjsvt [ 0 ] ; tmp_m [ 13 ] = rtB . haudqwjsvt [ 1
] ; tmp_m [ 14 ] = rtB . haudqwjsvt [ 2 ] ; tmp_m [ 15 ] = rtB . haudqwjsvt [
3 ] ; tmp_g [ 4 ] = 16 ; tmp_m [ 16 ] = rtB . jd4ipbkqcn [ 0 ] ; tmp_m [ 17 ]
= rtB . jd4ipbkqcn [ 1 ] ; tmp_m [ 18 ] = rtB . jd4ipbkqcn [ 2 ] ; tmp_m [ 19
] = rtB . jd4ipbkqcn [ 3 ] ; tmp_g [ 5 ] = 20 ; tmp_m [ 20 ] = rtB .
nmrci2eo0u [ 0 ] ; tmp_m [ 21 ] = rtB . nmrci2eo0u [ 1 ] ; tmp_m [ 22 ] = rtB
. nmrci2eo0u [ 2 ] ; tmp_m [ 23 ] = rtB . nmrci2eo0u [ 3 ] ; tmp_g [ 6 ] = 24
; tmp_m [ 24 ] = rtB . k23nignzth [ 0 ] ; tmp_m [ 25 ] = rtB . k23nignzth [ 1
] ; tmp_m [ 26 ] = rtB . k23nignzth [ 2 ] ; tmp_m [ 27 ] = rtB . k23nignzth [
3 ] ; tmp_g [ 7 ] = 28 ; tmp_m [ 28 ] = rtB . obhhsomhmg [ 0 ] ; tmp_m [ 29 ]
= rtB . obhhsomhmg [ 1 ] ; tmp_m [ 30 ] = rtB . obhhsomhmg [ 2 ] ; tmp_m [ 31
] = rtB . obhhsomhmg [ 3 ] ; tmp_g [ 8 ] = 32 ; tmp_m [ 32 ] = rtB .
ln4c1feyoz [ 0 ] ; tmp_m [ 33 ] = rtB . ln4c1feyoz [ 1 ] ; tmp_m [ 34 ] = rtB
. ln4c1feyoz [ 2 ] ; tmp_m [ 35 ] = rtB . ln4c1feyoz [ 3 ] ; tmp_g [ 9 ] = 36
; simulationData -> mData -> mInputValues . mN = 36 ; simulationData -> mData
-> mInputValues . mX = & tmp_m [ 0 ] ; simulationData -> mData ->
mInputOffsets . mN = 10 ; simulationData -> mData -> mInputOffsets . mX = &
tmp_g [ 0 ] ; simulationData -> mData -> mDx . mN = 12 ; simulationData ->
mData -> mDx . mX = ( real_T * ) & _rtXdot -> pc4fzp1l4b ; simulator = (
NeslSimulator * ) rtDW . ep1wb3gqvb ; diagnosticManager = (
NeuDiagnosticManager * ) rtDW . b4v4mhacua ; diagnosticTree =
neu_diagnostic_manager_get_initial_tree ( diagnosticManager ) ; tmp_i =
ne_simulator_method ( simulator , NESL_SIM_DERIVATIVES , simulationData ,
diagnosticManager ) ; if ( tmp_i != 0 ) { tmp = error_buffer_is_empty (
ssGetErrorStatus ( rtS ) ) ; if ( tmp ) { msg = rtw_diagnostics_msg (
diagnosticTree ) ; ssSetErrorStatus ( rtS , msg ) ; } } } void MdlMassMatrix
( void ) { NeslSimulationData * simulationData ; real_T time ; boolean_T tmp
; real_T tmp_p [ 4 ] ; int_T tmp_e [ 2 ] ; real_T * tmp_i ; NeslSimulator *
simulator ; NeuDiagnosticManager * diagnosticManager ; NeuDiagnosticTree *
diagnosticTree ; int32_T tmp_m ; char * msg ; simulationData = (
NeslSimulationData * ) rtDW . am02jbgyuo ; time = ssGetT ( rtS ) ;
simulationData -> mData -> mTime . mN = 1 ; simulationData -> mData -> mTime
. mX = & time ; simulationData -> mData -> mContStates . mN = 1 ;
simulationData -> mData -> mContStates . mX = & rtX . ehudnxzvyt ;
simulationData -> mData -> mDiscStates . mN = 0 ; simulationData -> mData ->
mDiscStates . mX = NULL ; simulationData -> mData -> mModeVector . mN = 1 ;
simulationData -> mData -> mModeVector . mX = & rtDW . gimqkbf2sb ; tmp = (
ssIsMajorTimeStep ( rtS ) && ssGetRTWSolverInfo ( rtS ) -> foundContZcEvents
) ; simulationData -> mData -> mFoundZcEvents = tmp ; simulationData -> mData
-> mIsMajorTimeStep = ssIsMajorTimeStep ( rtS ) ; tmp = ( ssGetMdlInfoPtr (
rtS ) -> mdlFlags . solverAssertCheck == 1U ) ; simulationData -> mData ->
mIsSolverAssertCheck = tmp ; tmp = ssIsSolverCheckingCIC ( rtS ) ;
simulationData -> mData -> mIsSolverCheckingCIC = tmp ; tmp =
ssIsSolverComputingJacobian ( rtS ) ; simulationData -> mData ->
mIsComputingJacobian = tmp ; simulationData -> mData -> mIsEvaluatingF0 = (
ssGetEvaluatingF0ForJacobian ( rtS ) != 0 ) ; tmp = ssIsSolverRequestingReset
( rtS ) ; simulationData -> mData -> mIsSolverRequestingReset = tmp ; tmp_e [
0 ] = 0 ; tmp_p [ 0 ] = rtB . kncqty2hty [ 0 ] ; tmp_p [ 1 ] = rtB .
kncqty2hty [ 1 ] ; tmp_p [ 2 ] = rtB . kncqty2hty [ 2 ] ; tmp_p [ 3 ] = rtB .
kncqty2hty [ 3 ] ; tmp_e [ 1 ] = 4 ; simulationData -> mData -> mInputValues
. mN = 4 ; simulationData -> mData -> mInputValues . mX = & tmp_p [ 0 ] ;
simulationData -> mData -> mInputOffsets . mN = 2 ; simulationData -> mData
-> mInputOffsets . mX = & tmp_e [ 0 ] ; tmp_i = rtMassMatrix . pr ; tmp_i =
double_pointer_shift ( tmp_i , rtDW . jg5tmg0ghy ) ; simulationData -> mData
-> mMassMatrixPr . mN = 1 ; simulationData -> mData -> mMassMatrixPr . mX =
tmp_i ; simulator = ( NeslSimulator * ) rtDW . ofhkw1fpiv ; diagnosticManager
= ( NeuDiagnosticManager * ) rtDW . gz11pk43kf ; diagnosticTree =
neu_diagnostic_manager_get_initial_tree ( diagnosticManager ) ; tmp_m =
ne_simulator_method ( simulator , NESL_SIM_MASSMATRIX , simulationData ,
diagnosticManager ) ; if ( tmp_m != 0 ) { tmp = error_buffer_is_empty (
ssGetErrorStatus ( rtS ) ) ; if ( tmp ) { msg = rtw_diagnostics_msg (
diagnosticTree ) ; ssSetErrorStatus ( rtS , msg ) ; } } } void
MdlZeroCrossings ( void ) { NeslSimulationData * simulationData ; real_T time
; boolean_T tmp ; real_T tmp_p [ 4 ] ; int_T tmp_e [ 2 ] ; NeslSimulator *
simulator ; NeuDiagnosticManager * diagnosticManager ; NeuDiagnosticTree *
diagnosticTree ; int32_T tmp_i ; char * msg ; ZCV * _rtZCSV ; _rtZCSV = ( (
ZCV * ) ssGetSolverZcSignalVector ( rtS ) ) ; simulationData = (
NeslSimulationData * ) rtDW . am02jbgyuo ; time = ssGetT ( rtS ) ;
simulationData -> mData -> mTime . mN = 1 ; simulationData -> mData -> mTime
. mX = & time ; simulationData -> mData -> mContStates . mN = 1 ;
simulationData -> mData -> mContStates . mX = & rtX . ehudnxzvyt ;
simulationData -> mData -> mDiscStates . mN = 0 ; simulationData -> mData ->
mDiscStates . mX = NULL ; simulationData -> mData -> mModeVector . mN = 1 ;
simulationData -> mData -> mModeVector . mX = & rtDW . gimqkbf2sb ; tmp = (
ssIsMajorTimeStep ( rtS ) && ssGetRTWSolverInfo ( rtS ) -> foundContZcEvents
) ; simulationData -> mData -> mFoundZcEvents = tmp ; simulationData -> mData
-> mIsMajorTimeStep = ssIsMajorTimeStep ( rtS ) ; tmp = ( ssGetMdlInfoPtr (
rtS ) -> mdlFlags . solverAssertCheck == 1U ) ; simulationData -> mData ->
mIsSolverAssertCheck = tmp ; tmp = ssIsSolverCheckingCIC ( rtS ) ;
simulationData -> mData -> mIsSolverCheckingCIC = tmp ; tmp =
ssIsSolverComputingJacobian ( rtS ) ; simulationData -> mData ->
mIsComputingJacobian = tmp ; simulationData -> mData -> mIsEvaluatingF0 = (
ssGetEvaluatingF0ForJacobian ( rtS ) != 0 ) ; tmp = ssIsSolverRequestingReset
( rtS ) ; simulationData -> mData -> mIsSolverRequestingReset = tmp ; tmp_e [
0 ] = 0 ; tmp_p [ 0 ] = rtB . kncqty2hty [ 0 ] ; tmp_p [ 1 ] = rtB .
kncqty2hty [ 1 ] ; tmp_p [ 2 ] = rtB . kncqty2hty [ 2 ] ; tmp_p [ 3 ] = rtB .
kncqty2hty [ 3 ] ; tmp_e [ 1 ] = 4 ; simulationData -> mData -> mInputValues
. mN = 4 ; simulationData -> mData -> mInputValues . mX = & tmp_p [ 0 ] ;
simulationData -> mData -> mInputOffsets . mN = 2 ; simulationData -> mData
-> mInputOffsets . mX = & tmp_e [ 0 ] ; simulationData -> mData ->
mNonSampledZCs . mN = 1 ; simulationData -> mData -> mNonSampledZCs . mX = &
_rtZCSV -> olpicoo25l ; simulator = ( NeslSimulator * ) rtDW . ofhkw1fpiv ;
diagnosticManager = ( NeuDiagnosticManager * ) rtDW . gz11pk43kf ;
diagnosticTree = neu_diagnostic_manager_get_initial_tree ( diagnosticManager
) ; tmp_i = ne_simulator_method ( simulator , NESL_SIM_ZEROCROSSINGS ,
simulationData , diagnosticManager ) ; if ( tmp_i != 0 ) { tmp =
error_buffer_is_empty ( ssGetErrorStatus ( rtS ) ) ; if ( tmp ) { msg =
rtw_diagnostics_msg ( diagnosticTree ) ; ssSetErrorStatus ( rtS , msg ) ; } }
_rtZCSV -> fbn4ugo0px = rtB . ffkfmqmib4 - rtP .
DetectEventwiththreshold_Offset ; if ( rtDW . buwuj5xff3 == 0 ) { _rtZCSV ->
hoqmkba5jc = ( ( rtB . ffkfmqmib4 - rtP . DetectEventwiththreshold_Offset ) *
( real_T ) rtB . fb0jzz1kwz != 0.0 ) ; } else { _rtZCSV -> hoqmkba5jc =
ssGetT ( rtS ) - ssGetTimeOfLastOutput ( rtS ) ; } _rtZCSV -> ctudvovdfe =
rtB . acaxiwl5f3 - rtP . DetectEventwiththreshold1_Offset ; if ( rtDW .
kne5vma2eo == 0 ) { _rtZCSV -> low4iqq4xb = ( ( rtB . acaxiwl5f3 - rtP .
DetectEventwiththreshold1_Offset ) * ( real_T ) rtB . ebzzunjuhk != 0.0 ) ; }
else { _rtZCSV -> low4iqq4xb = ssGetT ( rtS ) - ssGetTimeOfLastOutput ( rtS )
; } _rtZCSV -> h2dy05z3nt = rtB . nzmot1eucf - rtP .
DetectEventwiththreshold2_Offset ; if ( rtDW . nu3jbog3i2 == 0 ) { _rtZCSV ->
ibfht2qggb = ( ( rtB . nzmot1eucf - rtP . DetectEventwiththreshold2_Offset )
* ( real_T ) rtB . nfnmf5y0gd != 0.0 ) ; } else { _rtZCSV -> ibfht2qggb =
ssGetT ( rtS ) - ssGetTimeOfLastOutput ( rtS ) ; } _rtZCSV -> atq40virjz =
rtB . g1wwarzxqu - rtP . event_activation_point ; if ( rtDW . hfur0htjhx == 0
) { _rtZCSV -> neeokkkjcj = ( ( rtB . g1wwarzxqu - rtP .
event_activation_point ) * ( real_T ) rtB . dtznv1ysnm != 0.0 ) ; } else {
_rtZCSV -> neeokkkjcj = ssGetT ( rtS ) - ssGetTimeOfLastOutput ( rtS ) ; } if
( rtB . ddf5weqqxh < rtP . u_Value ) { if ( rtDW . c43hnhs1tt == 0 ) {
_rtZCSV -> cc3kwmmph3 = rtB . ddf5weqqxh - rtB . ddf5weqqxh ; } else {
_rtZCSV -> cc3kwmmph3 = rtB . ddf5weqqxh - rtP . u_Value ; } } else if ( rtDW
. c43hnhs1tt == 0 ) { _rtZCSV -> cc3kwmmph3 = rtP . u_Value - rtB .
ddf5weqqxh ; } else { _rtZCSV -> cc3kwmmph3 = rtP . u_Value - rtP . u_Value ;
} if ( rtB . dltpuuez3p > rtP . u_Value ) { if ( rtDW . h45q1yctgy == 0 ) {
_rtZCSV -> hjw3ncpw5d = rtB . dltpuuez3p - rtB . dltpuuez3p ; } else {
_rtZCSV -> hjw3ncpw5d = rtB . dltpuuez3p - rtP . u_Value ; } } else if ( rtDW
. h45q1yctgy == 0 ) { _rtZCSV -> hjw3ncpw5d = rtP . u_Value - rtB .
dltpuuez3p ; } else { _rtZCSV -> hjw3ncpw5d = rtP . u_Value - rtP . u_Value ;
} _rtZCSV -> anobfchkj3 = rtB . obckf3tx3n - rtP . Lman ; _rtZCSV ->
i3grtkwgbn = rtB . obckf3tx3n - ( - rtP . Lman ) ; if ( rtB . bv1nxloayu >
rtP . u_Value ) { if ( rtDW . k1bl1fbklv == 0 ) { _rtZCSV -> jl1t3iit4p = rtB
. bv1nxloayu - rtB . bv1nxloayu ; } else { _rtZCSV -> jl1t3iit4p = rtB .
bv1nxloayu - rtP . u_Value ; } } else if ( rtDW . k1bl1fbklv == 0 ) { _rtZCSV
-> jl1t3iit4p = rtP . u_Value - rtB . bv1nxloayu ; } else { _rtZCSV ->
jl1t3iit4p = rtP . u_Value - rtP . u_Value ; } if ( rtB . dkhb1g3uk2 [ 18 ] <
rtP . u_Value_puyaicdqcr ) { if ( rtDW . e25kemaqnj == 0 ) { _rtZCSV ->
gktpxdwo3i = rtB . dkhb1g3uk2 [ 18 ] - rtB . dkhb1g3uk2 [ 18 ] ; } else {
_rtZCSV -> gktpxdwo3i = rtB . dkhb1g3uk2 [ 18 ] - rtP . u_Value_puyaicdqcr ;
} } else if ( rtDW . e25kemaqnj == 0 ) { _rtZCSV -> gktpxdwo3i = rtP .
u_Value_puyaicdqcr - rtB . dkhb1g3uk2 [ 18 ] ; } else { _rtZCSV -> gktpxdwo3i
= rtP . u_Value_puyaicdqcr - rtP . u_Value_puyaicdqcr ; } if ( rtB .
ezqhral2zf > rtP . u_Value_puyaicdqcr ) { if ( rtDW . csingavmu2 == 0 ) {
_rtZCSV -> jlfathjhqy = rtB . ezqhral2zf - rtB . ezqhral2zf ; } else {
_rtZCSV -> jlfathjhqy = rtB . ezqhral2zf - rtP . u_Value_puyaicdqcr ; } }
else if ( rtDW . csingavmu2 == 0 ) { _rtZCSV -> jlfathjhqy = rtP .
u_Value_puyaicdqcr - rtB . ezqhral2zf ; } else { _rtZCSV -> jlfathjhqy = rtP
. u_Value_puyaicdqcr - rtP . u_Value_puyaicdqcr ; } _rtZCSV -> f5aqoskgvy =
rtB . km0glefxt3 - rtP . Lmag ; _rtZCSV -> feovqi2zdn = rtB . km0glefxt3 - (
- rtP . Lmag ) ; if ( rtB . gv02hfb5em > rtP . u_Value_puyaicdqcr ) { if (
rtDW . jdv5kllov0 == 0 ) { _rtZCSV -> gaw410o1vg = rtB . gv02hfb5em - rtB .
gv02hfb5em ; } else { _rtZCSV -> gaw410o1vg = rtB . gv02hfb5em - rtP .
u_Value_puyaicdqcr ; } } else if ( rtDW . jdv5kllov0 == 0 ) { _rtZCSV ->
gaw410o1vg = rtP . u_Value_puyaicdqcr - rtB . gv02hfb5em ; } else { _rtZCSV
-> gaw410o1vg = rtP . u_Value_puyaicdqcr - rtP . u_Value_puyaicdqcr ; }
_rtZCSV -> o2hqkuofst = rtB . otp04ddd2k - rtP . DeadZone_Start ; _rtZCSV ->
evvhskmvma = rtB . otp04ddd2k - rtP . DeadZone_End ; _rtZCSV -> iostbu1zbw =
0.0 ; if ( ( rtB . lne41ncyjt > 0.0 ) && ( rtB . ntxdrltybo > 0.0 ) ) {
_rtZCSV -> iostbu1zbw = 1.0 ; } { real_T * zcsv = & ( ( ( ZCV * )
ssGetSolverZcSignalVector ( rtS ) ) -> pr010kwqpo ) ; int_T i ; for ( i = 0 ;
i < 4 ; i ++ ) { zcsv [ i ] = 0.0 ; } } if ( rtDW . emonwegfxm == 0 ) {
_rtZCSV -> pr010kwqpo = rtB . ntxdrltybo - rtP . Nonlinear_pen_full_damping ;
_rtZCSV -> lfyc5we5fp = rtB . ntxdrltybo - rtP . Smoothstep_step_start ;
_rtZCSV -> pematei00i = rtB . dkhb1g3uk2 [ 1 ] ; _rtZCSV -> o0b201jtiz = rtB
. dkhb1g3uk2 [ 1 ] ; } _rtZCSV -> anewhobvoz = rtB . bk01d3421a - rtP .
Switch_Threshold ; _rtZCSV -> bwxew5jwop = rtB . p4zys2fkma ; } void
MdlTerminate ( void ) { neu_destroy_diagnostic_manager ( (
NeuDiagnosticManager * ) rtDW . gz11pk43kf ) ; nesl_destroy_simulation_data (
( NeslSimulationData * ) rtDW . am02jbgyuo ) ; nesl_erase_simulator (
"CMFB/Muscle-Finger-Button-Event/Solver Configuration_2" ) ;
neu_destroy_diagnostic_manager ( ( NeuDiagnosticManager * ) rtDW . otakt00evh
) ; nesl_destroy_simulation_data ( ( NeslSimulationData * ) rtDW . eoputmkb5y
) ; nesl_erase_simulator (
"CMFB/Muscle-Finger-Button-Event/Solver Configuration_2" ) ; rt_TDelayFreeBuf
( rtDW . mvtc05kxt0 . TUbufferPtrs [ 0 ] ) ; rt_TDelayFreeBuf ( rtDW .
fe531iiqaq . TUbufferPtrs [ 0 ] ) ; rt_TDelayFreeBuf ( rtDW . g3fwyfyuwt .
TUbufferPtrs [ 0 ] ) ; neu_destroy_diagnostic_manager ( (
NeuDiagnosticManager * ) rtDW . b4v4mhacua ) ; nesl_destroy_simulation_data (
( NeslSimulationData * ) rtDW . k5nthuztl1 ) ; nesl_erase_simulator (
"CMFB/Muscle-Finger-Button-Event/Solver Configuration_3" ) ;
neu_destroy_diagnostic_manager ( ( NeuDiagnosticManager * ) rtDW . ez0yeisdgv
) ; nesl_destroy_simulation_data ( ( NeslSimulationData * ) rtDW . kajpu01vmz
) ; nesl_erase_simulator (
"CMFB/Muscle-Finger-Button-Event/Solver Configuration_3" ) ; if (
rt_GetOSigstreamManager ( ) != ( NULL ) ) { void * pSignalProbeCollection = (
void * ) rtDW . cofxnn2uuf . SignalProbe ;
rtwSignalProbeCollectionDestroyInstance ( pSignalProbeCollection ) ; } if (
rt_GetOSigstreamManager ( ) != ( NULL ) ) { void * pSignalProbeCollection = (
void * ) rtDW . mpcwpukrok . SignalProbe ;
rtwSignalProbeCollectionDestroyInstance ( pSignalProbeCollection ) ; } if (
rt_GetOSigstreamManager ( ) != ( NULL ) ) { void * pSignalProbeCollection = (
void * ) rtDW . el1dvatmtk . SignalProbe ;
rtwSignalProbeCollectionDestroyInstance ( pSignalProbeCollection ) ; } if (
rt_GetOSigstreamManager ( ) != ( NULL ) ) { void * pSignalProbeCollection = (
void * ) rtDW . hntxrt0njy . SignalProbe ;
rtwSignalProbeCollectionDestroyInstance ( pSignalProbeCollection ) ; }
neu_destroy_diagnostic_manager ( ( NeuDiagnosticManager * ) rtDW . kd0bfuzule
) ; nesl_destroy_simulation_data ( ( NeslSimulationData * ) rtDW . io3q1sfthu
) ; nesl_erase_simulator (
"CMFB/Muscle-Finger-Button-Event/Solver Configuration_3" ) ; { if ( rtDW .
eaz1lwdqda . AQHandles ) { sdiTerminateStreaming ( & rtDW . eaz1lwdqda .
AQHandles ) ; } } { if ( rtDW . eaz1lwdqdal . AQHandles ) {
sdiTerminateStreaming ( & rtDW . eaz1lwdqdal . AQHandles ) ; } }
neu_destroy_diagnostic_manager ( ( NeuDiagnosticManager * ) rtDW . gwhre3ynix
) ; nesl_destroy_simulation_data ( ( NeslSimulationData * ) rtDW . phinmcokxq
) ; nesl_erase_simulator (
"CMFB/Muscle-Finger-Button-Event/Solver Configuration_1" ) ; { if (
rt_slioCatalogue ( ) != ( NULL ) ) { void * * slioCatalogueAddr =
rt_slioCatalogueAddr ( ) ; rtwCreateSigstreamSlioClient (
rt_GetOSigstreamManager ( ) , rtwGetPointerFromUniquePtr ( rt_slioCatalogue (
) ) ) ; rtwSaveDatasetsToMatFile ( rtwGetPointerFromUniquePtr (
rt_slioCatalogue ( ) ) , rt_GetMatSigstreamLoggingFileName ( ) ) ;
rtwOSigstreamManagerDestroyInstance ( rt_GetOSigstreamManager ( ) ) ;
rtwTerminateSlioCatalogue ( slioCatalogueAddr ) ; * slioCatalogueAddr = (
NULL ) ; } } } void MdlInitializeSizes ( void ) { ssSetNumContStates ( rtS ,
13 ) ; ssSetNumPeriodicContStates ( rtS , 0 ) ; ssSetNumY ( rtS , 4 ) ;
ssSetNumU ( rtS , 0 ) ; ssSetDirectFeedThrough ( rtS , 0 ) ;
ssSetNumSampleTimes ( rtS , 5 ) ; ssSetNumBlocks ( rtS , 247 ) ;
ssSetNumBlockIO ( rtS , 99 ) ; ssSetNumBlockParams ( rtS , 83 ) ; } void
MdlInitializeSampleTimes ( void ) { ssSetSampleTime ( rtS , 0 , 0.0 ) ;
ssSetSampleTime ( rtS , 1 , 0.0 ) ; ssSetSampleTime ( rtS , 2 , 30.0 ) ;
ssSetSampleTime ( rtS , 3 , - 2.0 ) ; ssSetSampleTime ( rtS , 4 , - 2.0 ) ;
ssSetOffsetTime ( rtS , 0 , 0.0 ) ; ssSetOffsetTime ( rtS , 1 , 1.0 ) ;
ssSetOffsetTime ( rtS , 2 , 0.0 ) ; ssSetOffsetTime ( rtS , 3 , 0.0 ) ;
ssSetOffsetTime ( rtS , 4 , 1.0 ) ; } void raccel_set_checksum ( SimStruct *
rtS ) { ssSetChecksumVal ( rtS , 0 , 550607118U ) ; ssSetChecksumVal ( rtS ,
1 , 4147630434U ) ; ssSetChecksumVal ( rtS , 2 , 2467555291U ) ;
ssSetChecksumVal ( rtS , 3 , 123086870U ) ; } SimStruct *
raccel_register_model ( void ) { static struct _ssMdlInfo mdlInfo ; ( void )
memset ( ( char * ) rtS , 0 , sizeof ( SimStruct ) ) ; ( void ) memset ( (
char * ) & mdlInfo , 0 , sizeof ( struct _ssMdlInfo ) ) ; ssSetMdlInfoPtr (
rtS , & mdlInfo ) ; { static time_T mdlPeriod [ NSAMPLE_TIMES ] ; static
time_T mdlOffset [ NSAMPLE_TIMES ] ; static time_T mdlTaskTimes [
NSAMPLE_TIMES ] ; static int_T mdlTsMap [ NSAMPLE_TIMES ] ; static int_T
mdlSampleHits [ NSAMPLE_TIMES ] ; static boolean_T mdlTNextWasAdjustedPtr [
NSAMPLE_TIMES ] ; static int_T mdlPerTaskSampleHits [ NSAMPLE_TIMES *
NSAMPLE_TIMES ] ; static time_T mdlTimeOfNextSampleHit [ NSAMPLE_TIMES ] ; {
int_T i ; for ( i = 0 ; i < NSAMPLE_TIMES ; i ++ ) { mdlPeriod [ i ] = 0.0 ;
mdlOffset [ i ] = 0.0 ; mdlTaskTimes [ i ] = 0.0 ; mdlTsMap [ i ] = i ;
mdlSampleHits [ i ] = 1 ; } } ssSetSampleTimePtr ( rtS , & mdlPeriod [ 0 ] )
; ssSetOffsetTimePtr ( rtS , & mdlOffset [ 0 ] ) ; ssSetSampleTimeTaskIDPtr (
rtS , & mdlTsMap [ 0 ] ) ; ssSetTPtr ( rtS , & mdlTaskTimes [ 0 ] ) ;
ssSetSampleHitPtr ( rtS , & mdlSampleHits [ 0 ] ) ; ssSetTNextWasAdjustedPtr
( rtS , & mdlTNextWasAdjustedPtr [ 0 ] ) ; ssSetPerTaskSampleHitsPtr ( rtS ,
& mdlPerTaskSampleHits [ 0 ] ) ; ssSetTimeOfNextSampleHitPtr ( rtS , &
mdlTimeOfNextSampleHit [ 0 ] ) ; } ssSetSolverMode ( rtS ,
SOLVER_MODE_SINGLETASKING ) ; { ssSetBlockIO ( rtS , ( ( void * ) & rtB ) ) ;
( void ) memset ( ( ( void * ) & rtB ) , 0 , sizeof ( B ) ) ; } { ssSetY (
rtS , & rtY ) ; ( void ) memset ( ( void * ) & rtY , 0 , sizeof ( ExtY ) ) ;
} ssSetDefaultParam ( rtS , ( real_T * ) & rtP ) ; { real_T * x = ( real_T *
) & rtX ; ssSetContStates ( rtS , x ) ; ( void ) memset ( ( void * ) x , 0 ,
sizeof ( X ) ) ; } { void * dwork = ( void * ) & rtDW ; ssSetRootDWork ( rtS
, dwork ) ; ( void ) memset ( dwork , 0 , sizeof ( DW ) ) ; } { rtDW .
jg5tmg0ghy = 0 ; } { static DataTypeTransInfo dtInfo ; ( void ) memset ( (
char_T * ) & dtInfo , 0 , sizeof ( dtInfo ) ) ; ssSetModelMappingInfo ( rtS ,
& dtInfo ) ; dtInfo . numDataTypes = 17 ; dtInfo . dataTypeSizes = &
rtDataTypeSizes [ 0 ] ; dtInfo . dataTypeNames = & rtDataTypeNames [ 0 ] ;
dtInfo . BTransTable = & rtBTransTable ; dtInfo . PTransTable = &
rtPTransTable ; } CMFB_InitializeDataMapInfo ( ) ;
ssSetIsRapidAcceleratorActive ( rtS , true ) ; ssSetRootSS ( rtS , rtS ) ;
ssSetVersion ( rtS , SIMSTRUCT_VERSION_LEVEL2 ) ; ssSetModelName ( rtS ,
"CMFB" ) ; ssSetPath ( rtS , "CMFB" ) ; ssSetTStart ( rtS , 0.0 ) ;
ssSetTFinal ( rtS , 3.0 ) ; { static RTWLogInfo rt_DataLoggingInfo ;
rt_DataLoggingInfo . loggingInterval = NULL ; ssSetRTWLogInfo ( rtS , &
rt_DataLoggingInfo ) ; } { rtliSetLogXSignalInfo ( ssGetRTWLogInfo ( rtS ) ,
( NULL ) ) ; rtliSetLogXSignalPtrs ( ssGetRTWLogInfo ( rtS ) , ( NULL ) ) ;
rtliSetLogT ( ssGetRTWLogInfo ( rtS ) , "tout" ) ; rtliSetLogX (
ssGetRTWLogInfo ( rtS ) , "" ) ; rtliSetLogXFinal ( ssGetRTWLogInfo ( rtS ) ,
"" ) ; rtliSetLogVarNameModifier ( ssGetRTWLogInfo ( rtS ) , "none" ) ;
rtliSetLogFormat ( ssGetRTWLogInfo ( rtS ) , 4 ) ; rtliSetLogMaxRows (
ssGetRTWLogInfo ( rtS ) , 0 ) ; rtliSetLogDecimation ( ssGetRTWLogInfo ( rtS
) , 1 ) ; { static void * rt_LoggedOutputSignalPtrs [ ] = { & rtY .
b3efxrasnj , & rtY . kzkwynbqvv , & rtY . ks2ych5ttv , & rtY . n1fvfkzsvm } ;
rtliSetLogYSignalPtrs ( ssGetRTWLogInfo ( rtS ) , ( ( LogSignalPtrsType )
rt_LoggedOutputSignalPtrs ) ) ; } { static int_T rt_LoggedOutputWidths [ ] =
{ 1 , 1 , 1 , 1 } ; static int_T rt_LoggedOutputNumDimensions [ ] = { 1 , 1 ,
1 , 1 } ; static int_T rt_LoggedOutputDimensions [ ] = { 1 , 1 , 1 , 1 } ;
static boolean_T rt_LoggedOutputIsVarDims [ ] = { 0 , 0 , 0 , 0 } ; static
void * rt_LoggedCurrentSignalDimensions [ ] = { ( NULL ) , ( NULL ) , ( NULL
) , ( NULL ) } ; static int_T rt_LoggedCurrentSignalDimensionsSize [ ] = { 4
, 4 , 4 , 4 } ; static BuiltInDTypeId rt_LoggedOutputDataTypeIds [ ] = {
SS_DOUBLE , SS_DOUBLE , SS_DOUBLE , SS_DOUBLE } ; static int_T
rt_LoggedOutputComplexSignals [ ] = { 0 , 0 , 0 , 0 } ; static const char_T *
rt_LoggedOutputLabels [ ] = { "" , "" , "" , "" } ; static const char_T *
rt_LoggedOutputBlockNames [ ] = { "CMFB/Visual event perception" ,
"CMFB/Audio event perception" , "CMFB/Tactile event perception" ,
"CMFB/Finger displacement" } ; static RTWLogDataTypeConvert
rt_RTWLogDataTypeConvert [ ] = { { 0 , SS_DOUBLE , SS_DOUBLE , 0 , 0 , 0 ,
1.0 , 0 , 0.0 } , { 0 , SS_DOUBLE , SS_DOUBLE , 0 , 0 , 0 , 1.0 , 0 , 0.0 } ,
{ 0 , SS_DOUBLE , SS_DOUBLE , 0 , 0 , 0 , 1.0 , 0 , 0.0 } , { 0 , SS_DOUBLE ,
SS_DOUBLE , 0 , 0 , 0 , 1.0 , 0 , 0.0 } } ; static RTWLogSignalInfo
rt_LoggedOutputSignalInfo [ ] = { { 4 , rt_LoggedOutputWidths ,
rt_LoggedOutputNumDimensions , rt_LoggedOutputDimensions ,
rt_LoggedOutputIsVarDims , rt_LoggedCurrentSignalDimensions ,
rt_LoggedCurrentSignalDimensionsSize , rt_LoggedOutputDataTypeIds ,
rt_LoggedOutputComplexSignals , ( NULL ) , { rt_LoggedOutputLabels } , ( NULL
) , ( NULL ) , ( NULL ) , { rt_LoggedOutputBlockNames } , { ( NULL ) } , (
NULL ) , rt_RTWLogDataTypeConvert } } ; rtliSetLogYSignalInfo (
ssGetRTWLogInfo ( rtS ) , rt_LoggedOutputSignalInfo ) ;
rt_LoggedCurrentSignalDimensions [ 0 ] = & rt_LoggedOutputWidths [ 0 ] ;
rt_LoggedCurrentSignalDimensions [ 1 ] = & rt_LoggedOutputWidths [ 1 ] ;
rt_LoggedCurrentSignalDimensions [ 2 ] = & rt_LoggedOutputWidths [ 2 ] ;
rt_LoggedCurrentSignalDimensions [ 3 ] = & rt_LoggedOutputWidths [ 3 ] ; }
rtliSetLogY ( ssGetRTWLogInfo ( rtS ) , "yout" ) ; } { static struct
_ssStatesInfo2 statesInfo2 ; ssSetStatesInfo2 ( rtS , & statesInfo2 ) ; } {
static ssPeriodicStatesInfo periodicStatesInfo ; ssSetPeriodicStatesInfo (
rtS , & periodicStatesInfo ) ; } { static ssSolverInfo slvrInfo ; static
struct _ssSFcnModelMethods3 mdlMethods3 ; static struct _ssSFcnModelMethods2
mdlMethods2 ; static boolean_T contStatesDisabled [ 13 ] ; static real_T
absTol [ 13 ] = { 1.0E-6 , 1.0E-6 , 1.0E-6 , 1.0E-6 , 1.0E-6 , 1.0E-6 ,
1.0E-6 , 1.0E-6 , 1.0E-6 , 1.0E-6 , 1.0E-6 , 1.0E-6 , 1.0E-6 } ; static
uint8_T absTolControl [ 13 ] = { 0U , 0U , 0U , 0U , 0U , 0U , 0U , 0U , 0U ,
0U , 0U , 0U , 0U } ; static uint8_T zcAttributes [ 28 ] = { ( ZC_EVENT_Z2N |
ZC_EVENT_P2N | ZC_EVENT_N2Z | ZC_EVENT_N2P ) , ( 0x80 | ZC_EVENT_ALL_DN ) , (
ZC_EVENT_ALL ) , ( 0x80 | ZC_EVENT_ALL_DN ) , ( ZC_EVENT_ALL ) , ( 0x80 |
ZC_EVENT_ALL_DN ) , ( ZC_EVENT_ALL ) , ( 0x80 | ZC_EVENT_ALL_DN ) , (
ZC_EVENT_ALL ) , ( ZC_EVENT_ALL ) , ( ZC_EVENT_ALL ) , ( ZC_EVENT_ALL ) , (
ZC_EVENT_ALL ) , ( ZC_EVENT_ALL ) , ( ZC_EVENT_ALL ) , ( ZC_EVENT_ALL ) , (
ZC_EVENT_ALL ) , ( ZC_EVENT_ALL ) , ( ZC_EVENT_ALL ) , ( ZC_EVENT_ALL ) , (
ZC_EVENT_ALL ) , ( ZC_EVENT_ALL ) , ( ZC_EVENT_ALL ) , ( ZC_EVENT_ALL ) , (
ZC_EVENT_ALL ) , ( ZC_EVENT_ALL ) , ( ZC_EVENT_ALL ) , ( ZC_EVENT_ALL ) } ;
ssSetSolverRelTol ( rtS , 0.001 ) ; ssSetStepSize ( rtS , 0.0 ) ;
ssSetMinStepSize ( rtS , 0.0 ) ; ssSetMaxNumMinSteps ( rtS , - 1 ) ;
ssSetMinStepViolatedError ( rtS , 0 ) ; ssSetMaxStepSize ( rtS , 0.06 ) ;
ssSetSolverMaxOrder ( rtS , - 1 ) ; ssSetSolverRefineFactor ( rtS , 1 ) ;
ssSetOutputTimes ( rtS , ( NULL ) ) ; ssSetNumOutputTimes ( rtS , 0 ) ;
ssSetOutputTimesOnly ( rtS , 0 ) ; ssSetOutputTimesIndex ( rtS , 0 ) ;
ssSetZCCacheNeedsReset ( rtS , 1 ) ; ssSetDerivCacheNeedsReset ( rtS , 0 ) ;
ssSetNumNonContDerivSigInfos ( rtS , 0 ) ; ssSetNonContDerivSigInfos ( rtS ,
( NULL ) ) ; ssSetSolverInfo ( rtS , & slvrInfo ) ; ssSetSolverName ( rtS ,
"ode23t" ) ; ssSetVariableStepSolver ( rtS , 1 ) ;
ssSetSolverConsistencyChecking ( rtS , 0 ) ; ssSetSolverAdaptiveZcDetection (
rtS , 0 ) ; ssSetSolverRobustResetMethod ( rtS , 0 ) ;
_ssSetSolverUpdateJacobianAtReset ( rtS , true ) ; ssSetAbsTolVector ( rtS ,
absTol ) ; ssSetAbsTolControlVector ( rtS , absTolControl ) ;
ssSetSolverAbsTol_Obsolete ( rtS , absTol ) ;
ssSetSolverAbsTolControl_Obsolete ( rtS , absTolControl ) ;
ssSetSolverStateProjection ( rtS , 1 ) ; ( void ) memset ( ( void * ) &
mdlMethods2 , 0 , sizeof ( mdlMethods2 ) ) ; ssSetModelMethods2 ( rtS , &
mdlMethods2 ) ; ( void ) memset ( ( void * ) & mdlMethods3 , 0 , sizeof (
mdlMethods3 ) ) ; ssSetModelMethods3 ( rtS , & mdlMethods3 ) ;
ssSetModelProjection ( rtS , MdlProjection ) ; ssSetMassMatrixType ( rtS , (
ssMatrixType ) 1 ) ; ssSetMassMatrixNzMax ( rtS , 13 ) ; ssSetModelMassMatrix
( rtS , MdlMassMatrix ) ; ssSetModelForcingFunction ( rtS ,
MdlForcingFunction ) ; ssSetSolverMassMatrixType ( rtS , ( ssMatrixType ) 1 )
; ssSetSolverMassMatrixNzMax ( rtS , 13 ) ; ssSetModelOutputs ( rtS ,
MdlOutputs ) ; ssSetModelLogData ( rtS , rt_UpdateTXYLogVars ) ;
ssSetModelLogDataIfInInterval ( rtS , rt_UpdateTXXFYLogVars ) ;
ssSetModelUpdate ( rtS , MdlUpdate ) ; ssSetModelDerivatives ( rtS ,
MdlDerivatives ) ; ssSetSolverZcSignalAttrib ( rtS , zcAttributes ) ;
ssSetSolverNumZcSignals ( rtS , 28 ) ; ssSetModelZeroCrossings ( rtS ,
MdlZeroCrossings ) ; ssSetSolverConsecutiveZCsStepRelTol ( rtS ,
2.8421709430404007E-13 ) ; ssSetSolverMaxConsecutiveZCs ( rtS , 1000 ) ;
ssSetSolverConsecutiveZCsError ( rtS , 2 ) ; ssSetSolverMaskedZcDiagnostic (
rtS , 1 ) ; ssSetSolverIgnoredZcDiagnostic ( rtS , 1 ) ;
ssSetSolverMaxConsecutiveMinStep ( rtS , 1 ) ;
ssSetSolverShapePreserveControl ( rtS , 2 ) ; ssSetTNextTid ( rtS , INT_MIN )
; ssSetTNext ( rtS , rtMinusInf ) ; ssSetSolverNeedsReset ( rtS ) ;
ssSetNumNonsampledZCs ( rtS , 28 ) ; ssSetContStateDisabled ( rtS ,
contStatesDisabled ) ; ssSetSolverMaxConsecutiveMinStep ( rtS , 1 ) ; { int_T
* ir = rtMassMatrix . ir ; int_T * jc = rtMassMatrix . jc ; real_T * pr =
rtMassMatrix . pr ; ssSetMassMatrixIr ( rtS , ir ) ; ssSetMassMatrixJc ( rtS
, jc ) ; ssSetMassMatrixPr ( rtS , pr ) ; ( void ) memset ( ( void * ) ir , 0
, 13 * sizeof ( int_T ) ) ; ( void ) memset ( ( void * ) jc , 0 , ( 13 + 1 )
* sizeof ( int_T ) ) ; ( void ) memset ( ( void * ) pr , 0 , 13 * sizeof (
real_T ) ) ; } } { ZCSigState * zc = ( ZCSigState * ) & rtPrevZCX ;
ssSetPrevZCSigState ( rtS , zc ) ; } { rtPrevZCX . hfotvevkea =
UNINITIALIZED_ZCSIG ; rtPrevZCX . hgpmz33ou3 = UNINITIALIZED_ZCSIG ;
rtPrevZCX . eisd2o32qt = UNINITIALIZED_ZCSIG ; rtPrevZCX . funryl5lzr =
UNINITIALIZED_ZCSIG ; } ssSetChecksumVal ( rtS , 0 , 550607118U ) ;
ssSetChecksumVal ( rtS , 1 , 4147630434U ) ; ssSetChecksumVal ( rtS , 2 ,
2467555291U ) ; ssSetChecksumVal ( rtS , 3 , 123086870U ) ; { static const
sysRanDType rtAlwaysEnabled = SUBSYS_RAN_BC_ENABLE ; static RTWExtModeInfo
rt_ExtModeInfo ; static const sysRanDType * systemRan [ 3 ] ;
gblRTWExtModeInfo = & rt_ExtModeInfo ; ssSetRTWExtModeInfo ( rtS , &
rt_ExtModeInfo ) ; rteiSetSubSystemActiveVectorAddresses ( & rt_ExtModeInfo ,
systemRan ) ; systemRan [ 0 ] = & rtAlwaysEnabled ; systemRan [ 1 ] = (
sysRanDType * ) & rtDW . m2opywpxzx ; systemRan [ 2 ] = ( sysRanDType * ) &
rtDW . gkndwqqs1r ; rteiSetModelMappingInfoPtr ( ssGetRTWExtModeInfo ( rtS )
, & ssGetModelMappingInfo ( rtS ) ) ; rteiSetChecksumsPtr (
ssGetRTWExtModeInfo ( rtS ) , ssGetChecksums ( rtS ) ) ; rteiSetTPtr (
ssGetRTWExtModeInfo ( rtS ) , ssGetTPtr ( rtS ) ) ; } rtP .
Saturation_UpperSat = rtInf ; rtP . DeadZone_Start = rtMinusInf ; return rtS
; } const int_T gblParameterTuningTid = 5 ; void
MdlOutputsParameterSampleTime ( int_T tid ) { MdlOutputsTID5 ( tid ) ; }
