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

56 lines
2.0 KiB
C

#ifndef __WheelSpd1_XPCOPTIONS_H___
#define __WheelSpd1_XPCOPTIONS_H___
#include "simstruc_types.h"
#ifndef MT
#define MT 0 /* MT may be undefined by simstruc_types.h */
#endif
#include "WheelSpd1.h"
#define XPCMDSSUPPORT 0
#define MDSTASKSNUM 0
#define FULLMULTITHREAD 1
#define SIZEOF_PARAMS (-1 * (int)sizeof(P_WheelSpd1_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 WheelSpd1_ChangeStepSize(real_T newBaseRateStepSize, RT_MODEL_WheelSpd1_T *
const WheelSpd1_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 */
WheelSpd1_M->Timing.stepSize0 = WheelSpd1_M->Timing.stepSize0 * ratio;
WheelSpd1_M->Timing.stepSize1 = WheelSpd1_M->Timing.stepSize1 * ratio;
WheelSpd1_M->Timing.stepSize = WheelSpd1_M->Timing.stepSize * ratio;
}
void XPCCALLCONV changeStepSize(real_T stepSize)
{
/* Change all stepsize using the newBaseRateStepSize */
WheelSpd1_ChangeStepSize(stepSize, WheelSpd1_M);
}
void XPCCALLCONV SLRTSetErrorStatus(const char * errMsg)
{
rtmSetErrorStatus(WheelSpd1_M, errMsg);
}
#endif /* __WheelSpd1_XPCOPTIONS_H___ */