Compare commits
21 Commits
cafe-1.8.0
...
cafe-1.19.
| Author | SHA1 | Date | |
|---|---|---|---|
| 33bbcde48a | |||
| 7b052a21fc | |||
| d40ecbc53c | |||
| 9b5803b7f0 | |||
| 7e31c8fd80 | |||
| 64fda927e0 | |||
| 9851b72ba2 | |||
| 8c671dee59 | |||
| 844afa0a02 | |||
| 4cab5862dc | |||
| c2934ce3f7 | |||
| 7c779d9add | |||
| 80ce12d374 | |||
| 90e063f930 | |||
| cc804d2e7b | |||
| cecf4a3f11 | |||
| 275bf4ad10 | |||
| 22583f38b6 | |||
| 5f5cfc97fa | |||
| 6006091f2e | |||
| 7ba4128448 |
3
.gitignore
vendored
3
.gitignore
vendored
@@ -11,12 +11,11 @@
|
||||
*.bak
|
||||
aclocal.m4
|
||||
autom4te.cache
|
||||
config.*
|
||||
config.in
|
||||
configure
|
||||
depcomp
|
||||
install-sh
|
||||
ltmain.sh
|
||||
m4
|
||||
makefile
|
||||
makefile.in
|
||||
missing
|
||||
|
||||
15
INSTALL
15
INSTALL
@@ -1,8 +1,8 @@
|
||||
Installation Instructions
|
||||
*************************
|
||||
|
||||
Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
|
||||
2006, 2007, 2008, 2009 Free Software Foundation, Inc.
|
||||
Copyright (C) 1994-1996, 1999-2002, 2004-2013 Free Software Foundation,
|
||||
Inc.
|
||||
|
||||
Copying and distribution of this file, with or without modification,
|
||||
are permitted in any medium without royalty provided the copyright
|
||||
@@ -226,6 +226,11 @@ order to use an ANSI C compiler:
|
||||
|
||||
and if that doesn't work, install pre-built binaries of GCC for HP-UX.
|
||||
|
||||
HP-UX `make' updates targets which have the same time stamps as
|
||||
their prerequisites, which makes it generally unusable when shipped
|
||||
generated files such as `configure' are involved. Use GNU `make'
|
||||
instead.
|
||||
|
||||
On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
|
||||
parse its `<wchar.h>' header file. The option `-nodtk' can be used as
|
||||
a workaround. If GNU CC is not installed, it is therefore recommended
|
||||
@@ -304,9 +309,10 @@ causes the specified `gcc' to be used as the C compiler (unless it is
|
||||
overridden in the site shell script).
|
||||
|
||||
Unfortunately, this technique does not work for `CONFIG_SHELL' due to
|
||||
an Autoconf bug. Until the bug is fixed you can use this workaround:
|
||||
an Autoconf limitation. Until the limitation is lifted, you can use
|
||||
this workaround:
|
||||
|
||||
CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
|
||||
CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash
|
||||
|
||||
`configure' Invocation
|
||||
======================
|
||||
@@ -362,4 +368,3 @@ operates.
|
||||
|
||||
`configure' also accepts some other, not widely useful, options. Run
|
||||
`configure --help' for more details.
|
||||
|
||||
|
||||
@@ -1,39 +1,38 @@
|
||||
INCLUDES = -IC:\CAFE\cafe-1.0.0-beta-3\cpp\include -IC:\local\boost_1_63_0\boost \
|
||||
-IC:\local\boost_1_63_0 -IC:\EPICS\base-3.14.12.5\include -IC:\EPICS\base-3.14.12.5\include\os\WIN32
|
||||
INCLUDES = -IC:\EPICS\CAFE\cpp\include -IC:\EPICS\CAFE\cpp -IC:\EPICS\boost_1_81_0\boost \
|
||||
-IC:\EPICS\boost_1_81_0 -IC:\epics\epics-base\include -IC:\epics\epics-base\include\os\WIN32 \
|
||||
-Ic:\EPICS\epics-base\include\compiler\msvc \
|
||||
#-IC:\Qt\qt-4.8.6-x64-msvc2010\include -Ic:\Qt\qt-4.8.6-x64-msvc2010\include -Ic:\Qt\qt-4.8.6-x64-msvc2010\include\QtCore \
|
||||
#-IC:\Qt\qt-4.8.6-msvc2010\include\QtXml
|
||||
#-IC:\Qt\qt-4.8.6-msvc2010\include\QtXml \
|
||||
#-IC:\Users\chrin\AppData\Local\Continuum\Anaconda3\envs\py345\include
|
||||
|
||||
LIB_DEST=lib\cafe-noqt
|
||||
|
||||
CXX=cl
|
||||
CXXFLAGS = /W4 /EHsc /c /MT
|
||||
OUTPUT_OPTION = /o "$@"
|
||||
LIB_LOCAL = C:\epics\base-3.14.12.5\lib\windows-x64\Com.lib C:\epics\base-3.14.12.5\lib\windows-x64\ca.lib \
|
||||
C:\local\boost_1_63_0\lib64-msvc-10.0\libboost_thread-vc100-mt-s-1_63.lib \
|
||||
C:\local\boost_1_63_0\lib64-msvc-10.0\libboost_system-vc100-mt-s-1_63.lib
|
||||
CXXFLAGS = -DUSE_TYPED_RSET -EHsc -nologo -FC -D__STDC__=0 -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -Ox -GL -Oy- -W3 -MD -DEPICS_BUILD_DLL -DEPICS_CALL_DLL -c
|
||||
|
||||
#OUTPUT_OPTION = /o "$@"
|
||||
OUTPUT_OPTION = /Fo"$@"
|
||||
LIB_LOCAL = C:\epics\epics-base\lib\win32-x86\Com.lib C:\epics\epics-base\lib\win32-x86\ca.lib \
|
||||
#C:\EPICS\boost_1_81_0\stage\lib\\libboost_thread-vc142-mt-x32-1_81.lib \
|
||||
#C:\EPICS\boost_1_81_0\stage\lib\\libboost_system-vc142-mt-gd-x32-1_81.lib \
|
||||
#C:\EPICS\boost_1_81_0\stage\lib\\libboost_date_time-vc142-mt-gd-x32-1_81.lib \
|
||||
#C:\EPICS\boost_1_81_0\stage\lib\\libboost_chrono-vc142-mt-x32-1_81.lib \
|
||||
#C:\EPICS\boost_1_81_0\stage\lib\\libboost_exception-vc142-mt-gd-x32-1_81.lib \
|
||||
#C:\Qt\qt-4.8.6-x64-msvc2010\lib\QtCore4.lib C:\Qt\qt-4.8.6-x64-msvc2010\lib\QtXml4.lib \
|
||||
#C:\Users\chrin\AppData\Local\Continuum\Anaconda3\envs\py345\libs\python34.lib
|
||||
#C:\Users\chrin\AppData\Local\Continuum\Anaconda3\envs\py345\libs\python34.lib \
|
||||
|
||||
OBJS= src\cafeCache.obj src\cafeGroup.obj src\cafe.obj src\cafeVectors.obj \
|
||||
src\callbackHandlerCreate.obj src\callbackHandlerMonitor.obj src\conduitGroup.obj src\conduit.obj \
|
||||
src\connectCallbacks.obj src\connectGroup.obj \
|
||||
src\connect.obj src\exceptionsHelper.obj src\granules.obj src\handleHelper.obj src\helper.obj \
|
||||
src\methodCallbacks.obj src\policyHelper.obj src\transpose.obj \
|
||||
src\cafeXML.obj src\loadCollectionXMLParser.obj src\loadGroupXMLParser.obj \
|
||||
src\restorePVGroupXMLParser.obj $(LIB_LOCAL)
|
||||
|
||||
OBJS= cafeCache.obj cafeGroup.obj cafe.obj cafeVectors.obj \
|
||||
callbackHandlerCreate.obj callbackHandlerMonitor.obj conduitGroup.obj conduit.obj \
|
||||
connectCallbacks.obj connectGroup.obj \
|
||||
connect.obj exceptionsHelper.obj granules.obj handleHelper.obj helper.obj \
|
||||
methodCallbacks.obj policyHelper.obj transpose.obj \
|
||||
cafeXML.obj loadCollectionXMLParser.obj loadGroupXMLParser.obj \
|
||||
restorePVGroupXMLParser.obj $(LIB_LOCAL)
|
||||
cafe.lib: $(OBJS)
|
||||
LIB $(OBJS) /out:cafe.lib
|
||||
|
||||
|
||||
|
||||
$(LIB_DEST)\cafe.lib: $(OBJS)
|
||||
LIB $(OBJS) /out:$(LIB_DEST)\cafe.lib
|
||||
|
||||
|
||||
%.obj: src\%.cpp
|
||||
%.obj: %.cpp
|
||||
$(CXX) $(CXXFLAGS) $(INCLUDES) $(OUTPUT_OPTION) $<
|
||||
|
||||
|
||||
clean:
|
||||
del *.obj
|
||||
del src\*.obj
|
||||
|
||||
|
||||
|
||||
39
MakefileWin/Makefile_noqt_windows7
Normal file
39
MakefileWin/Makefile_noqt_windows7
Normal file
@@ -0,0 +1,39 @@
|
||||
INCLUDES = -IC:\CAFE\cafe-1.0.0-beta-3\cpp\include -IC:\local\boost_1_63_0\boost \
|
||||
-IC:\local\boost_1_63_0 -IC:\EPICS\base-3.14.12.5\include -IC:\EPICS\base-3.14.12.5\include\os\WIN32
|
||||
#-IC:\Qt\qt-4.8.6-x64-msvc2010\include -Ic:\Qt\qt-4.8.6-x64-msvc2010\include -Ic:\Qt\qt-4.8.6-x64-msvc2010\include\QtCore \
|
||||
#-IC:\Qt\qt-4.8.6-msvc2010\include\QtXml
|
||||
#-IC:\Users\chrin\AppData\Local\Continuum\Anaconda3\envs\py345\include
|
||||
|
||||
LIB_DEST=lib\cafe-noqt
|
||||
|
||||
CXX=cl
|
||||
CXXFLAGS = /W4 /EHsc /c /MT
|
||||
OUTPUT_OPTION = /o "$@"
|
||||
LIB_LOCAL = C:\epics\base-3.14.12.5\lib\windows-x64\Com.lib C:\epics\base-3.14.12.5\lib\windows-x64\ca.lib \
|
||||
C:\local\boost_1_63_0\lib64-msvc-10.0\libboost_thread-vc100-mt-s-1_63.lib \
|
||||
C:\local\boost_1_63_0\lib64-msvc-10.0\libboost_system-vc100-mt-s-1_63.lib
|
||||
#C:\Qt\qt-4.8.6-x64-msvc2010\lib\QtCore4.lib C:\Qt\qt-4.8.6-x64-msvc2010\lib\QtXml4.lib \
|
||||
#C:\Users\chrin\AppData\Local\Continuum\Anaconda3\envs\py345\libs\python34.lib
|
||||
|
||||
|
||||
OBJS= cafeCache.obj cafeGroup.obj cafe.obj cafeVectors.obj \
|
||||
callbackHandlerCreate.obj callbackHandlerMonitor.obj conduitGroup.obj conduit.obj \
|
||||
connectCallbacks.obj connectGroup.obj \
|
||||
connect.obj exceptionsHelper.obj granules.obj handleHelper.obj helper.obj \
|
||||
methodCallbacks.obj policyHelper.obj transpose.obj \
|
||||
cafeXML.obj loadCollectionXMLParser.obj loadGroupXMLParser.obj \
|
||||
restorePVGroupXMLParser.obj $(LIB_LOCAL)
|
||||
|
||||
|
||||
|
||||
$(LIB_DEST)\cafe.lib: $(OBJS)
|
||||
LIB $(OBJS) /out:$(LIB_DEST)\cafe.lib
|
||||
|
||||
|
||||
%.obj: src\%.cpp
|
||||
$(CXX) $(CXXFLAGS) $(INCLUDES) $(OUTPUT_OPTION) $<
|
||||
|
||||
clean:
|
||||
del *.obj
|
||||
|
||||
|
||||
28
MakefileWin/config.h
Normal file
28
MakefileWin/config.h
Normal file
@@ -0,0 +1,28 @@
|
||||
|
||||
/* epics major release */
|
||||
#define EPICS_MAJOR 7
|
||||
|
||||
/* epics minor release */
|
||||
#define EPICS_MINOR 0
|
||||
|
||||
/* epics patch release */
|
||||
#define EPICS_PATCH 6
|
||||
|
||||
/* epics version */
|
||||
#define HAVE_EPICS 7.0.6
|
||||
|
||||
/* Define to 1 if you have the <epicsTypes.h> header file. */
|
||||
#define HAVE_EPICSTYPES_H 1
|
||||
|
||||
/* Define to 1 if you have the `boost_thread' library (-lboost_thread). */
|
||||
#define HAVE_BOOST_THREAD 1
|
||||
|
||||
/* Define to 1 if you have the `QtXml' library (-lQtXml). */
|
||||
/*define HAVE_LIBQTXML 1 */
|
||||
|
||||
/* Define to 1 if you have the <Python.h> header file. */
|
||||
/*#define HAVE_PYTHON_H 1 */
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#define _CRT_SECURE_NO_WARNINGS
|
||||
#endif
|
||||
26
MakefileWin/config/Py3Cafe/config.h
Normal file
26
MakefileWin/config/Py3Cafe/config.h
Normal file
@@ -0,0 +1,26 @@
|
||||
|
||||
/* epics major release */
|
||||
#define EPICS_MAJOR 3
|
||||
|
||||
/* epics minor release */
|
||||
#define EPICS_MINOR 14
|
||||
|
||||
/* epics patch release */
|
||||
#define EPICS_PATCH 12
|
||||
|
||||
/* epics version */
|
||||
#define HAVE_EPICS 3.14.12
|
||||
|
||||
/* Define to 1 if you have the <epicsTypes.h> header file. */
|
||||
#define HAVE_EPICSTYPES_H 1
|
||||
|
||||
/* Define to 1 if you have the `boost_thread' library (-lboost_thread). */
|
||||
#define HAVE_BOOST_THREAD 1
|
||||
|
||||
/* Define to 1 if you have the `QtXml' library (-lQtXml). */
|
||||
#define HAVE_LIBQTXML 1
|
||||
|
||||
/* Define to 1 if you have the <Python.h> header file. */
|
||||
#define HAVE_PYTHON_H 1
|
||||
|
||||
|
||||
26
MakefileWin/config/config.h
Normal file
26
MakefileWin/config/config.h
Normal file
@@ -0,0 +1,26 @@
|
||||
|
||||
/* epics major release */
|
||||
#define EPICS_MAJOR 3
|
||||
|
||||
/* epics minor release */
|
||||
#define EPICS_MINOR 14
|
||||
|
||||
/* epics patch release */
|
||||
#define EPICS_PATCH 12
|
||||
|
||||
/* epics version */
|
||||
#define HAVE_EPICS 3.14.12
|
||||
|
||||
/* Define to 1 if you have the <epicsTypes.h> header file. */
|
||||
#define HAVE_EPICSTYPES_H 1
|
||||
|
||||
/* Define to 1 if you have the `boost_thread' library (-lboost_thread). */
|
||||
#define HAVE_BOOST_THREAD 1
|
||||
|
||||
/* Define to 1 if you have the `QtXml' library (-lQtXml). */
|
||||
#define HAVE_LIBQTXML 1
|
||||
|
||||
/* Define to 1 if you have the <Python.h> header file. */
|
||||
/*#define HAVE_PYTHON_H 1 */
|
||||
|
||||
|
||||
26
MakefileWin/config/noqt/config.h
Normal file
26
MakefileWin/config/noqt/config.h
Normal file
@@ -0,0 +1,26 @@
|
||||
|
||||
/* epics major release */
|
||||
#define EPICS_MAJOR 3
|
||||
|
||||
/* epics minor release */
|
||||
#define EPICS_MINOR 14
|
||||
|
||||
/* epics patch release */
|
||||
#define EPICS_PATCH 12
|
||||
|
||||
/* epics version */
|
||||
#define HAVE_EPICS 3.14.12
|
||||
|
||||
/* Define to 1 if you have the <epicsTypes.h> header file. */
|
||||
#define HAVE_EPICSTYPES_H 1
|
||||
|
||||
/* Define to 1 if you have the `boost_thread' library (-lboost_thread). */
|
||||
#define HAVE_BOOST_THREAD 1
|
||||
|
||||
/* Define to 1 if you have the `QtXml' library (-lQtXml). */
|
||||
/*#define HAVE_LIBQTXML 1 */
|
||||
|
||||
/* Define to 1 if you have the <Python.h> header file. */
|
||||
/*#define HAVE_PYTHON_H 1 */
|
||||
|
||||
|
||||
30
README
30
README
@@ -4,8 +4,17 @@ autogen_rel_py3_noqt.sh ==> generates library for use from within python and C
|
||||
autogen_rel_noqt.sh ==> generates library for building a mex file (remove Qt4 dependence as matlab requires Qt5)
|
||||
autogen_rel.sh ==> normal c++ release
|
||||
|
||||
##
|
||||
Libraries are only made available when the appropriate is enabld
|
||||
#ENABLE_OPTIONS+=" --enable-qt5"
|
||||
##ENABLE_OPTIONS+=" --enable-qt4"
|
||||
#ENABLE_OPTIONS+=" --enable-python37"
|
||||
##ENABLE_OPTIONS+=" --enable-python35"
|
||||
#ENABLE_OPTIONS+=" --enable-json"
|
||||
#ENABLE_OPTIONS+=" --enable-zeromq"
|
||||
#ENABLE_OPTIONS+=" --enable-curl"
|
||||
#ENABLE_OPTIONS+=" --enable-lz4"
|
||||
|
||||
##
|
||||
## --------------------------------------------------------------------------
|
||||
## autogen.sh
|
||||
##
|
||||
@@ -16,18 +25,21 @@ autogen_rel.sh ==> normal c++ release
|
||||
## installed
|
||||
|
||||
## --with-boost: base directory for the boost header files
|
||||
## --with-epics: epics top level directory
|
||||
## Note that configure.ac assume that the architecture is
|
||||
## base/lib/${EPICS_HOST_ARCH}
|
||||
## --with-qt-inc Qt include directory (optional)
|
||||
## --with-qt-lib Qt lib directory (optional)
|
||||
## --with-python-inc Python include directory, if building PyCafe
|
||||
## --with-python-lib Python lib directory, if bulding PyCafe
|
||||
## --with-epics7: epics7 top level directory
|
||||
## --with-epics3: epics3 top level directory
|
||||
## Note that configure.ac assume that the architecture is
|
||||
## base/lib/${EPICS_HOST_ARCH}
|
||||
|
||||
## --with-qt5: Qt5 base directory (optional)
|
||||
## --with-python37: Python 3.7 directory, if building PyCafe
|
||||
## --with-python35: Python 3.5 directory, if bulding PyCafe
|
||||
## Remaining libraries are specific to swissfel zmq streams
|
||||
## --------------------------------------------------------------------------
|
||||
|
||||
1) Modify autogen.sh according to above
|
||||
2) 'source autogen.sh'
|
||||
3) 'make install' This installs cafe headers/libraries to the directories
|
||||
3) 'make'
|
||||
4) 'make install' This installs cafe headers/libraries to the directories
|
||||
specified by --prefix/--libdir in the above
|
||||
|
||||
|
||||
|
||||
86
autogen.sh
Normal file
86
autogen.sh
Normal file
@@ -0,0 +1,86 @@
|
||||
### psi specific - select compiler
|
||||
rm -f configure.ac
|
||||
ln -s configurePSI.ac configure.ac
|
||||
rm -f src/PyCafe.cpp
|
||||
ln -s PyCafe_sls.cpp src/PyCafe.cpp
|
||||
rm -f ./aclocal.m4
|
||||
rm -rf ./autom4te.cache
|
||||
aclocal --force -I m4
|
||||
/opt/gfa/python-3.7/latest/bin/libtoolize --force --copy #select libtools 2.4.6
|
||||
autoconf --force #interprets configure.ac
|
||||
autoheader --force
|
||||
automake --force --add-missing --copy
|
||||
|
||||
#Check what the EPICS RELEASE IS from ${EPICS}/base
|
||||
#Used by ./configure
|
||||
#Assumes format ${EPICS}/base-3.14.12
|
||||
#source cafeVersion-gcc-7.3.0
|
||||
CAFE_V="cafe-1.13.0"
|
||||
#For later check of existence of HOST_ARCH for $EPICS/include/os/$HOST_ARCH
|
||||
#Assume Linux but check if Darwin
|
||||
CAFE_HOST_FLAG_DARWIN=$(echo ${EPICS_HOST_ARCH} | grep -c "Darwin")
|
||||
echo 'darwin' $CAFE_HOST_FLAG_DARWIN
|
||||
export CAFE_HOST_FLAG_DARWIN=$CAFE_HOST_FLAG_DARWIN
|
||||
|
||||
EPICS_BASE=$(readlink ${EPICS}/base)
|
||||
#EB=$(readlink /afs/psi.ch/project/cafe/gitworkspace/CAFE/cpp/base)
|
||||
echo $EPICS_BASE
|
||||
if [ -z "$EPICS_BASE" ]
|
||||
then
|
||||
EPICS_BASE='base-7.4.1' #7.0 = 7+0 = 7 for major release
|
||||
fi
|
||||
|
||||
echo 'input' "$0" "$1" "$2"
|
||||
echo $EPICS_BASE
|
||||
|
||||
|
||||
EB1=$(echo $EPICS_BASE | sed -e "s/[a-zA-Z]*-//g")
|
||||
EBMAJ=$(echo $EB1 | sed -e "s/[[:punct:]].*//g")
|
||||
EBMIN1=$(echo $EB1 | sed -e "s/^[[:digit:]]*[[:punct:]]//g")
|
||||
EBMIN=$(echo $EBMIN1 | sed -e "s/[[:punct:]][[:digit:]]*//g")
|
||||
EBPAT=$(echo $EB1 | sed -e "s/[[:digit:]]*[[:punct:]]//g")
|
||||
echo EPICS_MAJOR=$EBMAJ
|
||||
echo EPICS_MINOR=$EBMIN
|
||||
echo EPICS_PATCH=$EBPAT
|
||||
#echo $EBMIN1
|
||||
|
||||
export CAFE_EPICS_V_MAJOR=$EBMAJ
|
||||
export CAFE_EPICS_V_MINOR=$EBMIN
|
||||
export CAFE_EPICS_V_PATCH=$EBPAT
|
||||
|
||||
ENABLE_OPTIONS="--enable-boost-inc"
|
||||
ENABLE_OPTIONS+=" --enable-epics3"
|
||||
#ENABLE_OPTIONS+=" --enable-epics7"
|
||||
ENABLE_OPTIONS+=" --enable-qt5"
|
||||
#ENABLE_OPTIONS+=" --enable-qt4"
|
||||
ENABLE_OPTIONS+=" --enable-python37"
|
||||
#ENABLE_OPTIONS+=" --enable-python35"
|
||||
#ENABLE_OPTIONS+=" --enable-json"
|
||||
#ENABLE_OPTIONS+=" --enable-zeromq"
|
||||
#ENABLE_OPTIONS+=" --enable-curl"
|
||||
#ENABLE_OPTIONS+=" --enable-lz4"
|
||||
|
||||
echo 'ENABLE_OPTIONS='$ENABLE_OPTIONS
|
||||
|
||||
./configure \
|
||||
--prefix=/opt/gfa/cafe/cpp/${CAFE_V} \
|
||||
--libdir=/opt/gfa/cafe/cpp/${CAFE_V}/lib/${EPICS_HOST_ARCH} \
|
||||
${ENABLE_OPTIONS} \
|
||||
--with-boost-inc=/opt/gfa/cafe/boost/boost_1_61_0/include \
|
||||
--with-epics7=${EPICS}/base-7.0.4.1 \
|
||||
--with-epics3=${EPICS}/base \
|
||||
--with-python37=/opt/gfa/python-3.7/latest \
|
||||
--with-python35=/opt/gfa/python-3.5/latest \
|
||||
--with-qt5=/opt/gfa/python-3.7/latest \
|
||||
--with-qt4=/opt/gfa/python-3.5/latest \
|
||||
--with-json=/opt/gfa/zmsglog/json/jsoncpp-src-0.6.0-rc2 \
|
||||
--with-zeromq=/opt/gfa/zmq/zeromq-4.2.3-gcc-6.3.0 \
|
||||
--with-curl=/opt/gfa/zmq/curl-7.55.1 \
|
||||
--with-lz4=/opt/gfa/zmq/lz4/lib
|
||||
|
||||
unset CAFE_EPICS_V_PATCH
|
||||
unset CAFE_EPICS_V_MINOR
|
||||
unset CAFE_EPICS_V_MAJOR
|
||||
|
||||
unset CAFE_HOST_FLAG_DARWIN
|
||||
|
||||
293
autogen_psi.sh
Normal file
293
autogen_psi.sh
Normal file
@@ -0,0 +1,293 @@
|
||||
### psi specific - select compiler
|
||||
#source <this_autogen_file> <facility> <target_language>
|
||||
#<facility = sls sls2 sf> default is sf
|
||||
#<target_language = cpp matlab python>
|
||||
module unload gcc
|
||||
module load gcc/7.3.0
|
||||
### psi specific - end
|
||||
|
||||
rm -f configure.ac
|
||||
ln -s configurePSI.ac configure.ac
|
||||
|
||||
rm -f ./aclocal.m4
|
||||
rm -rf ./autom4te.cache
|
||||
aclocal --force -I m4
|
||||
/opt/gfa/python-3.7/latest/bin/libtoolize --force --copy #select libtools 2.4.6
|
||||
autoconf --force #interprets configure.ac
|
||||
autoheader --force
|
||||
automake --force --add-missing --copy
|
||||
#autoreconf not wanted
|
||||
|
||||
#Check what the EPICS RELEASE IS from ${EPICS}/base
|
||||
#Used by ./configure
|
||||
#Assumes format ${EPICS}/base-3.14.12
|
||||
#source cafeVersion-gcc-7.3.0
|
||||
CAFE_V="cafe-1.14.5"
|
||||
#For later check of existence of HOST_ARCH for $EPICS/include/os/$HOST_ARCH
|
||||
#Assume Linux but check if Darwin
|
||||
CAFE_HOST_FLAG_DARWIN=$(echo ${EPICS_HOST_ARCH} | grep -c "Darwin")
|
||||
export CAFE_HOST_FLAG_DARWIN=$CAFE_HOST_FLAG_DARWIN
|
||||
|
||||
RETURN_ON_WRONG_INPUT=true
|
||||
RETURN_FLAG=false
|
||||
|
||||
EPICS_BASE=$(readlink ${EPICS}/base)
|
||||
#EB=$(readlink /afs/psi.ch/project/cafe/gitworkspace/CAFE/cpp/base)
|
||||
echo $EPICS_BASE
|
||||
if [ -z "$EPICS_BASE" ]
|
||||
then
|
||||
EPICS_BASE='base-7' #7.0 = 7+0 = 7 for major release
|
||||
fi
|
||||
|
||||
echo 'input' "$0" "$1" "$2"
|
||||
echo $EPICS_BASE
|
||||
|
||||
FACILITY=$(echo "$1" | tr '[:upper:]' '[:lower:]')
|
||||
CACLIENT=$(echo "$2" | tr '[:upper:]' '[:lower:]')
|
||||
|
||||
FACILITY_DEFAULT="sf"
|
||||
CACLIENT_DEFAULT="python"
|
||||
|
||||
FACILITY_TEMP=""
|
||||
CACLIENT_TEMP=""
|
||||
|
||||
echo 'input arg. facility/target' $FACILITY $CACLIENT
|
||||
|
||||
if [ -n "$FACILITY" ]
|
||||
then
|
||||
if [ "$FACILITY" = "matlab" ] || [ "$FACILITY" = "python" ] || \
|
||||
[ "$FACILITY" = "py310" ] || [ "$FACILITY" = "py38" ] || \
|
||||
[ "$FACILITY" = "py37" ] || [ "$FACILITY" = "py35" ] || \
|
||||
[ "$FACILITY" = "julia" ] || [ "$FACILITY" = "cpp" ] || \
|
||||
[ "$FACILITY" = "cc" ]
|
||||
then
|
||||
CACLIENT_TEMP=$FACILITY
|
||||
FACILITY_TEMP=$2
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -n "$CACLIENT" ]
|
||||
then
|
||||
if [ "$CACLIENT" = "sls" ] || [ "$CACLIENT" = "sls2" ] || \
|
||||
[ "$CACLIENT" = "sf" ] || [ "$CACLIENT" = "swissfel" ] || \
|
||||
[ "$CACLIENT" = "sfel" ] || [ "$CACLIENT" = "hipa" ]
|
||||
then
|
||||
if [ -z $FACILITY_TEMP ]
|
||||
then
|
||||
FACILITY_TEMP=$CACLIENT
|
||||
CACLIENT_TEMP=$1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
|
||||
if [ -z "$FACILITY" ]
|
||||
then
|
||||
FACILITY="sf"
|
||||
echo "FACILITY = " $FACILITY
|
||||
if [ -z $CACLIENT ]
|
||||
then
|
||||
CACLIENT=$CACLIENT_DEFAULT
|
||||
fi
|
||||
elif [ "$FACILITY" = "sls" ] || [ "$FACILITY" = "sls2" ] || \
|
||||
[ "$FACILITY" = "sf" ] || [ "$FACILITY" = "swissfel" ] || \
|
||||
[ "$FACILITY" = "sfel" ] || [ "$FACILITY" = "hipa" ]
|
||||
then
|
||||
echo "FACILITY = " $FACILITY
|
||||
elif [ -n "$FACILITY_TEMP" ]
|
||||
then
|
||||
if [ "$FACILITY_TEMP" = "sls" ] || [ "$FACILITY_TEMP" = "sls2" ] || \
|
||||
[ "$FACILITY_TEMP" = "sf" ] || [ "$FACILITY_TEMP" = "swissfel" ] || \
|
||||
[ "$FACILITY_TEMP" = "sfel" ] || [ "$FACILITY_TEMP" = "hipa" ]
|
||||
then
|
||||
|
||||
|
||||
FACILITY=$FACILITY_TEMP
|
||||
else
|
||||
if [ -n "$2" ]
|
||||
then
|
||||
echo "***UNRECOGNIZED INPUT FACILITY***" $FACILITY
|
||||
echo "***VALID VALUES ARE: sls sls2 sf hipa"
|
||||
RETURN_FLAG=true
|
||||
fi
|
||||
echo "***OTHERWISE THE DEFAULT FACILITY IS:" $FACILITY_DEFAULT
|
||||
FACILITY=$FACILITY_DEFAULT
|
||||
fi
|
||||
else
|
||||
echo "***UNRECOGNIZED INPUT FACILITY***" $FACILITY
|
||||
echo "***VALID VALUES ARE: sls sls2 sf hipa"
|
||||
RETURN_FLAG=true
|
||||
echo "***OTHERWISE THE DEFAULT FACILITY IS: " $FACILITY_DEFAULT
|
||||
FACILITY=$FACILITY_DEFAULT
|
||||
fi
|
||||
|
||||
if [ -n "$CACLIENT" ]
|
||||
then
|
||||
if [ "$CACLIENT" = "matlab" ] || [ "$CACLIENT" = "python" ] || \
|
||||
[ "$CACLIENT" = "py310" ] || [ "$CACLIENT" = "py38" ] || \
|
||||
[ "$CACLIENT" = "py37" ] || [ "$CACLIENT" = "py35" ] || \
|
||||
[ "$CACLIENT" = "julia" ] || [ "$CACLIENT" = "cpp" ] || \
|
||||
[ "$CACLIENT" = "cc" ]
|
||||
then
|
||||
echo "CA TARGET = " $CACLIENT
|
||||
else
|
||||
if [ -n "$CACLIENT_TEMP" ]
|
||||
then
|
||||
if [ "$CACLIENT_TEMP" = "matlab" ] || [ "$CACLIENT_TEMP" = "python" ] || \
|
||||
[ "$CACLIENT_TEMP" = "py310" ] || [ "$CACLIENT_TEMP" = "py38" ] || \
|
||||
[ "$CACLIENT_TEMP" = "py37" ] || [ "$CACLIENT_TEMP" = "py35" ] || \
|
||||
[ "$CACLIENT_TEMP" = "julia" ] || [ "$CACLIENT_TEMP" = "cpp" ] || \
|
||||
[ "$CACLIENT_TEMP" = "cc" ]
|
||||
then
|
||||
CACLIENT=$CACLIENT_TEMP
|
||||
else
|
||||
echo "***UNRECOGNIZED INPUT CA TARGET***" $CACLIENT
|
||||
echo "***VALID VALUES ARE: cpp matlab python"
|
||||
RETURN_FLAG=true
|
||||
echo "***OTHERWISE THE DEFAULT CA TARGET IS:" $CACLIENT_DEFAULT
|
||||
CACLIENT=$CACLIENT_DEFAULT
|
||||
fi
|
||||
else
|
||||
echo "***UNRECOGNIZED INPUT CA TARGET***" $CACLIENT
|
||||
echo "***VALID VALUES ARE: cpp matlab python"
|
||||
RETURN_FLAG=true
|
||||
echo "***OTHERWISE THE DEFAULT CA TARGET IS:" $CACLIENT_DEFAULT
|
||||
CACLIENT=$CACLIENT_DEFAULT
|
||||
fi
|
||||
fi
|
||||
else
|
||||
CACLIENT=$CACLIENT_DEFAULT
|
||||
fi
|
||||
|
||||
|
||||
|
||||
if [ $RETURN_ON_WRONG_INPUT = true ] ; then
|
||||
if [ $RETURN_FLAG = true ] ; then
|
||||
return 1 2>/dev/null
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "FACILITY SELECTED = " $FACILITY
|
||||
echo "CA TARGET SELECTED = " $CACLIENT
|
||||
|
||||
ENABLE_OPTIONS="--enable-boost-inc"
|
||||
|
||||
if [ "$FACILITY" = "sfel" ] || [ "$FACILITY" = "swissfel" ]
|
||||
then
|
||||
FACILITY="sf"
|
||||
fi
|
||||
|
||||
if [ "$CACLIENT" = "python" ] || [ "$CACLIENT" = "julia" ]
|
||||
then
|
||||
CACLIENT="py37"
|
||||
fi
|
||||
|
||||
|
||||
if [ "$FACILITY" = "sls2" ]
|
||||
then
|
||||
ENABLE_OPTIONS+=" --enable-epics7"
|
||||
CAFE_V+="-sls2"
|
||||
else
|
||||
ENABLE_OPTIONS+=" --enable-epics3"
|
||||
if [ "$FACILITY" = "sf" ] && [ "$CACLIENT" != "matlab" ]
|
||||
then
|
||||
CAFE_V+="-sf"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$CACLIENT" = "py35" ]
|
||||
then
|
||||
ENABLE_OPTIONS+=" --enable-python35"
|
||||
ENABLE_OPTIONS+=" --enable-qt4"
|
||||
CAFE_V+="-py35"
|
||||
elif [ "$CACLIENT" = "py37" ]
|
||||
then
|
||||
ENABLE_OPTIONS+=" --enable-python37"
|
||||
ENABLE_OPTIONS+=" --enable-qt5"
|
||||
CAFE_V+="-py37"
|
||||
elif [ "$CACLIENT" = "py38" ]
|
||||
then
|
||||
ENABLE_OPTIONS+=" --enable-python38"
|
||||
ENABLE_OPTIONS+=" --enable-qt5py38"
|
||||
CAFE_V+="-py38"
|
||||
elif [ "$CACLIENT" = "py310" ]
|
||||
then
|
||||
ENABLE_OPTIONS+=" --enable-python310"
|
||||
#ENABLE_OPTIONS+=" --enable-qt5py310"
|
||||
CAFE_V+="-py310"
|
||||
else
|
||||
ENABLE_OPTIONS+=" --enable-qt5"
|
||||
fi
|
||||
|
||||
if [ "$FACILITY" = "sf" ] && [ "$CACLIENT" != "matlab" ]
|
||||
then
|
||||
#rm -f src/PyCafe.cpp
|
||||
#ln -s PyCafe3.cpp src/PyCafe.cpp
|
||||
ENABLE_OPTIONS+=" --enable-json"
|
||||
ENABLE_OPTIONS+=" --enable-zeromq"
|
||||
ENABLE_OPTIONS+=" --enable-curl"
|
||||
ENABLE_OPTIONS+=" --enable-lz4"
|
||||
#else
|
||||
#rm -f src/PyCafe.cpp
|
||||
#ln -s PyCafe_sls.cpp src/PyCafe.cpp
|
||||
fi
|
||||
|
||||
CAFE_V+="-gcc-"$GCC_VERSION
|
||||
|
||||
echo "$CAFE_V"
|
||||
|
||||
#echo 'EPICS BASE IS='$EPICS_BASE
|
||||
#echo 'EPICS BASE DIR='${EPICS}/base-7.0.4.1
|
||||
|
||||
EB1=$(echo $EPICS_BASE | sed -e "s/[a-zA-Z]*-//g")
|
||||
EBMAJ=$(echo $EB1 | sed -e "s/[[:punct:]].*//g")
|
||||
EBMIN1=$(echo $EB1 | sed -e "s/^[[:digit:]]*[[:punct:]]//g")
|
||||
EBMIN=$(echo $EBMIN1 | sed -e "s/[[:punct:]][[:digit:]]*//g")
|
||||
EBPAT=$(echo $EB1 | sed -e "s/[[:digit:]]*[[:punct:]]//g")
|
||||
echo EPICS_MAJOR=$EBMAJ
|
||||
echo EPICS_MINOR=$EBMIN
|
||||
echo EPICS_PATCH=$EBPAT
|
||||
#echo $EBMIN1
|
||||
|
||||
export CAFE_EPICS_V_MAJOR=$EBMAJ
|
||||
export CAFE_EPICS_V_MINOR=$EBMIN
|
||||
export CAFE_EPICS_V_PATCH=$EBPAT
|
||||
|
||||
#ENABLE_OPTIONS+=" --enable-qt5"
|
||||
##ENABLE_OPTIONS+=" --enable-qt4"
|
||||
#ENABLE_OPTIONS+=" --enable-python37"
|
||||
##ENABLE_OPTIONS+=" --enable-python35"
|
||||
#ENABLE_OPTIONS+=" --enable-json"
|
||||
#ENABLE_OPTIONS+=" --enable-zeromq"
|
||||
#ENABLE_OPTIONS+=" --enable-curl"
|
||||
#ENABLE_OPTIONS+=" --enable-lz4"
|
||||
|
||||
echo 'ENABLE_OPTIONS='$ENABLE_OPTIONS
|
||||
|
||||
./configure \
|
||||
--prefix=/opt/gfa/cafe/cpp/${CAFE_V} \
|
||||
--libdir=/opt/gfa/cafe/cpp/${CAFE_V}/lib/${EPICS_HOST_ARCH} \
|
||||
${ENABLE_OPTIONS} \
|
||||
--with-boost-inc=/opt/gfa/cafe/boost/boost_1_61_0/include \
|
||||
--with-epics3=${EPICS}/base \
|
||||
--with-python310=/ioc/python/latest \
|
||||
--with-python38=/opt/gfa/python-3.8/latest \
|
||||
--with-python37=/opt/gfa/python-3.7/latest \
|
||||
--with-python35=/opt/gfa/python-3.5/latest \
|
||||
--with-qt5py310=/ioc/python/latest \
|
||||
--with-qt5py38=/opt/gfa/python-3.8/latest \
|
||||
--with-qt5=/opt/gfa/python-3.7/latest \
|
||||
--with-qt4=/opt/gfa/python-3.5/latest \
|
||||
--with-json=/opt/gfa/zmq/json/jsoncpp-src-0.6.0-rc2 \
|
||||
--with-zeromq=/opt/gfa/zmq/zeromq-4.2.3-gcc-6.3.0 \
|
||||
--with-curl=/opt/gfa/zmq/curl-7.55.1 \
|
||||
--with-lz4=/opt/gfa/zmq/lz4/lib \
|
||||
--with-epics7=${EPICS}/base-7.0.6
|
||||
unset CAFE_EPICS_V_PATCH
|
||||
unset CAFE_EPICS_V_MINOR
|
||||
unset CAFE_EPICS_V_MAJOR
|
||||
|
||||
unset CAFE_HOST_FLAG_DARWIN
|
||||
|
||||
286
autogen_psi.sh-
Normal file
286
autogen_psi.sh-
Normal file
@@ -0,0 +1,286 @@
|
||||
### psi specific - select compiler
|
||||
#source <this_autogen_file> <facility> <target_language>
|
||||
#<facility = sls sls2 sf> default is sf
|
||||
#<target_language = cpp matlab python>
|
||||
module unload gcc
|
||||
module load gcc/9.4.0
|
||||
### psi specific - end
|
||||
|
||||
rm -f configure.ac
|
||||
ln -s configurePSI.ac configure.ac
|
||||
|
||||
rm -f ./aclocal.m4
|
||||
rm -rf ./autom4te.cache
|
||||
aclocal --force -I m4
|
||||
/opt/gfa/python-3.7/latest/bin/libtoolize --force --copy #select libtools 2.4.6
|
||||
autoconf --force #interprets configure.ac
|
||||
autoheader --force
|
||||
automake --force --add-missing --copy
|
||||
#autoreconf not wanted
|
||||
|
||||
#Check what the EPICS RELEASE IS from ${EPICS}/base
|
||||
#Used by ./configure
|
||||
#Assumes format ${EPICS}/base-3.14.12
|
||||
#source cafeVersion-gcc-7.3.0
|
||||
CAFE_V="cafe-1.14.4"
|
||||
#For later check of existence of HOST_ARCH for $EPICS/include/os/$HOST_ARCH
|
||||
#Assume Linux but check if Darwin
|
||||
CAFE_HOST_FLAG_DARWIN=$(echo ${EPICS_HOST_ARCH} | grep -c "Darwin")
|
||||
export CAFE_HOST_FLAG_DARWIN=$CAFE_HOST_FLAG_DARWIN
|
||||
|
||||
RETURN_ON_WRONG_INPUT=true
|
||||
RETURN_FLAG=false
|
||||
|
||||
EPICS_BASE=$(readlink ${EPICS}/base)
|
||||
#EB=$(readlink /afs/psi.ch/project/cafe/gitworkspace/CAFE/cpp/base)
|
||||
echo $EPICS_BASE
|
||||
if [ -z "$EPICS_BASE" ]
|
||||
then
|
||||
EPICS_BASE='base-7' #7.0 = 7+0 = 7 for major release
|
||||
fi
|
||||
|
||||
echo 'input' "$0" "$1" "$2"
|
||||
echo $EPICS_BASE
|
||||
|
||||
FACILITY=$(echo "$1" | tr '[:upper:]' '[:lower:]')
|
||||
CACLIENT=$(echo "$2" | tr '[:upper:]' '[:lower:]')
|
||||
|
||||
FACILITY_DEFAULT="sf"
|
||||
CACLIENT_DEFAULT="python"
|
||||
|
||||
FACILITY_TEMP=""
|
||||
CACLIENT_TEMP=""
|
||||
|
||||
echo 'input arg. facility/target' $FACILITY $CACLIENT
|
||||
|
||||
if [ -n "$FACILITY" ]
|
||||
then
|
||||
if [ "$FACILITY" = "matlab" ] || [ "$FACILITY" = "python" ] || \
|
||||
[ "$FACILITY" = "py38" ] ||
|
||||
[ "$FACILITY" = "py37" ] || [ "$FACILITY" = "py35" ] || \
|
||||
[ "$FACILITY" = "julia" ] || [ "$FACILITY" = "cpp" ] || \
|
||||
[ "$FACILITY" = "cc" ]
|
||||
then
|
||||
CACLIENT_TEMP=$FACILITY
|
||||
FACILITY_TEMP=$2
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -n "$CACLIENT" ]
|
||||
then
|
||||
if [ "$CACLIENT" = "sls" ] || [ "$CACLIENT" = "sls2" ] || \
|
||||
[ "$CACLIENT" = "sf" ] || [ "$CACLIENT" = "swissfel" ] || \
|
||||
[ "$CACLIENT" = "sfel" ] || [ "$CACLIENT" = "hipa" ]
|
||||
then
|
||||
if [ -z $FACILITY_TEMP ]
|
||||
then
|
||||
FACILITY_TEMP=$CACLIENT
|
||||
CACLIENT_TEMP=$1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
|
||||
if [ -z "$FACILITY" ]
|
||||
then
|
||||
FACILITY="sf"
|
||||
echo "FACILITY = " $FACILITY
|
||||
if [ -z $CACLIENT ]
|
||||
then
|
||||
CACLIENT=$CACLIENT_DEFAULT
|
||||
fi
|
||||
elif [ "$FACILITY" = "sls" ] || [ "$FACILITY" = "sls2" ] || \
|
||||
[ "$FACILITY" = "sf" ] || [ "$FACILITY" = "swissfel" ] || \
|
||||
[ "$FACILITY" = "sfel" ] || [ "$FACILITY" = "hipa" ]
|
||||
then
|
||||
echo "FACILITY = " $FACILITY
|
||||
elif [ -n "$FACILITY_TEMP" ]
|
||||
then
|
||||
if [ "$FACILITY_TEMP" = "sls" ] || [ "$FACILITY_TEMP" = "sls2" ] || \
|
||||
[ "$FACILITY_TEMP" = "sf" ] || [ "$FACILITY_TEMP" = "swissfel" ] || \
|
||||
[ "$FACILITY_TEMP" = "sfel" ] || [ "$FACILITY_TEMP" = "hipa" ]
|
||||
then
|
||||
|
||||
|
||||
FACILITY=$FACILITY_TEMP
|
||||
else
|
||||
if [ -n "$2" ]
|
||||
then
|
||||
echo "***UNRECOGNIZED INPUT FACILITY***" $FACILITY
|
||||
echo "***VALID VALUES ARE: sls sls2 sf hipa"
|
||||
RETURN_FLAG=true
|
||||
fi
|
||||
echo "***OTHERWISE THE DEFAULT FACILITY IS:" $FACILITY_DEFAULT
|
||||
FACILITY=$FACILITY_DEFAULT
|
||||
fi
|
||||
else
|
||||
echo "***UNRECOGNIZED INPUT FACILITY***" $FACILITY
|
||||
echo "***VALID VALUES ARE: sls sls2 sf hipa"
|
||||
RETURN_FLAG=true
|
||||
echo "***OTHERWISE THE DEFAULT FACILITY IS: " $FACILITY_DEFAULT
|
||||
FACILITY=$FACILITY_DEFAULT
|
||||
fi
|
||||
|
||||
if [ -n "$CACLIENT" ]
|
||||
then
|
||||
if [ "$CACLIENT" = "matlab" ] || [ "$CACLIENT" = "python" ] || \
|
||||
[ "$CACLIENT" = "py38" ] || \
|
||||
[ "$CACLIENT" = "py37" ] || [ "$CACLIENT" = "py35" ] || \
|
||||
[ "$CACLIENT" = "julia" ] || [ "$CACLIENT" = "cpp" ] || \
|
||||
[ "$CACLIENT" = "cc" ]
|
||||
then
|
||||
echo "CA TARGET = " $CACLIENT
|
||||
else
|
||||
if [ -n "$CACLIENT_TEMP" ]
|
||||
then
|
||||
if [ "$CACLIENT_TEMP" = "matlab" ] || [ "$CACLIENT_TEMP" = "python" ] || \
|
||||
[ "$CACLIENT_TEMP" = "py38" ] || \
|
||||
[ "$CACLIENT_TEMP" = "py37" ] || [ "$CACLIENT_TEMP" = "py35" ] || \
|
||||
[ "$CACLIENT_TEMP" = "julia" ] || [ "$CACLIENT_TEMP" = "cpp" ] || \
|
||||
[ "$CACLIENT_TEMP" = "cc" ]
|
||||
then
|
||||
CACLIENT=$CACLIENT_TEMP
|
||||
else
|
||||
echo "***UNRECOGNIZED INPUT CA TARGET***" $CACLIENT
|
||||
echo "***VALID VALUES ARE: cpp matlab python"
|
||||
RETURN_FLAG=true
|
||||
echo "***OTHERWISE THE DEFAULT CA TARGET IS:" $CACLIENT_DEFAULT
|
||||
CACLIENT=$CACLIENT_DEFAULT
|
||||
fi
|
||||
else
|
||||
echo "***UNRECOGNIZED INPUT CA TARGET***" $CACLIENT
|
||||
echo "***VALID VALUES ARE: cpp matlab python"
|
||||
RETURN_FLAG=true
|
||||
echo "***OTHERWISE THE DEFAULT CA TARGET IS:" $CACLIENT_DEFAULT
|
||||
CACLIENT=$CACLIENT_DEFAULT
|
||||
fi
|
||||
fi
|
||||
else
|
||||
CACLIENT=$CACLIENT_DEFAULT
|
||||
fi
|
||||
|
||||
|
||||
|
||||
if [ $RETURN_ON_WRONG_INPUT = true ] ; then
|
||||
if [ $RETURN_FLAG = true ] ; then
|
||||
return 1 2>/dev/null
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "FACILITY SELECTED = " $FACILITY
|
||||
echo "CA TARGET SELECTED = " $CACLIENT
|
||||
|
||||
ENABLE_OPTIONS="--enable-boost-inc"
|
||||
|
||||
if [ "$FACILITY" = "sfel" ] || [ "$FACILITY" = "swissfel" ]
|
||||
then
|
||||
FACILITY="sf"
|
||||
fi
|
||||
|
||||
if [ "$CACLIENT" = "python" ] || [ "$CACLIENT" = "julia" ]
|
||||
then
|
||||
CACLIENT="py37"
|
||||
fi
|
||||
|
||||
|
||||
if [ "$FACILITY" = "sls2" ]
|
||||
then
|
||||
ENABLE_OPTIONS+=" --enable-epics7"
|
||||
CAFE_V+="-sls2"
|
||||
else
|
||||
ENABLE_OPTIONS+=" --enable-epics3"
|
||||
if [ "$FACILITY" = "sf" ] && [ "$CACLIENT" != "matlab" ]
|
||||
then
|
||||
CAFE_V+="-sf"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$CACLIENT" = "py35" ]
|
||||
then
|
||||
ENABLE_OPTIONS+=" --enable-python35"
|
||||
ENABLE_OPTIONS+=" --enable-qt4"
|
||||
CAFE_V+="-py35"
|
||||
elif [ "$CACLIENT" = "py37" ]
|
||||
then
|
||||
ENABLE_OPTIONS+=" --enable-python37"
|
||||
ENABLE_OPTIONS+=" --enable-qt5"
|
||||
CAFE_V+="-py37"
|
||||
elif [ "$CACLIENT" = "py38" ]
|
||||
then
|
||||
ENABLE_OPTIONS+=" --enable-python38"
|
||||
ENABLE_OPTIONS+=" --enable-qt5py38"
|
||||
CAFE_V+="-py38"
|
||||
else
|
||||
ENABLE_OPTIONS+=" --enable-qt5"
|
||||
fi
|
||||
|
||||
if [ "$FACILITY" = "sf" ] && [ "$CACLIENT" != "matlab" ]
|
||||
then
|
||||
#rm -f src/PyCafe.cpp
|
||||
#ln -s PyCafe3.cpp src/PyCafe.cpp
|
||||
ENABLE_OPTIONS+=" --enable-json"
|
||||
ENABLE_OPTIONS+=" --enable-zeromq"
|
||||
ENABLE_OPTIONS+=" --enable-curl"
|
||||
ENABLE_OPTIONS+=" --enable-lz4"
|
||||
#else
|
||||
#rm -f src/PyCafe.cpp
|
||||
#ln -s PyCafe_sls.cpp src/PyCafe.cpp
|
||||
fi
|
||||
|
||||
CAFE_V+="-gcc-"$GCC_VERSION
|
||||
|
||||
echo "$CAFE_V"
|
||||
|
||||
#echo 'EPICS BASE IS='$EPICS_BASE
|
||||
#echo 'EPICS BASE DIR='${EPICS}/base-7.0.4.1
|
||||
|
||||
EB1=$(echo $EPICS_BASE | sed -e "s/[a-zA-Z]*-//g")
|
||||
EBMAJ=$(echo $EB1 | sed -e "s/[[:punct:]].*//g")
|
||||
EBMIN1=$(echo $EB1 | sed -e "s/^[[:digit:]]*[[:punct:]]//g")
|
||||
EBMIN=$(echo $EBMIN1 | sed -e "s/[[:punct:]][[:digit:]]*//g")
|
||||
EBPAT=$(echo $EB1 | sed -e "s/[[:digit:]]*[[:punct:]]//g")
|
||||
echo EPICS_MAJOR=$EBMAJ
|
||||
echo EPICS_MINOR=$EBMIN
|
||||
echo EPICS_PATCH=$EBPAT
|
||||
#echo $EBMIN1
|
||||
|
||||
export CAFE_EPICS_V_MAJOR=$EBMAJ
|
||||
export CAFE_EPICS_V_MINOR=$EBMIN
|
||||
export CAFE_EPICS_V_PATCH=$EBPAT
|
||||
|
||||
#ENABLE_OPTIONS+=" --enable-qt5"
|
||||
##ENABLE_OPTIONS+=" --enable-qt4"
|
||||
#ENABLE_OPTIONS+=" --enable-python37"
|
||||
##ENABLE_OPTIONS+=" --enable-python35"
|
||||
#ENABLE_OPTIONS+=" --enable-json"
|
||||
#ENABLE_OPTIONS+=" --enable-zeromq"
|
||||
#ENABLE_OPTIONS+=" --enable-curl"
|
||||
#ENABLE_OPTIONS+=" --enable-lz4"
|
||||
|
||||
echo 'ENABLE_OPTIONS='$ENABLE_OPTIONS
|
||||
|
||||
./configure \
|
||||
--prefix=/opt/gfa/cafe/cpp/${CAFE_V} \
|
||||
--libdir=/opt/gfa/cafe/cpp/${CAFE_V}/lib/${EPICS_HOST_ARCH} \
|
||||
${ENABLE_OPTIONS} \
|
||||
--with-boost-inc=/opt/gfa/cafe/boost/boost_1_61_0/include \
|
||||
--with-epics3=${EPICS}/base \
|
||||
--with-python38=/opt/gfa/python-3.8/latest \
|
||||
--with-python37=/opt/gfa/python-3.7/latest \
|
||||
--with-python35=/opt/gfa/python-3.5/latest \
|
||||
--with-qt5py38=/opt/gfa/python-3.8/latest \
|
||||
--with-qt5=/opt/gfa/python-3.7/latest \
|
||||
--with-qt4=/opt/gfa/python-3.5/latest \
|
||||
--with-json=/opt/gfa/zmsglog/json/jsoncpp-src-0.6.0-rc2 \
|
||||
--with-zeromq=/opt/gfa/zmq/zeromq-4.2.3-gcc-6.3.0 \
|
||||
--with-curl=/opt/gfa/zmq/curl-7.55.1 \
|
||||
--with-lz4=/opt/gfa/zmq/lz4/lib \
|
||||
--with-epics7=${EPICS}/base-7.0.6
|
||||
unset CAFE_EPICS_V_PATCH
|
||||
unset CAFE_EPICS_V_MINOR
|
||||
unset CAFE_EPICS_V_MAJOR
|
||||
|
||||
unset CAFE_HOST_FLAG_DARWIN
|
||||
|
||||
@@ -1,46 +0,0 @@
|
||||
aclocal --force -I m4
|
||||
libtoolize --force --copy
|
||||
autoconf --force
|
||||
autoheader --force
|
||||
automake --force --add-missing --copy
|
||||
autoreconf
|
||||
|
||||
#Check what the EPICS RELEASE IS from ${EPICS}/base
|
||||
#Used by ./configure
|
||||
#Assumes format ${EPICS}/base-3.14.12
|
||||
|
||||
|
||||
EB=$(readlink ${EPICS}/base)
|
||||
echo 'EPICS BASE IS=' $EB
|
||||
EB1=$(echo $EB | sed -e "s/[a-zA-Z]*-//g")
|
||||
EBMAJ=$(echo $EB1 | sed -e "s/[[:punct:]].*//g")
|
||||
EBMIN1=$(echo $EB1 | sed -e "s/^[[:digit:]]*[[:punct:]]//g")
|
||||
EBMIN=$(echo $EBMIN1 | sed -e "s/[[:punct:]][[:digit:]]*//g")
|
||||
EBPAT=$(echo $EB1 | sed -e "s/[[:digit:]]*[[:punct:]]//g")
|
||||
echo EPICS_MAJOR=$EBMAJ
|
||||
echo EPICS_MINOR=$EBMIN
|
||||
echo EPICS_PATCH=$EBPAT
|
||||
|
||||
export CAFE_EPICS_V_MAJOR=$EBMAJ
|
||||
export CAFE_EPICS_V_MINOR=$EBMIN
|
||||
export CAFE_EPICS_V_PATCH=$EBPAT
|
||||
|
||||
CAFE_VERSION=cafe-1.8.0-gcc-6.3.0
|
||||
|
||||
./configure \
|
||||
--prefix=/opt/gfa/cafe/cpp/${CAFE_VERSION} \
|
||||
--libdir=/opt/gfa/cafe/cpp/${CAFE_VERSION}/lib \
|
||||
--enable-boost-inc --with-boost-inc=/opt/gfa/cafe/boost/boost_1_61_0/include \
|
||||
--enable-epics --with-epics=${EPICS}/base \
|
||||
--enable-qt4-lib --with-qt4-lib=/usr/lib64 \
|
||||
--enable-qt4-inc --with-qt4-inc=/usr/include
|
||||
# --enable-boost-lib --with-boost-lib=/opt/gfa/cafe/boost/boost_1_61_0/lib
|
||||
|
||||
unset CAFE_EPICS_V_MAJOR
|
||||
unset CAFE_EPICS_V_MINOR
|
||||
unset CAFE_EPICS_V_PATCH
|
||||
|
||||
cp include/config.h include/os/Linux/cafe/config.h
|
||||
|
||||
|
||||
|
||||
@@ -1,44 +0,0 @@
|
||||
aclocal --force -I m4
|
||||
libtoolize --force --copy
|
||||
autoconf --force
|
||||
autoheader --force
|
||||
automake --force --add-missing --copy
|
||||
autoreconf
|
||||
|
||||
#Check what the EPICS RELEASE IS from ${EPICS}/base
|
||||
#Used by ./configure
|
||||
#Assumes format ${EPICS}/base-3.14.12
|
||||
|
||||
|
||||
EB=$(readlink ${EPICS}/base)
|
||||
echo 'EPICS BASE IS=' $EB
|
||||
EB1=$(echo $EB | sed -e "s/[a-zA-Z]*-//g")
|
||||
EBMAJ=$(echo $EB1 | sed -e "s/[[:punct:]].*//g")
|
||||
EBMIN1=$(echo $EB1 | sed -e "s/^[[:digit:]]*[[:punct:]]//g")
|
||||
EBMIN=$(echo $EBMIN1 | sed -e "s/[[:punct:]][[:digit:]]*//g")
|
||||
EBPAT=$(echo $EB1 | sed -e "s/[[:digit:]]*[[:punct:]]//g")
|
||||
echo EPICS_MAJOR=$EBMAJ
|
||||
echo EPICS_MINOR=$EBMIN
|
||||
echo EPICS_PATCH=$EBPAT
|
||||
|
||||
export CAFE_EPICS_V_MAJOR=$EBMAJ
|
||||
export CAFE_EPICS_V_MINOR=$EBMIN
|
||||
export CAFE_EPICS_V_PATCH=$EBPAT
|
||||
|
||||
|
||||
CAFE_VERSION=cafe-noqt-1.8.0
|
||||
|
||||
|
||||
./configure \
|
||||
--prefix=/opt/gfa/cafe/cpp/${CAFE_VERSION} \
|
||||
--libdir=/opt/gfa/cafe/cpp/${CAFE_VERSION}/lib \
|
||||
--enable-boost-inc --with-boost-inc=/opt/gfa/cafe/boost/boost_1_61_0/include \
|
||||
--enable-epics --with-epics=${EPICS}/base
|
||||
|
||||
|
||||
|
||||
unset CAFE_EPICS_V_MAJOR
|
||||
unset CAFE_EPICS_V_MINOR
|
||||
unset CAFE_EPICS_V_PATCH
|
||||
|
||||
cp include/config.h include/os/Linux/cafe-noqt/config.h
|
||||
@@ -1,46 +0,0 @@
|
||||
source usePy3
|
||||
aclocal --force -I m4
|
||||
libtoolize --force --copy
|
||||
autoconf --force
|
||||
autoheader --force
|
||||
automake --force --add-missing --copy
|
||||
autoreconf
|
||||
|
||||
#Check what the EPICS RELEASE IS from ${EPICS}/base
|
||||
#Used by ./configure
|
||||
#Assumes format ${EPICS}/base-3.14.12
|
||||
|
||||
|
||||
EB=$(readlink ${EPICS}/base)
|
||||
echo 'EPICS BASE IS=' $EB
|
||||
EB1=$(echo $EB | sed -e "s/[a-zA-Z]*-//g")
|
||||
EBMAJ=$(echo $EB1 | sed -e "s/[[:punct:]].*//g")
|
||||
EBMIN1=$(echo $EB1 | sed -e "s/^[[:digit:]]*[[:punct:]]//g")
|
||||
EBMIN=$(echo $EBMIN1 | sed -e "s/[[:punct:]][[:digit:]]*//g")
|
||||
EBPAT=$(echo $EB1 | sed -e "s/[[:digit:]]*[[:punct:]]//g")
|
||||
echo EPICS_MAJOR=$EBMAJ
|
||||
echo EPICS_MINOR=$EBMIN
|
||||
echo EPICS_PATCH=$EBPAT
|
||||
|
||||
export CAFE_EPICS_V_MAJOR=$EBMAJ
|
||||
export CAFE_EPICS_V_MINOR=$EBMIN
|
||||
export CAFE_EPICS_V_PATCH=$EBPAT
|
||||
|
||||
#--enable-boost --with-boost=/afs/psi.ch/intranet/Controls/BD/deps/boost_1_57_0 \
|
||||
CYCAFE_VERSION=pycafe-1.8.0
|
||||
|
||||
./configure \
|
||||
--prefix=/opt/gfa/cafe/python/python-3.5/${CYCAFE_VERSION}/ \
|
||||
--libdir=/opt/gfa/cafe/python/python-3.5/${CYCAFE_VERSION}/lib \
|
||||
--enable-boost-inc --with-boost-inc=/opt/gfa/cafe/boost/boost_1_61_0/include \
|
||||
--enable-epics --with-epics=${EPICS}/base \
|
||||
--enable-qt4-lib --with-qt4-lib=/usr/lib64 \
|
||||
--enable-qt4-inc --with-qt4-inc=/usr/include \
|
||||
--enable-python-inc --with-python-inc=/opt/gfa/python-3.5/latest/include/python3.5m \
|
||||
--enable-python-lib --with-python-lib=/opt/gfa/python-3.5/latest/lib
|
||||
unset CAFE_EPICS_V_MAJOR
|
||||
unset CAFE_EPICS_V_MINOR
|
||||
unset CAFE_EPICS_V_PATCH
|
||||
|
||||
cp include/config.h include/os/Linux/pycafe35/config.h
|
||||
|
||||
@@ -1,45 +0,0 @@
|
||||
source usePy3
|
||||
aclocal --force -I m4
|
||||
libtoolize --force --copy
|
||||
autoconf --force
|
||||
autoheader --force
|
||||
automake --force --add-missing --copy
|
||||
autoreconf
|
||||
|
||||
#Check what the EPICS RELEASE IS from ${EPICS}/base
|
||||
#Used by ./configure
|
||||
#Assumes format ${EPICS}/base-3.14.12
|
||||
|
||||
|
||||
EB=$(readlink ${EPICS}/base)
|
||||
echo 'EPICS BASE IS=' $EB
|
||||
EB1=$(echo $EB | sed -e "s/[a-zA-Z]*-//g")
|
||||
EBMAJ=$(echo $EB1 | sed -e "s/[[:punct:]].*//g")
|
||||
EBMIN1=$(echo $EB1 | sed -e "s/^[[:digit:]]*[[:punct:]]//g")
|
||||
EBMIN=$(echo $EBMIN1 | sed -e "s/[[:punct:]][[:digit:]]*//g")
|
||||
EBPAT=$(echo $EB1 | sed -e "s/[[:digit:]]*[[:punct:]]//g")
|
||||
echo EPICS_MAJOR=$EBMAJ
|
||||
echo EPICS_MINOR=$EBMIN
|
||||
echo EPICS_PATCH=$EBPAT
|
||||
|
||||
export CAFE_EPICS_V_MAJOR=$EBMAJ
|
||||
export CAFE_EPICS_V_MINOR=$EBMIN
|
||||
export CAFE_EPICS_V_PATCH=$EBPAT
|
||||
|
||||
#--enable-boost --with-boost=/afs/psi.ch/intranet/Controls/BD/deps/boost_1_57_0 \
|
||||
CAFE_VERSION=cafe-1.8.0
|
||||
CYCAFE_VERSION=pycafe-noqt-1.8.0
|
||||
|
||||
./configure \
|
||||
--prefix=/opt/gfa/cafe/python/python-3.5/${CYCAFE_VERSION}/ \
|
||||
--libdir=/opt/gfa/cafe/python/python-3.5/${CYCAFE_VERSION}/lib \
|
||||
--enable-boost --with-boost=/opt/gfa/cafe/boost/boost_1_57_0 \
|
||||
--enable-epics --with-epics=${EPICS} \
|
||||
--enable-python-inc --with-python-inc=/opt/gfa/python-3.5/latest/include/python3.5m \
|
||||
--enable-python-lib --with-python-lib=/opt/gfa/python-3.5/latest/lib
|
||||
unset CAFE_EPICS_V_MAJOR
|
||||
unset CAFE_EPICS_V_MINOR
|
||||
unset CAFE_EPICS_V_PATCH
|
||||
|
||||
#--enable-qt4-lib --with-qt4-lib=/usr/lib64 \
|
||||
#--enable-qt4-inc --with-qt4-inc=/usr/include \
|
||||
307
autogen_sfbd.sh
Normal file
307
autogen_sfbd.sh
Normal file
@@ -0,0 +1,307 @@
|
||||
### psi specific - select compiler
|
||||
#source <this_autogen_file> <facility> <target_language>
|
||||
#<facility = sls sls2 sf> default is sf
|
||||
#<target_language = cpp matlab python>
|
||||
module unload gcc
|
||||
module load gcc/7.5.0 #7.5.0 for py38 7.3.0 py37
|
||||
### psi specific - end
|
||||
|
||||
rm -f configure.ac
|
||||
ln -s configurePSI.ac configure.ac
|
||||
|
||||
rm -f ./aclocal.m4
|
||||
rm -rf ./autom4te.cache
|
||||
aclocal --force -I m4
|
||||
/opt/gfa/python-3.7/latest/bin/libtoolize --force --copy #select libtools 2.4.6
|
||||
#libtoolize --force --copy
|
||||
autoconf --force #interprets configure.ac
|
||||
autoheader --force
|
||||
automake --force --add-missing --copy
|
||||
#autoreconf not wanted
|
||||
|
||||
#Check what the EPICS RELEASE IS from ${EPICS}/base
|
||||
#Used by ./configure
|
||||
#Assumes format ${EPICS}/base-3.14.12
|
||||
#source cafeVersion-gcc-7.3.0
|
||||
CAFE_V="cafe-1.19.0"
|
||||
#For later check of existence of HOST_ARCH for $EPICS/include/os/$HOST_ARCH
|
||||
#Assume Linux but check if Darwin
|
||||
CAFE_HOST_FLAG_DARWIN=$(echo ${EPICS_HOST_ARCH} | grep -c "Darwin")
|
||||
export CAFE_HOST_FLAG_DARWIN=$CAFE_HOST_FLAG_DARWIN
|
||||
|
||||
RETURN_ON_WRONG_INPUT=true
|
||||
RETURN_FLAG=false
|
||||
|
||||
EPICS_BASE=$(readlink ${EPICS_BASE}) #$(readlink ${EPICS}/base)
|
||||
#EB=$(readlink /afs/psi.ch/project/cafe/gitworkspace/CAFE/cpp/base)
|
||||
echo $EPICS_BASE
|
||||
if [ -z "$EPICS_BASE_VERSION" ]
|
||||
then
|
||||
EPICS_BASE='base-7.0.6' #7.0 = 7+0 = 7 for major release
|
||||
fi
|
||||
|
||||
echo 'input' "$0" "$1" "$2"
|
||||
echo $EPICS_BASE
|
||||
|
||||
FACILITY=$(echo "$1" | tr '[:upper:]' '[:lower:]')
|
||||
CACLIENT=$(echo "$2" | tr '[:upper:]' '[:lower:]')
|
||||
|
||||
FACILITY_DEFAULT="sf"
|
||||
CACLIENT_DEFAULT="python"
|
||||
|
||||
FACILITY_TEMP=""
|
||||
CACLIENT_TEMP=""
|
||||
|
||||
echo 'input arg. facility/target' $FACILITY $CACLIENT
|
||||
|
||||
if [ -n "$FACILITY" ]
|
||||
then
|
||||
if [ "$FACILITY" = "matlab" ] || [ "$FACILITY" = "python" ] || \
|
||||
[ "$FACILITY" = "py310" ] || [ "$FACILITY" = "py38" ] || \
|
||||
[ "$FACILITY" = "py37" ] || [ "$FACILITY" = "py35" ] || \
|
||||
[ "$FACILITY" = "julia" ] || [ "$FACILITY" = "cpp" ] || \
|
||||
[ "$FACILITY" = "cc" ] || [ "$FACILITY" = "py34" ]
|
||||
then
|
||||
CACLIENT_TEMP=$FACILITY
|
||||
FACILITY_TEMP=$2
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -n "$CACLIENT" ]
|
||||
then
|
||||
if [ "$CACLIENT" = "sls" ] || [ "$CACLIENT" = "sls2" ] || \
|
||||
[ "$CACLIENT" = "sf" ] || [ "$CACLIENT" = "swissfel" ] || \
|
||||
[ "$CACLIENT" = "sfel" ] || [ "$CACLIENT" = "hipa" ]
|
||||
then
|
||||
if [ -z $FACILITY_TEMP ]
|
||||
then
|
||||
FACILITY_TEMP=$CACLIENT
|
||||
CACLIENT_TEMP=$1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
|
||||
if [ -z "$FACILITY" ]
|
||||
then
|
||||
FACILITY="sf"
|
||||
echo "FACILITY = " $FACILITY
|
||||
if [ -z $CACLIENT ]
|
||||
then
|
||||
CACLIENT=$CACLIENT_DEFAULT
|
||||
fi
|
||||
elif [ "$FACILITY" = "sls" ] || [ "$FACILITY" = "sls2" ] || \
|
||||
[ "$FACILITY" = "sf" ] || [ "$FACILITY" = "swissfel" ] || \
|
||||
[ "$FACILITY" = "sfel" ] || [ "$FACILITY" = "hipa" ]
|
||||
then
|
||||
echo "FACILITY = " $FACILITY
|
||||
elif [ -n "$FACILITY_TEMP" ]
|
||||
then
|
||||
if [ "$FACILITY_TEMP" = "sls" ] || [ "$FACILITY_TEMP" = "sls2" ] || \
|
||||
[ "$FACILITY_TEMP" = "sf" ] || [ "$FACILITY_TEMP" = "swissfel" ] || \
|
||||
[ "$FACILITY_TEMP" = "sfel" ] || [ "$FACILITY_TEMP" = "hipa" ]
|
||||
then
|
||||
|
||||
|
||||
FACILITY=$FACILITY_TEMP
|
||||
else
|
||||
if [ -n "$2" ]
|
||||
then
|
||||
echo "***UNRECOGNIZED INPUT FACILITY***" $FACILITY
|
||||
echo "***VALID VALUES ARE: sls sls2 sf hipa"
|
||||
RETURN_FLAG=true
|
||||
fi
|
||||
echo "***OTHERWISE THE DEFAULT FACILITY IS:" $FACILITY_DEFAULT
|
||||
FACILITY=$FACILITY_DEFAULT
|
||||
fi
|
||||
else
|
||||
echo "***UNRECOGNIZED INPUT FACILITY***" $FACILITY
|
||||
echo "***VALID VALUES ARE: sls sls2 sf hipa"
|
||||
RETURN_FLAG=true
|
||||
echo "***OTHERWISE THE DEFAULT FACILITY IS: " $FACILITY_DEFAULT
|
||||
FACILITY=$FACILITY_DEFAULT
|
||||
fi
|
||||
|
||||
if [ -n "$CACLIENT" ]
|
||||
then
|
||||
if [ "$CACLIENT" = "matlab" ] || [ "$CACLIENT" = "python" ] || \
|
||||
[ "$CACLIENT" = "py310" ] || [ "$CACLIENT" = "py38" ] || \
|
||||
[ "$CACLIENT" = "py37" ] || [ "$CACLIENT" = "py35" ] || \
|
||||
[ "$CACLIENT" = "julia" ] || [ "$CACLIENT" = "cpp" ] || \
|
||||
[ "$CACLIENT" = "cc" ] || [ "$CACLIENT" = "py34" ]
|
||||
then
|
||||
echo "CA TARGET = " $CACLIENT
|
||||
else
|
||||
if [ -n "$CACLIENT_TEMP" ]
|
||||
then
|
||||
if [ "$CACLIENT_TEMP" = "matlab" ] || [ "$CACLIENT_TEMP" = "python" ] || \
|
||||
[ "$CACLIENT_TEMP" = "py310" ] || [ "$CACLIENT_TEMP" = "py38" ] || \
|
||||
[ "$CACLIENT_TEMP" = "py37" ] || [ "$CACLIENT_TEMP" = "py35" ] || \
|
||||
[ "$CACLIENT_TEMP" = "julia" ] || [ "$CACLIENT_TEMP" = "cpp" ] || \
|
||||
[ "$CACLIENT_TEMP" = "cc" ] || [ "$CACLIENT_TEMP" = "py34" ]
|
||||
then
|
||||
CACLIENT=$CACLIENT_TEMP
|
||||
else
|
||||
echo "***UNRECOGNIZED INPUT CA TARGET***" $CACLIENT
|
||||
echo "***VALID VALUES ARE: cpp matlab python"
|
||||
RETURN_FLAG=true
|
||||
echo "***OTHERWISE THE DEFAULT CA TARGET IS:" $CACLIENT_DEFAULT
|
||||
CACLIENT=$CACLIENT_DEFAULT
|
||||
fi
|
||||
else
|
||||
echo "***UNRECOGNIZED INPUT CA TARGET***" $CACLIENT
|
||||
echo "***VALID VALUES ARE: cpp matlab python"
|
||||
RETURN_FLAG=true
|
||||
echo "***OTHERWISE THE DEFAULT CA TARGET IS:" $CACLIENT_DEFAULT
|
||||
CACLIENT=$CACLIENT_DEFAULT
|
||||
fi
|
||||
fi
|
||||
else
|
||||
CACLIENT=$CACLIENT_DEFAULT
|
||||
fi
|
||||
|
||||
|
||||
|
||||
if [ $RETURN_ON_WRONG_INPUT = true ] ; then
|
||||
if [ $RETURN_FLAG = true ] ; then
|
||||
return 1 2>/dev/null
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "FACILITY SELECTED = " $FACILITY
|
||||
echo "CA TARGET SELECTED = " $CACLIENT
|
||||
|
||||
ENABLE_OPTIONS="--enable-boost-inc"
|
||||
|
||||
if [ "$FACILITY" = "sfel" ] || [ "$FACILITY" = "swissfel" ]
|
||||
then
|
||||
FACILITY="sf"
|
||||
fi
|
||||
|
||||
if [ "$CACLIENT" = "python" ] || [ "$CACLIENT" = "julia" ]
|
||||
then
|
||||
CACLIENT="py37"
|
||||
fi
|
||||
|
||||
|
||||
if [ "$FACILITY" = "sls2" ]
|
||||
then
|
||||
ENABLE_OPTIONS+=" --enable-epics7"
|
||||
#CAFE_V+="-sls2"
|
||||
else
|
||||
ENABLE_OPTIONS+=" --enable-epics3"
|
||||
if [ "$FACILITY" = "sf" ] && [ "$CACLIENT" != "matlab" ]
|
||||
then
|
||||
CAFE_V+="-sf"
|
||||
elif [ "$FACILITY" = "sls" ] && [ "$CACLIENT" != "matlab" ]
|
||||
then
|
||||
CAFE_V+="-epics3"
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
|
||||
if [ "$CACLIENT" = "py34" ]
|
||||
then
|
||||
ENABLE_OPTIONS+=" --enable-python34"
|
||||
ENABLE_OPTIONS+=" --enable-qt4py34"
|
||||
CAFE_V+="-py34"
|
||||
elif [ "$CACLIENT" = "py35" ]
|
||||
then
|
||||
ENABLE_OPTIONS+=" --enable-python35"
|
||||
ENABLE_OPTIONS+=" --enable-qt4"
|
||||
CAFE_V+="-py35"
|
||||
elif [ "$CACLIENT" = "py37" ]
|
||||
then
|
||||
ENABLE_OPTIONS+=" --enable-python37"
|
||||
ENABLE_OPTIONS+=" --enable-qt5"
|
||||
CAFE_V+="-py37"
|
||||
elif [ "$CACLIENT" = "py38" ]
|
||||
then
|
||||
ENABLE_OPTIONS+=" --enable-python38"
|
||||
ENABLE_OPTIONS+=" --enable-qt5py38"
|
||||
CAFE_V+="-py38"
|
||||
elif [ "$CACLIENT" = "py310" ]
|
||||
then
|
||||
ENABLE_OPTIONS+=" --enable-python310"
|
||||
#ENABLE_OPTIONS+=" --enable-qt5py310"
|
||||
CAFE_V+="-py310"
|
||||
else
|
||||
ENABLE_OPTIONS+=" --enable-qt5"
|
||||
fi
|
||||
|
||||
if [ "$FACILITY" = "sf" ] && [ "$CACLIENT" != "matlab" ]
|
||||
then
|
||||
#rm -f src/PyCafe.cpp
|
||||
#ln -s PyCafe3.cpp src/PyCafe.cpp
|
||||
ENABLE_OPTIONS+=" --enable-json"
|
||||
ENABLE_OPTIONS+=" --enable-zeromq"
|
||||
ENABLE_OPTIONS+=" --enable-curl"
|
||||
ENABLE_OPTIONS+=" --enable-lz4"
|
||||
#else
|
||||
#rm -f src/PyCafe.cpp
|
||||
#ln -s PyCafe_sls.cpp src/PyCafe.cpp
|
||||
fi
|
||||
|
||||
CAFE_V+="-gcc-"$GCC_VERSION
|
||||
|
||||
echo "$CAFE_V"
|
||||
|
||||
echo 'EPICS BASE IS='$EPICS_BASE
|
||||
#echo 'EPICS BASE DIR='${EPICS}/base-7.0.4.1
|
||||
|
||||
EB1=$(echo $EPICS_BASE | sed -e "s/[a-zA-Z]*-//g")
|
||||
EBMAJ=$(echo $EB1 | sed -e "s/[[:punct:]].*//g")
|
||||
EBMIN1=$(echo $EB1 | sed -e "s/^[[:digit:]]*[[:punct:]]//g")
|
||||
EBMIN=$(echo $EBMIN1 | sed -e "s/[[:punct:]][[:digit:]]*//g")
|
||||
EBPAT=$(echo $EB1 | sed -e "s/[[:digit:]]*[[:punct:]]//g")
|
||||
echo EPICS_MAJOR=$EBMAJ
|
||||
echo EPICS_MINOR=$EBMIN
|
||||
echo EPICS_PATCH=$EBPAT
|
||||
#echo $EBMIN1
|
||||
|
||||
export CAFE_EPICS_V_MAJOR=$EBMAJ
|
||||
export CAFE_EPICS_V_MINOR=$EBMIN
|
||||
export CAFE_EPICS_V_PATCH=$EBPAT
|
||||
|
||||
#ENABLE_OPTIONS+=" --enable-qt5"
|
||||
##ENABLE_OPTIONS+=" --enable-qt4"
|
||||
#ENABLE_OPTIONS+=" --enable-python37"
|
||||
##ENABLE_OPTIONS+=" --enable-python35"
|
||||
#ENABLE_OPTIONS+=" --enable-json"
|
||||
#ENABLE_OPTIONS+=" --enable-zeromq"
|
||||
#ENABLE_OPTIONS+=" --enable-curl"
|
||||
#ENABLE_OPTIONS+=" --enable-lz4"
|
||||
|
||||
echo 'ENABLE_OPTIONS============> '$ENABLE_OPTIONS
|
||||
|
||||
|
||||
./configure \
|
||||
--prefix=/opt/gfa/cafe/cpp/${CAFE_V} \
|
||||
--libdir=/opt/gfa/cafe/cpp/${CAFE_V}/lib/${EPICS_HOST_ARCH} \
|
||||
${ENABLE_OPTIONS} \
|
||||
--with-boost-inc=/opt/gfa/cafe/boost/boost_1_61_0/include \
|
||||
--with-epics3=${EPICS}/base \
|
||||
--with-python310=/ioc/python/latest \
|
||||
--with-python38=/opt/gfa/python-3.8/latest \
|
||||
--with-python37=/opt/gfa/python-3.7/latest \
|
||||
--with-python35=/opt/gfa/python-3.5/latest \
|
||||
--with-python34=/opt/psi/Programming/psi-python34/2.1.0 \
|
||||
--with-qt5py310=/ioc/python/latest \
|
||||
--with-qt5py38=/opt/gfa/python-3.8/latest \
|
||||
--with-qt5=/opt/gfa/python-3.7/latest \
|
||||
--with-qt4=/opt/gfa/python-3.5/latest \
|
||||
--with-qt4py34=/opt/psi/Programming/psi-python34/2.1.0 \
|
||||
--with-json=/sf/bd/deps/zmq/json/jsoncpp-src-0.6.0-rc2 \
|
||||
--with-zeromq=/sf/bd/deps/zmq/zeromq-4.2.3-gcc-6.3.0 \
|
||||
--with-curl=/sf/bd/deps/zmq/curl-7.55.1 \
|
||||
--with-lz4=/sf/bd/deps/zmq/lz4/lib \
|
||||
--with-epics7=/usr/local/epics/base-7.0.6
|
||||
unset CAFE_EPICS_V_PATCH
|
||||
unset CAFE_EPICS_V_MINOR
|
||||
unset CAFE_EPICS_V_MAJOR
|
||||
|
||||
unset CAFE_HOST_FLAG_DARWIN
|
||||
|
||||
306
autogen_sfbd.sh-
Normal file
306
autogen_sfbd.sh-
Normal file
@@ -0,0 +1,306 @@
|
||||
### psi specific - select compiler
|
||||
#source <this_autogen_file> <facility> <target_language>
|
||||
#<facility = sls sls2 sf> default is sf
|
||||
#<target_language = cpp matlab python>
|
||||
module unload gcc
|
||||
module load gcc/7.3.0
|
||||
### psi specific - end
|
||||
|
||||
rm -f configure.ac
|
||||
ln -s configurePSI.ac configure.ac
|
||||
|
||||
rm -f ./aclocal.m4
|
||||
rm -rf ./autom4te.cache
|
||||
aclocal --force -I m4
|
||||
/opt/gfa/python-3.7/latest/bin/libtoolize --force --copy #select libtools 2.4.6
|
||||
#libtoolize --force --copy
|
||||
autoconf --force #interprets configure.ac
|
||||
autoheader --force
|
||||
automake --force --add-missing --copy
|
||||
#autoreconf not wanted
|
||||
|
||||
#Check what the EPICS RELEASE IS from ${EPICS}/base
|
||||
#Used by ./configure
|
||||
#Assumes format ${EPICS}/base-3.14.12
|
||||
#source cafeVersion-gcc-7.3.0
|
||||
CAFE_V="cafe-1.15.1"
|
||||
#For later check of existence of HOST_ARCH for $EPICS/include/os/$HOST_ARCH
|
||||
#Assume Linux but check if Darwin
|
||||
CAFE_HOST_FLAG_DARWIN=$(echo ${EPICS_HOST_ARCH} | grep -c "Darwin")
|
||||
export CAFE_HOST_FLAG_DARWIN=$CAFE_HOST_FLAG_DARWIN
|
||||
|
||||
RETURN_ON_WRONG_INPUT=true
|
||||
RETURN_FLAG=false
|
||||
|
||||
EPICS_BASE=$(readlink ${EPICS}/base)
|
||||
#EB=$(readlink /afs/psi.ch/project/cafe/gitworkspace/CAFE/cpp/base)
|
||||
echo $EPICS_BASE
|
||||
if [ -z "$EPICS_BASE" ]
|
||||
then
|
||||
EPICS_BASE='base-7' #7.0 = 7+0 = 7 for major release
|
||||
fi
|
||||
|
||||
echo 'input' "$0" "$1" "$2"
|
||||
echo $EPICS_BASE
|
||||
|
||||
FACILITY=$(echo "$1" | tr '[:upper:]' '[:lower:]')
|
||||
CACLIENT=$(echo "$2" | tr '[:upper:]' '[:lower:]')
|
||||
|
||||
FACILITY_DEFAULT="sf"
|
||||
CACLIENT_DEFAULT="python"
|
||||
|
||||
FACILITY_TEMP=""
|
||||
CACLIENT_TEMP=""
|
||||
|
||||
echo 'input arg. facility/target' $FACILITY $CACLIENT
|
||||
|
||||
if [ -n "$FACILITY" ]
|
||||
then
|
||||
if [ "$FACILITY" = "matlab" ] || [ "$FACILITY" = "python" ] || \
|
||||
[ "$FACILITY" = "py310" ] || [ "$FACILITY" = "py38" ] || \
|
||||
[ "$FACILITY" = "py37" ] || [ "$FACILITY" = "py35" ] || \
|
||||
[ "$FACILITY" = "julia" ] || [ "$FACILITY" = "cpp" ] || \
|
||||
[ "$FACILITY" = "cc" ] || [ "$FACILITY" = "py34" ]
|
||||
then
|
||||
CACLIENT_TEMP=$FACILITY
|
||||
FACILITY_TEMP=$2
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -n "$CACLIENT" ]
|
||||
then
|
||||
if [ "$CACLIENT" = "sls" ] || [ "$CACLIENT" = "sls2" ] || \
|
||||
[ "$CACLIENT" = "sf" ] || [ "$CACLIENT" = "swissfel" ] || \
|
||||
[ "$CACLIENT" = "sfel" ] || [ "$CACLIENT" = "hipa" ]
|
||||
then
|
||||
if [ -z $FACILITY_TEMP ]
|
||||
then
|
||||
FACILITY_TEMP=$CACLIENT
|
||||
CACLIENT_TEMP=$1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
|
||||
if [ -z "$FACILITY" ]
|
||||
then
|
||||
FACILITY="sf"
|
||||
echo "FACILITY = " $FACILITY
|
||||
if [ -z $CACLIENT ]
|
||||
then
|
||||
CACLIENT=$CACLIENT_DEFAULT
|
||||
fi
|
||||
elif [ "$FACILITY" = "sls" ] || [ "$FACILITY" = "sls2" ] || \
|
||||
[ "$FACILITY" = "sf" ] || [ "$FACILITY" = "swissfel" ] || \
|
||||
[ "$FACILITY" = "sfel" ] || [ "$FACILITY" = "hipa" ]
|
||||
then
|
||||
echo "FACILITY = " $FACILITY
|
||||
elif [ -n "$FACILITY_TEMP" ]
|
||||
then
|
||||
if [ "$FACILITY_TEMP" = "sls" ] || [ "$FACILITY_TEMP" = "sls2" ] || \
|
||||
[ "$FACILITY_TEMP" = "sf" ] || [ "$FACILITY_TEMP" = "swissfel" ] || \
|
||||
[ "$FACILITY_TEMP" = "sfel" ] || [ "$FACILITY_TEMP" = "hipa" ]
|
||||
then
|
||||
|
||||
|
||||
FACILITY=$FACILITY_TEMP
|
||||
else
|
||||
if [ -n "$2" ]
|
||||
then
|
||||
echo "***UNRECOGNIZED INPUT FACILITY***" $FACILITY
|
||||
echo "***VALID VALUES ARE: sls sls2 sf hipa"
|
||||
RETURN_FLAG=true
|
||||
fi
|
||||
echo "***OTHERWISE THE DEFAULT FACILITY IS:" $FACILITY_DEFAULT
|
||||
FACILITY=$FACILITY_DEFAULT
|
||||
fi
|
||||
else
|
||||
echo "***UNRECOGNIZED INPUT FACILITY***" $FACILITY
|
||||
echo "***VALID VALUES ARE: sls sls2 sf hipa"
|
||||
RETURN_FLAG=true
|
||||
echo "***OTHERWISE THE DEFAULT FACILITY IS: " $FACILITY_DEFAULT
|
||||
FACILITY=$FACILITY_DEFAULT
|
||||
fi
|
||||
|
||||
if [ -n "$CACLIENT" ]
|
||||
then
|
||||
if [ "$CACLIENT" = "matlab" ] || [ "$CACLIENT" = "python" ] || \
|
||||
[ "$CACLIENT" = "py310" ] || [ "$CACLIENT" = "py38" ] || \
|
||||
[ "$CACLIENT" = "py37" ] || [ "$CACLIENT" = "py35" ] || \
|
||||
[ "$CACLIENT" = "julia" ] || [ "$CACLIENT" = "cpp" ] || \
|
||||
[ "$CACLIENT" = "cc" ] || [ "$CACLIENT" = "py34" ]
|
||||
then
|
||||
echo "CA TARGET = " $CACLIENT
|
||||
else
|
||||
if [ -n "$CACLIENT_TEMP" ]
|
||||
then
|
||||
if [ "$CACLIENT_TEMP" = "matlab" ] || [ "$CACLIENT_TEMP" = "python" ] || \
|
||||
[ "$CACLIENT_TEMP" = "py310" ] || [ "$CACLIENT_TEMP" = "py38" ] || \
|
||||
[ "$CACLIENT_TEMP" = "py37" ] || [ "$CACLIENT_TEMP" = "py35" ] || \
|
||||
[ "$CACLIENT_TEMP" = "julia" ] || [ "$CACLIENT_TEMP" = "cpp" ] || \
|
||||
[ "$CACLIENT_TEMP" = "cc" ] || [ "$CACLIENT_TEMP" = "py34" ]
|
||||
then
|
||||
CACLIENT=$CACLIENT_TEMP
|
||||
else
|
||||
echo "***UNRECOGNIZED INPUT CA TARGET***" $CACLIENT
|
||||
echo "***VALID VALUES ARE: cpp matlab python"
|
||||
RETURN_FLAG=true
|
||||
echo "***OTHERWISE THE DEFAULT CA TARGET IS:" $CACLIENT_DEFAULT
|
||||
CACLIENT=$CACLIENT_DEFAULT
|
||||
fi
|
||||
else
|
||||
echo "***UNRECOGNIZED INPUT CA TARGET***" $CACLIENT
|
||||
echo "***VALID VALUES ARE: cpp matlab python"
|
||||
RETURN_FLAG=true
|
||||
echo "***OTHERWISE THE DEFAULT CA TARGET IS:" $CACLIENT_DEFAULT
|
||||
CACLIENT=$CACLIENT_DEFAULT
|
||||
fi
|
||||
fi
|
||||
else
|
||||
CACLIENT=$CACLIENT_DEFAULT
|
||||
fi
|
||||
|
||||
|
||||
|
||||
if [ $RETURN_ON_WRONG_INPUT = true ] ; then
|
||||
if [ $RETURN_FLAG = true ] ; then
|
||||
return 1 2>/dev/null
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "FACILITY SELECTED = " $FACILITY
|
||||
echo "CA TARGET SELECTED = " $CACLIENT
|
||||
|
||||
ENABLE_OPTIONS="--enable-boost-inc"
|
||||
|
||||
if [ "$FACILITY" = "sfel" ] || [ "$FACILITY" = "swissfel" ]
|
||||
then
|
||||
FACILITY="sf"
|
||||
fi
|
||||
|
||||
if [ "$CACLIENT" = "python" ] || [ "$CACLIENT" = "julia" ]
|
||||
then
|
||||
CACLIENT="py37"
|
||||
fi
|
||||
|
||||
|
||||
if [ "$FACILITY" = "sls2" ]
|
||||
then
|
||||
ENABLE_OPTIONS+=" --enable-epics7"
|
||||
#CAFE_V+="-sls2"
|
||||
else
|
||||
ENABLE_OPTIONS+=" --enable-epics3"
|
||||
if [ "$FACILITY" = "sf" ] && [ "$CACLIENT" != "matlab" ]
|
||||
then
|
||||
CAFE_V+="-sf"
|
||||
elif [ "$FACILITY" = "sls" ] && [ "$CACLIENT" != "matlab" ]
|
||||
then
|
||||
CAFE_V+="-epics3"
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
|
||||
if [ "$CACLIENT" = "py34" ]
|
||||
then
|
||||
ENABLE_OPTIONS+=" --enable-python34"
|
||||
ENABLE_OPTIONS+=" --enable-qt4py34"
|
||||
CAFE_V+="-py34"
|
||||
elif [ "$CACLIENT" = "py35" ]
|
||||
then
|
||||
ENABLE_OPTIONS+=" --enable-python35"
|
||||
ENABLE_OPTIONS+=" --enable-qt4"
|
||||
CAFE_V+="-py35"
|
||||
elif [ "$CACLIENT" = "py37" ]
|
||||
then
|
||||
ENABLE_OPTIONS+=" --enable-python37"
|
||||
ENABLE_OPTIONS+=" --enable-qt5"
|
||||
CAFE_V+="-py37"
|
||||
elif [ "$CACLIENT" = "py38" ]
|
||||
then
|
||||
ENABLE_OPTIONS+=" --enable-python38"
|
||||
ENABLE_OPTIONS+=" --enable-qt5py38"
|
||||
CAFE_V+="-py38"
|
||||
elif [ "$CACLIENT" = "py310" ]
|
||||
then
|
||||
ENABLE_OPTIONS+=" --enable-python310"
|
||||
#ENABLE_OPTIONS+=" --enable-qt5py310"
|
||||
CAFE_V+="-py310"
|
||||
else
|
||||
ENABLE_OPTIONS+=" --enable-qt5"
|
||||
fi
|
||||
|
||||
if [ "$FACILITY" = "sf" ] && [ "$CACLIENT" != "matlab" ]
|
||||
then
|
||||
#rm -f src/PyCafe.cpp
|
||||
#ln -s PyCafe3.cpp src/PyCafe.cpp
|
||||
ENABLE_OPTIONS+=" --enable-json"
|
||||
ENABLE_OPTIONS+=" --enable-zeromq"
|
||||
ENABLE_OPTIONS+=" --enable-curl"
|
||||
ENABLE_OPTIONS+=" --enable-lz4"
|
||||
#else
|
||||
#rm -f src/PyCafe.cpp
|
||||
#ln -s PyCafe_sls.cpp src/PyCafe.cpp
|
||||
fi
|
||||
|
||||
CAFE_V+="-gcc-"$GCC_VERSION
|
||||
|
||||
echo "$CAFE_V"
|
||||
|
||||
#echo 'EPICS BASE IS='$EPICS_BASE
|
||||
#echo 'EPICS BASE DIR='${EPICS}/base-7.0.4.1
|
||||
|
||||
EB1=$(echo $EPICS_BASE | sed -e "s/[a-zA-Z]*-//g")
|
||||
EBMAJ=$(echo $EB1 | sed -e "s/[[:punct:]].*//g")
|
||||
EBMIN1=$(echo $EB1 | sed -e "s/^[[:digit:]]*[[:punct:]]//g")
|
||||
EBMIN=$(echo $EBMIN1 | sed -e "s/[[:punct:]][[:digit:]]*//g")
|
||||
EBPAT=$(echo $EB1 | sed -e "s/[[:digit:]]*[[:punct:]]//g")
|
||||
echo EPICS_MAJOR=$EBMAJ
|
||||
echo EPICS_MINOR=$EBMIN
|
||||
echo EPICS_PATCH=$EBPAT
|
||||
#echo $EBMIN1
|
||||
|
||||
export CAFE_EPICS_V_MAJOR=$EBMAJ
|
||||
export CAFE_EPICS_V_MINOR=$EBMIN
|
||||
export CAFE_EPICS_V_PATCH=$EBPAT
|
||||
|
||||
#ENABLE_OPTIONS+=" --enable-qt5"
|
||||
##ENABLE_OPTIONS+=" --enable-qt4"
|
||||
#ENABLE_OPTIONS+=" --enable-python37"
|
||||
##ENABLE_OPTIONS+=" --enable-python35"
|
||||
#ENABLE_OPTIONS+=" --enable-json"
|
||||
#ENABLE_OPTIONS+=" --enable-zeromq"
|
||||
#ENABLE_OPTIONS+=" --enable-curl"
|
||||
#ENABLE_OPTIONS+=" --enable-lz4"
|
||||
|
||||
echo 'ENABLE_OPTIONS='$ENABLE_OPTIONS
|
||||
|
||||
./configure \
|
||||
--prefix=/opt/gfa/cafe/cpp/${CAFE_V} \
|
||||
--libdir=/opt/gfa/cafe/cpp/${CAFE_V}/lib/${EPICS_HOST_ARCH} \
|
||||
${ENABLE_OPTIONS} \
|
||||
--with-boost-inc=/opt/gfa/cafe/boost/boost_1_61_0/include \
|
||||
--with-epics3=${EPICS}/base \
|
||||
--with-python310=/ioc/python/latest \
|
||||
--with-python38=/opt/gfa/python-3.8/latest \
|
||||
--with-python37=/opt/gfa/python-3.7/latest \
|
||||
--with-python35=/opt/gfa/python-3.5/latest \
|
||||
--with-python34=/opt/psi/Programming/psi-python34/2.1.0 \
|
||||
--with-qt5py310=/ioc/python/latest \
|
||||
--with-qt5py38=/opt/gfa/python-3.8/latest \
|
||||
--with-qt5=/opt/gfa/python-3.7/latest \
|
||||
--with-qt4=/opt/gfa/python-3.5/latest \
|
||||
--with-qt4py34=/opt/psi/Programming/psi-python34/2.1.0 \
|
||||
--with-json=/sf/bd/deps/zmq/json/jsoncpp-src-0.6.0-rc2 \
|
||||
--with-zeromq=/sf/bd/deps/zmq/zeromq-4.2.3-gcc-6.3.0 \
|
||||
--with-curl=/sf/bd/deps/zmq/curl-7.55.1 \
|
||||
--with-lz4=/sf/bd/deps/zmq/lz4/lib \
|
||||
--with-epics7=${EPICS}/base-7.0.6
|
||||
unset CAFE_EPICS_V_PATCH
|
||||
unset CAFE_EPICS_V_MINOR
|
||||
unset CAFE_EPICS_V_MAJOR
|
||||
|
||||
unset CAFE_HOST_FLAG_DARWIN
|
||||
|
||||
286
autogen_slsbd.sh-
Normal file
286
autogen_slsbd.sh-
Normal file
@@ -0,0 +1,286 @@
|
||||
### psi specific - select compiler
|
||||
#source <this_autogen_file> <facility> <target_language>
|
||||
#<facility = sls sls2 sf> default is sf
|
||||
#<target_language = cpp matlab python>
|
||||
module unload gcc
|
||||
module load gcc/7.3.0
|
||||
### psi specific - end
|
||||
|
||||
rm -f configure.ac
|
||||
ln -s configurePSI.ac configure.ac
|
||||
|
||||
rm -f ./aclocal.m4
|
||||
rm -rf ./autom4te.cache
|
||||
aclocal --force -I m4
|
||||
/opt/gfa/python-3.7/latest/bin/libtoolize --force --copy #select libtools 2.4.6
|
||||
autoconf --force #interprets configure.ac
|
||||
autoheader --force
|
||||
automake --force --add-missing --copy
|
||||
#autoreconf not wanted
|
||||
|
||||
#Check what the EPICS RELEASE IS from ${EPICS}/base
|
||||
#Used by ./configure
|
||||
#Assumes format ${EPICS}/base-3.14.12
|
||||
#source cafeVersion-gcc-7.3.0
|
||||
CAFE_V="cafe-1.15.1"
|
||||
#For later check of existence of HOST_ARCH for $EPICS/include/os/$HOST_ARCH
|
||||
#Assume Linux but check if Darwin
|
||||
CAFE_HOST_FLAG_DARWIN=$(echo ${EPICS_HOST_ARCH} | grep -c "Darwin")
|
||||
export CAFE_HOST_FLAG_DARWIN=$CAFE_HOST_FLAG_DARWIN
|
||||
|
||||
RETURN_ON_WRONG_INPUT=true
|
||||
RETURN_FLAG=false
|
||||
|
||||
EPICS_BASE=$(readlink ${EPICS}/base)
|
||||
#EB=$(readlink /afs/psi.ch/project/cafe/gitworkspace/CAFE/cpp/base)
|
||||
echo $EPICS_BASE
|
||||
if [ -z "$EPICS_BASE" ]
|
||||
then
|
||||
EPICS_BASE='base-7.4.1' #7.0 = 7+0 = 7 for major release
|
||||
fi
|
||||
|
||||
echo 'input' "$0" "$1" "$2"
|
||||
echo $EPICS_BASE
|
||||
|
||||
FACILITY=$(echo "$1" | tr '[:upper:]' '[:lower:]')
|
||||
CACLIENT=$(echo "$2" | tr '[:upper:]' '[:lower:]')
|
||||
|
||||
FACILITY_DEFAULT="sf"
|
||||
CACLIENT_DEFAULT="python"
|
||||
|
||||
FACILITY_TEMP=""
|
||||
CACLIENT_TEMP=""
|
||||
|
||||
echo 'input arg. facility/target' $FACILITY $CACLIENT
|
||||
|
||||
if [ -n "$FACILITY" ]
|
||||
then
|
||||
if [ "$FACILITY" = "matlab" ] || [ "$FACILITY" = "python" ] || \
|
||||
[ "$FACILITY" = "py37" ] || [ "$FACILITY" = "py35" ] || \
|
||||
[ "$FACILITY" = "julia" ] || [ "$FACILITY" = "cpp" ] || \
|
||||
[ "$FACILITY" = "cc" ]
|
||||
then
|
||||
CACLIENT_TEMP=$FACILITY
|
||||
FACILITY_TEMP=$2
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -n "$CACLIENT" ]
|
||||
then
|
||||
if [ "$CACLIENT" = "sls" ] || [ "$CACLIENT" = "sls2" ] || \
|
||||
[ "$CACLIENT" = "sf" ] || [ "$CACLIENT" = "swissfel" ] || \
|
||||
[ "$CACLIENT" = "sfel" ] || [ "$CACLIENT" = "hipa" ]
|
||||
then
|
||||
if [ -z $FACILITY_TEMP ]
|
||||
then
|
||||
FACILITY_TEMP=$CACLIENT
|
||||
CACLIENT_TEMP=$1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
|
||||
if [ -z "$FACILITY" ]
|
||||
then
|
||||
FACILITY="sf"
|
||||
echo "FACILITY = " $FACILITY
|
||||
if [ -z $CACLIENT ]
|
||||
then
|
||||
CACLIENT=$CACLIENT_DEFAULT
|
||||
fi
|
||||
elif [ "$FACILITY" = "sls" ] || [ "$FACILITY" = "sls2" ] || \
|
||||
[ "$FACILITY" = "sf" ] || [ "$FACILITY" = "swissfel" ] || \
|
||||
[ "$FACILITY" = "sfel" ] || [ "$FACILITY" = "hipa" ]
|
||||
then
|
||||
echo "FACILITY = " $FACILITY
|
||||
elif [ -n "$FACILITY_TEMP" ]
|
||||
then
|
||||
if [ "$FACILITY_TEMP" = "sls" ] || [ "$FACILITY_TEMP" = "sls2" ] || \
|
||||
[ "$FACILITY_TEMP" = "sf" ] || [ "$FACILITY_TEMP" = "swissfel" ] || \
|
||||
[ "$FACILITY_TEMP" = "sfel" ] || [ "$FACILITY_TEMP" = "hipa" ]
|
||||
then
|
||||
|
||||
|
||||
FACILITY=$FACILITY_TEMP
|
||||
else
|
||||
if [ -n "$2" ]
|
||||
then
|
||||
echo "***UNRECOGNIZED INPUT FACILITY***" $FACILITY
|
||||
echo "***VALID VALUES ARE: sls sls2 sf hipa"
|
||||
RETURN_FLAG=true
|
||||
fi
|
||||
echo "***OTHERWISE THE DEFAULT FACILITY IS:" $FACILITY_DEFAULT
|
||||
FACILITY=$FACILITY_DEFAULT
|
||||
fi
|
||||
else
|
||||
echo "***UNRECOGNIZED INPUT FACILITY***" $FACILITY
|
||||
echo "***VALID VALUES ARE: sls sls2 sf hipa"
|
||||
RETURN_FLAG=true
|
||||
echo "***OTHERWISE THE DEFAULT FACILITY IS: " $FACILITY_DEFAULT
|
||||
FACILITY=$FACILITY_DEFAULT
|
||||
fi
|
||||
|
||||
if [ -n "$CACLIENT" ]
|
||||
then
|
||||
if [ "$CACLIENT" = "matlab" ] || [ "$CACLIENT" = "python" ] || \
|
||||
[ "$CACLIENT" = "py37" ] || [ "$CACLIENT" = "py35" ] || \
|
||||
[ "$CACLIENT" = "julia" ] || [ "$CACLIENT" = "cpp" ] || \
|
||||
[ "$CACLIENT" = "cc" ]
|
||||
then
|
||||
echo "CA TARGET = " $CACLIENT
|
||||
else
|
||||
if [ -n "$CACLIENT_TEMP" ]
|
||||
then
|
||||
if [ "$CACLIENT_TEMP" = "matlab" ] || [ "$CACLIENT_TEMP" = "python" ] || \
|
||||
[ "$CACLIENT_TEMP" = "py37" ] || [ "$CACLIENT_TEMP" = "py35" ] || \
|
||||
[ "$CACLIENT_TEMP" = "julia" ] || [ "$CACLIENT_TEMP" = "cpp" ] || \
|
||||
[ "$CACLIENT_TEMP" = "cc" ]
|
||||
then
|
||||
CACLIENT=$CACLIENT_TEMP
|
||||
else
|
||||
echo "***UNRECOGNIZED INPUT CA TARGET***" $CACLIENT
|
||||
echo "***VALID VALUES ARE: cpp matlab python"
|
||||
RETURN_FLAG=true
|
||||
echo "***OTHERWISE THE DEFAULT CA TARGET IS:" $CACLIENT_DEFAULT
|
||||
CACLIENT=$CACLIENT_DEFAULT
|
||||
fi
|
||||
else
|
||||
echo "***UNRECOGNIZED INPUT CA TARGET***" $CACLIENT
|
||||
echo "***VALID VALUES ARE: cpp matlab python"
|
||||
RETURN_FLAG=true
|
||||
echo "***OTHERWISE THE DEFAULT CA TARGET IS:" $CACLIENT_DEFAULT
|
||||
CACLIENT=$CACLIENT_DEFAULT
|
||||
fi
|
||||
fi
|
||||
else
|
||||
CACLIENT=$CACLIENT_DEFAULT
|
||||
fi
|
||||
|
||||
|
||||
|
||||
if [ $RETURN_ON_WRONG_INPUT = true ] ; then
|
||||
if [ $RETURN_FLAG = true ] ; then
|
||||
return 1 2>/dev/null
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "FACILITY SELECTED = " $FACILITY
|
||||
echo "CA TARGET SELECTED = " $CACLIENT
|
||||
|
||||
ENABLE_OPTIONS="--enable-boost-inc"
|
||||
|
||||
if [ "$FACILITY" = "sfel" ] || [ "$FACILITY" = "swissfel" ]
|
||||
then
|
||||
FACILITY="sf"
|
||||
fi
|
||||
|
||||
if [ "$CACLIENT" = "python" ] || [ "$CACLIENT" = "julia" ]
|
||||
then
|
||||
CACLIENT="py37"
|
||||
fi
|
||||
|
||||
|
||||
if [ "$FACILITY" = "sls2" ]
|
||||
then
|
||||
ENABLE_OPTIONS+=" --enable-epics7"
|
||||
CAFE_V+="-sls2"
|
||||
else
|
||||
ENABLE_OPTIONS+=" --enable-epics3"
|
||||
if [ "$FACILITY" = "sf" ] && [ "$CACLIENT" != "matlab" ]
|
||||
then
|
||||
CAFE_V+="-sf"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$CACLIENT" = "py35" ]
|
||||
then
|
||||
ENABLE_OPTIONS+=" --enable-python35"
|
||||
ENABLE_OPTIONS+=" --enable-qt4"
|
||||
CAFE_V+="-py35"
|
||||
elif [ "$CACLIENT" = "py37" ]
|
||||
then
|
||||
ENABLE_OPTIONS+=" --enable-python37"
|
||||
ENABLE_OPTIONS+=" --enable-qt5"
|
||||
CAFE_V+="-py37"
|
||||
#else
|
||||
#ENABLE_OPTIONS+=" --enable-qt5"
|
||||
elif [ "$CACLIENT" = "py34" ]
|
||||
then
|
||||
ENABLE_OPTIONS+=" --enable-python34"
|
||||
ENABLE_OPTIONS+=" --enable-qt4"
|
||||
CAFE_V+="-py34"
|
||||
#else
|
||||
#ENABLE_OPTIONS+=" --enable-qt5"
|
||||
fi
|
||||
|
||||
|
||||
if [ "$FACILITY" = "sf" ] && [ "$CACLIENT" != "matlab" ]
|
||||
then
|
||||
#rm -f src/PyCafe.cpp
|
||||
#ln -s PyCafe3.cpp src/PyCafe.cpp
|
||||
ENABLE_OPTIONS+=" --enable-json"
|
||||
ENABLE_OPTIONS+=" --enable-zeromq"
|
||||
ENABLE_OPTIONS+=" --enable-curl"
|
||||
ENABLE_OPTIONS+=" --enable-lz4"
|
||||
#else
|
||||
#rm -f src/PyCafe.cpp
|
||||
#ln -s PyCafe_sls.cpp src/PyCafe.cpp
|
||||
fi
|
||||
|
||||
CAFE_V+="-gcc-"$GCC_VERSION
|
||||
|
||||
echo "CAFE VERSION: $CAFE_V"
|
||||
|
||||
#echo 'EPICS BASE IS='$EPICS_BASE
|
||||
#echo 'EPICS BASE DIR='${EPICS}/base-7.0.4.1
|
||||
|
||||
EB1=$(echo $EPICS_BASE | sed -e "s/[a-zA-Z]*-//g")
|
||||
EBMAJ=$(echo $EB1 | sed -e "s/[[:punct:]].*//g")
|
||||
EBMIN1=$(echo $EB1 | sed -e "s/^[[:digit:]]*[[:punct:]]//g")
|
||||
EBMIN=$(echo $EBMIN1 | sed -e "s/[[:punct:]][[:digit:]]*//g")
|
||||
EBPAT=$(echo $EB1 | sed -e "s/[[:digit:]]*[[:punct:]]//g")
|
||||
echo EPICS_MAJOR=$EBMAJ
|
||||
echo EPICS_MINOR=$EBMIN
|
||||
echo EPICS_PATCH=$EBPAT
|
||||
#echo $EBMIN1
|
||||
|
||||
export CAFE_EPICS_V_MAJOR=$EBMAJ
|
||||
export CAFE_EPICS_V_MINOR=$EBMIN
|
||||
export CAFE_EPICS_V_PATCH=$EBPAT
|
||||
|
||||
#ENABLE_OPTIONS+=" --enable-qt5"
|
||||
##ENABLE_OPTIONS+=" --enable-qt4"
|
||||
#ENABLE_OPTIONS+=" --enable-python37"
|
||||
##ENABLE_OPTIONS+=" --enable-python35"
|
||||
#ENABLE_OPTIONS+=" --enable-json"
|
||||
#ENABLE_OPTIONS+=" --enable-zeromq"
|
||||
#ENABLE_OPTIONS+=" --enable-curl"
|
||||
#ENABLE_OPTIONS+=" --enable-lz4"
|
||||
|
||||
echo 'ENABLE_OPTIONS='$ENABLE_OPTIONS
|
||||
echo 'EPICS='${EPICS}
|
||||
|
||||
./configure \
|
||||
--prefix=/opt/gfa/cafe/cpp/${CAFE_V} \
|
||||
--libdir=/opt/gfa/cafe/cpp/${CAFE_V}/lib/${EPICS_HOST_ARCH} \
|
||||
${ENABLE_OPTIONS} \
|
||||
--with-boost-inc=/afs/psi.ch/project/cafe/gitlab/CAFE/boost/boost_1_61_0/include \
|
||||
--with-epics7=${EPICS}/base-7.0.4.1 \
|
||||
--with-epics3=${EPICS}/base \
|
||||
--with-python37=/opt/gfa/python-3.7/latest \
|
||||
--with-python35=/opt/gfa/python-3.5/latest \
|
||||
--with-python34=/opt/psi/Programming/psi-python34/2.1.0 \
|
||||
--with-qt5=/opt/gfa/python-3.7/latest \
|
||||
--with-qt4=/opt/gfa/python-3.5/latest \
|
||||
--with-json=/opt/gfa/zmsglog/json/jsoncpp-src-0.6.0-rc2 \
|
||||
--with-zeromq=/opt/gfa/zmq/zeromq-4.2.3-gcc-6.3.0 \
|
||||
--with-curl=/opt/gfa/zmq/curl-7.55.1 \
|
||||
--with-lz4=/opt/gfa/zmq/lz4/lib
|
||||
|
||||
unset CAFE_EPICS_V_PATCH
|
||||
unset CAFE_EPICS_V_MINOR
|
||||
unset CAFE_EPICS_V_MAJOR
|
||||
|
||||
unset CAFE_HOST_FLAG_DARWIN
|
||||
1558
config.guess
vendored
Executable file
1558
config.guess
vendored
Executable file
File diff suppressed because it is too large
Load Diff
902
config.log
Normal file
902
config.log
Normal file
@@ -0,0 +1,902 @@
|
||||
This file contains any messages produced by compilers while
|
||||
running configure, to aid debugging if configure makes a mistake.
|
||||
|
||||
It was created by CAFE configure 1.19.0, which was
|
||||
generated by GNU Autoconf 2.69. Invocation command line was
|
||||
|
||||
$ ./configure --prefix=/opt/gfa/cafe/cpp/cafe-1.19.0-py38-gcc-7.5.0 --libdir=/opt/gfa/cafe/cpp/cafe-1.19.0-py38-gcc-7.5.0/lib/RHEL7-x86_64 --enable-boost-inc --enable-epics7 --enable-python38 --enable-qt5py38 --with-boost-inc=/opt/gfa/cafe/boost/boost_1_61_0/include --with-epics3=/usr/local/epics/base --with-python310=/ioc/python/latest --with-python38=/opt/gfa/python-3.8/latest --with-python37=/opt/gfa/python-3.7/latest --with-python35=/opt/gfa/python-3.5/latest --with-python34=/opt/psi/Programming/psi-python34/2.1.0 --with-qt5py310=/ioc/python/latest --with-qt5py38=/opt/gfa/python-3.8/latest --with-qt5=/opt/gfa/python-3.7/latest --with-qt4=/opt/gfa/python-3.5/latest --with-qt4py34=/opt/psi/Programming/psi-python34/2.1.0 --with-json=/sf/bd/deps/zmq/json/jsoncpp-src-0.6.0-rc2 --with-zeromq=/sf/bd/deps/zmq/zeromq-4.2.3-gcc-6.3.0 --with-curl=/sf/bd/deps/zmq/curl-7.55.1 --with-lz4=/sf/bd/deps/zmq/lz4/lib --with-epics7=/usr/local/epics/base-7.0.6 CXX=/opt/psi/Programming/gcc/7.5.0/bin/g++ CC=/opt/psi/Programming/gcc/7.5.0/bin/gcc --no-create --no-recursion
|
||||
|
||||
## --------- ##
|
||||
## Platform. ##
|
||||
## --------- ##
|
||||
|
||||
hostname = gfa-lc7.psi.ch
|
||||
uname -m = x86_64
|
||||
uname -r = 3.10.0-1160.80.1.el7.x86_64
|
||||
uname -s = Linux
|
||||
uname -v = #1 SMP Sat Oct 8 18:13:21 UTC 2022
|
||||
|
||||
/usr/bin/uname -p = x86_64
|
||||
/bin/uname -X = unknown
|
||||
|
||||
/bin/arch = x86_64
|
||||
/usr/bin/arch -k = unknown
|
||||
/usr/convex/getsysinfo = unknown
|
||||
/usr/bin/hostinfo = unknown
|
||||
/bin/machine = unknown
|
||||
/usr/bin/oslevel = unknown
|
||||
/bin/universe = unknown
|
||||
|
||||
PATH: /usr/local/epics/seq/bin/RHEL7-x86_64
|
||||
PATH: .
|
||||
PATH: /usr/lib/openoffice.org/program
|
||||
PATH: /opt/psi/Programming/gcc/7.5.0/bin
|
||||
PATH: /opt/gfa/python-3.8/20211215/epics/bin/linux-x86_64
|
||||
PATH: /opt/gfa/python-3.8/20211215/epics/bin/linux-x86_64
|
||||
PATH: /opt/gfa/python-3.8/20211215/bin
|
||||
PATH: /opt/gfa/python-3.8/20211215/condabin
|
||||
PATH: /usr/local/epics/seq/bin/RHEL7-x86_64
|
||||
PATH: .
|
||||
PATH: /usr/lib/openoffice.org/program
|
||||
PATH: /opt/psi/Tools/HDFView/3.1.2/bin
|
||||
PATH: /opt/psi/Programming/matlab/2018a/bin
|
||||
PATH: /usr/local/bin
|
||||
PATH: /usr/bin
|
||||
PATH: /usr/local/sbin
|
||||
PATH: /usr/sbin
|
||||
PATH: /work/bd/bin
|
||||
PATH: /sls/bd/bin
|
||||
PATH: /sls/controls/bin
|
||||
PATH: /work/sls/bin
|
||||
PATH: /work/bin
|
||||
PATH: /opt/puppetlabs/bin
|
||||
PATH: /afs/psi.ch/project/zeromq/deps/pycharm-community-2018.1.4/bin
|
||||
PATH: /afs/psi.ch/user/c/chrin/Downloads/astyle/build/gcc/bin
|
||||
PATH: /afs/psi.ch/user/c/chrin/.local/bin
|
||||
PATH: /afs/psi.ch/user/c/chrin/python/pycharm-community-2018.1.4/bin
|
||||
PATH: /afs/psi.ch/user/c/chrin/bin
|
||||
PATH: /opt/psi/Tools/Pmodules/1.0.0rc4/bin
|
||||
PATH: /afs/psi.ch/project/zeromq/deps/pycharm-community-2018.1.4/bin
|
||||
PATH: /afs/psi.ch/user/c/chrin/Downloads/astyle/build/gcc/bin
|
||||
PATH: /afs/psi.ch/user/c/chrin/.local/bin
|
||||
PATH: /afs/psi.ch/user/c/chrin/python/pycharm-community-2018.1.4/bin
|
||||
PATH: /afs/psi.ch/user/c/chrin/bin
|
||||
|
||||
|
||||
## ----------- ##
|
||||
## Core tests. ##
|
||||
## ----------- ##
|
||||
|
||||
configure:2503: checking for a BSD-compatible install
|
||||
configure:2571: result: /usr/bin/install -c
|
||||
configure:2582: checking whether build environment is sane
|
||||
configure:2637: result: yes
|
||||
configure:2788: checking for a thread-safe mkdir -p
|
||||
configure:2827: result: /usr/bin/mkdir -p
|
||||
configure:2834: checking for gawk
|
||||
configure:2850: found /usr/bin/gawk
|
||||
configure:2861: result: gawk
|
||||
configure:2872: checking whether make sets $(MAKE)
|
||||
configure:2894: result: yes
|
||||
configure:2923: checking whether make supports nested variables
|
||||
configure:2940: result: yes
|
||||
configure:3147: checking for C++ compiler version
|
||||
configure:3156: /opt/psi/Programming/gcc/7.5.0/bin/g++ --version >&5
|
||||
g++ ('PSI Environment Module') 7.5.0
|
||||
Copyright (C) 2017 Free Software Foundation, Inc.
|
||||
This is free software; see the source for copying conditions. There is NO
|
||||
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
configure:3167: $? = 0
|
||||
configure:3156: /opt/psi/Programming/gcc/7.5.0/bin/g++ -v >&5
|
||||
Using built-in specs.
|
||||
COLLECT_GCC=/opt/psi/Programming/gcc/7.5.0/bin/g++
|
||||
COLLECT_LTO_WRAPPER=/afs/psi.ch/sys/psi.ra/Programming/gcc/7.5.0/bin/../libexec/gcc/x86_64-pc-linux-gnu/7.5.0/lto-wrapper
|
||||
Target: x86_64-pc-linux-gnu
|
||||
Configured with: /var/tmp/gsell/gcc-7.5.0/src/configure --prefix=/opt/psi/Programming/gcc/7.5.0 --with-gmp=/opt/psi/Libraries/gmp/6.2.0 --with-mpfr=/opt/psi/Libraries/mpfr/4.0.2-1 --with-mpc=/opt/psi/Libraries/mpc/1.1.0-4 --enable-lto --disable-multilib --with-build-config=bootstrap-debug --with-pkgversion=''\''PSI Environment Module'\''' --with-build-config=bootstrap-debug
|
||||
Thread model: posix
|
||||
gcc version 7.5.0 ('PSI Environment Module')
|
||||
configure:3167: $? = 0
|
||||
configure:3156: /opt/psi/Programming/gcc/7.5.0/bin/g++ -V >&5
|
||||
g++: error: unrecognized command line option '-V'
|
||||
g++: fatal error: no input files
|
||||
compilation terminated.
|
||||
configure:3167: $? = 1
|
||||
configure:3156: /opt/psi/Programming/gcc/7.5.0/bin/g++ -qversion >&5
|
||||
g++: error: unrecognized command line option '-qversion'; did you mean '--version'?
|
||||
g++: fatal error: no input files
|
||||
compilation terminated.
|
||||
configure:3167: $? = 1
|
||||
configure:3187: checking whether the C++ compiler works
|
||||
configure:3209: /opt/psi/Programming/gcc/7.5.0/bin/g++ conftest.cpp >&5
|
||||
configure:3213: $? = 0
|
||||
configure:3261: result: yes
|
||||
configure:3264: checking for C++ compiler default output file name
|
||||
configure:3266: result: a.out
|
||||
configure:3272: checking for suffix of executables
|
||||
configure:3279: /opt/psi/Programming/gcc/7.5.0/bin/g++ -o conftest conftest.cpp >&5
|
||||
configure:3283: $? = 0
|
||||
configure:3305: result:
|
||||
configure:3327: checking whether we are cross compiling
|
||||
configure:3335: /opt/psi/Programming/gcc/7.5.0/bin/g++ -o conftest conftest.cpp >&5
|
||||
configure:3339: $? = 0
|
||||
configure:3346: ./conftest
|
||||
configure:3350: $? = 0
|
||||
configure:3365: result: no
|
||||
configure:3370: checking for suffix of object files
|
||||
configure:3392: /opt/psi/Programming/gcc/7.5.0/bin/g++ -c conftest.cpp >&5
|
||||
configure:3396: $? = 0
|
||||
configure:3417: result: o
|
||||
configure:3421: checking whether we are using the GNU C++ compiler
|
||||
configure:3440: /opt/psi/Programming/gcc/7.5.0/bin/g++ -c conftest.cpp >&5
|
||||
configure:3440: $? = 0
|
||||
configure:3449: result: yes
|
||||
configure:3458: checking whether /opt/psi/Programming/gcc/7.5.0/bin/g++ accepts -g
|
||||
configure:3478: /opt/psi/Programming/gcc/7.5.0/bin/g++ -c -g conftest.cpp >&5
|
||||
configure:3478: $? = 0
|
||||
configure:3519: result: yes
|
||||
configure:3553: checking for style of include used by make
|
||||
configure:3581: result: GNU
|
||||
configure:3607: checking dependency style of /opt/psi/Programming/gcc/7.5.0/bin/g++
|
||||
configure:3718: result: gcc3
|
||||
configure:3764: checking build system type
|
||||
configure:3778: result: x86_64-unknown-linux-gnu
|
||||
configure:3798: checking host system type
|
||||
configure:3811: result: x86_64-unknown-linux-gnu
|
||||
configure:3852: checking how to print strings
|
||||
configure:3879: result: printf
|
||||
configure:3948: checking for gcc
|
||||
configure:3975: result: /opt/psi/Programming/gcc/7.5.0/bin/gcc
|
||||
configure:4204: checking for C compiler version
|
||||
configure:4213: /opt/psi/Programming/gcc/7.5.0/bin/gcc --version >&5
|
||||
gcc ('PSI Environment Module') 7.5.0
|
||||
Copyright (C) 2017 Free Software Foundation, Inc.
|
||||
This is free software; see the source for copying conditions. There is NO
|
||||
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
configure:4224: $? = 0
|
||||
configure:4213: /opt/psi/Programming/gcc/7.5.0/bin/gcc -v >&5
|
||||
Using built-in specs.
|
||||
COLLECT_GCC=/opt/psi/Programming/gcc/7.5.0/bin/gcc
|
||||
COLLECT_LTO_WRAPPER=/afs/psi.ch/sys/psi.ra/Programming/gcc/7.5.0/bin/../libexec/gcc/x86_64-pc-linux-gnu/7.5.0/lto-wrapper
|
||||
Target: x86_64-pc-linux-gnu
|
||||
Configured with: /var/tmp/gsell/gcc-7.5.0/src/configure --prefix=/opt/psi/Programming/gcc/7.5.0 --with-gmp=/opt/psi/Libraries/gmp/6.2.0 --with-mpfr=/opt/psi/Libraries/mpfr/4.0.2-1 --with-mpc=/opt/psi/Libraries/mpc/1.1.0-4 --enable-lto --disable-multilib --with-build-config=bootstrap-debug --with-pkgversion=''\''PSI Environment Module'\''' --with-build-config=bootstrap-debug
|
||||
Thread model: posix
|
||||
gcc version 7.5.0 ('PSI Environment Module')
|
||||
configure:4224: $? = 0
|
||||
configure:4213: /opt/psi/Programming/gcc/7.5.0/bin/gcc -V >&5
|
||||
gcc: error: unrecognized command line option '-V'
|
||||
gcc: fatal error: no input files
|
||||
compilation terminated.
|
||||
configure:4224: $? = 1
|
||||
configure:4213: /opt/psi/Programming/gcc/7.5.0/bin/gcc -qversion >&5
|
||||
gcc: error: unrecognized command line option '-qversion'; did you mean '--version'?
|
||||
gcc: fatal error: no input files
|
||||
compilation terminated.
|
||||
configure:4224: $? = 1
|
||||
configure:4228: checking whether we are using the GNU C compiler
|
||||
configure:4247: /opt/psi/Programming/gcc/7.5.0/bin/gcc -c conftest.c >&5
|
||||
configure:4247: $? = 0
|
||||
configure:4256: result: yes
|
||||
configure:4265: checking whether /opt/psi/Programming/gcc/7.5.0/bin/gcc accepts -g
|
||||
configure:4285: /opt/psi/Programming/gcc/7.5.0/bin/gcc -c -g conftest.c >&5
|
||||
configure:4285: $? = 0
|
||||
configure:4326: result: yes
|
||||
configure:4343: checking for /opt/psi/Programming/gcc/7.5.0/bin/gcc option to accept ISO C89
|
||||
configure:4406: /opt/psi/Programming/gcc/7.5.0/bin/gcc -c -g -O2 conftest.c >&5
|
||||
configure:4406: $? = 0
|
||||
configure:4419: result: none needed
|
||||
configure:4441: checking dependency style of /opt/psi/Programming/gcc/7.5.0/bin/gcc
|
||||
configure:4552: result: gcc3
|
||||
configure:4567: checking for a sed that does not truncate output
|
||||
configure:4631: result: /usr/bin/sed
|
||||
configure:4649: checking for grep that handles long lines and -e
|
||||
configure:4707: result: /usr/bin/grep
|
||||
configure:4712: checking for egrep
|
||||
configure:4774: result: /usr/bin/grep -E
|
||||
configure:4779: checking for fgrep
|
||||
configure:4841: result: /usr/bin/grep -F
|
||||
configure:4876: checking for ld used by /opt/psi/Programming/gcc/7.5.0/bin/gcc
|
||||
configure:4943: result: /usr/bin/ld
|
||||
configure:4950: checking if the linker (/usr/bin/ld) is GNU ld
|
||||
configure:4965: result: yes
|
||||
configure:4977: checking for BSD- or MS-compatible name lister (nm)
|
||||
configure:5031: result: /usr/bin/nm -B
|
||||
configure:5161: checking the name lister (/usr/bin/nm -B) interface
|
||||
configure:5168: /opt/psi/Programming/gcc/7.5.0/bin/g++ -c -g -O2 conftest.cpp >&5
|
||||
configure:5171: /usr/bin/nm -B "conftest.o"
|
||||
configure:5174: output
|
||||
0000000000000000 B some_variable
|
||||
configure:5181: result: BSD nm
|
||||
configure:5184: checking whether ln -s works
|
||||
configure:5188: result: yes
|
||||
configure:5196: checking the maximum length of command line arguments
|
||||
configure:5327: result: 1572864
|
||||
configure:5375: checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format
|
||||
configure:5415: result: func_convert_file_noop
|
||||
configure:5422: checking how to convert x86_64-unknown-linux-gnu file names to toolchain format
|
||||
configure:5442: result: func_convert_file_noop
|
||||
configure:5449: checking for /usr/bin/ld option to reload object files
|
||||
configure:5456: result: -r
|
||||
configure:5530: checking for objdump
|
||||
configure:5546: found /usr/bin/objdump
|
||||
configure:5557: result: objdump
|
||||
configure:5589: checking how to recognize dependent libraries
|
||||
configure:5789: result: pass_all
|
||||
configure:5874: checking for dlltool
|
||||
configure:5904: result: no
|
||||
configure:5934: checking how to associate runtime and link libraries
|
||||
configure:5961: result: printf %s\n
|
||||
configure:6022: checking for ar
|
||||
configure:6038: found /usr/bin/ar
|
||||
configure:6049: result: ar
|
||||
configure:6086: checking for archiver @FILE support
|
||||
configure:6103: /opt/psi/Programming/gcc/7.5.0/bin/g++ -c -g -O2 conftest.cpp >&5
|
||||
configure:6103: $? = 0
|
||||
configure:6106: ar cru libconftest.a @conftest.lst >&5
|
||||
configure:6109: $? = 0
|
||||
configure:6114: ar cru libconftest.a @conftest.lst >&5
|
||||
ar: conftest.o: No such file or directory
|
||||
configure:6117: $? = 1
|
||||
configure:6129: result: @
|
||||
configure:6187: checking for strip
|
||||
configure:6203: found /usr/bin/strip
|
||||
configure:6214: result: strip
|
||||
configure:6286: checking for ranlib
|
||||
configure:6302: found /usr/bin/ranlib
|
||||
configure:6313: result: ranlib
|
||||
configure:6415: checking command to parse /usr/bin/nm -B output from /opt/psi/Programming/gcc/7.5.0/bin/gcc object
|
||||
configure:6568: /opt/psi/Programming/gcc/7.5.0/bin/g++ -c -g -O2 conftest.cpp >&5
|
||||
configure:6571: $? = 0
|
||||
configure:6575: /usr/bin/nm -B conftest.o \| sed -n -e 's/^.*[ ]\([ABCDGIRSTW][ABCDGIRSTW]*\)[ ][ ]*\([_A-Za-z][_A-Za-z0-9]*\)$/\1 \2 \2/p' | sed '/ __gnu_lto/d' \> conftest.nm
|
||||
configure:6578: $? = 0
|
||||
configure:6644: /opt/psi/Programming/gcc/7.5.0/bin/g++ -o conftest -g -O2 conftest.cpp conftstm.o >&5
|
||||
configure:6647: $? = 0
|
||||
configure:6685: result: ok
|
||||
configure:6732: checking for sysroot
|
||||
configure:6762: result: no
|
||||
configure:6769: checking for a working dd
|
||||
configure:6807: result: /usr/bin/dd
|
||||
configure:6811: checking how to truncate binary pipes
|
||||
configure:6826: result: /usr/bin/dd bs=4096 count=1
|
||||
configure:6963: /opt/psi/Programming/gcc/7.5.0/bin/g++ -c -g -O2 conftest.cpp >&5
|
||||
configure:6966: $? = 0
|
||||
configure:7156: checking for mt
|
||||
configure:7186: result: no
|
||||
configure:7206: checking if : is a manifest tool
|
||||
configure:7212: : '-?'
|
||||
configure:7220: result: no
|
||||
configure:7897: checking how to run the C preprocessor
|
||||
configure:7928: /opt/psi/Programming/gcc/7.5.0/bin/gcc -E conftest.c
|
||||
configure:7928: $? = 0
|
||||
configure:7942: /opt/psi/Programming/gcc/7.5.0/bin/gcc -E conftest.c
|
||||
conftest.c:11:10: fatal error: ac_nonexistent.h: No such file or directory
|
||||
#include <ac_nonexistent.h>
|
||||
^~~~~~~~~~~~~~~~~~
|
||||
compilation terminated.
|
||||
configure:7942: $? = 1
|
||||
configure: failed program was:
|
||||
| /* confdefs.h */
|
||||
| #define PACKAGE_NAME "CAFE"
|
||||
| #define PACKAGE_TARNAME "cafe"
|
||||
| #define PACKAGE_VERSION "1.19.0"
|
||||
| #define PACKAGE_STRING "CAFE 1.19.0"
|
||||
| #define PACKAGE_BUGREPORT "Bug reports to: jan.chrin@psi.ch"
|
||||
| #define PACKAGE_URL ""
|
||||
| #define PACKAGE "cafe"
|
||||
| #define VERSION "1.19.0"
|
||||
| /* end confdefs.h. */
|
||||
| #include <ac_nonexistent.h>
|
||||
configure:7967: result: /opt/psi/Programming/gcc/7.5.0/bin/gcc -E
|
||||
configure:7987: /opt/psi/Programming/gcc/7.5.0/bin/gcc -E conftest.c
|
||||
configure:7987: $? = 0
|
||||
configure:8001: /opt/psi/Programming/gcc/7.5.0/bin/gcc -E conftest.c
|
||||
conftest.c:11:10: fatal error: ac_nonexistent.h: No such file or directory
|
||||
#include <ac_nonexistent.h>
|
||||
^~~~~~~~~~~~~~~~~~
|
||||
compilation terminated.
|
||||
configure:8001: $? = 1
|
||||
configure: failed program was:
|
||||
| /* confdefs.h */
|
||||
| #define PACKAGE_NAME "CAFE"
|
||||
| #define PACKAGE_TARNAME "cafe"
|
||||
| #define PACKAGE_VERSION "1.19.0"
|
||||
| #define PACKAGE_STRING "CAFE 1.19.0"
|
||||
| #define PACKAGE_BUGREPORT "Bug reports to: jan.chrin@psi.ch"
|
||||
| #define PACKAGE_URL ""
|
||||
| #define PACKAGE "cafe"
|
||||
| #define VERSION "1.19.0"
|
||||
| /* end confdefs.h. */
|
||||
| #include <ac_nonexistent.h>
|
||||
configure:8030: checking for ANSI C header files
|
||||
configure:8050: /opt/psi/Programming/gcc/7.5.0/bin/gcc -c -g -O2 conftest.c >&5
|
||||
configure:8050: $? = 0
|
||||
configure:8123: /opt/psi/Programming/gcc/7.5.0/bin/gcc -o conftest -g -O2 conftest.c >&5
|
||||
configure:8123: $? = 0
|
||||
configure:8123: ./conftest
|
||||
configure:8123: $? = 0
|
||||
configure:8134: result: yes
|
||||
configure:8147: checking for sys/types.h
|
||||
configure:8147: /opt/psi/Programming/gcc/7.5.0/bin/gcc -c -g -O2 conftest.c >&5
|
||||
configure:8147: $? = 0
|
||||
configure:8147: result: yes
|
||||
configure:8147: checking for sys/stat.h
|
||||
configure:8147: /opt/psi/Programming/gcc/7.5.0/bin/gcc -c -g -O2 conftest.c >&5
|
||||
configure:8147: $? = 0
|
||||
configure:8147: result: yes
|
||||
configure:8147: checking for stdlib.h
|
||||
configure:8147: /opt/psi/Programming/gcc/7.5.0/bin/gcc -c -g -O2 conftest.c >&5
|
||||
configure:8147: $? = 0
|
||||
configure:8147: result: yes
|
||||
configure:8147: checking for string.h
|
||||
configure:8147: /opt/psi/Programming/gcc/7.5.0/bin/gcc -c -g -O2 conftest.c >&5
|
||||
configure:8147: $? = 0
|
||||
configure:8147: result: yes
|
||||
configure:8147: checking for memory.h
|
||||
configure:8147: /opt/psi/Programming/gcc/7.5.0/bin/gcc -c -g -O2 conftest.c >&5
|
||||
configure:8147: $? = 0
|
||||
configure:8147: result: yes
|
||||
configure:8147: checking for strings.h
|
||||
configure:8147: /opt/psi/Programming/gcc/7.5.0/bin/gcc -c -g -O2 conftest.c >&5
|
||||
configure:8147: $? = 0
|
||||
configure:8147: result: yes
|
||||
configure:8147: checking for inttypes.h
|
||||
configure:8147: /opt/psi/Programming/gcc/7.5.0/bin/gcc -c -g -O2 conftest.c >&5
|
||||
configure:8147: $? = 0
|
||||
configure:8147: result: yes
|
||||
configure:8147: checking for stdint.h
|
||||
configure:8147: /opt/psi/Programming/gcc/7.5.0/bin/gcc -c -g -O2 conftest.c >&5
|
||||
configure:8147: $? = 0
|
||||
configure:8147: result: yes
|
||||
configure:8147: checking for unistd.h
|
||||
configure:8147: /opt/psi/Programming/gcc/7.5.0/bin/gcc -c -g -O2 conftest.c >&5
|
||||
configure:8147: $? = 0
|
||||
configure:8147: result: yes
|
||||
configure:8161: checking for dlfcn.h
|
||||
configure:8161: /opt/psi/Programming/gcc/7.5.0/bin/gcc -c -g -O2 conftest.c >&5
|
||||
configure:8161: $? = 0
|
||||
configure:8161: result: yes
|
||||
configure:8427: checking for objdir
|
||||
configure:8442: result: .libs
|
||||
configure:8706: checking if /opt/psi/Programming/gcc/7.5.0/bin/gcc supports -fno-rtti -fno-exceptions
|
||||
configure:8724: /opt/psi/Programming/gcc/7.5.0/bin/gcc -c -g -O2 -fno-rtti -fno-exceptions conftest.c >&5
|
||||
cc1: warning: command line option '-fno-rtti' is valid for C++/ObjC++ but not for C
|
||||
configure:8728: $? = 0
|
||||
configure:8741: result: no
|
||||
configure:9099: checking for /opt/psi/Programming/gcc/7.5.0/bin/gcc option to produce PIC
|
||||
configure:9106: result: -fPIC -DPIC
|
||||
configure:9114: checking if /opt/psi/Programming/gcc/7.5.0/bin/gcc PIC flag -fPIC -DPIC works
|
||||
configure:9132: /opt/psi/Programming/gcc/7.5.0/bin/gcc -c -g -O2 -fPIC -DPIC -DPIC conftest.c >&5
|
||||
configure:9136: $? = 0
|
||||
configure:9149: result: yes
|
||||
configure:9178: checking if /opt/psi/Programming/gcc/7.5.0/bin/gcc static flag -static works
|
||||
configure:9206: result: no
|
||||
configure:9221: checking if /opt/psi/Programming/gcc/7.5.0/bin/gcc supports -c -o file.o
|
||||
configure:9242: /opt/psi/Programming/gcc/7.5.0/bin/gcc -c -g -O2 -o out/conftest2.o conftest.c >&5
|
||||
configure:9246: $? = 0
|
||||
configure:9268: result: yes
|
||||
configure:9276: checking if /opt/psi/Programming/gcc/7.5.0/bin/gcc supports -c -o file.o
|
||||
configure:9323: result: yes
|
||||
configure:9356: checking whether the /opt/psi/Programming/gcc/7.5.0/bin/gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries
|
||||
configure:10615: result: yes
|
||||
configure:10652: checking whether -lc should be explicitly linked in
|
||||
configure:10660: /opt/psi/Programming/gcc/7.5.0/bin/gcc -c -g -O2 conftest.c >&5
|
||||
configure:10663: $? = 0
|
||||
configure:10678: /opt/psi/Programming/gcc/7.5.0/bin/gcc -shared -fPIC -DPIC conftest.o -v -Wl,-soname -Wl,conftest -o conftest 2\>\&1 \| /usr/bin/grep -lc \>/dev/null 2\>\&1
|
||||
configure:10681: $? = 0
|
||||
configure:10695: result: no
|
||||
configure:10855: checking dynamic linker characteristics
|
||||
configure:11436: /opt/psi/Programming/gcc/7.5.0/bin/gcc -o conftest -g -O2 -Wl,-rpath -Wl,/foo conftest.c >&5
|
||||
configure:11436: $? = 0
|
||||
configure:11673: result: GNU/Linux ld.so
|
||||
configure:11795: checking how to hardcode library paths into programs
|
||||
configure:11820: result: immediate
|
||||
configure:12368: checking whether stripping libraries is possible
|
||||
configure:12373: result: yes
|
||||
configure:12408: checking if libtool supports shared libraries
|
||||
configure:12410: result: yes
|
||||
configure:12413: checking whether to build shared libraries
|
||||
configure:12438: result: yes
|
||||
configure:12441: checking whether to build static libraries
|
||||
configure:12445: result: yes
|
||||
configure:12468: checking how to run the C++ preprocessor
|
||||
configure:12495: /opt/psi/Programming/gcc/7.5.0/bin/g++ -E conftest.cpp
|
||||
configure:12495: $? = 0
|
||||
configure:12509: /opt/psi/Programming/gcc/7.5.0/bin/g++ -E conftest.cpp
|
||||
conftest.cpp:23:10: fatal error: ac_nonexistent.h: No such file or directory
|
||||
#include <ac_nonexistent.h>
|
||||
^~~~~~~~~~~~~~~~~~
|
||||
compilation terminated.
|
||||
configure:12509: $? = 1
|
||||
configure: failed program was:
|
||||
| /* confdefs.h */
|
||||
| #define PACKAGE_NAME "CAFE"
|
||||
| #define PACKAGE_TARNAME "cafe"
|
||||
| #define PACKAGE_VERSION "1.19.0"
|
||||
| #define PACKAGE_STRING "CAFE 1.19.0"
|
||||
| #define PACKAGE_BUGREPORT "Bug reports to: jan.chrin@psi.ch"
|
||||
| #define PACKAGE_URL ""
|
||||
| #define PACKAGE "cafe"
|
||||
| #define VERSION "1.19.0"
|
||||
| #define STDC_HEADERS 1
|
||||
| #define HAVE_SYS_TYPES_H 1
|
||||
| #define HAVE_SYS_STAT_H 1
|
||||
| #define HAVE_STDLIB_H 1
|
||||
| #define HAVE_STRING_H 1
|
||||
| #define HAVE_MEMORY_H 1
|
||||
| #define HAVE_STRINGS_H 1
|
||||
| #define HAVE_INTTYPES_H 1
|
||||
| #define HAVE_STDINT_H 1
|
||||
| #define HAVE_UNISTD_H 1
|
||||
| #define HAVE_DLFCN_H 1
|
||||
| #define LT_OBJDIR ".libs/"
|
||||
| /* end confdefs.h. */
|
||||
| #include <ac_nonexistent.h>
|
||||
configure:12534: result: /opt/psi/Programming/gcc/7.5.0/bin/g++ -E
|
||||
configure:12554: /opt/psi/Programming/gcc/7.5.0/bin/g++ -E conftest.cpp
|
||||
configure:12554: $? = 0
|
||||
configure:12568: /opt/psi/Programming/gcc/7.5.0/bin/g++ -E conftest.cpp
|
||||
conftest.cpp:23:10: fatal error: ac_nonexistent.h: No such file or directory
|
||||
#include <ac_nonexistent.h>
|
||||
^~~~~~~~~~~~~~~~~~
|
||||
compilation terminated.
|
||||
configure:12568: $? = 1
|
||||
configure: failed program was:
|
||||
| /* confdefs.h */
|
||||
| #define PACKAGE_NAME "CAFE"
|
||||
| #define PACKAGE_TARNAME "cafe"
|
||||
| #define PACKAGE_VERSION "1.19.0"
|
||||
| #define PACKAGE_STRING "CAFE 1.19.0"
|
||||
| #define PACKAGE_BUGREPORT "Bug reports to: jan.chrin@psi.ch"
|
||||
| #define PACKAGE_URL ""
|
||||
| #define PACKAGE "cafe"
|
||||
| #define VERSION "1.19.0"
|
||||
| #define STDC_HEADERS 1
|
||||
| #define HAVE_SYS_TYPES_H 1
|
||||
| #define HAVE_SYS_STAT_H 1
|
||||
| #define HAVE_STDLIB_H 1
|
||||
| #define HAVE_STRING_H 1
|
||||
| #define HAVE_MEMORY_H 1
|
||||
| #define HAVE_STRINGS_H 1
|
||||
| #define HAVE_INTTYPES_H 1
|
||||
| #define HAVE_STDINT_H 1
|
||||
| #define HAVE_UNISTD_H 1
|
||||
| #define HAVE_DLFCN_H 1
|
||||
| #define LT_OBJDIR ".libs/"
|
||||
| /* end confdefs.h. */
|
||||
| #include <ac_nonexistent.h>
|
||||
configure:12730: checking for ld used by /opt/psi/Programming/gcc/7.5.0/bin/g++
|
||||
configure:12797: result: /usr/bin/ld -m elf_x86_64
|
||||
configure:12804: checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld
|
||||
configure:12819: result: yes
|
||||
configure:12874: checking whether the /opt/psi/Programming/gcc/7.5.0/bin/g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries
|
||||
configure:13947: result: yes
|
||||
configure:13983: /opt/psi/Programming/gcc/7.5.0/bin/g++ -c -g -O2 conftest.cpp >&5
|
||||
configure:13986: $? = 0
|
||||
configure:14467: checking for /opt/psi/Programming/gcc/7.5.0/bin/g++ option to produce PIC
|
||||
configure:14474: result: -fPIC -DPIC
|
||||
configure:14482: checking if /opt/psi/Programming/gcc/7.5.0/bin/g++ PIC flag -fPIC -DPIC works
|
||||
configure:14500: /opt/psi/Programming/gcc/7.5.0/bin/g++ -c -g -O2 -fPIC -DPIC -DPIC conftest.cpp >&5
|
||||
configure:14504: $? = 0
|
||||
configure:14517: result: yes
|
||||
configure:14540: checking if /opt/psi/Programming/gcc/7.5.0/bin/g++ static flag -static works
|
||||
configure:14568: result: no
|
||||
configure:14580: checking if /opt/psi/Programming/gcc/7.5.0/bin/g++ supports -c -o file.o
|
||||
configure:14601: /opt/psi/Programming/gcc/7.5.0/bin/g++ -c -g -O2 -o out/conftest2.o conftest.cpp >&5
|
||||
configure:14605: $? = 0
|
||||
configure:14627: result: yes
|
||||
configure:14632: checking if /opt/psi/Programming/gcc/7.5.0/bin/g++ supports -c -o file.o
|
||||
configure:14679: result: yes
|
||||
configure:14709: checking whether the /opt/psi/Programming/gcc/7.5.0/bin/g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries
|
||||
configure:14749: result: yes
|
||||
configure:14890: checking dynamic linker characteristics
|
||||
configure:15635: result: GNU/Linux ld.so
|
||||
configure:15700: checking how to hardcode library paths into programs
|
||||
configure:15725: result: immediate
|
||||
configure:15949: checking cadef.h usability
|
||||
configure:15949: /opt/psi/Programming/gcc/7.5.0/bin/g++ -c -g -O2 -fexceptions -fPIC -std=c++1z -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 conftest.cpp >&5
|
||||
configure:15949: $? = 0
|
||||
configure:15949: result: yes
|
||||
configure:15949: checking cadef.h presence
|
||||
configure:15949: /opt/psi/Programming/gcc/7.5.0/bin/g++ -E -fexceptions -fPIC -std=c++1z -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 conftest.cpp
|
||||
configure:15949: $? = 0
|
||||
configure:15949: result: yes
|
||||
configure:15949: checking for cadef.h
|
||||
configure:15949: result: yes
|
||||
configure:15968: checking epicsTypes.h usability
|
||||
configure:15968: /opt/psi/Programming/gcc/7.5.0/bin/g++ -c -g -O2 -fexceptions -fPIC -std=c++1z -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 conftest.cpp >&5
|
||||
configure:15968: $? = 0
|
||||
configure:15968: result: yes
|
||||
configure:15968: checking epicsTypes.h presence
|
||||
configure:15968: /opt/psi/Programming/gcc/7.5.0/bin/g++ -E -fexceptions -fPIC -std=c++1z -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 conftest.cpp
|
||||
configure:15968: $? = 0
|
||||
configure:15968: result: yes
|
||||
configure:15968: checking for epicsTypes.h
|
||||
configure:15968: result: yes
|
||||
configure:15985: checking for main in -lca
|
||||
configure:16004: /opt/psi/Programming/gcc/7.5.0/bin/g++ -o conftest -g -O2 -fexceptions -fPIC -std=c++1z -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 -L/usr/local/epics/base-7.0.6/lib/RHEL7-x86_64 -Wl,-rpath,/usr/local/epics/base-7.0.6/lib/RHEL7-x86_64 conftest.cpp -lca >&5
|
||||
configure:16004: $? = 0
|
||||
configure:16013: result: yes
|
||||
configure:16026: checking for main in -lCom
|
||||
configure:16045: /opt/psi/Programming/gcc/7.5.0/bin/g++ -o conftest -g -O2 -fexceptions -fPIC -std=c++1z -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 -L/usr/local/epics/base-7.0.6/lib/RHEL7-x86_64 -Wl,-rpath,/usr/local/epics/base-7.0.6/lib/RHEL7-x86_64 conftest.cpp -lCom >&5
|
||||
configure:16045: $? = 0
|
||||
configure:16054: result: yes
|
||||
configure:16067: checking for main in -ldl
|
||||
configure:16086: /opt/psi/Programming/gcc/7.5.0/bin/g++ -o conftest -g -O2 -fexceptions -fPIC -std=c++1z -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 -L/usr/local/epics/base-7.0.6/lib/RHEL7-x86_64 -Wl,-rpath,/usr/local/epics/base-7.0.6/lib/RHEL7-x86_64 conftest.cpp -ldl >&5
|
||||
configure:16086: $? = 0
|
||||
configure:16095: result: yes
|
||||
configure:16300: checking multi_index_container.hpp usability
|
||||
configure:16300: /opt/psi/Programming/gcc/7.5.0/bin/g++ -c -g -O2 -fexceptions -fPIC -std=c++1z -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/boost -I/opt/gfa/cafe/boost/boost_1_61_0/include conftest.cpp >&5
|
||||
configure:16300: $? = 0
|
||||
configure:16300: result: yes
|
||||
configure:16300: checking multi_index_container.hpp presence
|
||||
configure:16300: /opt/psi/Programming/gcc/7.5.0/bin/g++ -E -fexceptions -fPIC -std=c++1z -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/boost -I/opt/gfa/cafe/boost/boost_1_61_0/include conftest.cpp
|
||||
configure:16300: $? = 0
|
||||
configure:16300: result: yes
|
||||
configure:16300: checking for multi_index_container.hpp
|
||||
configure:16300: result: yes
|
||||
configure:16524: checking Python.h usability
|
||||
configure:16524: /opt/psi/Programming/gcc/7.5.0/bin/g++ -c -g -O2 -fexceptions -fPIC -std=c++1z -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/boost -I/opt/gfa/cafe/boost/boost_1_61_0/include -I/opt/gfa/python-3.8/latest/include/python3.8 -I/opt/gfa/python-3.8/latest/lib/python3.8/site-packages/numpy/core/include conftest.cpp >&5
|
||||
configure:16524: $? = 0
|
||||
configure:16524: result: yes
|
||||
configure:16524: checking Python.h presence
|
||||
configure:16524: /opt/psi/Programming/gcc/7.5.0/bin/g++ -E -fexceptions -fPIC -std=c++1z -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/boost -I/opt/gfa/cafe/boost/boost_1_61_0/include -I/opt/gfa/python-3.8/latest/include/python3.8 -I/opt/gfa/python-3.8/latest/lib/python3.8/site-packages/numpy/core/include conftest.cpp
|
||||
configure:16524: $? = 0
|
||||
configure:16524: result: yes
|
||||
configure:16524: checking for Python.h
|
||||
configure:16524: result: yes
|
||||
configure:16591: checking for main in -lpython3.8
|
||||
configure:16610: /opt/psi/Programming/gcc/7.5.0/bin/g++ -o conftest -g -O2 -fexceptions -fPIC -std=c++1z -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/boost -I/opt/gfa/cafe/boost/boost_1_61_0/include -I/opt/gfa/python-3.8/latest/include/python3.8 -I/opt/gfa/python-3.8/latest/lib/python3.8/site-packages/numpy/core/include -L/usr/local/epics/base-7.0.6/lib/RHEL7-x86_64 -Wl,-rpath,/usr/local/epics/base-7.0.6/lib/RHEL7-x86_64 -L/opt/gfa/python-3.8/latest/lib -Wl,-rpath,/opt/gfa/python-3.8/latest/lib conftest.cpp -lpython3.8 >&5
|
||||
configure:16610: $? = 0
|
||||
configure:16619: result: yes
|
||||
configure:17014: checking qxml.h usability
|
||||
configure:17014: /opt/psi/Programming/gcc/7.5.0/bin/g++ -c -g -O2 -fexceptions -fPIC -std=c++1z -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/boost -I/opt/gfa/cafe/boost/boost_1_61_0/include -I/opt/gfa/python-3.8/latest/include/python3.8 -I/opt/gfa/python-3.8/latest/lib/python3.8/site-packages/numpy/core/include -I/opt/gfa/python-3.8/latest/include/qt -I/opt/gfa/python-3.8/latest/include/qt/QtCore -I/opt/gfa/python-3.8/latest/include/qt/QtXml conftest.cpp >&5
|
||||
configure:17014: $? = 0
|
||||
configure:17014: result: yes
|
||||
configure:17014: checking qxml.h presence
|
||||
configure:17014: /opt/psi/Programming/gcc/7.5.0/bin/g++ -E -fexceptions -fPIC -std=c++1z -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/boost -I/opt/gfa/cafe/boost/boost_1_61_0/include -I/opt/gfa/python-3.8/latest/include/python3.8 -I/opt/gfa/python-3.8/latest/lib/python3.8/site-packages/numpy/core/include -I/opt/gfa/python-3.8/latest/include/qt -I/opt/gfa/python-3.8/latest/include/qt/QtCore -I/opt/gfa/python-3.8/latest/include/qt/QtXml conftest.cpp
|
||||
configure:17014: $? = 0
|
||||
configure:17014: result: yes
|
||||
configure:17014: checking for qxml.h
|
||||
configure:17014: result: yes
|
||||
configure:18061: checking that generated files are newer than configure
|
||||
configure:18067: result: done
|
||||
configure:18106: creating ./config.status
|
||||
|
||||
## ---------------- ##
|
||||
## Cache variables. ##
|
||||
## ---------------- ##
|
||||
|
||||
ac_cv_build=x86_64-unknown-linux-gnu
|
||||
ac_cv_c_compiler_gnu=yes
|
||||
ac_cv_cxx_compiler_gnu=yes
|
||||
ac_cv_env_CCC_set=
|
||||
ac_cv_env_CCC_value=
|
||||
ac_cv_env_CC_set=set
|
||||
ac_cv_env_CC_value=/opt/psi/Programming/gcc/7.5.0/bin/gcc
|
||||
ac_cv_env_CFLAGS_set=
|
||||
ac_cv_env_CFLAGS_value=
|
||||
ac_cv_env_CPPFLAGS_set=
|
||||
ac_cv_env_CPPFLAGS_value=
|
||||
ac_cv_env_CPP_set=
|
||||
ac_cv_env_CPP_value=
|
||||
ac_cv_env_CXXCPP_set=
|
||||
ac_cv_env_CXXCPP_value=
|
||||
ac_cv_env_CXXFLAGS_set=
|
||||
ac_cv_env_CXXFLAGS_value=
|
||||
ac_cv_env_CXX_set=set
|
||||
ac_cv_env_CXX_value=/opt/psi/Programming/gcc/7.5.0/bin/g++
|
||||
ac_cv_env_LDFLAGS_set=
|
||||
ac_cv_env_LDFLAGS_value=
|
||||
ac_cv_env_LIBS_set=
|
||||
ac_cv_env_LIBS_value=
|
||||
ac_cv_env_LT_SYS_LIBRARY_PATH_set=
|
||||
ac_cv_env_LT_SYS_LIBRARY_PATH_value=
|
||||
ac_cv_env_build_alias_set=
|
||||
ac_cv_env_build_alias_value=
|
||||
ac_cv_env_host_alias_set=
|
||||
ac_cv_env_host_alias_value=
|
||||
ac_cv_env_target_alias_set=
|
||||
ac_cv_env_target_alias_value=
|
||||
ac_cv_header_Python_h=yes
|
||||
ac_cv_header_cadef_h=yes
|
||||
ac_cv_header_dlfcn_h=yes
|
||||
ac_cv_header_epicsTypes_h=yes
|
||||
ac_cv_header_inttypes_h=yes
|
||||
ac_cv_header_memory_h=yes
|
||||
ac_cv_header_multi_index_container_hpp=yes
|
||||
ac_cv_header_qxml_h=yes
|
||||
ac_cv_header_stdc=yes
|
||||
ac_cv_header_stdint_h=yes
|
||||
ac_cv_header_stdlib_h=yes
|
||||
ac_cv_header_string_h=yes
|
||||
ac_cv_header_strings_h=yes
|
||||
ac_cv_header_sys_stat_h=yes
|
||||
ac_cv_header_sys_types_h=yes
|
||||
ac_cv_header_unistd_h=yes
|
||||
ac_cv_host=x86_64-unknown-linux-gnu
|
||||
ac_cv_lib_Com_main=yes
|
||||
ac_cv_lib_ca_main=yes
|
||||
ac_cv_lib_dl_main=yes
|
||||
ac_cv_lib_python3_8_main=yes
|
||||
ac_cv_objext=o
|
||||
ac_cv_path_EGREP='/usr/bin/grep -E'
|
||||
ac_cv_path_FGREP='/usr/bin/grep -F'
|
||||
ac_cv_path_GREP=/usr/bin/grep
|
||||
ac_cv_path_SED=/usr/bin/sed
|
||||
ac_cv_path_install='/usr/bin/install -c'
|
||||
ac_cv_path_lt_DD=/usr/bin/dd
|
||||
ac_cv_path_mkdir=/usr/bin/mkdir
|
||||
ac_cv_prog_AWK=gawk
|
||||
ac_cv_prog_CPP='/opt/psi/Programming/gcc/7.5.0/bin/gcc -E'
|
||||
ac_cv_prog_CXXCPP='/opt/psi/Programming/gcc/7.5.0/bin/g++ -E'
|
||||
ac_cv_prog_ac_ct_AR=ar
|
||||
ac_cv_prog_ac_ct_CC=/opt/psi/Programming/gcc/7.5.0/bin/gcc
|
||||
ac_cv_prog_ac_ct_OBJDUMP=objdump
|
||||
ac_cv_prog_ac_ct_RANLIB=ranlib
|
||||
ac_cv_prog_ac_ct_STRIP=strip
|
||||
ac_cv_prog_cc_c89=
|
||||
ac_cv_prog_cc_g=yes
|
||||
ac_cv_prog_cxx_g=yes
|
||||
ac_cv_prog_make_make_set=yes
|
||||
am_cv_CC_dependencies_compiler_type=gcc3
|
||||
am_cv_CXX_dependencies_compiler_type=gcc3
|
||||
am_cv_make_support_nested_variables=yes
|
||||
lt_cv_ar_at_file=@
|
||||
lt_cv_archive_cmds_need_lc=no
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
lt_cv_file_magic_cmd='$MAGIC_CMD'
|
||||
lt_cv_file_magic_test_file=
|
||||
lt_cv_ld_reload_flag=-r
|
||||
lt_cv_nm_interface='BSD nm'
|
||||
lt_cv_objdir=.libs
|
||||
lt_cv_path_LD=/usr/bin/ld
|
||||
lt_cv_path_LDCXX='/usr/bin/ld -m elf_x86_64'
|
||||
lt_cv_path_NM='/usr/bin/nm -B'
|
||||
lt_cv_path_mainfest_tool=no
|
||||
lt_cv_prog_compiler_c_o=yes
|
||||
lt_cv_prog_compiler_c_o_CXX=yes
|
||||
lt_cv_prog_compiler_pic='-fPIC -DPIC'
|
||||
lt_cv_prog_compiler_pic_CXX='-fPIC -DPIC'
|
||||
lt_cv_prog_compiler_pic_works=yes
|
||||
lt_cv_prog_compiler_pic_works_CXX=yes
|
||||
lt_cv_prog_compiler_rtti_exceptions=no
|
||||
lt_cv_prog_compiler_static_works=no
|
||||
lt_cv_prog_compiler_static_works_CXX=no
|
||||
lt_cv_prog_gnu_ld=yes
|
||||
lt_cv_prog_gnu_ldcxx=yes
|
||||
lt_cv_sharedlib_from_linklib_cmd='printf %s\n'
|
||||
lt_cv_shlibpath_overrides_runpath=no
|
||||
lt_cv_sys_global_symbol_pipe='sed -n -e '\''s/^.*[ ]\([ABCDGIRSTW][ABCDGIRSTW]*\)[ ][ ]*\([_A-Za-z][_A-Za-z0-9]*\)$/\1 \2 \2/p'\'' | sed '\''/ __gnu_lto/d'\'''
|
||||
lt_cv_sys_global_symbol_to_c_name_address='sed -n -e '\''s/^: \(.*\) .*$/ {"\1", (void *) 0},/p'\'' -e '\''s/^[ABCDGIRSTW][ABCDGIRSTW]* .* \(.*\)$/ {"\1", (void *) \&\1},/p'\'''
|
||||
lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='sed -n -e '\''s/^: \(.*\) .*$/ {"\1", (void *) 0},/p'\'' -e '\''s/^[ABCDGIRSTW][ABCDGIRSTW]* .* \(lib.*\)$/ {"\1", (void *) \&\1},/p'\'' -e '\''s/^[ABCDGIRSTW][ABCDGIRSTW]* .* \(.*\)$/ {"lib\1", (void *) \&\1},/p'\'''
|
||||
lt_cv_sys_global_symbol_to_cdecl='sed -n -e '\''s/^T .* \(.*\)$/extern int \1();/p'\'' -e '\''s/^[ABCDGIRSTW][ABCDGIRSTW]* .* \(.*\)$/extern char \1;/p'\'''
|
||||
lt_cv_sys_global_symbol_to_import=
|
||||
lt_cv_sys_max_cmd_len=1572864
|
||||
lt_cv_to_host_file_cmd=func_convert_file_noop
|
||||
lt_cv_to_tool_file_cmd=func_convert_file_noop
|
||||
lt_cv_truncate_bin='/usr/bin/dd bs=4096 count=1'
|
||||
|
||||
## ----------------- ##
|
||||
## Output variables. ##
|
||||
## ----------------- ##
|
||||
|
||||
ACLOCAL='${SHELL} /afs/psi.ch/project/cafe/gitlab/CAFE/cpp/missing aclocal-1.13'
|
||||
AMDEPBACKSLASH='\'
|
||||
AMDEP_FALSE='#'
|
||||
AMDEP_TRUE=''
|
||||
AMTAR='$${TAR-tar}'
|
||||
AM_BACKSLASH='\'
|
||||
AM_CPPFLAGS=' -fexceptions -fPIC -std=c++1z -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/boost -I/opt/gfa/cafe/boost/boost_1_61_0/include -I/opt/gfa/python-3.8/latest/include/python3.8 -I/opt/gfa/python-3.8/latest/lib/python3.8/site-packages/numpy/core/include -I/opt/gfa/python-3.8/latest/include/qt -I/opt/gfa/python-3.8/latest/include/qt/QtCore -I/opt/gfa/python-3.8/latest/include/qt/QtXml'
|
||||
AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
|
||||
AM_DEFAULT_VERBOSITY='1'
|
||||
AM_LDFLAGS=' -L/usr/local/epics/base-7.0.6/lib/RHEL7-x86_64 -Wl,-rpath,/usr/local/epics/base-7.0.6/lib/RHEL7-x86_64 -L/opt/gfa/python-3.8/latest/lib -Wl,-rpath,/opt/gfa/python-3.8/latest/lib -L/opt/gfa/python-3.8/latest/lib -Wl,-rpath,/opt/gfa/python-3.8/latest/lib '
|
||||
AM_V='$(V)'
|
||||
AR='ar'
|
||||
AUTOCONF='${SHELL} /afs/psi.ch/project/cafe/gitlab/CAFE/cpp/missing autoconf'
|
||||
AUTOHEADER='${SHELL} /afs/psi.ch/project/cafe/gitlab/CAFE/cpp/missing autoheader'
|
||||
AUTOMAKE='${SHELL} /afs/psi.ch/project/cafe/gitlab/CAFE/cpp/missing automake-1.13'
|
||||
AWK='gawk'
|
||||
CAFE_CPPFLAGS='-I$(top_srcdir)/include '
|
||||
CC='/opt/psi/Programming/gcc/7.5.0/bin/gcc'
|
||||
CCDEPMODE='depmode=gcc3'
|
||||
CFLAGS='-g -O2'
|
||||
CPP='/opt/psi/Programming/gcc/7.5.0/bin/gcc -E'
|
||||
CPPFLAGS=' -fexceptions -fPIC -std=c++1z -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/boost -I/opt/gfa/cafe/boost/boost_1_61_0/include -I/opt/gfa/python-3.8/latest/include/python3.8 -I/opt/gfa/python-3.8/latest/lib/python3.8/site-packages/numpy/core/include -I/opt/gfa/python-3.8/latest/include/qt -I/opt/gfa/python-3.8/latest/include/qt/QtCore -I/opt/gfa/python-3.8/latest/include/qt/QtXml'
|
||||
CXX='/opt/psi/Programming/gcc/7.5.0/bin/g++'
|
||||
CXXCPP='/opt/psi/Programming/gcc/7.5.0/bin/g++ -E'
|
||||
CXXDEPMODE='depmode=gcc3'
|
||||
CXXFLAGS='-g -O2'
|
||||
CYGPATH_W='echo'
|
||||
DEFS='-DHAVE_CONFIG_H'
|
||||
DEPDIR='.deps'
|
||||
DLLTOOL='false'
|
||||
DSYMUTIL=''
|
||||
DUMPBIN=''
|
||||
ECHO_C=''
|
||||
ECHO_N='-n'
|
||||
ECHO_T=''
|
||||
EGREP='/usr/bin/grep -E'
|
||||
EXEEXT=''
|
||||
FGREP='/usr/bin/grep -F'
|
||||
GREP='/usr/bin/grep'
|
||||
HAVE_PYCAFE_EXT__FALSE='#'
|
||||
HAVE_PYCAFE_EXT__TRUE=''
|
||||
HAVE_PYTHON__FALSE='#'
|
||||
HAVE_PYTHON__TRUE=''
|
||||
HAVE_ZEROMQ__FALSE=''
|
||||
HAVE_ZEROMQ__TRUE='#'
|
||||
INSTALL_DATA='${INSTALL} -m 644'
|
||||
INSTALL_PROGRAM='${INSTALL}'
|
||||
INSTALL_SCRIPT='${INSTALL}'
|
||||
INSTALL_STRIP_PROGRAM='$(install_sh) -c -s'
|
||||
LD='/usr/bin/ld -m elf_x86_64'
|
||||
LDFLAGS=' -L/usr/local/epics/base-7.0.6/lib/RHEL7-x86_64 -Wl,-rpath,/usr/local/epics/base-7.0.6/lib/RHEL7-x86_64 -L/opt/gfa/python-3.8/latest/lib -Wl,-rpath,/opt/gfa/python-3.8/latest/lib -L/opt/gfa/python-3.8/latest/lib -Wl,-rpath,/opt/gfa/python-3.8/latest/lib '
|
||||
LIBOBJS=''
|
||||
LIBS='-lpython3.8 '
|
||||
LIBTOOL='$(SHELL) $(top_builddir)/libtool'
|
||||
LIPO=''
|
||||
LN_S='ln -s'
|
||||
LTLIBOBJS=''
|
||||
LT_SYS_LIBRARY_PATH=''
|
||||
MAKEINFO='${SHELL} /afs/psi.ch/project/cafe/gitlab/CAFE/cpp/missing makeinfo'
|
||||
MANIFEST_TOOL=':'
|
||||
MKDIR_P='/usr/bin/mkdir -p'
|
||||
NM='/usr/bin/nm -B'
|
||||
NMEDIT=''
|
||||
OBJDUMP='objdump'
|
||||
OBJEXT='o'
|
||||
OTOOL64=''
|
||||
OTOOL=''
|
||||
PACKAGE='cafe'
|
||||
PACKAGE_BUGREPORT='Bug reports to: jan.chrin@psi.ch'
|
||||
PACKAGE_NAME='CAFE'
|
||||
PACKAGE_STRING='CAFE 1.19.0'
|
||||
PACKAGE_TARNAME='cafe'
|
||||
PACKAGE_URL=''
|
||||
PACKAGE_VERSION='1.19.0'
|
||||
PATH_SEPARATOR=':'
|
||||
RANLIB='ranlib'
|
||||
SED='/usr/bin/sed'
|
||||
SET_MAKE=''
|
||||
SHELL='/bin/sh'
|
||||
STRIP='strip'
|
||||
VERSION='1.19.0'
|
||||
ac_ct_AR='ar'
|
||||
ac_ct_CC='/opt/psi/Programming/gcc/7.5.0/bin/gcc'
|
||||
ac_ct_CXX=''
|
||||
ac_ct_DUMPBIN=''
|
||||
am__EXEEXT_FALSE=''
|
||||
am__EXEEXT_TRUE='#'
|
||||
am__fastdepCC_FALSE='#'
|
||||
am__fastdepCC_TRUE=''
|
||||
am__fastdepCXX_FALSE='#'
|
||||
am__fastdepCXX_TRUE=''
|
||||
am__include='include'
|
||||
am__isrc=''
|
||||
am__leading_dot='.'
|
||||
am__nodep='_no'
|
||||
am__quote=''
|
||||
am__tar='$${TAR-tar} chof - "$$tardir"'
|
||||
am__untar='$${TAR-tar} xf -'
|
||||
bindir='${exec_prefix}/bin'
|
||||
build='x86_64-unknown-linux-gnu'
|
||||
build_alias=''
|
||||
build_cpu='x86_64'
|
||||
build_os='linux-gnu'
|
||||
build_vendor='unknown'
|
||||
datadir='${datarootdir}'
|
||||
datarootdir='${prefix}/share'
|
||||
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
|
||||
dvidir='${docdir}'
|
||||
exec_prefix='${prefix}'
|
||||
host='x86_64-unknown-linux-gnu'
|
||||
host_alias=''
|
||||
host_cpu='x86_64'
|
||||
host_os='linux-gnu'
|
||||
host_vendor='unknown'
|
||||
htmldir='${docdir}'
|
||||
includedir='${prefix}/include'
|
||||
infodir='${datarootdir}/info'
|
||||
install_sh='${SHELL} /afs/psi.ch/project/cafe/gitlab/CAFE/cpp/install-sh'
|
||||
libdir='/opt/gfa/cafe/cpp/cafe-1.19.0-py38-gcc-7.5.0/lib/RHEL7-x86_64'
|
||||
libexecdir='${exec_prefix}/libexec'
|
||||
localedir='${datarootdir}/locale'
|
||||
localstatedir='${prefix}/var'
|
||||
mandir='${datarootdir}/man'
|
||||
mkdir_p='$(MKDIR_P)'
|
||||
oldincludedir='/usr/include'
|
||||
pdfdir='${docdir}'
|
||||
prefix='/opt/gfa/cafe/cpp/cafe-1.19.0-py38-gcc-7.5.0'
|
||||
program_transform_name='s,x,x,'
|
||||
psdir='${docdir}'
|
||||
sbindir='${exec_prefix}/sbin'
|
||||
sharedstatedir='${prefix}/com'
|
||||
sysconfdir='${prefix}/etc'
|
||||
target_alias=''
|
||||
|
||||
## ----------- ##
|
||||
## confdefs.h. ##
|
||||
## ----------- ##
|
||||
|
||||
/* confdefs.h */
|
||||
#define PACKAGE_NAME "CAFE"
|
||||
#define PACKAGE_TARNAME "cafe"
|
||||
#define PACKAGE_VERSION "1.19.0"
|
||||
#define PACKAGE_STRING "CAFE 1.19.0"
|
||||
#define PACKAGE_BUGREPORT "Bug reports to: jan.chrin@psi.ch"
|
||||
#define PACKAGE_URL ""
|
||||
#define PACKAGE "cafe"
|
||||
#define VERSION "1.19.0"
|
||||
#define STDC_HEADERS 1
|
||||
#define HAVE_SYS_TYPES_H 1
|
||||
#define HAVE_SYS_STAT_H 1
|
||||
#define HAVE_STDLIB_H 1
|
||||
#define HAVE_STRING_H 1
|
||||
#define HAVE_MEMORY_H 1
|
||||
#define HAVE_STRINGS_H 1
|
||||
#define HAVE_INTTYPES_H 1
|
||||
#define HAVE_STDINT_H 1
|
||||
#define HAVE_UNISTD_H 1
|
||||
#define HAVE_DLFCN_H 1
|
||||
#define LT_OBJDIR ".libs/"
|
||||
#define HAVE_LINUX 1
|
||||
#define HAVE_CADEF_H 1
|
||||
#define HAVE_EPICSTYPES_H 1
|
||||
#define HAVE_EPICS 7.4.1
|
||||
#define EPICS_MAJOR 7
|
||||
#define EPICS_MINOR 4
|
||||
#define EPICS_PATCH 1
|
||||
#define HAVE_MULTI_INDEX_CONTAINER_HPP 1
|
||||
#define HAVE_BOOST 1
|
||||
#define HAVE_PYTHON_H 1
|
||||
#define HAVE_LIBPYTHON3_8 1
|
||||
#define HAVE_PYTHON 1
|
||||
#define HAVE_PYCAFE_EXT 1
|
||||
#define HAVE_QXML_H 1
|
||||
#define HAVE_QT 1
|
||||
#define HAVE_LIBQTXML 1
|
||||
#define QT_NO_VERSION_TAGGING 1
|
||||
|
||||
configure: exit 0
|
||||
|
||||
## ---------------------- ##
|
||||
## Running config.status. ##
|
||||
## ---------------------- ##
|
||||
|
||||
This file was extended by CAFE config.status 1.19.0, which was
|
||||
generated by GNU Autoconf 2.69. Invocation command line was
|
||||
|
||||
CONFIG_FILES =
|
||||
CONFIG_HEADERS =
|
||||
CONFIG_LINKS =
|
||||
CONFIG_COMMANDS =
|
||||
$ ./config.status
|
||||
|
||||
on gfa-lc7.psi.ch
|
||||
|
||||
config.status:1182: creating makefile
|
||||
config.status:1182: creating src/makefile
|
||||
config.status:1182: creating include/makefile
|
||||
config.status:1182: creating ./include/config.h
|
||||
config.status:1363: ./include/config.h is unchanged
|
||||
config.status:1411: executing depfiles commands
|
||||
config.status:1411: executing libtool commands
|
||||
|
||||
## ---------------------- ##
|
||||
## Running config.status. ##
|
||||
## ---------------------- ##
|
||||
|
||||
This file was extended by CAFE config.status 1.19.0, which was
|
||||
generated by GNU Autoconf 2.69. Invocation command line was
|
||||
|
||||
CONFIG_FILES =
|
||||
CONFIG_HEADERS =
|
||||
CONFIG_LINKS =
|
||||
CONFIG_COMMANDS =
|
||||
$ ./config.status ./include/config.h
|
||||
|
||||
on gfa-lc7.psi.ch
|
||||
|
||||
config.status:1182: creating ./include/config.h
|
||||
config.status:1363: ./include/config.h is unchanged
|
||||
2226
config.status
Executable file
2226
config.status
Executable file
File diff suppressed because it is too large
Load Diff
1788
config.sub
vendored
Executable file
1788
config.sub
vendored
Executable file
File diff suppressed because it is too large
Load Diff
1140
configure.ac
1140
configure.ac
File diff suppressed because it is too large
Load Diff
1
configure.ac
Symbolic link
1
configure.ac
Symbolic link
@@ -0,0 +1 @@
|
||||
configurePSI.ac
|
||||
1191
configure.ac-Mar10
Normal file
1191
configure.ac-Mar10
Normal file
File diff suppressed because it is too large
Load Diff
1262
configurePSI.ac
Normal file
1262
configurePSI.ac
Normal file
File diff suppressed because it is too large
Load Diff
1052
configurePSI.ac-
Normal file
1052
configurePSI.ac-
Normal file
File diff suppressed because it is too large
Load Diff
1118
configurePSI.ac--
Normal file
1118
configurePSI.ac--
Normal file
File diff suppressed because it is too large
Load Diff
1191
configurePSI.ac-Mar10
Normal file
1191
configurePSI.ac-Mar10
Normal file
File diff suppressed because it is too large
Load Diff
3
examples/cafeTest/#makfile7#
Normal file
3
examples/cafeTest/#makfile7#
Normal file
@@ -0,0 +1,3 @@
|
||||
|
||||
|
||||
|
||||
BIN
examples/cafeTest/RHEL7-x86_64/monitorTest
Executable file
BIN
examples/cafeTest/RHEL7-x86_64/monitorTest
Executable file
Binary file not shown.
Binary file not shown.
BIN
examples/cafeTest/cafeTest-
Executable file
BIN
examples/cafeTest/cafeTest-
Executable file
Binary file not shown.
BIN
examples/cafeTest/cafeTest--
Executable file
BIN
examples/cafeTest/cafeTest--
Executable file
Binary file not shown.
@@ -2,7 +2,6 @@
|
||||
// A simple example
|
||||
//
|
||||
#include <cafe.h>
|
||||
|
||||
#include "callbacks.h" //ca callback funtions
|
||||
|
||||
// Test with 6 PVS
|
||||
@@ -64,7 +63,14 @@ int main( int argc, char *argv[] )
|
||||
//Instantaite CAFE
|
||||
CAFE * cafe = new CAFE();
|
||||
|
||||
|
||||
//PVCtrlHolder pvcd;
|
||||
//dbr_string_t str_out;
|
||||
//cafe->open("SF-OP:CR-MSG:OP-MSG1.DESC", handle);
|
||||
//cafe->open("ARIDI-BPM:OFB-YRMS", handle);
|
||||
//status = cafe->getCtrl("ARIDI-BPM:OFB-YRMS", pvcd);
|
||||
//pvcd.print();
|
||||
//cout << "status " << status << " value " << str_out << endl;
|
||||
//exit(1);
|
||||
|
||||
//------------------------------------------------------------
|
||||
//(1) Establishing connections to EPICS Process Variables (PVs)
|
||||
@@ -1118,7 +1124,7 @@ int main( int argc, char *argv[] )
|
||||
|
||||
MonitorPolicy mp, mp2;
|
||||
mp.setUserArgs((void *) pvArray[0].c_str());
|
||||
mp.setHandler(callbackHandlerMonitor);
|
||||
mp.setHandler(callbackHandlerMoqnitor);
|
||||
mp.setCafeDbrType(CAFENUM::DBR_TIME);
|
||||
mp.setDataType(DBR_STS_FLOAT); //THis will overwrite DBR_TIME above
|
||||
mp.setMask(DBE_VALUE | DBE_LOG | DBE_ALARM);
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
|
||||
#CAFE version to link to
|
||||
CAFE_VERSION=cafe-1.8.0-gcc-6.3.0
|
||||
CAFE_VERSION=cafe-1.14.4-gcc-7.3.0
|
||||
|
||||
#PYTHON_INCLUDE=/opt/gfa/python-3.5/latest/include/python3.5m
|
||||
#PYTHON_LIB=/opt/gfa/python-3.5/latest/lib
|
||||
@@ -17,25 +17,29 @@ EPICS_BASE=${EPICS}/base
|
||||
#CAFE project base
|
||||
CAFE_BASE=/opt/gfa/cafe
|
||||
CAFE_CPP_BASE=${CAFE_BASE}/cpp
|
||||
|
||||
|
||||
BOOST_BASE=${CAFE_BASE}/boost/boost_1_61_0/include
|
||||
|
||||
INCLUDE_PATH += -I$(CAFE_CPP_BASE)/$(CAFE_VERSION)/include \
|
||||
-I$(EPICS_BASE)/include -I$(EPICS_BASE)/include/os/Linux \
|
||||
-I$(BOOST_BASE)
|
||||
#-I$(BOOST_BASE)/boost
|
||||
|
||||
|
||||
LIB_DIR += -L$(EPICS_BASE)/lib/${EPICS_HOST_ARCH} \
|
||||
-Wl,-rpath,$(EPICS_BASE)/lib/${EPICS_HOST_ARCH} \
|
||||
-L$(CAFE_CPP_BASE)/$(CAFE_VERSION)/lib \
|
||||
-Wl,-rpath,$(CAFE_CPP_BASE)/$(CAFE_VERSION)/lib
|
||||
-L$(CAFE_CPP_BASE)/$(CAFE_VERSION)/lib/${EPICS_HOST_ARCH} \
|
||||
-Wl,-rpath,$(CAFE_CPP_BASE)/$(CAFE_VERSION)/lib/${EPICS_HOST_ARCH} \
|
||||
-L/opt/gfa/python-3.7/latest/lib \
|
||||
-Wl,-rpath,/opt/gfa/python-3.7/latest/lib \
|
||||
-L/opt/psi/Programming/gcc/10.3.0/lib64 \
|
||||
-Wl,-rpath,/opt/psi/Programming/gcc/10.3.0/lib64
|
||||
|
||||
LIBS += -lcafe -lca -lCom
|
||||
|
||||
LIBS += -lcafe -lca -lCom -lQt5Core
|
||||
|
||||
cafeTest: cafeTest.cc callbacks.h
|
||||
g++ cafeTest.cc -o cafeTest \
|
||||
$(INCLUDE_PATH) $(LIB_DIR) $(LIBS)
|
||||
|
||||
$(INCLUDE_PATH) $(LIB_DIR) $(LIBS)
|
||||
|
||||
clean:
|
||||
rm -f cafeTest.o cafeTest
|
||||
|
||||
52
examples/cafeTest/makefile7
Normal file
52
examples/cafeTest/makefile7
Normal file
@@ -0,0 +1,52 @@
|
||||
#
|
||||
# Jan Chrin
|
||||
# June 2016
|
||||
#
|
||||
# Makefile to build a simple C++ cafe client
|
||||
#
|
||||
|
||||
#-py37- libcafe.so: undefined reference to `cy_event_handler_wrapper
|
||||
#CAFE version to link to
|
||||
#CAFE_VERSION=cafe-1.14.4-sls2-gcc-7.3.0
|
||||
#CAFE_VERSION=cafe-1.15.0-py37-gcc-10.3.0
|
||||
CAFE_VERSION=cafe-1.15.0-gcc-10.3.0
|
||||
|
||||
PYTHON_INCLUDE=/opt/gfa/python-3.7/latest/include/python3.7m
|
||||
PYTHON_LIB=/opt/gfa/python-3.7/latest/lib
|
||||
|
||||
EPICS_BASE=${EPICS}/base-7.0.6
|
||||
|
||||
#CAFE project base
|
||||
CAFE_BASE=/opt/gfa/cafe
|
||||
CAFE_CPP_BASE=${CAFE_BASE}/cpp
|
||||
|
||||
|
||||
BOOST_BASE=${CAFE_BASE}/boost/boost_1_61_0/include
|
||||
|
||||
INCLUDE_PATH += -I$(CAFE_CPP_BASE)/$(CAFE_VERSION)/include \
|
||||
-I$(EPICS_BASE)/include -I$(EPICS_BASE)/include/compiler/gcc \
|
||||
-I$(EPICS_BASE)/include/os/Linux \
|
||||
-I$(BOOST_BASE) -I${PYTHON_INCLUDE}
|
||||
#-I$(BOOST_BASE)/boost
|
||||
|
||||
LIB_DIR += -L$(EPICS_BASE)/lib/${EPICS_HOST_ARCH} \
|
||||
-Wl,-rpath,$(EPICS_BASE)/lib/${EPICS_HOST_ARCH} \
|
||||
-L$(CAFE_CPP_BASE)/$(CAFE_VERSION)/lib/${EPICS_HOST_ARCH} \
|
||||
-Wl,-rpath,$(CAFE_CPP_BASE)/$(CAFE_VERSION)/lib/${EPICS_HOST_ARCH} \
|
||||
-L/opt/psi/Programming/gcc/10.3.0/lib64 -Wl,-rpath,/opt/psi/Programming/gcc/10.3.0/lib64 \
|
||||
-L$(PYTHON_LIB) -Wl,-rpath,$(PYTHON_LIB)
|
||||
|
||||
|
||||
LIBS += -lcafe -lca -lCom -lQt5Core -lpython3.7m
|
||||
|
||||
${EPICS_HOST_ARCH}/monitorTest: monitorTest.cc
|
||||
g++ monitorTest.cc -o ${EPICS_HOST_ARCH}/monitorTest \
|
||||
$(INCLUDE_PATH) $(LIB_DIR) $(LIBS)
|
||||
|
||||
cafeTest: cafeTest.cc callbacks.h
|
||||
g++ cafeTest.cc -o cafeTest \
|
||||
$(INCLUDE_PATH) $(LIB_DIR) $(LIBS)
|
||||
|
||||
clean:
|
||||
rm -f cafeTest.o cafeTest
|
||||
|
||||
46
examples/cafeTest/makefile_local
Normal file
46
examples/cafeTest/makefile_local
Normal file
@@ -0,0 +1,46 @@
|
||||
#
|
||||
# Jan Chrin
|
||||
# June 2016
|
||||
#
|
||||
# Makefile to build a simple C++ cafe client
|
||||
#
|
||||
|
||||
|
||||
#CAFE version to link to
|
||||
CAFE_VERSION=cafe-1.14.1-gcc-7.3.0
|
||||
|
||||
#PYTHON_INCLUDE=/opt/gfa/python-3.5/latest/include/python3.5m
|
||||
#PYTHON_LIB=/opt/gfa/python-3.5/latest/lib
|
||||
|
||||
EPICS_BASE=${EPICS}/base
|
||||
|
||||
#CAFE project base
|
||||
CAFE_BASE=/opt/gfa/cafe
|
||||
CAFE_CPP_BASE=${CAFE_BASE}/cpp
|
||||
|
||||
CAFE_BASE=/afs/psi.ch/project/cafe/gitlab/CAFE/
|
||||
CAFE_CPP_BASE=${CAFE_BASE}
|
||||
CAFE_VERSION=cpp
|
||||
|
||||
|
||||
BOOST_BASE=${CAFE_BASE}/boost/boost_1_61_0/include
|
||||
|
||||
INCLUDE_PATH += -I$(CAFE_CPP_BASE)/$(CAFE_VERSION)/include \
|
||||
-I$(EPICS_BASE)/include -I$(EPICS_BASE)/include/os/Linux \
|
||||
-I$(BOOST_BASE)
|
||||
#-I$(BOOST_BASE)/boost
|
||||
|
||||
LIB_DIR += -L$(EPICS_BASE)/lib/${EPICS_HOST_ARCH} \
|
||||
-Wl,-rpath,$(EPICS_BASE)/lib/${EPICS_HOST_ARCH} \
|
||||
-L$(CAFE_CPP_BASE)/$(CAFE_VERSION)/lib \
|
||||
-Wl,-rpath,$(CAFE_CPP_BASE)/$(CAFE_VERSION)/lib
|
||||
|
||||
LIBS += -lcafe -lca -lCom
|
||||
|
||||
cafeTest: cafeTest.cc callbacks.h
|
||||
g++ cafeTest.cc -o cafeTest \
|
||||
$(INCLUDE_PATH) $(LIB_DIR) $(LIBS)
|
||||
|
||||
clean:
|
||||
rm -f cafeTest.o cafeTest
|
||||
|
||||
@@ -1,22 +1,26 @@
|
||||
INCLUDES = -Ic:\CAFE\CAFE\cpp\include -Ic:\CAFE\CAFE\cpp -Ic:\local\boost_1_62_0 \
|
||||
-Ic:\local\boost_1_62_0\boost -Ic:\epics\base-3.14.12.5\include -Ic:\epics\base-3.14.12.5\include\os\WIN32 \
|
||||
-Ic:\Qt\4.8.4\include
|
||||
INCLUDES = -Ic:\EPICS\CAFE\cpp\include -Ic:\EPICS\CAFE\cpp -Ic:\EPICS\boost_1_81_0 \
|
||||
-Ic:\EPICS\boost_1_81_0\boost -IC:\epics\epics-base\include -IC:\epics\epics-base\include\os\WIN32 \
|
||||
-Ic:\EPICS\epics-base\include\compiler\msvc \
|
||||
#-Ic:\Qt\4.8.4\include
|
||||
CXX=cl
|
||||
CXXFLAGS = /W4 /EHsc
|
||||
OUTPUT_OPTION = /o $@
|
||||
LIB_LOCAL = C:\epics\base-3.14.12.5\lib\windows-x64\Com.lib C:\epics\base-3.14.12.5\lib\windows-x64\ca.lib \
|
||||
C:\CAFE\CAFE\cpp\cafe.lib \
|
||||
C:\local\boost_1_62_0\lib64-msvc-10.0\libboost_thread-vc100-mt-s-1_62.lib \
|
||||
C:\local\boost_1_62_0\lib64-msvc-10.0\libboost_system-vc100-mt-s-1_62.lib \
|
||||
C:\local\boost_1_62_0\lib64-msvc-10.0\libboost_date_time-vc100-mt-s-1_62.lib \
|
||||
C:\local\boost_1_62_0\lib64-msvc-10.0\libboost_chrono-vc100-mt-s-1_62.lib \
|
||||
C:\Qt\4.8.4\lib\QtCore4.lib C:\Qt\4.8.4\lib\QtXml4.lib
|
||||
CXXFLAGS = -DUSE_TYPED_RSET -EHsc -nologo -FC -D__STDC__=0 -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -Ox -GL -Oy- -W3 -MD -DEPICS_BUILD_DLL -DEPICS_CALL_DLL -c
|
||||
OUTPUT_OPTION = /Fo"$@"
|
||||
LIB_LOCAL = C:\epics\epics-base\lib\win32-x86\Com.lib C:\epics\epics-base\lib\win32-x86\ca.lib \
|
||||
C:\EPICS\CAFE\cpp\cafe.lib \
|
||||
C:\EPICS\boost_1_81_0\stage\lib\\libboost_thread-vc142-mt-x32-1_81.lib \
|
||||
C:\EPICS\boost_1_81_0\stage\lib\\libboost_system-vc142-mt-x32-1_81.lib \
|
||||
C:\EPICS\boost_1_81_0\stage\lib\\libboost_date_time-vc142-mt-x32-1_81.lib \
|
||||
C:\EPICS\boost_1_81_0\stage\lib\\libboost_chrono-vc142-mt-x32-1_81.lib \
|
||||
# C:\Qt\4.8.4\lib\QtCore4.lib C:\Qt\4.8.4\lib\QtXml4.lib
|
||||
|
||||
cafeTest: cafeTest.obj
|
||||
$(CXX) cafeTest.obj $(LIB_LOCAL)
|
||||
link -nologo -LTCG -incremental:no -opt:ref -release cafeTest.obj $(LIB_LOCAL)
|
||||
|
||||
cafeTest.obj: cafeTest.cpp
|
||||
$(CXX) $(CXXFLAGS) $(INCLUDES) /c cafeTest.cpp
|
||||
cafeTest.obj: cafeTest.cc
|
||||
$(CXX) $(CXXFLAGS) $(INCLUDES) cafeTest.cc
|
||||
|
||||
clean:
|
||||
del *.obj
|
||||
|
||||
#"C:\Program Files (x86)\GnuWin32\bin\make"
|
||||
|
||||
|
||||
23
examples/cafeTest/makefile_local_windows7
Normal file
23
examples/cafeTest/makefile_local_windows7
Normal file
@@ -0,0 +1,23 @@
|
||||
INCLUDES = -Ic:\CAFE\CAFE\cpp\include -Ic:\CAFE\CAFE\cpp -Ic:\local\boost_1_62_0 \
|
||||
-Ic:\local\boost_1_62_0\boost -Ic:\epics\base-3.14.12.5\include -Ic:\epics\base-3.14.12.5\include\os\WIN32 \
|
||||
-Ic:\Qt\4.8.4\include
|
||||
CXX=cl
|
||||
CXXFLAGS = /W4 /EHsc
|
||||
OUTPUT_OPTION = /o $@
|
||||
LIB_LOCAL = C:\epics\base-3.14.12.5\lib\windows-x64\Com.lib C:\epics\base-3.14.12.5\lib\windows-x64\ca.lib \
|
||||
C:\CAFE\CAFE\cpp\cafe.lib \
|
||||
C:\local\boost_1_62_0\lib64-msvc-10.0\libboost_thread-vc100-mt-s-1_62.lib \
|
||||
C:\local\boost_1_62_0\lib64-msvc-10.0\libboost_system-vc100-mt-s-1_62.lib \
|
||||
C:\local\boost_1_62_0\lib64-msvc-10.0\libboost_date_time-vc100-mt-s-1_62.lib \
|
||||
C:\local\boost_1_62_0\lib64-msvc-10.0\libboost_chrono-vc100-mt-s-1_62.lib \
|
||||
C:\Qt\4.8.4\lib\QtCore4.lib C:\Qt\4.8.4\lib\QtXml4.lib
|
||||
|
||||
cafeTest: cafeTest.obj
|
||||
$(CXX) cafeTest.obj $(LIB_LOCAL)
|
||||
|
||||
cafeTest.obj: cafeTest.cpp
|
||||
$(CXX) $(CXXFLAGS) $(INCLUDES) /c cafeTest.cpp
|
||||
|
||||
#"C:\Program Files (x86)\GnuWin32\bin\make"
|
||||
|
||||
|
||||
@@ -9,37 +9,40 @@
|
||||
|
||||
|
||||
#CAFE version to link to
|
||||
CAFE_VERSION=pycafe-1.8.0-gcc-6.3.0
|
||||
CAFE_VERSION=cafe-1.15.0-gcc-7.3.0
|
||||
|
||||
|
||||
PYTHON_INCLUDE=/opt/gfa/python-3.5/latest/include/python3.5m
|
||||
PYTHON_LIB=/opt/gfa/python-3.5/latest/lib
|
||||
PYTHON_INCLUDE=/opt/gfa/python-3.7/latest/include/python3.7m
|
||||
PYTHON_LIB=/opt/gfa/python-3.7/latest/lib
|
||||
|
||||
EPICS_BASE=${EPICS}/base
|
||||
|
||||
#CAFE project base
|
||||
CAFE_BASE=/opt/gfa/cafe
|
||||
CAFE_CPP_BASE=${CAFE_BASE}/python/python-3.5
|
||||
CAFE_CPP_BASE=${CAFE_BASE}/python/python-3.7
|
||||
|
||||
CAFE_BASE=/afs/psi.ch/project/cafe/gitlab/CAFE/
|
||||
CAFE_CPP_BASE=${CAFE_BASE}
|
||||
CAFE_VERSION=cpp
|
||||
|
||||
BOOST_BASE=${CAFE_BASE}/boost/boost_1_61_0/include
|
||||
|
||||
|
||||
|
||||
|
||||
INCLUDE_PATH += -I$(CAFE_CPP_BASE)/$(CAFE_VERSION)/include \
|
||||
-I$(EPICS_BASE)/include -I$(EPICS_BASE)/include/os/Linux \
|
||||
-I$(BOOST_BASE) \
|
||||
-I${PYTHON_INCLUDE}
|
||||
|
||||
|
||||
|
||||
LIB_DIR += -L$(EPICS_BASE)/lib/${EPICS_HOST_ARCH} \
|
||||
-Wl,-rpath,$(EPICS_BASE)/lib/${EPICS_HOST_ARCH} \
|
||||
-L$(CAFE_CPP_BASE)/$(CAFE_VERSION)/lib \
|
||||
-Wl,-rpath,$(CAFE_CPP_BASE)/$(CAFE_VERSION)/lib \
|
||||
-L$(CAFE_CPP_BASE)/$(CAFE_VERSION)/src/.libs \
|
||||
-Wl,-rpath,$(CAFE_CPP_BASE)/$(CAFE_VERSION)/src/.libs \
|
||||
-L$(PYTHON_LIB) -Wl,-rpath,$(PYTHON_LIB)
|
||||
|
||||
|
||||
LIBS += -lcafe -lca -lCom -lpython3.5m
|
||||
LIBS += -lcafe -lca -lCom -lpython3.7m
|
||||
|
||||
|
||||
cafeTest: cafeTest.cc
|
||||
g++ cafeTest.cc -o cafeTest \
|
||||
$(INCLUDE_PATH) $(LIB_DIR) $(LIBS)
|
||||
|
||||
50
examples/cafeTest/makefile_py-
Normal file
50
examples/cafeTest/makefile_py-
Normal file
@@ -0,0 +1,50 @@
|
||||
#
|
||||
# Jan Chrin
|
||||
# June 2016
|
||||
#
|
||||
# Makefile to build C++ cafe client
|
||||
#
|
||||
# For cafeClient that needs loadSFGroups we need to
|
||||
# link in python libraries
|
||||
|
||||
|
||||
#CAFE version to link to
|
||||
CAFE_VERSION=pycafe-1.8.0-gcc-6.3.0
|
||||
|
||||
|
||||
PYTHON_INCLUDE=/opt/gfa/python-3.5/latest/include/python3.5m
|
||||
PYTHON_LIB=/opt/gfa/python-3.5/latest/lib
|
||||
|
||||
EPICS_BASE=${EPICS}/base
|
||||
|
||||
#CAFE project base
|
||||
CAFE_BASE=/opt/gfa/cafe
|
||||
CAFE_CPP_BASE=${CAFE_BASE}/python/python-3.5
|
||||
BOOST_BASE=${CAFE_BASE}/boost/boost_1_61_0/include
|
||||
|
||||
|
||||
INCLUDE_PATH += -I$(CAFE_CPP_BASE)/$(CAFE_VERSION)/include \
|
||||
-I$(EPICS_BASE)/include -I$(EPICS_BASE)/include/os/Linux \
|
||||
-I$(BOOST_BASE) \
|
||||
-I${PYTHON_INCLUDE}
|
||||
|
||||
|
||||
|
||||
LIB_DIR += -L$(EPICS_BASE)/lib/${EPICS_HOST_ARCH} \
|
||||
-Wl,-rpath,$(EPICS_BASE)/lib/${EPICS_HOST_ARCH} \
|
||||
-L$(CAFE_CPP_BASE)/$(CAFE_VERSION)/lib \
|
||||
-Wl,-rpath,$(CAFE_CPP_BASE)/$(CAFE_VERSION)/lib \
|
||||
-L$(PYTHON_LIB) -Wl,-rpath,$(PYTHON_LIB)
|
||||
|
||||
|
||||
LIBS += -lcafe -lca -lCom -lpython3.5m
|
||||
|
||||
|
||||
cafeTest: cafeTest.cc
|
||||
g++ cafeTest.cc -o cafeTest \
|
||||
$(INCLUDE_PATH) $(LIB_DIR) $(LIBS)
|
||||
|
||||
|
||||
clean:
|
||||
rm -f cafeTest.o cafeTest
|
||||
|
||||
BIN
examples/cafeTest/monitorTest
Executable file
BIN
examples/cafeTest/monitorTest
Executable file
Binary file not shown.
293
examples/cafeTest/monitorTest.cc
Normal file
293
examples/cafeTest/monitorTest.cc
Normal file
@@ -0,0 +1,293 @@
|
||||
//
|
||||
// A simple example
|
||||
//
|
||||
#include <cafe.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
|
||||
/* Green States */
|
||||
#define FEEDBACK_OFF 0
|
||||
#define READY_FOR_EVENT 1
|
||||
#define CHECKING_TUNE 2
|
||||
#define RAMPING_UP 3
|
||||
#define RAMPING_DOWN 4
|
||||
#define TUNE_OK 5
|
||||
#define IPCT_BELOW_THRESHOLD 6
|
||||
|
||||
/* Yellow States */
|
||||
#define NO_TUNE_VALUE 7
|
||||
#define BAD_TUNE_VALUE 8
|
||||
|
||||
/* Red States */
|
||||
#define CHANNELS_DISCONNECTED 9
|
||||
#define ZERO_NOMINAL_TUNE 10
|
||||
#define ZERO_DQ_MINIMUM 11
|
||||
#define EMERGENCY_OFF 12
|
||||
|
||||
/* Define Anti_States with underscore*/
|
||||
/* Green States */
|
||||
#define _FEEDBACK_ON 100
|
||||
#define _IPCT_ABOVE_THRESHOLD 106
|
||||
|
||||
/* Red State */
|
||||
#define _CHANNELS_CONNECTED 109
|
||||
#define _NON_ZERO_NOMINAL_TUNE 110
|
||||
#define _NON_ZERO_DQ_MINIMUM 111
|
||||
|
||||
|
||||
void callbackHandlerMonitor( struct event_handler_args args) {
|
||||
#define __METHOD__ "callbackHandlerMonitor"
|
||||
|
||||
if (args.status != ECA_NORMAL) {
|
||||
std::cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << std::endl;
|
||||
std::cout << "Status=" << args.status << " for channel " << ca_name (args.chid) << std::endl;
|
||||
//return;
|
||||
//}
|
||||
|
||||
unsigned int _handle = (unsigned long) ca_puser(args.chid);// args.usr; // ca_puser(args.chid);
|
||||
|
||||
cafeConduit_set_by_handle & handle_index = cs.get<by_handle> ();
|
||||
cafeConduit_set_by_handle::iterator it_handle;
|
||||
|
||||
it_handle = handle_index.find((unsigned int)_handle);
|
||||
|
||||
if (it_handle != handle_index.end()) {
|
||||
//std::cout << (*it_handle).getPV() << " " << (*it_handle).getHandle() << std::endl;
|
||||
if(MUTEX){cafeMutex.lock();}
|
||||
handle_index.modify(it_handle, change_eventHandlerArgs (args));
|
||||
if(MUTEX){cafeMutex.unlock();}
|
||||
|
||||
|
||||
//**** ADD USER CODE HERE ***//
|
||||
|
||||
if (args.type < DBR_GR_STRING) {
|
||||
PVDataHolder pvd(args.count);
|
||||
(*it_handle).getPVDataHolder(pvd);
|
||||
pvd.print();
|
||||
//std::cout << "val/D//= " << pvd.getAsString(0) << std::endl;
|
||||
|
||||
}
|
||||
else if (args.type < DBR_PUT_ACKT) {
|
||||
PVCtrlHolder pvc(args.count);
|
||||
(*it_handle).getPVCtrlHolder(pvc);
|
||||
pvc.print();
|
||||
//std::cout << "val/C/= " << pvc.getAsString(0) << std::endl;
|
||||
}
|
||||
|
||||
|
||||
//**** END USER CODE ***//
|
||||
|
||||
}
|
||||
else {
|
||||
std::cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__ << std::endl;
|
||||
std::cout << " Internal CAFE ERROR! Unknown Handle! handle=" << _handle << std::endl;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return;
|
||||
#undef __METHOD__
|
||||
};
|
||||
|
||||
|
||||
|
||||
#define NHANDLES 40
|
||||
#define ALLHANDLES 72*4
|
||||
|
||||
|
||||
int main( int argc, char *argv[] )
|
||||
{
|
||||
using namespace std;
|
||||
|
||||
int poutFlag = 0;
|
||||
|
||||
char message[40];
|
||||
char s[40];
|
||||
sprintf(message," OUTPUT FLAG == %d \n", poutFlag);
|
||||
|
||||
time_t nowJCrhcp=time(NULL);
|
||||
char * theTime=ctime(&nowJCrhcp);
|
||||
strftime(s,36,"/tmp/QX_%Y_%m_%d_%H:%M:%S",localtime(&nowJCrhcp));
|
||||
char * pmac = s;
|
||||
|
||||
cout << s << " " << theTime << endl;
|
||||
cout << pmac << endl;
|
||||
|
||||
open(pmac, O_WRONLY | O_CREAT, 0777);
|
||||
FILE * ofpJCrhcp = fopen(pmac, "w");
|
||||
fprintf(ofpJCrhcp, "%s%s: STARTING Q_CHECK SEQUENCER \n", theTime, "QX");
|
||||
fclose(ofpJCrhcp);
|
||||
|
||||
char theMessage[40];
|
||||
strcpy(theMessage, "FEEDBACK ON\n");
|
||||
|
||||
time_t now=time(NULL);
|
||||
theTime=ctime(&now);
|
||||
FILE * ofp = fopen(pmac, "a");
|
||||
|
||||
fprintf(ofp, "%s%s: %s",theTime, "QX", theMessage);
|
||||
fclose(ofp);
|
||||
|
||||
int code = READY_FOR_EVENT;
|
||||
switch(code) {
|
||||
|
||||
case FEEDBACK_OFF:
|
||||
strcpy(theMessage, "FEEDBACK OFF\n");
|
||||
break;
|
||||
|
||||
case _FEEDBACK_ON:
|
||||
strcpy(theMessage, "FEEDBACK ON\n");
|
||||
break;
|
||||
|
||||
case READY_FOR_EVENT:
|
||||
strcpy(theMessage, "READY FOR EVENT\n");
|
||||
break;
|
||||
|
||||
case RAMPING_UP:
|
||||
strcpy(theMessage, "RAMPING UP\n");
|
||||
break;
|
||||
|
||||
case RAMPING_DOWN:
|
||||
strcpy(theMessage, "RAMPING DOWN\n");
|
||||
break;
|
||||
|
||||
case TUNE_OK:
|
||||
strcpy(theMessage, "TUNE OK\n");
|
||||
break;
|
||||
|
||||
case IPCT_BELOW_THRESHOLD:
|
||||
strcpy(theMessage, "IPCT BELOW THRESHOLD\n");
|
||||
break;
|
||||
|
||||
case _IPCT_ABOVE_THRESHOLD:
|
||||
strcpy(theMessage, "IPCT ABOVE THRESHOLD\n");
|
||||
break;
|
||||
|
||||
case NO_TUNE_VALUE:
|
||||
strcpy(theMessage, "NO TUNE VALUE\n");
|
||||
break;
|
||||
|
||||
case BAD_TUNE_VALUE:
|
||||
strcpy(theMessage, "BAD TUNE VALUE: OUTSIDE ALLOWED RANGE\n");
|
||||
break;
|
||||
|
||||
case CHANNELS_DISCONNECTED:
|
||||
strcpy(theMessage, "CHANNEL DISCONNECTED\n");
|
||||
break;
|
||||
|
||||
case ZERO_NOMINAL_TUNE:
|
||||
strcpy(theMessage, "ZERO NOMINAL TUNE\n");
|
||||
break;
|
||||
|
||||
case _NON_ZERO_NOMINAL_TUNE:
|
||||
strcpy(theMessage, "NOMINAL TUNE NOW NON-ZERO\n");
|
||||
break;
|
||||
|
||||
case ZERO_DQ_MINIMUM:
|
||||
strcpy(theMessage, "ZERO DQ MINIMUM\n");
|
||||
break;
|
||||
|
||||
case _NON_ZERO_DQ_MINIMUM:
|
||||
strcpy(theMessage, "DQ MINIMUM NOW NON-ZERO\n");
|
||||
break;
|
||||
|
||||
case EMERGENCY_OFF:
|
||||
strcpy(theMessage, "RAMPING DOWN\n");
|
||||
break;
|
||||
|
||||
case _CHANNELS_CONNECTED:
|
||||
strcpy(theMessage, "CHANNELS CONNECTED\n");
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
now=time(NULL);
|
||||
theTime=ctime(&now);
|
||||
ofp = fopen(pmac, "a");
|
||||
|
||||
fprintf(ofp, "%s%s: %s",theTime, "QX", theMessage);
|
||||
fclose(ofp);
|
||||
|
||||
|
||||
|
||||
unsigned int hArray [NHANDLES];
|
||||
|
||||
string pvArray[NHANDLES]= {
|
||||
"ARIDI-BPM-03SD:X-AVG", "ARIDI-BPM-03SD:Y-AVG", "ARIDI-BPM-03SD:INT-AVG", "ARIDI-BPM-03SD:GET-ENABLE",
|
||||
"ARIDI-BPM-06SB:X-AVG", "ARIDI-BPM-06SB:Y-AVG", "ARIDI-BPM-06SB:INT-AVG", "ARIDI-BPM-06SB:GET-ENABLE",
|
||||
"ARIDI-BPM-11MB:X-AVG", "ARIDI-BPM-11MB:Y-AVG", "ARIDI-BPM-11MB:INT-AVG", "ARIDI-BPM-11MB:GET-ENABLE",
|
||||
"ARIDI-BPM-09LB:X-AVG", "ARIDI-BPM-09LB:Y-AVG", "ARIDI-BPM-09LB:INT-AVG", "ARIDI-BPM-09LB:GET-ENABLE",
|
||||
"ARIDI-BPM-11SB:X-AVG", "ARIDI-BPM-11SB:Y-AVG", "ARIDI-BPM-11SB:INT-AVG", "ARIDI-BPM-11SB:GET-ENABLE",
|
||||
"ARIDI-BPM-10SB:X-AVG", "ARIDI-BPM-10SB:Y-AVG", "ARIDI-BPM-10SB:INT-AVG", "ARIDI-BPM-10SB:GET-ENABLE",
|
||||
"ARIDI-BPM-04LD:X-AVG", "ARIDI-BPM-04LB:Y-AVG", "ARIDI-BPM-04LD:INT-AVG", "ARIDI-BPM-04LB:GET-ENABLE",
|
||||
"ARIDI-BPM-09LD:X-AVG", "ARIDI-BPM-09LD:Y-AVG", "ARIDI-BPM-09LD:INT-AVG", "ARIDI-BPM-09LD:GET-ENABLE",
|
||||
"ARIDI-BPM-05SE:X-AVG", "ARIDI-BPM-05SE:Y-AVG", "ARIDI-BPM-05SE:INT-AVG", "ARIDI-BPM-05SE:GET-ENABLE",
|
||||
"ARIDI-BPM-09SD:X-AVG", "ARIDI-BPM-09SD:Y-AVG", "ARIDI-BPM-09SD:INT-AVG", "ARIDI-BPM-09SD:GET-ENABLE"
|
||||
};
|
||||
|
||||
char bpmList[73][18]= {"ARIDI-BPM-01LB" , "ARIDI-BPM-01LE" , "ARIDI-BPM-01LD" , "ARIDI-BPM-01SD" , "ARIDI-BPM-01SE" , "ARIDI-BPM-01SB" , "ARIDI-BPM-02SB" , "ARIDI-BPM-02SE" , "ARIDI-BPM-02SD" , "ARIDI-BPM-02MD" , "ARIDI-BPM-02ME" , "ARIDI-BPM-02MB" , "ARIDI-BPM-03MB" , "ARIDI-BPM-03ME" , "ARIDI-BPM-03MD" , "ARIDI-BPM-03SD" , "ARIDI-BPM-03SE" , "ARIDI-BPM-03SB" , "ARIDI-BPM-04SB" , "ARIDI-BPM-04SE" , "ARIDI-BPM-04SD" , "ARIDI-BPM-04LD" , "ARIDI-BPM-04LE" , "ARIDI-BPM-04LB" , "ARIDI-BPM-05LB" , "ARIDI-BPM-05LE" , "ARIDI-BPM-05LD" , "ARIDI-BPM-05SD" , "ARIDI-BPM-05SE" , "ARIDI-BPM-05SB" , "ARIDI-BPM-06SB" , "ARIDI-BPM-06SE" , "ARIDI-BPM-06SD" , "ARIDI-BPM-06MD" , "ARIDI-BPM-06ME" , "ARIDI-BPM-06MB" , "ARIDI-BPM-07MB" , "ARIDI-BPM-07ME" , "ARIDI-BPM-07MD" , "ARIDI-BPM-07SD" , "ARIDI-BPM-07SE" , "ARIDI-BPM-07SB" , "ARIDI-BPM-08SB" , "ARIDI-BPM-08SE" , "ARIDI-BPM-08SD" , "ARIDI-BPM-08LD" , "ARIDI-BPM-08LE" , "ARIDI-BPM-08LB" , "ARIDI-BPM-09LB" , "ARIDI-BPM-09LE" , "ARIDI-BPM-09LD" , "ARIDI-BPM-09SD" , "ARIDI-BPM-09SE" , "ARIDI-BPM-09SB" , "ARIDI-BPM-10SB" , "ARIDI-BPM-10SE" , "ARIDI-BPM-10SD" , "ARIDI-BPM-10MD" , "ARIDI-BPM-10ME" , "ARIDI-BPM-10MB" , "ARIDI-BPM-11MB" , "ARIDI-BPM-11ME" , "ARIDI-BPM-11MD" , "ARIDI-BPM-11SD" , "ARIDI-BPM-11SE" , "ARIDI-BPM-11SB" , "ARIDI-BPM-12SB" , "ARIDI-BPM-12SE" , "ARIDI-BPM-12SD" , "ARIDI-BPM-12LD" , "ARIDI-BPM-12LE" , "ARIDI-BPM-12LB" , "ARIDI-BPM-MP" };
|
||||
|
||||
string dev, att[4], devAtt;
|
||||
int bpmRingMax=73;
|
||||
|
||||
att[1]="X-AVG"; att[2]="Y-AVG"; att[0]="INT-AVG"; att[3]="GET-ENABLE";
|
||||
vector<string> pvArrayString;
|
||||
pvArrayString.reserve(72*4);
|
||||
vector<unsigned int> hArrayString;
|
||||
hArrayString.reserve(72*4);
|
||||
|
||||
|
||||
int ij=0;
|
||||
|
||||
for (int i=0; i<bpmRingMax-1 ; ++i) { // max 72
|
||||
dev=bpmList[i];
|
||||
for (int j=0; j<4; ++j) {
|
||||
devAtt = dev +":" + att[j];
|
||||
pvArrayString.push_back(devAtt);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//Instantaite CAFE
|
||||
CAFE * cafe = new CAFE();
|
||||
|
||||
cafe->openPrepare();
|
||||
cafe->open(pvArrayString, hArrayString); //, ALLHANDLES);
|
||||
cafe->openNowAndWait(4);
|
||||
|
||||
MonitorPolicy mp[ALLHANDLES];
|
||||
for (int i=0; i<ALLHANDLES; ++i) {
|
||||
mp[i].setUserArgs((void *) pvArrayString[i].c_str());
|
||||
mp[i].setHandler(callbackHandlerMonitor);
|
||||
mp[i].setCafeDbrType(CAFENUM::DBR_TIME);
|
||||
mp[i].setMask(DBE_VALUE | DBE_LOG | DBE_ALARM);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
for (int i=0; i<ALLHANDLES; ++i) {
|
||||
cafe->monitorStart(hArrayString[i], mp[i]);
|
||||
cout << pvArrayString[i] << endl;
|
||||
}
|
||||
|
||||
cafe->printDisconnectedHandles();
|
||||
|
||||
while (true) {
|
||||
//for (int i=0; i<100; ++i) {
|
||||
usleep(10000);
|
||||
}
|
||||
|
||||
for (int i=0; i<ALLHANDLES; ++i) {
|
||||
cafe->monitorStop(hArray[i], mp[i]);
|
||||
}
|
||||
|
||||
cafe->closeHandles();
|
||||
|
||||
cafe->terminate();
|
||||
return 0;
|
||||
|
||||
|
||||
}
|
||||
@@ -16,7 +16,8 @@
|
||||
* \brief This class is the holder of values associated with the
|
||||
* EPICS DBR_CTRL_(dataType) control structure of a given handle/pv
|
||||
*/
|
||||
class PVCtrlHolder : public PVHolder {
|
||||
class PVCtrlHolder : public PVHolder
|
||||
{
|
||||
|
||||
friend class CAFE;
|
||||
friend class Connect;
|
||||
@@ -92,7 +93,8 @@ public:
|
||||
|
||||
val.reset( new CAFE_DATATYPE_UNION[nelem] );
|
||||
|
||||
for (unsigned int i=0; i<nelem; ++i) {
|
||||
for (unsigned int i=0; i<nelem; ++i)
|
||||
{
|
||||
val[i].d=0.0;
|
||||
};
|
||||
};
|
||||
@@ -112,7 +114,8 @@ public:
|
||||
{
|
||||
_nelem>0 ? nelem=_nelem : nelem=1;
|
||||
|
||||
if (_nelem>size) {
|
||||
if (_nelem>size)
|
||||
{
|
||||
|
||||
size=_nelem;
|
||||
|
||||
@@ -131,27 +134,31 @@ public:
|
||||
{
|
||||
return units;
|
||||
}
|
||||
|
||||
std::string getUnitsAsString() const
|
||||
{
|
||||
return (std::string) units;
|
||||
}
|
||||
|
||||
/*Defined in PVHolder.h
|
||||
short getNoEnumStrings () const
|
||||
{
|
||||
return noStr;
|
||||
};
|
||||
char * getEnumString(short indx) const
|
||||
{
|
||||
return (char *) strs[indx];
|
||||
return (char *) strs[indx];
|
||||
};
|
||||
|
||||
|
||||
*/
|
||||
|
||||
std::vector<std::string> getEnumStrings() const
|
||||
{
|
||||
|
||||
std::vector<std::string> vEnumStrings;
|
||||
|
||||
vEnumStrings.reserve(noStr>0?noStr:1);
|
||||
for ( short i=0; i<noStr; ++i) {
|
||||
for ( short i=0; i<noStr; ++i)
|
||||
{
|
||||
vEnumStrings.push_back(strs[i]);
|
||||
}
|
||||
return vEnumStrings;
|
||||
@@ -161,10 +168,12 @@ public:
|
||||
short getEnumFromString(std::string enumString)
|
||||
{
|
||||
|
||||
short returnValue=-1;
|
||||
short returnValue=INVALID_ENUM_RETURN_VALUE;
|
||||
|
||||
for ( short i=0; i<noStr; ++i) {
|
||||
if (strcmp(enumString.c_str(), strs[i])==0) {
|
||||
for ( short i=0; i<noStr; ++i)
|
||||
{
|
||||
if (strcmp(enumString.c_str(), strs[i])==0)
|
||||
{
|
||||
return i;
|
||||
}
|
||||
}
|
||||
@@ -173,19 +182,33 @@ public:
|
||||
char pvStripped[MAX_ENUM_STRING_SIZE];
|
||||
helper.removeLeadingAndTrailingSpaces((char *) enumString.c_str(), pvStripped);
|
||||
|
||||
for ( short i=0; i<noStr; ++i) {
|
||||
if (strcmp(pvStripped, strs[i])==0) {
|
||||
for ( short i=0; i<noStr; ++i)
|
||||
{
|
||||
if (strcmp(pvStripped, strs[i])==0)
|
||||
{
|
||||
return i;
|
||||
}
|
||||
}
|
||||
std::cout << "*** WARNING FROM PvCtrlHolder.h ***" << std::endl;
|
||||
std::cout << "*** Method getEnumFromString(string enumString) ***" << std::endl;
|
||||
std::cout << "The given input string '" << enumString << "' was not recognized! " << std::endl;
|
||||
std::cout << "Valid values are: " << std::endl;
|
||||
for ( short i=0; i<noStr; ++i) {
|
||||
std::cout << i << ":" << strs[i] << std::endl;
|
||||
}
|
||||
|
||||
if (dataType==CAFE_ENUM) {
|
||||
std::cout << "*** WARNING FROM PvCtrlHolder.h ***" << std::endl;
|
||||
std::cout << "*** Method getEnumFromString(string enumString) ***" << std::endl;
|
||||
std::cout << "The given input string '" << enumString << "' was not recognized! " << std::endl;
|
||||
if (noStr > 0) {
|
||||
std::cout << "Valid values are: " << std::endl;
|
||||
for ( short i=0; i<noStr; ++i)
|
||||
{
|
||||
std::cout << i << ":" << strs[i] << std::endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
std::cout << "*** WARNING FROM PvCtrlHolder.h ***" << std::endl;
|
||||
std::cout << "*** Method getEnumFromString(string enumString) ***" << std::endl;
|
||||
std::cout << "Native DataType " << (CAFEDataTypeCode().asString((CAFE_DATATYPE) dataType)).c_str()
|
||||
<< " is not the enumerated type, DBF_ENUM " << std::endl;
|
||||
}
|
||||
|
||||
return returnValue;
|
||||
|
||||
@@ -194,26 +217,48 @@ public:
|
||||
std::string getStringFromEnum(unsigned short enumValue) const
|
||||
{
|
||||
|
||||
std::string returnValue="";
|
||||
std::string returnValue=INVALID_ENUM_RETURN_STRING;
|
||||
|
||||
if (enumValue<noStr) {
|
||||
if (enumValue<noStr)
|
||||
{
|
||||
return (std::string) strs[enumValue];
|
||||
}
|
||||
else {
|
||||
std::cout << "*** WARNING FROM PvCtrlHolder.h ***" << std::endl;
|
||||
std::cout << "*** Method getStringFromEnum(unsigned short enumValue) ***" << std::endl;
|
||||
std::cout << "The given input index " << enumValue << " exceeds the number of enum states " << noStr << std::endl;
|
||||
std::cout << "Valid values are: " << std::endl;
|
||||
for ( short i=0; i<noStr; ++i) {
|
||||
std::cout << i << ":" << strs[i] << std::endl;
|
||||
else
|
||||
{
|
||||
if (dataType==CAFE_ENUM) {
|
||||
|
||||
std::cout << "*** WARNING FROM PvCtrlHolder.h ***" << std::endl;
|
||||
std::cout << "*** Method getStringFromEnum(unsigned short enumValue) ***" << std::endl;
|
||||
std::cout << "The given input index [" << enumValue << "] exceeds the number of enum states " << noStr << std::endl;
|
||||
if (noStr > 0)
|
||||
{
|
||||
std::cout << "Valid values are: " << std::endl;
|
||||
for ( short i=0; i<noStr; ++i)
|
||||
{
|
||||
std::cout << i << ":" << strs[i] << std::endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
std::cout << "*** WARNING FROM PvCtrlHolder.h ***" << std::endl;
|
||||
std::cout << "*** Method getStringFromEnum(unsigned short enumValue) ***" << std::endl;
|
||||
std::cout << "Native DataType " << (CAFEDataTypeCode().asString((CAFE_DATATYPE) dataType)).c_str()
|
||||
<< " is not the enumerated type, DBF_ENUM " << std::endl;
|
||||
}
|
||||
|
||||
if (enumValue<MAX_ENUM_STATES) {
|
||||
return returnValue;
|
||||
|
||||
/*
|
||||
if (enumValue<MAX_ENUM_STATES)
|
||||
{
|
||||
return (std::string) strs[enumValue];
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
return returnValue;
|
||||
}
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
||||
@@ -346,7 +391,8 @@ public:
|
||||
std::cout << "------------------------------------------" << std::endl;
|
||||
std::cout << "PVCtrlHolder:" << std::endl;
|
||||
std::cout << "processVariable= " << pv << std::endl;
|
||||
if (strcmp(pvAlias,pv)) {
|
||||
if (strcmp(pvAlias,pv))
|
||||
{
|
||||
std::cout << "pvAlias = " << pvAlias << std::endl;
|
||||
}
|
||||
std::cout << "device = " << device << std::endl;
|
||||
@@ -354,7 +400,8 @@ public:
|
||||
std::cout << "dataType = " << cafeDataTypeCode.message(dataType).c_str()
|
||||
<< " (" << dataType << ") " << std::endl;
|
||||
std::cout << "dbrTypeRequest = " << dbr_type_to_text(dbrDataType)<< std::endl;
|
||||
if (dataType!=CAFE_NO_ACCESS || dataType != CAFE_TYPENOTCONN) {
|
||||
if (dataType!=CAFE_NO_ACCESS || dataType != CAFE_TYPENOTCONN)
|
||||
{
|
||||
std::cout << "nelem = " << nelem << std::endl;
|
||||
|
||||
//std::cout << "alarmStatus = " << alarmStatus << " [" << acond.asString(alarmStatus)<< "]" << std::endl;
|
||||
@@ -377,66 +424,79 @@ public:
|
||||
std::cout << "RISC_Pad = " << (dbr_short_t) RISC_pad.f << std::endl;
|
||||
}
|
||||
*/
|
||||
if (dataType!=CAFE_ENUM) {
|
||||
std::cout << "upperDispLimit = " << getAsString(upperDispLimit) << std::endl;
|
||||
std::cout << "lowerDispLimit = " << getAsString(lowerDispLimit) << std::endl;
|
||||
std::cout << "upperAlarmLimit= " << getAsString(upperAlarmLimit) << std::endl;
|
||||
std::cout << "upperWarnLimit = " << getAsString(upperWarningLimit) << std::endl;
|
||||
std::cout << "lowerWarnLimit = " << getAsString(lowerWarningLimit) << std::endl;
|
||||
std::cout << "lowerAlarmLimit= " << getAsString(lowerAlarmLimit) << std::endl;
|
||||
if(dbr_type_is_CTRL(dbrDataType)) {
|
||||
std::cout << "upperCtrlLimit = " << getAsString(upperCtrlLimit) << std::endl;
|
||||
std::cout << "lowerCtrlLimit = " << getAsString(lowerCtrlLimit) << std::endl;
|
||||
}
|
||||
//if (dataType!=CAFE_ENUM) {
|
||||
std::cout << "upperDispLimit = " << getAsString(upperDispLimit) << std::endl;
|
||||
std::cout << "lowerDispLimit = " << getAsString(lowerDispLimit) << std::endl;
|
||||
std::cout << "upperAlarmLimit= " << getAsString(upperAlarmLimit) << std::endl;
|
||||
std::cout << "upperWarnLimit = " << getAsString(upperWarningLimit) << std::endl;
|
||||
std::cout << "lowerWarnLimit = " << getAsString(lowerWarningLimit) << std::endl;
|
||||
std::cout << "lowerAlarmLimit= " << getAsString(lowerAlarmLimit) << std::endl;
|
||||
if(dbr_type_is_CTRL(dbrDataType))
|
||||
{
|
||||
std::cout << "upperCtrlLimit = " << getAsString(upperCtrlLimit) << std::endl;
|
||||
std::cout << "lowerCtrlLimit = " << getAsString(lowerCtrlLimit) << std::endl;
|
||||
}
|
||||
else {
|
||||
//}
|
||||
//else {
|
||||
if (dataType==CAFE_ENUM)
|
||||
{
|
||||
std::cout << "NoStr (ENUM) = " << noStr << std::endl;
|
||||
std::cout << "strs (ENUM) = " ;
|
||||
for (short i=0; i< noStr; ++i) {
|
||||
for (short i=0; i< noStr; ++i)
|
||||
{
|
||||
std::cout << "{" << strs[i] << "} " ;
|
||||
}
|
||||
std::cout <<std::endl;
|
||||
}
|
||||
|
||||
std::cout << "status = " << cafeStatusCode.message(status).c_str() << std::endl;
|
||||
if(nelem>0) {
|
||||
if(nelem>0)
|
||||
{
|
||||
std::cout << "value(s) = " ;
|
||||
}
|
||||
|
||||
switch (dataType) {
|
||||
switch (dataType)
|
||||
{
|
||||
case CAFE_STRING:
|
||||
for (unsigned int i=0; i <nelemToPrint; ++i ) {
|
||||
for (unsigned int i=0; i <nelemToPrint; ++i )
|
||||
{
|
||||
std::cout << val[i].str << " [" << i << "] " ;
|
||||
}
|
||||
break;
|
||||
case CAFE_SHORT:
|
||||
for (unsigned int i=0; i <nelemToPrint; ++i ) {
|
||||
for (unsigned int i=0; i <nelemToPrint; ++i )
|
||||
{
|
||||
std::cout << val[i].s << " [" << i << "] " ;
|
||||
}
|
||||
break;
|
||||
case CAFE_FLOAT:
|
||||
for (unsigned int i=0; i <nelemToPrint; ++i ) {
|
||||
for (unsigned int i=0; i <nelemToPrint; ++i )
|
||||
{
|
||||
std::cout << val[i].f << " [" << i << "] " ;
|
||||
}
|
||||
break;
|
||||
case CAFE_ENUM:
|
||||
for (unsigned int i=0; i <nelemToPrint; ++i ) {
|
||||
for (unsigned int i=0; i <nelemToPrint; ++i )
|
||||
{
|
||||
std::cout <<
|
||||
getAsString(i) << " (" << val[i].us << ")" << " [" << i << "] " ;
|
||||
}
|
||||
break;
|
||||
case CAFE_CHAR:
|
||||
for (unsigned int i=0; i <nelemToPrint; ++i ) {
|
||||
for (unsigned int i=0; i <nelemToPrint; ++i )
|
||||
{
|
||||
std::cout << (unsigned short) val[i].ch << " [" << i << "] " ;
|
||||
}
|
||||
break;
|
||||
case CAFE_LONG:
|
||||
for (unsigned int i=0; i <nelemToPrint; ++i ) {
|
||||
for (unsigned int i=0; i <nelemToPrint; ++i )
|
||||
{
|
||||
std::cout << val[i].l << " [" << i << "] " ;
|
||||
}
|
||||
break;
|
||||
case CAFE_DOUBLE:
|
||||
for (unsigned int i=0; i <nelemToPrint; ++i ) {
|
||||
for (unsigned int i=0; i <nelemToPrint; ++i )
|
||||
{
|
||||
std::cout << val[i].d << " [" << i << "] " ;
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -16,7 +16,8 @@
|
||||
* \brief This class is the holder of data values associated with
|
||||
* the EPICS DBR_TIME_(dataType) structure of a given handle/pv
|
||||
*/
|
||||
class PVDataHolder : public PVHolder {
|
||||
class PVDataHolder : public PVHolder
|
||||
{
|
||||
|
||||
friend class CAFE;
|
||||
friend class PVGroup;
|
||||
@@ -38,8 +39,8 @@ public:
|
||||
bool hasTS;
|
||||
etsNorm _etsNorm;
|
||||
etsDate _etsDate;
|
||||
TMwdayText tmDay;
|
||||
TMmonthpText tmMonth;
|
||||
TMwdayText tmDay;
|
||||
TMmonthpText tmMonth;
|
||||
|
||||
//Derived class does not inherit constructors
|
||||
PVDataHolder(unsigned int _sizeOfArray)
|
||||
@@ -67,7 +68,8 @@ public:
|
||||
|
||||
val.reset( new CAFE_DATATYPE_UNION[nelem] );
|
||||
|
||||
for (unsigned int i=0; i<nelem; ++i) {
|
||||
for (unsigned int i=0; i<nelem; ++i)
|
||||
{
|
||||
val[i].d=0.0;
|
||||
};
|
||||
};
|
||||
@@ -121,7 +123,8 @@ public:
|
||||
void setHasTS(bool t)
|
||||
{
|
||||
hasTS=t;
|
||||
if (t) {
|
||||
if (t)
|
||||
{
|
||||
hasAlarm=t; //TS will also retrieve alarmStatus
|
||||
}
|
||||
return;
|
||||
@@ -137,7 +140,8 @@ public:
|
||||
|
||||
_nelem>0 ? nelem=_nelem : nelem=1;
|
||||
|
||||
if (nelem>size) {
|
||||
if (nelem>size)
|
||||
{
|
||||
size=nelem;
|
||||
val.reset( new CAFE_DATATYPE_UNION[size] );
|
||||
}
|
||||
@@ -150,7 +154,7 @@ public:
|
||||
return ts;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
etsNorm getEpicsTimeStampAsUInt32()
|
||||
{
|
||||
@@ -166,7 +170,8 @@ public:
|
||||
|
||||
//This may happen in timeouts; epicsTime convertor will report overflow error
|
||||
//However this possibility is now captured in conduitFriend.h and other
|
||||
if(ts.nsec >= 1000000000) {
|
||||
if(ts.nsec >= 1000000000)
|
||||
{
|
||||
std::cout << "OVERFLOW IN gets.nsec CORRECTED for epicsTime converter " << std::endl;
|
||||
ts.nsec=0;
|
||||
}
|
||||
@@ -181,11 +186,11 @@ public:
|
||||
_etsDate.min = local.ansi_tm.tm_min;
|
||||
_etsDate.sec = local.ansi_tm.tm_sec;
|
||||
_etsDate.nsec = (unsigned long) ts.nsec;
|
||||
|
||||
_etsDate.wday = local.ansi_tm.tm_wday;
|
||||
_etsDate.yday = local.ansi_tm.tm_yday;
|
||||
_etsDate.isdst = local.ansi_tm.tm_isdst;
|
||||
|
||||
|
||||
_etsDate.wday = local.ansi_tm.tm_wday;
|
||||
_etsDate.yday = local.ansi_tm.tm_yday;
|
||||
_etsDate.isdst = local.ansi_tm.tm_isdst;
|
||||
|
||||
return _etsDate;
|
||||
}
|
||||
|
||||
@@ -205,47 +210,49 @@ public:
|
||||
_etsDate.min = local->tm_min;
|
||||
_etsDate.sec = local->tm_sec;
|
||||
_etsDate.nsec = (unsigned long) ts.nsec;
|
||||
|
||||
_etsDate.wday = local->tm_wday;
|
||||
_etsDate.yday = local->tm_yday;
|
||||
_etsDate.isdst = local->tm_isdst;
|
||||
|
||||
|
||||
_etsDate.wday = local->tm_wday;
|
||||
_etsDate.yday = local->tm_yday;
|
||||
_etsDate.isdst = local->tm_isdst;
|
||||
|
||||
return _etsDate;
|
||||
}
|
||||
|
||||
|
||||
std::string getEpicsTimeStampAsString() {
|
||||
|
||||
std::string getEpicsTimeStampAsString()
|
||||
{
|
||||
|
||||
time_t t= ts.secPastEpoch;
|
||||
struct tm * local;
|
||||
local=localtime(&t);
|
||||
char buf[40];
|
||||
local->tm_year=local->tm_year+20; //EPICS Time is 20 years out!
|
||||
strftime (buf,80,"%b %d, %Y %T.",local);
|
||||
std::string date=(std::string) buf;
|
||||
|
||||
char buft[10];
|
||||
sprintf(buft,"%d",ts.nsec);
|
||||
date.append((std::string) buft);
|
||||
|
||||
return date;
|
||||
}
|
||||
|
||||
std::string getBSTimeStampAsString() {
|
||||
|
||||
char buf[40];
|
||||
local->tm_year=local->tm_year+20; //EPICS Time is 20 years out!
|
||||
strftime (buf,80,"%b %d, %Y %T.",local);
|
||||
std::string date=(std::string) buf;
|
||||
|
||||
char buft[10];
|
||||
sprintf(buft,"%d",ts.nsec);
|
||||
date.append((std::string) buft);
|
||||
|
||||
return date;
|
||||
}
|
||||
|
||||
std::string getBSTimeStampAsString()
|
||||
{
|
||||
|
||||
time_t t= ts.secPastEpoch;
|
||||
|
||||
struct tm * local;
|
||||
local=localtime(&t);
|
||||
char buf[40];
|
||||
strftime (buf,80,"%b %d, %Y %T.",local);
|
||||
std::string date=(std::string) buf;
|
||||
char buft[10];
|
||||
sprintf(buft,"%d",ts.nsec);
|
||||
date.append((std::string) buft);
|
||||
|
||||
return date;
|
||||
}
|
||||
char buf[40];
|
||||
strftime (buf,80,"%b %d, %Y %T.",local);
|
||||
std::string date=(std::string) buf;
|
||||
char buft[10];
|
||||
sprintf(buft,"%d",ts.nsec);
|
||||
date.append((std::string) buft);
|
||||
|
||||
return date;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -257,7 +264,8 @@ public:
|
||||
void print(unsigned int nelemToPrint)
|
||||
{
|
||||
nelemToPrint=std::min(nelemToPrint,nelem);
|
||||
if (strcmp(pv,"")==0) {
|
||||
if (strcmp(pv,"")==0)
|
||||
{
|
||||
std::cout << "Process Variable NOT ASSIGNED!" << std::endl;
|
||||
std::cout << "Variable has not been applied to a get operation!" << std::endl;
|
||||
return;
|
||||
@@ -268,7 +276,8 @@ public:
|
||||
|
||||
|
||||
std::cout << "processVariable= " << pv << std::endl;
|
||||
if (strcmp(pvAlias,pv) && strcmp(pvAlias,"")) {
|
||||
if (strcmp(pvAlias,pv) && strcmp(pvAlias,""))
|
||||
{
|
||||
std::cout << "pvAlias = " << pvAlias << std::endl;
|
||||
}
|
||||
std::cout << "device = " << device << std::endl;
|
||||
@@ -280,34 +289,41 @@ public:
|
||||
|
||||
//std::cout << "dataType = " << CAFEDataTypeCode.message(dataType).c_str() << std::endl;
|
||||
|
||||
if (dataType != CAFE_NO_ACCESS && dataType != CAFE_TYPENOTCONN) {
|
||||
if (dataType != CAFE_NO_ACCESS && dataType != CAFE_TYPENOTCONN)
|
||||
{
|
||||
std::cout << "nelem = ";
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
std::cout << "nelem = ";
|
||||
}
|
||||
std::cout << nelem;
|
||||
std::cout << std::endl;
|
||||
if(!rule) {
|
||||
if(!rule)
|
||||
{
|
||||
std::cout << "rule (0=false) = " << rule <<std::endl;
|
||||
}
|
||||
|
||||
if (dbr_type_is_STS(dbrDataType) || dbr_type_is_TIME(dbrDataType) ) {
|
||||
if (dbr_type_is_STS(dbrDataType) || dbr_type_is_TIME(dbrDataType) )
|
||||
{
|
||||
|
||||
std::cout << "alarmStatus = " << acond.asString(alarmStatus) << " (" << alarmStatus << ")" << std::endl;
|
||||
std::cout << "alarmSeverity = " << aseve.asString(alarmSeverity) << " (" <<alarmSeverity << ")" << std::endl;
|
||||
|
||||
if (dbr_type_is_TIME(dbrDataType)) {
|
||||
if (dbr_type_is_TIME(dbrDataType))
|
||||
{
|
||||
std::cout << "timeStamp = " << ts.secPastEpoch << " sec. and " << ts.nsec << " nsec" << std::endl;
|
||||
}
|
||||
}
|
||||
if(beamEventNo!=0) {
|
||||
if(beamEventNo!=0)
|
||||
{
|
||||
std::cout << "pulseID = " << beamEventNo << std::endl;
|
||||
};
|
||||
std::cout << "status = " << cafeStatusCode.message(status).c_str() << " (" << status << ") " << std::endl;
|
||||
std::cout << "value(s) = " ;
|
||||
|
||||
switch (dataType) {
|
||||
switch (dataType)
|
||||
{
|
||||
case CAFE_STRING:
|
||||
for (unsigned int i=0; i <nelemToPrint; ++i ) std::cout << val[i].str << " [" << i << "] " ;
|
||||
break;
|
||||
@@ -318,7 +334,8 @@ public:
|
||||
for (unsigned int i=0; i <nelemToPrint; ++i ) std::cout << val[i].f << " [" << i << "] " ;
|
||||
break;
|
||||
case CAFE_ENUM:
|
||||
for (unsigned int i=0; i <nelemToPrint; ++i ) {
|
||||
for (unsigned int i=0; i <nelemToPrint; ++i )
|
||||
{
|
||||
std::cout <<
|
||||
getAsString(i) << " (" << val[i].us << ")" << " [" << i << "] " ;
|
||||
}
|
||||
|
||||
@@ -16,7 +16,8 @@
|
||||
* class MemberMap
|
||||
* maps string to index
|
||||
*/
|
||||
class MemberMap {
|
||||
class MemberMap
|
||||
{
|
||||
typedef std::map<long, std::string> mapLongString;
|
||||
private:
|
||||
mapLongString mapNameIndex;
|
||||
@@ -47,9 +48,11 @@ public:
|
||||
helper.removeLeadingAndTrailingSpaces(_Name.c_str(), pvStripped);
|
||||
std::string Name=pvStripped;
|
||||
|
||||
for (pos=mapNameIndex.begin(); pos != mapNameIndex.end(); ++pos) {
|
||||
for (pos=mapNameIndex.begin(); pos != mapNameIndex.end(); ++pos)
|
||||
{
|
||||
|
||||
if (pos->second==Name) {
|
||||
if (pos->second==Name)
|
||||
{
|
||||
return pos->first;
|
||||
}
|
||||
// String searches such as s.find(s1) return string::npos on failure
|
||||
@@ -66,7 +69,8 @@ public:
|
||||
* This class is the holder of PVDataHolder objects associated with
|
||||
* of group of handles
|
||||
*/
|
||||
class PVGroup {
|
||||
class PVGroup
|
||||
{
|
||||
friend class Connect;
|
||||
friend class CAFE;
|
||||
//if HAVE_LIBQTXML
|
||||
@@ -103,9 +107,10 @@ public:
|
||||
{
|
||||
return pvdata;
|
||||
};
|
||||
PVDataHolder getPVData(unsigned int idx) throw(std::out_of_range)
|
||||
PVDataHolder getPVData(unsigned int idx) noexcept(false) //throw(std::out_of_range)
|
||||
{
|
||||
if(isIndexOutOfRange(idx)) {
|
||||
if(isIndexOutOfRange(idx))
|
||||
{
|
||||
std::ostringstream oss;
|
||||
oss << "Exception! Index " << idx <<
|
||||
" to PVGroup.pvdata() is out of range. Valid range is from 0 to " << npv-1;
|
||||
@@ -115,13 +120,15 @@ public:
|
||||
};
|
||||
void setHasAlarm(bool h)
|
||||
{
|
||||
for (unsigned int i=0; i<npv; ++i) {
|
||||
for (unsigned int i=0; i<npv; ++i)
|
||||
{
|
||||
pvdata[i].setHasAlarm(h);
|
||||
}
|
||||
}
|
||||
void setHasTS(bool h)
|
||||
{
|
||||
for (unsigned int i=0; i<npv; ++i) {
|
||||
for (unsigned int i=0; i<npv; ++i)
|
||||
{
|
||||
pvdata[i].setHasTS(h);
|
||||
}
|
||||
}
|
||||
@@ -231,11 +238,13 @@ public:
|
||||
std::cout << "PVGROUP: " << name << " HAS " << npv << " MEMBERS " << std::endl;
|
||||
std::cout << "PRINTING THE REQUESTED " << npvToPrint << " MEMBERS " << std::endl;
|
||||
std::cout << "OVERALL STATUS OF GROUP REPORTS " << statusGroup << std::endl;
|
||||
if (statusGroup!=ICAFE_NORMAL) {
|
||||
if (statusGroup!=ICAFE_NORMAL)
|
||||
{
|
||||
CAFEStatus cstat;
|
||||
cstat.report(statusGroup);
|
||||
}
|
||||
for (unsigned int i=0; i<npvToPrint; ++i) {
|
||||
for (unsigned int i=0; i<npvToPrint; ++i)
|
||||
{
|
||||
std::cout << "------------------------------------------" << std::endl;
|
||||
std::cout << "Element [" << i << "] of " << npvToPrint << " in group: " << name << std::endl;
|
||||
pvdata[i].print();
|
||||
@@ -248,11 +257,13 @@ public:
|
||||
std::cout << "PVGROUP: " << name << " HAS " << npv << " MEMBERS " << std::endl;
|
||||
std::cout << "PRINTING THE REQUESTED " << npvToPrint << " MEMBERS " << std::endl;
|
||||
std::cout << "OVERALL STATUS OF GROUP REPORTS " << statusGroup << std::endl;
|
||||
if (statusGroup!=ICAFE_NORMAL) {
|
||||
if (statusGroup!=ICAFE_NORMAL)
|
||||
{
|
||||
CAFEStatus cstat;
|
||||
cstat.report(statusGroup);
|
||||
}
|
||||
for (unsigned int i=0; i<npvToPrint; ++i) {
|
||||
for (unsigned int i=0; i<npvToPrint; ++i)
|
||||
{
|
||||
std::cout << "------------------------------------------" << std::endl;
|
||||
std::cout << "Element [" << i << "] of " << npvToPrint << " in group: " << name << std::endl;
|
||||
pvdata[i].print(std::min(maxNelemWF,pvdata[i].getNelem()));
|
||||
@@ -263,9 +274,12 @@ public:
|
||||
{
|
||||
unsigned int npvToPrint=npv;
|
||||
bool iErrorFound=false;
|
||||
for (unsigned int i=0; i<npvToPrint; ++i) {
|
||||
if (pvdata[i].getStatus() != ICAFE_NORMAL) {
|
||||
if(!iErrorFound) {
|
||||
for (unsigned int i=0; i<npvToPrint; ++i)
|
||||
{
|
||||
if (pvdata[i].getStatus() != ICAFE_NORMAL)
|
||||
{
|
||||
if(!iErrorFound)
|
||||
{
|
||||
std::cout << "PVGROUP: " << name << " HAS " << npv << " MEMBERS " << std::endl;
|
||||
std::cout << "PRINTING PV TRANSACTIONS WITH ERRORS " << std::endl;
|
||||
iErrorFound=true;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,3 +1,5 @@
|
||||
/* Generated by Cython 0.29.2 */
|
||||
|
||||
#ifndef __PYX_HAVE__PyCafe
|
||||
#define __PYX_HAVE__PyCafe
|
||||
|
||||
@@ -5,24 +7,39 @@
|
||||
#ifndef __PYX_HAVE_API__PyCafe
|
||||
|
||||
#ifndef __PYX_EXTERN_C
|
||||
#ifdef __cplusplus
|
||||
#define __PYX_EXTERN_C extern "C"
|
||||
#else
|
||||
#define __PYX_EXTERN_C extern
|
||||
#endif
|
||||
#ifdef __cplusplus
|
||||
#define __PYX_EXTERN_C extern "C"
|
||||
#else
|
||||
#define __PYX_EXTERN_C extern
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef DL_IMPORT
|
||||
#define DL_IMPORT(_T) _T
|
||||
#define DL_IMPORT(_T) _T
|
||||
#endif
|
||||
|
||||
__PYX_EXTERN_C DL_IMPORT(void) py_cb_wrapper(PVDataHolder, unsigned int, std::string);
|
||||
__PYX_EXTERN_C DL_IMPORT(void) py_cb_ctrl_wrapper(PVCtrlHolder, unsigned int, std::string);
|
||||
__PYX_EXTERN_C DL_IMPORT(void) py_cb_handle_wrapper(unsigned int);
|
||||
__PYX_EXTERN_C DL_IMPORT(void) py_cb_handle_monid_wrapper(unsigned int, unsigned long);
|
||||
__PYX_EXTERN_C void cy_monitor_handler_wrapper(void *);
|
||||
__PYX_EXTERN_C void cy_data_event_handler_wrapper(void *, unsigned int, std::string, PVDataHolder);
|
||||
__PYX_EXTERN_C void cy_ctrl_event_handler_wrapper(void *, unsigned int, std::string, PVCtrlHolder);
|
||||
__PYX_EXTERN_C void cy_event_handler_wrapper(void *, unsigned int, std::string);
|
||||
__PYX_EXTERN_C void cy_handle_handler_wrapper(void *, unsigned int);
|
||||
__PYX_EXTERN_C void cy_connect_handler_wrapper(void *, unsigned int, std::string, int);
|
||||
__PYX_EXTERN_C void py_cb_wrapper(PVDataHolder, unsigned int, std::string);
|
||||
__PYX_EXTERN_C void py_cb_ctrl_wrapper(PVCtrlHolder, unsigned int, std::string);
|
||||
__PYX_EXTERN_C void py_cb_handle_wrapper(unsigned int);
|
||||
__PYX_EXTERN_C void py_cb_handle_monid_wrapper(unsigned int, unsigned long);
|
||||
__PYX_EXTERN_C void cy_cb_handle_get_wrapper(void *, unsigned int);
|
||||
__PYX_EXTERN_C void py_cb_handle_get_wrapper(unsigned int);
|
||||
__PYX_EXTERN_C void cy_cb_handle_put_wrapper(void *, unsigned int);
|
||||
__PYX_EXTERN_C void py_cb_handle_put_wrapper(unsigned int);
|
||||
__PYX_EXTERN_C void py_cb_handle_open_wrapper(unsigned int, int);
|
||||
__PYX_EXTERN_C void py_cb_handle_connect_wrapper(unsigned int, std::string, int);
|
||||
|
||||
#endif /* !__PYX_HAVE_API__PyCafe */
|
||||
|
||||
/* WARNING: the interface of the module init function changed in CPython 3.5. */
|
||||
/* It now returns a PyModuleDef instance instead of a PyModule instance. */
|
||||
|
||||
#if PY_MAJOR_VERSION < 3
|
||||
PyMODINIT_FUNC initPyCafe(void);
|
||||
#else
|
||||
|
||||
@@ -1,125 +0,0 @@
|
||||
/* Generated by Cython 0.23.4 */
|
||||
|
||||
#ifndef __PYX_HAVE_API__PyCafe
|
||||
#define __PYX_HAVE_API__PyCafe
|
||||
#include "Python.h"
|
||||
|
||||
static void (*__pyx_api_f_6PyCafe_py_cb_wrapper)(PVDataHolder, unsigned int, std::string) = 0;
|
||||
#define py_cb_wrapper __pyx_api_f_6PyCafe_py_cb_wrapper
|
||||
static void (*__pyx_api_f_6PyCafe_py_cb_ctrl_wrapper)(PVCtrlHolder, unsigned int, std::string) = 0;
|
||||
#define py_cb_ctrl_wrapper __pyx_api_f_6PyCafe_py_cb_ctrl_wrapper
|
||||
static void (*__pyx_api_f_6PyCafe_py_cb_handle_wrapper)(unsigned int) = 0;
|
||||
#define py_cb_handle_wrapper __pyx_api_f_6PyCafe_py_cb_handle_wrapper
|
||||
static void (*__pyx_api_f_6PyCafe_py_cb_handle_monid_wrapper)(unsigned int, unsigned long) = 0;
|
||||
#define py_cb_handle_monid_wrapper __pyx_api_f_6PyCafe_py_cb_handle_monid_wrapper
|
||||
static void (*__pyx_api_f_6PyCafe_py_cb_handle_get_wrapper)(unsigned int) = 0;
|
||||
#define py_cb_handle_get_wrapper __pyx_api_f_6PyCafe_py_cb_handle_get_wrapper
|
||||
static void (*__pyx_api_f_6PyCafe_py_cb_handle_put_wrapper)(unsigned int) = 0;
|
||||
#define py_cb_handle_put_wrapper __pyx_api_f_6PyCafe_py_cb_handle_put_wrapper
|
||||
#if !defined(__Pyx_PyIdentifier_FromString)
|
||||
#if PY_MAJOR_VERSION < 3
|
||||
#define __Pyx_PyIdentifier_FromString(s) PyString_FromString(s)
|
||||
#else
|
||||
#define __Pyx_PyIdentifier_FromString(s) PyUnicode_FromString(s)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef __PYX_HAVE_RT_ImportModule
|
||||
#define __PYX_HAVE_RT_ImportModule
|
||||
static PyObject *__Pyx_ImportModule(const char *name)
|
||||
{
|
||||
PyObject *py_name = 0;
|
||||
PyObject *py_module = 0;
|
||||
py_name = __Pyx_PyIdentifier_FromString(name);
|
||||
if (!py_name)
|
||||
goto bad;
|
||||
py_module = PyImport_Import(py_name);
|
||||
Py_DECREF(py_name);
|
||||
return py_module;
|
||||
bad:
|
||||
Py_XDECREF(py_name);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef __PYX_HAVE_RT_ImportFunction
|
||||
#define __PYX_HAVE_RT_ImportFunction
|
||||
static int __Pyx_ImportFunction(PyObject *module, const char *funcname, void (**f)(void), const char *sig)
|
||||
{
|
||||
PyObject *d = 0;
|
||||
PyObject *cobj = 0;
|
||||
union {
|
||||
void (*fp)(void);
|
||||
void *p;
|
||||
} tmp;
|
||||
d = PyObject_GetAttrString(module, (char *)"__pyx_capi__");
|
||||
if (!d)
|
||||
goto bad;
|
||||
cobj = PyDict_GetItemString(d, funcname);
|
||||
if (!cobj) {
|
||||
PyErr_Format(PyExc_ImportError,
|
||||
"%.200s does not export expected C function %.200s",
|
||||
PyModule_GetName(module), funcname);
|
||||
goto bad;
|
||||
}
|
||||
#if PY_VERSION_HEX >= 0x02070000
|
||||
if (!PyCapsule_IsValid(cobj, sig)) {
|
||||
PyErr_Format(PyExc_TypeError,
|
||||
"C function %.200s.%.200s has wrong signature (expected %.500s, got %.500s)",
|
||||
PyModule_GetName(module), funcname, sig, PyCapsule_GetName(cobj));
|
||||
goto bad;
|
||||
}
|
||||
tmp.p = PyCapsule_GetPointer(cobj, sig);
|
||||
#else
|
||||
{
|
||||
const char *desc, *s1, *s2;
|
||||
desc = (const char *)PyCObject_GetDesc(cobj);
|
||||
if (!desc)
|
||||
goto bad;
|
||||
s1 = desc;
|
||||
s2 = sig;
|
||||
while (*s1 != '\0' && *s1 == *s2) {
|
||||
s1++;
|
||||
s2++;
|
||||
}
|
||||
if (*s1 != *s2) {
|
||||
PyErr_Format(PyExc_TypeError,
|
||||
"C function %.200s.%.200s has wrong signature (expected %.500s, got %.500s)",
|
||||
PyModule_GetName(module), funcname, sig, desc);
|
||||
goto bad;
|
||||
}
|
||||
tmp.p = PyCObject_AsVoidPtr(cobj);
|
||||
}
|
||||
#endif
|
||||
*f = tmp.fp;
|
||||
if (!(*f))
|
||||
goto bad;
|
||||
Py_DECREF(d);
|
||||
return 0;
|
||||
bad:
|
||||
Py_XDECREF(d);
|
||||
return -1;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
static int import_PyCafe(void)
|
||||
{
|
||||
PyObject *module = 0;
|
||||
module = __Pyx_ImportModule("PyCafe");
|
||||
if (!module) goto bad;
|
||||
if (__Pyx_ImportFunction(module, "py_cb_wrapper", (void (**)(void))&__pyx_api_f_6PyCafe_py_cb_wrapper, "void (PVDataHolder, unsigned int, std::string)") < 0) goto bad;
|
||||
if (__Pyx_ImportFunction(module, "py_cb_ctrl_wrapper", (void (**)(void))&__pyx_api_f_6PyCafe_py_cb_ctrl_wrapper, "void (PVCtrlHolder, unsigned int, std::string)") < 0) goto bad;
|
||||
if (__Pyx_ImportFunction(module, "py_cb_handle_wrapper", (void (**)(void))&__pyx_api_f_6PyCafe_py_cb_handle_wrapper, "void (unsigned int)") < 0) goto bad;
|
||||
if (__Pyx_ImportFunction(module, "py_cb_handle_monid_wrapper", (void (**)(void))&__pyx_api_f_6PyCafe_py_cb_handle_monid_wrapper, "void (unsigned int, unsigned long)") < 0) goto bad;
|
||||
if (__Pyx_ImportFunction(module, "py_cb_handle_get_wrapper", (void (**)(void))&__pyx_api_f_6PyCafe_py_cb_handle_get_wrapper, "void (unsigned int)") < 0) goto bad;
|
||||
if (__Pyx_ImportFunction(module, "py_cb_handle_put_wrapper", (void (**)(void))&__pyx_api_f_6PyCafe_py_cb_handle_put_wrapper, "void (unsigned int)") < 0) goto bad;
|
||||
Py_DECREF(module);
|
||||
module = 0;
|
||||
return 0;
|
||||
bad:
|
||||
Py_XDECREF(module);
|
||||
return -1;
|
||||
}
|
||||
|
||||
#endif /* !__PYX_HAVE_API__PyCafe */
|
||||
@@ -16,6 +16,10 @@ static void (*__pyx_api_f_6PyCafe_py_cb_handle_get_wrapper)(unsigned int) = 0;
|
||||
#define py_cb_handle_get_wrapper __pyx_api_f_6PyCafe_py_cb_handle_get_wrapper
|
||||
static void (*__pyx_api_f_6PyCafe_py_cb_handle_put_wrapper)(unsigned int) = 0;
|
||||
#define py_cb_handle_put_wrapper __pyx_api_f_6PyCafe_py_cb_handle_put_wrapper
|
||||
static void (*__pyx_api_f_6PyCafe_py_cb_handle_open_wrapper)(unsigned int, int) = 0;
|
||||
#define py_cb_handle_open_wrapper __pyx_api_f_6PyCafe_py_cb_handle_open_wrapper
|
||||
static void (*__pyx_api_f_6PyCafe_py_cb_handle_connect_wrapper)(unsigned int, std::string, int) = 0;
|
||||
#define py_cb_handle_connect_wrapper __pyx_api_f_6PyCafe_py_cb_handle_connect_wrapper
|
||||
#if !defined(__Pyx_PyIdentifier_FromString)
|
||||
#if PY_MAJOR_VERSION < 3
|
||||
#define __Pyx_PyIdentifier_FromString(s) PyString_FromString(s)
|
||||
@@ -48,7 +52,8 @@ static int __Pyx_ImportFunction(PyObject *module, const char *funcname, void (**
|
||||
{
|
||||
PyObject *d = 0;
|
||||
PyObject *cobj = 0;
|
||||
union {
|
||||
union
|
||||
{
|
||||
void (*fp)(void);
|
||||
void *p;
|
||||
} tmp;
|
||||
@@ -56,14 +61,16 @@ static int __Pyx_ImportFunction(PyObject *module, const char *funcname, void (**
|
||||
if (!d)
|
||||
goto bad;
|
||||
cobj = PyDict_GetItemString(d, funcname);
|
||||
if (!cobj) {
|
||||
if (!cobj)
|
||||
{
|
||||
PyErr_Format(PyExc_ImportError,
|
||||
"%.200s does not export expected C function %.200s",
|
||||
PyModule_GetName(module), funcname);
|
||||
goto bad;
|
||||
}
|
||||
#if PY_VERSION_HEX >= 0x02070000
|
||||
if (!PyCapsule_IsValid(cobj, sig)) {
|
||||
if (!PyCapsule_IsValid(cobj, sig))
|
||||
{
|
||||
PyErr_Format(PyExc_TypeError,
|
||||
"C function %.200s.%.200s has wrong signature (expected %.500s, got %.500s)",
|
||||
PyModule_GetName(module), funcname, sig, PyCapsule_GetName(cobj));
|
||||
@@ -78,11 +85,13 @@ static int __Pyx_ImportFunction(PyObject *module, const char *funcname, void (**
|
||||
goto bad;
|
||||
s1 = desc;
|
||||
s2 = sig;
|
||||
while (*s1 != '\0' && *s1 == *s2) {
|
||||
while (*s1 != '\0' && *s1 == *s2)
|
||||
{
|
||||
s1++;
|
||||
s2++;
|
||||
}
|
||||
if (*s1 != *s2) {
|
||||
if (*s1 != *s2)
|
||||
{
|
||||
PyErr_Format(PyExc_TypeError,
|
||||
"C function %.200s.%.200s has wrong signature (expected %.500s, got %.500s)",
|
||||
PyModule_GetName(module), funcname, sig, desc);
|
||||
@@ -114,6 +123,8 @@ static int import_PyCafe(void)
|
||||
if (__Pyx_ImportFunction(module, "py_cb_handle_monid_wrapper", (void (**)(void))&__pyx_api_f_6PyCafe_py_cb_handle_monid_wrapper, "void (unsigned int, unsigned long)") < 0) goto bad;
|
||||
if (__Pyx_ImportFunction(module, "py_cb_handle_get_wrapper", (void (**)(void))&__pyx_api_f_6PyCafe_py_cb_handle_get_wrapper, "void (unsigned int)") < 0) goto bad;
|
||||
if (__Pyx_ImportFunction(module, "py_cb_handle_put_wrapper", (void (**)(void))&__pyx_api_f_6PyCafe_py_cb_handle_put_wrapper, "void (unsigned int)") < 0) goto bad;
|
||||
if (__Pyx_ImportFunction(module, "py_cb_handle_open_wrapper", (void (**)(void))&__pyx_api_f_6PyCafe_py_cb_handle_open_wrapper, "void (unsigned int, int)") < 0) goto bad;
|
||||
if (__Pyx_ImportFunction(module, "py_cb_handle_connect_wrapper", (void (**)(void))&__pyx_api_f_6PyCafe_py_cb_handle_connect_wrapper, "void (unsigned int, std::string, int)") < 0) goto bad;
|
||||
Py_DECREF(module);
|
||||
module = 0;
|
||||
return 0;
|
||||
|
||||
46
include/PyCafe_sf.h
Normal file
46
include/PyCafe_sf.h
Normal file
@@ -0,0 +1,46 @@
|
||||
/* Generated by Cython 0.29.2 */
|
||||
|
||||
#ifndef __PYX_HAVE__PyCafe
|
||||
#define __PYX_HAVE__PyCafe
|
||||
|
||||
|
||||
#ifndef __PYX_HAVE_API__PyCafe
|
||||
|
||||
#ifndef __PYX_EXTERN_C
|
||||
#ifdef __cplusplus
|
||||
#define __PYX_EXTERN_C extern "C"
|
||||
#else
|
||||
#define __PYX_EXTERN_C extern
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef DL_IMPORT
|
||||
#define DL_IMPORT(_T) _T
|
||||
#endif
|
||||
|
||||
__PYX_EXTERN_C void cy_data_event_handler_wrapper(void *, unsigned int, std::string, PVDataHolder);
|
||||
__PYX_EXTERN_C void cy_ctrl_event_handler_wrapper(void *, unsigned int, std::string, PVCtrlHolder);
|
||||
__PYX_EXTERN_C void cy_event_handler_wrapper(void *, unsigned int, std::string);
|
||||
__PYX_EXTERN_C void cy_handle_handler_wrapper(void *, unsigned int);
|
||||
__PYX_EXTERN_C void cy_connect_handler_wrapper(void *, unsigned int, std::string, int);
|
||||
__PYX_EXTERN_C void py_cb_wrapper(PVDataHolder, unsigned int, std::string);
|
||||
__PYX_EXTERN_C void py_cb_ctrl_wrapper(PVCtrlHolder, unsigned int, std::string);
|
||||
__PYX_EXTERN_C void py_cb_handle_wrapper(unsigned int);
|
||||
__PYX_EXTERN_C void py_cb_handle_monid_wrapper(unsigned int, unsigned long);
|
||||
__PYX_EXTERN_C void py_cb_handle_get_wrapper(unsigned int);
|
||||
__PYX_EXTERN_C void py_cb_handle_put_wrapper(unsigned int);
|
||||
__PYX_EXTERN_C void py_cb_handle_open_wrapper(unsigned int, int);
|
||||
__PYX_EXTERN_C void py_cb_handle_connect_wrapper(unsigned int, std::string, int);
|
||||
|
||||
#endif /* !__PYX_HAVE_API__PyCafe */
|
||||
|
||||
/* WARNING: the interface of the module init function changed in CPython 3.5. */
|
||||
/* It now returns a PyModuleDef instance instead of a PyModule instance. */
|
||||
|
||||
#if PY_MAJOR_VERSION < 3
|
||||
PyMODINIT_FUNC initPyCafe(void);
|
||||
#else
|
||||
PyMODINIT_FUNC PyInit_PyCafe(void);
|
||||
#endif
|
||||
|
||||
#endif /* !__PYX_HAVE__PyCafe */
|
||||
123
include/bitshuffle/bitshuffle.h
Normal file
123
include/bitshuffle/bitshuffle.h
Normal file
@@ -0,0 +1,123 @@
|
||||
/*
|
||||
* Bitshuffle - Filter for improving compression of typed binary data.
|
||||
*
|
||||
* This file is part of Bitshuffle
|
||||
* Author: Kiyoshi Masui <kiyo@physics.ubc.ca>
|
||||
* Website: http://www.github.com/kiyo-masui/bitshuffle
|
||||
* Created: 2014
|
||||
*
|
||||
* See LICENSE file for details about copyright and rights to use.
|
||||
*
|
||||
*
|
||||
* Header File
|
||||
*
|
||||
* Worker routines return an int64_t which is the number of bytes processed
|
||||
* if positive or an error code if negative.
|
||||
*
|
||||
* Error codes:
|
||||
* -1 : Failed to allocate memory.
|
||||
* -11 : Missing SSE.
|
||||
* -12 : Missing AVX.
|
||||
* -80 : Input size not a multiple of 8.
|
||||
* -81 : block_size not multiple of 8.
|
||||
* -91 : Decompression error, wrong number of bytes processed.
|
||||
* -1YYY : Error internal to compression routine with error code -YYY.
|
||||
*/
|
||||
|
||||
|
||||
#ifndef BITSHUFFLE_H
|
||||
#define BITSHUFFLE_H
|
||||
|
||||
#include <stdlib.h>
|
||||
#include "bitshuffle_core.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* ---- bshuf_compress_lz4_bound ----
|
||||
*
|
||||
* Bound on size of data compressed with *bshuf_compress_lz4*.
|
||||
*
|
||||
* Parameters
|
||||
* ----------
|
||||
* size : number of elements in input
|
||||
* elem_size : element size of typed data
|
||||
* block_size : Process in blocks of this many elements. Pass 0 to
|
||||
* select automatically (recommended).
|
||||
*
|
||||
* Returns
|
||||
* -------
|
||||
* Bound on compressed data size.
|
||||
*
|
||||
*/
|
||||
size_t bshuf_compress_lz4_bound(const size_t size,
|
||||
const size_t elem_size, size_t block_size);
|
||||
|
||||
|
||||
/* ---- bshuf_compress_lz4 ----
|
||||
*
|
||||
* Bitshuffled and compress the data using LZ4.
|
||||
*
|
||||
* Transpose within elements, in blocks of data of *block_size* elements then
|
||||
* compress the blocks using LZ4. In the output buffer, each block is prefixed
|
||||
* by a 4 byte integer giving the compressed size of that block.
|
||||
*
|
||||
* Output buffer must be large enough to hold the compressed data. This could
|
||||
* be in principle substantially larger than the input buffer. Use the routine
|
||||
* *bshuf_compress_lz4_bound* to get an upper limit.
|
||||
*
|
||||
* Parameters
|
||||
* ----------
|
||||
* in : input buffer, must be of size * elem_size bytes
|
||||
* out : output buffer, must be large enough to hold data.
|
||||
* size : number of elements in input
|
||||
* elem_size : element size of typed data
|
||||
* block_size : Process in blocks of this many elements. Pass 0 to
|
||||
* select automatically (recommended).
|
||||
*
|
||||
* Returns
|
||||
* -------
|
||||
* number of bytes used in output buffer, negative error-code if failed.
|
||||
*
|
||||
*/
|
||||
int64_t bshuf_compress_lz4(const void* in, void* out, const size_t size, const size_t
|
||||
elem_size, size_t block_size);
|
||||
|
||||
|
||||
/* ---- bshuf_decompress_lz4 ----
|
||||
*
|
||||
* Undo compression and bitshuffling.
|
||||
*
|
||||
* Decompress data then un-bitshuffle it in blocks of *block_size* elements.
|
||||
*
|
||||
* To properly unshuffle bitshuffled data, *size*, *elem_size* and *block_size*
|
||||
* must patch the parameters used to compress the data.
|
||||
*
|
||||
* NOT TO BE USED WITH UNTRUSTED DATA: This routine uses the function
|
||||
* LZ4_decompress_fast from LZ4, which does not protect against maliciously
|
||||
* formed datasets. By modifying the compressed data, this function could be
|
||||
* coerced into leaving the boundaries of the input buffer.
|
||||
*
|
||||
* Parameters
|
||||
* ----------
|
||||
* in : input buffer
|
||||
* out : output buffer, must be of size * elem_size bytes
|
||||
* size : number of elements in input
|
||||
* elem_size : element size of typed data
|
||||
* block_size : Process in blocks of this many elements. Pass 0 to
|
||||
* select automatically (recommended).
|
||||
*
|
||||
* Returns
|
||||
* -------
|
||||
* number of bytes consumed in *input* buffer, negative error-code if failed.
|
||||
*
|
||||
*/
|
||||
int64_t bshuf_decompress_lz4(const void* in, void* out, const size_t size,
|
||||
const size_t elem_size, size_t block_size);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif
|
||||
|
||||
#endif // BITSHUFFLE_H
|
||||
156
include/bitshuffle/bitshuffle_core.h
Normal file
156
include/bitshuffle/bitshuffle_core.h
Normal file
@@ -0,0 +1,156 @@
|
||||
/*
|
||||
* Bitshuffle - Filter for improving compression of typed binary data.
|
||||
*
|
||||
* This file is part of Bitshuffle
|
||||
* Author: Kiyoshi Masui <kiyo@physics.ubc.ca>
|
||||
* Website: http://www.github.com/kiyo-masui/bitshuffle
|
||||
* Created: 2014
|
||||
*
|
||||
* See LICENSE file for details about copyright and rights to use.
|
||||
*
|
||||
*
|
||||
* Header File
|
||||
*
|
||||
* Worker routines return an int64_t which is the number of bytes processed
|
||||
* if positive or an error code if negative.
|
||||
*
|
||||
* Error codes:
|
||||
* -1 : Failed to allocate memory.
|
||||
* -11 : Missing SSE.
|
||||
* -12 : Missing AVX.
|
||||
* -80 : Input size not a multiple of 8.
|
||||
* -81 : block_size not multiple of 8.
|
||||
* -91 : Decompression error, wrong number of bytes processed.
|
||||
* -1YYY : Error internal to compression routine with error code -YYY.
|
||||
*/
|
||||
|
||||
|
||||
#ifndef BITSHUFFLE_CORE_H
|
||||
#define BITSHUFFLE_CORE_H
|
||||
|
||||
// We assume GNU g++ defining `__cplusplus` has stdint.h
|
||||
#if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199900L) || defined(__cplusplus)
|
||||
#include <stdint.h>
|
||||
#else
|
||||
typedef unsigned char uint8_t;
|
||||
typedef unsigned short uint16_t;
|
||||
typedef unsigned int uint32_t;
|
||||
typedef signed int int32_t;
|
||||
typedef unsigned long long uint64_t;
|
||||
typedef long long int64_t;
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
|
||||
// These are usually set in the setup.py.
|
||||
#ifndef BSHUF_VERSION_MAJOR
|
||||
#define BSHUF_VERSION_MAJOR 0
|
||||
#define BSHUF_VERSION_MINOR 3
|
||||
#define BSHUF_VERSION_POINT 4
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* --- bshuf_using_SSE2 ----
|
||||
*
|
||||
* Whether routines where compiled with the SSE2 instruction set.
|
||||
*
|
||||
* Returns
|
||||
* -------
|
||||
* 1 if using SSE2, 0 otherwise.
|
||||
*
|
||||
*/
|
||||
int bshuf_using_SSE2(void);
|
||||
|
||||
|
||||
/* ---- bshuf_using_AVX2 ----
|
||||
*
|
||||
* Whether routines where compiled with the AVX2 instruction set.
|
||||
*
|
||||
* Returns
|
||||
* -------
|
||||
* 1 if using AVX2, 0 otherwise.
|
||||
*
|
||||
*/
|
||||
int bshuf_using_AVX2(void);
|
||||
|
||||
|
||||
/* ---- bshuf_default_block_size ----
|
||||
*
|
||||
* The default block size as function of element size.
|
||||
*
|
||||
* This is the block size used by the blocked routines (any routine
|
||||
* taking a *block_size* argument) when the block_size is not provided
|
||||
* (zero is passed).
|
||||
*
|
||||
* The results of this routine are guaranteed to be stable such that
|
||||
* shuffled/compressed data can always be decompressed.
|
||||
*
|
||||
* Parameters
|
||||
* ----------
|
||||
* elem_size : element size of data to be shuffled/compressed.
|
||||
*
|
||||
*/
|
||||
size_t bshuf_default_block_size(const size_t elem_size);
|
||||
|
||||
|
||||
/* ---- bshuf_bitshuffle ----
|
||||
*
|
||||
* Bitshuffle the data.
|
||||
*
|
||||
* Transpose the bits within elements, in blocks of *block_size*
|
||||
* elements.
|
||||
*
|
||||
* Parameters
|
||||
* ----------
|
||||
* in : input buffer, must be of size * elem_size bytes
|
||||
* out : output buffer, must be of size * elem_size bytes
|
||||
* size : number of elements in input
|
||||
* elem_size : element size of typed data
|
||||
* block_size : Do transpose in blocks of this many elements. Pass 0 to
|
||||
* select automatically (recommended).
|
||||
*
|
||||
* Returns
|
||||
* -------
|
||||
* number of bytes processed, negative error-code if failed.
|
||||
*
|
||||
*/
|
||||
int64_t bshuf_bitshuffle(const void* in, void* out, const size_t size,
|
||||
const size_t elem_size, size_t block_size);
|
||||
|
||||
|
||||
/* ---- bshuf_bitunshuffle ----
|
||||
*
|
||||
* Unshuffle bitshuffled data.
|
||||
*
|
||||
* Untranspose the bits within elements, in blocks of *block_size*
|
||||
* elements.
|
||||
*
|
||||
* To properly unshuffle bitshuffled data, *size*, *elem_size* and *block_size*
|
||||
* must match the parameters used to shuffle the data.
|
||||
*
|
||||
* Parameters
|
||||
* ----------
|
||||
* in : input buffer, must be of size * elem_size bytes
|
||||
* out : output buffer, must be of size * elem_size bytes
|
||||
* size : number of elements in input
|
||||
* elem_size : element size of typed data
|
||||
* block_size : Do transpose in blocks of this many elements. Pass 0 to
|
||||
* select automatically (recommended).
|
||||
*
|
||||
* Returns
|
||||
* -------
|
||||
* number of bytes processed, negative error-code if failed.
|
||||
*
|
||||
*/
|
||||
int64_t bshuf_bitunshuffle(const void* in, void* out, const size_t size,
|
||||
const size_t elem_size, size_t block_size);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif
|
||||
|
||||
#endif // BITSHUFFLE_CORE_H
|
||||
75
include/bitshuffle/bitshuffle_internals.h
Normal file
75
include/bitshuffle/bitshuffle_internals.h
Normal file
@@ -0,0 +1,75 @@
|
||||
/*
|
||||
* Bitshuffle - Filter for improving compression of typed binary data.
|
||||
*
|
||||
* This file is part of Bitshuffle
|
||||
* Author: Kiyoshi Masui <kiyo@physics.ubc.ca>
|
||||
* Website: http://www.github.com/kiyo-masui/bitshuffle
|
||||
* Created: 2014
|
||||
*
|
||||
* See LICENSE file for details about copyright and rights to use.
|
||||
*/
|
||||
|
||||
|
||||
#ifndef BITSHUFFLE_INTERNALS_H
|
||||
#define BITSHUFFLE_INTERNALS_H
|
||||
|
||||
// We assume GNU g++ defining `__cplusplus` has stdint.h
|
||||
#if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199900L) || defined(__cplusplus)
|
||||
#include <stdint.h>
|
||||
#else
|
||||
typedef unsigned char uint8_t;
|
||||
typedef unsigned short uint16_t;
|
||||
typedef unsigned int uint32_t;
|
||||
typedef signed int int32_t;
|
||||
typedef unsigned long long uint64_t;
|
||||
typedef long long int64_t;
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include "iochain.h"
|
||||
|
||||
|
||||
// Constants.
|
||||
#ifndef BSHUF_MIN_RECOMMEND_BLOCK
|
||||
#define BSHUF_MIN_RECOMMEND_BLOCK 128
|
||||
#define BSHUF_BLOCKED_MULT 8 // Block sizes must be multiple of this.
|
||||
#define BSHUF_TARGET_BLOCK_SIZE_B 8192
|
||||
#endif
|
||||
|
||||
|
||||
// Macros.
|
||||
#define CHECK_ERR_FREE(count, buf) if (count < 0) { free(buf); return count; }
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* ---- Utility functions for internal use only ---- */
|
||||
|
||||
int64_t bshuf_trans_bit_elem(const void* in, void* out, const size_t size,
|
||||
const size_t elem_size);
|
||||
|
||||
/* Read a 32 bit unsigned integer from a buffer big endian order. */
|
||||
uint32_t bshuf_read_uint32_BE(const void* buf);
|
||||
|
||||
/* Write a 32 bit unsigned integer to a buffer in big endian order. */
|
||||
void bshuf_write_uint32_BE(void* buf, uint32_t num);
|
||||
|
||||
int64_t bshuf_untrans_bit_elem(const void* in, void* out, const size_t size,
|
||||
const size_t elem_size);
|
||||
|
||||
/* Function definition for worker functions that process a single block. */
|
||||
typedef int64_t (*bshufBlockFunDef)(ioc_chain* C_ptr,
|
||||
const size_t size, const size_t elem_size);
|
||||
|
||||
/* Wrap a function for processing a single block to process an entire buffer in
|
||||
* parallel. */
|
||||
int64_t bshuf_blocked_wrap_fun(bshufBlockFunDef fun, const void* in, void* out,
|
||||
const size_t size, const size_t elem_size, size_t block_size);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif
|
||||
|
||||
#endif // BITSHUFFLE_INTERNALS_H
|
||||
59
include/bitshuffle/bshuf_h5filter.h
Normal file
59
include/bitshuffle/bshuf_h5filter.h
Normal file
@@ -0,0 +1,59 @@
|
||||
/*
|
||||
* Bitshuffle HDF5 filter
|
||||
*
|
||||
* This file is part of Bitshuffle
|
||||
* Author: Kiyoshi Masui <kiyo@physics.ubc.ca>
|
||||
* Website: http://www.github.com/kiyo-masui/bitshuffle
|
||||
* Created: 2014
|
||||
*
|
||||
* See LICENSE file for details about copyright and rights to use.
|
||||
*
|
||||
*
|
||||
* Header File
|
||||
*
|
||||
* Filter Options
|
||||
* --------------
|
||||
* block_size (option slot 0) : interger (optional)
|
||||
* What block size to use (in elements not bytes). Default is 0,
|
||||
* for which bitshuffle will pick a block size with a target of 8kb.
|
||||
* Compression (option slot 1) : 0 or BSHUF_H5_COMPRESS_LZ4
|
||||
* Whether to apply LZ4 compression to the data after bitshuffling.
|
||||
* This is much faster than applying compression as a second filter
|
||||
* because it is done when the small block of data is already in the
|
||||
* L1 cache.
|
||||
*
|
||||
* For LZ4 compression, the compressed format of the data is the same as
|
||||
* for the normal LZ4 filter described in
|
||||
* http://www.hdfgroup.org/services/filters/HDF5_LZ4.pdf.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#ifndef BSHUF_H5FILTER_H
|
||||
#define BSHUF_H5FILTER_H
|
||||
|
||||
#define H5Z_class_t_vers 2
|
||||
#include "hdf5.h"
|
||||
|
||||
|
||||
#define BSHUF_H5FILTER 32008
|
||||
|
||||
|
||||
#define BSHUF_H5_COMPRESS_LZ4 2
|
||||
|
||||
|
||||
extern H5Z_class_t bshuf_H5Filter[1];
|
||||
|
||||
|
||||
/* ---- bshuf_register_h5filter ----
|
||||
*
|
||||
* Register the bitshuffle HDF5 filter within the HDF5 library.
|
||||
*
|
||||
* Call this before using the bitshuffle HDF5 filter from C unless
|
||||
* using dynamically loaded filters.
|
||||
*
|
||||
*/
|
||||
int bshuf_register_h5filter(void);
|
||||
|
||||
|
||||
#endif // BSHUF_H5FILTER_H
|
||||
94
include/bitshuffle/iochain.h
Normal file
94
include/bitshuffle/iochain.h
Normal file
@@ -0,0 +1,94 @@
|
||||
/*
|
||||
* IOchain - Distribute a chain of dependant IO events amoung threads.
|
||||
*
|
||||
* This file is part of Bitshuffle
|
||||
* Author: Kiyoshi Masui <kiyo@physics.ubc.ca>
|
||||
* Website: http://www.github.com/kiyo-masui/bitshuffle
|
||||
* Created: 2014
|
||||
*
|
||||
* See LICENSE file for details about copyright and rights to use.
|
||||
*
|
||||
*
|
||||
* Header File
|
||||
*
|
||||
* Similar in concept to a queue. Each task includes reading an input
|
||||
* and writing output, but the location of the input/output (the pointers)
|
||||
* depend on the previous item in the chain.
|
||||
*
|
||||
* This is designed for parallelizing blocked compression/decompression IO,
|
||||
* where the destination of a compressed block depends on the compressed size
|
||||
* of all previous blocks.
|
||||
*
|
||||
* Implemented with OpenMP locks.
|
||||
*
|
||||
*
|
||||
* Usage
|
||||
* -----
|
||||
* - Call `ioc_init` in serial block.
|
||||
* - Each thread should create a local variable *size_t this_iter* and
|
||||
* pass its address to all function calls. Its value will be set
|
||||
* inside the functions and is used to identify the thread.
|
||||
* - Each thread must call each of the `ioc_get*` and `ioc_set*` methods
|
||||
* exactly once per iteration, starting with `ioc_get_in` and ending
|
||||
* with `ioc_set_next_out`.
|
||||
* - The order (`ioc_get_in`, `ioc_set_next_in`, *work*, `ioc_get_out`,
|
||||
* `ioc_set_next_out`, *work*) is most efficient.
|
||||
* - Have each thread call `ioc_end_pop`.
|
||||
* - `ioc_get_in` is blocked until the previous entry's
|
||||
* `ioc_set_next_in` is called.
|
||||
* - `ioc_get_out` is blocked until the previous entry's
|
||||
* `ioc_set_next_out` is called.
|
||||
* - There are no blocks on the very first iteration.
|
||||
* - Call `ioc_destroy` in serial block.
|
||||
* - Safe for num_threads >= IOC_SIZE (but less efficient).
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#ifndef IOCHAIN_H
|
||||
#define IOCHAIN_H
|
||||
|
||||
|
||||
#include <stdlib.h>
|
||||
#ifdef _OPENMP
|
||||
#include <omp.h>
|
||||
#endif
|
||||
|
||||
|
||||
#define IOC_SIZE 33
|
||||
|
||||
|
||||
typedef struct ioc_ptr_and_lock {
|
||||
#ifdef _OPENMP
|
||||
omp_lock_t lock;
|
||||
#endif
|
||||
void *ptr;
|
||||
} ptr_and_lock;
|
||||
|
||||
typedef struct ioc_const_ptr_and_lock {
|
||||
#ifdef _OPENMP
|
||||
omp_lock_t lock;
|
||||
#endif
|
||||
const void *ptr;
|
||||
} const_ptr_and_lock;
|
||||
|
||||
|
||||
typedef struct ioc_chain {
|
||||
#ifdef _OPENMP
|
||||
omp_lock_t next_lock;
|
||||
#endif
|
||||
size_t next;
|
||||
const_ptr_and_lock in_pl[IOC_SIZE];
|
||||
ptr_and_lock out_pl[IOC_SIZE];
|
||||
} ioc_chain;
|
||||
|
||||
|
||||
void ioc_init(ioc_chain *C, const void *in_ptr_0, void *out_ptr_0);
|
||||
void ioc_destroy(ioc_chain *C);
|
||||
const void * ioc_get_in(ioc_chain *C, size_t *this_iter);
|
||||
void ioc_set_next_in(ioc_chain *C, size_t* this_iter, void* in_ptr);
|
||||
void * ioc_get_out(ioc_chain *C, size_t *this_iter);
|
||||
void ioc_set_next_out(ioc_chain *C, size_t *this_iter, void* out_ptr);
|
||||
|
||||
#endif // IOCHAIN_H
|
||||
|
||||
337
include/cafe.h
337
include/cafe.h
@@ -7,11 +7,13 @@
|
||||
#ifndef CAFE_H
|
||||
#define CAFE_H
|
||||
|
||||
|
||||
#include <hashConduit.h>
|
||||
#include <connect.h>
|
||||
#include <conduitEventHandlerArgs.h>
|
||||
#include <instant.h>
|
||||
#include <cafeDataType.h>
|
||||
#include <global.h>
|
||||
|
||||
#if HAVE_PYTHON_H
|
||||
#include <unicodeobject.h>
|
||||
#endif
|
||||
@@ -25,7 +27,8 @@ using namespace CAFEBS;
|
||||
* \class CAFE
|
||||
* \brief Methods for synchronous and asynchronous interactions
|
||||
*/
|
||||
class CAFE : public Connect {
|
||||
class CAFE : public Connect
|
||||
{
|
||||
private:
|
||||
Instant<dbr_string_t> cafeSoluble;
|
||||
Instant<dbr_float_t> cafeFrappuccino;
|
||||
@@ -63,8 +66,8 @@ public:
|
||||
channelRequestPolicyMasterPut.setPolicy(CAFENUM::FLUSH_AFTER_EACH_MESSAGE,
|
||||
CAFENUM::NO_WAIT, CAFENUM::WITH_CALLBACK_DEFAULT); //WITHOUT_CALLBACK)
|
||||
|
||||
//channelRequestPolicyMasterGet.setPolicy(CAFENUM::FLUSH_AFTER_EACH_MESSAGE,
|
||||
// CAFENUM::WAIT, CAFENUM::WITH_CALLBACK_DEFAULT); //WITHOUT_CALLBACK);
|
||||
// channelRequestPolicyMasterGet.setPolicy(CAFENUM::FLUSH_AFTER_EACH_MESSAGE,
|
||||
// CAFENUM::WAIT, CAFENUM::WITH_CALLBACK_DEFAULT); // WITHOUT_CALLBACK);
|
||||
//channelRequestPolicyMasterGetCtrl.setPolicy(CAFENUM::FLUSH_AFTER_EACH_MESSAGE,
|
||||
// CAFENUM::WAIT, CAFENUM::WITH_CALLBACK_DEFAULT); //WITH_CALLBACK_DEFAULT);
|
||||
};
|
||||
@@ -110,6 +113,9 @@ public:
|
||||
// if HAVE_LIBQTXML moved to within header file
|
||||
//#endif
|
||||
|
||||
int wfExpress(const unsigned int handle, const unsigned int nelem, dbr_char_t * chval);
|
||||
//int wfExpress(const unsigned int handle);
|
||||
|
||||
//get NON_BLOCKING
|
||||
int getNonBlocking(const unsigned int handle)
|
||||
{
|
||||
@@ -146,13 +152,16 @@ public:
|
||||
{
|
||||
unsigned int handle;
|
||||
status=ICAFE_NORMAL;
|
||||
try {
|
||||
try
|
||||
{
|
||||
status = open(pv, handle);
|
||||
}
|
||||
catch (CAFEException_open & e) {
|
||||
catch (CAFEException_open & e)
|
||||
{
|
||||
return e.pvEx.statusCode;
|
||||
}
|
||||
if (status == ICAFE_NORMAL) {
|
||||
if (status == ICAFE_NORMAL)
|
||||
{
|
||||
status=getWFAsString(handle, message);
|
||||
}
|
||||
return status;
|
||||
@@ -163,13 +172,16 @@ public:
|
||||
{
|
||||
unsigned int handle;
|
||||
status=ICAFE_NORMAL;
|
||||
try {
|
||||
try
|
||||
{
|
||||
status = open(pv, handle);
|
||||
}
|
||||
catch (CAFEException_open & e) {
|
||||
catch (CAFEException_open & e)
|
||||
{
|
||||
return e.pvEx.statusCode;
|
||||
}
|
||||
if (status == ICAFE_NORMAL) {
|
||||
if (status == ICAFE_NORMAL)
|
||||
{
|
||||
status=getWFAsStringCache(handle, message);
|
||||
}
|
||||
return status;
|
||||
@@ -182,26 +194,40 @@ public:
|
||||
return ss.str();
|
||||
}
|
||||
|
||||
int getAllChannelInfo(unsigned int handle, ChannelRegalia & channelInfo, PVCtrlHolder & pvc, PVDataHolder &pvd, std::string & desc);
|
||||
int getChannelDataStore(unsigned int handle, ChannelDataStore & cds);
|
||||
int getAllChannelInfo(unsigned int handle, ChannelRegalia & channelInfo, PVCtrlHolder & pvc, PVDataHolder &pvd, std::string & desc);
|
||||
int getChannelDataStore(unsigned int handle, ChannelDataStore & cds);
|
||||
|
||||
int supplementHandles();
|
||||
int supplementHandlesV(std::vector<unsigned int> hV);
|
||||
int supplementHandle(unsigned int handle) {
|
||||
std::vector<unsigned int> hV;
|
||||
hV.push_back(handle);
|
||||
return supplementHandlesV(hV);
|
||||
}
|
||||
int supplementHandle(unsigned int handle)
|
||||
{
|
||||
std::vector<unsigned int> hV;
|
||||
hV.push_back(handle);
|
||||
return supplementHandlesV(hV);
|
||||
}
|
||||
int addWidget(unsigned int _handle, void * widget)
|
||||
{
|
||||
return handleHelper.addWidget(_handle, widget);
|
||||
}
|
||||
|
||||
int removeWidget (unsigned int _handle, void * widget)
|
||||
{
|
||||
return handleHelper.removeWidget(_handle, widget);
|
||||
}
|
||||
|
||||
int getWidgets(unsigned int _handle, std::vector<void *> & widgetV)
|
||||
{
|
||||
return handleHelper.getWidgets(_handle, widgetV);
|
||||
}
|
||||
|
||||
#if HAVE_ZEROMQ
|
||||
int calcDBPMStatus(int, int, std::string);
|
||||
int initBSwithCA(CAFEBS::BSDataHolder &bsd);
|
||||
int setBS2CA_Step1(CAFEBS::BSDataHolder &bsd);
|
||||
int setBS2CA_Step2(CAFEBS::BSDataHolder &bsd);
|
||||
int setBS2CA_Step3(CAFEBS::BSDataHolder &bsd);
|
||||
|
||||
int setBS2CAGroup(CAFEBS::BSDataHolder &bsd);
|
||||
int setBS2CA(CAFEBS::BSDataHolder &bsd);
|
||||
int setBS(CAFEBS::BSDataHolder &bsd, bool closeCA);
|
||||
|
||||
int setBS(CAFEBS::BSDataHolder &bsd);
|
||||
int getBS(CAFEBS::BSDataHolder &bsd);
|
||||
int closeBS(CAFEBS::BSDataHolder &bsd);
|
||||
int setPulseIDBufferSize(unsigned int _handle, unsigned short _bsize)
|
||||
@@ -219,22 +245,25 @@ public:
|
||||
}
|
||||
int getDBPM(DBPMKeeper &dbpm);
|
||||
int readDBPMOffsets(DBPMKeeper &dbpm);
|
||||
#if HAVE_LIBQTXML
|
||||
int prepareDBPM(std::vector<std::string> &_glist, std::vector<unsigned int> &_hV, std::vector<std::string> &dev, std::vector<float> &pos) ;
|
||||
int prepareDBPM(std::vector<std::string> &_glist, std::vector<unsigned int> &_hV, std::map<float, std::string> &posDev) ;
|
||||
#endif
|
||||
|
||||
#endif
|
||||
//Standard BLOCKING get
|
||||
//0+
|
||||
int get(const unsigned int handle, std::string * valStr, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts)
|
||||
{
|
||||
unsigned int nn=handleHelper.getNelemClient(handle);
|
||||
if (nn==0) {
|
||||
if (nn==0)
|
||||
{
|
||||
return ECAFE_INVALID_HANDLE;
|
||||
}
|
||||
//check on handle number before proceeding!
|
||||
dbr_string_t * _val = new dbr_string_t[nn];
|
||||
status=cafeSoluble.get(handle, DBR_TIME_STRING, _val, alarmStatus, alarmSeverity, ts);
|
||||
for (unsigned int i=0; i< handleHelper.getNelemRequest(handle); ++i) {
|
||||
for (unsigned int i=0; i< handleHelper.getNelemRequest(handle); ++i)
|
||||
{
|
||||
valStr[i]=_val[i];
|
||||
}
|
||||
delete [] _val;
|
||||
@@ -244,12 +273,14 @@ public:
|
||||
int get(const unsigned int handle, std::string * valStr, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity)
|
||||
{
|
||||
unsigned int nn=handleHelper.getNelemClient(handle);
|
||||
if (nn==0) {
|
||||
if (nn==0)
|
||||
{
|
||||
return ECAFE_INVALID_HANDLE;
|
||||
}
|
||||
dbr_string_t * _val = new dbr_string_t[nn];
|
||||
status=cafeSoluble.get(handle, DBR_STS_STRING, _val, alarmStatus, alarmSeverity);
|
||||
for (unsigned int i=0; i< handleHelper.getNelemRequest(handle); ++i) {
|
||||
for (unsigned int i=0; i< handleHelper.getNelemRequest(handle); ++i)
|
||||
{
|
||||
valStr[i]=_val[i];
|
||||
}
|
||||
delete [] _val;
|
||||
@@ -259,12 +290,14 @@ public:
|
||||
int get(const unsigned int handle, std::string * valStr)
|
||||
{
|
||||
unsigned int nn=handleHelper.getNelemClient(handle);
|
||||
if (nn==0) {
|
||||
if (nn==0)
|
||||
{
|
||||
return ECAFE_INVALID_HANDLE;
|
||||
}
|
||||
dbr_string_t * _val = new dbr_string_t[nn];
|
||||
status=cafeSoluble.get(handle, DBR_STRING, _val);
|
||||
for (unsigned int i=0; i< handleHelper.getNelemRequest(handle); ++i) {
|
||||
for (unsigned int i=0; i< handleHelper.getNelemRequest(handle); ++i)
|
||||
{
|
||||
valStr[i]=_val[i];
|
||||
}
|
||||
delete [] _val;
|
||||
@@ -367,7 +400,10 @@ public:
|
||||
{
|
||||
return cafeDoppio.get (handle, DBR_DOUBLE, _val);
|
||||
};
|
||||
//Arrays
|
||||
|
||||
|
||||
|
||||
//Arrays -user allocates space
|
||||
int getCharArray(const unsigned int handle, dbr_char_t * _val)
|
||||
{
|
||||
return cafeCappuccino.get (handle, DBR_CHAR, _val);
|
||||
@@ -405,17 +441,20 @@ public:
|
||||
return cafeSoluble.get(handle, DBR_STRING, _val);
|
||||
};
|
||||
|
||||
|
||||
//0
|
||||
//single values
|
||||
int getString(const unsigned int handle, std::string & valStr) //0+
|
||||
{
|
||||
unsigned int nelemPrevious=CAFE::setNelemToOne(handle);
|
||||
if (nelemPrevious==0) {
|
||||
if (nelemPrevious==0)
|
||||
{
|
||||
return ECAFE_INVALID_HANDLE;
|
||||
}
|
||||
dbr_string_t val[1]= {""};
|
||||
status=cafeSoluble.get(handle, DBR_STRING, val);
|
||||
if (status==ICAFE_NORMAL) {
|
||||
if (status==ICAFE_NORMAL)
|
||||
{
|
||||
valStr=val[0];
|
||||
}
|
||||
CAFE::setNelemToPrevious(handle, nelemPrevious);
|
||||
@@ -425,12 +464,14 @@ public:
|
||||
int get(const unsigned int handle, std::string & valStr) //0+
|
||||
{
|
||||
unsigned int nelemPrevious=CAFE::setNelemToOne(handle);
|
||||
if (nelemPrevious==0) {
|
||||
if (nelemPrevious==0)
|
||||
{
|
||||
return ECAFE_INVALID_HANDLE;
|
||||
}
|
||||
dbr_string_t val[1]= {""};
|
||||
status=cafeSoluble.get(handle, DBR_STRING, val);
|
||||
if (status==ICAFE_NORMAL) {
|
||||
if (status==ICAFE_NORMAL)
|
||||
{
|
||||
valStr=val[0];
|
||||
}
|
||||
CAFE::setNelemToPrevious(handle, nelemPrevious);
|
||||
@@ -440,12 +481,14 @@ public:
|
||||
int get(const unsigned int handle, std::string & valStr, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity) //0
|
||||
{
|
||||
unsigned int nelemPrevious=CAFE::setNelemToOne(handle);
|
||||
if (nelemPrevious==0) {
|
||||
if (nelemPrevious==0)
|
||||
{
|
||||
return ECAFE_INVALID_HANDLE;
|
||||
}
|
||||
dbr_string_t val[1]= {""};
|
||||
status=cafeSoluble.get(handle, DBR_STS_STRING, val, alarmStatus, alarmSeverity);
|
||||
if (status==ICAFE_NORMAL) {
|
||||
if (status==ICAFE_NORMAL)
|
||||
{
|
||||
valStr=val[0];
|
||||
}
|
||||
CAFE::setNelemToPrevious(handle, nelemPrevious);
|
||||
@@ -456,12 +499,14 @@ public:
|
||||
dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts) //0
|
||||
{
|
||||
unsigned int nelemPrevious=CAFE::setNelemToOne(handle);
|
||||
if (nelemPrevious==0) {
|
||||
if (nelemPrevious==0)
|
||||
{
|
||||
return ECAFE_INVALID_HANDLE;
|
||||
}
|
||||
dbr_string_t val[1]= {""};
|
||||
status=cafeSoluble.get(handle, DBR_TIME_STRING, val, alarmStatus, alarmSeverity, ts);
|
||||
if (status==ICAFE_NORMAL) {
|
||||
if (status==ICAFE_NORMAL)
|
||||
{
|
||||
valStr=val[0];
|
||||
}
|
||||
CAFE::setNelemToPrevious(handle, nelemPrevious);
|
||||
@@ -472,12 +517,14 @@ public:
|
||||
dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts) //0
|
||||
{
|
||||
unsigned int nelemPrevious=CAFE::setNelemToOne(handle);
|
||||
if (nelemPrevious==0) {
|
||||
if (nelemPrevious==0)
|
||||
{
|
||||
return ECAFE_INVALID_HANDLE;
|
||||
}
|
||||
dbr_string_t val[1]= {""};
|
||||
status=cafeSoluble.get(handle, DBR_TIME_STRING, val, alarmStatus, alarmSeverity, ts);
|
||||
if (status==ICAFE_NORMAL) {
|
||||
if (status==ICAFE_NORMAL)
|
||||
{
|
||||
valStr=val[0];
|
||||
}
|
||||
CAFE::setNelemToPrevious(handle, nelemPrevious);
|
||||
@@ -487,12 +534,14 @@ public:
|
||||
int get(const unsigned int handle, dbr_string_t & _val) //0
|
||||
{
|
||||
unsigned int nelemPrevious=CAFE::setNelemToOne(handle);
|
||||
if (nelemPrevious==0) {
|
||||
if (nelemPrevious==0)
|
||||
{
|
||||
return ECAFE_INVALID_HANDLE;
|
||||
}
|
||||
dbr_string_t val[1]= {""};
|
||||
status=cafeSoluble.get(handle, DBR_STRING, val);
|
||||
if (status==ICAFE_NORMAL) {
|
||||
if (status==ICAFE_NORMAL)
|
||||
{
|
||||
sprintf(_val, val[0]);
|
||||
}
|
||||
CAFE::setNelemToPrevious(handle, nelemPrevious);
|
||||
@@ -502,12 +551,14 @@ public:
|
||||
int get(const unsigned int handle, dbr_string_t & _val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity) //0
|
||||
{
|
||||
unsigned int nelemPrevious=CAFE::setNelemToOne(handle);
|
||||
if (nelemPrevious==0) {
|
||||
if (nelemPrevious==0)
|
||||
{
|
||||
return ECAFE_INVALID_HANDLE;
|
||||
}
|
||||
dbr_string_t val[1]= {""};
|
||||
status=cafeSoluble.get(handle, DBR_STS_STRING, val, alarmStatus, alarmSeverity);
|
||||
if (status==ICAFE_NORMAL) {
|
||||
if (status==ICAFE_NORMAL)
|
||||
{
|
||||
sprintf(_val, val[0]);
|
||||
}
|
||||
CAFE::setNelemToPrevious(handle, nelemPrevious);
|
||||
@@ -518,12 +569,14 @@ public:
|
||||
dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts) //0
|
||||
{
|
||||
unsigned int nelemPrevious=CAFE::setNelemToOne(handle);
|
||||
if (nelemPrevious==0) {
|
||||
if (nelemPrevious==0)
|
||||
{
|
||||
return ECAFE_INVALID_HANDLE;
|
||||
}
|
||||
dbr_string_t val[1]= {""};
|
||||
status=cafeSoluble.get(handle, DBR_TIME_STRING, val, alarmStatus, alarmSeverity, ts);
|
||||
if (status==ICAFE_NORMAL) {
|
||||
if (status==ICAFE_NORMAL)
|
||||
{
|
||||
sprintf(_val, val[0]);
|
||||
}
|
||||
CAFE::setNelemToPrevious(handle, nelemPrevious);
|
||||
@@ -533,12 +586,14 @@ public:
|
||||
int get(const unsigned int handle, dbr_short_t & _val) //1
|
||||
{
|
||||
unsigned int nelemPrevious=CAFE::setNelemToOne(handle);
|
||||
if (nelemPrevious==0) {
|
||||
if (nelemPrevious==0)
|
||||
{
|
||||
return ECAFE_INVALID_HANDLE;
|
||||
}
|
||||
dbr_short_t val[1]= {0};
|
||||
status=cafeSchale.get(handle, DBR_SHORT, val);
|
||||
if (status==ICAFE_NORMAL) {
|
||||
if (status==ICAFE_NORMAL)
|
||||
{
|
||||
_val=val[0];
|
||||
}
|
||||
CAFE::setNelemToPrevious(handle, nelemPrevious);
|
||||
@@ -547,12 +602,14 @@ public:
|
||||
int get(const unsigned int handle, dbr_short_t & _val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity) //1
|
||||
{
|
||||
unsigned int nelemPrevious=CAFE::setNelemToOne(handle);
|
||||
if (nelemPrevious==0) {
|
||||
if (nelemPrevious==0)
|
||||
{
|
||||
return ECAFE_INVALID_HANDLE;
|
||||
}
|
||||
dbr_short_t val[1]= {0};
|
||||
status=cafeSchale.get(handle, DBR_STS_SHORT, val, alarmStatus, alarmSeverity);
|
||||
if (status==ICAFE_NORMAL) {
|
||||
if (status==ICAFE_NORMAL)
|
||||
{
|
||||
_val=val[0];
|
||||
}
|
||||
CAFE::setNelemToPrevious(handle, nelemPrevious);
|
||||
@@ -562,12 +619,14 @@ public:
|
||||
dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts) //1
|
||||
{
|
||||
unsigned int nelemPrevious=CAFE::setNelemToOne(handle);
|
||||
if (nelemPrevious==0) {
|
||||
if (nelemPrevious==0)
|
||||
{
|
||||
return ECAFE_INVALID_HANDLE;
|
||||
}
|
||||
dbr_short_t val[1]= {0};
|
||||
status=cafeSchale.get(handle, DBR_TIME_SHORT, val, alarmStatus, alarmSeverity, ts);
|
||||
if (status==ICAFE_NORMAL) {
|
||||
if (status==ICAFE_NORMAL)
|
||||
{
|
||||
_val=val[0];
|
||||
}
|
||||
CAFE::setNelemToPrevious(handle, nelemPrevious);
|
||||
@@ -576,12 +635,14 @@ public:
|
||||
int get(const unsigned int handle, dbr_float_t &_val) //2
|
||||
{
|
||||
unsigned int nelemPrevious=CAFE::setNelemToOne(handle);
|
||||
if (nelemPrevious==0) {
|
||||
if (nelemPrevious==0)
|
||||
{
|
||||
return ECAFE_INVALID_HANDLE;
|
||||
}
|
||||
dbr_float_t val[1]= {0};
|
||||
status=cafeFrappuccino.get(handle, DBR_FLOAT, val);
|
||||
if (status==ICAFE_NORMAL) {
|
||||
if (status==ICAFE_NORMAL)
|
||||
{
|
||||
_val=val[0];
|
||||
}
|
||||
CAFE::setNelemToPrevious(handle, nelemPrevious);
|
||||
@@ -590,12 +651,14 @@ public:
|
||||
int get(const unsigned int handle, dbr_float_t &_val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity) //2
|
||||
{
|
||||
unsigned int nelemPrevious=CAFE::setNelemToOne(handle);
|
||||
if (nelemPrevious==0) {
|
||||
if (nelemPrevious==0)
|
||||
{
|
||||
return ECAFE_INVALID_HANDLE;
|
||||
}
|
||||
dbr_float_t val[1]= {0};
|
||||
status=cafeFrappuccino.get(handle, DBR_STS_FLOAT, val, alarmStatus, alarmSeverity);
|
||||
if (status==ICAFE_NORMAL) {
|
||||
if (status==ICAFE_NORMAL)
|
||||
{
|
||||
_val=val[0];
|
||||
}
|
||||
CAFE::setNelemToPrevious(handle, nelemPrevious);
|
||||
@@ -605,12 +668,14 @@ public:
|
||||
dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts) //2
|
||||
{
|
||||
unsigned int nelemPrevious=CAFE::setNelemToOne(handle);
|
||||
if (nelemPrevious==0) {
|
||||
if (nelemPrevious==0)
|
||||
{
|
||||
return ECAFE_INVALID_HANDLE;
|
||||
}
|
||||
dbr_float_t val[1]= {0};
|
||||
status=cafeFrappuccino.get(handle, DBR_TIME_FLOAT, val, alarmStatus, alarmSeverity, ts);
|
||||
if (status==ICAFE_NORMAL) {
|
||||
if (status==ICAFE_NORMAL)
|
||||
{
|
||||
_val=val[0];
|
||||
}
|
||||
CAFE::setNelemToPrevious(handle, nelemPrevious);
|
||||
@@ -619,12 +684,14 @@ public:
|
||||
int get(const unsigned int handle, dbr_enum_t & _val) //3
|
||||
{
|
||||
unsigned int nelemPrevious=CAFE::setNelemToOne(handle);
|
||||
if (nelemPrevious==0) {
|
||||
if (nelemPrevious==0)
|
||||
{
|
||||
return ECAFE_INVALID_HANDLE;
|
||||
}
|
||||
dbr_enum_t val[1]= {0};
|
||||
status=cafeEspresso.get(handle, DBR_ENUM, val);
|
||||
if (status==ICAFE_NORMAL) {
|
||||
if (status==ICAFE_NORMAL)
|
||||
{
|
||||
_val=val[0];
|
||||
}
|
||||
CAFE::setNelemToPrevious(handle, nelemPrevious);
|
||||
@@ -633,12 +700,14 @@ public:
|
||||
int get(const unsigned int handle, dbr_enum_t & _val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity) //3
|
||||
{
|
||||
unsigned int nelemPrevious=CAFE::setNelemToOne(handle);
|
||||
if (nelemPrevious==0) {
|
||||
if (nelemPrevious==0)
|
||||
{
|
||||
return ECAFE_INVALID_HANDLE;
|
||||
}
|
||||
dbr_enum_t val[1]= {0};
|
||||
status=cafeEspresso.get(handle, DBR_STS_ENUM, val, alarmStatus, alarmSeverity);
|
||||
if (status==ICAFE_NORMAL) {
|
||||
if (status==ICAFE_NORMAL)
|
||||
{
|
||||
_val=val[0];
|
||||
}
|
||||
CAFE::setNelemToPrevious(handle, nelemPrevious);
|
||||
@@ -648,12 +717,14 @@ public:
|
||||
dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts) //3
|
||||
{
|
||||
unsigned int nelemPrevious=CAFE::setNelemToOne(handle);
|
||||
if (nelemPrevious==0) {
|
||||
if (nelemPrevious==0)
|
||||
{
|
||||
return ECAFE_INVALID_HANDLE;
|
||||
}
|
||||
dbr_enum_t val[1]= {0};
|
||||
status=cafeEspresso.get(handle, DBR_TIME_ENUM, val, alarmStatus, alarmSeverity, ts);
|
||||
if (status==ICAFE_NORMAL) {
|
||||
if (status==ICAFE_NORMAL)
|
||||
{
|
||||
_val=val[0];
|
||||
}
|
||||
CAFE::setNelemToPrevious(handle, nelemPrevious);
|
||||
@@ -662,12 +733,14 @@ public:
|
||||
int get(const unsigned int handle, dbr_char_t & _val) //4
|
||||
{
|
||||
unsigned int nelemPrevious=CAFE::setNelemToOne(handle);
|
||||
if (nelemPrevious==0) {
|
||||
if (nelemPrevious==0)
|
||||
{
|
||||
return ECAFE_INVALID_HANDLE;
|
||||
}
|
||||
dbr_char_t val[1]= {0};
|
||||
status=cafeCappuccino.get(handle, DBR_CHAR, val);
|
||||
if (status==ICAFE_NORMAL) {
|
||||
if (status==ICAFE_NORMAL)
|
||||
{
|
||||
_val=val[0];
|
||||
}
|
||||
CAFE::setNelemToPrevious(handle, nelemPrevious);
|
||||
@@ -676,12 +749,14 @@ public:
|
||||
int get(const unsigned int handle, dbr_char_t & _val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity) //4
|
||||
{
|
||||
unsigned int nelemPrevious=CAFE::setNelemToOne(handle);
|
||||
if (nelemPrevious==0) {
|
||||
if (nelemPrevious==0)
|
||||
{
|
||||
return ECAFE_INVALID_HANDLE;
|
||||
}
|
||||
dbr_char_t val[1]= {0};
|
||||
status=cafeCappuccino.get(handle, DBR_STS_CHAR, val, alarmStatus, alarmSeverity);
|
||||
if (status==ICAFE_NORMAL) {
|
||||
if (status==ICAFE_NORMAL)
|
||||
{
|
||||
_val=val[0];
|
||||
}
|
||||
CAFE::setNelemToPrevious(handle, nelemPrevious);
|
||||
@@ -691,12 +766,14 @@ public:
|
||||
dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts) //4
|
||||
{
|
||||
unsigned int nelemPrevious=CAFE::setNelemToOne(handle);
|
||||
if (nelemPrevious==0) {
|
||||
if (nelemPrevious==0)
|
||||
{
|
||||
return ECAFE_INVALID_HANDLE;
|
||||
}
|
||||
dbr_char_t val[1]= {0};
|
||||
status=cafeCappuccino.get(handle, DBR_TIME_CHAR, val, alarmStatus, alarmSeverity, ts);
|
||||
if (status==ICAFE_NORMAL) {
|
||||
if (status==ICAFE_NORMAL)
|
||||
{
|
||||
_val=val[0];
|
||||
}
|
||||
CAFE::setNelemToPrevious(handle, nelemPrevious);
|
||||
@@ -705,12 +782,14 @@ public:
|
||||
int getLong(const unsigned int handle, dbr_long_t & _val) //5
|
||||
{
|
||||
unsigned int nelemPrevious=CAFE::setNelemToOne(handle);
|
||||
if (nelemPrevious==0) {
|
||||
if (nelemPrevious==0)
|
||||
{
|
||||
return ECAFE_INVALID_HANDLE;
|
||||
}
|
||||
dbr_long_t val[1]= {0};
|
||||
status=cafeLatte.get(handle, DBR_LONG, val);
|
||||
if (status==ICAFE_NORMAL) {
|
||||
if (status==ICAFE_NORMAL)
|
||||
{
|
||||
_val=val[0];
|
||||
}
|
||||
CAFE::setNelemToPrevious(handle, nelemPrevious);
|
||||
@@ -719,12 +798,14 @@ public:
|
||||
int get(const unsigned int handle, dbr_long_t & _val) //5
|
||||
{
|
||||
unsigned int nelemPrevious=CAFE::setNelemToOne(handle);
|
||||
if (nelemPrevious==0) {
|
||||
if (nelemPrevious==0)
|
||||
{
|
||||
return ECAFE_INVALID_HANDLE;
|
||||
}
|
||||
dbr_long_t val[1]= {0};
|
||||
status=cafeLatte.get(handle, DBR_LONG, val);
|
||||
if (status==ICAFE_NORMAL) {
|
||||
if (status==ICAFE_NORMAL)
|
||||
{
|
||||
_val=val[0];
|
||||
}
|
||||
CAFE::setNelemToPrevious(handle, nelemPrevious);
|
||||
@@ -734,12 +815,14 @@ public:
|
||||
dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity) //5
|
||||
{
|
||||
unsigned int nelemPrevious=CAFE::setNelemToOne(handle);
|
||||
if (nelemPrevious==0) {
|
||||
if (nelemPrevious==0)
|
||||
{
|
||||
return ECAFE_INVALID_HANDLE;
|
||||
}
|
||||
dbr_long_t val[1]= {0};
|
||||
status=cafeLatte.get(handle, DBR_STS_LONG, val, alarmStatus, alarmSeverity);
|
||||
if (status==ICAFE_NORMAL) {
|
||||
if (status==ICAFE_NORMAL)
|
||||
{
|
||||
_val=val[0];
|
||||
}
|
||||
CAFE::setNelemToPrevious(handle, nelemPrevious);
|
||||
@@ -749,12 +832,14 @@ public:
|
||||
dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts) //5
|
||||
{
|
||||
unsigned int nelemPrevious=CAFE::setNelemToOne(handle);
|
||||
if (nelemPrevious==0) {
|
||||
if (nelemPrevious==0)
|
||||
{
|
||||
return ECAFE_INVALID_HANDLE;
|
||||
}
|
||||
dbr_long_t val[1]= {0};
|
||||
status=cafeLatte.get(handle, DBR_TIME_LONG, val, alarmStatus, alarmSeverity, ts);
|
||||
if (status==ICAFE_NORMAL) {
|
||||
if (status==ICAFE_NORMAL)
|
||||
{
|
||||
_val=val[0];
|
||||
}
|
||||
CAFE::setNelemToPrevious(handle, nelemPrevious);
|
||||
@@ -764,12 +849,14 @@ public:
|
||||
int get(const unsigned int handle, long long & _val) //5+ long long
|
||||
{
|
||||
unsigned int nelemPrevious=CAFE::setNelemToOne(handle);
|
||||
if (nelemPrevious==0) {
|
||||
if (nelemPrevious==0)
|
||||
{
|
||||
return ECAFE_INVALID_HANDLE;
|
||||
}
|
||||
long long val[1]= {0};
|
||||
status=CAFE::get(handle, val);
|
||||
if (status==ICAFE_NORMAL) {
|
||||
if (status==ICAFE_NORMAL)
|
||||
{
|
||||
_val=val[0];
|
||||
}
|
||||
CAFE::setNelemToPrevious(handle, nelemPrevious);
|
||||
@@ -779,12 +866,14 @@ public:
|
||||
dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity) //5+ long long
|
||||
{
|
||||
unsigned int nelemPrevious=CAFE::setNelemToOne(handle);
|
||||
if (nelemPrevious==0) {
|
||||
if (nelemPrevious==0)
|
||||
{
|
||||
return ECAFE_INVALID_HANDLE;
|
||||
}
|
||||
long long val[1]= {0};
|
||||
status=CAFE::get(handle, val, alarmStatus, alarmSeverity);
|
||||
if (status==ICAFE_NORMAL) {
|
||||
if (status==ICAFE_NORMAL)
|
||||
{
|
||||
_val=val[0];
|
||||
}
|
||||
CAFE::setNelemToPrevious(handle, nelemPrevious);
|
||||
@@ -794,12 +883,14 @@ public:
|
||||
dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts) //5+ long long
|
||||
{
|
||||
unsigned int nelemPrevious=CAFE::setNelemToOne(handle);
|
||||
if (nelemPrevious==0) {
|
||||
if (nelemPrevious==0)
|
||||
{
|
||||
return ECAFE_INVALID_HANDLE;
|
||||
}
|
||||
long long val[1]= {0};
|
||||
status=CAFE::get(handle, val, alarmStatus, alarmSeverity, ts);
|
||||
if (status==ICAFE_NORMAL) {
|
||||
if (status==ICAFE_NORMAL)
|
||||
{
|
||||
_val=val[0];
|
||||
}
|
||||
CAFE::setNelemToPrevious(handle, nelemPrevious);
|
||||
@@ -809,12 +900,14 @@ public:
|
||||
int getDouble(const unsigned int handle, dbr_double_t & _val) //6
|
||||
{
|
||||
unsigned int nelemPrevious=CAFE::setNelemToOne(handle);
|
||||
if (nelemPrevious==0) {
|
||||
if (nelemPrevious==0)
|
||||
{
|
||||
return ECAFE_INVALID_HANDLE;
|
||||
}
|
||||
dbr_double_t val[1]= {0};
|
||||
status=cafeDoppio.get(handle, DBR_DOUBLE, val);
|
||||
if (status==ICAFE_NORMAL) {
|
||||
if (status==ICAFE_NORMAL)
|
||||
{
|
||||
_val=val[0];
|
||||
}
|
||||
CAFE::setNelemToPrevious(handle, nelemPrevious);
|
||||
@@ -823,12 +916,14 @@ public:
|
||||
int get(const unsigned int handle, dbr_double_t & _val) //6
|
||||
{
|
||||
unsigned int nelemPrevious=CAFE::setNelemToOne(handle);
|
||||
if (nelemPrevious==0) {
|
||||
if (nelemPrevious==0)
|
||||
{
|
||||
return ECAFE_INVALID_HANDLE;
|
||||
}
|
||||
dbr_double_t val[1]= {0};
|
||||
status=cafeDoppio.get(handle, DBR_DOUBLE, val);
|
||||
if (status==ICAFE_NORMAL) {
|
||||
if (status==ICAFE_NORMAL)
|
||||
{
|
||||
_val=val[0];
|
||||
}
|
||||
CAFE::setNelemToPrevious(handle, nelemPrevious);
|
||||
@@ -837,12 +932,14 @@ public:
|
||||
int get(const unsigned int handle, dbr_double_t & _val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity) //6
|
||||
{
|
||||
unsigned int nelemPrevious=CAFE::setNelemToOne(handle);
|
||||
if (nelemPrevious==0) {
|
||||
if (nelemPrevious==0)
|
||||
{
|
||||
return ECAFE_INVALID_HANDLE;
|
||||
}
|
||||
dbr_double_t val[1]= {0};
|
||||
status=cafeDoppio.get(handle, DBR_STS_DOUBLE, val, alarmStatus, alarmSeverity);
|
||||
if (status==ICAFE_NORMAL) {
|
||||
if (status==ICAFE_NORMAL)
|
||||
{
|
||||
_val=val[0];
|
||||
}
|
||||
CAFE::setNelemToPrevious(handle, nelemPrevious);
|
||||
@@ -852,12 +949,14 @@ public:
|
||||
dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts) //6
|
||||
{
|
||||
unsigned int nelemPrevious=CAFE::setNelemToOne(handle);
|
||||
if (nelemPrevious==0) {
|
||||
if (nelemPrevious==0)
|
||||
{
|
||||
return ECAFE_INVALID_HANDLE;
|
||||
}
|
||||
dbr_double_t val[1]= {0};
|
||||
status=cafeDoppio.get(handle, DBR_TIME_DOUBLE, val, alarmStatus, alarmSeverity, ts);
|
||||
if (status==ICAFE_NORMAL) {
|
||||
if (status==ICAFE_NORMAL)
|
||||
{
|
||||
_val=val[0];
|
||||
}
|
||||
CAFE::setNelemToPrevious(handle, nelemPrevious);
|
||||
@@ -1001,6 +1100,24 @@ public:
|
||||
return cafeDoppio.set (handle, DBR_DOUBLE, _val);
|
||||
};
|
||||
|
||||
/* NOT REQUIRED
|
||||
int setStringWF(const unsigned int handle, std::string wfStr) {
|
||||
dbr_char_t * wfChar = new dbr_char_t[wfStr.size()];
|
||||
unsigned short iCount = 0;
|
||||
for (std::string::size_type i=0; i < wfStr.size(); ++i) {
|
||||
if (wfStr[i].compare("\\") == 0 ) {
|
||||
wfChar[iCount] = '\n';
|
||||
++i;
|
||||
}
|
||||
else {
|
||||
wfChar[iCount] = wfStr[i]
|
||||
}
|
||||
++iCount;
|
||||
}
|
||||
return cafeCappuccino.set (handle, DBR_CHAR, wfChar);
|
||||
delete [] wfChar;
|
||||
}
|
||||
*/
|
||||
|
||||
//set for PythonTypes
|
||||
//0
|
||||
@@ -1051,7 +1168,7 @@ public:
|
||||
return set (handle, _val);
|
||||
};
|
||||
//5
|
||||
int setLong(const unsigned int handle, const dbr_long_t _val)
|
||||
int setLong(const unsigned int handle, const dbr_long_t _val)
|
||||
{
|
||||
return set (handle, _val);
|
||||
};
|
||||
@@ -1071,7 +1188,8 @@ public:
|
||||
int set(const unsigned int handle, std::string _val)
|
||||
{
|
||||
unsigned int nelemPrevious=CAFE::setNelemToOne(handle);
|
||||
if (nelemPrevious==0) {
|
||||
if (nelemPrevious==0)
|
||||
{
|
||||
return ECAFE_INVALID_HANDLE;
|
||||
}
|
||||
dbr_string_t val[1];
|
||||
@@ -1088,7 +1206,8 @@ public:
|
||||
int set(const unsigned int handle, const dbr_string_t _val)
|
||||
{
|
||||
unsigned int nelemPrevious=CAFE::setNelemToOne(handle);
|
||||
if (nelemPrevious==0) {
|
||||
if (nelemPrevious==0)
|
||||
{
|
||||
return ECAFE_INVALID_HANDLE;
|
||||
}
|
||||
dbr_string_t val[1];
|
||||
@@ -1101,7 +1220,8 @@ public:
|
||||
int set(const unsigned int handle, const dbr_short_t _val)
|
||||
{
|
||||
unsigned int nelemPrevious=CAFE::setNelemToOne(handle);
|
||||
if (nelemPrevious==0) {
|
||||
if (nelemPrevious==0)
|
||||
{
|
||||
return ECAFE_INVALID_HANDLE;
|
||||
}
|
||||
dbr_short_t val[1];
|
||||
@@ -1114,7 +1234,8 @@ public:
|
||||
int set(const unsigned int handle, const dbr_float_t _val)
|
||||
{
|
||||
unsigned int nelemPrevious=CAFE::setNelemToOne(handle);
|
||||
if (nelemPrevious==0) {
|
||||
if (nelemPrevious==0)
|
||||
{
|
||||
return ECAFE_INVALID_HANDLE;
|
||||
}
|
||||
dbr_float_t val[1];
|
||||
@@ -1127,7 +1248,8 @@ public:
|
||||
int set(const unsigned int handle, const dbr_enum_t _val)
|
||||
{
|
||||
unsigned int nelemPrevious=CAFE::setNelemToOne(handle);
|
||||
if (nelemPrevious==0) {
|
||||
if (nelemPrevious==0)
|
||||
{
|
||||
return ECAFE_INVALID_HANDLE;
|
||||
}
|
||||
dbr_enum_t val[1];
|
||||
@@ -1140,7 +1262,8 @@ public:
|
||||
int set(const unsigned int handle, const dbr_char_t _val)
|
||||
{
|
||||
unsigned int nelemPrevious=CAFE::setNelemToOne(handle);
|
||||
if (nelemPrevious==0) {
|
||||
if (nelemPrevious==0)
|
||||
{
|
||||
return ECAFE_INVALID_HANDLE;
|
||||
}
|
||||
dbr_char_t val[1];
|
||||
@@ -1153,7 +1276,8 @@ public:
|
||||
int set(const unsigned int handle, const dbr_long_t _val)
|
||||
{
|
||||
unsigned int nelemPrevious=CAFE::setNelemToOne(handle);
|
||||
if (nelemPrevious==0) {
|
||||
if (nelemPrevious==0)
|
||||
{
|
||||
return ECAFE_INVALID_HANDLE;
|
||||
}
|
||||
dbr_long_t val[1];
|
||||
@@ -1166,15 +1290,18 @@ public:
|
||||
int set(const unsigned int handle, const long long _val)
|
||||
{
|
||||
unsigned int nelemPrevious=CAFE::setNelemToOne(handle);
|
||||
if (nelemPrevious==0) {
|
||||
if (nelemPrevious==0)
|
||||
{
|
||||
return ECAFE_INVALID_HANDLE;
|
||||
}
|
||||
if (_val <= LONG_MAX) {
|
||||
if (_val <= LONG_MAX)
|
||||
{
|
||||
dbr_long_t val[1];
|
||||
val[0]=_val;
|
||||
status=CAFE::set(handle, val);
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
dbr_double_t val[1];
|
||||
val[0]=_val;
|
||||
status=CAFE::set(handle, val);
|
||||
@@ -1186,7 +1313,8 @@ public:
|
||||
int set(const unsigned int handle, const dbr_double_t _val)
|
||||
{
|
||||
unsigned int nelemPrevious=CAFE::setNelemToOne(handle);
|
||||
if (nelemPrevious==0) {
|
||||
if (nelemPrevious==0)
|
||||
{
|
||||
return ECAFE_INVALID_HANDLE;
|
||||
}
|
||||
dbr_double_t val[1];
|
||||
@@ -1321,7 +1449,8 @@ public:
|
||||
std::vector<unsigned int> closeDisconnectedChannelsFromWithinGroupV(const unsigned int groupHandle)
|
||||
{
|
||||
std::vector<unsigned int> dhV=handleHelper.getDisconnectedHandlesFromWithinGroupV(groupHandle);
|
||||
if (dhV.size() >0) {
|
||||
if (dhV.size() >0)
|
||||
{
|
||||
closeChannelsKeepHandles(dhV);
|
||||
}
|
||||
return dhV;
|
||||
|
||||
@@ -79,17 +79,22 @@ int getCachePVArrayNoWait (std::vector<unsigned int> handleV, PVDataHolder * pv
|
||||
{
|
||||
|
||||
int overallStatus=ICAFE_NORMAL;
|
||||
for (size_t i=0; i< (size_t) handleV.size(); ++i) {
|
||||
for (size_t i=0; i< (size_t) handleV.size(); ++i)
|
||||
{
|
||||
status=getCacheNoWait(handleV[i], pvd[i]);
|
||||
//cout << "handle= " << handleV[i] << " pvFromHandle= " << CAFE::getPVFromHandle(handleV[i]) << " status= " << pvd[i].getStatus() << " val= " << pvd[i].getAsString() << endl;
|
||||
if (status!=ICAFE_NORMAL) {
|
||||
//std::cout << "handle= " << handleV[i] << " pvFromHandle= " << CAFE::getPVFromHandle(handleV[i]) << " status= " << pvd[i].getStatus() << " val= " << pvd[i].getAsString() << std::endl;
|
||||
if (status!=ICAFE_NORMAL)
|
||||
{
|
||||
resetCallbackGet(handleV[i]);
|
||||
if(overallStatus==ICAFE_NORMAL) {
|
||||
if(overallStatus==ICAFE_NORMAL)
|
||||
{
|
||||
overallStatus=status;
|
||||
}
|
||||
}
|
||||
if (pvd[i].getStatus() !=ICAFE_NORMAL) {
|
||||
if(overallStatus==ICAFE_NORMAL) {
|
||||
if (pvd[i].getStatus() !=ICAFE_NORMAL)
|
||||
{
|
||||
if(overallStatus==ICAFE_NORMAL)
|
||||
{
|
||||
overallStatus=pvd[i].getStatus();
|
||||
}
|
||||
}
|
||||
@@ -177,6 +182,10 @@ int getCache(const unsigned int handle, dbr_long_t * _val, dbr_short_t &alarm
|
||||
return cafeLatte.getCache(handle, DBR_TIME_LONG, _val, alarmStatus, alarmSeverity, ts);
|
||||
};
|
||||
//4
|
||||
int getCacheCharArray(const unsigned int handle, dbr_char_t * _val)
|
||||
{
|
||||
return cafeCappuccino.getCache(handle, DBR_CHAR, _val);
|
||||
};
|
||||
int getCache(const unsigned int handle, dbr_char_t * _val)
|
||||
{
|
||||
return cafeCappuccino.getCache(handle, DBR_CHAR, _val);
|
||||
@@ -259,7 +268,8 @@ int getCacheStringArray(const unsigned int handle, std::string * valStr)
|
||||
{
|
||||
dbr_string_t * _val = new dbr_string_t[handleHelper.getNelemRequest(handle)];
|
||||
status=cafeSoluble.getCache(handle, DBR_STRING, _val);
|
||||
for (unsigned int i=0; i< handleHelper.getNelemRequest(handle); ++i) {
|
||||
for (unsigned int i=0; i< handleHelper.getNelemRequest(handle); ++i)
|
||||
{
|
||||
valStr[i]=_val[i];
|
||||
}
|
||||
delete [] _val;
|
||||
@@ -269,7 +279,8 @@ int getCache(const unsigned int handle, std::string * valStr)
|
||||
{
|
||||
dbr_string_t * _val = new dbr_string_t[handleHelper.getNelemRequest(handle)];
|
||||
status=cafeSoluble.getCache(handle, DBR_STRING, _val);
|
||||
for (unsigned int i=0; i< handleHelper.getNelemRequest(handle); ++i) {
|
||||
for (unsigned int i=0; i< handleHelper.getNelemRequest(handle); ++i)
|
||||
{
|
||||
valStr[i]=_val[i];
|
||||
}
|
||||
delete [] _val;
|
||||
@@ -279,7 +290,8 @@ int getCache(const unsigned int handle, std::string * valStr, dbr_short_t &al
|
||||
{
|
||||
dbr_string_t * _val = new dbr_string_t[handleHelper.getNelemRequest(handle)];
|
||||
status=cafeSoluble.getCache(handle, DBR_STS_STRING, _val, alarmStatus, alarmSeverity);
|
||||
for (unsigned int i=0; i< handleHelper.getNelemRequest(handle); ++i) {
|
||||
for (unsigned int i=0; i< handleHelper.getNelemRequest(handle); ++i)
|
||||
{
|
||||
valStr[i]=_val[i];
|
||||
}
|
||||
delete [] _val;
|
||||
@@ -289,7 +301,8 @@ int getCache(const unsigned int handle, std::string * valStr, dbr_short_t &al
|
||||
{
|
||||
dbr_string_t * _val = new dbr_string_t[handleHelper.getNelemRequest(handle)];
|
||||
status=cafeSoluble.getCache(handle, DBR_TIME_STRING, _val, alarmStatus, alarmSeverity, ts);
|
||||
for (unsigned int i=0; i< handleHelper.getNelemRequest(handle); ++i) {
|
||||
for (unsigned int i=0; i< handleHelper.getNelemRequest(handle); ++i)
|
||||
{
|
||||
valStr[i]=_val[i];
|
||||
}
|
||||
delete [] _val;
|
||||
@@ -302,7 +315,8 @@ int getCacheString(const unsigned int handle, std::string & valStr) //0
|
||||
unsigned int nelemPrevious=CAFE::setNelemToRetrieveFromCacheToOne(handle);
|
||||
dbr_string_t val[1]= {""};
|
||||
status=cafeSoluble.getCache(handle, DBR_STRING, val);
|
||||
if (status==ICAFE_NORMAL) {
|
||||
if (status==ICAFE_NORMAL)
|
||||
{
|
||||
valStr=val[0];
|
||||
}
|
||||
CAFE::setNelemToRetrieveFromCacheToPrevious(handle, nelemPrevious);
|
||||
@@ -314,7 +328,8 @@ int getCache(const unsigned int handle, std::string & valStr) //0
|
||||
unsigned int nelemPrevious=CAFE::setNelemToRetrieveFromCacheToOne(handle);
|
||||
dbr_string_t val[1]= {""};
|
||||
status=cafeSoluble.getCache(handle, DBR_STRING, val);
|
||||
if (status==ICAFE_NORMAL) {
|
||||
if (status==ICAFE_NORMAL)
|
||||
{
|
||||
valStr=val[0];
|
||||
}
|
||||
CAFE::setNelemToRetrieveFromCacheToPrevious(handle, nelemPrevious);
|
||||
@@ -325,7 +340,8 @@ int getCache(const unsigned int handle, std::string & valStr, dbr_short_t &ala
|
||||
unsigned int nelemPrevious=CAFE::setNelemToRetrieveFromCacheToOne(handle);
|
||||
dbr_string_t val[1]= {""};
|
||||
status=cafeSoluble.getCache(handle, DBR_STS_STRING, val, alarmStatus, alarmSeverity);
|
||||
if (status==ICAFE_NORMAL) {
|
||||
if (status==ICAFE_NORMAL)
|
||||
{
|
||||
valStr=val[0];
|
||||
}
|
||||
CAFE::setNelemToRetrieveFromCacheToPrevious(handle, nelemPrevious);
|
||||
@@ -337,7 +353,8 @@ int getCache(const unsigned int handle, std::string & valStr,
|
||||
unsigned int nelemPrevious=CAFE::setNelemToRetrieveFromCacheToOne(handle);
|
||||
dbr_string_t val[1]= {""};
|
||||
status=cafeSoluble.getCache(handle, DBR_TIME_STRING, val, alarmStatus, alarmSeverity, ts);
|
||||
if (status==ICAFE_NORMAL) {
|
||||
if (status==ICAFE_NORMAL)
|
||||
{
|
||||
valStr=val[0];
|
||||
}
|
||||
CAFE::setNelemToRetrieveFromCacheToPrevious(handle, nelemPrevious);
|
||||
@@ -396,7 +413,8 @@ int getCache(const unsigned int *handleArray, unsigned int nelem, std::strin
|
||||
dbr_string_t * val = new dbr_string_t[nelem];
|
||||
status=cafeSoluble.getCache(handleArray, nelem, DBR_TIME_STRING, val, statusArray,
|
||||
alarmStatus, alarmSeverity, ts);
|
||||
for (unsigned int i=0; i< nelem; ++i) {
|
||||
for (unsigned int i=0; i< nelem; ++i)
|
||||
{
|
||||
valStr[i]=val[i];
|
||||
}
|
||||
delete [] val;
|
||||
@@ -408,7 +426,8 @@ int getCache(const unsigned int *handleArray, unsigned int nelem, std::strin
|
||||
dbr_string_t * val = new dbr_string_t[nelem];
|
||||
status=cafeSoluble.getCache(handleArray, nelem, DBR_STS_STRING, val, statusArray,
|
||||
alarmStatus, alarmSeverity);
|
||||
for (unsigned int i=0; i< nelem; ++i) {
|
||||
for (unsigned int i=0; i< nelem; ++i)
|
||||
{
|
||||
valStr[i]=val[i];
|
||||
}
|
||||
delete [] val;
|
||||
@@ -418,7 +437,8 @@ int getCache (const unsigned int *handleArray, unsigned int nelem, std::strin
|
||||
{
|
||||
dbr_string_t * val = new dbr_string_t[nelem];
|
||||
status=cafeSoluble.getCache(handleArray, nelem, DBR_STRING, val, statusArray);
|
||||
for (unsigned int i=0; i< nelem; ++i) {
|
||||
for (unsigned int i=0; i< nelem; ++i)
|
||||
{
|
||||
valStr[i]=val[i];
|
||||
}
|
||||
delete [] val;
|
||||
@@ -740,7 +760,8 @@ int getCache(const char * pv, std::string * valStr)
|
||||
unsigned int handle=handleHelper.getHandleFromPV(pv);
|
||||
dbr_string_t * _val = new dbr_string_t[handleHelper.getNelemRequest(handle)];
|
||||
status=cafeSoluble.getCache(handle, DBR_STRING, _val);
|
||||
for (unsigned int i=0; i< handleHelper.getNelemRequest(handle); ++i) {
|
||||
for (unsigned int i=0; i< handleHelper.getNelemRequest(handle); ++i)
|
||||
{
|
||||
valStr[i]=_val[i];
|
||||
}
|
||||
delete [] _val;
|
||||
@@ -751,7 +772,8 @@ int getCache(const char * pv, std::string * valStr, dbr_short_t &alarmStatus,
|
||||
unsigned int handle=handleHelper.getHandleFromPV(pv);
|
||||
dbr_string_t * _val = new dbr_string_t[handleHelper.getNelemRequest(handle)];
|
||||
status=cafeSoluble.getCache(handle, DBR_STS_STRING, _val, alarmStatus, alarmSeverity);
|
||||
for (unsigned int i=0; i< handleHelper.getNelemRequest(handle); ++i) {
|
||||
for (unsigned int i=0; i< handleHelper.getNelemRequest(handle); ++i)
|
||||
{
|
||||
valStr[i]=_val[i];
|
||||
}
|
||||
delete [] _val;
|
||||
@@ -762,7 +784,8 @@ int getCache(const char * pv, std::string * valStr, dbr_short_t &alarmStatus,
|
||||
unsigned int handle=handleHelper.getHandleFromPV(pv);
|
||||
dbr_string_t * _val = new dbr_string_t[handleHelper.getNelemRequest(handle)];
|
||||
status=cafeSoluble.getCache(handle, DBR_TIME_STRING, _val, alarmStatus, alarmSeverity, ts);
|
||||
for (unsigned int i=0; i< handleHelper.getNelemRequest(handle); ++i) {
|
||||
for (unsigned int i=0; i< handleHelper.getNelemRequest(handle); ++i)
|
||||
{
|
||||
valStr[i]=_val[i];
|
||||
}
|
||||
delete [] _val;
|
||||
|
||||
@@ -1,748 +0,0 @@
|
||||
///
|
||||
/// \file cafeCache.h
|
||||
/// \brief CAFE methods retrieving data from cache. (Belongs to cafe.h)
|
||||
/// \author Jan Chrin, PSI
|
||||
/// \date Release: February 2015
|
||||
/// \version CAFE 1.0.0
|
||||
///
|
||||
|
||||
#ifndef CAFECACHE_H
|
||||
#define CAFECACHE_H
|
||||
|
||||
int getPulseID(unsigned int * handle, unsigned int nelem, unsigned int * pulseID)
|
||||
{
|
||||
int status=ICAFE_NORMAL;
|
||||
int statusLocal=ICAFE_NORMAL;
|
||||
for (unsigned int i=0; i<nelem; ++i) {
|
||||
statusLocal=handleHelper.getPulseID(handle[i], pulseID[i]);
|
||||
if (statusLocal!=ICAFE_NORMAL && status==ICAFE_NORMAL) {
|
||||
status=statusLocal;
|
||||
}
|
||||
}
|
||||
return status;
|
||||
}
|
||||
|
||||
int getPulseID(unsigned int handle, unsigned int &pulseID)
|
||||
{
|
||||
pulseID=0;
|
||||
return handleHelper.getPulseID(handle, pulseID);
|
||||
}
|
||||
|
||||
int getPulseID(char * pv, unsigned int &pulseID)
|
||||
{
|
||||
pulseID=0;
|
||||
unsigned int handle=handleHelper.getHandleFromPV(pv);
|
||||
return handleHelper.getPulseID(handle, pulseID);
|
||||
}
|
||||
|
||||
unsigned int getPulseIDFromTS(epicsTimeStamp ts)
|
||||
{
|
||||
return handleHelper.getPulseIDFromTS(ts);
|
||||
}
|
||||
|
||||
vector<unsigned int>getPulseIDFromTS(PVDataHolder * pvd, unsigned int nelem)
|
||||
{
|
||||
vector<unsigned int> vui;
|
||||
vui.clear();
|
||||
vui.reserve(nelem);
|
||||
for (unsigned int i=0; i<nelem; ++i) {
|
||||
vui.push_back( getPulseIDFromTS(pvd[i].getEpicsTimeStamp()));
|
||||
}
|
||||
return vui;
|
||||
}
|
||||
|
||||
vector<unsigned int>getPulseIDFromTS(PVGroup pvg)
|
||||
{
|
||||
vector<unsigned int> vui;
|
||||
vui.clear();
|
||||
vui.reserve(pvg.getNPV());
|
||||
PVDataHolder * pvd=pvg.getPVData();
|
||||
for (unsigned int i=0; i<pvg.getNPV(); ++i) {
|
||||
vui.push_back( getPulseIDFromTS(pvd[i].getEpicsTimeStamp()));
|
||||
}
|
||||
return vui;
|
||||
}
|
||||
|
||||
int getCachePVArray (vector<unsigned int> 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;
|
||||
};
|
||||
|
||||
int getCachePVArrayNoWait (vector<unsigned int> handleV, PVDataHolder * pvd)
|
||||
{
|
||||
unsigned int * handleArray = new unsigned int [handleV.size()];
|
||||
int overallStatus=ICAFE_NORMAL;
|
||||
for (size_t i=0; i< (size_t) handleV.size(); ++i) {
|
||||
handleArray[i]= (unsigned int) handleV[i];
|
||||
status=getCacheNoWait(handleArray[i], pvd[i]);
|
||||
if (status!=ICAFE_NORMAL) {
|
||||
resetCallbackGet(handleArray[i]);
|
||||
if(overallStatus==ICAFE_NORMAL) {
|
||||
overallStatus=status;
|
||||
}
|
||||
}
|
||||
}
|
||||
delete [] handleArray;
|
||||
return status;
|
||||
};
|
||||
|
||||
int resetCallbackGet(const unsigned int handle);
|
||||
int resetCallbackPut(const unsigned int handle);
|
||||
|
||||
int getCacheNoWait(const unsigned int handle, PVDataHolder & pvd);
|
||||
|
||||
int getCache (const unsigned int handle, PVDataHolder & pvd);
|
||||
int getCache (const unsigned int *handleArray, unsigned int nelem, PVDataHolder * pvd);
|
||||
|
||||
int getCtrlCache (const unsigned int handle, PVCtrlHolder & pvc);
|
||||
int getCtrlCache (const unsigned int *handleArray, unsigned int nelem, PVCtrlHolder * pvc);
|
||||
|
||||
int getCache (const char * pv, PVDataHolder & pvd)
|
||||
{
|
||||
unsigned int handle=handleHelper.getHandleFromPV(pv);
|
||||
return getCache(handle, pvd);
|
||||
}
|
||||
int getCtrlCache (const char * pv, PVCtrlHolder & pvc)
|
||||
{
|
||||
unsigned int handle=handleHelper.getHandleFromPV(pv);
|
||||
return getCtrlCache(handle, pvc);
|
||||
}
|
||||
|
||||
//6
|
||||
int getCacheDoubleArray(const unsigned int handle, dbr_double_t * _val)
|
||||
{
|
||||
return cafeDoppio.getCache(handle, DBR_DOUBLE, _val);
|
||||
};
|
||||
int getCache(const unsigned int handle, dbr_double_t * _val)
|
||||
{
|
||||
return cafeDoppio.getCache(handle, DBR_DOUBLE, _val);
|
||||
};
|
||||
int getCache(const unsigned int handle, dbr_double_t * _val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity)
|
||||
{
|
||||
return cafeDoppio.getCache(handle, DBR_STS_DOUBLE, _val, alarmStatus, alarmSeverity);
|
||||
};
|
||||
int getCache(const unsigned int handle, dbr_double_t * _val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts)
|
||||
{
|
||||
return cafeDoppio.getCache(handle, DBR_TIME_DOUBLE, _val, alarmStatus, alarmSeverity, ts);
|
||||
};
|
||||
//5+ long long
|
||||
int getCache(const unsigned int handle, long long * _val);
|
||||
int getCache(const unsigned int handle, long long * _val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity);
|
||||
int getCache(const unsigned int handle, long long * _val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts);
|
||||
|
||||
//5
|
||||
int getCacheLongArray(const unsigned int handle, dbr_long_t * _val)
|
||||
{
|
||||
return cafeLatte.getCache(handle, DBR_LONG, _val);
|
||||
};
|
||||
int getCache(const unsigned int handle, dbr_long_t * _val)
|
||||
{
|
||||
return cafeLatte.getCache(handle, DBR_LONG, _val);
|
||||
};
|
||||
int getCache(const unsigned int handle, dbr_long_t * _val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity)
|
||||
{
|
||||
return cafeLatte.getCache(handle, DBR_STS_LONG, _val, alarmStatus, alarmSeverity);
|
||||
};
|
||||
int getCache(const unsigned int handle, dbr_long_t * _val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts)
|
||||
{
|
||||
return cafeLatte.getCache(handle, DBR_TIME_LONG, _val, alarmStatus, alarmSeverity, ts);
|
||||
};
|
||||
//4
|
||||
int getCache(const unsigned int handle, dbr_char_t * _val)
|
||||
{
|
||||
return cafeCappuccino.getCache(handle, DBR_CHAR, _val);
|
||||
};
|
||||
int getCache(const unsigned int handle, dbr_char_t * _val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity)
|
||||
{
|
||||
return cafeCappuccino.getCache(handle, DBR_STS_ENUM, _val, alarmStatus, alarmSeverity);
|
||||
};
|
||||
int getCache(const unsigned int handle, dbr_char_t * _val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts)
|
||||
{
|
||||
return cafeCappuccino.getCache(handle, DBR_TIME_ENUM, _val, alarmStatus, alarmSeverity, ts);
|
||||
};
|
||||
//3
|
||||
int getCache(const unsigned int handle, dbr_enum_t * _val)
|
||||
{
|
||||
return cafeEspresso.getCache(handle, DBR_ENUM, _val);
|
||||
};
|
||||
int getCache(const unsigned int handle, dbr_enum_t * _val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity)
|
||||
{
|
||||
return cafeEspresso.getCache(handle, DBR_STS_ENUM, _val, alarmStatus, alarmSeverity);
|
||||
};
|
||||
int getCache(const unsigned int handle, dbr_enum_t * _val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts)
|
||||
{
|
||||
return cafeEspresso.getCache(handle, DBR_TIME_ENUM, _val, alarmStatus, alarmSeverity, ts);
|
||||
};
|
||||
//2
|
||||
int getCacheFloatArray(const unsigned int handle, dbr_float_t * _val)
|
||||
{
|
||||
return cafeFrappuccino.getCache(handle, DBR_FLOAT, _val);
|
||||
};
|
||||
int getCache(const unsigned int handle, dbr_float_t * _val)
|
||||
{
|
||||
return cafeFrappuccino.getCache(handle, DBR_FLOAT, _val);
|
||||
};
|
||||
int getCache(const unsigned int handle, dbr_float_t * _val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity)
|
||||
{
|
||||
return cafeFrappuccino.getCache(handle, DBR_STS_FLOAT, _val, alarmStatus, alarmSeverity);
|
||||
};
|
||||
int getCache(const unsigned int handle, dbr_float_t * _val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts)
|
||||
{
|
||||
return cafeFrappuccino.getCache(handle, DBR_TIME_FLOAT, _val, alarmStatus, alarmSeverity, ts);
|
||||
};
|
||||
//1
|
||||
int getCache(const unsigned int handle, dbr_short_t * _val)
|
||||
{
|
||||
return cafeSchale.getCache(handle, DBR_SHORT, _val);
|
||||
};
|
||||
int getCache(const unsigned int handle, dbr_short_t * _val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity)
|
||||
{
|
||||
return cafeSchale.getCache(handle, DBR_STS_SHORT, _val, alarmStatus, alarmSeverity);
|
||||
};
|
||||
int getCache(const unsigned int handle, dbr_short_t * _val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts)
|
||||
{
|
||||
return cafeSchale.getCache(handle, DBR_TIME_SHORT, _val, alarmStatus, alarmSeverity, ts);
|
||||
};
|
||||
|
||||
|
||||
int getCacheDbrStringArray(const unsigned int handle, dbr_string_t * _val)
|
||||
{
|
||||
return cafeSoluble.getCache(handle, DBR_STRING, _val);
|
||||
};
|
||||
|
||||
//0
|
||||
int getCache(const unsigned int handle, dbr_string_t * _val)
|
||||
{
|
||||
return cafeSoluble.getCache(handle, DBR_STRING, _val);
|
||||
};
|
||||
int getCache(const unsigned int handle, dbr_string_t * _val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity)
|
||||
{
|
||||
return cafeSoluble.getCache(handle, DBR_STS_STRING, _val, alarmStatus, alarmSeverity);
|
||||
};
|
||||
int getCache(const unsigned int handle, dbr_string_t * _val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts)
|
||||
{
|
||||
return cafeSoluble.getCache(handle, DBR_TIME_STRING, _val, alarmStatus, alarmSeverity, ts);
|
||||
}
|
||||
//0+
|
||||
int getCacheStringArray(const unsigned int handle, string * valStr)
|
||||
{
|
||||
dbr_string_t * _val = new dbr_string_t[handleHelper.getNelemRequest(handle)];
|
||||
status=cafeSoluble.getCache(handle, DBR_STRING, _val);
|
||||
for (unsigned int i=0; i< handleHelper.getNelemRequest(handle); ++i) {
|
||||
valStr[i]=_val[i];
|
||||
}
|
||||
delete [] _val;
|
||||
return status;
|
||||
};
|
||||
int getCache(const unsigned int handle, string * valStr)
|
||||
{
|
||||
dbr_string_t * _val = new dbr_string_t[handleHelper.getNelemRequest(handle)];
|
||||
status=cafeSoluble.getCache(handle, DBR_STRING, _val);
|
||||
for (unsigned int i=0; i< handleHelper.getNelemRequest(handle); ++i) {
|
||||
valStr[i]=_val[i];
|
||||
}
|
||||
delete [] _val;
|
||||
return status;
|
||||
};
|
||||
int getCache(const unsigned int handle, string * valStr, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity)
|
||||
{
|
||||
dbr_string_t * _val = new dbr_string_t[handleHelper.getNelemRequest(handle)];
|
||||
status=cafeSoluble.getCache(handle, DBR_STS_STRING, _val, alarmStatus, alarmSeverity);
|
||||
for (unsigned int i=0; i< handleHelper.getNelemRequest(handle); ++i) {
|
||||
valStr[i]=_val[i];
|
||||
}
|
||||
delete [] _val;
|
||||
return status;
|
||||
};
|
||||
int getCache(const unsigned int handle, string * valStr, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts)
|
||||
{
|
||||
dbr_string_t * _val = new dbr_string_t[handleHelper.getNelemRequest(handle)];
|
||||
status=cafeSoluble.getCache(handle, DBR_TIME_STRING, _val, alarmStatus, alarmSeverity, ts);
|
||||
for (unsigned int i=0; i< handleHelper.getNelemRequest(handle); ++i) {
|
||||
valStr[i]=_val[i];
|
||||
}
|
||||
delete [] _val;
|
||||
return status;
|
||||
}
|
||||
//Single value
|
||||
//0+
|
||||
|
||||
int getCacheString(const unsigned int handle, string & valStr) //0
|
||||
{
|
||||
unsigned int nelemPrevious=CAFE::setNelemToRetrieveFromCacheToOne(handle);
|
||||
dbr_string_t val[1]= {""};
|
||||
status=cafeSoluble.getCache(handle, DBR_STRING, val);
|
||||
if (status==ICAFE_NORMAL) {
|
||||
valStr=val[0];
|
||||
}
|
||||
CAFE::setNelemToRetrieveFromCacheToPrevious(handle, nelemPrevious);
|
||||
return status;
|
||||
}
|
||||
|
||||
int getCache(const unsigned int handle, string & valStr) //0
|
||||
{
|
||||
unsigned int nelemPrevious=CAFE::setNelemToRetrieveFromCacheToOne(handle);
|
||||
dbr_string_t val[1]= {""};
|
||||
status=cafeSoluble.getCache(handle, DBR_STRING, val);
|
||||
if (status==ICAFE_NORMAL) {
|
||||
valStr=val[0];
|
||||
}
|
||||
CAFE::setNelemToRetrieveFromCacheToPrevious(handle, nelemPrevious);
|
||||
return status;
|
||||
}
|
||||
int getCache(const unsigned int handle, string & valStr, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity) //0
|
||||
{
|
||||
unsigned int nelemPrevious=CAFE::setNelemToRetrieveFromCacheToOne(handle);
|
||||
dbr_string_t val[1]= {""};
|
||||
status=cafeSoluble.getCache(handle, DBR_STS_STRING, val, alarmStatus, alarmSeverity);
|
||||
if (status==ICAFE_NORMAL) {
|
||||
valStr=val[0];
|
||||
}
|
||||
CAFE::setNelemToRetrieveFromCacheToPrevious(handle, nelemPrevious);
|
||||
return status;
|
||||
}
|
||||
int getCache(const unsigned int handle, string & valStr,
|
||||
dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts) //0
|
||||
{
|
||||
unsigned int nelemPrevious=CAFE::setNelemToRetrieveFromCacheToOne(handle);
|
||||
dbr_string_t val[1]= {""};
|
||||
status=cafeSoluble.getCache(handle, DBR_TIME_STRING, val, alarmStatus, alarmSeverity, ts);
|
||||
if (status==ICAFE_NORMAL) {
|
||||
valStr=val[0];
|
||||
}
|
||||
CAFE::setNelemToRetrieveFromCacheToPrevious(handle, nelemPrevious);
|
||||
return status;
|
||||
}
|
||||
int getCache(const unsigned int handle, dbr_string_t & val); //0
|
||||
int getCache(const unsigned int handle, dbr_string_t & val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity); //0
|
||||
int getCache(const unsigned int handle, dbr_string_t & val,
|
||||
dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts); //0
|
||||
int getCache(const unsigned int handle, dbr_short_t & val); //1
|
||||
int getCache(const unsigned int handle, dbr_short_t & val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity); //1
|
||||
int getCache(const unsigned int handle, dbr_short_t & val,
|
||||
dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts); //1
|
||||
int getCache(const unsigned int handle, dbr_float_t & val); //2
|
||||
int getCache(const unsigned int handle, dbr_float_t & val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity); //2
|
||||
int getCache(const unsigned int handle, dbr_float_t & val,
|
||||
dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts); //2
|
||||
int getCache(const unsigned int handle, dbr_enum_t & val); //3
|
||||
int getCache(const unsigned int handle, dbr_enum_t & val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity); //3
|
||||
int getCache(const unsigned int handle, dbr_enum_t & val,
|
||||
dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts); //3
|
||||
int getCache(const unsigned int handle, dbr_char_t & val); //4
|
||||
int getCache(const unsigned int handle, dbr_char_t & val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity); //4
|
||||
int getCache(const unsigned int handle, dbr_char_t & val,
|
||||
dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts); //4
|
||||
|
||||
int getCacheLong(const unsigned int handle, dbr_long_t & val)
|
||||
{
|
||||
return getCache(handle, val);
|
||||
}
|
||||
|
||||
int getCache(const unsigned int handle, dbr_long_t & val); //5
|
||||
int getCache(const unsigned int handle, dbr_long_t & val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity); //5
|
||||
int getCache(const unsigned int handle, dbr_long_t & val,
|
||||
dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts); //5
|
||||
int getCache(const unsigned int handle, long long & val); //5+
|
||||
int getCache(const unsigned int handle, long long & val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity); //5+
|
||||
int getCache(const unsigned int handle, long long & val,
|
||||
dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts); //5+
|
||||
int getCacheDouble(const unsigned int handle, dbr_double_t & val)
|
||||
{
|
||||
return getCache(handle, val);
|
||||
}
|
||||
|
||||
int getCache(const unsigned int handle, dbr_double_t & val); //6
|
||||
int getCache(const unsigned int handle, dbr_double_t & val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity); //6
|
||||
int getCache(const unsigned int handle, dbr_double_t & val,
|
||||
dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts); //6
|
||||
|
||||
|
||||
//getCache by array of handles
|
||||
//0+
|
||||
int getCache(const unsigned int *handleArray, unsigned int nelem, string * valStr, int *statusArray,
|
||||
dbr_short_t *alarmStatus, dbr_short_t *alarmSeverity, epicsTimeStamp *ts)
|
||||
{
|
||||
dbr_string_t * val = new dbr_string_t[nelem];
|
||||
status=cafeSoluble.getCache(handleArray, nelem, DBR_TIME_STRING, val, statusArray,
|
||||
alarmStatus, alarmSeverity, ts);
|
||||
for (unsigned int i=0; i< nelem; ++i) {
|
||||
valStr[i]=val[i];
|
||||
}
|
||||
delete [] val;
|
||||
return status;
|
||||
};
|
||||
int getCache(const unsigned int *handleArray, unsigned int nelem, string * valStr, int *statusArray,
|
||||
dbr_short_t *alarmStatus, dbr_short_t *alarmSeverity)
|
||||
{
|
||||
dbr_string_t * val = new dbr_string_t[nelem];
|
||||
status=cafeSoluble.getCache(handleArray, nelem, DBR_STS_STRING, val, statusArray,
|
||||
alarmStatus, alarmSeverity);
|
||||
for (unsigned int i=0; i< nelem; ++i) {
|
||||
valStr[i]=val[i];
|
||||
}
|
||||
delete [] val;
|
||||
return status;
|
||||
};
|
||||
int getCache (const unsigned int *handleArray, unsigned int nelem, string * valStr, int *statusArray)
|
||||
{
|
||||
dbr_string_t * val = new dbr_string_t[nelem];
|
||||
status=cafeSoluble.getCache(handleArray, nelem, DBR_STRING, val, statusArray);
|
||||
for (unsigned int i=0; i< nelem; ++i) {
|
||||
valStr[i]=val[i];
|
||||
}
|
||||
delete [] val;
|
||||
return status;
|
||||
}
|
||||
//0
|
||||
int getCache(const unsigned int *handleArray, unsigned int nelem, dbr_string_t * val, int *statusArray,
|
||||
dbr_short_t *alarmStatus, dbr_short_t *alarmSeverity, epicsTimeStamp *ts)
|
||||
{
|
||||
return cafeSoluble.getCache(handleArray, nelem, DBR_TIME_STRING, val, statusArray,
|
||||
alarmStatus, alarmSeverity, ts);
|
||||
};
|
||||
int getCache(const unsigned int *handleArray, unsigned int nelem, dbr_string_t * val, int *statusArray,
|
||||
dbr_short_t *alarmStatus, dbr_short_t *alarmSeverity)
|
||||
{
|
||||
return cafeSoluble.getCache(handleArray, nelem, DBR_STS_STRING, val, statusArray,
|
||||
alarmStatus, alarmSeverity);
|
||||
};
|
||||
int getCache (const unsigned int *handleArray, unsigned int nelem, dbr_string_t * val, int *statusArray)
|
||||
{
|
||||
return cafeSoluble.getCache(handleArray, nelem, DBR_STRING, val, statusArray);
|
||||
}
|
||||
//1
|
||||
int getCache(const unsigned int *handleArray, unsigned int nelem, dbr_short_t * val, int *statusArray,
|
||||
dbr_short_t *alarmStatus, dbr_short_t *alarmSeverity, epicsTimeStamp *ts)
|
||||
{
|
||||
return cafeSchale.getCache(handleArray, nelem, DBR_TIME_SHORT, val, statusArray,
|
||||
alarmStatus, alarmSeverity, ts);
|
||||
};
|
||||
int getCache(const unsigned int *handleArray, unsigned int nelem, dbr_short_t * val, int *statusArray,
|
||||
dbr_short_t *alarmStatus, dbr_short_t *alarmSeverity)
|
||||
{
|
||||
return cafeSchale.getCache(handleArray, nelem, DBR_STS_SHORT, val, statusArray,
|
||||
alarmStatus, alarmSeverity);
|
||||
};
|
||||
int getCache (const unsigned int *handleArray, unsigned int nelem, dbr_short_t * val, int *statusArray)
|
||||
{
|
||||
return cafeSchale.getCache(handleArray, nelem, DBR_SHORT, val, statusArray);
|
||||
}
|
||||
//2
|
||||
int getCache(const unsigned int *handleArray, unsigned int nelem, dbr_float_t * val, int *statusArray,
|
||||
dbr_short_t *alarmStatus, dbr_short_t *alarmSeverity, epicsTimeStamp *ts)
|
||||
{
|
||||
return cafeFrappuccino.getCache(handleArray, nelem, DBR_TIME_FLOAT, val, statusArray,
|
||||
alarmStatus, alarmSeverity, ts);
|
||||
};
|
||||
int getCache(const unsigned int *handleArray, unsigned int nelem, dbr_float_t * val, int *statusArray,
|
||||
dbr_short_t *alarmStatus, dbr_short_t *alarmSeverity)
|
||||
{
|
||||
return cafeFrappuccino.getCache(handleArray, nelem, DBR_STS_FLOAT, val, statusArray,
|
||||
alarmStatus, alarmSeverity);
|
||||
};
|
||||
int getCache (const unsigned int *handleArray, unsigned int nelem, dbr_float_t * val, int *statusArray)
|
||||
{
|
||||
return cafeFrappuccino.getCache(handleArray, nelem, DBR_FLOAT, val, statusArray);
|
||||
}
|
||||
//3
|
||||
int getCache(const unsigned int *handleArray, unsigned int nelem, dbr_ushort_t * val, int *statusArray,
|
||||
dbr_short_t *alarmStatus, dbr_short_t *alarmSeverity, epicsTimeStamp *ts)
|
||||
{
|
||||
return cafeEspresso.getCache(handleArray, nelem, DBR_TIME_ENUM, val, statusArray,
|
||||
alarmStatus, alarmSeverity, ts);
|
||||
};
|
||||
int getCache(const unsigned int *handleArray, unsigned int nelem, dbr_ushort_t * val, int *statusArray,
|
||||
dbr_short_t *alarmStatus, dbr_short_t *alarmSeverity)
|
||||
{
|
||||
return cafeEspresso.getCache(handleArray, nelem, DBR_STS_ENUM, val, statusArray,
|
||||
alarmStatus, alarmSeverity);
|
||||
};
|
||||
int getCache (const unsigned int *handleArray, unsigned int nelem, dbr_ushort_t * val, int *statusArray)
|
||||
{
|
||||
return cafeEspresso.getCache(handleArray, nelem, DBR_ENUM, val, statusArray);
|
||||
}
|
||||
//4
|
||||
int getCache(const unsigned int *handleArray, unsigned int nelem, dbr_char_t * val, int *statusArray,
|
||||
dbr_short_t *alarmStatus, dbr_short_t *alarmSeverity, epicsTimeStamp *ts)
|
||||
{
|
||||
return cafeCappuccino.getCache(handleArray, nelem, DBR_TIME_CHAR, val, statusArray,
|
||||
alarmStatus, alarmSeverity, ts);
|
||||
};
|
||||
int getCache(const unsigned int *handleArray, unsigned int nelem, dbr_char_t * val, int *statusArray,
|
||||
dbr_short_t *alarmStatus, dbr_short_t *alarmSeverity)
|
||||
{
|
||||
return cafeCappuccino.getCache(handleArray, nelem, DBR_STS_CHAR, val, statusArray,
|
||||
alarmStatus, alarmSeverity);
|
||||
};
|
||||
int getCache (const unsigned int *handleArray, unsigned int nelem, dbr_char_t * val, int *statusArray)
|
||||
{
|
||||
return cafeCappuccino.getCache(handleArray, nelem, DBR_CHAR, val, statusArray);
|
||||
}
|
||||
//5
|
||||
int getCache(unsigned int *handleArray, unsigned int nelem, dbr_long_t * val, int *statusArray,
|
||||
dbr_short_t *alarmStatus, dbr_short_t *alarmSeverity, epicsTimeStamp *ts)
|
||||
{
|
||||
return cafeLatte.getCache(handleArray, nelem, DBR_TIME_LONG, val, statusArray,
|
||||
alarmStatus, alarmSeverity, ts);
|
||||
};
|
||||
int getCache(const unsigned int *handleArray, unsigned int nelem, dbr_long_t * val, int *statusArray,
|
||||
dbr_short_t *alarmStatus, dbr_short_t *alarmSeverity)
|
||||
{
|
||||
return cafeLatte.getCache(handleArray, nelem, DBR_STS_LONG, val, statusArray,
|
||||
alarmStatus, alarmSeverity);
|
||||
};
|
||||
int getCache (const unsigned int *handleArray, unsigned int nelem, dbr_long_t * val, int *statusArray)
|
||||
{
|
||||
return cafeLatte.getCache(handleArray, nelem, DBR_LONG, val, statusArray);
|
||||
}
|
||||
//5+ long long
|
||||
int getCache(const unsigned int *handleArray, unsigned int nelem, long long * val, int *statusArray,
|
||||
dbr_short_t *alarmStatus, dbr_short_t *alarmSeverity, epicsTimeStamp *ts);
|
||||
|
||||
int getCache(const unsigned int *handleArray, unsigned int nelem, long long * val, int *statusArray,
|
||||
dbr_short_t *alarmStatus, dbr_short_t *alarmSeverity);
|
||||
|
||||
int getCache (const unsigned int *handleArray, unsigned int nelem, long long * val, int *statusArray);
|
||||
//6
|
||||
int getCache(const unsigned int *handleArray, unsigned int nelem, dbr_double_t * val, int *statusArray,
|
||||
dbr_short_t *alarmStatus, dbr_short_t *alarmSeverity, epicsTimeStamp *ts)
|
||||
{
|
||||
return cafeDoppio.getCache(handleArray, nelem, DBR_TIME_DOUBLE, val, statusArray,
|
||||
alarmStatus, alarmSeverity, ts);
|
||||
};
|
||||
int getCache(const unsigned int *handleArray, unsigned int nelem, dbr_double_t * val, int *statusArray,
|
||||
dbr_short_t *alarmStatus, dbr_short_t *alarmSeverity)
|
||||
{
|
||||
return cafeDoppio.getCache(handleArray, nelem, DBR_STS_DOUBLE, val, statusArray,
|
||||
alarmStatus, alarmSeverity);
|
||||
};
|
||||
int getCache (const unsigned int *handleArray, unsigned int nelem, dbr_double_t * val, int *statusArray)
|
||||
{
|
||||
return cafeDoppio.getCache(handleArray, nelem, DBR_DOUBLE, val, statusArray);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////// by PV name ///////////////////////////////////
|
||||
|
||||
int getCache(const char * pv, string & valStr); //0+
|
||||
int getCache(const char * pv, string & valStr, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity); //0+
|
||||
int getCache(const char * pv, string & valStr,
|
||||
dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts); //0+
|
||||
int getCache(const char * pv, dbr_string_t & val); //0
|
||||
int getCache(const char * pv, dbr_string_t & val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity); //0
|
||||
int getCache(const char * pv, dbr_string_t & val,
|
||||
dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts); //0
|
||||
int getCache(const char * pv, dbr_short_t & val); //1
|
||||
int getCache(const char * pv, dbr_short_t & val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity); //1
|
||||
int getCache(const char * pv, dbr_short_t & val,
|
||||
dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts); //1
|
||||
int getCache(const char * pv, dbr_float_t & val); //2
|
||||
int getCache(const char * pv, dbr_float_t & val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity); //2
|
||||
int getCache(const char * pv, dbr_float_t & val,
|
||||
dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts); //2
|
||||
int getCache(const char * pv, dbr_enum_t & val); //3
|
||||
int getCache(const char * pv, dbr_enum_t & val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity); //3
|
||||
int getCache(const char * pv, dbr_enum_t & val,
|
||||
dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts); //3
|
||||
int getCache(const char * pv, dbr_char_t & val); //4
|
||||
int getCache(const char * pv, dbr_char_t & val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity); //4
|
||||
int getCache(const char * pv, dbr_char_t & val,
|
||||
dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts); //4
|
||||
int getCache(const char * pv, dbr_long_t & val); //5
|
||||
int getCache(const char * pv, dbr_long_t & val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity); //5
|
||||
int getCache(const char * pv, dbr_long_t & val,
|
||||
dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts); //5
|
||||
int getCache(const char * pv, long long & val) //5+
|
||||
{
|
||||
unsigned int handle=handleHelper.getHandleFromPV(pv);
|
||||
return CAFE::getCache(handle, val);
|
||||
}
|
||||
int getCache(const char * pv, long long & val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity) //5+
|
||||
{
|
||||
unsigned int handle=handleHelper.getHandleFromPV(pv);
|
||||
return CAFE::getCache(handle, val, alarmStatus, alarmSeverity);
|
||||
}
|
||||
int getCache(const char * pv, long long & val,
|
||||
dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts) //5+
|
||||
{
|
||||
unsigned int handle=handleHelper.getHandleFromPV(pv);
|
||||
return CAFE::getCache(handle, val, alarmStatus, alarmSeverity, ts);
|
||||
}
|
||||
int getCache(const char * pv, dbr_double_t & val); //6
|
||||
int getCache(const char * pv, dbr_double_t & val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity); //6
|
||||
int getCache(const char * pv, dbr_double_t & val,
|
||||
dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts); //6
|
||||
|
||||
|
||||
//6
|
||||
int getCache(const char * pv, dbr_double_t * _val)
|
||||
{
|
||||
unsigned int handle=handleHelper.getHandleFromPV(pv);
|
||||
return cafeDoppio.getCache(handle, DBR_DOUBLE, _val);
|
||||
};
|
||||
int getCache(const char * pv, dbr_double_t * _val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity)
|
||||
{
|
||||
unsigned int handle=handleHelper.getHandleFromPV(pv);
|
||||
return cafeDoppio.getCache(handle, DBR_STS_DOUBLE, _val, alarmStatus, alarmSeverity);
|
||||
};
|
||||
int getCache(const char * pv, dbr_double_t * _val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts)
|
||||
{
|
||||
unsigned int handle=handleHelper.getHandleFromPV(pv);
|
||||
return cafeDoppio.getCache(handle, DBR_TIME_DOUBLE, _val, alarmStatus, alarmSeverity, ts);
|
||||
};
|
||||
|
||||
//5+
|
||||
int getCache(const char * pv, long long * _val)
|
||||
{
|
||||
unsigned int handle=handleHelper.getHandleFromPV(pv);
|
||||
return CAFE::getCache(handle, _val);
|
||||
};
|
||||
int getCache(const char * pv, long long * _val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity)
|
||||
{
|
||||
unsigned int handle=handleHelper.getHandleFromPV(pv);
|
||||
return CAFE::getCache(handle, _val, alarmStatus, alarmSeverity);
|
||||
};
|
||||
int getCache(const char * pv, long long * _val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts)
|
||||
{
|
||||
unsigned int handle=handleHelper.getHandleFromPV(pv);
|
||||
return CAFE::getCache(handle, _val, alarmStatus, alarmSeverity, ts);
|
||||
};
|
||||
|
||||
//5
|
||||
int getCache(const char * pv, dbr_long_t * _val)
|
||||
{
|
||||
unsigned int handle=handleHelper.getHandleFromPV(pv);
|
||||
return cafeLatte.getCache(handle, DBR_LONG, _val);
|
||||
};
|
||||
int getCache(const char * pv, dbr_long_t * _val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity)
|
||||
{
|
||||
unsigned int handle=handleHelper.getHandleFromPV(pv);
|
||||
return cafeLatte.getCache(handle, DBR_STS_LONG, _val, alarmStatus, alarmSeverity);
|
||||
};
|
||||
int getCache(const char * pv, dbr_long_t * _val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts)
|
||||
{
|
||||
unsigned int handle=handleHelper.getHandleFromPV(pv);
|
||||
return cafeLatte.getCache(handle, DBR_TIME_LONG, _val, alarmStatus, alarmSeverity, ts);
|
||||
};
|
||||
//4
|
||||
int getCache(const char * pv, dbr_char_t * _val)
|
||||
{
|
||||
unsigned int handle=handleHelper.getHandleFromPV(pv);
|
||||
return cafeCappuccino.getCache(handle, DBR_CHAR, _val);
|
||||
};
|
||||
int getCache(const char * pv, dbr_char_t * _val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity)
|
||||
{
|
||||
unsigned int handle=handleHelper.getHandleFromPV(pv);
|
||||
return cafeCappuccino.getCache(handle, DBR_STS_ENUM, _val, alarmStatus, alarmSeverity);
|
||||
};
|
||||
int getCache(const char * pv, dbr_char_t * _val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts)
|
||||
{
|
||||
unsigned int handle=handleHelper.getHandleFromPV(pv);
|
||||
return cafeCappuccino.getCache(handle, DBR_TIME_ENUM, _val, alarmStatus, alarmSeverity, ts);
|
||||
};
|
||||
//3
|
||||
int getCache(const char * pv, dbr_enum_t * _val)
|
||||
{
|
||||
unsigned int handle=handleHelper.getHandleFromPV(pv);
|
||||
return cafeEspresso.getCache(handle, DBR_ENUM, _val);
|
||||
};
|
||||
int getCache(const char * pv, dbr_enum_t * _val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity)
|
||||
{
|
||||
unsigned int handle=handleHelper.getHandleFromPV(pv);
|
||||
return cafeEspresso.getCache(handle, DBR_STS_ENUM, _val, alarmStatus, alarmSeverity);
|
||||
};
|
||||
int getCache(const char * pv, dbr_enum_t * _val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts)
|
||||
{
|
||||
unsigned int handle=handleHelper.getHandleFromPV(pv);
|
||||
return cafeEspresso.getCache(handle, DBR_TIME_ENUM, _val, alarmStatus, alarmSeverity, ts);
|
||||
};
|
||||
//2
|
||||
int getCache(const char * pv, dbr_float_t * _val)
|
||||
{
|
||||
unsigned int handle=handleHelper.getHandleFromPV(pv);
|
||||
return cafeFrappuccino.getCache(handle, DBR_FLOAT, _val);
|
||||
};
|
||||
int getCache(const char * pv, dbr_float_t * _val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity)
|
||||
{
|
||||
unsigned int handle=handleHelper.getHandleFromPV(pv);
|
||||
return cafeFrappuccino.getCache(handle, DBR_STS_FLOAT, _val, alarmStatus, alarmSeverity);
|
||||
};
|
||||
int getCache(const char * pv, dbr_float_t * _val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts)
|
||||
{
|
||||
unsigned int handle=handleHelper.getHandleFromPV(pv);
|
||||
return cafeFrappuccino.getCache(handle, DBR_TIME_FLOAT, _val, alarmStatus, alarmSeverity, ts);
|
||||
};
|
||||
//1
|
||||
int getCache(const char * pv, dbr_short_t * _val)
|
||||
{
|
||||
unsigned int handle=handleHelper.getHandleFromPV(pv);
|
||||
return cafeSchale.getCache(handle, DBR_SHORT, _val);
|
||||
};
|
||||
int getCache(const char * pv, dbr_short_t * _val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity)
|
||||
{
|
||||
unsigned int handle=handleHelper.getHandleFromPV(pv);
|
||||
return cafeSchale.getCache(handle, DBR_STS_SHORT, _val, alarmStatus, alarmSeverity);
|
||||
};
|
||||
int getCache(const char * pv, dbr_short_t * _val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts)
|
||||
{
|
||||
unsigned int handle=handleHelper.getHandleFromPV(pv);
|
||||
return cafeSchale.getCache(handle, DBR_TIME_SHORT, _val, alarmStatus, alarmSeverity, ts);
|
||||
};
|
||||
//0
|
||||
int getCache(const char * pv, dbr_string_t * _val)
|
||||
{
|
||||
unsigned int handle=handleHelper.getHandleFromPV(pv);
|
||||
return cafeSoluble.getCache(handle, DBR_STRING, _val);
|
||||
};
|
||||
int getCache(const char * pv, dbr_string_t * _val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity)
|
||||
{
|
||||
unsigned int handle=handleHelper.getHandleFromPV(pv);
|
||||
return cafeSoluble.getCache(handle, DBR_STS_STRING, _val, alarmStatus, alarmSeverity);
|
||||
};
|
||||
int getCache(const char * pv, dbr_string_t * _val, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts)
|
||||
{
|
||||
unsigned int handle=handleHelper.getHandleFromPV(pv);
|
||||
return cafeSoluble.getCache(handle, DBR_TIME_STRING, _val, alarmStatus, alarmSeverity, ts);
|
||||
}
|
||||
//0+
|
||||
int getCache(const char * pv, string * valStr)
|
||||
{
|
||||
unsigned int handle=handleHelper.getHandleFromPV(pv);
|
||||
dbr_string_t * _val = new dbr_string_t[handleHelper.getNelemRequest(handle)];
|
||||
status=cafeSoluble.getCache(handle, DBR_STRING, _val);
|
||||
for (unsigned int i=0; i< handleHelper.getNelemRequest(handle); ++i) {
|
||||
valStr[i]=_val[i];
|
||||
}
|
||||
delete [] _val;
|
||||
return status;
|
||||
};
|
||||
int getCache(const char * pv, string * valStr, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity)
|
||||
{
|
||||
unsigned int handle=handleHelper.getHandleFromPV(pv);
|
||||
dbr_string_t * _val = new dbr_string_t[handleHelper.getNelemRequest(handle)];
|
||||
status=cafeSoluble.getCache(handle, DBR_STS_STRING, _val, alarmStatus, alarmSeverity);
|
||||
for (unsigned int i=0; i< handleHelper.getNelemRequest(handle); ++i) {
|
||||
valStr[i]=_val[i];
|
||||
}
|
||||
delete [] _val;
|
||||
return status;
|
||||
};
|
||||
int getCache(const char * pv, string * valStr, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts)
|
||||
{
|
||||
unsigned int handle=handleHelper.getHandleFromPV(pv);
|
||||
dbr_string_t * _val = new dbr_string_t[handleHelper.getNelemRequest(handle)];
|
||||
status=cafeSoluble.getCache(handle, DBR_TIME_STRING, _val, alarmStatus, alarmSeverity, ts);
|
||||
for (unsigned int i=0; i< handleHelper.getNelemRequest(handle); ++i) {
|
||||
valStr[i]=_val[i];
|
||||
}
|
||||
delete [] _val;
|
||||
return status;
|
||||
}
|
||||
|
||||
#endif // CAFECACHE_H
|
||||
@@ -26,7 +26,8 @@
|
||||
* method getAsString() converts CTYPE to string \n
|
||||
*
|
||||
*/
|
||||
template <class CTYPE> class CAFEConvert {
|
||||
template <class CTYPE> class CAFEConvert
|
||||
{
|
||||
private:
|
||||
CTYPE returnVal[1];
|
||||
public:
|
||||
@@ -55,20 +56,25 @@ template <class CTYPE> CTYPE * CAFEConvert<CTYPE>::get (CAFE_DATATYPE dt, CAFE_D
|
||||
// Valid for all types that have numeric_limits support
|
||||
// (brackets required) to avoid compiler error should isnan also be a native macro
|
||||
|
||||
switch (dt) {
|
||||
switch (dt)
|
||||
{
|
||||
case CAFE_DOUBLE:
|
||||
if ( (boost::math::isnan)((CTYPE) val.d) ) {
|
||||
if ( (boost::math::isnan)((CTYPE) val.d) )
|
||||
{
|
||||
returnVal[0]= (CTYPE) val.d;
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
returnVal[0]= (CTYPE) 0;
|
||||
}
|
||||
break;
|
||||
case CAFE_FLOAT:
|
||||
if ( (boost::math::isnan)((CTYPE) val.f) ) {
|
||||
if ( (boost::math::isnan)((CTYPE) val.f) )
|
||||
{
|
||||
returnVal[0]= (CTYPE) val.f;
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
returnVal[0]= 0;
|
||||
}
|
||||
break;
|
||||
@@ -135,7 +141,8 @@ template <class CTYPE> CTYPE * CAFEConvert<CTYPE>::get (unsigned int index, CAFE
|
||||
{
|
||||
#define __METHOD__ "CAFEConvert<CTYPE>::get(index, dt, val[])"
|
||||
|
||||
switch (dt) {
|
||||
switch (dt)
|
||||
{
|
||||
case CAFE_DOUBLE:
|
||||
returnVal[0]= (CTYPE) val[index].d;
|
||||
break;
|
||||
@@ -213,30 +220,38 @@ template <class CTYPE> CTYPE * CAFEConvert<CTYPE>::getStringFromEnum (unsigned i
|
||||
|
||||
unsigned int noEmptyStrings=0;
|
||||
//Check for empty strings:
|
||||
for (unsigned int j=0; j<noStr; ++j) {
|
||||
if (strcmp(stig[j],"")==0) {
|
||||
for (unsigned int j=0; j<noStr; ++j)
|
||||
{
|
||||
if (strcmp(stig[j],"")==0)
|
||||
{
|
||||
++noEmptyStrings;
|
||||
}
|
||||
}
|
||||
|
||||
if (noStr==noEmptyStrings) {
|
||||
std::cout << "*** WARNING FROM " << __METHOD__ << " *** " << std::endl;
|
||||
std::cout << "ENUM STRING OPTIONS ARE ALL EMPTY! " << std::endl;
|
||||
std::cout << "BADLY CONFIGURED EPICS RECORD. " << std::endl;
|
||||
}
|
||||
// Some developers do not populate enum string values
|
||||
//if (noStr==noEmptyStrings)
|
||||
//{
|
||||
// std::cout << "*** WARNING FROM " << __METHOD__ << " *** " << std::endl;
|
||||
// std::cout << "ENUM STRING OPTIONS ARE ALL EMPTY! " << std::endl;
|
||||
// std::cout << "BADLY CONFIGURED EPICS RECORD. " << std::endl;
|
||||
//}
|
||||
|
||||
|
||||
if (index < noStr && noStr!=noEmptyStrings) {
|
||||
if (index < noStr && noStr!=noEmptyStrings)
|
||||
{
|
||||
sprintf(returnVal[0], "%s", stig[val[index].us] );
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
sprintf(returnVal[0], "%d", val[index].us );
|
||||
if ( val[index].us>= noStr) {
|
||||
if ( val[index].us>= noStr)
|
||||
{
|
||||
std::cout << "*** WARNING FROM " << __METHOD__ << " *** " << std::endl;
|
||||
std::cout << "ENUM UNSIGNED SHORT VALUE IS GREATER THAN THE NO OF ENUMERATED TYPES" << std::endl;
|
||||
std::cout << "VALUE (unsigned short) = " << val[index].us << std::endl;
|
||||
std::cout << "NO OF ENUMERATED STRINGS = " << noStr << " WITH VALUES: " << std::endl;
|
||||
for (unsigned int j=0; j<noStr; ++j) {
|
||||
for (unsigned int j=0; j<noStr; ++j)
|
||||
{
|
||||
std::cout << stig[j] << " [" <<j << "] ";
|
||||
}
|
||||
std::cout << std::endl;
|
||||
@@ -259,7 +274,8 @@ template <class CTYPE> CTYPE * CAFEConvert<CTYPE>::getString (unsigned int index
|
||||
{
|
||||
#define __METHOD__ "CAFEConvert<CTYPE>::getString(nelem, dt, val[])"
|
||||
|
||||
switch (dt) {
|
||||
switch (dt)
|
||||
{
|
||||
case CAFE_STRING:
|
||||
sprintf(returnVal[0], "%s", val[index].str);
|
||||
break;
|
||||
@@ -329,7 +345,8 @@ template <class CTYPE> CTYPE * CAFEConvert<CTYPE>::getString (CAFE_DATATYPE dt,
|
||||
{
|
||||
#define __METHOD__ "CAFEConvert<CTYPE>::getString(dt, val[])"
|
||||
|
||||
switch (dt) {
|
||||
switch (dt)
|
||||
{
|
||||
case CAFE_STRING:
|
||||
sprintf(returnVal[0], "%s", val.str);
|
||||
break;
|
||||
|
||||
@@ -13,7 +13,8 @@
|
||||
#include <string>
|
||||
#include <map>
|
||||
|
||||
enum CAFE_DATATYPE {
|
||||
enum CAFE_DATATYPE
|
||||
{
|
||||
CAFE_TYPENOTCONN = TYPENOTCONN, // -1 val returned by ca_field_type when channel not connected
|
||||
CAFE_STRING = DBF_STRING, // 0
|
||||
CAFE_SHORT = DBF_SHORT, // 1
|
||||
@@ -34,7 +35,8 @@ enum CAFE_DATATYPE {
|
||||
* Provides methods to convert between
|
||||
* the CAFE_DATATYPES and text equivalent
|
||||
*/
|
||||
class CAFEDataTypeCode {
|
||||
class CAFEDataTypeCode
|
||||
{
|
||||
typedef std::map<int, std::string> mapLongString;
|
||||
private:
|
||||
mapLongString mapDataType;
|
||||
@@ -97,12 +99,13 @@ public:
|
||||
void print ( )
|
||||
{
|
||||
std::cout << "------------------" << std::endl;
|
||||
std::cout << "CAFE_DATATYPE LIST" << std::endl;
|
||||
std::cout << "-----------------" << std::endl;
|
||||
for (pos=mapDataType.begin(); pos != mapDataType.end(); ++pos) {
|
||||
std::cout << "CAFE_DATATYPE LIST" << std::endl;
|
||||
std::cout << "------------------" << std::endl;
|
||||
for (pos=mapDataType.begin(); pos != mapDataType.end(); ++pos)
|
||||
{
|
||||
std::cout << pos->first << " " << pos->second << std::endl;
|
||||
}
|
||||
std::cout << "-----------------" << std::endl;
|
||||
std::cout << "------------------" << std::endl;
|
||||
};
|
||||
|
||||
};
|
||||
@@ -110,7 +113,8 @@ public:
|
||||
/**
|
||||
* A union of CAFE primitive datatypes
|
||||
*/
|
||||
union CAFE_DATATYPE_UNION {
|
||||
union CAFE_DATATYPE_UNION
|
||||
{
|
||||
dbr_string_t str;
|
||||
dbr_short_t s;
|
||||
dbr_float_t f;
|
||||
@@ -124,4 +128,5 @@ typedef CAFE_DATATYPE_UNION * CAFE_DATATYPE_UNION_SEQ;
|
||||
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -14,7 +14,8 @@
|
||||
#include <map>
|
||||
#include <cafeDataType.h>
|
||||
|
||||
class CafeDataTypeHelper {
|
||||
class CafeDataTypeHelper
|
||||
{
|
||||
private:
|
||||
CAFE_DATATYPE_UNION cdu;
|
||||
CAFE_DATATYPE dataType;
|
||||
|
||||
@@ -10,13 +10,15 @@
|
||||
|
||||
#include <cadef.h>
|
||||
|
||||
namespace CAFENUM {
|
||||
namespace CAFENUM
|
||||
{
|
||||
|
||||
/**
|
||||
* Data request buffer types \n
|
||||
* i.e. whether PRIMITIVE, STS, TIME, GR or CTRL
|
||||
*/
|
||||
enum DBR_TYPE {
|
||||
enum DBR_TYPE
|
||||
{
|
||||
DBR_PRIMITIVE,
|
||||
DBR_PLAIN=DBR_PRIMITIVE,
|
||||
DBR_STS,
|
||||
@@ -33,7 +35,8 @@ enum DBR_TYPE {
|
||||
/**
|
||||
* Define enum type to flush io after creating channels
|
||||
*/
|
||||
enum ChannelFlushSendBufferPolicyKind {
|
||||
enum ChannelFlushSendBufferPolicyKind
|
||||
{
|
||||
WITH_FLUSH_IO,
|
||||
WITH_PEND_IO, // needs timeout duration
|
||||
WITH_PEND_EVENT, // needs timeout duration
|
||||
@@ -44,7 +47,8 @@ enum ChannelFlushSendBufferPolicyKind {
|
||||
/**
|
||||
* Define enum type defining when to flush io after creating channels
|
||||
*/
|
||||
enum ChannelWhenToFlushSendBufferPolicyKind {
|
||||
enum ChannelWhenToFlushSendBufferPolicyKind
|
||||
{
|
||||
FLUSH_AUTOMATIC=0,
|
||||
FLUSH_NOW=FLUSH_AUTOMATIC,
|
||||
FLUSH_AFTER_EACH_CHANNEL_CREATION=FLUSH_NOW, // instantly
|
||||
@@ -61,16 +65,16 @@ enum ChannelWhenToFlushSendBufferPolicyKind {
|
||||
* an independent virtual circuit, and associated data structures, is
|
||||
* created for each priority that is used on a particular server
|
||||
*/
|
||||
enum ChannelServerDispatchPriority {
|
||||
enum ChannelServerDispatchPriority
|
||||
{
|
||||
CA_SERVER_DISPATCH_PRIORITY_MIN =CA_PRIORITY_MIN, //0
|
||||
CA_SERVER_DISPATCH_PRIORITY_VERYLOW =CA_PRIORITY_MIN+1,
|
||||
CA_SERVER_DISPATCH_PRIORITY_DEFAULT =CA_PRIORITY_MAX, //CA_SERVER_DISPATCH_PRIORITY_VERYLOW, //1
|
||||
CA_SERVER_DISPATCH_PRIORITY_VERYLOW =CA_PRIORITY_MIN+1,
|
||||
CA_SERVER_DISPATCH_PRIORITY_LOW =CA_PRIORITY_MIN+25,
|
||||
CA_SERVER_DISPATCH_PRIORITY_MED =CA_PRIORITY_MIN+50,
|
||||
CA_SERVER_DISPATCH_PRIORITY_HIGH =CA_PRIORITY_MIN+75,
|
||||
CA_SERVER_DISPATCH_PRIORITY_VERYHIGH=CA_PRIORITY_MIN+98,
|
||||
CA_SERVER_DISPATCH_PRIORITY_MAX =CA_PRIORITY_MAX
|
||||
|
||||
CA_SERVER_DISPATCH_PRIORITY_MAX =CA_PRIORITY_MAX,
|
||||
CA_SERVER_DISPATCH_PRIORITY_DEFAULT =CA_PRIORITY_MAX
|
||||
};
|
||||
|
||||
|
||||
@@ -79,7 +83,8 @@ enum ChannelServerDispatchPriority {
|
||||
* Meant for use within callbacks to ensure that cache operations
|
||||
* are never blocked
|
||||
*/
|
||||
enum ChannelGetCacheWaitPolicyKind {
|
||||
enum ChannelGetCacheWaitPolicyKind
|
||||
{
|
||||
GET_CACHE_NO_CHECK=0,
|
||||
GET_CACHE_NO_WAIT,
|
||||
GET_CACHE_NOW =GET_CACHE_NO_WAIT,
|
||||
@@ -92,7 +97,8 @@ enum ChannelGetCacheWaitPolicyKind {
|
||||
* monitor is in place
|
||||
*
|
||||
*/
|
||||
enum ChannelGetActionWhenMonitorPolicyKind {
|
||||
enum ChannelGetActionWhenMonitorPolicyKind
|
||||
{
|
||||
GET_FROM_CACHE,
|
||||
GET_FROM_IOC
|
||||
};
|
||||
@@ -102,7 +108,8 @@ enum ChannelGetActionWhenMonitorPolicyKind {
|
||||
* Blocking can be achieved with or without callback.
|
||||
* Callback can further be supplied by the user
|
||||
*/
|
||||
enum ChannelRequestPolicyKind {
|
||||
enum ChannelRequestPolicyKind
|
||||
{
|
||||
WITHOUT_CALLBACK,
|
||||
WITH_CALLBACK_DEFAULT,
|
||||
WITH_CALLBACK_USER_SUPPLIED
|
||||
@@ -113,7 +120,8 @@ enum ChannelRequestPolicyKind {
|
||||
* Enum type defining level of datatype conversion at the IOC
|
||||
*
|
||||
*/
|
||||
enum ChannelRequestDataTypePolicyKind {
|
||||
enum ChannelRequestDataTypePolicyKind
|
||||
{
|
||||
NATIVE_DATATYPE,
|
||||
LOWEST_DATATYPE // The smaller in byte size of type requested and native datatype
|
||||
};
|
||||
@@ -124,7 +132,8 @@ enum ChannelRequestDataTypePolicyKind {
|
||||
* from a message sent with a callback, whether it be
|
||||
* user supplied or the CAFE default.
|
||||
*/
|
||||
enum ChannelWaitForResponsePolicyKind {
|
||||
enum ChannelWaitForResponsePolicyKind
|
||||
{
|
||||
BLOCKING=0,
|
||||
WAIT=BLOCKING,
|
||||
NON_BLOCKING=1,
|
||||
@@ -132,7 +141,8 @@ enum ChannelWaitForResponsePolicyKind {
|
||||
};
|
||||
|
||||
|
||||
enum StatusMessageKind {
|
||||
enum StatusMessageKind
|
||||
{
|
||||
NO_MESSAGE,
|
||||
PRE_REQUEST,
|
||||
FROM_REQUEST,
|
||||
@@ -141,7 +151,8 @@ enum StatusMessageKind {
|
||||
FROM_MESSAGE
|
||||
};
|
||||
|
||||
enum CallbackProgressKind {
|
||||
enum CallbackProgressKind
|
||||
{
|
||||
NOT_INITIATED,
|
||||
PENDING,
|
||||
COMPLETE
|
||||
|
||||
@@ -123,10 +123,12 @@ int match(std::string valSet, unsigned int handleMatch,
|
||||
ss.str(valSet);
|
||||
ss>>d;
|
||||
|
||||
if ( !ss.fail()) {
|
||||
if ( !ss.fail())
|
||||
{
|
||||
valSetDouble=d;
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
std::cout << __METHOD__ << __LINE__ << std::endl;
|
||||
std::cout << "***WARNING*** NO STRING TO DBR_DOUBLE CONVERSION " << std::endl;
|
||||
std::cout << "***WARNING*** COULD NOT CONVERT: ";
|
||||
@@ -139,10 +141,12 @@ int match(std::string valSet, unsigned int handleMatch,
|
||||
ss.str(tolerance);
|
||||
ss>>d;
|
||||
|
||||
if ( !ss.fail()) {
|
||||
if ( !ss.fail())
|
||||
{
|
||||
toleranceDouble=d;
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
std::cout << __METHOD__ << __LINE__ << std::endl;
|
||||
std::cout << "***WARNING*** NO STRING TO DBR_DOUBLE CONVERSION " << std::endl;
|
||||
std::cout << "***WARNING*** COULD NOT CONVERT: ";
|
||||
@@ -170,10 +174,12 @@ int match(dbr_string_t valSet, unsigned int handleMatch,
|
||||
ss.str(valSet);
|
||||
ss>>d;
|
||||
|
||||
if ( !ss.fail()) {
|
||||
if ( !ss.fail())
|
||||
{
|
||||
valSetDouble=d;
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
std::cout << __METHOD__ << __LINE__ << std::endl;
|
||||
std::cout << "***WARNING*** NO STRING TO DBR_DOUBLE CONVERSION " << std::endl;
|
||||
std::cout << "***WARNING*** COULD NOT CONVERT: ";
|
||||
@@ -186,10 +192,12 @@ int match(dbr_string_t valSet, unsigned int handleMatch,
|
||||
ss.str(tolerance);
|
||||
ss>>d;
|
||||
|
||||
if ( !ss.fail()) {
|
||||
if ( !ss.fail())
|
||||
{
|
||||
toleranceDouble=d;
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
std::cout << __METHOD__ << __LINE__ << std::endl;
|
||||
std::cout << "***WARNING*** NO STRING TO DBR_DOUBLE CONVERSION " << std::endl;
|
||||
std::cout << "***WARNING*** COULD NOT CONVERT: ";
|
||||
@@ -269,16 +277,19 @@ int matchMany(std::vector<std::string> valSetV, std::vector<unsigned int> handle
|
||||
std::istringstream ss;
|
||||
dbr_double_t d=0;
|
||||
dbr_double_t toleranceDouble = 0;
|
||||
for (size_t i=0; i< valSetV.size(); ++i) {
|
||||
for (size_t i=0; i< valSetV.size(); ++i)
|
||||
{
|
||||
d=0;
|
||||
ss.clear();
|
||||
ss.str(valSetV[i]);
|
||||
ss>>d;
|
||||
|
||||
if ( !ss.fail()) {
|
||||
if ( !ss.fail())
|
||||
{
|
||||
valSetDoubleV.push_back(d);
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
std::cout << __METHOD__ << __LINE__ << std::endl;
|
||||
std::cout << "***WARNING*** NO STRING TO DBR_DOUBLE CONVERSION " << std::endl;
|
||||
std::cout << "***WARNING*** COULD NOT CONVERT: ";
|
||||
@@ -293,10 +304,12 @@ int matchMany(std::vector<std::string> valSetV, std::vector<unsigned int> handle
|
||||
ss.str(tolerance);
|
||||
ss>>d;
|
||||
|
||||
if ( !ss.fail()) {
|
||||
if ( !ss.fail())
|
||||
{
|
||||
toleranceDouble=d;
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
std::cout << __METHOD__ << __LINE__ << std::endl;
|
||||
std::cout << "***WARNING*** NO STRING TO DBR_DOUBLE CONVERSION " << std::endl;
|
||||
std::cout << "***WARNING*** COULD NOT CONVERT: ";
|
||||
@@ -312,6 +325,128 @@ int matchMany(std::vector<std::string> valSetV, std::vector<unsigned int> handle
|
||||
|
||||
|
||||
|
||||
|
||||
//
|
||||
int matchManyWithStatus(std::vector<dbr_double_t> valSet, std::vector<unsigned int> handleMatch,
|
||||
dbr_double_t tolerance, double timeout, bool printFlag, std::vector<int> &statusV)
|
||||
{
|
||||
|
||||
status = cafeDoppio.matchManyWithStatus(DBR_DOUBLE, valSet, handleMatch, tolerance, timeout, printFlag, statusV);
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
|
||||
int matchManyWithStatus(std::vector<dbr_float_t> valSet, std::vector<unsigned int> handleMatch,
|
||||
dbr_float_t tolerance, double timeout, bool printFlag, std::vector<int> &statusV)
|
||||
{
|
||||
return cafeFrappuccino.matchManyWithStatus(DBR_FLOAT, valSet, handleMatch, tolerance, timeout, printFlag, statusV);
|
||||
}
|
||||
|
||||
|
||||
int matchManyWithStatus(std::vector<dbr_char_t> valSet, std::vector<unsigned int> handleMatch,
|
||||
dbr_char_t tolerance, double timeout, bool printFlag, std::vector<int> &statusV)
|
||||
{
|
||||
return cafeCappuccino.matchManyWithStatus(DBR_CHAR, valSet, handleMatch, tolerance, timeout, printFlag, statusV);
|
||||
}
|
||||
|
||||
int matchManyWithStatus(std::vector<dbr_enum_t> valSet, std::vector<unsigned int> handleMatch,
|
||||
dbr_enum_t tolerance, double timeout, bool printFlag, std::vector<int> statusV)
|
||||
{
|
||||
return cafeEspresso.matchManyWithStatus(DBR_ENUM, valSet, handleMatch, tolerance, timeout, printFlag, statusV);
|
||||
}
|
||||
|
||||
int matchManyWithStatus(std::vector<dbr_short_t> valSet, std::vector<unsigned int> handleMatch,
|
||||
dbr_short_t tolerance, double timeout, bool printFlag, std::vector<int> &statusV)
|
||||
{
|
||||
return cafeSchale.matchManyWithStatus(DBR_SHORT, valSet, handleMatch, tolerance, timeout, printFlag, statusV);
|
||||
}
|
||||
|
||||
|
||||
int matchManyWithStatus(std::vector<dbr_long_t> valSet, std::vector<unsigned int> handleMatch,
|
||||
dbr_long_t tolerance, double timeout, bool printFlag, std::vector<int> &statusV)
|
||||
{
|
||||
return cafeLatte.matchManyWithStatus(DBR_LONG, valSet, handleMatch, tolerance, timeout, printFlag, statusV);
|
||||
}
|
||||
|
||||
|
||||
int matchManyWithStatus(std::vector<long long> valSet, std::vector<unsigned int> handleMatch,
|
||||
long long tolerance, double timeout, bool printFlag, std::vector<int> &statusV)
|
||||
{
|
||||
|
||||
std::vector<dbr_double_t> valSetDoubleV;
|
||||
valSetDoubleV.reserve(valSet.size());
|
||||
|
||||
std::copy(valSet.begin(), valSet.end(),
|
||||
std::back_inserter(valSetDoubleV));
|
||||
|
||||
dbr_double_t toleranceDouble = tolerance;
|
||||
|
||||
return cafeDoppio.matchManyWithStatus(DBR_DOUBLE, valSetDoubleV, handleMatch, toleranceDouble, timeout, printFlag, statusV);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
int matchManyWithStatus(std::vector<std::string> valSetV, std::vector<unsigned int> handleMatchV,
|
||||
std::string tolerance, double timeout, bool printFlag, std::vector<int> &statusV)
|
||||
{
|
||||
#define __METHOD__ "matchManyWithStatus (std::vector<string> valSetV, std::vector<unsigned int> handleMatchV, \
|
||||
string tolerance, double timeout, bool printFlag, std::vector<int> statusV)"
|
||||
|
||||
std::vector<dbr_double_t> valSetDoubleV;
|
||||
|
||||
std::istringstream ss;
|
||||
dbr_double_t d=0;
|
||||
dbr_double_t toleranceDouble = 0;
|
||||
for (size_t i=0; i< valSetV.size(); ++i)
|
||||
{
|
||||
d=0;
|
||||
ss.clear();
|
||||
ss.str(valSetV[i]);
|
||||
ss>>d;
|
||||
|
||||
if ( !ss.fail())
|
||||
{
|
||||
valSetDoubleV.push_back(d);
|
||||
}
|
||||
else
|
||||
{
|
||||
std::cout << __METHOD__ << __LINE__ << std::endl;
|
||||
std::cout << "***WARNING*** NO STRING TO DBR_DOUBLE CONVERSION " << std::endl;
|
||||
std::cout << "***WARNING*** COULD NOT CONVERT: ";
|
||||
std::cout << valSetV[i];
|
||||
std::cout << " TO DOUBLE!" << std::endl;
|
||||
return ECAFE_NO_CONVERT;
|
||||
}
|
||||
}
|
||||
|
||||
d=0;
|
||||
ss.clear();
|
||||
ss.str(tolerance);
|
||||
ss>>d;
|
||||
|
||||
if ( !ss.fail())
|
||||
{
|
||||
toleranceDouble=d;
|
||||
}
|
||||
else
|
||||
{
|
||||
std::cout << __METHOD__ << __LINE__ << std::endl;
|
||||
std::cout << "***WARNING*** NO STRING TO DBR_DOUBLE CONVERSION " << std::endl;
|
||||
std::cout << "***WARNING*** COULD NOT CONVERT: ";
|
||||
std::cout << tolerance;
|
||||
std::cout << " TO DOUBLE!" << std::endl;
|
||||
return ECAFE_NO_CONVERT;
|
||||
}
|
||||
|
||||
return cafeDoppio.matchManyWithStatus(DBR_DOUBLE, valSetDoubleV, handleMatchV, toleranceDouble, timeout, printFlag, statusV);
|
||||
#undef __METHOD__
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
int setAndMatchMany(std::vector<unsigned int> handleSet, std::vector<dbr_double_t> valSet, std::vector<unsigned int> handleMatch,
|
||||
dbr_double_t tolerance, double timeout, bool printFlag)
|
||||
{
|
||||
@@ -380,16 +515,19 @@ int setAndMatchMany(std::vector<unsigned int> handleSetV, std::vector<std::strin
|
||||
std::istringstream ss;
|
||||
dbr_double_t d=0;
|
||||
dbr_double_t toleranceDouble = 0;
|
||||
for (size_t i=0; i< valSetV.size(); ++i) {
|
||||
for (size_t i=0; i< valSetV.size(); ++i)
|
||||
{
|
||||
d=0;
|
||||
ss.clear();
|
||||
ss.str(valSetV[i]);
|
||||
ss>>d;
|
||||
|
||||
if ( !ss.fail()) {
|
||||
if ( !ss.fail())
|
||||
{
|
||||
valSetDoubleV.push_back(d);
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
std::cout << __METHOD__ << __LINE__ << std::endl;
|
||||
std::cout << "***WARNING*** NO STRING TO DBR_DOUBLE CONVERSION " << std::endl;
|
||||
std::cout << "***WARNING*** COULD NOT CONVERT: ";
|
||||
@@ -404,10 +542,12 @@ int setAndMatchMany(std::vector<unsigned int> handleSetV, std::vector<std::strin
|
||||
ss.str(tolerance);
|
||||
ss>>d;
|
||||
|
||||
if ( !ss.fail()) {
|
||||
if ( !ss.fail())
|
||||
{
|
||||
toleranceDouble=d;
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
std::cout << __METHOD__ << __LINE__ << std::endl;
|
||||
std::cout << "***WARNING*** NO STRING TO DBR_DOUBLE CONVERSION " << std::endl;
|
||||
std::cout << "***WARNING*** COULD NOT CONVERT: ";
|
||||
@@ -515,16 +655,19 @@ int gameSetAndMatch(std::vector<unsigned int> handleSetV, std::vector<std::strin
|
||||
std::istringstream ss;
|
||||
dbr_double_t d=0;
|
||||
dbr_double_t toleranceDouble = 0;
|
||||
for (size_t i=0; i< valSetV.size(); ++i) {
|
||||
for (size_t i=0; i< valSetV.size(); ++i)
|
||||
{
|
||||
d=0;
|
||||
ss.clear();
|
||||
ss.str(valSetV[i]);
|
||||
ss>>d;
|
||||
|
||||
if ( !ss.fail()) {
|
||||
if ( !ss.fail())
|
||||
{
|
||||
valSetDoubleV.push_back(d);
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
std::cout << __METHOD__ << __LINE__ << std::endl;
|
||||
std::cout << "***WARNING*** NO STRING TO DBR_DOUBLE CONVERSION " << std::endl;
|
||||
std::cout << "***WARNING*** COULD NOT CONVERT: ";
|
||||
@@ -539,10 +682,12 @@ int gameSetAndMatch(std::vector<unsigned int> handleSetV, std::vector<std::strin
|
||||
ss.str(tolerance);
|
||||
ss>>d;
|
||||
|
||||
if ( !ss.fail()) {
|
||||
if ( !ss.fail())
|
||||
{
|
||||
toleranceDouble=d;
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
std::cout << __METHOD__ << __LINE__ << std::endl;
|
||||
std::cout << "***WARNING*** NO STRING TO DBR_DOUBLE CONVERSION " << std::endl;
|
||||
std::cout << "***WARNING*** COULD NOT CONVERT: ";
|
||||
@@ -618,10 +763,12 @@ int setAndMatch(const unsigned int handleSet, dbr_string_t valSet, const unsigne
|
||||
ss.str(valSet);
|
||||
ss>>d;
|
||||
|
||||
if ( !ss.fail()) {
|
||||
if ( !ss.fail())
|
||||
{
|
||||
valSetDouble=d;
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
std::cout << __METHOD__ << __LINE__ << std::endl;
|
||||
std::cout << "***WARNING*** NO STRING TO DBR_DOUBLE CONVERSION " << std::endl;
|
||||
std::cout << "***WARNING*** COULD NOT CONVERT: ";
|
||||
@@ -634,10 +781,12 @@ int setAndMatch(const unsigned int handleSet, dbr_string_t valSet, const unsigne
|
||||
ss.str(tolerance);
|
||||
ss>>d;
|
||||
|
||||
if ( !ss.fail()) {
|
||||
if ( !ss.fail())
|
||||
{
|
||||
toleranceDouble=d;
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
std::cout << __METHOD__ << __LINE__ << std::endl;
|
||||
std::cout << "***WARNING*** NO STRING TO DBR_DOUBLE CONVERSION " << std::endl;
|
||||
std::cout << "***WARNING*** COULD NOT CONVERT: ";
|
||||
@@ -662,10 +811,12 @@ int setAndMatch(const unsigned int handleSet, std::string valSet, const unsigned
|
||||
ss.str(valSet);
|
||||
ss>>d;
|
||||
|
||||
if ( !ss.fail()) {
|
||||
if ( !ss.fail())
|
||||
{
|
||||
valSetDouble=d;
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
std::cout << __METHOD__ << __LINE__ << std::endl;
|
||||
std::cout << "***WARNING*** NO STRING TO DBR_DOUBLE CONVERSION " << std::endl;
|
||||
std::cout << "***WARNING*** COULD NOT CONVERT: ";
|
||||
@@ -678,10 +829,12 @@ int setAndMatch(const unsigned int handleSet, std::string valSet, const unsigned
|
||||
ss.str(tolerance);
|
||||
ss>>d;
|
||||
|
||||
if ( !ss.fail()) {
|
||||
if ( !ss.fail())
|
||||
{
|
||||
toleranceDouble=d;
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
std::cout << __METHOD__ << __LINE__ << std::endl;
|
||||
std::cout << "***WARNING*** NO STRING TO DBR_DOUBLE CONVERSION " << std::endl;
|
||||
std::cout << "***WARNING*** COULD NOT CONVERT: ";
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
|
||||
int get(const unsigned int _handle, std::vector<std::string> & V); //0
|
||||
int get(const unsigned int _handle, std::vector<short> & V); //1
|
||||
int get(const unsigned int _handle, std::vector<float> & V); //2
|
||||
@@ -19,6 +20,16 @@ int get(const unsigned int _handle, std::vector<unsigned char> & V); //4
|
||||
int get(const unsigned int _handle, std::vector<dbr_long_t> & V); //5
|
||||
int get(const unsigned int _handle, std::vector<long long> & V); //5
|
||||
int get(const unsigned int _handle, std::vector<double> & V); //6
|
||||
|
||||
int getStringVector(const unsigned int _handle, std::vector<std::string> & V) {return get(_handle, V);}; //0
|
||||
int getShortVector(const unsigned int _handle, std::vector<short> & V) {return get(_handle, V);}; //1
|
||||
int getFloatVector(const unsigned int _handle, std::vector<float> & V) {return get(_handle, V);}; //2
|
||||
int getUShortVector(const unsigned int _handle, std::vector<unsigned short> & V) {return get(_handle, V);};//3
|
||||
int getUCharVector(const unsigned int _handle, std::vector<unsigned char> & V) {return get(_handle, V);}; //4
|
||||
int getLongVector(const unsigned int _handle, std::vector<dbr_long_t> & V) {return get(_handle, V);}; //5
|
||||
int getLongLongVector(const unsigned int _handle, std::vector<long long> & V) {return get(_handle, V);}; //5
|
||||
int getDoubleVector(const unsigned int _handle, std::vector<double> & V) {return get(_handle, V);}; //6
|
||||
|
||||
int get(const unsigned int _handle, std::vector<std::string> & V,
|
||||
dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity);//0
|
||||
int get(const unsigned int _handle, std::vector<short> & V,
|
||||
@@ -171,6 +182,7 @@ int getScalars(std::vector<unsigned int> handleV, std::vector<dbr_double_t> & V
|
||||
|
||||
|
||||
|
||||
|
||||
int getCacheVStr(std::vector<unsigned int> handleV, std::vector<std::string> & V, std::vector<int> &statusV)
|
||||
{
|
||||
return getCache(handleV, V, statusV);
|
||||
|
||||
@@ -10,11 +10,11 @@
|
||||
|
||||
#include <config.h>
|
||||
|
||||
//if HAVE_LIBQTXML - needed for externsions
|
||||
#if HAVE_LIBQTXML //- needed for externsions
|
||||
int loadCollectionsFromXML(const char * collectionsFile);
|
||||
int loadGroupsFromXML (const char * groupsFile);
|
||||
int restoreFromXML(const char * snapshotFile);
|
||||
//endif
|
||||
#endif
|
||||
|
||||
int snapshot2XML (PVGroup pg);
|
||||
void openGroupXMLFile(std::string fileName);
|
||||
|
||||
@@ -17,7 +17,8 @@
|
||||
* Provides methods to convert between
|
||||
* the CA_OP_xx and text equivalent
|
||||
*/
|
||||
class CAOPCodes {
|
||||
class CAOPCodes
|
||||
{
|
||||
typedef std::map<int, std::string> mapIntString;
|
||||
private:
|
||||
mapIntString mapDataType;
|
||||
@@ -62,7 +63,8 @@ public:
|
||||
std::cout << "------------------" << std::endl;
|
||||
std::cout << "CA_OP_LIST" << std::endl;
|
||||
std::cout << "-----------------" << std::endl;
|
||||
for (pos=mapDataType.begin(); pos != mapDataType.end(); ++pos) {
|
||||
for (pos=mapDataType.begin(); pos != mapDataType.end(); ++pos)
|
||||
{
|
||||
std::cout << pos->first << " " << pos->second << std::endl;
|
||||
}
|
||||
std::cout << "-----------------" << std::endl;
|
||||
|
||||
@@ -33,7 +33,8 @@
|
||||
* Struct defining channel properties and connection status for use in Conduit container
|
||||
*
|
||||
*/
|
||||
class ChannelRegalia {
|
||||
class ChannelRegalia
|
||||
{
|
||||
private:
|
||||
CAFEStatus cafeStatus;
|
||||
public:
|
||||
@@ -164,24 +165,27 @@ public:
|
||||
};
|
||||
std::string getConnectionStateAsString()
|
||||
{
|
||||
if(connectionState==CA_OP_CONN_UP) {
|
||||
if(connectionState==CA_OP_CONN_UP)
|
||||
{
|
||||
return "CA_OP_CONN_UP";
|
||||
}
|
||||
else if(connectionState==CA_OP_CONN_DOWN) {
|
||||
else if(connectionState==CA_OP_CONN_DOWN)
|
||||
{
|
||||
return "CA_OP_CONN_DOWN";
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
return "CA_OP_CONN is UNKNOWN: THIS SHOULD NEVER APPEAR!";
|
||||
}
|
||||
};
|
||||
|
||||
std::string getCafeConnectionStateAsString()
|
||||
std::string getCafeConnectionStateAsString()
|
||||
{
|
||||
return cafeStatus.csc.message(cafeConnectionState);
|
||||
};
|
||||
|
||||
ChannelRegalia():channelID((chid) NULL), connectFlag(false), nelem((unsigned int) 1),
|
||||
dataType((chtype) CAFE_TYPENOTCONN),
|
||||
dataType(chtype((int)CAFE_TYPENOTCONN)),
|
||||
accessRead((unsigned short) 0), accessWrite((unsigned short) 0),
|
||||
connectionState((int) CA_OP_CONN_DOWN), cafeConnectionState((int) ICAFE_CS_NEVER_CONN)
|
||||
{
|
||||
@@ -204,21 +208,23 @@ public:
|
||||
* Struct defining channel properties and connection status for use in displays
|
||||
*
|
||||
*/
|
||||
class ChannelDataStore {
|
||||
class ChannelDataStore
|
||||
{
|
||||
public:
|
||||
|
||||
std::string description;
|
||||
ChannelRegalia info;
|
||||
PVDataHolder pvd;
|
||||
PVCtrlHolder pvc;
|
||||
|
||||
ChannelDataStore() {
|
||||
|
||||
|
||||
};
|
||||
|
||||
std::string description;
|
||||
ChannelRegalia info;
|
||||
PVDataHolder pvd;
|
||||
PVCtrlHolder pvc;
|
||||
|
||||
ChannelDataStore()
|
||||
{
|
||||
|
||||
|
||||
};
|
||||
|
||||
~ChannelDataStore() {};
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -228,7 +234,8 @@ public:
|
||||
* Stores strings for Enum datatypes
|
||||
*
|
||||
*/
|
||||
class ChannelEnumStrings {
|
||||
class ChannelEnumStrings
|
||||
{
|
||||
public:
|
||||
friend struct change_eventHandlerArgs;
|
||||
private:
|
||||
@@ -244,7 +251,8 @@ public:
|
||||
{
|
||||
std::vector<std::string> optionsV;
|
||||
optionsV.reserve(noOptions);
|
||||
for ( short i=0; i<noOptions; ++i) {
|
||||
for ( short i=0; i<noOptions; ++i)
|
||||
{
|
||||
optionsV.push_back(options[i]);
|
||||
}
|
||||
return optionsV;
|
||||
@@ -256,7 +264,8 @@ public:
|
||||
* Stores device/attribute pairing
|
||||
*
|
||||
*/
|
||||
class ChannelDeviceAttribute {
|
||||
class ChannelDeviceAttribute
|
||||
{
|
||||
private:
|
||||
std::string pv;
|
||||
std::string device;
|
||||
@@ -271,18 +280,21 @@ public:
|
||||
pv=_pv;
|
||||
deliminator=_deliminator;
|
||||
short posOfSeparator=pv.find_first_of(deliminator);
|
||||
if (posOfSeparator<0) {
|
||||
if (posOfSeparator<0)
|
||||
{
|
||||
device="";
|
||||
attribute="";
|
||||
return ECAFE_DEVICE_ATTRIB_NOT_FOUND;
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
device= pv.substr(0,posOfSeparator);
|
||||
attribute=pv.substr(posOfSeparator+1,pv.size());
|
||||
//Check for .VAL and remove
|
||||
//Check for .VAL and remove
|
||||
std::size_t found = attribute.find(".");
|
||||
if (found != std::string::npos) {
|
||||
attribute=attribute.substr(0, found);
|
||||
if (found != std::string::npos)
|
||||
{
|
||||
attribute=attribute.substr(0, found);
|
||||
}
|
||||
}
|
||||
return ICAFE_NORMAL;
|
||||
@@ -323,7 +335,8 @@ public:
|
||||
* 0. Struct defining channel datatype/nelem executed by CAFE for use in Conduit container
|
||||
*
|
||||
*/
|
||||
class ChannelRequestMetaData {
|
||||
class ChannelRequestMetaData
|
||||
{
|
||||
public:
|
||||
friend struct change_connectionHandlerArgs;
|
||||
friend struct change_dataBufferSize_CTRL;
|
||||
@@ -377,7 +390,8 @@ public:
|
||||
void setDbrTypesFromCafeDbrType(CAFENUM::DBR_TYPE cd)
|
||||
{
|
||||
cafeDbrType=cd;
|
||||
switch(cafeDbrType) {
|
||||
switch(cafeDbrType)
|
||||
{
|
||||
case CAFENUM::DBR_TIME:
|
||||
dbrDataType = dbf_type_to_DBR_TIME(dataType);
|
||||
break;
|
||||
@@ -457,7 +471,8 @@ public:
|
||||
* -1. Struct defining channel datatype/nelem requested by client for use in Conduit container
|
||||
*
|
||||
*/
|
||||
class ChannelRequestMetaDataClient: public ChannelRequestMetaData {
|
||||
class ChannelRequestMetaDataClient: public ChannelRequestMetaData
|
||||
{
|
||||
public:
|
||||
|
||||
//protected:
|
||||
@@ -478,7 +493,8 @@ public:
|
||||
* messageStatus = requestStatus or messageStatus=callbackStatus (if policy WITH_CALLBACK)
|
||||
*
|
||||
*/
|
||||
class ChannelRequestStatus {
|
||||
class ChannelRequestStatus
|
||||
{
|
||||
|
||||
private:
|
||||
int preRequestStatus; // current status of channel
|
||||
@@ -550,16 +566,20 @@ public:
|
||||
{
|
||||
hasCallbackInitiated=hasInit;
|
||||
hasCallbackTriggered=hasTrig;
|
||||
if ( hasInit && !hasTrig) {
|
||||
if ( hasInit && !hasTrig)
|
||||
{
|
||||
callbackProgressKind=(CAFENUM::CallbackProgressKind) CAFENUM::PENDING;
|
||||
}
|
||||
else if (!hasInit && hasTrig) {
|
||||
else if (!hasInit && hasTrig)
|
||||
{
|
||||
callbackProgressKind=(CAFENUM::CallbackProgressKind) CAFENUM::COMPLETE;
|
||||
}
|
||||
else if (!hasInit && !hasTrig) {
|
||||
else if (!hasInit && !hasTrig)
|
||||
{
|
||||
callbackProgressKind=(CAFENUM::CallbackProgressKind) CAFENUM::NOT_INITIATED;
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
std::cout << "CAFE INTERNAL POLICY ERROR" << std::endl;
|
||||
std::cout << "ChannelRequestStatus::setCallbackKind gives an INVALID callbackProgressKind" << std::endl;
|
||||
}
|
||||
|
||||
@@ -13,31 +13,31 @@
|
||||
#include <config.h>
|
||||
#include <cadef.h>
|
||||
|
||||
|
||||
#include <channelRegalia.h>
|
||||
#include <PVDataHolder.h>
|
||||
#include <PVCtrlHolder.h>
|
||||
#include <policies.h>
|
||||
#include <deque>
|
||||
|
||||
#if HAVE_PYTHON_H
|
||||
|
||||
#if HAVE_PYTHON_H
|
||||
#if HAVE_PYCAFE_EXT
|
||||
#include <Python.h> //required for PyCafe.h
|
||||
#include <PyCafe.h>
|
||||
#else
|
||||
#include <PyCafe_api.h>
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
using namespace boost::posix_time;
|
||||
|
||||
/**
|
||||
* Principal constructor has:\n
|
||||
* \param _pv process variable
|
||||
* \param _ccc ca_client_context
|
||||
*/
|
||||
class Conduit {
|
||||
class Conduit
|
||||
{
|
||||
public:
|
||||
friend struct change_alarmStatus;
|
||||
friend struct change_alarmSeverity;
|
||||
@@ -48,7 +48,7 @@ public:
|
||||
friend struct change_accessWrite;
|
||||
|
||||
friend struct change_beamEventNo;
|
||||
|
||||
|
||||
friend struct change_channelDeviceAttribute;
|
||||
friend struct change_channelID;
|
||||
friend struct change_channelRegalia;
|
||||
@@ -99,6 +99,9 @@ public:
|
||||
friend struct change_monitorAction;
|
||||
friend struct change_monitorActionClear;
|
||||
friend struct change_monitorActionErase;
|
||||
|
||||
friend struct change_monitorPolicy;
|
||||
|
||||
friend struct change_monitorPolicyErase;
|
||||
friend struct change_monitorPolicyInsert;
|
||||
|
||||
@@ -108,12 +111,24 @@ public:
|
||||
//friend struct change_rule;
|
||||
|
||||
friend struct change_pvAlias;
|
||||
#if HAVE_PYTHON_H
|
||||
friend struct change_pyOpenCallbackFlag;
|
||||
#endif
|
||||
|
||||
friend struct change_status;
|
||||
|
||||
friend struct change_supplementHandle;
|
||||
|
||||
friend struct change_supplementDescription;
|
||||
friend struct change_supplementAlarmSeverity;
|
||||
friend struct change_usrArgs;
|
||||
|
||||
friend struct change_widgetInsert;
|
||||
friend struct change_widgetErase;
|
||||
|
||||
friend struct change_pyGetCallbackFn;
|
||||
friend struct change_pyPutCallbackFn;
|
||||
friend struct change_pyConnectCallbackFn;
|
||||
|
||||
friend struct free_dataBuffers;
|
||||
|
||||
friend class Connect;
|
||||
@@ -141,20 +156,19 @@ private:
|
||||
union db_access_val * putBuffer;
|
||||
union db_access_val * stsackBuffer;
|
||||
|
||||
//struct connection_handler_args connectionHandlerArgs;
|
||||
//struct event_handler_args eventHandlerArgs;
|
||||
|
||||
short alarmStatus;
|
||||
short alarmSeverity;
|
||||
epicsTimeStamp ts;
|
||||
|
||||
//New Oct. 2018
|
||||
std::string desc;
|
||||
//short hhsv;
|
||||
//short hsv;
|
||||
//short lsv;
|
||||
//short llsv;
|
||||
alarmSeverityStruct aSevStruct;
|
||||
bool hasDesc;
|
||||
bool hasAlarmSevStruct;
|
||||
|
||||
alarmSeverityStruct aSevStruct;
|
||||
bool hasDesc;
|
||||
bool hasAlarmSevStruct;
|
||||
|
||||
void * usrArgs; //Filled in conduitEventHandlerArgs.h; used by getUsrArgsAsUInt in CyCafe
|
||||
|
||||
@@ -164,7 +178,7 @@ private:
|
||||
|
||||
//Reserved
|
||||
unsigned long long beamEventNo;
|
||||
|
||||
|
||||
std:: deque<PVDataHolder> dequePulseID;
|
||||
|
||||
std::map<unsigned long long, PVDataHolder> mapPulseID;
|
||||
@@ -217,11 +231,26 @@ private:
|
||||
ChannelRequestMetaData channelRequestMetaSTSACK;// (CAFENUM::DBR_TYPE DBR_STSACK);//1
|
||||
ChannelRequestMetaData channelRequestMetaPrimitive; //Put operations
|
||||
|
||||
#if HAVE_PYTHON_H
|
||||
void * PyEventHandler() const;
|
||||
void * PyEventHandler(unsigned int) const;
|
||||
void * PyDataEventHandler() const;
|
||||
void * PyCtrlEventHandler() const;
|
||||
#if HAVE_PYTHON_H
|
||||
//void * PyEventHandler() const;
|
||||
//void * PyEventHandler(unsigned int) const;
|
||||
//void * PyDataEventHandler() const;
|
||||
//void * PyCtrlEventHandler() const;
|
||||
|
||||
void * CyMonitorHandler() const; //can handle all three cb signatures
|
||||
|
||||
//void * CyHandleHandler() const; //handle
|
||||
//void * CyEventHandler() const; //handle, pv
|
||||
//void * CyDataEventHandler() const; //handle, pv, pvdata
|
||||
void * CyCtrlEventHandler() const; //handle, pv, pvctrl
|
||||
|
||||
bool pyOpenCallbackFlag;
|
||||
|
||||
void * pyGetCallbackFn;
|
||||
void * pyPutCallbackFn;
|
||||
void * pyConnectCallbackFn;
|
||||
std::vector<void *> pyConnectCallbackVector;
|
||||
|
||||
#endif
|
||||
|
||||
int putWithCallback(pCallback callbackHandlerPut) const;
|
||||
@@ -240,6 +269,8 @@ private:
|
||||
//map<unsigned long,MonitorPolicy> lump;
|
||||
//map<unsigned long,MonitorPolicy>::iterator ilump;
|
||||
|
||||
|
||||
|
||||
////MonitorPolicy mpBase;
|
||||
std::vector<MonitorPolicy> mpV;
|
||||
std::vector<MonitorPolicy> mpInWaitingV;
|
||||
@@ -249,12 +280,42 @@ private:
|
||||
|
||||
std::vector<std::string> monitorAction;
|
||||
|
||||
std::vector<void *> widgetV;
|
||||
|
||||
|
||||
bool hasNewData; // used by HandleHelper.getMonitorAction();
|
||||
|
||||
public:
|
||||
|
||||
#if HAVE_PYTHON_H
|
||||
void * PyGetHandler() const;
|
||||
void * PyPutHandler() const;
|
||||
bool getPyOpenCallbackFlag() const
|
||||
{
|
||||
return pyOpenCallbackFlag;
|
||||
}
|
||||
//void * PyOpenHandler() const; //make public so that it can be called from a callback fn
|
||||
void * PyConnectHandler() const; //make public so that it can be called from a callback fn
|
||||
|
||||
|
||||
void * getPyGetCallbackFn(void) const
|
||||
{
|
||||
return pyGetCallbackFn;
|
||||
};
|
||||
void * getPyPutCallbackFn(void) const
|
||||
{
|
||||
return pyPutCallbackFn;
|
||||
};
|
||||
void * getPyConnectCallbackFn(void) const
|
||||
{
|
||||
return pyConnectCallbackFn;
|
||||
};
|
||||
|
||||
std::vector<void *> getPyConnectCallbackVector(void) const
|
||||
{
|
||||
return pyConnectCallbackVector;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Conduit(void );
|
||||
@@ -277,20 +338,27 @@ public:
|
||||
|
||||
int status;
|
||||
|
||||
|
||||
friend std::ostream& operator<<(std::ostream& os, const Conduit& e)
|
||||
{
|
||||
os<< "handle=" << e.handle<<" pv=" << e.pv<< std::endl;
|
||||
return os;
|
||||
};
|
||||
|
||||
//struct connection_handler_args getConnectionHandlerArgs(void) const{
|
||||
// return connectionHandlerArgs;
|
||||
//};
|
||||
|
||||
|
||||
//struct event_handler_args getEventHandlerArgs(void) const {
|
||||
// return eventHandlerArgs;
|
||||
//};
|
||||
|
||||
bool getPyCafe() const
|
||||
{
|
||||
return pyCafeFlag;
|
||||
};
|
||||
|
||||
|
||||
|
||||
bool operator<(const Conduit& c)const
|
||||
{
|
||||
return handle<c.handle;
|
||||
@@ -305,6 +373,11 @@ public:
|
||||
return channelDeviceAttribute.getAttribute();
|
||||
};
|
||||
|
||||
const char * getClassName(void) const
|
||||
{
|
||||
return channelRegalia.className;
|
||||
};
|
||||
|
||||
const char * getHostName(void) const
|
||||
{
|
||||
return channelRegalia.hostName;
|
||||
@@ -317,7 +390,7 @@ public:
|
||||
std::string getDescription(void) const
|
||||
{
|
||||
return desc;
|
||||
}
|
||||
}
|
||||
|
||||
epicsTimeStamp getTimeStamp(void) const
|
||||
{
|
||||
@@ -349,44 +422,64 @@ public:
|
||||
}
|
||||
alarmSeverityStruct getAlarmSeverityStruct(void) const
|
||||
{
|
||||
return aSevStruct;
|
||||
return aSevStruct;
|
||||
}
|
||||
|
||||
bool hasDescription(void) const
|
||||
{
|
||||
return hasDesc;
|
||||
}
|
||||
|
||||
bool hasAlarmSeverityStruct(void) const
|
||||
{
|
||||
return hasAlarmSevStruct;
|
||||
}
|
||||
|
||||
|
||||
bool hasDescription(void) const
|
||||
{
|
||||
return hasDesc;
|
||||
}
|
||||
|
||||
bool hasAlarmSeverityStruct(void) const
|
||||
{
|
||||
return hasAlarmSevStruct;
|
||||
}
|
||||
|
||||
bool hasAlarmSeverity(void) const
|
||||
{
|
||||
if (aSevStruct.hhsv>SEV_NO_ALARM && aSevStruct.hhsv<=SEV_INVALID) {return true;}
|
||||
else if (aSevStruct.hsv>SEV_NO_ALARM && aSevStruct.hsv<=SEV_INVALID) {return true;}
|
||||
else if (aSevStruct.lsv>SEV_NO_ALARM && aSevStruct.lsv<=SEV_INVALID) {return true;}
|
||||
else if (aSevStruct.llsv>SEV_NO_ALARM && aSevStruct.llsv<=SEV_INVALID) {return true;}
|
||||
if (!hasAlarmSevStruct)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (aSevStruct.hhsv>SEV_NO_ALARM && aSevStruct.hhsv<=SEV_INVALID)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else if (aSevStruct.hsv>SEV_NO_ALARM && aSevStruct.hsv<=SEV_INVALID)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else if (aSevStruct.lsv>SEV_NO_ALARM && aSevStruct.lsv<=SEV_INVALID)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else if (aSevStruct.llsv>SEV_NO_ALARM && aSevStruct.llsv<=SEV_INVALID)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
std::string getAlarmStatusAsString(void) const
|
||||
{
|
||||
if (alarmStatus>-1 && alarmStatus<ALARM_STATUS_STRING_LENGTH) {
|
||||
if (alarmStatus>-1 && alarmStatus<ALARM_STATUS_STRING_LENGTH)
|
||||
{
|
||||
return (std::string) epicsAlarmConditionStrings[alarmStatus];
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
std::cout << "alarmStatusValue=" << alarmStatus << " is not within the valid range of 0-3!" << std::endl;
|
||||
return (std::string) "ALARM_UNKNOWN";
|
||||
}
|
||||
}
|
||||
std::string getAlarmSeverityAsString(void) const
|
||||
{
|
||||
if (alarmSeverity>-1 && alarmSeverity<ALARM_SEVERITY_STRING_LENGTH) {
|
||||
if (alarmSeverity>-1 && alarmSeverity<ALARM_SEVERITY_STRING_LENGTH)
|
||||
{
|
||||
return (std::string) epicsAlarmSeverityStrings[alarmSeverity];
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
std::cout << "alarmStatusSeverity=" << alarmSeverity << " is not within the valid range of 0-21!" << std::endl;
|
||||
return (std::string) "SEVERITY_UNKNOWN";
|
||||
}
|
||||
@@ -411,6 +504,7 @@ public:
|
||||
return beamEventNo;
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
PVDataHolder getPVDataFromPulseID(unsigned long long globalPulseID) const {
|
||||
PVDataHolder pvd;
|
||||
@@ -519,18 +613,20 @@ public:
|
||||
|
||||
int getPVDataHolder(PVDataHolder &) const ;
|
||||
int getPVCtrlHolder(PVCtrlHolder &) const ;
|
||||
|
||||
|
||||
std::string getUnits(void) const {
|
||||
|
||||
|
||||
std::string getUnits(void) const
|
||||
{
|
||||
PVCtrlHolder pvc;
|
||||
getPVCtrlHolder(pvc);
|
||||
return pvc.getUnitsAsString();
|
||||
return pvc.getUnitsAsString();
|
||||
};
|
||||
|
||||
short getPrecision(void) const {
|
||||
|
||||
short getPrecision(void) const
|
||||
{
|
||||
PVCtrlHolder pvc;
|
||||
getPVCtrlHolder(pvc);
|
||||
return pvc.getPrecision();
|
||||
return pvc.getPrecision();
|
||||
};
|
||||
|
||||
//bool getRule(void) const {return rule;};
|
||||
@@ -621,10 +717,40 @@ public:
|
||||
//ChannelRequestMetaDataRepository getChannelRequestMetaPrimitiveRepository(void) const {return channelRequestMetaPrimitiveRepository;}; //1
|
||||
|
||||
////MonitorPolicy getMonitorPolicy(void) const {return mpBase;};
|
||||
|
||||
|
||||
MonitorPolicy getMonitorPolicy(unsigned int monitor_id) const
|
||||
{
|
||||
|
||||
bool mpidFound=false;
|
||||
|
||||
//Iterate
|
||||
for (size_t i=0; i< mpV.size(); ++i)
|
||||
{
|
||||
if ( mpV[i].getID() == monitor_id)
|
||||
{
|
||||
mpidFound=true;
|
||||
return mpV[i];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (!mpidFound)
|
||||
{
|
||||
std::cout << __FILE__ << "//" << __LINE__ << std::endl;
|
||||
std::cout << "getMonitorPolicyVector(monitor_id): " << monitor_id << " NOT FOUND! " << std::endl;
|
||||
std::cout << "Could not modify entry!" << std::endl;
|
||||
}
|
||||
MonitorPolicy mp;
|
||||
return mp;
|
||||
};
|
||||
|
||||
std::vector<MonitorPolicy> getMonitorPolicyVector(void) const
|
||||
{
|
||||
return mpV;
|
||||
};
|
||||
|
||||
|
||||
std::vector<MonitorPolicy> getMonitorPolicyInWaitingVector(void) const
|
||||
{
|
||||
return mpInWaitingV;
|
||||
@@ -634,6 +760,12 @@ public:
|
||||
{
|
||||
return monitorAction;
|
||||
};
|
||||
|
||||
std::vector<void *> getWidgetV(void) const
|
||||
{
|
||||
return std::vector<void *>(widgetV);
|
||||
};
|
||||
|
||||
bool getHasNewData(void) const
|
||||
{
|
||||
return hasNewData;
|
||||
|
||||
@@ -15,34 +15,39 @@
|
||||
/**
|
||||
* Friend to Conduit/CAFEGroup records the connection_handler_args struct from callback fns
|
||||
* in hash table
|
||||
* Function is not invoked on closechannel by user
|
||||
*/
|
||||
struct change_connectionHandlerArgs {
|
||||
struct change_connectionHandlerArgs
|
||||
{
|
||||
#define __METHOD__ "change_connectionHandlerArgs"
|
||||
change_connectionHandlerArgs (const struct connection_handler_args & new_connectionHandlerArgs):
|
||||
new_connectionHandlerArgs(new_connectionHandlerArgs) {}
|
||||
|
||||
void operator() (Conduit& c)
|
||||
{
|
||||
|
||||
|
||||
chtype nativeDataType = ca_field_type(new_connectionHandlerArgs.chid);
|
||||
|
||||
//c.connectionHandlerArgs = new_connectionHandlerArgs;
|
||||
c.channelRegalia.connectionState=new_connectionHandlerArgs.op;
|
||||
|
||||
// Data type code will be one of DBF_. The constant TYPENOTCONN=-1 is
|
||||
// returned if the channel is not connected
|
||||
// but we do not overwrite it upon disconnect.
|
||||
|
||||
//std::cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << std::endl;
|
||||
//std::cout << new_connectionHandlerArgs.op << std::endl;
|
||||
//connectFlag
|
||||
if (new_connectionHandlerArgs.op == CA_OP_CONN_UP) {
|
||||
if (new_connectionHandlerArgs.op == CA_OP_CONN_UP)
|
||||
{
|
||||
|
||||
//std::cout << " change_connectionHandlerArgs: bytesize UP " << c.channelRequestMetaData.byteSize << std::endl;
|
||||
//channelRegalia
|
||||
c.channelRegalia.nelem = ca_element_count(new_connectionHandlerArgs.chid);
|
||||
c.channelRegalia.connectFlag = true;
|
||||
c.channelRegalia.hostName = (const char *) ca_host_name (new_connectionHandlerArgs.chid);
|
||||
c.channelRegalia.hostName = (const char *) ca_host_name (new_connectionHandlerArgs.chid);
|
||||
|
||||
if (c.channelRegalia.channelID != new_connectionHandlerArgs.chid) {
|
||||
if (c.channelRegalia.channelID != new_connectionHandlerArgs.chid)
|
||||
{
|
||||
std::cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << std::endl;
|
||||
std::cout << "Internal CAFE WARNING for handle : " << c.handle << std::endl;
|
||||
std::cout << "Channel ID has changed from " << c.channelRegalia.channelID
|
||||
@@ -65,7 +70,8 @@ struct change_connectionHandlerArgs {
|
||||
// Check if c.channelRegalia.cafeConnectionState == ICAFE_CS_NEVER_CONN or not!
|
||||
|
||||
|
||||
if (c.channelRegalia.cafeConnectionState == ICAFE_CS_NEVER_CONN ) {
|
||||
if (c.channelRegalia.cafeConnectionState == ICAFE_CS_NEVER_CONN )
|
||||
{
|
||||
c.channelRequestMetaDataClient.channelID = new_connectionHandlerArgs.chid;
|
||||
c.channelRequestMetaDataClient.nelem = c.channelRegalia.nelem;
|
||||
c.channelRequestMetaDataClient.nelemCache = c.channelRegalia.nelem;
|
||||
@@ -73,7 +79,8 @@ struct change_connectionHandlerArgs {
|
||||
|
||||
//cafeDbrType first filled with CAFENUM:DBR_TIME on initialization
|
||||
//but will be overwritten by whatever the client needs
|
||||
switch (c.channelRequestMetaDataClient.cafeDbrType) {
|
||||
switch (c.channelRequestMetaDataClient.cafeDbrType)
|
||||
{
|
||||
case CAFENUM::DBR_TIME:
|
||||
c.channelRequestMetaDataClient.dbrDataType = dbf_type_to_DBR_TIME(nativeDataType);
|
||||
break;
|
||||
@@ -104,7 +111,8 @@ struct change_connectionHandlerArgs {
|
||||
|
||||
//cafeDbrType first filled with CAFENUM:DBR_TIME on initialization
|
||||
//cafeDbrType can only be overwritten by an explicit method invocation
|
||||
switch (c.channelRequestMetaData.cafeDbrType) {
|
||||
switch (c.channelRequestMetaData.cafeDbrType)
|
||||
{
|
||||
case CAFENUM::DBR_TIME:
|
||||
c.channelRequestMetaData.dbrDataType = dbf_type_to_DBR_TIME(nativeDataType);
|
||||
break;
|
||||
@@ -127,16 +135,19 @@ struct change_connectionHandlerArgs {
|
||||
//No of elements for Ctrl Buffers
|
||||
unsigned int nelem_ctrl_buffer=1;
|
||||
|
||||
if ( c.channelRegalia.nelem > MAX_NELEM_FOR_CTRL_BUFFER) {
|
||||
if ( c.channelRegalia.nelem > MAX_NELEM_FOR_CTRL_BUFFER)
|
||||
{
|
||||
nelem_ctrl_buffer = DEFAULT_NELEM_FOR_CTRL_BUFFER;
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
nelem_ctrl_buffer = c.channelRegalia.nelem;
|
||||
}
|
||||
|
||||
//ctrl data CLIENT
|
||||
//Ctrl data requested by Client
|
||||
if (c.channelRegalia.cafeConnectionState == ICAFE_CS_NEVER_CONN ) {
|
||||
if (c.channelRegalia.cafeConnectionState == ICAFE_CS_NEVER_CONN )
|
||||
{
|
||||
c.channelRequestMetaCtrlClient.channelID = new_connectionHandlerArgs.chid;
|
||||
c.channelRequestMetaCtrlClient.nelem = c.channelRegalia.nelem; //nelem_ctrl_buffer;
|
||||
c.channelRequestMetaCtrlClient.nelemCache = c.channelRegalia.nelem;
|
||||
@@ -144,7 +155,8 @@ struct change_connectionHandlerArgs {
|
||||
|
||||
//cafeDbrType first filled with CAFENUM:DBR_CTRL on initialization
|
||||
//but will be overwritten by whatever the client needs
|
||||
switch (c.channelRequestMetaCtrlClient.cafeDbrType) {
|
||||
switch (c.channelRequestMetaCtrlClient.cafeDbrType)
|
||||
{
|
||||
case CAFENUM::DBR_CTRL:
|
||||
c.channelRequestMetaCtrlClient.dbrDataType = dbf_type_to_DBR_CTRL(nativeDataType);
|
||||
break;
|
||||
@@ -168,7 +180,8 @@ struct change_connectionHandlerArgs {
|
||||
c.channelRequestMetaCtrl.dataType = nativeDataType;
|
||||
//cafeDbrType first filled with CAFENUM:DBR_CTRL on initialization
|
||||
//cafeDbrType can only be overwritten by an explicit method invocation
|
||||
switch (c.channelRequestMetaCtrl.cafeDbrType) {
|
||||
switch (c.channelRequestMetaCtrl.cafeDbrType)
|
||||
{
|
||||
case CAFENUM::DBR_CTRL:
|
||||
c.channelRequestMetaCtrl.dbrDataType = dbf_type_to_DBR_CTRL(nativeDataType);
|
||||
break;
|
||||
@@ -186,10 +199,12 @@ struct change_connectionHandlerArgs {
|
||||
//No of elements for STSACK Buffers
|
||||
unsigned int nelem_stsack_buffer;
|
||||
|
||||
if ( c.channelRegalia.nelem > MAX_NELEM_FOR_STSACK_BUFFER) {
|
||||
if ( c.channelRegalia.nelem > MAX_NELEM_FOR_STSACK_BUFFER)
|
||||
{
|
||||
nelem_stsack_buffer = DEFAULT_NELEM_FOR_STSACK_BUFFER;
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
nelem_stsack_buffer = c.channelRegalia.nelem;
|
||||
}
|
||||
|
||||
@@ -213,7 +228,8 @@ struct change_connectionHandlerArgs {
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
if ( c.channelRegalia.nelem>1) {
|
||||
if ( c.channelRegalia.nelem>1)
|
||||
{
|
||||
double tout= ((unsigned int) (c.channelRegalia.nelem*0.000001)); // 1 sec per million
|
||||
c.channelRequestDataTypePolicy.setRequestKind(CAFENUM::LOWEST_DATATYPE);
|
||||
c.channelTimeoutPolicyGet.setTimeout(std::max(DEFAULT_TIMEOUT_PEND_IO_WF, tout));
|
||||
@@ -225,7 +241,8 @@ struct change_connectionHandlerArgs {
|
||||
c.channelRegalia.cafeConnectionState = ICAFE_CS_CONN;
|
||||
c.status = ICAFE_CA_OP_CONN_UP;
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
|
||||
//nativeType not known on disconnect!!
|
||||
|
||||
@@ -234,7 +251,7 @@ struct change_connectionHandlerArgs {
|
||||
c.channelRequestStatusPut.setCallbackKind(false, true); //fake completion
|
||||
c.channelRegalia.cafeConnectionState =ICAFE_CS_DISCONN;
|
||||
c.channelRegalia.connectFlag = false;
|
||||
c.status = ICAFE_CA_OP_CONN_DOWN;
|
||||
c.status = ICAFE_CA_OP_CONN_DOWN;
|
||||
|
||||
}
|
||||
|
||||
@@ -251,7 +268,8 @@ private:
|
||||
* Friend to Conduit/CAFEGroup permitting fast modification to the ctrlBuffer
|
||||
* This is the ctrlBuffer for _CTRL data requested through ca_get
|
||||
*/
|
||||
struct change_dataBufferSize_CTRL {
|
||||
struct change_dataBufferSize_CTRL
|
||||
{
|
||||
#define __METHOD__ "change_dataBufferSize_CTRL"
|
||||
change_dataBufferSize_CTRL (const chtype & new_ctrlTypeBuffer): new_ctrlTypeBuffer(new_ctrlTypeBuffer) {}
|
||||
|
||||
@@ -263,11 +281,13 @@ struct change_dataBufferSize_CTRL {
|
||||
|
||||
bool allocateMemory=false ;
|
||||
|
||||
if(c.ctrlBuffer==NULL) {
|
||||
if(c.ctrlBuffer==NULL)
|
||||
{
|
||||
allocateMemory=true;
|
||||
}
|
||||
|
||||
else if ( dbr_size_n(new_ctrlTypeBuffer,c.channelRequestMetaCtrl.getNelem()) > c.channelRequestMetaCtrl.getByteSize() ) {
|
||||
else if ( dbr_size_n(new_ctrlTypeBuffer,c.channelRequestMetaCtrl.getNelem()) > c.channelRequestMetaCtrl.getByteSize() )
|
||||
{
|
||||
std::cout << "ctrlBuffer already exists= " << c.ctrlBuffer << " for channel " << c.pv
|
||||
<< " with handle " << c.handle << std::endl;
|
||||
std::cout << "Freeing and reallocating ctrlBuffer" << std::endl;
|
||||
@@ -275,14 +295,16 @@ struct change_dataBufferSize_CTRL {
|
||||
allocateMemory=true;
|
||||
}
|
||||
|
||||
if (allocateMemory) {
|
||||
if (allocateMemory)
|
||||
{
|
||||
//std::cout << "sizeof c.ctrlBuffer " << dbr_size_n(new_ctrlTypeBuffer,c.channelRequestMetaCtrl.getNelem()) << std::endl;
|
||||
c.ctrlBuffer = (db_access_val *) malloc ( dbr_size_n(new_ctrlTypeBuffer,c.channelRequestMetaCtrl.getNelem()) );
|
||||
c.channelRequestMetaCtrl.byteSize=dbr_size_n(new_ctrlTypeBuffer,c.channelRequestMetaCtrl.getNelem());
|
||||
c.channelRequestMetaCtrl.byteSize=dbr_size_n(new_ctrlTypeBuffer, c.channelRequestMetaCtrl.getNelem());
|
||||
}
|
||||
|
||||
|
||||
if (c.ctrlBuffer==0) {
|
||||
if (c.ctrlBuffer==0)
|
||||
{
|
||||
std::cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__ << std::endl;
|
||||
printf ("Virtual memory exhausted for channel %s ", ca_name(c.channelID));
|
||||
printf ("Exiting CAFE");
|
||||
@@ -300,7 +322,8 @@ private:
|
||||
* Friend to CAFEConduit/CAFEGroup permitting fast modification to the dataBuffer of type DBR (putBuffer)
|
||||
* This is used in ca_put methods when input data that is not already in native data type is thus converted
|
||||
*/
|
||||
struct change_dataBufferSize_PRIMITIVE {
|
||||
struct change_dataBufferSize_PRIMITIVE
|
||||
{
|
||||
#define __METHOD__ "change_dataBufferSize_PRIMITIVE"
|
||||
change_dataBufferSize_PRIMITIVE (const chtype & new_dataTypeBufferNative): new_dataTypeBufferNative(new_dataTypeBufferNative) {}
|
||||
|
||||
@@ -309,12 +332,14 @@ struct change_dataBufferSize_PRIMITIVE {
|
||||
|
||||
bool allocateMemory=false ;
|
||||
|
||||
if(c.putBuffer==NULL) {
|
||||
if(c.putBuffer==NULL)
|
||||
{
|
||||
allocateMemory=true;
|
||||
}
|
||||
else if ( dbr_size_n(c.channelRequestMetaPrimitive.getDbrDataType(),
|
||||
c.channelRequestMetaPrimitive.getNelem())
|
||||
> c.channelRequestMetaPrimitive.getByteSize() ) {
|
||||
> c.channelRequestMetaPrimitive.getByteSize() )
|
||||
{
|
||||
std::cout << "putBuffer already exists= " << c.putBuffer << " for channel " << c.pv
|
||||
<< " with handle " << c.handle << std::endl;
|
||||
std::cout << "Freeing and reallocating putBuffer" << std::endl;
|
||||
@@ -322,7 +347,8 @@ struct change_dataBufferSize_PRIMITIVE {
|
||||
allocateMemory=true;
|
||||
}
|
||||
|
||||
if (allocateMemory) {
|
||||
if (allocateMemory)
|
||||
{
|
||||
//std::cout << "sizeof c.putBuffer " << dbr_size_n(c.channelRequestMetaPrimitive.getDbrDataType(),
|
||||
// c.channelRequestMetaPrimitive.getNelem()) << std::endl;
|
||||
c.putBuffer = (db_access_val *) malloc (dbr_size_n(c.channelRequestMetaPrimitive.getDbrDataType(),
|
||||
@@ -333,7 +359,8 @@ struct change_dataBufferSize_PRIMITIVE {
|
||||
c.channelRequestMetaPrimitive.getNelem());
|
||||
}
|
||||
|
||||
if (c.putBuffer==0) {
|
||||
if (c.putBuffer==0)
|
||||
{
|
||||
std::cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__ << std::endl;
|
||||
printf ("Virtual memory exhausted for channel %s ", ca_name(c.channelID));
|
||||
printf ("Exiting CAFE");
|
||||
@@ -353,7 +380,8 @@ private:
|
||||
* Friend to CAFEConduit/CAFEGroup permitting fast modification to the ctrlBuffer
|
||||
* This is the ctrlBuffer for _CTRL data requested through ca_get
|
||||
*/
|
||||
struct change_dataBufferSize_STSACK {
|
||||
struct change_dataBufferSize_STSACK
|
||||
{
|
||||
#define __METHOD__ "change_dataBufferSize_STSACK"
|
||||
change_dataBufferSize_STSACK () {}
|
||||
|
||||
@@ -362,14 +390,16 @@ struct change_dataBufferSize_STSACK {
|
||||
|
||||
bool allocateMemory=false ;
|
||||
|
||||
if(c.stsackBuffer==NULL) {
|
||||
if(c.stsackBuffer==NULL)
|
||||
{
|
||||
|
||||
allocateMemory=true;
|
||||
}
|
||||
|
||||
else if ( dbr_size_n(c.channelRequestMetaSTSACK.getDbrDataType(),
|
||||
c.channelRequestMetaSTSACK.getNelem())
|
||||
> c.channelRequestMetaSTSACK.getByteSize() ) {
|
||||
> c.channelRequestMetaSTSACK.getByteSize() )
|
||||
{
|
||||
std::cout << "stsackBuffer already exists= " << c.stsackBuffer << " for channel " << c.pv
|
||||
<< " with handle " << c.handle << std::endl;
|
||||
std::cout << "Freeing and reallocating putBuffer" << std::endl;
|
||||
@@ -377,7 +407,8 @@ struct change_dataBufferSize_STSACK {
|
||||
allocateMemory=true;
|
||||
}
|
||||
|
||||
if (allocateMemory) {
|
||||
if (allocateMemory)
|
||||
{
|
||||
//std::cout << "sizeof c.stsackBuffer " << dbr_size_n(c.channelRequestMetaSTSACK.getDbrDataType(),
|
||||
// c.channelRequestMetaSTSACK.getNelem()) << std::endl;
|
||||
c.stsackBuffer = (db_access_val *) malloc (dbr_size_n(c.channelRequestMetaSTSACK.getDbrDataType(),
|
||||
@@ -397,7 +428,8 @@ struct change_dataBufferSize_STSACK {
|
||||
* Friend to CAFEConduit/CAFEGroup permitting fast modification to the dataBuffer of type DBR_TIME (dataBuffer)
|
||||
* This is the main dataBuffer for data requested through ca_get
|
||||
*/
|
||||
struct change_dataBufferSize_TIME {
|
||||
struct change_dataBufferSize_TIME
|
||||
{
|
||||
#define __METHOD__ "change_dataBufferSize_PRIMITIVE"
|
||||
|
||||
change_dataBufferSize_TIME (const chtype & new_dataTypeBuffer): new_dataTypeBuffer(new_dataTypeBuffer) {}
|
||||
@@ -411,12 +443,14 @@ struct change_dataBufferSize_TIME {
|
||||
bool allocateMemory=false ;
|
||||
|
||||
|
||||
if(c.dataBuffer==NULL) {
|
||||
if(c.dataBuffer==NULL)
|
||||
{
|
||||
|
||||
allocateMemory=true;
|
||||
}
|
||||
|
||||
else if ( dbr_size_n(new_dataTypeBuffer,c.channelRegalia.getNelem()) > c.channelRequestMetaData.getByteSize() ) {
|
||||
else if ( dbr_size_n(new_dataTypeBuffer,c.channelRegalia.getNelem()) > c.channelRequestMetaData.getByteSize() )
|
||||
{
|
||||
std::cout << "dataBuffer already exists= " << c.dataBuffer << " for channel " << c.pv
|
||||
<< " with handle " << c.handle << std::endl;
|
||||
std::cout << "Freeing and reallocating dataBuffer" << std::endl;
|
||||
@@ -428,14 +462,16 @@ struct change_dataBufferSize_TIME {
|
||||
|
||||
}
|
||||
|
||||
if (allocateMemory) {
|
||||
if (allocateMemory)
|
||||
{
|
||||
//std::cout << "sizeof c.dataBuffer " << dbr_size_n(new_dataTypeBuffer,c.channelRegalia.getNelem()) << std::endl;
|
||||
c.dataBuffer = (db_access_val *) malloc ( dbr_size_n(new_dataTypeBuffer,c.channelRegalia.getNelem()) );
|
||||
c.channelRequestMetaData.byteSize=dbr_size_n(new_dataTypeBuffer,c.channelRequestMetaData.getNelem());
|
||||
|
||||
}
|
||||
|
||||
if (c.dataBuffer==NULL) {
|
||||
if (c.dataBuffer==NULL)
|
||||
{
|
||||
std::cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__ << std::endl;
|
||||
printf ("Virtual memory exhausted for channel %s ", ca_name(c.channelID));
|
||||
printf ("Exiting CAFE");
|
||||
@@ -453,7 +489,8 @@ private:
|
||||
/**
|
||||
* Friend to CAFEConduit/CAFEGroup - releases resources
|
||||
*/
|
||||
struct free_dataBuffers {
|
||||
struct free_dataBuffers
|
||||
{
|
||||
free_dataBuffers () {}
|
||||
|
||||
void operator() (Conduit& c)
|
||||
@@ -461,19 +498,23 @@ struct free_dataBuffers {
|
||||
|
||||
//std::cout << "c.handle=" << c.handle << " " << c.pv << std::endl;
|
||||
|
||||
if(c.dataBuffer) {
|
||||
if(c.dataBuffer)
|
||||
{
|
||||
free(c.dataBuffer); // _TIME data buffer for ca_get
|
||||
}
|
||||
|
||||
if(c.ctrlBuffer) {
|
||||
if(c.ctrlBuffer)
|
||||
{
|
||||
free(c.ctrlBuffer); // _CTRL data buffer for ca_get
|
||||
}
|
||||
|
||||
if(c.stsackBuffer) {
|
||||
if(c.stsackBuffer)
|
||||
{
|
||||
free(c.stsackBuffer); // _STSACK_STRING data buffer for ca_get
|
||||
}
|
||||
|
||||
if(c.putBuffer) {
|
||||
if(c.putBuffer)
|
||||
{
|
||||
free(c.putBuffer); // data buffer for ca_put
|
||||
}
|
||||
|
||||
|
||||
@@ -17,19 +17,27 @@
|
||||
* Friend to Conduit/CAFEGroup permitting the event_handler_args.dbr data from callback fn
|
||||
* to be recorded in hash table
|
||||
*/
|
||||
struct change_eventHandlerArgs {
|
||||
struct change_eventHandlerArgs
|
||||
{
|
||||
#define __METHOD__ "change_eventHandlerArgs"
|
||||
change_eventHandlerArgs (const struct event_handler_args & new_eventHandlerArgs) :
|
||||
new_eventHandlerArgs(new_eventHandlerArgs) {}
|
||||
|
||||
|
||||
void operator() (Conduit& c)
|
||||
{
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//c.eventHandlerArgs = new_eventHandlerArgs;
|
||||
c.status= new_eventHandlerArgs.status;
|
||||
if(c.status!=ECA_NORMAL) return;
|
||||
|
||||
//Must always return else segmentataion fault
|
||||
//But all initCallbacksComplete method will return false
|
||||
//Change this to stop this happening
|
||||
if(c.status!=ECA_NORMAL) {
|
||||
std::cout << "conduitEventHandlerArgs.h/" << __LINE__ << " " << __METHOD__ << " STATUS IS " << c.status << std::endl;
|
||||
std::cout << "conduitEventHandlerArgs.h/" << __LINE__ << " " << __METHOD__ << " return from method ***IS *** enforced " << std::endl;
|
||||
return;
|
||||
}
|
||||
//std::cout << __METHOD__ << " STATUS IS " << c.status << std::endl;
|
||||
|
||||
Helper helper;
|
||||
|
||||
@@ -39,8 +47,6 @@ struct change_eventHandlerArgs {
|
||||
//Let is do comparison!
|
||||
CAFENUM::DBR_TYPE dbrTypeClass=helper.convertToCAFEDbrTypeClass(new_eventHandlerArgs.type);
|
||||
|
||||
|
||||
|
||||
c.usrArgs = new_eventHandlerArgs.usr;
|
||||
c.dataType= requestedT;
|
||||
c.dbrDataType= bufferType;
|
||||
@@ -49,16 +55,20 @@ struct change_eventHandlerArgs {
|
||||
c.hasNewData=true; //flag used by getMonitorAction for CAFE extensions!
|
||||
|
||||
|
||||
if (new_eventHandlerArgs.type < DBR_GR_STRING) {
|
||||
if (new_eventHandlerArgs.type < DBR_GR_STRING)
|
||||
{
|
||||
bufferType = dbf_type_to_DBR_TIME(requestedT);
|
||||
}
|
||||
else if (new_eventHandlerArgs.type < DBR_PUT_ACKT) {
|
||||
else if (new_eventHandlerArgs.type < DBR_PUT_ACKT)
|
||||
{
|
||||
bufferType = dbf_type_to_DBR_CTRL(requestedT);
|
||||
}
|
||||
else if (new_eventHandlerArgs.type < (LAST_BUFFER_TYPE+1)) {
|
||||
else if (new_eventHandlerArgs.type < (LAST_BUFFER_TYPE+1))
|
||||
{
|
||||
// keep default
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
std::cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__ << std::endl;
|
||||
std::cout << "CAFE INTERNAL FUNNY: UNKNOWN event_handler_args.type= "
|
||||
<< new_eventHandlerArgs.type << std::endl;
|
||||
@@ -70,8 +80,8 @@ struct change_eventHandlerArgs {
|
||||
unsigned int navailable = nrequired;
|
||||
|
||||
|
||||
|
||||
switch(dbrTypeClass) {
|
||||
switch(dbrTypeClass)
|
||||
{
|
||||
case CAFENUM::DBR_STSACK:
|
||||
navailable = c.channelRequestMetaSTSACK.byteSize;
|
||||
c.channelRequestMetaSTSACK.nelem = new_eventHandlerArgs.count;
|
||||
@@ -83,9 +93,7 @@ struct change_eventHandlerArgs {
|
||||
case CAFENUM::DBR_PRIMITIVE:
|
||||
case CAFENUM::DBR_STS:
|
||||
case CAFENUM::DBR_TIME:
|
||||
navailable = c.channelRequestMetaData.byteSize; //
|
||||
|
||||
|
||||
navailable = c.channelRequestMetaData.byteSize;
|
||||
|
||||
c.channelRequestMetaData.nelem = new_eventHandlerArgs.count;
|
||||
c.channelRequestMetaData.dataType = requestedT;
|
||||
@@ -94,7 +102,8 @@ struct change_eventHandlerArgs {
|
||||
c.channelRequestMetaData.usrArg = new_eventHandlerArgs.usr; //c.channelRequestMetaDataClient.usrArg;
|
||||
|
||||
//Do this check here already
|
||||
if (nrequired > navailable) {
|
||||
if (nrequired > navailable)
|
||||
{
|
||||
c.channelRequestMetaData.byteSize = nrequired;
|
||||
|
||||
}
|
||||
@@ -107,7 +116,8 @@ struct change_eventHandlerArgs {
|
||||
c.channelRequestMetaCtrl.dbrDataType = new_eventHandlerArgs.type;
|
||||
c.channelRequestMetaCtrl.cafeDbrType = dbrTypeClass;
|
||||
c.channelRequestMetaCtrl.usrArg = new_eventHandlerArgs.usr; //c.channelRequestMetaDataClient.usrArg;
|
||||
if (nrequired > navailable) {
|
||||
if (nrequired > navailable)
|
||||
{
|
||||
c.channelRequestMetaCtrl.byteSize = nrequired;
|
||||
}
|
||||
break;
|
||||
@@ -122,9 +132,8 @@ struct change_eventHandlerArgs {
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
if (nrequired > navailable) {
|
||||
if (nrequired > navailable)
|
||||
{
|
||||
|
||||
std::cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__ << std::endl;
|
||||
std::cout << "CHANGE OF BUFFER SIZE: FROM " << navailable << " bytes TO " << nrequired << " bytes" << std::endl;
|
||||
@@ -133,13 +142,16 @@ struct change_eventHandlerArgs {
|
||||
<< " type=" << dbr_type_to_text(new_eventHandlerArgs.type) << std::endl;
|
||||
|
||||
//check DataBuffers
|
||||
switch(dbrTypeClass) {
|
||||
switch(dbrTypeClass)
|
||||
{
|
||||
case CAFENUM::DBR_STSACK: //value is of type dbr_string_t
|
||||
|
||||
if (c.stsackBuffer!=NULL) {
|
||||
if (c.stsackBuffer!=NULL)
|
||||
{
|
||||
free(c.stsackBuffer);
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
std::cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__ << std::endl;
|
||||
std::cout << "CAFE INTERNAL FUNNY: HOW CAN stsackBuffer NOT ALREADY EXIST?" << std::endl;
|
||||
std::cout << "CREATING stsackBuffer " << std::endl;
|
||||
@@ -148,7 +160,8 @@ struct change_eventHandlerArgs {
|
||||
c.stsackBuffer = (db_access_val *) malloc (nrequired);
|
||||
|
||||
|
||||
if (c.stsackBuffer==NULL) {
|
||||
if (c.stsackBuffer==NULL)
|
||||
{
|
||||
std::cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__ << std::endl;
|
||||
printf ("Virtual memory exhausted for channel %s ", ca_name(c.channelID));
|
||||
printf ("Exiting CAFE");
|
||||
@@ -166,7 +179,8 @@ struct change_eventHandlerArgs {
|
||||
case CAFENUM::DBR_TIME:
|
||||
|
||||
// Check that buffer is large enough! Do not expect this part ever to be invoked
|
||||
if (c.dataBuffer != NULL) {
|
||||
if (c.dataBuffer != NULL)
|
||||
{
|
||||
|
||||
// Only re-allocate buffer if the number of native elements has increased without the
|
||||
// the callback function first being called. i.e. nelemNative was changed on the fly!
|
||||
@@ -174,7 +188,8 @@ struct change_eventHandlerArgs {
|
||||
|
||||
free(c.dataBuffer);
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
std::cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__ << std::endl;
|
||||
std::cout << "CAFE INTERNAL FUNNY: HOW CAN dataBuffer NOT ALREADY EXIST?" << std::endl;
|
||||
std::cout << "CREATING dataBuffer " << std::endl;
|
||||
@@ -182,7 +197,8 @@ struct change_eventHandlerArgs {
|
||||
|
||||
c.dataBuffer = (db_access_val *) malloc (nrequired);
|
||||
|
||||
if (c.dataBuffer==NULL) {
|
||||
if (c.dataBuffer==NULL)
|
||||
{
|
||||
std::cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__ << std::endl;
|
||||
printf ("Virtual memory exhausted for channel %s ", ca_name(c.channelID));
|
||||
printf ("Exiting CAFE");
|
||||
@@ -196,7 +212,8 @@ struct change_eventHandlerArgs {
|
||||
case CAFENUM::DBR_CTRL:
|
||||
|
||||
// Check that buffer is large enough! Do not expect this part ever to be invoked
|
||||
if (c.ctrlBuffer != NULL) {
|
||||
if (c.ctrlBuffer != NULL)
|
||||
{
|
||||
|
||||
// Only re-allocate buffer if the number of native elements has increased without the
|
||||
// the callback function first being called. i.e. nelemNative was changed on the fly!
|
||||
@@ -204,7 +221,8 @@ struct change_eventHandlerArgs {
|
||||
|
||||
free(c.ctrlBuffer);
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
std::cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__ << std::endl;
|
||||
std::cout << "CAFE INTERNAL FUNNY: HOW CAN dataBuffer NOT ALREADY EXIST?" << std::endl;
|
||||
std::cout << "CREATING dataBuffer " << std::endl;
|
||||
@@ -212,7 +230,8 @@ struct change_eventHandlerArgs {
|
||||
|
||||
c.ctrlBuffer = (db_access_val *) malloc (nrequired);
|
||||
|
||||
if (c.ctrlBuffer==NULL) {
|
||||
if (c.ctrlBuffer==NULL)
|
||||
{
|
||||
std::cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__ << std::endl;
|
||||
printf ("Virtual memory exhausted for channel %s ", ca_name(c.channelID));
|
||||
printf ("Exiting CAFE");
|
||||
@@ -234,13 +253,18 @@ struct change_eventHandlerArgs {
|
||||
} // if new buffer size required
|
||||
|
||||
|
||||
if (new_eventHandlerArgs.count > 0) {
|
||||
if ((unsigned int) new_eventHandlerArgs.count > c.channelRegalia.nelem) {
|
||||
if (new_eventHandlerArgs.count > 0)
|
||||
{
|
||||
if ((unsigned int) new_eventHandlerArgs.count > c.channelRegalia.nelem)
|
||||
{
|
||||
c.channelRegalia.nelem = (unsigned int) new_eventHandlerArgs.count;
|
||||
}
|
||||
}
|
||||
|
||||
switch(dbrTypeClass) {
|
||||
|
||||
|
||||
switch(dbrTypeClass)
|
||||
{
|
||||
case CAFENUM::DBR_PRIMITIVE:
|
||||
//c.hasAlarmStatus =false;
|
||||
//c.hasAlarmSeverity=false;
|
||||
@@ -300,10 +324,12 @@ struct change_eventHandlerArgs {
|
||||
|
||||
//Now fill buffers
|
||||
|
||||
switch(new_eventHandlerArgs.type) {
|
||||
switch(new_eventHandlerArgs.type)
|
||||
{
|
||||
case DBR_DOUBLE: //6
|
||||
|
||||
for (long i=0; i<new_eventHandlerArgs.count; ++i) {
|
||||
for (long i=0; i<new_eventHandlerArgs.count; ++i)
|
||||
{
|
||||
(*(&((c.dataBuffer)->doubleval)+i))
|
||||
= (*(&( ((union db_access_val *) new_eventHandlerArgs.dbr)->doubleval)+i));
|
||||
}
|
||||
@@ -312,7 +338,8 @@ struct change_eventHandlerArgs {
|
||||
|
||||
case DBR_FLOAT: // 2
|
||||
|
||||
for (long i=0; i<new_eventHandlerArgs.count; ++i) {
|
||||
for (long i=0; i<new_eventHandlerArgs.count; ++i)
|
||||
{
|
||||
(*(&((c.dataBuffer)->fltval)+i))
|
||||
= (dbr_float_t) (*(&( ( (union db_access_val *) new_eventHandlerArgs.dbr)->fltval)+i));
|
||||
}
|
||||
@@ -322,7 +349,8 @@ struct change_eventHandlerArgs {
|
||||
|
||||
case DBR_LONG: // 5
|
||||
|
||||
for (long i=0; i<new_eventHandlerArgs.count; ++i) {
|
||||
for (long i=0; i<new_eventHandlerArgs.count; ++i)
|
||||
{
|
||||
(*(&((c.dataBuffer)->longval)+i))
|
||||
= (*(&(( (union db_access_val *) new_eventHandlerArgs.dbr)->longval)+i));
|
||||
}
|
||||
@@ -330,7 +358,8 @@ struct change_eventHandlerArgs {
|
||||
|
||||
case DBR_SHORT: // 1
|
||||
|
||||
for (long i=0; i<new_eventHandlerArgs.count; ++i) {
|
||||
for (long i=0; i<new_eventHandlerArgs.count; ++i)
|
||||
{
|
||||
(*(&((c.dataBuffer)->shrtval)+i))
|
||||
= (*(&(((union db_access_val *) new_eventHandlerArgs.dbr)->shrtval)+i));
|
||||
}
|
||||
@@ -338,7 +367,8 @@ struct change_eventHandlerArgs {
|
||||
|
||||
case DBR_STRING: // 0
|
||||
|
||||
for (long i=0; i<new_eventHandlerArgs.count; ++i) {
|
||||
for (long i=0; i<new_eventHandlerArgs.count; ++i)
|
||||
{
|
||||
strcpy ((*(&((c.dataBuffer)->strval)+i)),
|
||||
(*(&(((union db_access_val *) new_eventHandlerArgs.dbr)->strval)+i)) );
|
||||
}
|
||||
@@ -346,7 +376,8 @@ struct change_eventHandlerArgs {
|
||||
|
||||
case DBR_ENUM: // 3
|
||||
|
||||
for (long i=0; i<new_eventHandlerArgs.count; ++i) {
|
||||
for (long i=0; i<new_eventHandlerArgs.count; ++i)
|
||||
{
|
||||
(*(&((c.dataBuffer)->enmval)+i))
|
||||
= (*(&(((union db_access_val *) new_eventHandlerArgs.dbr)->enmval)+i));
|
||||
}
|
||||
@@ -354,7 +385,8 @@ struct change_eventHandlerArgs {
|
||||
|
||||
case DBR_CHAR: // 4
|
||||
|
||||
for (long i=0; i<new_eventHandlerArgs.count; ++i) {
|
||||
for (long i=0; i<new_eventHandlerArgs.count; ++i)
|
||||
{
|
||||
(*(&((c.dataBuffer)->charval)+i))
|
||||
= (*(&(((union db_access_val *) new_eventHandlerArgs.dbr)->charval)+i));
|
||||
}
|
||||
@@ -363,7 +395,8 @@ struct change_eventHandlerArgs {
|
||||
|
||||
case DBR_STS_DOUBLE: // 13
|
||||
|
||||
for (long i=0; i<new_eventHandlerArgs.count; ++i) {
|
||||
for (long i=0; i<new_eventHandlerArgs.count; ++i)
|
||||
{
|
||||
(*(&((c.dataBuffer)->sdblval.value)+i))
|
||||
= (*(&( ((union db_access_val *) new_eventHandlerArgs.dbr)->sdblval.value)+i));
|
||||
}
|
||||
@@ -377,7 +410,8 @@ struct change_eventHandlerArgs {
|
||||
|
||||
case DBR_STS_FLOAT: // 9
|
||||
|
||||
for (long i=0; i<new_eventHandlerArgs.count; ++i) {
|
||||
for (long i=0; i<new_eventHandlerArgs.count; ++i)
|
||||
{
|
||||
(*(&((c.dataBuffer)->sfltval.value)+i))
|
||||
= (dbr_float_t) (*(&( ( (union db_access_val *) new_eventHandlerArgs.dbr)->sfltval.value)+i));
|
||||
}
|
||||
@@ -392,7 +426,8 @@ struct change_eventHandlerArgs {
|
||||
|
||||
case DBR_STS_LONG: // 12
|
||||
|
||||
for (long i=0; i<new_eventHandlerArgs.count; ++i) {
|
||||
for (long i=0; i<new_eventHandlerArgs.count; ++i)
|
||||
{
|
||||
(*(&((c.dataBuffer)->slngval.value)+i))
|
||||
= (*(&(( (union db_access_val *) new_eventHandlerArgs.dbr)->slngval.value)+i));
|
||||
}
|
||||
@@ -407,7 +442,8 @@ struct change_eventHandlerArgs {
|
||||
|
||||
case DBR_STS_SHORT: // 8
|
||||
|
||||
for (long i=0; i<new_eventHandlerArgs.count; ++i) {
|
||||
for (long i=0; i<new_eventHandlerArgs.count; ++i)
|
||||
{
|
||||
(*(&((c.dataBuffer)->sshrtval.value)+i))
|
||||
= (*(&(((union db_access_val *) new_eventHandlerArgs.dbr)->sshrtval.value)+i));
|
||||
}
|
||||
@@ -420,7 +456,8 @@ struct change_eventHandlerArgs {
|
||||
|
||||
case DBR_STS_STRING: // 7
|
||||
|
||||
for (long i=0; i<new_eventHandlerArgs.count; ++i) {
|
||||
for (long i=0; i<new_eventHandlerArgs.count; ++i)
|
||||
{
|
||||
strcpy ((*(&((c.dataBuffer)->sstrval.value)+i)),
|
||||
(*(&(((union db_access_val *) new_eventHandlerArgs.dbr)->sstrval.value)+i)) );
|
||||
}
|
||||
@@ -434,7 +471,8 @@ struct change_eventHandlerArgs {
|
||||
|
||||
case DBR_STS_ENUM: // 10
|
||||
|
||||
for (long i=0; i<new_eventHandlerArgs.count; ++i) {
|
||||
for (long i=0; i<new_eventHandlerArgs.count; ++i)
|
||||
{
|
||||
(*(&((c.dataBuffer)->senmval.value)+i))
|
||||
= (*(&(((union db_access_val *) new_eventHandlerArgs.dbr)->senmval.value)+i));
|
||||
}
|
||||
@@ -448,7 +486,8 @@ struct change_eventHandlerArgs {
|
||||
|
||||
case DBR_STS_CHAR: // 11
|
||||
|
||||
for (long i=0; i<new_eventHandlerArgs.count; ++i) {
|
||||
for (long i=0; i<new_eventHandlerArgs.count; ++i)
|
||||
{
|
||||
(*(&((c.dataBuffer)->schrval.value)+i))
|
||||
= (*(&(((union db_access_val *) new_eventHandlerArgs.dbr)->schrval.value)+i));
|
||||
}
|
||||
@@ -463,7 +502,8 @@ struct change_eventHandlerArgs {
|
||||
|
||||
case DBR_TIME_DOUBLE: // 20
|
||||
|
||||
for (long i=0; i<new_eventHandlerArgs.count; ++i) {
|
||||
for (long i=0; i<new_eventHandlerArgs.count; ++i)
|
||||
{
|
||||
(*(&((c.dataBuffer)->tdblval.value)+i))
|
||||
= (*(&( ((union db_access_val *) new_eventHandlerArgs.dbr)->tdblval.value)+i));
|
||||
}
|
||||
@@ -481,7 +521,8 @@ struct change_eventHandlerArgs {
|
||||
|
||||
case DBR_TIME_FLOAT: //16
|
||||
|
||||
for (long i=0; i<new_eventHandlerArgs.count; ++i) {
|
||||
for (long i=0; i<new_eventHandlerArgs.count; ++i)
|
||||
{
|
||||
|
||||
(*(&((c.dataBuffer)->tfltval.value)+i))
|
||||
= (dbr_float_t) (*(&( ( (union db_access_val *) new_eventHandlerArgs.dbr)->tfltval.value)+i));
|
||||
@@ -501,7 +542,8 @@ struct change_eventHandlerArgs {
|
||||
|
||||
case DBR_TIME_LONG: //19
|
||||
|
||||
for (long i=0; i<new_eventHandlerArgs.count; ++i) {
|
||||
for (long i=0; i<new_eventHandlerArgs.count; ++i)
|
||||
{
|
||||
(*(&((c.dataBuffer)->tlngval.value)+i))
|
||||
= (*(&(( (union db_access_val *) new_eventHandlerArgs.dbr)->tlngval.value)+i));
|
||||
}
|
||||
@@ -516,7 +558,8 @@ struct change_eventHandlerArgs {
|
||||
break;
|
||||
|
||||
case DBR_TIME_SHORT:
|
||||
for (long i=0; i<new_eventHandlerArgs.count; ++i) {
|
||||
for (long i=0; i<new_eventHandlerArgs.count; ++i)
|
||||
{
|
||||
(*(&((c.dataBuffer)->tshrtval.value)+i))
|
||||
= (*(&(((union db_access_val *) new_eventHandlerArgs.dbr)->tshrtval.value)+i));
|
||||
}
|
||||
@@ -533,7 +576,8 @@ struct change_eventHandlerArgs {
|
||||
|
||||
case DBR_TIME_STRING: //14
|
||||
|
||||
for (long i=0; i<new_eventHandlerArgs.count; ++i) {
|
||||
for (long i=0; i<new_eventHandlerArgs.count; ++i)
|
||||
{
|
||||
strcpy ((*(&((c.dataBuffer)->tstrval.value)+i)),
|
||||
(*(&(((union db_access_val *) new_eventHandlerArgs.dbr)->tstrval.value)+i)) );
|
||||
}
|
||||
@@ -551,7 +595,8 @@ struct change_eventHandlerArgs {
|
||||
|
||||
case DBR_TIME_ENUM: //17
|
||||
|
||||
for (long i=0; i<new_eventHandlerArgs.count; ++i) {
|
||||
for (long i=0; i<new_eventHandlerArgs.count; ++i)
|
||||
{
|
||||
(*(&((c.dataBuffer)->tenmval.value)+i))
|
||||
= (*(&(((union db_access_val *) new_eventHandlerArgs.dbr)->tenmval.value)+i));
|
||||
}
|
||||
@@ -569,7 +614,8 @@ struct change_eventHandlerArgs {
|
||||
|
||||
case DBR_TIME_CHAR: //18
|
||||
|
||||
for (long i=0; i<new_eventHandlerArgs.count; ++i) {
|
||||
for (long i=0; i<new_eventHandlerArgs.count; ++i)
|
||||
{
|
||||
(*(&((c.dataBuffer)->tchrval.value)+i))
|
||||
= (*(&(((union db_access_val *) new_eventHandlerArgs.dbr)->tchrval.value)+i));
|
||||
|
||||
@@ -585,7 +631,8 @@ struct change_eventHandlerArgs {
|
||||
|
||||
case DBR_CTRL_DOUBLE: //34
|
||||
|
||||
for (long i=0; i<new_eventHandlerArgs.count; ++i) {
|
||||
for (long i=0; i<new_eventHandlerArgs.count; ++i)
|
||||
{
|
||||
(*(&((c.ctrlBuffer)->cdblval.value)+i)) =
|
||||
(*(&( ((union db_access_val *) new_eventHandlerArgs.dbr)->cdblval.value)+i));
|
||||
}
|
||||
@@ -598,9 +645,16 @@ struct change_eventHandlerArgs {
|
||||
((struct dbr_ctrl_double *) new_eventHandlerArgs.dbr)->precision;
|
||||
(*(&((c.ctrlBuffer)->cdblval.RISC_pad0))) =
|
||||
(dbr_short_t) ((struct dbr_ctrl_double *) new_eventHandlerArgs.dbr)->RISC_pad0; //dbr_short_t
|
||||
//std::cout << __METHOD__ << __LINE__ << std::endl;
|
||||
|
||||
//std::cout << ((struct dbr_ctrl_double *) new_eventHandlerArgs.dbr)->units << std::endl;
|
||||
|
||||
memcpy((*(&((c.ctrlBuffer)->cdblval.units))),
|
||||
&(((struct dbr_ctrl_double *) new_eventHandlerArgs.dbr)->units),
|
||||
sizeof(char[MAX_UNITS_SIZE]));
|
||||
sizeof( char[MAX_UNITS_SIZE])); // (((struct dbr_ctrl_double *) new_eventHandlerArgs.dbr)->units) ));
|
||||
|
||||
|
||||
|
||||
(*(&((c.ctrlBuffer)->cdblval.upper_disp_limit))) =
|
||||
((struct dbr_ctrl_double *) new_eventHandlerArgs.dbr)->upper_disp_limit;
|
||||
(*(&((c.ctrlBuffer)->cdblval.lower_disp_limit))) =
|
||||
@@ -622,7 +676,8 @@ struct change_eventHandlerArgs {
|
||||
|
||||
case DBR_CTRL_LONG: //33
|
||||
|
||||
for (long i=0; i<new_eventHandlerArgs.count; ++i) {
|
||||
for (long i=0; i<new_eventHandlerArgs.count; ++i)
|
||||
{
|
||||
(*(&((c.ctrlBuffer)->clngval.value)+i)) =
|
||||
(*(&( ((union db_access_val *) new_eventHandlerArgs.dbr)->clngval.value)+i));
|
||||
}
|
||||
@@ -663,7 +718,8 @@ struct change_eventHandlerArgs {
|
||||
|
||||
case DBR_CTRL_CHAR: //32
|
||||
|
||||
for (long i=0; i<new_eventHandlerArgs.count; ++i) {
|
||||
for (long i=0; i<new_eventHandlerArgs.count; ++i)
|
||||
{
|
||||
(*(&((c.ctrlBuffer)->gchrval.value)+i)) =
|
||||
(*(&( ((union db_access_val *) new_eventHandlerArgs.dbr)->cchrval.value)+i));
|
||||
}
|
||||
@@ -704,7 +760,8 @@ struct change_eventHandlerArgs {
|
||||
|
||||
case DBR_CTRL_ENUM: //31
|
||||
|
||||
for (long i=0; i<new_eventHandlerArgs.count; ++i) {
|
||||
for (long i=0; i<new_eventHandlerArgs.count; ++i)
|
||||
{
|
||||
(*(&((c.ctrlBuffer)->cenmval.value)+i)) =
|
||||
(*(&( ((union db_access_val *) new_eventHandlerArgs.dbr)->cenmval.value)+i));
|
||||
}
|
||||
@@ -738,7 +795,8 @@ struct change_eventHandlerArgs {
|
||||
|
||||
case DBR_CTRL_FLOAT: //30
|
||||
|
||||
for (long i=0; i<new_eventHandlerArgs.count; ++i) {
|
||||
for (long i=0; i<new_eventHandlerArgs.count; ++i)
|
||||
{
|
||||
(*(&((c.ctrlBuffer)->cfltval.value)+i)) =
|
||||
(*(&( ((union db_access_val *) new_eventHandlerArgs.dbr)->cfltval.value)+i));
|
||||
}
|
||||
@@ -784,7 +842,8 @@ struct change_eventHandlerArgs {
|
||||
|
||||
case DBR_CTRL_SHORT: //29
|
||||
|
||||
for (long i=0; i<new_eventHandlerArgs.count; ++i) {
|
||||
for (long i=0; i<new_eventHandlerArgs.count; ++i)
|
||||
{
|
||||
(*(&((c.ctrlBuffer)->gshrtval.value)+i)) =
|
||||
(*(&( ((union db_access_val *) new_eventHandlerArgs.dbr)->cshrtval.value)+i));
|
||||
}
|
||||
@@ -826,7 +885,9 @@ struct change_eventHandlerArgs {
|
||||
|
||||
case DBR_CTRL_STRING: //28
|
||||
|
||||
for (long i=0; i<new_eventHandlerArgs.count; ++i) {
|
||||
|
||||
for (long i=0; i<new_eventHandlerArgs.count; ++i)
|
||||
{
|
||||
strcpy( (*(&((c.ctrlBuffer)->cstrval.value)+i)),
|
||||
(*(&( ((union db_access_val *) new_eventHandlerArgs.dbr)->cstrval.value)+i)));
|
||||
}
|
||||
@@ -839,11 +900,13 @@ struct change_eventHandlerArgs {
|
||||
//c.alarmStatus =((struct dbr_sts_string *) new_eventHandlerArgs.dbr)->status;
|
||||
//c.alarmSeverity=((struct dbr_sts_string *) new_eventHandlerArgs.dbr)->severity;
|
||||
|
||||
|
||||
break;
|
||||
|
||||
case DBR_GR_DOUBLE: //27
|
||||
|
||||
for (long i=0; i<new_eventHandlerArgs.count; ++i) {
|
||||
for (long i=0; i<new_eventHandlerArgs.count; ++i)
|
||||
{
|
||||
(*(&((c.ctrlBuffer)->gdblval.value)+i)) =
|
||||
(*(&( ((union db_access_val *) new_eventHandlerArgs.dbr)->gdblval.value)+i));
|
||||
}
|
||||
@@ -883,7 +946,8 @@ struct change_eventHandlerArgs {
|
||||
|
||||
case DBR_GR_LONG: //26
|
||||
|
||||
for (long i=0; i<new_eventHandlerArgs.count; ++i) {
|
||||
for (long i=0; i<new_eventHandlerArgs.count; ++i)
|
||||
{
|
||||
(*(&((c.ctrlBuffer)->glngval.value)+i)) =
|
||||
(*(&( ((union db_access_val *) new_eventHandlerArgs.dbr)->glngval.value)+i));
|
||||
}
|
||||
@@ -920,7 +984,8 @@ struct change_eventHandlerArgs {
|
||||
|
||||
case DBR_GR_CHAR: //25
|
||||
|
||||
for (long i=0; i<new_eventHandlerArgs.count; ++i) {
|
||||
for (long i=0; i<new_eventHandlerArgs.count; ++i)
|
||||
{
|
||||
(*(&((c.ctrlBuffer)->gchrval.value)+i)) =
|
||||
(*(&( ((union db_access_val *) new_eventHandlerArgs.dbr)->gchrval.value)+i));
|
||||
}
|
||||
@@ -957,7 +1022,8 @@ struct change_eventHandlerArgs {
|
||||
|
||||
case DBR_GR_ENUM: //24
|
||||
|
||||
for (long i=0; i<new_eventHandlerArgs.count; ++i) {
|
||||
for (long i=0; i<new_eventHandlerArgs.count; ++i)
|
||||
{
|
||||
(*(&((c.ctrlBuffer)->genmval.value)+i)) =
|
||||
(*(&( ((union db_access_val *) new_eventHandlerArgs.dbr)->genmval.value)+i));
|
||||
}
|
||||
@@ -992,7 +1058,8 @@ struct change_eventHandlerArgs {
|
||||
|
||||
case DBR_GR_FLOAT: //23
|
||||
|
||||
for (long i=0; i<new_eventHandlerArgs.count; ++i) {
|
||||
for (long i=0; i<new_eventHandlerArgs.count; ++i)
|
||||
{
|
||||
(*(&((c.ctrlBuffer)->gfltval.value)+i)) =
|
||||
(*(&( ((union db_access_val *) new_eventHandlerArgs.dbr)->gfltval.value)+i));
|
||||
}
|
||||
@@ -1034,7 +1101,8 @@ struct change_eventHandlerArgs {
|
||||
|
||||
case DBR_GR_SHORT: //22
|
||||
|
||||
for (long i=0; i<new_eventHandlerArgs.count; ++i) {
|
||||
for (long i=0; i<new_eventHandlerArgs.count; ++i)
|
||||
{
|
||||
(*(&((c.ctrlBuffer)->gshrtval.value)+i)) =
|
||||
(*(&( ((union db_access_val *) new_eventHandlerArgs.dbr)->gshrtval.value)+i));
|
||||
}
|
||||
@@ -1071,7 +1139,8 @@ struct change_eventHandlerArgs {
|
||||
|
||||
case DBR_GR_STRING: //21
|
||||
|
||||
for (long i=0; i<new_eventHandlerArgs.count; ++i) {
|
||||
for (long i=0; i<new_eventHandlerArgs.count; ++i)
|
||||
{
|
||||
strcpy( (*(&((c.ctrlBuffer)->gstrval.value)+i)),
|
||||
(*(&( ((union db_access_val *) new_eventHandlerArgs.dbr)->gstrval.value)+i)));
|
||||
}
|
||||
@@ -1102,7 +1171,8 @@ struct change_eventHandlerArgs {
|
||||
// (*(&(((struct dbr_stsack_string *) new_eventHandlerArgs.dbr)->value)+0))
|
||||
// << std::endl;
|
||||
|
||||
for (long i=0; i<new_eventHandlerArgs.count; ++i) {
|
||||
for (long i=0; i<new_eventHandlerArgs.count; ++i)
|
||||
{
|
||||
strcpy ((*(&((c.stsackBuffer)->sastrval.value)+i)),
|
||||
(*(&(((struct dbr_stsack_string *) new_eventHandlerArgs.dbr)->value)+i)) );
|
||||
//std::cout << " VAL " << (*(&((c.stsackBuffer)->sastrval.value)+i)) << " [" << i << "] ";
|
||||
@@ -1169,7 +1239,8 @@ struct change_eventHandlerArgs {
|
||||
|
||||
//Do this to prevent overflow error in epicsTime time(ts) routines!
|
||||
//This bad number can occur in timeouts
|
||||
if(c.ts.nsec>1000000000) {
|
||||
if(c.ts.nsec>1000000000)
|
||||
{
|
||||
c.ts.nsec=0;
|
||||
}
|
||||
|
||||
|
||||
@@ -15,7 +15,8 @@
|
||||
/**
|
||||
* Friend to Conduit/CAFEGroup permitting fast modification to STS recorded in hash table
|
||||
*/
|
||||
struct change_alarmStatus {
|
||||
struct change_alarmStatus
|
||||
{
|
||||
change_alarmStatus (const dbr_short_t & new_alarmStatus): new_alarmStatus(new_alarmStatus) {}
|
||||
|
||||
void operator() (Conduit& c)
|
||||
@@ -28,7 +29,8 @@ struct change_alarmStatus {
|
||||
private:
|
||||
dbr_short_t new_alarmStatus;
|
||||
};
|
||||
struct change_alarmSeverity {
|
||||
struct change_alarmSeverity
|
||||
{
|
||||
change_alarmSeverity (const dbr_short_t & new_alarmSeverity): new_alarmSeverity(new_alarmSeverity) {}
|
||||
|
||||
void operator() (Conduit& c)
|
||||
@@ -41,7 +43,8 @@ struct change_alarmSeverity {
|
||||
private:
|
||||
dbr_short_t new_alarmSeverity;
|
||||
};
|
||||
struct change_epicsTimeStamp {
|
||||
struct change_epicsTimeStamp
|
||||
{
|
||||
change_epicsTimeStamp (const epicsTimeStamp & new_epicsTimeStamp): new_epicsTimeStamp(new_epicsTimeStamp) {}
|
||||
|
||||
void operator() (Conduit& c)
|
||||
@@ -50,7 +53,8 @@ struct change_epicsTimeStamp {
|
||||
c.ts = new_epicsTimeStamp;
|
||||
//Do this to prevent overflow error in epicsTime time(ts) routines!
|
||||
//This bad number can occur in timeouts
|
||||
if(c.ts.nsec>1000000000) {
|
||||
if(c.ts.nsec>1000000000)
|
||||
{
|
||||
c.ts.nsec=0;
|
||||
}
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
@@ -64,7 +68,8 @@ private:
|
||||
/**
|
||||
* Friend to Conduit/CAFEGroup permitting fast modification to access rights state recorded in hash table
|
||||
*/
|
||||
struct change_accessRead {
|
||||
struct change_accessRead
|
||||
{
|
||||
change_accessRead (const unsigned int & new_accessRead): new_accessRead(new_accessRead) {}
|
||||
|
||||
void operator() (Conduit& c)
|
||||
@@ -82,7 +87,8 @@ private:
|
||||
/**
|
||||
* Friend to Conduit/CAFEGroup permitting fast modification to access rights state recorded in hash table
|
||||
*/
|
||||
struct change_accessWrite {
|
||||
struct change_accessWrite
|
||||
{
|
||||
change_accessWrite (const unsigned int & new_accessWrite): new_accessWrite(new_accessWrite) {}
|
||||
|
||||
void operator() (Conduit& c)
|
||||
@@ -101,7 +107,8 @@ private:
|
||||
* Friend toConduit/CAFEGroup permitting the access_rights_handler_args struct from callback fns
|
||||
* to be recorded in hash table
|
||||
*/
|
||||
struct change_accessRightsHandlerArgs {
|
||||
struct change_accessRightsHandlerArgs
|
||||
{
|
||||
change_accessRightsHandlerArgs (const struct access_rights_handler_args & new_accessRightsHandlerArgs):
|
||||
new_accessRightsHandlerArgs(new_accessRightsHandlerArgs) {}
|
||||
|
||||
@@ -111,6 +118,8 @@ struct change_accessRightsHandlerArgs {
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
c.channelRegalia.accessRead = new_accessRightsHandlerArgs.ar.read_access;
|
||||
c.channelRegalia.accessWrite= new_accessRightsHandlerArgs.ar.write_access;
|
||||
//std::cout << "change_accessRightsHandlerArgs " << new_accessRightsHandlerArgs.ar.read_access << new_accessRightsHandlerArgs.ar.write_access << std:: endl;
|
||||
//std::cout << "change_accessRightsHandlerArgs " << c.channelRegalia.accessRead << c.channelRegalia.accessWrite << std:: endl;
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
}
|
||||
|
||||
@@ -122,7 +131,8 @@ private:
|
||||
/**
|
||||
* Friend to Conduit permitting pulse_id f to be set in hash table
|
||||
*/
|
||||
struct change_beamEventNo {
|
||||
struct change_beamEventNo
|
||||
{
|
||||
change_beamEventNo (const unsigned long long & new_beamEventNo): new_beamEventNo(new_beamEventNo) {}
|
||||
|
||||
void operator() (Conduit& c)
|
||||
@@ -134,10 +144,14 @@ private:
|
||||
unsigned long long new_beamEventNo;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Friend to Conduit/CAFEGroup records the channelRegalia class members in hash table
|
||||
*/
|
||||
struct change_channelDeviceAttribute {
|
||||
struct change_channelDeviceAttribute
|
||||
{
|
||||
change_channelDeviceAttribute (const ChannelDeviceAttribute & new_channelDeviceAttribute):
|
||||
new_channelDeviceAttribute(new_channelDeviceAttribute) {}
|
||||
|
||||
@@ -155,7 +169,8 @@ private:
|
||||
/**
|
||||
* Friend to Conduit/CAFEGroup records the channelID in hash table
|
||||
*/
|
||||
struct change_channelID {
|
||||
struct change_channelID
|
||||
{
|
||||
change_channelID (const chid & new_channelID): new_channelID(new_channelID) {}
|
||||
|
||||
void operator() (Conduit& c)
|
||||
@@ -173,7 +188,8 @@ private:
|
||||
/**
|
||||
* Friend to Conduit records the channelGetActionWhenMonitorPolicy in hash table
|
||||
*/
|
||||
struct change_channelGetActionWhenMonitorPolicy {
|
||||
struct change_channelGetActionWhenMonitorPolicy
|
||||
{
|
||||
change_channelGetActionWhenMonitorPolicy (
|
||||
const ChannelGetActionWhenMonitorPolicy & new_channelGetActionWhenMonitorPolicy):
|
||||
new_channelGetActionWhenMonitorPolicy(new_channelGetActionWhenMonitorPolicy) {}
|
||||
@@ -191,7 +207,8 @@ private:
|
||||
/**
|
||||
* Friend to Conduit records the channelGetCacheWaitPolicy in hash table
|
||||
*/
|
||||
struct change_channelGetCacheWaitPolicy {
|
||||
struct change_channelGetCacheWaitPolicy
|
||||
{
|
||||
change_channelGetCacheWaitPolicy (
|
||||
const ChannelGetCacheWaitPolicy & new_channelGetCacheWaitPolicy):
|
||||
new_channelGetCacheWaitPolicy(new_channelGetCacheWaitPolicy) {}
|
||||
@@ -212,7 +229,8 @@ private:
|
||||
/**
|
||||
* Friend to Conduit permitting hasNewData flag to be set in hash table
|
||||
*/
|
||||
struct change_hasNewData {
|
||||
struct change_hasNewData
|
||||
{
|
||||
change_hasNewData (const bool & new_hasNewData): new_hasNewData(new_hasNewData) {}
|
||||
|
||||
void operator() (Conduit& c)
|
||||
@@ -229,7 +247,8 @@ private:
|
||||
/**
|
||||
* Friend to Conduit/CAFEGroup records the channelRegalia class members in hash table
|
||||
*/
|
||||
struct change_channelRegalia {
|
||||
struct change_channelRegalia
|
||||
{
|
||||
change_channelRegalia (const ChannelRegalia & new_channelRegalia): new_channelRegalia(new_channelRegalia) {}
|
||||
|
||||
void operator() (Conduit& c)
|
||||
@@ -245,7 +264,8 @@ private:
|
||||
/**
|
||||
* Friend to Conduit records the channelRequestDataTypePolicy in hash table
|
||||
*/
|
||||
struct change_channelRequestDataTypePolicy {
|
||||
struct change_channelRequestDataTypePolicy
|
||||
{
|
||||
change_channelRequestDataTypePolicy (
|
||||
const ChannelRequestDataTypePolicy & new_channelRequestDataTypePolicy):
|
||||
new_channelRequestDataTypePolicy(new_channelRequestDataTypePolicy) {}
|
||||
@@ -264,7 +284,8 @@ private:
|
||||
/**
|
||||
* Friend to Conduit records the channelRequestMetaCtrl in hash table
|
||||
*/
|
||||
struct change_channelRequestMetaCtrl {
|
||||
struct change_channelRequestMetaCtrl
|
||||
{
|
||||
change_channelRequestMetaCtrl (const ChannelRequestMetaData & new_channelData):
|
||||
new_channelData(new_channelData) {}
|
||||
|
||||
@@ -282,7 +303,8 @@ private:
|
||||
/**
|
||||
* Friend to Conduit records the channelRequestMetaCtrlClient in hash table
|
||||
*/
|
||||
struct change_channelRequestMetaCtrlClient {
|
||||
struct change_channelRequestMetaCtrlClient
|
||||
{
|
||||
change_channelRequestMetaCtrlClient (const ChannelRequestMetaDataClient & new_channelData):
|
||||
new_channelData(new_channelData) {}
|
||||
|
||||
@@ -303,7 +325,8 @@ private:
|
||||
/**
|
||||
* Friend to Conduit records the channelRequestMetaData in hash table
|
||||
*/
|
||||
struct change_channelRequestMetaData {
|
||||
struct change_channelRequestMetaData
|
||||
{
|
||||
change_channelRequestMetaData (const ChannelRequestMetaData & new_channelData):
|
||||
new_channelData(new_channelData) {}
|
||||
|
||||
@@ -324,7 +347,8 @@ private:
|
||||
/**
|
||||
* Friend to Conduit records the channelRequestMetaDataClient in hash table
|
||||
*/
|
||||
struct change_channelRequestMetaDataClient {
|
||||
struct change_channelRequestMetaDataClient
|
||||
{
|
||||
change_channelRequestMetaDataClient (const ChannelRequestMetaDataClient & new_channelData):
|
||||
new_channelData(new_channelData) {}
|
||||
|
||||
@@ -343,7 +367,8 @@ private:
|
||||
/**
|
||||
* Friend to Conduit records the channelRequestMetaPrimitive in hash table
|
||||
*/
|
||||
struct change_channelRequestMetaPrimitive {
|
||||
struct change_channelRequestMetaPrimitive
|
||||
{
|
||||
change_channelRequestMetaPrimitive (const ChannelRequestMetaData & new_channelData):
|
||||
new_channelData(new_channelData) {}
|
||||
|
||||
@@ -360,7 +385,8 @@ private:
|
||||
/**
|
||||
* Friend to Conduit records the channelRequestPolicyGet in hash table
|
||||
*/
|
||||
struct change_channelRequestPolicyGet {
|
||||
struct change_channelRequestPolicyGet
|
||||
{
|
||||
change_channelRequestPolicyGet (const ChannelRequestPolicy & new_ChannelRequestPolicy):
|
||||
new_ChannelRequestPolicy(new_ChannelRequestPolicy) {}
|
||||
|
||||
@@ -377,7 +403,8 @@ private:
|
||||
/**
|
||||
* Friend to Conduit records the channelRequestPolicyGetCtrl in hash table
|
||||
*/
|
||||
struct change_channelRequestPolicyGetCtrl {
|
||||
struct change_channelRequestPolicyGetCtrl
|
||||
{
|
||||
change_channelRequestPolicyGetCtrl (const ChannelRequestPolicy & new_ChannelRequestPolicy):
|
||||
new_ChannelRequestPolicy(new_ChannelRequestPolicy) {}
|
||||
|
||||
@@ -395,7 +422,8 @@ private:
|
||||
/**
|
||||
* Friend to Conduit records the channelRequestPolicyPut in hash table
|
||||
*/
|
||||
struct change_channelRequestPolicyPut {
|
||||
struct change_channelRequestPolicyPut
|
||||
{
|
||||
change_channelRequestPolicyPut (const ChannelRequestPolicy & new_ChannelRequestPolicy):
|
||||
new_ChannelRequestPolicy(new_ChannelRequestPolicy) {}
|
||||
|
||||
@@ -414,7 +442,8 @@ private:
|
||||
/**
|
||||
* Friend to Conduit records the channelRequestStatusGet in hash table
|
||||
*/
|
||||
struct change_channelRequestStatusGet {
|
||||
struct change_channelRequestStatusGet
|
||||
{
|
||||
change_channelRequestStatusGet (const ChannelRequestStatus & new_ChannelRequestStatus):
|
||||
new_ChannelRequestStatus(new_ChannelRequestStatus) {}
|
||||
|
||||
@@ -434,7 +463,8 @@ private:
|
||||
/**
|
||||
* Friend to Conduit records the channelRequestStatusGetCtrl in hash table
|
||||
*/
|
||||
struct change_channelRequestStatusGetCtrl {
|
||||
struct change_channelRequestStatusGetCtrl
|
||||
{
|
||||
change_channelRequestStatusGetCtrl (const ChannelRequestStatus & new_ChannelRequestStatus):
|
||||
new_ChannelRequestStatus(new_ChannelRequestStatus) {}
|
||||
|
||||
@@ -451,7 +481,8 @@ private:
|
||||
/**
|
||||
* Friend to Conduit records the channelRequestStatusGetSTSACK in hash table
|
||||
*/
|
||||
struct change_channelRequestStatusGetSTSACK {
|
||||
struct change_channelRequestStatusGetSTSACK
|
||||
{
|
||||
change_channelRequestStatusGetSTSACK (const ChannelRequestStatus & new_ChannelRequestStatus):
|
||||
new_ChannelRequestStatus(new_ChannelRequestStatus) {}
|
||||
|
||||
@@ -469,7 +500,8 @@ private:
|
||||
/**
|
||||
* Friend to Conduit records the channelRequestStatusGetClassName in hash table
|
||||
*/
|
||||
struct change_channelRequestStatusGetClassName {
|
||||
struct change_channelRequestStatusGetClassName
|
||||
{
|
||||
change_channelRequestStatusGetClassName (const ChannelRequestStatus & new_ChannelRequestStatus):
|
||||
new_ChannelRequestStatus(new_ChannelRequestStatus) {}
|
||||
|
||||
@@ -486,7 +518,8 @@ private:
|
||||
/**
|
||||
* Friend to Conduit records the channelRequestStatusPut in hash table
|
||||
*/
|
||||
struct change_channelRequestStatusPut {
|
||||
struct change_channelRequestStatusPut
|
||||
{
|
||||
change_channelRequestStatusPut (const ChannelRequestStatus & new_ChannelRequestStatus):
|
||||
new_ChannelRequestStatus(new_ChannelRequestStatus) {}
|
||||
|
||||
@@ -505,7 +538,8 @@ private:
|
||||
/**
|
||||
* Friend to Conduit records the channelTimeoutPolicyGet in hash table
|
||||
*/
|
||||
struct change_channelTimeoutPolicyGet {
|
||||
struct change_channelTimeoutPolicyGet
|
||||
{
|
||||
change_channelTimeoutPolicyGet (const ChannelTimeoutPolicy & new_channelTimeoutPolicy):
|
||||
new_channelTimeoutPolicy(new_channelTimeoutPolicy) {}
|
||||
|
||||
@@ -522,7 +556,8 @@ private:
|
||||
/**
|
||||
* Friend to Conduit records the channelTimeoutPolicyPut in hash table
|
||||
*/
|
||||
struct change_channelTimeoutPolicyPut {
|
||||
struct change_channelTimeoutPolicyPut
|
||||
{
|
||||
change_channelTimeoutPolicyPut (const ChannelTimeoutPolicy & new_channelTimeoutPolicy):
|
||||
new_channelTimeoutPolicy(new_channelTimeoutPolicy) {}
|
||||
|
||||
@@ -540,31 +575,31 @@ private:
|
||||
/**
|
||||
* Friend to Conduit permitting pvdata to be entered in queue
|
||||
*/
|
||||
struct change_dequePulseID {
|
||||
struct change_dequePulseID
|
||||
{
|
||||
change_dequePulseID (const PVDataHolder & new_pvd): new_pvd(new_pvd) {}
|
||||
|
||||
void operator() (Conduit& c)
|
||||
{
|
||||
|
||||
|
||||
|
||||
try {
|
||||
try
|
||||
{
|
||||
c.dequePulseID.push_back(new_pvd);
|
||||
|
||||
if (c.dequePulseID.size() > c.mapPulseIDBufferSize) {
|
||||
if (c.dequePulseID.size() > c.mapPulseIDBufferSize)
|
||||
{
|
||||
c.dequePulseID.pop_front();
|
||||
}
|
||||
|
||||
}
|
||||
catch (std::bad_alloc &e) {
|
||||
catch (std::bad_alloc &e)
|
||||
{
|
||||
|
||||
std::cout << "change_dequeuPulseID" << " //" << e.what() << std:: endl;
|
||||
std::cout << "Critical error in change_dequeuPulseID. Force Exit" << std::endl;
|
||||
std::cout << e.what() << std:: endl;
|
||||
exit(1);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
private:
|
||||
@@ -576,36 +611,41 @@ private:
|
||||
/**
|
||||
* Friend to Conduit permitting pulse_id/pvdata to be set in hash table
|
||||
*/
|
||||
struct change_mapPulseID {
|
||||
struct change_mapPulseID
|
||||
{
|
||||
change_mapPulseID (const PVDataHolder & new_pvd): new_pvd(new_pvd) {}
|
||||
|
||||
void operator() (Conduit& c)
|
||||
{
|
||||
|
||||
try {
|
||||
try
|
||||
{
|
||||
|
||||
//std::pair<unsigned long long, PVDataHolder> p = std::make_pair(new_pvd.getPulseID(), new_pvd);
|
||||
|
||||
//Check if make_pair is a success
|
||||
|
||||
c.mapPulseID.insert(std::make_pair(new_pvd.getPulseID(), new_pvd));
|
||||
|
||||
|
||||
if (c.mapPulseID.size() > c.mapPulseIDBufferSize) {
|
||||
if (c.mapPulseID.size() > c.mapPulseIDBufferSize)
|
||||
{
|
||||
|
||||
std::map<unsigned long long, PVDataHolder>::iterator pos=c.mapPulseID.begin();
|
||||
if (pos != c.mapPulseID.end()) {
|
||||
if (pos != c.mapPulseID.end())
|
||||
{
|
||||
c.mapPulseID.erase(pos);
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
std::cout << "ITERATOR NOT FOUND in change_mapPulseID" << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
catch (std::bad_alloc &e) {
|
||||
|
||||
std::cout << "change_mapPulseID" << " //" << e.what() << std:: endl;
|
||||
catch (std::bad_alloc &e)
|
||||
{
|
||||
std::cout << "Critical error in change_mapPulseID. Force Exit" << std::endl;
|
||||
std::cout << e.what() << std:: endl;
|
||||
exit(1);
|
||||
|
||||
}
|
||||
@@ -617,26 +657,29 @@ private:
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Friend to Conduit permitting size of map<pulseID, pvdata> size to be set;
|
||||
* if new buffer size if smaller than previous, then erase excess elements
|
||||
*/
|
||||
struct change_mapPulseIDBufferSize {
|
||||
struct change_mapPulseIDBufferSize
|
||||
{
|
||||
change_mapPulseIDBufferSize (const unsigned short & new_mapPulseIDBufferSize): new_mapPulseIDBufferSize(new_mapPulseIDBufferSize) {}
|
||||
|
||||
void operator() (Conduit& c)
|
||||
{
|
||||
ipos=0;
|
||||
if (c.mapPulseIDBufferSize > new_mapPulseIDBufferSize) {
|
||||
if (c.mapPulseIDBufferSize > new_mapPulseIDBufferSize)
|
||||
{
|
||||
std::map<unsigned long long, PVDataHolder>::iterator pos;
|
||||
for (pos=c.mapPulseID.begin(); pos != c.mapPulseID.end();) {
|
||||
for (pos=c.mapPulseID.begin(); pos != c.mapPulseID.end();)
|
||||
{
|
||||
++ipos;
|
||||
if (ipos > new_mapPulseIDBufferSize) {
|
||||
if (ipos > new_mapPulseIDBufferSize)
|
||||
{
|
||||
c.mapPulseID.erase(pos++);
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
++pos;
|
||||
}
|
||||
}
|
||||
@@ -654,7 +697,8 @@ private:
|
||||
* Friend to Conduit permitting fast modification to std::vector<std::string> monitorAction
|
||||
* (for CAFE Extensions)
|
||||
*/
|
||||
struct change_monitorAction {
|
||||
struct change_monitorAction
|
||||
{
|
||||
change_monitorAction (std::string &new_monitorAction): new_monitorAction(new_monitorAction) {}
|
||||
|
||||
void operator() (Conduit& c)
|
||||
@@ -671,7 +715,8 @@ private:
|
||||
* Friend to Conduit permitting fast removal of all elements in std::vector<std::string> monitorAction
|
||||
* (for CAFE Extensions)
|
||||
*/
|
||||
struct change_monitorActionClear {
|
||||
struct change_monitorActionClear
|
||||
{
|
||||
change_monitorActionClear () {}
|
||||
|
||||
void operator() (Conduit& c)
|
||||
@@ -687,7 +732,8 @@ struct change_monitorActionClear {
|
||||
* Friend to Conduit permitting fast removal of an entry in std::vector<std::string> monitorAction
|
||||
* (for CAFE Extensions)
|
||||
*/
|
||||
struct change_monitorActionErase {
|
||||
struct change_monitorActionErase
|
||||
{
|
||||
change_monitorActionErase (std::string &new_monitorAction): new_monitorAction(new_monitorAction) {}
|
||||
|
||||
void operator() (Conduit& c)
|
||||
@@ -696,17 +742,21 @@ struct change_monitorActionErase {
|
||||
std::vector<std::string>::iterator it;
|
||||
|
||||
|
||||
for (it = c.monitorAction.begin(); it != c.monitorAction.end(); ) {
|
||||
if( (*it)==new_monitorAction) {
|
||||
for (it = c.monitorAction.begin(); it != c.monitorAction.end(); )
|
||||
{
|
||||
if( (*it)==new_monitorAction)
|
||||
{
|
||||
it = c.monitorAction.erase(it);
|
||||
maFound=true;
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
++it;
|
||||
}
|
||||
}
|
||||
|
||||
if (!maFound) {
|
||||
if (!maFound)
|
||||
{
|
||||
std::cout << "monitorAction " << new_monitorAction << " NOT FOUND! " << std::endl;
|
||||
std::cout << "Could not delete entry!" << std::endl;
|
||||
}
|
||||
@@ -717,40 +767,93 @@ private:
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Friend to Conduit permitting fast removal of an entry in the monitorPolicy vector
|
||||
* Friend to Conduit permitting fast modification to monitorPolicy parameters
|
||||
*
|
||||
*/
|
||||
struct change_monitorPolicyErase {
|
||||
change_monitorPolicyErase (unsigned int & new_evid): new_evid(new_evid) {}
|
||||
struct change_monitorPolicy
|
||||
{
|
||||
change_monitorPolicy (class MonitorPolicy & new_monitorPolicy): new_monitorPolicy(new_monitorPolicy) {}
|
||||
|
||||
void operator() (Conduit& c)
|
||||
{
|
||||
|
||||
bool evidFound=false;
|
||||
std::vector<MonitorPolicy>::iterator it;
|
||||
bool mpidFound=false;
|
||||
|
||||
//Iterate
|
||||
for (it = c.mpV.begin(); it != c.mpV.end();) {
|
||||
for (size_t i=0; i < c.mpV.size(); ++i)
|
||||
{
|
||||
//std::cout << "ID " << (*it).getID() << " " << std::endl;
|
||||
|
||||
if ( (*it).getID()==new_evid) {
|
||||
evidFound=true;
|
||||
if (c.mpV[i].getID()==new_monitorPolicy.getID())
|
||||
{
|
||||
mpidFound=true;
|
||||
c.mpV[i] = new_monitorPolicy; //Must be a deep copy.
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (!mpidFound)
|
||||
{
|
||||
std::cout << "mpid " << new_monitorPolicy.getID() << " NOT FOUND! " << std::endl;
|
||||
std::cout << "Could not modify entry!" << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
class MonitorPolicy new_monitorPolicy;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Friend to Conduit permitting fast removal of an entry in the monitorPolicy vector
|
||||
*
|
||||
*/
|
||||
struct change_monitorPolicyErase
|
||||
{
|
||||
change_monitorPolicyErase (unsigned int & new_mpid): new_mpid(new_mpid) {}
|
||||
|
||||
void operator() (Conduit& c)
|
||||
{
|
||||
|
||||
bool mpidFound=false;
|
||||
std::vector<MonitorPolicy>::iterator it;
|
||||
//Iterate
|
||||
for (it = c.mpV.begin(); it != c.mpV.end();)
|
||||
{
|
||||
//std::cout << "ID " << (*it).getID() << " " << std::endl;
|
||||
|
||||
if ( (*it).getID()==new_mpid)
|
||||
{
|
||||
mpidFound=true;
|
||||
it=(c.mpV).erase(it);
|
||||
break;
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
++it;
|
||||
}
|
||||
}
|
||||
|
||||
if (!evidFound) {
|
||||
std::cout << "evid " << new_evid << " NOT FOUND! " << std::endl;
|
||||
if (!mpidFound)
|
||||
{
|
||||
std::cout << "mpid " << new_mpid << " NOT FOUND! " << std::endl;
|
||||
std::cout << "Could not delete entry!" << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
unsigned int new_evid;
|
||||
unsigned int new_mpid;
|
||||
};
|
||||
|
||||
|
||||
@@ -760,22 +863,22 @@ private:
|
||||
* Friend to Conduit permitting fast insertion into the monitorPolicy vector
|
||||
*
|
||||
*/
|
||||
struct change_monitorPolicyInsert {
|
||||
struct change_monitorPolicyInsert
|
||||
{
|
||||
change_monitorPolicyInsert (class MonitorPolicy & new_monitorPolicy): new_monitorPolicy(new_monitorPolicy) {}
|
||||
|
||||
void operator() (Conduit& c)
|
||||
{
|
||||
|
||||
|
||||
//insert into mpV
|
||||
(c.mpV).push_back(new_monitorPolicy);
|
||||
|
||||
if (c.mpV.size()>(MAX_NO_MONITORS_PER_CHANNEL/2)) {
|
||||
if (c.mpV.size()>(MAX_NO_MONITORS_PER_CHANNEL/2))
|
||||
{
|
||||
std::cout << "HEY DUDE - YOU NOW HAVE " << c.mpV.size() << " MONITORS " << std::endl;
|
||||
std::cout << "for channel " << c.pv << " with handle " << c.handle << std::endl;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
private:
|
||||
@@ -788,32 +891,36 @@ private:
|
||||
* Friend to Conduit permitting fast removal of an entry in the monitorPolicyInWaiting vector
|
||||
*
|
||||
*/
|
||||
struct change_monitorPolicyInWaitingErase {
|
||||
change_monitorPolicyInWaitingErase (unsigned int & new_evid): new_evid(new_evid) {}
|
||||
struct change_monitorPolicyInWaitingErase
|
||||
{
|
||||
change_monitorPolicyInWaitingErase (unsigned int & new_mpid): new_mpid(new_mpid) {}
|
||||
|
||||
void operator() (Conduit& c)
|
||||
{
|
||||
|
||||
bool evidFound=false;
|
||||
bool mpidFound=false;
|
||||
std::vector<MonitorPolicy>::iterator it;
|
||||
//Iterate
|
||||
for (it = c.mpInWaitingV.begin(); it != c.mpInWaitingV.end(); ++it) {
|
||||
for (it = c.mpInWaitingV.begin(); it != c.mpInWaitingV.end(); ++it)
|
||||
{
|
||||
|
||||
if ( (*it).getID()==new_evid) {
|
||||
evidFound=true;
|
||||
if ( (*it).getID()==new_mpid)
|
||||
{
|
||||
mpidFound=true;
|
||||
(c.mpInWaitingV).erase(it);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!evidFound) {
|
||||
std::cout << "evid " << new_evid << " NOT FOUND! " << std::endl;
|
||||
if (!mpidFound)
|
||||
{
|
||||
std::cout << "mpid " << new_mpid << " NOT FOUND! " << std::endl;
|
||||
std::cout << "Could not delete entry!" << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
unsigned int new_evid;
|
||||
unsigned int new_mpid;
|
||||
};
|
||||
|
||||
|
||||
@@ -822,7 +929,8 @@ private:
|
||||
* Friend to Conduit permitting fast insertion into the monitorPolicyInWaiting vector
|
||||
*
|
||||
*/
|
||||
struct change_monitorPolicyInWaitingInsert {
|
||||
struct change_monitorPolicyInWaitingInsert
|
||||
{
|
||||
change_monitorPolicyInWaitingInsert (class MonitorPolicy & new_monitorPolicy): new_monitorPolicy(new_monitorPolicy) {}
|
||||
|
||||
void operator() (Conduit& c)
|
||||
@@ -831,7 +939,8 @@ struct change_monitorPolicyInWaitingInsert {
|
||||
//insert into mpnWaitingV
|
||||
(c.mpInWaitingV).push_back(new_monitorPolicy);
|
||||
|
||||
if (c.mpInWaitingV.size()>6) {
|
||||
if (c.mpInWaitingV.size()>4)
|
||||
{
|
||||
std::cout << "HEY DUDE - YOU NOW HAVE " << c.mpInWaitingV.size()
|
||||
<< " MONITORS IN WAITING" << std::endl;
|
||||
std::cout << "for channel " << c.pv << " with handle " << c.handle << std::endl;
|
||||
@@ -846,13 +955,11 @@ private:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Friend to Conduit/CAFEGroup permitting fast modification to pvAlias in hash table
|
||||
*/
|
||||
struct change_pvAlias {
|
||||
struct change_pvAlias
|
||||
{
|
||||
change_pvAlias (const char * & new_pvAlias): new_pvAlias(new_pvAlias) {}
|
||||
|
||||
void operator() (Conduit& c)
|
||||
@@ -870,6 +977,88 @@ private:
|
||||
|
||||
|
||||
|
||||
#if HAVE_PYTHON_H
|
||||
|
||||
/**
|
||||
* Friend to Conduit permitting fast modification to pyGetCallbackFn in hash table
|
||||
*/
|
||||
struct change_pyGetCallbackFn
|
||||
{
|
||||
change_pyGetCallbackFn (void * & new_pyGetCallbackFn): new_pyGetCallbackFn(new_pyGetCallbackFn) {}
|
||||
|
||||
void operator() (Conduit& c)
|
||||
{
|
||||
c.pyGetCallbackFn = new_pyGetCallbackFn;
|
||||
}
|
||||
|
||||
private:
|
||||
void * new_pyGetCallbackFn;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Friend to Conduit permitting fast modification to pyPutCallbackFn in hash table
|
||||
*/
|
||||
struct change_pyPutCallbackFn
|
||||
{
|
||||
change_pyPutCallbackFn (void * & new_pyPutCallbackFn): new_pyPutCallbackFn(new_pyPutCallbackFn) {}
|
||||
|
||||
void operator() (Conduit& c)
|
||||
{
|
||||
c.pyPutCallbackFn = new_pyPutCallbackFn;
|
||||
}
|
||||
|
||||
private:
|
||||
void * new_pyPutCallbackFn;
|
||||
};
|
||||
|
||||
/**
|
||||
* Friend to Conduit permitting fast modification to pyConnectCallbackFn in hash table
|
||||
*/
|
||||
struct change_pyConnectCallbackFn
|
||||
{
|
||||
change_pyConnectCallbackFn (void * & new_pyConnectCallbackFn): new_pyConnectCallbackFn(new_pyConnectCallbackFn) {}
|
||||
|
||||
void operator() (Conduit& c)
|
||||
{
|
||||
|
||||
//c.pyConnectCallbackFn = new_pyConnectCallbackFn;
|
||||
//insert into mpV
|
||||
(c.pyConnectCallbackVector).push_back(new_pyConnectCallbackFn);
|
||||
|
||||
//for (unsigned int i=0; i < c.pyConnectCallbackVector.size(); ++i) {
|
||||
// std::cout << "change_pyConnectCallbackFn: " << i << " " << c.pyConnectCallbackVector[i] << std::endl;
|
||||
//}
|
||||
|
||||
}
|
||||
|
||||
private:
|
||||
void * new_pyConnectCallbackFn;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Friend to Conduit permitting fast modification to pyOpenCallbackFlag in hash table
|
||||
*/
|
||||
struct change_pyOpenCallbackFlag
|
||||
{
|
||||
change_pyOpenCallbackFlag (bool & new_pyOpenCallbackFlag): new_pyOpenCallbackFlag(new_pyOpenCallbackFlag) {}
|
||||
|
||||
void operator() (Conduit& c)
|
||||
{
|
||||
c.pyOpenCallbackFlag = new_pyOpenCallbackFlag;
|
||||
|
||||
}
|
||||
|
||||
private:
|
||||
bool new_pyOpenCallbackFlag;
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Friend to Conduit permitting pyCafeFlag flag to be set in hash table
|
||||
*
|
||||
@@ -888,7 +1077,8 @@ private:
|
||||
/**
|
||||
* Friend to Conduit/CAFEGroup permitting fast modification to the status as given by the last method invocation
|
||||
*/
|
||||
struct change_status {
|
||||
struct change_status
|
||||
{
|
||||
change_status (const int & new_status): new_status(new_status) {}
|
||||
void operator() (Conduit& c)
|
||||
{
|
||||
@@ -906,52 +1096,159 @@ private:
|
||||
/**
|
||||
* Friend to Conduit permitting associated alarm Severity levels together with channel description to be entered into container
|
||||
*/
|
||||
struct change_supplementHandle {
|
||||
struct change_supplementHandle
|
||||
{
|
||||
change_supplementHandle (const alarmSeverityStruct & new_alarmSeverity, const std::string & new_desc): new_alarmSeverity(new_alarmSeverity), new_desc(new_desc) {}
|
||||
|
||||
void operator() (Conduit& c)
|
||||
{
|
||||
|
||||
c.aSevStruct.hhsv=new_alarmSeverity.hhsv;
|
||||
c.aSevStruct.hsv=new_alarmSeverity.hsv;
|
||||
c.aSevStruct.lsv=new_alarmSeverity.lsv;
|
||||
c.aSevStruct.llsv=new_alarmSeverity.llsv;
|
||||
c.desc=new_desc;
|
||||
c.hasDesc=true;
|
||||
c.hasAlarmSevStruct=true;
|
||||
|
||||
c.aSevStruct.hhsv=new_alarmSeverity.hhsv;
|
||||
c.aSevStruct.hsv=new_alarmSeverity.hsv;
|
||||
c.aSevStruct.lsv=new_alarmSeverity.lsv;
|
||||
c.aSevStruct.llsv=new_alarmSeverity.llsv;
|
||||
c.desc=new_desc;
|
||||
c.hasDesc=true;
|
||||
c.hasAlarmSevStruct=true;
|
||||
|
||||
}
|
||||
|
||||
private:
|
||||
alarmSeverityStruct new_alarmSeverity;
|
||||
std::string new_desc;
|
||||
std::string new_desc;
|
||||
};
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Friend to Conduit permitting associated alarm Severity levels together with channel description to be entered into container
|
||||
*/
|
||||
struct change_supplementAlarmSeverity
|
||||
{
|
||||
change_supplementAlarmSeverity (const alarmSeverityStruct & new_alarmSeverity): new_alarmSeverity(new_alarmSeverity) {}
|
||||
|
||||
void operator() (Conduit& c)
|
||||
{
|
||||
|
||||
c.aSevStruct.hhsv=new_alarmSeverity.hhsv;
|
||||
c.aSevStruct.hsv=new_alarmSeverity.hsv;
|
||||
c.aSevStruct.lsv=new_alarmSeverity.lsv;
|
||||
c.aSevStruct.llsv=new_alarmSeverity.llsv;
|
||||
c.hasAlarmSevStruct=true;
|
||||
|
||||
}
|
||||
|
||||
private:
|
||||
alarmSeverityStruct new_alarmSeverity;
|
||||
};
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Friend to Conduit permitting associated alarm channel description to be entered into container
|
||||
*/
|
||||
struct change_supplementDescription
|
||||
{
|
||||
change_supplementDescription (const std::string & new_desc): new_desc(new_desc) {}
|
||||
|
||||
void operator() (Conduit& c)
|
||||
{
|
||||
c.desc=new_desc;
|
||||
c.hasDesc=true;
|
||||
}
|
||||
|
||||
private:
|
||||
std::string new_desc;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Friend to Conduit/CAFEGroup permitting fast modification to the usrArgs as given by the last method invocation
|
||||
*/
|
||||
struct change_usrArgs {
|
||||
struct change_usrArgs
|
||||
{
|
||||
change_usrArgs (const unsigned int & new_usrArgs): new_usrArgs(new_usrArgs) {}
|
||||
void operator() (Conduit& c)
|
||||
{
|
||||
c.usrArgs = (void *) (unsigned long) new_usrArgs; // APRIL2018 - added to remove C++11 compiler warning
|
||||
}
|
||||
|
||||
|
||||
private:
|
||||
unsigned int new_usrArgs;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* friend to Conduit/CAFEGroup permitting the groupHandle to which the channel belongs to be recorded in hash table
|
||||
* Friend to Conduit permitting fast removal of an entry in the widgetV vector
|
||||
*
|
||||
*/
|
||||
struct change_groupHandle {
|
||||
struct change_widgetErase
|
||||
{
|
||||
change_widgetErase (void * & new_widget): new_widget(new_widget) {}
|
||||
|
||||
void operator() (Conduit& c)
|
||||
{
|
||||
|
||||
bool widgetFound=false;
|
||||
std::vector<void *>::iterator it;
|
||||
//Iterate
|
||||
for (it = c.widgetV.begin(); it != c.widgetV.end(); ++it)
|
||||
{
|
||||
if ( (*it)==new_widget)
|
||||
{
|
||||
widgetFound=true;
|
||||
(c.widgetV).erase(it);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!widgetFound)
|
||||
{
|
||||
std::cout << "widget " << new_widget << " NOT FOUND! " << std::endl;
|
||||
std::cout << "Could not delete entry from std::vector widgetV!" << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
void * new_widget;
|
||||
};
|
||||
|
||||
/**
|
||||
* Friend to Conduit permitting fast insertion into the monitorPolicyInWaiting vector
|
||||
*
|
||||
*/
|
||||
struct change_widgetInsert
|
||||
{
|
||||
change_widgetInsert (void * & new_widget): new_widget(new_widget) {}
|
||||
|
||||
void operator() (Conduit& c)
|
||||
{
|
||||
|
||||
//insert into widgetV
|
||||
(c.widgetV).push_back((void *)new_widget);
|
||||
/*
|
||||
std::vector<void *>::iterator it;
|
||||
//Iterate
|
||||
for (it = c.widgetV.begin(); it != c.widgetV.end(); ++it) {
|
||||
|
||||
std::cout << "widget in change " << (*it) << std::endl;
|
||||
|
||||
}
|
||||
*/
|
||||
|
||||
}
|
||||
|
||||
private:
|
||||
void * new_widget;
|
||||
};
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* friend to Conduit/CAFEgroup permitting the groupHandle to which the channel belongs to be recorded in hash table
|
||||
*/
|
||||
struct change_groupHandle
|
||||
{
|
||||
change_groupHandle (const unsigned int & new_groupHandle): new_groupHandle(new_groupHandle) {}
|
||||
|
||||
void operator() (Conduit& c)
|
||||
|
||||
@@ -24,7 +24,8 @@
|
||||
* \param _memberCC CAFEConduit object representing each group member
|
||||
* \param _groupStatus groupStatus: error indicates >0 members have an error
|
||||
*/
|
||||
class ConduitGroup {
|
||||
class ConduitGroup
|
||||
{
|
||||
friend struct change_channelTimeoutPolicySGPut;
|
||||
friend struct change_channelTimeoutPolicySGGet;
|
||||
friend struct change_timeout_sg_pend_io;
|
||||
@@ -122,7 +123,8 @@ public:
|
||||
* Friend to ConduitGroup permitting fast modification of the rule in group hash table;
|
||||
* the rule flag only functions within a PVGroup
|
||||
*/
|
||||
struct change_sg_rule {
|
||||
struct change_sg_rule
|
||||
{
|
||||
change_sg_rule (const bool & new_rule, const unsigned int & iMember):
|
||||
new_rule(new_rule),iMember(iMember) {}
|
||||
|
||||
@@ -140,7 +142,8 @@ private:
|
||||
/**
|
||||
* Friend to ConduitGroup permitting fast modification of status in group hash table;
|
||||
*/
|
||||
struct change_sg_status {
|
||||
struct change_sg_status
|
||||
{
|
||||
change_sg_status (const int & new_status, const unsigned int & iMember):
|
||||
new_status(new_status),iMember(iMember) {}
|
||||
|
||||
@@ -158,7 +161,8 @@ private:
|
||||
* friend to ConduitGroup permitting fast modification to \n
|
||||
* the timeout_sg_pend_event period recorded in ConduitGroup hash table
|
||||
*/
|
||||
struct change_timeout_sg_pend_io {
|
||||
struct change_timeout_sg_pend_io
|
||||
{
|
||||
change_timeout_sg_pend_io (const double & new_timeout_sg_pend_io):
|
||||
new_timeout_sg_pend_io(new_timeout_sg_pend_io) {}
|
||||
void operator() (ConduitGroup& g)
|
||||
@@ -174,7 +178,8 @@ private:
|
||||
/**
|
||||
* Friend to ConduitGroup records the channelTimeoutPolicySGGet in hash table
|
||||
*/
|
||||
struct change_channelTimeoutPolicySGGet {
|
||||
struct change_channelTimeoutPolicySGGet
|
||||
{
|
||||
change_channelTimeoutPolicySGGet (const ChannelTimeoutPolicy & new_channelTimeoutPolicy):
|
||||
new_channelTimeoutPolicy(new_channelTimeoutPolicy) {}
|
||||
|
||||
@@ -191,7 +196,8 @@ private:
|
||||
/**
|
||||
* Friend to ConduitGroup records the channelTimeoutPolicySGPut in hash table
|
||||
*/
|
||||
struct change_channelTimeoutPolicySGPut {
|
||||
struct change_channelTimeoutPolicySGPut
|
||||
{
|
||||
change_channelTimeoutPolicySGPut (const ChannelTimeoutPolicy & new_channelTimeoutPolicy):
|
||||
new_channelTimeoutPolicy(new_channelTimeoutPolicy) {}
|
||||
|
||||
|
||||
177
include/config.h
Normal file
177
include/config.h
Normal file
@@ -0,0 +1,177 @@
|
||||
/* ./include/config.h. Generated from config.in by configure. */
|
||||
/* ./include/config.in. Generated from configure.ac by autoheader. */
|
||||
|
||||
/* epics major release */
|
||||
#define EPICS_MAJOR 7
|
||||
|
||||
/* epics minor release */
|
||||
#define EPICS_MINOR 4
|
||||
|
||||
/* epics patch release */
|
||||
#define EPICS_PATCH 1
|
||||
|
||||
/* Availability of boost */
|
||||
#define HAVE_BOOST 1
|
||||
|
||||
/* boost thread library */
|
||||
/* #undef HAVE_BOOST_THREAD */
|
||||
|
||||
/* Define to 1 if you have the <cadef.h> header file. */
|
||||
#define HAVE_CADEF_H 1
|
||||
|
||||
/* Availability of curl */
|
||||
/* #undef HAVE_CURL */
|
||||
|
||||
/* Define to 1 if you have the <curl/curl.h> header file. */
|
||||
/* #undef HAVE_CURL_CURL_H */
|
||||
|
||||
/* Define to 1 if you have the <dlfcn.h> header file. */
|
||||
#define HAVE_DLFCN_H 1
|
||||
|
||||
/* epics version */
|
||||
#define HAVE_EPICS 7.4.1
|
||||
|
||||
/* Define to 1 if you have the <epicsTypes.h> header file. */
|
||||
#define HAVE_EPICSTYPES_H 1
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#define HAVE_INTTYPES_H 1
|
||||
|
||||
/* Availability of json */
|
||||
/* #undef HAVE_JSON */
|
||||
|
||||
/* Define to 1 if you have the <json/json.h> header file. */
|
||||
/* #undef HAVE_JSON_JSON_H */
|
||||
|
||||
/* Define to 1 if you have the `boost_thread' library (-lboost_thread). */
|
||||
/* #undef HAVE_LIBBOOST_THREAD */
|
||||
|
||||
/* Define to 1 if you have the `curl' library (-lcurl). */
|
||||
/* #undef HAVE_LIBCURL */
|
||||
|
||||
/* Define to 1 if you have the `json_linux-gcc-6.3.0_libmt' library
|
||||
(-ljson_linux-gcc-6.3.0_libmt). */
|
||||
/* #undef HAVE_LIBJSON_LINUX_GCC_6_3_0_LIBMT */
|
||||
|
||||
/* Define to 1 if you have the `lz4' library (-llz4). */
|
||||
/* #undef HAVE_LIBLZ4 */
|
||||
|
||||
/* Define to 1 if you have the `python3.10' library (-lpython3.10). */
|
||||
/* #undef HAVE_LIBPYTHON3_10 */
|
||||
|
||||
/* Define to 1 if you have the `python3.4m' library (-lpython3.4m). */
|
||||
/* #undef HAVE_LIBPYTHON3_4M */
|
||||
|
||||
/* Define to 1 if you have the `python3.5m' library (-lpython3.5m). */
|
||||
/* #undef HAVE_LIBPYTHON3_5M */
|
||||
|
||||
/* Define to 1 if you have the `python3.7m' library (-lpython3.7m). */
|
||||
/* #undef HAVE_LIBPYTHON3_7M */
|
||||
|
||||
/* Define to 1 if you have the `python3.8' library (-lpython3.8). */
|
||||
#define HAVE_LIBPYTHON3_8 1
|
||||
|
||||
/* Define to 1 if you have the `Qt5Core' library (-lQt5Core). */
|
||||
/* #undef HAVE_LIBQT5CORE */
|
||||
|
||||
/* Define to 1 if you have the `Qt5Xml' library (-lQt5Xml). */
|
||||
/* #undef HAVE_LIBQT5XML */
|
||||
|
||||
/* Define to 1 if you have the `QtCore' library (-lQtCore). */
|
||||
/* #undef HAVE_LIBQTCORE */
|
||||
|
||||
/* Availability of Qt version 5 confirmed */
|
||||
#define HAVE_LIBQTXML 1
|
||||
|
||||
/* Define to 1 if you have the `zmq' library (-lzmq). */
|
||||
/* #undef HAVE_LIBZMQ */
|
||||
|
||||
/* linux dependency (sleep) */
|
||||
#define HAVE_LINUX 1
|
||||
|
||||
/* Availability of LZ4 */
|
||||
/* #undef HAVE_LZ4 */
|
||||
|
||||
/* Define to 1 if you have the <lz4.h> header file. */
|
||||
/* #undef HAVE_LZ4_H */
|
||||
|
||||
/* Define to 1 if you have the <memory.h> header file. */
|
||||
#define HAVE_MEMORY_H 1
|
||||
|
||||
/* Define to 1 if you have the <multi_index_container.hpp> header file. */
|
||||
#define HAVE_MULTI_INDEX_CONTAINER_HPP 1
|
||||
|
||||
/* pycafe extern C */
|
||||
#define HAVE_PYCAFE_EXT 1
|
||||
|
||||
/* Availability of python */
|
||||
#define HAVE_PYTHON 1
|
||||
|
||||
/* Define to 1 if you have the <Python.h> header file. */
|
||||
#define HAVE_PYTHON_H 1
|
||||
|
||||
/* Availability of Qt version 5 confirmed */
|
||||
#define HAVE_QT 1
|
||||
|
||||
/* Define to 1 if you have the <qxml.h> header file. */
|
||||
#define HAVE_QXML_H 1
|
||||
|
||||
/* Define to 1 if you have the <stdint.h> header file. */
|
||||
#define HAVE_STDINT_H 1
|
||||
|
||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
#define HAVE_STDLIB_H 1
|
||||
|
||||
/* Define to 1 if you have the <strings.h> header file. */
|
||||
#define HAVE_STRINGS_H 1
|
||||
|
||||
/* Define to 1 if you have the <string.h> header file. */
|
||||
#define HAVE_STRING_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||
#define HAVE_SYS_STAT_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||
#define HAVE_SYS_TYPES_H 1
|
||||
|
||||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#define HAVE_UNISTD_H 1
|
||||
|
||||
/* Availability of zeromq */
|
||||
/* #undef HAVE_ZEROMQ */
|
||||
|
||||
/* Define to 1 if you have the <zmq.h> header file. */
|
||||
/* #undef HAVE_ZMQ_H */
|
||||
|
||||
/* Define to the sub-directory where libtool stores uninstalled libraries. */
|
||||
#define LT_OBJDIR ".libs/"
|
||||
|
||||
/* Name of package */
|
||||
#define PACKAGE "cafe"
|
||||
|
||||
/* Define to the address where bug reports for this package should be sent. */
|
||||
#define PACKAGE_BUGREPORT "Bug reports to: jan.chrin@psi.ch"
|
||||
|
||||
/* Define to the full name of this package. */
|
||||
#define PACKAGE_NAME "CAFE"
|
||||
|
||||
/* Define to the full name and version of this package. */
|
||||
#define PACKAGE_STRING "CAFE 1.19.0"
|
||||
|
||||
/* Define to the one symbol short name of this package. */
|
||||
#define PACKAGE_TARNAME "cafe"
|
||||
|
||||
/* Define to the home page for this package. */
|
||||
#define PACKAGE_URL ""
|
||||
|
||||
/* Define to the version of this package. */
|
||||
#define PACKAGE_VERSION "1.19.0"
|
||||
|
||||
/* Availability of Qt version 5 confirmed */
|
||||
#define QT_NO_VERSION_TAGGING 1
|
||||
|
||||
/* Define to 1 if you have the ANSI C header files. */
|
||||
#define STDC_HEADERS 1
|
||||
|
||||
/* Version number of package */
|
||||
#define VERSION "1.19.0"
|
||||
@@ -32,10 +32,10 @@
|
||||
#include <boost/chrono.hpp>
|
||||
#endif
|
||||
|
||||
#include <epicsVersion.h>
|
||||
|
||||
|
||||
|
||||
class Connect {
|
||||
class Connect
|
||||
{
|
||||
protected:
|
||||
int status;
|
||||
CAFEStatus cafeStatus;
|
||||
@@ -68,10 +68,9 @@ protected:
|
||||
static void callbackHandlerException (struct exception_handler_args args);
|
||||
|
||||
//connect.cpp
|
||||
//int createHandle(const char * pv, ca_client_context * ccc, ChannelRequestPolicy channelRequestPolicyPut, unsigned int &handle)
|
||||
int createChannel(unsigned int handle, const char * pv, chid &pCh);
|
||||
int createHandle(const char * pv, ca_client_context * ccc, unsigned int &handle)
|
||||
//int createHandle(const char * pv, ca_client_context * ccc, ChannelRequestPolicy channelRequestPolicyPut, unsigned int &handle)
|
||||
throw (CAFEException_pv);
|
||||
int createHandle(const char * pv, ca_client_context * ccc, unsigned int &handle) noexcept(false); // throw (CAFEException_pv);
|
||||
|
||||
int contextDestroy();
|
||||
int contextDestroy(ca_client_context * cctLocal);
|
||||
@@ -82,7 +81,7 @@ protected:
|
||||
|
||||
int createChannelWithinGroup(unsigned int handle, const char * pv, chid &pCh);
|
||||
int createHandleWithinGroup(const char * pv, ca_client_context * ccc, unsigned int & _handle)
|
||||
throw (CAFEException_pv);
|
||||
noexcept(false); //throw (CAFEException_pv);
|
||||
|
||||
public:
|
||||
|
||||
@@ -202,6 +201,14 @@ public:
|
||||
return ca_flush_io();
|
||||
}
|
||||
|
||||
std::string _ca_version(){
|
||||
return (std::string) ca_version();
|
||||
}
|
||||
|
||||
std::string _epics_version(){
|
||||
return (std::string) EPICS_VERSION_STRING;
|
||||
}
|
||||
|
||||
int _ca_flush_io()
|
||||
{
|
||||
return ca_flush_io();
|
||||
@@ -212,11 +219,26 @@ public:
|
||||
}
|
||||
int _ca_pend_io(double t)
|
||||
{
|
||||
return ca_pend_io(t);
|
||||
double _t=DEFAULT_TIMEOUT_PEND_IO;
|
||||
if (t<=0)
|
||||
{
|
||||
_t=0.4;
|
||||
std::cout << "Illegal timeout value: " << t << " for _ca_pend_io(timeout) "<< std::endl;
|
||||
std::cout << "Setting timeout to default value of " << _t << " seconds" << std::endl;
|
||||
|
||||
}
|
||||
return ca_pend_io(_t); //returns ECA_TIMEOUT if successful
|
||||
}
|
||||
int _ca_pend_event(double t)
|
||||
{
|
||||
return ca_pend_event(t);
|
||||
double _t=t;
|
||||
if (t<=0)
|
||||
{
|
||||
_t=DEFAULT_TIMEOUT_PEND_EVENT;
|
||||
std::cout << "Illegal timeout value: " << t << " for _ca_pend_event(timeout) "<< std::endl;
|
||||
std::cout << "Setting timeout to default vallue of " << _t << std::endl;
|
||||
}
|
||||
return ca_pend_event(_t); //returns ECA_TIMEOUT if successful
|
||||
}
|
||||
|
||||
//connect.cc
|
||||
@@ -224,48 +246,51 @@ public:
|
||||
{
|
||||
return pyCafeFlag=b;
|
||||
};
|
||||
|
||||
bool getPyCafe()
|
||||
{
|
||||
return pyCafeFlag;
|
||||
} ;
|
||||
int init() throw (CAFEException_init);
|
||||
int init(ca_preemptive_callback_select select) throw (CAFEException_init);
|
||||
};
|
||||
|
||||
int init() noexcept(false); // throw (CAFEException_init);
|
||||
int init(ca_preemptive_callback_select select) noexcept(false); // throw (CAFEException_init);
|
||||
|
||||
//std::string
|
||||
int open(const std::string pvS, unsigned int &handle) throw (CAFEException_open)
|
||||
int open(const std::string pvS, unsigned int &handle) noexcept(false) // throw (CAFEException_open)
|
||||
{
|
||||
|
||||
try {
|
||||
open (pvS.c_str(), handle);
|
||||
try
|
||||
{
|
||||
return open (pvS.c_str(), handle);
|
||||
}
|
||||
catch(CAFEException_open &e) {
|
||||
catch(CAFEException_open &e)
|
||||
{
|
||||
throw e;
|
||||
};
|
||||
}
|
||||
int open(const std::string pvS, const std::string pvAliasS, unsigned int &handle)
|
||||
throw (CAFEException_open)
|
||||
int open(const std::string pvS, const std::string pvAliasS, unsigned int &handle)
|
||||
noexcept(false) // throw (CAFEException_open)
|
||||
{
|
||||
try {
|
||||
open (pvS.c_str(), pvAliasS.c_str(), handle);
|
||||
try
|
||||
{
|
||||
return open (pvS.c_str(), pvAliasS.c_str(), handle);
|
||||
}
|
||||
catch(CAFEException_open &e) {
|
||||
catch(CAFEException_open &e)
|
||||
{
|
||||
throw e;
|
||||
};
|
||||
}
|
||||
int open(const std::string *pvArrayS, unsigned int *handleArray, const unsigned int nHandles)
|
||||
throw (CAFEException_open);
|
||||
int open(const std::string *pvArrayS, unsigned int *handleArray, const unsigned int nHandles) noexcept(false); // throw (CAFEException_open);
|
||||
|
||||
//const char *pv
|
||||
int open(const char *pv, unsigned int &handle) throw (CAFEException_open);
|
||||
int open(const char *pv, const char *pvAlias, unsigned int &handle)
|
||||
throw (CAFEException_open);
|
||||
int open(const char *pv, unsigned int &handle) noexcept(false); // throw (CAFEException_open);
|
||||
int open(const char *pv, const char *pvAlias, unsigned int &handle) noexcept(false); // throw (CAFEException_open);
|
||||
|
||||
int open(const char **pvArray, unsigned int *handleArray, const unsigned int nHandles)
|
||||
throw (CAFEException_open);
|
||||
int open(std::vector<const char *>, std::vector<unsigned int> &) throw (CAFEException_open);
|
||||
int open(std::vector<std::string>, std::vector<unsigned int> &) throw (CAFEException_open);
|
||||
noexcept(false); // throw (CAFEException_open);
|
||||
int open(std::vector<const char *>, std::vector<unsigned int> &) noexcept(false); // throw (CAFEException_open);
|
||||
int open(std::vector<std::string>, std::vector<unsigned int> &) noexcept(false); // throw (CAFEException_open);
|
||||
|
||||
int openV(std::vector<std::string> s, std::vector<unsigned int> &i) throw (CAFEException_open)
|
||||
int openV(std::vector<std::string> s, std::vector<unsigned int> &i) noexcept(false) // throw (CAFEException_open)
|
||||
{
|
||||
return open(s,i);
|
||||
};
|
||||
@@ -382,6 +407,10 @@ public:
|
||||
//Pends for a maximimum of timeout seconds
|
||||
void openNowAndWait(double _timeout);
|
||||
|
||||
//Pends for a maximimum of timeout seconds
|
||||
void openNowAndWaitHandles(unsigned int * handleArray, unsigned int nHandles, double _timeout);
|
||||
//Pends for a maximimum of timeout seconds
|
||||
void openNowAndWaitHandleV(std::vector<unsigned int> handleV, double _timeout);
|
||||
|
||||
//Pends for default amount of time
|
||||
void openNow()
|
||||
@@ -396,6 +425,24 @@ public:
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
//Pends for default amount of time
|
||||
void openNowHandles(unsigned int * handleArray, unsigned int nHandles)
|
||||
{
|
||||
openNowAndWaitHandles(handleArray, nHandles, channelOpenPolicy.getTimeout());
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
//Pends for default amount of time
|
||||
void openNowHandleV(std::vector<unsigned int> handleV)
|
||||
{
|
||||
openNowAndWaitHandleV(handleV, channelOpenPolicy.getTimeout());
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -406,6 +453,17 @@ public:
|
||||
|
||||
bool initCallbackComplete(unsigned int * hArray, unsigned int nelem);
|
||||
|
||||
bool initCallbackCompleteV(std::vector<unsigned int> hV)
|
||||
{
|
||||
return initCallbackComplete(&hV[0], hV.size());
|
||||
}
|
||||
|
||||
bool initCallbackCompleteHandle(unsigned int handle)
|
||||
{
|
||||
unsigned int hArray[1];
|
||||
hArray[0]=handle;
|
||||
return initCallbackComplete(hArray, 1);
|
||||
}
|
||||
|
||||
|
||||
//#################################################################################
|
||||
@@ -453,7 +511,7 @@ public:
|
||||
//return status;
|
||||
return closeChannels(&v[0], v.size());
|
||||
};
|
||||
|
||||
|
||||
|
||||
int close(unsigned int handle);
|
||||
int closeChannel(unsigned int handle)
|
||||
@@ -493,6 +551,29 @@ public:
|
||||
{
|
||||
return closeChannelsKeepHandles(&v[0], v.size());
|
||||
}
|
||||
int openChannelsWithHandles(unsigned int * handleArray, unsigned int nHandles);
|
||||
int openChannelsWithHandlesV(std::vector<unsigned int> v)
|
||||
{
|
||||
return openChannelsWithHandles(&v[0], v.size());
|
||||
}
|
||||
int openChannelsWithHandles (std::vector<unsigned int> v)
|
||||
{
|
||||
return openChannelsWithHandles(&v[0], v.size());
|
||||
}
|
||||
int reconnect(std::vector<unsigned int> v)
|
||||
{
|
||||
int status1 = closeChannelsKeepHandles(&v[0], v.size());
|
||||
|
||||
openPrepare();
|
||||
int status2 = openChannelsWithHandles(&v[0], v.size());
|
||||
openNowAndWaitHandles(&v[0], v.size(), channelOpenPolicy.getTimeout());
|
||||
|
||||
if (status1 > status2) {
|
||||
return status1;
|
||||
}
|
||||
return status2;
|
||||
}
|
||||
|
||||
|
||||
// Monitors
|
||||
int monitorStart(unsigned int handle, MonitorPolicy &mp);
|
||||
@@ -584,8 +665,10 @@ public:
|
||||
|
||||
bool isValid(unsigned int handle)
|
||||
{
|
||||
for (itcs = cs.begin(); itcs != cs.end(); ++itcs) {
|
||||
if ((*itcs).getHandle()==handle) {
|
||||
for (itcs = cs.begin(); itcs != cs.end(); ++itcs)
|
||||
{
|
||||
if ((*itcs).getHandle()==handle)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -594,8 +677,10 @@ public:
|
||||
|
||||
bool allChannelsConnected()
|
||||
{
|
||||
for (itcs = cs.begin(); itcs != cs.end(); ++itcs) {
|
||||
if (!(*itcs).isConnected()) {
|
||||
for (itcs = cs.begin(); itcs != cs.end(); ++itcs)
|
||||
{
|
||||
if (!(*itcs).isConnected())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -612,41 +697,47 @@ public:
|
||||
cafeConduit_set_by_handle & handle_index=cs.get<by_handle>();
|
||||
cafeConduit_set_by_handle::iterator it_handle;
|
||||
it_handle = handle_index.find(handle);
|
||||
if (it_handle != handle_index.end()) {
|
||||
if (it_handle != handle_index.end())
|
||||
{
|
||||
return (*it_handle).isConnected();
|
||||
}
|
||||
else {
|
||||
std::cout<< "Input handle " << handle << " does not exists! " << std::endl;
|
||||
else
|
||||
{
|
||||
std::cout<< "Input handle " << handle << " does not exist! " << std::endl;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
int getChannelInfo(unsigned int handle, ChannelRegalia & channelInfo)
|
||||
{
|
||||
cafeConduit_set_by_handle & handle_index=cs.get<by_handle>();
|
||||
cafeConduit_set_by_handle::iterator it_handle;
|
||||
it_handle = handle_index.find(handle);
|
||||
if (it_handle != handle_index.end()) {
|
||||
if (it_handle != handle_index.end())
|
||||
{
|
||||
channelInfo=(*it_handle).getChannelRegalia();
|
||||
return ICAFE_NORMAL;
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
return ECAFE_INVALID_HANDLE;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
chid getChannelID(unsigned int handle)
|
||||
{
|
||||
cafeConduit_set_by_handle & handle_index=cs.get<by_handle>();
|
||||
cafeConduit_set_by_handle::iterator it_handle;
|
||||
it_handle = handle_index.find(handle);
|
||||
if (it_handle != handle_index.end()) {
|
||||
if (it_handle != handle_index.end())
|
||||
{
|
||||
return (*it_handle).getChannelID();
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
std::cout<< "Input handle " << handle << " does not exists! " << std::endl;
|
||||
return NULL;
|
||||
}
|
||||
@@ -665,10 +756,12 @@ public:
|
||||
|
||||
int attachContext(ca_client_context *ccc)
|
||||
{
|
||||
if (ccc != NULL) {
|
||||
if (ccc != NULL)
|
||||
{
|
||||
return ca_attach_context(ccc);
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
return ECAFE_NULLCONTEXT;
|
||||
}
|
||||
}
|
||||
@@ -676,10 +769,12 @@ public:
|
||||
int attachContextByPVName(const char * pvname)
|
||||
{
|
||||
ca_client_context * ccc=getClientContext(pvname);
|
||||
if (ccc != NULL) {
|
||||
if (ccc != NULL)
|
||||
{
|
||||
return ca_attach_context(ccc);
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
return ECAFE_NULLCONTEXT;
|
||||
}
|
||||
}
|
||||
@@ -687,10 +782,12 @@ public:
|
||||
int attachContextByHandle(unsigned int handle)
|
||||
{
|
||||
ca_client_context * ccc=getClientContext(handle);
|
||||
if (ccc != NULL) {
|
||||
if (ccc != NULL)
|
||||
{
|
||||
return ca_attach_context(ccc);
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
return ECAFE_NULLCONTEXT;
|
||||
}
|
||||
}
|
||||
@@ -701,20 +798,25 @@ public:
|
||||
cafeConduit_set_by_handle & handle_index=cs.get<by_handle>();
|
||||
cafeConduit_set_by_handle::iterator it_handle;
|
||||
it_handle = handle_index.find(handle);
|
||||
if (it_handle != handle_index.end()) {
|
||||
if (it_handle != handle_index.end())
|
||||
{
|
||||
|
||||
if ( (*it_handle).getAccessRead() != ar ) {
|
||||
if(MUTEX) {
|
||||
if ( (*it_handle).getAccessRead() != ar )
|
||||
{
|
||||
if(MUTEX)
|
||||
{
|
||||
cafeMutex.lock();
|
||||
}
|
||||
handle_index.modify(it_handle, change_accessRead(ar));
|
||||
if(MUTEX) {
|
||||
if(MUTEX)
|
||||
{
|
||||
cafeMutex.unlock();
|
||||
}
|
||||
}
|
||||
return ICAFE_NORMAL;
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
std::cout<< "Input handle " << handle << " does not exists! " << std::endl;
|
||||
return ECAFE_INVALID_HANDLE;
|
||||
}
|
||||
@@ -725,19 +827,24 @@ public:
|
||||
cafeConduit_set_by_handle & handle_index=cs.get<by_handle>();
|
||||
cafeConduit_set_by_handle::iterator it_handle;
|
||||
it_handle = handle_index.find(handle);
|
||||
if (it_handle != handle_index.end()) {
|
||||
if ( (*it_handle).getAccessWrite() != aw ) {
|
||||
if(MUTEX) {
|
||||
if (it_handle != handle_index.end())
|
||||
{
|
||||
if ( (*it_handle).getAccessWrite() != aw )
|
||||
{
|
||||
if(MUTEX)
|
||||
{
|
||||
cafeMutex.lock();
|
||||
}
|
||||
handle_index.modify(it_handle, change_accessWrite(aw));
|
||||
if(MUTEX) {
|
||||
if(MUTEX)
|
||||
{
|
||||
cafeMutex.unlock();
|
||||
}
|
||||
}
|
||||
return ICAFE_NORMAL;
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
std::cout<< "Input handle " << handle << " does not exists! " << std::endl;
|
||||
return ECAFE_INVALID_HANDLE;
|
||||
}
|
||||
@@ -748,10 +855,12 @@ public:
|
||||
cafeConduit_set_by_handle & handle_index=cs.get<by_handle>();
|
||||
cafeConduit_set_by_handle::iterator it_handle;
|
||||
it_handle = handle_index.find(handle);
|
||||
if (it_handle != handle_index.end()) {
|
||||
if (it_handle != handle_index.end())
|
||||
{
|
||||
return (bool) (*it_handle).getAccessRead();
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
std::cout<< "Input handle " << handle << " does not exists! " << std::endl;
|
||||
return false;
|
||||
}
|
||||
@@ -762,10 +871,12 @@ public:
|
||||
cafeConduit_set_by_handle & handle_index=cs.get<by_handle>();
|
||||
cafeConduit_set_by_handle::iterator it_handle;
|
||||
it_handle = handle_index.find(handle);
|
||||
if (it_handle != handle_index.end()) {
|
||||
if (it_handle != handle_index.end())
|
||||
{
|
||||
return (bool) (*it_handle).getAccessWrite();
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
std::cout<< "Input handle " << handle << " does not exists! " << std::endl;
|
||||
return false;
|
||||
}
|
||||
@@ -794,7 +905,7 @@ public:
|
||||
int printStatus(std::vector<std::string> pvV, std::vector<int> statusV);
|
||||
int printStatusIfError(std::vector<std::string> pvV, std::vector<int> statusV);
|
||||
|
||||
int setPVAlias(unsigned int handle, const char * pv) throw (CAFEException_open);
|
||||
int setPVAlias(unsigned int handle, const char * pv) noexcept(false); // throw (CAFEException_open);
|
||||
|
||||
// GROUP FUNCTIONS
|
||||
|
||||
@@ -833,11 +944,27 @@ public:
|
||||
bool isGroup(const char *);
|
||||
bool isCollection(const char *);
|
||||
|
||||
int groupOpen(const char *pv, unsigned int &groupHandle) throw (CAFEException_groupOpen);
|
||||
int groupOpen(PVGroup &pvgroup, unsigned int &groupHandle) throw (CAFEException_groupOpen);
|
||||
int groupOpen(const char *pv, unsigned int &groupHandle) noexcept(false); // throw (CAFEException_groupOpen);
|
||||
int groupOpen(PVGroup &pvgroup, unsigned int &groupHandle) noexcept(false); // throw (CAFEException_groupOpen);
|
||||
|
||||
int groupOpenWithHandles(unsigned int groupHandle);
|
||||
|
||||
|
||||
int groupClose(unsigned int groupHandle, bool keepGroupName) {
|
||||
return Connect::groupClose(groupHandle, keepGroupName, false);
|
||||
}
|
||||
|
||||
int groupClose(unsigned int groupHandle)
|
||||
{
|
||||
return Connect::groupClose(groupHandle, false, false);
|
||||
};
|
||||
|
||||
int groupCloseKeepName(unsigned int groupHandle, bool keepGroupName) {
|
||||
return Connect::groupClose(groupHandle, keepGroupName, false);
|
||||
}
|
||||
|
||||
int groupClose(unsigned int groupHandle, bool keepGroupName, bool keepHandles);
|
||||
|
||||
int groupClose(unsigned int groupHandle);
|
||||
int groupClose();
|
||||
int groupCloseAll()
|
||||
{
|
||||
@@ -858,6 +985,9 @@ public:
|
||||
|
||||
std::vector<std::string> getFromGlobalChannelList(std::vector<std::string>);
|
||||
|
||||
int groupDefineFromCollection (const char * groupName, const char * collectionName, std::vector<std::string> attributeV) {
|
||||
return groupDefine (groupName, collectionName, attributeV);
|
||||
}
|
||||
|
||||
int groupDefine (const char * groupName, const char * collectionName, std::vector<std::string> attributeV);
|
||||
int groupDefine (const char * groupName, const char * collectionName, std::vector<const char*> attributeV);
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
#include <cadef.h>
|
||||
#include <iostream>
|
||||
|
||||
|
||||
#define EV EPICSVERSION(HAVE_EPICS)
|
||||
|
||||
#if (EPICS_MAJOR==3) && (EPICS_MINOR==14) && (EPICS_PATCH>=11)
|
||||
@@ -27,14 +26,16 @@ const unsigned short ALARM_STATUS_STRING_LENGTH = 22; // "NO_ALARM","READ","WR
|
||||
//"HIHI","HIGH","LOLO","LOW","STATE","COS","COMM","TIMEOUT","HWLIMIT","CALC","SCAN","LINK",
|
||||
//"SOFT","BAD_SUB","UDF","DISABLE","SIMM","READ_ACCESS","WRITE_ACCESS"
|
||||
|
||||
struct alarmSeverityStruct {
|
||||
struct alarmSeverityStruct
|
||||
{
|
||||
short llsv;
|
||||
short lsv;
|
||||
short hsv;
|
||||
short hhsv;
|
||||
short lsv;
|
||||
short hsv;
|
||||
short hhsv;
|
||||
};
|
||||
|
||||
struct etsDatePrevious {
|
||||
struct etsDatePrevious
|
||||
{
|
||||
int year;
|
||||
int mon;
|
||||
int day;
|
||||
@@ -44,7 +45,8 @@ struct etsDatePrevious {
|
||||
unsigned long nsec;
|
||||
};
|
||||
|
||||
struct etsDate {
|
||||
struct etsDate
|
||||
{
|
||||
int year;
|
||||
int mon;
|
||||
int day;
|
||||
@@ -52,12 +54,13 @@ struct etsDate {
|
||||
int min;
|
||||
int sec;
|
||||
unsigned long nsec;
|
||||
int wday;
|
||||
int yday;
|
||||
int isdst;
|
||||
int wday;
|
||||
int yday;
|
||||
int isdst;
|
||||
};
|
||||
|
||||
struct etsNorm {
|
||||
struct etsNorm
|
||||
{
|
||||
unsigned int secPastEpoch;
|
||||
unsigned int nsec;
|
||||
};
|
||||
@@ -103,24 +106,28 @@ const double NMEMBER_PER_SEC_SG_PEND_EVENT = 400; //
|
||||
const double DEFAULT_TIMEOUT_SG_PEND_IO = 5.0;
|
||||
|
||||
// Otherwise too many large databuffers are created
|
||||
const unsigned int MAX_NELEM_FOR_CTRL_BUFFER = 8192;
|
||||
const unsigned int MAX_NELEM_FOR_CTRL_BUFFER = 256; //8192;
|
||||
// Keep at 1, else becomes problematic when wf is made a syn. group member (ch disconnect occurs for STSACK cb)
|
||||
const unsigned int MAX_NELEM_FOR_STSACK_BUFFER = 1;
|
||||
const unsigned int DEFAULT_NELEM_FOR_CTRL_BUFFER = 256; // if nelem exceeds above
|
||||
const unsigned int DEFAULT_NELEM_FOR_CTRL_BUFFER = 1; //256; // if nelem exceeds above
|
||||
const unsigned int DEFAULT_NELEM_FOR_STSACK_BUFFER = 1; // if nelem exceeds above
|
||||
|
||||
const unsigned short MAX_NO_MONITORS_PER_CHANNEL = 4; // Can't start more than 4; 1 is more usual.
|
||||
|
||||
const std::string SYNCHRONOUS_GROUP_NAME_IN_BSDATAHOLDER = "gBS2CA";
|
||||
|
||||
const std::string INVALID_ENUM_RETURN_STRING = "invalid_enum_value";
|
||||
const short INVALID_ENUM_RETURN_VALUE = -1;
|
||||
|
||||
//For BSREAD
|
||||
const double BSREAD_MAX_CONNECT_TIME = 20; //20 seconds; typically 10 seconds is required
|
||||
const double BSREAD_MAX_CONNECT_TIME = 15; //seconds; typically 10 seconds is required
|
||||
const unsigned short BSREAD_ZEROMQ_HIGH_WATER_MARK = 1;
|
||||
const short BSREAD_ZEROMQ_TIMEOUT_MS = 2000; //Can handle 10 Hz // -1 wait for ever
|
||||
|
||||
const unsigned short BSREAD_PREBLOB_BYTES = 12; //No of bytes pre-pending the binary blob with metadata
|
||||
|
||||
const std::string SF_PULSE_ID_PV = "SIN-TIMAST-EVG0:TX-PULSEID";
|
||||
const unsigned short SF_PULSE_ID_BUFFER_SIZE = 10; //Size of map to store history of pulseIDs;
|
||||
const unsigned short SF_PULSE_ID_BUFFER_SIZE = 100; //Size of map to store history of pulseIDs;
|
||||
|
||||
|
||||
#endif // DEFINES_H
|
||||
|
||||
@@ -14,7 +14,8 @@
|
||||
#include <cstring>
|
||||
#include <helper.h>
|
||||
|
||||
class collectionMember {
|
||||
class collectionMember
|
||||
{
|
||||
public:
|
||||
collectionMember():deviceName(""),devicePosition(0) {};
|
||||
virtual ~collectionMember() {};
|
||||
@@ -22,7 +23,8 @@ public:
|
||||
float devicePosition;
|
||||
};
|
||||
|
||||
class deviceCollection {
|
||||
class deviceCollection
|
||||
{
|
||||
friend class Connect;
|
||||
friend class CAFE;
|
||||
//if HAVE_LIBQTXML
|
||||
@@ -61,7 +63,8 @@ public:
|
||||
std::vector<float> posV;
|
||||
posV.clear();
|
||||
posV.reserve(cMembers.size());
|
||||
for (size_t i=0; i<cMembers.size(); ++i) {
|
||||
for (size_t i=0; i<cMembers.size(); ++i)
|
||||
{
|
||||
posV.push_back(cMembers[i].devicePosition);
|
||||
};
|
||||
return posV;
|
||||
@@ -70,8 +73,10 @@ public:
|
||||
{
|
||||
char _c[PVNAME_SIZE];
|
||||
helper.removeLeadingAndTrailingSpaces(c, _c);
|
||||
for (size_t i=0; i<cMembers.size(); ++i) {
|
||||
if(strcmp(cMembers[i].deviceName.c_str(),_c)==0) {
|
||||
for (size_t i=0; i<cMembers.size(); ++i)
|
||||
{
|
||||
if(strcmp(cMembers[i].deviceName.c_str(),_c)==0)
|
||||
{
|
||||
return cMembers[i].devicePosition;
|
||||
}
|
||||
}
|
||||
@@ -85,7 +90,8 @@ public:
|
||||
std::vector<std::string> memberV;
|
||||
memberV.clear();
|
||||
memberV.reserve(cMembers.size());
|
||||
for (size_t i=0; i<cMembers.size(); ++i) {
|
||||
for (size_t i=0; i<cMembers.size(); ++i)
|
||||
{
|
||||
memberV.push_back(cMembers[i].deviceName);
|
||||
};
|
||||
return memberV;
|
||||
@@ -102,7 +108,8 @@ public:
|
||||
};
|
||||
|
||||
|
||||
class collectionInGroup {
|
||||
class collectionInGroup
|
||||
{
|
||||
//friend class loadGroupXMLParser;
|
||||
public:
|
||||
collectionInGroup() {};
|
||||
@@ -111,7 +118,8 @@ public:
|
||||
std::string attrib;
|
||||
};
|
||||
|
||||
class deviceGroup {
|
||||
class deviceGroup
|
||||
{
|
||||
//if HAVE_LIBQTXML
|
||||
friend class loadGroupXMLParser;
|
||||
//endif
|
||||
|
||||
@@ -19,18 +19,21 @@
|
||||
|
||||
|
||||
template<typename T>
|
||||
struct enumStrings {
|
||||
struct enumStrings
|
||||
{
|
||||
static char const* data[];
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
struct enumRefHolder {
|
||||
struct enumRefHolder
|
||||
{
|
||||
T& enumVal;
|
||||
enumRefHolder(T& enumVal): enumVal(enumVal) {}
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
struct enumConstRefHolder {
|
||||
struct enumConstRefHolder
|
||||
{
|
||||
T const& enumVal;
|
||||
enumConstRefHolder(T const& enumVal): enumVal(enumVal) {}
|
||||
};
|
||||
@@ -40,10 +43,12 @@ inline std::ostream& operator<<(std::ostream& str, enumConstRefHolder<T> const&
|
||||
{
|
||||
//Add check on enumStrings<T>::data size to ensure correspondence with entries in cafeEnumEpics.h
|
||||
|
||||
if ( boost::size( enumStrings<T>::data) > (unsigned int) data.enumVal) {
|
||||
if ( boost::size( enumStrings<T>::data) > (unsigned int) data.enumVal)
|
||||
{
|
||||
return str << enumStrings<T>::data[data.enumVal];
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
return str << "ERROR: enumStrings.h reports data.enumVal= " << data.enumVal
|
||||
<< " DOES NOT HAVE A STRING EQUIVALENT!";
|
||||
}
|
||||
@@ -65,14 +70,16 @@ inline std::istream& operator>>(std::istream& str, enumRefHolder<T> const& data)
|
||||
//if (find != end)
|
||||
|
||||
if ( std::find( boost::begin(enumStrings<T>::data), boost::end( enumStrings<T>::data), value) !=
|
||||
boost::end( enumStrings<T>::data)) {
|
||||
boost::end( enumStrings<T>::data))
|
||||
{
|
||||
//data.enumVal = static_cast<T>(std::distance(begin, find));
|
||||
data.enumVal = static_cast<T>(std::distance(boost::begin(enumStrings<T>::data),
|
||||
std::find (boost::begin(enumStrings<T>::data), boost::end(enumStrings<T>::data), value ) ));
|
||||
}
|
||||
|
||||
|
||||
if (data.enumVal > boost::size( enumStrings<T>::data) ) {
|
||||
if (data.enumVal > boost::size( enumStrings<T>::data) )
|
||||
{
|
||||
|
||||
std::cout << "ERROR: enumStrings.h reports data.enumVal = " << data.enumVal
|
||||
<< " is out of enum range = " << boost::size( enumStrings<T>::data) << std::endl;
|
||||
|
||||
@@ -10,22 +10,24 @@
|
||||
|
||||
#include <exception>
|
||||
#include <cstring>
|
||||
#include <iostream>
|
||||
#include <defines.h>
|
||||
#include <cafeDataType.h>
|
||||
|
||||
/**
|
||||
* The CAFEException_pv struct for pv error reporting
|
||||
*/
|
||||
struct CAFEException_pv {
|
||||
struct CAFEException_pv
|
||||
{
|
||||
char pv [PVNAME_SIZE];
|
||||
char pvAlias[PVNAME_SIZE];
|
||||
unsigned int handle;
|
||||
CAFE_DATATYPE dataTypeNative;
|
||||
const char * dataTypeNativeText;
|
||||
std::string dataTypeNativeText;
|
||||
int statusCode;
|
||||
const char * statusCodeText;
|
||||
const char * statusMessage;
|
||||
const char * source;
|
||||
std::string statusCodeText;
|
||||
std::string statusMessage;
|
||||
std::string source;
|
||||
unsigned int ln;
|
||||
};
|
||||
|
||||
@@ -33,13 +35,14 @@ struct CAFEException_pv {
|
||||
/**
|
||||
* The CAFEException_group struct for group error reporting
|
||||
*/
|
||||
struct CAFEException_group {
|
||||
struct CAFEException_group
|
||||
{
|
||||
char groupName [PVNAME_SIZE];
|
||||
unsigned int groupHandle;
|
||||
int statusCode;
|
||||
const char * statusCodeText;
|
||||
const char * statusMessage;
|
||||
const char * source;
|
||||
std::string statusCodeText;
|
||||
std::string statusMessage;
|
||||
std::string source;
|
||||
unsigned int ln;
|
||||
};
|
||||
|
||||
@@ -47,24 +50,49 @@ struct CAFEException_group {
|
||||
/**
|
||||
* The CAFEException_open class for ca open error reporting
|
||||
*/
|
||||
class CAFEException_open : public std::exception {
|
||||
class CAFEException_open : public std::exception
|
||||
{
|
||||
private:
|
||||
std::string ewhat;
|
||||
|
||||
public:
|
||||
CAFEException_open() {
|
||||
ewhat = "CAFEException_Open exception: Could not establish link to pv";
|
||||
};
|
||||
CAFEException_open(std::string _ewhat) {
|
||||
ewhat = _ewhat;
|
||||
};
|
||||
|
||||
CAFEException_pv pvEx;
|
||||
|
||||
virtual const char* what() const throw()
|
||||
{
|
||||
return "CAFEException_open exception: Could not establish link to pv";
|
||||
return ewhat.c_str();
|
||||
};
|
||||
|
||||
CAFEException_pv pvEx;
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* The CAFEException_groupOpen class for ca group open error reporting
|
||||
*/
|
||||
class CAFEException_groupOpen : public std::exception {
|
||||
class CAFEException_groupOpen : public std::exception
|
||||
{
|
||||
private:
|
||||
std::string ewhat;
|
||||
|
||||
public:
|
||||
CAFEException_groupOpen() {
|
||||
ewhat = "CAFEException_groupOpen exception: Could not establish link to group";
|
||||
};
|
||||
|
||||
CAFEException_groupOpen(std::string _ewhat) {
|
||||
ewhat = _ewhat;
|
||||
};
|
||||
|
||||
virtual const char* what() const throw()
|
||||
{
|
||||
return "CAFEException_groupOpen exception: Could not establish link to group";
|
||||
return ewhat.c_str();
|
||||
};
|
||||
|
||||
CAFEException_group groupEx;
|
||||
@@ -74,11 +102,12 @@ public:
|
||||
/**
|
||||
* The CAFEException_init
|
||||
*/
|
||||
class CAFEException_init: public std::exception {
|
||||
class CAFEException_init: public std::exception
|
||||
{
|
||||
public:
|
||||
virtual const char* what() const throw()
|
||||
{
|
||||
return "CAFEException_init exception: \nChannel Access Error: ECA_ALLOCMEM when calling ca_context_create";
|
||||
return "CAFEException_init: \nChannel Access Error: ECA_ALLOCMEM when calling ca_context_create";
|
||||
};
|
||||
};
|
||||
|
||||
@@ -86,7 +115,8 @@ public:
|
||||
/**
|
||||
* The CAFEException_allocBufferMem
|
||||
*/
|
||||
class CAFEException_allocBufferMem: public std::exception {
|
||||
class CAFEException_allocBufferMem: public std::exception
|
||||
{
|
||||
public:
|
||||
virtual const char* what() const throw()
|
||||
{
|
||||
|
||||
@@ -12,20 +12,22 @@
|
||||
#include <statusCodes.h>
|
||||
#include <defines.h>
|
||||
|
||||
class ExceptionsHelper {
|
||||
class ExceptionsHelper
|
||||
{
|
||||
private:
|
||||
CAFEDataTypeCode cafeDataTypeCode;
|
||||
CAFEStatus cafeStatus;
|
||||
public:
|
||||
CAFEException_pv prepareCAFEException_pv(const char *pv, const char *pvAlias,
|
||||
CAFEException_pv prepareCAFEException_pv(
|
||||
const char pv[PVNAME_SIZE], const char pvAlias[PVNAME_SIZE],
|
||||
unsigned int handle, chid pCh, int status,
|
||||
const char * source, unsigned int ln);
|
||||
std::string source, unsigned int ln);
|
||||
|
||||
CAFEException_group prepareCAFEException_group(
|
||||
char groupName [PVNAME_SIZE],
|
||||
const char groupName [PVNAME_SIZE],
|
||||
unsigned int groupHandle,
|
||||
int statusCode,
|
||||
const char * source,
|
||||
std::string source,
|
||||
unsigned int ln);
|
||||
|
||||
ExceptionsHelper(void) {};
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
#ifndef GLOBAL_H
|
||||
#define GLOBAL_H
|
||||
|
||||
#include <epicsMutex.h>
|
||||
#include <cadef.h>
|
||||
#include <hashConduit.h>
|
||||
#include <hashConduitGroup.h>
|
||||
@@ -21,8 +21,6 @@ extern bool CHECK_CONSISTENCY_CA_STATE;
|
||||
extern bool MUTEX;
|
||||
extern epicsMutex cafeMutex;
|
||||
|
||||
|
||||
|
||||
extern cafeConduit_set cs;
|
||||
extern cafeGroup_set gs;
|
||||
extern std::vector<PVGroup> PVGroupV;
|
||||
@@ -32,15 +30,12 @@ extern std::map<std::vector<unsigned int>, std::string> groupPseudoMap;
|
||||
|
||||
extern std::vector<std::string> globalChannelList;
|
||||
|
||||
|
||||
extern std::string contentsS;
|
||||
extern std::string contentsBS;
|
||||
|
||||
extern unsigned long nCBs;
|
||||
|
||||
extern bool callbackLiveFlag;
|
||||
|
||||
extern bool SF_WITH_PULSE_ID;
|
||||
extern bool SF_WITH_PULSE_ID;
|
||||
|
||||
|
||||
#endif // GLOBAL_H
|
||||
|
||||
@@ -28,7 +28,8 @@
|
||||
|
||||
|
||||
|
||||
class Granules {
|
||||
class Granules
|
||||
{
|
||||
public:
|
||||
|
||||
template <class CTYPE> friend class Instant;
|
||||
|
||||
@@ -21,7 +21,8 @@
|
||||
#include <tmDateMap.h>
|
||||
|
||||
|
||||
class HandleHelper : public Helper {
|
||||
class HandleHelper : public Helper
|
||||
{
|
||||
|
||||
private:
|
||||
CAFEStatus cafeStatus;
|
||||
@@ -40,12 +41,6 @@ private:
|
||||
|
||||
PrintErrorPolicy printErrorPolicy;
|
||||
|
||||
// now in defines.h
|
||||
//struct etsNorm{ unsigned int secPastEpoch; unsigned int nsec;};
|
||||
//struct etsDate{ int year; int mon; int day;
|
||||
// int hour; int min; int sec; unsigned long nsec;};
|
||||
|
||||
|
||||
public:
|
||||
|
||||
HandleHelper() {};
|
||||
@@ -60,6 +55,15 @@ public:
|
||||
TMwdayText tmDay;
|
||||
TMmonthpText tmMonth;
|
||||
|
||||
#if HAVE_PYTHON_H
|
||||
int setPyConnectCallbackFn(unsigned int _handle, void * callbackFn);
|
||||
int setPyGetCallbackFn(unsigned int _handle, void * callbackFn);
|
||||
int setPyPutCallbackFn(unsigned int _handle, void * callbackFn);
|
||||
#endif
|
||||
int addWidget (unsigned int _handle, void * widget);
|
||||
int removeWidget (unsigned int _handle, void * widget);
|
||||
int getWidgets(unsigned int _handle, std::vector<void *> & widgetV);
|
||||
|
||||
int checkConsistency();
|
||||
int checkConsistency(unsigned int _handle);
|
||||
|
||||
@@ -79,6 +83,17 @@ public:
|
||||
ca_client_context * getContextFromPV (const char * _pv);
|
||||
ca_client_context * getContextFromHandle (unsigned int _handle);
|
||||
|
||||
cafeConduit_set_by_handle::iterator getIterFromHandle(unsigned int handle);
|
||||
cafeConduit_set_by_handle & getcsHandleIndex();
|
||||
int modifyHandleIndexStatus(unsigned int handle, long status);
|
||||
int modifyChannelRequestMetaDataClient(unsigned int handle,
|
||||
ChannelRequestMetaDataClient channelRequestMetaDataClient);
|
||||
int modifyChannelRequestStatusGet(unsigned int handle,
|
||||
ChannelRequestStatus channelRequestStatusGet);
|
||||
|
||||
int modifyChannelTimeoutPolicyGet(unsigned int handle,
|
||||
ChannelTimeoutPolicy channelTimeoutPolicyGet);
|
||||
|
||||
const char * getPVFromHandle (unsigned int _handle);
|
||||
const char * getPVFromHandle (unsigned int _handle, ca_client_context * ccc);
|
||||
|
||||
@@ -89,6 +104,8 @@ public:
|
||||
const char * getPVAlias (unsigned int _handle);
|
||||
const char * getPVAlias (unsigned int _handle, ca_client_context * ccc);
|
||||
|
||||
|
||||
|
||||
unsigned int getHandleFromPV (const char * _pv);
|
||||
unsigned int getHandleFromPV (const char * _pv, ca_client_context * ccc);
|
||||
unsigned int getHandleFromPVAlias(const char * _pv);
|
||||
@@ -110,7 +127,7 @@ public:
|
||||
int getTimeStamp(unsigned int h, epicsTimeStamp &ts);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
etsNorm getEpicsTimeStampAsUInt32(unsigned int h)
|
||||
@@ -213,7 +230,8 @@ public:
|
||||
}
|
||||
|
||||
|
||||
std::string etsDateAsString(etsNorm ts) {
|
||||
std::string etsDateAsString(etsNorm ts)
|
||||
{
|
||||
|
||||
time_t t= ts.secPastEpoch;
|
||||
|
||||
@@ -232,12 +250,13 @@ public:
|
||||
}
|
||||
|
||||
|
||||
//Deprecated!!!
|
||||
//Deprecated!!!
|
||||
int getPulseID(unsigned int h, unsigned int &pulseID)
|
||||
{
|
||||
epicsTimeStamp ts;
|
||||
int status=getTimeStamp(h, ts);
|
||||
if (status==ICAFE_NORMAL) {
|
||||
if (status==ICAFE_NORMAL)
|
||||
{
|
||||
std::string nsS = static_cast<std::ostringstream*>( &(std::ostringstream() << ts.nsec) )->str();
|
||||
int l=nsS.length();
|
||||
int startPos=std::max(l-6,0);
|
||||
@@ -258,22 +277,26 @@ public:
|
||||
return pulseID;
|
||||
}
|
||||
|
||||
bool hasAlarmStatusSeverity(unsigned int h);
|
||||
bool hasAlarmStatusSeverity(unsigned int h);
|
||||
int getAlarmStatusSeverity(unsigned int h, dbr_short_t as[2]);
|
||||
int getAlarmStatusSeverityAsString(unsigned int h, std::string asas[2]);
|
||||
unsigned int getNoHandles();
|
||||
unsigned int getNextFreeHandle();
|
||||
|
||||
bool hasDescription(unsigned int _handle);
|
||||
|
||||
int getDescription(unsigned int _handle, std::string & desc);
|
||||
int getUnits (unsigned int h, std::string & units);
|
||||
int getPrecision(unsigned int h, short &precision);
|
||||
int getPrecision(unsigned int h, short &precision);
|
||||
|
||||
|
||||
bool isChannelConnected(unsigned int handle);
|
||||
bool allChannelsConnected();
|
||||
bool areChannelsConnected(unsigned int * handleArray, const unsigned int nHandles);
|
||||
bool areChannelsConnectedV(std::vector<unsigned int>);
|
||||
bool allChannelsWithinGroupConnected();
|
||||
bool allChannelsWithinGroupConnectedV(std::vector<unsigned int>);
|
||||
|
||||
|
||||
int printHandle (unsigned int h);
|
||||
int printHandlesV(std::vector<unsigned int> handleV);
|
||||
int printHandles(unsigned int * handleArray, unsigned int nHandles);
|
||||
@@ -303,7 +326,7 @@ public:
|
||||
bool isEnum(unsigned int _handle);
|
||||
short getEnumFromString(unsigned int _handle, std::string enumStringValue);
|
||||
std::string getStringFromEnum(unsigned int _handle, unsigned short enumValue);
|
||||
std::vector<std::string> getEnumStrings(unsigned int handle);
|
||||
std::vector<std::string> getEnumStrings(unsigned int handle);
|
||||
|
||||
int getDataTypeNative (unsigned int _handle, chtype &ndt);
|
||||
int getDataTypeRequest(unsigned int _handle, chtype &rdt);
|
||||
@@ -317,6 +340,9 @@ public:
|
||||
int getMonitorAction(unsigned int _handle, std::vector<std::string> &msV);
|
||||
std::vector<std::string> getMonitorAction(bool onlyIfNewData); //all handles; false gives all
|
||||
|
||||
int updateMonitorPolicyDeltaMS(unsigned int _handle, unsigned int _monid,
|
||||
unsigned short deltaMS);
|
||||
|
||||
int getMonitorPolicyVector(unsigned int _handle, std::vector<MonitorPolicy> &mpV);
|
||||
int getMonitorPolicyInWaitingVector(unsigned int _handle, std::vector<MonitorPolicy> &mpV);
|
||||
int getNmonitor(unsigned int _handle);
|
||||
@@ -364,11 +390,13 @@ public:
|
||||
void setFirstAndLastArrayElements(unsigned int _handle,
|
||||
unsigned int _start, unsigned int _last)
|
||||
{
|
||||
if (_last > _start ) {
|
||||
if (_last > _start )
|
||||
{
|
||||
setOffset(_handle, _start);
|
||||
setNelem(_handle, _last);
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
std::cout << " offset must be less than the nelements" <<std::endl;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
#ifndef HASHCONDUIT_GROUP_H
|
||||
#define HASHCONDUIT_GROUP_H
|
||||
|
||||
#include "conduitGroup.h"
|
||||
#include <conduitGroup.h>
|
||||
|
||||
// boost include
|
||||
#include <boost/multi_index_container.hpp>
|
||||
|
||||
@@ -19,7 +19,8 @@
|
||||
#include <cafeEnum.h>
|
||||
#include <defines.h>
|
||||
|
||||
class Helper {
|
||||
class Helper
|
||||
{
|
||||
public:
|
||||
Helper() {};
|
||||
|
||||
|
||||
2823
include/instant.cpp
2823
include/instant.cpp
File diff suppressed because it is too large
Load Diff
4595
include/instant.h
4595
include/instant.h
File diff suppressed because it is too large
Load Diff
61
include/instantT.h
Normal file
61
include/instantT.h
Normal file
@@ -0,0 +1,61 @@
|
||||
///
|
||||
/// \file instantT.h
|
||||
/// \author Jan Chrin, PSI
|
||||
/// \date Release: July 2021
|
||||
/// \version CAFE 1.14.2
|
||||
///
|
||||
|
||||
|
||||
#ifndef INSTANT_T_H
|
||||
#define INSTANT_T_H
|
||||
|
||||
#include <instant.h>
|
||||
|
||||
template <class CTYPE> int Instant<CTYPE>::set(const unsigned int _handle,
|
||||
const chtype _dbrType, const CTYPE * _val );
|
||||
|
||||
template <class CTYPE> int Instant<CTYPE>::get(const unsigned int _handle,
|
||||
const chtype _dbrType, CTYPE * _val,
|
||||
dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts);
|
||||
|
||||
template <class CTYPE> int Instant<CTYPE>::getCache(const unsigned int _handle,
|
||||
const chtype _dbrType, CTYPE * _val,
|
||||
dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts);
|
||||
|
||||
template <class CTYPE> int Instant<CTYPE>::getCache(const unsigned int *handleArray, const unsigned int nelem,
|
||||
const chtype _dbrType, CTYPE * val, int *statusArray,
|
||||
dbr_short_t *alarmStatus, dbr_short_t *alarmSeverity, epicsTimeStamp *ts);
|
||||
|
||||
template <class CTYPE> int Instant<CTYPE>::set(const unsigned int *handleArray, const unsigned int nelem,
|
||||
onst chtype _dbrType, const CTYPE * val, int *statusArray);
|
||||
|
||||
template <class CTYPE> int Instant<CTYPE>::clientRequests(
|
||||
const unsigned int _handle,
|
||||
const chtype _dbrType, CTYPE * _val,
|
||||
dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts, bool isCacheRequest);
|
||||
|
||||
|
||||
template <class CTYPE> int Instant<CTYPE>::clientRequests(
|
||||
const unsigned int _handle, const chtype _dbrType, const CTYPE * _val);
|
||||
|
||||
|
||||
template <class CTYPE> int Instant<CTYPE>::setAndGet(const unsigned int handleSet, const chtype dbrType, CTYPE valSet, CTYPE &valGet);
|
||||
template <class CTYPE> int Instant<CTYPE>::setMany(std::vector<unsigned int> handleSet, const chtype dbrType, std::vector<CTYPE> valSet, bool printFlag);
|
||||
template <class CTYPE> int Instant<CTYPE>::compareAndMatchMany(std::vector<unsigned int> handleSet, const chtype dbrType, std::vector<CTYPE> valSet, std::vector<unsigned int> handleMatch,
|
||||
CTYPE tolerance, double timeout, bool printFlag);
|
||||
|
||||
//template <class CTYPE> int Instant<CTYPE>::setTriggerAndMatchMany(std::vector<unsigned int> handleSet, chtype dbrType, std::vector<CTYPE> valSet,
|
||||
template <class CTYPE> int Instant<CTYPE>::setAndMatchMany(std::vector<unsigned int> handleSet, chtype dbrType, std::vector<CTYPE> valSet, std::vector<unsigned int> handleMatch,
|
||||
CTYPE tolerance, double timeout, bool printFlag);
|
||||
|
||||
template <class CTYPE> int Instant<CTYPE>::setAndMatch(const unsigned int handleSet, const chtype dbrType, CTYPE valSet, const unsigned int handleMatch,
|
||||
CTYPE tolerance, double timeout, bool printFlag);
|
||||
|
||||
template <class CTYPE> int Instant<CTYPE>::match(const chtype dbrType, CTYPE valSet, unsigned int handleMatch,
|
||||
CTYPE tolerance, double timeout, bool printFlag);
|
||||
|
||||
|
||||
template <class CTYPE> int Instant<CTYPE>::matchMany(const chtype dbrType, std::vector<CTYPE> valSet, std::vector<unsigned int> handleMatch, CTYPE tolerance, double timeout, bool printFlag);
|
||||
|
||||
|
||||
#endif
|
||||
@@ -6,19 +6,21 @@
|
||||
///
|
||||
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#if HAVE_LIBQTXML
|
||||
|
||||
#ifndef LOADCOLLECTIONXMLPARSER_H
|
||||
#define LOADCOLLECTIONXMLPARSER_H
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#if HAVE_LIBQTXML
|
||||
|
||||
#include <deviceCollection.h>
|
||||
|
||||
#include <QtXml/QXmlDefaultHandler>
|
||||
//include <QtXml/QXmlDefaultHandler>
|
||||
#include <QXmlDefaultHandler>
|
||||
|
||||
|
||||
class loadCollectionXMLParser : public QXmlDefaultHandler {
|
||||
class loadCollectionXMLParser : public QXmlDefaultHandler
|
||||
{
|
||||
public:
|
||||
loadCollectionXMLParser();
|
||||
virtual ~loadCollectionXMLParser();
|
||||
@@ -35,7 +37,8 @@ public:
|
||||
|
||||
|
||||
private:
|
||||
enum {
|
||||
enum
|
||||
{
|
||||
NotWaiting,
|
||||
WaitingForDescription,
|
||||
WaitingForDevice,
|
||||
|
||||
@@ -5,18 +5,26 @@
|
||||
/// \version CAFE 1.0.0
|
||||
///
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#if HAVE_LIBQTXML
|
||||
|
||||
#ifndef LOADGROUPXMLPARSER_H
|
||||
#define LOADGROUPXMLPARSER_H
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#if HAVE_LIBQTXML
|
||||
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <deviceCollection.h>
|
||||
|
||||
#include <QtXml/QXmlDefaultHandler>
|
||||
//include <QtXml/QXmlDefaultHandler>
|
||||
#include <QXmlDefaultHandler>
|
||||
|
||||
class loadGroupXMLParser : public QXmlDefaultHandler {
|
||||
|
||||
class loadGroupXMLParser : public QXmlDefaultHandler
|
||||
{
|
||||
public:
|
||||
loadGroupXMLParser();
|
||||
virtual ~loadGroupXMLParser();
|
||||
@@ -26,7 +34,8 @@ public:
|
||||
|
||||
std::vector<deviceGroup> groups;
|
||||
private:
|
||||
enum {
|
||||
enum
|
||||
{
|
||||
NotWaiting,
|
||||
WaitingForDescription,
|
||||
WaitingForStatusGroup,
|
||||
@@ -61,6 +70,8 @@ private:
|
||||
const static QString& tagCollectiveType;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#endif /* LOADGROUPXMLPARSER_H */
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
366
include/lz4.h
Normal file
366
include/lz4.h
Normal file
@@ -0,0 +1,366 @@
|
||||
/*
|
||||
LZ4 - Fast LZ compression algorithm
|
||||
Header File
|
||||
Copyright (C) 2011-2015, Yann Collet.
|
||||
|
||||
BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php)
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are
|
||||
met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above
|
||||
copyright notice, this list of conditions and the following disclaimer
|
||||
in the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
You can contact the author at :
|
||||
- LZ4 source repository : https://github.com/Cyan4973/lz4
|
||||
- LZ4 public forum : https://groups.google.com/forum/#!forum/lz4c
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#if defined (__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* lz4.h provides block compression functions, and gives full buffer control to programmer.
|
||||
* If you need to generate inter-operable compressed data (respecting LZ4 frame specification),
|
||||
* and can let the library handle its own memory, please use lz4frame.h instead.
|
||||
*/
|
||||
|
||||
/**************************************
|
||||
* Version
|
||||
**************************************/
|
||||
#define LZ4_VERSION_MAJOR 1 /* for breaking interface changes */
|
||||
#define LZ4_VERSION_MINOR 7 /* for new (non-breaking) interface capabilities */
|
||||
#define LZ4_VERSION_RELEASE 1 /* for tweaks, bug-fixes, or development */
|
||||
#define LZ4_VERSION_NUMBER (LZ4_VERSION_MAJOR *100*100 + LZ4_VERSION_MINOR *100 + LZ4_VERSION_RELEASE)
|
||||
int LZ4_versionNumber (void);
|
||||
|
||||
/**************************************
|
||||
* Tuning parameter
|
||||
**************************************/
|
||||
/*
|
||||
* LZ4_MEMORY_USAGE :
|
||||
* Memory usage formula : N->2^N Bytes (examples : 10 -> 1KB; 12 -> 4KB ; 16 -> 64KB; 20 -> 1MB; etc.)
|
||||
* Increasing memory usage improves compression ratio
|
||||
* Reduced memory usage can improve speed, due to cache effect
|
||||
* Default value is 14, for 16KB, which nicely fits into Intel x86 L1 cache
|
||||
*/
|
||||
#define LZ4_MEMORY_USAGE 14
|
||||
|
||||
|
||||
/**************************************
|
||||
* Simple Functions
|
||||
**************************************/
|
||||
|
||||
int LZ4_compress_default(const char* source, char* dest, int sourceSize, int maxDestSize);
|
||||
int LZ4_decompress_safe (const char* source, char* dest, int compressedSize, int maxDecompressedSize);
|
||||
|
||||
/*
|
||||
LZ4_compress_default() :
|
||||
Compresses 'sourceSize' bytes from buffer 'source'
|
||||
into already allocated 'dest' buffer of size 'maxDestSize'.
|
||||
Compression is guaranteed to succeed if 'maxDestSize' >= LZ4_compressBound(sourceSize).
|
||||
It also runs faster, so it's a recommended setting.
|
||||
If the function cannot compress 'source' into a more limited 'dest' budget,
|
||||
compression stops *immediately*, and the function result is zero.
|
||||
As a consequence, 'dest' content is not valid.
|
||||
This function never writes outside 'dest' buffer, nor read outside 'source' buffer.
|
||||
sourceSize : Max supported value is LZ4_MAX_INPUT_VALUE
|
||||
maxDestSize : full or partial size of buffer 'dest' (which must be already allocated)
|
||||
return : the number of bytes written into buffer 'dest' (necessarily <= maxOutputSize)
|
||||
or 0 if compression fails
|
||||
|
||||
LZ4_decompress_safe() :
|
||||
compressedSize : is the precise full size of the compressed block.
|
||||
maxDecompressedSize : is the size of destination buffer, which must be already allocated.
|
||||
return : the number of bytes decompressed into destination buffer (necessarily <= maxDecompressedSize)
|
||||
If destination buffer is not large enough, decoding will stop and output an error code (<0).
|
||||
If the source stream is detected malformed, the function will stop decoding and return a negative result.
|
||||
This function is protected against buffer overflow exploits, including malicious data packets.
|
||||
It never writes outside output buffer, nor reads outside input buffer.
|
||||
*/
|
||||
|
||||
|
||||
/**************************************
|
||||
* Advanced Functions
|
||||
**************************************/
|
||||
#define LZ4_MAX_INPUT_SIZE 0x7E000000 /* 2 113 929 216 bytes */
|
||||
#define LZ4_COMPRESSBOUND(isize) ((unsigned)(isize) > (unsigned)LZ4_MAX_INPUT_SIZE ? 0 : (isize) + ((isize)/255) + 16)
|
||||
|
||||
/*
|
||||
LZ4_compressBound() :
|
||||
Provides the maximum size that LZ4 compression may output in a "worst case" scenario (input data not compressible)
|
||||
This function is primarily useful for memory allocation purposes (destination buffer size).
|
||||
Macro LZ4_COMPRESSBOUND() is also provided for compilation-time evaluation (stack memory allocation for example).
|
||||
Note that LZ4_compress_default() compress faster when dest buffer size is >= LZ4_compressBound(srcSize)
|
||||
inputSize : max supported value is LZ4_MAX_INPUT_SIZE
|
||||
return : maximum output size in a "worst case" scenario
|
||||
or 0, if input size is too large ( > LZ4_MAX_INPUT_SIZE)
|
||||
*/
|
||||
int LZ4_compressBound(int inputSize);
|
||||
|
||||
/*
|
||||
LZ4_compress_fast() :
|
||||
Same as LZ4_compress_default(), but allows to select an "acceleration" factor.
|
||||
The larger the acceleration value, the faster the algorithm, but also the lesser the compression.
|
||||
It's a trade-off. It can be fine tuned, with each successive value providing roughly +~3% to speed.
|
||||
An acceleration value of "1" is the same as regular LZ4_compress_default()
|
||||
Values <= 0 will be replaced by ACCELERATION_DEFAULT (see lz4.c), which is 1.
|
||||
*/
|
||||
int LZ4_compress_fast (const char* source, char* dest, int sourceSize, int maxDestSize, int acceleration);
|
||||
|
||||
|
||||
/*
|
||||
LZ4_compress_fast_extState() :
|
||||
Same compression function, just using an externally allocated memory space to store compression state.
|
||||
Use LZ4_sizeofState() to know how much memory must be allocated,
|
||||
and allocate it on 8-bytes boundaries (using malloc() typically).
|
||||
Then, provide it as 'void* state' to compression function.
|
||||
*/
|
||||
int LZ4_sizeofState(void);
|
||||
int LZ4_compress_fast_extState (void* state, const char* source, char* dest, int inputSize, int maxDestSize, int acceleration);
|
||||
|
||||
|
||||
/*
|
||||
LZ4_compress_destSize() :
|
||||
Reverse the logic, by compressing as much data as possible from 'source' buffer
|
||||
into already allocated buffer 'dest' of size 'targetDestSize'.
|
||||
This function either compresses the entire 'source' content into 'dest' if it's large enough,
|
||||
or fill 'dest' buffer completely with as much data as possible from 'source'.
|
||||
*sourceSizePtr : will be modified to indicate how many bytes where read from 'source' to fill 'dest'.
|
||||
New value is necessarily <= old value.
|
||||
return : Nb bytes written into 'dest' (necessarily <= targetDestSize)
|
||||
or 0 if compression fails
|
||||
*/
|
||||
int LZ4_compress_destSize (const char* source, char* dest, int* sourceSizePtr, int targetDestSize);
|
||||
|
||||
|
||||
/*
|
||||
LZ4_decompress_fast() :
|
||||
originalSize : is the original and therefore uncompressed size
|
||||
return : the number of bytes read from the source buffer (in other words, the compressed size)
|
||||
If the source stream is detected malformed, the function will stop decoding and return a negative result.
|
||||
Destination buffer must be already allocated. Its size must be a minimum of 'originalSize' bytes.
|
||||
note : This function fully respect memory boundaries for properly formed compressed data.
|
||||
It is a bit faster than LZ4_decompress_safe().
|
||||
However, it does not provide any protection against intentionally modified data stream (malicious input).
|
||||
Use this function in trusted environment only (data to decode comes from a trusted source).
|
||||
*/
|
||||
int LZ4_decompress_fast (const char* source, char* dest, int originalSize);
|
||||
|
||||
/*
|
||||
LZ4_decompress_safe_partial() :
|
||||
This function decompress a compressed block of size 'compressedSize' at position 'source'
|
||||
into destination buffer 'dest' of size 'maxDecompressedSize'.
|
||||
The function tries to stop decompressing operation as soon as 'targetOutputSize' has been reached,
|
||||
reducing decompression time.
|
||||
return : the number of bytes decoded in the destination buffer (necessarily <= maxDecompressedSize)
|
||||
Note : this number can be < 'targetOutputSize' should the compressed block to decode be smaller.
|
||||
Always control how many bytes were decoded.
|
||||
If the source stream is detected malformed, the function will stop decoding and return a negative result.
|
||||
This function never writes outside of output buffer, and never reads outside of input buffer. It is therefore protected against malicious data packets
|
||||
*/
|
||||
int LZ4_decompress_safe_partial (const char* source, char* dest, int compressedSize, int targetOutputSize, int maxDecompressedSize);
|
||||
|
||||
|
||||
/***********************************************
|
||||
* Streaming Compression Functions
|
||||
***********************************************/
|
||||
#define LZ4_STREAMSIZE_U64 ((1 << (LZ4_MEMORY_USAGE-3)) + 4)
|
||||
#define LZ4_STREAMSIZE (LZ4_STREAMSIZE_U64 * sizeof(long long))
|
||||
/*
|
||||
* LZ4_stream_t
|
||||
* information structure to track an LZ4 stream.
|
||||
* important : init this structure content before first use !
|
||||
* note : only allocated directly the structure if you are statically linking LZ4
|
||||
* If you are using liblz4 as a DLL, please use below construction methods instead.
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
long long table[LZ4_STREAMSIZE_U64];
|
||||
} LZ4_stream_t;
|
||||
|
||||
/*
|
||||
* LZ4_resetStream
|
||||
* Use this function to init an allocated LZ4_stream_t structure
|
||||
*/
|
||||
void LZ4_resetStream (LZ4_stream_t* streamPtr);
|
||||
|
||||
/*
|
||||
* LZ4_createStream will allocate and initialize an LZ4_stream_t structure
|
||||
* LZ4_freeStream releases its memory.
|
||||
* In the context of a DLL (liblz4), please use these methods rather than the static struct.
|
||||
* They are more future proof, in case of a change of LZ4_stream_t size.
|
||||
*/
|
||||
LZ4_stream_t* LZ4_createStream(void);
|
||||
int LZ4_freeStream (LZ4_stream_t* streamPtr);
|
||||
|
||||
/*
|
||||
* LZ4_loadDict
|
||||
* Use this function to load a static dictionary into LZ4_stream.
|
||||
* Any previous data will be forgotten, only 'dictionary' will remain in memory.
|
||||
* Loading a size of 0 is allowed.
|
||||
* Return : dictionary size, in bytes (necessarily <= 64 KB)
|
||||
*/
|
||||
int LZ4_loadDict (LZ4_stream_t* streamPtr, const char* dictionary, int dictSize);
|
||||
|
||||
/*
|
||||
* LZ4_compress_fast_continue
|
||||
* Compress buffer content 'src', using data from previously compressed blocks as dictionary to improve compression ratio.
|
||||
* Important : Previous data blocks are assumed to still be present and unmodified !
|
||||
* 'dst' buffer must be already allocated.
|
||||
* If maxDstSize >= LZ4_compressBound(srcSize), compression is guaranteed to succeed, and runs faster.
|
||||
* If not, and if compressed data cannot fit into 'dst' buffer size, compression stops, and function returns a zero.
|
||||
*/
|
||||
int LZ4_compress_fast_continue (LZ4_stream_t* streamPtr, const char* src, char* dst, int srcSize, int maxDstSize, int acceleration);
|
||||
|
||||
/*
|
||||
* LZ4_saveDict
|
||||
* If previously compressed data block is not guaranteed to remain available at its memory location
|
||||
* save it into a safer place (char* safeBuffer)
|
||||
* Note : you don't need to call LZ4_loadDict() afterwards,
|
||||
* dictionary is immediately usable, you can therefore call LZ4_compress_fast_continue()
|
||||
* Return : saved dictionary size in bytes (necessarily <= dictSize), or 0 if error
|
||||
*/
|
||||
int LZ4_saveDict (LZ4_stream_t* streamPtr, char* safeBuffer, int dictSize);
|
||||
|
||||
|
||||
/************************************************
|
||||
* Streaming Decompression Functions
|
||||
************************************************/
|
||||
|
||||
#define LZ4_STREAMDECODESIZE_U64 4
|
||||
#define LZ4_STREAMDECODESIZE (LZ4_STREAMDECODESIZE_U64 * sizeof(unsigned long long))
|
||||
typedef struct
|
||||
{
|
||||
unsigned long long table[LZ4_STREAMDECODESIZE_U64];
|
||||
} LZ4_streamDecode_t;
|
||||
/*
|
||||
* LZ4_streamDecode_t
|
||||
* information structure to track an LZ4 stream.
|
||||
* init this structure content using LZ4_setStreamDecode or memset() before first use !
|
||||
*
|
||||
* In the context of a DLL (liblz4) please prefer usage of construction methods below.
|
||||
* They are more future proof, in case of a change of LZ4_streamDecode_t size in the future.
|
||||
* LZ4_createStreamDecode will allocate and initialize an LZ4_streamDecode_t structure
|
||||
* LZ4_freeStreamDecode releases its memory.
|
||||
*/
|
||||
LZ4_streamDecode_t* LZ4_createStreamDecode(void);
|
||||
int LZ4_freeStreamDecode (LZ4_streamDecode_t* LZ4_stream);
|
||||
|
||||
/*
|
||||
* LZ4_setStreamDecode
|
||||
* Use this function to instruct where to find the dictionary.
|
||||
* Setting a size of 0 is allowed (same effect as reset).
|
||||
* Return : 1 if OK, 0 if error
|
||||
*/
|
||||
int LZ4_setStreamDecode (LZ4_streamDecode_t* LZ4_streamDecode, const char* dictionary, int dictSize);
|
||||
|
||||
/*
|
||||
*_continue() :
|
||||
These decoding functions allow decompression of multiple blocks in "streaming" mode.
|
||||
Previously decoded blocks *must* remain available at the memory position where they were decoded (up to 64 KB)
|
||||
In the case of a ring buffers, decoding buffer must be either :
|
||||
- Exactly same size as encoding buffer, with same update rule (block boundaries at same positions)
|
||||
In which case, the decoding & encoding ring buffer can have any size, including very small ones ( < 64 KB).
|
||||
- Larger than encoding buffer, by a minimum of maxBlockSize more bytes.
|
||||
maxBlockSize is implementation dependent. It's the maximum size you intend to compress into a single block.
|
||||
In which case, encoding and decoding buffers do not need to be synchronized,
|
||||
and encoding ring buffer can have any size, including small ones ( < 64 KB).
|
||||
- _At least_ 64 KB + 8 bytes + maxBlockSize.
|
||||
In which case, encoding and decoding buffers do not need to be synchronized,
|
||||
and encoding ring buffer can have any size, including larger than decoding buffer.
|
||||
Whenever these conditions are not possible, save the last 64KB of decoded data into a safe buffer,
|
||||
and indicate where it is saved using LZ4_setStreamDecode()
|
||||
*/
|
||||
int LZ4_decompress_safe_continue (LZ4_streamDecode_t* LZ4_streamDecode, const char* source, char* dest, int compressedSize, int maxDecompressedSize);
|
||||
int LZ4_decompress_fast_continue (LZ4_streamDecode_t* LZ4_streamDecode, const char* source, char* dest, int originalSize);
|
||||
|
||||
|
||||
/*
|
||||
Advanced decoding functions :
|
||||
*_usingDict() :
|
||||
These decoding functions work the same as
|
||||
a combination of LZ4_setStreamDecode() followed by LZ4_decompress_x_continue()
|
||||
They are stand-alone. They don't need nor update an LZ4_streamDecode_t structure.
|
||||
*/
|
||||
int LZ4_decompress_safe_usingDict (const char* source, char* dest, int compressedSize, int maxDecompressedSize, const char* dictStart, int dictSize);
|
||||
int LZ4_decompress_fast_usingDict (const char* source, char* dest, int originalSize, const char* dictStart, int dictSize);
|
||||
|
||||
|
||||
|
||||
/**************************************
|
||||
* Obsolete Functions
|
||||
**************************************/
|
||||
/* Deprecate Warnings */
|
||||
/* Should these warnings messages be a problem,
|
||||
it is generally possible to disable them,
|
||||
with -Wno-deprecated-declarations for gcc
|
||||
or _CRT_SECURE_NO_WARNINGS in Visual for example.
|
||||
You can also define LZ4_DEPRECATE_WARNING_DEFBLOCK. */
|
||||
#ifndef LZ4_DEPRECATE_WARNING_DEFBLOCK
|
||||
# define LZ4_DEPRECATE_WARNING_DEFBLOCK
|
||||
# define LZ4_GCC_VERSION (__GNUC__ * 100 + __GNUC_MINOR__)
|
||||
# if (LZ4_GCC_VERSION >= 405) || defined(__clang__)
|
||||
# define LZ4_DEPRECATED(message) __attribute__((deprecated(message)))
|
||||
# elif (LZ4_GCC_VERSION >= 301)
|
||||
# define LZ4_DEPRECATED(message) __attribute__((deprecated))
|
||||
# elif defined(_MSC_VER)
|
||||
# define LZ4_DEPRECATED(message) __declspec(deprecated(message))
|
||||
# else
|
||||
# pragma message("WARNING: You need to implement LZ4_DEPRECATED for this compiler")
|
||||
# define LZ4_DEPRECATED(message)
|
||||
# endif
|
||||
#endif /* LZ4_DEPRECATE_WARNING_DEFBLOCK */
|
||||
|
||||
/* Obsolete compression functions */
|
||||
/* These functions are planned to start generate warnings by r131 approximately */
|
||||
int LZ4_compress (const char* source, char* dest, int sourceSize);
|
||||
int LZ4_compress_limitedOutput (const char* source, char* dest, int sourceSize, int maxOutputSize);
|
||||
int LZ4_compress_withState (void* state, const char* source, char* dest, int inputSize);
|
||||
int LZ4_compress_limitedOutput_withState (void* state, const char* source, char* dest, int inputSize, int maxOutputSize);
|
||||
int LZ4_compress_continue (LZ4_stream_t* LZ4_streamPtr, const char* source, char* dest, int inputSize);
|
||||
int LZ4_compress_limitedOutput_continue (LZ4_stream_t* LZ4_streamPtr, const char* source, char* dest, int inputSize, int maxOutputSize);
|
||||
|
||||
/* Obsolete decompression functions */
|
||||
/* These function names are completely deprecated and must no longer be used.
|
||||
They are only provided here for compatibility with older programs.
|
||||
- LZ4_uncompress is the same as LZ4_decompress_fast
|
||||
- LZ4_uncompress_unknownOutputSize is the same as LZ4_decompress_safe
|
||||
These function prototypes are now disabled; uncomment them only if you really need them.
|
||||
It is highly recommended to stop using these prototypes and migrate to maintained ones */
|
||||
/* int LZ4_uncompress (const char* source, char* dest, int outputSize); */
|
||||
/* int LZ4_uncompress_unknownOutputSize (const char* source, char* dest, int isize, int maxOutputSize); */
|
||||
|
||||
/* Obsolete streaming functions; use new streaming interface whenever possible */
|
||||
LZ4_DEPRECATED("use LZ4_createStream() instead") void* LZ4_create (char* inputBuffer);
|
||||
LZ4_DEPRECATED("use LZ4_createStream() instead") int LZ4_sizeofStreamState(void);
|
||||
LZ4_DEPRECATED("use LZ4_resetStream() instead") int LZ4_resetStreamState(void* state, char* inputBuffer);
|
||||
LZ4_DEPRECATED("use LZ4_saveDict() instead") char* LZ4_slideInputBuffer (void* state);
|
||||
|
||||
/* Obsolete streaming decoding functions */
|
||||
LZ4_DEPRECATED("use LZ4_decompress_safe_usingDict() instead") int LZ4_decompress_safe_withPrefix64k (const char* src, char* dst, int compressedSize, int maxDstSize);
|
||||
LZ4_DEPRECATED("use LZ4_decompress_fast_usingDict() instead") int LZ4_decompress_fast_withPrefix64k (const char* src, char* dst, int originalSize);
|
||||
|
||||
|
||||
#if defined (__cplusplus)
|
||||
}
|
||||
#endif
|
||||
291
include/makefile
291
include/makefile
@@ -1,9 +1,8 @@
|
||||
# makefile.in generated by automake 1.11.1 from makefile.am.
|
||||
# makefile.in generated by automake 1.13.4 from makefile.am.
|
||||
# include/makefile. Generated from makefile.in by configure.
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
|
||||
# Inc.
|
||||
# Copyright (C) 1994-2013 Free Software Foundation, Inc.
|
||||
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
@@ -16,6 +15,51 @@
|
||||
|
||||
|
||||
|
||||
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
|
||||
am__make_running_with_option = \
|
||||
case $${target_option-} in \
|
||||
?) ;; \
|
||||
*) echo "am__make_running_with_option: internal error: invalid" \
|
||||
"target option '$${target_option-}' specified" >&2; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
has_opt=no; \
|
||||
sane_makeflags=$$MAKEFLAGS; \
|
||||
if $(am__is_gnu_make); then \
|
||||
sane_makeflags=$$MFLAGS; \
|
||||
else \
|
||||
case $$MAKEFLAGS in \
|
||||
*\\[\ \ ]*) \
|
||||
bs=\\; \
|
||||
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
|
||||
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
|
||||
esac; \
|
||||
fi; \
|
||||
skip_next=no; \
|
||||
strip_trailopt () \
|
||||
{ \
|
||||
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
|
||||
}; \
|
||||
for flg in $$sane_makeflags; do \
|
||||
test $$skip_next = yes && { skip_next=no; continue; }; \
|
||||
case $$flg in \
|
||||
*=*|--*) continue;; \
|
||||
-*I) strip_trailopt 'I'; skip_next=yes;; \
|
||||
-*I?*) strip_trailopt 'I';; \
|
||||
-*O) strip_trailopt 'O'; skip_next=yes;; \
|
||||
-*O?*) strip_trailopt 'O';; \
|
||||
-*l) strip_trailopt 'l'; skip_next=yes;; \
|
||||
-*l?*) strip_trailopt 'l';; \
|
||||
-[dEDm]) skip_next=yes;; \
|
||||
-[JT]) skip_next=yes;; \
|
||||
esac; \
|
||||
case $$flg in \
|
||||
*$$target_option*) has_opt=yes; break;; \
|
||||
esac; \
|
||||
done; \
|
||||
test $$has_opt = yes
|
||||
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
|
||||
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
|
||||
pkgdatadir = $(datadir)/cafe
|
||||
pkgincludedir = $(includedir)/cafe
|
||||
pkglibdir = $(libdir)/cafe
|
||||
@@ -34,22 +78,50 @@ PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = x86_64-unknown-linux-gnu
|
||||
host_triplet = x86_64-unknown-linux-gnu
|
||||
#am__append_1 = PyCafe_api.h
|
||||
#am__append_2 = PyCafe.h
|
||||
#am__append_1 = zbsread.h zbsHash.h zbsdtHelper.h zbsDataHolders.h \
|
||||
# bitshuffle/bitshuffle_core.h bitshuffle/bitshuffle.h bitshuffle/iochain.h \
|
||||
# bitshuffle/bitshuffle_internals.h
|
||||
|
||||
|
||||
#if HAVE_PYTHON_
|
||||
#include_HEADERS += PyCafe_api.h
|
||||
#endif
|
||||
am__append_2 = PyCafe.h
|
||||
#am__append_3 = PyCafe_api.h
|
||||
subdir = include
|
||||
DIST_COMMON = $(am__include_HEADERS_DIST) $(srcdir)/makefile.am \
|
||||
$(srcdir)/makefile.in
|
||||
DIST_COMMON = $(srcdir)/makefile.in $(srcdir)/makefile.am \
|
||||
$(am__include_HEADERS_DIST)
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
|
||||
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
|
||||
$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
|
||||
$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
|
||||
$(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(install_sh) -d
|
||||
CONFIG_HEADER = $(top_builddir)/./include/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
CONFIG_CLEAN_VPATH_FILES =
|
||||
AM_V_P = $(am__v_P_$(V))
|
||||
am__v_P_ = $(am__v_P_$(AM_DEFAULT_VERBOSITY))
|
||||
am__v_P_0 = false
|
||||
am__v_P_1 = :
|
||||
AM_V_GEN = $(am__v_GEN_$(V))
|
||||
am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
|
||||
am__v_GEN_0 = @echo " GEN " $@;
|
||||
am__v_GEN_1 =
|
||||
AM_V_at = $(am__v_at_$(V))
|
||||
am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
|
||||
am__v_at_0 = @
|
||||
am__v_at_1 =
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
am__include_HEADERS_DIST = cafe.h cafeCache.h cafeConvert.h \
|
||||
am__can_run_installinfo = \
|
||||
case $$AM_UPDATE_INFO_DIR in \
|
||||
n|no|NO) false;; \
|
||||
*) (install-info --version) >/dev/null 2>&1;; \
|
||||
esac
|
||||
am__include_HEADERS_DIST = config.h cafe.h cafeCache.h cafeConvert.h \
|
||||
cafeDataType.h cafeDataTypeHelper.h cafeEnum.h \
|
||||
cafeEnumStrings.h cafeRoast.h cafeVectors.h cafeXML.h \
|
||||
caopCodes.h channelRegalia.h conduit.h \
|
||||
@@ -57,11 +129,14 @@ am__include_HEADERS_DIST = cafe.h cafeCache.h cafeConvert.h \
|
||||
conduitFriends.h connect.h defines.h deviceCollection.h \
|
||||
exceptions.h exceptionsHelper.h global.h enumStrings.h \
|
||||
granules.h handleHelper.h hashConduit.h helper.h instant.h \
|
||||
instant.cpp loadCollectionXMLParser.h loadGroupXMLParser.h \
|
||||
loadCollectionXMLParser.h loadGroupXMLParser.h \
|
||||
methodCallbacks.h policies.h policyHelper.h PVCtrlHolder.h \
|
||||
PVDataHolder.h PVGroup.h PVHolder.h statusCodes.h transpose.h \
|
||||
conduitGroup.h hashConduitGroup.h restorePVGroupXMLParser.h \
|
||||
tmDateMap.h PyCafe_api.h PyCafe.h
|
||||
tmDateMap.h zbsread.h zbsHash.h zbsdtHelper.h zbsDataHolders.h \
|
||||
bitshuffle/bitshuffle_core.h bitshuffle/bitshuffle.h \
|
||||
bitshuffle/iochain.h bitshuffle/bitshuffle_internals.h \
|
||||
PyCafe.h PyCafe_api.h
|
||||
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
|
||||
am__vpath_adj = case $$p in \
|
||||
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
@@ -83,57 +158,84 @@ am__nobase_list = $(am__nobase_strip_setup); \
|
||||
am__base_list = \
|
||||
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
|
||||
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
|
||||
am__uninstall_files_from_dir = { \
|
||||
test -z "$$files" \
|
||||
|| { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
|
||||
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
|
||||
$(am__cd) "$$dir" && rm -f $$files; }; \
|
||||
}
|
||||
am__installdirs = "$(DESTDIR)$(includedir)"
|
||||
HEADERS = $(include_HEADERS)
|
||||
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
|
||||
# Read a list of newline-separated strings from the standard input,
|
||||
# and print each of them once, without duplicates. Input order is
|
||||
# *not* preserved.
|
||||
am__uniquify_input = $(AWK) '\
|
||||
BEGIN { nonempty = 0; } \
|
||||
{ items[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in items) print i; }; } \
|
||||
'
|
||||
# Make sure the list of sources is unique. This is necessary because,
|
||||
# e.g., the same source file might be shared among _SOURCES variables
|
||||
# for different programs/libraries.
|
||||
am__define_uniq_tagged_files = \
|
||||
list='$(am__tagged_files)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | $(am__uniquify_input)`
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = ${SHELL} /afs/psi.ch/project/cafe/gitlab/CAFE/cpp/missing --run aclocal-1.11
|
||||
AMTAR = ${SHELL} /afs/psi.ch/project/cafe/gitlab/CAFE/cpp/missing --run tar
|
||||
AM_CPPFLAGS = -fexceptions -fPIC -Wno-deprecated -I/usr/local/epics/base/include/ -I/usr/local/epics/base/include/os/Linux -I/opt/gfa/cafe/boost/boost_1_61_0/include/boost -I/opt/gfa/cafe/boost/boost_1_61_0/include -I/usr/include/QtCore -I/usr/include/QtXml
|
||||
AM_LDFLAGS = -L/usr/local/epics/base/lib/SL6-x86_64 -Wl,-rpath,/usr/local/epics/base/lib/SL6-x86_64 -L/usr/lib64 -Wl,-rpath,/usr/lib64
|
||||
ACLOCAL = ${SHELL} /afs/psi.ch/project/cafe/gitlab/CAFE/cpp/missing aclocal-1.13
|
||||
AMTAR = $${TAR-tar}
|
||||
AM_CPPFLAGS = -fexceptions -fPIC -std=c++1z -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/boost -I/opt/gfa/cafe/boost/boost_1_61_0/include -I/opt/gfa/python-3.8/latest/include/python3.8 -I/opt/gfa/python-3.8/latest/lib/python3.8/site-packages/numpy/core/include -I/opt/gfa/python-3.8/latest/include/qt -I/opt/gfa/python-3.8/latest/include/qt/QtCore -I/opt/gfa/python-3.8/latest/include/qt/QtXml
|
||||
AM_DEFAULT_VERBOSITY = 1
|
||||
AM_LDFLAGS = -L/usr/local/epics/base-7.0.6/lib/RHEL7-x86_64 -Wl,-rpath,/usr/local/epics/base-7.0.6/lib/RHEL7-x86_64 -L/opt/gfa/python-3.8/latest/lib -Wl,-rpath,/opt/gfa/python-3.8/latest/lib -L/opt/gfa/python-3.8/latest/lib -Wl,-rpath,/opt/gfa/python-3.8/latest/lib
|
||||
AR = ar
|
||||
AUTOCONF = ${SHELL} /afs/psi.ch/project/cafe/gitlab/CAFE/cpp/missing --run autoconf
|
||||
AUTOHEADER = ${SHELL} /afs/psi.ch/project/cafe/gitlab/CAFE/cpp/missing --run autoheader
|
||||
AUTOMAKE = ${SHELL} /afs/psi.ch/project/cafe/gitlab/CAFE/cpp/missing --run automake-1.11
|
||||
AUTOCONF = ${SHELL} /afs/psi.ch/project/cafe/gitlab/CAFE/cpp/missing autoconf
|
||||
AUTOHEADER = ${SHELL} /afs/psi.ch/project/cafe/gitlab/CAFE/cpp/missing autoheader
|
||||
AUTOMAKE = ${SHELL} /afs/psi.ch/project/cafe/gitlab/CAFE/cpp/missing automake-1.13
|
||||
AWK = gawk
|
||||
CAFE_CPPFLAGS = -I$(top_srcdir)/include
|
||||
CC = /afs/psi.ch/sys/psi.x86_64_slp6/Programming/gcc/6.3.0/bin/gcc
|
||||
CC = /opt/psi/Programming/gcc/7.5.0/bin/gcc
|
||||
CCDEPMODE = depmode=gcc3
|
||||
CFLAGS = -g -O2
|
||||
CPP = /afs/psi.ch/sys/psi.x86_64_slp6/Programming/gcc/6.3.0/bin/gcc -E
|
||||
CPPFLAGS = -fexceptions -fPIC -Wno-deprecated -I/usr/local/epics/base/include/ -I/usr/local/epics/base/include/os/Linux -I/opt/gfa/cafe/boost/boost_1_61_0/include/boost -I/opt/gfa/cafe/boost/boost_1_61_0/include -I/usr/include/QtCore -I/usr/include/QtXml
|
||||
CXX = /afs/psi.ch/sys/psi.x86_64_slp6/Programming/gcc/6.3.0/bin/g++
|
||||
CXXCPP = /afs/psi.ch/sys/psi.x86_64_slp6/Programming/gcc/6.3.0/bin/g++ -E
|
||||
CPP = /opt/psi/Programming/gcc/7.5.0/bin/gcc -E
|
||||
CPPFLAGS = -fexceptions -fPIC -std=c++1z -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/boost -I/opt/gfa/cafe/boost/boost_1_61_0/include -I/opt/gfa/python-3.8/latest/include/python3.8 -I/opt/gfa/python-3.8/latest/lib/python3.8/site-packages/numpy/core/include -I/opt/gfa/python-3.8/latest/include/qt -I/opt/gfa/python-3.8/latest/include/qt/QtCore -I/opt/gfa/python-3.8/latest/include/qt/QtXml
|
||||
CXX = /opt/psi/Programming/gcc/7.5.0/bin/g++
|
||||
CXXCPP = /opt/psi/Programming/gcc/7.5.0/bin/g++ -E
|
||||
CXXDEPMODE = depmode=gcc3
|
||||
CXXFLAGS = -g -O2
|
||||
CYGPATH_W = echo
|
||||
DEFS = -DHAVE_CONFIG_H
|
||||
DEPDIR = .deps
|
||||
DLLTOOL = false
|
||||
DSYMUTIL =
|
||||
DUMPBIN =
|
||||
ECHO_C =
|
||||
ECHO_N = -n
|
||||
ECHO_T =
|
||||
EGREP = /bin/grep -E
|
||||
EGREP = /usr/bin/grep -E
|
||||
EXEEXT =
|
||||
FGREP = /bin/grep -F
|
||||
GREP = /bin/grep
|
||||
FGREP = /usr/bin/grep -F
|
||||
GREP = /usr/bin/grep
|
||||
INSTALL = /usr/bin/install -c
|
||||
INSTALL_DATA = ${INSTALL} -m 644
|
||||
INSTALL_PROGRAM = ${INSTALL}
|
||||
INSTALL_SCRIPT = ${INSTALL}
|
||||
INSTALL_STRIP_PROGRAM = $(install_sh) -c -s
|
||||
LD = /usr/bin/ld -m elf_x86_64
|
||||
LDFLAGS = -L/usr/local/epics/base/lib/SL6-x86_64 -Wl,-rpath,/usr/local/epics/base/lib/SL6-x86_64 -L/usr/lib64 -Wl,-rpath,/usr/lib64
|
||||
LDFLAGS = -L/usr/local/epics/base-7.0.6/lib/RHEL7-x86_64 -Wl,-rpath,/usr/local/epics/base-7.0.6/lib/RHEL7-x86_64 -L/opt/gfa/python-3.8/latest/lib -Wl,-rpath,/opt/gfa/python-3.8/latest/lib -L/opt/gfa/python-3.8/latest/lib -Wl,-rpath,/opt/gfa/python-3.8/latest/lib
|
||||
LIBOBJS =
|
||||
LIBS = -lQtXml -lQtCore
|
||||
LIBS = -lpython3.8
|
||||
LIBTOOL = $(SHELL) $(top_builddir)/libtool
|
||||
LIPO =
|
||||
LN_S = ln -s
|
||||
LTLIBOBJS =
|
||||
MAKEINFO = ${SHELL} /afs/psi.ch/project/cafe/gitlab/CAFE/cpp/missing --run makeinfo
|
||||
MKDIR_P = /bin/mkdir -p
|
||||
LT_SYS_LIBRARY_PATH =
|
||||
MAKEINFO = ${SHELL} /afs/psi.ch/project/cafe/gitlab/CAFE/cpp/missing makeinfo
|
||||
MANIFEST_TOOL = :
|
||||
MKDIR_P = /usr/bin/mkdir -p
|
||||
NM = /usr/bin/nm -B
|
||||
NMEDIT =
|
||||
OBJDUMP = objdump
|
||||
@@ -143,28 +245,30 @@ OTOOL64 =
|
||||
PACKAGE = cafe
|
||||
PACKAGE_BUGREPORT = Bug reports to: jan.chrin@psi.ch
|
||||
PACKAGE_NAME = CAFE
|
||||
PACKAGE_STRING = CAFE 1.8.0
|
||||
PACKAGE_STRING = CAFE 1.19.0
|
||||
PACKAGE_TARNAME = cafe
|
||||
PACKAGE_VERSION = 1.8.0
|
||||
PACKAGE_URL =
|
||||
PACKAGE_VERSION = 1.19.0
|
||||
PATH_SEPARATOR = :
|
||||
RANLIB = ranlib
|
||||
SED = /bin/sed
|
||||
SED = /usr/bin/sed
|
||||
SET_MAKE =
|
||||
SHELL = /bin/sh
|
||||
STRIP = strip
|
||||
VERSION = 1.8.0
|
||||
VERSION = 1.19.0
|
||||
abs_builddir = /afs/psi.ch/project/cafe/gitlab/CAFE/cpp/include
|
||||
abs_srcdir = /afs/psi.ch/project/cafe/gitlab/CAFE/cpp/include
|
||||
abs_top_builddir = /afs/psi.ch/project/cafe/gitlab/CAFE/cpp
|
||||
abs_top_srcdir = /afs/psi.ch/project/cafe/gitlab/CAFE/cpp
|
||||
ac_ct_CC = /afs/psi.ch/sys/psi.x86_64_slp6/Programming/gcc/6.3.0/bin/gcc
|
||||
ac_ct_AR = ar
|
||||
ac_ct_CC = /opt/psi/Programming/gcc/7.5.0/bin/gcc
|
||||
ac_ct_CXX =
|
||||
ac_ct_DUMPBIN =
|
||||
am__include = include
|
||||
am__leading_dot = .
|
||||
am__quote =
|
||||
am__tar = ${AMTAR} chof - "$$tardir"
|
||||
am__untar = ${AMTAR} xf -
|
||||
am__tar = $${TAR-tar} chof - "$$tardir"
|
||||
am__untar = $${TAR-tar} xf -
|
||||
bindir = ${exec_prefix}/bin
|
||||
build = x86_64-unknown-linux-gnu
|
||||
build_alias =
|
||||
@@ -186,16 +290,15 @@ htmldir = ${docdir}
|
||||
includedir = ${prefix}/include
|
||||
infodir = ${datarootdir}/info
|
||||
install_sh = ${SHELL} /afs/psi.ch/project/cafe/gitlab/CAFE/cpp/install-sh
|
||||
libdir = /opt/gfa/cafe/cpp/cafe-1.8.0-gcc-6.3.0/lib
|
||||
libdir = /opt/gfa/cafe/cpp/cafe-1.19.0-py38-gcc-7.5.0/lib/RHEL7-x86_64
|
||||
libexecdir = ${exec_prefix}/libexec
|
||||
localedir = ${datarootdir}/locale
|
||||
localstatedir = ${prefix}/var
|
||||
lt_ECHO = echo
|
||||
mandir = ${datarootdir}/man
|
||||
mkdir_p = /bin/mkdir -p
|
||||
mkdir_p = $(MKDIR_P)
|
||||
oldincludedir = /usr/include
|
||||
pdfdir = ${docdir}
|
||||
prefix = /opt/gfa/cafe/cpp/cafe-1.8.0-gcc-6.3.0
|
||||
prefix = /opt/gfa/cafe/cpp/cafe-1.19.0-py38-gcc-7.5.0
|
||||
program_transform_name = s,x,x,
|
||||
psdir = ${docdir}
|
||||
sbindir = ${exec_prefix}/sbin
|
||||
@@ -206,18 +309,19 @@ target_alias =
|
||||
top_build_prefix = ../
|
||||
top_builddir = ..
|
||||
top_srcdir = ..
|
||||
include_HEADERS = cafe.h cafeCache.h cafeConvert.h cafeDataType.h \
|
||||
cafeDataTypeHelper.h cafeEnum.h cafeEnumStrings.h cafeRoast.h \
|
||||
cafeVectors.h cafeXML.h caopCodes.h channelRegalia.h conduit.h \
|
||||
include_HEADERS = config.h cafe.h cafeCache.h cafeConvert.h \
|
||||
cafeDataType.h cafeDataTypeHelper.h cafeEnum.h \
|
||||
cafeEnumStrings.h cafeRoast.h cafeVectors.h cafeXML.h \
|
||||
caopCodes.h channelRegalia.h conduit.h \
|
||||
conduitConnectionHandlerArgs.h conduitEventHandlerArgs.h \
|
||||
conduitFriends.h connect.h defines.h deviceCollection.h \
|
||||
exceptions.h exceptionsHelper.h global.h enumStrings.h \
|
||||
granules.h handleHelper.h hashConduit.h helper.h instant.h \
|
||||
instant.cpp loadCollectionXMLParser.h loadGroupXMLParser.h \
|
||||
loadCollectionXMLParser.h loadGroupXMLParser.h \
|
||||
methodCallbacks.h policies.h policyHelper.h PVCtrlHolder.h \
|
||||
PVDataHolder.h PVGroup.h PVHolder.h statusCodes.h transpose.h \
|
||||
conduitGroup.h hashConduitGroup.h restorePVGroupXMLParser.h \
|
||||
tmDateMap.h $(am__append_1) $(am__append_2)
|
||||
tmDateMap.h $(am__append_1) $(am__append_2) $(am__append_3)
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
@@ -259,8 +363,11 @@ clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
install-includeHEADERS: $(include_HEADERS)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(includedir)" || $(MKDIR_P) "$(DESTDIR)$(includedir)"
|
||||
@list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \
|
||||
if test -n "$$list"; then \
|
||||
echo " $(MKDIR_P) '$(DESTDIR)$(includedir)'"; \
|
||||
$(MKDIR_P) "$(DESTDIR)$(includedir)" || exit 1; \
|
||||
fi; \
|
||||
for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
echo "$$d$$p"; \
|
||||
@@ -274,30 +381,17 @@ uninstall-includeHEADERS:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \
|
||||
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
|
||||
test -n "$$files" || exit 0; \
|
||||
echo " ( cd '$(DESTDIR)$(includedir)' && rm -f" $$files ")"; \
|
||||
cd "$(DESTDIR)$(includedir)" && rm -f $$files
|
||||
dir='$(DESTDIR)$(includedir)'; $(am__uninstall_files_from_dir)
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
mkid -fID $$unique
|
||||
tags: TAGS
|
||||
ID: $(am__tagged_files)
|
||||
$(am__define_uniq_tagged_files); mkid -fID $$unique
|
||||
tags: tags-am
|
||||
TAGS: tags
|
||||
|
||||
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
|
||||
set x; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
$(am__define_uniq_tagged_files); \
|
||||
shift; \
|
||||
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
@@ -309,15 +403,11 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$$unique; \
|
||||
fi; \
|
||||
fi
|
||||
ctags: CTAGS
|
||||
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
ctags: ctags-am
|
||||
|
||||
CTAGS: ctags
|
||||
ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
|
||||
$(am__define_uniq_tagged_files); \
|
||||
test -z "$(CTAGS_ARGS)$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$unique
|
||||
@@ -326,6 +416,21 @@ GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& $(am__cd) $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) "$$here"
|
||||
cscopelist: cscopelist-am
|
||||
|
||||
cscopelist-am: $(am__tagged_files)
|
||||
list='$(am__tagged_files)'; \
|
||||
case "$(srcdir)" in \
|
||||
[\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
|
||||
*) sdir=$(subdir)/$(srcdir) ;; \
|
||||
esac; \
|
||||
for i in $$list; do \
|
||||
if test -f "$$i"; then \
|
||||
echo "$(subdir)/$$i"; \
|
||||
else \
|
||||
echo "$$sdir/$$i"; \
|
||||
fi; \
|
||||
done >> $(top_builddir)/cscope.files
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
@@ -377,10 +482,15 @@ install-am: all-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
if test -z '$(STRIP)'; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
install; \
|
||||
else \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
|
||||
fi
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
@@ -460,24 +570,21 @@ uninstall-am: uninstall-includeHEADERS
|
||||
|
||||
.MAKE: install-am install-strip
|
||||
|
||||
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
|
||||
clean-libtool ctags distclean distclean-generic \
|
||||
distclean-libtool distclean-tags distdir dvi dvi-am html \
|
||||
html-am info info-am install install-am install-data \
|
||||
install-data-am install-dvi install-dvi-am install-exec \
|
||||
install-exec-am install-html install-html-am \
|
||||
.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
|
||||
clean-libtool cscopelist-am ctags ctags-am distclean \
|
||||
distclean-generic distclean-libtool distclean-tags distdir dvi \
|
||||
dvi-am html html-am info info-am install install-am \
|
||||
install-data install-data-am install-dvi install-dvi-am \
|
||||
install-exec install-exec-am install-html install-html-am \
|
||||
install-includeHEADERS install-info install-info-am \
|
||||
install-man install-pdf install-pdf-am install-ps \
|
||||
install-ps-am install-strip installcheck installcheck-am \
|
||||
installdirs maintainer-clean maintainer-clean-generic \
|
||||
mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
|
||||
ps ps-am tags uninstall uninstall-am uninstall-includeHEADERS
|
||||
ps ps-am tags tags-am uninstall uninstall-am \
|
||||
uninstall-includeHEADERS
|
||||
|
||||
|
||||
#if HAVE_ZEROMQ
|
||||
#include_HEADERS += cafeService.h zhelpers.h
|
||||
#endif
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
|
||||
@@ -3,25 +3,28 @@
|
||||
## input file for production of cafe library
|
||||
##
|
||||
|
||||
include_HEADERS = cafe.h cafeCache.h cafeConvert.h cafeDataType.h cafeDataTypeHelper.h cafeEnum.h \
|
||||
cafeEnumStrings.h cafeRoast.h cafeVectors.h cafeXML.h caopCodes.h channelRegalia.h \
|
||||
conduit.h conduitConnectionHandlerArgs.h conduitEventHandlerArgs.h conduitFriends.h \
|
||||
include_HEADERS = config.h cafe.h cafeCache.h cafeConvert.h cafeDataType.h cafeDataTypeHelper.h cafeEnum.h \
|
||||
cafeEnumStrings.h cafeRoast.h cafeVectors.h cafeXML.h caopCodes.h channelRegalia.h \
|
||||
conduit.h conduitConnectionHandlerArgs.h conduitEventHandlerArgs.h conduitFriends.h \
|
||||
connect.h defines.h deviceCollection.h exceptions.h exceptionsHelper.h global.h \
|
||||
enumStrings.h granules.h handleHelper.h hashConduit.h helper.h instant.h instant.cpp \
|
||||
enumStrings.h granules.h handleHelper.h hashConduit.h helper.h instant.h \
|
||||
loadCollectionXMLParser.h loadGroupXMLParser.h methodCallbacks.h policies.h policyHelper.h \
|
||||
PVCtrlHolder.h PVDataHolder.h PVGroup.h PVHolder.h statusCodes.h transpose.h \
|
||||
conduitGroup.h hashConduitGroup.h restorePVGroupXMLParser.h tmDateMap.h
|
||||
conduitGroup.h hashConduitGroup.h restorePVGroupXMLParser.h tmDateMap.h
|
||||
|
||||
|
||||
if HAVE_ZEROMQ_
|
||||
include_HEADERS += zbsread.h zbsHash.h zbsdtHelper.h zbsDataHolders.h \
|
||||
bitshuffle/bitshuffle_core.h bitshuffle/bitshuffle.h bitshuffle/iochain.h \
|
||||
bitshuffle/bitshuffle_internals.h
|
||||
endif
|
||||
|
||||
if HAVE_PYTHON_
|
||||
#if HAVE_PYTHON_
|
||||
#include_HEADERS += PyCafe_api.h
|
||||
#endif
|
||||
|
||||
if HAVE_PYCAFE_EXT_
|
||||
include_HEADERS += PyCafe.h
|
||||
else
|
||||
include_HEADERS += PyCafe_api.h
|
||||
endif
|
||||
|
||||
if HAVE_PYCAFE_EXT
|
||||
include_HEADERS += PyCafe.h
|
||||
endif
|
||||
|
||||
#if HAVE_ZEROMQ
|
||||
#include_HEADERS += cafeService.h zhelpers.h
|
||||
#endif
|
||||
|
||||
@@ -1,28 +1,33 @@
|
||||
///
|
||||
/// \file methodCallbacks.h
|
||||
/// \author Jan Chrin, PSI
|
||||
/// \date Release: February 2015
|
||||
/// \version CAFE 1.0.0
|
||||
/// \date Release: February 2015; Updated: July 2019
|
||||
/// \version CAFE 1.9.0
|
||||
///
|
||||
/// Added handlerGetDescription
|
||||
|
||||
#ifndef METHODCALLBACKS_H
|
||||
#define METHODCALLBACKS_H
|
||||
|
||||
#include <config.h>
|
||||
|
||||
namespace CALLBACK_CAFE {
|
||||
namespace CALLBACK_CAFE
|
||||
{
|
||||
#if HAVE_PYTHON_H
|
||||
void PyHandlerPut( struct event_handler_args args);
|
||||
void PyHandlerGet( struct event_handler_args args);
|
||||
void PyHandlerPut(struct event_handler_args args);
|
||||
void PyHandlerGet(struct event_handler_args args);
|
||||
#endif
|
||||
void handlerPulseID( struct event_handler_args args) ;
|
||||
void handlerPut( struct event_handler_args args) ;
|
||||
void handlerGet( struct event_handler_args args) ;
|
||||
void handlerGetCtrl( struct event_handler_args args) ;
|
||||
void handlerGetSTSACK( struct event_handler_args args) ;
|
||||
void handlerGetClassName( struct event_handler_args args) ;
|
||||
void handlerPulseID(struct event_handler_args args);
|
||||
void handlerPut(struct event_handler_args args);
|
||||
void handlerGet(struct event_handler_args args);
|
||||
void handlerGetCtrl(struct event_handler_args args);
|
||||
void handlerGetCtrlAtConnect(struct event_handler_args args); //Python option embedded
|
||||
void handlerGetSTSACK(struct event_handler_args args);
|
||||
void handlerGetClassName(struct event_handler_args args);
|
||||
|
||||
|
||||
void handlerGetDescription(struct event_handler_args args);
|
||||
|
||||
};
|
||||
|
||||
#endif // METHODCALLBACKS_H
|
||||
|
||||
104
include/os/Linux/cafe-noqt/config.h
Normal file
104
include/os/Linux/cafe-noqt/config.h
Normal file
@@ -0,0 +1,104 @@
|
||||
/* ./include/config.h. Generated from config.in by configure. */
|
||||
/* ./include/config.in. Generated from configure.ac by autoheader. */
|
||||
|
||||
/* epics major release */
|
||||
#define EPICS_MAJOR 3
|
||||
|
||||
/* epics minor release */
|
||||
#define EPICS_MINOR 14
|
||||
|
||||
/* epics patch release */
|
||||
#define EPICS_PATCH 12
|
||||
|
||||
/* Availability of boost */
|
||||
#define HAVE_BOOST 1
|
||||
|
||||
/* boost thread library */
|
||||
/* #undef HAVE_BOOST_THREAD */
|
||||
|
||||
/* Define to 1 if you have the <cadef.h> header file. */
|
||||
#define HAVE_CADEF_H 1
|
||||
|
||||
/* Define to 1 if you have the <dlfcn.h> header file. */
|
||||
#define HAVE_DLFCN_H 1
|
||||
|
||||
/* epics version */
|
||||
#define HAVE_EPICS 3.14.12
|
||||
|
||||
/* Define to 1 if you have the <epicsTypes.h> header file. */
|
||||
#define HAVE_EPICSTYPES_H 1
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#define HAVE_INTTYPES_H 1
|
||||
|
||||
/* Define to 1 if you have the `boost_thread' library (-lboost_thread). */
|
||||
/* #undef HAVE_LIBBOOST_THREAD */
|
||||
|
||||
/* Define to 1 if you have the `QtCore' library (-lQtCore). */
|
||||
/* #undef HAVE_LIBQTCORE */
|
||||
|
||||
/* Define to 1 if you have the `QtXml' library (-lQtXml). */
|
||||
/* #undef HAVE_LIBQTXML */
|
||||
|
||||
/* linux dependency (sleep) */
|
||||
#define HAVE_LINUX 1
|
||||
|
||||
/* Define to 1 if you have the <memory.h> header file. */
|
||||
#define HAVE_MEMORY_H 1
|
||||
|
||||
/* Define to 1 if you have the <multi_index_container.hpp> header file. */
|
||||
#define HAVE_MULTI_INDEX_CONTAINER_HPP 1
|
||||
|
||||
/* Availability of Qt version 4 confirmed */
|
||||
/* #undef HAVE_QT4 */
|
||||
|
||||
/* Define to 1 if you have the <qxml.h> header file. */
|
||||
/* #undef HAVE_QXML_H */
|
||||
|
||||
/* Define to 1 if you have the <stdint.h> header file. */
|
||||
#define HAVE_STDINT_H 1
|
||||
|
||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
#define HAVE_STDLIB_H 1
|
||||
|
||||
/* Define to 1 if you have the <strings.h> header file. */
|
||||
#define HAVE_STRINGS_H 1
|
||||
|
||||
/* Define to 1 if you have the <string.h> header file. */
|
||||
#define HAVE_STRING_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||
#define HAVE_SYS_STAT_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||
#define HAVE_SYS_TYPES_H 1
|
||||
|
||||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#define HAVE_UNISTD_H 1
|
||||
|
||||
/* Define to the sub-directory where libtool stores uninstalled libraries. */
|
||||
#define LT_OBJDIR ".libs/"
|
||||
|
||||
/* Name of package */
|
||||
#define PACKAGE "cafe"
|
||||
|
||||
/* Define to the address where bug reports for this package should be sent. */
|
||||
#define PACKAGE_BUGREPORT "Bug reports to: jan.chrin@psi.ch"
|
||||
|
||||
/* Define to the full name of this package. */
|
||||
#define PACKAGE_NAME "CAFE"
|
||||
|
||||
/* Define to the full name and version of this package. */
|
||||
#define PACKAGE_STRING "CAFE 1.12.5"
|
||||
|
||||
/* Define to the one symbol short name of this package. */
|
||||
#define PACKAGE_TARNAME "cafe"
|
||||
|
||||
/* Define to the version of this package. */
|
||||
#define PACKAGE_VERSION "1.12.5"
|
||||
|
||||
/* Define to 1 if you have the ANSI C header files. */
|
||||
#define STDC_HEADERS 1
|
||||
|
||||
/* Version number of package */
|
||||
#define VERSION "1.12.5"
|
||||
157
include/os/Linux/cafe/config.h
Normal file
157
include/os/Linux/cafe/config.h
Normal file
@@ -0,0 +1,157 @@
|
||||
/* ./include/config.h. Generated from config.in by configure. */
|
||||
/* ./include/config.in. Generated from configure.ac by autoheader. */
|
||||
|
||||
/* epics major release */
|
||||
#define EPICS_MAJOR 3
|
||||
|
||||
/* epics minor release */
|
||||
#define EPICS_MINOR 14
|
||||
|
||||
/* epics patch release */
|
||||
#define EPICS_PATCH 12
|
||||
|
||||
/* Availability of boost */
|
||||
#define HAVE_BOOST 1
|
||||
|
||||
/* boost thread library */
|
||||
/* #undef HAVE_BOOST_THREAD */
|
||||
|
||||
/* Define to 1 if you have the <cadef.h> header file. */
|
||||
#define HAVE_CADEF_H 1
|
||||
|
||||
/* Availability of curl */
|
||||
/* #undef HAVE_CURL */
|
||||
|
||||
/* Define to 1 if you have the <curl/curl.h> header file. */
|
||||
/* #undef HAVE_CURL_CURL_H */
|
||||
|
||||
/* Define to 1 if you have the <dlfcn.h> header file. */
|
||||
#define HAVE_DLFCN_H 1
|
||||
|
||||
/* epics version */
|
||||
#define HAVE_EPICS 3.14.12
|
||||
|
||||
/* Define to 1 if you have the <epicsTypes.h> header file. */
|
||||
#define HAVE_EPICSTYPES_H 1
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#define HAVE_INTTYPES_H 1
|
||||
|
||||
/* Availability of json */
|
||||
/* #undef HAVE_JSON */
|
||||
|
||||
/* Define to 1 if you have the <json/json.h> header file. */
|
||||
/* #undef HAVE_JSON_JSON_H */
|
||||
|
||||
/* Define to 1 if you have the `boost_thread' library (-lboost_thread). */
|
||||
/* #undef HAVE_LIBBOOST_THREAD */
|
||||
|
||||
/* Define to 1 if you have the `curl' library (-lcurl). */
|
||||
/* #undef HAVE_LIBCURL */
|
||||
|
||||
/* Define to 1 if you have the `json_linux-gcc-6.3.0_libmt' library
|
||||
(-ljson_linux-gcc-6.3.0_libmt). */
|
||||
/* #undef HAVE_LIBJSON_LINUX_GCC_6_3_0_LIBMT */
|
||||
|
||||
/* Define to 1 if you have the `lz4' library (-llz4). */
|
||||
/* #undef HAVE_LIBLZ4 */
|
||||
|
||||
/* Define to 1 if you have the `python2.7' library (-lpython2.7). */
|
||||
/* #undef HAVE_LIBPYTHON2_7 */
|
||||
|
||||
/* Define to 1 if you have the `python3.5m' library (-lpython3.5m). */
|
||||
/* #undef HAVE_LIBPYTHON3_5M */
|
||||
|
||||
/* Define to 1 if you have the `QtCore' library (-lQtCore). */
|
||||
#define HAVE_LIBQTCORE 1
|
||||
|
||||
/* Define to 1 if you have the `QtXml' library (-lQtXml). */
|
||||
#define HAVE_LIBQTXML 1
|
||||
|
||||
/* Define to 1 if you have the `zmq' library (-lzmq). */
|
||||
/* #undef HAVE_LIBZMQ */
|
||||
|
||||
/* linux dependency (sleep) */
|
||||
#define HAVE_LINUX 1
|
||||
|
||||
/* Availability of LZ4 */
|
||||
/* #undef HAVE_LZ4 */
|
||||
|
||||
/* Define to 1 if you have the <lz4.h> header file. */
|
||||
/* #undef HAVE_LZ4_H */
|
||||
|
||||
/* Define to 1 if you have the <memory.h> header file. */
|
||||
#define HAVE_MEMORY_H 1
|
||||
|
||||
/* Define to 1 if you have the <multi_index_container.hpp> header file. */
|
||||
#define HAVE_MULTI_INDEX_CONTAINER_HPP 1
|
||||
|
||||
/* pycafe extern C */
|
||||
/* #undef HAVE_PYCAFE_EXT */
|
||||
|
||||
/* Availability of python2 */
|
||||
/* #undef HAVE_PYTHON */
|
||||
|
||||
/* Define to 1 if you have the <Python.h> header file. */
|
||||
/* #undef HAVE_PYTHON_H */
|
||||
|
||||
/* Availability of Qt version 4 confirmed */
|
||||
#define HAVE_QT4 1
|
||||
|
||||
/* Define to 1 if you have the <qxml.h> header file. */
|
||||
#define HAVE_QXML_H 1
|
||||
|
||||
/* Define to 1 if you have the <stdint.h> header file. */
|
||||
#define HAVE_STDINT_H 1
|
||||
|
||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
#define HAVE_STDLIB_H 1
|
||||
|
||||
/* Define to 1 if you have the <strings.h> header file. */
|
||||
#define HAVE_STRINGS_H 1
|
||||
|
||||
/* Define to 1 if you have the <string.h> header file. */
|
||||
#define HAVE_STRING_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||
#define HAVE_SYS_STAT_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||
#define HAVE_SYS_TYPES_H 1
|
||||
|
||||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#define HAVE_UNISTD_H 1
|
||||
|
||||
/* Availability of zeromq */
|
||||
/* #undef HAVE_ZEROMQ */
|
||||
|
||||
/* Define to 1 if you have the <zmq.h> header file. */
|
||||
/* #undef HAVE_ZMQ_H */
|
||||
|
||||
/* Define to the sub-directory in which libtool stores uninstalled libraries.
|
||||
*/
|
||||
#define LT_OBJDIR ".libs/"
|
||||
|
||||
/* Name of package */
|
||||
#define PACKAGE "cafe"
|
||||
|
||||
/* Define to the address where bug reports for this package should be sent. */
|
||||
#define PACKAGE_BUGREPORT "Bug reports to: jan.chrin@psi.ch"
|
||||
|
||||
/* Define to the full name of this package. */
|
||||
#define PACKAGE_NAME "CAFE"
|
||||
|
||||
/* Define to the full name and version of this package. */
|
||||
#define PACKAGE_STRING "CAFE 1.8.0"
|
||||
|
||||
/* Define to the one symbol short name of this package. */
|
||||
#define PACKAGE_TARNAME "cafe"
|
||||
|
||||
/* Define to the version of this package. */
|
||||
#define PACKAGE_VERSION "1.8.0"
|
||||
|
||||
/* Define to 1 if you have the ANSI C header files. */
|
||||
#define STDC_HEADERS 1
|
||||
|
||||
/* Version number of package */
|
||||
#define VERSION "1.8.0"
|
||||
157
include/os/Linux/pycafe35/config.h
Normal file
157
include/os/Linux/pycafe35/config.h
Normal file
@@ -0,0 +1,157 @@
|
||||
/* ./include/config.h. Generated from config.in by configure. */
|
||||
/* ./include/config.in. Generated from configure.ac by autoheader. */
|
||||
|
||||
/* epics major release */
|
||||
#define EPICS_MAJOR 3
|
||||
|
||||
/* epics minor release */
|
||||
#define EPICS_MINOR 14
|
||||
|
||||
/* epics patch release */
|
||||
#define EPICS_PATCH 12
|
||||
|
||||
/* Availability of boost */
|
||||
#define HAVE_BOOST 1
|
||||
|
||||
/* boost thread library */
|
||||
/* #undef HAVE_BOOST_THREAD */
|
||||
|
||||
/* Define to 1 if you have the <cadef.h> header file. */
|
||||
#define HAVE_CADEF_H 1
|
||||
|
||||
/* Availability of curl */
|
||||
/* #undef HAVE_CURL */
|
||||
|
||||
/* Define to 1 if you have the <curl/curl.h> header file. */
|
||||
/* #undef HAVE_CURL_CURL_H */
|
||||
|
||||
/* Define to 1 if you have the <dlfcn.h> header file. */
|
||||
#define HAVE_DLFCN_H 1
|
||||
|
||||
/* epics version */
|
||||
#define HAVE_EPICS 3.14.12
|
||||
|
||||
/* Define to 1 if you have the <epicsTypes.h> header file. */
|
||||
#define HAVE_EPICSTYPES_H 1
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#define HAVE_INTTYPES_H 1
|
||||
|
||||
/* Availability of json */
|
||||
/* #undef HAVE_JSON */
|
||||
|
||||
/* Define to 1 if you have the <json/json.h> header file. */
|
||||
/* #undef HAVE_JSON_JSON_H */
|
||||
|
||||
/* Define to 1 if you have the `boost_thread' library (-lboost_thread). */
|
||||
/* #undef HAVE_LIBBOOST_THREAD */
|
||||
|
||||
/* Define to 1 if you have the `curl' library (-lcurl). */
|
||||
/* #undef HAVE_LIBCURL */
|
||||
|
||||
/* Define to 1 if you have the `json_linux-gcc-6.3.0_libmt' library
|
||||
(-ljson_linux-gcc-6.3.0_libmt). */
|
||||
/* #undef HAVE_LIBJSON_LINUX_GCC_6_3_0_LIBMT */
|
||||
|
||||
/* Define to 1 if you have the `lz4' library (-llz4). */
|
||||
/* #undef HAVE_LIBLZ4 */
|
||||
|
||||
/* Define to 1 if you have the `python2.7' library (-lpython2.7). */
|
||||
/* #undef HAVE_LIBPYTHON2_7 */
|
||||
|
||||
/* Define to 1 if you have the `python3.5m' library (-lpython3.5m).
|
||||
#define HAVE_LIBPYTHON3_5M 1 */
|
||||
|
||||
/* Define to 1 if you have the `QtCore' library (-lQtCore). */
|
||||
#define HAVE_LIBQTCORE 1
|
||||
|
||||
/* Define to 1 if you have the `QtXml' library (-lQtXml). */
|
||||
#define HAVE_LIBQTXML 1
|
||||
|
||||
/* Define to 1 if you have the `zmq' library (-lzmq). */
|
||||
/* #undef HAVE_LIBZMQ */
|
||||
|
||||
/* linux dependency (sleep) */
|
||||
#define HAVE_LINUX 1
|
||||
|
||||
/* Availability of LZ4 */
|
||||
/* #undef HAVE_LZ4 */
|
||||
|
||||
/* Define to 1 if you have the <lz4.h> header file. */
|
||||
/* #undef HAVE_LZ4_H */
|
||||
|
||||
/* Define to 1 if you have the <memory.h> header file. */
|
||||
#define HAVE_MEMORY_H 1
|
||||
|
||||
/* Define to 1 if you have the <multi_index_container.hpp> header file. */
|
||||
#define HAVE_MULTI_INDEX_CONTAINER_HPP 1
|
||||
|
||||
/* pycafe extern C */
|
||||
#define HAVE_PYCAFE_EXT 1
|
||||
|
||||
/* Availability of python2 */
|
||||
#define HAVE_PYTHON 1
|
||||
|
||||
/* Define to 1 if you have the <Python.h> header file. */
|
||||
#define HAVE_PYTHON_H 1
|
||||
|
||||
/* Availability of Qt version 4 confirmed */
|
||||
#define HAVE_QT4 1
|
||||
|
||||
/* Define to 1 if you have the <qxml.h> header file. */
|
||||
#define HAVE_QXML_H 1
|
||||
|
||||
/* Define to 1 if you have the <stdint.h> header file. */
|
||||
#define HAVE_STDINT_H 1
|
||||
|
||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
#define HAVE_STDLIB_H 1
|
||||
|
||||
/* Define to 1 if you have the <strings.h> header file. */
|
||||
#define HAVE_STRINGS_H 1
|
||||
|
||||
/* Define to 1 if you have the <string.h> header file. */
|
||||
#define HAVE_STRING_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||
#define HAVE_SYS_STAT_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||
#define HAVE_SYS_TYPES_H 1
|
||||
|
||||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#define HAVE_UNISTD_H 1
|
||||
|
||||
/* Availability of zeromq */
|
||||
/* #undef HAVE_ZEROMQ */
|
||||
|
||||
/* Define to 1 if you have the <zmq.h> header file. */
|
||||
/* #undef HAVE_ZMQ_H */
|
||||
|
||||
/* Define to the sub-directory in which libtool stores uninstalled libraries.
|
||||
*/
|
||||
#define LT_OBJDIR ".libs/"
|
||||
|
||||
/* Name of package */
|
||||
#define PACKAGE "cafe"
|
||||
|
||||
/* Define to the address where bug reports for this package should be sent. */
|
||||
#define PACKAGE_BUGREPORT "Bug reports to: jan.chrin@psi.ch"
|
||||
|
||||
/* Define to the full name of this package. */
|
||||
#define PACKAGE_NAME "CAFE"
|
||||
|
||||
/* Define to the full name and version of this package. */
|
||||
#define PACKAGE_STRING "CAFE 1.12.5"
|
||||
|
||||
/* Define to the one symbol short name of this package. */
|
||||
#define PACKAGE_TARNAME "cafe"
|
||||
|
||||
/* Define to the version of this package. */
|
||||
#define PACKAGE_VERSION "1.12.5"
|
||||
|
||||
/* Define to 1 if you have the ANSI C header files. */
|
||||
#define STDC_HEADERS 1
|
||||
|
||||
/* Version number of package */
|
||||
#define VERSION "1.12.5"
|
||||
162
include/os/Linux/pycafe37/config.h
Normal file
162
include/os/Linux/pycafe37/config.h
Normal file
@@ -0,0 +1,162 @@
|
||||
/* include/config.h. Generated from config.in by configure. */
|
||||
/* ./include/config.in. Generated from configure.ac by autoheader. */
|
||||
|
||||
/* epics major release */
|
||||
#define EPICS_MAJOR 3
|
||||
|
||||
/* epics minor release */
|
||||
#define EPICS_MINOR 14
|
||||
|
||||
/* epics patch release */
|
||||
#define EPICS_PATCH 12
|
||||
|
||||
/* Availability of boost */
|
||||
#define HAVE_BOOST 1
|
||||
|
||||
/* boost thread library */
|
||||
/* #undef HAVE_BOOST_THREAD */
|
||||
|
||||
/* Define to 1 if you have the <cadef.h> header file. */
|
||||
#define HAVE_CADEF_H 1
|
||||
|
||||
/* Availability of curl */
|
||||
#define HAVE_CURL 1
|
||||
|
||||
/* Define to 1 if you have the <curl/curl.h> header file. */
|
||||
#define HAVE_CURL_CURL_H 1
|
||||
|
||||
/* Define to 1 if you have the <dlfcn.h> header file. */
|
||||
#define HAVE_DLFCN_H 1
|
||||
|
||||
/* epics version */
|
||||
#define HAVE_EPICS 3.14.12
|
||||
|
||||
/* Define to 1 if you have the <epicsTypes.h> header file. */
|
||||
#define HAVE_EPICSTYPES_H 1
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#define HAVE_INTTYPES_H 1
|
||||
|
||||
/* Availability of json */
|
||||
#define HAVE_JSON 1
|
||||
|
||||
/* Define to 1 if you have the <json/json.h> header file. */
|
||||
#define HAVE_JSON_JSON_H 1
|
||||
|
||||
/* Define to 1 if you have the `boost_thread' library (-lboost_thread). */
|
||||
/* #undef HAVE_LIBBOOST_THREAD */
|
||||
|
||||
/* Define to 1 if you have the `curl' library (-lcurl). */
|
||||
#define HAVE_LIBCURL 1
|
||||
|
||||
/* Define to 1 if you have the `json_linux-gcc-6.3.0_libmt' library
|
||||
(-ljson_linux-gcc-6.3.0_libmt). */
|
||||
#define HAVE_LIBJSON_LINUX_GCC_6_3_0_LIBMT 1
|
||||
|
||||
/* Define to 1 if you have the `lz4' library (-llz4). */
|
||||
#define HAVE_LIBLZ4 1
|
||||
|
||||
/* Define to 1 if you have the `python2.7' library (-lpython2.7). */
|
||||
/* #undef HAVE_LIBPYTHON2_7 */
|
||||
|
||||
/* Define to 1 if you have the `python3.7m' library (-lpython3.7m). */
|
||||
#define HAVE_LIBPYTHON3_7M 1
|
||||
|
||||
/* Define to 1 if you have the `Qt5Core' library (-lQt5Core). */
|
||||
/* #undef HAVE_LIBQT5CORE */
|
||||
|
||||
/* Define to 1 if you have the `Qt5Xml' library (-lQt5Xml). */
|
||||
#define HAVE_LIBQT5XML 1
|
||||
|
||||
/* Availability of Qt version 5 confirmed */
|
||||
#define HAVE_LIBQTXML 1
|
||||
|
||||
/* Define to 1 if you have the `zmq' library (-lzmq). */
|
||||
#define HAVE_LIBZMQ 1
|
||||
|
||||
/* linux dependency (sleep) */
|
||||
#define HAVE_LINUX 1
|
||||
|
||||
/* Availability of LZ4 */
|
||||
#define HAVE_LZ4 1
|
||||
|
||||
/* Define to 1 if you have the <lz4.h> header file. */
|
||||
#define HAVE_LZ4_H 1
|
||||
|
||||
/* Define to 1 if you have the <memory.h> header file. */
|
||||
#define HAVE_MEMORY_H 1
|
||||
|
||||
/* Define to 1 if you have the <multi_index_container.hpp> header file. */
|
||||
#define HAVE_MULTI_INDEX_CONTAINER_HPP 1
|
||||
|
||||
/* pycafe extern C */
|
||||
#define HAVE_PYCAFE_EXT 1
|
||||
|
||||
/* Availability of python2 */
|
||||
#define HAVE_PYTHON 1
|
||||
|
||||
/* Define to 1 if you have the <Python.h> header file. */
|
||||
#define HAVE_PYTHON_H 1
|
||||
|
||||
/* Availability of Qt version 5 confirmed */
|
||||
#define HAVE_QT5 1
|
||||
|
||||
/* Define to 1 if you have the <qxml.h> header file. */
|
||||
#define HAVE_QXML_H 1
|
||||
|
||||
/* Define to 1 if you have the <stdint.h> header file. */
|
||||
#define HAVE_STDINT_H 1
|
||||
|
||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
#define HAVE_STDLIB_H 1
|
||||
|
||||
/* Define to 1 if you have the <strings.h> header file. */
|
||||
#define HAVE_STRINGS_H 1
|
||||
|
||||
/* Define to 1 if you have the <string.h> header file. */
|
||||
#define HAVE_STRING_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||
#define HAVE_SYS_STAT_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||
#define HAVE_SYS_TYPES_H 1
|
||||
|
||||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#define HAVE_UNISTD_H 1
|
||||
|
||||
/* Availability of zeromq */
|
||||
#define HAVE_ZEROMQ 1
|
||||
|
||||
/* Define to 1 if you have the <zmq.h> header file. */
|
||||
#define HAVE_ZMQ_H 1
|
||||
|
||||
/* Define to the sub-directory where libtool stores uninstalled libraries. */
|
||||
#define LT_OBJDIR ".libs/"
|
||||
|
||||
/* Name of package */
|
||||
#define PACKAGE "cafe"
|
||||
|
||||
/* Define to the address where bug reports for this package should be sent. */
|
||||
#define PACKAGE_BUGREPORT "Bug reports to: jan.chrin@psi.ch"
|
||||
|
||||
/* Define to the full name of this package. */
|
||||
#define PACKAGE_NAME "CAFE"
|
||||
|
||||
/* Define to the full name and version of this package. */
|
||||
#define PACKAGE_STRING "CAFE 1.12.5"
|
||||
|
||||
/* Define to the one symbol short name of this package. */
|
||||
#define PACKAGE_TARNAME "cafe"
|
||||
|
||||
/* Define to the version of this package. */
|
||||
#define PACKAGE_VERSION "1.12.5"
|
||||
|
||||
/* Availability of Qt version 5 confirmed */
|
||||
#define QT_NO_VERSION_TAGGING 1
|
||||
|
||||
/* Define to 1 if you have the ANSI C header files. */
|
||||
#define STDC_HEADERS 1
|
||||
|
||||
/* Version number of package */
|
||||
#define VERSION "1.12.5"
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user