new release
This commit is contained in:
@@ -59,9 +59,7 @@ void macchinettaFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prh
|
||||
if ( mxGetString(mData, mess, messLength) == 1) {
|
||||
mexPrintf ("mxGetString has failed; input is not of mxChar type\n");
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
mexPrintf ("mocha does not support string/mxSTRING_CLASS as input\n");
|
||||
mexPrintf ("Please use char/mxCHAR_CLASS as data type for input\n");
|
||||
return;
|
||||
@@ -82,16 +80,12 @@ void macchinettaFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prh
|
||||
}
|
||||
|
||||
|
||||
|
||||
char messOriginal[METHOD_NAME_MAX_SIZE+1];
|
||||
strcpy(messOriginal,mess);
|
||||
|
||||
|
||||
|
||||
//mexPrintf("message mess:%s\n", mess);
|
||||
//mexPrintf("message orig:%s\n", messOriginal);
|
||||
|
||||
|
||||
|
||||
|
||||
//remove leadingTrailing Blanks
|
||||
const char * _mess=mess;
|
||||
cafe.getHandleHelper().removeLeadingAndTrailingSpaces(_mess,mess);
|
||||
@@ -150,9 +144,9 @@ void macchinettaFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prh
|
||||
if (strcmp(mess,"monitorflushevent")==0 ) {
|
||||
mexPrintf("The CAFEteria is now open due to an outstanding monitorFlushEvent action (probably from a timer) \n");
|
||||
}
|
||||
else {
|
||||
mexPrintf("The CAFEteria is now open \n");
|
||||
}
|
||||
// else {
|
||||
//mexPrintf("The CAFEteria is now open \n");
|
||||
// }
|
||||
}
|
||||
|
||||
|
||||
@@ -453,7 +447,7 @@ void macchinettaFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prh
|
||||
break;
|
||||
|
||||
case MOCHA_VERSION:
|
||||
plhs[0]=mxCreateString((char *) "mocha-1.5.0-final-1 : November 2017");
|
||||
plhs[0]=mxCreateString((char *) "mocha-1.8.0 : 14 December 2018");
|
||||
break;
|
||||
|
||||
case SHOW:
|
||||
@@ -921,7 +915,6 @@ void macchinettaFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prh
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
vector<uint32_T> vuint32=NS_MOCHA::openArray(vstr);
|
||||
|
||||
@@ -1384,14 +1377,62 @@ void macchinettaFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prh
|
||||
}
|
||||
|
||||
|
||||
case GET_ENUM_STRINGS:
|
||||
{
|
||||
|
||||
if (mxIsChar(prhs[1])) {
|
||||
nh=1;
|
||||
}
|
||||
else{
|
||||
nh=mxGetNumberOfElements (prhs[1]);
|
||||
}
|
||||
if (nh >1) {
|
||||
mexPrintf("Method limited to one handle/pv only. Reporting on first given");
|
||||
}
|
||||
|
||||
handle=checkForHandle(prhs[1]);
|
||||
|
||||
if(handle==0) {
|
||||
mexPrintf("Handle does not exist!\n");
|
||||
return;}
|
||||
|
||||
chtype rdt;
|
||||
status=cafe.getHandleHelper().getDataTypeRequest(handle, rdt);
|
||||
|
||||
if (status!=ICAFE_NORMAL) {
|
||||
mexPrintf("Error for handle input= %d \n", (uint32_T) handle );
|
||||
NS_MOCHA::printStatus(status);
|
||||
plhs[0] = mxCreateCellMatrix(1,1);
|
||||
mxSetCell (plhs[0], 0, mxCreateString((const char *) "" ) );
|
||||
return;
|
||||
}
|
||||
|
||||
vector<std::string> enumStrings= cafe.getHandleHelper().getEnumStrings(handle);
|
||||
unsigned int noEnumStrings=enumStrings.size();
|
||||
|
||||
if (noEnumStrings==0){
|
||||
status=cafe.getHandleHelper().getStatus(handle);
|
||||
if (status!=ICAFE_NORMAL) {
|
||||
NS_MOCHA::printStatus(status);
|
||||
}
|
||||
plhs[0] = mxCreateCellMatrix(1,1);
|
||||
mxSetCell (plhs[0], 0, mxCreateString((const char *) "" ) );
|
||||
}
|
||||
else {
|
||||
plhs[0] = mxCreateCellMatrix(1,noEnumStrings);
|
||||
for (mwSignedIndex i=0; i <noEnumStrings; ++i)
|
||||
mxSetCell (plhs[0], i, mxCreateString((const char *) enumStrings[i].c_str()));
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case GET_CTRL_STRUCT:
|
||||
{
|
||||
if (nrhs<2) {
|
||||
mexPrintf("Invalid Number of argument %d. Input: message, handle/pv, matlab type (optional)\n", nrhs);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (mxIsChar(prhs[1])) {
|
||||
nh=1;
|
||||
}
|
||||
@@ -1453,8 +1494,6 @@ void macchinettaFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prh
|
||||
string s = cafe.getPVFromHandle(handle);
|
||||
fout17 =mxCreateString( s.c_str() );
|
||||
|
||||
|
||||
|
||||
nelem=cafe.getHandleHelper().getNelemRequestCtrl(handle);
|
||||
|
||||
// mexPrintf("nelemRequested %d", nelem);
|
||||
@@ -2990,7 +3029,7 @@ void macchinettaFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prh
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
case GET_PULSEID_FROM_TIMESTAMP:
|
||||
{
|
||||
if (nrhs<2) {
|
||||
@@ -3073,7 +3112,7 @@ void macchinettaFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prh
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
*/
|
||||
case SET_GROUP:
|
||||
{
|
||||
if (nrhs<3) {
|
||||
|
||||
Reference in New Issue
Block a user