コード例 #1
0
ファイル: problem2_acc.c プロジェクト: evenator/EECS-304
/* Function to initialize sizes */
static void mdlInitializeSizes(SimStruct *S)
{
    /* checksum */
    ssSetChecksumVal(S, 0, 4008323717U);
    ssSetChecksumVal(S, 1, 2543693537U);
    ssSetChecksumVal(S, 2, 4289145620U);
    ssSetChecksumVal(S, 3, 3389381616U);

    /* options */
    ssSetOptions(S, SS_OPTION_EXCEPTION_FREE_CODE);

    /* Accelerator check memory map size match for DWork */
    if (ssGetSizeofDWork(S) != sizeof(D_Work)) {
        ssSetErrorStatus(S,"Unexpected error: Internal DWork sizes do "
                         "not match for accelerator mex file.");
    }

    /* Accelerator check memory map size match for BlockIO */
    if (ssGetSizeofGlobalBlockIO(S) != sizeof(BlockIO)) {
        ssSetErrorStatus(S,"Unexpected error: Internal BlockIO sizes do "
                         "not match for accelerator mex file.");
    }

    /* model parameters */
    _ssSetDefaultParam(S, (real_T *) &rtDefaultParameters);
}
コード例 #2
0
ファイル: Deadbeat_CUK_acc.c プロジェクト: Velocar/Bikair_MBD
nneyi35s1a * ) & _rtP -> nfugx5ih43 , & _rtZCSV -> nfugx5ih43 ) ; } static
void mdlInitializeSizes ( SimStruct * S ) { ssSetChecksumVal ( S , 0 ,
2573679304U ) ; ssSetChecksumVal ( S , 1 , 1732126455U ) ; ssSetChecksumVal (
S , 2 , 2644021823U ) ; ssSetChecksumVal ( S , 3 , 2167879752U ) ; { mxArray
* slVerStructMat = NULL ; mxArray * slStrMat = mxCreateString ( "simulink" )
; char slVerChar [ 10 ] ; int status = mexCallMATLAB ( 1 , & slVerStructMat ,
1 , & slStrMat , "ver" ) ; if ( status == 0 ) { mxArray * slVerMat =
mxGetField ( slVerStructMat , 0 , "Version" ) ; if ( slVerMat == NULL ) {
status = 1 ; } else { status = mxGetString ( slVerMat , slVerChar , 10 ) ; }
} mxDestroyArray ( slStrMat ) ; mxDestroyArray ( slVerStructMat ) ; if ( (
status == 1 ) || ( strcmp ( slVerChar , "8.7" ) != 0 ) ) { return ; } }
ssSetOptions ( S , SS_OPTION_EXCEPTION_FREE_CODE ) ; if ( ssGetSizeofDWork (
S ) != sizeof ( pklu3vjy1t ) ) { ssSetErrorStatus ( S ,
"Unexpected error: Internal DWork sizes do "
"not match for accelerator mex file." ) ; } if ( ssGetSizeofGlobalBlockIO ( S
) != sizeof ( nmsgyp54ig ) ) { ssSetErrorStatus ( S ,
"Unexpected error: Internal BlockIO sizes do "
"not match for accelerator mex file." ) ; } { int ssSizeofParams ;
ssGetSizeofParams ( S , & ssSizeofParams ) ; if ( ssSizeofParams != sizeof (
bbqvqz25ov ) ) { static char msg [ 256 ] ; sprintf ( msg ,
"Unexpected error: Internal Parameters sizes do "
"not match for accelerator mex file." ) ; } } _ssSetModelRtp ( S , ( real_T *
) & aaesvjrkn2 ) ; _ssSetConstBlockIO ( S , & j0x3c3z5bk ) ; rt_InitInfAndNaN
( sizeof ( real_T ) ) ; ( ( bbqvqz25ov * ) ssGetModelRtp ( S ) ) ->
nfugx5ih43 . P_6 = rtInf ; ( ( bbqvqz25ov * ) ssGetModelRtp ( S ) ) ->
cqabclhqip4 . P_6 = rtInf ; } static void mdlInitializeSampleTimes (
コード例 #3
0
ファイル: main_acc.c プロジェクト: latys/Mypaper
P_6 * ( ( BlockIO_main * ) _ssGetBlockIO ( S ) ) -> B_0_16_0 ; } } static
void mdlInitializeSizes ( SimStruct * S ) { ssSetChecksumVal ( S , 0 ,
3089498090U ) ; ssSetChecksumVal ( S , 1 , 49919693U ) ; ssSetChecksumVal ( S
, 2 , 412083875U ) ; ssSetChecksumVal ( S , 3 , 3370502334U ) ; { mxArray *
slVerStructMat = NULL ; mxArray * slStrMat = mxCreateString ( "simulink" ) ;
char slVerChar [ 10 ] ; int status = mexCallMATLAB ( 1 , & slVerStructMat , 1
, & slStrMat , "ver" ) ; if ( status == 0 ) { mxArray * slVerMat = mxGetField
( slVerStructMat , 0 , "Version" ) ; if ( slVerMat == NULL ) { status = 1 ; }
else { status = mxGetString ( slVerMat , slVerChar , 10 ) ; } }
mxDestroyArray ( slStrMat ) ; mxDestroyArray ( slVerStructMat ) ; if ( (
status == 1 ) || ( strcmp ( slVerChar , "8.0" ) != 0 ) ) { return ; } }
ssSetOptions ( S , SS_OPTION_EXCEPTION_FREE_CODE ) ; if ( ssGetSizeofDWork (
S ) != sizeof ( D_Work_main ) ) { ssSetErrorStatus ( S ,
"Unexpected error: Internal DWork sizes do "
"not match for accelerator mex file." ) ; } if ( ssGetSizeofGlobalBlockIO ( S
) != sizeof ( BlockIO_main ) ) { ssSetErrorStatus ( S ,
"Unexpected error: Internal BlockIO sizes do "
"not match for accelerator mex file." ) ; } { int ssSizeofParams ;
ssGetSizeofParams ( S , & ssSizeofParams ) ; if ( ssSizeofParams != sizeof (
Parameters_main ) ) { static char msg [ 256 ] ; sprintf ( msg ,
"Unexpected error: Internal Parameters sizes do "
"not match for accelerator mex file." ) ; } } _ssSetDefaultParam ( S , (
real_T * ) & main_rtDefaultParameters ) ; rt_InitInfAndNaN ( sizeof ( real_T
) ) ; } static void mdlInitializeSampleTimes ( SimStruct * S ) { } static