📄 c1_myuart1.c
字号:
0) {
_SFD_CT_CALL(TRANSITION_ACTIVE_TAG,12);
_SFD_CS_CALL(STATE_ENTER_EXIT_FUNCTION_TAG,3);
chartInstance.c1_tp_DEC = 0U;
_SFD_CS_CALL(STATE_INACTIVE_TAG,3);
_SFD_CS_CALL(EXIT_OUT_OF_FUNCTION_TAG,3);
chartInstance.c1_is_CntPro = (uint8_T)c1_IN_WAIT;
_SFD_CS_CALL(STATE_ACTIVE_TAG,12);
chartInstance.c1_tp_WAIT = 1U;
c1_u5 = c1__u8_s8_(15);
if(c1_u5 > 31) {
sf_debug_overflow_detection(0U, 0U);
}
chartInstance.c1_RateCnt = (uint8_T)(c1_u5 & 31U);
_SFD_DATA_RANGE_CHECK((real_T)chartInstance.c1_RateCnt, 5U);
} else {
_SFD_CT_CALL(TRANSITION_BEFORE_PROCESSING_TAG,2);
_SFD_CT_CALL(TRANSITION_ACTIVE_TAG,2);
_SFD_CS_CALL(STATE_ENTER_EXIT_FUNCTION_TAG,3);
chartInstance.c1_tp_DEC = 0U;
_SFD_CS_CALL(STATE_INACTIVE_TAG,3);
_SFD_CS_CALL(EXIT_OUT_OF_FUNCTION_TAG,3);
chartInstance.c1_is_CntPro = (uint8_T)c1_IN_DEC;
_SFD_CS_CALL(STATE_ACTIVE_TAG,3);
chartInstance.c1_tp_DEC = 1U;
}
} else {
c1_u6 = c1__u8_s32_(chartInstance.c1_RateCnt - 1);
if(c1_u6 > 31) {
sf_debug_overflow_detection(0U, 0U);
}
chartInstance.c1_RateCnt = (uint8_T)(c1_u6 & 31U);
_SFD_DATA_RANGE_CHECK((real_T)chartInstance.c1_RateCnt, 5U);
}
_SFD_CS_CALL(EXIT_OUT_OF_FUNCTION_TAG,3);
break;
case c1_IN_WAIT:
CV_STATE_EVAL(10,0,2);
_SFD_CS_CALL(STATE_ENTER_DURING_FUNCTION_TAG,12);
_SFD_CT_CALL(TRANSITION_BEFORE_PROCESSING_TAG,6);
if(CV_TRANSITION_EVAL(6U, (int32_T)_SFD_CCP_CALL(6,0,(((uint8_T)(*c1_RxD() &
1U) == 0)!=0))) != 0U != 0) {
_SFD_CT_CALL(TRANSITION_ACTIVE_TAG,6);
c1_u7 = c1__u8_s32_(chartInstance.c1_RateCnt >> 1);
if(c1_u7 > 31) {
sf_debug_overflow_detection(0U, 0U);
}
chartInstance.c1_RateCnt = (uint8_T)(c1_u7 & 31U);
_SFD_DATA_RANGE_CHECK((real_T)chartInstance.c1_RateCnt, 5U);
_SFD_CS_CALL(STATE_ENTER_EXIT_FUNCTION_TAG,12);
chartInstance.c1_tp_WAIT = 0U;
_SFD_CS_CALL(STATE_INACTIVE_TAG,12);
_SFD_CS_CALL(EXIT_OUT_OF_FUNCTION_TAG,12);
chartInstance.c1_is_CntPro = (uint8_T)c1_IN_DEC;
_SFD_CS_CALL(STATE_ACTIVE_TAG,3);
chartInstance.c1_tp_DEC = 1U;
} else {
_SFD_CT_CALL(TRANSITION_BEFORE_PROCESSING_TAG,16);
_SFD_CT_CALL(TRANSITION_ACTIVE_TAG,16);
_SFD_CS_CALL(STATE_ENTER_EXIT_FUNCTION_TAG,12);
chartInstance.c1_tp_WAIT = 0U;
_SFD_CS_CALL(STATE_INACTIVE_TAG,12);
_SFD_CS_CALL(EXIT_OUT_OF_FUNCTION_TAG,12);
chartInstance.c1_is_CntPro = (uint8_T)c1_IN_WAIT;
_SFD_CS_CALL(STATE_ACTIVE_TAG,12);
chartInstance.c1_tp_WAIT = 1U;
c1_u8 = c1__u8_s8_(15);
if(c1_u8 > 31) {
sf_debug_overflow_detection(0U, 0U);
}
chartInstance.c1_RateCnt = (uint8_T)(c1_u8 & 31U);
_SFD_DATA_RANGE_CHECK((real_T)chartInstance.c1_RateCnt, 5U);
}
_SFD_CS_CALL(EXIT_OUT_OF_FUNCTION_TAG,12);
break;
default:
CV_STATE_EVAL(10,0,0);
chartInstance.c1_is_CntPro = (uint8_T)c1_IN_NO_ACTIVE_CHILD;
_SFD_CS_CALL(STATE_INACTIVE_TAG,3);
break;
}
_SFD_CS_CALL(EXIT_OUT_OF_FUNCTION_TAG,10);
_SFD_CS_CALL(STATE_ENTER_DURING_FUNCTION_TAG,2);
switch(chartInstance.c1_is_FlagPro) {
case c1_IN_EMPTY:
CV_STATE_EVAL(2,0,1);
_SFD_CS_CALL(STATE_ENTER_DURING_FUNCTION_TAG,7);
_SFD_CT_CALL(TRANSITION_BEFORE_PROCESSING_TAG,0);
if(CV_TRANSITION_EVAL(0U,
(int32_T)_SFD_CCP_CALL(0,0,(((uint8_T)(chartInstance.c1_BitCnt & 15U) ==
9)!=0))) != 0U != 0) {
_SFD_CT_CALL(TRANSITION_ACTIVE_TAG,0);
_SFD_CS_CALL(STATE_ENTER_EXIT_FUNCTION_TAG,7);
chartInstance.c1_tp_EMPTY = 0U;
_SFD_CS_CALL(STATE_INACTIVE_TAG,7);
_SFD_CS_CALL(EXIT_OUT_OF_FUNCTION_TAG,7);
chartInstance.c1_is_FlagPro = (uint8_T)c1_IN_FULL;
_SFD_CS_CALL(STATE_ACTIVE_TAG,0);
chartInstance.c1_tp_FULL = 1U;
c1_u9 = c1__u8_s8_(1);
if(c1_u9 > 1) {
sf_debug_overflow_detection(0U, 0U);
}
*c1_Valid() = (uint8_T)(c1_u9 & 1U);
_SFD_DATA_RANGE_CHECK((real_T)*c1_Valid(), 6U);
*c1_RxDData() = chartInstance.c1_Tmp;
_SFD_DATA_RANGE_CHECK((real_T)*c1_RxDData(), 0U);
} else {
_SFD_CT_CALL(TRANSITION_BEFORE_PROCESSING_TAG,15);
_SFD_CT_CALL(TRANSITION_ACTIVE_TAG,15);
_SFD_CS_CALL(STATE_ENTER_EXIT_FUNCTION_TAG,7);
chartInstance.c1_tp_EMPTY = 0U;
_SFD_CS_CALL(STATE_INACTIVE_TAG,7);
_SFD_CS_CALL(EXIT_OUT_OF_FUNCTION_TAG,7);
chartInstance.c1_is_FlagPro = (uint8_T)c1_IN_EMPTY;
_SFD_CS_CALL(STATE_ACTIVE_TAG,7);
chartInstance.c1_tp_EMPTY = 1U;
*c1_Valid() = 0U;
_SFD_DATA_RANGE_CHECK((real_T)*c1_Valid(), 6U);
}
_SFD_CS_CALL(EXIT_OUT_OF_FUNCTION_TAG,7);
break;
case c1_IN_FULL:
CV_STATE_EVAL(2,0,2);
_SFD_CS_CALL(STATE_ENTER_DURING_FUNCTION_TAG,0);
_SFD_CT_CALL(TRANSITION_BEFORE_PROCESSING_TAG,3);
if(CV_TRANSITION_EVAL(3U, (int32_T)_SFD_CCP_CALL(3,0,(((uint8_T)(*c1_Rd() &
1U) == 1)!=0))) != 0U != 0) {
_SFD_CT_CALL(TRANSITION_ACTIVE_TAG,3);
_SFD_CS_CALL(STATE_ENTER_EXIT_FUNCTION_TAG,0);
chartInstance.c1_tp_FULL = 0U;
_SFD_CS_CALL(STATE_INACTIVE_TAG,0);
_SFD_CS_CALL(EXIT_OUT_OF_FUNCTION_TAG,0);
chartInstance.c1_is_FlagPro = (uint8_T)c1_IN_NEXT;
_SFD_CS_CALL(STATE_ACTIVE_TAG,11);
chartInstance.c1_tp_NEXT = 1U;
*c1_Valid() = 0U;
_SFD_DATA_RANGE_CHECK((real_T)*c1_Valid(), 6U);
}
_SFD_CS_CALL(EXIT_OUT_OF_FUNCTION_TAG,0);
break;
case c1_IN_NEXT:
CV_STATE_EVAL(2,0,3);
_SFD_CS_CALL(STATE_ENTER_DURING_FUNCTION_TAG,11);
_SFD_CT_CALL(TRANSITION_BEFORE_PROCESSING_TAG,10);
if(CV_TRANSITION_EVAL(10U,
(int32_T)_SFD_CCP_CALL(10,0,(((uint8_T)(chartInstance.c1_BitCnt & 15U) ==
0)!=0))) != 0U != 0) {
_SFD_CT_CALL(TRANSITION_ACTIVE_TAG,10);
_SFD_CS_CALL(STATE_ENTER_EXIT_FUNCTION_TAG,11);
chartInstance.c1_tp_NEXT = 0U;
_SFD_CS_CALL(STATE_INACTIVE_TAG,11);
_SFD_CS_CALL(EXIT_OUT_OF_FUNCTION_TAG,11);
chartInstance.c1_is_FlagPro = (uint8_T)c1_IN_EMPTY;
_SFD_CS_CALL(STATE_ACTIVE_TAG,7);
chartInstance.c1_tp_EMPTY = 1U;
*c1_Valid() = 0U;
_SFD_DATA_RANGE_CHECK((real_T)*c1_Valid(), 6U);
}
_SFD_CS_CALL(EXIT_OUT_OF_FUNCTION_TAG,11);
break;
default:
CV_STATE_EVAL(2,0,0);
chartInstance.c1_is_FlagPro = (uint8_T)c1_IN_NO_ACTIVE_CHILD;
_SFD_CS_CALL(STATE_INACTIVE_TAG,7);
break;
}
_SFD_CS_CALL(EXIT_OUT_OF_FUNCTION_TAG,2);
_SFD_CS_CALL(EXIT_OUT_OF_FUNCTION_TAG,8);
}
const mxArray *sf_c1_MyUART1_get_eml_resolved_functions_info(void)
{
const mxArray *c1_nameCaptureInfo = NULL;
c1_nameCaptureInfo = NULL;
sf_mex_assign(&c1_nameCaptureInfo, sf_mex_create(NULL, "nameCaptureInfo", 0,
0U, 1U, 2, 0, 1));
return c1_nameCaptureInfo;
}
static uint8_T c1__u8_s8_(int8_T c1_b)
{
uint8_T c1_a;
c1_a = (uint8_T)c1_b;
if(c1_b < 0) {
sf_debug_overflow_detection(0U, 0U);
}
return c1_a;
}
static int32_T c1__s32_shl_s32_(int32_T c1_b, int32_T c1_c)
{
int32_T c1_a;
c1_a = c1_b << c1_c;
if((c1_b != c1_a >> c1_c) || ((uint32_T)c1_c > 31U)) {
sf_debug_overflow_detection(0U, 0U);
}
return c1_a;
}
static int32_T c1__s32_add__(int32_T c1_b, int32_T c1_c)
{
int32_T c1_a;
c1_a = c1_b + c1_c;
if(((c1_a ^ c1_b) & (c1_a ^ c1_c)) < 0) {
sf_debug_overflow_detection(0U, 0U);
}
return c1_a;
}
static uint8_T c1__u8_s32_(int32_T c1_b)
{
uint8_T c1_a;
c1_a = (uint8_T)c1_b;
if(c1_a != c1_b) {
sf_debug_overflow_detection(0U, 0U);
}
return c1_a;
}
static uint8_T *c1_RxD(void)
{
return (uint8_T *)ssGetInputPortSignal(chartInstance.S, 0);
}
static uint8_T *c1_RxDData(void)
{
return (uint8_T *)ssGetOutputPortSignal(chartInstance.S, 1);
}
static uint8_T *c1_Valid(void)
{
return (uint8_T *)ssGetOutputPortSignal(chartInstance.S, 2);
}
static uint8_T *c1_Rd(void)
{
return (uint8_T *)ssGetInputPortSignal(chartInstance.S, 1);
}
static void init_test_point_addr_map(void)
{
chartInstance.c1_testPointAddrMap[0] = &chartInstance.c1_RateCnt;
chartInstance.c1_testPointAddrMap[1] = &chartInstance.c1_BitCnt;
chartInstance.c1_testPointAddrMap[2] = &chartInstance.c1_Tmp;
chartInstance.c1_testPointAddrMap[3] = &chartInstance.c1_tp_S;
chartInstance.c1_testPointAddrMap[4] = &chartInstance.c1_tp_CntPro;
chartInstance.c1_testPointAddrMap[5] = &chartInstance.c1_tp_DEC;
chartInstance.c1_testPointAddrMap[6] = &chartInstance.c1_tp_WAIT;
chartInstance.c1_testPointAddrMap[7] = &chartInstance.c1_tp_FlagPro;
chartInstance.c1_testPointAddrMap[8] = &chartInstance.c1_tp_EMPTY;
chartInstance.c1_testPointAddrMap[9] = &chartInstance.c1_tp_FULL;
chartInstance.c1_testPointAddrMap[10] = &chartInstance.c1_tp_NEXT;
chartInstance.c1_testPointAddrMap[11] = &chartInstance.c1_tp_RxdPro;
chartInstance.c1_testPointAddrMap[12] = &chartInstance.c1_tp_DATA;
chartInstance.c1_testPointAddrMap[13] = &chartInstance.c1_tp_IDLE;
chartInstance.c1_testPointAddrMap[14] = &chartInstance.c1_tp_START;
chartInstance.c1_testPointAddrMap[15] = &chartInstance.c1_tp_STOP;
chartInstance.c1_testPointAddrMap[16] = &chartInstance.c1_tp_STORE;
}
static void **get_test_point_address_map(void)
{
return &chartInstance.c1_testPointAddrMap[0];
}
static rtwCAPI_ModelMappingInfo *get_test_point_mapping_info(void)
{
return &chartInstance.c1_testPointMappingInfo;
}
static void init_dsm_address_info(void)
{
}
/* SFunction Glue Code */
static void init_test_point_mapping_info(SimStruct *S);
void sf_c1_MyUART1_get_check_sum(mxArray *plhs[])
{
((real_T *)mxGetPr((plhs[0])))[0] = (real_T)(2068074276U);
((real_T *)mxGetPr((plhs[0])))[1] = (real_T)(1742945248U);
((real_T *)mxGetPr((plhs[0])))[2] = (real_T)(3446802107U);
((real_T *)mxGetPr((plhs[0])))[3] = (real_T)(2394880239U);
}
mxArray *sf_c1_MyUART1_get_autoinheritance_info(void)
{
const char *autoinheritanceFields[] =
{"checksum","inputs","parameters","outputs"};
mxArray *mxAutoinheritanceInfo =
mxCreateStructMatrix(1,1,4,autoinheritanceFields);
{
mxArray *mxChecksum = mxCreateDoubleMatrix(4,1,mxREAL);
double *pr = mxGetPr(mxChecksum);
pr[0] = (double)(1623932405U);
pr[1] = (double)(779786689U);
pr[2] = (double)(820014554U);
pr[3] = (double)(1842919389U);
mxSetField(mxAutoinheritanceInfo,0,"checksum",mxChecksum);
}
{
const char *dataFields[] = {"size","type","complexity"};
mxArray *mxData = mxCreateStructMatrix(1,2,3,dataFields);
{
mxArray *mxSize = mxCreateDoubleMatrix(1,2,mxREAL);
double *pr = mxGetPr(mxSize);
pr[0] = (double)(1);
pr[1] = (double)(1);
mxSetField(mxData,0,"size",mxSize);
}
{
const char *typeFields[] = {"base","aliasId","fixpt"};
mxArray *mxType = mxCreateStructMatrix(1,1,3,typeFields);
mxSetField(mxType,0,"base",mxCreateDoubleScalar(11));
mxSetField(mxType,0,"aliasId",mxCreateDoubleScalar(0));
{
const char *fixptFields[] =
{"isSigned","wordLength","bias","slope","exponent"};
mxArray *mxFixpt = mxCreateStructMatrix(1,1,5,fixptFields);
mxSetField(mxFixpt,0,"isSigned",mxCreateDoubleScalar(0));
mxSetField(mxFixpt,0,"wordLength",mxCreateDoubleScalar(1));
mxSetField(mxFixpt,0,"bias",mxCreateDoubleScalar(0));
mxSetField(mxFixpt,0,"slope",mxCreateDoubleScalar(1));
mxSetField(mxFixpt,0,"exponent",mxCreateDoubleScalar(0));
mxSetField(mxType,0,"fixpt",mxFixpt);
}
mxSetField(mxData,0,"type",mxType);
}
mxSetField(mxData,0,"complexity",mxCreateDoubleScalar(0));
{
mxArray *mxSize = mxCreateDoubleMatrix(1,2,mxREAL);
double *pr = mxGetPr(mxSize);
pr[0] = (double)(1);
pr[1] = (double)(1);
mxSetField(mxData,1,"size",mxSize);
}
{
const char *typeFields[] = {"base","aliasId","fixpt"};
mxArray *mxType = mxCreateStructMatrix(1,1,3,typeFields);
mxSetField(mxType,0,"base",mxCreateDoubleScalar(11));
mxSetField(mxType,0,"aliasId",mxCreateDoubleScalar(0));
{
const char *fixptFields[] =
{"isSigned","wordLength","bias","slope","exponent"};
mxArray *mxFixpt = mxCreateStructMatrix(1,1,5,fixptFields);
mxSetField(mxFixpt,0,"isSigned",mxCreateDoubleScalar(0));
mxSetField(mxFixpt,0,"wordLength",mxCreateDoubleScalar(1));
mxSetField(mxFixpt,0,"bias",mxCreateDoubleScalar(0));
mxSetField(mxFixpt,0,"slope",mxCreateDoubleScalar(1));
mxSetField(mxFixpt,0,"exponent",mxCreateDoubleScalar(0));
mxSetField(mxType,0,"fixpt",mxFixpt);
}
mxSetField(mxData,1,"type",mxType);
}
mxSetField(mxData,1,"complexity",mxCreateDoubleScalar(0));
mxSetField(mxAutoinheritanceInfo,0,"inputs",mxData);
}
{
mxSetField(mxAutoinheritanceInfo,0,"parameters",mxCreateDoubleMatrix(0,0,mxREAL));
}
{
const char *dataFields[] = {"size","type","complexity"};
mxArray *mxData = mxCreateStructMatrix(1,2,3,dataFields);
{
mxArray *mxSize = mxCreateDoubleMatrix(1,2,mxREAL);
double *pr = mxGetPr(mxSize);
pr[0] = (double)(1);
pr[1] = (double)(1);
mxSetField(mxData,0,"size",mxSize);
}
{
const char *typeFields[] = {"base","aliasId","fixpt"};
mxArray *mxType = mxCreateStructMatrix(1,1,3,typeFields);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -