static void mdlSetWorkWidths_c1_motor_control_with_off_the_shelf_SVPWM(SimStruct *S) { if (sim_mode_is_rtw_gen(S) || sim_mode_is_external(S)) { mxArray *infoStruct = load_motor_control_with_off_the_shelf_SVPWM_optimization_info(); int_T chartIsInlinable = (int_T)sf_is_chart_inlinable(S,sf_get_instance_specialization(),infoStruct, 1); ssSetStateflowIsInlinable(S,chartIsInlinable); ssSetRTWCG(S,sf_rtw_info_uint_prop(S,sf_get_instance_specialization(), infoStruct,1,"RTWCG")); ssSetEnableFcnIsTrivial(S,1); ssSetDisableFcnIsTrivial(S,1); ssSetNotMultipleInlinable(S,sf_rtw_info_uint_prop(S, sf_get_instance_specialization(),infoStruct,1, "gatewayCannotBeInlinedMultipleTimes")); if (chartIsInlinable) { ssSetInputPortOptimOpts(S, 0, SS_REUSABLE_AND_LOCAL); ssSetInputPortOptimOpts(S, 1, SS_REUSABLE_AND_LOCAL); sf_mark_chart_expressionable_inputs(S,sf_get_instance_specialization(), infoStruct,1,2); sf_mark_chart_reusable_outputs(S,sf_get_instance_specialization(), infoStruct,1,2); } sf_set_rtw_dwork_info(S,sf_get_instance_specialization(),infoStruct,1); ssSetHasSubFunctions(S,!(chartIsInlinable)); } else { } ssSetOptions(S,ssGetOptions(S)|SS_OPTION_WORKS_WITH_CODE_REUSE); ssSetChecksum0(S,(1032461412U)); ssSetChecksum1(S,(3210718289U)); ssSetChecksum2(S,(2277137192U)); ssSetChecksum3(S,(4020210864U)); ssSetmdlDerivatives(S, NULL); ssSetExplicitFCSSCtrl(S,1); }
static void mdlSetWorkWidths_c9_testing_control_with_estimate(SimStruct *S) { if (sim_mode_is_rtw_gen(S) || sim_mode_is_external(S)) { mxArray *infoStruct = load_testing_control_with_estimate_optimization_info(); int_T chartIsInlinable = (int_T)sf_is_chart_inlinable(S,sf_get_instance_specialization(),infoStruct, 9); ssSetStateflowIsInlinable(S,chartIsInlinable); ssSetRTWCG(S,sf_rtw_info_uint_prop(S,sf_get_instance_specialization(), infoStruct,9,"RTWCG")); ssSetEnableFcnIsTrivial(S,1); ssSetDisableFcnIsTrivial(S,1); ssSetNotMultipleInlinable(S,sf_rtw_info_uint_prop(S, sf_get_instance_specialization(),infoStruct,9, "gatewayCannotBeInlinedMultipleTimes")); if (chartIsInlinable) { ssSetInputPortOptimOpts(S, 0, SS_REUSABLE_AND_LOCAL); ssSetInputPortOptimOpts(S, 1, SS_REUSABLE_AND_LOCAL); ssSetInputPortOptimOpts(S, 2, SS_REUSABLE_AND_LOCAL); ssSetInputPortOptimOpts(S, 3, SS_REUSABLE_AND_LOCAL); sf_mark_chart_expressionable_inputs(S,sf_get_instance_specialization(), infoStruct,9,4); sf_mark_chart_reusable_outputs(S,sf_get_instance_specialization(), infoStruct,9,3); } sf_set_rtw_dwork_info(S,sf_get_instance_specialization(),infoStruct,9); ssSetHasSubFunctions(S,!(chartIsInlinable)); } else { } ssSetOptions(S,ssGetOptions(S)|SS_OPTION_WORKS_WITH_CODE_REUSE); ssSetChecksum0(S,(2904769763U)); ssSetChecksum1(S,(1517947318U)); ssSetChecksum2(S,(764197135U)); ssSetChecksum3(S,(173325544U)); ssSetmdlDerivatives(S, NULL); ssSetExplicitFCSSCtrl(S,1); }
static void mdlSetWorkWidths_c1_my_demo_ref(SimStruct *S) { if (sim_mode_is_rtw_gen(S) || sim_mode_is_external(S)) { mxArray *infoStruct = load_my_demo_ref_optimization_info(); int_T chartIsInlinable = (int_T)sf_is_chart_inlinable(S,sf_get_instance_specialization(),infoStruct, 1); ssSetStateflowIsInlinable(S,chartIsInlinable); ssSetRTWCG(S,sf_rtw_info_uint_prop(S,sf_get_instance_specialization(), infoStruct,1,"RTWCG")); ssSetEnableFcnIsTrivial(S,1); ssSetDisableFcnIsTrivial(S,1); ssSetNotMultipleInlinable(S,sf_rtw_info_uint_prop(S, sf_get_instance_specialization(),infoStruct,1, "gatewayCannotBeInlinedMultipleTimes")); if (chartIsInlinable) { ssSetInputPortOptimOpts(S, 0, SS_REUSABLE_AND_LOCAL); ssSetInputPortOptimOpts(S, 1, SS_REUSABLE_AND_LOCAL); ssSetInputPortOptimOpts(S, 2, SS_REUSABLE_AND_LOCAL); sf_mark_chart_expressionable_inputs(S,sf_get_instance_specialization(), infoStruct,1,3); sf_mark_chart_reusable_outputs(S,sf_get_instance_specialization(), infoStruct,1,3); } sf_set_rtw_dwork_info(S,sf_get_instance_specialization(),infoStruct,1); ssSetHasSubFunctions(S,!(chartIsInlinable)); } else { } ssSetOptions(S,ssGetOptions(S)|SS_OPTION_WORKS_WITH_CODE_REUSE); ssSetChecksum0(S,(441543960U)); ssSetChecksum1(S,(1223929666U)); ssSetChecksum2(S,(469679651U)); ssSetChecksum3(S,(51121752U)); ssSetmdlDerivatives(S, NULL); ssSetExplicitFCSSCtrl(S,1); ssSupportsMultipleExecInstances(S,1); }
static void mdlSetWorkWidths_c3_ARP_02_RPSsmile_WirelessGlove(SimStruct *S) { if (sim_mode_is_rtw_gen(S) || sim_mode_is_external(S)) { mxArray *infoStruct = load_ARP_02_RPSsmile_WirelessGlove_optimization_info(); int_T chartIsInlinable = (int_T)sf_is_chart_inlinable(sf_get_instance_specialization(),infoStruct,3); ssSetStateflowIsInlinable(S,chartIsInlinable); ssSetRTWCG(S,sf_rtw_info_uint_prop(sf_get_instance_specialization(), infoStruct,3,"RTWCG")); ssSetEnableFcnIsTrivial(S,1); ssSetDisableFcnIsTrivial(S,1); ssSetNotMultipleInlinable(S,sf_rtw_info_uint_prop (sf_get_instance_specialization(),infoStruct,3, "gatewayCannotBeInlinedMultipleTimes")); sf_update_buildInfo(sf_get_instance_specialization(),infoStruct,3); if (chartIsInlinable) { ssSetInputPortOptimOpts(S, 0, SS_REUSABLE_AND_LOCAL); sf_mark_chart_expressionable_inputs(S,sf_get_instance_specialization(), infoStruct,3,1); sf_mark_chart_reusable_outputs(S,sf_get_instance_specialization(), infoStruct,3,1); } { unsigned int outPortIdx; for (outPortIdx=1; outPortIdx<=1; ++outPortIdx) { ssSetOutputPortOptimizeInIR(S, outPortIdx, 1U); } } { unsigned int inPortIdx; for (inPortIdx=0; inPortIdx < 1; ++inPortIdx) { ssSetInputPortOptimizeInIR(S, inPortIdx, 1U); } } sf_set_rtw_dwork_info(S,sf_get_instance_specialization(),infoStruct,3); ssSetHasSubFunctions(S,!(chartIsInlinable)); } else { } ssSetOptions(S,ssGetOptions(S)|SS_OPTION_WORKS_WITH_CODE_REUSE); ssSetChecksum0(S,(3459264682U)); ssSetChecksum1(S,(582998228U)); ssSetChecksum2(S,(964524132U)); ssSetChecksum3(S,(497381268U)); ssSetmdlDerivatives(S, NULL); ssSetExplicitFCSSCtrl(S,1); ssSupportsMultipleExecInstances(S,1); }
static void mdlSetWorkWidths_c4_DisplayCANMsg(SimStruct *S) { ssMdlUpdateIsEmpty(S, 1); if (sim_mode_is_rtw_gen(S) || sim_mode_is_external(S)) { mxArray *infoStruct = load_DisplayCANMsg_optimization_info(); int_T chartIsInlinable = (int_T)sf_is_chart_inlinable(sf_get_instance_specialization(),infoStruct,4); ssSetStateflowIsInlinable(S,chartIsInlinable); ssSetRTWCG(S,1); ssSetEnableFcnIsTrivial(S,1); ssSetDisableFcnIsTrivial(S,1); ssSetNotMultipleInlinable(S,sf_rtw_info_uint_prop (sf_get_instance_specialization(),infoStruct,4, "gatewayCannotBeInlinedMultipleTimes")); sf_update_buildInfo(sf_get_instance_specialization(),infoStruct,4); if (chartIsInlinable) { ssSetInputPortOptimOpts(S, 0, SS_REUSABLE_AND_LOCAL); sf_mark_chart_expressionable_inputs(S,sf_get_instance_specialization(), infoStruct,4,1); sf_mark_chart_reusable_outputs(S,sf_get_instance_specialization(), infoStruct,4,1); } { unsigned int outPortIdx; for (outPortIdx=1; outPortIdx<=1; ++outPortIdx) { ssSetOutputPortOptimizeInIR(S, outPortIdx, 1U); } } { unsigned int inPortIdx; for (inPortIdx=0; inPortIdx < 1; ++inPortIdx) { ssSetInputPortOptimizeInIR(S, inPortIdx, 1U); } } sf_set_rtw_dwork_info(S,sf_get_instance_specialization(),infoStruct,4); ssSetHasSubFunctions(S,!(chartIsInlinable)); } else { } ssSetOptions(S,ssGetOptions(S)|SS_OPTION_WORKS_WITH_CODE_REUSE); ssSetChecksum0(S,(3734764569U)); ssSetChecksum1(S,(381797582U)); ssSetChecksum2(S,(29433646U)); ssSetChecksum3(S,(488799498U)); ssSetmdlDerivatives(S, NULL); ssSetExplicitFCSSCtrl(S,1); ssSupportsMultipleExecInstances(S,1); }
static void mdlSetWorkWidths_c2_Demo_AU_VA1(SimStruct *S) { if (sim_mode_is_rtw_gen(S) || sim_mode_is_external(S)) { mxArray *infoStruct = load_Demo_AU_VA1_optimization_info(); int_T chartIsInlinable = (int_T)sf_is_chart_inlinable(sf_get_instance_specialization(),infoStruct,2); ssSetStateflowIsInlinable(S,chartIsInlinable); ssSetRTWCG(S,sf_rtw_info_uint_prop(sf_get_instance_specialization(), infoStruct,2,"RTWCG")); ssSetEnableFcnIsTrivial(S,1); ssSetDisableFcnIsTrivial(S,1); ssSetNotMultipleInlinable(S,sf_rtw_info_uint_prop (sf_get_instance_specialization(),infoStruct,2, "gatewayCannotBeInlinedMultipleTimes")); sf_update_buildInfo(sf_get_instance_specialization(),infoStruct,2); if (chartIsInlinable) { ssSetInputPortOptimOpts(S, 0, SS_REUSABLE_AND_LOCAL); sf_mark_chart_expressionable_inputs(S,sf_get_instance_specialization(), infoStruct,2,1); sf_mark_chart_reusable_outputs(S,sf_get_instance_specialization(), infoStruct,2,2); } { unsigned int outPortIdx; for (outPortIdx=1; outPortIdx<=2; ++outPortIdx) { ssSetOutputPortOptimizeInIR(S, outPortIdx, 1U); } } { unsigned int inPortIdx; for (inPortIdx=0; inPortIdx < 1; ++inPortIdx) { ssSetInputPortOptimizeInIR(S, inPortIdx, 1U); } } sf_set_rtw_dwork_info(S,sf_get_instance_specialization(),infoStruct,2); ssSetHasSubFunctions(S,!(chartIsInlinable)); } else { } ssSetOptions(S,ssGetOptions(S)|SS_OPTION_WORKS_WITH_CODE_REUSE); ssSetChecksum0(S,(492115009U)); ssSetChecksum1(S,(1214226325U)); ssSetChecksum2(S,(3328840673U)); ssSetChecksum3(S,(114057626U)); ssSetmdlDerivatives(S, NULL); ssSetExplicitFCSSCtrl(S,1); ssSupportsMultipleExecInstances(S,1); }
static void mdlSetWorkWidths_c19_adcs_v15_integral_Power_nom(SimStruct *S) { if (sim_mode_is_rtw_gen(S) || sim_mode_is_external(S)) { int_T chartIsInlinable = (int_T)sf_is_chart_inlinable("adcs_v15_integral_Power_nom", "adcs_v15_integral_Power_nom",19); ssSetStateflowIsInlinable(S,chartIsInlinable); ssSetRTWCG(S,sf_rtw_info_uint_prop("adcs_v15_integral_Power_nom", "adcs_v15_integral_Power_nom",19,"RTWCG")); ssSetEnableFcnIsTrivial(S,1); ssSetDisableFcnIsTrivial(S,1); ssSetNotMultipleInlinable(S,sf_rtw_info_uint_prop( "adcs_v15_integral_Power_nom","adcs_v15_integral_Power_nom",19, "gatewayCannotBeInlinedMultipleTimes")); if (chartIsInlinable) { ssSetInputPortOptimOpts(S, 0, SS_REUSABLE_AND_LOCAL); ssSetInputPortOptimOpts(S, 1, SS_REUSABLE_AND_LOCAL); sf_mark_chart_expressionable_inputs(S,"adcs_v15_integral_Power_nom", "adcs_v15_integral_Power_nom",19,2); sf_mark_chart_reusable_outputs(S,"adcs_v15_integral_Power_nom", "adcs_v15_integral_Power_nom",19,4); } sf_set_rtw_dwork_info(S,"adcs_v15_integral_Power_nom", "adcs_v15_integral_Power_nom",19); ssSetHasSubFunctions(S,!(chartIsInlinable)); ssSetOptions(S,ssGetOptions(S)|SS_OPTION_WORKS_WITH_CODE_REUSE); } else { sf_set_sfun_dwork_info(S); } ssSetChecksum0(S,(2325183243U)); ssSetChecksum1(S,(1124782313U)); ssSetChecksum2(S,(3778958781U)); ssSetChecksum3(S,(3844299426U)); ssSetmdlDerivatives(S, NULL); ssSetExplicitFCSSCtrl(S,1); }
static void mdlSetWorkWidths_c32_ArregloSeisPorSeis(SimStruct *S) { if (sim_mode_is_rtw_gen(S) || sim_mode_is_external(S)) { mxArray *infoStruct = load_ArregloSeisPorSeis_optimization_info(); int_T chartIsInlinable = (int_T)sf_is_chart_inlinable(S,sf_get_instance_specialization(),infoStruct, 32); ssSetStateflowIsInlinable(S,chartIsInlinable); ssSetRTWCG(S,sf_rtw_info_uint_prop(S,sf_get_instance_specialization(), infoStruct,32,"RTWCG")); ssSetEnableFcnIsTrivial(S,1); ssSetDisableFcnIsTrivial(S,1); ssSetNotMultipleInlinable(S,sf_rtw_info_uint_prop(S, sf_get_instance_specialization(),infoStruct,32, "gatewayCannotBeInlinedMultipleTimes")); if (chartIsInlinable) { ssSetInputPortOptimOpts(S, 0, SS_REUSABLE_AND_LOCAL); ssSetInputPortOptimOpts(S, 1, SS_REUSABLE_AND_LOCAL); ssSetInputPortOptimOpts(S, 2, SS_REUSABLE_AND_LOCAL); sf_mark_chart_expressionable_inputs(S,sf_get_instance_specialization(), infoStruct,32,3); sf_mark_chart_reusable_outputs(S,sf_get_instance_specialization(), infoStruct,32,1); } sf_set_rtw_dwork_info(S,sf_get_instance_specialization(),infoStruct,32); ssSetHasSubFunctions(S,!(chartIsInlinable)); } else { } ssSetOptions(S,ssGetOptions(S)|SS_OPTION_WORKS_WITH_CODE_REUSE); ssSetChecksum0(S,(2281720516U)); ssSetChecksum1(S,(4132229721U)); ssSetChecksum2(S,(175296108U)); ssSetChecksum3(S,(991465833U)); ssSetmdlDerivatives(S, NULL); ssSetExplicitFCSSCtrl(S,1); }
static void mdlSetWorkWidths_c6_motor_control(SimStruct *S) { if (sim_mode_is_rtw_gen(S) || sim_mode_is_external(S)) { mxArray *infoStruct = load_motor_control_optimization_info(); int_T chartIsInlinable = (int_T)sf_is_chart_inlinable(S,sf_get_instance_specialization(),infoStruct, 6); ssSetStateflowIsInlinable(S,chartIsInlinable); ssSetRTWCG(S,sf_rtw_info_uint_prop(S,sf_get_instance_specialization(), infoStruct,6,"RTWCG")); ssSetEnableFcnIsTrivial(S,1); ssSetDisableFcnIsTrivial(S,1); ssSetNotMultipleInlinable(S,sf_rtw_info_uint_prop(S, sf_get_instance_specialization(),infoStruct,6, "gatewayCannotBeInlinedMultipleTimes")); if (chartIsInlinable) { ssSetInputPortOptimOpts(S, 0, SS_REUSABLE_AND_LOCAL); ssSetInputPortOptimOpts(S, 1, SS_REUSABLE_AND_LOCAL); ssSetInputPortOptimOpts(S, 2, SS_REUSABLE_AND_LOCAL); sf_mark_chart_expressionable_inputs(S,sf_get_instance_specialization(), infoStruct,6,3); sf_mark_chart_reusable_outputs(S,sf_get_instance_specialization(), infoStruct,6,2); } sf_set_rtw_dwork_info(S,sf_get_instance_specialization(),infoStruct,6); ssSetHasSubFunctions(S,!(chartIsInlinable)); } else { } ssSetOptions(S,ssGetOptions(S)|SS_OPTION_WORKS_WITH_CODE_REUSE); ssSetChecksum0(S,(2261216370U)); ssSetChecksum1(S,(1721883125U)); ssSetChecksum2(S,(326060995U)); ssSetChecksum3(S,(336222177U)); ssSetmdlDerivatives(S, NULL); ssSetExplicitFCSSCtrl(S,1); }
static void mdlSetWorkWidths_c22_BuckBoost1(SimStruct *S) { if (sim_mode_is_rtw_gen(S) || sim_mode_is_external(S)) { mxArray *infoStruct = load_BuckBoost1_optimization_info(); int_T chartIsInlinable = (int_T)sf_is_chart_inlinable(S,sf_get_instance_specialization(),infoStruct, 22); ssSetStateflowIsInlinable(S,chartIsInlinable); ssSetRTWCG(S,sf_rtw_info_uint_prop(S,sf_get_instance_specialization(), infoStruct,22,"RTWCG")); ssSetEnableFcnIsTrivial(S,1); ssSetDisableFcnIsTrivial(S,1); ssSetNotMultipleInlinable(S,sf_rtw_info_uint_prop(S, sf_get_instance_specialization(),infoStruct,22, "gatewayCannotBeInlinedMultipleTimes")); if (chartIsInlinable) { ssSetInputPortOptimOpts(S, 0, SS_REUSABLE_AND_LOCAL); ssSetInputPortOptimOpts(S, 1, SS_REUSABLE_AND_LOCAL); sf_mark_chart_expressionable_inputs(S,sf_get_instance_specialization(), infoStruct,22,2); sf_mark_chart_reusable_outputs(S,sf_get_instance_specialization(), infoStruct,22,1); } sf_set_rtw_dwork_info(S,sf_get_instance_specialization(),infoStruct,22); ssSetHasSubFunctions(S,!(chartIsInlinable)); } else { } ssSetOptions(S,ssGetOptions(S)|SS_OPTION_WORKS_WITH_CODE_REUSE); ssSetChecksum0(S,(267763240U)); ssSetChecksum1(S,(3954787250U)); ssSetChecksum2(S,(2831216229U)); ssSetChecksum3(S,(913185255U)); ssSetmdlDerivatives(S, NULL); ssSetExplicitFCSSCtrl(S,1); ssSupportsMultipleExecInstances(S,1); }
static void mdlSetWorkWidths_c31_adcs_v15_integral_Power_dist(SimStruct *S) { if (sim_mode_is_rtw_gen(S) || sim_mode_is_external(S)) { int_T chartIsInlinable = (int_T)sf_is_chart_inlinable("adcs_v15_integral_Power_dist", "adcs_v15_integral_Power_dist",31); ssSetStateflowIsInlinable(S,chartIsInlinable); ssSetRTWCG(S,sf_rtw_info_uint_prop("adcs_v15_integral_Power_dist", "adcs_v15_integral_Power_dist",31,"RTWCG")); ssSetEnableFcnIsTrivial(S,1); ssSetDisableFcnIsTrivial(S,1); ssSetNotMultipleInlinable(S,sf_rtw_info_uint_prop( "adcs_v15_integral_Power_dist","adcs_v15_integral_Power_dist",31, "gatewayCannotBeInlinedMultipleTimes")); if (chartIsInlinable) { ssSetInputPortOptimOpts(S, 0, SS_REUSABLE_AND_LOCAL); ssSetInputPortOptimOpts(S, 1, SS_REUSABLE_AND_LOCAL); sf_mark_chart_expressionable_inputs(S,"adcs_v15_integral_Power_dist", "adcs_v15_integral_Power_dist",31,2); sf_mark_chart_reusable_outputs(S,"adcs_v15_integral_Power_dist", "adcs_v15_integral_Power_dist",31,1); } sf_set_rtw_dwork_info(S,"adcs_v15_integral_Power_dist", "adcs_v15_integral_Power_dist",31); ssSetHasSubFunctions(S,!(chartIsInlinable)); ssSetOptions(S,ssGetOptions(S)|SS_OPTION_WORKS_WITH_CODE_REUSE); } else { sf_set_sfun_dwork_info(S); } ssSetChecksum0(S,(879351951U)); ssSetChecksum1(S,(3790118364U)); ssSetChecksum2(S,(4250711417U)); ssSetChecksum3(S,(1688137038U)); ssSetmdlDerivatives(S, NULL); ssSetExplicitFCSSCtrl(S,1); }
static void mdlSetWorkWidths_c16_Final_Project_v3b(SimStruct *S) { if (sim_mode_is_rtw_gen(S) || sim_mode_is_external(S)) { mxArray *infoStruct = load_Final_Project_v3b_optimization_info(); int_T chartIsInlinable = (int_T)sf_is_chart_inlinable(S,sf_get_instance_specialization(),infoStruct, 16); ssSetStateflowIsInlinable(S,chartIsInlinable); ssSetRTWCG(S,sf_rtw_info_uint_prop(S,sf_get_instance_specialization(), infoStruct,16,"RTWCG")); ssSetEnableFcnIsTrivial(S,1); ssSetDisableFcnIsTrivial(S,1); ssSetNotMultipleInlinable(S,sf_rtw_info_uint_prop(S, sf_get_instance_specialization(),infoStruct,16, "gatewayCannotBeInlinedMultipleTimes")); sf_update_buildInfo(S,sf_get_instance_specialization(),infoStruct,16); if (chartIsInlinable) { ssSetInputPortOptimOpts(S, 0, SS_REUSABLE_AND_LOCAL); ssSetInputPortOptimOpts(S, 1, SS_REUSABLE_AND_LOCAL); ssSetInputPortOptimOpts(S, 2, SS_REUSABLE_AND_LOCAL); ssSetInputPortOptimOpts(S, 3, SS_REUSABLE_AND_LOCAL); ssSetInputPortOptimOpts(S, 4, SS_REUSABLE_AND_LOCAL); ssSetInputPortOptimOpts(S, 5, SS_REUSABLE_AND_LOCAL); sf_mark_chart_expressionable_inputs(S,sf_get_instance_specialization(), infoStruct,16,6); sf_mark_chart_reusable_outputs(S,sf_get_instance_specialization(), infoStruct,16,2); } { unsigned int outPortIdx; for (outPortIdx=1; outPortIdx<=2; ++outPortIdx) { ssSetOutputPortOptimizeInIR(S, outPortIdx, 1U); } } { unsigned int inPortIdx; for (inPortIdx=0; inPortIdx < 6; ++inPortIdx) { ssSetInputPortOptimizeInIR(S, inPortIdx, 1U); } } sf_set_rtw_dwork_info(S,sf_get_instance_specialization(),infoStruct,16); ssSetHasSubFunctions(S,!(chartIsInlinable)); } else { } ssSetOptions(S,ssGetOptions(S)|SS_OPTION_WORKS_WITH_CODE_REUSE); ssSetChecksum0(S,(2900625138U)); ssSetChecksum1(S,(1267347168U)); ssSetChecksum2(S,(2269674677U)); ssSetChecksum3(S,(1388894054U)); ssSetmdlDerivatives(S, NULL); ssSetExplicitFCSSCtrl(S,1); ssSupportsMultipleExecInstances(S,1); }
static void mdlSetWorkWidths_c11_kinematics(SimStruct *S) { if (sim_mode_is_rtw_gen(S) || sim_mode_is_external(S)) { mxArray *infoStruct = load_kinematics_optimization_info(); int_T chartIsInlinable = (int_T)sf_is_chart_inlinable(S,sf_get_instance_specialization(),infoStruct, 11); ssSetStateflowIsInlinable(S,chartIsInlinable); ssSetRTWCG(S,sf_rtw_info_uint_prop(S,sf_get_instance_specialization(), infoStruct,11,"RTWCG")); ssSetEnableFcnIsTrivial(S,1); ssSetDisableFcnIsTrivial(S,1); ssSetNotMultipleInlinable(S,sf_rtw_info_uint_prop(S, sf_get_instance_specialization(),infoStruct,11, "gatewayCannotBeInlinedMultipleTimes")); if (chartIsInlinable) { ssSetInputPortOptimOpts(S, 0, SS_REUSABLE_AND_LOCAL); ssSetInputPortOptimOpts(S, 1, SS_REUSABLE_AND_LOCAL); sf_mark_chart_expressionable_inputs(S,sf_get_instance_specialization(), infoStruct,11,2); sf_mark_chart_reusable_outputs(S,sf_get_instance_specialization(), infoStruct,11,1); } sf_set_rtw_dwork_info(S,sf_get_instance_specialization(),infoStruct,11); ssSetHasSubFunctions(S,!(chartIsInlinable)); } else { } ssSetOptions(S,ssGetOptions(S)|SS_OPTION_WORKS_WITH_CODE_REUSE); ssSetChecksum0(S,(1349984694U)); ssSetChecksum1(S,(2564713470U)); ssSetChecksum2(S,(2565227815U)); ssSetChecksum3(S,(2817527302U)); ssSetmdlDerivatives(S, NULL); ssSetExplicitFCSSCtrl(S,1); }
static void mdlSetWorkWidths_c3_MPC_framework(SimStruct *S) { if(sim_mode_is_rtw_gen(S)) { int_T chartIsInlinable = (int_T)sf_is_chart_inlinable("MPC_framework",3); ssSetStateflowIsInlinable(S,chartIsInlinable); ssSetEnableFcnIsTrivial(S,1); ssSetDisableFcnIsTrivial(S,1); ssSetNotMultipleInlinable(S,sf_rtw_info_uint_prop("MPC_framework",3,"gatewayCannotBeInlinedMultipleTimes")); if(chartIsInlinable) { ssSetInputPortOptimOpts(S, 0, SS_REUSABLE_AND_LOCAL); ssSetInputPortOptimOpts(S, 1, SS_REUSABLE_AND_LOCAL); ssSetInputPortOptimOpts(S, 2, SS_REUSABLE_AND_LOCAL); ssSetInputPortOptimOpts(S, 3, SS_REUSABLE_AND_LOCAL); ssSetInputPortOptimOpts(S, 4, SS_REUSABLE_AND_LOCAL); ssSetInputPortOptimOpts(S, 5, SS_REUSABLE_AND_LOCAL); ssSetInputPortOptimOpts(S, 6, SS_REUSABLE_AND_LOCAL); ssSetInputPortOptimOpts(S, 7, SS_REUSABLE_AND_LOCAL); sf_mark_chart_expressionable_inputs(S,"MPC_framework",3,8); sf_mark_chart_reusable_outputs(S,"MPC_framework",3,3); } if (!sf_is_chart_instance_optimized_out("MPC_framework",3)) { int dtId; char *chartInstanceTypedefName = sf_chart_instance_typedef_name("MPC_framework",3); dtId = ssRegisterDataType(S, chartInstanceTypedefName); if (dtId == INVALID_DTYPE_ID ) return; /* Register the size of the udt */ if (!ssSetDataTypeSize(S, dtId, 8)) return; if(!ssSetNumDWork(S,1)) return; ssSetDWorkDataType(S, 0, dtId); ssSetDWorkWidth(S, 0, 1); ssSetDWorkName(S, 0, "ChartInstance"); /*optional name, less than 16 chars*/ sf_set_rtw_identifier(S); } ssSetHasSubFunctions(S,!(chartIsInlinable)); ssSetOptions(S,ssGetOptions(S)|SS_OPTION_WORKS_WITH_CODE_REUSE); } ssSetChecksum0(S,(1607393255U)); ssSetChecksum1(S,(1677787762U)); ssSetChecksum2(S,(2097080131U)); ssSetChecksum3(S,(3166642993U)); ssSetExplicitFCSSCtrl(S,1); }
static void mdlSetWorkWidths_c2_testRPSsmile_Glove_Idle(SimStruct *S) { if (sim_mode_is_rtw_gen(S) || sim_mode_is_external(S)) { mxArray *infoStruct = load_testRPSsmile_Glove_Idle_optimization_info(); int_T chartIsInlinable = (int_T)sf_is_chart_inlinable(sf_get_instance_specialization(),infoStruct,2); ssSetStateflowIsInlinable(S,chartIsInlinable); ssSetRTWCG(S,sf_rtw_info_uint_prop(sf_get_instance_specialization(), infoStruct,2,"RTWCG")); ssSetEnableFcnIsTrivial(S,1); ssSetDisableFcnIsTrivial(S,1); ssSetNotMultipleInlinable(S,sf_rtw_info_uint_prop (sf_get_instance_specialization(),infoStruct,2, "gatewayCannotBeInlinedMultipleTimes")); sf_update_buildInfo(sf_get_instance_specialization(),infoStruct,2); if (chartIsInlinable) { ssSetInputPortOptimOpts(S, 0, SS_REUSABLE_AND_LOCAL); ssSetInputPortOptimOpts(S, 1, SS_REUSABLE_AND_LOCAL); ssSetInputPortOptimOpts(S, 2, SS_REUSABLE_AND_LOCAL); ssSetInputPortOptimOpts(S, 3, SS_REUSABLE_AND_LOCAL); ssSetInputPortOptimOpts(S, 4, SS_REUSABLE_AND_LOCAL); ssSetInputPortOptimOpts(S, 5, SS_REUSABLE_AND_LOCAL); sf_mark_chart_expressionable_inputs(S,sf_get_instance_specialization(), infoStruct,2,6); } { unsigned int outPortIdx; for (outPortIdx=1; outPortIdx<=0; ++outPortIdx) { ssSetOutputPortOptimizeInIR(S, outPortIdx, 1U); } } { unsigned int inPortIdx; for (inPortIdx=0; inPortIdx < 6; ++inPortIdx) { ssSetInputPortOptimizeInIR(S, inPortIdx, 1U); } } sf_set_rtw_dwork_info(S,sf_get_instance_specialization(),infoStruct,2); ssSetHasSubFunctions(S,!(chartIsInlinable)); } else { } ssSetOptions(S,ssGetOptions(S)|SS_OPTION_WORKS_WITH_CODE_REUSE); ssSetChecksum0(S,(438666693U)); ssSetChecksum1(S,(1210253760U)); ssSetChecksum2(S,(1096449377U)); ssSetChecksum3(S,(2745616194U)); ssSetmdlDerivatives(S, NULL); ssSetExplicitFCSSCtrl(S,1); ssSupportsMultipleExecInstances(S,1); }
static void mdlSetWorkWidths_c7_adcs_v15_integral_Power_no_charge_in_detumb (SimStruct *S) { if (sim_mode_is_rtw_gen(S) || sim_mode_is_external(S)) { int_T chartIsInlinable = (int_T)sf_is_chart_inlinable("adcs_v15_integral_Power_no_charge_in_detumb", "adcs_v15_integral_Power_no_charge_in_detumb",7); ssSetStateflowIsInlinable(S,chartIsInlinable); ssSetRTWCG(S,sf_rtw_info_uint_prop( "adcs_v15_integral_Power_no_charge_in_detumb", "adcs_v15_integral_Power_no_charge_in_detumb",7,"RTWCG")); ssSetEnableFcnIsTrivial(S,1); ssSetDisableFcnIsTrivial(S,1); ssSetNotMultipleInlinable(S,sf_rtw_info_uint_prop( "adcs_v15_integral_Power_no_charge_in_detumb", "adcs_v15_integral_Power_no_charge_in_detumb",7, "gatewayCannotBeInlinedMultipleTimes")); if (chartIsInlinable) { ssSetInputPortOptimOpts(S, 0, SS_REUSABLE_AND_LOCAL); sf_mark_chart_expressionable_inputs(S, "adcs_v15_integral_Power_no_charge_in_detumb", "adcs_v15_integral_Power_no_charge_in_detumb",7,1); sf_mark_chart_reusable_outputs(S, "adcs_v15_integral_Power_no_charge_in_detumb", "adcs_v15_integral_Power_no_charge_in_detumb",7,1); } sf_set_rtw_dwork_info(S,"adcs_v15_integral_Power_no_charge_in_detumb", "adcs_v15_integral_Power_no_charge_in_detumb",7); ssSetHasSubFunctions(S,!(chartIsInlinable)); ssSetOptions(S,ssGetOptions(S)|SS_OPTION_WORKS_WITH_CODE_REUSE); } else { sf_set_sfun_dwork_info(S); } ssSetChecksum0(S,(3765657755U)); ssSetChecksum1(S,(3892594898U)); ssSetChecksum2(S,(2218658498U)); ssSetChecksum3(S,(3604933180U)); ssSetmdlDerivatives(S, NULL); ssSetExplicitFCSSCtrl(S,1); }
static void mdlSetWorkWidths_c2_TischMal2(SimStruct *S) { if (sim_mode_is_rtw_gen(S) || sim_mode_is_external(S)) { mxArray *infoStruct = load_TischMal2_optimization_info(); int_T chartIsInlinable = (int_T)sf_is_chart_inlinable(S,sf_get_instance_specialization(),infoStruct, 2); ssSetStateflowIsInlinable(S,chartIsInlinable); ssSetRTWCG(S,sf_rtw_info_uint_prop(S,sf_get_instance_specialization(), infoStruct,2,"RTWCG")); ssSetEnableFcnIsTrivial(S,1); ssSetDisableFcnIsTrivial(S,1); ssSetNotMultipleInlinable(S,sf_rtw_info_uint_prop(S, sf_get_instance_specialization(),infoStruct,2, "gatewayCannotBeInlinedMultipleTimes")); if (chartIsInlinable) { ssSetInputPortOptimOpts(S, 0, SS_REUSABLE_AND_LOCAL); ssSetInputPortOptimOpts(S, 1, SS_REUSABLE_AND_LOCAL); ssSetInputPortOptimOpts(S, 2, SS_REUSABLE_AND_LOCAL); ssSetInputPortOptimOpts(S, 3, SS_REUSABLE_AND_LOCAL); ssSetInputPortOptimOpts(S, 4, SS_REUSABLE_AND_LOCAL); ssSetInputPortOptimOpts(S, 5, SS_REUSABLE_AND_LOCAL); ssSetInputPortOptimOpts(S, 6, SS_REUSABLE_AND_LOCAL); sf_mark_chart_expressionable_inputs(S,sf_get_instance_specialization(), infoStruct,2,7); sf_mark_chart_reusable_outputs(S,sf_get_instance_specialization(), infoStruct,2,1); } sf_set_rtw_dwork_info(S,sf_get_instance_specialization(),infoStruct,2); ssSetHasSubFunctions(S,!(chartIsInlinable)); } else { } ssSetOptions(S,ssGetOptions(S)|SS_OPTION_WORKS_WITH_CODE_REUSE); ssSetChecksum0(S,(2703944394U)); ssSetChecksum1(S,(2350489608U)); ssSetChecksum2(S,(317306067U)); ssSetChecksum3(S,(3079552289U)); ssSetmdlDerivatives(S, NULL); ssSetExplicitFCSSCtrl(S,1); }
static void mdlSetWorkWidths_c1_QPSK_Transmit_v5_w_FIFO(SimStruct *S) { if (sim_mode_is_rtw_gen(S) || sim_mode_is_external(S)) { mxArray *infoStruct = load_QPSK_Transmit_v5_w_FIFO_optimization_info(); int_T chartIsInlinable = (int_T)sf_is_chart_inlinable(S,sf_get_instance_specialization(),infoStruct, 1); ssSetStateflowIsInlinable(S,chartIsInlinable); ssSetRTWCG(S,sf_rtw_info_uint_prop(S,sf_get_instance_specialization(), infoStruct,1,"RTWCG")); ssSetEnableFcnIsTrivial(S,1); ssSetDisableFcnIsTrivial(S,1); ssSetNotMultipleInlinable(S,sf_rtw_info_uint_prop(S, sf_get_instance_specialization(),infoStruct,1, "gatewayCannotBeInlinedMultipleTimes")); if (chartIsInlinable) { ssSetInputPortOptimOpts(S, 0, SS_REUSABLE_AND_LOCAL); sf_mark_chart_expressionable_inputs(S,sf_get_instance_specialization(), infoStruct,1,1); sf_mark_chart_reusable_outputs(S,sf_get_instance_specialization(), infoStruct,1,1); } sf_set_rtw_dwork_info(S,sf_get_instance_specialization(),infoStruct,1); ssSetHasSubFunctions(S,!(chartIsInlinable)); } else { } ssSetOptions(S,ssGetOptions(S)|SS_OPTION_WORKS_WITH_CODE_REUSE); ssSetChecksum0(S,(1382727465U)); ssSetChecksum1(S,(1826769868U)); ssSetChecksum2(S,(2925688491U)); ssSetChecksum3(S,(2188971603U)); ssSetmdlDerivatives(S, NULL); ssSetExplicitFCSSCtrl(S,1); ssSupportsMultipleExecInstances(S,1); }
static void mdlSetWorkWidths_c5_testing_Control(SimStruct *S) { if (sim_mode_is_rtw_gen(S) || sim_mode_is_external(S)) { mxArray *infoStruct = load_testing_Control_optimization_info(); int_T chartIsInlinable = (int_T)sf_is_chart_inlinable(S,sf_get_instance_specialization(),infoStruct, 5); ssSetStateflowIsInlinable(S,chartIsInlinable); ssSetRTWCG(S,sf_rtw_info_uint_prop(S,sf_get_instance_specialization(), infoStruct,5,"RTWCG")); ssSetEnableFcnIsTrivial(S,1); ssSetDisableFcnIsTrivial(S,1); ssSetNotMultipleInlinable(S,sf_rtw_info_uint_prop(S, sf_get_instance_specialization(),infoStruct,5, "gatewayCannotBeInlinedMultipleTimes")); if (chartIsInlinable) { ssSetInputPortOptimOpts(S, 0, SS_REUSABLE_AND_LOCAL); sf_mark_chart_expressionable_inputs(S,sf_get_instance_specialization(), infoStruct,5,1); sf_mark_chart_reusable_outputs(S,sf_get_instance_specialization(), infoStruct,5,1); } sf_set_rtw_dwork_info(S,sf_get_instance_specialization(),infoStruct,5); ssSetHasSubFunctions(S,!(chartIsInlinable)); } else { } ssSetOptions(S,ssGetOptions(S)|SS_OPTION_WORKS_WITH_CODE_REUSE); ssSetChecksum0(S,(3088695024U)); ssSetChecksum1(S,(1783995608U)); ssSetChecksum2(S,(517872383U)); ssSetChecksum3(S,(1103525791U)); ssSetmdlDerivatives(S, NULL); ssSetExplicitFCSSCtrl(S,1); }
static void mdlSetWorkWidths_c3_ErdMond(SimStruct *S) { if (sim_mode_is_rtw_gen(S) || sim_mode_is_external(S)) { mxArray *infoStruct = load_ErdMond_optimization_info(); int_T chartIsInlinable = (int_T)sf_is_chart_inlinable(S,sf_get_instance_specialization(),infoStruct, 3); ssSetStateflowIsInlinable(S,chartIsInlinable); ssSetRTWCG(S,sf_rtw_info_uint_prop(S,sf_get_instance_specialization(), infoStruct,3,"RTWCG")); ssSetEnableFcnIsTrivial(S,1); ssSetDisableFcnIsTrivial(S,1); ssSetNotMultipleInlinable(S,sf_rtw_info_uint_prop(S, sf_get_instance_specialization(),infoStruct,3, "gatewayCannotBeInlinedMultipleTimes")); if (chartIsInlinable) { ssSetInputPortOptimOpts(S, 0, SS_REUSABLE_AND_LOCAL); sf_mark_chart_expressionable_inputs(S,sf_get_instance_specialization(), infoStruct,3,1); sf_mark_chart_reusable_outputs(S,sf_get_instance_specialization(), infoStruct,3,1); } sf_set_rtw_dwork_info(S,sf_get_instance_specialization(),infoStruct,3); ssSetHasSubFunctions(S,!(chartIsInlinable)); } else { } ssSetOptions(S,ssGetOptions(S)|SS_OPTION_WORKS_WITH_CODE_REUSE); ssSetChecksum0(S,(3937887197U)); ssSetChecksum1(S,(3357586017U)); ssSetChecksum2(S,(2777667438U)); ssSetChecksum3(S,(527445158U)); ssSetmdlDerivatives(S, NULL); ssSetExplicitFCSSCtrl(S,1); }
static void mdlSetWorkWidths_c3_canudas_goal3(SimStruct *S) { if (sim_mode_is_rtw_gen(S) || sim_mode_is_external(S)) { mxArray *infoStruct = load_canudas_goal3_optimization_info(); int_T chartIsInlinable = (int_T)sf_is_chart_inlinable(S,sf_get_instance_specialization(),infoStruct, 3); ssSetStateflowIsInlinable(S,chartIsInlinable); ssSetRTWCG(S,sf_rtw_info_uint_prop(S,sf_get_instance_specialization(), infoStruct,3,"RTWCG")); ssSetEnableFcnIsTrivial(S,1); ssSetDisableFcnIsTrivial(S,1); ssSetNotMultipleInlinable(S,sf_rtw_info_uint_prop(S, sf_get_instance_specialization(),infoStruct,3, "gatewayCannotBeInlinedMultipleTimes")); if (chartIsInlinable) { ssSetInputPortOptimOpts(S, 0, SS_REUSABLE_AND_LOCAL); ssSetInputPortOptimOpts(S, 1, SS_REUSABLE_AND_LOCAL); ssSetInputPortOptimOpts(S, 2, SS_REUSABLE_AND_LOCAL); ssSetInputPortOptimOpts(S, 3, SS_REUSABLE_AND_LOCAL); ssSetInputPortOptimOpts(S, 4, SS_REUSABLE_AND_LOCAL); ssSetInputPortOptimOpts(S, 5, SS_REUSABLE_AND_LOCAL); sf_mark_chart_expressionable_inputs(S,sf_get_instance_specialization(), infoStruct,3,6); sf_mark_chart_reusable_outputs(S,sf_get_instance_specialization(), infoStruct,3,2); } sf_set_rtw_dwork_info(S,sf_get_instance_specialization(),infoStruct,3); ssSetHasSubFunctions(S,!(chartIsInlinable)); } else { } ssSetOptions(S,ssGetOptions(S)|SS_OPTION_WORKS_WITH_CODE_REUSE); ssSetChecksum0(S,(2852721358U)); ssSetChecksum1(S,(1942872837U)); ssSetChecksum2(S,(3261122160U)); ssSetChecksum3(S,(431929395U)); ssSetmdlDerivatives(S, NULL); ssSetExplicitFCSSCtrl(S,1); ssSupportsMultipleExecInstances(S,1); }
static void mdlSetWorkWidths_c25_CusakisME4901arcs2(SimStruct *S) { /* Actual parameters from chart: m mb mt */ const char_T *rtParamNames[] = { "m", "mb", "mt" }; ssSetNumRunTimeParams(S,ssGetSFcnParamsCount(S)); /* registration for m*/ ssRegDlgParamAsRunTimeParam(S, 0, 0, rtParamNames[0], SS_DOUBLE); /* registration for mb*/ ssRegDlgParamAsRunTimeParam(S, 1, 1, rtParamNames[1], SS_DOUBLE); /* registration for mt*/ ssRegDlgParamAsRunTimeParam(S, 2, 2, rtParamNames[2], SS_DOUBLE); if (sim_mode_is_rtw_gen(S) || sim_mode_is_external(S)) { mxArray *infoStruct = load_CusakisME4901arcs2_optimization_info(); int_T chartIsInlinable = (int_T)sf_is_chart_inlinable(S,sf_get_instance_specialization(),infoStruct, 25); ssSetStateflowIsInlinable(S,chartIsInlinable); ssSetRTWCG(S,sf_rtw_info_uint_prop(S,sf_get_instance_specialization(), infoStruct,25,"RTWCG")); ssSetEnableFcnIsTrivial(S,1); ssSetDisableFcnIsTrivial(S,1); ssSetNotMultipleInlinable(S,sf_rtw_info_uint_prop(S, sf_get_instance_specialization(),infoStruct,25, "gatewayCannotBeInlinedMultipleTimes")); sf_update_buildInfo(S,sf_get_instance_specialization(),infoStruct,25); if (chartIsInlinable) { ssSetInputPortOptimOpts(S, 0, SS_REUSABLE_AND_LOCAL); sf_mark_chart_expressionable_inputs(S,sf_get_instance_specialization(), infoStruct,25,1); sf_mark_chart_reusable_outputs(S,sf_get_instance_specialization(), infoStruct,25,1); } { unsigned int outPortIdx; for (outPortIdx=1; outPortIdx<=1; ++outPortIdx) { ssSetOutputPortOptimizeInIR(S, outPortIdx, 1U); } } { unsigned int inPortIdx; for (inPortIdx=0; inPortIdx < 1; ++inPortIdx) { ssSetInputPortOptimizeInIR(S, inPortIdx, 1U); } } sf_set_rtw_dwork_info(S,sf_get_instance_specialization(),infoStruct,25); ssSetHasSubFunctions(S,!(chartIsInlinable)); } else { } ssSetOptions(S,ssGetOptions(S)|SS_OPTION_WORKS_WITH_CODE_REUSE); ssSetChecksum0(S,(2702245221U)); ssSetChecksum1(S,(3247048464U)); ssSetChecksum2(S,(4066746145U)); ssSetChecksum3(S,(3712905929U)); ssSetmdlDerivatives(S, NULL); ssSetExplicitFCSSCtrl(S,1); ssSupportsMultipleExecInstances(S,1); }
static void mdlSetWorkWidths_c10_experiment_lib2(SimStruct *S) { /* Actual parameters from chart: a */ const char_T *rtParamNames[] = { "a" }; ssSetNumRunTimeParams(S,ssGetSFcnParamsCount(S)); /* registration for a*/ ssRegDlgParamAsRunTimeParam(S, 0, 0, rtParamNames[0], SS_DOUBLE); if (sim_mode_is_rtw_gen(S) || sim_mode_is_external(S)) { mxArray *infoStruct = load_experiment_lib2_optimization_info(); int_T chartIsInlinable = (int_T)sf_is_chart_inlinable(sf_get_instance_specialization(),infoStruct, 10); ssSetStateflowIsInlinable(S,chartIsInlinable); ssSetRTWCG(S,sf_rtw_info_uint_prop(sf_get_instance_specialization(), infoStruct,10,"RTWCG")); ssSetEnableFcnIsTrivial(S,1); ssSetDisableFcnIsTrivial(S,1); ssSetNotMultipleInlinable(S,sf_rtw_info_uint_prop (sf_get_instance_specialization(),infoStruct,10, "gatewayCannotBeInlinedMultipleTimes")); sf_update_buildInfo(sf_get_instance_specialization(),infoStruct,10); if (chartIsInlinable) { ssSetInputPortOptimOpts(S, 0, SS_REUSABLE_AND_LOCAL); ssSetInputPortOptimOpts(S, 1, SS_REUSABLE_AND_LOCAL); sf_mark_chart_expressionable_inputs(S,sf_get_instance_specialization(), infoStruct,10,2); sf_mark_chart_reusable_outputs(S,sf_get_instance_specialization(), infoStruct,10,1); } { unsigned int outPortIdx; for (outPortIdx=1; outPortIdx<=1; ++outPortIdx) { ssSetOutputPortOptimizeInIR(S, outPortIdx, 1U); } } { unsigned int inPortIdx; for (inPortIdx=0; inPortIdx < 2; ++inPortIdx) { ssSetInputPortOptimizeInIR(S, inPortIdx, 1U); } } sf_set_rtw_dwork_info(S,sf_get_instance_specialization(),infoStruct,10); ssSetHasSubFunctions(S,!(chartIsInlinable)); } else { } ssSetOptions(S,ssGetOptions(S)|SS_OPTION_WORKS_WITH_CODE_REUSE); ssSetChecksum0(S,(324921852U)); ssSetChecksum1(S,(3643253733U)); ssSetChecksum2(S,(2128199589U)); ssSetChecksum3(S,(3048879468U)); ssSetmdlDerivatives(S, NULL); ssSetExplicitFCSSCtrl(S,1); ssSupportsMultipleExecInstances(S,1); }
/* Function: mdlInitializeSizes =========================================== * Abstract: * The sizes information is used by Simulink to determine the S-function * block's characteristics (number of inputs, outputs, states, etc.). */ static void mdlInitializeSizes(SimStruct *S) { /* Number of expected parameters */ ssSetNumSFcnParams(S, 0); /* * Set the number of pworks. */ ssSetNumPWork(S, 0); /* * Set the number of dworks. */ if (!ssSetNumDWork(S, 0)) return; /* * Set the number of input ports. */ if (!ssSetNumInputPorts(S, 1)) return; /* * Configure the input port 1 */ ssSetInputPortDataType(S, 0, SS_UINT32); ssSetInputPortWidth(S, 0, 2); ssSetInputPortComplexSignal(S, 0, COMPLEX_NO); ssSetInputPortDirectFeedThrough(S, 0, 1); ssSetInputPortAcceptExprInRTW(S, 0, 0); ssSetInputPortOverWritable(S, 0, 0); ssSetInputPortOptimOpts(S, 0, SS_REUSABLE_AND_LOCAL); ssSetInputPortRequiredContiguous(S, 0, 1); /* * Set the number of output ports. */ if (!ssSetNumOutputPorts(S, 22)) return; /* * Configure the output port 1 */ ssSetOutputPortDataType(S, 0, SS_UINT32); ssSetOutputPortWidth(S, 0, 1); ssSetOutputPortComplexSignal(S, 0, COMPLEX_NO); ssSetOutputPortOptimOpts(S, 0, SS_REUSABLE_AND_LOCAL); ssSetOutputPortOutputExprInRTW(S, 0, 0); /* * Configure the output port 2 */ ssSetOutputPortDataType(S, 1, SS_UINT32); ssSetOutputPortWidth(S, 1, 1); ssSetOutputPortComplexSignal(S, 1, COMPLEX_NO); ssSetOutputPortOptimOpts(S, 1, SS_REUSABLE_AND_LOCAL); ssSetOutputPortOutputExprInRTW(S, 1, 0); /* * Configure the output port 3 */ ssSetOutputPortDataType(S, 2, SS_UINT32); ssSetOutputPortWidth(S, 2, 1); ssSetOutputPortComplexSignal(S, 2, COMPLEX_NO); ssSetOutputPortOptimOpts(S, 2, SS_REUSABLE_AND_LOCAL); ssSetOutputPortOutputExprInRTW(S, 2, 0); /* * Configure the output port 4 */ ssSetOutputPortDataType(S, 3, SS_UINT32); ssSetOutputPortWidth(S, 3, 1); ssSetOutputPortComplexSignal(S, 3, COMPLEX_NO); ssSetOutputPortOptimOpts(S, 3, SS_REUSABLE_AND_LOCAL); ssSetOutputPortOutputExprInRTW(S, 3, 0); /* * Configure the output port 5 */ ssSetOutputPortDataType(S, 4, SS_DOUBLE); ssSetOutputPortWidth(S, 4, 1); ssSetOutputPortComplexSignal(S, 4, COMPLEX_NO); ssSetOutputPortOptimOpts(S, 4, SS_REUSABLE_AND_LOCAL); ssSetOutputPortOutputExprInRTW(S, 4, 0); /* * Configure the output port 6 */ ssSetOutputPortDataType(S, 5, SS_DOUBLE); ssSetOutputPortWidth(S, 5, 1); ssSetOutputPortComplexSignal(S, 5, COMPLEX_NO); ssSetOutputPortOptimOpts(S, 5, SS_REUSABLE_AND_LOCAL); ssSetOutputPortOutputExprInRTW(S, 5, 0); /* * Configure the output port 7 */ ssSetOutputPortDataType(S, 6, SS_DOUBLE); ssSetOutputPortWidth(S, 6, 1); ssSetOutputPortComplexSignal(S, 6, COMPLEX_NO); ssSetOutputPortOptimOpts(S, 6, SS_REUSABLE_AND_LOCAL); ssSetOutputPortOutputExprInRTW(S, 6, 0); /* * Configure the output port 8 */ ssSetOutputPortDataType(S, 7, SS_DOUBLE); ssSetOutputPortWidth(S, 7, 1); ssSetOutputPortComplexSignal(S, 7, COMPLEX_NO); ssSetOutputPortOptimOpts(S, 7, SS_REUSABLE_AND_LOCAL); ssSetOutputPortOutputExprInRTW(S, 7, 0); /* * Configure the output port 9 */ ssSetOutputPortDataType(S, 8, SS_DOUBLE); ssSetOutputPortWidth(S, 8, 1); ssSetOutputPortComplexSignal(S, 8, COMPLEX_NO); ssSetOutputPortOptimOpts(S, 8, SS_REUSABLE_AND_LOCAL); ssSetOutputPortOutputExprInRTW(S, 8, 0); /* * Configure the output port 10 */ ssSetOutputPortDataType(S, 9, SS_DOUBLE); ssSetOutputPortWidth(S, 9, 1); ssSetOutputPortComplexSignal(S, 9, COMPLEX_NO); ssSetOutputPortOptimOpts(S, 9, SS_REUSABLE_AND_LOCAL); ssSetOutputPortOutputExprInRTW(S, 9, 0); /* * Configure the output port 11 */ ssSetOutputPortDataType(S, 10, SS_DOUBLE); ssSetOutputPortWidth(S, 10, 1); ssSetOutputPortComplexSignal(S, 10, COMPLEX_NO); ssSetOutputPortOptimOpts(S, 10, SS_REUSABLE_AND_LOCAL); ssSetOutputPortOutputExprInRTW(S, 10, 0); /* * Configure the output port 12 */ ssSetOutputPortDataType(S, 11, SS_DOUBLE); ssSetOutputPortWidth(S, 11, 1); ssSetOutputPortComplexSignal(S, 11, COMPLEX_NO); ssSetOutputPortOptimOpts(S, 11, SS_REUSABLE_AND_LOCAL); ssSetOutputPortOutputExprInRTW(S, 11, 0); /* * Configure the output port 13 */ ssSetOutputPortDataType(S, 12, SS_DOUBLE); ssSetOutputPortWidth(S, 12, 1); ssSetOutputPortComplexSignal(S, 12, COMPLEX_NO); ssSetOutputPortOptimOpts(S, 12, SS_REUSABLE_AND_LOCAL); ssSetOutputPortOutputExprInRTW(S, 12, 0); /* * Configure the output port 14 */ ssSetOutputPortDataType(S, 13, SS_DOUBLE); ssSetOutputPortWidth(S, 13, 1); ssSetOutputPortComplexSignal(S, 13, COMPLEX_NO); ssSetOutputPortOptimOpts(S, 13, SS_REUSABLE_AND_LOCAL); ssSetOutputPortOutputExprInRTW(S, 13, 0); /* * Configure the output port 15 */ ssSetOutputPortDataType(S, 14, SS_DOUBLE); ssSetOutputPortWidth(S, 14, 1); ssSetOutputPortComplexSignal(S, 14, COMPLEX_NO); ssSetOutputPortOptimOpts(S, 14, SS_REUSABLE_AND_LOCAL); ssSetOutputPortOutputExprInRTW(S, 14, 0); /* * Configure the output port 16 */ ssSetOutputPortDataType(S, 15, SS_DOUBLE); ssSetOutputPortWidth(S, 15, 1); ssSetOutputPortComplexSignal(S, 15, COMPLEX_NO); ssSetOutputPortOptimOpts(S, 15, SS_REUSABLE_AND_LOCAL); ssSetOutputPortOutputExprInRTW(S, 15, 0); /* * Configure the output port 17 */ ssSetOutputPortDataType(S, 16, SS_DOUBLE); ssSetOutputPortWidth(S, 16, 1); ssSetOutputPortComplexSignal(S, 16, COMPLEX_NO); ssSetOutputPortOptimOpts(S, 16, SS_REUSABLE_AND_LOCAL); ssSetOutputPortOutputExprInRTW(S, 16, 0); /* * Configure the output port 18 */ ssSetOutputPortDataType(S, 17, SS_DOUBLE); ssSetOutputPortWidth(S, 17, 1); ssSetOutputPortComplexSignal(S, 17, COMPLEX_NO); ssSetOutputPortOptimOpts(S, 17, SS_REUSABLE_AND_LOCAL); ssSetOutputPortOutputExprInRTW(S, 17, 0); /* * Configure the output port 19 */ ssSetOutputPortDataType(S, 18, SS_DOUBLE); ssSetOutputPortWidth(S, 18, 1); ssSetOutputPortComplexSignal(S, 18, COMPLEX_NO); ssSetOutputPortOptimOpts(S, 18, SS_REUSABLE_AND_LOCAL); ssSetOutputPortOutputExprInRTW(S, 18, 0); /* * Configure the output port 20 */ ssSetOutputPortDataType(S, 19, SS_DOUBLE); ssSetOutputPortWidth(S, 19, 1); ssSetOutputPortComplexSignal(S, 19, COMPLEX_NO); ssSetOutputPortOptimOpts(S, 19, SS_REUSABLE_AND_LOCAL); ssSetOutputPortOutputExprInRTW(S, 19, 0); /* * Configure the output port 21 */ ssSetOutputPortDataType(S, 20, SS_DOUBLE); ssSetOutputPortWidth(S, 20, 1); ssSetOutputPortComplexSignal(S, 20, COMPLEX_NO); ssSetOutputPortOptimOpts(S, 20, SS_REUSABLE_AND_LOCAL); ssSetOutputPortOutputExprInRTW(S, 20, 0); /* * Configure the output port 22 */ ssSetOutputPortDataType(S, 21, SS_UINT32); ssSetOutputPortWidth(S, 21, 1); ssSetOutputPortComplexSignal(S, 21, COMPLEX_NO); ssSetOutputPortOptimOpts(S, 21, SS_REUSABLE_AND_LOCAL); ssSetOutputPortOutputExprInRTW(S, 21, 0); /* * Register reserved identifiers to avoid name conflict */ if (ssRTWGenIsCodeGen(S)) { /* * Register reserved identifier for StartFcnSpec */ ssRegMdlInfo(S, "openFile", MDL_INFO_ID_RESERVED, 0, 0, ssGetPath(S)); /* * Register reserved identifier for OutputFcnSpec */ ssRegMdlInfo(S, "DrugLibraryReader", MDL_INFO_ID_RESERVED, 0, 0, ssGetPath(S)); /* * Register reserved identifier for TerminateFcnSpec */ ssRegMdlInfo(S, "closeFile", MDL_INFO_ID_RESERVED, 0, 0, ssGetPath(S)); } /* * This S-function can be used in referenced model simulating in normal mode. */ ssSetModelReferenceNormalModeSupport(S, MDL_START_AND_MDL_PROCESS_PARAMS_OK); /* * Set the number of sample time. */ ssSetNumSampleTimes(S, 1); /* * All options have the form SS_OPTION_<name> and are documented in * matlabroot/simulink/include/simstruc.h. The options should be * bitwise or'd together as in * ssSetOptions(S, (SS_OPTION_name1 | SS_OPTION_name2)) */ ssSetOptions(S, SS_OPTION_USE_TLC_WITH_ACCELERATOR | SS_OPTION_CAN_BE_CALLED_CONDITIONALLY | SS_OPTION_EXCEPTION_FREE_CODE | SS_OPTION_WORKS_WITH_CODE_REUSE | SS_OPTION_SFUNCTION_INLINED_FOR_RTW | SS_OPTION_DISALLOW_CONSTANT_SAMPLE_TIME); }
/* Function: mdlInitializeSizes =========================================== * Abstract: * The sizes information is used by Simulink to determine the S-function * block's characteristics (number of inputs, outputs, states, etc.). */ static void mdlInitializeSizes(SimStruct *S) { /* Number of expected parameters */ ssSetNumSFcnParams(S, 0); /* * Set the number of pworks. */ ssSetNumPWork(S, 0); /* * Set the number of dworks. */ if (!ssSetNumDWork(S, 0)) return; /* * Set the number of input ports. */ if (!ssSetNumInputPorts(S, 1)) return; /* * Configure the input port 1 */ ssSetInputPortDataType(S, 0, SS_INT32); ssSetInputPortWidth(S, 0, 1); ssSetInputPortComplexSignal(S, 0, COMPLEX_NO); ssSetInputPortDirectFeedThrough(S, 0, 1); ssSetInputPortAcceptExprInRTW(S, 0, 1); ssSetInputPortOverWritable(S, 0, 1); ssSetInputPortOptimOpts(S, 0, SS_REUSABLE_AND_LOCAL); ssSetInputPortRequiredContiguous(S, 0, 1); /* * Set the number of output ports. */ if (!ssSetNumOutputPorts(S, 1)) return; /* * Configure the output port 1 */ ssSetOutputPortDataType(S, 0, SS_INT32); ssSetOutputPortWidth(S, 0, 1); ssSetOutputPortComplexSignal(S, 0, COMPLEX_NO); ssSetOutputPortOptimOpts(S, 0, SS_REUSABLE_AND_LOCAL); ssSetOutputPortOutputExprInRTW(S, 0, 1); /* * Register reserved identifiers to avoid name conflict */ if (ssRTWGenIsCodeGen(S)) { /* * Register reserved identifier for StartFcnSpec */ ssRegMdlInfo(S, (char*)"createAdder", MDL_INFO_ID_RESERVED, 0, 0, (void*) ssGetPath(S)); /* * Register reserved identifier for OutputFcnSpec */ ssRegMdlInfo(S, (char*)"adderOutput", MDL_INFO_ID_RESERVED, 0, 0, (void*) ssGetPath(S)); /* * Register reserved identifier for TerminateFcnSpec */ ssRegMdlInfo(S, (char*)"deleteAdder", MDL_INFO_ID_RESERVED, 0, 0, (void*) ssGetPath(S)); /* * Register reserved identifier for wrappers */ if (ssRTWGenIsModelReferenceSimTarget(S)) { /* * Register reserved identifier for StartFcnSpec for SimulationTarget */ ssRegMdlInfo(S, (char*)"sldemo_sfun_adder_cpp_wrapper_start", MDL_INFO_ID_RESERVED, 0, 0, (void*) ssGetPath(S)); /* * Register reserved identifier for OutputFcnSpec for SimulationTarget */ ssRegMdlInfo(S, (char*)"sldemo_sfun_adder_cpp_wrapper_output", MDL_INFO_ID_RESERVED, 0, 0, (void*) ssGetPath(S)); /* * Register reserved identifier for TerminateFcnSpec for SimulationTarget */ ssRegMdlInfo(S, (char*)"sldemo_sfun_adder_cpp_wrapper_terminate", MDL_INFO_ID_RESERVED, 0, 0, (void*) ssGetPath(S)); } } /* * This S-function can be used in referenced model simulating in normal mode. */ ssSetModelReferenceNormalModeSupport(S, MDL_START_AND_MDL_PROCESS_PARAMS_OK); /* * Set the number of sample time. */ ssSetNumSampleTimes(S, 1); /* * All options have the form SS_OPTION_<name> and are documented in * matlabroot/simulink/include/simstruc.h. The options should be * bitwise or'd together as in * ssSetOptions(S, (SS_OPTION_name1 | SS_OPTION_name2)) */ ssSetOptions(S, SS_OPTION_CAN_BE_CALLED_CONDITIONALLY | SS_OPTION_EXCEPTION_FREE_CODE | SS_OPTION_WORKS_WITH_CODE_REUSE | SS_OPTION_SFUNCTION_INLINED_FOR_RTW | SS_OPTION_DISALLOW_CONSTANT_SAMPLE_TIME); }
static void mdlInitializeSizes(SimStruct *S) { ssSetNumSFcnParams(S, 0); if (S->mdlInfo->genericFcn != NULL) { _GenericFcn fcn = S->mdlInfo->genericFcn; (fcn)(S, GEN_FCN_CHK_MODELREF_SOLVER_TYPE_EARLY, 2, NULL); } ssSetRTWGeneratedSFcn(S, 2); ssSetNumContStates(S, 0); ssSetNumDiscStates(S, 0); if (!ssSetNumInputPorts(S, 2)) return; if (!ssSetInputPortVectorDimension(S, 0, 1)) return; ssSetInputPortFrameData(S, 0, FRAME_NO); ssSetInputPortBusMode(S, 0, SL_NON_BUS_MODE) if (ssGetSimMode(S) != SS_SIMMODE_SIZES_CALL_ONLY) { ssSetInputPortDataType(S, 0, SS_DOUBLE); } ssSetInputPortDirectFeedThrough(S, 0, 1); ssSetInputPortRequiredContiguous(S, 0, 1); ssSetInputPortOptimOpts(S, 0, SS_NOT_REUSABLE_AND_GLOBAL); ssSetInputPortOverWritable(S, 0, FALSE); ssSetInputPortSampleTime(S, 0, 0.0); ssSetInputPortOffsetTime(S, 0, 0.0); if (!ssSetInputPortVectorDimension(S, 1, 1)) return; ssSetInputPortFrameData(S, 1, FRAME_NO); ssSetInputPortBusMode(S, 1, SL_NON_BUS_MODE) if (ssGetSimMode(S) != SS_SIMMODE_SIZES_CALL_ONLY) { ssSetInputPortDataType(S, 1, SS_DOUBLE); } ssSetInputPortDirectFeedThrough(S, 1, 1); ssSetInputPortRequiredContiguous(S, 1, 1); ssSetInputPortOptimOpts(S, 1, SS_NOT_REUSABLE_AND_GLOBAL); ssSetInputPortOverWritable(S, 1, FALSE); ssSetInputPortSampleTime(S, 1, 0.0); ssSetInputPortOffsetTime(S, 1, 0.0); if (!ssSetNumOutputPorts(S, 1)) return; if (!ssSetOutputPortVectorDimension(S, 0, 1)) return; ssSetOutputPortFrameData(S, 0, FRAME_NO); ssSetOutputPortBusMode(S, 0, SL_NON_BUS_MODE) if (ssGetSimMode(S) != SS_SIMMODE_SIZES_CALL_ONLY) { ssSetOutputPortDataType(S, 0, SS_DOUBLE); } ssSetOutputPortSampleTime(S, 0, 0.0); ssSetOutputPortOffsetTime(S, 0, 0.0); ssSetOutputPortOkToMerge(S, 0, SS_OK_TO_MERGE); ssSetOutputPortOptimOpts(S, 0, SS_NOT_REUSABLE_AND_GLOBAL); rt_InitInfAndNaN(sizeof(real_T)); { real_T minValue = rtMinusInf; real_T maxValue = rtInf; ssSetModelRefInputSignalDesignMin(S,0,&minValue); ssSetModelRefInputSignalDesignMax(S,0,&maxValue); } { real_T minValue = rtMinusInf; real_T maxValue = rtInf; ssSetModelRefInputSignalDesignMin(S,1,&minValue); ssSetModelRefInputSignalDesignMax(S,1,&maxValue); } { real_T minValue = rtMinusInf; real_T maxValue = rtInf; ssSetModelRefOutputSignalDesignMin(S,0,&minValue); ssSetModelRefOutputSignalDesignMax(S,0,&maxValue); } { static ssRTWStorageType storageClass[3] = { SS_RTW_STORAGE_AUTO, SS_RTW_STORAGE_AUTO, SS_RTW_STORAGE_AUTO }; ssSetModelRefPortRTWStorageClasses(S, storageClass); } ssSetNumSampleTimes(S, PORT_BASED_SAMPLE_TIMES); ssSetNumRWork(S, 0); ssSetNumIWork(S, 0); ssSetNumPWork(S, 0); ssSetNumModes(S, 0); ssSetNumZeroCrossingSignals(S, 0); ssSetOutputPortIsNonContinuous(S, 0, 0); ssSetOutputPortIsFedByBlockWithModesNoZCs(S, 0, 0); ssSetInputPortIsNotDerivPort(S, 0, 1); ssSetInputPortIsNotDerivPort(S, 1, 1); ssSetModelReferenceSampleTimeInheritanceRule(S, DISALLOW_SAMPLE_TIME_INHERITANCE); ssSetOptimizeModelRefInitCode(S, 0); ssSetModelReferenceNormalModeSupport(S, MDL_START_AND_MDL_PROCESS_PARAMS_OK); ssSetOptions(S, SS_OPTION_EXCEPTION_FREE_CODE | SS_OPTION_DISALLOW_CONSTANT_SAMPLE_TIME | SS_OPTION_SUPPORTS_ALIAS_DATA_TYPES | SS_OPTION_WORKS_WITH_CODE_REUSE | SS_OPTION_CALL_TERMINATE_ON_EXIT); if (S->mdlInfo->genericFcn != NULL) { ssRegModelRefChildModel(S,1,childModels); } #if SS_SFCN_FOR_SIM if (S->mdlInfo->genericFcn != NULL && ssGetSimMode(S) != SS_SIMMODE_SIZES_CALL_ONLY) { mr_vdmultRM_MdlInfoRegFcn(S, "vdmultRM"); } #endif if (!ssSetNumDWork(S, 1)) { return; } #if SS_SFCN_FOR_SIM { int mdlrefDWTypeId; ssRegMdlRefDWorkType(S, &mdlrefDWTypeId); if (mdlrefDWTypeId == INVALID_DTYPE_ID ) return; if (!ssSetDataTypeSize(S, mdlrefDWTypeId, sizeof(rtMdlrefDWork_mr_vdmultRM))) return; ssSetDWorkDataType(S, 0, mdlrefDWTypeId); ssSetDWorkWidth(S, 0, 1); } #endif ssSetNeedAbsoluteTime(S, 1); }
/* Function: mdlInitializeSizes =============================================== * Abstract: * Call mdlCheckParameters to verify that the parameters are okay, * then setup sizes of the various vectors. * * We specify 2 input and 3 output ports with inherited port based sample * times. */ static void mdlInitializeSizes(SimStruct *S) { int_T i; real_T ts; /* See sfuntmpl_doc.c for more details on the macros below */ /* Set number of expected parameters */ if (ssGetSFcnParamsCount(S) == NKPARAMS || ssGetSFcnParamsCount(S) == NTOTALPARAMS) { ssSetNumSFcnParams(S, ssGetSFcnParamsCount(S)); } else { ssSetNumSFcnParams(S, NKPARAMS); } #if defined(MATLAB_MEX_FILE) if (ssGetNumSFcnParams(S) == ssGetSFcnParamsCount(S)) { mdlCheckParameters(S); if (ssGetErrorStatus(S) != NULL) { return; } } else { return; /* Parameter mismatch will be reported by Simulink */ } #endif /* Parameters can't be tuned */ ssSetSFcnParamNotTunable(S,K1_IDX); ssSetSFcnParamNotTunable(S,K2_IDX); ssSetSFcnParamNotTunable(S,K3_IDX); /* Load ts for input and output ports */ if (ssGetNumSFcnParams(S) == NTOTALPARAMS) { ssSetSFcnParamNotTunable(S,OPTIONAL_TS_IDX); ts = mxGetPr(OPTIONAL_TS_PARAM(S))[0]; } else { ts = INHERITED_SAMPLE_TIME; } ssSetNumSampleTimes(S, PORT_BASED_SAMPLE_TIMES); /* Two inputs */ if (!ssSetNumInputPorts(S, NINPUTS)) return; for (i = 0; i < NINPUTS; i++) { ssSetInputPortWidth(S, i, 1); ssSetInputPortDirectFeedThrough(S, i, 1); ssSetInputPortSampleTime(S, i, ts); ssSetInputPortOffsetTime(S, i, 0.0); ssSetInputPortOverWritable(S, i, 0); /* Output is decimated! */ } /* * We are always looking at the enable input in the correct task so we can * optimize away this entry from the block I/O. */ ssSetInputPortOptimOpts(S, ENABLE_IPORT, SS_REUSABLE_AND_LOCAL); /* * We are always looking at the enable input in the correct task so we can * optimize away this entry from the block I/O. */ ssSetInputPortOptimOpts(S, SIGNAL_IPORT, SS_REUSABLE_AND_LOCAL); /* Three outputs */ if (!ssSetNumOutputPorts(S, NOUTPUTS)) return; for (i = 0; i < NOUTPUTS; i++) { ssSetOutputPortWidth(S, i, 1); ssSetOutputPortOptimOpts(S, i, SS_NOT_REUSABLE_AND_GLOBAL); /* Need to be persistent since the since we don't update the outputs at every sample hit for this block */ if (ts == INHERITED_SAMPLE_TIME) { ssSetOutputPortSampleTime(S, i, ts); } else { ssSetOutputPortSampleTime(S, i, ts*mxGetPr(ssGetSFcnParam(S,i))[0]); } ssSetOutputPortOffsetTime(S, i, 0.0); } ssSetNumIWork(S, 1); /* specify the sim state compliance to be same as a built-in block */ ssSetSimStateCompliance(S, USE_DEFAULT_SIM_STATE); /* Take care when specifying exception free code - see sfuntmpl_doc.c */ ssSetOptions(S, SS_OPTION_WORKS_WITH_CODE_REUSE | SS_OPTION_EXCEPTION_FREE_CODE | SS_OPTION_USE_TLC_WITH_ACCELERATOR); } /* end mdlInitializeSizes */
/* Function to initialize sizes. */ static void mdlInitializeSizes(SimStruct *S) { ssSetNumSampleTimes(S, 1); /* Number of sample times */ ssSetNumContStates(S, 0); /* Number of continuous states */ ssSetNumNonsampledZCs(S, 0); /* Number of nonsampled ZCs */ /* Number of output ports */ if (!ssSetNumOutputPorts(S, 1)) return; /* outport number: 0 */ if (!ssSetOutputPortVectorDimension(S, 0, 1)) return; if (ssGetSimMode(S) != SS_SIMMODE_SIZES_CALL_ONLY) { ssSetOutputPortDataType(S, 0, SS_DOUBLE); } ssSetOutputPortSampleTime(S, 0, 0.06); ssSetOutputPortOffsetTime(S, 0, 0.0); ssSetOutputPortOptimOpts(S, 0, SS_REUSABLE_AND_LOCAL); /* Number of input ports */ if (!ssSetNumInputPorts(S, 1)) return; /* inport number: 0 */ { if (!ssSetInputPortVectorDimension(S, 0, 1)) return; if (ssGetSimMode(S) != SS_SIMMODE_SIZES_CALL_ONLY) { ssSetInputPortDataType(S, 0, SS_DOUBLE); } ssSetInputPortDirectFeedThrough(S, 0, 1); ssSetInputPortSampleTime(S, 0, 0.06); ssSetInputPortOffsetTime(S, 0, 0.0); ssSetInputPortOverWritable(S, 0, 0); ssSetInputPortOptimOpts(S, 0, SS_NOT_REUSABLE_AND_GLOBAL); } ssSetRTWGeneratedSFcn(S, 1); /* Generated S-function */ /* DWork */ if (!ssSetNumDWork(S, 1)) { return; } /* '<S1>/LinearModel': DSTATE */ ssSetDWorkName(S, 0, "DWORK0"); ssSetDWorkWidth(S, 0, 1); ssSetDWorkUsedAsDState(S, 0, 1); /* Tunable Parameters */ ssSetNumSFcnParams(S, 0); /* Number of expected parameters */ #if defined(MATLAB_MEX_FILE) if (ssGetNumSFcnParams(S) == ssGetSFcnParamsCount(S)) { #if defined(MDL_CHECK_PARAMETERS) mdlCheckParameters(S); #endif /* MDL_CHECK_PARAMETERS */ if (ssGetErrorStatus(S) != (NULL) ) { return; } } else { return; /* Parameter mismatch will be reported by Simulink */ } #endif /* MATLAB_MEX_FILE */ /* Options */ ssSetOptions(S, (SS_OPTION_RUNTIME_EXCEPTION_FREE_CODE | SS_OPTION_PORT_SAMPLE_TIMES_ASSIGNED )); #if SS_SFCN_FOR_SIM { ssSupportsMultipleExecInstances(S, false); ssRegisterMsgForNotSupportingMultiExecInst(S, "<diag_root><diag id=\"Simulink:blocks:BlockDoesNotSupportMultiExecInstances\"><arguments><arg type=\"encoded\">SABhAG0AbQBlAHIAcwB0AGUAaQBuAC8ASABhAG0AbQBlAHIAcwB0AGUAaQBuAC0AVwBpAGUAbgBlAHIAIABNAG8AZABlAGwAMQAvAFAAdwBsAGkAbgBlAGEAcgAxAAAA</arg><arg type=\"encoded\">PABfAF8AaQBpAFMAUwBfAF8APgA8AC8AXwBfAGkAaQBTAFMAXwBfAD4AAAA=</arg><arg type=\"encoded\">PABfAF8AaQB0AGUAcgBCAGwAawBfAF8APgA8AC8AXwBfAGkAdABlAHIAQgBsAGsAXwBfAD4AAAA=</arg></arguments></diag>\n</diag_root>"); ssHasStateInsideForEachSS(S, false); } #endif }
return ; } static void mdlInitializeSizes ( SimStruct * S ) { ssSetNumSFcnParams ( S , 0 ) ; ssFxpSetU32BitRegionCompliant ( S , 1 ) ; rt_InitInfAndNaN ( sizeof ( real_T ) ) ; if ( S -> mdlInfo -> genericFcn != ( NULL ) ) { _GenericFcn fcn = S -> mdlInfo -> genericFcn ; real_T lifeSpan = rtInf ; real_T startTime = 0.0 ; real_T stopTime = rtInf ; int_T hwSettings [ 15 ] ; int_T opSettings [ 1 ] ; boolean_T concurrTaskSupport = 0 ; boolean_T hasDiscTs = 1 ; real_T fixedStep = 0.001 ; ( fcn ) ( S , GEN_FCN_CHK_MODELREF_SOLVER_TYPE_EARLY , 2 , ( NULL ) ) ; ( fcn ) ( S , GEN_FCN_MODELREF_RATE_GROUPED , 0 , ( NULL ) ) ; if ( ! ( fcn ) ( S , GEN_FCN_CHK_MODELREF_LIFE_SPAN , - 1 , & lifeSpan ) ) return ; if ( ! ( fcn ) ( S , GEN_FCN_CHK_MODELREF_START_TIME , - 1 , & startTime ) ) return ; if ( ! ( fcn ) ( S , GEN_FCN_CHK_MODELREF_STOP_TIME , - 1 , & stopTime ) ) return ; hwSettings [ 0 ] = 16 ; hwSettings [ 1 ] = 16 ; hwSettings [ 2 ] = 16 ; hwSettings [ 3 ] = 32 ; hwSettings [ 4 ] = 32 ; hwSettings [ 5 ] = 64 ; hwSettings [ 6 ] = 16 ; hwSettings [ 7 ] = 0 ; hwSettings [ 8 ] = 1 ; hwSettings [ 9 ] = 16 ; hwSettings [ 10 ] = 1 ; hwSettings [ 11 ] = 2 ; hwSettings [ 12 ] = 2 ; hwSettings [ 13 ] = 64 ; hwSettings [ 14 ] = 0 ; if ( ! ( fcn ) ( S , GEN_FCN_CHK_MODELREF_HARDWARE_SETTINGS , 15 , hwSettings ) ) return ; opSettings [ 0 ] = 0 ; if ( ! ( fcn ) ( S , GEN_FCN_CHK_MODELREF_OPTIM_SETTINGS , 1 , opSettings ) ) return ; if ( ! ( fcn ) ( S , GEN_FCN_CHK_MODELREF_CONCURRETNT_TASK_SUPPORT , ( int_T ) concurrTaskSupport , ( NULL ) ) ) return ; if ( ! ( fcn ) ( S , GEN_FCN_CHK_MODELREF_SOLVER_TYPE , 0 , & hasDiscTs ) ) return ; if ( ! ( fcn ) ( S , GEN_FCN_CHK_MODELREF_SOLVER_NAME , 0 , ( void * ) "FixedStepDiscrete" ) ) return ; if ( ! ( fcn ) ( S , GEN_FCN_CHK_MODELREF_SOLVER_MODE , SOLVER_MODE_SINGLETASKING , ( NULL ) ) ) return ; if ( ! ( fcn ) ( S , GEN_FCN_CHK_MODELREF_FIXED_STEP , 0 , & fixedStep ) ) return ; ( fcn ) ( S , GEN_FCN_CHK_MODELREF_FRAME_UPGRADE_DIAGNOSTICS , 1 , ( NULL ) ) ; } { static const char * globalVarList [ ] = { "Cntrl_Status" , "DT_PRECISION_HI" , "DT_PRECISION_LO" , "EV_Param" , "Motor_Cmds" , "Power_Lims" , "brake_cmd_table" , "ctrlConst" , "decel_cmd_vec" , "regen_pwr_vec" } ; ssRegModelRefGlobalVarUsage ( S , 10 , ( void * ) globalVarList ) ; } ssSetRTWGeneratedSFcn ( S , 2 ) ; ssSetNumContStates ( S , 0 ) ; ssSetNumDiscStates ( S , 0 ) ; if ( ! ssSetNumInputPorts ( S , 8 ) ) return ; if ( ! ssSetInputPortVectorDimension ( S , 0 , 1 ) ) return ; ssSetInputPortDimensionsMode ( S , 0 , FIXED_DIMS_MODE ) ; ssSetInputPortFrameData ( S , 0 , FRAME_NO ) ; if ( ssGetSimMode ( S ) != SS_SIMMODE_SIZES_CALL_ONLY ) { ssSetInputPortDataType ( S , 0 , SS_SINGLE ) ; } ssSetInputPortDirectFeedThrough ( S , 0 , 1 ) ; ssSetInputPortRequiredContiguous ( S , 0 , 1 ) ; ssSetInputPortOptimOpts ( S , 0 , SS_NOT_REUSABLE_AND_LOCAL ) ; ssSetInputPortOverWritable ( S , 0 , FALSE ) ; ssSetInputPortSampleTime ( S , 0 , 0.001 ) ; ssSetInputPortOffsetTime ( S , 0 , 0.0 ) ; if ( ! ssSetInputPortVectorDimension ( S , 1 , 1 ) ) return ; ssSetInputPortDimensionsMode ( S , 1 , FIXED_DIMS_MODE ) ; ssSetInputPortFrameData ( S , 1 , FRAME_NO ) ; if ( ssGetSimMode ( S ) != SS_SIMMODE_SIZES_CALL_ONLY ) { ssSetInputPortDataType ( S , 1 , SS_SINGLE ) ; } ssSetInputPortDirectFeedThrough ( S , 1 , 1 ) ; ssSetInputPortRequiredContiguous ( S , 1 , 1 ) ; ssSetInputPortOptimOpts ( S , 1 , SS_NOT_REUSABLE_AND_LOCAL ) ; ssSetInputPortOverWritable ( S , 1 , FALSE ) ; ssSetInputPortSampleTime ( S , 1 , 0.001 ) ; ssSetInputPortOffsetTime ( S , 1 , 0.0 ) ; if ( ! ssSetInputPortVectorDimension ( S , 2 , 1 ) ) return ; ssSetInputPortDimensionsMode ( S , 2 , FIXED_DIMS_MODE ) ; ssSetInputPortFrameData ( S , 2 , FRAME_NO ) ; if ( ssGetSimMode ( S ) != SS_SIMMODE_SIZES_CALL_ONLY ) { ssSetInputPortDataType ( S , 2 , SS_SINGLE ) ; } ssSetInputPortDirectFeedThrough ( S , 2 , 0 ) ; ssSetInputPortRequiredContiguous ( S , 2 , 1 ) ; ssSetInputPortOptimOpts ( S , 2 , SS_NOT_REUSABLE_AND_LOCAL ) ; ssSetInputPortOverWritable ( S , 2 , FALSE ) ; ssSetInputPortSampleTime ( S , 2 , 0.001 ) ; ssSetInputPortOffsetTime ( S , 2 , 0.0 ) ; if ( ! ssSetInputPortVectorDimension ( S , 3 , 1 ) ) return ; ssSetInputPortDimensionsMode ( S , 3 , FIXED_DIMS_MODE ) ; ssSetInputPortFrameData ( S , 3 , FRAME_NO ) ; if ( ssGetSimMode ( S ) != SS_SIMMODE_SIZES_CALL_ONLY ) { ssSetInputPortDataType ( S , 3 , SS_SINGLE ) ; } ssSetInputPortDirectFeedThrough ( S , 3 , 0 ) ; ssSetInputPortRequiredContiguous ( S , 3 , 1 ) ; ssSetInputPortOptimOpts ( S , 3 , SS_NOT_REUSABLE_AND_LOCAL ) ; ssSetInputPortOverWritable ( S , 3 , FALSE ) ; ssSetInputPortSampleTime ( S , 3 , 0.001 ) ; ssSetInputPortOffsetTime ( S , 3 , 0.0 ) ; if ( ! ssSetInputPortVectorDimension ( S , 4 , 1 ) ) return ; ssSetInputPortDimensionsMode ( S , 4 , FIXED_DIMS_MODE ) ; ssSetInputPortFrameData ( S , 4 , FRAME_NO ) ; if ( ssGetSimMode ( S ) != SS_SIMMODE_SIZES_CALL_ONLY ) { ssSetInputPortDataType ( S , 4 , SS_SINGLE ) ; } ssSetInputPortDirectFeedThrough ( S , 4 , 1 ) ; ssSetInputPortRequiredContiguous ( S , 4 , 1 ) ; ssSetInputPortOptimOpts ( S , 4 , SS_NOT_REUSABLE_AND_LOCAL ) ; ssSetInputPortOverWritable ( S , 4 , FALSE ) ; ssSetInputPortSampleTime ( S , 4 , 0.001 ) ; ssSetInputPortOffsetTime ( S , 4 , 0.0 ) ; if ( ! ssSetInputPortVectorDimension ( S , 5 , 1 ) ) return ; ssSetInputPortDimensionsMode ( S , 5 , FIXED_DIMS_MODE ) ; ssSetInputPortFrameData ( S , 5 , FRAME_NO ) ; if ( ssGetSimMode ( S ) != SS_SIMMODE_SIZES_CALL_ONLY ) { ssSetInputPortDataType ( S , 5 , SS_SINGLE ) ; } ssSetInputPortDirectFeedThrough ( S , 5 , 1 ) ; ssSetInputPortRequiredContiguous ( S , 5 , 1 ) ; ssSetInputPortOptimOpts ( S , 5 , SS_NOT_REUSABLE_AND_LOCAL ) ; ssSetInputPortOverWritable ( S , 5 , FALSE ) ; ssSetInputPortSampleTime ( S , 5 , 0.001 ) ; ssSetInputPortOffsetTime ( S , 5 , 0.0 ) ; if ( ! ssSetInputPortVectorDimension ( S , 6 , 1 ) ) return ; ssSetInputPortDimensionsMode ( S , 6 , FIXED_DIMS_MODE ) ; ssSetInputPortFrameData ( S , 6 , FRAME_NO ) ; if ( ssGetSimMode ( S ) != SS_SIMMODE_SIZES_CALL_ONLY ) { ssSetInputPortDataType ( S , 6 , SS_SINGLE ) ; } ssSetInputPortDirectFeedThrough ( S , 6 , 1 ) ; ssSetInputPortRequiredContiguous ( S , 6 , 1 ) ; ssSetInputPortOptimOpts ( S , 6 , SS_REUSABLE_AND_LOCAL ) ; ssSetInputPortOverWritable ( S , 6 , FALSE ) ; ssSetInputPortSampleTime ( S , 6 , 0.001 ) ; ssSetInputPortOffsetTime ( S , 6 , 0.0 ) ; if ( ! ssSetInputPortVectorDimension ( S , 7 , 1 ) ) return ; ssSetInputPortDimensionsMode ( S , 7 , FIXED_DIMS_MODE ) ; ssSetInputPortFrameData ( S , 7 , FRAME_NO ) ; if ( ssGetSimMode ( S ) != SS_SIMMODE_SIZES_CALL_ONLY ) { ssSetInputPortDataType ( S , 7 , SS_SINGLE ) ; } ssSetInputPortDirectFeedThrough ( S , 7 , 1 ) ; ssSetInputPortRequiredContiguous ( S , 7 , 1 ) ; ssSetInputPortOptimOpts ( S , 7 , SS_REUSABLE_AND_LOCAL ) ; ssSetInputPortOverWritable ( S , 7 , FALSE ) ; ssSetInputPortSampleTime ( S , 7 , 0.001 ) ; ssSetInputPortOffsetTime ( S , 7 , 0.0 ) ; if ( ! ssSetNumOutputPorts ( S , 3 ) ) return ; if ( ! ssSetOutputPortVectorDimension ( S , 0 , 1 ) ) return ; ssSetOutputPortDimensionsMode ( S , 0 , FIXED_DIMS_MODE ) ; ssSetOutputPortFrameData ( S , 0 , FRAME_NO ) ; if ( ssGetSimMode ( S ) != SS_SIMMODE_SIZES_CALL_ONLY ) { #if defined (MATLAB_MEX_FILE) { DTypeId dataTypeIdReg ; ssRegisterTypeFromNamedObject ( S , "Cntrl_Status" , & dataTypeIdReg ) ; if ( dataTypeIdReg == INVALID_DTYPE_ID ) return ; ssSetOutputPortDataType ( S , 0 , dataTypeIdReg ) ; } #endif } ssSetOutputPortSampleTime ( S , 0 , 0.001 ) ; ssSetOutputPortOffsetTime ( S , 0 , 0.0 ) ; ssSetOutputPortDiscreteValuedOutput ( S , 0 , 0 ) ; ssSetOutputPortOkToMerge ( S , 0 , SS_OK_TO_MERGE ) ; ssSetOutputPortOptimOpts ( S , 0 , SS_NOT_REUSABLE_AND_GLOBAL ) ; if ( ! ssSetOutputPortVectorDimension ( S , 1 , 1 ) ) return ; ssSetOutputPortDimensionsMode ( S , 1 , FIXED_DIMS_MODE ) ; ssSetOutputPortFrameData ( S , 1 , FRAME_NO ) ; if ( ssGetSimMode ( S ) != SS_SIMMODE_SIZES_CALL_ONLY ) { #if defined (MATLAB_MEX_FILE) { DTypeId dataTypeIdReg ; ssRegisterTypeFromNamedObject ( S , "Motor_Cmds" , & dataTypeIdReg ) ; if ( dataTypeIdReg == INVALID_DTYPE_ID ) return ; ssSetOutputPortDataType ( S , 1 , dataTypeIdReg ) ; } #endif } ssSetOutputPortSampleTime ( S , 1 , 0.001 ) ; ssSetOutputPortOffsetTime ( S , 1 , 0.0 ) ; ssSetOutputPortDiscreteValuedOutput ( S , 1 , 0 ) ; ssSetOutputPortOkToMerge ( S , 1 , SS_OK_TO_MERGE ) ; ssSetOutputPortOptimOpts ( S , 1 , SS_NOT_REUSABLE_AND_LOCAL ) ; if ( ! ssSetOutputPortVectorDimension ( S , 2 , 1 ) ) return ; ssSetOutputPortDimensionsMode ( S , 2 , FIXED_DIMS_MODE ) ; ssSetOutputPortFrameData ( S , 2 , FRAME_NO ) ; if ( ssGetSimMode ( S ) != SS_SIMMODE_SIZES_CALL_ONLY ) { ssSetOutputPortDataType ( S , 2 , SS_SINGLE ) ; } ssSetOutputPortSampleTime ( S , 2 , 0.001 ) ; ssSetOutputPortOffsetTime ( S , 2 , 0.0 ) ; ssSetOutputPortDiscreteValuedOutput ( S , 2 , 0 ) ; ssSetOutputPortOkToMerge ( S , 2 , SS_OK_TO_MERGE ) ; ssSetOutputPortOptimOpts ( S , 2 , SS_NOT_REUSABLE_AND_LOCAL ) ; { real_T minValue = rtMinusInf ; real_T maxValue = rtInf ; ssSetModelRefInputSignalDesignMin ( S , 0 , & minValue ) ; ssSetModelRefInputSignalDesignMax ( S , 0 , & maxValue ) ; } { real_T minValue = rtMinusInf ; real_T maxValue = rtInf ; ssSetModelRefInputSignalDesignMin ( S , 1 , & minValue ) ; ssSetModelRefInputSignalDesignMax ( S , 1 , & maxValue ) ; } { real_T minValue = rtMinusInf ; real_T maxValue = rtInf ; ssSetModelRefInputSignalDesignMin ( S , 2 , & minValue ) ; ssSetModelRefInputSignalDesignMax ( S , 2 , & maxValue ) ; } { real_T minValue = rtMinusInf ; real_T maxValue = rtInf ; ssSetModelRefInputSignalDesignMin ( S , 3 , & minValue ) ; ssSetModelRefInputSignalDesignMax ( S , 3 , & maxValue ) ; } { real_T minValue = rtMinusInf ; real_T maxValue = rtInf ; ssSetModelRefInputSignalDesignMin ( S , 4 , & minValue ) ; ssSetModelRefInputSignalDesignMax ( S , 4 , & maxValue ) ; } { real_T minValue = rtMinusInf ; real_T maxValue = rtInf ; ssSetModelRefInputSignalDesignMin ( S , 5 , & minValue ) ; ssSetModelRefInputSignalDesignMax ( S , 5 , & maxValue ) ; } { real_T minValue = rtMinusInf ; real_T maxValue = rtInf ; ssSetModelRefInputSignalDesignMin ( S , 6 , & minValue ) ; ssSetModelRefInputSignalDesignMax ( S , 6 , & maxValue ) ; } { real_T minValue = rtMinusInf ; real_T maxValue = rtInf ; ssSetModelRefInputSignalDesignMin ( S , 7 , & minValue ) ; ssSetModelRefInputSignalDesignMax ( S , 7 , & maxValue ) ; } { real_T minValue = rtMinusInf ; real_T maxValue = rtInf ; ssSetModelRefOutputSignalDesignMin ( S , 0 , & minValue ) ; ssSetModelRefOutputSignalDesignMax ( S , 0 , & maxValue ) ; } { real_T minValue = rtMinusInf ; real_T maxValue = rtInf ; ssSetModelRefOutputSignalDesignMin ( S , 1 , & minValue ) ; ssSetModelRefOutputSignalDesignMax ( S , 1 , & maxValue ) ; } { real_T minValue = rtMinusInf ; real_T maxValue = rtInf ; ssSetModelRefOutputSignalDesignMin ( S , 2 , & minValue ) ; ssSetModelRefOutputSignalDesignMax ( S , 2 , & maxValue ) ; } { static ssRTWStorageType storageClass [ 11 ] = { SS_RTW_STORAGE_AUTO , SS_RTW_STORAGE_AUTO , SS_RTW_STORAGE_AUTO , SS_RTW_STORAGE_AUTO , SS_RTW_STORAGE_AUTO , SS_RTW_STORAGE_AUTO , SS_RTW_STORAGE_AUTO , SS_RTW_STORAGE_AUTO , SS_RTW_STORAGE_AUTO , SS_RTW_STORAGE_AUTO , SS_RTW_STORAGE_AUTO } ; ssSetModelRefPortRTWStorageClasses ( S , storageClass ) ; } ssSetModelRefSignalLoggingSaveFormat ( S , SS_DATASET_FORMAT ) ; ssSetNumSampleTimes ( S , PORT_BASED_SAMPLE_TIMES ) ; ssSetNumRWork ( S , 0 ) ; ssSetNumIWork ( S , 0 ) ; ssSetNumPWork ( S , 0 ) ; ssSetNumModes ( S , 0 ) ; { int_T zcsIdx = 0 ; } ssSetOutputPortIsNonContinuous ( S , 0 , 0 ) ; ssSetOutputPortIsFedByBlockWithModesNoZCs ( S , 0 , 0 ) ; ssSetOutputPortIsNonContinuous ( S , 1 , 0 ) ; ssSetOutputPortIsFedByBlockWithModesNoZCs ( S , 1 , 0 ) ; ssSetOutputPortIsNonContinuous ( S , 2 , 0 ) ; ssSetOutputPortIsFedByBlockWithModesNoZCs ( S , 2 , 0 ) ; ssSetInputPortIsNotDerivPort ( S , 0 , 1 ) ; ssSetInputPortIsNotDerivPort ( S , 1 , 1 ) ; ssSetInputPortIsNotDerivPort ( S , 2 , 1 ) ; ssSetInputPortIsNotDerivPort ( S , 3 , 1 ) ; ssSetInputPortIsNotDerivPort ( S , 4 , 1 ) ; ssSetInputPortIsNotDerivPort ( S , 5 , 1 ) ; ssSetInputPortIsNotDerivPort ( S , 6 , 1 ) ; ssSetInputPortIsNotDerivPort ( S , 7 , 1 ) ; ssSetModelReferenceSampleTimeInheritanceRule ( S , DISALLOW_SAMPLE_TIME_INHERITANCE ) ; ssSetOptimizeModelRefInitCode ( S , 1 ) ; ssSetAcceptsFcnCallInputs ( S ) ; { static const char * inlinedVars [ ] = { "EV_Param" , "brake_cmd_table" , "ctrlConst" , "decel_cmd_vec" , "regen_pwr_vec" } ; ssSetModelRefInlinedVars ( S , 5 , ( void * ) inlinedVars ) ; } ssSetModelReferenceNormalModeSupport ( S , MDL_START_AND_MDL_PROCESS_PARAMS_OK ) ; ssSupportsMultipleExecInstances ( S , FALSE ) ; ssRegisterMsgForNotSupportingMultiExecInst ( S , "<diag_root><diag id=\"Simulink:blocks:ImplicitIterSS_SigObjExpStorageClassNotSupportedInside\"><arguments><arg type=\"numeric\">1</arg><arg type=\"encoded\">RQBWAF8AUAB3AHIAXwBNAGEAbgBhAGcAZQByAC8AUABvAHcAZQByAF8AQwBvAG4AdAByAG8AbAAvAEUAcgByAG8AcgAgAFMAdQBtAAAA</arg><arg type=\"encoded\">cABvAHcAZQByAF8AZQByAHIAbwByAAAA</arg><arg type=\"encoded\">PABfAF8AaQBpAFMAUwBfAF8APgA8AC8AXwBfAGkAaQBTAFMAXwBfAD4AAAA=</arg><arg type=\"encoded\">PABfAF8AaQB0AGUAcgBCAGwAawBfAF8APgA8AC8AXwBfAGkAdABlAHIAQgBsAGsAXwBfAD4AAAA=</arg></arguments></diag>\n</diag_root>" ) ; ssHasStateInsideForEachSS ( S , FALSE ) ; ssSetModelRefHasParforForEachSS ( S , FALSE ) ; ssSetModelRefHasVariantModelOrSubsystem ( S , FALSE ) ; ssSetNumAsyncTs ( S , 0 ) ; ssSetOptions ( S , SS_OPTION_EXCEPTION_FREE_CODE | SS_OPTION_DISALLOW_CONSTANT_SAMPLE_TIME | SS_OPTION_SUPPORTS_ALIAS_DATA_TYPES | SS_OPTION_WORKS_WITH_CODE_REUSE ) ; if ( S -> mdlInfo -> genericFcn != ( NULL ) ) { ssRegModelRefChildModel ( S , 1 , childModels ) ; } #if SS_SFCN_FOR_SIM if ( S -> mdlInfo -> genericFcn != ( NULL ) && ssGetSimMode ( S ) != SS_SIMMODE_SIZES_CALL_ONLY ) { int_T retVal = 1 ; mr_EV_Pwr_Manager_MdlInfoRegFcn ( S , "EV_Pwr_Manager" , & retVal ) ; if ( ! retVal ) return ; } #endif ssSetNumDWork ( S , 0 ) ; slmrSetHasNonVirtualConstantTs ( S , true ) ; ssSetNeedAbsoluteTime ( S , 1 ) ; ssSetModelRefHasEnablePort ( S , 0 ) ; }
static void mdlSetWorkWidths_c4_MON_sl_after_replacement3(SimStruct *S) { /* Actual parameters from chart: Primary_Side */ const char_T *rtParamNames[] = { "Primary_Side" }; ssSetNumRunTimeParams(S,ssGetSFcnParamsCount(S)); /* registration for Primary_Side*/ ssRegDlgParamAsRunTimeParam(S, 0, 0, rtParamNames[0], SS_BOOLEAN); ssMdlUpdateIsEmpty(S, 1); if (sim_mode_is_rtw_gen(S) || sim_mode_is_external(S)) { mxArray *infoStruct = load_MON_sl_after_replacement3_optimization_info (sim_mode_is_rtw_gen(S), sim_mode_is_modelref_sim(S), sim_mode_is_external (S)); int_T chartIsInlinable = (int_T)sf_is_chart_inlinable(sf_get_instance_specialization(),infoStruct,4); ssSetStateflowIsInlinable(S,chartIsInlinable); ssSetRTWCG(S,1); ssSetEnableFcnIsTrivial(S,1); ssSetDisableFcnIsTrivial(S,1); ssSetNotMultipleInlinable(S,sf_rtw_info_uint_prop (sf_get_instance_specialization(),infoStruct,4, "gatewayCannotBeInlinedMultipleTimes")); sf_set_chart_accesses_machine_info(S, sf_get_instance_specialization(), infoStruct, 4); sf_update_buildInfo(S, sf_get_instance_specialization(),infoStruct,4); if (chartIsInlinable) { ssSetInputPortOptimOpts(S, 0, SS_REUSABLE_AND_LOCAL); ssSetInputPortOptimOpts(S, 1, SS_REUSABLE_AND_LOCAL); ssSetInputPortOptimOpts(S, 2, SS_REUSABLE_AND_LOCAL); ssSetInputPortOptimOpts(S, 3, SS_REUSABLE_AND_LOCAL); sf_mark_chart_expressionable_inputs(S,sf_get_instance_specialization(), infoStruct,4,4); sf_mark_chart_reusable_outputs(S,sf_get_instance_specialization(), infoStruct,4,1); } { unsigned int outPortIdx; for (outPortIdx=1; outPortIdx<=1; ++outPortIdx) { ssSetOutputPortOptimizeInIR(S, outPortIdx, 1U); } } { unsigned int inPortIdx; for (inPortIdx=0; inPortIdx < 4; ++inPortIdx) { ssSetInputPortOptimizeInIR(S, inPortIdx, 1U); } } sf_set_rtw_dwork_info(S,sf_get_instance_specialization(),infoStruct,4); ssSetHasSubFunctions(S,!(chartIsInlinable)); } else { } ssSetOptions(S,ssGetOptions(S)|SS_OPTION_WORKS_WITH_CODE_REUSE); ssSetChecksum0(S,(645941136U)); ssSetChecksum1(S,(444472430U)); ssSetChecksum2(S,(1231278852U)); ssSetChecksum3(S,(2586291620U)); ssSetmdlDerivatives(S, NULL); ssSetExplicitFCSSCtrl(S,1); ssSupportsMultipleExecInstances(S,1); }