open methods refined

This commit is contained in:
2017-11-22 14:12:01 +01:00
parent 350ddab997
commit 52fe50f14a
8 changed files with 3086 additions and 21 deletions

View File

@@ -27,7 +27,7 @@ export CAFE_EPICS_V_MINOR=$EBMIN
export CAFE_EPICS_V_PATCH=$EBPAT export CAFE_EPICS_V_PATCH=$EBPAT
#--enable-boost --with-boost=/afs/psi.ch/intranet/Controls/BD/deps/boost_1_57_0 \ #--enable-boost --with-boost=/afs/psi.ch/intranet/Controls/BD/deps/boost_1_57_0 \
CYCAFE_VERSION=pycafe-1.5.0-final-1 CYCAFE_VERSION=pycafe-1.5.0-final-2
./configure \ ./configure \
--prefix=/opt/gfa/cafe/python/python-3.5/${CYCAFE_VERSION}/ \ --prefix=/opt/gfa/cafe/python/python-3.5/${CYCAFE_VERSION}/ \

View File

@@ -26,7 +26,7 @@ export CAFE_EPICS_V_MINOR=$EBMIN
export CAFE_EPICS_V_PATCH=$EBPAT export CAFE_EPICS_V_PATCH=$EBPAT
CAFE_VERSION=cafe-1.5.0-final-1 CAFE_VERSION=cafe-1.5.0-final-2
./configure \ ./configure \

View File

@@ -13,9 +13,9 @@
#define EV EPICSVERSION(HAVE_EPICS) #define EV EPICSVERSION(HAVE_EPICS)
#if (EPICS_VERSION==3) && (EPICS_MAJOR==14) && (EPICS_MINOR>=11) #if (EPICS_MAJOR==3) && (EPICS_MINOR==14) && (EPICS_PATCH>=11)
#define MASK_CTRL DBE_VALUE | DBE_LOG | DBE_ALARM | DBE_PROPERTY #define MASK_CTRL DBE_VALUE | DBE_LOG | DBE_ALARM | DBE_PROPERTY
#elif (EPICS_VERSION==3) && (EPICS_MAJOR>14) #elif (EPICS_MAJOR==3) && (EPICS_MINOR>14)
#define MASK_CTRL DBE_VALUE | DBE_LOG | DBE_ALARM | DBE_PROPERTY #define MASK_CTRL DBE_VALUE | DBE_LOG | DBE_ALARM | DBE_PROPERTY
#else #else
#define MASK_CTRL DBE_VALUE | DBE_LOG | DBE_ALARM #define MASK_CTRL DBE_VALUE | DBE_LOG | DBE_ALARM

View File

@@ -186,7 +186,7 @@ htmldir = ${docdir}
includedir = ${prefix}/include includedir = ${prefix}/include
infodir = ${datarootdir}/info infodir = ${datarootdir}/info
install_sh = ${SHELL} /afs/psi.ch/project/cafe/gitlab/CAFE/cpp/install-sh install_sh = ${SHELL} /afs/psi.ch/project/cafe/gitlab/CAFE/cpp/install-sh
libdir = /opt/gfa/cafe/cpp/cafe-1.5.0-final-1/lib libdir = /opt/gfa/cafe/cpp/cafe-1.5.0-final-2/lib
libexecdir = ${exec_prefix}/libexec libexecdir = ${exec_prefix}/libexec
localedir = ${datarootdir}/locale localedir = ${datarootdir}/locale
localstatedir = ${prefix}/var localstatedir = ${prefix}/var
@@ -195,7 +195,7 @@ mandir = ${datarootdir}/man
mkdir_p = /bin/mkdir -p mkdir_p = /bin/mkdir -p
oldincludedir = /usr/include oldincludedir = /usr/include
pdfdir = ${docdir} pdfdir = ${docdir}
prefix = /opt/gfa/cafe/cpp/cafe-1.5.0-final-1 prefix = /opt/gfa/cafe/cpp/cafe-1.5.0-final-2
program_transform_name = s,x,x, program_transform_name = s,x,x,
psdir = ${docdir} psdir = ${docdir}
sbindir = ${exec_prefix}/sbin sbindir = ${exec_prefix}/sbin

View File

