servo_demo_sfun_debug_macros.h
上传用户:m_sun_001
上传日期:2014-07-30
资源大小:1115k
文件大小:12k
源码类别:

matlab例程

开发平台:

Matlab

  1. #ifndef __SF_DEBUG_MACROS_H__
  2. #define __SF_DEBUG_MACROS_H__
  3. #define _SFD_MACHINE_CALL(v1,v2,v3) sf_debug_call(_servo_demoMachineNumber_,UNREASONABLE_NUMBER,UNREASONABLE_NUMBER,MACHINE_OBJECT,v1,v2,v3,(unsigned int) _sfEvent_,-1,NULL,_sfTime_,1)
  4. #define _SFD_ME_CALL(v2,v3) _SFD_MACHINE_CALL(EVENT_OBJECT,v2,v3)
  5. #define _SFD_MD_CALL(v2,v3) _SFD_MACHINE_CALL(EVENT_OBJECT,v2,v3)
  6. extern unsigned int _servo_demoMachineNumber_;
  7. #define _SFD_SET_DATA_VALUE_PTR(v1,v2)
  8. sf_debug_set_instance_data_value_ptr(_servo_demoMachineNumber_,CHARTINSTANCE_CHARTNUMBER,CHARTINSTANCE_INSTANCENUMBER,v1,(void *)(v2));
  9. #define _SFD_UNSET_DATA_VALUE_PTR(v1)
  10. sf_debug_unset_instance_data_value_ptr(_servo_demoMachineNumber_,CHARTINSTANCE_CHARTNUMBER,CHARTINSTANCE_INSTANCENUMBER,v1);
  11. #define _SFD_DATA_RANGE_CHECK_MIN_MAX(dVal,dNum,dMin,dMax)
  12.                       sf_debug_data_range_error_wrapper_min_max(_servo_demoMachineNumber_,
  13. CHARTINSTANCE_CHARTNUMBER,
  14. CHARTINSTANCE_INSTANCENUMBER,
  15.                                              dNum,(double)(dVal),(double)dMin,(double)dMax)
  16. #define _SFD_DATA_RANGE_CHECK_MIN(dVal,dNum,dMin)
  17.                       sf_debug_data_range_error_wrapper_min(_servo_demoMachineNumber_,
  18. CHARTINSTANCE_CHARTNUMBER,
  19. CHARTINSTANCE_INSTANCENUMBER,
  20.                                              dNum,(double)(dVal),(double)dMin)
  21. #define _SFD_DATA_RANGE_CHECK_MAX(dVal,dNum,dMax)
  22.                       sf_debug_data_range_error_wrapper_max(_servo_demoMachineNumber_,
  23. CHARTINSTANCE_CHARTNUMBER,
  24. CHARTINSTANCE_INSTANCENUMBER,
  25.                                              dNum,(double)(dVal),(double)dMax)
  26. #define _SFD_DATA_RANGE_CHECK(dVal,dNum)
  27.                       sf_debug_data_range_wrapper(_servo_demoMachineNumber_,
  28. CHARTINSTANCE_CHARTNUMBER,
  29. CHARTINSTANCE_INSTANCENUMBER,
  30.                                              dNum,(double)(dVal))
  31. #define _SFD_ARRAY_BOUNDS_CHECK(v1,v2,v3,v4,v5) 
  32.                       sf_debug_data_array_bounds_error_check(_servo_demoMachineNumber_,
  33. CHARTINSTANCE_CHARTNUMBER,
  34. CHARTINSTANCE_INSTANCENUMBER,
  35.                                              (v1),(int)(v2),(int)(v3),(int)(v4),(int)(v5))
  36. #define _SFD_EML_ARRAY_BOUNDS_CHECK(v1,v2,v3,v4,v5) 
  37.                       sf_debug_eml_data_array_bounds_error_check(_servo_demoMachineNumber_,
  38. CHARTINSTANCE_CHARTNUMBER,
  39. CHARTINSTANCE_INSTANCENUMBER,
  40.                                              (v1),(int)(v2),(int)(v3),(int)(v4),(int)(v5))
  41. #define _SFD_INTEGER_CHECK(v1,v2) 
  42.                       sf_debug_integer_check(_servo_demoMachineNumber_,
  43. CHARTINSTANCE_CHARTNUMBER,
  44. CHARTINSTANCE_INSTANCENUMBER,
  45.                                              (v1),(double)(v2))
  46. #define _SFD_CAST_TO_UINT8(v1) 
  47.                       sf_debug_cast_to_uint8_T(_servo_demoMachineNumber_,
  48. CHARTINSTANCE_CHARTNUMBER,
  49. CHARTINSTANCE_INSTANCENUMBER,
  50.                                              (v1),0,0)
  51. #define _SFD_CAST_TO_UINT16(v1) 
  52.                       sf_debug_cast_to_uint16_T(_servo_demoMachineNumber_,
  53. CHARTINSTANCE_CHARTNUMBER,
  54. CHARTINSTANCE_INSTANCENUMBER,
  55.                                              (v1),0,0)
  56. #define _SFD_CAST_TO_UINT32(v1) 
  57.                       sf_debug_cast_to_uint32_T(_servo_demoMachineNumber_,
  58. CHARTINSTANCE_CHARTNUMBER,
  59. CHARTINSTANCE_INSTANCENUMBER,
  60.                                              (v1),0,0)
  61. #define _SFD_CAST_TO_INT8(v1) 
  62.                       sf_debug_cast_to_int8_T(_servo_demoMachineNumber_,
  63. CHARTINSTANCE_CHARTNUMBER,
  64. CHARTINSTANCE_INSTANCENUMBER,
  65.                                              (v1),0,0)
  66. #define _SFD_CAST_TO_INT16(v1) 
  67.                       sf_debug_cast_to_int16_T(_servo_demoMachineNumber_,
  68. CHARTINSTANCE_CHARTNUMBER,
  69. CHARTINSTANCE_INSTANCENUMBER,
  70.                                              (v1),0,0)
  71. #define _SFD_CAST_TO_INT32(v1) 
  72.                       sf_debug_cast_to_int32_T(_servo_demoMachineNumber_,
  73. CHARTINSTANCE_CHARTNUMBER,
  74. CHARTINSTANCE_INSTANCENUMBER,
  75.                                              (v1),0,0)
  76. #define _SFD_CAST_TO_SINGLE(v1) 
  77.                       sf_debug_cast_to_real32_T(_servo_demoMachineNumber_,
  78. CHARTINSTANCE_CHARTNUMBER,
  79. CHARTINSTANCE_INSTANCENUMBER,
  80.                                              (v1),0,0)
  81. #define _SFD_TRANSITION_CONFLICT(v1,v2) sf_debug_transition_conflict_error(_servo_demoMachineNumber_,
  82. CHARTINSTANCE_CHARTNUMBER,
  83. CHARTINSTANCE_INSTANCENUMBER,
  84. v1,v2)
  85. #define _SFD_CHART_CALL(v1,v2,v3) sf_debug_call(_servo_demoMachineNumber_,
  86. CHARTINSTANCE_CHARTNUMBER,
  87. CHARTINSTANCE_INSTANCENUMBER,
  88. CHART_OBJECT,v1,v2,v3,(unsigned int)_sfEvent_,
  89. 0,NULL,_sfTime_,1)
  90. #define _SFD_CC_CALL(v2,v3) _SFD_CHART_CALL(CHART_OBJECT,v2,v3)
  91. #define _SFD_CS_CALL(v2,v3) _SFD_CHART_CALL(STATE_OBJECT,v2,v3)
  92. #define _SFD_CT_CALL(v2,v3) _SFD_CHART_CALL(TRANSITION_OBJECT,v2,v3)
  93. #define _SFD_CE_CALL(v2,v3) _SFD_CHART_CALL(EVENT_OBJECT,v2,v3)
  94. #define _SFD_CD_CALL(v2,v3) _SFD_CHART_CALL(EVENT_OBJECT,v2,v3)
  95. #define _SFD_EML_CALL(v1,v2,v3) sf_debug_call(_servo_demoMachineNumber_,
  96. CHARTINSTANCE_CHARTNUMBER,
  97. CHARTINSTANCE_INSTANCENUMBER,
  98. CHART_OBJECT,STATE_OBJECT,v1,v2,(unsigned int)_sfEvent_,
  99. v3,NULL,_sfTime_,1)
  100. #define _SFD_CHART_COVERAGE_CALL(v1,v2,v3,v4) sf_debug_call(_servo_demoMachineNumber_,
  101. CHARTINSTANCE_CHARTNUMBER,
  102. CHARTINSTANCE_INSTANCENUMBER,
  103. CHART_OBJECT,v1,v2,v3,(unsigned int) _sfEvent_,
  104. v4,NULL,_sfTime_,1)
  105. #define _SFD_CCS_CALL(v2,v3,v4) _SFD_CHART_COVERAGE_CALL(STATE_OBJECT,v2,v3,v4)
  106. #define _SFD_CCT_CALL(v2,v3,v4) _SFD_CHART_COVERAGE_CALL(TRANSITION_OBJECT,v2,v3,v4)
  107. #define _SFD_CCP_CALL(v3,v4,v5) sf_debug_call(_servo_demoMachineNumber_,
  108. CHARTINSTANCE_CHARTNUMBER,
  109. CHARTINSTANCE_INSTANCENUMBER,
  110. CHART_OBJECT,TRANSITION_OBJECT,TRANSITION_GUARD_COVERAGE_TAG,v3,(unsigned int) _sfEvent_,
  111. v4,NULL,_sfTime_,(unsigned int)(v5))
  112. #define _SFD_STATE_TEMPORAL_THRESHOLD(v1,v2,v4) sf_debug_temporal_threshold(_servo_demoMachineNumber_,
  113. CHARTINSTANCE_CHARTNUMBER,
  114. CHARTINSTANCE_INSTANCENUMBER,
  115. (unsigned int)(v1),(v2),STATE_OBJECT,(v4))
  116. #define _SFD_TRANS_TEMPORAL_THRESHOLD(v1,v2,v4) sf_debug_temporal_threshold(_servo_demoMachineNumber_,
  117. CHARTINSTANCE_CHARTNUMBER,
  118. CHARTINSTANCE_INSTANCENUMBER,
  119. (unsigned int)(v1),(v2),TRANSITION_OBJECT,(v4))
  120. #define CV_EVAL(v1,v2,v3,v4) cv_eval_point(_servo_demoMachineNumber_,
  121.   CHARTINSTANCE_CHARTNUMBER,
  122.   CHARTINSTANCE_INSTANCENUMBER,
  123.   (v1),(v2),(v3),(boolean_T)(v4))
  124. #define CV_CHART_EVAL(v2,v3,v4) CV_EVAL(CHART_OBJECT,(v2),(v3),(v4))
  125. #define CV_STATE_EVAL(v2,v3,v4) CV_EVAL(STATE_OBJECT,(v2),(v3),(v4))
  126. #define CV_TRANSITION_EVAL(v1,v2) cv_eval_point(_servo_demoMachineNumber_,
  127.   CHARTINSTANCE_CHARTNUMBER,
  128.   CHARTINSTANCE_INSTANCENUMBER,
  129.   TRANSITION_OBJECT,(v1),0,((v2)!=0))
  130. /* Coverage EML Macros */
  131. #define CV_EML_EVAL(v1,v2,v3,v4) cv_eml_eval(_servo_demoMachineNumber_,
  132.   CHARTINSTANCE_CHARTNUMBER,
  133.   CHARTINSTANCE_INSTANCENUMBER,
  134.   (v1),(v2),(v3),(int)(v4))
  135. #define CV_EML_FCN(v2,v3) CV_EML_EVAL(CV_EML_FCN_CHECK,(v2),(v3),0)
  136. #define CV_EML_IF(v2,v3,v4) CV_EML_EVAL(CV_EML_IF_CHECK,(v2),(v3),(v4))
  137. #define CV_EML_FOR(v2,v3,v4) CV_EML_EVAL(CV_EML_FOR_CHECK,(v2),(v3),(v4))
  138. #define CV_EML_WHILE(v2,v3,v4) CV_EML_EVAL(CV_EML_WHILE_CHECK,(v2),(v3),(v4))
  139. #define CV_EML_SWITCH(v2,v3,v4) CV_EML_EVAL(CV_EML_SWITCH_CHECK,(v2),(v3),(v4))
  140. #define CV_EML_COND(v2,v3,v4) CV_EML_EVAL(CV_EML_COND_CHECK,(v2),(v3),(v4))
  141. #define CV_EML_MCDC(v2,v3,v4) CV_EML_EVAL(CV_EML_MCDC_CHECK,(v2),(v3),(v4))
  142. #define _SFD_CV_INIT_EML(v1,v2,v3,v4,v5,v6,v7,v8) cv_eml_init_script(
  143.        _servo_demoMachineNumber_,
  144.   CHARTINSTANCE_CHARTNUMBER,
  145.   CHARTINSTANCE_INSTANCENUMBER,
  146.   (v1),(v2),(v3),(v4),(v5),(v6),(v7),(v8))
  147. #define _SFD_CV_INIT_EML_FCN(v1,v2,v3,v4,v5,v6) cv_eml_init_fcn(
  148.        _servo_demoMachineNumber_,
  149.   CHARTINSTANCE_CHARTNUMBER,
  150.   CHARTINSTANCE_INSTANCENUMBER,
  151.   (v1),(v2),(v3),(v4),(v5),(v6))
  152. #define _SFD_CV_INIT_EML_IF(v1,v2,v3,v4,v5,v6) cv_eml_init_if(
  153.        _servo_demoMachineNumber_,
  154.   CHARTINSTANCE_CHARTNUMBER,
  155.   CHARTINSTANCE_INSTANCENUMBER,
  156.   (v1),(v2),(v3),(v4),(v5),(v6))
  157. #define _SFD_CV_INIT_EML_FOR(v1,v2,v3,v4,v5) cv_eml_init_for(
  158.        _servo_demoMachineNumber_,
  159.   CHARTINSTANCE_CHARTNUMBER,
  160.   CHARTINSTANCE_INSTANCENUMBER,
  161.   (v1),(v2),(v3),(v4),(v5))
  162. #define _SFD_CV_INIT_EML_WHILE(v1,v2,v3,v4,v5) cv_eml_init_while(
  163.        _servo_demoMachineNumber_,
  164.   CHARTINSTANCE_CHARTNUMBER,
  165.   CHARTINSTANCE_INSTANCENUMBER,
  166.   (v1),(v2),(v3),(v4),(v5))
  167. #define _SFD_CV_INIT_EML_MCDC(v1,v2,v3,v4,v5,v6,v7,v8,v9,v10) cv_eml_init_mcdc(
  168.        _servo_demoMachineNumber_,
  169.   CHARTINSTANCE_CHARTNUMBER,
  170.   CHARTINSTANCE_INSTANCENUMBER,
  171.   (v1),(v2),(v3),(v4),(v5),(v6),(v7),(v8),(v9),(v10))
  172. #define _SFD_CV_INIT_EML_SWITCH(v1,v2,v3,v4,v5,v6,v7,v8) cv_eml_init_switch(
  173.        _servo_demoMachineNumber_,
  174.   CHARTINSTANCE_CHARTNUMBER,
  175.   CHARTINSTANCE_INSTANCENUMBER,
  176.   (v1),(v2),(v3),(v4),(v5),(v6),(v7),(v8))
  177. #define _SFD_SET_DATA_PROPS(dataNumber,dataScope,isInputData,isOutputData,dataType,numDims,dimArray,isFixedPoint,bias,slope,exponent,dataName,isComplex)
  178.  sf_debug_set_chart_data_props(_servo_demoMachineNumber_,CHARTINSTANCE_CHARTNUMBER,
  179. (dataNumber),(dataScope),(isInputData),(isOutputData),
  180. (dataType),(numDims),(dimArray),(isFixedPoint),(bias),(slope),(exponent),(dataName),(isComplex))
  181. #define _SFD_STATE_INFO(v1,v2,v3)
  182. sf_debug_set_chart_state_info(_servo_demoMachineNumber_,CHARTINSTANCE_CHARTNUMBER,(v1),(v2),(v3))
  183. #define _SFD_CH_SUBSTATE_INDEX(v1,v2)
  184. sf_debug_set_chart_substate_index(_servo_demoMachineNumber_,CHARTINSTANCE_CHARTNUMBER,(v1),(v2))
  185. #define _SFD_ST_SUBSTATE_INDEX(v1,v2,v3)
  186.    sf_debug_set_chart_state_substate_index(_servo_demoMachineNumber_,CHARTINSTANCE_CHARTNUMBER,(v1),(v2),(v3))
  187. #define _SFD_ST_SUBSTATE_COUNT(v1,v2)
  188. sf_debug_set_chart_state_substate_count(_servo_demoMachineNumber_,CHARTINSTANCE_CHARTNUMBER,(v1),(v2))
  189. #define _SFD_STATE_COV_WTS(v1,v2,v3,v4)
  190. sf_debug_set_instance_state_coverage_weights(_servo_demoMachineNumber_,CHARTINSTANCE_CHARTNUMBER,CHARTINSTANCE_INSTANCENUMBER,(v1),(v2),(v3),(v4))
  191. #define _SFD_STATE_COV_MAPS(v1,v2,v3,v4,v5,v6,v7,v8,v9,v10) 
  192.  sf_debug_set_chart_state_coverage_maps(_servo_demoMachineNumber_,CHARTINSTANCE_CHARTNUMBER,
  193.    (v1),(v2),(v3),(v4),(v5),(v6),(v7),(v8),(v9),(v10))
  194. #define _SFD_TRANS_COV_WTS(v1,v2,v3,v4,v5) 
  195. sf_debug_set_instance_transition_coverage_weights(_servo_demoMachineNumber_,CHARTINSTANCE_CHARTNUMBER,CHARTINSTANCE_INSTANCENUMBER,
  196.    (v1),(v2),(v3),(v4),(v5))
  197. #define  _SFD_TRANS_COV_MAPS(v1,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13) 
  198. sf_debug_set_chart_transition_coverage_maps(_servo_demoMachineNumber_,CHARTINSTANCE_CHARTNUMBER,
  199.       (v1),
  200. (v2),(v3),(v4),
  201. (v5),(v6),(v7),
  202. (v8),(v9),(v10),
  203. (v11),(v12),(v13))
  204. #define _SFD_DATA_CHANGE_EVENT_COUNT(v1,v2) 
  205. sf_debug_set_number_of_data_with_change_event_for_chart(_servo_demoMachineNumber_,CHARTINSTANCE_CHARTNUMBER,
  206. (v1),(v2))
  207. #define _SFD_STATE_ENTRY_EVENT_COUNT(v1,v2) 
  208. sf_debug_set_number_of_states_with_entry_event_for_chart(_servo_demoMachineNumber_,CHARTINSTANCE_CHARTNUMBER,
  209. (v1),(v2))
  210. #define _SFD_STATE_EXIT_EVENT_COUNT(v1,v2) 
  211. sf_debug_set_number_of_states_with_exit_event_for_chart(_servo_demoMachineNumber_,CHARTINSTANCE_CHARTNUMBER,
  212. (v1),(v2))
  213. #define _SFD_EVENT_SCOPE(v1,v2)
  214. sf_debug_set_chart_event_scope(_servo_demoMachineNumber_,
  215. CHARTINSTANCE_CHARTNUMBER,(v1),(v2))
  216. #define _SFD_CH_SUBSTATE_COUNT(v1) 
  217. sf_debug_set_chart_substate_count(_servo_demoMachineNumber_,CHARTINSTANCE_CHARTNUMBER,(v1))
  218. #define _SFD_CH_SUBSTATE_DECOMP(v1) 
  219. sf_debug_set_chart_decomposition(_servo_demoMachineNumber_,CHARTINSTANCE_CHARTNUMBER,(v1))
  220. #define _SFD_CV_INIT_CHART(v1,v2,v3,v4)
  221.  sf_debug_cv_init_chart(_servo_demoMachineNumber_,CHARTINSTANCE_CHARTNUMBER,
  222. CHARTINSTANCE_INSTANCENUMBER,(v1),(v2),(v3),(v4))
  223. #define _SFD_CV_INIT_STATE(v1,v2,v3,v4,v5,v6,v7,v8)
  224. sf_debug_cv_init_state(_servo_demoMachineNumber_,CHARTINSTANCE_CHARTNUMBER,
  225. CHARTINSTANCE_INSTANCENUMBER,(v1),(v2),(v3),(v4),(v5),(v6),(v7),(v8))
  226. #define _SFD_CV_INIT_TRANS(v1,v2,v3,v4,v5,v6)
  227.      sf_debug_cv_init_trans(_servo_demoMachineNumber_,
  228.   CHARTINSTANCE_CHARTNUMBER,
  229.   CHARTINSTANCE_INSTANCENUMBER,
  230.   (v1),(v2),(v3),(v4),(v5),(v6))
  231. #endif