constraint_app
/home/jbrooksh/drc/software/perception/constraint_app/src/matlab_mex/cam_waitForObservations.cpp
Go to the documentation of this file.
00001 #include "mex.h"
00002 #include "ConstraintApp.h"
00015 void mexFunction( int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[] )
00016 {
00017   if ( nrhs != 2 ) {
00018     mexErrMsgTxt("requires exactly 2 parameters"); 
00019   }
00020 
00021   if ( nlhs != 1 ) {
00022     mexErrMsgTxt("returns exactly 1 parameters"); 
00023   }
00024 
00025   ConstraintApp* app(*(ConstraintApp**)mxGetData(prhs[0]));
00026 
00027   double timeout_ms = *(double*)mxGetPr(prhs[1]);
00028 
00029   bool success = app->WaitForObservations((unsigned int)timeout_ms);
00030 
00031   plhs[0] = mxCreateLogicalScalar(success);
00032 }
 All Classes Files Functions Variables Typedefs