コード例 #1
0
] = 0 ; rtContextSystems [ 2 ] = 0 ; } void
sldemo_mdlref_counter_InitializeDataMapInfo ( hpker3z0vt * const csoynizrov ,
k2kslffmdl * localDW , void * sysRanPtr , int contextTid ) {
rtwCAPI_SetVersion ( csoynizrov -> DataMapInfo . mmi , 1 ) ;
rtwCAPI_SetStaticMap ( csoynizrov -> DataMapInfo . mmi , & mmiStatic ) ;
rtwCAPI_SetLoggingStaticMap ( csoynizrov -> DataMapInfo . mmi , &
mmiStaticInfoLogging ) ; sldemo_mdlref_counter_InitializeDataAddr (
csoynizrov -> DataMapInfo . dataAddress , localDW ) ;
rtwCAPI_SetDataAddressMap ( csoynizrov -> DataMapInfo . mmi , csoynizrov ->
DataMapInfo . dataAddress ) ; sldemo_mdlref_counter_InitializeVarDimsAddr (
csoynizrov -> DataMapInfo . vardimsAddress ) ; rtwCAPI_SetVarDimsAddressMap (
csoynizrov -> DataMapInfo . mmi , csoynizrov -> DataMapInfo . vardimsAddress
) ; rtwCAPI_SetPath ( csoynizrov -> DataMapInfo . mmi , ( NULL ) ) ;
rtwCAPI_SetFullPath ( csoynizrov -> DataMapInfo . mmi , ( NULL ) ) ;
rtwCAPI_SetInstanceLoggingInfo ( csoynizrov -> DataMapInfo . mmi , &
csoynizrov -> DataMapInfo . mmiLogInstanceInfo ) ; rtwCAPI_SetChildMMIArray (
csoynizrov -> DataMapInfo . mmi , ( NULL ) ) ; rtwCAPI_SetChildMMIArrayLen (
csoynizrov -> DataMapInfo . mmi , 0 ) ;
sldemo_mdlref_counter_InitializeSystemRan ( csoynizrov , csoynizrov ->
DataMapInfo . systemRan , localDW , csoynizrov -> DataMapInfo . systemTid ,
sysRanPtr , contextTid ) ; rtwCAPI_SetSystemRan ( csoynizrov -> DataMapInfo .
mmi , csoynizrov -> DataMapInfo . systemRan ) ; rtwCAPI_SetSystemTid (
csoynizrov -> DataMapInfo . mmi , csoynizrov -> DataMapInfo . systemTid ) ;
rtwCAPI_SetGlobalTIDMap ( csoynizrov -> DataMapInfo . mmi , & csoynizrov ->
Timing . mdlref_GlobalTID [ 0 ] ) ; }
コード例 #2
0
void Deadbeat_CUK_host_InitializeDataMapInfo (
Deadbeat_CUK_host_DataMapInfo_T * dataMap , const char * path ) {
rtwCAPI_SetVersion ( dataMap -> mmi , 1 ) ; rtwCAPI_SetStaticMap ( dataMap ->
mmi , & mmiStatic ) ; rtwCAPI_SetDataAddressMap ( dataMap -> mmi , NULL ) ;
rtwCAPI_SetVarDimsAddressMap ( dataMap -> mmi , NULL ) ; rtwCAPI_SetPath (
dataMap -> mmi , path ) ; rtwCAPI_SetFullPath ( dataMap -> mmi , NULL ) ;
rtwCAPI_SetChildMMIArray ( dataMap -> mmi , ( NULL ) ) ;
rtwCAPI_SetChildMMIArrayLen ( dataMap -> mmi , 0 ) ; }
void friccion_aislada_esferica_estatica_host_InitializeDataMapInfo (
friccion_aislada_esferica_estatica_host_DataMapInfo_T * dataMap , const char
* path ) { rtwCAPI_SetVersion ( dataMap -> mmi , 1 ) ; rtwCAPI_SetStaticMap (
dataMap -> mmi , & mmiStatic ) ; rtwCAPI_SetDataAddressMap ( dataMap -> mmi ,
NULL ) ; rtwCAPI_SetVarDimsAddressMap ( dataMap -> mmi , NULL ) ;
rtwCAPI_SetPath ( dataMap -> mmi , path ) ; rtwCAPI_SetFullPath ( dataMap ->
mmi , NULL ) ; rtwCAPI_SetChildMMIArray ( dataMap -> mmi , ( NULL ) ) ;
rtwCAPI_SetChildMMIArrayLen ( dataMap -> mmi , 0 ) ; }
コード例 #4
0
ファイル: rtw_modelmap_utils.c プロジェクト: Shedino/Firmware
/** Function: rtwCAPI_UpdateFullPaths =========================================*
 *
 */
const char_T* rtwCAPI_UpdateFullPaths(rtwCAPI_ModelMappingInfo* mmi,
                                      const char_T* path,
                                      boolean_T isCalledFromTopModel)
{
    int_T         i;
    int_T         nCMMI;
    size_t        pathLen;
    char_T*       mmiPath;
    size_t        mmiPathLen;
    char_T*       relMMIPath;
    size_t        relMMIPathLen;

    if (mmi == NULL) return NULL;

    utAssert(path != NULL);
    utAssert( rtwCAPI_GetFullPath(mmi) == NULL );

    pathLen = strlen(path)+1;

    if (isCalledFromTopModel) {
        /* If called from top model - FullPath is same as path */
        mmiPath = (char_T*)utMalloc(pathLen*sizeof(char_T));
        (void)memcpy(mmiPath, path, pathLen*sizeof(char_T));
    }
    else {        
        relMMIPath = rtwCAPI_EncodePath(rtwCAPI_GetPath(mmi));
        if ( (relMMIPath== NULL) && (rtwCAPI_GetPath(mmi) != NULL)) {
            return rtwCAPI_mallocError;
        }
        relMMIPathLen = relMMIPath ? (strlen(relMMIPath) + 1) : 0;
        
        mmiPathLen = pathLen + relMMIPathLen;
        
        mmiPath = (char_T*)utMalloc(mmiPathLen*sizeof(char_T));
        if (mmiPath == NULL) return rtwCAPI_mallocError;
        (void)memcpy(mmiPath, path, pathLen*sizeof(char_T));
        utAssert(mmiPath[pathLen-1] == '\0');
        
        if (relMMIPath) {
            /* mmiPath = path + | + relMMIPath + '\0' */
            mmiPath[pathLen-1] = '|';
            (void)memcpy(&(mmiPath[pathLen]),
                         relMMIPath, relMMIPathLen*sizeof(char_T));
            utAssert(mmiPath[mmiPathLen-1] == '\0');
            utFree(relMMIPath);
        }
    }
    rtwCAPI_SetFullPath(*mmi, mmiPath);

    nCMMI = rtwCAPI_GetChildMMIArrayLen(mmi);
    for (i = 0; i < nCMMI; ++i) {
        rtwCAPI_ModelMappingInfo* cMMI = rtwCAPI_GetChildMMI(mmi,i);
        const char_T* errstr = rtwCAPI_UpdateFullPaths(cMMI, mmiPath, 0);
        if (errstr != NULL) return errstr;
    }
    return NULL;

} /* rtwCAPI_UpdateFullPaths */
コード例 #5
0
static void init_test_point_mapping_info(SimStruct *S)
{
  rtwCAPI_ModelMappingInfo *testPointMappingInfo;
  void **testPointAddrMap;
  init_test_point_addr_map();
  testPointMappingInfo = get_test_point_mapping_info();
  testPointAddrMap = get_test_point_address_map();
  rtwCAPI_SetStaticMap(*testPointMappingInfo, &testPointMappingStaticInfo);
  rtwCAPI_SetLoggingStaticMap(*testPointMappingInfo, NULL);
  rtwCAPI_SetInstanceLoggingInfo(*testPointMappingInfo, NULL);
  rtwCAPI_SetPath(*testPointMappingInfo, "");
  rtwCAPI_SetFullPath(*testPointMappingInfo, NULL);
  rtwCAPI_SetDataAddressMap(*testPointMappingInfo, testPointAddrMap);
  rtwCAPI_SetChildMMIArray(*testPointMappingInfo, NULL);
  rtwCAPI_SetChildMMIArrayLen(*testPointMappingInfo, 0);
  ssSetModelMappingInfoPtr(S, testPointMappingInfo);
}
コード例 #6
0
ファイル: rtw_modelmap_utils.c プロジェクト: Shedino/Firmware
/** Function: rtwCAPI_FreeFullPaths ============================================
 *
 */
