Compare commits
25 Commits
cafe-1.5.0
...
cafe-1.18.
| Author | SHA1 | Date | |
|---|---|---|---|
| d40ecbc53c | |||
| 9b5803b7f0 | |||
| 7e31c8fd80 | |||
| 64fda927e0 | |||
| 9851b72ba2 | |||
| 8c671dee59 | |||
| 844afa0a02 | |||
| 4cab5862dc | |||
| c2934ce3f7 | |||
| 7c779d9add | |||
| 80ce12d374 | |||
| 90e063f930 | |||
| cc804d2e7b | |||
| cecf4a3f11 | |||
| 275bf4ad10 | |||
| 22583f38b6 | |||
| 5f5cfc97fa | |||
| 6006091f2e | |||
| 7ba4128448 | |||
| 7504b0a539 | |||
| d459a98a4f | |||
| dc1759933f | |||
| ab743baa8b | |||
| b09186294d | |||
| 52fe50f14a |
23
.gitignore
vendored
23
.gitignore
vendored
@@ -1,19 +1,38 @@
|
||||
# Temporary editor files #
|
||||
##########################
|
||||
*~
|
||||
|
||||
# AFS temporary files #
|
||||
#######################
|
||||
.__afs*
|
||||
|
||||
# Temporary (build) files #
|
||||
###########################
|
||||
*.bak
|
||||
aclocal.m4
|
||||
autom4te.cache
|
||||
config.*
|
||||
config.in
|
||||
configure
|
||||
depcomp
|
||||
install-sh
|
||||
ltmain.sh
|
||||
m4
|
||||
makefile
|
||||
makefile.in
|
||||
missing
|
||||
|
||||
# Archived files #
|
||||
##################
|
||||
include/*.*-*
|
||||
include/*.*.orig
|
||||
src/*.*-*
|
||||
src/*.*.orig
|
||||
# Compiled source #
|
||||
###################
|
||||
src/*.o
|
||||
src/*.lo
|
||||
src/*.la
|
||||
src/.deps/*
|
||||
src/.libs/*
|
||||
examples/cafeTest/*.*-
|
||||
doc
|
||||
|
||||
|
||||
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.
|
||||
|
||||
|
||||
25
MakefileWin/config.h
Normal file
25
MakefileWin/config.h
Normal file
@@ -0,0 +1,25 @@
|
||||
|
||||
/* 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/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 */
|
||||
|
||||
|
||||
36
README
36
README
@@ -1,3 +1,20 @@
|
||||
##
|
||||
autogen_rel_py3.sh ==> generates library for use from within python and C++
|
||||
autogen_rel_py3_noqt.sh ==> generates library for use from within python and C++ (remove Qt4 dependency if xml not required)
|
||||
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
|
||||
##
|
||||
@@ -8,18 +25,21 @@
|
||||
## 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
|
||||
|
||||
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
autogen_cafepy3_release.sh
|
||||
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
|
||||
|
||||
@@ -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
|
||||
|
||||
#--enable-boost --with-boost=/afs/psi.ch/intranet/Controls/BD/deps/boost_1_57_0 \
|
||||
CAFE_VERSION=cafepy3-1.7.0-alpha
|
||||
#CAFE_VERSION=cafe-1.1.0
|
||||
|
||||
./configure \
|
||||
--prefix=/afs/psi.ch/intranet/Controls/cafe/CAFE/cafe/${CAFE_VERSION} \
|
||||
--libdir=/afs/psi.ch/intranet/Controls/cafe/CAFE/cafe/${CAFE_VERSION}/lib/${EPICS_HOST_ARCH} \
|
||||
--enable-boost --with-boost=/afs/psi.ch/intranet/Controls/cafe/CAFE/boost/boost_1_57_0 \
|
||||
--enable-epics --with-epics=${EPICS} \
|
||||
--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
|
||||
|
||||
@@ -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.5.0-final-1
|
||||
|
||||
./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.5.0-final-1
|
||||
CYCAFE_VERSION=pycafe-noqt-1.5.0-final-1
|
||||
|
||||
./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 \
|
||||
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,48 +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.5.0-final-1
|
||||
|
||||
|
||||
./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,45 +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
|
||||
|
||||
#--enable-boost --with-boost=/afs/psi.ch/intranet/Controls/BD/deps/boost_1_57_0 \
|
||||
|
||||
CAFE_VERSION=cafe-noqt-1.5.0-final-1
|
||||
|
||||
|
||||
./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
|
||||
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 #7.5.0 for py38
|
||||
### 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.18.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)
|
||||
#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
|
||||
|
||||
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
860
config.log
Normal file
860
config.log
Normal file
@@ -0,0 +1,860 @@
|
||||
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.18.0, which was
|
||||
generated by GNU Autoconf 2.69. Invocation command line was
|
||||
|
||||
$ ./configure --prefix=/opt/gfa/cafe/cpp/cafe-1.18.0-gcc-7.3.0 --libdir=/opt/gfa/cafe/cpp/cafe-1.18.0-gcc-7.3.0/lib/RHEL7-x86_64 --enable-boost-inc --enable-epics7 --enable-qt5 --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
|
||||
|
||||
## --------- ##
|
||||
## Platform. ##
|
||||
## --------- ##
|
||||
|
||||
hostname = sf-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: /opt/psi/Programming/gcc/7.3.0/bin
|
||||
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: /sf/controls/bin
|
||||
PATH: /sf/diag/bin
|
||||
PATH: /sf/bd/bin
|
||||
PATH: /opt/psi/Tools/Pmodules/0.99.10/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/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.3.0/bin/g++ --version >&5
|
||||
g++ ('PSI Environment Module') 7.3.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.3.0/bin/g++ -v >&5
|
||||
Using built-in specs.
|
||||
COLLECT_GCC=/opt/psi/Programming/gcc/7.3.0/bin/g++
|
||||
COLLECT_LTO_WRAPPER=/afs/psi.ch/sys/psi.x86_64_slp6/Programming/gcc/7.3.0/bin/../libexec/gcc/x86_64-pc-linux-gnu/7.3.0/lto-wrapper
|
||||
Target: x86_64-pc-linux-gnu
|
||||
Configured with: /opt/tmp/stadler_h/src/gcc-7.3.0/configure --prefix=/opt/psi/Programming/gcc/7.3.0 --enable-languages=c,c++,objc,obj-c++,lto,fortran --with-gmp=/opt/psi/Libraries/gmp/6.1.2 --with-mpfr=/opt/psi/Libraries/mpfr/4.0.0 --with-mpc=/opt/psi/Libraries/mpc/1.1.0 --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.3.0 ('PSI Environment Module')
|
||||
configure:3167: $? = 0
|
||||
configure:3156: /opt/psi/Programming/gcc/7.3.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.3.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.3.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.3.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.3.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.3.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.3.0/bin/g++ -c conftest.cpp >&5
|
||||
configure:3440: $? = 0
|
||||
configure:3449: result: yes
|
||||
configure:3458: checking whether /opt/psi/Programming/gcc/7.3.0/bin/g++ accepts -g
|
||||
configure:3478: /opt/psi/Programming/gcc/7.3.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.3.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.3.0/bin/gcc
|
||||
configure:4204: checking for C compiler version
|
||||
configure:4213: /opt/psi/Programming/gcc/7.3.0/bin/gcc --version >&5
|
||||
gcc ('PSI Environment Module') 7.3.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.3.0/bin/gcc -v >&5
|
||||
Using built-in specs.
|
||||
COLLECT_GCC=/opt/psi/Programming/gcc/7.3.0/bin/gcc
|
||||
COLLECT_LTO_WRAPPER=/afs/psi.ch/sys/psi.x86_64_slp6/Programming/gcc/7.3.0/bin/../libexec/gcc/x86_64-pc-linux-gnu/7.3.0/lto-wrapper
|
||||
Target: x86_64-pc-linux-gnu
|
||||
Configured with: /opt/tmp/stadler_h/src/gcc-7.3.0/configure --prefix=/opt/psi/Programming/gcc/7.3.0 --enable-languages=c,c++,objc,obj-c++,lto,fortran --with-gmp=/opt/psi/Libraries/gmp/6.1.2 --with-mpfr=/opt/psi/Libraries/mpfr/4.0.0 --with-mpc=/opt/psi/Libraries/mpc/1.1.0 --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.3.0 ('PSI Environment Module')
|
||||
configure:4224: $? = 0
|
||||
configure:4213: /opt/psi/Programming/gcc/7.3.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.3.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.3.0/bin/gcc -c conftest.c >&5
|
||||
configure:4247: $? = 0
|
||||
configure:4256: result: yes
|
||||
configure:4265: checking whether /opt/psi/Programming/gcc/7.3.0/bin/gcc accepts -g
|
||||
configure:4285: /opt/psi/Programming/gcc/7.3.0/bin/gcc -c -g conftest.c >&5
|
||||
configure:4285: $? = 0
|
||||
configure:4326: result: yes
|
||||
configure:4343: checking for /opt/psi/Programming/gcc/7.3.0/bin/gcc option to accept ISO C89
|
||||
configure:4406: /opt/psi/Programming/gcc/7.3.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.3.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.3.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.3.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.3.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.3.0/bin/gcc object
|
||||
configure:6568: /opt/psi/Programming/gcc/7.3.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.3.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.3.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.3.0/bin/gcc -E conftest.c
|
||||
configure:7928: $? = 0
|
||||
configure:7942: /opt/psi/Programming/gcc/7.3.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.18.0"
|
||||
| #define PACKAGE_STRING "CAFE 1.18.0"
|
||||
| #define PACKAGE_BUGREPORT "Bug reports to: jan.chrin@psi.ch"
|
||||
| #define PACKAGE_URL ""
|
||||
| #define PACKAGE "cafe"
|
||||
| #define VERSION "1.18.0"
|
||||
| /* end confdefs.h. */
|
||||
| #include <ac_nonexistent.h>
|
||||
configure:7967: result: /opt/psi/Programming/gcc/7.3.0/bin/gcc -E
|
||||
configure:7987: /opt/psi/Programming/gcc/7.3.0/bin/gcc -E conftest.c
|
||||
configure:7987: $? = 0
|
||||
configure:8001: /opt/psi/Programming/gcc/7.3.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.18.0"
|
||||
| #define PACKAGE_STRING "CAFE 1.18.0"
|
||||
| #define PACKAGE_BUGREPORT "Bug reports to: jan.chrin@psi.ch"
|
||||
| #define PACKAGE_URL ""
|
||||
| #define PACKAGE "cafe"
|
||||
| #define VERSION "1.18.0"
|
||||
| /* end confdefs.h. */
|
||||
| #include <ac_nonexistent.h>
|
||||
configure:8030: checking for ANSI C header files
|
||||
configure:8050: /opt/psi/Programming/gcc/7.3.0/bin/gcc -c -g -O2 conftest.c >&5
|
||||
configure:8050: $? = 0
|
||||
configure:8123: /opt/psi/Programming/gcc/7.3.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.3.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.3.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.3.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.3.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.3.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.3.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.3.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.3.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.3.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.3.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.3.0/bin/gcc supports -fno-rtti -fno-exceptions
|
||||
configure:8724: /opt/psi/Programming/gcc/7.3.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.3.0/bin/gcc option to produce PIC
|
||||
configure:9106: result: -fPIC -DPIC
|
||||
configure:9114: checking if /opt/psi/Programming/gcc/7.3.0/bin/gcc PIC flag -fPIC -DPIC works
|
||||
configure:9132: /opt/psi/Programming/gcc/7.3.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.3.0/bin/gcc static flag -static works
|
||||
configure:9206: result: no
|
||||
configure:9221: checking if /opt/psi/Programming/gcc/7.3.0/bin/gcc supports -c -o file.o
|
||||
configure:9242: /opt/psi/Programming/gcc/7.3.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.3.0/bin/gcc supports -c -o file.o
|
||||
configure:9323: result: yes
|
||||
configure:9356: checking whether the /opt/psi/Programming/gcc/7.3.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.3.0/bin/gcc -c -g -O2 conftest.c >&5
|
||||
configure:10663: $? = 0
|
||||
configure:10678: /opt/psi/Programming/gcc/7.3.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.3.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.3.0/bin/g++ -E conftest.cpp
|
||||
configure:12495: $? = 0
|
||||
configure:12509: /opt/psi/Programming/gcc/7.3.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.18.0"
|
||||
| #define PACKAGE_STRING "CAFE 1.18.0"
|
||||
| #define PACKAGE_BUGREPORT "Bug reports to: jan.chrin@psi.ch"
|
||||
| #define PACKAGE_URL ""
|
||||
| #define PACKAGE "cafe"
|
||||
| #define VERSION "1.18.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.3.0/bin/g++ -E
|
||||
configure:12554: /opt/psi/Programming/gcc/7.3.0/bin/g++ -E conftest.cpp
|
||||
configure:12554: $? = 0
|
||||
configure:12568: /opt/psi/Programming/gcc/7.3.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.18.0"
|
||||
| #define PACKAGE_STRING "CAFE 1.18.0"
|
||||
| #define PACKAGE_BUGREPORT "Bug reports to: jan.chrin@psi.ch"
|
||||
| #define PACKAGE_URL ""
|
||||
| #define PACKAGE "cafe"
|
||||
| #define VERSION "1.18.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.3.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.3.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.3.0/bin/g++ -c -g -O2 conftest.cpp >&5
|
||||
configure:13986: $? = 0
|
||||
configure:14467: checking for /opt/psi/Programming/gcc/7.3.0/bin/g++ option to produce PIC
|
||||
configure:14474: result: -fPIC -DPIC
|
||||
configure:14482: checking if /opt/psi/Programming/gcc/7.3.0/bin/g++ PIC flag -fPIC -DPIC works
|
||||
configure:14500: /opt/psi/Programming/gcc/7.3.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.3.0/bin/g++ static flag -static works
|
||||
configure:14568: result: no
|
||||
configure:14580: checking if /opt/psi/Programming/gcc/7.3.0/bin/g++ supports -c -o file.o
|
||||
configure:14601: /opt/psi/Programming/gcc/7.3.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.3.0/bin/g++ supports -c -o file.o
|
||||
configure:14679: result: yes
|
||||
configure:14709: checking whether the /opt/psi/Programming/gcc/7.3.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.3.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.3.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.3.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.3.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.3.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.3.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.3.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.3.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.3.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:17014: checking qxml.h usability
|
||||
configure:17014: /opt/psi/Programming/gcc/7.3.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.7/latest/include/qt -I/opt/gfa/python-3.7/latest/include/qt/QtCore -I/opt/gfa/python-3.7/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.3.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.7/latest/include/qt -I/opt/gfa/python-3.7/latest/include/qt/QtCore -I/opt/gfa/python-3.7/latest/include/qt/QtXml conftest.cpp
|
||||
configure:17014: $? = 0
|
||||
configure:17014: result: yes
|
||||
configure:17014: checking for qxml.h
|
||||
configure:17014: result: yes
|
||||
configure:17124: checking for write in -lQt5Core
|
||||
configure:17149: /opt/psi/Programming/gcc/7.3.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.7/latest/include/qt -I/opt/gfa/python-3.7/latest/include/qt/QtCore -I/opt/gfa/python-3.7/latest/include/qt/QtXml -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.7/latest/lib -Wl,-rpath,/opt/gfa/python-3.7/latest/lib conftest.cpp -lQt5Core >&5
|
||||
configure:17149: $? = 0
|
||||
configure:17158: result: yes
|
||||
configure:17176: checking for qt_version_tag in -lQt5Xml
|
||||
configure:17201: /opt/psi/Programming/gcc/7.3.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.7/latest/include/qt -I/opt/gfa/python-3.7/latest/include/qt/QtCore -I/opt/gfa/python-3.7/latest/include/qt/QtXml -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.7/latest/lib -Wl,-rpath,/opt/gfa/python-3.7/latest/lib conftest.cpp -lQt5Xml -lQt5Core >&5
|
||||
configure:17201: $? = 0
|
||||
configure:17210: result: yes
|
||||
configure:18061: checking that generated files are newer than configure
|
||||
configure:18067: result: done
|
||||
configure:18106: creating ./config.status
|
||||
|
||||
## ---------------------- ##
|
||||
## Running config.status. ##
|
||||
## ---------------------- ##
|
||||
|
||||
This file was extended by CAFE config.status 1.18.0, which was
|
||||
generated by GNU Autoconf 2.69. Invocation command line was
|
||||
|
||||
CONFIG_FILES =
|
||||
CONFIG_HEADERS =
|
||||
CONFIG_LINKS =
|
||||
CONFIG_COMMANDS =
|
||||
$ ./config.status
|
||||
|
||||
on sf-lc7.psi.ch
|
||||
|
||||
config.status:1178: creating makefile
|
||||
config.status:1178: creating src/makefile
|
||||
config.status:1178: creating include/makefile
|
||||
config.status:1178: creating ./include/config.h
|
||||
config.status:1407: executing depfiles commands
|
||||
config.status:1407: executing libtool commands
|
||||
|
||||
## ---------------- ##
|
||||
## 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.3.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.3.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_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_Qt5Core_write=yes
|
||||
ac_cv_lib_Qt5Xml_qt_version_tag=yes
|
||||
ac_cv_lib_ca_main=yes
|
||||
ac_cv_lib_dl_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.3.0/bin/gcc -E'
|
||||
ac_cv_prog_CXXCPP='/opt/psi/Programming/gcc/7.3.0/bin/g++ -E'
|
||||
ac_cv_prog_ac_ct_AR=ar
|
||||
ac_cv_prog_ac_ct_CC=/opt/psi/Programming/gcc/7.3.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.7/latest/include/qt -I/opt/gfa/python-3.7/latest/include/qt/QtCore -I/opt/gfa/python-3.7/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.7/latest/lib -Wl,-rpath,/opt/gfa/python-3.7/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.3.0/bin/gcc'
|
||||
CCDEPMODE='depmode=gcc3'
|
||||
CFLAGS='-g -O2'
|
||||
CPP='/opt/psi/Programming/gcc/7.3.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.7/latest/include/qt -I/opt/gfa/python-3.7/latest/include/qt/QtCore -I/opt/gfa/python-3.7/latest/include/qt/QtXml'
|
||||
CXX='/opt/psi/Programming/gcc/7.3.0/bin/g++'
|
||||
CXXCPP='/opt/psi/Programming/gcc/7.3.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.7/latest/lib -Wl,-rpath,/opt/gfa/python-3.7/latest/lib '
|
||||
LIBOBJS=''
|
||||
LIBS='-lQt5Xml -lQt5Core '
|
||||
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.18.0'
|
||||
PACKAGE_TARNAME='cafe'
|
||||
PACKAGE_URL=''
|
||||
PACKAGE_VERSION='1.18.0'
|
||||
PATH_SEPARATOR=':'
|
||||
RANLIB='ranlib'
|
||||
SED='/usr/bin/sed'
|
||||
SET_MAKE=''
|
||||
SHELL='/bin/sh'
|
||||
STRIP='strip'
|
||||
VERSION='1.18.0'
|
||||
ac_ct_AR='ar'
|
||||
ac_ct_CC='/opt/psi/Programming/gcc/7.3.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.18.0-gcc-7.3.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.18.0-gcc-7.3.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.18.0"
|
||||
#define PACKAGE_STRING "CAFE 1.18.0"
|
||||
#define PACKAGE_BUGREPORT "Bug reports to: jan.chrin@psi.ch"
|
||||
#define PACKAGE_URL ""
|
||||
#define PACKAGE "cafe"
|
||||
#define VERSION "1.18.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 3.14.12
|
||||
#define EPICS_MAJOR 3
|
||||
#define EPICS_MINOR 14
|
||||
#define EPICS_PATCH 12
|
||||
#define HAVE_MULTI_INDEX_CONTAINER_HPP 1
|
||||
#define HAVE_BOOST 1
|
||||
#define HAVE_QXML_H 1
|
||||
#define HAVE_LIBQT5CORE 1
|
||||
#define HAVE_LIBQT5XML 1
|
||||
#define HAVE_QT 1
|
||||
#define HAVE_LIBQTXML 1
|
||||
#define QT_NO_VERSION_TAGGING 1
|
||||
|
||||
configure: exit 0
|
||||
2222
config.status
Executable file
2222
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
@@ -1 +1 @@
|
||||
configure6064d.ac
|
||||
configurePSI.ac
|
||||
1191
configure.ac-Mar10
Normal file
1191
configure.ac-Mar10
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,671 +0,0 @@
|
||||
## CAFE (Channel Access interFacE)
|
||||
## Author: Jan Chrin, GFA, PSI
|
||||
##
|
||||
## configure.ac is processed by autoconf
|
||||
##
|
||||
## output: configure.in file for building the cafe library
|
||||
##
|
||||
|
||||
# Standard macros
|
||||
AC_PREREQ(2.63)
|
||||
AC_COPYRIGHT([CAFE,Jan Chrin, 2013])
|
||||
AC_INIT([CAFE], [1.0.0], [Bug reports to: jan.chrin@psi.ch])
|
||||
|
||||
AC_CONFIG_AUX_DIR(./)
|
||||
|
||||
AC_CONFIG_MACRO_DIR([m4])
|
||||
m4_pattern_allow([AC_CONFIG_MACRO])
|
||||
|
||||
|
||||
AM_INIT_AUTOMAKE
|
||||
AC_CONFIG_SRCDIR([./include/cafe.h])
|
||||
|
||||
AC_LANG_CPLUSPLUS
|
||||
|
||||
AC_CONFIG_HEADER([./include/config.h:./include/config.in])
|
||||
AC_PROG_CXX
|
||||
|
||||
# library creation
|
||||
AC_PROG_LIBTOOL
|
||||
LT_INIT
|
||||
|
||||
|
||||
AC_DEFINE_UNQUOTED(HAVE_LINUX, 1, [linux dependency (sleep)])
|
||||
|
||||
CPPFLAGS=" -fexceptions -fPIC"
|
||||
#CPPFLAGS=" -pg"
|
||||
# provide include directories
|
||||
AC_SUBST([CAFE_CPPFLAGS], '-I$(top_srcdir)/include ')
|
||||
|
||||
##---------------------------------------------------------------------------
|
||||
##-- EPICS -- path and options
|
||||
##
|
||||
EPICS_PREFIX=""
|
||||
EPICS_INCL_PATH=""
|
||||
EPICS_LIB_PATH=""
|
||||
## Add epics release
|
||||
|
||||
EPICS_MAJOR_DEFAULT="3"
|
||||
EPICS_MINOR_DEFAULT="14"
|
||||
EPICS_PATCH_DEFAULT="12"
|
||||
|
||||
EPICS_MAJOR_REL=${EPICS_MAJOR_DEFAULT}
|
||||
EPICS_MINOR_REL=${EPICS_MINOR_DEFAULT}
|
||||
EPICS_PATCH_REL=${EPICS_PATCH_DEFAULT}
|
||||
|
||||
#overwrite default with actual if determined
|
||||
if test "${CAFE_EPICS_V_MAJOR}" != ""; then
|
||||
EPICS_MAJOR_REL=${CAFE_EPICS_V_MAJOR}
|
||||
fi
|
||||
if test "${CAFE_EPICS_V_MINOR}" != ""; then
|
||||
EPICS_MINOR_REL=${CAFE_EPICS_V_MINOR}
|
||||
fi
|
||||
if test "${CAFE_EPICS_V_PATCH}" != ""; then
|
||||
EPICS_PATCH_REL=${CAFE_EPICS_V_PATCH}
|
||||
fi
|
||||
|
||||
AC_ARG_ENABLE(
|
||||
[epics],
|
||||
AC_HELP_STRING([--enable-epics],
|
||||
[enable epics use [default=no]]),
|
||||
[HAVE_EPICS=true],
|
||||
[HAVE_EPICS=false])
|
||||
|
||||
AC_ARG_WITH(
|
||||
epics,
|
||||
AC_HELP_STRING(
|
||||
[--with-epics location of EPICS],
|
||||
[prefix where the epics libraries and include files are to be found]),
|
||||
[HAVE_EPICS=true
|
||||
EPICS_PREFIX=$withval
|
||||
EPICS_INCL_PATH="-I"${EPICS_PREFIX}"/include/ -I"${EPICS_PREFIX}"/include/os/Linux"
|
||||
EPICS_LIB_PATH=${EPICS_PREFIX}"/lib/"${EPICS_HOST_ARCH}])
|
||||
|
||||
#echo "TEST ", $EPICS_LIB_PATH
|
||||
##
|
||||
##-- end EPICS -- path and options
|
||||
##---------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
##===========================================================================
|
||||
##== Check for header files and libraries.
|
||||
##===========================================================================
|
||||
|
||||
|
||||
##---------------------------------------------------------------------------
|
||||
##-- EPICS -- check header files and libs
|
||||
##
|
||||
AC_LANG_PUSH([C++])
|
||||
|
||||
if test $HAVE_EPICS == true; then
|
||||
|
||||
# Change flags: if all tests are successfull, accept this changes; if
|
||||
# the tests are not successfull, use the old flags.
|
||||
if test "${EPICS_PREFIX}" != "" ; then
|
||||
TEMP_CPPFLAGS=${CPPFLAGS}
|
||||
CPPFLAGS=${CPPFLAGS}" "${EPICS_INCL_PATH}
|
||||
TEMP_LDFLAGS=${LDFLAGS}
|
||||
LDFLAGS=${LDFLAGS}" -L"${EPICS_LIB_PATH}" -Wl,-rpath,"${EPICS_LIB_PATH}
|
||||
fi
|
||||
|
||||
if test x$HAVE_EPICS == xtrue ; then
|
||||
AC_CHECK_HEADERS(
|
||||
[cadef.h],
|
||||
[HAVE_EPICS=true],
|
||||
[HAVE_EPICS=false
|
||||
AC_MSG_WARN(cadef.h not found!)],
|
||||
[])
|
||||
fi
|
||||
|
||||
if test x$HAVE_EPICS == xtrue ; then
|
||||
AC_CHECK_HEADERS(
|
||||
[epicsTypes.h],
|
||||
[HAVE_EPICS=true],
|
||||
[HAVE_EPICS=false
|
||||
AC_MSG_WARN(epicsTypes.h not found!)],
|
||||
[])
|
||||
fi
|
||||
|
||||
|
||||
if test x$HAVE_EPICS == xtrue ; then
|
||||
AC_CHECK_LIB(ca,[main],
|
||||
[HAVE_EPICS=true],
|
||||
[HAVE_EPICS=false
|
||||
AC_MSG_WARN(libca either not found or not operational!)])
|
||||
fi
|
||||
|
||||
|
||||
if test x$HAVE_EPICS == xtrue ; then
|
||||
AC_CHECK_LIB(Com,[main],
|
||||
[HAVE_EPICS=true],
|
||||
[HAVE_EPICS=false
|
||||
AC_MSG_WARN(libCom either not found or not operational!)])
|
||||
fi
|
||||
|
||||
if test x$HAVE_EPICS == xtrue ; then
|
||||
AC_CHECK_LIB(dl,[main],
|
||||
[HAVE_EPICS=true],
|
||||
[HAVE_EPICS=false
|
||||
AC_MSG_WARN(libdl either not found or not operational!)])
|
||||
fi
|
||||
|
||||
#echo " HAVE EPICS? " $HAVE_EPICS x$HAVE_EPICS
|
||||
|
||||
# If all checks are OK we add rlog to the CXXFLAGS.
|
||||
if test x$HAVE_EPICS != xtrue ; then
|
||||
if test "${EPICS_PREFIX}" != "" ; then
|
||||
CPPFLAGS=${TEMP_CPPFLAGS}
|
||||
LDFLAGS=${TEMP_LDFLAGS}
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
echo "LDFLAGS__> $LDFLAGS "
|
||||
|
||||
if test x$HAVE_EPICS == xtrue ; then
|
||||
AC_DEFINE_UNQUOTED(HAVE_EPICS, ${EPICS_MAJOR_REL}.${EPICS_MINOR_REL}.${EPICS_PATCH_REL}, [epics version])
|
||||
AC_DEFINE_UNQUOTED(EPICS_MAJOR, ${EPICS_MAJOR_REL}, [epics major release])
|
||||
AC_DEFINE_UNQUOTED(EPICS_MINOR, ${EPICS_MINOR_REL}, [epics minor release])
|
||||
AC_DEFINE_UNQUOTED(EPICS_PATCH, ${EPICS_PATCH_REL}, [epics patch release])
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
AC_LANG_POP
|
||||
##
|
||||
##-- end EPICS -- check header files and libs
|
||||
##---------------------------------------------------------------------------
|
||||
|
||||
|
||||
##---------------------------------------------------------------------------
|
||||
##-- BOOST -- path and options -
|
||||
##-- Boost libraries are mainly header-only, i.e. they consist of header files
|
||||
##-- containing templates and inline functions, and require no separately-compiled
|
||||
##-- library binaries or special treatment when linking
|
||||
##
|
||||
BOOST_PREFIX=""
|
||||
BOOST_INCL_PATH=""
|
||||
BOOST_LIB_PATH=""
|
||||
BOOST_OPTION=""
|
||||
|
||||
AC_ARG_ENABLE(
|
||||
[boost-inc],
|
||||
AC_HELP_STRING([--enable-boost-inc],
|
||||
[enable boost use [default=no]]),
|
||||
[HAVE_BOOST_=true],
|
||||
[HAVE_BOOST_=false])
|
||||
|
||||
AC_ARG_WITH(
|
||||
boost-inc,
|
||||
AC_HELP_STRING(
|
||||
[--with-boost-inc = location of BOOST],
|
||||
[prefix giving the boost base directory]),
|
||||
[HAVE_BOOST_=true
|
||||
BOOST_PREFIX=$withval
|
||||
BOOST_INCL_PATH="-I"${BOOST_PREFIX}"/boost -I"${BOOST_PREFIX}
|
||||
#BOOST_LIB_PATH=${BOOST_PREFIX}"/lib "
|
||||
])
|
||||
|
||||
|
||||
AC_ARG_ENABLE(
|
||||
[boost-lib],
|
||||
AC_HELP_STRING([--enable-boost-lib],
|
||||
[enable boost lib use [default=no]]),
|
||||
[HAVE_BOOST_LIB_=true],
|
||||
[HAVE_BOOST_LIB_=false])
|
||||
|
||||
|
||||
AC_ARG_WITH(
|
||||
boost-lib,
|
||||
AC_HELP_STRING(
|
||||
[--with-boost-lib = location of BOOST],
|
||||
[prefix giving the boost base directory]),
|
||||
[HAVE_BOOST_LIB=true
|
||||
BOOST_LIB_PATH=$withval
|
||||
])
|
||||
|
||||
##
|
||||
##-- end BOOST -- path and options
|
||||
##---------------------------------------------------------
|
||||
|
||||
|
||||
##---------------------------------------------------------------------------
|
||||
##-- BOOST -- check header files (and lib if selected) only
|
||||
##
|
||||
AC_LANG_PUSH([C++])
|
||||
|
||||
if test $HAVE_BOOST_LIB_ == true ; then
|
||||
|
||||
|
||||
TEMP_LDFLAGS=${LDFLAGS}
|
||||
LDFLAGS=${LDFLAGS}" -L"${BOOST_LIB_PATH}" -Wl,-rpath,"${BOOST_LIB_PATH}
|
||||
echo ${BOOST_LIB_PATH}
|
||||
echo ${LDFLAGS}
|
||||
|
||||
|
||||
if test x$HAVE_BOOST_LIB_ == xtrue ; then
|
||||
AC_CHECK_LIB(boost_thread,[main],
|
||||
[],
|
||||
[HAVE_BOOST_LIB=false
|
||||
AC_MSG_WARN(boost_thread not found!)])
|
||||
fi
|
||||
|
||||
|
||||
# If all checks are OK we add boost lib version to the FLAGS.
|
||||
if test x$HAVE_BOOST_LIB_ != xtrue ; then
|
||||
|
||||
LDFLAGS=${TEMP_LDFLAGS}
|
||||
|
||||
|
||||
fi
|
||||
|
||||
if test x$HAVE_BOOST_LIB_ == xtrue ; then
|
||||
AC_DEFINE_UNQUOTED(HAVE_BOOST_THREAD, 1, [boost thread library])
|
||||
fi
|
||||
|
||||
|
||||
fi
|
||||
|
||||
#if test x$HAVE_BOOST_LIB_ != xtrue ; then
|
||||
# AC_DEFINE_UNQUOTED(HAVE_LINUX, 1, [linux dependency (sleep)])
|
||||
# fi
|
||||
|
||||
|
||||
|
||||
if test $HAVE_BOOST_ == true ; then
|
||||
|
||||
# Change flags: if all tests are successful, accept these additions,
|
||||
# else use the old flags.
|
||||
if test "${BOOST_PREFIX}" != "" ; then
|
||||
TEMP_CPPFLAGS=${CPPFLAGS}
|
||||
CPPFLAGS=${CPPFLAGS}" "${BOOST_INCL_PATH}
|
||||
|
||||
echo ${BOOST_INCL_PATH}
|
||||
echo ${CPPFLAGS}
|
||||
|
||||
fi
|
||||
|
||||
if test x$HAVE_BOOST_ == xtrue ; then
|
||||
AC_CHECK_HEADERS(
|
||||
[multi_index_container.hpp],
|
||||
[HAVE_BOOST_=true],
|
||||
[HAVE_BOOST_=false
|
||||
AC_MSG_WARN(multi_index_container.hpp not found!)],
|
||||
[])
|
||||
fi
|
||||
|
||||
if test x$HAVE_BOOST_ != xtrue ; then
|
||||
if test "${BOOST_PREFIX}" != "" ; then
|
||||
CPPFLAGS=${TEMP_CPPFLAGS}
|
||||
echo ${CPPFLAGS}
|
||||
fi
|
||||
fi
|
||||
|
||||
if test x$HAVE_BOOST_ == xtrue ; then
|
||||
AC_DEFINE_UNQUOTED(HAVE_BOOST, 1, [Availability of boost])
|
||||
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
AC_LANG_POP
|
||||
##
|
||||
##-- end BOOST-- check header files only
|
||||
##-----------------------------
|
||||
|
||||
|
||||
##---------------------------------------------------------------------------
|
||||
##-- Qt4 -- path and options
|
||||
##
|
||||
QT4_PREFIX=""
|
||||
QT4_INCL_PATH=""
|
||||
QT4_LIB_PATH=""
|
||||
|
||||
AC_ARG_ENABLE(
|
||||
[qt4-inc],
|
||||
AC_HELP_STRING([--enable-qt4-inc],
|
||||
[enable Qt version 4 use [default=no]]),
|
||||
[HAVE_QT4_=true],
|
||||
[HAVE_QT4_=false])
|
||||
|
||||
|
||||
AC_ARG_ENABLE(
|
||||
[qt4-lib],
|
||||
AC_HELP_STRING([--enable-qt4-lib],
|
||||
[enable Qt version 4 use [default=no]]),
|
||||
[HAVE_QT4_=true],
|
||||
[HAVE_QT4_=false])
|
||||
|
||||
#Only if enable flag is set
|
||||
|
||||
if test $HAVE_QT4_ == true ; then
|
||||
|
||||
AC_ARG_WITH(
|
||||
qt4-inc,
|
||||
AC_HELP_STRING([--with-qt4-inc=PREFIX],
|
||||
[prefix, parent directory where the Qt version 4 library is installed]),
|
||||
[HAVE_QT4_=true
|
||||
QT4_PREFIX=$withval
|
||||
QT4_INCL_PATH=${QT4_INCL_PATH}" -I"${QT4_PREFIX}"/QtCore "
|
||||
QT4_INCL_PATH=${QT4_INCL_PATH}" -I"${QT4_PREFIX}"/QtXml "
|
||||
])
|
||||
|
||||
|
||||
AC_ARG_WITH(
|
||||
qt4-lib,
|
||||
AC_HELP_STRING([--with-qt4-lib=PREFIX],
|
||||
[prefix, parent directory where the Qt version 4 library is installed]),
|
||||
[HAVE_QT4_=true
|
||||
QT4_LIB_PATH=$withval
|
||||
QT4_LIB_PATH=${QT4_LIB_PATH}
|
||||
])
|
||||
|
||||
fi
|
||||
|
||||
##
|
||||
##---------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
##---------------------------------------------------------------------------
|
||||
##-- Qt version 4 -- check header files and libs
|
||||
##
|
||||
AC_LANG_PUSH([C++])
|
||||
|
||||
if test $HAVE_QT4_ == true ; then
|
||||
|
||||
# Change flags: if all tests are successfull, accept this changes; if
|
||||
# the tests are not successfull, use the old flags.
|
||||
if test "${QT4_PREFIX}" != "" ; then
|
||||
TEMP_CPPFLAGS=${CPPFLAGS}
|
||||
CPPFLAGS=${CPPFLAGS}" "${QT4_INCL_PATH}
|
||||
TEMP_LDFLAGS=${LDFLAGS}
|
||||
LDFLAGS=${LDFLAGS}" -L"${QT4_LIB_PATH}" -Wl,-rpath,"${QT4_LIB_PATH}
|
||||
fi
|
||||
|
||||
if test x$HAVE_QT4_ == xtrue ; then
|
||||
AC_CHECK_HEADERS(
|
||||
[qxml.h],
|
||||
[HAVE_QT4_=true],
|
||||
[HAVE_QT4_=false
|
||||
AC_MSG_WARN(qxml.h not found!)],
|
||||
[])
|
||||
fi
|
||||
|
||||
if test x$HAVE_QT4_ == xtrue ; then
|
||||
AC_CHECK_LIB(QtCore,[main],
|
||||
[],
|
||||
[HAVE_QT4_=false
|
||||
AC_MSG_WARN(libQtCore not found!)])
|
||||
fi
|
||||
|
||||
if test x$HAVE_QT4_ == xtrue ; then
|
||||
AC_CHECK_LIB(QtXml,[main],
|
||||
[],
|
||||
[HAVE_QT4=false
|
||||
AC_MSG_WARN(libQtXml not found!)])
|
||||
fi
|
||||
|
||||
|
||||
# If all checks are OK we add Qt version 4 to the FLAGS.
|
||||
if test x$HAVE_QT4_ != xtrue ; then
|
||||
|
||||
if test "${QT4_PREFIX}" != "" ; then
|
||||
CPPFLAGS=${TEMP_CPPFLAGS}
|
||||
LDFLAGS=${TEMP_LDFLAGS}
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
if test x$HAVE_QT4_ == xtrue ; then
|
||||
AC_DEFINE_UNQUOTED(HAVE_QT4, 1,[Availability of Qt version 4 confirmed])
|
||||
fi
|
||||
|
||||
fi
|
||||
AC_LANG_POP
|
||||
##
|
||||
##-- end QT4 -- check header files and libs
|
||||
##---------------------------------------------------------------------------
|
||||
##---------------------------------------------------------------------------
|
||||
##-- Python -- path and options -
|
||||
##-- Python header files required for callback
|
||||
##
|
||||
|
||||
PYTHON_PREFIX=""
|
||||
PYTHON_INCL_PATH=""
|
||||
PYTHON_LIB_PATH=""
|
||||
PYTHON_OPTION=""
|
||||
|
||||
AC_ARG_ENABLE(
|
||||
[python-inc],
|
||||
AC_HELP_STRING([--enable-python-inc],
|
||||
[enable python use [default=no]]),
|
||||
[HAVE_PYTHON_=true],
|
||||
[HAVE_PYTHON_=false])
|
||||
|
||||
AC_ARG_WITH(
|
||||
python-inc,
|
||||
AC_HELP_STRING(
|
||||
[--with-python-inc = location of python],
|
||||
[prefix giving the python base directory]),
|
||||
[HAVE_PYTHON_=true
|
||||
PYTHON_PREFIX=$withval
|
||||
PYTHON_INCL_PATH="-I"${PYTHON_PREFIX}
|
||||
])
|
||||
|
||||
|
||||
AC_ARG_ENABLE(
|
||||
[python-lib],
|
||||
AC_HELP_STRING([--enable-python-lib],
|
||||
[enable python use [default=no]]),
|
||||
[HAVE_PYTHON_=true],
|
||||
[HAVE_PYTHON_=false])
|
||||
|
||||
AC_ARG_WITH(
|
||||
python-lib,
|
||||
AC_HELP_STRING([--with-python-lib=PREFIX],
|
||||
[prefix, parent directory where the python version library is installed]),
|
||||
[HAVE_PYTHON_=true
|
||||
PYTHON_LIB_PATH=$withval
|
||||
PYTHON_LIB_PATH=${PYTHON_LIB_PATH}
|
||||
])
|
||||
|
||||
##
|
||||
##-- end PYTHON -- path and options
|
||||
##---------------------------------------------------------
|
||||
|
||||
|
||||
##---------------------------------------------------------------------------
|
||||
##-- PYTHON -- check header files only
|
||||
##
|
||||
AC_LANG_PUSH([C++])
|
||||
|
||||
if test $HAVE_PYTHON_ == true ; then
|
||||
|
||||
# Change flags: if all tests are successful, accept these additions,
|
||||
# else use the old flags.
|
||||
if test "${PYTHON_PREFIX}" != "" ; then
|
||||
TEMP_CPPFLAGS=${CPPFLAGS}
|
||||
CPPFLAGS=${CPPFLAGS}" "${PYTHON_INCL_PATH}
|
||||
TEMP_LDFLAGS=${LDFLAGS}
|
||||
LDFLAGS=${LDFLAGS}" -L"${PYTHON_LIB_PATH}" -Wl,-rpath,"${PYTHON_LIB_PATH}
|
||||
echo ${PYTHON_INCL_PATH}
|
||||
echo ${CPPFLAGS}
|
||||
fi
|
||||
|
||||
if test x$HAVE_PYTHON_ == xtrue ; then
|
||||
AC_CHECK_HEADERS(
|
||||
[Python.h],
|
||||
[HAVE_PYTHON_=true],
|
||||
[HAVE_PYTHON_=false
|
||||
AC_MSG_WARN(Python.h not found!)],
|
||||
[])
|
||||
fi
|
||||
|
||||
if test x$HAVE_PYTHON_ == xtrue ; then
|
||||
AC_CHECK_LIB(python3.5m,[main],
|
||||
[],
|
||||
[HAVE_PYTHON=false
|
||||
AC_MSG_WARN(libpython3.5m not found!)])
|
||||
fi
|
||||
|
||||
|
||||
# If all checks are OK we add Qt version 4 to the FLAGS.
|
||||
|
||||
if test x$HAVE_PYTHON_ != xtrue ; then
|
||||
if test "${PYTHON_PREFIX}" != "" ; then
|
||||
CPPFLAGS=${TEMP_CPPFLAGS}
|
||||
LDFLAGS=${TEMP_LDFLAGS}
|
||||
echo ${CPPFLAGS}
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
if test x$HAVE_PYTHON_ == xtrue ; then
|
||||
AC_DEFINE_UNQUOTED(HAVE_PYTHON, 1, [Availability of python])
|
||||
##_PYCAFE_EXT IF FLAG SET ELSE USE DEFAULT PYCAFE_API_H
|
||||
AC_DEFINE_UNQUOTED(HAVE_PYCAFE_EXT, 0, [pycafe extern C])
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_LANG_POP
|
||||
##
|
||||
##-- end PYTHON-- check header files only
|
||||
##-----------------------------
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
##---------------------------------------------------------------------------
|
||||
##---------------------------------------------------------------------------
|
||||
##-- Python2 -- path and options -
|
||||
##-- Python2 header files required for callback
|
||||
##
|
||||
|
||||
PYTHON2_PREFIX=""
|
||||
PYTHON2_INCL_PATH=""
|
||||
PYTHON2_LIB_PATH=""
|
||||
PYTHON2_OPTION=""
|
||||
|
||||
AC_ARG_ENABLE(
|
||||
[python2-inc],
|
||||
AC_HELP_STRING([--enable-python2-inc],
|
||||
[enable python2 use [default=no]]),
|
||||
[HAVE_PYTHON2_=true],
|
||||
[HAVE_PYTHON2_=false])
|
||||
|
||||
AC_ARG_WITH(
|
||||
python2-inc,
|
||||
AC_HELP_STRING(
|
||||
[--with-python2-inc = location of python2],
|
||||
[prefix giving the python2 base directory]),
|
||||
[HAVE_PYTHON2_=true
|
||||
PYTHON2_PREFIX=$withval
|
||||
PYTHON2_INCL_PATH="-I"${PYTHON2_PREFIX}
|
||||
])
|
||||
|
||||
|
||||
AC_ARG_ENABLE(
|
||||
[python2-lib],
|
||||
AC_HELP_STRING([--enable-python2-lib],
|
||||
[enable python2 use [default=no]]),
|
||||
[HAVE_PYTHON2_=true],
|
||||
[HAVE_PYTHON2_=false])
|
||||
|
||||
AC_ARG_WITH(
|
||||
python2-lib,
|
||||
AC_HELP_STRING([--with-python2-lib=PREFIX],
|
||||
[prefix, parent directory where the python2 version library is installed]),
|
||||
[HAVE_PYTHON2_=true
|
||||
PYTHON2_LIB_PATH=$withval
|
||||
PYTHON2_LIB_PATH=${PYTHON2_LIB_PATH}
|
||||
])
|
||||
|
||||
##
|
||||
##-- end PYTHON2 -- path and options
|
||||
##---------------------------------------------------------
|
||||
|
||||
|
||||
##---------------------------------------------------------------------------
|
||||
##-- PYTHON2 -- check header files only
|
||||
##
|
||||
AC_LANG_PUSH([C++])
|
||||
|
||||
if test $HAVE_PYTHON2_ == true ; then
|
||||
|
||||
# Change flags: if all tests are successful, accept these additions,
|
||||
# else use the old flags.
|
||||
if test "${PYTHON2_PREFIX}" != "" ; then
|
||||
TEMP_CPPFLAGS=${CPPFLAGS}
|
||||
CPPFLAGS=${CPPFLAGS}" "${PYTHON2_INCL_PATH}
|
||||
TEMP_LDFLAGS=${LDFLAGS}
|
||||
LDFLAGS=${LDFLAGS}" -L"${PYTHON2_LIB_PATH}" -Wl,-rpath,"${PYTHON2_LIB_PATH}
|
||||
echo ${PYTHON2_INCL_PATH}
|
||||
echo ${CPPFLAGS}
|
||||
fi
|
||||
|
||||
if test x$HAVE_PYTHON2_ == xtrue ; then
|
||||
AC_CHECK_HEADERS(
|
||||
[Python.h],
|
||||
[HAVE_PYTHON2_=true],
|
||||
[HAVE_PYTHON2_=false
|
||||
AC_MSG_WARN(Python.h not found!)],
|
||||
[])
|
||||
fi
|
||||
|
||||
if test x$HAVE_PYTHON2_ == xtrue ; then
|
||||
AC_CHECK_LIB(python2.7,[main],
|
||||
[],
|
||||
[HAVE_PYTHON2=false
|
||||
AC_MSG_WARN(libpython2.7 not found!)])
|
||||
fi
|
||||
|
||||
|
||||
# If all checks are OK we add Qt version 4 to the FLAGS.
|
||||
|
||||
if test x$HAVE_PYTHON2_ != xtrue ; then
|
||||
if test "${PYTHON2_PREFIX}" != "" ; then
|
||||
CPPFLAGS=${TEMP_CPPFLAGS}
|
||||
LDFLAGS=${TEMP_LDFLAGS}
|
||||
echo ${CPPFLAGS}
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
if test x$HAVE_PYTHON2_ == xtrue ; then
|
||||
AC_DEFINE_UNQUOTED(HAVE_PYTHON, 1, [Availability of python2])
|
||||
##_PYCAFE_EXT IF FLAG SET ELSE USE DEFAULT PYCAFE_API_H
|
||||
AC_DEFINE_UNQUOTED(HAVE_PYCAFE_EXT, 0, [pycafe extern C])
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_LANG_POP
|
||||
##
|
||||
##-- end PYTHON-- check header files only
|
||||
##-----------------------------
|
||||
|
||||
|
||||
CPPFLAGS=$CPPFLAGS
|
||||
echo "REPORTING -> current CPPFLAGS = "$CPPFLAGS
|
||||
LDFLAGS=$LDFLAGS
|
||||
echo "REPORTING -> current LDFLAGS = "$LDFLAGS
|
||||
|
||||
##
|
||||
##-- end Qt Check
|
||||
##--
|
||||
|
||||
# Generate makefiles
|
||||
|
||||
AC_SUBST(AM_CPPFLAGS, $CPPFLAGS)
|
||||
AC_SUBST(AM_LDFLAGS, $LDFLAGS)
|
||||
|
||||
AM_CONDITIONAL(HAVE_PYTHON_, test x$HAVE_PYTHON_ == xtrue)
|
||||
AM_CONDITIONAL(HAVE_PYCAFE_EXT, test x$HAVE_PYCAFE_EXT == xtrue)
|
||||
|
||||
AC_CONFIG_FILES([makefile
|
||||
src/makefile
|
||||
include/makefile])
|
||||
|
||||
AC_OUTPUT
|
||||
1036
configure6064z.ac
1036
configure6064z.ac
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.
@@ -1,48 +0,0 @@
|
||||
<cafe:config
|
||||
xmlns:cafe="http://slsbd.psi.ch">
|
||||
|
||||
<!-- Note: The namespace URI is not used by the parser to look up information -->
|
||||
<!-- The purpose is to give the namespace a unique name -->
|
||||
<!-- However, often projects use the namespace as a pointer to a web page -->
|
||||
<!-- containing namespace information -->
|
||||
|
||||
<!-- group id is the NAME of the collection -->
|
||||
<!-- CAFE convention is to begin collection name with c -->
|
||||
|
||||
<!-- Order must be X - Y - I and ENABLE -->
|
||||
|
||||
|
||||
<cafe:group id="gDBPM">
|
||||
<cafe:description>BPM agent configuration</cafe:description>
|
||||
<cafe:collection>
|
||||
<cafe:id>cDBPM</cafe:id>
|
||||
<cafe:attribute>X1</cafe:attribute>
|
||||
<cafe:collectivetype>CAFE_DOUBLE</cafe:collectivetype>
|
||||
</cafe:collection>
|
||||
<cafe:collection>
|
||||
<cafe:id>cDBPM</cafe:id>
|
||||
<cafe:attribute>Y1</cafe:attribute>
|
||||
<cafe:collectivetype>CAFE_DOUBLE</cafe:collectivetype>
|
||||
</cafe:collection>
|
||||
<cafe:collection>
|
||||
<cafe:id>cDBPM</cafe:id>
|
||||
<cafe:attribute>Q1</cafe:attribute>
|
||||
<cafe:collectivetype>CAFE_DOUBLE</cafe:collectivetype>
|
||||
</cafe:collection>
|
||||
<cafe:collection>
|
||||
<cafe:id>cDBPM</cafe:id>
|
||||
<cafe:attribute>X1-VALID</cafe:attribute>
|
||||
<cafe:collectivetype>CAFE_DOUBLE</cafe:collectivetype>
|
||||
</cafe:collection>
|
||||
<cafe:collection>
|
||||
<cafe:id>cDBPM</cafe:id>
|
||||
<cafe:attribute>Q1-VALID</cafe:attribute>
|
||||
<cafe:collectivetype>CAFE_DOUBLE</cafe:collectivetype>
|
||||
</cafe:collection>
|
||||
<cafe:collection>
|
||||
<cafe:id>cDBPM</cafe:id>
|
||||
<cafe:attribute>ENERGY</cafe:attribute>
|
||||
<cafe:collectivetype>CAFE_DOUBLE</cafe:collectivetype>
|
||||
</cafe:collection>
|
||||
</cafe:group>
|
||||
</cafe:config>
|
||||
@@ -1 +0,0 @@
|
||||
outAramis.xml
|
||||
@@ -1,380 +0,0 @@
|
||||
<cafe:config xmlns:cafe="http://xfel.web.psi.ch">
|
||||
<cafe:collection id="cDBPM">
|
||||
<cafe:description>Collection of Nodes for SwissFEL</cafe:description>
|
||||
<cafe:attributes>
|
||||
<cafe:attribute>X</cafe:attribute>
|
||||
<cafe:attribute>Y</cafe:attribute>
|
||||
<cafe:attribute>X0</cafe:attribute>
|
||||
<cafe:attribute>Y0</cafe:attribute>
|
||||
<cafe:attribute>REF-X</cafe:attribute>
|
||||
<cafe:attribute>REF-Y</cafe:attribute>
|
||||
<cafe:attribute>REFOFF-X</cafe:attribute>
|
||||
<cafe:attribute>REFOFF-Y</cafe:attribute>
|
||||
<cafe:attribute>REFORB-X</cafe:attribute>
|
||||
<cafe:attribute>REFORB-Y</cafe:attribute>
|
||||
<cafe:attribute>SET-GAIN</cafe:attribute>
|
||||
<cafe:attribute>I</cafe:attribute>
|
||||
<cafe:attribute>FB-STAT</cafe:attribute>
|
||||
<cafe:attribute>FB-ENABLE</cafe:attribute>
|
||||
<cafe:attribute>STAT</cafe:attribute>
|
||||
<cafe:attribute>ENABLE</cafe:attribute>
|
||||
</cafe:attributes>
|
||||
<cafe:member pos=" 3.0149">
|
||||
<cafe:device>SINEG01-DBPM340</cafe:device>
|
||||
</cafe:member>
|
||||
<cafe:member pos=" 7.9459">
|
||||
<cafe:device>SINSB01-DBPM150</cafe:device>
|
||||
</cafe:member>
|
||||
<cafe:member pos=" 12.9489">
|
||||
<cafe:device>SINSB02-DBPM150</cafe:device>
|
||||
</cafe:member>
|
||||
<cafe:member pos=" 14.5560">
|
||||
<cafe:device>SINLH01-DBPM060</cafe:device>
|
||||
</cafe:member>
|
||||
<cafe:member pos=" 16.4806">
|
||||
<cafe:device>SINLH02-DBPM210</cafe:device>
|
||||
</cafe:member>
|
||||
<cafe:member pos=" 17.4826">
|
||||
<cafe:device>SINLH02-DBPM240</cafe:device>
|
||||
</cafe:member>
|
||||
<cafe:member pos=" 19.2172">
|
||||
<cafe:device>SINLH03-DBPM010</cafe:device>
|
||||
</cafe:member>
|
||||
<cafe:member pos=" 20.4632">
|
||||
<cafe:device>SINLH03-DBPM050</cafe:device>
|
||||
</cafe:member>
|
||||
<cafe:member pos=" 21.6002">
|
||||
<cafe:device>SINLH03-DBPM090</cafe:device>
|
||||
</cafe:member>
|
||||
<cafe:member pos=" 26.9202">
|
||||
<cafe:device>SINSB03-DBPM120</cafe:device>
|
||||
</cafe:member>
|
||||
<cafe:member pos=" 32.4202">
|
||||
<cafe:device>SINSB03-DBPM220</cafe:device>
|
||||
</cafe:member>
|
||||
<cafe:member pos=" 37.9202">
|
||||
<cafe:device>SINSB04-DBPM120</cafe:device>
|
||||
</cafe:member>
|
||||
<cafe:member pos=" 43.4202">
|
||||
<cafe:device>SINSB04-DBPM220</cafe:device>
|
||||
</cafe:member>
|
||||
<cafe:member pos=" 48.9202">
|
||||
<cafe:device>SINSB05-DBPM120</cafe:device>
|
||||
</cafe:member>
|
||||
<cafe:member pos=" 54.4202">
|
||||
<cafe:device>SINSB05-DBPM220</cafe:device>
|
||||
</cafe:member>
|
||||
<cafe:member pos=" 56.2420">
|
||||
<cafe:device>SINXB01-DBPM120</cafe:device>
|
||||
</cafe:member>
|
||||
<cafe:member pos=" 60.2912">
|
||||
<cafe:device>SINBC01-DBPM010</cafe:device>
|
||||
</cafe:member>
|
||||
<cafe:member pos=" 61.0912">
|
||||
<cafe:device>SINBC01-DBPM030</cafe:device>
|
||||
</cafe:member>
|
||||
<cafe:member pos=" 64.4172">
|
||||
<cafe:device>SINBC01-DBPM080</cafe:device>
|
||||
</cafe:member>
|
||||
<cafe:member pos=" 65.9432">
|
||||
<cafe:device>SINBC01-DBPM100</cafe:device>
|
||||
</cafe:member>
|
||||
<cafe:member pos=" 69.3739">
|
||||
<cafe:device>SINBC02-DBPM140</cafe:device>
|
||||
</cafe:member>
|
||||
<cafe:member pos=" 77.5610">
|
||||
<cafe:device>SINBC02-DBPM320</cafe:device>
|
||||
</cafe:member>
|
||||
<cafe:member pos=" 82.0967">
|
||||
<cafe:device>SINDI01-DBPM010</cafe:device>
|
||||
</cafe:member>
|
||||
<cafe:member pos=" 83.5117">
|
||||
<cafe:device>SINDI01-DBPM060</cafe:device>
|
||||
</cafe:member>
|
||||
<cafe:member pos=" 86.0767">
|
||||
<cafe:device>SINDI02-DBPM010</cafe:device>
|
||||
</cafe:member>
|
||||
<cafe:member pos=" 88.3857">
|
||||
<cafe:device>SINDI02-DBPM040</cafe:device>
|
||||
</cafe:member>
|
||||
<cafe:member pos=" 90.6297">
|
||||
<cafe:device>SINDI02-DBPM080</cafe:device>
|
||||
</cafe:member>
|
||||
<cafe:member pos=" 95.3947">
|
||||
<cafe:device>S10CB01-DBPM220</cafe:device>
|
||||
</cafe:member>
|
||||
<cafe:member pos=" 100.2947">
|
||||
<cafe:device>S10CB01-DBPM420</cafe:device>
|
||||
</cafe:member>
|
||||
<cafe:member pos=" 105.1947">
|
||||
<cafe:device>S10CB02-DBPM220</cafe:device>
|
||||
</cafe:member>
|
||||
<cafe:member pos=" 110.0947">
|
||||
<cafe:device>S10CB02-DBPM420</cafe:device>
|
||||
</cafe:member>
|
||||
<cafe:member pos=" 114.6628">
|
||||
<cafe:device>S10BD01-DBPM020</cafe:device>
|
||||
</cafe:member>
|
||||
<cafe:member pos=" 114.9947">
|
||||
<cafe:device>S10DI01-DBPM110</cafe:device>
|
||||
</cafe:member>
|
||||
<cafe:member pos=" 119.8947">
|
||||
<cafe:device>S10CB03-DBPM220</cafe:device>
|
||||
</cafe:member>
|
||||
<cafe:member pos=" 124.7947">
|
||||
<cafe:device>S10CB03-DBPM420</cafe:device>
|
||||
</cafe:member>
|
||||
<cafe:member pos=" 129.6947">
|
||||
<cafe:device>S10CB04-DBPM220</cafe:device>
|
||||
</cafe:member>
|
||||
<cafe:member pos=" 134.5947">
|
||||
<cafe:device>S10CB04-DBPM420</cafe:device>
|
||||
</cafe:member>
|
||||
<cafe:member pos=" 139.4947">
|
||||
<cafe:device>S10CB05-DBPM220</cafe:device>
|
||||
</cafe:member>
|
||||
<cafe:member pos=" 144.3947">
|
||||
<cafe:device>S10CB05-DBPM420</cafe:device>
|
||||
</cafe:member>
|
||||
<cafe:member pos=" 149.2947">
|
||||
<cafe:device>S10CB06-DBPM220</cafe:device>
|
||||
</cafe:member>
|
||||
<cafe:member pos=" 154.1947">
|
||||
<cafe:device>S10CB06-DBPM420</cafe:device>
|
||||
</cafe:member>
|
||||
<cafe:member pos=" 159.0947">
|
||||
<cafe:device>S10CB07-DBPM220</cafe:device>
|
||||
</cafe:member>
|
||||
<cafe:member pos=" 163.9947">
|
||||
<cafe:device>S10CB07-DBPM420</cafe:device>
|
||||
</cafe:member>
|
||||
<cafe:member pos=" 168.8947">
|
||||
<cafe:device>S10CB08-DBPM220</cafe:device>
|
||||
</cafe:member>
|
||||
<cafe:member pos=" 173.7947">
|
||||
<cafe:device>S10CB08-DBPM420</cafe:device>
|
||||
</cafe:member>
|
||||
<cafe:member pos=" 178.6947">
|
||||
<cafe:device>S10CB09-DBPM220</cafe:device>
|
||||
</cafe:member>
|
||||
<cafe:member pos=" 183.5947">
|
||||
<cafe:device>S10BC01-DBPM010</cafe:device>
|
||||
</cafe:member>
|
||||
<cafe:member pos=" 187.8307">
|
||||
<cafe:device>S10BC01-DBPM050</cafe:device>
|
||||
</cafe:member>
|
||||
<cafe:member pos=" 192.2847">
|
||||
<cafe:device>S10BC01-DBPM090</cafe:device>
|
||||
</cafe:member>
|
||||
<cafe:member pos=" 196.7798">
|
||||
<cafe:device>S10BC02-DBPM140</cafe:device>
|
||||
</cafe:member>
|
||||
<cafe:member pos=" 206.5399">
|
||||
<cafe:device>S10BC02-DBPM320</cafe:device>
|
||||
</cafe:member>
|
||||
<cafe:member pos=" 211.2940">
|
||||
<cafe:device>S10MA01-DBPM010</cafe:device>
|
||||
</cafe:member>
|
||||
<cafe:member pos=" 215.6600">
|
||||
<cafe:device>S10MA01-DBPM060</cafe:device>
|
||||
</cafe:member>
|
||||
<cafe:member pos=" 220.1200">
|
||||
<cafe:device>S10MA01-DBPM120</cafe:device>
|
||||
</cafe:member>
|
||||
<cafe:member pos=" 229.0850">
|
||||
<cafe:device>S20CB01-DBPM420</cafe:device>
|
||||
</cafe:member>
|
||||
<cafe:member pos=" 238.1850">
|
||||
<cafe:device>S20CB02-DBPM420</cafe:device>
|
||||
</cafe:member>
|
||||
<cafe:member pos=" 247.2850">
|
||||
<cafe:device>S20CB03-DBPM420</cafe:device>
|
||||
</cafe:member>
|
||||
<cafe:member pos=" 256.3850">
|
||||
<cafe:device>S20SY01-DBPM010</cafe:device>
|
||||
</cafe:member>
|
||||
<cafe:member pos=" 262.5020">
|
||||
<cafe:device>S20SY01-DBPM040</cafe:device>
|
||||
</cafe:member>
|
||||
<cafe:member pos=" 263.6280">
|
||||
<cafe:device>S20SY01-DBPM060</cafe:device>
|
||||
</cafe:member>
|
||||
<cafe:member pos=" 269.1300">
|
||||
<cafe:device>S20SY02-DBPM080</cafe:device>
|
||||
</cafe:member>
|
||||
<cafe:member pos=" 271.0800">
|
||||
<cafe:device>S20SY02-DBPM120</cafe:device>
|
||||
</cafe:member>
|
||||
<cafe:member pos=" 272.7600">
|
||||
<cafe:device>S20SY02-DBPM150</cafe:device>
|
||||
</cafe:member>
|
||||
<cafe:member pos=" 280.6200">
|
||||
<cafe:device>S20SY03-DBPM010</cafe:device>
|
||||
</cafe:member>
|
||||
<cafe:member pos=" 286.9200">
|
||||
<cafe:device>S20SY03-DBPM040</cafe:device>
|
||||
</cafe:member>
|
||||
<cafe:member pos=" 294.3800">
|
||||
<cafe:device>S20SY03-DBPM080</cafe:device>
|
||||
</cafe:member>
|
||||
<cafe:member pos=" 303.8150">
|
||||
<cafe:device>S30CB01-DBPM420</cafe:device>
|
||||
</cafe:member>
|
||||
<cafe:member pos=" 312.9150">
|
||||
<cafe:device>S30CB02-DBPM420</cafe:device>
|
||||
</cafe:member>
|
||||
<cafe:member pos=" 322.0150">
|
||||
<cafe:device>S30CB03-DBPM420</cafe:device>
|
||||
</cafe:member>
|
||||
<cafe:member pos=" 331.1150">
|
||||
<cafe:device>S30CB04-DBPM420</cafe:device>
|
||||
</cafe:member>
|
||||
<cafe:member pos=" 340.2150">
|
||||
<cafe:device>S30CB05-DBPM420</cafe:device>
|
||||
</cafe:member>
|
||||
<cafe:member pos=" 349.3150">
|
||||
<cafe:device>S30CB06-DBPM420</cafe:device>
|
||||
</cafe:member>
|
||||
<cafe:member pos=" 358.4150">
|
||||
<cafe:device>S30CB07-DBPM420</cafe:device>
|
||||
</cafe:member>
|
||||
<cafe:member pos=" 367.5150">
|
||||
<cafe:device>S30CB08-DBPM420</cafe:device>
|
||||
</cafe:member>
|
||||
<cafe:member pos=" 376.6150">
|
||||
<cafe:device>S30CB09-DBPM420</cafe:device>
|
||||
</cafe:member>
|
||||
<cafe:member pos=" 385.7150">
|
||||
<cafe:device>S30CB10-DBPM420</cafe:device>
|
||||
</cafe:member>
|
||||
<cafe:member pos=" 394.8150">
|
||||
<cafe:device>S30CB11-DBPM420</cafe:device>
|
||||
</cafe:member>
|
||||
<cafe:member pos=" 403.9150">
|
||||
<cafe:device>S30CB12-DBPM420</cafe:device>
|
||||
</cafe:member>
|
||||
<cafe:member pos=" 413.0150">
|
||||
<cafe:device>S30CB13-DBPM420</cafe:device>
|
||||
</cafe:member>
|
||||
<cafe:member pos=" 422.1150">
|
||||
<cafe:device>S30CB14-DBPM420</cafe:device>
|
||||
</cafe:member>
|
||||
<cafe:member pos=" 431.2150">
|
||||
<cafe:device>S30CB15-DBPM420</cafe:device>
|
||||
</cafe:member>
|
||||
<cafe:member pos=" 440.3150">
|
||||
<cafe:device>SARCL01-DBPM010</cafe:device>
|
||||
</cafe:member>
|
||||
<cafe:member pos=" 444.6750">
|
||||
<cafe:device>SARCL01-DBPM060</cafe:device>
|
||||
</cafe:member>
|
||||
<cafe:member pos=" 450.7750">
|
||||
<cafe:device>SARCL01-DBPM120</cafe:device>
|
||||
</cafe:member>
|
||||
<cafe:member pos=" 452.1510">
|
||||
<cafe:device>SARCL01-DBPM150</cafe:device>
|
||||
</cafe:member>
|
||||
<cafe:member pos=" 456.9100">
|
||||
<cafe:device>SARCL02-DBPM110</cafe:device>
|
||||
</cafe:member>
|
||||
<cafe:member pos=" 460.9609">
|
||||
<cafe:device>SARCL02-DBPM220</cafe:device>
|
||||
</cafe:member>
|
||||
<cafe:member pos=" 462.7569">
|
||||
<cafe:device>SARCL02-DBPM260</cafe:device>
|
||||
</cafe:member>
|
||||
<cafe:member pos=" 466.6909">
|
||||
<cafe:device>SARCL02-DBPM330</cafe:device>
|
||||
</cafe:member>
|
||||
<cafe:member pos=" 471.1067">
|
||||
<cafe:device>SARCL02-DBPM470</cafe:device>
|
||||
</cafe:member>
|
||||
<cafe:member pos=" 476.4267">
|
||||
<cafe:device>SARMA01-DBPM040</cafe:device>
|
||||
</cafe:member>
|
||||
<cafe:member pos=" 483.2767">
|
||||
<cafe:device>SARMA01-DBPM100</cafe:device>
|
||||
</cafe:member>
|
||||
<cafe:member pos=" 487.9617">
|
||||
<cafe:device>SARMA02-DBPM010</cafe:device>
|
||||
</cafe:member>
|
||||
<cafe:member pos=" 490.0107">
|
||||
<cafe:device>SARMA02-DBPM020</cafe:device>
|
||||
</cafe:member>
|
||||
<cafe:member pos=" 492.0597">
|
||||
<cafe:device>SARMA02-DBPM040</cafe:device>
|
||||
</cafe:member>
|
||||
<cafe:member pos=" 496.8097">
|
||||
<cafe:device>SARMA02-DBPM110</cafe:device>
|
||||
</cafe:member>
|
||||
<cafe:member pos=" 501.5597">
|
||||
<cafe:device>SARUN01-DBPM070</cafe:device>
|
||||
</cafe:member>
|
||||
<cafe:member pos=" 506.3097">
|
||||
<cafe:device>SARUN02-DBPM070</cafe:device>
|
||||
</cafe:member>
|
||||
<cafe:member pos=" 511.0597">
|
||||
<cafe:device>SARUN03-DBPM070</cafe:device>
|
||||
</cafe:member>
|
||||
<cafe:member pos=" 515.8097">
|
||||
<cafe:device>SARUN04-DBPM070</cafe:device>
|
||||
</cafe:member>
|
||||
<cafe:member pos=" 520.5597">
|
||||
<cafe:device>SARUN05-DBPM070</cafe:device>
|
||||
</cafe:member>
|
||||
<cafe:member pos=" 525.3097">
|
||||
<cafe:device>SARUN06-DBPM070</cafe:device>
|
||||
</cafe:member>
|
||||
<cafe:member pos=" 530.0597">
|
||||
<cafe:device>SARUN07-DBPM070</cafe:device>
|
||||
</cafe:member>
|
||||
<cafe:member pos=" 534.8097">
|
||||
<cafe:device>SARUN08-DBPM070</cafe:device>
|
||||
</cafe:member>
|
||||
<cafe:member pos=" 539.5597">
|
||||
<cafe:device>SARUN09-DBPM070</cafe:device>
|
||||
</cafe:member>
|
||||
<cafe:member pos=" 544.3097">
|
||||
<cafe:device>SARUN10-DBPM070</cafe:device>
|
||||
</cafe:member>
|
||||
<cafe:member pos=" 549.0597">
|
||||
<cafe:device>SARUN11-DBPM070</cafe:device>
|
||||
</cafe:member>
|
||||
<cafe:member pos=" 553.8097">
|
||||
<cafe:device>SARUN12-DBPM070</cafe:device>
|
||||
</cafe:member>
|
||||
<cafe:member pos=" 558.5597">
|
||||
<cafe:device>SARUN13-DBPM070</cafe:device>
|
||||
</cafe:member>
|
||||
<cafe:member pos=" 563.3097">
|
||||
<cafe:device>SARUN14-DBPM070</cafe:device>
|
||||
</cafe:member>
|
||||
<cafe:member pos=" 568.0597">
|
||||
<cafe:device>SARUN15-DBPM070</cafe:device>
|
||||
</cafe:member>
|
||||
<cafe:member pos=" 572.8097">
|
||||
<cafe:device>SARUN16-DBPM070</cafe:device>
|
||||
</cafe:member>
|
||||
<cafe:member pos=" 577.5597">
|
||||
<cafe:device>SARUN17-DBPM070</cafe:device>
|
||||
</cafe:member>
|
||||
<cafe:member pos=" 582.3097">
|
||||
<cafe:device>SARUN18-DBPM070</cafe:device>
|
||||
</cafe:member>
|
||||
<cafe:member pos=" 587.0597">
|
||||
<cafe:device>SARUN19-DBPM070</cafe:device>
|
||||
</cafe:member>
|
||||
<cafe:member pos=" 591.8097">
|
||||
<cafe:device>SARUN20-DBPM070</cafe:device>
|
||||
</cafe:member>
|
||||
<cafe:member pos=" 593.9132">
|
||||
<cafe:device>SARBD01-DBPM040</cafe:device>
|
||||
</cafe:member>
|
||||
<cafe:member pos=" 596.9584">
|
||||
<cafe:device>SARBD02-DBPM010</cafe:device>
|
||||
</cafe:member>
|
||||
<cafe:member pos=" 598.3943">
|
||||
<cafe:device>SARBD02-DBPM040</cafe:device>
|
||||
</cafe:member>
|
||||
</cafe:collection>
|
||||
</cafe:config>
|
||||
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.
File diff suppressed because it is too large
Load Diff
@@ -7,8 +7,8 @@ void callbackHandlerMonitor( struct event_handler_args args) {
|
||||
#define __METHOD__ "callbackHandlerMonitor"
|
||||
|
||||
if (args.status !=ECA_NORMAL) {
|
||||
cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl;
|
||||
cout << "Status=" << args.status << " for channel " << ca_name (args.chid) << endl;
|
||||
std::cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << std::endl;
|
||||
std::cout << "Status=" << args.status << " for channel " << ca_name (args.chid) << std::endl;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ void callbackHandlerMonitor( struct event_handler_args args) {
|
||||
it_handle = handle_index.find((unsigned int)_handle);
|
||||
|
||||
if (it_handle != handle_index.end()) {
|
||||
//cout << (*it_handle).getPV() << " " << (*it_handle).getHandle() << endl;
|
||||
//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();}
|
||||
@@ -32,27 +32,27 @@ void callbackHandlerMonitor( struct event_handler_args args) {
|
||||
PVDataHolder pvd(args.count);
|
||||
(*it_handle).getPVDataHolder(pvd);
|
||||
//pvd.print();
|
||||
//cout << "val/D//= " << pvd.getAsString(0) << endl;
|
||||
//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();
|
||||
//cout << "val/C/= " << pvc.getAsString(0) << endl;
|
||||
//std::cout << "val/C/= " << pvc.getAsString(0) << std::endl;
|
||||
}
|
||||
|
||||
|
||||
//cout << "args.usr = " << (unsigned int) args.usr << endl;
|
||||
//cout << "getUsrArgs() = " << (unsigned int) (*it_handle).getUsrArgs() << endl;
|
||||
//std::cout << "args.usr = " << (unsigned int) args.usr << std::endl;
|
||||
//std::cout << "getUsrArgs() = " << (unsigned int) (*it_handle).getUsrArgs() << std::endl;
|
||||
|
||||
|
||||
/*
|
||||
vector<MonitorPolicy> mpV = (*it_handle).getMonitorPolicyVector();
|
||||
|
||||
for (int i=0; i<mpV.size(); ++i) {
|
||||
cout << " i " << i << endl;
|
||||
cout << mpV[i].getUserArgs() << endl;
|
||||
std::cout << " i " << i << std::endl;
|
||||
std::cout << mpV[i].getUserArgs() << std::endl;
|
||||
mpV[i].print();
|
||||
}
|
||||
*/
|
||||
@@ -60,8 +60,8 @@ void callbackHandlerMonitor( struct event_handler_args args) {
|
||||
|
||||
}
|
||||
else {
|
||||
cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__ << endl;
|
||||
cout << " Internal CAFE ERROR! Unknown Handle! handle=" << _handle << endl;
|
||||
std::cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__ << std::endl;
|
||||
std::cout << " Internal CAFE ERROR! Unknown Handle! handle=" << _handle << std::endl;
|
||||
}
|
||||
|
||||
return;
|
||||
@@ -77,8 +77,8 @@ void handlerPut( struct event_handler_args args) {
|
||||
#define __METHOD__ "handlerPut"
|
||||
|
||||
if (args.status !=ECA_NORMAL) {
|
||||
cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__ << endl;
|
||||
cout << "Status=" << args.status << " for channel " << ca_name (args.chid) << endl;
|
||||
std::cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__ << std::endl;
|
||||
std::cout << "Status=" << args.status << " for channel " << ca_name (args.chid) << std::endl;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -99,7 +99,7 @@ void handlerPut( struct event_handler_args args) {
|
||||
|
||||
handle_index.modify(it_handle, change_channelRequestStatusPut(channelRequestStatusPut));
|
||||
|
||||
//cout << __METHOD__ << " WITH_CALLBACK_USER_SUPLLIED for PUT done " << (*it_handle).getChannelRequestStatusPut().getCallbackProgressKind() << endl;
|
||||
//std::cout << __METHOD__ << " WITH_CALLBACK_USER_SUPLLIED for PUT done " << (*it_handle).getChannelRequestStatusPut().getCallbackProgressKind() << std::endl;
|
||||
|
||||
if(MUTEX)cafeMutex.unlock();
|
||||
|
||||
@@ -108,8 +108,8 @@ void handlerPut( struct event_handler_args args) {
|
||||
|
||||
}
|
||||
else {
|
||||
cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__ << endl;
|
||||
cout << " Internal CAFE ERROR! Unknown Handle! handle=" << _handle << endl;
|
||||
std::cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__ << std::endl;
|
||||
std::cout << " Internal CAFE ERROR! Unknown Handle! handle=" << _handle << std::endl;
|
||||
}
|
||||
|
||||
|
||||
@@ -130,8 +130,8 @@ void handlerGet( struct event_handler_args args) {
|
||||
#define __METHOD__ "handlerGet"
|
||||
|
||||
if (args.status !=ECA_NORMAL) {
|
||||
cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__ << endl;
|
||||
cout << "Status=" << args.status << " for channel " << ca_name (args.chid) << endl;
|
||||
std::cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__ << std::endl;
|
||||
std::cout << "Status=" << args.status << " for channel " << ca_name (args.chid) << std::endl;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -151,7 +151,7 @@ void handlerGet( struct event_handler_args args) {
|
||||
if(MUTEX){cafeMutex.lock();}
|
||||
handle_index.modify(it_handle, change_eventHandlerArgs (args));
|
||||
handle_index.modify(it_handle, change_channelRequestStatusGet(channelRequestStatusGet));
|
||||
//cout << __METHOD__ << " GET CALLBACK DONE " << (*it_handle).getChannelRequestStatusGet().getCallbackProgressKind() << endl;
|
||||
//std::cout << __METHOD__ << " GET CALLBACK DONE " << (*it_handle).getChannelRequestStatusGet().getCallbackProgressKind() << std::endl;
|
||||
if(MUTEX){cafeMutex.unlock();}
|
||||
|
||||
|
||||
@@ -162,14 +162,14 @@ void handlerGet( struct event_handler_args args) {
|
||||
PVDataHolder pvd(args.count);
|
||||
(*it_handle).getPVDataHolder(pvd);
|
||||
//pvd.print();
|
||||
//cout << "val/D//= " << pvd.getAsString(0) << endl;
|
||||
//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();
|
||||
//cout << "val/C/= " << pvc.getAsString(0) << endl;
|
||||
//std::cout << "val/C/= " << pvc.getAsString(0) << std::endl;
|
||||
}
|
||||
|
||||
|
||||
@@ -177,8 +177,8 @@ void handlerGet( struct event_handler_args args) {
|
||||
}
|
||||
else {
|
||||
|
||||
cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__ << endl;
|
||||
cout << " Internal CAFE ERROR! Unknown Handle! handle=" << _handle << endl;
|
||||
std::cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__ << std::endl;
|
||||
std::cout << " Internal CAFE ERROR! Unknown Handle! handle=" << _handle << std::endl;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,241 +0,0 @@
|
||||
{"channels":[
|
||||
{"name":"SINEG01-DBPM340:X1","backend":"sf-databuffer"},
|
||||
{"name":"SINEG01-DBPM340:Y1","backend":"sf-databuffer"},
|
||||
{"name":"SINSB01-DBPM150:Y1","backend":"sf-databuffer"},
|
||||
{"name":"SINSB02-DBPM150:Y1","backend":"sf-databuffer"},
|
||||
{"name":"SINLH01-DBPM060:Y1","backend":"sf-databuffer"},
|
||||
{"name":"SINLH02-DBPM210:Y1","backend":"sf-databuffer"},
|
||||
{"name":"SINLH02-DBPM240:Y1","backend":"sf-databuffer"},
|
||||
{"name":"SINLH03-DBPM010:Y1","backend":"sf-databuffer"},
|
||||
{"name":"SINLH03-DBPM050:Y1","backend":"sf-databuffer"},
|
||||
{"name":"SINLH03-DBPM090:Y1","backend":"sf-databuffer"},
|
||||
{"name":"SINSB03-DBPM120:Y1","backend":"sf-databuffer"},
|
||||
{"name":"SINSB03-DBPM220:Y1","backend":"sf-databuffer"},
|
||||
{"name":"SINSB04-DBPM120:Y1","backend":"sf-databuffer"},
|
||||
{"name":"SINSB04-DBPM220:Y1","backend":"sf-databuffer"},
|
||||
{"name":"SINSB05-DBPM120:Y1","backend":"sf-databuffer"},
|
||||
{"name":"SINSB05-DBPM220:Y1","backend":"sf-databuffer"},
|
||||
{"name":"SINXB01-DBPM120:Y1","backend":"sf-databuffer"},
|
||||
{"name":"SINBC01-DBPM010:Y1","backend":"sf-databuffer"},
|
||||
{"name":"SINBC01-DBPM030:Y1","backend":"sf-databuffer"},
|
||||
{"name":"SINBC01-DBPM080:Y1","backend":"sf-databuffer"},
|
||||
{"name":"SINBC01-DBPM100:Y1","backend":"sf-databuffer"},
|
||||
{"name":"SINBC02-DBPM140:Y1","backend":"sf-databuffer"},
|
||||
{"name":"SINBC02-DBPM320:Y1","backend":"sf-databuffer"},
|
||||
{"name":"SINDI01-DBPM010:Y1","backend":"sf-databuffer"},
|
||||
{"name":"SINDI01-DBPM060:Y1","backend":"sf-databuffer"},
|
||||
{"name":"SINDI02-DBPM010:Y1","backend":"sf-databuffer"},
|
||||
{"name":"SINDI02-DBPM040:Y1","backend":"sf-databuffer"},
|
||||
{"name":"SINDI02-DBPM080:Y1","backend":"sf-databuffer"},
|
||||
{"name":"S10CB01-DBPM220:Y1","backend":"sf-databuffer"},
|
||||
{"name":"S10CB01-DBPM420:Y1","backend":"sf-databuffer"},
|
||||
{"name":"S10CB02-DBPM220:Y1","backend":"sf-databuffer"},
|
||||
{"name":"S10CB02-DBPM420:Y1","backend":"sf-databuffer"},
|
||||
{"name":"S10DI01-DBPM110:Y1","backend":"sf-databuffer"},
|
||||
{"name":"S10CB03-DBPM220:Y1","backend":"sf-databuffer"},
|
||||
{"name":"S10CB03-DBPM420:Y1","backend":"sf-databuffer"},
|
||||
{"name":"S10CB04-DBPM220:Y1","backend":"sf-databuffer"},
|
||||
{"name":"S10CB04-DBPM420:Y1","backend":"sf-databuffer"},
|
||||
{"name":"S10CB05-DBPM220:Y1","backend":"sf-databuffer"},
|
||||
{"name":"S10CB05-DBPM420:Y1","backend":"sf-databuffer"},
|
||||
{"name":"S10CB06-DBPM220:Y1","backend":"sf-databuffer"},
|
||||
{"name":"S10CB06-DBPM420:Y1","backend":"sf-databuffer"},
|
||||
{"name":"S10CB07-DBPM220:Y1","backend":"sf-databuffer"},
|
||||
{"name":"S10CB07-DBPM420:Y1","backend":"sf-databuffer"},
|
||||
{"name":"S10CB08-DBPM220:Y1","backend":"sf-databuffer"},
|
||||
{"name":"S10CB08-DBPM420:Y1","backend":"sf-databuffer"},
|
||||
{"name":"S10CB09-DBPM220:Y1","backend":"sf-databuffer"},
|
||||
{"name":"S10BC01-DBPM010:Y1","backend":"sf-databuffer"},
|
||||
{"name":"S10BC01-DBPM050:Y1","backend":"sf-databuffer"},
|
||||
{"name":"S10BC01-DBPM090:Y1","backend":"sf-databuffer"},
|
||||
{"name":"S10BC02-DBPM140:Y1","backend":"sf-databuffer"},
|
||||
{"name":"S10BC02-DBPM320:Y1","backend":"sf-databuffer"},
|
||||
{"name":"S10MA01-DBPM010:Y1","backend":"sf-databuffer"},
|
||||
{"name":"S10MA01-DBPM060:Y1","backend":"sf-databuffer"},
|
||||
{"name":"S10MA01-DBPM120:Y1","backend":"sf-databuffer"},
|
||||
{"name":"S20CB01-DBPM420:Y1","backend":"sf-databuffer"},
|
||||
{"name":"S20CB02-DBPM420:Y1","backend":"sf-databuffer"},
|
||||
{"name":"S20CB03-DBPM420:Y1","backend":"sf-databuffer"},
|
||||
{"name":"S20SY01-DBPM010:Y1","backend":"sf-databuffer"},
|
||||
{"name":"S20SY01-DBPM040:Y1","backend":"sf-databuffer"},
|
||||
{"name":"S20SY01-DBPM060:Y1","backend":"sf-databuffer"},
|
||||
{"name":"S20SY02-DBPM080:Y1","backend":"sf-databuffer"},
|
||||
{"name":"S20SY02-DBPM120:Y1","backend":"sf-databuffer"},
|
||||
{"name":"S20SY02-DBPM150:Y1","backend":"sf-databuffer"},
|
||||
{"name":"S20SY03-DBPM010:Y1","backend":"sf-databuffer"},
|
||||
{"name":"S20SY03-DBPM040:Y1","backend":"sf-databuffer"},
|
||||
{"name":"S20SY03-DBPM080:Y1","backend":"sf-databuffer"},
|
||||
{"name":"S30CB01-DBPM420:Y1","backend":"sf-databuffer"},
|
||||
{"name":"S30CB02-DBPM420:Y1","backend":"sf-databuffer"},
|
||||
{"name":"S30CB03-DBPM420:Y1","backend":"sf-databuffer"},
|
||||
{"name":"S30CB04-DBPM420:Y1","backend":"sf-databuffer"},
|
||||
{"name":"S30CB05-DBPM420:Y1","backend":"sf-databuffer"},
|
||||
{"name":"S30CB06-DBPM420:Y1","backend":"sf-databuffer"},
|
||||
{"name":"S30CB07-DBPM420:Y1","backend":"sf-databuffer"},
|
||||
{"name":"S30CB08-DBPM420:Y1","backend":"sf-databuffer"},
|
||||
{"name":"S30CB09-DBPM420:Y1","backend":"sf-databuffer"},
|
||||
{"name":"S30CB10-DBPM420:Y1","backend":"sf-databuffer"},
|
||||
{"name":"S30CB11-DBPM420:Y1","backend":"sf-databuffer"},
|
||||
{"name":"S30CB12-DBPM420:Y1","backend":"sf-databuffer"},
|
||||
{"name":"S30CB13-DBPM420:Y1","backend":"sf-databuffer"},
|
||||
{"name":"S30CB14-DBPM420:Y1","backend":"sf-databuffer"},
|
||||
{"name":"S30CB15-DBPM420:Y1","backend":"sf-databuffer"},
|
||||
{"name":"SARCL01-DBPM010:Y1","backend":"sf-databuffer"},
|
||||
{"name":"SARCL01-DBPM060:Y1","backend":"sf-databuffer"},
|
||||
{"name":"SARCL01-DBPM120:Y1","backend":"sf-databuffer"},
|
||||
{"name":"SARCL01-DBPM150:Y1","backend":"sf-databuffer"},
|
||||
{"name":"SARCL02-DBPM110:Y1","backend":"sf-databuffer"},
|
||||
{"name":"SARCL02-DBPM220:Y1","backend":"sf-databuffer"},
|
||||
{"name":"SARCL02-DBPM260:Y1","backend":"sf-databuffer"},
|
||||
{"name":"SARCL02-DBPM330:Y1","backend":"sf-databuffer"},
|
||||
{"name":"SARCL02-DBPM470:Y1","backend":"sf-databuffer"},
|
||||
{"name":"SARMA01-DBPM040:Y1","backend":"sf-databuffer"},
|
||||
{"name":"SARMA01-DBPM100:Y1","backend":"sf-databuffer"},
|
||||
{"name":"SARMA02-DBPM010:Y1","backend":"sf-databuffer"},
|
||||
{"name":"SARMA02-DBPM020:Y1","backend":"sf-databuffer"},
|
||||
{"name":"SARMA02-DBPM040:Y1","backend":"sf-databuffer"},
|
||||
{"name":"SARMA02-DBPM110:Y1","backend":"sf-databuffer"},
|
||||
{"name":"SARUN01-DBPM070:Y1","backend":"sf-databuffer"},
|
||||
{"name":"SARUN02-DBPM070:Y1","backend":"sf-databuffer"},
|
||||
{"name":"SARUN03-DBPM070:Y1","backend":"sf-databuffer"},
|
||||
{"name":"SARUN04-DBPM070:Y1","backend":"sf-databuffer"},
|
||||
{"name":"SARUN05-DBPM070:Y1","backend":"sf-databuffer"},
|
||||
{"name":"SARUN06-DBPM070:Y1","backend":"sf-databuffer"},
|
||||
{"name":"SARUN07-DBPM070:Y1","backend":"sf-databuffer"},
|
||||
{"name":"SARUN09-DBPM070:Y1","backend":"sf-databuffer"},
|
||||
{"name":"SARUN10-DBPM070:Y1","backend":"sf-databuffer"},
|
||||
{"name":"SARUN11-DBPM070:Y1","backend":"sf-databuffer"},
|
||||
{"name":"SARUN12-DBPM070:Y1","backend":"sf-databuffer"},
|
||||
{"name":"SARUN13-DBPM070:Y1","backend":"sf-databuffer"},
|
||||
{"name":"SARUN14-DBPM070:Y1","backend":"sf-databuffer"},
|
||||
{"name":"SARUN15-DBPM070:Y1","backend":"sf-databuffer"},
|
||||
{"name":"SARUN16-DBPM070:Y1","backend":"sf-databuffer"},
|
||||
{"name":"SARUN17-DBPM070:Y1","backend":"sf-databuffer"},
|
||||
{"name":"SARUN18-DBPM070:Y1","backend":"sf-databuffer"},
|
||||
{"name":"SARUN19-DBPM070:Y1","backend":"sf-databuffer"},
|
||||
{"name":"SARUN20-DBPM070:Y1","backend":"sf-databuffer"},
|
||||
{"name":"S10BD01-DBPM020:Y1","backend":"sf-databuffer"},
|
||||
{"name":"SARBD01-DBPM040:Y1","backend":"sf-databuffer"},
|
||||
{"name":"SARBD02-DBPM010:Y1","backend":"sf-databuffer"},
|
||||
{"name":"SARBD02-DBPM040:Y1","backend":"sf-databuffer"},
|
||||
{"name":"SINEG01-DBPM340:Y1-VALID","backend":"sf-databuffer"},
|
||||
{"name":"SINSB01-DBPM150:Y1-VALID","backend":"sf-databuffer"},
|
||||
{"name":"SINSB02-DBPM150:Y1-VALID","backend":"sf-databuffer"},
|
||||
{"name":"SINLH01-DBPM060:Y1-VALID","backend":"sf-databuffer"},
|
||||
{"name":"SINLH02-DBPM210:Y1-VALID","backend":"sf-databuffer"},
|
||||
{"name":"SINLH02-DBPM240:Y1-VALID","backend":"sf-databuffer"},
|
||||
{"name":"SINLH03-DBPM010:Y1-VALID","backend":"sf-databuffer"},
|
||||
{"name":"SINLH03-DBPM050:Y1-VALID","backend":"sf-databuffer"},
|
||||
{"name":"SINLH03-DBPM090:Y1-VALID","backend":"sf-databuffer"},
|
||||
{"name":"SINSB03-DBPM120:Y1-VALID","backend":"sf-databuffer"},
|
||||
{"name":"SINSB03-DBPM220:Y1-VALID","backend":"sf-databuffer"},
|
||||
{"name":"SINSB04-DBPM120:Y1-VALID","backend":"sf-databuffer"},
|
||||
{"name":"SINSB04-DBPM220:Y1-VALID","backend":"sf-databuffer"},
|
||||
{"name":"SINSB05-DBPM120:Y1-VALID","backend":"sf-databuffer"},
|
||||
{"name":"SINSB05-DBPM220:Y1-VALID","backend":"sf-databuffer"},
|
||||
{"name":"SINXB01-DBPM120:Y1-VALID","backend":"sf-databuffer"},
|
||||
{"name":"SINBC01-DBPM010:Y1-VALID","backend":"sf-databuffer"},
|
||||
{"name":"SINBC01-DBPM030:Y1-VALID","backend":"sf-databuffer"},
|
||||
{"name":"SINBC01-DBPM080:Y1-VALID","backend":"sf-databuffer"},
|
||||
{"name":"SINBC01-DBPM100:Y1-VALID","backend":"sf-databuffer"},
|
||||
{"name":"SINBC02-DBPM140:Y1-VALID","backend":"sf-databuffer"},
|
||||
{"name":"SINBC02-DBPM320:Y1-VALID","backend":"sf-databuffer"},
|
||||
{"name":"SINDI01-DBPM010:Y1-VALID","backend":"sf-databuffer"},
|
||||
{"name":"SINDI01-DBPM060:Y1-VALID","backend":"sf-databuffer"},
|
||||
{"name":"SINDI02-DBPM010:Y1-VALID","backend":"sf-databuffer"},
|
||||
{"name":"SINDI02-DBPM040:Y1-VALID","backend":"sf-databuffer"},
|
||||
{"name":"SINDI02-DBPM080:Y1-VALID","backend":"sf-databuffer"},
|
||||
{"name":"S10CB01-DBPM220:Y1-VALID","backend":"sf-databuffer"},
|
||||
{"name":"S10CB01-DBPM420:Y1-VALID","backend":"sf-databuffer"},
|
||||
{"name":"S10CB02-DBPM220:Y1-VALID","backend":"sf-databuffer"},
|
||||
{"name":"S10CB02-DBPM420:Y1-VALID","backend":"sf-databuffer"},
|
||||
{"name":"S10DI01-DBPM110:Y1-VALID","backend":"sf-databuffer"},
|
||||
{"name":"S10CB03-DBPM220:Y1-VALID","backend":"sf-databuffer"},
|
||||
{"name":"S10CB03-DBPM420:Y1-VALID","backend":"sf-databuffer"},
|
||||
{"name":"S10CB04-DBPM220:Y1-VALID","backend":"sf-databuffer"},
|
||||
{"name":"S10CB04-DBPM420:Y1-VALID","backend":"sf-databuffer"},
|
||||
{"name":"S10CB05-DBPM220:Y1-VALID","backend":"sf-databuffer"},
|
||||
{"name":"S10CB05-DBPM420:Y1-VALID","backend":"sf-databuffer"},
|
||||
{"name":"S10CB06-DBPM220:Y1-VALID","backend":"sf-databuffer"},
|
||||
{"name":"S10CB06-DBPM420:Y1-VALID","backend":"sf-databuffer"},
|
||||
{"name":"S10CB07-DBPM220:Y1-VALID","backend":"sf-databuffer"},
|
||||
{"name":"S10CB07-DBPM420:Y1-VALID","backend":"sf-databuffer"},
|
||||
{"name":"S10CB08-DBPM220:Y1-VALID","backend":"sf-databuffer"},
|
||||
{"name":"S10CB08-DBPM420:Y1-VALID","backend":"sf-databuffer"},
|
||||
{"name":"S10CB09-DBPM220:Y1-VALID","backend":"sf-databuffer"},
|
||||
{"name":"S10BC01-DBPM010:Y1-VALID","backend":"sf-databuffer"},
|
||||
{"name":"S10BC01-DBPM050:Y1-VALID","backend":"sf-databuffer"},
|
||||
{"name":"S10BC01-DBPM090:Y1-VALID","backend":"sf-databuffer"},
|
||||
{"name":"S10BC02-DBPM140:Y1-VALID","backend":"sf-databuffer"},
|
||||
{"name":"S10BC02-DBPM320:Y1-VALID","backend":"sf-databuffer"},
|
||||
{"name":"S10MA01-DBPM010:Y1-VALID","backend":"sf-databuffer"},
|
||||
{"name":"S10MA01-DBPM060:Y1-VALID","backend":"sf-databuffer"},
|
||||
{"name":"S10MA01-DBPM120:Y1-VALID","backend":"sf-databuffer"},
|
||||
{"name":"S20CB01-DBPM420:Y1-VALID","backend":"sf-databuffer"},
|
||||
{"name":"S20CB02-DBPM420:Y1-VALID","backend":"sf-databuffer"},
|
||||
{"name":"S20CB03-DBPM420:Y1-VALID","backend":"sf-databuffer"},
|
||||
{"name":"S20SY01-DBPM010:Y1-VALID","backend":"sf-databuffer"},
|
||||
{"name":"S20SY01-DBPM040:Y1-VALID","backend":"sf-databuffer"},
|
||||
{"name":"S20SY01-DBPM060:Y1-VALID","backend":"sf-databuffer"},
|
||||
{"name":"S20SY02-DBPM080:Y1-VALID","backend":"sf-databuffer"},
|
||||
{"name":"S20SY02-DBPM120:Y1-VALID","backend":"sf-databuffer"},
|
||||
{"name":"S20SY02-DBPM150:Y1-VALID","backend":"sf-databuffer"},
|
||||
{"name":"S20SY03-DBPM010:Y1-VALID","backend":"sf-databuffer"},
|
||||
{"name":"S20SY03-DBPM040:Y1-VALID","backend":"sf-databuffer"},
|
||||
{"name":"S20SY03-DBPM080:Y1-VALID","backend":"sf-databuffer"},
|
||||
{"name":"S30CB01-DBPM420:Y1-VALID","backend":"sf-databuffer"},
|
||||
{"name":"S30CB02-DBPM420:Y1-VALID","backend":"sf-databuffer"},
|
||||
{"name":"S30CB03-DBPM420:Y1-VALID","backend":"sf-databuffer"},
|
||||
{"name":"S30CB04-DBPM420:Y1-VALID","backend":"sf-databuffer"},
|
||||
{"name":"S30CB05-DBPM420:Y1-VALID","backend":"sf-databuffer"},
|
||||
{"name":"S30CB06-DBPM420:Y1-VALID","backend":"sf-databuffer"},
|
||||
{"name":"S30CB07-DBPM420:Y1-VALID","backend":"sf-databuffer"},
|
||||
{"name":"S30CB08-DBPM420:Y1-VALID","backend":"sf-databuffer"},
|
||||
{"name":"S30CB09-DBPM420:Y1-VALID","backend":"sf-databuffer"},
|
||||
{"name":"S30CB10-DBPM420:Y1-VALID","backend":"sf-databuffer"},
|
||||
{"name":"S30CB11-DBPM420:Y1-VALID","backend":"sf-databuffer"},
|
||||
{"name":"S30CB12-DBPM420:Y1-VALID","backend":"sf-databuffer"},
|
||||
{"name":"S30CB13-DBPM420:Y1-VALID","backend":"sf-databuffer"},
|
||||
{"name":"S30CB14-DBPM420:Y1-VALID","backend":"sf-databuffer"},
|
||||
{"name":"S30CB15-DBPM420:Y1-VALID","backend":"sf-databuffer"},
|
||||
{"name":"SARCL01-DBPM010:Y1-VALID","backend":"sf-databuffer"},
|
||||
{"name":"SARCL01-DBPM060:Y1-VALID","backend":"sf-databuffer"},
|
||||
{"name":"SARCL01-DBPM120:Y1-VALID","backend":"sf-databuffer"},
|
||||
{"name":"SARCL01-DBPM150:Y1-VALID","backend":"sf-databuffer"},
|
||||
{"name":"SARCL02-DBPM110:Y1-VALID","backend":"sf-databuffer"},
|
||||
{"name":"SARCL02-DBPM220:Y1-VALID","backend":"sf-databuffer"},
|
||||
{"name":"SARCL02-DBPM260:Y1-VALID","backend":"sf-databuffer"},
|
||||
{"name":"SARCL02-DBPM330:Y1-VALID","backend":"sf-databuffer"},
|
||||
{"name":"SARCL02-DBPM470:Y1-VALID","backend":"sf-databuffer"},
|
||||
{"name":"SARMA01-DBPM040:Y1-VALID","backend":"sf-databuffer"},
|
||||
{"name":"SARMA01-DBPM100:Y1-VALID","backend":"sf-databuffer"},
|
||||
{"name":"SARMA02-DBPM010:Y1-VALID","backend":"sf-databuffer"},
|
||||
{"name":"SARMA02-DBPM020:Y1-VALID","backend":"sf-databuffer"},
|
||||
{"name":"SARMA02-DBPM040:Y1-VALID","backend":"sf-databuffer"},
|
||||
{"name":"SARMA02-DBPM110:Y1-VALID","backend":"sf-databuffer"},
|
||||
{"name":"SARUN01-DBPM070:Y1-VALID","backend":"sf-databuffer"},
|
||||
{"name":"SARUN02-DBPM070:Y1-VALID","backend":"sf-databuffer"},
|
||||
{"name":"SARUN03-DBPM070:Y1-VALID","backend":"sf-databuffer"},
|
||||
{"name":"SARUN04-DBPM070:Y1-VALID","backend":"sf-databuffer"},
|
||||
{"name":"SARUN05-DBPM070:Y1-VALID","backend":"sf-databuffer"},
|
||||
{"name":"SARUN06-DBPM070:Y1-VALID","backend":"sf-databuffer"},
|
||||
{"name":"SARUN07-DBPM070:Y1-VALID","backend":"sf-databuffer"},
|
||||
{"name":"SARUN09-DBPM070:Y1-VALID","backend":"sf-databuffer"},
|
||||
{"name":"SARUN10-DBPM070:Y1-VALID","backend":"sf-databuffer"},
|
||||
{"name":"SARUN11-DBPM070:Y1-VALID","backend":"sf-databuffer"},
|
||||
{"name":"SARUN12-DBPM070:Y1-VALID","backend":"sf-databuffer"},
|
||||
{"name":"SARUN13-DBPM070:Y1-VALID","backend":"sf-databuffer"},
|
||||
{"name":"SARUN14-DBPM070:Y1-VALID","backend":"sf-databuffer"},
|
||||
{"name":"SARUN15-DBPM070:Y1-VALID","backend":"sf-databuffer"},
|
||||
{"name":"SARUN16-DBPM070:Y1-VALID","backend":"sf-databuffer"},
|
||||
{"name":"SARUN17-DBPM070:Y1-VALID","backend":"sf-databuffer"},
|
||||
{"name":"SARUN18-DBPM070:Y1-VALID","backend":"sf-databuffer"},
|
||||
{"name":"SARUN19-DBPM070:Y1-VALID","backend":"sf-databuffer"},
|
||||
{"name":"SARUN20-DBPM070:Y1-VALID","backend":"sf-databuffer"},
|
||||
{"name":"S10BD01-DBPM020:Y1-VALID","backend":"sf-databuffer"},
|
||||
{"name":"SARBD01-DBPM040:Y1-VALID","backend":"sf-databuffer"},
|
||||
{"name":"SARBD02-DBPM010:Y1-VALID","backend":"sf-databuffer"},
|
||||
{"name":"SARBD02-DBPM040:Y1-VALID","backend":"sf-databuffer"}],
|
||||
"mapping":{"incomplete":"fill-null"},
|
||||
"channelValidation":{"inconsistency":"keep-as-is"},
|
||||
"sendBehaviour":{"strategy":"complete-latest"}}
|
||||
@@ -1,6 +0,0 @@
|
||||
g++ cafePush.cpp -o cafePush -I/opt/gfa/zmq/zeromq-4.1.5/include -I/opt/gfa/zmsglog/json/jsoncpp-src-0.6.0-rc2/include -L/opt/gfa/zmq/zeromq-4.1.5/lib -Wl,-rpath,/opt/gfa/zmq/zeromq-4.1.5/lib -L/opt/gfa/zmsglog/json/jsoncpp-src-0.6.0-rc2/libs/linux-gcc-4.4.7 -Wl,-rpath,/opt/gfa/zmsglog/json/jsoncpp-src-0.6.0-rc2/libs/linux-gcc-4.4.7 -lzmq -ljson_linux-gcc-4.4.7_libmt
|
||||
|
||||
|
||||
|
||||
|
||||
g++ cafePush.cpp -o cafePush -I/opt/gfa/zmq/zeromq-4.1.5/include -L/opt/gfa/zmq/zeromq-4.1.5/lib -Wl,-rpath,/opt/gfa/zmq/zeromq-4.1.5/lib -lzmq
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
|
||||
#CAFE version to link to
|
||||
CAFE_VERSION=cafe-1.3.0-final-2
|
||||
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
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
|
||||
#CAFE version to link to
|
||||
CAFE_VERSION=cafez-1.3.0-alpha-1
|
||||
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
|
||||
@@ -17,31 +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
|
||||
|
||||
ZEROMQ_BASE=/opt/gfa/zmq/zeromq-4.1.5
|
||||
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$(ZEROMQ_BASE)/include -I/opt/gfa/zmsglog/json/jsoncpp-src-0.6.0-rc2/include
|
||||
-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$(ZEROMQ_BASE)/lib \
|
||||
-Wl,-rpath,$(ZEROMQ_BASE)/lib \
|
||||
-L/opt/gfa/zmsglog/json/jsoncpp-src-0.6.0-rc2/libs/linux-gcc-4.4.7 \
|
||||
-Wl,-rpath,/opt/gfa/zmsglog/json/jsoncpp-src-0.6.0-rc2/libs/linux-gcc-4.4.7
|
||||
-Wl,-rpath,$(CAFE_CPP_BASE)/$(CAFE_VERSION)/lib
|
||||
|
||||
LIBS += -lcafe -lca -lCom -lzmq -ljson_linux-gcc-4.4.7_libmt
|
||||
|
||||
LIBS += -lcafe -lca -lCom
|
||||
|
||||
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
|
||||
@@ -1,52 +0,0 @@
|
||||
#
|
||||
# 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=cafe-1.0.0-final-2
|
||||
|
||||
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=/afs/psi.ch/project/cafe/gitworkspace/CAFE
|
||||
#CAFE_CPP_BASE=${CAFE_BASE}/python/python-3.5
|
||||
CAFE_CPP_BASE=${CAFE_BASE}/cpp
|
||||
BOOST_BASE=${CAFE_BASE}/boost/boost_1_61_0/include
|
||||
|
||||
|
||||
|
||||
INCLUDE_PATH += -I$(CAFE_CPP_BASE)/include \
|
||||
-I$(EPICS_BASE)/include -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)/src/.libs \
|
||||
-Wl,-rpath,$(CAFE_CPP_BASE)/src/.libs #\
|
||||
# -L$(PYTHON_LIB) -Wl,-rpath,$(PYTHON_LIB) -L/usr/lib64
|
||||
# -L$(CAFE_CPP_BASE)/src/libs/pycafe \
|
||||
|
||||
#LIBS += -lpython3.5m
|
||||
LIBS += -lcafe -lca -lCom
|
||||
|
||||
|
||||
cafeTest: cafeTest.cc
|
||||
g++ cafeTest.cc -o cafeTest \
|
||||
$(INCLUDE_PATH) $(LIB_DIR) $(LIBS)
|
||||
|
||||
|
||||
clean:
|
||||
rm -f cafeTest.o cafeTest
|
||||
|
||||
@@ -1,51 +0,0 @@
|
||||
#
|
||||
# Jan Chrin
|
||||
# November 2015
|
||||
#
|
||||
# Makefile to build C++ cafe client
|
||||
|
||||
#CAFE version to link to
|
||||
CAFE_VERSION=latest
|
||||
|
||||
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
|
||||
BOOST_BASE=${CAFE_BASE}/boost/boost_1_57_0
|
||||
|
||||
#INCLUDE_PATH += -I$(CAFE_CPP_BASE)/$(CAFE_VERSION)/include \
|
||||
|
||||
INCLUDE_PATH += -I/afs/psi.ch/project/cafe/gitworkspace/CAFE/cpp \
|
||||
-I/afs/psi.ch/project/cafe/gitworkspace/CAFE/cpp/include \
|
||||
-I$(EPICS_BASE)/include -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/afs/psi.ch/project/cafe/gitworkspace/CAFE/cpp/src/.libs \
|
||||
-Wl,-rpath,/afs/psi.ch/project/cafe/gitworkspace/CAFE/cpp/src/.libs \
|
||||
-L$(PYTHON_LIB) -Wl,-rpath,$(PYTHON_LIB)
|
||||
# -L$(CAFE_CPP_BASE)/$(CAFE_VERSION)/lib \
|
||||
# -Wl,-rpath,$(CAFE_CPP_BASE)/$(CAFE_VERSION)/lib
|
||||
|
||||
|
||||
|
||||
#LIBS += -lpython2.6
|
||||
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
|
||||
|
||||
@@ -9,41 +9,40 @@
|
||||
|
||||
|
||||
#CAFE version to link to
|
||||
CAFE_VERSION=pycafe-1.0.0-alpha-4
|
||||
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
|
||||
BOOST_BASE=${CAFE_BASE}/boost/boost_1_57_0
|
||||
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/afs/psi.ch/project/cafe/gitworkspace/CAFE/cpp
|
||||
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}
|
||||
|
||||
#-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)/src/.libs \
|
||||
-Wl,-rpath,$(CAFE_CPP_BASE)/$(CAFE_VERSION)/src/.libs \
|
||||
-L$(PYTHON_LIB) -Wl,-rpath,$(PYTHON_LIB)
|
||||
# -L/afs/psi.ch/project/cafe/gitworkspace/CAFE/cpp/src/.libs \
|
||||
# -Wl,-rpath,/afs/psi.ch/project/cafe/gitworkspace/CAFE/cpp/src/.libs \
|
||||
|
||||
|
||||
#LIBS += -lpython2.6
|
||||
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)
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
|
||||
#CAFE version to link to
|
||||
CAFE_VERSION=latest
|
||||
CAFE_VERSION=pycafe-1.8.0-gcc-6.3.0
|
||||
|
||||
|
||||
PYTHON_INCLUDE=/opt/gfa/python-3.5/latest/include/python3.5m
|
||||
@@ -20,27 +20,23 @@ 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_57_0
|
||||
BOOST_BASE=${CAFE_BASE}/boost/boost_1_61_0/include
|
||||
|
||||
|
||||
#INCLUDE_PATH += -I/afs/psi.ch/project/cafe/gitworkspace/CAFE/cpp
|
||||
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}
|
||||
|
||||
#-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$(PYTHON_LIB) -Wl,-rpath,$(PYTHON_LIB)
|
||||
# -L/afs/psi.ch/project/cafe/gitworkspace/CAFE/cpp/src/.libs \
|
||||
# -Wl,-rpath,/afs/psi.ch/project/cafe/gitworkspace/CAFE/cpp/src/.libs \
|
||||
|
||||
|
||||
#LIBS += -lpython2.6
|
||||
LIBS += -lcafe -lca -lCom -lpython3.5m
|
||||
|
||||
|
||||
@@ -1,55 +0,0 @@
|
||||
#
|
||||
# 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.0.0-beta-1
|
||||
CAFE_VERSION_OTHER=pycafe-noqt-1.0.0-beta-1
|
||||
|
||||
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
|
||||
#python/python-3.5
|
||||
CAFE_CPP_BASE=${CAFE_BASE}/python/python-3.5
|
||||
BOOST_BASE=${CAFE_BASE}/boost/boost_1_57_0
|
||||
|
||||
|
||||
#INCLUDE_PATH += -I/afs/psi.ch/project/cafe/gitworkspace/CAFE/cpp
|
||||
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}
|
||||
|
||||
#-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$(PYTHON_LIB) -Wl,-rpath,$(PYTHON_LIB)
|
||||
# -L/afs/psi.ch/project/cafe/gitworkspace/CAFE/cpp/src/.libs \
|
||||
# -Wl,-rpath,/afs/psi.ch/project/cafe/gitworkspace/CAFE/cpp/src/.libs \
|
||||
|
||||
|
||||
#LIBS += -lpython2.6
|
||||
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
|
||||
|
||||
@@ -1,55 +0,0 @@
|
||||
#
|
||||
# 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.0.0-final-1
|
||||
|
||||
|
||||
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
|
||||
#CAFE_CPP_BASE=${CAFE_BASE}/cpp/
|
||||
BOOST_BASE=${CAFE_BASE}/boost/boost_1_61_0/include
|
||||
|
||||
|
||||
#INCLUDE_PATH += -I/afs/psi.ch/project/cafe/gitworkspace/CAFE/cpp
|
||||
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}
|
||||
|
||||
#-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$(PYTHON_LIB) -Wl,-rpath,$(PYTHON_LIB) -L/usr/lib64
|
||||
# -L/afs/psi.ch/project/cafe/gitworkspace/CAFE/cpp/src/.libs \
|
||||
# -Wl,-rpath,/afs/psi.ch/project/cafe/gitworkspace/CAFE/cpp/src/.libs \
|
||||
|
||||
|
||||
LIBS += -lpython3.5m
|
||||
LIBS += -lcafe -lca -lCom
|
||||
|
||||
|
||||
cafeTest: cafeTest.cc
|
||||
g++ cafeTest.cc -o cafeTest \
|
||||
$(INCLUDE_PATH) $(LIB_DIR) $(LIBS)
|
||||
|
||||
|
||||
clean:
|
||||
rm -f cafeTest.o cafeTest
|
||||
|
||||
@@ -1,69 +0,0 @@
|
||||
#
|
||||
# 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=pyzcafe-1.3.0-alpha-1
|
||||
|
||||
|
||||
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
|
||||
|
||||
ZEROMQ_BASE=/opt/gfa/zmq/zeromq-4.1.5
|
||||
|
||||
#INCLUDE_PATH += -I/afs/psi.ch/project/cafe/gitworkspace/CAFE/cpp/include
|
||||
#-I$(CAFE_CPP_BASE)/$(CAFE_VERSION)/include \
|
||||
|
||||
INCLUDE_PATH += -I$(CAFE_CPP_BASE)/$(CAFE_VERSION)/include \
|
||||
-I$(EPICS_BASE)/include -I$(EPICS_BASE)/include/os/Linux \
|
||||
-I$(BOOST_BASE) -I$(ZEROMQ_BASE)/include \
|
||||
-I/opt/gfa/zmsglog/json/jsoncpp-src-0.6.0-rc2/include \
|
||||
-I/opt/gfa/zmq/curl-7.54.1/include \
|
||||
-I${PYTHON_INCLUDE}
|
||||
|
||||
#-I$(BOOST_BASE)/boost
|
||||
|
||||
|
||||
# -L/afs/psi.ch/project/cafe/gitworkspace/CAFE/cpp/src/.libs \
|
||||
# -Wl,-rpath,/afs/psi.ch/project/cafe/gitworkspace/CAFE/cpp/src/.libs \
|
||||
|
||||
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$(ZEROMQ_BASE)/lib \
|
||||
-Wl,-rpath,$(ZEROMQ_BASE)/lib \
|
||||
-L/opt/gfa/zmsglog/json/jsoncpp-src-0.6.0-rc2/libs/linux-gcc-4.4.7 \
|
||||
-Wl,-rpath,/opt/gfa/zmsglog/json/jsoncpp-src-0.6.0-rc2/libs/linux-gcc-4.4.7 \
|
||||
-L/opt/gfa/zmq/curl-7.54.1/lib/.libs \
|
||||
-Wl,-rpath,/opt/gfa/zmq/curl-7.54.1/lib/.libs \
|
||||
-L$(PYTHON_LIB) -Wl,-rpath,$(PYTHON_LIB) -L/usr/lib64
|
||||
# -L/afs/psi.ch/project/cafe/gitworkspace/CAFE/cpp/src/.libs \
|
||||
# -Wl,-rpath,/afs/psi.ch/project/cafe/gitworkspace/CAFE/cpp/src/.libs \
|
||||
|
||||
|
||||
LIBS += -lpython3.5m
|
||||
LIBS += -lcafe -lca -lCom -lzmq -ljson_linux-gcc-4.4.7_libmt -lcurl
|
||||
|
||||
|
||||
cafeTest: cafeTest.cc
|
||||
g++ cafeTest.cc -o cafeTest \
|
||||
$(INCLUDE_PATH) $(LIB_DIR) $(LIBS)
|
||||
|
||||
|
||||
clean:
|
||||
rm -f cafeTest.o cafeTest
|
||||
|
||||
@@ -1,75 +0,0 @@
|
||||
#
|
||||
# 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.0.0-beta-4
|
||||
|
||||
|
||||
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
|
||||
#CAFE_CPP_BASE=${CAFE_BASE}/cpp
|
||||
BOOST_BASE=${CAFE_BASE}/boost/boost_1_61_0/include
|
||||
|
||||
|
||||
#INCLUDE_PATH += -I/afs/psi.ch/project/cafe/gitworkspace/CAFE/cpp
|
||||
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}
|
||||
|
||||
#-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$(PYTHON_LIB) -Wl,-rpath,$(PYTHON_LIB) -L/usr/lib64
|
||||
# -L/afs/psi.ch/project/cafe/gitworkspace/CAFE/cpp/src/.libs \
|
||||
# -Wl,-rpath,/afs/psi.ch/project/cafe/gitworkspace/CAFE/cpp/src/.libs \
|
||||
|
||||
|
||||
LIBS += -lpython3.5m
|
||||
LIBS += -lcafe -lca -lCom
|
||||
|
||||
#cafeTest: cafeTest.cc
|
||||
# g++ cafeTest.cc -o cafeTest \
|
||||
# $(INCLUDE_PATH) $(LIB_DIR) $(LIBS)
|
||||
|
||||
#cafeTest: cafeTest.cc
|
||||
# g++ cafeTest.cc -o cafeTest \
|
||||
# $(INCLUDE_PATH) -L$(EPICS_BASE)/lib/${EPICS_HOST_ARCH} \
|
||||
# -L$(EPICS_BASE)/lib/${EPICS_HOST_ARCH} \
|
||||
# $(CAFE_CPP_BASE)/$(CAFE_VERSION)/lib/libcafe.a -lca -lCom
|
||||
## -L$(PYTHON_LIB)/libpython3.5m.so
|
||||
|
||||
|
||||
cafeTest: cafeTest.cc
|
||||
g++ cafeTest.cc -o cafeTest \
|
||||
-I$(BOOST_BASE) -I${PYTHON_INCLUDE} -I/usr/include/Qt \
|
||||
-I$(CAFE_CPP_BASE)/$(CAFE_VERSION)/include \
|
||||
-I$(EPICS_BASE)/include -I$(EPICS_BASE)/include/os/Linux \
|
||||
$(CAFE_CPP_BASE)/$(CAFE_VERSION)/lib/libcafe.a \
|
||||
$(EPICS_BASE)/lib/${EPICS_HOST_ARCH}/libca.a \
|
||||
$(EPICS_BASE)/lib/${EPICS_HOST_ARCH}/libCom.a \
|
||||
-L$(PYTHON_LIB) -Wl,-rpath,$(PYTHON_LIB) \
|
||||
-L/usr/lib64 -ldl -lpthread -lreadline -lrt -lpython3.5m -lQtCore -lQtXml
|
||||
|
||||
|
||||
|
||||
|
||||
clean:
|
||||
rm -f cafeTest.o cafeTest
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
#
|
||||
# Jan Chrin
|
||||
# June 2016
|
||||
#
|
||||
|
||||
##### CHANGE AS APPROPRIATE #################
|
||||
#Cafe CPP Version to install
|
||||
CAFE_VERSION=cafe-1.0.0-alpha-1
|
||||
|
||||
#CAFE project base
|
||||
CAFE_BASE=/opt/gfa/cafe/cpp
|
||||
|
||||
CAFE_ACTUAL=${CAFE_BASE}/${CAFE_VERSION}
|
||||
|
||||
EXAMPLES_INSTALL_PATH= $(CAFE_ACTUAL)/examples/cafeTest
|
||||
#############################################
|
||||
|
||||
install:
|
||||
mkdir -p $(EXAMPLES_INSTALL_PATH)
|
||||
cp makefile $(EXAMPLES_INSTALL_PATH)
|
||||
cp cafeTest.cc $(EXAMPLES_INSTALL_PATH)
|
||||
|
||||
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;
|
||||
|
||||
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,174 +0,0 @@
|
||||
/* =====================================================================
|
||||
zhelpers.h
|
||||
|
||||
Helper header file for example applications.
|
||||
=====================================================================
|
||||
*/
|
||||
|
||||
#ifndef __ZHELPERS_H_INCLUDED__
|
||||
#define __ZHELPERS_H_INCLUDED__
|
||||
|
||||
// Include a bunch of headers that we will need in the examples
|
||||
|
||||
#include <zmq.h>
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdarg.h>
|
||||
#include <string.h>
|
||||
|
||||
#if (defined (WIN32))
|
||||
# include <time.h>
|
||||
#else
|
||||
# include <sys/time.h>
|
||||
#endif
|
||||
|
||||
#include <assert.h>
|
||||
#include <signal.h>
|
||||
|
||||
// Version checking, and patch up missing constants to match 2.1
|
||||
#if ZMQ_VERSION_MAJOR == 2
|
||||
# error "Please upgrade to ZeroMQ/3.2 for these examples"
|
||||
#endif
|
||||
|
||||
// Provide random number from 0..(num-1)
|
||||
#if (defined (WIN32))
|
||||
# define randof(num) (int) ((float) (num) * rand () / (RAND_MAX + 1.0))
|
||||
#else
|
||||
# define randof(num) (int) ((float) (num) * random () / (RAND_MAX + 1.0))
|
||||
#endif
|
||||
|
||||
|
||||
// Receive 0MQ string from socket and convert into C string
|
||||
// Caller must free returned string. Returns NULL if the context
|
||||
// is being terminated.
|
||||
static char *
|
||||
s_recv (void *socket) {
|
||||
char buffer [256];
|
||||
int size = zmq_recv (socket, buffer, 255, 0); //ZMQ_DONTWAIT);
|
||||
if (size == -1)
|
||||
return NULL;
|
||||
if (size > 255)
|
||||
size = 255;
|
||||
buffer [size] = 0;
|
||||
return strdup (buffer);
|
||||
}
|
||||
|
||||
// Convert C string to 0MQ string and send to socket
|
||||
static int
|
||||
s_send (void *socket, char *string) {
|
||||
int size = zmq_send (socket, string, strlen (string), 0);
|
||||
return size;
|
||||
}
|
||||
|
||||
// Sends string as 0MQ string, as multipart non-terminal
|
||||
static int
|
||||
s_sendmore (void *socket, char *string) {
|
||||
int size = zmq_send (socket, string, strlen (string), ZMQ_SNDMORE);
|
||||
return size;
|
||||
}
|
||||
|
||||
// Receives all message parts from socket, prints neatly
|
||||
//
|
||||
static void
|
||||
s_dump (void *socket)
|
||||
{
|
||||
puts ("----------------------------------------");
|
||||
while (1) {
|
||||
// Process all parts of the message
|
||||
zmq_msg_t message;
|
||||
zmq_msg_init (&message);
|
||||
int size = zmq_msg_recv (&message, socket, 0);
|
||||
|
||||
// Dump the message as text or binary
|
||||
char *data = (char*)zmq_msg_data (&message);
|
||||
int is_text = 1;
|
||||
int char_nbr;
|
||||
for (char_nbr = 0; char_nbr < size; char_nbr++)
|
||||
if ((unsigned char) data [char_nbr] < 32
|
||||
|| (unsigned char) data [char_nbr] > 127)
|
||||
is_text = 0;
|
||||
|
||||
printf ("[%03d] ", size);
|
||||
for (char_nbr = 0; char_nbr < size; char_nbr++) {
|
||||
if (is_text)
|
||||
printf ("%c", data [char_nbr]);
|
||||
else
|
||||
printf ("%02X", (unsigned char) data [char_nbr]);
|
||||
}
|
||||
printf ("\n");
|
||||
|
||||
int64_t more; // Multipart detection
|
||||
more = 0;
|
||||
size_t more_size = sizeof (more);
|
||||
zmq_getsockopt (socket, ZMQ_RCVMORE, &more, &more_size);
|
||||
zmq_msg_close (&message);
|
||||
if (!more)
|
||||
break; // Last message part
|
||||
}
|
||||
}
|
||||
|
||||
// Set simple random printable identity on socket
|
||||
//
|
||||
static void
|
||||
s_set_id (void *socket)
|
||||
{
|
||||
char identity [10];
|
||||
sprintf (identity, "%04X-%04X", randof (0x10000), randof (0x10000));
|
||||
zmq_setsockopt (socket, ZMQ_IDENTITY, identity, strlen (identity));
|
||||
}
|
||||
|
||||
/*
|
||||
// Sleep for a number of milliseconds
|
||||
static void
|
||||
s_sleep (int msecs)
|
||||
{
|
||||
#if (defined (WIN32))
|
||||
Sleep (msecs);
|
||||
#else
|
||||
struct timespec t;
|
||||
t.tv_sec = msecs / 1000;
|
||||
t.tv_nsec = (msecs % 1000) * 1000000;
|
||||
nanosleep (&t, NULL);
|
||||
#endif
|
||||
}
|
||||
*/
|
||||
|
||||
// Return current system clock as milliseconds
|
||||
static int64_t
|
||||
s_clock (void)
|
||||
{
|
||||
#if (defined (WIN32))
|
||||
SYSTEMTIME st;
|
||||
GetSystemTime (&st);
|
||||
return (int64_t) st.wSecond * 1000 + st.wMilliseconds;
|
||||
#else
|
||||
struct timeval tv;
|
||||
gettimeofday (&tv, NULL);
|
||||
return (int64_t) (tv.tv_sec * 1000 + tv.tv_usec / 1000);
|
||||
#endif
|
||||
}
|
||||
|
||||
// Print formatted string to stdout, prefixed by date/time and
|
||||
// terminated with a newline.
|
||||
|
||||
/*
|
||||
static void
|
||||
s_console (const char *format, ...)
|
||||
{
|
||||
time_t curtime = time (NULL);
|
||||
struct tm *loctime = localtime (&curtime);
|
||||
char *formatted = (char*)malloc (20);
|
||||
strftime (formatted, 20, "%y-%m-%d %H:%M:%S ", loctime);
|
||||
printf ("%s", formatted);
|
||||
free (formatted);
|
||||
|
||||
va_list argptr;
|
||||
va_start (argptr, format);
|
||||
vprintf (format, argptr);
|
||||
va_end (argptr);
|
||||
printf ("\n");
|
||||
}
|
||||
*/
|
||||
#endif // __ZHELPERS_H_INCLUDED__
|
||||
@@ -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;
|
||||
@@ -42,48 +43,79 @@ private:
|
||||
CAFE_DATATYPE_UNION lowerCtrlLimit;
|
||||
|
||||
Helper helper;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
PVCtrlHolder(){
|
||||
alarmStatus=0; alarmSeverity=0; precision=0; status=ECA_NORMAL;
|
||||
nelem=1; size=1; rule=true; beamEventNo=0;
|
||||
hasAlarm=true;
|
||||
noStr=0; dataType=(CAFE_DATATYPE) CAFE_NO_ACCESS;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
PVCtrlHolder()
|
||||
{
|
||||
alarmStatus=0;
|
||||
alarmSeverity=0;
|
||||
precision=0;
|
||||
status=ECA_NORMAL;
|
||||
nelem=1;
|
||||
size=1;
|
||||
rule=true;
|
||||
beamEventNo=0;
|
||||
hasAlarm=true;
|
||||
noStr=0;
|
||||
dataType=(CAFE_DATATYPE) CAFE_NO_ACCESS;
|
||||
dataTypeNative=(CAFE_DATATYPE) CAFE_NO_ACCESS;
|
||||
strcpy(pv,""); strcpy(pvAlias,"");strcpy(device,""); strcpy(attrib,""); strcpy(units,"");
|
||||
strcpy(pv,"");
|
||||
strcpy(pvAlias,"");
|
||||
strcpy(device,"");
|
||||
strcpy(attrib,"");
|
||||
strcpy(units,"");
|
||||
|
||||
val.reset( new CAFE_DATATYPE_UNION[nelem] );
|
||||
val[0].d=0.00;
|
||||
};
|
||||
|
||||
PVCtrlHolder(unsigned int _sizeOfArray) {
|
||||
alarmStatus=0; alarmSeverity=0; precision=0; status=ECA_NORMAL;
|
||||
nelem=_sizeOfArray; size=_sizeOfArray; rule=true; beamEventNo=0;
|
||||
hasAlarm=true;
|
||||
noStr=0; dataType=(CAFE_DATATYPE) CAFE_NO_ACCESS;
|
||||
|
||||
PVCtrlHolder(unsigned int _sizeOfArray)
|
||||
{
|
||||
alarmStatus=0;
|
||||
alarmSeverity=0;
|
||||
precision=0;
|
||||
status=ECA_NORMAL;
|
||||
nelem=_sizeOfArray;
|
||||
size=_sizeOfArray;
|
||||
rule=true;
|
||||
beamEventNo=0;
|
||||
hasAlarm=true;
|
||||
noStr=0;
|
||||
dataType=(CAFE_DATATYPE) CAFE_NO_ACCESS;
|
||||
dataTypeNative=(CAFE_DATATYPE) CAFE_NO_ACCESS;
|
||||
strcpy(pv,""); strcpy(pvAlias,"");strcpy(device,""); strcpy(attrib,""); strcpy(units,"");
|
||||
strcpy(pv,"");
|
||||
strcpy(pvAlias,"");
|
||||
strcpy(device,"");
|
||||
strcpy(attrib,"");
|
||||
strcpy(units,"");
|
||||
|
||||
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;
|
||||
};
|
||||
};
|
||||
|
||||
~PVCtrlHolder() {val.reset();};
|
||||
~PVCtrlHolder()
|
||||
{
|
||||
val.reset();
|
||||
};
|
||||
|
||||
void setHasAlarm(bool a) {
|
||||
hasAlarm=a;
|
||||
return;
|
||||
};
|
||||
void setHasAlarm(bool a)
|
||||
{
|
||||
hasAlarm=a;
|
||||
return;
|
||||
};
|
||||
|
||||
unsigned int setNelem (unsigned int _nelem) {
|
||||
unsigned int setNelem (unsigned int _nelem)
|
||||
{
|
||||
_nelem>0 ? nelem=_nelem : nelem=1;
|
||||
|
||||
if (_nelem>size) {
|
||||
if (_nelem>size)
|
||||
{
|
||||
|
||||
size=_nelem;
|
||||
|
||||
@@ -93,211 +125,390 @@ private:
|
||||
return nelem;
|
||||
};
|
||||
|
||||
short getPrecision() const {return precision;}
|
||||
|
||||
const char * getUnits() const {return units;}
|
||||
string getUnitsAsString() const {return (string) units;}
|
||||
short getNoEnumStrings () const {return noStr;};
|
||||
char * getEnumString(short indx) const {return (char *) strs[indx];};
|
||||
short getPrecision() const
|
||||
{
|
||||
return precision;
|
||||
}
|
||||
|
||||
const char * getUnits() const
|
||||
{
|
||||
return units;
|
||||
}
|
||||
|
||||
vector<std::string> getEnumStrings() const {
|
||||
std::string getUnitsAsString() const
|
||||
{
|
||||
return (std::string) units;
|
||||
}
|
||||
|
||||
vector<std::string> vEnumStrings;
|
||||
/*Defined in PVHolder.h
|
||||
short getNoEnumStrings () const
|
||||
{
|
||||
return noStr;
|
||||
};
|
||||
char * getEnumString(short indx) const
|
||||
{
|
||||
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;
|
||||
};
|
||||
|
||||
|
||||
short getEnumFromString(string enumString){
|
||||
|
||||
short returnValue=-1;
|
||||
|
||||
for ( short i=0; i<noStr; ++i) {
|
||||
if (strcmp(enumString.c_str(), strs[i])==0) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
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) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
cout << "*** WARNING FROM PvCtrlHolder.h ***" << endl;
|
||||
cout << "*** Method getEnumFromString(string enumString) ***" << endl;
|
||||
cout << "The given input string '" << enumString << "' was not recognized! " << endl;
|
||||
cout << "Valid values are: " << endl;
|
||||
for ( short i=0; i<noStr; ++i) {
|
||||
cout << i << ":" << strs[i] << endl;
|
||||
}
|
||||
|
||||
|
||||
return returnValue;
|
||||
|
||||
}
|
||||
|
||||
string getStringFromEnum(unsigned short enumValue) const{
|
||||
|
||||
string returnValue="";
|
||||
|
||||
if (enumValue<noStr) {
|
||||
return (string) strs[enumValue];
|
||||
}
|
||||
else {
|
||||
cout << "*** WARNING FROM PvCtrlHolder.h ***" << endl;
|
||||
cout << "*** Method getStringFromEnum(unsigned short enumValue) ***" << endl;
|
||||
cout << "The given input index " << enumValue << " exceeds the number of enum states " << noStr << endl;
|
||||
cout << "Valid values are: " << endl;
|
||||
for ( short i=0; i<noStr; ++i) {
|
||||
cout << i << ":" << strs[i] << endl;
|
||||
}
|
||||
|
||||
if (enumValue<MAX_ENUM_STATES) {
|
||||
return (string) strs[enumValue];
|
||||
}
|
||||
else {
|
||||
return returnValue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
CafeDataTypeHelper getRISC_pad() {CafeDataTypeHelper cdth(RISC_pad, dataType); return cdth;}
|
||||
CafeDataTypeHelper getUpperDispLimit() {CafeDataTypeHelper cdth(upperDispLimit, dataType); return cdth;}
|
||||
CafeDataTypeHelper getLowerDispLimit() {CafeDataTypeHelper cdth(lowerDispLimit, dataType); return cdth;}
|
||||
CafeDataTypeHelper getUpperAlarmLimit() {CafeDataTypeHelper cdth(upperAlarmLimit, dataType); return cdth;}
|
||||
CafeDataTypeHelper getUpperWarningLimit() {CafeDataTypeHelper cdth(upperWarningLimit, dataType); return cdth;}
|
||||
CafeDataTypeHelper getLowerWarningLimit() {CafeDataTypeHelper cdth(lowerWarningLimit, dataType); return cdth;}
|
||||
CafeDataTypeHelper getLowerAlarmLimit() {CafeDataTypeHelper cdth(lowerAlarmLimit, dataType); return cdth;}
|
||||
CafeDataTypeHelper getUpperCtrlLimit() {CafeDataTypeHelper cdth(upperCtrlLimit, dataType); return cdth;}
|
||||
CafeDataTypeHelper getLowerCtrlLimit() {CafeDataTypeHelper cdth(lowerCtrlLimit, dataType); return cdth;}
|
||||
short getEnumFromString(std::string enumString)
|
||||
{
|
||||
|
||||
short returnValue=INVALID_ENUM_RETURN_VALUE;
|
||||
|
||||
for ( short i=0; i<noStr; ++i)
|
||||
{
|
||||
if (strcmp(enumString.c_str(), strs[i])==0)
|
||||
{
|
||||
return i;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
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)
|
||||
{
|
||||
return i;
|
||||
}
|
||||
}
|
||||
|
||||
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;
|
||||
|
||||
}
|
||||
|
||||
std::string getStringFromEnum(unsigned short enumValue) const
|
||||
{
|
||||
|
||||
std::string returnValue=INVALID_ENUM_RETURN_STRING;
|
||||
|
||||
if (enumValue<noStr)
|
||||
{
|
||||
return (std::string) strs[enumValue];
|
||||
}
|
||||
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;
|
||||
}
|
||||
|
||||
return returnValue;
|
||||
|
||||
/*
|
||||
if (enumValue<MAX_ENUM_STATES)
|
||||
{
|
||||
return (std::string) strs[enumValue];
|
||||
}
|
||||
else
|
||||
{
|
||||
return returnValue;
|
||||
}
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
string getUpperDispLimit_AsString() { return getAsString(upperDispLimit); }
|
||||
string getLowerDispLimit_AsString() { return getAsString(lowerDispLimit); }
|
||||
string getUpperAlarmLimit_AsString() { return getAsString(upperAlarmLimit); }
|
||||
string getUpperWarningLimit_AsString() { return getAsString(upperWarningLimit); }
|
||||
string getLowerWarningLimit_AsString() { return getAsString(lowerWarningLimit); }
|
||||
string getLowerAlarmLimit_AsString() { return getAsString(lowerAlarmLimit); }
|
||||
string getUpperCtrlLimit_AsString() { return getAsString(upperCtrlLimit); }
|
||||
string getLowerCtrlLimit_AsString() { return getAsString(lowerCtrlLimit); }
|
||||
|
||||
double getUpperDispLimit_AsDouble() { return getAsDouble(upperDispLimit); }
|
||||
double getLowerDispLimit_AsDouble() { return getAsDouble(lowerDispLimit); }
|
||||
double getUpperAlarmLimit_AsDouble() { return getAsDouble(upperAlarmLimit); }
|
||||
double getUpperWarningLimit_AsDouble() { return getAsDouble(upperWarningLimit); }
|
||||
double getLowerWarningLimit_AsDouble() { return getAsDouble(lowerWarningLimit); }
|
||||
double getLowerAlarmLimit_AsDouble() { return getAsDouble(lowerAlarmLimit); }
|
||||
double getUpperCtrlLimit_AsDouble() { return getAsDouble(upperCtrlLimit); }
|
||||
double getLowerCtrlLimit_AsDouble() { return getAsDouble(lowerCtrlLimit); }
|
||||
CafeDataTypeHelper getRISC_pad()
|
||||
{
|
||||
CafeDataTypeHelper cdth(RISC_pad, dataType);
|
||||
return cdth;
|
||||
}
|
||||
CafeDataTypeHelper getUpperDispLimit()
|
||||
{
|
||||
CafeDataTypeHelper cdth(upperDispLimit, dataType);
|
||||
return cdth;
|
||||
}
|
||||
CafeDataTypeHelper getLowerDispLimit()
|
||||
{
|
||||
CafeDataTypeHelper cdth(lowerDispLimit, dataType);
|
||||
return cdth;
|
||||
}
|
||||
CafeDataTypeHelper getUpperAlarmLimit()
|
||||
{
|
||||
CafeDataTypeHelper cdth(upperAlarmLimit, dataType);
|
||||
return cdth;
|
||||
}
|
||||
CafeDataTypeHelper getUpperWarningLimit()
|
||||
{
|
||||
CafeDataTypeHelper cdth(upperWarningLimit, dataType);
|
||||
return cdth;
|
||||
}
|
||||
CafeDataTypeHelper getLowerWarningLimit()
|
||||
{
|
||||
CafeDataTypeHelper cdth(lowerWarningLimit, dataType);
|
||||
return cdth;
|
||||
}
|
||||
CafeDataTypeHelper getLowerAlarmLimit()
|
||||
{
|
||||
CafeDataTypeHelper cdth(lowerAlarmLimit, dataType);
|
||||
return cdth;
|
||||
}
|
||||
CafeDataTypeHelper getUpperCtrlLimit()
|
||||
{
|
||||
CafeDataTypeHelper cdth(upperCtrlLimit, dataType);
|
||||
return cdth;
|
||||
}
|
||||
CafeDataTypeHelper getLowerCtrlLimit()
|
||||
{
|
||||
CafeDataTypeHelper cdth(lowerCtrlLimit, dataType);
|
||||
return cdth;
|
||||
}
|
||||
|
||||
void print() {
|
||||
|
||||
|
||||
std::string getUpperDispLimit_AsString()
|
||||
{
|
||||
return getAsString(upperDispLimit);
|
||||
}
|
||||
std::string getLowerDispLimit_AsString()
|
||||
{
|
||||
return getAsString(lowerDispLimit);
|
||||
}
|
||||
std::string getUpperAlarmLimit_AsString()
|
||||
{
|
||||
return getAsString(upperAlarmLimit);
|
||||
}
|
||||
std::string getUpperWarningLimit_AsString()
|
||||
{
|
||||
return getAsString(upperWarningLimit);
|
||||
}
|
||||
std::string getLowerWarningLimit_AsString()
|
||||
{
|
||||
return getAsString(lowerWarningLimit);
|
||||
}
|
||||
std::string getLowerAlarmLimit_AsString()
|
||||
{
|
||||
return getAsString(lowerAlarmLimit);
|
||||
}
|
||||
std::string getUpperCtrlLimit_AsString()
|
||||
{
|
||||
return getAsString(upperCtrlLimit);
|
||||
}
|
||||
std::string getLowerCtrlLimit_AsString()
|
||||
{
|
||||
return getAsString(lowerCtrlLimit);
|
||||
}
|
||||
|
||||
double getUpperDispLimit_AsDouble()
|
||||
{
|
||||
return getAsDouble(upperDispLimit);
|
||||
}
|
||||
double getLowerDispLimit_AsDouble()
|
||||
{
|
||||
return getAsDouble(lowerDispLimit);
|
||||
}
|
||||
double getUpperAlarmLimit_AsDouble()
|
||||
{
|
||||
return getAsDouble(upperAlarmLimit);
|
||||
}
|
||||
double getUpperWarningLimit_AsDouble()
|
||||
{
|
||||
return getAsDouble(upperWarningLimit);
|
||||
}
|
||||
double getLowerWarningLimit_AsDouble()
|
||||
{
|
||||
return getAsDouble(lowerWarningLimit);
|
||||
}
|
||||
double getLowerAlarmLimit_AsDouble()
|
||||
{
|
||||
return getAsDouble(lowerAlarmLimit);
|
||||
}
|
||||
double getUpperCtrlLimit_AsDouble()
|
||||
{
|
||||
return getAsDouble(upperCtrlLimit);
|
||||
}
|
||||
double getLowerCtrlLimit_AsDouble()
|
||||
{
|
||||
return getAsDouble(lowerCtrlLimit);
|
||||
}
|
||||
|
||||
void print()
|
||||
{
|
||||
print(nelem) ;
|
||||
}
|
||||
|
||||
|
||||
void print(unsigned int nelemToPrint) {
|
||||
void print(unsigned int nelemToPrint)
|
||||
{
|
||||
|
||||
nelemToPrint=min(nelemToPrint,nelem);
|
||||
nelemToPrint=std::min(nelemToPrint,nelem);
|
||||
std::cout << "------------------------------------------" << std::endl;
|
||||
std::cout << "PVCtrlHolder:" << std::endl;
|
||||
std::cout << "processVariable= " << pv << std::endl;
|
||||
if (strcmp(pvAlias,pv)) {
|
||||
std::cout << "processVariable= " << pv << std::endl;
|
||||
if (strcmp(pvAlias,pv))
|
||||
{
|
||||
std::cout << "pvAlias = " << pvAlias << std::endl;
|
||||
}
|
||||
std::cout << "device = " << device << std::endl;
|
||||
std::cout << "attrib = " << attrib << std::endl;
|
||||
std::cout << "dataType = " << cafeDataTypeCode.message(dataType).c_str()
|
||||
<< " (" << dataType << ") " << std::endl;
|
||||
<< " (" << dataType << ") " << std::endl;
|
||||
std::cout << "dbrTypeRequest = " << dbr_type_to_text(dbrDataType)<< std::endl;
|
||||
if (dataType!=CAFE_NO_ACCESS || dataType != CAFE_TYPENOTCONN) {
|
||||
std::cout << "nelem = " << nelem << std::endl;
|
||||
if (dataType!=CAFE_NO_ACCESS || dataType != CAFE_TYPENOTCONN)
|
||||
{
|
||||
std::cout << "nelem = " << nelem << std::endl;
|
||||
|
||||
//std::cout << "alarmStatus = " << alarmStatus << " [" << acond.asString(alarmStatus)<< "]" << std::endl;
|
||||
//std::cout << "alarmSeverity = " << alarmSeverity << " [" << aseve.asString(alarmSeverity) << "]"<< std::endl;
|
||||
std::cout << "alarmStatus = " << acond.asString(alarmStatus) << " (" << alarmStatus << ")" << std::endl;
|
||||
std::cout << "alarmSeverity = " << aseve.asString(alarmSeverity) << " (" <<alarmSeverity << ")" << std::endl;
|
||||
//std::cout << "alarmStatus = " << alarmStatus << " [" << acond.asString(alarmStatus)<< "]" << std::endl;
|
||||
//std::cout << "alarmSeverity = " << alarmSeverity << " [" << aseve.asString(alarmSeverity) << "]"<< std::endl;
|
||||
std::cout << "alarmStatus = " << acond.asString(alarmStatus) << " (" << alarmStatus << ")" << std::endl;
|
||||
std::cout << "alarmSeverity = " << aseve.asString(alarmSeverity) << " (" <<alarmSeverity << ")" << std::endl;
|
||||
|
||||
|
||||
std::cout << "precision = " << precision << std::endl;
|
||||
std::cout << "units = " << units << std::endl;
|
||||
/*
|
||||
if (dataType==CAFE_DOUBLE){
|
||||
std::cout << "RISC_Pad0 = " << (dbr_short_t) RISC_pad.d << std::endl
|
||||
// in dbr_ctrl_double this is a RISC_pad
|
||||
}
|
||||
else if (dataType==CAFE_CHAR) {
|
||||
std::cout << "RISC_Pad = " << (unsigned short) RISC_pad.ch << std::endl;
|
||||
}
|
||||
else if (dataType==CAFE_FLOAT) {
|
||||
std::cout << "RISC_Pad = " << (dbr_short_t) RISC_pad.f << std::endl;
|
||||
}
|
||||
*/
|
||||
if (dataType!=CAFE_ENUM) {
|
||||
|
||||
std::cout << "precision = " << precision << std::endl;
|
||||
std::cout << "units = " << units << std::endl;
|
||||
/*
|
||||
if (dataType==CAFE_DOUBLE){
|
||||
std::cout << "RISC_Pad0 = " << (dbr_short_t) RISC_pad.d << std::endl
|
||||
// in dbr_ctrl_double this is a RISC_pad
|
||||
}
|
||||
else if (dataType==CAFE_CHAR) {
|
||||
std::cout << "RISC_Pad = " << (unsigned short) RISC_pad.ch << std::endl;
|
||||
}
|
||||
else if (dataType==CAFE_FLOAT) {
|
||||
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)) {
|
||||
if(dbr_type_is_CTRL(dbrDataType))
|
||||
{
|
||||
std::cout << "upperCtrlLimit = " << getAsString(upperCtrlLimit) << std::endl;
|
||||
std::cout << "lowerCtrlLimit = " << getAsString(lowerCtrlLimit) << std::endl;
|
||||
}
|
||||
}
|
||||
else {
|
||||
std::cout << "NoStr (ENUM) = " << noStr << std::endl;
|
||||
std::cout << "strs (ENUM) = " ;
|
||||
for (short i=0; i< noStr; ++i) {std::cout << "{" << strs[i] << "} " ;}
|
||||
cout <<std::endl;
|
||||
}
|
||||
//}
|
||||
//else {
|
||||
if (dataType==CAFE_ENUM)
|
||||
{
|
||||
std::cout << "NoStr (ENUM) = " << noStr << std::endl;
|
||||
std::cout << "strs (ENUM) = " ;
|
||||
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) {std::cout << "value(s) = " ;}
|
||||
|
||||
switch (dataType) {
|
||||
case CAFE_STRING:
|
||||
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 ) {std::cout << val[i].s << " [" << i << "] " ;}
|
||||
break;
|
||||
case CAFE_FLOAT:
|
||||
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 ) {std::cout <<
|
||||
getAsString(i) << " (" << val[i].us << ")" << " [" << i << "] " ;}
|
||||
break;
|
||||
case CAFE_CHAR:
|
||||
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 ) {std::cout << val[i].l << " [" << i << "] " ;}
|
||||
break;
|
||||
case CAFE_DOUBLE:
|
||||
for (unsigned int i=0; i <nelemToPrint; ++i ) {std::cout << val[i].d << " [" << i << "] " ;}
|
||||
break;
|
||||
case CAFE_NO_ACCESS:
|
||||
std::cout << "status = " << cafeStatusCode.message(status).c_str() << std::endl;
|
||||
if(nelem>0)
|
||||
{
|
||||
std::cout << "value(s) = " ;
|
||||
}
|
||||
|
||||
switch (dataType)
|
||||
{
|
||||
case CAFE_STRING:
|
||||
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 )
|
||||
{
|
||||
std::cout << val[i].s << " [" << i << "] " ;
|
||||
}
|
||||
break;
|
||||
case CAFE_FLOAT:
|
||||
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 )
|
||||
{
|
||||
std::cout <<
|
||||
getAsString(i) << " (" << val[i].us << ")" << " [" << i << "] " ;
|
||||
}
|
||||
break;
|
||||
case CAFE_CHAR:
|
||||
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 )
|
||||
{
|
||||
std::cout << val[i].l << " [" << i << "] " ;
|
||||
}
|
||||
break;
|
||||
case CAFE_DOUBLE:
|
||||
for (unsigned int i=0; i <nelemToPrint; ++i )
|
||||
{
|
||||
std::cout << val[i].d << " [" << i << "] " ;
|
||||
}
|
||||
break;
|
||||
case CAFE_NO_ACCESS:
|
||||
default:
|
||||
std::cout << "DATA_TYPE NOT YET DEFINED " << endl;
|
||||
break;
|
||||
std::cout << "DATA_TYPE NOT YET DEFINED " << std::endl;
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
std::cout << std::endl;
|
||||
}
|
||||
std::cout << "------------------------------------------" << std::endl;
|
||||
std::cout << "------------------------------------------" << std::endl;
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
@@ -9,224 +9,349 @@
|
||||
#define PVDATAHOLDER_H
|
||||
|
||||
#include <PVHolder.h>
|
||||
#include <tmDateMap.h>
|
||||
|
||||
/**
|
||||
* \class PVDataHolder
|
||||
* \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;
|
||||
friend class Connect;
|
||||
friend class Conduit;
|
||||
//if HAVE_LIBQTXML
|
||||
//if HAVE_LIBQTXML
|
||||
friend class loadCollectionXMLParser;
|
||||
friend class restorePVGroupXMLParser;
|
||||
//endif
|
||||
//endif
|
||||
friend struct change_dataBufferPVDataHolder;
|
||||
friend struct change_dataBufferSize_TIME;
|
||||
friend struct change_connectionHandlerArgs;
|
||||
friend struct change_pvAlias;
|
||||
|
||||
//private:
|
||||
//epicsTimeStamp ts;
|
||||
//bool hasTS;
|
||||
|
||||
|
||||
|
||||
public:
|
||||
|
||||
epicsTimeStamp ts;
|
||||
bool hasTS;
|
||||
|
||||
epicsTimeStamp ts;
|
||||
bool hasTS;
|
||||
etsNorm _etsNorm;
|
||||
etsDate _etsDate;
|
||||
TMwdayText tmDay;
|
||||
TMmonthpText tmMonth;
|
||||
|
||||
//Derived class does not inherit constructors
|
||||
PVDataHolder(unsigned int _sizeOfArray) {
|
||||
PVDataHolder(unsigned int _sizeOfArray)
|
||||
{
|
||||
|
||||
alarmStatus=0; alarmSeverity=0; status=ECAFE_NODATA;
|
||||
alarmStatus=-1;
|
||||
alarmSeverity=-1;
|
||||
status=ECAFE_NODATA;
|
||||
nelem= _sizeOfArray > 0 ? _sizeOfArray : 1;
|
||||
size = _sizeOfArray > 0 ? _sizeOfArray : 1;
|
||||
|
||||
dataType=(CAFE_DATATYPE) CAFE_NO_ACCESS;
|
||||
dataTypeNative=(CAFE_DATATYPE) CAFE_NO_ACCESS;
|
||||
rule=true; beamEventNo=0; userNo=0; ts.nsec=0; ts.secPastEpoch=0;
|
||||
hasAlarm=true; hasTS=true;
|
||||
strcpy(pv,""); strcpy(pvAlias,""); strcpy(device,""); strcpy(attrib,"");
|
||||
rule=true;
|
||||
beamEventNo=0;
|
||||
userNo=0;
|
||||
ts.nsec=0;
|
||||
ts.secPastEpoch=0;
|
||||
hasAlarm=true;
|
||||
hasTS=true;
|
||||
strcpy(pv,"");
|
||||
strcpy(pvAlias,"");
|
||||
strcpy(device,"");
|
||||
strcpy(attrib,"");
|
||||
|
||||
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;
|
||||
};
|
||||
};
|
||||
|
||||
PVDataHolder(){
|
||||
PVDataHolder()
|
||||
{
|
||||
|
||||
alarmStatus=0; alarmSeverity=0; status=ECAFE_NODATA; nelem=1; size=1;
|
||||
alarmStatus=-1;
|
||||
alarmSeverity=-1;
|
||||
status=ECAFE_NODATA;
|
||||
nelem=1;
|
||||
size=1;
|
||||
dataType=(CAFE_DATATYPE) CAFE_NO_ACCESS;
|
||||
dataTypeNative=(CAFE_DATATYPE) CAFE_NO_ACCESS;
|
||||
rule=true; beamEventNo=0; userNo=0; ts.nsec=0; ts.secPastEpoch =0;
|
||||
hasAlarm=true; hasTS=true;
|
||||
strcpy(pv,""); strcpy(pvAlias,""); strcpy(device,""); strcpy(attrib,"");
|
||||
rule=true;
|
||||
beamEventNo=0;
|
||||
userNo=0;
|
||||
ts.nsec=0;
|
||||
ts.secPastEpoch =0;
|
||||
hasAlarm=true;
|
||||
hasTS=true;
|
||||
strcpy(pv,"");
|
||||
strcpy(pvAlias,"");
|
||||
strcpy(device,"");
|
||||
strcpy(attrib,"");
|
||||
|
||||
val.reset( new CAFE_DATATYPE_UNION[nelem] );
|
||||
|
||||
val[0].d=0.00;
|
||||
};
|
||||
|
||||
~PVDataHolder() {
|
||||
|
||||
val.reset();
|
||||
~PVDataHolder()
|
||||
{
|
||||
|
||||
val.reset();
|
||||
};
|
||||
|
||||
void valReset() {
|
||||
void valReset()
|
||||
{
|
||||
|
||||
val.reset();
|
||||
}
|
||||
val.reset();
|
||||
}
|
||||
|
||||
|
||||
void setHasAlarm(bool a) {
|
||||
hasAlarm=a;
|
||||
return;
|
||||
};
|
||||
void setHasAlarm(bool a)
|
||||
{
|
||||
hasAlarm=a;
|
||||
return;
|
||||
};
|
||||
|
||||
void setHasTS(bool t){
|
||||
hasTS=t;
|
||||
if (t) {hasAlarm=t;} //TS will also retrieve alarmStatus
|
||||
return;
|
||||
}
|
||||
void setHasTS(bool t)
|
||||
{
|
||||
hasTS=t;
|
||||
if (t)
|
||||
{
|
||||
hasAlarm=t; //TS will also retrieve alarmStatus
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
bool getHasTS(){
|
||||
return hasTS;
|
||||
}
|
||||
bool getHasTS()
|
||||
{
|
||||
return hasTS;
|
||||
}
|
||||
|
||||
unsigned int setNelem (unsigned int _nelem) {
|
||||
unsigned int setNelem (unsigned int _nelem)
|
||||
{
|
||||
|
||||
_nelem>0 ? nelem=_nelem : nelem=1;
|
||||
|
||||
if (nelem>size) {
|
||||
size=nelem;
|
||||
val.reset( new CAFE_DATATYPE_UNION[size] );
|
||||
if (nelem>size)
|
||||
{
|
||||
size=nelem;
|
||||
val.reset( new CAFE_DATATYPE_UNION[size] );
|
||||
}
|
||||
|
||||
return nelem;
|
||||
};
|
||||
|
||||
epicsTimeStamp getEpicsTimeStamp() const {return ts;};
|
||||
epicsTimeStamp getEpicsTimeStamp() const
|
||||
{
|
||||
return ts;
|
||||
};
|
||||
|
||||
struct etsNorm{ unsigned int secPastEpoch; unsigned int nsec;} _etsNorm;
|
||||
struct etsDate{ unsigned short year; unsigned short mon; unsigned short day;
|
||||
unsigned short hour; unsigned short min; unsigned short sec; unsigned int nsec;} _etsDate ;
|
||||
|
||||
etsNorm getEpicsTimeStampAsUInt32() {
|
||||
|
||||
etsNorm getEpicsTimeStampAsUInt32()
|
||||
{
|
||||
_etsNorm.secPastEpoch=ts.secPastEpoch;
|
||||
_etsNorm.nsec=(unsigned long) ts.nsec;
|
||||
return _etsNorm;};
|
||||
return _etsNorm;
|
||||
};
|
||||
|
||||
etsDate getEpicsTimeStampAsDate() {
|
||||
etsDate getEpicsTimeStampAsDate()
|
||||
{
|
||||
|
||||
ts.nsec=(unsigned int) ts.nsec;
|
||||
ts.nsec=(unsigned int) ts.nsec;
|
||||
|
||||
//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) {
|
||||
cout << "OVERFLOW IN gets.nsec CORRECTED for epicsTime converter " << endl; ts.nsec=0;
|
||||
}
|
||||
//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)
|
||||
{
|
||||
std::cout << "OVERFLOW IN gets.nsec CORRECTED for epicsTime converter " << std::endl;
|
||||
ts.nsec=0;
|
||||
}
|
||||
|
||||
epicsTime time(ts);
|
||||
|
||||
local_tm_nano_sec local = (local_tm_nano_sec) time;
|
||||
_etsDate.year = local.ansi_tm.tm_year + 1900;
|
||||
_etsDate.mon = local.ansi_tm.tm_mon + 1;
|
||||
_etsDate.day = local.ansi_tm.tm_mday;
|
||||
_etsDate.mon = local.ansi_tm.tm_mon + 1;
|
||||
_etsDate.day = local.ansi_tm.tm_mday;
|
||||
_etsDate.hour = local.ansi_tm.tm_hour;
|
||||
_etsDate.min = local.ansi_tm.tm_min;
|
||||
_etsDate.sec = local.ansi_tm.tm_sec;
|
||||
_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;
|
||||
|
||||
return _etsDate;
|
||||
}
|
||||
|
||||
void print() {
|
||||
|
||||
|
||||
etsDate getUnixTimeAsDate(etsNorm ets)
|
||||
{
|
||||
|
||||
time_t t= ets.secPastEpoch;
|
||||
|
||||
struct tm * local;
|
||||
local=localtime(&t);
|
||||
//local_tm_nano_sec local = (local_tm_nano_sec) time;
|
||||
_etsDate.year = local->tm_year +1900;
|
||||
_etsDate.mon = local->tm_mon + 1;
|
||||
_etsDate.day = local->tm_mday;
|
||||
_etsDate.hour = local->tm_hour;
|
||||
_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;
|
||||
|
||||
return _etsDate;
|
||||
}
|
||||
|
||||
|
||||
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()
|
||||
{
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void print()
|
||||
{
|
||||
print(nelem) ;
|
||||
}
|
||||
|
||||
void print(unsigned int nelemToPrint) {
|
||||
nelemToPrint=min(nelemToPrint,nelem);
|
||||
if (pv==NULL) {
|
||||
|
||||
void print(unsigned int nelemToPrint)
|
||||
{
|
||||
nelemToPrint=std::min(nelemToPrint,nelem);
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
std::cout << "------------------------------------------" << std::endl;
|
||||
//std::cout << "PVDataHolder:" << std::endl;
|
||||
|
||||
|
||||
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;
|
||||
std::cout << "attrib = " << attrib << std::endl;
|
||||
std::cout << "dataType = " << cafeDataTypeCode.message(dataType).c_str()
|
||||
<< " (" << dataType << ") " << std::endl;
|
||||
<< " (" << dataType << ") " << std::endl;
|
||||
std::cout << "dbrTypeRequest = " << dbr_type_to_text(dbrDataType)
|
||||
<< " (" << dbrDataType << ") " << std::endl;
|
||||
|
||||
//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) {
|
||||
std::cout << nelem;
|
||||
std::cout << std::endl;
|
||||
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)) {
|
||||
std::cout << "epicsTimeStamp = " << ts.secPastEpoch << " sec. and " << ts.nsec << " nsec" << std::endl;
|
||||
if (dbr_type_is_TIME(dbrDataType))
|
||||
{
|
||||
std::cout << "timeStamp = " << ts.secPastEpoch << " sec. and " << ts.nsec << " nsec" << std::endl;
|
||||
}
|
||||
}
|
||||
if(beamEventNo!=0) {std::cout << "beamEventNo = " << beamEventNo << std::endl;};
|
||||
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) {
|
||||
case CAFE_STRING:
|
||||
for (unsigned int i=0; i <nelemToPrint; ++i ) std::cout << val[i].str << " [" << i << "] " ;
|
||||
|
||||
switch (dataType)
|
||||
{
|
||||
case CAFE_STRING:
|
||||
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 ) std::cout << val[i].s << " [" << i << "] " ;
|
||||
case CAFE_SHORT:
|
||||
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 ) std::cout << val[i].f << " [" << i << "] " ;
|
||||
case CAFE_FLOAT:
|
||||
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 ) { std::cout <<
|
||||
getAsString(i) << " (" << val[i].us << ")" << " [" << i << "] " ;}
|
||||
case CAFE_ENUM:
|
||||
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 ) std::cout << (unsigned short) val[i].ch << " [" << i << "] " ;
|
||||
case CAFE_CHAR:
|
||||
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 ) std::cout << val[i].l << " [" << i << "] " ;
|
||||
case CAFE_LONG:
|
||||
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 ) std::cout << val[i].d << " [" << i << "] " ;
|
||||
case CAFE_DOUBLE:
|
||||
for (unsigned int i=0; i <nelemToPrint; ++i ) std::cout << val[i].d << " [" << i << "] " ;
|
||||
break;
|
||||
case CAFE_NO_ACCESS:
|
||||
std::cout << "DATA_TYPE NOT YET DEFINED " << endl;
|
||||
default:
|
||||
case CAFE_NO_ACCESS:
|
||||
std::cout << "DATA_TYPE NOT YET DEFINED " << std::endl;
|
||||
default:
|
||||
break;
|
||||
|
||||
};
|
||||
|
||||
@@ -14,45 +14,53 @@
|
||||
|
||||
/**
|
||||
* class MemberMap
|
||||
* maps string to index
|
||||
* maps string to index
|
||||
*/
|
||||
class MemberMap {
|
||||
typedef std::map<long, std::string> mapLongString;
|
||||
class MemberMap
|
||||
{
|
||||
typedef std::map<long, std::string> mapLongString;
|
||||
private:
|
||||
mapLongString mapNameIndex;
|
||||
mapLongString::iterator pos;
|
||||
Helper helper;
|
||||
mapLongString mapNameIndex;
|
||||
mapLongString::iterator pos;
|
||||
Helper helper;
|
||||
|
||||
public:
|
||||
MemberMap(){};
|
||||
~MemberMap(){};
|
||||
MemberMap() {};
|
||||
~MemberMap() {};
|
||||
|
||||
void insert(int a, std::string _Name) {
|
||||
mapNameIndex.insert(std::make_pair(a, _Name));
|
||||
};
|
||||
void insert(int a, std::string _Name)
|
||||
{
|
||||
mapNameIndex.insert(std::make_pair(a, _Name));
|
||||
};
|
||||
|
||||
std::string getPV (int i) {
|
||||
std::string getPV (int i)
|
||||
{
|
||||
|
||||
pos = mapNameIndex.find(i);
|
||||
if (pos != mapNameIndex.end()) return pos->second;
|
||||
cout << "Index " << i << " not found! Size of group vector is " << mapNameIndex.size() << endl;
|
||||
return "";
|
||||
};
|
||||
pos = mapNameIndex.find(i);
|
||||
if (pos != mapNameIndex.end()) return pos->second;
|
||||
std::cout << "Index " << i << " not found! Size of group vector is " << mapNameIndex.size() << std::endl;
|
||||
return "";
|
||||
};
|
||||
|
||||
int getIndex (std::string _Name) {
|
||||
char pvStripped[PVNAME_SIZE];
|
||||
helper.removeLeadingAndTrailingSpaces(_Name.c_str(), pvStripped);
|
||||
string Name=pvStripped;
|
||||
int getIndex (std::string _Name)
|
||||
{
|
||||
char pvStripped[PVNAME_SIZE];
|
||||
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) {return pos->first;}
|
||||
// String searches such as s.find(s1) return string::npos on failure
|
||||
//else if ( (pos->second).find(Name) != std::string::npos) return pos->first;
|
||||
}
|
||||
cout << "PV: " << Name << " IS NOT A MEMBER OF THIS LIST " << endl;
|
||||
return -1;
|
||||
};
|
||||
if (pos->second==Name)
|
||||
{
|
||||
return pos->first;
|
||||
}
|
||||
// String searches such as s.find(s1) return string::npos on failure
|
||||
//else if ( (pos->second).find(Name) != std::string::npos) return pos->first;
|
||||
}
|
||||
std::cout << "PV: " << Name << " IS NOT A MEMBER OF THIS LIST " << std::endl;
|
||||
return -1;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -61,52 +69,106 @@ int getIndex (std::string _Name) {
|
||||
* 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
|
||||
//if HAVE_LIBQTXML
|
||||
friend class restorePVGroupXMLParser;
|
||||
//endif
|
||||
//endif
|
||||
private:
|
||||
PVDataHolder * pvdata;
|
||||
unsigned int npv;
|
||||
char name [PVGROUP_PSEUDO_SIZE];
|
||||
char name [PVGROUP_PSEUDO_SIZE];
|
||||
int statusGroup;
|
||||
unsigned int groupHandle;
|
||||
bool isIndexOutOfRange (unsigned int idx) {
|
||||
bool isIndexOutOfRange (unsigned int idx)
|
||||
{
|
||||
return (idx >= npv) ? true:false;
|
||||
};
|
||||
MemberMap memberMap;
|
||||
|
||||
public:
|
||||
//Initialize 1st two to avoid compiler warning messages
|
||||
PVGroup(){npv=0; pvdata=NULL; statusGroup=ICAFE_NORMAL; groupHandle=0; strcpy(name,"");};
|
||||
~PVGroup(){};
|
||||
MemberMap getMemberMap() const {return memberMap;};
|
||||
PVDataHolder * getPVData() const {return pvdata;};
|
||||
PVDataHolder getPVData(unsigned int idx) throw(std::out_of_range){
|
||||
if(isIndexOutOfRange(idx)) {
|
||||
//Initialize 1st two to avoid compiler warning messages
|
||||
PVGroup()
|
||||
{
|
||||
npv=0;
|
||||
pvdata=NULL;
|
||||
statusGroup=ICAFE_NORMAL;
|
||||
groupHandle=0;
|
||||
strcpy(name,"");
|
||||
};
|
||||
~PVGroup() {};
|
||||
MemberMap getMemberMap() const
|
||||
{
|
||||
return memberMap;
|
||||
};
|
||||
PVDataHolder * getPVData() const
|
||||
{
|
||||
return pvdata;
|
||||
};
|
||||
PVDataHolder getPVData(unsigned int idx) noexcept(false) //throw(std::out_of_range)
|
||||
{
|
||||
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;
|
||||
" to PVGroup.pvdata() is out of range. Valid range is from 0 to " << npv-1;
|
||||
throw std::out_of_range(oss.str());
|
||||
}
|
||||
return pvdata[idx];
|
||||
};
|
||||
void setHasAlarm(bool h){ for (unsigned int i=0; i<npv; ++i) {pvdata[i].setHasAlarm(h);} }
|
||||
void setHasTS(bool h){ for (unsigned int i=0; i<npv; ++i) {pvdata[i].setHasTS(h);} }
|
||||
void setHasAlarm(bool h)
|
||||
{
|
||||
for (unsigned int i=0; i<npv; ++i)
|
||||
{
|
||||
pvdata[i].setHasAlarm(h);
|
||||
}
|
||||
}
|
||||
void setHasTS(bool h)
|
||||
{
|
||||
for (unsigned int i=0; i<npv; ++i)
|
||||
{
|
||||
pvdata[i].setHasTS(h);
|
||||
}
|
||||
}
|
||||
|
||||
unsigned int getNPV() const {return npv;};
|
||||
string getNameAsString() const {return name;};
|
||||
const char * getName() const {return (const char *) name;};
|
||||
int getStatusGroup() const {return statusGroup;};
|
||||
int getGroupStatus() const {return statusGroup;};
|
||||
unsigned int getGroupHandle() const {return groupHandle;};
|
||||
unsigned int getNPV() const
|
||||
{
|
||||
return npv;
|
||||
};
|
||||
std::string getNameAsString() const
|
||||
{
|
||||
return name;
|
||||
};
|
||||
const char * getName() const
|
||||
{
|
||||
return (const char *) name;
|
||||
};
|
||||
int getStatusGroup() const
|
||||
{
|
||||
return statusGroup;
|
||||
};
|
||||
int getGroupStatus() const
|
||||
{
|
||||
return statusGroup;
|
||||
};
|
||||
unsigned int getGroupHandle() const
|
||||
{
|
||||
return groupHandle;
|
||||
};
|
||||
|
||||
int PV2Index(std::string _pv) const {return getMemberMap().getIndex(_pv);}
|
||||
string Index2PV(unsigned int _idx) const {return getMemberMap().getPV(_idx);}
|
||||
int PV2Index(std::string _pv) const
|
||||
{
|
||||
return getMemberMap().getIndex(_pv);
|
||||
}
|
||||
std::string Index2PV(unsigned int _idx) const
|
||||
{
|
||||
return getMemberMap().getPV(_idx);
|
||||
}
|
||||
|
||||
void setPVData(PVDataHolder * _pvdata) {
|
||||
void setPVData(PVDataHolder * _pvdata)
|
||||
{
|
||||
|
||||
//We do not need to make a deep copy
|
||||
/*
|
||||
@@ -134,61 +196,96 @@ public:
|
||||
pvdata=_pvdata;
|
||||
};
|
||||
|
||||
void set(unsigned int _npv) {npv=_npv;};
|
||||
void setName(const char * _name) {strcpy(name, _name);};
|
||||
void setName(string _name) {strcpy(name,_name.c_str());};
|
||||
void setStatusGroup(int _sg) {statusGroup=_sg;}
|
||||
void set(unsigned int _npv)
|
||||
{
|
||||
npv=_npv;
|
||||
};
|
||||
void setName(const char * _name)
|
||||
{
|
||||
strcpy(name, _name);
|
||||
};
|
||||
void setName(std::string _name)
|
||||
{
|
||||
strcpy(name,_name.c_str());
|
||||
};
|
||||
void setStatusGroup(int _sg)
|
||||
{
|
||||
statusGroup=_sg;
|
||||
}
|
||||
|
||||
|
||||
void show() {print(npv) ;}
|
||||
void showMax(unsigned int npvToPrint){print(npvToPrint);}
|
||||
void showMaxMax(unsigned int npvToPrint, unsigned int maxNelemWF){
|
||||
print(npvToPrint, maxNelemWF);}
|
||||
void show()
|
||||
{
|
||||
print(npv) ;
|
||||
}
|
||||
void showMax(unsigned int npvToPrint)
|
||||
{
|
||||
print(npvToPrint);
|
||||
}
|
||||
void showMaxMax(unsigned int npvToPrint, unsigned int maxNelemWF)
|
||||
{
|
||||
print(npvToPrint, maxNelemWF);
|
||||
}
|
||||
|
||||
void print() {print(npv) ;}
|
||||
void print(unsigned int npvToPrint) {
|
||||
npvToPrint=min(npvToPrint,npv);
|
||||
void print()
|
||||
{
|
||||
print(npv) ;
|
||||
}
|
||||
void print(unsigned int npvToPrint)
|
||||
{
|
||||
npvToPrint=std::min(npvToPrint,npv);
|
||||
std::cout << "------------ PVGroup Handle = " << groupHandle << " ------------ "<< std::endl;
|
||||
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) {
|
||||
CAFEStatus cstat; cstat.report(statusGroup);
|
||||
if (statusGroup!=ICAFE_NORMAL)
|
||||
{
|
||||
CAFEStatus cstat;
|
||||
cstat.report(statusGroup);
|
||||
}
|
||||
for (unsigned int i=0; i<npvToPrint; ++i) {
|
||||
std::cout << "------------------------------------------" << std::endl;
|
||||
std::cout << "Element [" << i << "] of " << npvToPrint << " in group: " << name << endl;
|
||||
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();
|
||||
}
|
||||
}
|
||||
void print(unsigned int npvToPrint, unsigned int maxNelemWF) {
|
||||
npvToPrint=min(npvToPrint,npv);
|
||||
void print(unsigned int npvToPrint, unsigned int maxNelemWF)
|
||||
{
|
||||
npvToPrint=std::min(npvToPrint,npv);
|
||||
std::cout << "------------ PVGroup Handle = " << groupHandle << " ------------ "<< std::endl;
|
||||
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) {
|
||||
CAFEStatus cstat; cstat.report(statusGroup);
|
||||
if (statusGroup!=ICAFE_NORMAL)
|
||||
{
|
||||
CAFEStatus cstat;
|
||||
cstat.report(statusGroup);
|
||||
}
|
||||
for (unsigned int i=0; i<npvToPrint; ++i) {
|
||||
std::cout << "------------------------------------------" << std::endl;
|
||||
std::cout << "Element [" << i << "] of " << npvToPrint << " in group: " << name << endl;
|
||||
pvdata[i].print(min(maxNelemWF,pvdata[i].getNelem()));
|
||||
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()));
|
||||
}
|
||||
}
|
||||
|
||||
void printIfError() {
|
||||
void printIfError()
|
||||
{
|
||||
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;
|
||||
}
|
||||
cout << "------------------------------------------------------------" << endl;
|
||||
cout << "Element [" << i << "] of " << npv << " in group: " << name << endl;
|
||||
std::cout << "------------------------------------------------------------" << std::endl;
|
||||
std::cout << "Element [" << i << "] of " << npv << " in group: " << name << std::endl;
|
||||
pvdata[i].print();
|
||||
}
|
||||
}
|
||||
|
||||
2429
include/PVHolder.h
2429
include/PVHolder.h
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
|
||||
|
||||
@@ -16,13 +18,28 @@
|
||||
#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,115 +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 */
|
||||
@@ -1,107 +0,0 @@
|
||||
#ifndef __PYX_HAVE_API__PyCafe
|
||||
#define __PYX_HAVE_API__PyCafe
|
||||
#include "Python.h"
|
||||
|
||||
static void (*__pyx_f_6PyCafe_py_cb_wrapper)(PVDataHolder, unsigned int, std::string) = 0;
|
||||
#define py_cb_wrapper __pyx_f_6PyCafe_py_cb_wrapper
|
||||
static void (*__pyx_f_6PyCafe_py_cb_ctrl_wrapper)(PVCtrlHolder, unsigned int, std::string) = 0;
|
||||
#define py_cb_ctrl_wrapper __pyx_f_6PyCafe_py_cb_ctrl_wrapper
|
||||
static void (*__pyx_f_6PyCafe_py_cb_handle_wrapper)(unsigned int) = 0;
|
||||
#define py_cb_handle_wrapper __pyx_f_6PyCafe_py_cb_handle_wrapper
|
||||
static void (*__pyx_f_6PyCafe_py_cb_handle_monid_wrapper)(unsigned int, unsigned long) = 0;
|
||||
#define py_cb_handle_monid_wrapper __pyx_f_6PyCafe_py_cb_handle_monid_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_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_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_f_6PyCafe_py_cb_handle_wrapper, "void (unsigned int)") < 0) goto bad;
|
||||
if (__Pyx_ImportFunction(module, "py_cb_handle_monid_wrapper", (void (**)(void))&__pyx_f_6PyCafe_py_cb_handle_monid_wrapper, "void (unsigned int, unsigned long)") < 0) goto bad;
|
||||
Py_DECREF(module); module = 0;
|
||||
return 0;
|
||||
bad:
|
||||
Py_XDECREF(module);
|
||||
return -1;
|
||||
}
|
||||
|
||||
#endif /* !__PYX_HAVE_API__PyCafe */
|
||||
@@ -16,17 +16,22 @@ 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)
|
||||
#define __Pyx_PyIdentifier_FromString(s) PyString_FromString(s)
|
||||
#else
|
||||
#define __Pyx_PyIdentifier_FromString(s) PyUnicode_FromString(s)
|
||||
#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) {
|
||||
static PyObject *__Pyx_ImportModule(const char *name)
|
||||
{
|
||||
PyObject *py_name = 0;
|
||||
PyObject *py_module = 0;
|
||||
py_name = __Pyx_PyIdentifier_FromString(name);
|
||||
@@ -43,10 +48,12 @@ bad:
|
||||
|
||||
#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) {
|
||||
static int __Pyx_ImportFunction(PyObject *module, const char *funcname, void (**f)(void), const char *sig)
|
||||
{
|
||||
PyObject *d = 0;
|
||||
PyObject *cobj = 0;
|
||||
union {
|
||||
union
|
||||
{
|
||||
void (*fp)(void);
|
||||
void *p;
|
||||
} tmp;
|
||||
@@ -54,34 +61,44 @@ 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);
|
||||
"%.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));
|
||||
"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;
|
||||
{
|
||||
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);
|
||||
}
|
||||
tmp.p = PyCObject_AsVoidPtr(cobj);}
|
||||
#endif
|
||||
*f = tmp.fp;
|
||||
if (!(*f))
|
||||
@@ -95,21 +112,25 @@ bad:
|
||||
#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;
|
||||
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;
|
||||
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;
|
||||
bad:
|
||||
Py_XDECREF(module);
|
||||
return -1;
|
||||
}
|
||||
|
||||
#endif /* !__PYX_HAVE_API__PyCafe */
|
||||
|
||||
@@ -1,109 +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
|
||||
#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;
|
||||
Py_DECREF(module); module = 0;
|
||||
return 0;
|
||||
bad:
|
||||
Py_XDECREF(module);
|
||||
return -1;
|
||||
}
|
||||
|
||||
#endif /* !__PYX_HAVE_API__PyCafe */
|
||||
@@ -1,115 +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 */
|
||||
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
|
||||
|
||||
1603
include/cafe.h
1603
include/cafe.h
File diff suppressed because it is too large
Load Diff
@@ -9,6 +9,9 @@
|
||||
#ifndef CAFECACHE_H
|
||||
#define CAFECACHE_H
|
||||
|
||||
|
||||
//No longer required - get from TS
|
||||
/*
|
||||
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) {
|
||||
@@ -35,8 +38,8 @@ unsigned int getPulseIDFromTS(epicsTimeStamp ts) {
|
||||
return handleHelper.getPulseIDFromTS(ts);
|
||||
}
|
||||
|
||||
vector<unsigned int>getPulseIDFromTS(PVDataHolder * pvd, unsigned int nelem) {
|
||||
vector<unsigned int> vui;
|
||||
std::vector<unsigned int>getPulseIDFromTS(PVDataHolder * pvd, unsigned int nelem) {
|
||||
std::vector<unsigned int> vui;
|
||||
vui.clear();
|
||||
vui.reserve(nelem);
|
||||
for (unsigned int i=0; i<nelem; ++i) {
|
||||
@@ -45,8 +48,8 @@ vector<unsigned int>getPulseIDFromTS(PVDataHolder * pvd, unsigned int nelem) {
|
||||
return vui;
|
||||
}
|
||||
|
||||
vector<unsigned int>getPulseIDFromTS(PVGroup pvg) {
|
||||
vector<unsigned int> vui;
|
||||
std::vector<unsigned int>getPulseIDFromTS(PVGroup pvg) {
|
||||
std::vector<unsigned int> vui;
|
||||
vui.clear();
|
||||
vui.reserve(pvg.getNPV());
|
||||
PVDataHolder * pvd=pvg.getPVData();
|
||||
@@ -55,9 +58,10 @@ vector<unsigned int>getPulseIDFromTS(PVGroup pvg) {
|
||||
}
|
||||
return vui;
|
||||
}
|
||||
*/
|
||||
|
||||
/*
|
||||
int getCachePVArray (vector<unsigned int> handleV, PVDataHolder * pvd){
|
||||
int getCachePVArray (std::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);
|
||||
@@ -66,29 +70,40 @@ int getCachePVArray (vector<unsigned int> handleV, PVDataHolder * pvd){
|
||||
*/
|
||||
|
||||
|
||||
int getCachePVArray (vector<unsigned int> handleV, PVDataHolder * pvd){
|
||||
return getCache(&handleV[0], (unsigned int) handleV.size(), pvd);
|
||||
int getCachePVArray (std::vector<unsigned int> handleV, PVDataHolder * pvd)
|
||||
{
|
||||
return getCache(&handleV[0], (unsigned int) handleV.size(), pvd);
|
||||
};
|
||||
|
||||
int getCachePVArrayNoWait (vector<unsigned int> handleV, PVDataHolder * pvd){
|
||||
|
||||
int overallStatus=ICAFE_NORMAL;
|
||||
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) {
|
||||
resetCallbackGet(handleV[i]);
|
||||
if(overallStatus==ICAFE_NORMAL) {overallStatus=status;}
|
||||
}
|
||||
if (pvd[i].getStatus() !=ICAFE_NORMAL) {
|
||||
if(overallStatus==ICAFE_NORMAL) {overallStatus=pvd[i].getStatus();}
|
||||
}
|
||||
}
|
||||
return overallStatus;
|
||||
int getCachePVArrayNoWait (std::vector<unsigned int> handleV, PVDataHolder * pvd)
|
||||
{
|
||||
|
||||
int overallStatus=ICAFE_NORMAL;
|
||||
for (size_t i=0; i< (size_t) handleV.size(); ++i)
|
||||
{
|
||||
status=getCacheNoWait(handleV[i], pvd[i]);
|
||||
//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)
|
||||
{
|
||||
overallStatus=status;
|
||||
}
|
||||
}
|
||||
if (pvd[i].getStatus() !=ICAFE_NORMAL)
|
||||
{
|
||||
if(overallStatus==ICAFE_NORMAL)
|
||||
{
|
||||
overallStatus=pvd[i].getStatus();
|
||||
}
|
||||
}
|
||||
}
|
||||
return overallStatus;
|
||||
};
|
||||
|
||||
/*
|
||||
int getCachePVArrayNoWait (vector<unsigned int> handleV, PVDataHolder * pvd){
|
||||
int getCachePVArrayNoWait (std::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];
|
||||
@@ -107,28 +122,41 @@ int resetCallbackPut(const unsigned int handle);
|
||||
|
||||
int getCacheNoWait(const unsigned int handle, PVDataHolder & pvd);
|
||||
|
||||
int getCacheFromPulseID (const unsigned int handle, const unsigned long long globalPulseID, 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);}
|
||||
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) {
|
||||
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) {
|
||||
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) {
|
||||
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) {
|
||||
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
|
||||
@@ -137,278 +165,385 @@ int getCache(const unsigned int handle, long long * _val, dbr_short_t &alarmS
|
||||
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) {
|
||||
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) {
|
||||
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) {
|
||||
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) {
|
||||
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) {
|
||||
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, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity) {
|
||||
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) {
|
||||
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) {
|
||||
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) {
|
||||
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) {
|
||||
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) {
|
||||
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) {
|
||||
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) {
|
||||
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) {
|
||||
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 getCacheShortArray(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) {
|
||||
int getCacheShortArray(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) {
|
||||
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) {
|
||||
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);
|
||||
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) {
|
||||
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) {
|
||||
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) {
|
||||
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) {
|
||||
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) { valStr[i]=_val[i]; }
|
||||
delete [] _val; return status;
|
||||
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) {
|
||||
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) { valStr[i]=_val[i]; }
|
||||
delete [] _val; return status;
|
||||
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) {
|
||||
int getCache(const unsigned int handle, std::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;
|
||||
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) {
|
||||
int getCache(const unsigned int handle, std::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;
|
||||
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 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)
|
||||
{
|
||||
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]={""};
|
||||
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) {valStr=val[0];} CAFE::setNelemToRetrieveFromCacheToPrevious(handle, nelemPrevious);
|
||||
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]={""};
|
||||
int getCache(const unsigned int handle, std::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);
|
||||
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]={""};
|
||||
int getCache(const unsigned int handle, std::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);
|
||||
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
|
||||
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
|
||||
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
|
||||
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
|
||||
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
|
||||
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 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
|
||||
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);
|
||||
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
|
||||
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) {
|
||||
int getCache(const unsigned int *handleArray, unsigned int nelem, std::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;
|
||||
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) {
|
||||
int getCache(const unsigned int *handleArray, unsigned int nelem, std::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;
|
||||
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) {
|
||||
int getCache (const unsigned int *handleArray, unsigned int nelem, std::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;
|
||||
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) {
|
||||
dbr_short_t *alarmStatus, dbr_short_t *alarmSeverity, epicsTimeStamp *ts)
|
||||
{
|
||||
return cafeSoluble.getCache(handleArray, nelem, DBR_TIME_STRING, val, statusArray,
|
||||
alarmStatus, alarmSeverity, ts);
|
||||
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) {
|
||||
dbr_short_t *alarmStatus, dbr_short_t *alarmSeverity)
|
||||
{
|
||||
return cafeSoluble.getCache(handleArray, nelem, DBR_STS_STRING, val, statusArray,
|
||||
alarmStatus, alarmSeverity);
|
||||
alarmStatus, alarmSeverity);
|
||||
};
|
||||
int getCache (const unsigned int *handleArray, unsigned int nelem, dbr_string_t * val, int *statusArray) {
|
||||
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) {
|
||||
dbr_short_t *alarmStatus, dbr_short_t *alarmSeverity, epicsTimeStamp *ts)
|
||||
{
|
||||
return cafeSchale.getCache(handleArray, nelem, DBR_TIME_SHORT, val, statusArray,
|
||||
alarmStatus, alarmSeverity, ts);
|
||||
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) {
|
||||
dbr_short_t *alarmStatus, dbr_short_t *alarmSeverity)
|
||||
{
|
||||
return cafeSchale.getCache(handleArray, nelem, DBR_STS_SHORT, val, statusArray,
|
||||
alarmStatus, alarmSeverity);
|
||||
alarmStatus, alarmSeverity);
|
||||
};
|
||||
int getCache (const unsigned int *handleArray, unsigned int nelem, dbr_short_t * val, int *statusArray) {
|
||||
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) {
|
||||
dbr_short_t *alarmStatus, dbr_short_t *alarmSeverity, epicsTimeStamp *ts)
|
||||
{
|
||||
return cafeFrappuccino.getCache(handleArray, nelem, DBR_TIME_FLOAT, val, statusArray,
|
||||
alarmStatus, alarmSeverity, ts);
|
||||
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) {
|
||||
dbr_short_t *alarmStatus, dbr_short_t *alarmSeverity)
|
||||
{
|
||||
return cafeFrappuccino.getCache(handleArray, nelem, DBR_STS_FLOAT, val, statusArray,
|
||||
alarmStatus, alarmSeverity);
|
||||
alarmStatus, alarmSeverity);
|
||||
};
|
||||
int getCache (const unsigned int *handleArray, unsigned int nelem, dbr_float_t * val, int *statusArray) {
|
||||
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) {
|
||||
dbr_short_t *alarmStatus, dbr_short_t *alarmSeverity, epicsTimeStamp *ts)
|
||||
{
|
||||
return cafeEspresso.getCache(handleArray, nelem, DBR_TIME_ENUM, val, statusArray,
|
||||
alarmStatus, alarmSeverity, ts);
|
||||
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) {
|
||||
dbr_short_t *alarmStatus, dbr_short_t *alarmSeverity)
|
||||
{
|
||||
return cafeEspresso.getCache(handleArray, nelem, DBR_STS_ENUM, val, statusArray,
|
||||
alarmStatus, alarmSeverity);
|
||||
alarmStatus, alarmSeverity);
|
||||
};
|
||||
int getCache (const unsigned int *handleArray, unsigned int nelem, dbr_ushort_t * val, int *statusArray) {
|
||||
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) {
|
||||
dbr_short_t *alarmStatus, dbr_short_t *alarmSeverity, epicsTimeStamp *ts)
|
||||
{
|
||||
return cafeCappuccino.getCache(handleArray, nelem, DBR_TIME_CHAR, val, statusArray,
|
||||
alarmStatus, alarmSeverity, ts);
|
||||
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) {
|
||||
dbr_short_t *alarmStatus, dbr_short_t *alarmSeverity)
|
||||
{
|
||||
return cafeCappuccino.getCache(handleArray, nelem, DBR_STS_CHAR, val, statusArray,
|
||||
alarmStatus, alarmSeverity);
|
||||
alarmStatus, alarmSeverity);
|
||||
};
|
||||
int getCache (const unsigned int *handleArray, unsigned int nelem, dbr_char_t * val, int *statusArray) {
|
||||
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) {
|
||||
dbr_short_t *alarmStatus, dbr_short_t *alarmSeverity, epicsTimeStamp *ts)
|
||||
{
|
||||
return cafeLatte.getCache(handleArray, nelem, DBR_TIME_LONG, val, statusArray,
|
||||
alarmStatus, alarmSeverity, ts);
|
||||
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) {
|
||||
dbr_short_t *alarmStatus, dbr_short_t *alarmSeverity)
|
||||
{
|
||||
return cafeLatte.getCache(handleArray, nelem, DBR_STS_LONG, val, statusArray,
|
||||
alarmStatus, alarmSeverity);
|
||||
alarmStatus, alarmSeverity);
|
||||
};
|
||||
int getCache (const unsigned int *handleArray, unsigned int nelem, dbr_long_t * val, int *statusArray) {
|
||||
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
|
||||
@@ -421,195 +556,240 @@ int getCache(const unsigned int *handleArray, unsigned int nelem, long long
|
||||
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) {
|
||||
dbr_short_t *alarmStatus, dbr_short_t *alarmSeverity, epicsTimeStamp *ts)
|
||||
{
|
||||
return cafeDoppio.getCache(handleArray, nelem, DBR_TIME_DOUBLE, val, statusArray,
|
||||
alarmStatus, alarmSeverity, ts);
|
||||
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) {
|
||||
dbr_short_t *alarmStatus, dbr_short_t *alarmSeverity)
|
||||
{
|
||||
return cafeDoppio.getCache(handleArray, nelem, DBR_STS_DOUBLE, val, statusArray,
|
||||
alarmStatus, alarmSeverity);
|
||||
alarmStatus, alarmSeverity);
|
||||
};
|
||||
int getCache (const unsigned int *handleArray, unsigned int nelem, dbr_double_t * val, int *statusArray) {
|
||||
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, std::string & valStr); //0+
|
||||
int getCache(const char * pv, std::string & valStr, dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity); //0+
|
||||
int getCache(const char * pv, std::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
|
||||
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
|
||||
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
|
||||
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
|
||||
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
|
||||
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+
|
||||
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+
|
||||
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+
|
||||
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
|
||||
dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts); //6
|
||||
|
||||
|
||||
//6
|
||||
int getCache(const char * pv, dbr_double_t * _val) {
|
||||
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) {
|
||||
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) {
|
||||
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) {
|
||||
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) {
|
||||
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) {
|
||||
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) {
|
||||
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) {
|
||||
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) {
|
||||
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) {
|
||||
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) {
|
||||
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) {
|
||||
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) {
|
||||
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) {
|
||||
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) {
|
||||
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) {
|
||||
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) {
|
||||
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) {
|
||||
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) {
|
||||
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) {
|
||||
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) {
|
||||
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) {
|
||||
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) {
|
||||
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) {
|
||||
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) {
|
||||
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) { valStr[i]=_val[i]; }
|
||||
delete [] _val; return status;
|
||||
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) {
|
||||
int getCache(const char * pv, std::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;
|
||||
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) {
|
||||
int getCache(const char * pv, std::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;
|
||||
for (unsigned int i=0; i< handleHelper.getNelemRequest(handle); ++i)
|
||||
{
|
||||
valStr[i]=_val[i];
|
||||
}
|
||||
delete [] _val;
|
||||
return status;
|
||||
}
|
||||
|
||||
#endif // CAFECACHE_H
|
||||
|
||||
@@ -1,591 +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
|
||||
@@ -13,9 +13,6 @@
|
||||
#include <cstdio>
|
||||
#include <boost/math/special_functions/fpclassify.hpp>
|
||||
|
||||
using namespace std;
|
||||
|
||||
|
||||
/**
|
||||
* CAFEConvert Template \n
|
||||
* CTYPE is the input data type \n
|
||||
@@ -27,20 +24,21 @@ using namespace std;
|
||||
* method getAsChar () converts CTYPE to char \n
|
||||
* method getAsLong () converts CTYPE to int \n
|
||||
* method getAsString() converts CTYPE to string \n
|
||||
*
|
||||
*
|
||||
*/
|
||||
template <class CTYPE> class CAFEConvert {
|
||||
template <class CTYPE> class CAFEConvert
|
||||
{
|
||||
private:
|
||||
CTYPE returnVal[1];
|
||||
CTYPE returnVal[1];
|
||||
public:
|
||||
CAFEConvert (unsigned int nelem){};
|
||||
CAFEConvert (){};
|
||||
~CAFEConvert (){};
|
||||
CTYPE * get(unsigned int index, CAFE_DATATYPE dt, CAFE_DATATYPE_UNION_SEQ val);
|
||||
CTYPE * getString(unsigned int index, CAFE_DATATYPE dt, CAFE_DATATYPE_UNION_SEQ val);
|
||||
CTYPE * getStringFromEnum(unsigned int index, unsigned int noStr, CAFE_DATATYPE_UNION_SEQ val, char stig[MAX_ENUM_STATES][MAX_ENUM_STRING_SIZE]);
|
||||
CTYPE * get(CAFE_DATATYPE dt, CAFE_DATATYPE_UNION val);
|
||||
CTYPE * getString(CAFE_DATATYPE dt, CAFE_DATATYPE_UNION val);
|
||||
CAFEConvert (unsigned int nelem) {};
|
||||
CAFEConvert () {};
|
||||
~CAFEConvert () {};
|
||||
CTYPE * get(unsigned int index, CAFE_DATATYPE dt, CAFE_DATATYPE_UNION_SEQ val);
|
||||
CTYPE * getString(unsigned int index, CAFE_DATATYPE dt, CAFE_DATATYPE_UNION_SEQ val);
|
||||
CTYPE * getStringFromEnum(unsigned int index, unsigned int noStr, CAFE_DATATYPE_UNION_SEQ val, char stig[MAX_ENUM_STATES][MAX_ENUM_STRING_SIZE]);
|
||||
CTYPE * get(CAFE_DATATYPE dt, CAFE_DATATYPE_UNION val);
|
||||
CTYPE * getString(CAFE_DATATYPE dt, CAFE_DATATYPE_UNION val);
|
||||
};
|
||||
|
||||
|
||||
@@ -51,73 +49,79 @@ public:
|
||||
* \return CTYPE
|
||||
*/
|
||||
template <class CTYPE> CTYPE * CAFEConvert<CTYPE>::get (CAFE_DATATYPE dt, CAFE_DATATYPE_UNION val)
|
||||
{
|
||||
{
|
||||
#define __METHOD__ "CAFEConvert<CTYPE>::get(dt, val)"
|
||||
|
||||
// (boost::math::isnan) calls the Boost version of the isnan macro
|
||||
// Valid for all types that have numeric_limits support
|
||||
// (brackets required) to avoid compiler error should isnan also be a native macro
|
||||
|
||||
switch (dt) {
|
||||
case CAFE_DOUBLE:
|
||||
if ( (boost::math::isnan)((CTYPE) val.d) ) {
|
||||
switch (dt)
|
||||
{
|
||||
case CAFE_DOUBLE:
|
||||
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) ) {
|
||||
case CAFE_FLOAT:
|
||||
if ( (boost::math::isnan)((CTYPE) val.f) )
|
||||
{
|
||||
returnVal[0]= (CTYPE) val.f;
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
returnVal[0]= 0;
|
||||
}
|
||||
break;
|
||||
case CAFE_LONG:
|
||||
returnVal[0]= (CTYPE) val.l;
|
||||
case CAFE_LONG:
|
||||
returnVal[0]= (CTYPE) val.l;
|
||||
break;
|
||||
case CAFE_SHORT:
|
||||
returnVal[0]= (CTYPE) val.s;
|
||||
case CAFE_SHORT:
|
||||
returnVal[0]= (CTYPE) val.s;
|
||||
break;
|
||||
case CAFE_ENUM:
|
||||
returnVal[0]= (CTYPE) val.us;
|
||||
case CAFE_ENUM:
|
||||
returnVal[0]= (CTYPE) val.us;
|
||||
break;
|
||||
case CAFE_CHAR:
|
||||
returnVal[0]= (CTYPE) val.ch;
|
||||
case CAFE_CHAR:
|
||||
returnVal[0]= (CTYPE) val.ch;
|
||||
break;
|
||||
case CAFE_STRING:
|
||||
returnVal[0]= (CTYPE) strtod( val.str, NULL);
|
||||
case CAFE_STRING:
|
||||
returnVal[0]= (CTYPE) strtod( val.str, NULL);
|
||||
break;
|
||||
case CAFE_TYPENOTCONN:
|
||||
//cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__
|
||||
// << " CAFE_TYPENOTCONN: dataType: " << dt << " " << endl;
|
||||
returnVal[0]=0;
|
||||
break;
|
||||
case CAFE_NO_ACCESS:
|
||||
//cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__
|
||||
// << " CAFE_NO_ACCESS: dataType: " << dt << " " << endl;
|
||||
returnVal[0]=0;
|
||||
case CAFE_TYPENOTCONN:
|
||||
//std::cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__
|
||||
// << " CAFE_TYPENOTCONN: dataType: " << dt << " " << std::endl;
|
||||
returnVal[0]=0;
|
||||
break;
|
||||
case CAFE_INVALID_DATATYPE:
|
||||
//cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__
|
||||
// << " CAFE_INVALID_DATATYPE: dataType: " << dt << " " << endl;
|
||||
returnVal[0]=0;
|
||||
case CAFE_NO_ACCESS:
|
||||
//std::cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__
|
||||
// << " CAFE_NO_ACCESS: dataType: " << dt << " " << std::endl;
|
||||
returnVal[0]=0;
|
||||
break;
|
||||
case CAFE_NOT_REQUESTED:
|
||||
//cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__
|
||||
// << " CAFE_NOT_REQUESTED: dataType: " << dt << " " << endl;
|
||||
returnVal[0]=0;
|
||||
case CAFE_INVALID_DATATYPE:
|
||||
//std::cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__
|
||||
// << " CAFE_INVALID_DATATYPE: dataType: " << dt << " " << std::endl;
|
||||
returnVal[0]=0;
|
||||
break;
|
||||
case CAFE_NOT_SHOWN:
|
||||
//cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__
|
||||
// << " CAFE_INVALID_DATATYPE: dataType: " << dt << " " << endl;
|
||||
returnVal[0]=0;
|
||||
case CAFE_NOT_REQUESTED:
|
||||
//std::cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__
|
||||
// << " CAFE_NOT_REQUESTED: dataType: " << dt << " " << std::endl;
|
||||
returnVal[0]=0;
|
||||
break;
|
||||
default:
|
||||
cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__
|
||||
<< " CAFE INTERNAL ERROR: Unknown dataType: " << dt << " " << endl;
|
||||
returnVal[0]=0;
|
||||
case CAFE_NOT_SHOWN:
|
||||
//std::cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__
|
||||
// << " CAFE_INVALID_DATATYPE: dataType: " << dt << " " << std::endl;
|
||||
returnVal[0]=0;
|
||||
break;
|
||||
default:
|
||||
std::cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__
|
||||
<< " CAFE INTERNAL ERROR: Unknown dataType: " << dt << " " << std::endl;
|
||||
returnVal[0]=0;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -134,65 +138,66 @@ template <class CTYPE> CTYPE * CAFEConvert<CTYPE>::get (CAFE_DATATYPE dt, CAFE_D
|
||||
* \return CTYPE
|
||||
*/
|
||||
template <class CTYPE> CTYPE * CAFEConvert<CTYPE>::get (unsigned int index, CAFE_DATATYPE dt, CAFE_DATATYPE_UNION_SEQ val)
|
||||
{
|
||||
{
|
||||
#define __METHOD__ "CAFEConvert<CTYPE>::get(index, dt, val[])"
|
||||
|
||||
switch (dt) {
|
||||
case CAFE_DOUBLE:
|
||||
returnVal[0]= (CTYPE) val[index].d;
|
||||
break;
|
||||
case CAFE_FLOAT:
|
||||
returnVal[0]= (CTYPE) val[index].f;
|
||||
break;
|
||||
case CAFE_LONG:
|
||||
returnVal[0]= (CTYPE) val[index].l;
|
||||
break;
|
||||
case CAFE_SHORT:
|
||||
returnVal[0]= (CTYPE) val[index].s;
|
||||
break;
|
||||
case CAFE_ENUM:
|
||||
returnVal[0]= (CTYPE) val[index].us;
|
||||
switch (dt)
|
||||
{
|
||||
case CAFE_DOUBLE:
|
||||
returnVal[0]= (CTYPE) val[index].d;
|
||||
break;
|
||||
case CAFE_CHAR:
|
||||
returnVal[0]= (CTYPE) val[index].ch;
|
||||
break;
|
||||
case CAFE_STRING:
|
||||
returnVal[0]= (CTYPE) strtod( val[index].str, NULL);
|
||||
break;
|
||||
case CAFE_TYPENOTCONN:
|
||||
//cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__
|
||||
// << " CAFE_TYPENOTCONN: dataType: " << dt << " " << endl;
|
||||
returnVal[0]=0;
|
||||
break;
|
||||
case CAFE_NO_ACCESS:
|
||||
//cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__
|
||||
// << " CAFE_NO_ACCESS: dataType: " << dt << " " << endl;
|
||||
returnVal[0]=0;
|
||||
break;
|
||||
case CAFE_INVALID_DATATYPE:
|
||||
//cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__
|
||||
// << " CAFE_INVALID_DATATYPE: dataType: " << dt << " " << endl;
|
||||
returnVal[0]=0;
|
||||
break;
|
||||
case CAFE_NOT_REQUESTED:
|
||||
//cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__
|
||||
// << " CAFE_NOT_REQUESTED: dataType: " << dt << " " << endl;
|
||||
returnVal[0]=0;
|
||||
break;
|
||||
case CAFE_NOT_SHOWN:
|
||||
//cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__
|
||||
// << " CAFE_INVALID_DATATYPE: dataType: " << dt << " " << endl;
|
||||
returnVal[0]=0;
|
||||
break;
|
||||
default:
|
||||
cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__
|
||||
<< " CAFE INTERNAL ERROR: Unknown dataType: " << dt << " " << endl;
|
||||
returnVal[0]=0;
|
||||
case CAFE_FLOAT:
|
||||
returnVal[0]= (CTYPE) val[index].f;
|
||||
break;
|
||||
case CAFE_LONG:
|
||||
returnVal[0]= (CTYPE) val[index].l;
|
||||
break;
|
||||
case CAFE_SHORT:
|
||||
returnVal[0]= (CTYPE) val[index].s;
|
||||
break;
|
||||
case CAFE_ENUM:
|
||||
returnVal[0]= (CTYPE) val[index].us;
|
||||
break;
|
||||
case CAFE_CHAR:
|
||||
returnVal[0]= (CTYPE) val[index].ch;
|
||||
break;
|
||||
case CAFE_STRING:
|
||||
returnVal[0]= (CTYPE) strtod( val[index].str, NULL);
|
||||
break;
|
||||
case CAFE_TYPENOTCONN:
|
||||
//std::cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__
|
||||
// << " CAFE_TYPENOTCONN: dataType: " << dt << " " << std::endl;
|
||||
returnVal[0]=0;
|
||||
break;
|
||||
case CAFE_NO_ACCESS:
|
||||
//std::cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__
|
||||
// << " CAFE_NO_ACCESS: dataType: " << dt << " " << std::endl;
|
||||
returnVal[0]=0;
|
||||
break;
|
||||
case CAFE_INVALID_DATATYPE:
|
||||
//std::cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__
|
||||
// << " CAFE_INVALID_DATATYPE: dataType: " << dt << " " << std::endl;
|
||||
returnVal[0]=0;
|
||||
break;
|
||||
case CAFE_NOT_REQUESTED:
|
||||
//std::cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__
|
||||
// << " CAFE_NOT_REQUESTED: dataType: " << dt << " " << std::endl;
|
||||
returnVal[0]=0;
|
||||
break;
|
||||
case CAFE_NOT_SHOWN:
|
||||
//std::cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__
|
||||
// << " CAFE_INVALID_DATATYPE: dataType: " << dt << " " << std::endl;
|
||||
returnVal[0]=0;
|
||||
break;
|
||||
default:
|
||||
std::cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__
|
||||
<< " CAFE INTERNAL ERROR: Unknown dataType: " << dt << " " << std::endl;
|
||||
returnVal[0]=0;
|
||||
break;
|
||||
}
|
||||
|
||||
return (CTYPE *) returnVal;
|
||||
|
||||
|
||||
#undef __METHOD__
|
||||
};
|
||||
|
||||
@@ -208,46 +213,54 @@ template <class CTYPE> CTYPE * CAFEConvert<CTYPE>::get (unsigned int index, CAFE
|
||||
* \return CTYPE
|
||||
*/
|
||||
template <class CTYPE> CTYPE * CAFEConvert<CTYPE>::getStringFromEnum (unsigned int index, unsigned int noStr, CAFE_DATATYPE_UNION_SEQ val,
|
||||
char stig[MAX_ENUM_STATES][MAX_ENUM_STRING_SIZE])
|
||||
{
|
||||
char stig[MAX_ENUM_STATES][MAX_ENUM_STRING_SIZE])
|
||||
{
|
||||
#define __METHOD__ "CAFEConvert<CTYPE>::getStringFromEnum(indx, noStr, val, stig)"
|
||||
|
||||
|
||||
unsigned int noEmptyStrings=0;
|
||||
//Check for empty strings:
|
||||
for (unsigned int j=0; j<noStr; ++j) {
|
||||
if (strcmp(stig[j],"")==0) {
|
||||
++noEmptyStrings;
|
||||
}
|
||||
}
|
||||
|
||||
if (noStr==noEmptyStrings) {
|
||||
cout << "*** WARNING FROM " << __METHOD__ << " *** " << endl;
|
||||
cout << "ENUM STRING OPTIONS ARE ALL EMPTY! " << endl;
|
||||
cout << "BADLY CONFIGURED EPICS RECORD. " << endl;
|
||||
}
|
||||
|
||||
|
||||
if (index < noStr && noStr!=noEmptyStrings) {
|
||||
sprintf(returnVal[0], "%s", stig[val[index].us] );
|
||||
}
|
||||
else {
|
||||
sprintf(returnVal[0], "%d", val[index].us );
|
||||
if ( val[index].us>= noStr) {
|
||||
cout << "*** WARNING FROM " << __METHOD__ << " *** " << endl;
|
||||
cout << "ENUM UNSIGNED SHORT VALUE IS GREATER THAN THE NO OF ENUMERATED TYPES" << endl;
|
||||
cout << "VALUE (unsigned short) = " << val[index].us << endl;
|
||||
cout << "NO OF ENUMERATED STRINGS = " << noStr << " WITH VALUES: " << endl;
|
||||
for (unsigned int j=0; j<noStr; ++j) {
|
||||
cout << stig[j] << " [" <<j << "] ";
|
||||
}
|
||||
cout << endl;
|
||||
}
|
||||
}
|
||||
|
||||
return (CTYPE *) returnVal;
|
||||
|
||||
#undef __METHOD__
|
||||
|
||||
|
||||
unsigned int noEmptyStrings=0;
|
||||
//Check for empty strings:
|
||||
for (unsigned int j=0; j<noStr; ++j)
|
||||
{
|
||||
if (strcmp(stig[j],"")==0)
|
||||
{
|
||||
++noEmptyStrings;
|
||||
}
|
||||
}
|
||||
|
||||
// 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)
|
||||
{
|
||||
sprintf(returnVal[0], "%s", stig[val[index].us] );
|
||||
}
|
||||
else
|
||||
{
|
||||
sprintf(returnVal[0], "%d", val[index].us );
|
||||
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)
|
||||
{
|
||||
std::cout << stig[j] << " [" <<j << "] ";
|
||||
}
|
||||
std::cout << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
return (CTYPE *) returnVal;
|
||||
|
||||
#undef __METHOD__
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -258,13 +271,14 @@ template <class CTYPE> CTYPE * CAFEConvert<CTYPE>::getStringFromEnum (unsigned i
|
||||
* \return CTYPE
|
||||
*/
|
||||
template <class CTYPE> CTYPE * CAFEConvert<CTYPE>::getString (unsigned int index, CAFE_DATATYPE dt, CAFE_DATATYPE_UNION_SEQ val)
|
||||
{
|
||||
{
|
||||
#define __METHOD__ "CAFEConvert<CTYPE>::getString(nelem, dt, val[])"
|
||||
|
||||
switch (dt) {
|
||||
|
||||
switch (dt)
|
||||
{
|
||||
case CAFE_STRING:
|
||||
sprintf(returnVal[0], "%s", val[index].str);
|
||||
break;
|
||||
break;
|
||||
case CAFE_CHAR:
|
||||
sprintf(returnVal[0], "%u", val[index].ch);
|
||||
break;
|
||||
@@ -284,39 +298,39 @@ template <class CTYPE> CTYPE * CAFEConvert<CTYPE>::getString (unsigned int index
|
||||
sprintf(returnVal[0], "%u", val[index].us);
|
||||
break;
|
||||
case CAFE_TYPENOTCONN:
|
||||
//cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl;
|
||||
//cout << " ERROR CAFE_TYPENOTCONN: dataType: " << dt << " " << endl;
|
||||
//std::cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << std::endl;
|
||||
//std::cout << " ERROR CAFE_TYPENOTCONN: dataType: " << dt << " " << std::endl;
|
||||
sprintf(returnVal[0], "%s", "0"); //CAFE_TYPENOTCONN");
|
||||
break;
|
||||
case CAFE_NO_ACCESS:
|
||||
//cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl;
|
||||
//cout << " CAFE_NO_ACCESS: dataType: " << dt << " " << endl;
|
||||
//std::cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << std::endl;
|
||||
//std::cout << " CAFE_NO_ACCESS: dataType: " << dt << " " << std::endl;
|
||||
sprintf(returnVal[0], "%s", "0"); //"CAFE_NO_ACCESS");
|
||||
break;
|
||||
break;
|
||||
case CAFE_INVALID_DATATYPE:
|
||||
//cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl;
|
||||
//cout<< " CAFE_INVALID_DATATYPE: dataType: " << dt << " " << endl;
|
||||
//std::cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << std::endl;
|
||||
//std::cout<< " CAFE_INVALID_DATATYPE: dataType: " << dt << " " << std::endl;
|
||||
sprintf(returnVal[0], "%s", "0"); //"CAFE_INVALID_DATATYPE");
|
||||
break;
|
||||
case CAFE_NOT_REQUESTED:
|
||||
//cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl;
|
||||
//cout<< " CAFE_NOT_REQUESTED: dataType: " << dt << " " << endl;
|
||||
//std::cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << std::endl;
|
||||
//std::cout<< " CAFE_NOT_REQUESTED: dataType: " << dt << " " << std::endl;
|
||||
sprintf(returnVal[0], "%s", "0"); //"");
|
||||
break;
|
||||
case CAFE_NOT_SHOWN:
|
||||
//cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl;
|
||||
//cout<< " CAFE_NOT_SHOWN: dataType: " << dt << " " << endl;
|
||||
//std::cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << std::endl;
|
||||
//std::cout<< " CAFE_NOT_SHOWN: dataType: " << dt << " " << std::endl;
|
||||
sprintf(returnVal[0], "%s", "0"); // "CAFE_NOT_SHOWN");
|
||||
break;
|
||||
default:
|
||||
//cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl;
|
||||
//cout<< " CAFE INTERNAL ERROR: Unknown dataType: "<< dt << " " << endl;
|
||||
//std::cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << std::endl;
|
||||
//std::cout<< " CAFE INTERNAL ERROR: Unknown dataType: "<< dt << " " << std::endl;
|
||||
sprintf(returnVal[0], "%s", "0");// "Unknown dataType");
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
return (CTYPE *) returnVal;
|
||||
|
||||
return (CTYPE *) returnVal;
|
||||
|
||||
#undef __METHOD__
|
||||
};
|
||||
@@ -331,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;
|
||||
@@ -354,39 +369,39 @@ template <class CTYPE> CTYPE * CAFEConvert<CTYPE>::getString (CAFE_DATATYPE dt,
|
||||
sprintf(returnVal[0], "%u", val.us);
|
||||
break;
|
||||
case CAFE_TYPENOTCONN:
|
||||
//cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl;
|
||||
//cout << " ERROR CAFE_TYPENOTCONN: dataType: " << dt << " " << endl;
|
||||
//std::cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << std::endl;
|
||||
//std::cout << " ERROR CAFE_TYPENOTCONN: dataType: " << dt << " " << std::endl;
|
||||
sprintf(returnVal[0], "%s", "0"); //CAFE_TYPENOTCONN");
|
||||
break;
|
||||
case CAFE_NO_ACCESS:
|
||||
//cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl;
|
||||
//cout << " CAFE_NO_ACCESS: dataType: " << dt << " " << endl;
|
||||
//std::cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << std::endl;
|
||||
//std::cout << " CAFE_NO_ACCESS: dataType: " << dt << " " << std::endl;
|
||||
sprintf(returnVal[0], "%s", "0"); //"CAFE_NO_ACCESS");
|
||||
break;
|
||||
case CAFE_INVALID_DATATYPE:
|
||||
//cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl;
|
||||
//cout<< " CAFE_INVALID_DATATYPE: dataType: " << dt << " " << endl;
|
||||
//std::cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << std::endl;
|
||||
//std::cout<< " CAFE_INVALID_DATATYPE: dataType: " << dt << " " << std::endl;
|
||||
sprintf(returnVal[0], "%s", "0"); //"CAFE_INVALID_DATATYPE");
|
||||
break;
|
||||
case CAFE_NOT_REQUESTED:
|
||||
//cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl;
|
||||
//cout<< " CAFE_NOT_REQUESTED: dataType: " << dt << " " << endl;
|
||||
//std::cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << std::endl;
|
||||
//std::cout<< " CAFE_NOT_REQUESTED: dataType: " << dt << " " << std::endl;
|
||||
sprintf(returnVal[0], "%s", "0"); //"");
|
||||
break;
|
||||
case CAFE_NOT_SHOWN:
|
||||
//cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl;
|
||||
//cout<< " CAFE_NOT_SHOWN: dataType: " << dt << " " << endl;
|
||||
//std::cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << std::endl;
|
||||
//std::cout<< " CAFE_NOT_SHOWN: dataType: " << dt << " " << std::endl;
|
||||
sprintf(returnVal[0], "%s", "0"); // "CAFE_NOT_SHOWN");
|
||||
break;
|
||||
default:
|
||||
//cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl;
|
||||
//cout<< " CAFE INTERNAL ERROR: Unknown dataType: "<< dt << " " << endl;
|
||||
//std::cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << std::endl;
|
||||
//std::cout<< " CAFE INTERNAL ERROR: Unknown dataType: "<< dt << " " << std::endl;
|
||||
sprintf(returnVal[0], "%s", "0");// "Unknown dataType");
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
return (CTYPE *) returnVal;
|
||||
return (CTYPE *) returnVal;
|
||||
|
||||
#undef __METHOD__
|
||||
};
|
||||
|
||||
@@ -7,112 +7,126 @@
|
||||
|
||||
#ifndef CAFEDATATYPE_H
|
||||
#define CAFEDATATYPE_H
|
||||
|
||||
|
||||
#include <cadef.h>
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
#include <map>
|
||||
|
||||
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
|
||||
CAFE_INT = DBF_INT, // 1
|
||||
CAFE_FLOAT = DBF_FLOAT, // 2
|
||||
CAFE_ENUM = DBF_ENUM, // 3
|
||||
CAFE_USHORT = DBF_ENUM, // 3
|
||||
CAFE_CHAR = DBF_CHAR, // 4
|
||||
CAFE_LONG = DBF_LONG, // 5
|
||||
CAFE_DOUBLE = DBF_DOUBLE, // 6
|
||||
CAFE_NO_ACCESS = DBF_NO_ACCESS, //7
|
||||
CAFE_INVALID_DATATYPE = 8,
|
||||
CAFE_NOT_REQUESTED = 100,
|
||||
CAFE_NOT_SHOWN = 101 // (in stop monitor)
|
||||
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
|
||||
CAFE_INT = DBF_INT, // 1
|
||||
CAFE_FLOAT = DBF_FLOAT, // 2
|
||||
CAFE_ENUM = DBF_ENUM, // 3
|
||||
CAFE_USHORT = DBF_ENUM, // 3
|
||||
CAFE_CHAR = DBF_CHAR, // 4
|
||||
CAFE_LONG = DBF_LONG, // 5
|
||||
CAFE_DOUBLE = DBF_DOUBLE, // 6
|
||||
CAFE_NO_ACCESS = DBF_NO_ACCESS, //7
|
||||
CAFE_INVALID_DATATYPE = 8,
|
||||
CAFE_NOT_REQUESTED = 100,
|
||||
CAFE_NOT_SHOWN = 101 // (in stop monitor)
|
||||
};
|
||||
|
||||
/**
|
||||
* Provides methods to convert between
|
||||
* the CAFE_DATATYPES and text equivalent
|
||||
*/
|
||||
class CAFEDataTypeCode {
|
||||
typedef std::map<int, std::string> mapLongString;
|
||||
private:
|
||||
mapLongString mapDataType;
|
||||
mapLongString::iterator pos;
|
||||
class CAFEDataTypeCode
|
||||
{
|
||||
typedef std::map<int, std::string> mapLongString;
|
||||
private:
|
||||
mapLongString mapDataType;
|
||||
mapLongString::iterator pos;
|
||||
public:
|
||||
CAFEDataTypeCode() {
|
||||
mapDataType.insert(std::make_pair((int) CAFE_TYPENOTCONN, "CAFE_TYPENOTCONN" ));
|
||||
mapDataType.insert(std::make_pair((int) CAFE_STRING, "DBF_STRING" ));
|
||||
mapDataType.insert(std::make_pair((int) CAFE_SHORT, "DBF_SHORT" ));
|
||||
mapDataType.insert(std::make_pair((int) CAFE_INT, "DBF_SHORT" ));
|
||||
mapDataType.insert(std::make_pair((int) CAFE_FLOAT, "DBF_FLOAT" ));
|
||||
mapDataType.insert(std::make_pair((int) CAFE_ENUM, "DBF_ENUM" ));
|
||||
mapDataType.insert(std::make_pair((int) CAFE_CHAR, "DBF_CHAR" ));
|
||||
mapDataType.insert(std::make_pair((int) CAFE_LONG, "DBF_LONG" ));
|
||||
mapDataType.insert(std::make_pair((int) CAFE_DOUBLE, "DBF_DOUBLE" ));
|
||||
mapDataType.insert(std::make_pair((int) CAFE_NO_ACCESS, "DBF_NO_ACCESS" ));
|
||||
mapDataType.insert(std::make_pair((int) CAFE_INVALID_DATATYPE, "CAFE_INVALID_DATATYPE"));
|
||||
mapDataType.insert(std::make_pair((int) CAFE_NOT_REQUESTED, "CAFE_NOT_REQUESTED"));
|
||||
mapDataType.insert(std::make_pair((int) CAFE_NOT_SHOWN, "CAFE_NOT_SHOWN (IN STOP MONITOR)"));
|
||||
};
|
||||
CAFEDataTypeCode()
|
||||
{
|
||||
mapDataType.insert(std::make_pair((int) CAFE_TYPENOTCONN, "CAFE_TYPENOTCONN" ));
|
||||
mapDataType.insert(std::make_pair((int) CAFE_STRING, "DBF_STRING" ));
|
||||
mapDataType.insert(std::make_pair((int) CAFE_SHORT, "DBF_SHORT" ));
|
||||
mapDataType.insert(std::make_pair((int) CAFE_INT, "DBF_SHORT" ));
|
||||
mapDataType.insert(std::make_pair((int) CAFE_FLOAT, "DBF_FLOAT" ));
|
||||
mapDataType.insert(std::make_pair((int) CAFE_ENUM, "DBF_ENUM" ));
|
||||
mapDataType.insert(std::make_pair((int) CAFE_CHAR, "DBF_CHAR" ));
|
||||
mapDataType.insert(std::make_pair((int) CAFE_LONG, "DBF_LONG" ));
|
||||
mapDataType.insert(std::make_pair((int) CAFE_DOUBLE, "DBF_DOUBLE" ));
|
||||
mapDataType.insert(std::make_pair((int) CAFE_NO_ACCESS, "DBF_NO_ACCESS" ));
|
||||
mapDataType.insert(std::make_pair((int) CAFE_INVALID_DATATYPE, "CAFE_INVALID_DATATYPE"));
|
||||
mapDataType.insert(std::make_pair((int) CAFE_NOT_REQUESTED, "CAFE_NOT_REQUESTED"));
|
||||
mapDataType.insert(std::make_pair((int) CAFE_NOT_SHOWN, "CAFE_NOT_SHOWN (IN STOP MONITOR)"));
|
||||
};
|
||||
|
||||
~CAFEDataTypeCode() {};
|
||||
|
||||
std::string message (int i) {
|
||||
pos = mapDataType.find(i);
|
||||
if (pos != mapDataType.end()) return pos->second;
|
||||
return "CAFE_DATATYPE_UNKNOWN";
|
||||
};
|
||||
|
||||
|
||||
std::string asString (int i) {
|
||||
pos = mapDataType.find(i);
|
||||
if (pos != mapDataType.end()) return pos->second;
|
||||
return "CAFE_DATATYPE_UNKNOWN";
|
||||
};
|
||||
|
||||
int enumIs (std::string message) {
|
||||
for (pos=mapDataType.begin(); pos != mapDataType.end(); ++pos)
|
||||
if (pos->second==message) return pos->first;
|
||||
return -1;
|
||||
};
|
||||
|
||||
|
||||
int asEnum (std::string message) {
|
||||
for (pos=mapDataType.begin(); pos != mapDataType.end(); ++pos)
|
||||
if (pos->second==message) return pos->first;
|
||||
return -1;
|
||||
};
|
||||
~CAFEDataTypeCode() {};
|
||||
|
||||
void show() {print();}
|
||||
std::string message (int i)
|
||||
{
|
||||
pos = mapDataType.find(i);
|
||||
if (pos != mapDataType.end()) return pos->second;
|
||||
return "CAFE_DATATYPE_UNKNOWN";
|
||||
};
|
||||
|
||||
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 << pos->first << " " << pos->second << std::endl;
|
||||
|
||||
std::string asString (int i)
|
||||
{
|
||||
pos = mapDataType.find(i);
|
||||
if (pos != mapDataType.end()) return pos->second;
|
||||
return "CAFE_DATATYPE_UNKNOWN";
|
||||
};
|
||||
|
||||
int enumIs (std::string message)
|
||||
{
|
||||
for (pos=mapDataType.begin(); pos != mapDataType.end(); ++pos)
|
||||
if (pos->second==message) return pos->first;
|
||||
return -1;
|
||||
};
|
||||
|
||||
|
||||
int asEnum (std::string message)
|
||||
{
|
||||
for (pos=mapDataType.begin(); pos != mapDataType.end(); ++pos)
|
||||
if (pos->second==message) return pos->first;
|
||||
return -1;
|
||||
};
|
||||
|
||||
void show()
|
||||
{
|
||||
print();
|
||||
}
|
||||
std::cout << "-----------------" << std::endl;
|
||||
};
|
||||
|
||||
|
||||
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 << pos->first << " " << pos->second << std::endl;
|
||||
}
|
||||
std::cout << "------------------" << std::endl;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* A union of CAFE primitive datatypes
|
||||
*/
|
||||
union CAFE_DATATYPE_UNION {
|
||||
dbr_string_t str;
|
||||
dbr_short_t s;
|
||||
dbr_float_t f;
|
||||
dbr_enum_t us; //unsigned short us;
|
||||
dbr_char_t ch; //unsigned char ch;
|
||||
dbr_long_t l; //int l;
|
||||
dbr_double_t d;
|
||||
union CAFE_DATATYPE_UNION
|
||||
{
|
||||
dbr_string_t str;
|
||||
dbr_short_t s;
|
||||
dbr_float_t f;
|
||||
dbr_enum_t us; //unsigned short us;
|
||||
dbr_char_t ch; //unsigned char ch;
|
||||
dbr_long_t l; //int l;
|
||||
dbr_double_t d;
|
||||
};
|
||||
|
||||
typedef CAFE_DATATYPE_UNION * CAFE_DATATYPE_UNION_SEQ;
|
||||
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -6,26 +6,28 @@
|
||||
///
|
||||
|
||||
#ifndef CAFEDATATYPEHELPER_H
|
||||
#define CAFEDATATYPEHELP_H
|
||||
|
||||
#define CAFEDATATYPEHELPER_H
|
||||
|
||||
#include <cadef.h>
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
#include <map>
|
||||
#include <cafeDataType.h>
|
||||
|
||||
class CafeDataTypeHelper{
|
||||
class CafeDataTypeHelper
|
||||
{
|
||||
private:
|
||||
CAFE_DATATYPE_UNION cdu;
|
||||
CAFE_DATATYPE dataType;
|
||||
|
||||
public:
|
||||
CafeDataTypeHelper(CAFE_DATATYPE_UNION _cdu, CAFE_DATATYPE _dataType){
|
||||
CafeDataTypeHelper(CAFE_DATATYPE_UNION _cdu, CAFE_DATATYPE _dataType)
|
||||
{
|
||||
cdu=_cdu;
|
||||
dataType=_dataType;
|
||||
};
|
||||
|
||||
~CafeDataTypeHelper(){};
|
||||
|
||||
~CafeDataTypeHelper() {};
|
||||
|
||||
CAFEConvert<double> renderDouble;
|
||||
CAFEConvert<float> renderFloat;
|
||||
@@ -43,23 +45,58 @@ public:
|
||||
CAFEConvert<int> renderInt;
|
||||
CAFEConvert<unsigned int> renderUInt;
|
||||
|
||||
std::string getAsString(){
|
||||
std::string getAsString()
|
||||
{
|
||||
return (std::string) renderString.getString(dataType, cdu)[0];
|
||||
};
|
||||
dbr_string_t * getAsDbr_string_t(){
|
||||
dbr_string_t * getAsDbr_string_t()
|
||||
{
|
||||
return (dbr_string_t *) (renderString.getString(dataType, cdu)[0]);
|
||||
};
|
||||
double getAsDouble(){return (double) renderDouble.get(dataType, cdu)[0];};
|
||||
float getAsFloat() {return (float) renderFloat.get (dataType, cdu)[0];};
|
||||
short getAsShort() {return (short) renderShort.get(dataType, cdu)[0];};
|
||||
dbr_enum_t getAsEnum(){return (dbr_enum_t) renderEnum.get(dataType, cdu)[0];};
|
||||
unsigned short getAsUShort(){return (unsigned short) renderEnum.get(dataType, cdu)[0];};
|
||||
int getAsInt() {return (int) renderInt.get(dataType, cdu)[0];};
|
||||
unsigned int getAsUInt() {return (int) renderUInt.get(dataType, cdu)[0];};
|
||||
char getAsChar() {return (char) renderChar.get(dataType, cdu)[0];};
|
||||
unsigned char getAsUChar(){return (unsigned char) renderUChar.get(dataType, cdu)[0];};
|
||||
long long getAsLongLong() {return (long long) renderLongLong.get(dataType, cdu)[0];};
|
||||
unsigned int getAsULongLong() {return (unsigned long long) renderULongLong.get(dataType, cdu)[0];};
|
||||
double getAsDouble()
|
||||
{
|
||||
return (double) renderDouble.get(dataType, cdu)[0];
|
||||
};
|
||||
float getAsFloat()
|
||||
{
|
||||
return (float) renderFloat.get (dataType, cdu)[0];
|
||||
};
|
||||
short getAsShort()
|
||||
{
|
||||
return (short) renderShort.get(dataType, cdu)[0];
|
||||
};
|
||||
dbr_enum_t getAsEnum()
|
||||
{
|
||||
return (dbr_enum_t) renderEnum.get(dataType, cdu)[0];
|
||||
};
|
||||
unsigned short getAsUShort()
|
||||
{
|
||||
return (unsigned short) renderEnum.get(dataType, cdu)[0];
|
||||
};
|
||||
int getAsInt()
|
||||
{
|
||||
return (int) renderInt.get(dataType, cdu)[0];
|
||||
};
|
||||
unsigned int getAsUInt()
|
||||
{
|
||||
return (int) renderUInt.get(dataType, cdu)[0];
|
||||
};
|
||||
char getAsChar()
|
||||
{
|
||||
return (char) renderChar.get(dataType, cdu)[0];
|
||||
};
|
||||
unsigned char getAsUChar()
|
||||
{
|
||||
return (unsigned char) renderUChar.get(dataType, cdu)[0];
|
||||
};
|
||||
long long getAsLongLong()
|
||||
{
|
||||
return (long long) renderLongLong.get(dataType, cdu)[0];
|
||||
};
|
||||
unsigned int getAsULongLong()
|
||||
{
|
||||
return (unsigned long long) renderULongLong.get(dataType, cdu)[0];
|
||||
};
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -10,30 +10,33 @@
|
||||
|
||||
#include <cadef.h>
|
||||
|
||||
namespace CAFENUM {
|
||||
namespace CAFENUM
|
||||
{
|
||||
|
||||
/**
|
||||
* Data request buffer types \n
|
||||
* i.e. whether PRIMITIVE, STS, TIME, GR or CTRL
|
||||
*/
|
||||
enum DBR_TYPE {
|
||||
DBR_PRIMITIVE,
|
||||
DBR_PLAIN=DBR_PRIMITIVE,
|
||||
DBR_STS,
|
||||
DBR_TIME,
|
||||
DBR_GR,
|
||||
DBR_CTRL,
|
||||
DBR_PUT, //DBR_PUT_ACKT and DBR_PUT_ACKS Write only - used from global alarm acknowledge.
|
||||
DBR_STSACK, // is DBR_STSACK_STRING
|
||||
DBR_CLASS, // is DBR_CLASS_NAME,
|
||||
DBR_NONE // should not occur, but used internally within cafeVectors.h
|
||||
};
|
||||
enum DBR_TYPE
|
||||
{
|
||||
DBR_PRIMITIVE,
|
||||
DBR_PLAIN=DBR_PRIMITIVE,
|
||||
DBR_STS,
|
||||
DBR_TIME,
|
||||
DBR_GR,
|
||||
DBR_CTRL,
|
||||
DBR_PUT, //DBR_PUT_ACKT and DBR_PUT_ACKS Write only - used from global alarm acknowledge.
|
||||
DBR_STSACK, // is DBR_STSACK_STRING
|
||||
DBR_CLASS, // is DBR_CLASS_NAME,
|
||||
DBR_NONE // should not occur, but used internally within cafeVectors.h
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* 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,17 +65,17 @@ 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,11 +83,12 @@ enum ChannelServerDispatchPriority {
|
||||
* Meant for use within callbacks to ensure that cache operations
|
||||
* are never blocked
|
||||
*/
|
||||
enum ChannelGetCacheWaitPolicyKind {
|
||||
GET_CACHE_NO_CHECK=0,
|
||||
GET_CACHE_NO_WAIT,
|
||||
GET_CACHE_NOW =GET_CACHE_NO_WAIT,
|
||||
GET_CACHE_WAIT
|
||||
enum ChannelGetCacheWaitPolicyKind
|
||||
{
|
||||
GET_CACHE_NO_CHECK=0,
|
||||
GET_CACHE_NO_WAIT,
|
||||
GET_CACHE_NOW =GET_CACHE_NO_WAIT,
|
||||
GET_CACHE_WAIT
|
||||
};
|
||||
|
||||
|
||||
@@ -92,9 +97,10 @@ enum ChannelGetCacheWaitPolicyKind {
|
||||
* monitor is in place
|
||||
*
|
||||
*/
|
||||
enum ChannelGetActionWhenMonitorPolicyKind {
|
||||
enum ChannelGetActionWhenMonitorPolicyKind
|
||||
{
|
||||
GET_FROM_CACHE,
|
||||
GET_FROM_IOC
|
||||
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,20 +141,22 @@ enum ChannelWaitForResponsePolicyKind {
|
||||
};
|
||||
|
||||
|
||||
enum StatusMessageKind {
|
||||
enum StatusMessageKind
|
||||
{
|
||||
NO_MESSAGE,
|
||||
PRE_REQUEST,
|
||||
FROM_REQUEST,
|
||||
FROM_PEND,
|
||||
FROM_CALLBACK,
|
||||
FROM_MESSAGE
|
||||
};
|
||||
|
||||
enum CallbackProgressKind {
|
||||
};
|
||||
|
||||
enum CallbackProgressKind
|
||||
{
|
||||
NOT_INITIATED,
|
||||
PENDING,
|
||||
COMPLETE
|
||||
};
|
||||
};
|
||||
|
||||
}; //namespace CAFENUM
|
||||
|
||||
|
||||
@@ -10,35 +10,37 @@
|
||||
#define CAFEENUMSTRINGS_H
|
||||
|
||||
|
||||
#include "cafeEnum.h"
|
||||
#include "enumStrings.h"
|
||||
#include <cafeEnum.h>
|
||||
#include <enumStrings.h>
|
||||
|
||||
template<> char const * enumStrings<CAFENUM::ChannelWaitForResponsePolicyKind>::data[]
|
||||
= {"CAFENUM::WAIT", "CAFENUM::NO_WAIT"};
|
||||
= {"CAFENUM::WAIT", "CAFENUM::NO_WAIT"};
|
||||
|
||||
template<> char const * enumStrings<CAFENUM::ChannelRequestDataTypePolicyKind>::data[]
|
||||
= {"CAFENUM::NATIVE_DATATYPE", "CAFENUM::LOWEST_DATATYPE"};
|
||||
= {"CAFENUM::NATIVE_DATATYPE", "CAFENUM::LOWEST_DATATYPE"};
|
||||
|
||||
template<> char const * enumStrings<CAFENUM::ChannelFlushSendBufferPolicyKind>::data[]
|
||||
= {"CAFENUM::WITH_FLUSH_IO","CAFENUM::WITH_PEND_IO","CAFENUM::WITH_PEND_EVENT", "CAFENUM::WITH_POLL"};
|
||||
= {"CAFENUM::WITH_FLUSH_IO","CAFENUM::WITH_PEND_IO","CAFENUM::WITH_PEND_EVENT", "CAFENUM::WITH_POLL"};
|
||||
|
||||
template<> char const * enumStrings<CAFENUM::ChannelWhenToFlushSendBufferPolicyKind>::data[]
|
||||
= {"CAFENUM::FLUSH_AFTER_EACH_MESSAGE","CAFENUM::FLUSH_DESIGNATED_TO_CLIENT"};
|
||||
= {"CAFENUM::FLUSH_AFTER_EACH_MESSAGE","CAFENUM::FLUSH_DESIGNATED_TO_CLIENT"};
|
||||
|
||||
template<> char const * enumStrings<CAFENUM::ChannelRequestPolicyKind>::data[]
|
||||
= {"CAFENUM::WITHOUT_CALLBACK","CAFENUM::WITH_CALLBACK_DEFAULT","CAFENUM::WITH_CALLBACK_USER_SUPPLIED"};
|
||||
= {"CAFENUM::WITHOUT_CALLBACK","CAFENUM::WITH_CALLBACK_DEFAULT","CAFENUM::WITH_CALLBACK_USER_SUPPLIED"};
|
||||
|
||||
template<> char const * enumStrings<CAFENUM::DBR_TYPE>::data[]
|
||||
= {"CAFENUM::DBR_PRIMITIVE","CAFENUM::DBR_STS","CAFENUM::DBR_TIME", "CAFENUM::DBR_GR",
|
||||
"CAFENUM::DBR_CTRL","CAFENUM::DBR_PUT", "CAFENUM::DBR_STSACK","CAFENUM::DBR_CLASS",
|
||||
"CAFENUM::DBR_OTHER"};
|
||||
= {"CAFENUM::DBR_PRIMITIVE","CAFENUM::DBR_STS","CAFENUM::DBR_TIME", "CAFENUM::DBR_GR",
|
||||
"CAFENUM::DBR_CTRL","CAFENUM::DBR_PUT", "CAFENUM::DBR_STSACK","CAFENUM::DBR_CLASS",
|
||||
"CAFENUM::DBR_OTHER"
|
||||
};
|
||||
|
||||
template<> char const * enumStrings<CAFENUM::StatusMessageKind>::data[]
|
||||
= {"CAFENUM::NO_MESSAGE","CAFENUM::PRE_REQUEST","CAFENUM::FROM_REQUEST","CAFENUM::FROM_PEND",
|
||||
"CAFENUM::FROM_CALLBACK"};
|
||||
= {"CAFENUM::NO_MESSAGE","CAFENUM::PRE_REQUEST","CAFENUM::FROM_REQUEST","CAFENUM::FROM_PEND",
|
||||
"CAFENUM::FROM_CALLBACK"
|
||||
};
|
||||
|
||||
template<> char const * enumStrings<CAFENUM::CallbackProgressKind>::data[]
|
||||
= {"CAFENUM::NOT_INITIATED","CAFENUM::PENDING","CAFENUM::COMPLETE"};
|
||||
= {"CAFENUM::NOT_INITIATED","CAFENUM::PENDING","CAFENUM::COMPLETE"};
|
||||
|
||||
|
||||
#endif // CAFEENUMSTRINGS_H
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -9,267 +9,301 @@
|
||||
#define CAFEVECTORS_H
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
int get(const unsigned int _handle, vector<string> & V); //0
|
||||
int get(const unsigned int _handle, vector<short> & V); //1
|
||||
int get(const unsigned int _handle, vector<float> & V); //2
|
||||
int get(const unsigned int _handle, vector<unsigned short> & V); //3
|
||||
int get(const unsigned int _handle, vector<unsigned char> & V); //4
|
||||
int get(const unsigned int _handle, vector<dbr_long_t> & V); //5
|
||||
int get(const unsigned int _handle, vector<long long> & V); //5
|
||||
int get(const unsigned int _handle, vector<double> & V); //6
|
||||
int get(const unsigned int _handle, vector<string> & V,
|
||||
|
||||
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
|
||||
int get(const unsigned int _handle, std::vector<unsigned short> & V); //3
|
||||
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, vector<short> & V,
|
||||
int get(const unsigned int _handle, std::vector<short> & V,
|
||||
dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity);//1
|
||||
int get(const unsigned int _handle, vector<float> & V,
|
||||
int get(const unsigned int _handle, std::vector<float> & V,
|
||||
dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity);//2
|
||||
int get(const unsigned int _handle, vector<unsigned short> & V,
|
||||
int get(const unsigned int _handle, std::vector<unsigned short> & V,
|
||||
dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity);//3
|
||||
int get(const unsigned int _handle, vector<unsigned char> & V,
|
||||
int get(const unsigned int _handle, std::vector<unsigned char> & V,
|
||||
dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity);//4
|
||||
int get(const unsigned int _handle, vector<dbr_long_t> & V,
|
||||
int get(const unsigned int _handle, std::vector<dbr_long_t> & V,
|
||||
dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity);//5
|
||||
int get(const unsigned int _handle, vector<long long> & V,
|
||||
int get(const unsigned int _handle, std::vector<long long> & V,
|
||||
dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity);//5
|
||||
int get(const unsigned int _handle, vector<double> & V,
|
||||
int get(const unsigned int _handle, std::vector<double> & V,
|
||||
dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity);//6
|
||||
int get(const unsigned int _handle, vector<string> & V,
|
||||
int get(const unsigned int _handle, std::vector<std::string> & V,
|
||||
dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts);//0
|
||||
int get(const unsigned int _handle, vector<short> & V,
|
||||
int get(const unsigned int _handle, std::vector<short> & V,
|
||||
dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts);//1
|
||||
int get(const unsigned int _handle, vector<float> & V,
|
||||
int get(const unsigned int _handle, std::vector<float> & V,
|
||||
dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts);//2
|
||||
int get(const unsigned int _handle, vector<unsigned short> & V,
|
||||
int get(const unsigned int _handle, std::vector<unsigned short> & V,
|
||||
dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts);//3
|
||||
int get(const unsigned int _handle, vector<unsigned char> & V,
|
||||
int get(const unsigned int _handle, std::vector<unsigned char> & V,
|
||||
dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts);//4
|
||||
int get(const unsigned int _handle, vector<dbr_long_t> & V,
|
||||
int get(const unsigned int _handle, std::vector<dbr_long_t> & V,
|
||||
dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts);//5
|
||||
int get(const unsigned int _handle, vector<long long> & V,
|
||||
int get(const unsigned int _handle, std::vector<long long> & V,
|
||||
dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts);//5
|
||||
int get(const unsigned int _handle, vector<double> & V,
|
||||
int get(const unsigned int _handle, std::vector<double> & V,
|
||||
dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts);//
|
||||
|
||||
int getCache(const unsigned int _handle, vector<string> & V); //0
|
||||
int getCache(const unsigned int _handle, vector<short> & V); //1
|
||||
int getCache(const unsigned int _handle, vector<float> & V); //2
|
||||
int getCache(const unsigned int _handle, vector<unsigned short> & V);//3
|
||||
int getCache(const unsigned int _handle, vector<unsigned char> & V);//4
|
||||
int getCache(const unsigned int _handle, vector<dbr_long_t> & V); //5
|
||||
int getCache(const unsigned int _handle, vector<long long> & V); //5
|
||||
int getCache(const unsigned int _handle, vector<double> & V); //6
|
||||
int getCache(const unsigned int _handle, vector<string> & V,
|
||||
dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity);//0
|
||||
int getCache(const unsigned int _handle, vector<short> & V,
|
||||
dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity);//1
|
||||
int getCache(const unsigned int _handle, vector<float> & V,
|
||||
dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity);//2
|
||||
int getCache(const unsigned int _handle, vector<unsigned short> & V,
|
||||
dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity);//3
|
||||
int getCache(const unsigned int _handle, vector<unsigned char> & V,
|
||||
dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity);//4
|
||||
int getCache(const unsigned int _handle, vector<dbr_long_t> & V,
|
||||
dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity);//5
|
||||
int getCache(const unsigned int _handle, vector<long long> & V,
|
||||
dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity);//5
|
||||
int getCache(const unsigned int _handle, vector<double> & V,
|
||||
dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity);//6
|
||||
int getCache(const unsigned int _handle, std::vector<std::string> & V); //0
|
||||
int getCache(const unsigned int _handle, std::vector<short> & V); //1
|
||||
int getCache(const unsigned int _handle, std::vector<float> & V); //2
|
||||
int getCache(const unsigned int _handle, std::vector<unsigned short> & V);//3
|
||||
int getCache(const unsigned int _handle, std::vector<unsigned char> & V);//4
|
||||
int getCache(const unsigned int _handle, std::vector<dbr_long_t> & V); //5
|
||||
int getCache(const unsigned int _handle, std::vector<long long> & V); //5
|
||||
int getCache(const unsigned int _handle, std::vector<double> & V); //6
|
||||
int getCache(const unsigned int _handle, std::vector<std::string> & V,
|
||||
dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity);//0
|
||||
int getCache(const unsigned int _handle, std::vector<short> & V,
|
||||
dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity);//1
|
||||
int getCache(const unsigned int _handle, std::vector<float> & V,
|
||||
dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity);//2
|
||||
int getCache(const unsigned int _handle, std::vector<unsigned short> & V,
|
||||
dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity);//3
|
||||
int getCache(const unsigned int _handle, std::vector<unsigned char> & V,
|
||||
dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity);//4
|
||||
int getCache(const unsigned int _handle, std::vector<dbr_long_t> & V,
|
||||
dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity);//5
|
||||
int getCache(const unsigned int _handle, std::vector<long long> & V,
|
||||
dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity);//5
|
||||
int getCache(const unsigned int _handle, std::vector<double> & V,
|
||||
dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity);//6
|
||||
|
||||
|
||||
int getCache(const unsigned int _handle, vector<string> & V,
|
||||
dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts);//0
|
||||
int getCache(const unsigned int _handle, vector<short> & V,
|
||||
dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts);//1
|
||||
int getCache(const unsigned int _handle, vector<float> & V,
|
||||
dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts);//2
|
||||
int getCache(const unsigned int _handle, vector<unsigned short> & V,
|
||||
dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts);//3
|
||||
int getCache(const unsigned int _handle, vector<unsigned char> & V,
|
||||
dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts);//4
|
||||
int getCache(const unsigned int _handle, vector<dbr_long_t> & V,
|
||||
dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts);//5
|
||||
int getCache(const unsigned int _handle, vector<long long> & V,
|
||||
dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts);//5
|
||||
int getCache(const unsigned int _handle, vector<double> & V,
|
||||
dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts);//6
|
||||
int getCache(const unsigned int _handle, std::vector<std::string> & V,
|
||||
dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts);//0
|
||||
int getCache(const unsigned int _handle, std::vector<short> & V,
|
||||
dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts);//1
|
||||
int getCache(const unsigned int _handle, std::vector<float> & V,
|
||||
dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts);//2
|
||||
int getCache(const unsigned int _handle, std::vector<unsigned short> & V,
|
||||
dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts);//3
|
||||
int getCache(const unsigned int _handle, std::vector<unsigned char> & V,
|
||||
dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts);//4
|
||||
int getCache(const unsigned int _handle, std::vector<dbr_long_t> & V,
|
||||
dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts);//5
|
||||
int getCache(const unsigned int _handle, std::vector<long long> & V,
|
||||
dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts);//5
|
||||
int getCache(const unsigned int _handle, std::vector<double> & V,
|
||||
dbr_short_t &alarmStatus, dbr_short_t &alarmSeverity, epicsTimeStamp &ts);//6
|
||||
|
||||
//NON_BLOCKING
|
||||
int get(vector<unsigned int> handleV, vector<int> &statusV);
|
||||
int get(std::vector<unsigned int> handleV, std::vector<int> &statusV);
|
||||
|
||||
int getV(vector<unsigned int> handleV, vector<int> &statusV){
|
||||
status=get(handleV, statusV); ca_flush_io(); //Yes let's flush here!
|
||||
return status;}
|
||||
int getV(std::vector<unsigned int> handleV, std::vector<int> &statusV)
|
||||
{
|
||||
status=get(handleV, statusV);
|
||||
ca_flush_io(); //Yes let's flush here!
|
||||
return status;
|
||||
}
|
||||
|
||||
int get(std::vector<std::string> pvV, std::vector<int> &statusV)
|
||||
{
|
||||
std::vector<unsigned int> hV;
|
||||
hV.reserve(pvV.size());
|
||||
hV=handleHelper.getHandlesFromPVs(pvV);
|
||||
return get(hV, statusV);
|
||||
|
||||
int get(vector<string> pvV, vector<int> &statusV) {
|
||||
vector<unsigned int> hV;
|
||||
hV.reserve(pvV.size());
|
||||
hV=handleHelper.getHandlesFromPVs(pvV);
|
||||
return get(hV, statusV);
|
||||
|
||||
}
|
||||
|
||||
|
||||
int getScalars(vector<unsigned int> handleV, vector<string> & V, vector<int> &statusV){ //0
|
||||
CAFE::get(handleV, statusV);
|
||||
CAFE::waitForBundledEvents(handleV, statusV);
|
||||
return CAFE::getCache(handleV, V, statusV);
|
||||
int getScalars(std::vector<unsigned int> handleV, std::vector<std::string> & V, std::vector<int> &statusV) //0
|
||||
{
|
||||
CAFE::get(handleV, statusV);
|
||||
CAFE::waitForBundledEvents(handleV, statusV);
|
||||
return CAFE::getCache(handleV, V, statusV);
|
||||
}
|
||||
int getScalars(vector<unsigned int> handleV, vector<dbr_short_t> & V, vector<int> &statusV){ //1
|
||||
CAFE::get(handleV, statusV);
|
||||
CAFE::waitForBundledEvents(handleV, statusV);
|
||||
return CAFE::getCache(handleV, V, statusV);
|
||||
int getScalars(std::vector<unsigned int> handleV, std::vector<dbr_short_t> & V, std::vector<int> &statusV) //1
|
||||
{
|
||||
CAFE::get(handleV, statusV);
|
||||
CAFE::waitForBundledEvents(handleV, statusV);
|
||||
return CAFE::getCache(handleV, V, statusV);
|
||||
}
|
||||
int getScalars(vector<unsigned int> handleV, vector<dbr_float_t> & V, vector<int> &statusV){ //2
|
||||
CAFE::get(handleV, statusV);
|
||||
CAFE::waitForBundledEvents(handleV, statusV);
|
||||
return CAFE::getCache(handleV, V, statusV);
|
||||
int getScalars(std::vector<unsigned int> handleV, std::vector<dbr_float_t> & V, std::vector<int> &statusV) //2
|
||||
{
|
||||
CAFE::get(handleV, statusV);
|
||||
CAFE::waitForBundledEvents(handleV, statusV);
|
||||
return CAFE::getCache(handleV, V, statusV);
|
||||
}
|
||||
int getScalars(vector<unsigned int> handleV, vector<dbr_enum_t> & V, vector<int> &statusV){ //3
|
||||
CAFE::get(handleV, statusV);
|
||||
CAFE::waitForBundledEvents(handleV, statusV);
|
||||
return CAFE::getCache(handleV, V, statusV);
|
||||
int getScalars(std::vector<unsigned int> handleV, std::vector<dbr_enum_t> & V, std::vector<int> &statusV) //3
|
||||
{
|
||||
CAFE::get(handleV, statusV);
|
||||
CAFE::waitForBundledEvents(handleV, statusV);
|
||||
return CAFE::getCache(handleV, V, statusV);
|
||||
}
|
||||
int getScalars(vector<unsigned int> handleV, vector<dbr_char_t> & V, vector<int> &statusV){ //4
|
||||
CAFE::get(handleV, statusV);
|
||||
CAFE::waitForBundledEvents(handleV, statusV);
|
||||
return CAFE::getCache(handleV, V, statusV);
|
||||
int getScalars(std::vector<unsigned int> handleV, std::vector<dbr_char_t> & V, std::vector<int> &statusV) //4
|
||||
{
|
||||
CAFE::get(handleV, statusV);
|
||||
CAFE::waitForBundledEvents(handleV, statusV);
|
||||
return CAFE::getCache(handleV, V, statusV);
|
||||
}
|
||||
int getScalars(vector<unsigned int> handleV, vector<dbr_long_t> & V, vector<int> &statusV){ //5
|
||||
CAFE::get(handleV, statusV);
|
||||
CAFE::waitForBundledEvents(handleV, statusV);
|
||||
return CAFE::getCache(handleV, V, statusV);
|
||||
int getScalars(std::vector<unsigned int> handleV, std::vector<dbr_long_t> & V, std::vector<int> &statusV) //5
|
||||
{
|
||||
CAFE::get(handleV, statusV);
|
||||
CAFE::waitForBundledEvents(handleV, statusV);
|
||||
return CAFE::getCache(handleV, V, statusV);
|
||||
}
|
||||
int getScalars(vector<unsigned int> handleV, vector<long long> & V, vector<int> &statusV) { //5
|
||||
CAFE::get(handleV, statusV);
|
||||
CAFE::waitForBundledEvents(handleV, statusV);
|
||||
return CAFE::getCache(handleV, V, statusV);
|
||||
int getScalars(std::vector<unsigned int> handleV, std::vector<long long> & V, std::vector<int> &statusV) //5
|
||||
{
|
||||
CAFE::get(handleV, statusV);
|
||||
CAFE::waitForBundledEvents(handleV, statusV);
|
||||
return CAFE::getCache(handleV, V, statusV);
|
||||
}
|
||||
int getScalars(vector<unsigned int> handleV, vector<dbr_double_t> & V, vector<int> &statusV) { //6
|
||||
CAFE::get(handleV, statusV);
|
||||
//for (size_t i=0; i< handleV.size(); ++i) { cout << "/Asyn/h=" << handleV[i] << "s=" << statusV[i] << " [" << i << "] " << endl;}
|
||||
CAFE::waitForBundledEvents(handleV, statusV);
|
||||
//for (size_t i=0; i< handleV.size(); ++i) { cout << "/Wait/h=" << handleV[i] << "s=" << statusV[i] << " [" << i << "] " << endl;}
|
||||
status=CAFE::getCache(handleV, V, statusV);
|
||||
//for (size_t i=0; i< handleV.size(); ++i) { cout << "/Cach/h=" << handleV[i] << "s=" << statusV[i] << " [" << i << "] " << endl;}
|
||||
return status;
|
||||
int getScalars(std::vector<unsigned int> handleV, std::vector<dbr_double_t> & V, std::vector<int> &statusV) //6
|
||||
{
|
||||
CAFE::get(handleV, statusV);
|
||||
//for (size_t i=0; i< handleV.size(); ++i) { cout << "/Asyn/h=" << handleV[i] << "s=" << statusV[i] << " [" << i << "] " << endl;}
|
||||
CAFE::waitForBundledEvents(handleV, statusV);
|
||||
//for (size_t i=0; i< handleV.size(); ++i) { cout << "/Wait/h=" << handleV[i] << "s=" << statusV[i] << " [" << i << "] " << endl;}
|
||||
status=CAFE::getCache(handleV, V, statusV);
|
||||
//for (size_t i=0; i< handleV.size(); ++i) { cout << "/Cach/h=" << handleV[i] << "s=" << statusV[i] << " [" << i << "] " << endl;}
|
||||
return status;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
int getCacheVStr(vector<unsigned int> handleV, vector<string> & V, vector<int> &statusV){
|
||||
return getCache(handleV, V, statusV);}
|
||||
int getCacheVLong(vector<unsigned int> handleV, vector<dbr_long_t> & V, vector<int> &statusV){
|
||||
return getCache(handleV, V, statusV);}
|
||||
int getCacheVDouble(vector<unsigned int> handleV, vector<dbr_double_t> & V, vector<int> &statusV){
|
||||
return getCache(handleV, V, statusV);}
|
||||
|
||||
int getCacheVStr(std::vector<unsigned int> handleV, std::vector<std::string> & V, std::vector<int> &statusV)
|
||||
{
|
||||
return getCache(handleV, V, statusV);
|
||||
}
|
||||
int getCacheVLong(std::vector<unsigned int> handleV, std::vector<dbr_long_t> & V, std::vector<int> &statusV)
|
||||
{
|
||||
return getCache(handleV, V, statusV);
|
||||
}
|
||||
int getCacheVDouble(std::vector<unsigned int> handleV, std::vector<dbr_double_t> & V, std::vector<int> &statusV)
|
||||
{
|
||||
return getCache(handleV, V, statusV);
|
||||
}
|
||||
|
||||
|
||||
int getCache(vector<unsigned int> handleV, vector<string> & V, vector<int> &statusV); //0
|
||||
int getCache(vector<unsigned int> handleV, vector<dbr_short_t> & V, vector<int> &statusV); //1
|
||||
int getCache(vector<unsigned int> handleV, vector<dbr_float_t> & V, vector<int> &statusV); //2
|
||||
int getCache(vector<unsigned int> handleV, vector<dbr_enum_t> & V, vector<int> &statusV); //3
|
||||
int getCache(vector<unsigned int> handleV, vector<dbr_char_t> & V, vector<int> &statusV); //4
|
||||
int getCache(vector<unsigned int> handleV, vector<dbr_long_t> & V, vector<int> &statusV); //5
|
||||
int getCache(vector<unsigned int> handleV, vector<long long> & V, vector<int> &statusV); //5
|
||||
int getCache(vector<unsigned int> handleV, vector<dbr_double_t> & V, vector<int> &statusV); //6
|
||||
int getCache(std::vector<unsigned int> handleV, std::vector<std::string> & V, std::vector<int> &statusV); //0
|
||||
int getCache(std::vector<unsigned int> handleV, std::vector<dbr_short_t> & V, std::vector<int> &statusV); //1
|
||||
int getCache(std::vector<unsigned int> handleV, std::vector<dbr_float_t> & V, std::vector<int> &statusV); //2
|
||||
int getCache(std::vector<unsigned int> handleV, std::vector<dbr_enum_t> & V, std::vector<int> &statusV); //3
|
||||
int getCache(std::vector<unsigned int> handleV, std::vector<dbr_char_t> & V, std::vector<int> &statusV); //4
|
||||
int getCache(std::vector<unsigned int> handleV, std::vector<dbr_long_t> & V, std::vector<int> &statusV); //5
|
||||
int getCache(std::vector<unsigned int> handleV, std::vector<long long> & V, std::vector<int> &statusV); //5
|
||||
int getCache(std::vector<unsigned int> handleV, std::vector<dbr_double_t> & V, std::vector<int> &statusV); //6
|
||||
|
||||
int getCache(vector<unsigned int> handleV, vector<string> & V, vector<int> &statusV,
|
||||
vector<dbr_short_t> &alarmStatusV, vector<dbr_short_t> &alarmSeverityV); //0
|
||||
int getCache(vector<unsigned int> handleV, vector<dbr_short_t> & V, vector<int> &statusV,
|
||||
vector<dbr_short_t> &alarmStatusV, vector<dbr_short_t> &alarmSeverityV); //1
|
||||
int getCache(vector<unsigned int> handleV, vector<dbr_float_t> & V, vector<int> &statusV,
|
||||
vector<dbr_short_t> &alarmStatusV, vector<dbr_short_t> &alarmSeverityV); //2
|
||||
int getCache(vector<unsigned int> handleV, vector<dbr_enum_t> & V, vector<int> &statusV,
|
||||
vector<dbr_short_t> &alarmStatusV, vector<dbr_short_t> &alarmSeverityV); //3
|
||||
int getCache(vector<unsigned int> handleV, vector<dbr_char_t> & V, vector<int> &statusV,
|
||||
vector<dbr_short_t> &alarmStatusV, vector<dbr_short_t> &alarmSeverityV); //4
|
||||
int getCache(vector<unsigned int> handleV, vector<dbr_long_t> & V, vector<int> &statusV,
|
||||
vector<dbr_short_t> &alarmStatusV, vector<dbr_short_t> &alarmSeverityV); //5
|
||||
int getCache(vector<unsigned int> handleV, vector<long long> & V, vector<int> &statusV,
|
||||
vector<dbr_short_t> &alarmStatusV, vector<dbr_short_t> &alarmSeverityV); //5
|
||||
int getCache(vector<unsigned int> handleV, vector<dbr_double_t> & V, vector<int> &statusV,
|
||||
vector<dbr_short_t> &alarmStatusV, vector<dbr_short_t> &alarmSeverityV); //6
|
||||
int getCache(std::vector<unsigned int> handleV, std::vector<std::string> & V, std::vector<int> &statusV,
|
||||
std::vector<dbr_short_t> &alarmStatusV, std::vector<dbr_short_t> &alarmSeverityV); //0
|
||||
int getCache(std::vector<unsigned int> handleV, std::vector<dbr_short_t> & V, std::vector<int> &statusV,
|
||||
std::vector<dbr_short_t> &alarmStatusV, std::vector<dbr_short_t> &alarmSeverityV); //1
|
||||
int getCache(std::vector<unsigned int> handleV, std::vector<dbr_float_t> & V, std::vector<int> &statusV,
|
||||
std::vector<dbr_short_t> &alarmStatusV, std::vector<dbr_short_t> &alarmSeverityV); //2
|
||||
int getCache(std::vector<unsigned int> handleV, std::vector<dbr_enum_t> & V, std::vector<int> &statusV,
|
||||
std::vector<dbr_short_t> &alarmStatusV, std::vector<dbr_short_t> &alarmSeverityV); //3
|
||||
int getCache(std::vector<unsigned int> handleV, std::vector<dbr_char_t> & V, std::vector<int> &statusV,
|
||||
std::vector<dbr_short_t> &alarmStatusV, std::vector<dbr_short_t> &alarmSeverityV); //4
|
||||
int getCache(std::vector<unsigned int> handleV, std::vector<dbr_long_t> & V, std::vector<int> &statusV,
|
||||
std::vector<dbr_short_t> &alarmStatusV, std::vector<dbr_short_t> &alarmSeverityV); //5
|
||||
int getCache(std::vector<unsigned int> handleV, std::vector<long long> & V, std::vector<int> &statusV,
|
||||
std::vector<dbr_short_t> &alarmStatusV, std::vector<dbr_short_t> &alarmSeverityV); //5
|
||||
int getCache(std::vector<unsigned int> handleV, std::vector<dbr_double_t> & V, std::vector<int> &statusV,
|
||||
std::vector<dbr_short_t> &alarmStatusV, std::vector<dbr_short_t> &alarmSeverityV); //6
|
||||
|
||||
//0
|
||||
int getCache(vector<unsigned int> handleV, vector<string> & V, vector<int> &statusV,
|
||||
vector<dbr_short_t> &alarmStatusV, vector<dbr_short_t> &alarmSeverityV,
|
||||
vector<epicsTimeStamp> &tsV);
|
||||
int getCache(std::vector<unsigned int> handleV, std::vector<std::string> & V, std::vector<int> &statusV,
|
||||
std::vector<dbr_short_t> &alarmStatusV, std::vector<dbr_short_t> &alarmSeverityV,
|
||||
std::vector<epicsTimeStamp> &tsV);
|
||||
//1
|
||||
int getCache(vector<unsigned int> handleV, vector<dbr_short_t> & V, vector<int> &statusV,
|
||||
vector<dbr_short_t> &alarmStatusV, vector<dbr_short_t> &alarmSeverityV,
|
||||
vector<epicsTimeStamp> &tsV);
|
||||
int getCache(std::vector<unsigned int> handleV, std::vector<dbr_short_t> & V, std::vector<int> &statusV,
|
||||
std::vector<dbr_short_t> &alarmStatusV, std::vector<dbr_short_t> &alarmSeverityV,
|
||||
std::vector<epicsTimeStamp> &tsV);
|
||||
//2
|
||||
int getCache(vector<unsigned int> handleV, vector<dbr_float_t> & V, vector<int> &statusV,
|
||||
vector<dbr_short_t> &alarmStatusV, vector<dbr_short_t> &alarmSeverityV,
|
||||
vector<epicsTimeStamp> &tsV);
|
||||
int getCache(std::vector<unsigned int> handleV, std::vector<dbr_float_t> & V, std::vector<int> &statusV,
|
||||
std::vector<dbr_short_t> &alarmStatusV, std::vector<dbr_short_t> &alarmSeverityV,
|
||||
std::vector<epicsTimeStamp> &tsV);
|
||||
//3
|
||||
int getCache(vector<unsigned int> handleV, vector<dbr_enum_t> & V, vector<int> &statusV,
|
||||
vector<dbr_short_t> &alarmStatusV, vector<dbr_short_t> &alarmSeverityV,
|
||||
vector<epicsTimeStamp> &tsV);
|
||||
int getCache(std::vector<unsigned int> handleV, std::vector<dbr_enum_t> & V, std::vector<int> &statusV,
|
||||
std::vector<dbr_short_t> &alarmStatusV, std::vector<dbr_short_t> &alarmSeverityV,
|
||||
std::vector<epicsTimeStamp> &tsV);
|
||||
//4
|
||||
int getCache(vector<unsigned int> handleV, vector<dbr_char_t> & V, vector<int> &statusV,
|
||||
vector<dbr_short_t> &alarmStatusV, vector<dbr_short_t> &alarmSeverityV,
|
||||
vector<epicsTimeStamp> &tsV);
|
||||
int getCache(std::vector<unsigned int> handleV, std::vector<dbr_char_t> & V, std::vector<int> &statusV,
|
||||
std::vector<dbr_short_t> &alarmStatusV, std::vector<dbr_short_t> &alarmSeverityV,
|
||||
std::vector<epicsTimeStamp> &tsV);
|
||||
//5
|
||||
int getCache(vector<unsigned int> handleV, vector<dbr_long_t> & V, vector<int> &statusV,
|
||||
vector<dbr_short_t> &alarmStatusV, vector<dbr_short_t> &alarmSeverityV,
|
||||
vector<epicsTimeStamp> &tsV);
|
||||
int getCache(vector<unsigned int> handleV, vector<long long> & V, vector<int> &statusV,
|
||||
vector<dbr_short_t> &alarmStatusV, vector<dbr_short_t> &alarmSeverityV,
|
||||
vector<epicsTimeStamp> &tsV);
|
||||
int getCache(std::vector<unsigned int> handleV, std::vector<dbr_long_t> & V, std::vector<int> &statusV,
|
||||
std::vector<dbr_short_t> &alarmStatusV, std::vector<dbr_short_t> &alarmSeverityV,
|
||||
std::vector<epicsTimeStamp> &tsV);
|
||||
int getCache(std::vector<unsigned int> handleV, std::vector<long long> & V, std::vector<int> &statusV,
|
||||
std::vector<dbr_short_t> &alarmStatusV, std::vector<dbr_short_t> &alarmSeverityV,
|
||||
std::vector<epicsTimeStamp> &tsV);
|
||||
//6
|
||||
int getCache(vector<unsigned int> handleV, vector<dbr_double_t> & V, vector<int> &statusV,
|
||||
vector<dbr_short_t> &alarmStatusV, vector<dbr_short_t> &alarmSeverityV,
|
||||
vector<epicsTimeStamp> &tsV);
|
||||
int getCache(std::vector<unsigned int> handleV, std::vector<dbr_double_t> & V, std::vector<int> &statusV,
|
||||
std::vector<dbr_short_t> &alarmStatusV, std::vector<dbr_short_t> &alarmSeverityV,
|
||||
std::vector<epicsTimeStamp> &tsV);
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
int set(const unsigned int handle, vector<string> V); //0
|
||||
int set(const unsigned int handle, vector<dbr_short_t> V); //1
|
||||
int set(const unsigned int handle, vector<dbr_float_t> V); //2
|
||||
int set(const unsigned int handle, vector<dbr_enum_t> V);//3
|
||||
int set(const unsigned int handle, vector<dbr_char_t> V);//4
|
||||
int set(const unsigned int handle, vector<dbr_long_t> V); //5
|
||||
int set(const unsigned int handle, vector<long long> V); //5+
|
||||
int set(const unsigned int handle, vector<dbr_double_t> V); //6
|
||||
int set(const unsigned int _handle, std::vector<std::string> V); //0
|
||||
int set(const unsigned int _handle, std::vector<dbr_short_t> V); //1
|
||||
int set(const unsigned int _handle, std::vector<dbr_float_t> V); //2
|
||||
int set(const unsigned int _handle, std::vector<dbr_enum_t> V);//3
|
||||
int set(const unsigned int _handle, std::vector<dbr_char_t> V);//4
|
||||
int set(const unsigned int _handle, std::vector<dbr_long_t> V); //5
|
||||
int set(const unsigned int _handle, std::vector<long long> V); //5+
|
||||
int set(const unsigned int _handle, std::vector<dbr_double_t> V); //6
|
||||
|
||||
int set(vector<unsigned int> handleV, vector<string> V, vector<int> &statusV); //0
|
||||
int set(vector<unsigned int> handleV, vector<dbr_short_t> V, vector<int> &statusV); //1
|
||||
int set(vector<unsigned int> handleV, vector<dbr_float_t> V, vector<int> &statusV); //2
|
||||
int set(vector<unsigned int> handleV, vector<dbr_enum_t> V, vector<int> &statusV); //3
|
||||
int set(vector<unsigned int> handleV, vector<dbr_char_t> V, vector<int> &statusV); //4
|
||||
int set(vector<unsigned int> handleV, vector<dbr_long_t> V, vector<int> &statusV); //5
|
||||
int set(vector<unsigned int> handleV, vector<long long> V, vector<int> &statusV); //5+
|
||||
int set(vector<unsigned int> handleV, vector<dbr_double_t> V, vector<int> &statusV); //6
|
||||
int set(std::vector<unsigned int> _handleV, std::vector<std::string> V, std::vector<int> &statusV); //0
|
||||
int set(std::vector<unsigned int> _handleV, std::vector<dbr_short_t> V, std::vector<int> &statusV); //1
|
||||
int set(std::vector<unsigned int> _handleV, std::vector<dbr_float_t> V, std::vector<int> &statusV); //2
|
||||
int set(std::vector<unsigned int> _handleV, std::vector<dbr_enum_t> V, std::vector<int> &statusV); //3
|
||||
int set(std::vector<unsigned int> _handleV, std::vector<dbr_char_t> V, std::vector<int> &statusV); //4
|
||||
int set(std::vector<unsigned int> _handleV, std::vector<dbr_long_t> V, std::vector<int> &statusV); //5
|
||||
int set(std::vector<unsigned int> _handleV, std::vector<long long> V, std::vector<int> &statusV); //5+
|
||||
int set(std::vector<unsigned int> _handleV, std::vector<dbr_double_t> V, std::vector<int> &statusV); //6
|
||||
|
||||
|
||||
|
||||
int get (vector<unsigned int> handleV, PVDataHolder * pvd){
|
||||
|
||||
return get(&handleV[0], (unsigned int) handleV.size(), pvd);
|
||||
|
||||
int get (std::vector<unsigned int> handleV, PVDataHolder * pvd)
|
||||
{
|
||||
|
||||
return get(&handleV[0], (unsigned int) handleV.size(), pvd);
|
||||
|
||||
};
|
||||
|
||||
|
||||
int getCache (vector<unsigned int> handleV, PVDataHolder * pvd){
|
||||
|
||||
return getCache(&handleV[0], (unsigned int) handleV.size(), pvd);
|
||||
int getCache (std::vector<unsigned int> handleV, PVDataHolder * pvd)
|
||||
{
|
||||
|
||||
return getCache(&handleV[0], (unsigned int) handleV.size(), pvd);
|
||||
};
|
||||
|
||||
|
||||
int getPVArray (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=get(handleArray, (unsigned int) handleV.size(), pvd);
|
||||
//delete [] handleArray; return status;
|
||||
return get(&handleV[0], (unsigned int) handleV.size(), pvd);
|
||||
int getPVArray (std::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=get(handleArray, (unsigned int) handleV.size(), pvd);
|
||||
//delete [] handleArray; return status;
|
||||
return get(&handleV[0], (unsigned int) handleV.size(), pvd);
|
||||
};
|
||||
|
||||
/*
|
||||
int getPVArrayCache (vector<unsigned int> handleV, PVDataHolder * pvd){
|
||||
int getPVArrayCache (std::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);
|
||||
@@ -279,27 +313,56 @@ int getPVArrayCache (vector<unsigned int> handleV, PVDataHolder * pvd){
|
||||
*/
|
||||
|
||||
|
||||
//setPVArray is in cafeVectors.h and .cc
|
||||
//setPVArray is in cafeStd::Vectors.h and .cc
|
||||
//For Cython
|
||||
int setPVArray(vector<unsigned int> handleV, PVDataHolder * pvd);
|
||||
int setPVArray(std::vector<unsigned int> handleV, PVDataHolder * pvd);
|
||||
|
||||
int setVVString(vector<unsigned int> handleV, vector<string> V, vector<int> &statusV) {
|
||||
return set(handleV, V, statusV);};
|
||||
int setVVChar(vector<unsigned int> handleV, vector<dbr_char_t> V, vector<int> &statusV){
|
||||
return set(handleV, V, statusV);};
|
||||
int setVVLong(vector<unsigned int> handleV, vector<dbr_long_t> V, vector<int> &statusV){
|
||||
return set(handleV, V, statusV);};
|
||||
int setVVDouble(vector<unsigned int> handleV, vector<dbr_double_t> V, vector<int> &statusV){
|
||||
return set(handleV, V, statusV);};
|
||||
int setVVString(std::vector<unsigned int> handleV, std::vector<std::string> V, std::vector<int> &statusV)
|
||||
{
|
||||
return set(handleV, V, statusV);
|
||||
};
|
||||
int setVVChar(std::vector<unsigned int> handleV, std::vector<dbr_char_t> V, std::vector<int> &statusV)
|
||||
{
|
||||
return set(handleV, V, statusV);
|
||||
};
|
||||
int setVVLong(std::vector<unsigned int> handleV, std::vector<dbr_long_t> V, std::vector<int> &statusV)
|
||||
{
|
||||
return set(handleV, V, statusV);
|
||||
};
|
||||
int setVVDouble(std::vector<unsigned int> handleV, std::vector<dbr_double_t> V, std::vector<int> &statusV)
|
||||
{
|
||||
return set(handleV, V, statusV);
|
||||
};
|
||||
|
||||
int setVString(const unsigned int handle, vector<string> V) {return set(handle, V);};
|
||||
int setVString(const unsigned int handle, std::vector<std::string> V)
|
||||
{
|
||||
return set(handle, V);
|
||||
};
|
||||
|
||||
int setVChar (const unsigned int handle, vector<dbr_char_t> V) {return set(handle, V);};
|
||||
int setVLong (const unsigned int handle, vector<dbr_long_t> V) {return set(handle, V);};
|
||||
int setVShort (const unsigned int handle, vector<dbr_short_t> V) {return set(handle, V);};
|
||||
int setVUShort(const unsigned int handle, vector<dbr_enum_t> V) {return set(handle, V);};
|
||||
int setVFloat (const unsigned int handle, vector<dbr_float_t> V) {return set(handle, V);};
|
||||
int setVDouble(const unsigned int handle, vector<dbr_double_t> V) {return set(handle, V);};
|
||||
int setVChar (const unsigned int handle, std::vector<dbr_char_t> V)
|
||||
{
|
||||
return set(handle, V);
|
||||
};
|
||||
int setVLong (const unsigned int handle, std::vector<dbr_long_t> V)
|
||||
{
|
||||
return set(handle, V);
|
||||
};
|
||||
int setVShort (const unsigned int handle, std::vector<dbr_short_t> V)
|
||||
{
|
||||
return set(handle, V);
|
||||
};
|
||||
int setVUShort(const unsigned int handle, std::vector<dbr_enum_t> V)
|
||||
{
|
||||
return set(handle, V);
|
||||
};
|
||||
int setVFloat (const unsigned int handle, std::vector<dbr_float_t> V)
|
||||
{
|
||||
return set(handle, V);
|
||||
};
|
||||
int setVDouble(const unsigned int handle, std::vector<dbr_double_t> V)
|
||||
{
|
||||
return set(handle, V);
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -10,15 +10,15 @@
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#if HAVE_LIBQTXML
|
||||
#if HAVE_LIBQTXML //- needed for externsions
|
||||
int loadCollectionsFromXML(const char * collectionsFile);
|
||||
int loadGroupsFromXML (const char * groupsFile);
|
||||
int restoreFromXML(const char * snapshotFile);
|
||||
#endif
|
||||
|
||||
int snapshot2XML (PVGroup pg);
|
||||
void openGroupXMLFile(string fileName);
|
||||
void closeGroupXMLFile(string fileName);
|
||||
int group2XML (const char * grpName, string fileName);
|
||||
void openGroupXMLFile(std::string fileName);
|
||||
void closeGroupXMLFile(std::string fileName);
|
||||
int group2XML (const char * grpName, std::string fileName);
|
||||
|
||||
#endif // CAFEXML_H
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
#ifndef CAOPCODES_H
|
||||
#define CAOPCODES_H
|
||||
|
||||
|
||||
#include <cadef.h>
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
@@ -17,50 +17,59 @@
|
||||
* Provides methods to convert between
|
||||
* the CA_OP_xx and text equivalent
|
||||
*/
|
||||
class CAOPCodes {
|
||||
typedef std::map<int, std::string> mapIntString;
|
||||
private:
|
||||
mapIntString mapDataType;
|
||||
mapIntString::iterator pos;
|
||||
class CAOPCodes
|
||||
{
|
||||
typedef std::map<int, std::string> mapIntString;
|
||||
private:
|
||||
mapIntString mapDataType;
|
||||
mapIntString::iterator pos;
|
||||
public:
|
||||
CAOPCodes() {
|
||||
mapDataType.insert(std::make_pair((int) CA_OP_GET, "CA_OP_GET" ));
|
||||
mapDataType.insert(std::make_pair((int) CA_OP_PUT, "CA_OP_PUT" ));
|
||||
mapDataType.insert(std::make_pair((int) CA_OP_CREATE_CHANNEL, "CA_OP_CREATE_CHANNEL" ));
|
||||
mapDataType.insert(std::make_pair((int) CA_OP_ADD_EVENT, "CA_OP_ADD_EVENT" ));
|
||||
mapDataType.insert(std::make_pair((int) CA_OP_CLEAR_EVENT, "CA_OP_CLEAR_EVENT" ));
|
||||
mapDataType.insert(std::make_pair((int) CA_OP_OTHER, "CA_OP_OTHER" ));
|
||||
mapDataType.insert(std::make_pair((int) CA_OP_CONN_UP, "CA_OP_CONN_UP" ));
|
||||
mapDataType.insert(std::make_pair((int) CA_OP_CONN_DOWN, "CA_OP_CONN_DOWN" ));
|
||||
};
|
||||
CAOPCodes()
|
||||
{
|
||||
mapDataType.insert(std::make_pair((int) CA_OP_GET, "CA_OP_GET" ));
|
||||
mapDataType.insert(std::make_pair((int) CA_OP_PUT, "CA_OP_PUT" ));
|
||||
mapDataType.insert(std::make_pair((int) CA_OP_CREATE_CHANNEL, "CA_OP_CREATE_CHANNEL" ));
|
||||
mapDataType.insert(std::make_pair((int) CA_OP_ADD_EVENT, "CA_OP_ADD_EVENT" ));
|
||||
mapDataType.insert(std::make_pair((int) CA_OP_CLEAR_EVENT, "CA_OP_CLEAR_EVENT" ));
|
||||
mapDataType.insert(std::make_pair((int) CA_OP_OTHER, "CA_OP_OTHER" ));
|
||||
mapDataType.insert(std::make_pair((int) CA_OP_CONN_UP, "CA_OP_CONN_UP" ));
|
||||
mapDataType.insert(std::make_pair((int) CA_OP_CONN_DOWN, "CA_OP_CONN_DOWN" ));
|
||||
};
|
||||
|
||||
~CAOPCodes() {};
|
||||
|
||||
std::string message (int i) {
|
||||
|
||||
pos = mapDataType.find(i);
|
||||
if (pos != mapDataType.end()) return pos->second;
|
||||
return "CAFE_DATATYPE_UNKNOWN";
|
||||
};
|
||||
|
||||
int enumIs (std::string message) {
|
||||
for (pos=mapDataType.begin(); pos != mapDataType.end(); ++pos)
|
||||
if (pos->second==message) return pos->first;
|
||||
return -1;
|
||||
};
|
||||
~CAOPCodes() {};
|
||||
|
||||
void show() {print();}
|
||||
std::string message (int i)
|
||||
{
|
||||
|
||||
void print ( ) {
|
||||
std::cout << "------------------" << std::endl;
|
||||
std::cout << "CA_OP_LIST" << std::endl;
|
||||
std::cout << "-----------------" << std::endl;
|
||||
for (pos=mapDataType.begin(); pos != mapDataType.end(); ++pos) {
|
||||
std::cout << pos->first << " " << pos->second << std::endl;
|
||||
pos = mapDataType.find(i);
|
||||
if (pos != mapDataType.end()) return pos->second;
|
||||
return "CAFE_DATATYPE_UNKNOWN";
|
||||
};
|
||||
|
||||
int enumIs (std::string message)
|
||||
{
|
||||
for (pos=mapDataType.begin(); pos != mapDataType.end(); ++pos)
|
||||
if (pos->second==message) return pos->first;
|
||||
return -1;
|
||||
};
|
||||
|
||||
void show()
|
||||
{
|
||||
print();
|
||||
}
|
||||
std::cout << "-----------------" << std::endl;
|
||||
};
|
||||
|
||||
|
||||
void print ( )
|
||||
{
|
||||
std::cout << "------------------" << std::endl;
|
||||
std::cout << "CA_OP_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;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
///
|
||||
/// \file channelRegalia.h
|
||||
///
|
||||
/// Classes are:
|
||||
/// Classes are:
|
||||
/// ChannelRegalia
|
||||
/// ChannelRequestMetaData
|
||||
/// ChannelRequestMetaDataClient
|
||||
@@ -21,21 +21,28 @@
|
||||
#include <defines.h>
|
||||
#include <cafeEnum.h>
|
||||
|
||||
using namespace std;
|
||||
//required for channelDataStore
|
||||
#include <PVDataHolder.h>
|
||||
#include <PVCtrlHolder.h>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Struct defining channel properties and connection status for use in Conduit container
|
||||
*
|
||||
*/
|
||||
class ChannelRegalia{
|
||||
class ChannelRegalia
|
||||
{
|
||||
private:
|
||||
CAFEStatus cafeStatus;
|
||||
CAFEStatus cafeStatus;
|
||||
public:
|
||||
friend struct change_accessRightsHandlerArgs;
|
||||
friend struct change_accessRead;
|
||||
friend struct change_accessWrite;
|
||||
friend struct change_channelID;
|
||||
friend struct change_connectionHandlerArgs;
|
||||
friend struct change_connectionHandlerArgs;
|
||||
friend struct change_eventHandlerArgs;
|
||||
//friend struct change_channelRegalia;
|
||||
friend class Connect;
|
||||
@@ -56,64 +63,200 @@ protected:
|
||||
int cafeConnectionState; //as given by cafe_cs_state in statusCodes
|
||||
|
||||
//void setChannelID (chid id) {channelID=id;};
|
||||
void setConnectFlag (bool c) {connectFlag=c;};
|
||||
void setHostName (const char * h) {hostName=h;};
|
||||
void setDataType (chtype d) {dataType=d;};
|
||||
void setAccessRead (unsigned short r){accessRead=r;};
|
||||
void setAccessWrite(unsigned short w){accessWrite=w;};
|
||||
void setReadAccess (unsigned short r){accessRead=r;};
|
||||
void setWriteAccess(unsigned short w){accessWrite=w;};
|
||||
void setNelem (unsigned int n) {nelem=n;};
|
||||
void setConnectionState (int cs) {connectionState=cs;};
|
||||
void setCafeConnectionState (int ccs) {cafeConnectionState=ccs;};
|
||||
void setConnectFlag (bool c)
|
||||
{
|
||||
connectFlag=c;
|
||||
};
|
||||
void setHostName (const char * h)
|
||||
{
|
||||
hostName=h;
|
||||
};
|
||||
void setDataType (chtype d)
|
||||
{
|
||||
dataType=d;
|
||||
};
|
||||
void setAccessRead (unsigned short r)
|
||||
{
|
||||
accessRead=r;
|
||||
};
|
||||
void setAccessWrite(unsigned short w)
|
||||
{
|
||||
accessWrite=w;
|
||||
};
|
||||
void setReadAccess (unsigned short r)
|
||||
{
|
||||
accessRead=r;
|
||||
};
|
||||
void setWriteAccess(unsigned short w)
|
||||
{
|
||||
accessWrite=w;
|
||||
};
|
||||
void setNelem (unsigned int n)
|
||||
{
|
||||
nelem=n;
|
||||
};
|
||||
void setConnectionState (int cs)
|
||||
{
|
||||
connectionState=cs;
|
||||
};
|
||||
void setCafeConnectionState (int ccs)
|
||||
{
|
||||
cafeConnectionState=ccs;
|
||||
};
|
||||
|
||||
public:
|
||||
chid getChannelID() const {return channelID;};
|
||||
bool getConnectFlag()const {return connectFlag;};
|
||||
const char * getHostName() const {return hostName;};
|
||||
string getHostNameAsString() {string h= hostName; return h;};
|
||||
chtype getDataType() const {return dataType;};
|
||||
const char * getClassName() const {return className;};
|
||||
string getClassNameAsString() {string c=className; return c;};
|
||||
unsigned short getAccessRead() const {return accessRead;};
|
||||
unsigned short getAccessWrite()const {return accessWrite;};
|
||||
unsigned short getReadAccess() const {return accessRead;};
|
||||
unsigned short getWriteAccess()const {return accessWrite;};
|
||||
unsigned int getNelem() const {return nelem;};
|
||||
int getConnectionState() const {return connectionState;};
|
||||
int getCafeConnectionState() const {return cafeConnectionState;};
|
||||
string getConnectionStateAsString() {
|
||||
if(connectionState==CA_OP_CONN_UP){return "CA_OP_CONN_UP";}
|
||||
else if(connectionState==CA_OP_CONN_DOWN){return "CA_OP_CONN_DOWN"; }
|
||||
else {return "CA_OP_CONN is UNKNOWN: THIS SHOULD NEVER APPEAR!";}};
|
||||
chid getChannelID() const
|
||||
{
|
||||
return channelID;
|
||||
};
|
||||
bool getConnectFlag()const
|
||||
{
|
||||
return connectFlag;
|
||||
};
|
||||
const char * getHostName() const
|
||||
{
|
||||
return hostName;
|
||||
};
|
||||
std::string getHostNameAsString()
|
||||
{
|
||||
std::string h= hostName;
|
||||
return h;
|
||||
};
|
||||
chtype getDataType() const
|
||||
{
|
||||
return dataType;
|
||||
};
|
||||
const char * getClassName() const
|
||||
{
|
||||
return className;
|
||||
};
|
||||
std::string getClassNameAsString()
|
||||
{
|
||||
std::string c=className;
|
||||
return c;
|
||||
};
|
||||
unsigned short getAccessRead() const
|
||||
{
|
||||
return accessRead;
|
||||
};
|
||||
unsigned short getAccessWrite()const
|
||||
{
|
||||
return accessWrite;
|
||||
};
|
||||
unsigned short getReadAccess() const
|
||||
{
|
||||
return accessRead;
|
||||
};
|
||||
unsigned short getWriteAccess()const
|
||||
{
|
||||
return accessWrite;
|
||||
};
|
||||
unsigned int getNelem() const
|
||||
{
|
||||
return nelem;
|
||||
};
|
||||
int getConnectionState() const
|
||||
{
|
||||
return connectionState;
|
||||
};
|
||||
int getCafeConnectionState() const
|
||||
{
|
||||
return cafeConnectionState;
|
||||
};
|
||||
std::string getConnectionStateAsString()
|
||||
{
|
||||
if(connectionState==CA_OP_CONN_UP)
|
||||
{
|
||||
return "CA_OP_CONN_UP";
|
||||
}
|
||||
else if(connectionState==CA_OP_CONN_DOWN)
|
||||
{
|
||||
return "CA_OP_CONN_DOWN";
|
||||
}
|
||||
else
|
||||
{
|
||||
return "CA_OP_CONN is UNKNOWN: THIS SHOULD NEVER APPEAR!";
|
||||
}
|
||||
};
|
||||
|
||||
string getCafeConnectionStateAsString() {
|
||||
return cafeStatus.csc.message(cafeConnectionState);};
|
||||
std::string getCafeConnectionStateAsString()
|
||||
{
|
||||
return cafeStatus.csc.message(cafeConnectionState);
|
||||
};
|
||||
|
||||
ChannelRegalia():channelID((chid) NULL), connectFlag(false), nelem((unsigned int) 1),
|
||||
dataType((chtype) CAFE_TYPENOTCONN),
|
||||
accessRead((unsigned short) 0), accessWrite((unsigned short) 0),
|
||||
connectionState((int) CA_OP_CONN_DOWN), cafeConnectionState((int) ICAFE_CS_NEVER_CONN)
|
||||
{strcpy(className, ""); hostName="";};
|
||||
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)
|
||||
{
|
||||
strcpy(className, "");
|
||||
hostName="";
|
||||
};
|
||||
|
||||
~ChannelRegalia(){};
|
||||
~ChannelRegalia() {};
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Struct defining channel properties and connection status for use in displays
|
||||
*
|
||||
*/
|
||||
class ChannelDataStore
|
||||
{
|
||||
public:
|
||||
|
||||
std::string description;
|
||||
ChannelRegalia info;
|
||||
PVDataHolder pvd;
|
||||
PVCtrlHolder pvc;
|
||||
|
||||
ChannelDataStore()
|
||||
{
|
||||
|
||||
|
||||
};
|
||||
|
||||
~ChannelDataStore() {};
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Stores strings for Enum datatypes
|
||||
*
|
||||
*/
|
||||
class ChannelEnumStrings{
|
||||
class ChannelEnumStrings
|
||||
{
|
||||
public:
|
||||
friend struct change_eventHandlerArgs;
|
||||
private:
|
||||
char options [MAX_ENUM_STATES][MAX_ENUM_STRING_SIZE];
|
||||
short noOptions;
|
||||
public:
|
||||
ChannelEnumStrings():noOptions( (short) 0){};
|
||||
short getNoOptions() const {return noOptions;};
|
||||
char getOptions() const {return options[MAX_ENUM_STATES][MAX_ENUM_STRING_SIZE];};
|
||||
ChannelEnumStrings():noOptions( (short) 0) {};
|
||||
short getNoOptions() const
|
||||
{
|
||||
return noOptions;
|
||||
};
|
||||
std::vector<std::string> getOptions() const
|
||||
{
|
||||
std::vector<std::string> optionsV;
|
||||
optionsV.reserve(noOptions);
|
||||
for ( short i=0; i<noOptions; ++i)
|
||||
{
|
||||
optionsV.push_back(options[i]);
|
||||
}
|
||||
return optionsV;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -121,40 +264,70 @@ public:
|
||||
* Stores device/attribute pairing
|
||||
*
|
||||
*/
|
||||
class ChannelDeviceAttribute{
|
||||
class ChannelDeviceAttribute
|
||||
{
|
||||
private:
|
||||
std::string pv;
|
||||
std::string device;
|
||||
std::string attribute;
|
||||
std::string deliminator;
|
||||
public:
|
||||
ChannelDeviceAttribute(){};
|
||||
~ChannelDeviceAttribute(){};
|
||||
ChannelDeviceAttribute() {};
|
||||
~ChannelDeviceAttribute() {};
|
||||
|
||||
int init(std::string _pv, std::string _deliminator)
|
||||
{
|
||||
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
|
||||
std::size_t found = attribute.find(".");
|
||||
if (found != std::string::npos)
|
||||
{
|
||||
attribute=attribute.substr(0, found);
|
||||
}
|
||||
}
|
||||
return ICAFE_NORMAL;
|
||||
};
|
||||
|
||||
const char * getDeliminator() const {return deliminator.c_str();};
|
||||
const char * getDevice() const {return device.c_str();};
|
||||
const char * getAttribute() const {return attribute.c_str();};
|
||||
const char * getAttrib() const {return attribute.c_str();};
|
||||
std::string getDeliminatorAsString() const {return deliminator;};
|
||||
std::string getDeviceAsString() const {return device;};
|
||||
std::string getAttributeAsString() const {return attribute;};
|
||||
const char * getDeliminator() const
|
||||
{
|
||||
return deliminator.c_str();
|
||||
};
|
||||
const char * getDevice() const
|
||||
{
|
||||
return device.c_str();
|
||||
};
|
||||
const char * getAttribute() const
|
||||
{
|
||||
return attribute.c_str();
|
||||
};
|
||||
const char * getAttrib() const
|
||||
{
|
||||
return attribute.c_str();
|
||||
};
|
||||
std::string getDeliminatorAsString() const
|
||||
{
|
||||
return deliminator;
|
||||
};
|
||||
std::string getDeviceAsString() const
|
||||
{
|
||||
return device;
|
||||
};
|
||||
std::string getAttributeAsString() const
|
||||
{
|
||||
return attribute;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -162,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;
|
||||
@@ -175,7 +349,7 @@ public:
|
||||
|
||||
friend class Conduit;
|
||||
friend class ConduitGroup;
|
||||
|
||||
|
||||
protected:
|
||||
chid channelID; //of requested item
|
||||
unsigned int nelem; //depends on Policy
|
||||
@@ -188,59 +362,108 @@ protected:
|
||||
unsigned int offset;
|
||||
|
||||
public:
|
||||
void setNelem(unsigned int n){nelem= n > 0 ? n : 1;
|
||||
//nelemCache= nelem > nelemCache ? nelemCache : nelem;
|
||||
}; // byteSize=dbr_size_n(dbrDataType,nelem); };
|
||||
void setNelemCache(unsigned int n){nelemCache= n > 0 ? n : 1;}
|
||||
void setUsrArg(void * u){usrArg=u;};
|
||||
void setDataType(chtype d){dataType=d;};
|
||||
void setDbrDataType(chtype dbr){dbrDataType=dbr; }; //byteSize=dbr_size_n(dbrDataType,nelem);};
|
||||
void setCafeDbrType(CAFENUM::DBR_TYPE cd){cafeDbrType=cd;};
|
||||
void setDbrTypesFromCafeDbrType(CAFENUM::DBR_TYPE cd){
|
||||
void setNelem(unsigned int n)
|
||||
{
|
||||
nelem= n > 0 ? n : 1;
|
||||
//nelemCache= nelem > nelemCache ? nelemCache : nelem;
|
||||
}; // byteSize=dbr_size_n(dbrDataType,nelem); };
|
||||
void setNelemCache(unsigned int n)
|
||||
{
|
||||
nelemCache= n > 0 ? n : 1;
|
||||
}
|
||||
void setUsrArg(void * u)
|
||||
{
|
||||
usrArg=u;
|
||||
};
|
||||
void setDataType(chtype d)
|
||||
{
|
||||
dataType=d;
|
||||
};
|
||||
void setDbrDataType(chtype dbr)
|
||||
{
|
||||
dbrDataType=dbr;
|
||||
}; //byteSize=dbr_size_n(dbrDataType,nelem);};
|
||||
void setCafeDbrType(CAFENUM::DBR_TYPE cd)
|
||||
{
|
||||
cafeDbrType=cd;
|
||||
};
|
||||
void setDbrTypesFromCafeDbrType(CAFENUM::DBR_TYPE cd)
|
||||
{
|
||||
cafeDbrType=cd;
|
||||
switch(cafeDbrType)
|
||||
{
|
||||
case CAFENUM::DBR_TIME:
|
||||
dbrDataType = dbf_type_to_DBR_TIME(dataType);
|
||||
break;
|
||||
case CAFENUM::DBR_STS:
|
||||
dbrDataType = dbf_type_to_DBR_STS(dataType);
|
||||
break;
|
||||
case CAFENUM::DBR_PRIMITIVE:
|
||||
dbrDataType = dbf_type_to_DBR(dataType);
|
||||
break;
|
||||
default:
|
||||
//Print Warning Message?
|
||||
dbrDataType = dbf_type_to_DBR_TIME(dataType);
|
||||
cafeDbrType = CAFENUM::DBR_TIME;
|
||||
break;
|
||||
case CAFENUM::DBR_TIME:
|
||||
dbrDataType = dbf_type_to_DBR_TIME(dataType);
|
||||
break;
|
||||
case CAFENUM::DBR_STS:
|
||||
dbrDataType = dbf_type_to_DBR_STS(dataType);
|
||||
break;
|
||||
case CAFENUM::DBR_PRIMITIVE:
|
||||
dbrDataType = dbf_type_to_DBR(dataType);
|
||||
break;
|
||||
default:
|
||||
//Print Warning Message?
|
||||
dbrDataType = dbf_type_to_DBR_TIME(dataType);
|
||||
cafeDbrType = CAFENUM::DBR_TIME;
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
void setByteSize(unsigned int b){ byteSize=b;};
|
||||
void setByteSize(unsigned int b)
|
||||
{
|
||||
byteSize=b;
|
||||
};
|
||||
|
||||
unsigned int getNelem() const{return nelem;};
|
||||
unsigned int getNelemCache() const{return nelemCache;};
|
||||
void * getUsrArg() const{return usrArg;};
|
||||
chtype getDataType() const { return dataType;};
|
||||
chtype getDbrDataType() const { return dbrDataType;};
|
||||
CAFENUM::DBR_TYPE getCafeDbrType() const {return cafeDbrType;};
|
||||
unsigned int getNelem() const
|
||||
{
|
||||
return nelem;
|
||||
};
|
||||
unsigned int getNelemCache() const
|
||||
{
|
||||
return nelemCache;
|
||||
};
|
||||
void * getUsrArg() const
|
||||
{
|
||||
return usrArg;
|
||||
};
|
||||
chtype getDataType() const
|
||||
{
|
||||
return dataType;
|
||||
};
|
||||
chtype getDbrDataType() const
|
||||
{
|
||||
return dbrDataType;
|
||||
};
|
||||
CAFENUM::DBR_TYPE getCafeDbrType() const
|
||||
{
|
||||
return cafeDbrType;
|
||||
};
|
||||
|
||||
unsigned int getByteSize() const {return byteSize;};
|
||||
unsigned int getByteSize() const
|
||||
{
|
||||
return byteSize;
|
||||
};
|
||||
|
||||
void setOffset(unsigned int o) {offset=o;};
|
||||
unsigned int getOffset() const {return offset;};
|
||||
void setOffset(unsigned int o)
|
||||
{
|
||||
offset=o;
|
||||
};
|
||||
unsigned int getOffset() const
|
||||
{
|
||||
return offset;
|
||||
};
|
||||
|
||||
//Constructors
|
||||
ChannelRequestMetaData():channelID((chid) NULL), nelem((unsigned int) 1), nelemCache((unsigned int) 1),
|
||||
dataType((chtype) DBF_NO_ACCESS), dbrDataType((chtype) TYPENOTCONN), //
|
||||
cafeDbrType( (CAFENUM::DBR_TYPE) NULL),
|
||||
usrArg((void *) NULL), byteSize((unsigned int) 0), offset((unsigned int) 0){
|
||||
dataType((chtype) DBF_NO_ACCESS), dbrDataType((chtype) TYPENOTCONN), //
|
||||
cafeDbrType( (CAFENUM::DBR_TYPE) NULL),
|
||||
usrArg((void *) NULL), byteSize((unsigned int) 0), offset((unsigned int) 0)
|
||||
{
|
||||
|
||||
}; //CAStatus((long) ECA_NORMAL){};
|
||||
|
||||
~ChannelRequestMetaData(){};
|
||||
~ChannelRequestMetaData() {};
|
||||
};
|
||||
|
||||
|
||||
@@ -248,18 +471,19 @@ 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:
|
||||
//unsigned int offset;
|
||||
public:
|
||||
public:
|
||||
//void setOffset(unsigned int o) {offset=o;};
|
||||
//unsigned int getOffset() const {return offset;};
|
||||
|
||||
|
||||
//Constructors
|
||||
ChannelRequestMetaDataClient(){};//:offset((unsigned int) 0){};
|
||||
~ChannelRequestMetaDataClient(){};
|
||||
ChannelRequestMetaDataClient() {}; //:offset((unsigned int) 0){};
|
||||
~ChannelRequestMetaDataClient() {};
|
||||
};
|
||||
|
||||
|
||||
@@ -269,7 +493,8 @@ public:
|
||||
* messageStatus = requestStatus or messageStatus=callbackStatus (if policy WITH_CALLBACK)
|
||||
*
|
||||
*/
|
||||
class ChannelRequestStatus{
|
||||
class ChannelRequestStatus
|
||||
{
|
||||
|
||||
private:
|
||||
int preRequestStatus; // current status of channel
|
||||
@@ -284,33 +509,88 @@ private:
|
||||
CAFENUM::CallbackProgressKind callbackProgressKind;
|
||||
|
||||
public:
|
||||
int getPreRequestStatus() const {return preRequestStatus;};
|
||||
int getRequestStatus() const {return requestStatus;};
|
||||
int getPendStatus() const {return pendStatus;};
|
||||
int getCallbackStatus() const {return callbackStatus;};
|
||||
int getMessageStatus() const {return messageStatus;};
|
||||
CAFENUM::StatusMessageKind getMessageKind() const {return messageKind;};
|
||||
CAFENUM::CallbackProgressKind getCallbackProgressKind() const {return callbackProgressKind;};
|
||||
int getPreRequestStatus() const
|
||||
{
|
||||
return preRequestStatus;
|
||||
};
|
||||
int getRequestStatus() const
|
||||
{
|
||||
return requestStatus;
|
||||
};
|
||||
int getPendStatus() const
|
||||
{
|
||||
return pendStatus;
|
||||
};
|
||||
int getCallbackStatus() const
|
||||
{
|
||||
return callbackStatus;
|
||||
};
|
||||
int getMessageStatus() const
|
||||
{
|
||||
return messageStatus;
|
||||
};
|
||||
CAFENUM::StatusMessageKind getMessageKind() const
|
||||
{
|
||||
return messageKind;
|
||||
};
|
||||
CAFENUM::CallbackProgressKind getCallbackProgressKind() const
|
||||
{
|
||||
return callbackProgressKind;
|
||||
};
|
||||
|
||||
void setPreRequestStatus (int s) {preRequestStatus=s; messageStatus=s; messageKind=(CAFENUM::StatusMessageKind) CAFENUM::PRE_REQUEST;};
|
||||
void setRequestStatus (int r) {requestStatus = r; messageStatus=r; messageKind=(CAFENUM::StatusMessageKind) CAFENUM::FROM_REQUEST;};
|
||||
void setPendStatus (int p) {pendStatus = p; messageStatus=p; messageKind=(CAFENUM::StatusMessageKind) CAFENUM::FROM_PEND;};
|
||||
void setCallbackStatus (int c) {callbackStatus= c; messageStatus=c; messageKind=(CAFENUM::StatusMessageKind) CAFENUM::FROM_CALLBACK;};
|
||||
void setCallbackKind (bool hasInit, bool hasTrig) {
|
||||
hasCallbackInitiated=hasInit; hasCallbackTriggered=hasTrig;
|
||||
if ( hasInit && !hasTrig) {callbackProgressKind=(CAFENUM::CallbackProgressKind) CAFENUM::PENDING;}
|
||||
else if (!hasInit && hasTrig) {callbackProgressKind=(CAFENUM::CallbackProgressKind) CAFENUM::COMPLETE;}
|
||||
else if (!hasInit && !hasTrig) {callbackProgressKind=(CAFENUM::CallbackProgressKind) CAFENUM::NOT_INITIATED;}
|
||||
else {std::cout << "CAFE INTERNAL POLICY ERROR" << std::endl;
|
||||
std::cout << "ChannelRequestStatus::setCallbackKind gives an INVALID callbackProgressKind" << endl;}
|
||||
void setPreRequestStatus (int s)
|
||||
{
|
||||
preRequestStatus=s;
|
||||
messageStatus=s;
|
||||
messageKind=(CAFENUM::StatusMessageKind) CAFENUM::PRE_REQUEST;
|
||||
};
|
||||
void setRequestStatus (int r)
|
||||
{
|
||||
requestStatus = r;
|
||||
messageStatus=r;
|
||||
messageKind=(CAFENUM::StatusMessageKind) CAFENUM::FROM_REQUEST;
|
||||
};
|
||||
void setPendStatus (int p)
|
||||
{
|
||||
pendStatus = p;
|
||||
messageStatus=p;
|
||||
messageKind=(CAFENUM::StatusMessageKind) CAFENUM::FROM_PEND;
|
||||
};
|
||||
void setCallbackStatus (int c)
|
||||
{
|
||||
callbackStatus= c;
|
||||
messageStatus=c;
|
||||
messageKind=(CAFENUM::StatusMessageKind) CAFENUM::FROM_CALLBACK;
|
||||
};
|
||||
void setCallbackKind (bool hasInit, bool hasTrig)
|
||||
{
|
||||
hasCallbackInitiated=hasInit;
|
||||
hasCallbackTriggered=hasTrig;
|
||||
if ( hasInit && !hasTrig)
|
||||
{
|
||||
callbackProgressKind=(CAFENUM::CallbackProgressKind) CAFENUM::PENDING;
|
||||
}
|
||||
else if (!hasInit && hasTrig)
|
||||
{
|
||||
callbackProgressKind=(CAFENUM::CallbackProgressKind) CAFENUM::COMPLETE;
|
||||
}
|
||||
else if (!hasInit && !hasTrig)
|
||||
{
|
||||
callbackProgressKind=(CAFENUM::CallbackProgressKind) CAFENUM::NOT_INITIATED;
|
||||
}
|
||||
else
|
||||
{
|
||||
std::cout << "CAFE INTERNAL POLICY ERROR" << std::endl;
|
||||
std::cout << "ChannelRequestStatus::setCallbackKind gives an INVALID callbackProgressKind" << std::endl;
|
||||
}
|
||||
};
|
||||
//void setMessageStatus (long mstatus) {messageStatus = mstatus;};
|
||||
// void setMessageKind (StatusMessageKind mkind) { if (mkind<=CAFENUM::FROM_CALLBACK && mkind >= CAFENUM::PRE_REQUEST)
|
||||
// {messageKind = mkind;} else {cout<< mkind << " is an invalid statusMessageKind!" << endl;}};
|
||||
|
||||
ChannelRequestStatus():preRequestStatus(ICAFE_CS_NEVER_CONN),requestStatus(ICAFE_CS_NEVER_CONN),pendStatus(ICAFE_CS_NEVER_CONN),
|
||||
callbackStatus(ICAFE_CS_NEVER_CONN),messageStatus(ICAFE_CS_NEVER_CONN),messageKind((CAFENUM::StatusMessageKind) CAFENUM::NO_MESSAGE),
|
||||
hasCallbackInitiated(false),hasCallbackTriggered(false),callbackProgressKind((CAFENUM::CallbackProgressKind) CAFENUM::NOT_INITIATED){};
|
||||
callbackStatus(ICAFE_CS_NEVER_CONN),messageStatus(ICAFE_CS_NEVER_CONN),messageKind((CAFENUM::StatusMessageKind) CAFENUM::NO_MESSAGE),
|
||||
hasCallbackInitiated(false),hasCallbackTriggered(false),callbackProgressKind((CAFENUM::CallbackProgressKind) CAFENUM::NOT_INITIATED) {};
|
||||
};
|
||||
|
||||
#endif // CHANNELINFO_H
|
||||
|
||||
@@ -13,24 +13,23 @@
|
||||
#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_PYCAFE_EXT
|
||||
#include <Python.h> //required for PyCafe.h
|
||||
#include <PyCafe.h>
|
||||
#else
|
||||
#include <PyCafe_api.h>
|
||||
#endif
|
||||
|
||||
#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
|
||||
@@ -40,22 +39,25 @@
|
||||
class Conduit
|
||||
{
|
||||
public:
|
||||
friend struct change_alarmStatus;
|
||||
friend struct change_alarmSeverity;
|
||||
friend struct change_epicsTimeStamp;
|
||||
friend struct change_alarmStatus;
|
||||
friend struct change_alarmSeverity;
|
||||
friend struct change_epicsTimeStamp;
|
||||
|
||||
friend struct change_accessRightsHandlerArgs;
|
||||
friend struct change_accessRead;
|
||||
friend struct change_accessWrite;
|
||||
|
||||
friend struct change_beamEventNo;
|
||||
|
||||
friend struct change_channelDeviceAttribute;
|
||||
friend struct change_channelID;
|
||||
friend struct change_channelRegalia;
|
||||
|
||||
friend struct change_channelGetCacheWaitPolicy;
|
||||
friend struct change_channelGetActionWhenMonitorPolicy;
|
||||
|
||||
friend struct change_channelGetCacheWaitPolicy;
|
||||
friend struct change_channelGetActionWhenMonitorPolicy;
|
||||
|
||||
friend struct change_channelRequestDataTypePolicy;
|
||||
|
||||
|
||||
friend struct change_channelRequestMetaCtrl;
|
||||
friend struct change_channelRequestMetaCtrlClient;
|
||||
|
||||
@@ -80,7 +82,7 @@ public:
|
||||
friend struct change_channelTimeoutPolicyPut;
|
||||
|
||||
friend struct change_connectionHandlerArgs;
|
||||
|
||||
|
||||
friend struct change_dataBufferSize_PRIMITIVE;
|
||||
friend struct change_dataBufferSize_TIME;
|
||||
friend struct change_dataBufferSize_CTRL;
|
||||
@@ -88,11 +90,18 @@ public:
|
||||
|
||||
//friend struct change_dataBufferPVCtrlHolder;
|
||||
//friend struct change_dataBufferPVDataHolder;
|
||||
|
||||
friend struct change_eventHandlerArgs;
|
||||
friend struct change_hasNewData;
|
||||
friend struct change_dequePulseID;
|
||||
friend struct change_mapPulseID;
|
||||
friend struct change_mapPulseIDBufferSize;
|
||||
friend struct change_monitorAction;
|
||||
friend struct change_monitorActionClear;
|
||||
friend struct change_monitorActionErase;
|
||||
|
||||
friend struct change_monitorPolicy;
|
||||
|
||||
friend struct change_monitorPolicyErase;
|
||||
friend struct change_monitorPolicyInsert;
|
||||
|
||||
@@ -102,10 +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;
|
||||
@@ -114,40 +137,56 @@ public:
|
||||
friend class ChannelCreatePolicy;
|
||||
friend class ConduitGroup;
|
||||
friend class MonitorPolicy;
|
||||
|
||||
//friend void CAFE_CALLBACK::PyHandlerPut;
|
||||
//friend void CAFE_CALLBACK::PyHandlerGet;
|
||||
//friend struct change_pyCafeFlag;
|
||||
|
||||
//friend void CAFE_CALLBACK::PyHandlerPut;
|
||||
//friend void CAFE_CALLBACK::PyHandlerGet;
|
||||
//friend struct change_pyCafeFlag;
|
||||
|
||||
private:
|
||||
//from alarmString.h
|
||||
const char * epicsAlarmSeverityStrings[ALARM_SEVERITY_STRING_LENGTH];
|
||||
//from alarmString.h
|
||||
const char * epicsAlarmSeverityStrings[ALARM_SEVERITY_STRING_LENGTH];
|
||||
const char * epicsAlarmConditionStrings[ALARM_STATUS_STRING_LENGTH];
|
||||
|
||||
|
||||
static unsigned int handleNext;
|
||||
|
||||
ca_client_context * ccc;
|
||||
|
||||
union db_access_val * dataBuffer;
|
||||
|
||||
union db_access_val * dataBuffer;
|
||||
union db_access_val * ctrlBuffer;
|
||||
union db_access_val * putBuffer;
|
||||
union db_access_val * stsackBuffer;
|
||||
|
||||
union db_access_val * stsackBuffer;
|
||||
|
||||
//struct connection_handler_args connectionHandlerArgs;
|
||||
//struct event_handler_args eventHandlerArgs;
|
||||
|
||||
short alarmStatus;
|
||||
short alarmSeverity;
|
||||
epicsTimeStamp ts;
|
||||
|
||||
void * usrArgs; //Filled in conduitEventHandlerArgs.h; used by getUsrArgsAsUInt in CyCafe
|
||||
|
||||
chtype dataType;
|
||||
chtype dbrDataType;
|
||||
CAFENUM::DBR_TYPE cafeDbrType;
|
||||
|
||||
|
||||
//New Oct. 2018
|
||||
std::string desc;
|
||||
|
||||
alarmSeverityStruct aSevStruct;
|
||||
bool hasDesc;
|
||||
bool hasAlarmSevStruct;
|
||||
|
||||
void * usrArgs; //Filled in conduitEventHandlerArgs.h; used by getUsrArgsAsUInt in CyCafe
|
||||
|
||||
chtype dataType;
|
||||
chtype dbrDataType;
|
||||
CAFENUM::DBR_TYPE cafeDbrType;
|
||||
|
||||
//Reserved
|
||||
unsigned int beamEventNo;
|
||||
unsigned long long beamEventNo;
|
||||
|
||||
std:: deque<PVDataHolder> dequePulseID;
|
||||
|
||||
std::map<unsigned long long, PVDataHolder> mapPulseID;
|
||||
std::map<unsigned long long, PVDataHolder>::iterator mpos;
|
||||
unsigned short mapPulseIDBufferSize;
|
||||
|
||||
//bool rule;
|
||||
bool pyCafeFlag;
|
||||
bool pyCafeFlag;
|
||||
|
||||
std::string deviceAttributeDeliminator;
|
||||
ChannelDeviceAttribute channelDeviceAttribute;
|
||||
@@ -159,7 +198,7 @@ private:
|
||||
|
||||
//ChannelPolicies
|
||||
|
||||
ChannelGetCacheWaitPolicy channelGetCacheWaitPolicy;
|
||||
ChannelGetCacheWaitPolicy channelGetCacheWaitPolicy;
|
||||
ChannelGetActionWhenMonitorPolicy channelGetActionWhenMonitorPolicy;
|
||||
|
||||
ChannelRequestDataTypePolicy channelRequestDataTypePolicy;
|
||||
@@ -176,28 +215,43 @@ private:
|
||||
ChannelRequestStatus channelRequestStatusGetSTSACK; //STSACK
|
||||
ChannelRequestStatus channelRequestStatusGetClassName;//ClassName
|
||||
|
||||
ChannelTimeoutPolicy channelTimeoutPolicyGet;
|
||||
ChannelTimeoutPolicy channelTimeoutPolicyPut;
|
||||
ChannelTimeoutPolicy channelTimeoutPolicyGet;
|
||||
ChannelTimeoutPolicy channelTimeoutPolicyPut;
|
||||
|
||||
ChannelRegalia channelRegalia;
|
||||
|
||||
ChannelRequestMetaData channelRequestMetaData; //0 container for actual send
|
||||
ChannelRequestMetaDataClient channelRequestMetaDataClient; //-1 //DATA
|
||||
//ChannelRequestMetaDataRepository channelRequestMetaDataRepository; // (CAFENUM::DBR_TYPE DBR_TIME) ; //1
|
||||
|
||||
|
||||
ChannelRequestMetaData channelRequestMetaCtrl; //0 container for actual send
|
||||
ChannelRequestMetaDataClient channelRequestMetaCtrlClient; //-1 //CTRL
|
||||
ChannelRequestMetaDataClient channelRequestMetaCtrlClient; //-1 //CTRL
|
||||
//ChannelRequestMetaDataRepository channelRequestMetaCtrlRepository; // (CAFENUM::DBR_TYPE DBR_CTRL); //1
|
||||
|
||||
|
||||
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;
|
||||
#endif
|
||||
#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;
|
||||
|
||||
@@ -215,135 +269,447 @@ private:
|
||||
//map<unsigned long,MonitorPolicy> lump;
|
||||
//map<unsigned long,MonitorPolicy>::iterator ilump;
|
||||
|
||||
|
||||
|
||||
////MonitorPolicy mpBase;
|
||||
vector<MonitorPolicy> mpV;
|
||||
vector<MonitorPolicy> mpInWaitingV;
|
||||
std::vector<MonitorPolicy> mpV;
|
||||
std::vector<MonitorPolicy> mpInWaitingV;
|
||||
|
||||
int monitorStart(MonitorPolicy &mp) const;
|
||||
int monitorStop(evid eventID) const;
|
||||
|
||||
vector<std::string> monitorAction;
|
||||
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;
|
||||
#endif
|
||||
|
||||
|
||||
#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 );
|
||||
|
||||
Conduit(const char * _pv, ca_client_context *_ccc,
|
||||
ChannelRequestPolicy _channelRequestPolicyPut, ChannelRequestPolicy _channelRequestPolicyGet,
|
||||
ChannelGetActionWhenMonitorPolicy _channelGetActionWhenMonitorPolicy,
|
||||
bool _pyCafeFlag);
|
||||
|
||||
|
||||
Conduit(const char * _pv, ca_client_context *_ccc,
|
||||
ChannelRequestPolicy _channelRequestPolicyPut, ChannelRequestPolicy _channelRequestPolicyGet,
|
||||
ChannelGetActionWhenMonitorPolicy _channelGetActionWhenMonitorPolicy, bool _pyCafeFlag);
|
||||
|
||||
//Conduit(const char * _pv, ca_client_context *_ccc, bool _pyCafeFlag);
|
||||
//Conduit(const char * _pv, ca_client_context *_ccc);
|
||||
virtual ~Conduit();
|
||||
unsigned int groupHandle; // Group handle this pv handle belongs to!!
|
||||
unsigned int handle;
|
||||
|
||||
|
||||
chid channelID;
|
||||
//evid eventID;
|
||||
|
||||
std::string pv;
|
||||
std::string pvAlias;
|
||||
std::string pvAlias;
|
||||
|
||||
int status;
|
||||
|
||||
|
||||
friend std::ostream& operator<<(std::ostream& os, const Conduit& e)
|
||||
{
|
||||
os<< "handle=" << e.handle<<" pv=" << e.pv<< std::endl;
|
||||
return os;
|
||||
};
|
||||
|
||||
bool getPyCafe() const {return pyCafeFlag;};
|
||||
|
||||
bool operator<(const Conduit& c)const{return handle<c.handle;};
|
||||
|
||||
const char * getDevice(void) const {return channelDeviceAttribute.getDevice();};
|
||||
const char * getAttribute(void) const {return channelDeviceAttribute.getAttribute();};
|
||||
//struct connection_handler_args getConnectionHandlerArgs(void) const{
|
||||
// return connectionHandlerArgs;
|
||||
//};
|
||||
|
||||
const char * getHostName(void) const {return channelRegalia.hostName;};
|
||||
bool isConnected(void) const {return channelRegalia.connectFlag;};
|
||||
|
||||
//struct event_handler_args getEventHandlerArgs(void) const {
|
||||
// return eventHandlerArgs;
|
||||
//};
|
||||
|
||||
epicsTimeStamp getTimeStamp(void) const{return ts;}
|
||||
short getAlarmStatus(void) const{return alarmStatus;}
|
||||
short getAlarmSeverity(void) const{return alarmSeverity;}
|
||||
|
||||
string getAlarmStatusAsString(void) const{
|
||||
if (alarmStatus>-1 && alarmStatus<ALARM_STATUS_STRING_LENGTH) {
|
||||
return (string) epicsAlarmConditionStrings[alarmStatus];}
|
||||
else {
|
||||
cout << "alarmStatusValue=" << alarmStatus << " is not within the valid range of 0-3!" << endl;
|
||||
return (string) "ALARM_UNKNOWN";
|
||||
}
|
||||
}
|
||||
string getAlarmSeverityAsString(void) const{
|
||||
if (alarmSeverity>-1 && alarmSeverity<ALARM_SEVERITY_STRING_LENGTH) {
|
||||
return (string) epicsAlarmSeverityStrings[alarmSeverity];}
|
||||
else {
|
||||
cout << "alarmStatusSeverity=" << alarmSeverity << " is not within the valid range of 0-21!" << endl;
|
||||
return (string) "SEVERITY_UNKNOWN";
|
||||
}
|
||||
}
|
||||
|
||||
bool getPyCafe() const
|
||||
{
|
||||
return pyCafeFlag;
|
||||
};
|
||||
|
||||
unsigned short getAccessRead(void) const{return channelRegalia.accessRead;};
|
||||
unsigned short getAccessWrite(void) const{return channelRegalia.accessWrite;};
|
||||
|
||||
bool operator<(const Conduit& c)const
|
||||
{
|
||||
return handle<c.handle;
|
||||
};
|
||||
|
||||
const char * getDevice(void) const
|
||||
{
|
||||
return channelDeviceAttribute.getDevice();
|
||||
};
|
||||
const char * getAttribute(void) const
|
||||
{
|
||||
return channelDeviceAttribute.getAttribute();
|
||||
};
|
||||
|
||||
const char * getClassName(void) const
|
||||
{
|
||||
return channelRegalia.className;
|
||||
};
|
||||
|
||||
const char * getHostName(void) const
|
||||
{
|
||||
return channelRegalia.hostName;
|
||||
};
|
||||
bool isConnected(void) const
|
||||
{
|
||||
return channelRegalia.connectFlag;
|
||||
};
|
||||
|
||||
std::string getDescription(void) const
|
||||
{
|
||||
return desc;
|
||||
}
|
||||
|
||||
epicsTimeStamp getTimeStamp(void) const
|
||||
{
|
||||
return ts;
|
||||
}
|
||||
short getAlarmStatus(void) const
|
||||
{
|
||||
return alarmStatus;
|
||||
}
|
||||
short getAlarmSeverity(void) const
|
||||
{
|
||||
return alarmSeverity;
|
||||
}
|
||||
short getHHSV(void) const
|
||||
{
|
||||
return aSevStruct.hhsv;
|
||||
}
|
||||
short getHSV(void) const
|
||||
{
|
||||
return aSevStruct.hsv;
|
||||
}
|
||||
short getLSV(void) const
|
||||
{
|
||||
return aSevStruct.lsv;
|
||||
}
|
||||
short getLLSV(void) const
|
||||
{
|
||||
return aSevStruct.llsv;
|
||||
}
|
||||
alarmSeverityStruct getAlarmSeverityStruct(void) const
|
||||
{
|
||||
return aSevStruct;
|
||||
}
|
||||
|
||||
bool hasDescription(void) const
|
||||
{
|
||||
return hasDesc;
|
||||
}
|
||||
|
||||
bool hasAlarmSeverityStruct(void) const
|
||||
{
|
||||
return hasAlarmSevStruct;
|
||||
}
|
||||
|
||||
bool hasAlarmSeverity(void) const
|
||||
{
|
||||
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)
|
||||
{
|
||||
return (std::string) epicsAlarmConditionStrings[alarmStatus];
|
||||
}
|
||||
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)
|
||||
{
|
||||
return (std::string) epicsAlarmSeverityStrings[alarmSeverity];
|
||||
}
|
||||
else
|
||||
{
|
||||
std::cout << "alarmStatusSeverity=" << alarmSeverity << " is not within the valid range of 0-21!" << std::endl;
|
||||
return (std::string) "SEVERITY_UNKNOWN";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
unsigned short getAccessRead(void) const
|
||||
{
|
||||
return channelRegalia.accessRead;
|
||||
};
|
||||
unsigned short getAccessWrite(void) const
|
||||
{
|
||||
return channelRegalia.accessWrite;
|
||||
};
|
||||
//Reserved
|
||||
unsigned int getBeamEventNo(void) const {return beamEventNo;};
|
||||
chid getChannelID(void) const {return channelRegalia.channelID;};
|
||||
ChannelRegalia getChannelRegalia(void) const {return channelRegalia;};
|
||||
ca_client_context * getClientContext(void) const {return ccc;};
|
||||
unsigned int getGroupHandle(void) const {return groupHandle;};
|
||||
unsigned int getHandle(void) const {return handle;};
|
||||
const char * getPV(void) const {return pv.c_str();};
|
||||
const char * getPVAlias(void) const {return pvAlias.c_str();};
|
||||
unsigned long long getBeamEventNo(void) const
|
||||
{
|
||||
return beamEventNo;
|
||||
};
|
||||
unsigned long long getPulseID(void) const
|
||||
{
|
||||
return beamEventNo;
|
||||
};
|
||||
|
||||
int getStatus(void) const {return status;};
|
||||
|
||||
/*
|
||||
PVDataHolder getPVDataFromPulseID(unsigned long long globalPulseID) const {
|
||||
PVDataHolder pvd;
|
||||
std::map<unsigned long long, PVDataHolder>::iterator mpos;
|
||||
|
||||
void * getUsrArgs(void) const {return usrArgs;};
|
||||
chtype getDataType(void) const {return dataType;};
|
||||
chtype getDbrDataType(void) const {return dbrDataType;};
|
||||
CAFENUM::DBR_TYPE getCafeDbrType(void) const {return cafeDbrType;};
|
||||
|
||||
db_access_val * getCtrlBuffer(void) const {return ctrlBuffer;};
|
||||
db_access_val * getDataBuffer(void) const {return dataBuffer;};
|
||||
db_access_val * getPutBuffer(void) const {return putBuffer;};
|
||||
mpos=mapPulseID.find(globalPulseID);
|
||||
|
||||
if (mpos != mapPulseID.end() ) {
|
||||
pvd = (mpos->second);
|
||||
//std::cout << "key: EXACT MATCH FOUND " << mpos->first << " pid " << globalPulseID << std::endl;
|
||||
return pvd;
|
||||
}
|
||||
else {getPVDataHolder(pvd);
|
||||
return pvd;
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
std::map<unsigned long long, PVDataHolder> getPulsePVDataMap() const
|
||||
{
|
||||
//std::map<unsigned long long, PVDataHolder> a; return a;};
|
||||
return mapPulseID;
|
||||
};
|
||||
unsigned short getMapPulseIDBufferSize() const
|
||||
{
|
||||
return mapPulseIDBufferSize;
|
||||
};
|
||||
|
||||
std::deque<PVDataHolder> getPulsePVData() const
|
||||
{
|
||||
return dequePulseID;
|
||||
}
|
||||
|
||||
|
||||
chid getChannelID(void) const
|
||||
{
|
||||
return channelRegalia.channelID;
|
||||
};
|
||||
ChannelRegalia getChannelRegalia(void) const
|
||||
{
|
||||
return channelRegalia;
|
||||
};
|
||||
ca_client_context * getClientContext(void) const
|
||||
{
|
||||
return ccc;
|
||||
};
|
||||
unsigned int getGroupHandle(void) const
|
||||
{
|
||||
return groupHandle;
|
||||
};
|
||||
unsigned int getHandle(void) const
|
||||
{
|
||||
return handle;
|
||||
};
|
||||
const char * getPV(void) const
|
||||
{
|
||||
return pv.c_str();
|
||||
};
|
||||
std::string getPVAsString(void) const
|
||||
{
|
||||
return pv;
|
||||
};
|
||||
const char * getPVAlias(void) const
|
||||
{
|
||||
return pvAlias.c_str();
|
||||
};
|
||||
std::string getPVAliasAsString(void) const
|
||||
{
|
||||
return pvAlias;
|
||||
};
|
||||
|
||||
int getStatus(void) const
|
||||
{
|
||||
return status;
|
||||
};
|
||||
|
||||
void * getUsrArgs(void) const
|
||||
{
|
||||
return usrArgs;
|
||||
};
|
||||
chtype getDataType(void) const
|
||||
{
|
||||
return dataType;
|
||||
};
|
||||
chtype getDbrDataType(void) const
|
||||
{
|
||||
return dbrDataType;
|
||||
};
|
||||
CAFENUM::DBR_TYPE getCafeDbrType(void) const
|
||||
{
|
||||
return cafeDbrType;
|
||||
};
|
||||
|
||||
db_access_val * getCtrlBuffer(void) const
|
||||
{
|
||||
return ctrlBuffer;
|
||||
};
|
||||
db_access_val * getDataBuffer(void) const
|
||||
{
|
||||
return dataBuffer;
|
||||
};
|
||||
db_access_val * getPutBuffer(void) const
|
||||
{
|
||||
return putBuffer;
|
||||
};
|
||||
|
||||
int getPVDataHolder(PVDataHolder &) const ;
|
||||
int getPVCtrlHolder(PVCtrlHolder &) const ;
|
||||
|
||||
//bool getRule(void) const {return rule;};
|
||||
|
||||
//RequestPolicy
|
||||
ChannelGetCacheWaitPolicy getChannelGetCacheWaitPolicy(void) const { return channelGetCacheWaitPolicy;};
|
||||
ChannelGetActionWhenMonitorPolicy getChannelGetActionWhenMonitorPolicy(void) const { return channelGetActionWhenMonitorPolicy;}
|
||||
|
||||
ChannelTimeoutPolicy getChannelTimeoutPolicyGet (void) const {return channelTimeoutPolicyGet;};
|
||||
ChannelRequestPolicy getChannelRequestPolicyGet (void) const {return channelRequestPolicyGet;};
|
||||
ChannelRequestStatus getChannelRequestStatusGet (void) const {return channelRequestStatusGet;};
|
||||
ChannelRequestPolicy getChannelRequestPolicyGetCtrl (void) const {return channelRequestPolicyGetCtrl;};
|
||||
ChannelRequestStatus getChannelRequestStatusGetCtrl (void) const {return channelRequestStatusGetCtrl;};
|
||||
std::string getUnits(void) const
|
||||
{
|
||||
PVCtrlHolder pvc;
|
||||
getPVCtrlHolder(pvc);
|
||||
return pvc.getUnitsAsString();
|
||||
};
|
||||
|
||||
ChannelRequestStatus getChannelRequestStatusGetSTSACK (void) const {return channelRequestStatusGetSTSACK;};
|
||||
ChannelRequestStatus getChannelRequestStatusGetClassName (void) const {return channelRequestStatusGetClassName;};
|
||||
short getPrecision(void) const
|
||||
{
|
||||
PVCtrlHolder pvc;
|
||||
getPVCtrlHolder(pvc);
|
||||
return pvc.getPrecision();
|
||||
};
|
||||
|
||||
ChannelTimeoutPolicy getChannelTimeoutPolicyPut (void) const {return channelTimeoutPolicyPut;};
|
||||
ChannelRequestPolicy getChannelRequestPolicyPut (void) const {return channelRequestPolicyPut;};
|
||||
ChannelRequestStatus getChannelRequestStatusPut (void) const {return channelRequestStatusPut;};
|
||||
//bool getRule(void) const {return rule;};
|
||||
|
||||
ChannelRequestDataTypePolicy getChannelRequestDataTypePolicy(void) const { return channelRequestDataTypePolicy;};
|
||||
//RequestPolicy
|
||||
ChannelGetCacheWaitPolicy getChannelGetCacheWaitPolicy(void) const
|
||||
{
|
||||
return channelGetCacheWaitPolicy;
|
||||
};
|
||||
ChannelGetActionWhenMonitorPolicy getChannelGetActionWhenMonitorPolicy(void) const
|
||||
{
|
||||
return channelGetActionWhenMonitorPolicy;
|
||||
}
|
||||
|
||||
ChannelRequestMetaData getChannelRequestMetaData(void) const {return channelRequestMetaData;}; //0
|
||||
ChannelRequestMetaDataClient getChannelRequestMetaDataClient(void) const {return channelRequestMetaDataClient;}; //-1
|
||||
ChannelRequestMetaData getChannelRequestMetaCtrl(void) const {return channelRequestMetaCtrl;}; //0
|
||||
ChannelRequestMetaDataClient getChannelRequestMetaCtrlClient(void) const {return channelRequestMetaCtrlClient;}; //-1
|
||||
ChannelTimeoutPolicy getChannelTimeoutPolicyGet (void) const
|
||||
{
|
||||
return channelTimeoutPolicyGet;
|
||||
};
|
||||
ChannelRequestPolicy getChannelRequestPolicyGet (void) const
|
||||
{
|
||||
return channelRequestPolicyGet;
|
||||
};
|
||||
ChannelRequestStatus getChannelRequestStatusGet (void) const
|
||||
{
|
||||
return channelRequestStatusGet;
|
||||
};
|
||||
ChannelRequestPolicy getChannelRequestPolicyGetCtrl (void) const
|
||||
{
|
||||
return channelRequestPolicyGetCtrl;
|
||||
};
|
||||
ChannelRequestStatus getChannelRequestStatusGetCtrl (void) const
|
||||
{
|
||||
return channelRequestStatusGetCtrl;
|
||||
};
|
||||
|
||||
ChannelRequestMetaData getChannelRequestMetaPrimitive(void) const {return channelRequestMetaPrimitive;}; //0
|
||||
ChannelRequestStatus getChannelRequestStatusGetSTSACK (void) const
|
||||
{
|
||||
return channelRequestStatusGetSTSACK;
|
||||
};
|
||||
ChannelRequestStatus getChannelRequestStatusGetClassName (void) const
|
||||
{
|
||||
return channelRequestStatusGetClassName;
|
||||
};
|
||||
|
||||
ChannelTimeoutPolicy getChannelTimeoutPolicyPut (void) const
|
||||
{
|
||||
return channelTimeoutPolicyPut;
|
||||
};
|
||||
ChannelRequestPolicy getChannelRequestPolicyPut (void) const
|
||||
{
|
||||
return channelRequestPolicyPut;
|
||||
};
|
||||
ChannelRequestStatus getChannelRequestStatusPut (void) const
|
||||
{
|
||||
return channelRequestStatusPut;
|
||||
};
|
||||
|
||||
ChannelRequestDataTypePolicy getChannelRequestDataTypePolicy(void) const
|
||||
{
|
||||
return channelRequestDataTypePolicy;
|
||||
};
|
||||
|
||||
ChannelRequestMetaData getChannelRequestMetaData(void) const
|
||||
{
|
||||
return channelRequestMetaData;
|
||||
}; //0
|
||||
ChannelRequestMetaDataClient getChannelRequestMetaDataClient(void) const
|
||||
{
|
||||
return channelRequestMetaDataClient;
|
||||
}; //-1
|
||||
ChannelRequestMetaData getChannelRequestMetaCtrl(void) const
|
||||
{
|
||||
return channelRequestMetaCtrl;
|
||||
}; //0
|
||||
ChannelRequestMetaDataClient getChannelRequestMetaCtrlClient(void) const
|
||||
{
|
||||
return channelRequestMetaCtrlClient;
|
||||
}; //-1
|
||||
|
||||
ChannelRequestMetaData getChannelRequestMetaPrimitive(void) const
|
||||
{
|
||||
return channelRequestMetaPrimitive;
|
||||
}; //0
|
||||
|
||||
//ChannelRequestMetaDataRepository getChannelRequestMetaDataRepository (void) const {return channelRequestMetaDataRepository;}; //1
|
||||
//ChannelRequestMetaDataRepository getChannelRequestMetaCtrlRepository (void) const {return channelRequestMetaCtrlRepository;}; //1
|
||||
@@ -351,11 +717,59 @@ public:
|
||||
//ChannelRequestMetaDataRepository getChannelRequestMetaPrimitiveRepository(void) const {return channelRequestMetaPrimitiveRepository;}; //1
|
||||
|
||||
////MonitorPolicy getMonitorPolicy(void) const {return mpBase;};
|
||||
vector<MonitorPolicy> getMonitorPolicyVector(void) const {return mpV;};
|
||||
vector<MonitorPolicy> getMonitorPolicyInWaitingVector(void) const {return mpInWaitingV;};
|
||||
|
||||
vector<string> getMonitorAction(void) const {return monitorAction;};
|
||||
bool getHasNewData(void) const {return hasNewData;};
|
||||
|
||||
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;
|
||||
};
|
||||
|
||||
std::vector<std::string> getMonitorAction(void) const
|
||||
{
|
||||
return monitorAction;
|
||||
};
|
||||
|
||||
std::vector<void *> getWidgetV(void) const
|
||||
{
|
||||
return std::vector<void *>(widgetV);
|
||||
};
|
||||
|
||||
bool getHasNewData(void) const
|
||||
{
|
||||
return hasNewData;
|
||||
};
|
||||
};
|
||||
|
||||
#endif // CONDUIT_H
|
||||
|
||||
@@ -12,45 +12,49 @@
|
||||
#include <conduit.h>
|
||||
#include <statusCodes.h>
|
||||
|
||||
using namespace std;
|
||||
|
||||
/**
|
||||
* 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
|
||||
{
|
||||
#define __METHOD__ "change_connectionHandlerArgs"
|
||||
change_connectionHandlerArgs (const struct connection_handler_args & new_connectionHandlerArgs):
|
||||
new_connectionHandlerArgs(new_connectionHandlerArgs){}
|
||||
new_connectionHandlerArgs(new_connectionHandlerArgs) {}
|
||||
|
||||
void operator() (Conduit& c) {
|
||||
|
||||
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){
|
||||
|
||||
//cout << " change_connectionHandlerArgs: bytesize UP " << c.channelRequestMetaData.byteSize << endl;
|
||||
//channelRegalia
|
||||
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) {
|
||||
cout << __FILE__ << "//" << __LINE__ << "//" << __METHOD__ << endl;
|
||||
cout << "Internal CAFE WARNING for handle : " << c.handle << endl;
|
||||
cout << "Channel ID has changed from " << c.channelRegalia.channelID
|
||||
<< " to " << new_connectionHandlerArgs.chid << " " << endl;
|
||||
cout << "This is a rare occurence and happens when the ca message buffer " << endl;
|
||||
cout << "is flushed ahead of schedule (does that when full) and this callback is " << endl;
|
||||
cout << "consequently activated before channel ID is written to the hash table " << endl;
|
||||
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
|
||||
<< " to " << new_connectionHandlerArgs.chid << " " << std::endl;
|
||||
std::cout << "This is a rare occurence and happens when the ca message buffer " << std::endl;
|
||||
std::cout << "is flushed ahead of schedule (does that when full) and this callback is " << std::endl;
|
||||
std::cout << "consequently activated before channel ID is written to the hash table " << std::endl;
|
||||
c.channelRegalia.channelID = new_connectionHandlerArgs.chid;
|
||||
}
|
||||
|
||||
@@ -61,12 +65,13 @@ struct change_connectionHandlerArgs
|
||||
c.channelRegalia.dataType = nativeDataType;
|
||||
|
||||
|
||||
// DATA BUFFER ------------------------------------------------------------------
|
||||
// data buffer CLIENT
|
||||
// DATA BUFFER ------------------------------------------------------------------
|
||||
// data buffer CLIENT
|
||||
// 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;
|
||||
@@ -93,12 +98,12 @@ struct change_connectionHandlerArgs
|
||||
|
||||
//What client is actutally requesting
|
||||
c.channelRequestMetaDataClient.byteSize=dbr_size_n(
|
||||
c.channelRequestMetaDataClient.dbrDataType,
|
||||
//dbf_type_to_DBR_TIME(nativeDataType),
|
||||
c.channelRequestMetaDataClient.nelem);
|
||||
c.channelRequestMetaDataClient.dbrDataType,
|
||||
//dbf_type_to_DBR_TIME(nativeDataType),
|
||||
c.channelRequestMetaDataClient.nelem);
|
||||
}
|
||||
|
||||
//data Buffer requested by Cafe
|
||||
|
||||
//data Buffer requested by Cafe
|
||||
c.channelRequestMetaData.channelID = new_connectionHandlerArgs.chid;
|
||||
c.channelRequestMetaData.nelem = c.channelRegalia.nelem;
|
||||
c.channelRequestMetaData.nelemCache = c.channelRegalia.nelem;
|
||||
@@ -126,20 +131,23 @@ struct change_connectionHandlerArgs
|
||||
|
||||
|
||||
// CTRL BUFFER ------------------------------------------------------------------
|
||||
|
||||
|
||||
//No of elements for Ctrl Buffers
|
||||
unsigned int nelem_ctrl_buffer=1;
|
||||
|
||||
if ( c.channelRegalia.nelem > MAX_NELEM_FOR_CTRL_BUFFER) {
|
||||
nelem_ctrl_buffer = DEFAULT_NELEM_FOR_CTRL_BUFFER;
|
||||
}
|
||||
else {
|
||||
nelem_ctrl_buffer = c.channelRegalia.nelem;
|
||||
}
|
||||
|
||||
//ctrl data CLIENT
|
||||
|
||||
if ( c.channelRegalia.nelem > MAX_NELEM_FOR_CTRL_BUFFER)
|
||||
{
|
||||
nelem_ctrl_buffer = DEFAULT_NELEM_FOR_CTRL_BUFFER;
|
||||
}
|
||||
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;
|
||||
@@ -162,7 +170,7 @@ struct change_connectionHandlerArgs
|
||||
}
|
||||
|
||||
c.channelRequestMetaCtrlClient.byteSize=dbr_size_n(
|
||||
c.channelRequestMetaCtrlClient.dbrDataType,c.channelRequestMetaCtrlClient.nelem);
|
||||
c.channelRequestMetaCtrlClient.dbrDataType,c.channelRequestMetaCtrlClient.nelem);
|
||||
}
|
||||
|
||||
//ctrl Data requested by Cafe
|
||||
@@ -187,16 +195,18 @@ struct change_connectionHandlerArgs
|
||||
}
|
||||
|
||||
// STSACK BUFFER ------------------------------------------------------------------
|
||||
|
||||
//No of elements for STSACK Buffers
|
||||
|
||||
//No of elements for STSACK Buffers
|
||||
unsigned int nelem_stsack_buffer;
|
||||
|
||||
if ( c.channelRegalia.nelem > MAX_NELEM_FOR_STSACK_BUFFER) {
|
||||
nelem_stsack_buffer = DEFAULT_NELEM_FOR_STSACK_BUFFER;
|
||||
}
|
||||
else {
|
||||
nelem_stsack_buffer = c.channelRegalia.nelem;
|
||||
}
|
||||
|
||||
if ( c.channelRegalia.nelem > MAX_NELEM_FOR_STSACK_BUFFER)
|
||||
{
|
||||
nelem_stsack_buffer = DEFAULT_NELEM_FOR_STSACK_BUFFER;
|
||||
}
|
||||
else
|
||||
{
|
||||
nelem_stsack_buffer = c.channelRegalia.nelem;
|
||||
}
|
||||
|
||||
|
||||
//STSACK Buffer Repository
|
||||
@@ -210,7 +220,7 @@ struct change_connectionHandlerArgs
|
||||
|
||||
//PRIMITIVE Buffer Repository
|
||||
c.channelRequestMetaPrimitive.channelID = new_connectionHandlerArgs.chid;
|
||||
c.channelRequestMetaPrimitive.nelem = c.channelRegalia.nelem;
|
||||
c.channelRequestMetaPrimitive.nelem = c.channelRegalia.nelem;
|
||||
c.channelRequestMetaPrimitive.dataType = nativeDataType;;
|
||||
c.channelRequestMetaPrimitive.dbrDataType= dbf_type_to_DBR(nativeDataType);
|
||||
c.channelRequestMetaPrimitive.cafeDbrType= CAFENUM::DBR_PRIMITIVE;
|
||||
@@ -218,32 +228,34 @@ 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));
|
||||
c.channelTimeoutPolicyPut.setTimeout(std::max(DEFAULT_TIMEOUT_PEND_IO_WF , tout));
|
||||
c.channelTimeoutPolicyGet.setDefaultTimeout(DEFAULT_TIMEOUT_PEND_IO_WF);
|
||||
c.channelTimeoutPolicyPut.setDefaultTimeout(DEFAULT_TIMEOUT_PEND_IO_WF);
|
||||
c.channelTimeoutPolicyGet.setTimeout(std::max(DEFAULT_TIMEOUT_PEND_IO_WF, tout));
|
||||
c.channelTimeoutPolicyPut.setTimeout(std::max(DEFAULT_TIMEOUT_PEND_IO_WF, tout));
|
||||
c.channelTimeoutPolicyGet.setDefaultTimeout(DEFAULT_TIMEOUT_PEND_IO_WF);
|
||||
c.channelTimeoutPolicyPut.setDefaultTimeout(DEFAULT_TIMEOUT_PEND_IO_WF);
|
||||
}
|
||||
|
||||
c.channelRegalia.cafeConnectionState = ICAFE_CS_CONN;
|
||||
c.status = ICAFE_CA_OP_CONN_UP;
|
||||
}
|
||||
else {
|
||||
|
||||
else
|
||||
{
|
||||
|
||||
//nativeType not known on disconnect!!
|
||||
|
||||
//Also callback done
|
||||
c.channelRequestStatusGet.setCallbackKind(false, true); //fake completion
|
||||
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.channelRegalia.connectFlag = false;
|
||||
c.status = ICAFE_CA_OP_CONN_DOWN;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
private:
|
||||
@@ -259,41 +271,46 @@ private:
|
||||
struct change_dataBufferSize_CTRL
|
||||
{
|
||||
#define __METHOD__ "change_dataBufferSize_CTRL"
|
||||
change_dataBufferSize_CTRL (const chtype & new_ctrlTypeBuffer): new_ctrlTypeBuffer(new_ctrlTypeBuffer){}
|
||||
change_dataBufferSize_CTRL (const chtype & new_ctrlTypeBuffer): new_ctrlTypeBuffer(new_ctrlTypeBuffer) {}
|
||||
|
||||
void operator() (Conduit& c) {
|
||||
void operator() (Conduit& c)
|
||||
{
|
||||
|
||||
// Free buffer on re-connection
|
||||
// Check Byte size first!!!
|
||||
|
||||
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() ) {
|
||||
cout << "ctrlBuffer already exists= " << c.ctrlBuffer << " for channel " << c.pv
|
||||
<< " with handle " << c.handle << endl;
|
||||
cout << "Freeing and reallocating ctrlBuffer" << endl;
|
||||
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;
|
||||
free(c.ctrlBuffer);
|
||||
allocateMemory=true;
|
||||
}
|
||||
|
||||
if (allocateMemory) {
|
||||
//cout << "sizeof c.ctrlBuffer " << dbr_size_n(new_ctrlTypeBuffer,c.channelRequestMetaCtrl.getNelem()) << endl;
|
||||
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){
|
||||
cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__ << endl;
|
||||
printf ("Virtual memory exhausted for channel %s ", ca_name(c.channelID));
|
||||
printf ("Exiting CAFE");
|
||||
}
|
||||
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");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
chtype new_ctrlTypeBuffer;
|
||||
@@ -308,38 +325,43 @@ private:
|
||||
struct change_dataBufferSize_PRIMITIVE
|
||||
{
|
||||
#define __METHOD__ "change_dataBufferSize_PRIMITIVE"
|
||||
change_dataBufferSize_PRIMITIVE (const chtype & new_dataTypeBufferNative): new_dataTypeBufferNative(new_dataTypeBufferNative){}
|
||||
change_dataBufferSize_PRIMITIVE (const chtype & new_dataTypeBufferNative): new_dataTypeBufferNative(new_dataTypeBufferNative) {}
|
||||
|
||||
void operator() (Conduit& c) {
|
||||
void operator() (Conduit& c)
|
||||
{
|
||||
|
||||
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() ) {
|
||||
cout << "putBuffer already exists= " << c.putBuffer << " for channel " << c.pv
|
||||
<< " with handle " << c.handle << endl;
|
||||
cout << "Freeing and reallocating putBuffer" << endl;
|
||||
> 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;
|
||||
free(c.putBuffer);
|
||||
allocateMemory=true;
|
||||
}
|
||||
|
||||
if (allocateMemory) {
|
||||
//cout << "sizeof c.putBuffer " << dbr_size_n(c.channelRequestMetaPrimitive.getDbrDataType(),
|
||||
// c.channelRequestMetaPrimitive.getNelem()) << endl;
|
||||
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(),
|
||||
c.channelRequestMetaPrimitive.getNelem()));
|
||||
c.channelRequestMetaPrimitive.getNelem()));
|
||||
|
||||
c.channelRequestMetaPrimitive.byteSize
|
||||
=dbr_size_n(c.channelRequestMetaPrimitive.getDbrDataType(),
|
||||
c.channelRequestMetaPrimitive.getNelem());
|
||||
=dbr_size_n(c.channelRequestMetaPrimitive.getDbrDataType(),
|
||||
c.channelRequestMetaPrimitive.getNelem());
|
||||
}
|
||||
|
||||
if (c.putBuffer==0){
|
||||
cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__ << endl;
|
||||
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");
|
||||
exit(0);
|
||||
@@ -361,39 +383,43 @@ private:
|
||||
struct change_dataBufferSize_STSACK
|
||||
{
|
||||
#define __METHOD__ "change_dataBufferSize_STSACK"
|
||||
change_dataBufferSize_STSACK (){}
|
||||
change_dataBufferSize_STSACK () {}
|
||||
|
||||
void operator() (Conduit& c) {
|
||||
void operator() (Conduit& c)
|
||||
{
|
||||
|
||||
bool allocateMemory=false ;
|
||||
|
||||
if(c.stsackBuffer==NULL) {
|
||||
if(c.stsackBuffer==NULL)
|
||||
{
|
||||
|
||||
allocateMemory=true;
|
||||
allocateMemory=true;
|
||||
}
|
||||
|
||||
else if ( dbr_size_n(c.channelRequestMetaSTSACK.getDbrDataType(),
|
||||
c.channelRequestMetaSTSACK.getNelem())
|
||||
> c.channelRequestMetaSTSACK.getByteSize() ) {
|
||||
cout << "stsackBuffer already exists= " << c.stsackBuffer << " for channel " << c.pv
|
||||
<< " with handle " << c.handle << endl;
|
||||
cout << "Freeing and reallocating putBuffer" << endl;
|
||||
> 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;
|
||||
free(c.stsackBuffer);
|
||||
allocateMemory=true;
|
||||
}
|
||||
|
||||
if (allocateMemory) {
|
||||
//cout << "sizeof c.stsackBuffer " << dbr_size_n(c.channelRequestMetaSTSACK.getDbrDataType(),
|
||||
// c.channelRequestMetaSTSACK.getNelem()) << endl;
|
||||
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(),
|
||||
c.channelRequestMetaSTSACK.getNelem()));
|
||||
c.channelRequestMetaSTSACK.getNelem()));
|
||||
|
||||
c.channelRequestMetaSTSACK.byteSize
|
||||
=dbr_size_n(c.channelRequestMetaSTSACK.getDbrDataType(),
|
||||
c.channelRequestMetaSTSACK.getNelem());
|
||||
=dbr_size_n(c.channelRequestMetaSTSACK.getDbrDataType(),
|
||||
c.channelRequestMetaSTSACK.getNelem());
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
#undef __METHOD__
|
||||
};
|
||||
|
||||
@@ -406,42 +432,47 @@ struct change_dataBufferSize_TIME
|
||||
{
|
||||
#define __METHOD__ "change_dataBufferSize_PRIMITIVE"
|
||||
|
||||
change_dataBufferSize_TIME (const chtype & new_dataTypeBuffer): new_dataTypeBuffer(new_dataTypeBuffer){}
|
||||
change_dataBufferSize_TIME (const chtype & new_dataTypeBuffer): new_dataTypeBuffer(new_dataTypeBuffer) {}
|
||||
|
||||
void operator() (Conduit& c) {
|
||||
void operator() (Conduit& c)
|
||||
{
|
||||
|
||||
// Free buffer on re-connection
|
||||
// Check Byte size first!!!
|
||||
|
||||
bool allocateMemory=false ;
|
||||
// Check Byte size first!!!
|
||||
|
||||
|
||||
if(c.dataBuffer==NULL) {
|
||||
|
||||
allocateMemory=true;
|
||||
}
|
||||
|
||||
else if ( dbr_size_n(new_dataTypeBuffer,c.channelRegalia.getNelem()) > c.channelRequestMetaData.getByteSize() ) {
|
||||
cout << "dataBuffer already exists= " << c.dataBuffer << " for channel " << c.pv
|
||||
<< " with handle " << c.handle << endl;
|
||||
cout << "Freeing and reallocating dataBuffer" << endl;
|
||||
bool allocateMemory=false ;
|
||||
|
||||
cout << dbr_size_n(new_dataTypeBuffer,c.channelRegalia.getNelem()) << " VERSUS "
|
||||
<< c.channelRequestMetaData.getByteSize() << endl;
|
||||
|
||||
if(c.dataBuffer==NULL)
|
||||
{
|
||||
|
||||
allocateMemory=true;
|
||||
}
|
||||
|
||||
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;
|
||||
|
||||
std::cout << dbr_size_n(new_dataTypeBuffer,c.channelRegalia.getNelem()) << " VERSUS "
|
||||
<< c.channelRequestMetaData.getByteSize() << std::endl;
|
||||
free(c.dataBuffer);
|
||||
allocateMemory=true;
|
||||
|
||||
}
|
||||
|
||||
if (allocateMemory) {
|
||||
//cout << "sizeof c.dataBuffer " << dbr_size_n(new_dataTypeBuffer,c.channelRegalia.getNelem()) << endl;
|
||||
c.dataBuffer = (db_access_val *) malloc ( dbr_size_n(new_dataTypeBuffer,c.channelRegalia.getNelem()) );
|
||||
}
|
||||
|
||||
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){
|
||||
cout << __FILE__ << "/" << __LINE__ << "/" << __METHOD__ << endl;
|
||||
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");
|
||||
|
||||
@@ -460,25 +491,30 @@ private:
|
||||
*/
|
||||
struct free_dataBuffers
|
||||
{
|
||||
free_dataBuffers (){}
|
||||
free_dataBuffers () {}
|
||||
|
||||
void operator() (Conduit& c) {
|
||||
void operator() (Conduit& c)
|
||||
{
|
||||
|
||||
//cout << "c.handle=" << c.handle << " " << c.pv << endl;
|
||||
//std::cout << "c.handle=" << c.handle << " " << c.pv << std::endl;
|
||||
|
||||
if(c.dataBuffer) {
|
||||
free(c.dataBuffer); // _TIME data buffer for ca_get
|
||||
if(c.dataBuffer)
|
||||
{
|
||||
free(c.dataBuffer); // _TIME data buffer for ca_get
|
||||
}
|
||||
|
||||
if(c.ctrlBuffer) {
|
||||
free(c.ctrlBuffer); // _CTRL data buffer for ca_get
|
||||
if(c.ctrlBuffer)
|
||||
{
|
||||
free(c.ctrlBuffer); // _CTRL data buffer for ca_get
|
||||
}
|
||||
|
||||
if(c.stsackBuffer) {
|
||||
free(c.stsackBuffer); // _STSACK_STRING data buffer for ca_get
|
||||
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
|
||||
}
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -21,7 +21,7 @@
|
||||
* \param _ccc ca_client_context
|
||||
* \param _groupID unique group identifier (CA_SYNC_GID)
|
||||
* \param _nMember number of members in group
|
||||
* \param _memberCC CAFEConduit object representing each group member
|
||||
* \param _memberCC CAFEConduit object representing each group member
|
||||
* \param _groupStatus groupStatus: error indicates >0 members have an error
|
||||
*/
|
||||
class ConduitGroup
|
||||
@@ -31,12 +31,12 @@ class ConduitGroup
|
||||
friend struct change_timeout_sg_pend_io;
|
||||
friend struct change_sg_rule;
|
||||
friend class Connect;
|
||||
|
||||
private:
|
||||
|
||||
private:
|
||||
static unsigned int groupHandleNext;
|
||||
unsigned int nMember;
|
||||
ca_client_context * ccc;
|
||||
|
||||
|
||||
double timeout_sg_pend_io;
|
||||
|
||||
ChannelTimeoutPolicy channelTimeoutPolicySGGet;
|
||||
@@ -49,7 +49,7 @@ private:
|
||||
os<< "handle=" << e.groupHandle<<" name=" << e.groupName<< " nMember=" << e.nMember << std::endl;
|
||||
return os;
|
||||
};
|
||||
|
||||
|
||||
public:
|
||||
std::string groupName;
|
||||
unsigned int groupHandle;
|
||||
@@ -59,30 +59,63 @@ public:
|
||||
bool * mRule;
|
||||
|
||||
unsigned int * mHandle;
|
||||
|
||||
|
||||
|
||||
virtual ~ConduitGroup();
|
||||
|
||||
|
||||
ConduitGroup();
|
||||
ConduitGroup(const char * _groupName, ca_client_context * _ccc, CA_SYNC_GID _groupID,
|
||||
unsigned int _nMember, unsigned int * _handle);
|
||||
unsigned int _nMember, unsigned int * _handle);
|
||||
|
||||
int get(void) const;
|
||||
int put(void) const;
|
||||
|
||||
ca_client_context * getClientContext(void) const {return ccc;};
|
||||
const char * getGroupName(void) const {return groupName.c_str();};
|
||||
string getGroupNameAsString(void) const {return groupName;};
|
||||
CA_SYNC_GID getGroupID(void) const {return groupID;};
|
||||
unsigned int getNMember(void) const {return nMember;};
|
||||
int * getStatus(void) const {return mStatus;};
|
||||
bool * getRule(void) const {return mRule;};
|
||||
bool getRule(unsigned int i) const {return mRule[i];};
|
||||
unsigned int getGroupHandle(void) const {return groupHandle;};
|
||||
ChannelTimeoutPolicy getChannelTimeoutPolicySGPut(void) const {return channelTimeoutPolicySGPut;};
|
||||
ChannelTimeoutPolicy getChannelTimeoutPolicySGGet(void) const {return channelTimeoutPolicySGGet;};
|
||||
|
||||
};
|
||||
|
||||
ca_client_context * getClientContext(void) const
|
||||
{
|
||||
return ccc;
|
||||
};
|
||||
const char * getGroupName(void) const
|
||||
{
|
||||
return groupName.c_str();
|
||||
};
|
||||
std::string getGroupNameAsString(void) const
|
||||
{
|
||||
return groupName;
|
||||
};
|
||||
CA_SYNC_GID getGroupID(void) const
|
||||
{
|
||||
return groupID;
|
||||
};
|
||||
unsigned int getNMember(void) const
|
||||
{
|
||||
return nMember;
|
||||
};
|
||||
int * getStatus(void) const
|
||||
{
|
||||
return mStatus;
|
||||
};
|
||||
bool * getRule(void) const
|
||||
{
|
||||
return mRule;
|
||||
};
|
||||
bool getRule(unsigned int i) const
|
||||
{
|
||||
return mRule[i];
|
||||
};
|
||||
unsigned int getGroupHandle(void) const
|
||||
{
|
||||
return groupHandle;
|
||||
};
|
||||
ChannelTimeoutPolicy getChannelTimeoutPolicySGPut(void) const
|
||||
{
|
||||
return channelTimeoutPolicySGPut;
|
||||
};
|
||||
ChannelTimeoutPolicy getChannelTimeoutPolicySGGet(void) const
|
||||
{
|
||||
return channelTimeoutPolicySGGet;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -92,14 +125,17 @@ public:
|
||||
*/
|
||||
struct change_sg_rule
|
||||
{
|
||||
change_sg_rule (const bool & new_rule, const unsigned int & iMember):
|
||||
new_rule(new_rule),iMember(iMember){}
|
||||
change_sg_rule (const bool & new_rule, const unsigned int & iMember):
|
||||
new_rule(new_rule),iMember(iMember) {}
|
||||
|
||||
void operator() (ConduitGroup& g) {g.mRule[iMember] = new_rule;}
|
||||
void operator() (ConduitGroup& g)
|
||||
{
|
||||
g.mRule[iMember] = new_rule;
|
||||
}
|
||||
|
||||
private:
|
||||
bool new_rule;
|
||||
unsigned int iMember;
|
||||
bool new_rule;
|
||||
unsigned int iMember;
|
||||
};
|
||||
|
||||
|
||||
@@ -108,16 +144,17 @@ private:
|
||||
*/
|
||||
struct change_sg_status
|
||||
{
|
||||
change_sg_status (const int & new_status, const unsigned int & iMember):
|
||||
new_status(new_status),iMember(iMember){}
|
||||
change_sg_status (const int & new_status, const unsigned int & iMember):
|
||||
new_status(new_status),iMember(iMember) {}
|
||||
|
||||
void operator() (ConduitGroup& g) {
|
||||
g.mStatus[iMember] = new_status;
|
||||
}
|
||||
void operator() (ConduitGroup& g)
|
||||
{
|
||||
g.mStatus[iMember] = new_status;
|
||||
}
|
||||
|
||||
private:
|
||||
int new_status;
|
||||
unsigned int iMember;
|
||||
int new_status;
|
||||
unsigned int iMember;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -127,9 +164,12 @@ private:
|
||||
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) {g.timeout_sg_pend_io = new_timeout_sg_pend_io;}
|
||||
|
||||
new_timeout_sg_pend_io(new_timeout_sg_pend_io) {}
|
||||
void operator() (ConduitGroup& g)
|
||||
{
|
||||
g.timeout_sg_pend_io = new_timeout_sg_pend_io;
|
||||
}
|
||||
|
||||
private:
|
||||
double new_timeout_sg_pend_io;
|
||||
};
|
||||
@@ -141,9 +181,10 @@ private:
|
||||
struct change_channelTimeoutPolicySGGet
|
||||
{
|
||||
change_channelTimeoutPolicySGGet (const ChannelTimeoutPolicy & new_channelTimeoutPolicy):
|
||||
new_channelTimeoutPolicy(new_channelTimeoutPolicy){}
|
||||
new_channelTimeoutPolicy(new_channelTimeoutPolicy) {}
|
||||
|
||||
void operator() (ConduitGroup & g) {
|
||||
void operator() (ConduitGroup & g)
|
||||
{
|
||||
//This does a deep copy!
|
||||
g.channelTimeoutPolicySGGet = new_channelTimeoutPolicy;
|
||||
}
|
||||
@@ -158,9 +199,10 @@ private:
|
||||
struct change_channelTimeoutPolicySGPut
|
||||
{
|
||||
change_channelTimeoutPolicySGPut (const ChannelTimeoutPolicy & new_channelTimeoutPolicy):
|
||||
new_channelTimeoutPolicy(new_channelTimeoutPolicy){}
|
||||
new_channelTimeoutPolicy(new_channelTimeoutPolicy) {}
|
||||
|
||||
void operator() (ConduitGroup & g) {
|
||||
void operator() (ConduitGroup & g)
|
||||
{
|
||||
//This does a deep copy!
|
||||
g.channelTimeoutPolicySGPut = 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 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 `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). */
|
||||
/* #undef HAVE_LIBPYTHON3_8 */
|
||||
|
||||
/* Define to 1 if you have the `Qt5Core' library (-lQt5Core). */
|
||||
#define HAVE_LIBQT5CORE 1
|
||||
|
||||
/* Define to 1 if you have the `Qt5Xml' library (-lQt5Xml). */
|
||||
#define HAVE_LIBQT5XML 1
|
||||
|
||||
/* 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 */
|
||||
/* #undef HAVE_PYCAFE_EXT */
|
||||
|
||||
/* Availability of python */
|
||||
/* #undef HAVE_PYTHON */
|
||||
|
||||
/* Define to 1 if you have the <Python.h> header file. */
|
||||
/* #undef HAVE_PYTHON_H */
|
||||
|
||||
/* 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.18.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.18.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.18.0"
|
||||
1448
include/connect.h
1448
include/connect.h
File diff suppressed because it is too large
Load Diff
@@ -10,12 +10,11 @@
|
||||
#include <cadef.h>
|
||||
#include <iostream>
|
||||
|
||||
|
||||
#define EV EPICSVERSION(HAVE_EPICS)
|
||||
|
||||
#if (EPICS_VERSION==3) && (EPICS_MAJOR==14) && (EPICS_MINOR>=11)
|
||||
#if (EPICS_MAJOR==3) && (EPICS_MINOR==14) && (EPICS_PATCH>=11)
|
||||
#define MASK_CTRL DBE_VALUE | DBE_LOG | DBE_ALARM | DBE_PROPERTY
|
||||
#elif (EPICS_VERSION==3) && (EPICS_MAJOR>14)
|
||||
#elif (EPICS_MAJOR==3) && (EPICS_MINOR>14)
|
||||
#define MASK_CTRL DBE_VALUE | DBE_LOG | DBE_ALARM | DBE_PROPERTY
|
||||
#else
|
||||
#define MASK_CTRL DBE_VALUE | DBE_LOG | DBE_ALARM
|
||||
@@ -27,7 +26,44 @@ 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
|
||||
{
|
||||
short llsv;
|
||||
short lsv;
|
||||
short hsv;
|
||||
short hhsv;
|
||||
};
|
||||
|
||||
struct etsDatePrevious
|
||||
{
|
||||
int year;
|
||||
int mon;
|
||||
int day;
|
||||
int hour;
|
||||
int min;
|
||||
int sec;
|
||||
unsigned long nsec;
|
||||
};
|
||||
|
||||
struct etsDate
|
||||
{
|
||||
int year;
|
||||
int mon;
|
||||
int day;
|
||||
int hour;
|
||||
int min;
|
||||
int sec;
|
||||
unsigned long nsec;
|
||||
int wday;
|
||||
int yday;
|
||||
int isdst;
|
||||
};
|
||||
|
||||
struct etsNorm
|
||||
{
|
||||
unsigned int secPastEpoch;
|
||||
unsigned int nsec;
|
||||
};
|
||||
/**
|
||||
* Define pCallback \n
|
||||
*/
|
||||
@@ -46,7 +82,7 @@ const short PVGROUP_PSEUDO_SIZE=1024; //determines max size of groupNameEntry fo
|
||||
//List all possible deliminators; code will separate dev/attriby when first of this list is found;
|
||||
const std::string DEFAULT_DEVICE_ATTRIBUTE_DELIMINATOR=":"; //Only one deliminator
|
||||
|
||||
typedef char pv_string_t[PVNAME_SIZE];
|
||||
typedef char pv_string_t[PVNAME_SIZE];
|
||||
|
||||
/**
|
||||
* Default configuration parameters. Recall that if pend_event is too short \n
|
||||
@@ -54,6 +90,7 @@ typedef char pv_string_t[PVNAME_SIZE];
|
||||
*/
|
||||
const bool DEFAULT_SELF_GOVERNING_TIMEOUT = true;
|
||||
|
||||
|
||||
const double DEFAULT_TIMEOUT_PEND_IO_WF = 5.0;
|
||||
const double TIMEOUT_PEND_IO_MIN = 0.0001;
|
||||
const double TIMEOUT_PEND_IO_MAX = 20.0; // max timeout for first attempt (ntries=1)
|
||||
@@ -65,16 +102,32 @@ const double PEND_IO_INCREMENT_TIME_MAX= 10.0;
|
||||
const double DEFAULT_TIMEOUT_PEND_EVENT = 0.4;
|
||||
const double DEFAULT_TIMEOUT_PEND_IO = 0.4; // previously 3.0
|
||||
const double DEFAULT_TIMEOUT_SG_PEND_EVENT = 0.5; // plus nMember/NMEMBER_PER_SEC_SG_PEND_EVENT
|
||||
const double NMEMBER_PER_SEC_SG_PEND_EVENT = 400; //
|
||||
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 MAX_NELEM_FOR_STSACK_BUFFER = 1;
|
||||
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 = 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 = 100; //Size of map to store history of pulseIDs;
|
||||
|
||||
|
||||
#endif // DEFINES_H
|
||||
|
||||
@@ -14,20 +14,22 @@
|
||||
#include <cstring>
|
||||
#include <helper.h>
|
||||
|
||||
class collectionMember {
|
||||
class collectionMember
|
||||
{
|
||||
public:
|
||||
collectionMember():deviceName(""),devicePosition(0){};
|
||||
virtual ~collectionMember(){};
|
||||
std::string deviceName;
|
||||
float devicePosition;
|
||||
collectionMember():deviceName(""),devicePosition(0) {};
|
||||
virtual ~collectionMember() {};
|
||||
std::string deviceName;
|
||||
float devicePosition;
|
||||
};
|
||||
|
||||
class deviceCollection {
|
||||
class deviceCollection
|
||||
{
|
||||
friend class Connect;
|
||||
friend class CAFE;
|
||||
//if HAVE_LIBQTXML
|
||||
//if HAVE_LIBQTXML
|
||||
friend class loadCollectionXMLParser;
|
||||
//endif
|
||||
//endif
|
||||
private:
|
||||
std::string name;
|
||||
std::string description;
|
||||
@@ -36,26 +38,45 @@ private:
|
||||
|
||||
Helper helper;
|
||||
public:
|
||||
deviceCollection():description("collection of devices"){};
|
||||
virtual ~deviceCollection(){};
|
||||
deviceCollection():description("collection of devices") {};
|
||||
virtual ~deviceCollection() {};
|
||||
|
||||
std::string getName() const {return name;};
|
||||
std::string getDescription() const {return description;};
|
||||
std::vector<collectionMember> getCMembers() const {return cMembers;};
|
||||
|
||||
std::vector<std::string> getAttributes() const {return attributes;};
|
||||
std::vector<float> getPositions() {
|
||||
std::vector<float> posV; posV.clear(); posV.reserve(cMembers.size());
|
||||
for (size_t i=0; i<cMembers.size(); ++i) {
|
||||
posV.push_back(cMembers[i].devicePosition);
|
||||
};
|
||||
return posV;
|
||||
std::string getName() const
|
||||
{
|
||||
return name;
|
||||
};
|
||||
float getPosition(const char * c) {
|
||||
std::string getDescription() const
|
||||
{
|
||||
return description;
|
||||
};
|
||||
std::vector<collectionMember> getCMembers() const
|
||||
{
|
||||
return cMembers;
|
||||
};
|
||||
|
||||
std::vector<std::string> getAttributes() const
|
||||
{
|
||||
return attributes;
|
||||
};
|
||||
std::vector<float> getPositions()
|
||||
{
|
||||
std::vector<float> posV;
|
||||
posV.clear();
|
||||
posV.reserve(cMembers.size());
|
||||
for (size_t i=0; i<cMembers.size(); ++i)
|
||||
{
|
||||
posV.push_back(cMembers[i].devicePosition);
|
||||
};
|
||||
return posV;
|
||||
};
|
||||
float getPosition(const char * c)
|
||||
{
|
||||
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;
|
||||
}
|
||||
}
|
||||
@@ -64,32 +85,44 @@ public:
|
||||
return -1;
|
||||
}
|
||||
|
||||
std::vector<std::string> getMembers() {
|
||||
std::vector<std::string> memberV; memberV.clear(); memberV.reserve(cMembers.size());
|
||||
for (size_t i=0; i<cMembers.size(); ++i) {
|
||||
memberV.push_back(cMembers[i].deviceName);
|
||||
};
|
||||
return memberV;
|
||||
std::vector<std::string> getMembers()
|
||||
{
|
||||
std::vector<std::string> memberV;
|
||||
memberV.clear();
|
||||
memberV.reserve(cMembers.size());
|
||||
for (size_t i=0; i<cMembers.size(); ++i)
|
||||
{
|
||||
memberV.push_back(cMembers[i].deviceName);
|
||||
};
|
||||
return memberV;
|
||||
};
|
||||
|
||||
unsigned int getNCollectionMembers() const {return cMembers.size();};
|
||||
unsigned int getNAttribuites() const {return attributes.size();};
|
||||
unsigned int getNCollectionMembers() const
|
||||
{
|
||||
return cMembers.size();
|
||||
};
|
||||
unsigned int getNAttribuites() const
|
||||
{
|
||||
return attributes.size();
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
class collectionInGroup {
|
||||
//friend class loadGroupXMLParser;
|
||||
class collectionInGroup
|
||||
{
|
||||
//friend class loadGroupXMLParser;
|
||||
public:
|
||||
collectionInGroup(){};
|
||||
virtual ~collectionInGroup(){};
|
||||
std::string id;
|
||||
std::string attrib;
|
||||
collectionInGroup() {};
|
||||
virtual ~collectionInGroup() {};
|
||||
std::string id;
|
||||
std::string attrib;
|
||||
};
|
||||
|
||||
class deviceGroup {
|
||||
//if HAVE_LIBQTXML
|
||||
class deviceGroup
|
||||
{
|
||||
//if HAVE_LIBQTXML
|
||||
friend class loadGroupXMLParser;
|
||||
//endif
|
||||
//endif
|
||||
private:
|
||||
std::string id;
|
||||
std::string description;
|
||||
@@ -98,16 +131,34 @@ private:
|
||||
std::vector<std::string> xmlMembers;
|
||||
std::vector<collectionInGroup> collections;
|
||||
public:
|
||||
deviceGroup(){};
|
||||
virtual ~deviceGroup(){};
|
||||
deviceGroup() {};
|
||||
virtual ~deviceGroup() {};
|
||||
|
||||
std::string getName() const {return id;};
|
||||
std::string getID() const {return id;};
|
||||
std::string getName() const
|
||||
{
|
||||
return id;
|
||||
};
|
||||
std::string getID() const
|
||||
{
|
||||
return id;
|
||||
};
|
||||
|
||||
std::string getDescription() const {return description;};
|
||||
std::vector<collectionMember> getCMembers() const {return members;};
|
||||
std::vector<collectionInGroup> getCollections() const {return collections;};
|
||||
std::vector<std::string>getXMLMembers() const {return xmlMembers;};
|
||||
std::string getDescription() const
|
||||
{
|
||||
return description;
|
||||
};
|
||||
std::vector<collectionMember> getCMembers() const
|
||||
{
|
||||
return members;
|
||||
};
|
||||
std::vector<collectionInGroup> getCollections() const
|
||||
{
|
||||
return collections;
|
||||
};
|
||||
std::vector<std::string>getXMLMembers() const
|
||||
{
|
||||
return xmlMembers;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -43,12 +43,14 @@ 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!";
|
||||
<< " DOES NOT HAVE A STRING EQUIVALENT!";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -69,17 +71,18 @@ inline std::istream& operator>>(std::istream& str, enumRefHolder<T> const& data)
|
||||
|
||||
if ( std::find( boost::begin(enumStrings<T>::data), boost::end( enumStrings<T>::data), value) !=
|
||||
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 ) ));
|
||||
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;
|
||||
<< " is out of enum range = " << boost::size( enumStrings<T>::data) << std::endl;
|
||||
}
|
||||
|
||||
return str;
|
||||
@@ -87,10 +90,16 @@ inline std::istream& operator>>(std::istream& str, enumRefHolder<T> const& data)
|
||||
|
||||
|
||||
template<typename T>
|
||||
enumConstRefHolder<T> enumToString(T const& e) {return enumConstRefHolder<T>(e);}
|
||||
enumConstRefHolder<T> enumToString(T const& e)
|
||||
{
|
||||
return enumConstRefHolder<T>(e);
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
enumRefHolder<T> enumFromString(T& e) {return enumRefHolder<T>(e);}
|
||||
enumRefHolder<T> enumFromString(T& e)
|
||||
{
|
||||
return enumRefHolder<T>(e);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user