@@ -227,7 +227,7 @@ htmldir = ${docdir}
includedir = ${prefix}/include includedir = ${prefix}/include
infodir = ${datarootdir}/info infodir = ${datarootdir}/info
install_sh = ${SHELL} /afs/psi.ch/project/cafe/gitlab/CAFE/cpp/install-sh install_sh = ${SHELL} /afs/psi.ch/project/cafe/gitlab/CAFE/cpp/install-sh
libdir = /opt/gfa/cafe/cpp/cafe-1.5.0-final-1/lib libdir = /opt/gfa/cafe/cpp/cafe-1.5.0-final-2/lib
libexecdir = ${exec_prefix}/libexec libexecdir = ${exec_prefix}/libexec
localedir = ${datarootdir}/locale localedir = ${datarootdir}/locale
localstatedir = ${prefix}/var localstatedir = ${prefix}/var
@@ -236,7 +236,7 @@ mandir = ${datarootdir}/man
mkdir_p = /bin/mkdir -p mkdir_p = /bin/mkdir -p
oldincludedir = /usr/include oldincludedir = /usr/include
pdfdir = ${docdir} pdfdir = ${docdir}
prefix = /opt/gfa/cafe/cpp/cafe-1.5.0-final-1 prefix = /opt/gfa/cafe/cpp/cafe-1.5.0-final-2
program_transform_name = s,x,x, program_transform_name = s,x,x,
psdir = ${docdir} psdir = ${docdir}
sbindir = ${exec_prefix}/sbin sbindir = ${exec_prefix}/sbin

View File

