?? ipa_control_reg.h
字號(hào):
/*
* IPa_control_reg.h
*
* Real-Time Workshop code generation for Simulink model "IPa_control.mdl".
*
* Model Version : 1.38
* Real-Time Workshop file version : 4.0 $Date: 2000/09/19 19:45:27 $
* Real-Time Workshop file generated on : Fri Aug 03 15:50:52 2001
* TLC version : 4.0 (Aug 21 2000)
* C source code generated on : Fri Aug 03 15:50:53 2001
*
* Relevant TLC Options:
* InlineParameters = 0
* RollThreshold = 5
* CodeFormat = RealTime
*
* Simulink model settings:
* Solver : FixedStep
* StartTime : 0.0 s
* StopTime : 6.0 s
* FixedStep : 0.01 s
*
* SOURCES: IPa_control.c
*/
/* Function to initialize sizes */
void MdlInitializeSizes(void)
{
ssSetNumContStates(rtS, 3); /* Number of continuous states */
ssSetNumOutputs(rtS, 4); /* Number of model outputs */
ssSetNumInputs(rtS, 0); /* Number of model inputs */
ssSetDirectFeedThrough(rtS, 0); /* The model is not direct feedthrough */
ssSetNumSampleTimes(rtS, 2); /* Number of sample times */
ssSetNumBlocks(rtS, 271); /* Number of blocks */
ssSetNumBlockIO(rtS, 161); /* Number of block outputs */
ssSetNumBlockParams(rtS, 698); /* Sum of parameter "widths" */
}
/* Function to initialize sample times */
void MdlInitializeSampleTimes(void)
{
/* task periods */
ssSetSampleTime(rtS, 0, 0.0);
ssSetSampleTime(rtS, 1, 0.01);
/* task offsets */
ssSetOffsetTime(rtS, 0, 0.0);
ssSetOffsetTime(rtS, 1, 0.0);
}
/* Function to register the model */
SimStruct *IPa_control(void)
{
static struct _ssMdlInfo mdlInfo;
(void)memset((char *)rtS, 0, sizeof(SimStruct));
(void)memset((char *)&mdlInfo, 0, sizeof(struct _ssMdlInfo));
ssSetMdlInfoPtr(rtS, &mdlInfo);
/* timing info */
{
static time_T mdlPeriod[NSAMPLE_TIMES];
static time_T mdlOffset[NSAMPLE_TIMES];
static time_T mdlTaskTimes[NSAMPLE_TIMES];
static int_T mdlTsMap[NSAMPLE_TIMES];
static int_T mdlSampleHits[NSAMPLE_TIMES];
{
int_T i;
for(i = 0; i < NSAMPLE_TIMES; i++) {
mdlPeriod[i] = 0.0;
mdlOffset[i] = 0.0;
mdlTaskTimes[i] = 0.0;
}
}
(void)memset((char_T *)&mdlTsMap[0], 0, 2 * sizeof(int_T));
(void)memset((char_T *)&mdlSampleHits[0], 0, 2 * sizeof(int_T));
ssSetSampleTimePtr(rtS, &mdlPeriod[0]);
ssSetOffsetTimePtr(rtS, &mdlOffset[0]);
ssSetSampleTimeTaskIDPtr(rtS, &mdlTsMap[0]);
ssSetTPtr(rtS, &mdlTaskTimes[0]);
ssSetSampleHitPtr(rtS, &mdlSampleHits[0]);
}
ssSetSolverMode(rtS, SOLVER_MODE_SINGLETASKING);
/*
* initialize model vectors and cache them in SimStruct
*/
/* block I/O */
{
void *b = (void *) &rtB;
ssSetBlockIO(rtS, b);
{
int_T i;
for (i = 0; i < 30; i++) {
((real_T*) b)[i] = 0.0;
}
}
}
/* external outputs */
{
ssSetY(rtS, &rtY);
rtY.root_Out1 = 0.0;
rtY.root_Out2 = 0.0;
rtY.root_Out3 = 0.0;
rtY.root_Out4 = 0.0;
}
/* parameters */
ssSetDefaultParam(rtS, (real_T *) &rtP);
/* states */
{
int_T i;
real_T *x = (real_T *) &rtX;
ssSetContStates(rtS, x);
for(i = 0; i < (int_T)(sizeof(ContinuousStates)/sizeof(real_T)); i++) {
x[i] = 0.0;
}
}
/* data type work */
{
void *dwork = (void *) &rtDWork;
ssSetRootDWork(rtS, dwork);
(void)memset((char_T *) dwork, 0, sizeof(D_Work));
{
int_T i;
real_T *dworkPtr = (real_T *) &rtDWork.root_Random_Number_RWORK.NextOutput;
for (i = 0; i < 5; i++) {
*dworkPtr++ = 0.0;
}
}
}
/* Model specific registration */
ssSetRootSS(rtS, rtS);
ssSetVersion(rtS, SIMSTRUCT_VERSION_LEVEL2);
ssSetModelName(rtS, "IPa_control");
ssSetPath(rtS, "IPa_control");
ssSetTStart(rtS, 0.0);
ssSetTFinal(rtS, 6.0);
ssSetStepSize(rtS, 0.01);
ssSetFixedStepSize(rtS, 0.01);
/* Setup for data logging */
{
static RTWLogInfo rt_DataLoggingInfo;
ssSetRTWLogInfo(rtS , &rt_DataLoggingInfo);
ssSetLogFormat(rtS, 0);
ssSetLogMaxRows(rtS, 1000);
ssSetLogDecimation(rtS, 1);
ssSetLogVarNameModifier(rtS, "rt_");
ssSetLogT(rtS, "tout");
ssSetLogX(rtS, "");
ssSetLogXFinal(rtS, "");
ssSetLogXSignalInfo(rtS, NULL);
ssSetLogXSignalPtrs(rtS, NULL);
ssSetLogY(rtS, "yout");
/*
* Set pointers to the data and signal info for each output
*/
{
static void * rt_LoggedOutputSignalPtrs[] = {
&rtY.root_Out1,
&rtY.root_Out2,
&rtY.root_Out3,
&rtY.root_Out4
};
ssSetLogYSignalPtrs(rtS,((LogSignalPtrsType)rt_LoggedOutputSignalPtrs));
}
{
static const int_T rt_LoggedOutputWidths[] = {
1,
1,
1,
1
};
static const int_T rt_LoggedOutputNumDimensions[] = {
1,
1,
1,
1
};
static const int_T rt_LoggedOutputDimensions[] = {
1,
1,
1,
1
};
static const BuiltInDTypeId rt_LoggedOutputDataTypeIds[] = {
SS_DOUBLE,
SS_DOUBLE,
SS_DOUBLE,
SS_DOUBLE
};
static const int_T rt_LoggedOutputComplexSignals[] = {
0,
0,
0,
0
};
static const char_T rt_LoggedOutputLabels[] = ""
""
""
"";
static const int_T rt_LoggedOutputLabelLengths[] = {
0,
0,
0,
0
};
static const char_T rt_LoggedOutputBlockNames[] = "IPa_control/Out1"
"IPa_control/Out2"
"IPa_control/Out3"
"IPa_control/Out4";
static const int_T rt_LoggedOutputBlockNameLengths[] = {
16,
16,
16,
16
};
static const RTWLogSignalInfo rt_LoggedOutputSignalInfo = {
4,
rt_LoggedOutputWidths,
rt_LoggedOutputNumDimensions,
rt_LoggedOutputDimensions,
rt_LoggedOutputDataTypeIds,
rt_LoggedOutputComplexSignals,
NULL,
rt_LoggedOutputLabels,
rt_LoggedOutputLabelLengths,
NULL,
NULL,
NULL,
rt_LoggedOutputBlockNames,
rt_LoggedOutputBlockNameLengths
};
ssSetLogYSignalInfo(rtS, &rt_LoggedOutputSignalInfo);
}
}
ssSetChecksum0(rtS, 3359768622U);
ssSetChecksum1(rtS, 595374759U);
ssSetChecksum2(rtS, 2271317723U);
ssSetChecksum3(rtS, 3815556300U);
return rtS;
}
/* [EOF] IPa_control_reg.h */
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -