📄 bluetooth_lib2_sfun_c4.c
字号:
break;
}
}
static void enter_atomic_m1_c4_s8_Good(SFbluetooth_lib2_sfun_c4InstanceStruct
*chartInstance)
{
_SFD_CS_CALL(STATE_ENTER_ENTRY_FUNCTION_TAG,13);
_SFD_CCS_CALL(STATE_ENTRY_COVERAGE_TAG,13,0);
chartInstance->State.is_m1_c4_s6_Slot_pair_2 = IN_m1_c4_s8_Good;
_SFD_CS_CALL(STATE_ACTIVE_TAG,13);
_SFD_CS_CALL(EXIT_OUT_OF_FUNCTION_TAG,13);
}
static void
enter_atomic_m1_c4_s9_Slot_pair_3(SFbluetooth_lib2_sfun_c4InstanceStruct
*chartInstance)
{
_SFD_CS_CALL(STATE_ENTER_ENTRY_FUNCTION_TAG,0);
_SFD_CCS_CALL(STATE_ENTRY_COVERAGE_TAG,0,0);
chartInstance->State.is_m1_c4_s2_SCORT = IN_m1_c4_s9_Slot_pair_3;
_SFD_CS_CALL(STATE_ACTIVE_TAG,0);
_SFD_CS_CALL(EXIT_OUT_OF_FUNCTION_TAG,0);
}
static void
exit_atomic_m1_c4_s9_Slot_pair_3(SFbluetooth_lib2_sfun_c4InstanceStruct
*chartInstance)
{
_SFD_CS_CALL(STATE_ENTER_EXIT_FUNCTION_TAG,0);
_SFD_CCS_CALL(STATE_EXIT_COVERAGE_TAG,0,0);
chartInstance->State.is_m1_c4_s2_SCORT = IN_NO_ACTIVE_CHILD;
_SFD_CS_CALL(STATE_INACTIVE_TAG,0);
_SFD_CS_CALL(EXIT_OUT_OF_FUNCTION_TAG,0);
}
static void
exit_internal_m1_c4_s9_Slot_pair_3(SFbluetooth_lib2_sfun_c4InstanceStruct
*chartInstance)
{
switch(chartInstance->State.is_m1_c4_s9_Slot_pair_3) {
case IN_m1_c4_s10_Bad:
CV_STATE_EVAL(0,0,1);
_SFD_CS_CALL(STATE_ENTER_EXIT_FUNCTION_TAG,3);
_SFD_CCS_CALL(STATE_EXIT_COVERAGE_TAG,3,0);
chartInstance->State.is_m1_c4_s9_Slot_pair_3 = IN_NO_ACTIVE_CHILD;
_SFD_CS_CALL(STATE_INACTIVE_TAG,3);
_SFD_CS_CALL(EXIT_OUT_OF_FUNCTION_TAG,3);
break;
case IN_m1_c4_s11_Good:
CV_STATE_EVAL(0,0,2);
_SFD_CS_CALL(STATE_ENTER_EXIT_FUNCTION_TAG,11);
_SFD_CCS_CALL(STATE_EXIT_COVERAGE_TAG,11,0);
chartInstance->State.is_m1_c4_s9_Slot_pair_3 = IN_NO_ACTIVE_CHILD;
_SFD_CS_CALL(STATE_INACTIVE_TAG,11);
_SFD_CS_CALL(EXIT_OUT_OF_FUNCTION_TAG,11);
break;
default:
CV_STATE_EVAL(0,0,0);
break;
}
}
static void enter_atomic_m1_c4_s11_Good(SFbluetooth_lib2_sfun_c4InstanceStruct
*chartInstance)
{
_SFD_CS_CALL(STATE_ENTER_ENTRY_FUNCTION_TAG,11);
_SFD_CCS_CALL(STATE_ENTRY_COVERAGE_TAG,11,0);
chartInstance->State.is_m1_c4_s9_Slot_pair_3 = IN_m1_c4_s11_Good;
_SFD_CS_CALL(STATE_ACTIVE_TAG,11);
_SFD_CS_CALL(STATE_BEFORE_ENTRY_ACTION_TAG,11);
m1_c4_s13_Accept_Payload(chartInstance);
_SFD_CCS_CALL(STATE_ENTRY_COVERAGE_TAG,11,1);
_SFD_CS_CALL(STATE_AFTER_ENTRY_ACTION_TAG,11);
_SFD_CS_CALL(EXIT_OUT_OF_FUNCTION_TAG,11);
}
static void
exit_atomic_m1_c4_s12_Unknown_Packet_Type(SFbluetooth_lib2_sfun_c4InstanceStruct
*chartInstance)
{
_SFD_CS_CALL(STATE_ENTER_EXIT_FUNCTION_TAG,6);
_SFD_CCS_CALL(STATE_EXIT_COVERAGE_TAG,6,0);
chartInstance->State.is_bluetooth_lib2_sfun_c4 = IN_NO_ACTIVE_CHILD;
_SFD_CS_CALL(STATE_INACTIVE_TAG,6);
_SFD_CS_CALL(EXIT_OUT_OF_FUNCTION_TAG,6);
}
static void m1_c4_s13_Accept_Payload(SFbluetooth_lib2_sfun_c4InstanceStruct
*chartInstance)
{
sf_mex_listen_for_ctrl_c(chartInstance->S);
_SFD_CS_CALL(STATE_ACTIVE_TAG,1);
_SFD_CS_CALL(STATE_ENTER_DURING_FUNCTION_TAG,1);
_SFD_CCS_CALL(STATE_DURING_COVERAGE_TAG,1,0);
_SFD_CT_CALL(TRANSITION_ACTIVE_TAG,20);
_SFD_CT_CALL(TRANSITION_WHEN_VALID_TAG,20);
_SFD_CT_CALL(TRANSITION_BEFORE_COND_ACTION_TAG,20);
OutputData_m1_c4_d11_Frame_OK = 1.0;
_SFD_CCT_CALL(TRANSITION_CONDITION_ACTION_COVERAGE_TAG,20,0);
OutputData_m1_c4_d10_Pass_Frame = 1.0;
_SFD_CCT_CALL(TRANSITION_CONDITION_ACTION_COVERAGE_TAG,20,1);
_SFD_CT_CALL(TRANSITION_AFTER_COND_ACTION_TAG,20);
_SFD_CT_CALL(TRANSITION_INACTIVE_TAG,20);
_SFD_CS_CALL(STATE_INACTIVE_TAG,1);
_SFD_CS_CALL(EXIT_OUT_OF_FUNCTION_TAG,1);
}
static void m1_c4_s14_Reject_Payload(SFbluetooth_lib2_sfun_c4InstanceStruct
*chartInstance)
{
sf_mex_listen_for_ctrl_c(chartInstance->S);
_SFD_CS_CALL(STATE_ACTIVE_TAG,10);
_SFD_CS_CALL(STATE_ENTER_DURING_FUNCTION_TAG,10);
_SFD_CCS_CALL(STATE_DURING_COVERAGE_TAG,10,0);
_SFD_CT_CALL(TRANSITION_ACTIVE_TAG,4);
_SFD_CT_CALL(TRANSITION_WHEN_VALID_TAG,4);
_SFD_CT_CALL(TRANSITION_BEFORE_COND_ACTION_TAG,4);
OutputData_m1_c4_d11_Frame_OK = 0.0;
_SFD_CCT_CALL(TRANSITION_CONDITION_ACTION_COVERAGE_TAG,4,0);
OutputData_m1_c4_d10_Pass_Frame = 1.0;
_SFD_CCT_CALL(TRANSITION_CONDITION_ACTION_COVERAGE_TAG,4,1);
_SFD_CT_CALL(TRANSITION_AFTER_COND_ACTION_TAG,4);
_SFD_CT_CALL(TRANSITION_INACTIVE_TAG,4);
_SFD_CS_CALL(STATE_INACTIVE_TAG,10);
_SFD_CS_CALL(EXIT_OUT_OF_FUNCTION_TAG,10);
}
void sf_bluetooth_lib2_sfun_c4_get_check_sum(mxArray *plhs[])
{
((real_T *)mxGetPr((plhs[0])))[0] = (real_T)(1251128476U);
((real_T *)mxGetPr((plhs[0])))[1] = (real_T)(1284073401U);
((real_T *)mxGetPr((plhs[0])))[2] = (real_T)(2072008508U);
((real_T *)mxGetPr((plhs[0])))[3] = (real_T)(172788814U);
}
/*
* Chart initialization function
*/
/* work around the buggy macro in simstruc.h until it is fixed */
#define cdrGetOutputPortReusable(S,port) \
( (S)->portInfo.outputs[(port)].attributes.optimOpts != \
SS_NOT_REUSABLE_AND_GLOBAL )
static void initialize_bluetooth_lib2_sfun_c4( SimStruct *S)
{
SFbluetooth_lib2_sfun_c4InstanceStruct *chartInstance = ((ChartInfoStruct
*)ssGetUserData((SimStruct *)S))->chartInstance;
{
chartInstance->LocalData.m1_c4_d2_SEQN_old = 0.0;
chartInstance->LocalData.m1_c4_d1_ARQN = 0.0;
if(!cdrGetOutputPortReusable(S,1)) {
OutputData_m1_c4_d10_Pass_Frame = 0.0;
}
if(!cdrGetOutputPortReusable(S,2)) {
OutputData_m1_c4_d11_Frame_OK = 0.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(_bluetooth_lib2MachineNumber_,
4,
14,
37,
11,
1,
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(_bluetooth_lib2MachineNumber_,chartInstance->chartNumber,0);
sf_debug_set_chart_event_thresholds(_bluetooth_lib2MachineNumber_,
chartInstance->chartNumber,
1,
1,
1);
_SFD_SET_DATA_PROPS(5,
1,
1,
0,
SF_DOUBLE,
0,
NULL,
0,
0.0,
1.0,
0);
_SFD_SET_DATA_PROPS(0,
1,
1,
0,
SF_DOUBLE,
0,
NULL,
0,
0.0,
1.0,
0);
_SFD_SET_DATA_PROPS(4,
1,
1,
0,
SF_DOUBLE,
0,
NULL,
0,
0.0,
1.0,
0);
_SFD_SET_DATA_PROPS(1,
2,
0,
1,
SF_DOUBLE,
0,
NULL,
0,
0.0,
1.0,
0);
_SFD_SET_DATA_PROPS(8,
2,
0,
1,
SF_DOUBLE,
0,
NULL,
0,
0.0,
1.0,
0);
_SFD_SET_DATA_PROPS(2,
1,
1,
0,
SF_DOUBLE,
0,
NULL,
0,
0.0,
1.0,
0);
_SFD_SET_DATA_PROPS(10,
1,
1,
0,
SF_DOUBLE,
0,
NULL,
0,
0.0,
1.0,
0);
_SFD_SET_DATA_PROPS(7,
0,
0,
0,
SF_DOUBLE,
0,
NULL,
0,
0.0,
1.0,
0);
_SFD_SET_DATA_PROPS(9,
1,
1,
0,
SF_DOUBLE,
0,
NULL,
0,
0.0,
1.0,
0);
_SFD_SET_DATA_PROPS(3,
1,
1,
0,
SF_DOUBLE,
0,
NULL,
0,
0.0,
1.0,
0);
_SFD_SET_DATA_PROPS(6,
0,
0,
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -