/* * @(#)rt_logging.h generated by: makeheader 4.21 Tue Dec 14 13:40:05 2004 * * built from: rt_logging.c */ #ifndef rt_logging_h #define rt_logging_h #include "rtwtypes.h" #include "rt_mxclassid.h" #include "rtw_matlogging.h" #define mxMAXNAM TMW_NAME_LENGTH_MAX /* maximum name length */ /*=========* * Defines * *=========*/ /* * Logging related functions and data structures */ typedef double MatReal; /* "real" data type used in model.mat */ typedef struct LogVar_Tag LogVar; typedef struct StructLogVar_Tag StructLogVar; typedef struct MatrixData_Tag { char_T name[mxMAXNAM]; /* Name of the variable */ int_T nRows; /* number of rows */ int_T nCols; /* number of columns */ int_T nDims; /* number of dimensions */ int_T dims[2]; /* dimensions of the log variable we write to at each simulation time step. E.g: (1) Non-frame data - Signal dimension = [2 X 3] numDims = 2 dims[0] = 2, dims[1] = 3 (2) Frame data - Signal dimension = [2 X 3] numDims = 1 dims[0] = 3 */ void *re; /* pointer to real part of the data */ void *im; /* pointer to imaginary part, if complex */ DTypeId dTypeID; /* data type id */ size_t elSize; /* element size in bytes */ RTWLogDataTypeConvert dataTypeConvertInfo; mxClassID mxID; /* mxId corresponding to this dTypeID */ uint32_T logical; /* is this a logical array ? */ uint32_T complex; /* is this a complex matrix? */ uint32_T frameData; /* is this data frame based? */ uint32_T frameSize; /* is this data frame based? */ } MatrixData; struct LogVar_Tag { MatrixData data; /* Container for name, data etc., */ int_T rowIdx; /* current row index */ int_T wrapped; /* number of times the circular buffer * has wrapped around */ int_T nDataPoints; /* total number of data points logged */ int_T usingDefaultBufSize; /* used to print a message at end */ int_T okayToRealloc; /* reallocate during sim? */ int_T decimation; /* decimation factor */ int_T numHits; /* decimation hit count */ LogVar *next; }; typedef struct SignalsStruct_Tag { int_T numActiveFields; /* number of active fields */ const char_T *fieldNames; int_T numSignals; LogVar *values; MatrixData *dimensions; MatrixData *labels; MatrixData *plotStyles; MatrixData *titles; MatrixData *blockNames; MatrixData *crossMdlRef; } SignalsStruct; struct StructLogVar_Tag { char_T name[mxMAXNAM]; /* Name of the ML Struct variable */ int_T numActiveFields; /* number of active fields */ boolean_T logTime; void *time; SignalsStruct signals; MatrixData *blockName; StructLogVar *next; }; #ifdef __cplusplus extern "C" { #endif extern LogVar *rt_CreateLogVarWithConvert( RTWLogInfo *li, const real_T finalTime, const real_T inStepSize, const char_T **errStatus, const char_T *varName, BuiltInDTypeId inpDataTypeID, const RTWLogDataTypeConvert *pDataTypeConvertInfo, int_T logical, int_T complex, int_T frameData, int_T nCols, int_T nDims, const int_T *dims, int_T maxRows, int_T decimation, real_T sampleTime, int_T appanedToLogVarsList); #ifdef __cplusplus } #endif #ifdef __cplusplus extern "C" { #endif extern LogVar *rt_CreateLogVar(RTWLogInfo *li, const real_T finalTime, const real_T inStepSize, const char_T **errStatus, const char_T *varName, BuiltInDTypeId inpDataTypeID, int_T logical, int_T complex, int_T frameData, int_T nCols, int_T nDims, const int_T *dims, int_T maxRows, int_T decimation, real_T sampleTime, int_T appanedToLogVarsList); #ifdef __cplusplus } #endif #ifdef __cplusplus extern "C" { #endif extern StructLogVar *rt_CreateStructLogVar(RTWLogInfo *li, const real_T finalTime, const real_T inStepSize, const char_T **errStatus, const char_T *varName, boolean_T logTime, int_T maxRows, int_T decimation, real_T sampleTime, const RTWLogSignalInfo *sigInfo, const char_T *blockName); #ifdef __cplusplus } #endif #ifdef __cplusplus extern "C" { #endif extern const char_T *rt_StartDataLogging(RTWLogInfo *li, const real_T finalTime, const real_T stepSize, const char_T **errStatus); #ifdef __cplusplus } #endif #ifdef __cplusplus extern "C" { #endif extern void rt_UpdateLogVar(LogVar *var, const void *data); #ifdef __cplusplus } #endif #ifdef __cplusplus extern "C" { #endif extern void rt_UpdateStructLogVar(StructLogVar *var, const real_T *t, const void *data); #ifdef __cplusplus } #endif #ifdef __cplusplus extern "C" { #endif extern const char_T *rt_UpdateTXYLogVars(RTWLogInfo *li, time_T *tPtr); #ifdef __cplusplus } #endif #ifdef __cplusplus extern "C" { #endif extern void rt_UpdateSigLogVars(RTWLogInfo *li, time_T *tPtr); #ifdef __cplusplus } #endif #ifdef __cplusplus extern "C" { #endif extern void rt_StopDataLogging(const char_T *file, RTWLogInfo *li); #ifdef __cplusplus } #endif #endif /* rt_logging_h */