void rtwCAPI_FreeFullPaths(rtwCAPI_ModelMappingInfo* mmi)
{
    int_T   i;
    int_T   nCMMI;
    char_T* fullPath;

    if (mmi == NULL) return;

    fullPath = rtwCAPI_GetFullPath(mmi);
    utAssert(fullPath != NULL);
    utFree(fullPath);
    rtwCAPI_SetFullPath(*mmi, NULL);

    nCMMI = rtwCAPI_GetChildMMIArrayLen(mmi);
    for (i = 0; i < nCMMI; ++i) {
        rtwCAPI_ModelMappingInfo* cMMI = rtwCAPI_GetChildMMI(mmi,i);
        rtwCAPI_FreeFullPaths(cMMI);
    }

} /* rtwCAPI_FreeFullPaths */
コード例 #7
0
  void testmodel_1109_host_InitializeDataMapInfo
    (testmodel_1109_host_DataMapInfo_T *dataMap, const char *path)
  {
    /* Set C-API version */
    rtwCAPI_SetVersion(dataMap->mmi, 1);

    /* Cache static C-API data into the Real-time Model Data structure */
    rtwCAPI_SetStaticMap(dataMap->mmi, &mmiStatic);

    /* host data address map is NULL */
    rtwCAPI_SetDataAddressMap(dataMap->mmi, NULL);

    /* host vardims address map is NULL */
    rtwCAPI_SetVarDimsAddressMap(dataMap->mmi, NULL);

    /* Set Instance specific path */
    rtwCAPI_SetPath(dataMap->mmi, path);
    rtwCAPI_SetFullPath(dataMap->mmi, NULL);

    /* Set reference to submodels */
    rtwCAPI_SetChildMMIArray(dataMap->mmi, (NULL));
    rtwCAPI_SetChildMMIArrayLen(dataMap->mmi, 0);
  }
