/// /// \file cafeVectors.h /// \author Jan Chrin, PSI /// \date Release: February 2015 /// \version CAFE 1.0.0 /// #ifndef CAFEVECTORS_H #define CAFEVECTORS_H #include int get(const unsigned int _handle, vector & V); //0 int get(const unsigned int _handle, vector & V); //1 int get(const unsigned int _handle, vector & V); //2 int get(const unsigned int _handle, vector & V); //3 int get(const unsigned int _handle, vector & V); //4 int get(const unsigned int _handle, vector & V); //5 int get(const unsigned int _handle, vector & V); //5 int get(const unsigned int _handle, vector & V); //6 int get(const unsigned int _handle, vector & V, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity);//0 int get(const unsigned int _handle, vector & V, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity);//1 int get(const unsigned int _handle, vector & V, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity);//2 int get(const unsigned int _handle, vector & V, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity);//3 int get(const unsigned int _handle, vector & V, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity);//4 int get(const unsigned int _handle, vector & V, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity);//5 int get(const unsigned int _handle, vector & V, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity);//5 int get(const unsigned int _handle, vector & V, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity);//6 int get(const unsigned int _handle, vector & V, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts);//0 int get(const unsigned int _handle, vector & V, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts);//1 int get(const unsigned int _handle, vector & V, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts);//2 int get(const unsigned int _handle, vector & V, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts);//3 int get(const unsigned int _handle, vector & V, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts);//4 int get(const unsigned int _handle, vector & V, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts);//5 int get(const unsigned int _handle, vector & V, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts);//5 int get(const unsigned int _handle, vector & V, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts);// int getCache(const unsigned int _handle, vector & V); //0 int getCache(const unsigned int _handle, vector & V); //1 int getCache(const unsigned int _handle, vector & V); //2 int getCache(const unsigned int _handle, vector & V);//3 int getCache(const unsigned int _handle, vector & V);//4 int getCache(const unsigned int _handle, vector & V); //5 int getCache(const unsigned int _handle, vector & V); //5 int getCache(const unsigned int _handle, vector & V); //6 int getCache(const unsigned int _handle, vector & V, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity);//0 int getCache(const unsigned int _handle, vector & V, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity);//1 int getCache(const unsigned int _handle, vector & V, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity);//2 int getCache(const unsigned int _handle, vector & V, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity);//3 int getCache(const unsigned int _handle, vector & V, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity);//4 int getCache(const unsigned int _handle, vector & V, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity);//5 int getCache(const unsigned int _handle, vector & V, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity);//5 int getCache(const unsigned int _handle, vector & V, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity);//6 int getCache(const unsigned int _handle, vector & V, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts);//0 int getCache(const unsigned int _handle, vector & V, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts);//1 int getCache(const unsigned int _handle, vector & V, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts);//2 int getCache(const unsigned int _handle, vector & V, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts);//3 int getCache(const unsigned int _handle, vector & V, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts);//4 int getCache(const unsigned int _handle, vector & V, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts);//5 int getCache(const unsigned int _handle, vector & V, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts);//5 int getCache(const unsigned int _handle, vector & V, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts);//6 //NON_BLOCKING int get(vector handleV, vector &statusV); int getV(vector handleV, vector &statusV){ status=get(handleV, statusV); ca_flush_io(); //Yes let's flush here! return status;} int get(vector pvV, vector &statusV) { vector hV; hV.reserve(pvV.size()); hV=handleHelper.getHandlesFromPVs(pvV); return get(hV, statusV); } int getScalars(vector handleV, vector & V, vector &statusV){ //0 CAFE::get(handleV, statusV); CAFE::waitForBundledEvents(handleV, statusV); return CAFE::getCache(handleV, V, statusV); } int getScalars(vector handleV, vector & V, vector &statusV){ //1 CAFE::get(handleV, statusV); CAFE::waitForBundledEvents(handleV, statusV); return CAFE::getCache(handleV, V, statusV); } int getScalars(vector handleV, vector & V, vector &statusV){ //2 CAFE::get(handleV, statusV); CAFE::waitForBundledEvents(handleV, statusV); return CAFE::getCache(handleV, V, statusV); } int getScalars(vector handleV, vector & V, vector &statusV){ //3 CAFE::get(handleV, statusV); CAFE::waitForBundledEvents(handleV, statusV); return CAFE::getCache(handleV, V, statusV); } int getScalars(vector handleV, vector & V, vector &statusV){ //4 CAFE::get(handleV, statusV); CAFE::waitForBundledEvents(handleV, statusV); return CAFE::getCache(handleV, V, statusV); } int getScalars(vector handleV, vector & V, vector &statusV){ //5 CAFE::get(handleV, statusV); CAFE::waitForBundledEvents(handleV, statusV); return CAFE::getCache(handleV, V, statusV); } int getScalars(vector handleV, vector & V, vector &statusV) { //5 CAFE::get(handleV, statusV); CAFE::waitForBundledEvents(handleV, statusV); return CAFE::getCache(handleV, V, statusV); } int getScalars(vector handleV, vector & V, vector &statusV) { //6 CAFE::get(handleV, statusV); //for (size_t i=0; i< handleV.size(); ++i) { cout << "/Asyn/h=" << handleV[i] << "s=" << statusV[i] << " [" << i << "] " << endl;} CAFE::waitForBundledEvents(handleV, statusV); //for (size_t i=0; i< handleV.size(); ++i) { cout << "/Wait/h=" << handleV[i] << "s=" << statusV[i] << " [" << i << "] " << endl;} status=CAFE::getCache(handleV, V, statusV); //for (size_t i=0; i< handleV.size(); ++i) { cout << "/Cach/h=" << handleV[i] << "s=" << statusV[i] << " [" << i << "] " << endl;} return status; } int getCacheVStr(vector handleV, vector & V, vector &statusV){ return getCache(handleV, V, statusV);} int getCacheVLong(vector handleV, vector & V, vector &statusV){ return getCache(handleV, V, statusV);} int getCacheVDouble(vector handleV, vector & V, vector &statusV){ return getCache(handleV, V, statusV);} int getCache(vector handleV, vector & V, vector &statusV); //0 int getCache(vector handleV, vector & V, vector &statusV); //1 int getCache(vector handleV, vector & V, vector &statusV); //2 int getCache(vector handleV, vector & V, vector &statusV); //3 int getCache(vector handleV, vector & V, vector &statusV); //4 int getCache(vector handleV, vector & V, vector &statusV); //5 int getCache(vector handleV, vector & V, vector &statusV); //5 int getCache(vector handleV, vector & V, vector &statusV); //6 int getCache(vector handleV, vector & V, vector &statusV, vector &alarmStatusV, vector &alarmSeverityV); //0 int getCache(vector handleV, vector & V, vector &statusV, vector &alarmStatusV, vector &alarmSeverityV); //1 int getCache(vector handleV, vector & V, vector &statusV, vector &alarmStatusV, vector &alarmSeverityV); //2 int getCache(vector handleV, vector & V, vector &statusV, vector &alarmStatusV, vector &alarmSeverityV); //3 int getCache(vector handleV, vector & V, vector &statusV, vector &alarmStatusV, vector &alarmSeverityV); //4 int getCache(vector handleV, vector & V, vector &statusV, vector &alarmStatusV, vector &alarmSeverityV); //5 int getCache(vector handleV, vector & V, vector &statusV, vector &alarmStatusV, vector &alarmSeverityV); //5 int getCache(vector handleV, vector & V, vector &statusV, vector &alarmStatusV, vector &alarmSeverityV); //6 //0 int getCache(vector handleV, vector & V, vector &statusV, vector &alarmStatusV, vector &alarmSeverityV, vector &tsV); //1 int getCache(vector handleV, vector & V, vector &statusV, vector &alarmStatusV, vector &alarmSeverityV, vector &tsV); //2 int getCache(vector handleV, vector & V, vector &statusV, vector &alarmStatusV, vector &alarmSeverityV, vector &tsV); //3 int getCache(vector handleV, vector & V, vector &statusV, vector &alarmStatusV, vector &alarmSeverityV, vector &tsV); //4 int getCache(vector handleV, vector & V, vector &statusV, vector &alarmStatusV, vector &alarmSeverityV, vector &tsV); //5 int getCache(vector handleV, vector & V, vector &statusV, vector &alarmStatusV, vector &alarmSeverityV, vector &tsV); int getCache(vector handleV, vector & V, vector &statusV, vector &alarmStatusV, vector &alarmSeverityV, vector &tsV); //6 int getCache(vector handleV, vector & V, vector &statusV, vector &alarmStatusV, vector &alarmSeverityV, vector &tsV); /////////////////////////////////////////////////////////////////////////////////////////// int set(const unsigned int handle, vector V); //0 int set(const unsigned int handle, vector V); //1 int set(const unsigned int handle, vector V); //2 int set(const unsigned int handle, vector V);//3 int set(const unsigned int handle, vector V);//4 int set(const unsigned int handle, vector V); //5 int set(const unsigned int handle, vector V); //5+ int set(const unsigned int handle, vector V); //6 int set(vector handleV, vector V, vector &statusV); //0 int set(vector handleV, vector V, vector &statusV); //1 int set(vector handleV, vector V, vector &statusV); //2 int set(vector handleV, vector V, vector &statusV); //3 int set(vector handleV, vector V, vector &statusV); //4 int set(vector handleV, vector V, vector &statusV); //5 int set(vector handleV, vector V, vector &statusV); //5+ int set(vector handleV, vector V, vector &statusV); //6 int get (vector handleV, PVDataHolder * pvd){ return get(&handleV[0], (unsigned int) handleV.size(), pvd); }; int getCache (vector handleV, PVDataHolder * pvd){ return getCache(&handleV[0], (unsigned int) handleV.size(), pvd); }; int getPVArray (vector handleV, PVDataHolder * pvd){ //unsigned int * handleArray = new unsigned int [handleV.size()]; //for (size_t i=0; i< (size_t) handleV.size(); ++i) {handleArray[i]= (unsigned int) handleV[i];} //status=get(handleArray, (unsigned int) handleV.size(), pvd); //delete [] handleArray; return status; return get(&handleV[0], (unsigned int) handleV.size(), pvd); }; /* int getPVArrayCache (vector handleV, PVDataHolder * pvd){ //unsigned int * handleArray = new unsigned int [handleV.size()]; //for (size_t i=0; i< (size_t) handleV.size(); ++i) {handleArray[i]= (unsigned int) handleV[i];} //status=getCache(handleArray, (unsigned int) handleV.size(), pvd); //delete [] handleArray; return status; return getCache(&handleV[0], (unsigned int) handleV.size(), pvd); }; */ //setPVArray is in cafeVectors.h and .cc //For Cython int setPVArray(vector handleV, PVDataHolder * pvd); int setVVString(vector handleV, vector V, vector &statusV) { return set(handleV, V, statusV);}; int setVVChar(vector handleV, vector V, vector &statusV){ return set(handleV, V, statusV);}; int setVVLong(vector handleV, vector V, vector &statusV){ return set(handleV, V, statusV);}; int setVVDouble(vector handleV, vector V, vector &statusV){ return set(handleV, V, statusV);}; int setVString(const unsigned int handle, vector V) {return set(handle, V);}; int setVChar (const unsigned int handle, vector V) {return set(handle, V);}; int setVLong (const unsigned int handle, vector V) {return set(handle, V);}; int setVShort (const unsigned int handle, vector V) {return set(handle, V);}; int setVUShort(const unsigned int handle, vector V) {return set(handle, V);}; int setVFloat (const unsigned int handle, vector V) {return set(handle, V);}; int setVDouble(const unsigned int handle, vector V) {return set(handle, V);}; #endif // CAFEVECTORS_H