本文整理汇总了C++中sf_mex_error_message函数的典型用法代码示例。如果您正苦于以下问题:C++ sf_mex_error_message函数的具体用法?C++ sf_mex_error_message怎么用?C++ sf_mex_error_message使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了sf_mex_error_message函数的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: c3_NMPC_Controller_method_dispatcher
void c3_NMPC_Controller_method_dispatcher(SimStruct *S, int_T method, void *data)
{
switch (method) {
case SS_CALL_MDL_START:
mdlStart_c3_NMPC_Controller(S);
break;
case SS_CALL_MDL_SET_WORK_WIDTHS:
mdlSetWorkWidths_c3_NMPC_Controller(S);
break;
case SS_CALL_MDL_PROCESS_PARAMETERS:
mdlProcessParameters_c3_NMPC_Controller(S);
break;
default:
/* Unhandled method */
sf_mex_error_message("Stateflow Internal Error:\n"
"Error calling c3_NMPC_Controller_method_dispatcher.\n"
"Can't handle method %d.\n", method);
break;
}
}
示例2: sf_internal_get_sim_state_c2_Leda
extern const mxArray* sf_internal_get_sim_state_c2_Leda(SimStruct* S)
{
ChartInfoStruct *chartInfo = (ChartInfoStruct*) ssGetUserData(S);
mxArray *plhs[1] = { NULL };
mxArray *prhs[4];
int mxError = 0;
prhs[0] = mxCreateString("chart_simctx_raw2high");
prhs[1] = mxCreateDoubleScalar(ssGetSFuncBlockHandle(S));
prhs[2] = (mxArray*) get_sim_state_c2_Leda((SFc2_LedaInstanceStruct*)
chartInfo->chartInstance); /* raw sim ctx */
prhs[3] = (mxArray*) sf_get_sim_state_info_c2_Leda();/* state var info */
mxError = sf_mex_call_matlab(1, plhs, 4, prhs, "sfprivate");
mxDestroyArray(prhs[0]);
mxDestroyArray(prhs[1]);
mxDestroyArray(prhs[2]);
mxDestroyArray(prhs[3]);
if (mxError || plhs[0] == NULL) {
sf_mex_error_message("Stateflow Internal Error: \nError calling 'chart_simctx_raw2high'.\n");
}
return plhs[0];
}
示例3: mdlStart_c2_tablerot_id
static void mdlStart_c2_tablerot_id(SimStruct *S)
{
SFc2_tablerot_idInstanceStruct *chartInstance;
chartInstance = (SFc2_tablerot_idInstanceStruct *)malloc(sizeof(SFc2_tablerot_idInstanceStruct));
memset(chartInstance, 0, sizeof(SFc2_tablerot_idInstanceStruct));
if(chartInstance==NULL) {
sf_mex_error_message("Could not allocate memory for chart instance.");
}
chartInstance->chartInfo.chartInstance = chartInstance;
chartInstance->chartInfo.isEMLChart = 1;
chartInstance->chartInfo.chartInitialized = 0;
chartInstance->chartInfo.sFunctionGateway = sf_opaque_gateway_c2_tablerot_id;
chartInstance->chartInfo.initializeChart = sf_opaque_initialize_c2_tablerot_id;
chartInstance->chartInfo.terminateChart = sf_opaque_terminate_c2_tablerot_id;
chartInstance->chartInfo.enableChart = sf_opaque_enable_c2_tablerot_id;
chartInstance->chartInfo.disableChart = sf_opaque_disable_c2_tablerot_id;
chartInstance->chartInfo.getSimState = sf_opaque_get_sim_state_c2_tablerot_id;
chartInstance->chartInfo.setSimState = sf_opaque_set_sim_state_c2_tablerot_id;
chartInstance->chartInfo.getSimStateInfo = sf_get_sim_state_info_c2_tablerot_id;
chartInstance->chartInfo.zeroCrossings = NULL;
chartInstance->chartInfo.outputs = NULL;
chartInstance->chartInfo.derivatives = NULL;
chartInstance->chartInfo.mdlRTW = mdlRTW_c2_tablerot_id;
chartInstance->chartInfo.mdlStart = mdlStart_c2_tablerot_id;
chartInstance->chartInfo.mdlSetWorkWidths = mdlSetWorkWidths_c2_tablerot_id;
chartInstance->chartInfo.extModeExec = NULL;
chartInstance->chartInfo.restoreLastMajorStepConfiguration = NULL;
chartInstance->chartInfo.restoreBeforeLastMajorStepConfiguration = NULL;
chartInstance->chartInfo.storeCurrentConfiguration = NULL;
chartInstance->S = S;
ssSetUserData(S,(void *)(&(chartInstance->chartInfo))); /* register the chart instance with simstruct */
if(!sim_mode_is_rtw_gen(S)) {
init_dsm_address_info(chartInstance);
}
chart_debug_initialization(S,1);
}
示例4: sf_internal_set_sim_state_c9_Array
extern void sf_internal_set_sim_state_c9_Array(SimStruct* S, const mxArray *st)
{
ChartInfoStruct *chartInfo = (ChartInfoStruct*) ssGetUserData(S);
mxArray *plhs[1] = { NULL };
mxArray *prhs[4];
int mxError = 0;
prhs[0] = mxCreateString("chart_simctx_high2raw");
prhs[1] = mxCreateDoubleScalar(ssGetSFuncBlockHandle(S));
prhs[2] = mxDuplicateArray(st); /* high level simctx */
prhs[3] = (mxArray*) sf_get_sim_state_info_c9_Array();/* state var info */
mxError = sf_mex_call_matlab(1, plhs, 4, prhs, "sfprivate");
mxDestroyArray(prhs[0]);
mxDestroyArray(prhs[1]);
mxDestroyArray(prhs[2]);
mxDestroyArray(prhs[3]);
if (mxError || plhs[0] == NULL) {
sf_mex_error_message("Stateflow Internal Error: \nError calling 'chart_simctx_high2raw'.\n");
}
set_sim_state_c9_Array((SFc9_ArrayInstanceStruct*)chartInfo->chartInstance,
mxDuplicateArray(plhs[0]));
mxDestroyArray(plhs[0]);
}
示例5: sf_internal_set_sim_state_c2_Expriment_Pose
extern void sf_internal_set_sim_state_c2_Expriment_Pose(SimStruct* S, const
mxArray *st)
{
ChartRunTimeInfo * crtInfo = (ChartRunTimeInfo *)(ssGetUserData(S));
ChartInfoStruct * chartInfo = (ChartInfoStruct *)(crtInfo->instanceInfo);
mxArray *plhs[1] = { NULL };
mxArray *prhs[3];
int mxError = 0;
prhs[0] = mxCreateString("chart_simctx_high2raw");
prhs[1] = mxDuplicateArray(st); /* high level simctx */
prhs[2] = (mxArray*) sf_get_sim_state_info_c2_Expriment_Pose();/* state var info */
mxError = sf_mex_call_matlab(1, plhs, 3, prhs, "sfprivate");
mxDestroyArray(prhs[0]);
mxDestroyArray(prhs[1]);
mxDestroyArray(prhs[2]);
if (mxError || plhs[0] == NULL) {
sf_mex_error_message("Stateflow Internal Error: \nError calling 'chart_simctx_high2raw'.\n");
}
set_sim_state_c2_Expriment_Pose((SFc2_Expriment_PoseInstanceStruct*)
chartInfo->chartInstance, mxDuplicateArray(plhs[0]));
mxDestroyArray(plhs[0]);
}
示例6: switch
void c2_ARP_02_RPSsmile_GloveAtomicBradNotImitateSmile_method_dispatcher
(SimStruct *S, int_T method, void *data)
{
switch (method) {
case SS_CALL_MDL_START:
mdlStart_c2_ARP_02_RPSsmile_GloveAtomicBradNotImitateSmile(S);
break;
case SS_CALL_MDL_SET_WORK_WIDTHS:
mdlSetWorkWidths_c2_ARP_02_RPSsmile_GloveAtomicBradNotImitateSmile(S);
break;
case SS_CALL_MDL_PROCESS_PARAMETERS:
mdlProcessParameters_c2_ARP_02_RPSsmile_GloveAtomicBradNotImitateSmile(S);
break;
default:
/* Unhandled method */
sf_mex_error_message("Stateflow Internal Error:\n"
"Error calling c2_ARP_02_RPSsmile_GloveAtomicBradNotImitateSmile_method_dispatcher.\n"
"Can't handle method %d.\n", method);
break;
}
}
示例7: mdlStart_c2_ARP_02_RPSsmile_GloveAtomicBradNotImitateSmile
static void mdlStart_c2_ARP_02_RPSsmile_GloveAtomicBradNotImitateSmile(SimStruct
*S)
{
SFc2_ARP_02_RPSsmile_GloveAtomicBradNotImitateSmileInstanceStruct
*chartInstance;
ChartRunTimeInfo * crtInfo = (ChartRunTimeInfo *)utMalloc(sizeof
(ChartRunTimeInfo));
chartInstance =
(SFc2_ARP_02_RPSsmile_GloveAtomicBradNotImitateSmileInstanceStruct *)
utMalloc(sizeof
(SFc2_ARP_02_RPSsmile_GloveAtomicBradNotImitateSmileInstanceStruct));
memset(chartInstance, 0, sizeof
(SFc2_ARP_02_RPSsmile_GloveAtomicBradNotImitateSmileInstanceStruct));
if (chartInstance==NULL) {
sf_mex_error_message("Could not allocate memory for chart instance.");
}
chartInstance->chartInfo.chartInstance = chartInstance;
chartInstance->chartInfo.isEMLChart = 1;
chartInstance->chartInfo.chartInitialized = 0;
chartInstance->chartInfo.sFunctionGateway =
sf_opaque_gateway_c2_ARP_02_RPSsmile_GloveAtomicBradNotImitateSmile;
chartInstance->chartInfo.initializeChart =
sf_opaque_initialize_c2_ARP_02_RPSsmile_GloveAtomicBradNotImitateSmile;
chartInstance->chartInfo.terminateChart =
sf_opaque_terminate_c2_ARP_02_RPSsmile_GloveAtomicBradNotImitateSmile;
chartInstance->chartInfo.enableChart =
sf_opaque_enable_c2_ARP_02_RPSsmile_GloveAtomicBradNotImitateSmile;
chartInstance->chartInfo.disableChart =
sf_opaque_disable_c2_ARP_02_RPSsmile_GloveAtomicBradNotImitateSmile;
chartInstance->chartInfo.getSimState =
sf_opaque_get_sim_state_c2_ARP_02_RPSsmile_GloveAtomicBradNotImitateSmile;
chartInstance->chartInfo.setSimState =
sf_opaque_set_sim_state_c2_ARP_02_RPSsmile_GloveAtomicBradNotImitateSmile;
chartInstance->chartInfo.getSimStateInfo =
sf_get_sim_state_info_c2_ARP_02_RPSsmile_GloveAtomicBradNotImitateSmile;
chartInstance->chartInfo.zeroCrossings = NULL;
chartInstance->chartInfo.outputs = NULL;
chartInstance->chartInfo.derivatives = NULL;
chartInstance->chartInfo.mdlRTW =
mdlRTW_c2_ARP_02_RPSsmile_GloveAtomicBradNotImitateSmile;
chartInstance->chartInfo.mdlStart =
mdlStart_c2_ARP_02_RPSsmile_GloveAtomicBradNotImitateSmile;
chartInstance->chartInfo.mdlSetWorkWidths =
mdlSetWorkWidths_c2_ARP_02_RPSsmile_GloveAtomicBradNotImitateSmile;
chartInstance->chartInfo.extModeExec = NULL;
chartInstance->chartInfo.restoreLastMajorStepConfiguration = NULL;
chartInstance->chartInfo.restoreBeforeLastMajorStepConfiguration = NULL;
chartInstance->chartInfo.storeCurrentConfiguration = NULL;
chartInstance->chartInfo.debugInstance = sfGlobalDebugInstanceStruct;
chartInstance->S = S;
crtInfo->instanceInfo = (&(chartInstance->chartInfo));
crtInfo->isJITEnabled = false;
ssSetUserData(S,(void *)(crtInfo)); /* register the chart instance with simstruct */
init_dsm_address_info(chartInstance);
if (!sim_mode_is_rtw_gen(S)) {
}
sf_opaque_init_subchart_simstructs(chartInstance->chartInfo.chartInstance);
chart_debug_initialization(S,1);
}
示例8: mdlStart_c3_Engine_Vehicle_CVT_Wit_System1_trial1
static void mdlStart_c3_Engine_Vehicle_CVT_Wit_System1_trial1(SimStruct *S)
{
SFc3_Engine_Vehicle_CVT_Wit_System1_trial1InstanceStruct *chartInstance;
ChartRunTimeInfo * crtInfo = (ChartRunTimeInfo *)utMalloc(sizeof
(ChartRunTimeInfo));
chartInstance = (SFc3_Engine_Vehicle_CVT_Wit_System1_trial1InstanceStruct *)
utMalloc(sizeof(SFc3_Engine_Vehicle_CVT_Wit_System1_trial1InstanceStruct));
memset(chartInstance, 0, sizeof
(SFc3_Engine_Vehicle_CVT_Wit_System1_trial1InstanceStruct));
if (chartInstance==NULL) {
sf_mex_error_message("Could not allocate memory for chart instance.");
}
chartInstance->chartInfo.chartInstance = chartInstance;
chartInstance->chartInfo.isEMLChart = 0;
chartInstance->chartInfo.chartInitialized = 0;
chartInstance->chartInfo.sFunctionGateway =
sf_opaque_gateway_c3_Engine_Vehicle_CVT_Wit_System1_trial1;
chartInstance->chartInfo.initializeChart =
sf_opaque_initialize_c3_Engine_Vehicle_CVT_Wit_System1_trial1;
chartInstance->chartInfo.terminateChart =
sf_opaque_terminate_c3_Engine_Vehicle_CVT_Wit_System1_trial1;
chartInstance->chartInfo.enableChart =
sf_opaque_enable_c3_Engine_Vehicle_CVT_Wit_System1_trial1;
chartInstance->chartInfo.disableChart =
sf_opaque_disable_c3_Engine_Vehicle_CVT_Wit_System1_trial1;
chartInstance->chartInfo.getSimState =
sf_opaque_get_sim_state_c3_Engine_Vehicle_CVT_Wit_System1_trial1;
chartInstance->chartInfo.setSimState =
sf_opaque_set_sim_state_c3_Engine_Vehicle_CVT_Wit_System1_trial1;
chartInstance->chartInfo.getSimStateInfo =
sf_get_sim_state_info_c3_Engine_Vehicle_CVT_Wit_System1_trial1;
chartInstance->chartInfo.zeroCrossings = NULL;
chartInstance->chartInfo.outputs = NULL;
chartInstance->chartInfo.derivatives = NULL;
chartInstance->chartInfo.mdlRTW =
mdlRTW_c3_Engine_Vehicle_CVT_Wit_System1_trial1;
chartInstance->chartInfo.mdlStart =
mdlStart_c3_Engine_Vehicle_CVT_Wit_System1_trial1;
chartInstance->chartInfo.mdlSetWorkWidths =
mdlSetWorkWidths_c3_Engine_Vehicle_CVT_Wit_System1_trial1;
chartInstance->chartInfo.extModeExec = NULL;
chartInstance->chartInfo.restoreLastMajorStepConfiguration = NULL;
chartInstance->chartInfo.restoreBeforeLastMajorStepConfiguration = NULL;
chartInstance->chartInfo.storeCurrentConfiguration = NULL;
chartInstance->chartInfo.callAtomicSubchartUserFcn = NULL;
chartInstance->chartInfo.callAtomicSubchartAutoFcn = NULL;
chartInstance->chartInfo.debugInstance = sfGlobalDebugInstanceStruct;
chartInstance->S = S;
crtInfo->checksum = SF_RUNTIME_INFO_CHECKSUM;
crtInfo->instanceInfo = (&(chartInstance->chartInfo));
crtInfo->isJITEnabled = false;
crtInfo->compiledInfo = NULL;
ssSetUserData(S,(void *)(crtInfo)); /* register the chart instance with simstruct */
init_dsm_address_info(chartInstance);
init_simulink_io_address(chartInstance);
if (!sim_mode_is_rtw_gen(S)) {
}
sf_opaque_init_subchart_simstructs(chartInstance->chartInfo.chartInstance);
chart_debug_initialization(S,1);
}
开发者ID:rsutjion,项目名称:Matlab-Simulation---shared-GitHub,代码行数:62,代码来源:c3_Engine_Vehicle_CVT_Wit_System1_trial1.c