/* * Copyright 1994-2004 The MathWorks, Inc. * * File: rtw_modelmap_logging.h $Revision: 1.1.6.3 $ * * Abstract: * Meta information used in conjunction with the ModelMappingInfo to * facilitate logging. * */ #ifndef __RTW_MODELMAP_LOGGING__ #define __RTW_MODELMAP_LOGGING__ #include "sysran_types.h" typedef struct rtwCAPI_ModelMapLoggingStaticInfo_tag rtwCAPI_ModelMapLoggingStaticInfo; typedef struct rtwCAPI_ModelMapLoggingInstanceInfo_tag rtwCAPI_ModelMapLoggingInstanceInfo; typedef struct rtwCAPI_LoggingMetaInfo_tag { uint_T sigIdx; /* same index as the rtwCAPI_Signals */ uint_T startIdx; /* starting index in the block I/O */ const char *blockPath; uint_T portIdx; int_T parentSysNum; /* system number of the parent signal that requested the logging */ } rtwCAPI_LoggingMetaInfo; /* ModelMapLoggingStaticInfo */ struct rtwCAPI_ModelMapLoggingStaticInfo_tag { /* Total number of non-virtual systems */ uint_T numSystems; /* Effective context systems array */ int_T const * contextSystems; rtwCAPI_LoggingMetaInfo const *logInfo; }; /* Macros for accessing static fields */ /* Note: These are all relative to the base MMI */ #define rtwCAPI_GetNumSystems(MMI) \ ((MMI)->staticMap->staticLogInfo->numSystems) #define rtwCAPI_GetContextSystems(MMI) \ ((MMI)->staticMap->staticLogInfo->contextSystems) #define rtwCAPI_GetLogginfInfoSigIdx(MMI, i) \ ((MMI)->staticMap->staticLogInfo->logInfo[i].sigIdx) #define rtwCAPI_GetLogginfInfoStartIdx(MMI, i) \ ((MMI)->staticMap->staticLogInfo->logInfo[i].startIdx) #define rtwCAPI_GetLogginfInfoBlockPath(MMI, i) \ ((MMI)->staticMap->staticLogInfo->logInfo[i].blockPath) #define rtwCAPI_GetLogginfInfoPortNumber(MMI, i) \ ((MMI)->staticMap->staticLogInfo->logInfo[i].portIdx) #define rtwCAPI_GetLogginfInfoParentSysNum(MMI, i) \ ((MMI)->staticMap->staticLogInfo->logInfo[i].parentSysNum) /* ModelMapLoggingInstanceInfo */ struct rtwCAPI_ModelMapLoggingInstanceInfo_tag { /* Pointer to the sysRan dwork pointers */ sysRanDType **systemRan; /* Effective non-triggered tid of each system */ int_T *systemTid; /* Points to the global tid map */ int_T *globalTIDMap; }; /* Note: These are all relative to the base MMI */ /* Get methods */ #define rtwCAPI_GetSystemRan(MMI) \ ((MMI)->InstanceMap.instanceLogInfo->systemRan) #define rtwCAPI_GetSystemTid(MMI) \ ((MMI)->InstanceMap.instanceLogInfo->systemTid) #define rtwCAPI_GetGlobalTIDMap(MMI) \ ((MMI)->InstanceMap.instanceLogInfo->globalTIDMap) /* Set methods */ #define rtwCAPI_SetSystemRan(MMI,s) \ ((MMI).InstanceMap.instanceLogInfo->systemRan) = (s) #define rtwCAPI_SetSystemTid(MMI,s) \ ((MMI).InstanceMap.instanceLogInfo->systemTid) = (s) #define rtwCAPI_SetGlobalTIDMap(MMI,s) \ ((MMI).InstanceMap.instanceLogInfo->globalTIDMap) = (s) #endif /* __RTW_MODELMAP_LOGGING__ */ /* EOF - rtw_modelmap_logging.h */