@@ -123,6 +123,8 @@ int Connect::createChannel(unsigned int handle, const char * pv, chid &pCh) {
time_duration duration(timeEnd-timeStart); time_duration duration(timeEnd-timeStart);
timeElapsed= (double) duration.total_microseconds()/1000000.0; timeElapsed= (double) duration.total_microseconds()/1000000.0;
//cout << "channelOpenPolicy.getTimeout() " << channelOpenPolicy.getTimeout() << endl;
while ( !(*it_handle).isConnected() && timeElapsed <= channelOpenPolicy.getTimeout()){ while ( !(*it_handle).isConnected() && timeElapsed <= channelOpenPolicy.getTimeout()){
#if HAVE_BOOST_THREAD #if HAVE_BOOST_THREAD
@@ -148,11 +150,15 @@ int Connect::createChannel(unsigned int handle, const char * pv, chid &pCh) {
else { else {
cout << (*it_handle).getPV() << " // is not connected //" << endl; cout << (*it_handle).getPV() << " // is not connected //" << endl;
} }
cout << "timeElapsed for open " << timeElapsed << " nPoll = " << nPoll << endl; cout << "timeElapsed for open " << timeElapsed << " nPoll = " << nPoll << endl;
*/ */
}
}
//else {
//cout << "channelOpenPolicy.getWhenToFlushSendBuffer() is " << channelOpenPolicy.getWhenToFlushSendBuffer() << endl;
//}
// Peculiar if true // Peculiar if true
/* /*
@@ -468,7 +474,9 @@ int Connect::open(const char ** pvArray, unsigned int * handleArray,
} }
catch (CAFEException_open &e) { catch (CAFEException_open &e) {
if (flushAtEndFlag) { if (flushAtEndFlag) {
channelOpenPolicy.flushSendBufferNow(); //this also resets whenKind=FLUSH_AFTER_EACH_CHANNEL_CREATION //channelOpenPolicy.flushSendBufferNow();
//this also resets whenKind=FLUSH_AFTER_EACH_CHANNEL_CREATION
Connect::openNow();
} }
throw(e); throw(e);
@@ -477,7 +485,9 @@ int Connect::open(const char ** pvArray, unsigned int * handleArray,
} }
if (flushAtEndFlag) { if (flushAtEndFlag) {
channelOpenPolicy.flushSendBufferNow(); //this also resets whenKind=FLUSH_AFTER_EACH_CHANNEL_CREATION //channelOpenPolicy.flushSendBufferNow();
//this also resets whenKind=FLUSH_AFTER_EACH_CHANNEL_CREATION
Connect::openNow();
} }
return ICAFE_NORMAL; return ICAFE_NORMAL;
@@ -519,7 +529,9 @@ int Connect::open(const string *pvArrayS, unsigned int *handleArray, const unsi
} }
catch (CAFEException_open &e) { catch (CAFEException_open &e) {
if (flushAtEndFlag) { if (flushAtEndFlag) {
channelOpenPolicy.flushSendBufferNow(); //this also resets whenKind=FLUSH_AFTER_EACH_CHANNEL_CREATION //channelOpenPolicy.flushSendBufferNow();
//this also resets whenKind=FLUSH_AFTER_EACH_CHANNEL_CREATION
Connect::openNow();
} }
throw(e); throw(e);
@@ -528,7 +540,9 @@ int Connect::open(const string *pvArrayS, unsigned int *handleArray, const unsi
} }
if (flushAtEndFlag) { if (flushAtEndFlag) {
channelOpenPolicy.flushSendBufferNow(); //this also resets whenKind=FLUSH_AFTER_EACH_CHANNEL_CREATION //channelOpenPolicy.flushSendBufferNow();
//this also resets whenKind=FLUSH_AFTER_EACH_CHANNEL_CREATION
Connect::openNow();
} }
return ICAFE_NORMAL; return ICAFE_NORMAL;
@@ -575,7 +589,9 @@ int Connect::open(vector<string> pvV, vector<unsigned int> &handleV)
} }
catch (CAFEException_open &e) { catch (CAFEException_open &e) {
if (flushAtEndFlag) { if (flushAtEndFlag) {
channelOpenPolicy.flushSendBufferNow(); //this also resets whenKind=FLUSH_AFTER_EACH_CHANNEL_CREATION //channelOpenPolicy.flushSendBufferNow();
//this also resets whenKind=FLUSH_AFTER_EACH_CHANNEL_CREATION
Connect::openNow();
} }
throw(e); throw(e);
@@ -584,7 +600,9 @@ int Connect::open(vector<string> pvV, vector<unsigned int> &handleV)
} }
if (flushAtEndFlag) { if (flushAtEndFlag) {
channelOpenPolicy.flushSendBufferNow(); //this also resets whenKind=FLUSH_AFTER_EACH_CHANNEL_CREATION //channelOpenPolicy.flushSendBufferNow();
//this also resets whenKind=FLUSH_AFTER_EACH_CHANNEL_CREATION
Connect::openNow();
} }
return ICAFE_NORMAL; return ICAFE_NORMAL;
@@ -630,7 +648,9 @@ int Connect::open(vector<const char *> pvV, vector<unsigned int> &handleV)
} }
catch (CAFEException_open &e) { catch (CAFEException_open &e) {
if (flushAtEndFlag) { if (flushAtEndFlag) {
channelOpenPolicy.flushSendBufferNow(); //this also resets whenKind=FLUSH_AFTER_EACH_CHANNEL_CREATION //channelOpenPolicy.flushSendBufferNow();
//this also resets whenKind=FLUSH_AFTER_EACH_CHANNEL_CREATION
Connect::openNow();
} }
throw(e); throw(e);
@@ -639,7 +659,9 @@ int Connect::open(vector<const char *> pvV, vector<unsigned int> &handleV)
} }
if (flushAtEndFlag) { if (flushAtEndFlag) {
channelOpenPolicy.flushSendBufferNow(); //this also resets whenKind=FLUSH_AFTER_EACH_CHANNEL_CREATION //channelOpenPolicy.flushSendBufferNow();
//this also resets whenKind=FLUSH_AFTER_EACH_CHANNEL_CREATION
Connect::openNow();
} }

3043
src/connect.cpp- Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -207,7 +207,7 @@ htmldir = ${docdir}
includedir = ${prefix}/include includedir = ${prefix}/include
infodir = ${datarootdir}/info infodir = ${datarootdir}/info
install_sh = ${SHELL} /afs/psi.ch/project/cafe/gitlab/CAFE/cpp/install-sh install_sh = ${SHELL} /afs/psi.ch/project/cafe/gitlab/CAFE/cpp/install-sh
libdir = /opt/gfa/cafe/cpp/cafe-1.5.0-final-1/lib libdir = /opt/gfa/cafe/cpp/cafe-1.5.0-final-2/lib
libexecdir = ${exec_prefix}/libexec libexecdir = ${exec_prefix}/libexec
localedir = ${datarootdir}/locale localedir = ${datarootdir}/locale
localstatedir = ${prefix}/var localstatedir = ${prefix}/var
@@ -216,7 +216,7 @@ mandir = ${datarootdir}/man
mkdir_p = /bin/mkdir -p mkdir_p = /bin/mkdir -p
oldincludedir = /usr/include oldincludedir = /usr/include
pdfdir = ${docdir} pdfdir = ${docdir}
prefix = /opt/gfa/cafe/cpp/cafe-1.5.0-final-1 prefix = /opt/gfa/cafe/cpp/cafe-1.5.0-final-2
program_transform_name = s,x,x, program_transform_name = s,x,x,
psdir = ${docdir} psdir = ${docdir}
sbindir = ${exec_prefix}/sbin sbindir = ${exec_prefix}/sbin