📄 example5_sfun_c1.c
字号:
(uint8_T)ml_get_typed_scalar("TWAIT",CALLER_WORKSPACE,SF_UINT8,0);
sf_set_error_prefix_string("Stateflow Runtime Error (chart): ");
}
/* Initializing chart output data */
OutputData_c1_d5_gear = (uint8_T)0;
/* Initialize chart's state configuration */
memset((void*)&(chartInstance.State),0,sizeof(chartInstance.State));
/* Initialize all chart output event variables to zero */
{
if(ssIsFirstInitCond(S)) {
/* do this only if simulation is starting */
{
unsigned int chartAlreadyPresent;
chartAlreadyPresent = sf_debug_initialize_chart(_example5MachineNumber_,
1,
9,
14,
6,
3,
0,
0,
0,
&(chartInstance.chartNumber),
&(chartInstance.instanceNumber),
ssGetPath((SimStruct *)S),
(void *)S);
if(chartAlreadyPresent==0) {
/* this is the first instance */
sf_debug_set_chart_disable_implicit_casting(_example5MachineNumber_,chartInstance.chartNumber,0);
sf_debug_set_chart_event_thresholds(_example5MachineNumber_,
chartInstance.chartNumber,
3,
3,
3);
_SFD_SET_DATA_PROPS(3,1,1,0,SF_DOUBLE,0,NULL);
_SFD_SET_DATA_PROPS(0,1,1,0,SF_DOUBLE,0,NULL);
_SFD_SET_DATA_PROPS(1,2,0,1,SF_UINT8,0,NULL);
_SFD_SET_DATA_PROPS(2,7,0,0,SF_UINT8,0,NULL);
_SFD_SET_DATA_PROPS(4,1,1,0,SF_DOUBLE,0,NULL);
_SFD_SET_DATA_PROPS(5,1,1,0,SF_DOUBLE,0,NULL);
_SFD_EVENT_SCOPE(1,2);
_SFD_EVENT_SCOPE(2,0);
_SFD_EVENT_SCOPE(0,0);
_SFD_STATE_INFO(7,0,1);
_SFD_STATE_INFO(0,0,0);
_SFD_STATE_INFO(1,0,0);
_SFD_STATE_INFO(2,0,0);
_SFD_STATE_INFO(4,0,0);
_SFD_STATE_INFO(3,0,1);
_SFD_STATE_INFO(6,0,0);
_SFD_STATE_INFO(5,0,0);
_SFD_STATE_INFO(8,0,0);
_SFD_CH_SUBSTATE_COUNT(2);
_SFD_CH_SUBSTATE_DECOMP(1);
_SFD_CH_SUBSTATE_INDEX(0,7);
_SFD_CH_SUBSTATE_INDEX(1,3);
_SFD_ST_SUBSTATE_COUNT(7,4);
_SFD_ST_SUBSTATE_INDEX(7,0,0);
_SFD_ST_SUBSTATE_INDEX(7,1,1);
_SFD_ST_SUBSTATE_INDEX(7,2,2);
_SFD_ST_SUBSTATE_INDEX(7,3,4);
_SFD_ST_SUBSTATE_COUNT(0,0);
_SFD_ST_SUBSTATE_COUNT(1,0);
_SFD_ST_SUBSTATE_COUNT(2,0);
_SFD_ST_SUBSTATE_COUNT(4,0);
_SFD_ST_SUBSTATE_COUNT(3,3);
_SFD_ST_SUBSTATE_INDEX(3,0,6);
_SFD_ST_SUBSTATE_INDEX(3,1,5);
_SFD_ST_SUBSTATE_INDEX(3,2,8);
_SFD_ST_SUBSTATE_COUNT(6,0);
_SFD_ST_SUBSTATE_COUNT(5,0);
_SFD_ST_SUBSTATE_COUNT(8,0);
}
_SFD_CV_INIT_CHART(2,0,0,0);
_SFD_CV_INIT_STATE(7,4,1,0,0);
_SFD_CV_INIT_STATE(0,0,0,0,0);
_SFD_CV_INIT_STATE(1,0,0,0,0);
_SFD_CV_INIT_STATE(2,0,0,0,0);
_SFD_CV_INIT_STATE(4,0,0,0,0);
_SFD_CV_INIT_STATE(3,3,1,0,0);
_SFD_CV_INIT_STATE(6,0,0,0,0);
_SFD_CV_INIT_STATE(5,0,0,0,0);
_SFD_CV_INIT_STATE(8,0,0,0,0);
{
static unsigned int sStartGuardMap[] = {0};
static unsigned int sEndGuardMap[] = {2};
static int sPostFixPredicateTree[] = {0};
_SFD_CV_INIT_TRANS(5,1,&(sStartGuardMap[0]),&(sEndGuardMap[0]),1,&(sPostFixPredicateTree[0]));
}
{
static unsigned int sStartGuardMap[] = {0};
static unsigned int sEndGuardMap[] = {2};
static int sPostFixPredicateTree[] = {0};
_SFD_CV_INIT_TRANS(10,1,&(sStartGuardMap[0]),&(sEndGuardMap[0]),1,&(sPostFixPredicateTree[0]));
}
{
static unsigned int sStartGuardMap[] = {0};
static unsigned int sEndGuardMap[] = {2};
static int sPostFixPredicateTree[] = {0};
_SFD_CV_INIT_TRANS(2,1,&(sStartGuardMap[0]),&(sEndGuardMap[0]),1,&(sPostFixPredicateTree[0]));
}
_SFD_CV_INIT_TRANS(3,0,NULL,NULL,0,NULL);
{
static unsigned int sStartGuardMap[] = {0};
static unsigned int sEndGuardMap[] = {4};
static int sPostFixPredicateTree[] = {0};
_SFD_CV_INIT_TRANS(9,1,&(sStartGuardMap[0]),&(sEndGuardMap[0]),1,&(sPostFixPredicateTree[0]));
}
{
static unsigned int sStartGuardMap[] = {0};
static unsigned int sEndGuardMap[] = {4};
static int sPostFixPredicateTree[] = {0};
_SFD_CV_INIT_TRANS(7,1,&(sStartGuardMap[0]),&(sEndGuardMap[0]),1,&(sPostFixPredicateTree[0]));
}
{
static unsigned int sStartGuardMap[] = {0};
static unsigned int sEndGuardMap[] = {4};
static int sPostFixPredicateTree[] = {0};
_SFD_CV_INIT_TRANS(11,1,&(sStartGuardMap[0]),&(sEndGuardMap[0]),1,&(sPostFixPredicateTree[0]));
}
_SFD_CV_INIT_TRANS(0,0,NULL,NULL,0,NULL);
{
static unsigned int sStartGuardMap[] = {1};
static unsigned int sEndGuardMap[] = {14};
static int sPostFixPredicateTree[] = {0};
_SFD_CV_INIT_TRANS(1,1,&(sStartGuardMap[0]),&(sEndGuardMap[0]),1,&(sPostFixPredicateTree[0]));
}
{
static unsigned int sStartGuardMap[] = {1};
static unsigned int sEndGuardMap[] = {16};
static int sPostFixPredicateTree[] = {0};
_SFD_CV_INIT_TRANS(13,1,&(sStartGuardMap[0]),&(sEndGuardMap[0]),1,&(sPostFixPredicateTree[0]));
}
{
static unsigned int sStartGuardMap[] = {1};
static unsigned int sEndGuardMap[] = {14};
static int sPostFixPredicateTree[] = {0};
_SFD_CV_INIT_TRANS(6,1,&(sStartGuardMap[0]),&(sEndGuardMap[0]),1,&(sPostFixPredicateTree[0]));
}
{
static unsigned int sStartGuardMap[] = {1};
static unsigned int sEndGuardMap[] = {16};
static int sPostFixPredicateTree[] = {0};
_SFD_CV_INIT_TRANS(8,1,&(sStartGuardMap[0]),&(sEndGuardMap[0]),1,&(sPostFixPredicateTree[0]));
}
{
static unsigned int sStartGuardMap[] = {12,0,19};
static unsigned int sEndGuardMap[] = {16,17,35};
static int sPostFixPredicateTree[] = {0,1,-3,2,-3};
_SFD_CV_INIT_TRANS(4,3,&(sStartGuardMap[0]),&(sEndGuardMap[0]),5,&(sPostFixPredicateTree[0]));
}
{
static unsigned int sStartGuardMap[] = {12,0,19};
static unsigned int sEndGuardMap[] = {16,17,33};
static int sPostFixPredicateTree[] = {0,1,-3,2,-3};
_SFD_CV_INIT_TRANS(12,3,&(sStartGuardMap[0]),&(sEndGuardMap[0]),5,&(sPostFixPredicateTree[0]));
}
_SFD_STATE_COV_WTS(7,1,1,1);
if(chartAlreadyPresent==0)
{
static unsigned int sStartEntryMap[] = {0};
static unsigned int sEndEntryMap[] = {0};
static unsigned int sStartDuringMap[] = {0};
static unsigned int sEndDuringMap[] = {0};
static unsigned int sStartExitMap[] = {0};
static unsigned int sEndExitMap[] = {0};
_SFD_STATE_COV_MAPS(7,
1,&(sStartEntryMap[0]),&(sEndEntryMap[0]),
1,&(sStartDuringMap[0]),&(sEndDuringMap[0]),
1,&(sStartExitMap[0]),&(sEndExitMap[0]));
}
_SFD_STATE_COV_WTS(0,2,1,1);
if(chartAlreadyPresent==0)
{
static unsigned int sStartEntryMap[] = {0,13};
static unsigned int sEndEntryMap[] = {0,22};
static unsigned int sStartDuringMap[] = {0};
static unsigned int sEndDuringMap[] = {0};
static unsigned int sStartExitMap[] = {0};
static unsigned int sEndExitMap[] = {0};
_SFD_STATE_COV_MAPS(0,
2,&(sStartEntryMap[0]),&(sEndEntryMap[0]),
1,&(sStartDuringMap[0]),&(sEndDuringMap[0]),
1,&(sStartExitMap[0]),&(sEndExitMap[0]));
}
_SFD_STATE_COV_WTS(1,2,1,1);
if(chartAlreadyPresent==0)
{
static unsigned int sStartEntryMap[] = {0,14};
static unsigned int sEndEntryMap[] = {0,23};
static unsigned int sStartDuringMap[] = {0};
static unsigned int sEndDuringMap[] = {0};
static unsigned int sStartExitMap[] = {0};
static unsigned int sEndExitMap[] = {0};
_SFD_STATE_COV_MAPS(1,
2,&(sStartEntryMap[0]),&(sEndEntryMap[0]),
1,&(sStartDuringMap[0]),&(sEndDuringMap[0]),
1,&(sStartExitMap[0]),&(sEndExitMap[0]));
}
_SFD_STATE_COV_WTS(2,2,1,1);
if(chartAlreadyPresent==0)
{
static unsigned int sStartEntryMap[] = {0,14};
static unsigned int sEndEntryMap[] = {0,23};
static unsigned int sStartDuringMap[] = {0};
static unsigned int sEndDuringMap[] = {0};
static unsigned int sStartExitMap[] = {0};
static unsigned int sEndExitMap[] = {0};
_SFD_STATE_COV_MAPS(2,
2,&(sStartEntryMap[0]),&(sEndEntryMap[0]),
1,&(sStartDuringMap[0]),&(sEndDuringMap[0]),
1,&(sStartExitMap[0]),&(sEndExitMap[0]));
}
_SFD_STATE_COV_WTS(4,2,1,1);
if(chartAlreadyPresent==0)
{
static unsigned int sStartEntryMap[] = {0,13};
static unsigned int sEndEntryMap[] = {0,22};
static unsigned int sStartDuringMap[] = {0};
static unsigned int sEndDuringMap[] = {0};
static unsigned int sStartExitMap[] = {0};
static unsigned int sEndExitMap[] = {0};
_SFD_STATE_COV_MAPS(4,
2,&(sStartEntryMap[0]),&(sEndEntryMap[0]),
1,&(sStartDuringMap[0]),&(sEndDuringMap[0]),
1,&(sStartExitMap[0]),&(sEndExitMap[0]));
}
_SFD_STATE_COV_WTS(3,1,2,1);
if(chartAlreadyPresent==0)
{
static unsigned int sStartEntryMap[] = {0};
static unsigned int sEndEntryMap[] = {0};
static unsigned int sStartDuringMap[] = {0,24};
static unsigned int sEndDuringMap[] = {0,32};
static unsigned int sStartExitMap[] = {0};
static unsigned int sEndExitMap[] = {0};
_SFD_STATE_COV_MAPS(3,
1,&(sStartEntryMap[0]),&(sEndEntryMap[0]),
2,&(sStartDuringMap[0]),&(sEndDuringMap[0]),
1,&(sStartExitMap[0]),&(sEndExitMap[0]));
}
_SFD_STATE_COV_WTS(6,1,1,1);
if(chartAlreadyPresent==0)
{
static unsigned int sStartEntryMap[] = {0};
static unsigned int sEndEntryMap[] = {0};
static unsigned int sStartDuringMap[] = {0};
static unsigned int sEndDuringMap[] = {0};
static unsigned int sStartExitMap[] = {0};
static unsigned int sEndExitMap[] = {0};
_SFD_STATE_COV_MAPS(6,
1,&(sStartEntryMap[0]),&(sEndEntryMap[0]),
1,&(sStartDuringMap[0]),&(sEndDuringMap[0]),
1,&(sStartExitMap[0]),&(sEndExitMap[0]));
}
_SFD_STATE_COV_WTS(5,1,1,1);
if(chartAlreadyPresent==0)
{
static unsigned int sStartEntryMap[] = {0};
static unsigned int sEndEntryMap[] = {0};
static unsigned int sStartDuringMap[] = {0};
static unsigned int sEndDuringMap[] = {0};
static unsigned int sStartExitMap[] = {0};
static unsigned int sEndExitMap[] = {0};
_SFD_STATE_COV_MAPS(5,
1,&(sStartEntryMap[0]),&(sEndEntryMap[0]),
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -