ADM/ADM_Cruise_Control/CANTest_slrt_rtw/instrumented/xpcoptions.h
JaeminSong 3854fbc169 Cruise Control Update
Cruise Control Update
2024-08-07 11:01:25 +09:00

55 lines
1.9 KiB
C

#ifndef __CANTest_XPCOPTIONS_H___
#define __CANTest_XPCOPTIONS_H___
#include "simstruc_types.h"
#ifndef MT
#define MT 0 /* MT may be undefined by simstruc_types.h */
#endif
#include "CANTest.h"
#define XPCMDSSUPPORT 0
#define MDSTASKSNUM 0
#define FULLMULTITHREAD 1
#define SIZEOF_PARAMS (-1 * (int)sizeof(P_CANTest_T))
#define SIMMODE 0
#define LOGTET 0
#define LOGBUFSIZE 100000
#define PROFILINGFLAG 1
#define EVENTNUMBER 5000
#define IRQ_NO 0
#define IO_IRQ 0
#define WWW_ACCESS_LEVEL 0
#define CPUCLOCK 0
#define MAXOVERLOAD 0
#define MAXOVERLOADLEN 0
#define XPCMODELSTACKSIZEKB 2048
#define XPCSTARTUPFLAG 1
#define PTLOADPARAMFLAG 0
#define DOUBLEBUFFERING 0
#define SLRTFTZOFFFLAG 0
/* Change all stepsize using the newBaseRateStepSize */
void CANTest_ChangeStepSize(real_T newBaseRateStepSize, RT_MODEL_CANTest_T *
const CANTest_M)
{
real_T ratio = newBaseRateStepSize / 0.002;
/* update non-zore stepsize of periodic
* sample time. Stepsize of asynchronous
* sample time is not changed in this function */
CANTest_M->Timing.stepSize0 = CANTest_M->Timing.stepSize0 * ratio;
CANTest_M->Timing.stepSize = CANTest_M->Timing.stepSize * ratio;
}
void XPCCALLCONV changeStepSize(real_T stepSize)
{
/* Change all stepsize using the newBaseRateStepSize */
CANTest_ChangeStepSize(stepSize, CANTest_M);
}
void XPCCALLCONV SLRTSetErrorStatus(const char * errMsg)
{
rtmSetErrorStatus(CANTest_M, errMsg);
}
#endif /* __CANTest_XPCOPTIONS_H___ */