31 Commits

Author SHA1 Message Date
a1c964f771 epics 7.0.8 2024-07-10 16:00:57 +02:00
df07cf1a29 v1.20.1 2024-07-04 11:47:27 +02:00
7b517f2fa6 changes from Nov. 2023 2024-02-08 14:23:15 +01:00
b00167016e testing wf behaviour thru ca gateway 2023-07-06 10:01:36 +02:00
33bbcde48a cafe-1.19.0-py38-gcc-7.5.0 2023-06-19 10:24:07 +02:00
7b052a21fc Updated windows makefiles and config.h to build on windows VSC2019 - L. Rettig (FHI) 2023-01-26 11:51:15 +01:00
d40ecbc53c rm cached 2023-01-16 13:17:50 +01:00
9b5803b7f0 config.h for cpp build 2023-01-16 07:17:01 +01:00
7e31c8fd80 missing config.h now included 2023-01-15 19:07:40 +01:00
64fda927e0 cafe-1.16.1 2022-08-04 10:16:44 +02:00
9851b72ba2 new commit 2022-06-28 10:14:07 +02:00
8c671dee59 investigated cafeMutex not resolved for py35 on RH7 2022-05-12 09:36:50 +02:00
844afa0a02 1.15.0 update 2022-03-11 14:40:13 +01:00
4cab5862dc m4 directory added 2022-01-06 14:19:28 +01:00
c2934ce3f7 py 3.10 option in configure.ac 2022-01-06 13:21:59 +01:00
7c779d9add py 3.10 option in configure.ac 2022-01-06 13:16:36 +01:00
80ce12d374 reset status in getCache (PVDataHolder) following put with nowtaccess error 2021-10-17 16:43:20 +02:00
90e063f930 reset status in getCache following put with nowtaccess error 2021-10-14 19:32:28 +02:00
cc804d2e7b testing getUnits for cython 2021-08-11 15:34:25 +02:00
cecf4a3f11 helper functions used to extract handle_index in instant.h for pyvind11 compatability 2021-07-27 16:49:07 +02:00
275bf4ad10 modified py fns for cycafe callbacks 2021-06-15 16:14:50 +02:00
22583f38b6 cafe-1.13.0 configure.ac unary test to string 2021-03-22 18:43:10 +01:00
5f5cfc97fa cafe-1.13.0 configure.ac unary test xtrue 2021-03-22 17:49:57 +01:00
6006091f2e cafe-1.13.0 2021-03-22 12:39:02 +01:00
7ba4128448 cafe-1.12.5 release 2021-03-16 09:30:56 +01:00
7504b0a539 rm unwanted files in cache 2019-01-11 15:13:00 +01:00
d459a98a4f rm configure6064 from cache 2018-12-19 12:04:19 +01:00
dc1759933f rm autogen_cafepy3.sh from cache 2018-12-19 11:59:09 +01:00
ab743baa8b fixed getString in transpose.cpp for ENUM types for STS and TIME datatypes; indents made consistent; angled brackets for headers 2018-12-19 11:56:16 +01:00
b09186294d new release 2018-12-14 15:54:11 +01:00
52fe50f14a open methods refined 2017-11-22 14:12:01 +01:00
215 changed files with 1861314 additions and 447619 deletions

28
.gitignore vendored
View File