コード例 #8
0
void EV_Pwr_Manager_InitializeDataMapInfo ( dk515r3a3r * const ez1amjfhle ,
dtjshe2cwg * localDW , void * sysRanPtr , int contextTid ) {
rtwCAPI_SetVersion ( ez1amjfhle -> DataMapInfo . mmi , 1 ) ;
rtwCAPI_SetStaticMap ( ez1amjfhle -> DataMapInfo . mmi , & mmiStatic ) ;
rtwCAPI_SetLoggingStaticMap ( ez1amjfhle -> DataMapInfo . mmi , &
mmiStaticInfoLogging ) ; EV_Pwr_Manager_InitializeDataAddr ( ez1amjfhle ->
DataMapInfo . dataAddress , localDW ) ; rtwCAPI_SetDataAddressMap (
ez1amjfhle -> DataMapInfo . mmi , ez1amjfhle -> DataMapInfo . dataAddress ) ;
EV_Pwr_Manager_InitializeVarDimsAddr ( ez1amjfhle -> DataMapInfo .
vardimsAddress ) ; rtwCAPI_SetVarDimsAddressMap ( ez1amjfhle -> DataMapInfo .
mmi , ez1amjfhle -> DataMapInfo . vardimsAddress ) ; rtwCAPI_SetPath (
ez1amjfhle -> DataMapInfo . mmi , ( NULL ) ) ; rtwCAPI_SetFullPath (
ez1amjfhle -> DataMapInfo . mmi , ( NULL ) ) ; rtwCAPI_SetInstanceLoggingInfo
( ez1amjfhle -> DataMapInfo . mmi , & ez1amjfhle -> DataMapInfo .
mmiLogInstanceInfo ) ; rtwCAPI_SetChildMMIArray ( ez1amjfhle -> DataMapInfo .
mmi , ( NULL ) ) ; rtwCAPI_SetChildMMIArrayLen ( ez1amjfhle -> DataMapInfo .
mmi , 0 ) ; EV_Pwr_Manager_InitializeSystemRan ( ez1amjfhle , ez1amjfhle ->
DataMapInfo . systemRan , localDW , ez1amjfhle -> DataMapInfo . systemTid ,
sysRanPtr , contextTid ) ; rtwCAPI_SetSystemRan ( ez1amjfhle -> DataMapInfo .
mmi , ez1amjfhle -> DataMapInfo . systemRan ) ; rtwCAPI_SetSystemTid (
ez1amjfhle -> DataMapInfo . mmi , ez1amjfhle -> DataMapInfo . systemTid ) ;
rtwCAPI_SetGlobalTIDMap ( ez1amjfhle -> DataMapInfo . mmi , & c5bw2jg1mz [ 0
] ) ; }
コード例 #9
0
void Bikair_MBD_Controller_InitializeDataMapInfo ( cfnrecmf1m * const
iuns1uhuvx , void * sysRanPtr , int contextTid ) { rtwCAPI_SetVersion (
iuns1uhuvx -> DataMapInfo . mmi , 1 ) ; rtwCAPI_SetStaticMap ( iuns1uhuvx ->
DataMapInfo . mmi , & mmiStatic ) ; rtwCAPI_SetLoggingStaticMap ( iuns1uhuvx
-> DataMapInfo . mmi , & mmiStaticInfoLogging ) ;
Bikair_MBD_Controller_InitializeDataAddr ( iuns1uhuvx -> DataMapInfo .
dataAddress ) ; rtwCAPI_SetDataAddressMap ( iuns1uhuvx -> DataMapInfo . mmi ,
iuns1uhuvx -> DataMapInfo . dataAddress ) ;
Bikair_MBD_Controller_InitializeVarDimsAddr ( iuns1uhuvx -> DataMapInfo .
vardimsAddress ) ; rtwCAPI_SetVarDimsAddressMap ( iuns1uhuvx -> DataMapInfo .
mmi , iuns1uhuvx -> DataMapInfo . vardimsAddress ) ; rtwCAPI_SetPath (
iuns1uhuvx -> DataMapInfo . mmi , ( NULL ) ) ; rtwCAPI_SetFullPath (
iuns1uhuvx -> DataMapInfo . mmi , ( NULL ) ) ; rtwCAPI_SetInstanceLoggingInfo
( iuns1uhuvx -> DataMapInfo . mmi , & iuns1uhuvx -> DataMapInfo .
mmiLogInstanceInfo ) ; rtwCAPI_SetChildMMIArray ( iuns1uhuvx -> DataMapInfo .
mmi , ( NULL ) ) ; rtwCAPI_SetChildMMIArrayLen ( iuns1uhuvx -> DataMapInfo .
mmi , 0 ) ; Bikair_MBD_Controller_InitializeSystemRan ( iuns1uhuvx ,
iuns1uhuvx -> DataMapInfo . systemRan , iuns1uhuvx -> DataMapInfo . systemTid
, sysRanPtr , contextTid ) ; rtwCAPI_SetSystemRan ( iuns1uhuvx -> DataMapInfo
. mmi , iuns1uhuvx -> DataMapInfo . systemRan ) ; rtwCAPI_SetSystemTid (
iuns1uhuvx -> DataMapInfo . mmi , iuns1uhuvx -> DataMapInfo . systemTid ) ;
rtwCAPI_SetGlobalTIDMap ( iuns1uhuvx -> DataMapInfo . mmi , & ocdvaaq32b [ 0
] ) ; }
コード例 #10
0
void IntelligentFlightSystem_InitializeDataMapInfo ( obtbqy5wje * const
kbrymlnnzk , hw45gft1pc * localDW , void * sysRanPtr , int contextTid ) {
rtwCAPI_SetVersion ( kbrymlnnzk -> DataMapInfo . mmi , 1 ) ;
rtwCAPI_SetStaticMap ( kbrymlnnzk -> DataMapInfo . mmi , & mmiStatic ) ;
rtwCAPI_SetLoggingStaticMap ( kbrymlnnzk -> DataMapInfo . mmi , &
mmiStaticInfoLogging ) ; IntelligentFlightSystem_InitializeDataAddr (
kbrymlnnzk -> DataMapInfo . dataAddress , localDW ) ;
rtwCAPI_SetDataAddressMap ( kbrymlnnzk -> DataMapInfo . mmi , kbrymlnnzk ->
DataMapInfo . dataAddress ) ; IntelligentFlightSystem_InitializeVarDimsAddr (
kbrymlnnzk -> DataMapInfo . vardimsAddress ) ; rtwCAPI_SetVarDimsAddressMap (
kbrymlnnzk -> DataMapInfo . mmi , kbrymlnnzk -> DataMapInfo . vardimsAddress
) ; rtwCAPI_SetPath ( kbrymlnnzk -> DataMapInfo . mmi , ( NULL ) ) ;
rtwCAPI_SetFullPath ( kbrymlnnzk -> DataMapInfo . mmi , ( NULL ) ) ;
rtwCAPI_SetInstanceLoggingInfo ( kbrymlnnzk -> DataMapInfo . mmi , &
kbrymlnnzk -> DataMapInfo . mmiLogInstanceInfo ) ; rtwCAPI_SetChildMMIArray (
kbrymlnnzk -> DataMapInfo . mmi , ( NULL ) ) ; rtwCAPI_SetChildMMIArrayLen (
kbrymlnnzk -> DataMapInfo . mmi , 0 ) ;
IntelligentFlightSystem_InitializeSystemRan ( kbrymlnnzk , kbrymlnnzk ->
DataMapInfo . systemRan , localDW , kbrymlnnzk -> DataMapInfo . systemTid ,
sysRanPtr , contextTid ) ; rtwCAPI_SetSystemRan ( kbrymlnnzk -> DataMapInfo .
mmi , kbrymlnnzk -> DataMapInfo . systemRan ) ; rtwCAPI_SetSystemTid (
kbrymlnnzk -> DataMapInfo . mmi , kbrymlnnzk -> DataMapInfo . systemTid ) ;
rtwCAPI_SetGlobalTIDMap ( kbrymlnnzk -> DataMapInfo . mmi , & cvcjuobuj3 [ 0
] ) ; }