static int ProcessMexSfunctionCmdLineCall(int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]) { char commandName[64]; if (nrhs < 1 || !mxIsChar(prhs[0])) return 0; mxGetString(prhs[0], commandName, sizeof(commandName)/sizeof(char)); commandName[(sizeof(commandName)/sizeof(char)-1)] = '\0'; if (strcmp(commandName, "get_checksums") == 0) { return cgxe_process_get_checksums(nlhs, plhs, nrhs, prhs); } if (strcmp(commandName, "mex_unlock") == 0) { return cgxe_mex_unlock_call(nlhs, plhs, nrhs, prhs); } if (strcmp(commandName, "get_sim_state") == 0) { return cgxe_get_sim_state(nlhs, plhs, nrhs, prhs); } if (strcmp(commandName, "set_sim_state") == 0) { return cgxe_set_sim_state(nlhs, plhs, nrhs, prhs); } if (strcmp(commandName, "get_BuildInfoUpdate") == 0) { return cgxe_get_BuildInfoUpdate(nlhs, plhs, nrhs, prhs); } return 0; }
static int ProcessMexSfunctionCmdLineCall(int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]) { char commandName[64]; if (nrhs < 1 || !mxIsChar(prhs[0])) return 0; mxGetString(prhs[0], commandName, sizeof(commandName)/sizeof(char)); commandName[(sizeof(commandName)/sizeof(char)-1)] = '\0'; if (strcmp(commandName, "get_checksums") == 0) { return cgxe_process_get_checksums(nlhs, plhs, nrhs, prhs); } if (strcmp(commandName, "mex_unlock") == 0) { return cgxe_mex_unlock_call(nlhs, plhs, nrhs, prhs); } if (strcmp(commandName, "get_sim_state") == 0) { return cgxe_get_sim_state(nlhs, plhs, nrhs, prhs); } if ((strcmp(commandName, "NameResolution") == 0)|| (strcmp(commandName, "AutoInfer") == 0)) { if (nrhs < 2 || !mxIsChar(prhs[1])) return 0; return cgxe_CylinderSim_autoInfer_dispatcher(prhs[1], plhs, commandName); } if (strcmp(commandName, "set_sim_state") == 0) { return cgxe_set_sim_state(nlhs, plhs, nrhs, prhs); } if (strcmp(commandName, "get_BuildInfoUpdate") == 0) { return cgxe_get_BuildInfoUpdate(nlhs, plhs, nrhs, prhs); } if (strcmp(commandName, "mex_initialize") == 0) { cgxe_CylinderSim_initializer(); return 1; } if (strcmp(commandName, "mex_terminate") == 0) { cgxe_CylinderSim_terminator(); return 1; } return 0; }