#include <stdio.h>#include <string.h>#include <matrix.h>#include <mex.h>#include "grpc.h"
Go to the source code of this file.
Functions | |
| void | matlab_gs_error_string (int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[]) |
Matlab client call
Definition in file matlab_gs_error_string.c.
| void matlab_gs_error_string | ( | int | nlhs, | |
| mxArray * | plhs[], | |||
| int | nrhs, | |||
| const mxArray * | prhs[] | |||
| ) |
Return the string representation of a error_code in the first right hand side argument (calling grpc_error_string).
| nlhs | - Number of left hand side arguments from Matlab | |
| plhs | - Pointer to left hand side arguments from Matlab | |
| rlhs | - Number of right hand side arguments from Matlab | |
| plhs | - Pointer to right hand side arguments from Matlab |
Definition at line 29 of file matlab_gs_error_string.c.
{
int i;
grpc_error_t error_num;
if ((nlhs != 1)||(nrhs != 2)) {
mexErrMsgTxt("Usage: str = gs_error_string(error_code)\n");
goto error;
}
error_num = (grpc_error_t)(*mxGetPr(prhs[0]));
plhs[0] = mxCreateString(grpc_error_string(error_num));
return;
error:
for (i=0;i<nlhs;i++) plhs[i] = mxCreateDoubleMatrix(0,0,mxREAL);
mexPrintf("Warning: GridSolve call failed: %d:%d: %s; %s\n", grpc_errno, grpc_minor_errno, grpc_error_string(grpc_errno), grpc_minor_error_string(grpc_minor_errno));
return;
}


1.6.3-20100507