@@ -1,19 +1,41 @@
# 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/bitshuffle/.deps/*
src/.libs/*
examples/cafeTest/*.*-
doc
compile

317
INSTALL
View File

@@ -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-2016 Free Software
Foundation, Inc.
Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
@@ -12,97 +12,96 @@ without warranty of any kind.
Basic Installation
==================
Briefly, the shell commands `./configure; make; make install' should
configure, build, and install this package. The following
more-detailed instructions are generic; see the `README' file for
Briefly, the shell command './configure && make && make install'
should configure, build, and install this package. The following
more-detailed instructions are generic; see the 'README' file for
instructions specific to this package. Some packages provide this
`INSTALL' file but do not implement all of the features documented
'INSTALL' file but do not implement all of the features documented
below. The lack of an optional feature in a given package is not
necessarily a bug. More recommendations for GNU packages can be found
in *note Makefile Conventions: (standards)Makefile Conventions.
The `configure' shell script attempts to guess correct values for
The 'configure' shell script attempts to guess correct values for
various system-dependent variables used during compilation. It uses
those values to create a `Makefile' in each directory of the package.
It may also create one or more `.h' files containing system-dependent
definitions. Finally, it creates a shell script `config.status' that
those values to create a 'Makefile' in each directory of the package.
It may also create one or more '.h' files containing system-dependent
definitions. Finally, it creates a shell script 'config.status' that
you can run in the future to recreate the current configuration, and a
file `config.log' containing compiler output (useful mainly for
debugging `configure').
file 'config.log' containing compiler output (useful mainly for
debugging 'configure').
It can also use an optional file (typically called `config.cache'
and enabled with `--cache-file=config.cache' or simply `-C') that saves
the results of its tests to speed up reconfiguring. Caching is
disabled by default to prevent problems with accidental use of stale
cache files.
It can also use an optional file (typically called 'config.cache' and
enabled with '--cache-file=config.cache' or simply '-C') that saves the
results of its tests to speed up reconfiguring. Caching is disabled by
default to prevent problems with accidental use of stale cache files.
If you need to do unusual things to compile the package, please try
to figure out how `configure' could check whether to do them, and mail
diffs or instructions to the address given in the `README' so they can
to figure out how 'configure' could check whether to do them, and mail
diffs or instructions to the address given in the 'README' so they can
be considered for the next release. If you are using the cache, and at
some point `config.cache' contains results you don't want to keep, you
some point 'config.cache' contains results you don't want to keep, you
may remove or edit it.
The file `configure.ac' (or `configure.in') is used to create
`configure' by a program called `autoconf'. You need `configure.ac' if
you want to change it or regenerate `configure' using a newer version
of `autoconf'.
The file 'configure.ac' (or 'configure.in') is used to create
'configure' by a program called 'autoconf'. You need 'configure.ac' if
you want to change it or regenerate 'configure' using a newer version of
'autoconf'.
The simplest way to compile this package is:
1. `cd' to the directory containing the package's source code and type
`./configure' to configure the package for your system.
1. 'cd' to the directory containing the package's source code and type
'./configure' to configure the package for your system.
Running `configure' might take a while. While running, it prints
Running 'configure' might take a while. While running, it prints
some messages telling which features it is checking for.
2. Type `make' to compile the package.
2. Type 'make' to compile the package.
3. Optionally, type `make check' to run any self-tests that come with
3. Optionally, type 'make check' to run any self-tests that come with
the package, generally using the just-built uninstalled binaries.
4. Type `make install' to install the programs and any data files and
4. Type 'make install' to install the programs and any data files and
documentation. When installing into a prefix owned by root, it is
recommended that the package be configured and built as a regular
user, and only the `make install' phase executed with root
user, and only the 'make install' phase executed with root
privileges.
5. Optionally, type `make installcheck' to repeat any self-tests, but
5. Optionally, type 'make installcheck' to repeat any self-tests, but
this time using the binaries in their final installed location.
This target does not install anything. Running this target as a
regular user, particularly if the prior `make install' required
regular user, particularly if the prior 'make install' required
root privileges, verifies that the installation completed
correctly.
6. You can remove the program binaries and object files from the
source code directory by typing `make clean'. To also remove the
files that `configure' created (so you can compile the package for
a different kind of computer), type `make distclean'. There is
also a `make maintainer-clean' target, but that is intended mainly
source code directory by typing 'make clean'. To also remove the
files that 'configure' created (so you can compile the package for
a different kind of computer), type 'make distclean'. There is
also a 'make maintainer-clean' target, but that is intended mainly
for the package's developers. If you use it, you may have to get
all sorts of other programs in order to regenerate files that came
with the distribution.
7. Often, you can also type `make uninstall' to remove the installed
7. Often, you can also type 'make uninstall' to remove the installed
files again. In practice, not all packages have tested that
uninstallation works correctly, even though it is required by the
GNU Coding Standards.
8. Some packages, particularly those that use Automake, provide `make
8. Some packages, particularly those that use Automake, provide 'make
distcheck', which can by used by developers to test that all other
targets like `make install' and `make uninstall' work correctly.
targets like 'make install' and 'make uninstall' work correctly.
This target is generally not run by end users.
Compilers and Options
=====================
Some systems require unusual options for compilation or linking that
the `configure' script does not know about. Run `./configure --help'
the 'configure' script does not know about. Run './configure --help'
for details on some of the pertinent environment variables.
You can give `configure' initial values for configuration parameters
by setting variables in the command line or in the environment. Here
is an example:
You can give 'configure' initial values for configuration parameters
by setting variables in the command line or in the environment. Here is
an example:
./configure CC=c99 CFLAGS=-g LIBS=-lposix
@@ -113,21 +112,21 @@ Compiling For Multiple Architectures
You can compile the package for more than one kind of computer at the
same time, by placing the object files for each architecture in their
own directory. To do this, you can use GNU `make'. `cd' to the
own directory. To do this, you can use GNU 'make'. 'cd' to the
directory where you want the object files and executables to go and run
the `configure' script. `configure' automatically checks for the
source code in the directory that `configure' is in and in `..'. This
is known as a "VPATH" build.
the 'configure' script. 'configure' automatically checks for the source
code in the directory that 'configure' is in and in '..'. This is known
as a "VPATH" build.
With a non-GNU `make', it is safer to compile the package for one
With a non-GNU 'make', it is safer to compile the package for one
architecture at a time in the source code directory. After you have
installed the package for one architecture, use `make distclean' before
installed the package for one architecture, use 'make distclean' before
reconfiguring for another architecture.
On MacOS X 10.5 and later systems, you can create libraries and
executables that work on multiple system types--known as "fat" or
"universal" binaries--by specifying multiple `-arch' options to the
compiler but only a single `-arch' option to the preprocessor. Like
"universal" binaries--by specifying multiple '-arch' options to the
compiler but only a single '-arch' option to the preprocessor. Like
this:
./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
@@ -136,100 +135,104 @@ this:
This is not guaranteed to produce working output in all cases, you
may have to build one architecture at a time and combine the results
using the `lipo' tool if you have problems.
using the 'lipo' tool if you have problems.
Installation Names
==================
By default, `make install' installs the package's commands under
`/usr/local/bin', include files under `/usr/local/include', etc. You
can specify an installation prefix other than `/usr/local' by giving
`configure' the option `--prefix=PREFIX', where PREFIX must be an
By default, 'make install' installs the package's commands under
'/usr/local/bin', include files under '/usr/local/include', etc. You
can specify an installation prefix other than '/usr/local' by giving
'configure' the option '--prefix=PREFIX', where PREFIX must be an
absolute file name.
You can specify separate installation prefixes for
architecture-specific files and architecture-independent files. If you
pass the option `--exec-prefix=PREFIX' to `configure', the package uses
pass the option '--exec-prefix=PREFIX' to 'configure', the package uses
PREFIX as the prefix for installing programs and libraries.
Documentation and other data files still use the regular prefix.
In addition, if you use an unusual directory layout you can give
options like `--bindir=DIR' to specify different values for particular
kinds of files. Run `configure --help' for a list of the directories
you can set and what kinds of files go in them. In general, the
default for these options is expressed in terms of `${prefix}', so that
specifying just `--prefix' will affect all of the other directory
options like '--bindir=DIR' to specify different values for particular
kinds of files. Run 'configure --help' for a list of the directories
you can set and what kinds of files go in them. In general, the default
for these options is expressed in terms of '${prefix}', so that
specifying just '--prefix' will affect all of the other directory
specifications that were not explicitly provided.
The most portable way to affect installation locations is to pass the
correct locations to `configure'; however, many packages provide one or
correct locations to 'configure'; however, many packages provide one or
both of the following shortcuts of passing variable assignments to the
`make install' command line to change installation locations without
'make install' command line to change installation locations without
having to reconfigure or recompile.
The first method involves providing an override variable for each
affected directory. For example, `make install
affected directory. For example, 'make install
prefix=/alternate/directory' will choose an alternate location for all
directory configuration variables that were expressed in terms of
`${prefix}'. Any directories that were specified during `configure',
but not in terms of `${prefix}', must each be overridden at install
time for the entire installation to be relocated. The approach of
makefile variable overrides for each directory variable is required by
the GNU Coding Standards, and ideally causes no recompilation.
However, some platforms have known limitations with the semantics of
shared libraries that end up requiring recompilation when using this
method, particularly noticeable in packages that use GNU Libtool.
'${prefix}'. Any directories that were specified during 'configure',
but not in terms of '${prefix}', must each be overridden at install time
for the entire installation to be relocated. The approach of makefile
variable overrides for each directory variable is required by the GNU
Coding Standards, and ideally causes no recompilation. However, some
platforms have known limitations with the semantics of shared libraries
that end up requiring recompilation when using this method, particularly
noticeable in packages that use GNU Libtool.
The second method involves providing the `DESTDIR' variable. For
example, `make install DESTDIR=/alternate/directory' will prepend
`/alternate/directory' before all installation names. The approach of
`DESTDIR' overrides is not required by the GNU Coding Standards, and
The second method involves providing the 'DESTDIR' variable. For
example, 'make install DESTDIR=/alternate/directory' will prepend
'/alternate/directory' before all installation names. The approach of
'DESTDIR' overrides is not required by the GNU Coding Standards, and
does not work on platforms that have drive letters. On the other hand,
it does better at avoiding recompilation issues, and works well even
when some directory options were not specified in terms of `${prefix}'
at `configure' time.
when some directory options were not specified in terms of '${prefix}'
at 'configure' time.
Optional Features
=================
If the package supports it, you can cause programs to be installed
with an extra prefix or suffix on their names by giving `configure' the
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
with an extra prefix or suffix on their names by giving 'configure' the
option '--program-prefix=PREFIX' or '--program-suffix=SUFFIX'.
Some packages pay attention to `--enable-FEATURE' options to
`configure', where FEATURE indicates an optional part of the package.
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
is something like `gnu-as' or `x' (for the X Window System). The
`README' should mention any `--enable-' and `--with-' options that the
Some packages pay attention to '--enable-FEATURE' options to
'configure', where FEATURE indicates an optional part of the package.
They may also pay attention to '--with-PACKAGE' options, where PACKAGE
is something like 'gnu-as' or 'x' (for the X Window System). The
'README' should mention any '--enable-' and '--with-' options that the
package recognizes.
For packages that use the X Window System, `configure' can usually
For packages that use the X Window System, 'configure' can usually
find the X include and library files automatically, but if it doesn't,
you can use the `configure' options `--x-includes=DIR' and
`--x-libraries=DIR' to specify their locations.
you can use the 'configure' options '--x-includes=DIR' and
'--x-libraries=DIR' to specify their locations.
Some packages offer the ability to configure how verbose the
execution of `make' will be. For these packages, running `./configure
execution of 'make' will be. For these packages, running './configure
--enable-silent-rules' sets the default to minimal output, which can be
overridden with `make V=1'; while running `./configure
overridden with 'make V=1'; while running './configure
--disable-silent-rules' sets the default to verbose, which can be
overridden with `make V=0'.
overridden with 'make V=0'.
Particular systems
==================
On HP-UX, the default C compiler is not ANSI C compatible. If GNU
CC is not installed, it is recommended to use the following options in
On HP-UX, the default C compiler is not ANSI C compatible. If GNU CC
is not installed, it is recommended to use the following options in
order to use an ANSI C compiler:
./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
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
to try
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 to
try
./configure CC="cc"
@@ -237,26 +240,26 @@ and if that doesn't work, try
./configure CC="cc -nodtk"
On Solaris, don't put `/usr/ucb' early in your `PATH'. This
On Solaris, don't put '/usr/ucb' early in your 'PATH'. This
directory contains several dysfunctional programs; working variants of
these programs are available in `/usr/bin'. So, if you need `/usr/ucb'
in your `PATH', put it _after_ `/usr/bin'.
these programs are available in '/usr/bin'. So, if you need '/usr/ucb'
in your 'PATH', put it _after_ '/usr/bin'.
On Haiku, software installed for all users goes in `/boot/common',
not `/usr/local'. It is recommended to use the following options:
On Haiku, software installed for all users goes in '/boot/common',
not '/usr/local'. It is recommended to use the following options:
./configure --prefix=/boot/common
Specifying the System Type
==========================
There may be some features `configure' cannot figure out
There may be some features 'configure' cannot figure out
automatically, but needs to determine by the type of machine the package
will run on. Usually, assuming the package is built to be run on the
_same_ architectures, `configure' can figure that out, but if it prints
_same_ architectures, 'configure' can figure that out, but if it prints
a message saying it cannot guess the machine type, give it the
`--build=TYPE' option. TYPE can either be a short name for the system
type, such as `sun4', or a canonical name which has the form:
'--build=TYPE' option. TYPE can either be a short name for the system
type, such as 'sun4', or a canonical name which has the form:
CPU-COMPANY-SYSTEM
@@ -265,101 +268,101 @@ where SYSTEM can have one of these forms:
OS
KERNEL-OS
See the file `config.sub' for the possible values of each field. If
`config.sub' isn't included in this package, then this package doesn't
See the file 'config.sub' for the possible values of each field. If
'config.sub' isn't included in this package, then this package doesn't
need to know the machine type.
If you are _building_ compiler tools for cross-compiling, you should
use the option `--target=TYPE' to select the type of system they will
use the option '--target=TYPE' to select the type of system they will
produce code for.
If you want to _use_ a cross compiler, that generates code for a
platform different from the build platform, you should specify the
"host" platform (i.e., that on which the generated programs will
eventually be run) with `--host=TYPE'.
eventually be run) with '--host=TYPE'.
Sharing Defaults
================
If you want to set default values for `configure' scripts to share,
you can create a site shell script called `config.site' that gives
default values for variables like `CC', `cache_file', and `prefix'.
`configure' looks for `PREFIX/share/config.site' if it exists, then
`PREFIX/etc/config.site' if it exists. Or, you can set the
`CONFIG_SITE' environment variable to the location of the site script.
A warning: not all `configure' scripts look for a site script.
If you want to set default values for 'configure' scripts to share,
you can create a site shell script called 'config.site' that gives
default values for variables like 'CC', 'cache_file', and 'prefix'.
'configure' looks for 'PREFIX/share/config.site' if it exists, then
'PREFIX/etc/config.site' if it exists. Or, you can set the
'CONFIG_SITE' environment variable to the location of the site script.
A warning: not all 'configure' scripts look for a site script.
Defining Variables
==================
Variables not defined in a site shell script can be set in the
environment passed to `configure'. However, some packages may run
environment passed to 'configure'. However, some packages may run
configure again during the build, and the customized values of these
variables may be lost. In order to avoid this problem, you should set
them in the `configure' command line, using `VAR=value'. For example:
them in the 'configure' command line, using 'VAR=value'. For example:
./configure CC=/usr/local2/bin/gcc
causes the specified `gcc' to be used as the C compiler (unless it is
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:
Unfortunately, this technique does not work for 'CONFIG_SHELL' due to 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
'configure' Invocation
======================
`configure' recognizes the following options to control how it
'configure' recognizes the following options to control how it
operates.
`--help'
`-h'
Print a summary of all of the options to `configure', and exit.
'--help'
'-h'
Print a summary of all of the options to 'configure', and exit.
`--help=short'
`--help=recursive'
'--help=short'
'--help=recursive'
Print a summary of the options unique to this package's
`configure', and exit. The `short' variant lists options used
only in the top level, while the `recursive' variant lists options
also present in any nested packages.
'configure', and exit. The 'short' variant lists options used only
in the top level, while the 'recursive' variant lists options also
present in any nested packages.
`--version'
`-V'
Print the version of Autoconf used to generate the `configure'
'--version'
'-V'
Print the version of Autoconf used to generate the 'configure'
script, and exit.
`--cache-file=FILE'
'--cache-file=FILE'
Enable the cache: use and save the results of the tests in FILE,
traditionally `config.cache'. FILE defaults to `/dev/null' to
traditionally 'config.cache'. FILE defaults to '/dev/null' to
disable caching.
`--config-cache'
`-C'
Alias for `--cache-file=config.cache'.
'--config-cache'
'-C'
Alias for '--cache-file=config.cache'.
`--quiet'
`--silent'
`-q'
'--quiet'
'--silent'
'-q'
Do not print messages saying which checks are being made. To
suppress all normal output, redirect it to `/dev/null' (any error
suppress all normal output, redirect it to '/dev/null' (any error
messages will still be shown).
`--srcdir=DIR'
'--srcdir=DIR'
Look for the package's source code in directory DIR. Usually
`configure' can determine that directory automatically.
'configure' can determine that directory automatically.
`--prefix=DIR'
Use DIR as the installation prefix. *note Installation Names::
for more details, including other options available for fine-tuning
the installation locations.
'--prefix=DIR'
Use DIR as the installation prefix. *note Installation Names:: for
more details, including other options available for fine-tuning the
installation locations.
`--no-create'
`-n'
'--no-create'
'-n'
Run the configure checks, but stop before creating any output
files.
`configure' also accepts some other, not widely useful, options. Run
`configure --help' for more details.
'configure' also accepts some other, not widely useful, options. Run
'configure --help' for more details.

View File

@@ -1,39 +1,38 @@
INCLUDES = -IC:\CAFE\cafe-1.0.0-beta-3\cpp\include -IC:\local\boost_1_63_0\boost \
-IC:\local\boost_1_63_0 -IC:\EPICS\base-3.14.12.5\include -IC:\EPICS\base-3.14.12.5\include\os\WIN32
INCLUDES = -IC:\EPICS\CAFE\cpp\include -IC:\EPICS\CAFE\cpp -IC:\EPICS\boost_1_81_0\boost \
-IC:\EPICS\boost_1_81_0 -IC:\epics\epics-base\include -IC:\epics\epics-base\include\os\WIN32 \
-Ic:\EPICS\epics-base\include\compiler\msvc \
#-IC:\Qt\qt-4.8.6-x64-msvc2010\include -Ic:\Qt\qt-4.8.6-x64-msvc2010\include -Ic:\Qt\qt-4.8.6-x64-msvc2010\include\QtCore \
#-IC:\Qt\qt-4.8.6-msvc2010\include\QtXml
#-IC:\Qt\qt-4.8.6-msvc2010\include\QtXml \
#-IC:\Users\chrin\AppData\Local\Continuum\Anaconda3\envs\py345\include
LIB_DEST=lib\cafe-noqt
CXX=cl
CXXFLAGS = /W4 /EHsc /c /MT
OUTPUT_OPTION = /o "$@"
LIB_LOCAL = C:\epics\base-3.14.12.5\lib\windows-x64\Com.lib C:\epics\base-3.14.12.5\lib\windows-x64\ca.lib \
C:\local\boost_1_63_0\lib64-msvc-10.0\libboost_thread-vc100-mt-s-1_63.lib \
C:\local\boost_1_63_0\lib64-msvc-10.0\libboost_system-vc100-mt-s-1_63.lib
CXXFLAGS = -DUSE_TYPED_RSET -EHsc -nologo -FC -D__STDC__=0 -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -Ox -GL -Oy- -W3 -MD -DEPICS_BUILD_DLL -DEPICS_CALL_DLL -c
#OUTPUT_OPTION = /o "$@"
OUTPUT_OPTION = /Fo"$@"
LIB_LOCAL = C:\epics\epics-base\lib\win32-x86\Com.lib C:\epics\epics-base\lib\win32-x86\ca.lib \
#C:\EPICS\boost_1_81_0\stage\lib\\libboost_thread-vc142-mt-x32-1_81.lib \
#C:\EPICS\boost_1_81_0\stage\lib\\libboost_system-vc142-mt-gd-x32-1_81.lib \
#C:\EPICS\boost_1_81_0\stage\lib\\libboost_date_time-vc142-mt-gd-x32-1_81.lib \
#C:\EPICS\boost_1_81_0\stage\lib\\libboost_chrono-vc142-mt-x32-1_81.lib \
#C:\EPICS\boost_1_81_0\stage\lib\\libboost_exception-vc142-mt-gd-x32-1_81.lib \
#C:\Qt\qt-4.8.6-x64-msvc2010\lib\QtCore4.lib C:\Qt\qt-4.8.6-x64-msvc2010\lib\QtXml4.lib \
#C:\Users\chrin\AppData\Local\Continuum\Anaconda3\envs\py345\libs\python34.lib
#C:\Users\chrin\AppData\Local\Continuum\Anaconda3\envs\py345\libs\python34.lib \
OBJS= src\cafeCache.obj src\cafeGroup.obj src\cafe.obj src\cafeVectors.obj \
src\callbackHandlerCreate.obj src\callbackHandlerMonitor.obj src\conduitGroup.obj src\conduit.obj \
src\connectCallbacks.obj src\connectGroup.obj \
src\connect.obj src\exceptionsHelper.obj src\granules.obj src\handleHelper.obj src\helper.obj \
src\methodCallbacks.obj src\policyHelper.obj src\transpose.obj \
src\cafeXML.obj src\loadCollectionXMLParser.obj src\loadGroupXMLParser.obj \
src\restorePVGroupXMLParser.obj $(LIB_LOCAL)
OBJS= cafeCache.obj cafeGroup.obj cafe.obj cafeVectors.obj \
callbackHandlerCreate.obj callbackHandlerMonitor.obj conduitGroup.obj conduit.obj \
connectCallbacks.obj connectGroup.obj \
connect.obj exceptionsHelper.obj granules.obj handleHelper.obj helper.obj \
methodCallbacks.obj policyHelper.obj transpose.obj \
cafeXML.obj loadCollectionXMLParser.obj loadGroupXMLParser.obj \
restorePVGroupXMLParser.obj $(LIB_LOCAL)
cafe.lib: $(OBJS)
LIB $(OBJS) /out:cafe.lib
$(LIB_DEST)\cafe.lib: $(OBJS)
LIB $(OBJS) /out:$(LIB_DEST)\cafe.lib
%.obj: src\%.cpp
%.obj: %.cpp
$(CXX) $(CXXFLAGS) $(INCLUDES) $(OUTPUT_OPTION) $<
clean:
del *.obj
del src\*.obj

View File

@@ -0,0 +1,39 @@
INCLUDES = -IC:\CAFE\cafe-1.0.0-beta-3\cpp\include -IC:\local\boost_1_63_0\boost \
-IC:\local\boost_1_63_0 -IC:\EPICS\base-3.14.12.5\include -IC:\EPICS\base-3.14.12.5\include\os\WIN32
#-IC:\Qt\qt-4.8.6-x64-msvc2010\include -Ic:\Qt\qt-4.8.6-x64-msvc2010\include -Ic:\Qt\qt-4.8.6-x64-msvc2010\include\QtCore \
#-IC:\Qt\qt-4.8.6-msvc2010\include\QtXml
#-IC:\Users\chrin\AppData\Local\Continuum\Anaconda3\envs\py345\include
LIB_DEST=lib\cafe-noqt
CXX=cl
CXXFLAGS = /W4 /EHsc /c /MT
OUTPUT_OPTION = /o "$@"
LIB_LOCAL = C:\epics\base-3.14.12.5\lib\windows-x64\Com.lib C:\epics\base-3.14.12.5\lib\windows-x64\ca.lib \
C:\local\boost_1_63_0\lib64-msvc-10.0\libboost_thread-vc100-mt-s-1_63.lib \
C:\local\boost_1_63_0\lib64-msvc-10.0\libboost_system-vc100-mt-s-1_63.lib
#C:\Qt\qt-4.8.6-x64-msvc2010\lib\QtCore4.lib C:\Qt\qt-4.8.6-x64-msvc2010\lib\QtXml4.lib \
#C:\Users\chrin\AppData\Local\Continuum\Anaconda3\envs\py345\libs\python34.lib
OBJS= cafeCache.obj cafeGroup.obj cafe.obj cafeVectors.obj \
callbackHandlerCreate.obj callbackHandlerMonitor.obj conduitGroup.obj conduit.obj \
connectCallbacks.obj connectGroup.obj \
connect.obj exceptionsHelper.obj granules.obj handleHelper.obj helper.obj \
methodCallbacks.obj policyHelper.obj transpose.obj \
cafeXML.obj loadCollectionXMLParser.obj loadGroupXMLParser.obj \
restorePVGroupXMLParser.obj $(LIB_LOCAL)
$(LIB_DEST)\cafe.lib: $(OBJS)
LIB $(OBJS) /out:$(LIB_DEST)\cafe.lib
%.obj: src\%.cpp
$(CXX) $(CXXFLAGS) $(INCLUDES) $(OUTPUT_OPTION) $<
clean:
del *.obj

28
MakefileWin/config.h Normal file
View File

@@ -0,0 +1,28 @@
/* epics major release */
#define EPICS_MAJOR 7
/* epics minor release */
#define EPICS_MINOR 0
/* epics patch release */
#define EPICS_PATCH 6
/* epics version */
#define HAVE_EPICS 7.0.6
/* Define to 1 if you have the <epicsTypes.h> header file. */
#define HAVE_EPICSTYPES_H 1
/* Define to 1 if you have the `boost_thread' library (-lboost_thread). */
#define HAVE_BOOST_THREAD 1
/* Define to 1 if you have the `QtXml' library (-lQtXml). */
/*define HAVE_LIBQTXML 1 */
/* Define to 1 if you have the <Python.h> header file. */
/*#define HAVE_PYTHON_H 1 */
#ifdef _MSC_VER
#define _CRT_SECURE_NO_WARNINGS
#endif

