1 Commits

Author SHA1 Message Date
2170202fc9 version 1.15.0; added ca, epics4 version methods 2022-03-11 16:32:51 +01:00
3 changed files with 16 additions and 16 deletions

View File

@@ -184,7 +184,8 @@ enum mdtIndex {MOCHA_NATIVE=0, MOCHA_CHAR, MOCHA_UCHAR, MOCHA_SHORT, MOCHA_USH
enum mochaIndex {SHOW=1, OPEN, OPEN_ARRAY, OPEN_WAIT, GET_OPEN_WAIT_TIME,
OPEN_WAIT_WITH_TIME,OPEN_WAIT_TIME_TO_DEFAULT,
OPEN_NOWAIT, OPEN_NOW, OPEN_NOW_AND_WAIT, OPEN_GROUP,
CLOSE, CLOSE_ARRAY, CLOSE_GROUP, CA_POLL, MEX_UNLOCK, MOCHA_VERSION,
CLOSE, CLOSE_ARRAY, CLOSE_GROUP, CA_POLL, MEX_UNLOCK,
MOCHA_VERSION, EPICS_V_STRING, CA_V_STRING,
WITH_EXCEPTIONS, HAVE_EXCEPTIONS, SEND_NOW,
GET=100, GET_INT8, GET_INT16, GET_INT32, GET_INT64, GET_UINT8,
GET_UINT16, GET_UINT32, GET_UINT64, GET_FLOAT, GET_DOUBLE,
@@ -254,7 +255,8 @@ void msInsert()
ms.insert(mochaccino(CA_POLL, "capoll"));
ms.insert(mochaccino(MEX_UNLOCK, "mexunlock"));
ms.insert(mochaccino(MOCHA_VERSION, "version"));
ms.insert(mochaccino(EPICS_V_STRING, "epicsversion"));
ms.insert(mochaccino(CA_V_STRING, "caversion"));
ms.insert(mochaccino(WITH_EXCEPTIONS, "withexceptions"));
ms.insert(mochaccino(WITH_EXCEPTIONS, "setexceptions"));
ms.insert(mochaccino(HAVE_EXCEPTIONS, "haveexceptions"));

View File

@@ -54,14 +54,6 @@ void macchinettaFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prh
if (strcmp (mxGetClassName(prhs[0]),"string") ==0 ) {
//mxChar * mess2 = static_cast<mxChar*>(mxGetData(prhs[0]));
//mData = (mxArray *) mess2;
//messLength = METHOD_NAME_MAX_SIZE+1;
//if ( mxGetString(mData, mess, messLength) == 1) {
// mexPrintf ("mxGetString has failed; input is not of mxChar type\n");
//}
mexPrintf ("MATLAB mx library does not support string/mxSTRING_CLASS as input\n");
mexPrintf ("Please use char/mxCHAR_CLASS as data type instead\n");
mexPrintf("i.e., use single quotes instead of double quotes in input argument!\n");
@@ -500,8 +492,16 @@ void macchinettaFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prh
mexPrintf("mocha mex file is active\n");
break;
case EPICS_V_STRING:
plhs[0]=mxCreateString((char *) (cafe._epics_version()).c_str());
break;
case CA_V_STRING:
plhs[0]=mxCreateString((char *) (cafe._ca_version()).c_str());
break;
case MOCHA_VERSION:
plhs[0]=mxCreateString((char *) "mocha-1.14.4 : 14 October 2021");
plhs[0]=mxCreateString((char *) "mocha-1.15.0 : 11 March 2022");
break;
case SHOW:
@@ -526,23 +526,18 @@ void macchinettaFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prh
case SET_PUT_PREPARE:
{
if (nrhs<2)
{
mexPrintf("Invalid Number of argument(s) %d. Input: setPutPrepare, handle(s) or handleArray \n", nrhs);
return;
}
size_t numberOfHandles=0;
for (size_t j=1; j<nrhs; ++j)
{
numberOfHandles=mxGetNumberOfElements (prhs[j]);
neWithinAllCells=0; // filled by checkHandleArray
//What is dataType?

3
out Normal file
View File

@@ -0,0 +1,3 @@
mex CXXFLAGS='-v -largeArrayDims -ansi -fexceptions -fPIC -fno-omit-frame-pointer -pthread -std=c++1z' \
-c macchinettaSwitch.cpp -I/opt/psi/Programming/matlab/2021b/extern/include -I/opt/gfa/cafe/cpp/cafe-1.15.0-gcc-7.3.0/include -I./ -I/usr/local/epics/base-7.0.6/include -I/usr/local/epics/base-7.0.6/include/os/Linux -I/usr/local/epics/base-7.0.6/include/compiler/gcc -I/opt/gfa/cafe/boost/boost_1_61_0/include -I/opt/gfa/cafe/boost/boost_1_61_0/include/boost -outdir RHEL7-x86_64/2021b
Building with 'g++'.