%if EXISTS("_LOGSUP_") == 0
%assign _LOGSUP_ = 1
%function SLibGenLogVarCreate(lv, name, dType, log, cmplx, frame, nCols, ...
nDims, dims, logValDimsStat, currSigDims, currSigDimsSize, maxRows, ...
decim, ts, appendToLogVarsList) Output
%assert(!IsModelReferenceTarget())
%assign tstart = 0.0
%if isRSimWithSolverModule
%assign tstart = RTMGet("TStart")
%endif
%assign stepSize = 0.0
%if !isRSimWithSolverModule
%if SLibIsERTCodeFormat()
%assign stepSize = RTMGet("StepSize0")
%else
%assign stepSize = RTMGet("StepSize")
%endif
%endif
%<lv> = %<tCreateLogVar>(
%<RTMGetLoggingObject()>,
%<tstart>,
%<RTMGet("TFinal")>,
%<stepSize>,
%<GetRTMErrorStatusPtr()>,
"%<name>",
%<dType>,
%<log>,
%<cmplx>,
%<frame>,
%<nCols>,
%<nDims>,
%<dims>,
%<logValDimsStat>,
%<currSigDims>,
%<currSigDimsSize>,
%<maxRows>,
%<decim>,
%<ts>,
%<appendToLogVarsList>);
%endfunction
%function SLibGenLogVarCreateWithConvert(lv, name, dType, convert, log, cmplx, frame, nCols, ...
nDims, dims, logValDimsStat, currSigDims, currSigDimsSize, maxRows, decim, ts, ...
appendToLogVarsList) Output
%assert(!IsModelReferenceTarget())
%assign tstart = 0.0
%if isRSimWithSolverModule
%assign tstart = RTMGet("TStart")
%endif
%assign stepSize = 0.0
%if !isRSimWithSolverModule
%if SLibIsERTCodeFormat()
%assign stepSize = RTMGet("StepSize0")
%else
%assign stepSize = RTMGet("StepSize")
%endif
%endif
%<lv> = %<tCreateLogVarWithConvert>(
%<RTMGetLoggingObject()>,
%<tstart>,
%<RTMGet("TFinal")>,
%<stepSize>,
%<GetRTMErrorStatusPtr()>,
"%<name>",
%<dType>,
%<convert>,
%<log>,
%<cmplx>,
%<frame>,
%<nCols>,
%<nDims>,
%<dims>,
%<logValDimsStat>,
%<currSigDims>,
%<currSigDimsSize>,
%<maxRows>,
%<decim>,
%<ts>,
%<appendToLogVarsList>);
%endfunction
%function SLibGenStructLogVarCreate(lv, name, logTime, maxRows, decim, ts, ...
sigInfo, bName) Output
%assert(!IsModelReferenceTarget())
%assign tstart = 0.0
%if isRSimWithSolverModule
%assign tstart = RTMGet("TStart")
%endif
%assign stepSize = 0.0
%if !isRSimWithSolverModule
%if SLibIsERTCodeFormat()
%assign stepSize = RTMGet("StepSize0")
%else
%assign stepSize = RTMGet("StepSize")
%endif
%endif
%<lv> = %<tCreateStructLogVar>(
%<RTMGetLoggingObject()>,
%<tstart>,
%<RTMGet("TFinal")>,
%<stepSize>,
%<GetRTMErrorStatusPtr()>,
"%<name>",
%<logTime>,
%<maxRows>,
%<decim>,
%<ts>,
%<sigInfo>,
%<bName>);
%endfunction
%function SLibGenLogVarUpdate(logVar, inpPtr, isVarDims) Output
%<tUpdateLogVar>((LogVar *)%<logVar>, %<inpPtr>, %<isVarDims>);
%endfunction
%function SLibGenStructLogVarUpdate(logVar, tPtr, inpPtr) Output
%<tUpdateStructLogVar>((StructLogVar *)%<logVar>, %<tPtr>, %<inpPtr>);
%endfunction
%function SLibGenTXYLogVarUpdate() Output
%if GenerateClassInterface && !::IncludeLoggingInstrumentation
%assign loggingObject = "%<CPPObjectName>.getRTM()->rtwLogInfo"
%else
%assign loggingObject = "%<RTMGetLoggingObject()>"
%endif
%assign tPtr = RTMSpecAccsGetTPtr(RTMGetRTModelRecShell().TPtr,RTMGetModelSS())
rt_UpdateTXYLogVars(%<loggingObject>, %<tPtr>);
%endfunction
%function SLibGenLoggingStart() Output
%if ::CompiledModel.RTWStatesLogging
rt_FillStateSigInfoFromMMI(%<RTMGetLoggingObject()>,%<GetRTMErrorStatusPtr()>);
%endif
%assign tstart = 0.0
%if isRSimWithSolverModule
%assign tstart = RTMGet("TStart")
%endif
rt_StartDataLoggingWithStartTime(%<RTMGetLoggingObject()>, ...
%<tstart>, %<RTMGet">RTMGet("TFinal")>, %<RTMGet">RTMGet("StepSize0")>, %<GetRTMErrorStatusPtr()>);
%endfunction
%function SLibGenLoggingStop(file) Output
%if GenerateClassInterface
%assign loggingObject = "%<CPPObjectName>.getRTM()->rtwLogInfo"
%else
%assign loggingObject = "%<RTMGetLoggingObject()>"
%endif
%if ::CompiledModel.RTWStatesLogging
rt_CleanUpForStateLogWithMMI(%<loggingObject>);
%endif
rt_StopDataLogging(%<file>, %<loggingObject>);
%endfunction
%endif