View 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

View 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 */

View 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
View File

@@ -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

View File

@@ -1 +0,0 @@
autogen_cafepy3_release.sh

86
autogen.sh Normal file
View 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

View File

@@ -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

View File

@@ -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

View File

@@ -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
View 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
View 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

View File

@@ -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

View File

@@ -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

325
autogen_sfbd.sh Normal file
View File

@@ -0,0 +1,325 @@
### 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 py310 7.3.0 py37
module load gcc/10.4.0 ##rhel8
### 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
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.21.0"
EPICS_BASE='base-7.0.8' #
#For later check of existence of HOST_ARCH for $EPICS/include/os/$HOST_ARCH
#Assume Linux but check if Darwin
CAFE_HOST_FLAG_DARWIN=$(echo ${EPICS_HOST_ARCH} | grep -c "Darwin")
export CAFE_HOST_FLAG_DARWIN=$CAFE_HOST_FLAG_DARWIN
RETURN_ON_WRONG_INPUT=true
RETURN_FLAG=false
##EPICS_BASE=$(readlink ${EPICS_BASE}) #$(readlink ${EPICS}/base)
_EPICS_HOST_ARCH=${RHREL}-x86_64
#EB=$(readlink /afs/psi.ch/project/cafe/gitworkspace/CAFE/cpp/base)
echo $EPICS_BASE
#if [ -z "$EPICS_BASE_VERSION" ]
#then
# EPICS_BASE='base-7.0.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_DEFAULT="sls2"
CACLIENT_DEFAULT="py37"
FACILITY_TEMP=""
CACLIENT_TEMP=""
echo 'input arg. facility/target' $FACILITY $CACLIENT
if [ -n "$FACILITY" ]
then
if [ "$FACILITY" = "matlab" ] || [ "$FACILITY" = "python" ] || \
[ "$FACILITY" = "py310" ] || [ "$FACILITY" = "py39" ] || \
[ "$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=$FACILITY_DEFAULT
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" = "py39" ] || \
[ "$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" = "py39" ] || \
[ "$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-epics7"
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" = "py39" ]
then
ENABLE_OPTIONS+=" --enable-python39"
ENABLE_OPTIONS+=" --enable-qt5py39"
CAFE_V+="-py39"
elif [ "$CACLIENT" = "py310" ]
then
ENABLE_OPTIONS+=" --enable-python310"
#ENABLE_OPTIONS+=" --enable-qt5py310"
CAFE_V+="-py310"
elif [ "$CACLIENT" = "cpp" ]
then
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=/opt/gfa/python-3.10/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=/opt/gfa/python-3.10/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/${EPICS_BASE}
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
View 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

321
autogen_sfbd_RHEL7.sh Normal file
View File

@@ -0,0 +1,321 @@
### psi specific - select compiler
#source <this_autogen_file> <facility> <target_language>
#<facility = sls sls2 sf> default is sf
#<target_language = cpp matlab python>
module unload gcc
module load gcc/7.5.0 #7.5.0 for py38 AND PY310 7.3.0 py37
#module load gcc/8.5.0 #rhel8
### psi specific - end
rm -f configure.ac
ln -s configurePSI.ac configure.ac
rm -f ./aclocal.m4
rm -rf ./autom4te.cache
aclocal --force -I m4
/opt/gfa/python-3.7/latest/bin/libtoolize --force --copy #select libtools 2.4.6
#libtoolize --force --copy
autoconf --force #interprets configure.ac
autoheader --force
automake --force --add-missing --copy
#autoreconf not wanted
#Check what the EPICS RELEASE IS from ${EPICS}/base
#Used by ./configure
#Assumes format ${EPICS}/base-3.14.12
#source cafeVersion-gcc-7.3.0
CAFE_V="cafe-1.19.3"
EPICS_BASE='base-7.0.7'
#For later check of existence of HOST_ARCH for $EPICS/include/os/$HOST_ARCH
#Assume Linux but check if Darwin
CAFE_HOST_FLAG_DARWIN=$(echo ${EPICS_HOST_ARCH} | grep -c "Darwin")
export CAFE_HOST_FLAG_DARWIN=$CAFE_HOST_FLAG_DARWIN
RETURN_ON_WRONG_INPUT=true
RETURN_FLAG=false
###EPICS_BASE=$(readlink ${EPICS_BASE}) #$(readlink ${EPICS}/base)
_EPICS_HOST_ARCH=${RHREL}-x86_64
#EB=$(readlink /afs/psi.ch/project/cafe/gitworkspace/CAFE/cpp/base)
echo $EPICS_BASE
#if [ -z "$EPICS_BASE_VERSION" ]
#then
# EPICS_BASE='base-7.0.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="sls2"
CACLIENT_DEFAULT="py37"
FACILITY_TEMP=""
CACLIENT_TEMP=""
echo 'input arg. facility/target' $FACILITY $CACLIENT
if [ -n "$FACILITY" ]
then
if [ "$FACILITY" = "matlab" ] || [ "$FACILITY" = "python" ] || \
[ "$FACILITY" = "py310" ] || [ "$FACILITY" = "py39" ] || \
[ "$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" = "py39" ] || \
[ "$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" = "py39" ] || \
[ "$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-epics7"
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" = "py39" ]
then
ENABLE_OPTIONS+=" --enable-python39"
ENABLE_OPTIONS+=" --enable-qt5py39"
CAFE_V+="-py39"
elif [ "$CACLIENT" = "py310" ]
then
ENABLE_OPTIONS+=" --enable-python310"
#ENABLE_OPTIONS+=" --enable-qt5py310"
CAFE_V+="-py310"
elif [ "$CACLIENT" = "cpp" ]
then
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=/opt/gfa/python-3.10/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=/opt/gfa/python-3.10/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/${EPICS_BASE}
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
View 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

1476
config.guess vendored Executable file

File diff suppressed because it is too large Load Diff

852
config.log Normal file
View File

@@ -0,0 +1,852 @@
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.20.1, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ ./configure --prefix=/opt/gfa/cafe/cpp/cafe-1.21.0-gcc-10.4.0 --libdir=/opt/gfa/cafe/cpp/cafe-1.21.0-gcc-10.4.0/lib/RHEL8-x86_64 --enable-boost-inc --enable-epics7 --with-boost-inc=/opt/gfa/cafe/boost/boost_1_61_0/include --with-epics3=/usr/local/epics/base --with-python310=/opt/gfa/python-3.10/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=/opt/gfa/python-3.10/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.8
## --------- ##
## Platform. ##
## --------- ##
hostname = sls-lc8.psi.ch
uname -m = x86_64
uname -r = 4.18.0-553.5.1.el8_10.x86_64
uname -s = Linux
uname -v = #1 SMP Tue May 21 03:13:04 EDT 2024
/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/10.4.0/bin
PATH: /opt/psi/Programming/matlab/2024a/bin
PATH: /usr/local/epics/seq/bin/RHEL8-x86_64
PATH: .
PATH: /usr/lib/openoffice.org/program
PATH: /opt/psi/Tools/HDFView/3.1.2/bin
PATH: /usr/share/Modules/bin
PATH: /usr/local/bin
PATH: /usr/bin
PATH: /usr/local/sbin
PATH: /usr/sbin
PATH: /usr/local/epics/base-7.0.8/bin/RHEL8-x86_64
PATH: /sls/bd/bin
PATH: /sls/controls/bin
PATH: /opt/puppetlabs/bin
PATH: /afs/psi.ch/project/zeromq/deps/pycharm-community-2018.1.4/bin
PATH: /afs/psi.ch/user/c/chrin/Downloads/astyle/build/gcc/bin
PATH: /afs/psi.ch/user/c/chrin/.local/bin
PATH: /afs/psi.ch/user/c/chrin/python/pycharm-community-2018.1.4/bin
PATH: /afs/psi.ch/user/c/chrin/bin
## ----------- ##
## 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:3189: checking for C++ compiler version
configure:3198: /opt/psi/Programming/gcc/10.4.0/bin/g++ --version >&5
g++ ('PSI Environment Module') 10.4.0
Copyright (C) 2020 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:3209: $? = 0
configure:3198: /opt/psi/Programming/gcc/10.4.0/bin/g++ -v >&5
Using built-in specs.
COLLECT_GCC=/opt/psi/Programming/gcc/10.4.0/bin/g++
COLLECT_LTO_WRAPPER=/afs/psi.ch/sys/psi.ra/Programming/gcc/10.4.0/bin/../libexec/gcc/x86_64-pc-linux-gnu/10.4.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /opt/psi/var/tmp/gsell/gcc-10.4.0/src/configure --prefix=/opt/psi/Programming/gcc/10.4.0 --enable-languages=c,c++,objc,obj-c++,lto,fortran,go --with-gmp=/opt/psi/Libraries/gmp/6.2.1 --with-mpfr=/opt/psi/Libraries/mpfr/4.1.0 --with-mpc=/opt/psi/Libraries/mpc/1.2.1 --enable-lto --disable-multilib --with-pkgversion=''\''PSI Environment Module'\''' --with-build-config=bootstrap-debug
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 10.4.0 ('PSI Environment Module')
configure:3209: $? = 0
configure:3198: /opt/psi/Programming/gcc/10.4.0/bin/g++ -V >&5
g++: error: unrecognized command-line option '-V'
g++: fatal error: no input files
compilation terminated.
configure:3209: $? = 1
configure:3198: /opt/psi/Programming/gcc/10.4.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:3209: $? = 1
configure:3229: checking whether the C++ compiler works
configure:3251: /opt/psi/Programming/gcc/10.4.0/bin/g++ conftest.cpp >&5
configure:3255: $? = 0
configure:3303: result: yes
configure:3306: checking for C++ compiler default output file name
configure:3308: result: a.out
configure:3314: checking for suffix of executables
configure:3321: /opt/psi/Programming/gcc/10.4.0/bin/g++ -o conftest conftest.cpp >&5
configure:3325: $? = 0
configure:3347: result:
configure:3369: checking whether we are cross compiling
configure:3377: /opt/psi/Programming/gcc/10.4.0/bin/g++ -o conftest conftest.cpp >&5
configure:3381: $? = 0
configure:3388: ./conftest
configure:3392: $? = 0
configure:3407: result: no
configure:3412: checking for suffix of object files
configure:3434: /opt/psi/Programming/gcc/10.4.0/bin/g++ -c conftest.cpp >&5
configure:3438: $? = 0
configure:3459: result: o
configure:3463: checking whether we are using the GNU C++ compiler
configure:3482: /opt/psi/Programming/gcc/10.4.0/bin/g++ -c conftest.cpp >&5
configure:3482: $? = 0
configure:3491: result: yes
configure:3500: checking whether /opt/psi/Programming/gcc/10.4.0/bin/g++ accepts -g
configure:3520: /opt/psi/Programming/gcc/10.4.0/bin/g++ -c -g conftest.cpp >&5
configure:3520: $? = 0
configure:3561: result: yes
configure:3587: checking whether make supports the include directive
configure:3602: make -f confmf.GNU && cat confinc.out
this is the am__doit target
configure:3605: $? = 0
configure:3624: result: yes (GNU style)
configure:3649: checking dependency style of /opt/psi/Programming/gcc/10.4.0/bin/g++
configure:3760: result: gcc3
configure:3806: checking build system type
configure:3820: result: x86_64-pc-linux-gnu
configure:3840: checking host system type
configure:3853: result: x86_64-pc-linux-gnu
configure:3894: checking how to print strings
configure:3921: result: printf
configure:3990: checking for gcc
configure:4017: result: /opt/psi/Programming/gcc/10.4.0/bin/gcc
configure:4246: checking for C compiler version
configure:4255: /opt/psi/Programming/gcc/10.4.0/bin/gcc --version >&5
gcc ('PSI Environment Module') 10.4.0
Copyright (C) 2020 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:4266: $? = 0
configure:4255: /opt/psi/Programming/gcc/10.4.0/bin/gcc -v >&5
Using built-in specs.
COLLECT_GCC=/opt/psi/Programming/gcc/10.4.0/bin/gcc
COLLECT_LTO_WRAPPER=/afs/psi.ch/sys/psi.ra/Programming/gcc/10.4.0/bin/../libexec/gcc/x86_64-pc-linux-gnu/10.4.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /opt/psi/var/tmp/gsell/gcc-10.4.0/src/configure --prefix=/opt/psi/Programming/gcc/10.4.0 --enable-languages=c,c++,objc,obj-c++,lto,fortran,go --with-gmp=/opt/psi/Libraries/gmp/6.2.1 --with-mpfr=/opt/psi/Libraries/mpfr/4.1.0 --with-mpc=/opt/psi/Libraries/mpc/1.2.1 --enable-lto --disable-multilib --with-pkgversion=''\''PSI Environment Module'\''' --with-build-config=bootstrap-debug
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 10.4.0 ('PSI Environment Module')
configure:4266: $? = 0
configure:4255: /opt/psi/Programming/gcc/10.4.0/bin/gcc -V >&5
gcc: error: unrecognized command-line option '-V'
gcc: fatal error: no input files
compilation terminated.
configure:4266: $? = 1
configure:4255: /opt/psi/Programming/gcc/10.4.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:4266: $? = 1
configure:4270: checking whether we are using the GNU C compiler
configure:4289: /opt/psi/Programming/gcc/10.4.0/bin/gcc -c conftest.c >&5
configure:4289: $? = 0
configure:4298: result: yes
configure:4307: checking whether /opt/psi/Programming/gcc/10.4.0/bin/gcc accepts -g
configure:4327: /opt/psi/Programming/gcc/10.4.0/bin/gcc -c -g conftest.c >&5
configure:4327: $? = 0
configure:4368: result: yes
configure:4385: checking for /opt/psi/Programming/gcc/10.4.0/bin/gcc option to accept ISO C89
configure:4448: /opt/psi/Programming/gcc/10.4.0/bin/gcc -c -g -O2 conftest.c >&5
configure:4448: $? = 0
configure:4461: result: none needed
configure:4486: checking whether /opt/psi/Programming/gcc/10.4.0/bin/gcc understands -c and -o together
configure:4508: /opt/psi/Programming/gcc/10.4.0/bin/gcc -c conftest.c -o conftest2.o
configure:4511: $? = 0
configure:4508: /opt/psi/Programming/gcc/10.4.0/bin/gcc -c conftest.c -o conftest2.o
configure:4511: $? = 0
configure:4523: result: yes
configure:4542: checking dependency style of /opt/psi/Programming/gcc/10.4.0/bin/gcc
configure:4653: result: gcc3
configure:4668: checking for a sed that does not truncate output
configure:4732: result: /usr/bin/sed
configure:4750: checking for grep that handles long lines and -e
configure:4808: result: /usr/bin/grep
configure:4813: checking for egrep
configure:4875: result: /usr/bin/grep -E
configure:4880: checking for fgrep
configure:4942: result: /usr/bin/grep -F
configure:4977: checking for ld used by /opt/psi/Programming/gcc/10.4.0/bin/gcc
configure:5044: result: /usr/bin/ld
configure:5051: checking if the linker (/usr/bin/ld) is GNU ld
configure:5066: result: yes
configure:5078: checking for BSD- or MS-compatible name lister (nm)
configure:5132: result: /usr/bin/nm -B
configure:5262: checking the name lister (/usr/bin/nm -B) interface
configure:5269: /opt/psi/Programming/gcc/10.4.0/bin/g++ -c -g -O2 conftest.cpp >&5
configure:5272: /usr/bin/nm -B "conftest.o"
configure:5275: output
0000000000000000 B some_variable
configure:5282: result: BSD nm
configure:5285: checking whether ln -s works
configure:5289: result: yes
configure:5297: checking the maximum length of command line arguments
configure:5428: result: 1572864
configure:5476: checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format
configure:5516: result: func_convert_file_noop
configure:5523: checking how to convert x86_64-pc-linux-gnu file names to toolchain format
configure:5543: result: func_convert_file_noop
configure:5550: checking for /usr/bin/ld option to reload object files
configure:5557: result: -r
configure:5631: checking for objdump
configure:5647: found /usr/bin/objdump
configure:5658: result: objdump
configure:5690: checking how to recognize dependent libraries
configure:5890: result: pass_all
configure:5975: checking for dlltool
configure:6005: result: no
configure:6035: checking how to associate runtime and link libraries
configure:6062: result: printf %s\n
configure:6123: checking for ar
configure:6139: found /usr/bin/ar
configure:6150: result: ar
configure:6187: checking for archiver @FILE support
configure:6204: /opt/psi/Programming/gcc/10.4.0/bin/g++ -c -g -O2 conftest.cpp >&5
configure:6204: $? = 0
configure:6207: ar cru libconftest.a @conftest.lst >&5
configure:6210: $? = 0
configure:6215: ar cru libconftest.a @conftest.lst >&5
ar: conftest.o: No such file or directory
configure:6218: $? = 1
configure:6230: result: @
configure:6288: checking for strip
configure:6304: found /usr/bin/strip
configure:6315: result: strip
configure:6387: checking for ranlib
configure:6403: found /usr/bin/ranlib
configure:6414: result: ranlib
configure:6516: checking command to parse /usr/bin/nm -B output from /opt/psi/Programming/gcc/10.4.0/bin/gcc object
configure:6669: /opt/psi/Programming/gcc/10.4.0/bin/g++ -c -g -O2 conftest.cpp >&5
configure:6672: $? = 0
configure:6676: /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:6679: $? = 0
configure:6745: /opt/psi/Programming/gcc/10.4.0/bin/g++ -o conftest -g -O2 conftest.cpp conftstm.o >&5
configure:6748: $? = 0
configure:6786: result: ok
configure:6833: checking for sysroot
configure:6863: result: no
configure:6870: checking for a working dd
configure:6908: result: /usr/bin/dd
configure:6912: checking how to truncate binary pipes
configure:6927: result: /usr/bin/dd bs=4096 count=1
configure:7064: /opt/psi/Programming/gcc/10.4.0/bin/g++ -c -g -O2 conftest.cpp >&5
configure:7067: $? = 0
configure:7257: checking for mt
configure:7287: result: no
configure:7307: checking if : is a manifest tool
configure:7313: : '-?'
configure:7321: result: no
configure:7998: checking how to run the C preprocessor
configure:8029: /opt/psi/Programming/gcc/10.4.0/bin/gcc -E conftest.c
configure:8029: $? = 0
configure:8043: /opt/psi/Programming/gcc/10.4.0/bin/gcc -E conftest.c
conftest.c:11:10: fatal error: ac_nonexistent.h: No such file or directory
11 | #include <ac_nonexistent.h>
| ^~~~~~~~~~~~~~~~~~
compilation terminated.
configure:8043: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "CAFE"
| #define PACKAGE_TARNAME "cafe"
| #define PACKAGE_VERSION "1.20.1"
| #define PACKAGE_STRING "CAFE 1.20.1"
| #define PACKAGE_BUGREPORT "Bug reports to: jan.chrin@psi.ch"
| #define PACKAGE_URL ""
| #define PACKAGE "cafe"
| #define VERSION "1.20.1"
| /* end confdefs.h. */
| #include <ac_nonexistent.h>
configure:8068: result: /opt/psi/Programming/gcc/10.4.0/bin/gcc -E
configure:8088: /opt/psi/Programming/gcc/10.4.0/bin/gcc -E conftest.c
configure:8088: $? = 0
configure:8102: /opt/psi/Programming/gcc/10.4.0/bin/gcc -E conftest.c
conftest.c:11:10: fatal error: ac_nonexistent.h: No such file or directory
11 | #include <ac_nonexistent.h>
| ^~~~~~~~~~~~~~~~~~
compilation terminated.
configure:8102: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "CAFE"
| #define PACKAGE_TARNAME "cafe"
| #define PACKAGE_VERSION "1.20.1"
| #define PACKAGE_STRING "CAFE 1.20.1"
| #define PACKAGE_BUGREPORT "Bug reports to: jan.chrin@psi.ch"
| #define PACKAGE_URL ""
| #define PACKAGE "cafe"
| #define VERSION "1.20.1"
| /* end confdefs.h. */
| #include <ac_nonexistent.h>
configure:8131: checking for ANSI C header files
configure:8151: /opt/psi/Programming/gcc/10.4.0/bin/gcc -c -g -O2 conftest.c >&5
configure:8151: $? = 0
configure:8224: /opt/psi/Programming/gcc/10.4.0/bin/gcc -o conftest -g -O2 conftest.c >&5
configure:8224: $? = 0
configure:8224: ./conftest
configure:8224: $? = 0
configure:8235: result: yes
configure:8248: checking for sys/types.h
configure:8248: /opt/psi/Programming/gcc/10.4.0/bin/gcc -c -g -O2 conftest.c >&5
configure:8248: $? = 0
configure:8248: result: yes
configure:8248: checking for sys/stat.h
configure:8248: /opt/psi/Programming/gcc/10.4.0/bin/gcc -c -g -O2 conftest.c >&5
configure:8248: $? = 0
configure:8248: result: yes
configure:8248: checking for stdlib.h
configure:8248: /opt/psi/Programming/gcc/10.4.0/bin/gcc -c -g -O2 conftest.c >&5
configure:8248: $? = 0
configure:8248: result: yes
configure:8248: checking for string.h
configure:8248: /opt/psi/Programming/gcc/10.4.0/bin/gcc -c -g -O2 conftest.c >&5
configure:8248: $? = 0
configure:8248: result: yes
configure:8248: checking for memory.h
configure:8248: /opt/psi/Programming/gcc/10.4.0/bin/gcc -c -g -O2 conftest.c >&5
configure:8248: $? = 0
configure:8248: result: yes
configure:8248: checking for strings.h
configure:8248: /opt/psi/Programming/gcc/10.4.0/bin/gcc -c -g -O2 conftest.c >&5
configure:8248: $? = 0
configure:8248: result: yes
configure:8248: checking for inttypes.h
configure:8248: /opt/psi/Programming/gcc/10.4.0/bin/gcc -c -g -O2 conftest.c >&5
configure:8248: $? = 0
configure:8248: result: yes
configure:8248: checking for stdint.h
configure:8248: /opt/psi/Programming/gcc/10.4.0/bin/gcc -c -g -O2 conftest.c >&5
configure:8248: $? = 0
configure:8248: result: yes
configure:8248: checking for unistd.h
configure:8248: /opt/psi/Programming/gcc/10.4.0/bin/gcc -c -g -O2 conftest.c >&5
configure:8248: $? = 0
configure:8248: result: yes
configure:8262: checking for dlfcn.h
configure:8262: /opt/psi/Programming/gcc/10.4.0/bin/gcc -c -g -O2 conftest.c >&5
configure:8262: $? = 0
configure:8262: result: yes
configure:8528: checking for objdir
configure:8543: result: .libs
configure:8807: checking if /opt/psi/Programming/gcc/10.4.0/bin/gcc supports -fno-rtti -fno-exceptions
configure:8825: /opt/psi/Programming/gcc/10.4.0/bin/gcc -c -g -O2 -fno-rtti -fno-exceptions conftest.c >&5
cc1: warning: command-line option '-fno-rtti' is valid for C++/D/ObjC++ but not for C
configure:8829: $? = 0
configure:8842: result: no
configure:9200: checking for /opt/psi/Programming/gcc/10.4.0/bin/gcc option to produce PIC
configure:9207: result: -fPIC -DPIC
configure:9215: checking if /opt/psi/Programming/gcc/10.4.0/bin/gcc PIC flag -fPIC -DPIC works
configure:9233: /opt/psi/Programming/gcc/10.4.0/bin/gcc -c -g -O2 -fPIC -DPIC -DPIC conftest.c >&5
configure:9237: $? = 0
configure:9250: result: yes
configure:9279: checking if /opt/psi/Programming/gcc/10.4.0/bin/gcc static flag -static works
configure:9307: result: no
configure:9322: checking if /opt/psi/Programming/gcc/10.4.0/bin/gcc supports -c -o file.o
configure:9343: /opt/psi/Programming/gcc/10.4.0/bin/gcc -c -g -O2 -o out/conftest2.o conftest.c >&5
configure:9347: $? = 0
configure:9369: result: yes
configure:9377: checking if /opt/psi/Programming/gcc/10.4.0/bin/gcc supports -c -o file.o
configure:9424: result: yes
configure:9457: checking whether the /opt/psi/Programming/gcc/10.4.0/bin/gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries
configure:10716: result: yes
configure:10753: checking whether -lc should be explicitly linked in
configure:10761: /opt/psi/Programming/gcc/10.4.0/bin/gcc -c -g -O2 conftest.c >&5
configure:10764: $? = 0
configure:10779: /opt/psi/Programming/gcc/10.4.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:10782: $? = 0
configure:10796: result: no
configure:10956: checking dynamic linker characteristics
configure:11537: /opt/psi/Programming/gcc/10.4.0/bin/gcc -o conftest -g -O2 -Wl,-rpath -Wl,/foo conftest.c >&5
configure:11537: $? = 0
configure:11777: result: GNU/Linux ld.so
configure:11899: checking how to hardcode library paths into programs
configure:11924: result: immediate
configure:12472: checking whether stripping libraries is possible
configure:12477: result: yes
configure:12512: checking if libtool supports shared libraries
configure:12514: result: yes
configure:12517: checking whether to build shared libraries
configure:12542: result: yes
configure:12545: checking whether to build static libraries
configure:12549: result: yes
configure:12572: checking how to run the C++ preprocessor
configure:12599: /opt/psi/Programming/gcc/10.4.0/bin/g++ -E conftest.cpp
configure:12599: $? = 0
configure:12613: /opt/psi/Programming/gcc/10.4.0/bin/g++ -E conftest.cpp
conftest.cpp:23:10: fatal error: ac_nonexistent.h: No such file or directory
23 | #include <ac_nonexistent.h>
| ^~~~~~~~~~~~~~~~~~
compilation terminated.
configure:12613: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "CAFE"
| #define PACKAGE_TARNAME "cafe"
| #define PACKAGE_VERSION "1.20.1"
| #define PACKAGE_STRING "CAFE 1.20.1"
| #define PACKAGE_BUGREPORT "Bug reports to: jan.chrin@psi.ch"
| #define PACKAGE_URL ""
| #define PACKAGE "cafe"
| #define VERSION "1.20.1"
| #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:12638: result: /opt/psi/Programming/gcc/10.4.0/bin/g++ -E
configure:12658: /opt/psi/Programming/gcc/10.4.0/bin/g++ -E conftest.cpp
configure:12658: $? = 0
configure:12672: /opt/psi/Programming/gcc/10.4.0/bin/g++ -E conftest.cpp
conftest.cpp:23:10: fatal error: ac_nonexistent.h: No such file or directory
23 | #include <ac_nonexistent.h>
| ^~~~~~~~~~~~~~~~~~
compilation terminated.
configure:12672: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "CAFE"
| #define PACKAGE_TARNAME "cafe"
| #define PACKAGE_VERSION "1.20.1"
| #define PACKAGE_STRING "CAFE 1.20.1"
| #define PACKAGE_BUGREPORT "Bug reports to: jan.chrin@psi.ch"
| #define PACKAGE_URL ""
| #define PACKAGE "cafe"
| #define VERSION "1.20.1"
| #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:12834: checking for ld used by /opt/psi/Programming/gcc/10.4.0/bin/g++
configure:12901: result: /usr/bin/ld -m elf_x86_64
configure:12908: checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld
configure:12923: result: yes
configure:12978: checking whether the /opt/psi/Programming/gcc/10.4.0/bin/g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries
configure:14051: result: yes
configure:14087: /opt/psi/Programming/gcc/10.4.0/bin/g++ -c -g -O2 conftest.cpp >&5
configure:14090: $? = 0
configure:14571: checking for /opt/psi/Programming/gcc/10.4.0/bin/g++ option to produce PIC
configure:14578: result: -fPIC -DPIC
configure:14586: checking if /opt/psi/Programming/gcc/10.4.0/bin/g++ PIC flag -fPIC -DPIC works
configure:14604: /opt/psi/Programming/gcc/10.4.0/bin/g++ -c -g -O2 -fPIC -DPIC -DPIC conftest.cpp >&5
configure:14608: $? = 0
configure:14621: result: yes
configure:14644: checking if /opt/psi/Programming/gcc/10.4.0/bin/g++ static flag -static works
configure:14672: result: no
configure:14684: checking if /opt/psi/Programming/gcc/10.4.0/bin/g++ supports -c -o file.o
configure:14705: /opt/psi/Programming/gcc/10.4.0/bin/g++ -c -g -O2 -o out/conftest2.o conftest.cpp >&5
configure:14709: $? = 0
configure:14731: result: yes
configure:14736: checking if /opt/psi/Programming/gcc/10.4.0/bin/g++ supports -c -o file.o
configure:14783: result: yes
configure:14813: checking whether the /opt/psi/Programming/gcc/10.4.0/bin/g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries
configure:14853: result: yes
configure:14994: checking dynamic linker characteristics
configure:15742: result: GNU/Linux ld.so
configure:15807: checking how to hardcode library paths into programs
configure:15832: result: immediate
configure:16057: checking cadef.h usability
configure:16057: /opt/psi/Programming/gcc/10.4.0/bin/g++ -c -g -O2 -fexceptions -fPIC -std=c++1z -z nodefs -I/usr/local/epics/base-7.0.8/include/ -I/usr/local/epics/base-7.0.8/include/os/Linux -I/usr/local/epics/base-7.0.8/include/compiler/gcc conftest.cpp >&5
configure:16057: $? = 0
configure:16057: result: yes
configure:16057: checking cadef.h presence
configure:16057: /opt/psi/Programming/gcc/10.4.0/bin/g++ -E -fexceptions -fPIC -std=c++1z -z nodefs -I/usr/local/epics/base-7.0.8/include/ -I/usr/local/epics/base-7.0.8/include/os/Linux -I/usr/local/epics/base-7.0.8/include/compiler/gcc conftest.cpp
configure:16057: $? = 0
configure:16057: result: yes
configure:16057: checking for cadef.h
configure:16057: result: yes
configure:16076: checking epicsTypes.h usability
configure:16076: /opt/psi/Programming/gcc/10.4.0/bin/g++ -c -g -O2 -fexceptions -fPIC -std=c++1z -z nodefs -I/usr/local/epics/base-7.0.8/include/ -I/usr/local/epics/base-7.0.8/include/os/Linux -I/usr/local/epics/base-7.0.8/include/compiler/gcc conftest.cpp >&5
configure:16076: $? = 0
configure:16076: result: yes
configure:16076: checking epicsTypes.h presence
configure:16076: /opt/psi/Programming/gcc/10.4.0/bin/g++ -E -fexceptions -fPIC -std=c++1z -z nodefs -I/usr/local/epics/base-7.0.8/include/ -I/usr/local/epics/base-7.0.8/include/os/Linux -I/usr/local/epics/base-7.0.8/include/compiler/gcc conftest.cpp
configure:16076: $? = 0
configure:16076: result: yes
configure:16076: checking for epicsTypes.h
configure:16076: result: yes
configure:16093: checking for main in -lca
configure:16112: /opt/psi/Programming/gcc/10.4.0/bin/g++ -o conftest -g -O2 -fexceptions -fPIC -std=c++1z -z nodefs -I/usr/local/epics/base-7.0.8/include/ -I/usr/local/epics/base-7.0.8/include/os/Linux -I/usr/local/epics/base-7.0.8/include/compiler/gcc -L/usr/local/epics/base-7.0.8/lib/RHEL8-x86_64 -Wl,-rpath,/usr/local/epics/base-7.0.8/lib/RHEL8-x86_64 conftest.cpp -lca >&5
/usr/bin/ld: warning: -z nodefs ignored.
configure:16112: $? = 0
configure:16121: result: yes
configure:16134: checking for main in -lCom
configure:16153: /opt/psi/Programming/gcc/10.4.0/bin/g++ -o conftest -g -O2 -fexceptions -fPIC -std=c++1z -z nodefs -I/usr/local/epics/base-7.0.8/include/ -I/usr/local/epics/base-7.0.8/include/os/Linux -I/usr/local/epics/base-7.0.8/include/compiler/gcc -L/usr/local/epics/base-7.0.8/lib/RHEL8-x86_64 -Wl,-rpath,/usr/local/epics/base-7.0.8/lib/RHEL8-x86_64 conftest.cpp -lCom >&5
/usr/bin/ld: warning: -z nodefs ignored.
configure:16153: $? = 0
configure:16162: result: yes
configure:16175: checking for main in -ldl
configure:16194: /opt/psi/Programming/gcc/10.4.0/bin/g++ -o conftest -g -O2 -fexceptions -fPIC -std=c++1z -z nodefs -I/usr/local/epics/base-7.0.8/include/ -I/usr/local/epics/base-7.0.8/include/os/Linux -I/usr/local/epics/base-7.0.8/include/compiler/gcc -L/usr/local/epics/base-7.0.8/lib/RHEL8-x86_64 -Wl,-rpath,/usr/local/epics/base-7.0.8/lib/RHEL8-x86_64 conftest.cpp -ldl >&5
/usr/bin/ld: warning: -z nodefs ignored.
configure:16194: $? = 0
configure:16203: result: yes
configure:16408: checking multi_index_container.hpp usability
configure:16408: /opt/psi/Programming/gcc/10.4.0/bin/g++ -c -g -O2 -fexceptions -fPIC -std=c++1z -z nodefs -I/usr/local/epics/base-7.0.8/include/ -I/usr/local/epics/base-7.0.8/include/os/Linux -I/usr/local/epics/base-7.0.8/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:16408: $? = 0
configure:16408: result: yes
configure:16408: checking multi_index_container.hpp presence
configure:16408: /opt/psi/Programming/gcc/10.4.0/bin/g++ -E -fexceptions -fPIC -std=c++1z -z nodefs -I/usr/local/epics/base-7.0.8/include/ -I/usr/local/epics/base-7.0.8/include/os/Linux -I/usr/local/epics/base-7.0.8/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:16408: $? = 0
configure:16408: result: yes
configure:16408: checking for multi_index_container.hpp
configure:16408: result: yes
configure:18169: checking that generated files are newer than configure
configure:18175: result: done
configure:18214: creating ./config.status
## ---------------------- ##
## Running config.status. ##
## ---------------------- ##
This file was extended by CAFE config.status 1.20.1, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES =
CONFIG_HEADERS =
CONFIG_LINKS =
CONFIG_COMMANDS =
$ ./config.status
on sls-lc8.psi.ch
config.status:1168: creating makefile
config.status:1168: creating src/makefile
config.status:1168: creating include/makefile
config.status:1168: creating ./include/config.h
config.status:1397: executing depfiles commands
config.status:1474: cd src && sed -e '/# am--include-marker/d' makefile | make -f - am--depfiles
make: Nothing to be done for 'am--depfiles'.
config.status:1479: $? = 0
config.status:1397: executing libtool commands
## ---------------- ##
## Cache variables. ##
## ---------------- ##
ac_cv_build=x86_64-pc-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/10.4.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/10.4.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_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-pc-linux-gnu
ac_cv_lib_Com_main=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/10.4.0/bin/gcc -E'
ac_cv_prog_CXXCPP='/opt/psi/Programming/gcc/10.4.0/bin/g++ -E'
ac_cv_prog_ac_ct_AR=ar
ac_cv_prog_ac_ct_CC=/opt/psi/Programming/gcc/10.4.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
am_cv_prog_cc_c_o=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.16'
AMDEPBACKSLASH='\'
AMDEP_FALSE='#'
AMDEP_TRUE=''
AMTAR='$${TAR-tar}'
AM_BACKSLASH='\'
AM_CPPFLAGS=' -fexceptions -fPIC -std=c++1z -z nodefs -I/usr/local/epics/base-7.0.8/include/ -I/usr/local/epics/base-7.0.8/include/os/Linux -I/usr/local/epics/base-7.0.8/include/compiler/gcc -I/opt/gfa/cafe/boost/boost_1_61_0/include/boost -I/opt/gfa/cafe/boost/boost_1_61_0/include'
AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
AM_DEFAULT_VERBOSITY='1'
AM_LDFLAGS=' -L/usr/local/epics/base-7.0.8/lib/RHEL8-x86_64 -Wl,-rpath,/usr/local/epics/base-7.0.8/lib/RHEL8-x86_64'
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.16'
AWK='gawk'
CAFE_CPPFLAGS='-I$(top_srcdir)/include '
CC='/opt/psi/Programming/gcc/10.4.0/bin/gcc'
CCDEPMODE='depmode=gcc3'
CFLAGS='-g -O2'
CPP='/opt/psi/Programming/gcc/10.4.0/bin/gcc -E'
CPPFLAGS=' -fexceptions -fPIC -std=c++1z -z nodefs -I/usr/local/epics/base-7.0.8/include/ -I/usr/local/epics/base-7.0.8/include/os/Linux -I/usr/local/epics/base-7.0.8/include/compiler/gcc -I/opt/gfa/cafe/boost/boost_1_61_0/include/boost -I/opt/gfa/cafe/boost/boost_1_61_0/include'
CXX='/opt/psi/Programming/gcc/10.4.0/bin/g++'
CXXCPP='/opt/psi/Programming/gcc/10.4.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.8/lib/RHEL8-x86_64 -Wl,-rpath,/usr/local/epics/base-7.0.8/lib/RHEL8-x86_64'
LIBOBJS=''
LIBS=''
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.20.1'
PACKAGE_TARNAME='cafe'
PACKAGE_URL=''
PACKAGE_VERSION='1.20.1'
PATH_SEPARATOR=':'
RANLIB='ranlib'
SED='/usr/bin/sed'
SET_MAKE=''
SHELL='/bin/sh'
STRIP='strip'
VERSION='1.20.1'
ac_ct_AR='ar'
ac_ct_CC='/opt/psi/Programming/gcc/10.4.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-pc-linux-gnu'
build_alias=''
build_cpu='x86_64'
build_os='linux-gnu'
build_vendor='pc'
datadir='${datarootdir}'
datarootdir='${prefix}/share'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
dvidir='${docdir}'
exec_prefix='${prefix}'
host='x86_64-pc-linux-gnu'
host_alias=''
host_cpu='x86_64'
host_os='linux-gnu'
host_vendor='pc'
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.21.0-gcc-10.4.0/lib/RHEL8-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.21.0-gcc-10.4.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.20.1"
#define PACKAGE_STRING "CAFE 1.20.1"
#define PACKAGE_BUGREPORT "Bug reports to: jan.chrin@psi.ch"
#define PACKAGE_URL ""
#define PACKAGE "cafe"
#define VERSION "1.20.1"
#define STDC_HEADERS 1
#define HAVE_SYS_TYPES_H 1
#define HAVE_SYS_STAT_H 1
#define HAVE_STDLIB_H 1
#define HAVE_STRING_H 1
#define HAVE_MEMORY_H 1
#define HAVE_STRINGS_H 1
#define HAVE_INTTYPES_H 1
#define HAVE_STDINT_H 1
#define HAVE_UNISTD_H 1
#define HAVE_DLFCN_H 1
#define LT_OBJDIR ".libs/"
#define HAVE_LINUX 1
#define HAVE_CADEF_H 1
#define HAVE_EPICSTYPES_H 1
#define HAVE_EPICS 7.0.8
#define EPICS_MAJOR 7
#define EPICS_MINOR 0
#define EPICS_PATCH 8
#define HAVE_MULTI_INDEX_CONTAINER_HPP 1
#define HAVE_BOOST 1
configure: exit 0

2213
config.status Executable file

File diff suppressed because it is too large Load Diff

1833
config.sub vendored Executable file

File diff suppressed because it is too large Load Diff

View File

@@ -1 +1 @@
configure6064d.ac
configurePSI.ac

1191
configure.ac-Mar10 Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -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

File diff suppressed because it is too large Load Diff

1263
configurePSI.ac Normal file

File diff suppressed because it is too large Load Diff

1052
configurePSI.ac- Normal file

File diff suppressed because it is too large Load Diff

1118
configurePSI.ac-- Normal file

File diff suppressed because it is too large Load Diff

1191
configurePSI.ac-Mar10 Normal file

File diff suppressed because it is too large Load Diff

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -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>

View File

@@ -1 +0,0 @@
outAramis.xml

View File

@@ -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

Binary file not shown.

BIN
examples/cafeTest/cafeTest-- Executable file

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@@ -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;
}

View File

@@ -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"}}

View File

@@ -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

View File

@@ -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

View 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.20.1-py37-gcc-8.5.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.7
#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)
${EPICS_HOST_ARCH}/cafeTest: cafeTest.cc callbacks.h
g++ cafeTest.cc -o ${EPICS_HOST_ARCH}/cafeTest \
$(INCLUDE_PATH) $(LIB_DIR) $(LIBS)
clean:
rm -f ${EPICS_HOST_ARCH}/cafeTest.o ${EPICS_HOST_ARCH}/cafeTest ${EPICS_HOST_ARCH}/monitorTest.o ${EPICS_HOST_ARCH}/monitorTest

View File

@@ -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

View File

@@ -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

View File

@@ -1,22 +1,26 @@
INCLUDES = -Ic:\CAFE\CAFE\cpp\include -Ic:\CAFE\CAFE\cpp -Ic:\local\boost_1_62_0 \
-Ic:\local\boost_1_62_0\boost -Ic:\epics\base-3.14.12.5\include -Ic:\epics\base-3.14.12.5\include\os\WIN32 \
-Ic:\Qt\4.8.4\include
INCLUDES = -Ic:\EPICS\CAFE\cpp\include -Ic:\EPICS\CAFE\cpp -Ic:\EPICS\boost_1_81_0 \
-Ic:\EPICS\boost_1_81_0\boost -IC:\epics\epics-base\include -IC:\epics\epics-base\include\os\WIN32 \
-Ic:\EPICS\epics-base\include\compiler\msvc \
#-Ic:\Qt\4.8.4\include
CXX=cl
CXXFLAGS = /W4 /EHsc
OUTPUT_OPTION = /o $@
LIB_LOCAL = C:\epics\base-3.14.12.5\lib\windows-x64\Com.lib C:\epics\base-3.14.12.5\lib\windows-x64\ca.lib \
C:\CAFE\CAFE\cpp\cafe.lib \
C:\local\boost_1_62_0\lib64-msvc-10.0\libboost_thread-vc100-mt-s-1_62.lib \
C:\local\boost_1_62_0\lib64-msvc-10.0\libboost_system-vc100-mt-s-1_62.lib \
C:\local\boost_1_62_0\lib64-msvc-10.0\libboost_date_time-vc100-mt-s-1_62.lib \
C:\local\boost_1_62_0\lib64-msvc-10.0\libboost_chrono-vc100-mt-s-1_62.lib \
C:\Qt\4.8.4\lib\QtCore4.lib C:\Qt\4.8.4\lib\QtXml4.lib
CXXFLAGS = -DUSE_TYPED_RSET -EHsc -nologo -FC -D__STDC__=0 -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -Ox -GL -Oy- -W3 -MD -DEPICS_BUILD_DLL -DEPICS_CALL_DLL -c
OUTPUT_OPTION = /Fo"$@"
LIB_LOCAL = C:\epics\epics-base\lib\win32-x86\Com.lib C:\epics\epics-base\lib\win32-x86\ca.lib \
C:\EPICS\CAFE\cpp\cafe.lib \
C:\EPICS\boost_1_81_0\stage\lib\\libboost_thread-vc142-mt-x32-1_81.lib \
C:\EPICS\boost_1_81_0\stage\lib\\libboost_system-vc142-mt-x32-1_81.lib \
C:\EPICS\boost_1_81_0\stage\lib\\libboost_date_time-vc142-mt-x32-1_81.lib \
C:\EPICS\boost_1_81_0\stage\lib\\libboost_chrono-vc142-mt-x32-1_81.lib \
# C:\Qt\4.8.4\lib\QtCore4.lib C:\Qt\4.8.4\lib\QtXml4.lib
cafeTest: cafeTest.obj
$(CXX) cafeTest.obj $(LIB_LOCAL)
link -nologo -LTCG -incremental:no -opt:ref -release cafeTest.obj $(LIB_LOCAL)
cafeTest.obj: cafeTest.cpp
$(CXX) $(CXXFLAGS) $(INCLUDES) /c cafeTest.cpp
cafeTest.obj: cafeTest.cc
$(CXX) $(CXXFLAGS) $(INCLUDES) cafeTest.cc
clean:
del *.obj
#"C:\Program Files (x86)\GnuWin32\bin\make"

View File

@@ -0,0 +1,23 @@
INCLUDES = -Ic:\CAFE\CAFE\cpp\include -Ic:\CAFE\CAFE\cpp -Ic:\local\boost_1_62_0 \
-Ic:\local\boost_1_62_0\boost -Ic:\epics\base-3.14.12.5\include -Ic:\epics\base-3.14.12.5\include\os\WIN32 \
-Ic:\Qt\4.8.4\include
CXX=cl
CXXFLAGS = /W4 /EHsc
OUTPUT_OPTION = /o $@
LIB_LOCAL = C:\epics\base-3.14.12.5\lib\windows-x64\Com.lib C:\epics\base-3.14.12.5\lib\windows-x64\ca.lib \
C:\CAFE\CAFE\cpp\cafe.lib \
C:\local\boost_1_62_0\lib64-msvc-10.0\libboost_thread-vc100-mt-s-1_62.lib \
C:\local\boost_1_62_0\lib64-msvc-10.0\libboost_system-vc100-mt-s-1_62.lib \
C:\local\boost_1_62_0\lib64-msvc-10.0\libboost_date_time-vc100-mt-s-1_62.lib \
C:\local\boost_1_62_0\lib64-msvc-10.0\libboost_chrono-vc100-mt-s-1_62.lib \
C:\Qt\4.8.4\lib\QtCore4.lib C:\Qt\4.8.4\lib\QtXml4.lib
cafeTest: cafeTest.obj
$(CXX) cafeTest.obj $(LIB_LOCAL)
cafeTest.obj: cafeTest.cpp
$(CXX) $(CXXFLAGS) $(INCLUDES) /c cafeTest.cpp
#"C:\Program Files (x86)\GnuWin32\bin\make"

View File

@@ -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

View File

@@ -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)

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

Binary file not shown.

View 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

View File

@@ -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__

View File

@@ -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;
};
};

View File

@@ -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;
};

View File

@@ -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();
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -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

View File

@@ -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 */

View File

@@ -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 */

View File

@@ -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 */

View File

@@ -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 */

View File

@@ -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
View 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 */

View 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

View 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

View 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

View 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

View 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

File diff suppressed because it is too large Load Diff

View File

@@ -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

View File

@@ -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

View File

@@ -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__
};

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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);
};

View File

@@ -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

View File

@@ -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;
};
};

View File

@@ -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

View File

@@ -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

View File

@@ -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

Some files were not shown because too many files have changed in this diff Show More