Compare commits

..

45 Commits

Author SHA1 Message Date
Andrew Johnson
7c90e6ed0b Reset version snapshot after tagging 2018-12-12 15:51:30 -06:00
Andrew Johnson
c5fd621337 Clear version snapshot for final release 2018-12-12 15:49:41 -06:00
Andrew Johnson
ea409e79be Link to Launchpad's milestone page for the bug list 2018-12-12 15:49:24 -06:00
Andrew Johnson
c59a18600a Add release notes for the QueueShow additions 2018-12-11 16:47:25 -06:00
Andrew Johnson
68f6f361e1 Merge 3.15 branch into 3.16 2018-12-10 10:47:57 -06:00
Andrew Johnson
84b7612036 Fix for lp: #1801145 recordtype defined after use in device
Add proper equals() method for DBD::Recfield and DBD::Recordtype.
In Parser::parse_recordtype() check for and re-use a declaration
(i.e. an empty recordtype object) when parsing a later definition
of the same recordtype.
2018-12-10 00:25:27 -06:00
Andrew Johnson
f3cf1df503 Merge 3.15 branch into 3.16 2018-12-07 14:07:57 -06:00
Andrew Johnson
9b385480d0 Rename new *QueuePrintStatus() and *QueueStatus iocsh commands to *Show
Also added symbol decorations for Windows builds.
2018-12-07 13:51:35 -06:00
Andrew Johnson
ec036cb26d Merged Martin Konrad's callbackQueueStatus branch into 3.16 2018-12-07 13:47:56 -06:00
Andrew Johnson
64d9d1a4c9 Fix field links to local menu anchors
Anchor IDs are different for XHTML vs HTML generation.
2018-12-07 13:16:06 -06:00
Andrew Johnson
e53244df1f Cherry-pick Dirk's dbState NULL checks from the 7.0 branch
Prevent segfaults in iocsh
2018-12-07 11:45:12 -06:00
Andrew Johnson
fe3d68b5f7 Merged 3.15 branch into 3.16 2018-12-06 17:32:43 -06:00
Andrew Johnson
49f5527cd7 iocsh: Add protection if realloc() fails 2018-12-06 16:35:30 -06:00
Andrew Johnson
ee90dffd40 Add flush to the iocsh errlog command 2018-12-06 16:33:20 -06:00
Andrew Johnson
6664ccfc64 Wiki to POD conversions for bi, bo, calc, calcout and dfanout
These still need going through to update and edit.
Conversions by Tony Pietryla, Argonne.
2018-12-05 16:55:13 -06:00
Andrew Johnson
444cac337c Add POD text for menuScan 2018-12-05 16:55:12 -06:00
Andrew Johnson
313afc4a4c Fix HTMLS generation from IOC menu*.dbd.pod files 2018-12-05 16:55:11 -06:00
Andrew Johnson
0fae0fcc17 Rename various dbd files to dbd.pod 2018-12-05 16:55:10 -06:00
Andrew Johnson
aab5693b45 Fix for CA link disconnect detection
dbCa's doLocked() method must run the callback even when the link
is disconnected to allow alarms to be triggered by softDev support.

Patch from Sebastian Marsching
Also removes testToDo from rec/test/regressTest.c

Fixes lp: #1798855
2018-12-05 00:59:36 -06:00
Martin Konrad
6f919c3991 Simpler implementation using spin lock rather than atomics 2018-12-04 12:00:26 -05:00
Martin Konrad
87761ebf29 Prevent data race between resetHighWaterMark() and put() 2018-12-03 15:59:14 -05:00
Martin Konrad
10d951e2d7 Fix incorrect value for highWaterMark in epicsRingBytes 2018-12-03 10:13:41 -05:00
Martin Konrad
d436561cb2 Add tests for highWaterMark feature 2018-12-03 10:13:41 -05:00
Ralph Lange
a43b805b65 ca/pcas: fix misleading error message (TCP name resolution) 2018-11-30 17:19:56 +01:00
Andrew Johnson
9e999d2bef Only create msi-copy for a Host build-arch 2018-11-27 14:11:11 -06:00
Martin Konrad
040f9013f4 Remove unneeded epicsAtomic from callbackQueueSize 2018-11-27 10:45:35 -05:00
Martin Konrad
0f16977caf Make code compatible with ISO C90 2018-11-27 10:30:35 -05:00
Andrew Johnson
694f045332 Merge Bruce Hill's allow-gt-256-time-events branch into 3.16 2018-11-26 16:29:51 -06:00
Andrew Johnson
daad9b1ba1 Merge updates from 3.15 into 3.16 2018-11-26 15:34:32 -06:00
Andrew Johnson
937878e0a9 Merge Bruce Hill's EPICS-and-CA-version-from-CA-tools branch into 3.15 2018-11-20 10:22:43 -06:00
Andrew Johnson
6e536e1ee0 Fix msi-copy target for cross-build host arch's 2018-11-19 17:59:27 -06:00
Andrew Johnson
6ea6c6ff66 VxWorks: Don't use GCC 2.x for dependency file generation 2018-11-06 13:02:36 -06:00
Andrew Johnson
168d430921 Unify shebang line in tap-to-junit-xml 2018-11-06 10:15:06 -06:00
Bruce Hill
9a8860b771 Expand tabs and revert #include lines to <> instead of quotes. 2018-11-05 18:44:46 -08:00
Michael Davidsaver
693c1020f2 Test if disconnected CA link alarms 2018-11-04 22:20:20 -08:00
Michael Davidsaver
63ddb2d4fc fix mingw build 2018-11-04 22:00:00 -08:00
Bruce Hill
3d8e2d933d Include epicsStdio.h so driver report output can be redirected from iocsh 2018-11-04 20:57:58 -08:00
Andrew Johnson
5f3f87a365 Merge Bruce Hill's MAKEFLAGS-to-MFLAGS branch into 3.15
Added a couple other places where this needed to happen too.
2018-11-02 18:14:39 -05:00
Andrew Johnson
072dbd53e7 Adjust clean-tests rule
Only delete test-result files that actually exist.
2018-11-02 17:47:13 -05:00
Bruce Hill
43322335df Add -V flag to ca client tools to show EPICS and CA versions. 2018-10-31 22:22:19 -07:00
Bruce Hill
fcb5675040 Added release notes re handling of event numbers >= NUM_TIME_EVENTS. 2018-10-31 20:35:52 -07:00
Bruce Hill
3d88c8495b Added comments re handling of event numbers >= NUM_TIME_EVENTS. 2018-10-31 20:30:58 -07:00
Bruce Hill
215c5d954b Modify generalTimeGetEventPriority() to allow eventNumber > 256.
eventNumbers between 0 and NUM_TIME_EVENTS will continue to get checked for advancing timestamps.
Support for eventNumbers > NUM_TIME_EVENTS will be up to the generalTime provider.
2018-10-31 20:20:32 -07:00
Martin Konrad
59ec8d897d Expose callback queue status
This allows tools like iocStats to monitor the queue status of
the callback queues. This fixes lp:1786540.
2018-10-26 18:49:34 -04:00
Bruce Hill
b84ee89d87 Fix ECHO definition to not match variables in MAKEFLAGS by using MFLAGS instead.
Prior ECHO definition strips T_A=XXX command line variable definitions
from MAKEFLAGS but doesn't strip other variable definitions such as
INSTALL_LOCATION.  As a result, if you "make INSTALL_LOCATION=XXX"
the ECHO definition erroneously matches if your install location
contains 's'.   Changing the ECHO definition to MFLAGS avoids
all command line variable definitions.
2018-04-16 19:11:40 -07:00
1575 changed files with 40817 additions and 16613 deletions

View File

@@ -1,8 +0,0 @@
#!/bin/sh
#
# Checkout submodules on their appropriate branches
#
git submodule foreach '\
git checkout `git config -f $toplevel/.gitmodules submodule.$name.branch` && \
git pull '

5
.gitattributes vendored
View File

@@ -1,5 +0,0 @@
.ci/ export-ignore
.tools/ export-ignore
.appveyor.yml export-ignore
.travis.yml export-ignore
README export-subst

2
.gitignore vendored
View File

@@ -7,8 +7,6 @@
/include/
/templates/
/configure/*.local
/modules/RELEASE.*.local
/modules/Makefile.local
O.*/
/QtC-*
*.orig

24
.gitmodules vendored
View File

@@ -1,24 +0,0 @@
[submodule "modules/pvData"]
path = modules/pvData
url = https://github.com/epics-base/pvDataCPP
branch = master
[submodule "modules/pvAccess"]
path = modules/pvAccess
url = https://github.com/epics-base/pvAccessCPP
branch = master
[submodule "modules/normativeTypes"]
path = modules/normativeTypes
url = https://github.com/epics-base/normativeTypesCPP
branch = master
[submodule "modules/pvaClient"]
path = modules/pvaClient
url = https://github.com/epics-base/pvaClientCPP
branch = master
[submodule "modules/pvDatabase"]
path = modules/pvDatabase
url = https://github.com/epics-base/pvDatabaseCPP
branch = master
[submodule "modules/pva2pva"]
path = modules/pva2pva
url = https://github.com/epics-base/pva2pva
branch = master

View File

@@ -1,109 +0,0 @@
#!/bin/sh
#
# Make tar for git repo w/ one level of sub modules.
#
set -e
die() {
echo "$1" >&2
exit 1
}
TOPREV="$1"
FINALTAR="$2"
PREFIX="$3"
if ! [ "$TOPREV" ]
then
cat <<EOF >&2
usage: $0 [rev] [outfile.tar.gz] [prefix/]
<rev> may be any git revision spec. (tag, branch, or commit id).
Output file may be .tar.gz, .tar.bz2, or any extension supported by "tar -a".
If output file name is omitted, "base-<rev>.tar.gz" will be used.
If <prefix> is omitted, the default prefix is "base-<rev>/".
EOF
exit 1
fi
[ "$FINALTAR" ] || FINALTAR="base-$TOPREV.tar.gz"
[ "$PREFIX" ] || PREFIX="base-$TOPREV/"
case "$PREFIX" in
*/) ;;
*) die "Prefix must end with '/'";;
esac
# Check for both <tag> and R<tag>
if ! [ `git tag -l $TOPREV` ]
then
if [ `git tag -l R$TOPREV` ]
then
TOPREV="R$TOPREV"
else
die "No tags exist '$TOPREV' or 'R$TOPREV'"
fi
fi
# temporary directory w/ automatic cleanup
TDIR=`mktemp -d`
trap 'rm -rf "$TDIR"' EXIT INT QUIT TERM
mkdir "$TDIR"/tar
echo "Exporting revision $TOPREV as $FINALTAR with prefix $PREFIX"
# Use git-archive to copy files at the given revision into our temp. dir.
# Respects 'export-exclude' in .gitattributes files.
git archive --prefix=$PREFIX $TOPREV | tar -C "$TDIR"/tar -x
# use ls-tree instead of submodule-foreach to capture submodule revision associated with supermodule rev.
#
# sub-modules appear in tree as eg.:
# 160000 commit c3a6cfcf0dad4a4eeecf59b474710d06ff3eb68a modules/ca
git ls-tree -r $TOPREV | awk '/^[0-9]+ commit / {print $3, $4}' | \
while read HASH MODDIR
do
echo "Visiting $HASH $MODDIR"
git -C $MODDIR archive --prefix=${PREFIX}${MODDIR}/ $HASH | tar -C "$TDIR"/tar -x
done
# make a list of files copied and filter out undesirables
(cd "$TDIR"/tar && find . -mindepth 1 -not -type d) > "$TDIR"/list.1
# Remove leading ./ from filenames
sed -i -e 's|^\./||' "$TDIR"/list.1
# Exclude files
sed \
-e '/\/\.\?ci\//d' \
-e '/\/\.tools\//d' \
-e '/\/jenkins\//d' \
-e '/\/\.git/d' \
-e '/\/\.project$/d' \
-e '/\/\.travis\.yml$/d' \
-e '/\/\.appveyor\.yml$/d' \
"$TDIR"/list.1 > "$TDIR"/list.2
if ! diff -U 0 "$TDIR"/list.1 "$TDIR"/list.2
then
echo "Excluding the files shown above"
fi
# Use the filtered list to build the final tar
# The -a option chooses compression automatically based on output file name.
tar -C "$TDIR"/tar --files-from="$TDIR"/list.2 -caf "$FINALTAR"
echo "Wrote $FINALTAR"
tar -taf "$FINALTAR" > "$TDIR"/list.3
# make sure we haven't picked up anything extra
if ! diff -u "$TDIR"/list.2 "$TDIR"/list.3
then
echo "Oops! Tarfile diff against plan shown above"
fi

View File

@@ -3,6 +3,16 @@ dist: trusty
language: c
compiler:
- gcc
env:
- CMPLR=gcc
- CMPLR=gcc EXTRA=CMD_CXXFLAGS=-std=c++11
- CMPLR=gcc STATIC=YES
- CMPLR=clang
- CMPLR=clang STATIC=YES
- WINE=32 TEST=NO STATIC=YES
- WINE=32 TEST=NO STATIC=NO
- RTEMS=4.10 TEST=YES
- RTEMS=4.9 TEST=YES
addons:
apt:
packages:
@@ -11,17 +21,12 @@ addons:
- perl
- clang
- g++-mingw-w64-i686
- bison
- flex
- texinfo
- install-info
- qemu-system-x86
script:
- .ci/travis-build.sh
env:
- CMPLR=gcc
- CMPLR=clang
- CMPLR=gcc STATIC=YES
- CMPLR=clang STATIC=YES
- CMPLR=gcc EXTRA=CMD_CXXFLAGS=-std=c++11
- CMPLR=clang EXTRA=CMD_CXXFLAGS=-std=c++11
- WINE=32 TEST=NO STATIC=YES
- WINE=32 TEST=NO STATIC=NO
- RTEMS=4.10 TEST=YES
- RTEMS=4.9 TEST=YES
cache:
directories:
- $HOME/.cache
script: sh ci/travis-build.sh </dev/null

View File

@@ -4,7 +4,7 @@
# Copyright (c) 2002 The Regents of the University of California, as
# Operator of Los Alamos National Laboratory.
# EPICS BASE is distributed subject to a Software License Agreement found
# in file LICENSE that is included with this distribution.
# in file LICENSE that is included with this distribution.
#*************************************************************************
TOP = .
@@ -14,12 +14,8 @@ include $(TOP)/configure/CONFIG
TOOLS = $(TOP)/src/tools
DIRS += configure src
src_DEPEND_DIRS = configure
DIRS += test
test_DEPEND_DIRS = src
DIRS += modules
modules_DEPEND_DIRS = src
include $(TOP)/configure/RULES_TOP

3
README
View File

@@ -22,6 +22,3 @@ training materials, additional components, links to other
websites etc. is available on the EPICS home page at
https://epics.anl.gov/
$Format:%cD$
$Format:%H$
https://code.launchpad.net/epics-base

View File

@@ -16,7 +16,7 @@ init:
- git config --global core.autocrlf true
# Set clone depth (do not fetch complete history)
clone_depth: 50
clone_depth: 2
# Skipping commits affecting only specific files
skip_commits:
@@ -66,14 +66,13 @@ matrix:
#---------------------------------#
install:
- cmd: git submodule update --init --recursive
- cmd: .ci/appveyor-prepare.bat
- cmd: ci/appveyor-prepare.bat
build_script:
- cmd: .ci/appveyor-make.bat
- cmd: ci/appveyor-make.bat
test_script:
- cmd: .ci/appveyor-make.bat runtests
- cmd: ci/appveyor-make.bat runtests
#---------------------------------#
# notifications #

11
.ci/travis-build.sh → ci/travis-build.sh Executable file → Normal file
View File

@@ -8,7 +8,7 @@ die() {
CACHEKEY=1
export EPICS_HOST_ARCH=`perl src/tools/EpicsHostArch.pl`
EPICS_HOST_ARCH=`perl src/tools/EpicsHostArch.pl`
[ -e configure/os/CONFIG_SITE.Common.linux-x86 ] || die "Wrong location: $PWD"
@@ -48,19 +48,22 @@ EOF
fi
# set RTEMS to eg. "4.9" or "4.10"
# requires qemu, bison, flex, texinfo, install-info
if [ -n "$RTEMS" ]
then
echo "Cross RTEMS${RTEMS} for pc386"
install -d /home/travis/.cache
curl -L "https://github.com/mdavidsaver/rsb/releases/download/20171203-${RTEMS}/i386-rtems${RTEMS}-trusty-20171203-${RTEMS}.tar.bz2" \
| tar -C / -xmj
sed -i -e '/^RTEMS_VERSION/d' -e '/^RTEMS_BASE/d' configure/os/CONFIG_SITE.Common.RTEMS
cat << EOF >> configure/os/CONFIG_SITE.Common.RTEMS
RTEMS_VERSION=$RTEMS
RTEMS_BASE=$HOME/.rtems
RTEMS_BASE=/home/travis/.rtems
EOF
cat << EOF >> configure/CONFIG_SITE
CROSS_COMPILER_TARGET_ARCHS += RTEMS-pc386-qemu
CROSS_COMPILER_RUNTEST_ARCHS += RTEMS-pc386-qemu
EOF
# find local qemu-system-i386
@@ -72,6 +75,6 @@ make -j2 $EXTRA
if [ "$TEST" != "NO" ]
then
make -j2 tapfiles
make -j2 -s test-results
make tapfiles
make -s test-results
fi

View File

@@ -4,7 +4,7 @@
# Copyright (c) 2002 The Regents of the University of California, as
# Operator of Los Alamos National Laboratory.
# EPICS BASE is distributed subject to a Software License Agreement found
# in file LICENSE that is included with this distribution.
# in file LICENSE that is included with this distribution.
#*************************************************************************
#
# check for add-on CFLAGS and CXXFLAGS
@@ -37,6 +37,9 @@
# PROD_LIBS libs needed by PROD and TESTPROD
# LIB_LIBS libs needed by shared LIBRARY
# SHRLIB_LIBS libs needed by shared LIBRARY
# USR_OBJLIBS R3.13 vxWorks object libs needed building libraries and prods
# PROD_OBJLIBS R3.13 vxWorks object libs needed for building prods
# LIB_OBJLIBS R3.13 vxWorks object libs needed for building libraries
# USR_SYS_LIBS system libs needed building libraries and prods
# PROD_SYS_LIBS system libs needed for building prods
# LIB_SYS_LIBS system libs needed for building libraries
@@ -270,6 +273,30 @@ OBJS_HOST+=$(OBJS_HOST_DEFAULT)
endif
endif
ifneq ($(strip $(PROD_OBJLIBS_$(OS_CLASS))),)
PROD_OBJLIBS+=$(subst -nil-,,$(PROD_OBJLIBS_$(OS_CLASS)))
else
ifdef PROD_OBJLIBS_DEFAULT
PROD_OBJLIBS+=$(PROD_OBJLIBS_DEFAULT)
endif
endif
ifneq ($(strip $(LIB_OBJLIBS_$(OS_CLASS))),)
LIB_OBJLIBS+=$(subst -nil-,,$(LIB_OBJLIBS_$(OS_CLASS)))
else
ifdef LIB_OBJLIBS_DEFAULT
LIB_OBJLIBS+=$(LIB_OBJLIBS_DEFAULT)
endif
endif
ifneq ($(strip $(USR_OBJLIBS_$(OS_CLASS))),)
USR_OBJLIBS+=$(subst -nil-,,$(USR_OBJLIBS_$(OS_CLASS)))
else
ifdef USR_OBJLIBS_DEFAULT
USR_OBJLIBS+=$(USR_OBJLIBS_DEFAULT)
endif
endif
ifneq ($(strip $(LIB_OBJS_$(OS_CLASS))),)
LIB_OBJS+=$(subst -nil-,,$(LIB_OBJS_$(OS_CLASS)))
else
@@ -554,3 +581,4 @@ ifdef LIB_RCS_DEFAULT
LIB_RCS+=$(LIB_RCS_DEFAULT)
endif
endif

View File

@@ -4,7 +4,7 @@
# Copyright (c) 2002 The Regents of the University of California, as
# Operator of Los Alamos National Laboratory.
# EPICS BASE is distributed subject to a Software License Agreement found
# in file LICENSE that is included with this distribution.
# in file LICENSE that is included with this distribution.
#*************************************************************************
#---------------------------------------------------------------
@@ -17,6 +17,17 @@ ifdef T_A
EPICS_BASE_BIN = $(EPICS_BASE)/bin/$(T_A)
endif
#---------------------------------------------------------------
# EPICS Base Ioc libraries
EPICS_BASE_IOC_LIBS += dbRecStd dbCore ca Com
#---------------------------------------------------------------
# EPICS Base Host libraries
EPICS_BASE_HOST_LIBS += cas gdd
EPICS_BASE_HOST_LIBS += ca Com
#---------------------------------------------------------------
# Version number for base shared libraries (and win32 products)
@@ -25,8 +36,18 @@ ifdef BASE_TOP
SHRLIB_VERSION = $(EPICS_VERSION).$(EPICS_REVISION).$(EPICS_MODIFICATION)
# Windows only allows 2 levels of version numbering
PROD_VERSION = $(EPICS_VERSION).$(EPICS_REVISION)
BASE_CPPFLAGS += -DUSE_TYPED_RSET
endif # BASE_TOP
#---------------------------------------------------------------
# Base c preprocessor flags
# osithread default stack
OSITHREAD_USE_DEFAULT_STACK = NO
OSITHREAD_DEFAULT_STACK_FLAGS_YES = -DOSITHREAD_USE_DEFAULT_STACK
BASE_CPPFLAGS += $(OSITHREAD_DEFAULT_STACK_FLAGS_$(OSITHREAD_USE_DEFAULT_STACK))
#---------------------------------------------------------------
# Where to find the installed build tools
# Windows does not like commands with relative paths starting ../
@@ -38,11 +59,15 @@ FIND_TOOL = $(firstword $(wildcard $(TOOLS)/$(1) $(TOP)/src/tools/$(1)))
#---------------------------------------------------------------
# EPICS Base build tools and tool flags
PODTOHTML = $(PERL) $(TOOLS)/podToHtml.pl
CONVERTRELEASE = $(PERL) $(call FIND_TOOL,convertRelease.pl)
FULLPATHNAME = $(PERL) $(TOOLS)/fullPathName.pl
TAPTOJUNIT = $(PERL) $(TOOLS)/tap-to-junit-xml.pl
GENVERSIONHEADER = $(PERL) $(TOOLS)/genVersionHeader.pl $(QUIET_FLAG) $(QUESTION_FLAG)
MAKEBPT = $(TOOLS)/makeBpt$(HOSTEXE)
DBEXPAND = $(PERL) $(TOOLS)/dbdExpand.pl
DBTORECORDTYPEH = $(PERL) $(TOOLS)/dbdToRecordtypeH.pl
DBTOMENUH = $(PERL) $(TOOLS)/dbdToMenuH.pl
REGISTERRECORDDEVICEDRIVER = $(PERL) $(TOOLS)/registerRecordDeviceDriver.pl
CONVERTRELEASE = $(PERL) $(call FIND_TOOL,convertRelease.pl)
FULLPATHNAME = $(PERL) $(TOOLS)/fullPathName.pl
TAPTOJUNIT = $(PERL) $(TOOLS)/tap-to-junit-xml.pl
GENVERSIONHEADER = $(PERL) $(TOOLS)/genVersionHeader.pl $(QUIET_FLAG) $(QUESTION_FLAG)
#---------------------------------------------------------------
# tools for installing libraries and products
@@ -51,6 +76,19 @@ INSTALL_PRODUCT = $(INSTALL)
INSTALL_LIBRARY = $(INSTALL)
#---------------------------------------------------------------
# tools for making header dependencies and variable replacement
MKMF = $(PERL) $(TOOLS)/mkmf.pl
REPLACEVAR = $(PERL) $(TOOLS)/replaceVAR.pl
# tools for making header dependancies and variable replacement
MKMF = $(PERL) $(TOOLS)/mkmf.pl
REPLACEVAR = $(PERL) $(TOOLS)/replaceVAR.pl
#---------------------------------------------------------------
# Our versions of lex (flex) and yacc (antelope)
EYACC = $(TOOLS)/antelope$(HOSTEXE)
ELEX = $(TOOLS)/e_flex$(HOSTEXE) -S$(EPICS_BASE)/include/flex.skel.static
YACC = $(EYACC)
LEX = $(ELEX)
#---------------------------------------------------------------
# The 3.15 version of msi supports new options
MSI3_15 = $(EPICS_BASE_HOST_BIN)/msi

View File

@@ -15,37 +15,27 @@
# EPICS_SITE_VERSION is defined in CONFIG_SITE for sites that want a local
# version number to be included in the reported version string.
# We define convenience macros for our release series to be NO or YES, so
# Makefiles can detect 'Series X or later', or 'Series X only' like this:
#
# We define BASE_3_14 and BASE_3_15 as NO and BASE_3_16 as YES, so
# ifdef BASE_3_14
# true for 3.14 or later
# ifdef BASE_3_15
# true for 3.15 or later
# ifdef BASE_3_16
# true for 3.16 or later
# ifdef BASE_7_0
# true for 7.0 or later
#
# ifeq ($(BASE_3_14),YES)
# true for 3.14.x only
# ifeq ($(BASE_3_15),YES)
# true for 3.15.x only
# true for 3.15 only
# ifeq ($(BASE_3_16),YES)
# true for 3.16.x only.
# ifeq ($(BASE_7_0),YES)
# true for 7.0.x only.
# true for 3.16 only.
BASE_3_14 = NO
BASE_3_15 = NO
BASE_3_16 = NO
BASE_7_0 = YES
BASE_3_16 = YES
# EPICS_VERSION must be a number >0 and <256
EPICS_VERSION = 7
EPICS_VERSION = 3
# EPICS_REVISION must be a number >=0 and <256
EPICS_REVISION = 0
EPICS_REVISION = 16
# EPICS_MODIFICATION must be a number >=0 and <256
EPICS_MODIFICATION = 2
@@ -55,12 +45,12 @@ EPICS_MODIFICATION = 2
EPICS_PATCH_LEVEL = 0
# This will end in -DEV between official releases
#EPICS_DEV_SNAPSHOT=-DEV
EPICS_DEV_SNAPSHOT=-DEV
#EPICS_DEV_SNAPSHOT=-pre1
#EPICS_DEV_SNAPSHOT=-pre1-DEV
#EPICS_DEV_SNAPSHOT=-pre2
#EPICS_DEV_SNAPSHOT=-pre2-DEV
EPICS_DEV_SNAPSHOT=-rc1
#EPICS_DEV_SNAPSHOT=-rc1
#EPICS_DEV_SNAPSHOT=-rc1-DEV
#EPICS_DEV_SNAPSHOT=-rc2
#EPICS_DEV_SNAPSHOT=-rc2-DEV

View File

@@ -4,7 +4,7 @@
# Copyright (c) 2002 The Regents of the University of California, as
# Operator of Los Alamos National Laboratory.
# EPICS BASE is distributed subject to a Software License Agreement found
# in file LICENSE that is included with this distribution.
# in file LICENSE that is included with this distribution.
#*************************************************************************
#
# CONFIG_COMMON
@@ -76,11 +76,14 @@ COMMON_DIR = ../O.Common
IOCS_APPL_TOP = $(shell $(FULLPATHNAME) $(INSTALL_LOCATION))
#-------------------------------------------------------
# Make echo output - suppress echoing if make's '-s' flag is set
# Silencing the build - suppress messages during 'make -s'
NOP = :
ECHO = @$(if $(findstring s,$(patsubst T_A=%,,$(MAKEFLAGS))),$(NOP),echo)
QUIET_FLAG := $(if $(findstring s,$(MAKEFLAGS)),-q,)
QUESTION_FLAG := $(if $(findstring q,$(MAKEFLAGS)),-i,)
ECHO = @$(if $(findstring s,$(MFLAGS)),$(NOP),echo)
QUIET_FLAG := $(if $(findstring s,$(MFLAGS)),-q,)
#-------------------------------------------------------
# Convert 'make -q' flag into '-i' for genVersionHeader.pl
QUESTION_FLAG := $(if $(findstring q,$(MFLAGS)),-i,)
#-------------------------------------------------------
ifdef T_A
@@ -90,7 +93,7 @@ INSTALL_SHRLIB = $(INSTALL_LOCATION_LIB)/$(T_A)
INSTALL_TCLLIB = $(INSTALL_LOCATION_LIB)/$(T_A)
INSTALL_BIN = $(INSTALL_LOCATION_BIN)/$(T_A)
#Directories for libraries
# Directories for libraries
SHRLIB_SEARCH_DIRS = $(INSTALL_LIB)
#-------------------------------------------------------
@@ -164,13 +167,13 @@ TESTSHRLIBNAME = $(TESTSHRLIBNAME_$(SHARED_LIBRARIES))
#--------------------------------------------------
# obj files
TARGET_OBJS = $($*_LDOBJS) $(addsuffix $(OBJ),$(basename $($*_OBJS) $($*_SRCS)))
TARGET_OBJS = $($*_OBJLIBS) $($*_LDOBJS) $(addsuffix $(OBJ),$(basename $($*_OBJS) $($*_SRCS)))
PRODUCT_OBJS = $(addsuffix $(OBJ),$(basename $(SRCS) $(USR_SRCS) $(PROD_SRCS) $(USR_OBJS) $(PROD_OBJS)))
PROD_LD_OBJS = $(TARGET_OBJS) $(PRODUCT_OBJS)
PROD_LD_OBJS = $(USR_OBJLIBS) $(PROD_OBJLIBS) $(TARGET_OBJS) $(PRODUCT_OBJS)
LIBRARY_OBJS = $(addsuffix $(OBJ),$(basename $(SRCS) $(USR_SRCS) $(LIB_SRCS) $(LIBSRCS) $(USR_OBJS) $(LIB_OBJS)))
LIBRARY_LD_OBJS = $(TARGET_OBJS) $(LIBRARY_OBJS)
LIBRARY_LD_OBJS = $(USR_OBJLIBS) $(LIB_OBJLIBS) $(TARGET_OBJS) $(LIBRARY_OBJS)
#--------------------------------------------------
# Windows resource files
@@ -262,7 +265,7 @@ LIBRARY_SRCS=$(basename $(foreach lib,$(LIBRARY) $(TESTLIBRARY) $(LOADABLE_LIBRA
LIBRARY_SRC_CFLAGS=$($(patsubst $*,SHRLIB,$(findstring $*,$(LIBRARY_SRCS)))_CFLAGS)
#--------------------------------------------------
# prefix, suffix, and ldflags for loadable shared libraries
# prefix, suffix, and ldflags for loadable shared libraries
TARGET_LIB_LDFLAGS=$($(patsubst $*,LOADABLE_,$(findstring $*,$(LOADABLE_LIBRARY)))SHRLIB_LDFLAGS)
LOADABLE_SHRLIB_PREFIX=$(SHRLIB_PREFIX)
LOADABLE_SHRLIB_SUFFIX=$(SHRLIB_SUFFIX)
@@ -460,5 +463,5 @@ COMMON_INC += $(filter $(COMMON_DIR)/%, $(foreach file, $(INC), \
SOURCE_INC = $(wildcard $(file) $(SOURCE_INC_bbb) )
SOURCE_INC_bbb = $(foreach dir, $(ALL_SRC_DIRS), $(SOURCE_INC_aaa) )
SOURCE_INC_aaa = $(addsuffix /$(file), $(dir) )
endif

View File

@@ -47,9 +47,6 @@ EPICS_CAS_SERVER_PORT=
EPICS_CAS_INTF_ADDR_LIST=""
EPICS_CAS_IGNORE_ADDR_LIST=""
# Servers to disable
EPICS_IOC_IGNORE_SERVERS=""
# Log Server:
# EPICS_IOC_LOG_PORT Log server port number etc.
EPICS_IOC_LOG_PORT=7004

View File

@@ -429,30 +429,30 @@ $(foreach file, $(DBD_INSTALLS), $(eval $(call DBD_INSTALLS_template, $(file))))
#---------------------------------------------------------------
# HTML files
$(COMMON_DIR)/%.html: %.dbd.pod
$(COMMON_DIR)/%.html: %.dbd.pod $(TOOLS)/dbdToHtml.pl
@$(RM) $(notdir $@)
$(DBDTOHTML) $(DBDFLAGS) -o $(notdir $@) $<
$(PERL) $(TOOLS)/dbdToHtml.pl $(DBDFLAGS) -o $(notdir $@) $<
@$(MV) $(notdir $@) $@
$(COMMON_DIR)/%.html: %.pod
$(COMMON_DIR)/%.html: %.pod $(TOOLS)/podToHtml.pl
@$(RM) $(notdir $@)
$(PODTOHTML) -o $(notdir $@) $<
$(PERL) $(TOOLS)/podToHtml.pl -o $(notdir $@) $<
@$(MV) $(notdir $@) $@
$(COMMON_DIR)/%.html: %.pm
$(COMMON_DIR)/%.html: %.pm $(TOOLS)/podToHtml.pl
@$(RM) $(notdir $@)
$(PODTOHTML) -o $(notdir $@) $<
$(PERL) $(TOOLS)/podToHtml.pl -o $(notdir $@) $<
@$(MV) $(notdir $@) $@
$(COMMON_DIR)/%.html: ../%.pm
$(COMMON_DIR)/%.html: ../%.pm $(TOOLS)/podToHtml.pl
@$(RM) $(notdir $@)
$(PODTOHTML) -s -o $(notdir $@) $<
$(PERL) $(TOOLS)/podToHtml.pl -s -o $(notdir $@) $<
@$(MKDIR) $(dir $@)
@$(MV) $(notdir $@) $@
$(COMMON_DIR)/%.html: ../%.pl
$(COMMON_DIR)/%.html: ../%.pl $(TOOLS)/podToHtml.pl
@$(RM) $(notdir $@)
$(PODTOHTML) -s -o $(notdir $@) $<
$(PERL) $(TOOLS)/podToHtml.pl -s -o $(notdir $@) $<
@$(MV) $(notdir $@) $@
.PRECIOUS: $(COMMON_DIR)/%.html %.html

View File

@@ -4,7 +4,7 @@
# Copyright (c) 2002 The Regents of the University of California, as
# Operator of Los Alamos National Laboratory.
# EPICS BASE is distributed subject to a Software License Agreement found
# in the file LICENSE that is included with this distribution.
# in the file LICENSE that is included with this distribution.
#*************************************************************************
# RULES.ioc

View File

@@ -43,6 +43,7 @@ LOADABLE_LIBRARY += $(LOADABLE_LIBRARY_HOST)
OBJS += $(OBJS_HOST)
PROD += $(PROD_HOST)
SCRIPTS += $(SCRIPTS_HOST)
TARGETS += $(TARGETS_HOST)
TESTLIBRARY += $(TESTLIBRARY_HOST)
TESTSCRIPTS += $(TESTSCRIPTS_HOST)
TESTPROD += $(TESTPROD_HOST)
@@ -54,6 +55,7 @@ LOADABLE_LIBRARY += $(LOADABLE_LIBRARY_IOC)
OBJS += $(OBJS_IOC)
PROD += $(PROD_IOC)
SCRIPTS += $(SCRIPTS_IOC)
TARGETS += $(TARGETS_IOC)
TESTLIBRARY += $(TESTLIBRARY_IOC)
TESTSCRIPTS += $(TESTSCRIPTS_IOC)
TESTPROD += $(TESTPROD_IOC)
@@ -333,12 +335,6 @@ $(MODNAME): %$(MODEXT): %$(EXE)
@$(RM) $@
$(LINK.mod)
#---------------------------------------------------------------
# Generate Perl include path module
%ModuleDirs.pm: $(wildcard $(TOP)/configure/RELEASE*)
@$(MKDIR) $(dir $@)
$(CONVERTRELEASE) -T $(TOP) $@
#---------------------------------------------------------------
# Automated testing
@@ -360,14 +356,17 @@ ifneq ($(TAPFILES),)
ifdef RUNTESTS_ENABLED
prove --failures --ext .tap --exec "$(CAT)" --color $(TAPFILES)
endif
CURRENT_TAPFILES := $(wildcard $(TAPFILES))
CURRENT_JUNITFILES := $(wildcard $(JUNITFILES))
endif
clean-tests:
ifneq ($(TAPFILES),)
$(RM) $(TAPFILES)
ifneq ($(CURRENT_TAPFILES),)
$(RM) $(CURRENT_TAPFILES)
endif
ifneq ($(JUNITFILES),)
$(RM) $(JUNITFILES)
ifneq ($(CURRENT_JUNITFILES),)
$(RM) $(CURRENT_JUNITFILES)
endif
tapfiles: $(TESTSCRIPTS) $(TAPFILES)
@@ -385,7 +384,7 @@ endif
# If there's a perl test script (.plt) available, use it
%.t: ../%.plt
@$(RM) $@
$(EXPAND_TOOL) -t $(INSTALL_LOCATION) -a $(T_A) $< $@
$(CP) $< $@
# Test programs (.t files) must be written in Perl.
# Generate a perl program to exec the real test binary.
@@ -476,7 +475,6 @@ ifneq (,$(strip $(LOADABLE_SHRLIB_VERSION)))
endif # LOADABLE_SHRLIB_VERSION
endif # LOADABLE_SHRLIB_SUFFIX
ifneq ($(INSTALL_CONFIGS),)
$(INSTALL_CONFIG)/%: %
$(ECHO) "Installing config file $@"
@$(INSTALL) -d -m $(INSTALL_PERMISSIONS) $< $(@D)
@@ -484,7 +482,6 @@ $(INSTALL_CONFIG)/%: %
$(INSTALL_CONFIG)/%: ../%
$(ECHO) "Installing config file $@"
@$(INSTALL) -d -m $(INSTALL_PERMISSIONS) $< $(@D)
endif
$(INSTALL_INCLUDE)/% : $(COMMON_DIR)/%
$(ECHO) "Installing generated generic include file $@"

View File

@@ -4,7 +4,7 @@
# Copyright (c) 2002 The Regents of the University of California, as
# Operator of Los Alamos National Laboratory.
# EPICS BASE is distributed subject to a Software License Agreement found
# in the file LICENSE that is included with this distribution.
# in the file LICENSE that is included with this distribution.
#*************************************************************************
# RULES_EXPAND

View File

@@ -4,7 +4,7 @@
# Copyright (c) 2002 The Regents of the University of California, as
# Operator of Los Alamos National Laboratory.
# EPICS BASE is distributed subject to a Software License Agreement found
# in the file LICENSE that is included with this distribution.
# in the file LICENSE that is included with this distribution.
#*************************************************************************
# Octave definitions and rules

View File

@@ -15,7 +15,7 @@ $(1)_$(2) += $$(if $$(strip $$($(1)_$(2)_$$(OS_CLASS))), \
$$($(1)_$(2)_DEFAULT))
endef
$(foreach type, SRCS RCS OBJS LDFLAGS LDOBJS SYS_LIBS , \
$(foreach type, SRCS RCS OBJS LDFLAGS OBJLIBS LDOBJS SYS_LIBS , \
$(foreach target, $(PROD) $(TESTPROD) $(LIBRARY) $(TESTLIBRARY) $(LOADABLE_LIBRARY) , \
$(eval $(call TARGET_template,$(strip $(target)),$(type)))))
@@ -147,3 +147,4 @@ $(foreach target, $(LOADABLE_LIBRARY), \
$(eval $(call LOADABLE_LIBRARY_template,$(strip $(target)))))
#-----------------------------------------------------------------------

View File

@@ -15,19 +15,12 @@ CVSCLEAN = $(call FIND_TOOL,cvsclean.pl)
cvsclean:
$(PERL) $(CVSCLEAN)
DEPCLEAN = $(call FIND_TOOL,depclean.pl)
depclean:
$(PERL) $(DEPCLEAN)
realuninstall: uninstallDirs
$(RMDIR) $(INSTALL_LOCATION_BIN)
$(RMDIR) $(INSTALL_LOCATION_LIB)
UNINSTALL_DIRS += $(INSTALL_DBD) $(INSTALL_INCLUDE) $(INSTALL_DOC) \
$(INSTALL_HTML) $(INSTALL_TEMPLATES) $(INSTALL_DB) $(DIRECTORY_TARGETS)
ifneq ($(INSTALL_LOCATION),$(TOP))
UNINSTALL_DIRS += $(INSTALL_CONFIG)
endif
uninstallDirs:
$(RMDIR) $(UNINSTALL_DIRS)
@@ -77,14 +70,12 @@ help:
@echo " uninstall - Remove install directories created by this hostarch."
@echo " realuninstall - Removes ALL install dirs"
@echo " distclean - Same as realclean cvsclean realuninstall."
@echo " depclean - Removes all .d files from O.<arch> directories."
@echo " cvsclean - Removes cvs .#* files in all dirs of directory tree"
@echo " help - Prints this list of valid make targets "
@echo "Indiv. object targets are supported by O.<arch> level Makefile .e.g"
@echo " xxxRecord.o"
.PHONY: cleandirs distclean cvsclean depclean
.PHONY: realuninstall archuninstall uninstallDirs
.PHONY: cleandirs distclean cvsclean realuninstall archuninstall uninstallDirs
.PHONY: uninstall help
# Include <top>/cfg/TOP_RULES* files from tops defined in RELEASE* files

View File

@@ -76,7 +76,7 @@ CPPFLAGS += $($(BUILD_CLASS)_CPPFLAGS) $(POSIX_CPPFLAGS) $(OPT_CPPFLAGS)\
$(USR_CPPFLAGS) $(CMD_CPPFLAGS) $(ARCH_DEP_CPPFLAGS) $(OP_SYS_CPPFLAGS)\
$(OP_SYS_INCLUDE_CPPFLAGS) $(CODE_CPPFLAGS)
ECHO = @$(if $(findstring s,$(patsubst T_A=%,,$(MAKEFLAGS))),$(NOP),echo)
ECHO = @$(if $(findstring s,$(MFLAGS)),$(NOP),echo)
#--------------------------------------------------
# Although RTEMS uses gcc, it wants to use gcc its own way

View File

@@ -146,8 +146,10 @@ SHRLIB_CFLAGS =
SHRLIB_LDFLAGS =
#--------------------------------------------------
# Earlier versions of gcc don't understand -MF
HDEPENDS_COMPFLAGS = -MM > $@
# Don't use gcc 2.x for dependency generation
HDEPENDS_METHOD_2 = MKMF
HDEPENDS_METHOD = $(firstword $(HDEPENDS_METHOD_$(VX_GNU_MAJOR_VERSION)) COMP)
#--------------------------------------------------
# osithead use default stack, YES or NO override

View File

@@ -8,8 +8,7 @@ GNU_TARGET = arm-xilinx-linux-gnueabi
# Set GNU tools install path
# Examples are installations at the APS:
#GNU_DIR = /usr/local/vw/zynq-2011.09
GNU_DIR = /usr/local/vw/zynq-2016.1/gnu/arm/lin
GNU_DIR = /usr/local/vw/zynq-2011.09
#GNU_DIR = /usr/local/Xilinx/SDK/2016.3/gnu/arm/lin
#GNU_DIR = /APSshare/XilinxSDK/2015.4/gnu/arm/lin

View File

@@ -4,17 +4,17 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Known Problems in EPICS 7.0.1</title>
<title>Known Problems in Base-3.16.1</title>
</head>
<body>
<h1 style="text-align: center">EPICS 7.0.1: Known Problems</h1>
<h1 style="text-align: center">EPICS Base R3.16.1: Known Problems</h1>
<p>Any patch files linked below should be applied at the root of the
base-7.0.1 tree. Download them, then use the GNU Patch program as
base-3.16.1 tree. Download them, then use the GNU Patch program as
follows:</p>
<blockquote><pre>% <b>cd <i>/path/to/</i>base-7.0.1</b>
<blockquote><pre>% <b>cd <i>/path/to/</i>base-3.16.1</b>
% <b>patch -p1 &lt; <i>/path/to/</i>file.patch</b></pre></blockquote>
<p>The following problems were known by the developers at the time of this
@@ -32,6 +32,10 @@ release:</p>
about duplicate EPICS CA Address list entries. These warnings might be due
to a bug in Cygwin; they are benign and can be ignored.</li>
<li>64-bit Windows builds of the CAS library may not work with some compilers.
The code in <tt>src/legacy/gdd</tt> is incompatible with the LLP64 model
that Windows uses for its 64-bit ABI.</li>
</ul>
</body>

View File

@@ -1,6 +1,6 @@
Installation Instructions
EPICS Base Release 7.0.1.1
EPICS Base Release 3.16.1
--------------------------------------------------------------------------
@@ -222,13 +222,13 @@
required path and other environment variables.
EPICS_HOST_ARCH
Before you can build or use EPICS Base, the environment variable
EPICS_HOST_ARCH should be defined. A perl script EpicsHostArch.pl in
the base/startup directory has been provided to help set
EPICS_HOST_ARCH. You should have EPICS_HOST_ARCH set to your host
operating system followed by a dash and then your CPU architecture,
e.g. linux-x86_64. If you are not using the OS vendor's c/c++ compiler
for host builds, you will need another dash followed by the alternate
Before you can build or use EPICS R3.15, the environment variable
EPICS_HOST_ARCH must be defined. A perl script EpicsHostArch.pl in the
base/startup directory has been provided to help set EPICS_HOST_ARCH.
You should have EPICS_HOST_ARCH set to your host operating system
followed by a dash and then your host architecture, e.g.
solaris-sparc. If you are not using the OS vendor's c/c++ compiler for
host builds, you will need another dash followed by the alternate
compiler name (e.g. "-gnu" for GNU c/c++ compilers on a solaris host
or "-mingw" for MinGW c/c++ compilers on a WIN32 host). See
configure/CONFIG_SITE for a list of supported EPICS_HOST_ARCH values.
@@ -247,7 +247,7 @@
solaris systems you need uname in your path.
LD_LIBRARY_PATH
EPICS shared libraries and executables normally contain the full path
R3.15 shared libraries and executables normally contain the full path
to any libraries they require. However, if you move the EPICS files or
directories from their build-time location then in order for the
shared libraries to be found at runtime LD_LIBRARY_PATH must include
@@ -310,7 +310,7 @@
script will create a sample application that can be built and then
executed to try out this release of base.
Instructions for building and executing the example IOC application can
Instructions for building and executing the 3.15 example application can
be found in the section "Example Application" of Chapter 2, "Getting
Started", in the "IOC Application Developer's Guide" for this release.
The "Example IOC Application" section briefly explains how to create and

View File

@@ -9,7 +9,7 @@
<BODY>
<CENTER>
<H1>Installation Instructions</H1>
<H2>EPICS Base Release 7.0.1.1</H2><BR>
<H2>EPICS Base Release 3.16.1</H2><BR>
</CENTER>
<HR>
<H3> Table of Contents</H3>
@@ -242,11 +242,11 @@ Files in the base/startup directory have been provided to
help set required path and other environment variables.
<P><B>EPICS_HOST_ARCH</B><BR>
Before you can build or use EPICS Base, the environment variable
EPICS_HOST_ARCH should be defined. A perl script EpicsHostArch.pl in the
Before you can build or use EPICS R3.15, the environment variable
EPICS_HOST_ARCH must be defined. A perl script EpicsHostArch.pl in the
base/startup directory has been provided to help set EPICS_HOST_ARCH.
You should have EPICS_HOST_ARCH set to your host operating system
followed by a dash and then your CPU architecture, e.g. linux-x86_64.
followed by a dash and then your host architecture, e.g. solaris-sparc.
If you are not using the OS vendor's c/c++ compiler for host builds,
you will need another dash followed by the alternate compiler name
(e.g. &quot;-gnu&quot; for GNU c/c++ compilers on a solaris host or &quot;-mingw&quot;
@@ -268,7 +268,7 @@ Files in the base/startup directory have been provided to
<P><B>LD_LIBRARY_PATH</B><BR>
EPICS shared libraries and executables normally contain the full path
R3.15 shared libraries and executables normally contain the full path
to any libraries they require.
However, if you move the EPICS files or directories from their build-time
location then in order for the shared libraries to be found at runtime
@@ -342,7 +342,7 @@ Files in the base/startup directory have been provided to
and then executed to try out this release of base.
<P>
Instructions for building and executing the example IOC application
Instructions for building and executing the 3.15 example application
can be found in the section &quot;Example Application&quot; of Chapter 2,
&quot;Getting Started&quot;, in the &quot;IOC Application Developer's Guide&quot; for this
release. The &quot;Example IOC Application&quot; section briefly explains how to

View File

@@ -3,20 +3,13 @@
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
<title>EPICS 7.0 Release Notes</title>
<title>EPICS Base R3.16.2 Release Notes</title>
</head>
<body lang="en">
<h1 align="center">EPICS Base Release 3.16.2</h1>
<p>These release notes describe changes that have been made since the previous
release of this series of EPICS Base. Note that changes which were merged up
from commits to new releases in an older Base series are not described at the
top of this file but have entries that appear lower down, under the series to
which they were originally committed. Thus it is important to read more than
just the first section to understand everything that has changed in each
release.</p>
<h1 align="center">EPICS Release 7.0.2</h1>
<h2 align="center">Changes made between 3.16.1 and 3.16.2</h2>
<!-- Insert new items immediately below this template ...
@@ -29,88 +22,27 @@ release.</p>
<h3>Launchpad Bugs</h3>
<p>The list of tracked bugs fixed in this release can be found on the
<a href="https://launchpad.net/epics-base/+milestone/7.0.2">Launchpad Milestone
page for EPICS Base 7.0.2</a>.</p>
<a href="https://launchpad.net/epics-base/+milestone/3.16.2">Launchpad Milestone
page for EPICS Base 3.16.2</a>.</p>
<h3>Status reporting for the callback and scanOnce task queues</h3>
<h3>Git Branches Recombined</h3>
<p>Two new iocsh commands and some associated underlying APIs have been added to
show the state of the queues that feed the three callback tasks and the scanOnce
task, including a high-water mark which can optionally be reset. The new iocsh
commands are <tt>callbackQueueShow</tt> and <tt>scanOnceQueueShow</tt>; both
take an optional integer argument which must be non-zero to reset the
high-water mark.</p>
<p>The four separate Git branches <tt>core/master</tt>, <tt>libcom/master</tt>,
<tt>ca/master</tt> and <tt>database/master</tt> have been recombined into one
branch called <tt>7.0</tt>. Keeping these as 4 separate branches in the same
repository made it impossible to create merge requests that contained changes in
more than one of these modules. The layout of the source files has not changed
at all however, so the source code for libcom, ca and the database are still
found separately under the module subdirectory.</p>
<h3>Support for event codes greater than or equal to NUM_TIME_EVENTS</h3>
<p>Event numbers greater than or equal to NUM_TIME_EVENTS are now allowed if
supported by the registered event time provider, which must provide its own
advancing timestamp validation for such events.</p>
<h1 align="center">EPICS Release 7.0.1.1</h1>
<h3>Changed SIML failure behavior</h3>
<p>A failure when fetching the simulation mode through <tt>SIML</tt> will not
put the record into INVALID alarm state anymore. Instead, as long as the
record's current alarm severity (<tt>SEVR</tt>)is NO_ALARM, its alarm status
(<tt>STAT</tt>) will be set to LINK_ALARM without increasing the severity. This
allows clients to get some notification of a failing or bad <tt>SIML</tt> link
without otherwise affecting record processing.</p>
<h3>dbVerify() has been restored to dbStaticLib</h3>
<p>This routine was removed in Base-3.16.1 but has been reimplemented in this
release by special request. Note that the error message strings that it returns
when verification fails have changed, but are still designed for display to the
user.</p>
<h3>Simulation mode improvements</h3>
<p>Records that support simulation mode have two new fields, <tt>SSCN</tt>
(Simulation Scan Mode) and <tt>SDLY</tt> (Simulation Delay). <tt>SSCN</tt> is a
menu field that provides an alternate value for the <tt>SCAN</tt> field to be
used while the record is in simulation mode. This is especially useful for I/O
scanned records, for which simulation mode was not working at all. Setting
<tt>SDLY</tt> to a positive value makes the record process asynchronously in
simulation mode, with the second stage processing happening after the specified
time (in seconds).</p>
<h3>Extend the dbServer API with init/run/pause/stop methods</h3>
<p>This change permits IOCs to be built that omit the CA server (RSRV) by
removing its registrar entry which is now provided in the new <tt>rsrv.dbd</tt>
file. Other server layers can be built into the IOC (alongside RSRV or in place
of it) by registering them in a similar manner. The dbServer API is documented
with Doxygen comments in the header file.</p>
<p>Specific IOC server layers can be disabled at runtime by adding their name to
the environment variable EPICS_IOC_IGNORE_SERVERS (separated by spaces if more
than one should be ignored).</p>
<h3>Grand source-code reorganization</h3>
<p>EPICS 7.0.1 contains the IOC Database, RSRV server and the Channel Access
client code from EPICS Base 3.16.1 along with all the original record types and
soft device support, but GDD and the Portable Channel Access Server have been
unbundled and are now available separately. In their place we have brought in
the more recently written EPICS V4 C++ libraries (collectively referred to as
the PVA modules). The directory tree for EPICS is somewhat larger as a result,
and the original structure of the Base directories has been split into 4
separate Git repositories. External modules should build against this new
structure with little or no changes needed, except that some allowance may be
needed for the merging of the V4 modules.</p>
<p>There should be rather more description and documantation of these changes
than is currently available, but as developers we generally much prefer to write
code than documentation. Send questions to the tech-talk mailing list and we'll
be happy to try and answer them!</p>
<h2 align="center">Changes from the 3.16 branch since 3.16.1</h2>
<!-- Insert inherited items immediately below here ... -->
<p>Time events numbered 0 through (NUM_TIME_EVENTS-1) are still validated by
code in epicsGeneralTime.c that checks for advancing timestamps and enforces
that restriction.</p>
<h3>Type-safe Device and Driver Support Tables</h3>

View File

@@ -39,15 +39,14 @@ that should be performed when creating production releases of EPICS Base.</p>
<p>The version released on the Feature Freeze date is designated the first
pre-release, <tt>-pre1</tt>. The first release candidate <tt>-rc1</tt> is the
first version that has undergone testing by the developers and has shown no
problems that must be fixed before release. New versions should be made at about
2-weekly intervals after the <tt>-pre1</tt> release, and designated as either
pre-release or release candidate versions by the Release Manager. Release
candidates are announced to the whole community via the tech-talk mailing list,
pre-releases are announced to to the developers via the core-talk list. After a
release candidate has been available for 2 weeks without any new problems being
reported or major changes having to be committed, the final release can be
made.</p>
first version that has undergone widespread testing and which has no known
problems in it that are slated to be fixed in this release. New versions should
be made at about weekly intervals during the testing and debugging period, and
will be designated as either pre-release or release candidate versions by the
Release Manager. After a release candidate has been available to the whole
community for testing for at least a week without any additional problems being
reported or significant changes being committed, the branch can be designated as
the final release version.</p>
<h3>Roles</h3>
@@ -78,7 +77,7 @@ made.</p>
<td>&nbsp;</td>
<td>Release Manager</td>
<td>Email all developers about the upcoming release and ask for a list
of remaining tasks that must be finished.</td>
of remaining jobs that must be finished.</td>
</tr>
<tr>
<td>&nbsp;</td>
@@ -111,7 +110,7 @@ made.</p>
<tr>
<td>&nbsp;</td>
<td>Release Manager</td>
<td>Review and update this checklist for the upcoming release.</td>
<td>Review and update this document for the upcoming release.</td>
</tr>
<tr>
<td>&nbsp;</td>
@@ -126,7 +125,6 @@ made.</p>
<tr>
<td>&nbsp;</td>
<td>Release Manager</td>
<!-- Submodules... -->
<td>Edit and commit changes to the EPICS version number file
configure/CONFIG_BASE_VERSION.</td>
</tr>
@@ -136,35 +134,37 @@ made.</p>
<td>Tag the module in Git, using these tag conventions:
<ul>
<li>
<tt>R7.0.2-pre<i>n</i></tt>
<tt>R3.16.1-pre<i>n</i></tt>
&mdash; pre-release tag
</li>
<li>
<tt>R7.0.2-rc<i>n</i></tt>
<tt>R3.16.1-rc<i>n</i></tt>
&mdash; release candidate tag
</li>
</ul>
<blockquote><tt>
cd base-7.0<br />
git tag -m 'ANJ: Tagged for 7.0.2-rc1' R7.0.2-rc1
cd base-3.16<br />
git tag -m 'ANJ: Tagged for 3.16.1-rc1' R3.16.1-rc1
</tt></blockquote>
Note that submodules must <em>not</em> be tagged with the version used
for the top-level, they each have their own separate version numbers
that are only tagged at the final release.</td>
</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>Release Manager</td>
<td>Export the tagged version into a tarfile. The <tt>make-tar.sh</tt>
script generates a gzipped tarfile directly from the tag, excluding the
files and directories that are only used for continuous integration:
<td>Export the tagged version into a tarfile. This command generates a
gzipped tarfile directly from the repository, excluding those files and
directories needed only for continuous integration:
<blockquote><tt>
cd base-7.0<br />
.ci/make-tar.sh R7.0.2-rc1 base-7.0.2-rc1.tar.gz base-7.0.2-rc1/
cd base-3.16<br />
git archive
--prefix=base-3.16.1-rc1/
--output=../base-3.16.1-rc1.tar.gz
R3.16.1-rc1
configure documentation LICENSE Makefile README src startup
</tt></blockquote>
Create a GPG signature file of the tarfile as follows:
<blockquote><tt>
gpg --armor --sign --detach-sig base-7.0.2-rc1.tar.gz
gpg --armor --sign --detach-sig base-3.16.1-rc1.tar.gz
</tt></blockquote>
</td>
</tr>
@@ -177,9 +177,8 @@ made.</p>
<tr>
<td>&nbsp;</td>
<td>Website Manager</td>
<td>Copy the tarfile and its signature to the Base download area of the
website and add the new files to the website Base download index
page.</td>
<td>If necessary recreate the tarfile following the instructions above.
Copy the tar file to the Base download area of the website</td>
</tr>
<tr>
<td>&nbsp;</td>
@@ -196,6 +195,11 @@ made.</p>
versions should use the page and URL for the final release version
number.</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>Website Manager</td>
<td>Add the new tar file to the website Base download index page.</td>
</tr>
<tr>
<th colspan="3">Testing</th>
</tr>
@@ -231,7 +235,7 @@ made.</p>
<td>&nbsp;</td>
<td>Application Developers</td>
<td>Build external applications against this version of Base on all
available platforms and test as appropriate. Application code changes
available platforms and test as appropriate. Application code changes
may be necessary where the EPICS Base APIs have been modified.</td>
</tr>
<tr>
@@ -247,25 +251,6 @@ made.</p>
</ul>
</td>
</tr>
<tr>
<th colspan="3">To Do</th>
</tr>
<tr>
<td>&nbsp;</td>
<td>Release Manager</td>
<td>Discuss and resolve before final release:
<ul>
<li>Update version numbers in individual
<tt>modules/*/configure/*VERSION</tt> files?</li>
<li>Unifying module Release Notes for easier publication.</li>
<li>Unifying module documentation directories and Doxygen
config's.</li>
<li>Publishing releases on the new website.</li>
</ul>
</td>
</tr>
<tr>
<th colspan="3">Release Approval</th>
</tr>
@@ -273,8 +258,8 @@ made.</p>
<td>&nbsp;</td>
<td>Release Manager</td>
<td>Obtain a positive <q>Ok to release</q> from all platform developers
once a release candidate version has gone for 2 weeks without any major
new issues being reported.</td>
once a release candidate version has gone a whole week without any
issues being reported.</td>
</tr>
<tr>
<th colspan="3">Creating the final release version</th>
@@ -290,24 +275,28 @@ made.</p>
<td>Release Manager</td>
<td>Tag the module in Git:
<blockquote><tt>
cd base-7.0<br />
git tag -m 'ANJ: Tagged for 7.0.2' R7.0.2</i>
cd base-3.16<br />
git tag -m 'ANJ: Tagged for 3.16.1' R3.16.1</i>
</tt></blockquote>
</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>Release Manager</td>
<td>Export the tagged version into a tarfile. The <tt>make-tar.sh</tt>
script generates a gzipped tarfile directly from the tag, excluding the
files and directories that are only used for continuous integration:
<td>Export the tagged version into a tarfile. This command generates a
gzipped tarfile directly from the repository, excluding those files and
directories needed only for continuous integration:
<blockquote><tt>
cd base-7.0<br />
.ci/make-tar.sh R7.0.2 base-7.0.2.tar.gz base-7.0.2/
cd base-3.16<br />
git archive
--prefix=base-3.16.1/
--output=../base-3.16.1.tar.gz
R3.16.1
configure documentation LICENSE Makefile README src startup
</tt></blockquote>
Create a GPG signature file of the tarfile as follows:
<blockquote><tt>
gpg --armor --sign --detach-sig base-7.0.2.tar.gz
gpg --armor --sign --detach-sig base-3.16.1.tar.gz
</tt></blockquote>
</td>
</tr>
@@ -320,8 +309,7 @@ made.</p>
<tr>
<td>&nbsp;</td>
<td>Release Manager</td>
<td>Copy the tarfile and its signature to the Base download area of the
website.</td>
<td>Upload the release tar file to the Launchpad download area.</td>
</tr>
<tr>
<td>&nbsp;</td>

View File

@@ -1,10 +0,0 @@
#*************************************************************************
# EPICS BASE is distributed subject to a Software License Agreement found
# in file LICENSE that is included with this distribution.
#*************************************************************************
# When building submodules, this should always be true:
INSTALL_LOCATION = $(EPICS_BASE)
# Stop submodules from installing their configuration files:
CONFIG_INSTALLS =

View File

@@ -1,58 +0,0 @@
#*************************************************************************
# EPICS BASE is distributed subject to a Software License Agreement found
# in file LICENSE that is included with this distribution.
#*************************************************************************
TOP = ..
include $(TOP)/configure/CONFIG
# Submodules for bundle build
SUBMODULES += libcom
SUBMODULES += ca
ca_DEPEND_DIRS = libcom
SUBMODULES += database
database_DEPEND_DIRS = ca
SUBMODULES += pvData
pvData_DEPEND_DIRS = libcom
SUBMODULES += pvAccess
pvAccess_DEPEND_DIRS = pvData database
SUBMODULES += normativeTypes
normativeTypes_DEPEND_DIRS = pvData
SUBMODULES += pvaClient
pvaClient_DEPEND_DIRS = pvAccess normativeTypes
SUBMODULES += pvDatabase
pvDatabase_DEPEND_DIRS = pvAccess
SUBMODULES += pva2pva
pva2pva_DEPEND_DIRS = pvAccess
SUBMODULES += example
example_DEPEND_DIRS = pva2pva pvaClient
# Allow sites to add extra submodules
-include Makefile.local
# Add only checked-out submodules to DIRS
DIRS += $(subst /Makefile,,$(wildcard $(addsuffix /Makefile, $(SUBMODULES))))
include $(TOP)/configure/RULES_DIRS
INSTALL_LOCATION_ABS := $(abspath $(INSTALL_LOCATION))
RELEASE_LOCAL := RELEASE.$(EPICS_HOST_ARCH).local
# Ensure that RELEASE.<host>.local exists before doing anything else
all host $(DIRS) $(ARCHS) $(ACTIONS) $(dirActionTargets) $(dirArchTargets) \
$(dirActionArchTargets) $(actionArchTargets): | $(RELEASE_LOCAL)
$(RELEASE_LOCAL):
$(ECHO) Creating $@, EPICS_BASE = $(INSTALL_LOCATION_ABS)
@echo EPICS_BASE = $(INSTALL_LOCATION_ABS)> $@
realclean:
$(RM) $(RELEASE_LOCAL)

View File

@@ -1,21 +0,0 @@
#!/bin/sh
set -e -x
# set RTEMS to eg. "4.9" or "4.10"
# requires qemu, bison, flex, texinfo, install-info
if [ -n "$RTEMS" ]
then
# find local qemu-system-i386
export PATH="$HOME/.cache/qemu/usr/bin:$PATH"
echo -n "Using QEMU: "
type qemu-system-i386 || echo "Missing qemu"
EXTRA=RTEMS_QEMU_FIXUPS=YES
fi
make -j2 $EXTRA
if [ "$TEST" != "NO" ]
then
make -j2 tapfiles
make -s test-results
fi

View File

@@ -1,132 +0,0 @@
#!/bin/sh
set -e -x
CURDIR="$PWD"
QDIR="$HOME/.cache/qemu"
if [ -n "$RTEMS" -a "$TEST" = "YES" ]
then
git clone --quiet --branch vme --depth 10 https://github.com/mdavidsaver/qemu.git "$HOME/.build/qemu"
cd "$HOME/.build/qemu"
HEAD=`git log -n1 --pretty=format:%H`
echo "HEAD revision $HEAD"
[ -e "$HOME/.cache/qemu/built" ] && BUILT=`cat "$HOME/.cache/qemu/built"`
echo "Cached revision $BUILT"
if [ "$HEAD" != "$BUILT" ]
then
echo "Building QEMU"
git submodule --quiet update --init
install -d "$HOME/.build/qemu/build"
cd "$HOME/.build/qemu/build"
"$HOME/.build/qemu/configure" --prefix="$HOME/.cache/qemu/usr" --target-list=i386-softmmu --disable-werror
make -j2
make install
echo "$HEAD" > "$HOME/.cache/qemu/built"
fi
fi
cd "$CURDIR"
cat << EOF > configure/RELEASE.local
EPICS_BASE=$HOME/.source/epics-base
EOF
install -d "$HOME/.source"
cd "$HOME/.source"
add_base_module() {
MODULE=$1
BRANCH=$2
( cd epics-base/modules && \
git clone --quiet --depth 5 --branch "$MODULE"/"$BRANCH" https://github.com/${REPOBASE:-epics-base}/epics-base.git "$MODULE" && \
cd "$MODULE" && git log -n1 )
}
git clone --quiet --depth 5 --branch core/"${BRCORE:-master}" https://github.com/${REPOBASE:-epics-base}/epics-base.git epics-base
( cd epics-base && git log -n1 )
add_base_module libcom "${BRLIBCOM:-master}"
EPICS_HOST_ARCH=`sh epics-base/startup/EpicsHostArch`
# requires wine and g++-mingw-w64-i686
if [ "$WINE" = "32" ]
then
echo "Cross mingw32"
sed -i -e '/CMPLR_PREFIX/d' epics-base/configure/os/CONFIG_SITE.linux-x86.win32-x86-mingw
cat << EOF >> epics-base/configure/os/CONFIG_SITE.linux-x86.win32-x86-mingw
CMPLR_PREFIX=i686-w64-mingw32-
EOF
cat << EOF >> epics-base/configure/CONFIG_SITE
CROSS_COMPILER_TARGET_ARCHS+=win32-x86-mingw
EOF
fi
if [ "$STATIC" = "YES" ]
then
echo "Build static libraries/executables"
cat << EOF >> epics-base/configure/CONFIG_SITE
SHARED_LIBRARIES=NO
STATIC_BUILD=YES
EOF
fi
case "$CMPLR" in
clang)
echo "Host compiler is clang"
cat << EOF >> epics-base/configure/os/CONFIG_SITE.Common.$EPICS_HOST_ARCH
GNU = NO
CMPLR_CLASS = clang
CC = clang
CCC = clang++
EOF
# hack
sed -i -e 's/CMPLR_CLASS = gcc/CMPLR_CLASS = clang/' epics-base/configure/CONFIG.gnuCommon
clang --version
;;
*)
echo "Host compiler is default"
gcc --version
;;
esac
cat <<EOF >> epics-base/configure/CONFIG_SITE
USR_CPPFLAGS += $USR_CPPFLAGS
USR_CFLAGS += $USR_CFLAGS
USR_CXXFLAGS += $USR_CXXFLAGS
EOF
# set RTEMS to eg. "4.9" or "4.10"
# requires qemu, bison, flex, texinfo, install-info
if [ -n "$RTEMS" ]
then
echo "Cross RTEMS${RTEMS} for pc386"
install -d /home/travis/.cache
curl -L "https://github.com/mdavidsaver/rsb/releases/download/travis-20160306-2/rtems${RTEMS}-i386-trusty-20190306-2.tar.gz" \
| tar -C /home/travis/.cache -xj
sed -i -e '/^RTEMS_VERSION/d' -e '/^RTEMS_BASE/d' epics-base/configure/os/CONFIG_SITE.Common.RTEMS
cat << EOF >> epics-base/configure/os/CONFIG_SITE.Common.RTEMS
RTEMS_VERSION=$RTEMS
RTEMS_BASE=/home/travis/.cache/rtems${RTEMS}-i386
EOF
cat << EOF >> epics-base/configure/CONFIG_SITE
CROSS_COMPILER_TARGET_ARCHS+=RTEMS-pc386
EOF
# find local qemu-system-i386
export PATH="$HOME/.cache/qemu/usr/bin:$PATH"
echo -n "Using QEMU: "
type qemu-system-i386 || echo "Missing qemu"
EXTRA=RTEMS_QEMU_FIXUPS=YES
fi
make -j2 -C epics-base $EXTRA

View File

@@ -1,26 +0,0 @@
sudo: false
dist: trusty
language: c
compiler:
- gcc
addons:
apt:
packages:
- libreadline6-dev
- libncurses5-dev
- perl
- clang
- g++-mingw-w64-i686
install:
- ./.ci/travis-prepare.sh
script:
- ./.ci/travis-build.sh
env:
- BRCORE=master BRLIBCOM=master TEST=NO
- CMPLR=clang TEST=NO
- USR_CXXFLAGS=-std=c++11 TEST=NO
- CMPLR=clang USR_CXXFLAGS=-std=c++11 TEST=NO
- WINE=32 TEST=NO STATIC=YES
- WINE=32 TEST=NO STATIC=NO
- RTEMS=4.10 TEST=NO
- RTEMS=4.9 TEST=NO

View File

@@ -1,28 +0,0 @@
# CONFIG - Load build configuration data
#
# Do not make changes to this file!
# Allow user to override where the build rules come from
RULES = $(EPICS_BASE)
# RELEASE files point to other application tops
include $(TOP)/configure/RELEASE
-include $(TOP)/configure/RELEASE.$(EPICS_HOST_ARCH).Common
ifdef T_A
-include $(TOP)/configure/RELEASE.Common.$(T_A)
-include $(TOP)/configure/RELEASE.$(EPICS_HOST_ARCH).$(T_A)
endif
CONFIG = $(RULES)/configure
include $(CONFIG)/CONFIG
# Override the Base definition:
INSTALL_LOCATION = $(TOP)
# CONFIG_SITE files contain other build configuration settings
include $(TOP)/configure/CONFIG_SITE
-include $(TOP)/configure/CONFIG_SITE.$(EPICS_HOST_ARCH).Common
ifdef T_A
-include $(TOP)/configure/CONFIG_SITE.Common.$(T_A)
-include $(TOP)/configure/CONFIG_SITE.$(EPICS_HOST_ARCH).$(T_A)
endif

View File

@@ -1,9 +0,0 @@
#*************************************************************************
# Copyright (c) 2017 UChicago Argonne LLC, as Operator of Argonne
# National Laboratory.
# EPICS BASE is distributed subject to a Software License Agreement found
# in file LICENSE that is included with this distribution.
#*************************************************************************
# Libraries needed to link a host tool
EPICS_BASE_HOST_LIBS = ca Com

View File

@@ -1,4 +0,0 @@
EPICS_CA_MAJOR_VERSION = 4
EPICS_CA_MINOR_VERSION = 13
EPICS_CA_MAINTENANCE_VERSION = 2
EPICS_CA_DEVELOPMENT_FLAG = 1

View File

@@ -1,42 +0,0 @@
# CONFIG_SITE
# Make any application-specific changes to the EPICS build
# configuration variables in this file.
#
# Host/target specific settings can be specified in files named
# CONFIG_SITE.$(EPICS_HOST_ARCH).Common
# CONFIG_SITE.Common.$(T_A)
# CONFIG_SITE.$(EPICS_HOST_ARCH).$(T_A)
# CHECK_RELEASE controls the consistency checking of the support
# applications pointed to by the RELEASE* files.
# Normally CHECK_RELEASE should be set to YES.
# Set CHECK_RELEASE to NO to disable checking completely.
# Set CHECK_RELEASE to WARN to perform consistency checking but
# continue building even if conflicts are found.
CHECK_RELEASE = YES
# Set this when you only want to compile this application
# for a subset of the cross-compiled target architectures
# that Base is built for.
#CROSS_COMPILER_TARGET_ARCHS = vxWorks-ppc32
# To install files into a location other than $(TOP) define
# INSTALL_LOCATION here.
#INSTALL_LOCATION=</absolute/path/to/install/top>
# Set this when the IOC and build host use different paths
# to the install location. This may be needed to boot from
# a Microsoft FTP server say, or on some NFS configurations.
#IOCS_APPL_TOP = </IOC's/absolute/path/to/install/top>
# For application debugging purposes, override the HOST_OPT and/
# or CROSS_OPT settings from base/configure/CONFIG_SITE
#HOST_OPT = NO
#CROSS_OPT = NO
# These allow developers to override the CONFIG_SITE variable
# settings without having to modify the configure/CONFIG_SITE
# file itself.
-include $(TOP)/../CONFIG_SITE.local
-include $(TOP)/configure/CONFIG_SITE.local

View File

@@ -1,15 +0,0 @@
#*************************************************************************
# EPICS BASE is distributed subject to a Software License Agreement found
# in file LICENSE that is included with this distribution.
#*************************************************************************
TOP = ..
include $(TOP)/configure/CONFIG
TARGETS = $(CONFIG_TARGETS)
CONFIGS += $(subst ../,,$(wildcard $(CONFIG_INSTALLS)))
CFG += CONFIG_CA_MODULE
CFG += CONFIG_CA_VERSION
include $(TOP)/configure/RULES

View File

@@ -1,39 +0,0 @@
# RELEASE - Location of external support modules
#
# IF YOU CHANGE ANY PATHS in this file or make API changes to
# any modules it refers to, you should do a "make rebuild" in
# this application's top level directory.
#
# The EPICS build process does not check dependencies against
# any files from outside the application, so it is safest to
# rebuild it completely if any modules it depends on change.
#
# Host- or target-specific settings can be given in files named
# RELEASE.$(EPICS_HOST_ARCH).Common
# RELEASE.Common.$(T_A)
# RELEASE.$(EPICS_HOST_ARCH).$(T_A)
#
# This file is parsed by both GNUmake and an EPICS Perl script,
# so it may ONLY contain definititions of paths to other support
# modules, variable definitions that are used in module paths,
# and include statements that pull in other RELEASE files.
# Variables may be used before their values have been set.
# Build variables that are NOT used in paths should be set in
# the CONFIG_SITE file.
# Variables and paths to dependent modules:
#MODULES = /path/to/modules
#MYMODULE = $(MODULES)/my-module
# If building the EPICS modules individually, set these:
#EPICS_LIBCOM = $(MODULES)/libcom-3.17.0
#EPICS_BASE = $(MODULES)/core-7.0.1
# Set RULES here if you want to use build rules from elsewhere:
#RULES = $(MODULES)/build-rules
# These lines allow developers to override these RELEASE settings
# without having to modify this file directly.
-include $(TOP)/../RELEASE.local
-include $(TOP)/../RELEASE.$(EPICS_HOST_ARCH).local
-include $(TOP)/configure/RELEASE.local

View File

@@ -1,6 +0,0 @@
# RULES
include $(CONFIG)/RULES
# Library should be rebuilt because LIBOBJS may have changed.
$(LIBNAME): ../Makefile

View File

@@ -1,2 +0,0 @@
#RULES_DIRS
include $(CONFIG)/RULES_DIRS

View File

@@ -1,2 +0,0 @@
#RULES_TOP
include $(CONFIG)/RULES_TOP

View File

@@ -1,25 +0,0 @@
#*************************************************************************
# Copyright (c) 2008 UChicago Argonne LLC, as Operator of Argonne
# National Laboratory.
# Copyright (c) 2002 The Regents of the University of California, as
# Operator of Los Alamos National Laboratory.
# EPICS BASE is distributed subject to a Software License Agreement found
# in the file LICENSE that is included with this distribution.
#*************************************************************************
TOP = ..
include $(TOP)/configure/CONFIG
# Channel Access Client
DIRS += client
DIRS += tools
tools_DEPEND_DIRS = client
DIRS += perl
perl_DEPEND_DIRS = client
DIRS += template
include $(TOP)/configure/RULES_DIRS

View File

@@ -1,28 +0,0 @@
/*************************************************************************\
* Copyright (c) 2017 UChicago Argonne LLC, as Operator of Argonne
* National Laboratory.
* EPICS BASE is distributed subject to a Software License Agreement found
* in file LICENSE that is included with this distribution.
\*************************************************************************/
#ifndef CAVERSION_H
#define CAVERSION_H
#include <epicsVersion.h>
#include <shareLib.h>
#ifndef VERSION_INT
# define VERSION_INT(V,R,M,P) ( ((V)<<24) | ((R)<<16) | ((M)<<8) | (P))
#endif
/* include generated headers with:
* EPICS_CA_MAJOR_VERSION
* EPICS_CA_MINOR_VERSION
* EPICS_CA_MAINTENANCE_VERSION
* EPICS_CA_DEVELOPMENT_FLAG
*/
#include "caVersionNum.h"
#define CA_VERSION_INT VERSION_INT(EPICS_CA_MAJOR_VERSION, EPICS_CA_MINOR_VERSION, EPICS_CA_MAINTENANCE_VERSION, 0)
#endif // CAVERSION_H

View File

@@ -1,7 +0,0 @@
#ifndef CAVERSION_H
# error include caVersion.h, not this header
#endif
#define EPICS_CA_MAJOR_VERSION @EPICS_CA_MAJOR_VERSION@
#define EPICS_CA_MINOR_VERSION @EPICS_CA_MINOR_VERSION@
#define EPICS_CA_MAINTENANCE_VERSION @EPICS_CA_MAINTENANCE_VERSION@
#define EPICS_CA_DEVELOPMENT_FLAG @EPICS_CA_DEVELOPMENT_FLAG@

View File

@@ -1,17 +0,0 @@
TOP=../..
include $(TOP)/configure/CONFIG
TEMPLATES_DIR = makeBaseApp
TEMPLATES += top/caClientApp/Makefile
TEMPLATES += top/caClientApp/caExample.c
TEMPLATES += top/caClientApp/caMonitor.c
TEMPLATES += top/caPerlApp/Makefile
TEMPLATES += top/caPerlApp/cainfo.pl
TEMPLATES += top/caPerlApp/caget.pl
TEMPLATES += top/caPerlApp/caput.pl
TEMPLATES += top/caPerlApp/camonitor.pl
include $(TOP)/configure/RULES

View File

@@ -1,17 +0,0 @@
TOP=..
include $(TOP)/configure/CONFIG
#----------------------------------------
# ADD MACRO DEFINITIONS AFTER THIS LINE
PERL_SCRIPTS += _APPNAME_ModuleDirs.pm
PERL_SCRIPTS += cainfo.pl
PERL_SCRIPTS += caput.pl
PERL_SCRIPTS += caget.pl
PERL_SCRIPTS += camonitor.pl
include $(TOP)/configure/RULES
#----------------------------------------
# ADD RULES AFTER THIS LINE

View File

@@ -1,21 +0,0 @@
#!/bin/sh
set -e -x
# set RTEMS to eg. "4.9" or "4.10"
# requires qemu, bison, flex, texinfo, install-info
if [ -n "$RTEMS" ]
then
# find local qemu-system-i386
export PATH="$HOME/.cache/qemu/usr/bin:$PATH"
echo -n "Using QEMU: "
type qemu-system-i386 || echo "Missing qemu"
EXTRA=RTEMS_QEMU_FIXUPS=YES
fi
make -j2 $EXTRA
if [ "$TEST" != "NO" ]
then
make -j2 tapfiles
make -s test-results
fi

View File

@@ -1,133 +0,0 @@
#!/bin/sh
set -e -x
CURDIR="$PWD"
QDIR="$HOME/.cache/qemu"
if [ -n "$RTEMS" -a "$TEST" = "YES" ]
then
git clone --quiet --branch vme --depth 10 https://github.com/mdavidsaver/qemu.git "$HOME/.build/qemu"
cd "$HOME/.build/qemu"
HEAD=`git log -n1 --pretty=format:%H`
echo "HEAD revision $HEAD"
[ -e "$HOME/.cache/qemu/built" ] && BUILT=`cat "$HOME/.cache/qemu/built"`
echo "Cached revision $BUILT"
if [ "$HEAD" != "$BUILT" ]
then
echo "Building QEMU"
git submodule --quiet update --init
install -d "$HOME/.build/qemu/build"
cd "$HOME/.build/qemu/build"
"$HOME/.build/qemu/configure" --prefix="$HOME/.cache/qemu/usr" --target-list=i386-softmmu --disable-werror
make -j2
make install
echo "$HEAD" > "$HOME/.cache/qemu/built"
fi
fi
cd "$CURDIR"
cat << EOF > configure/RELEASE.local
EPICS_BASE=$HOME/.source/epics-base
EOF
install -d "$HOME/.source"
cd "$HOME/.source"
add_base_module() {
MODULE=$1
BRANCH=$2
( cd epics-base/modules && \
git clone --quiet --depth 5 --branch "$MODULE"/"$BRANCH" https://github.com/${REPOBASE:-epics-base}/epics-base.git "$MODULE" && \
cd "$MODULE" && git log -n1 )
}
git clone --quiet --depth 5 --branch core/"${BRCORE:-master}" https://github.com/${REPOBASE:-epics-base}/epics-base.git epics-base
( cd epics-base && git log -n1 )
add_base_module libcom "${BRLIBCOM:-master}"
add_base_module ca "${BRCA:-master}"
EPICS_HOST_ARCH=`sh epics-base/startup/EpicsHostArch`
# requires wine and g++-mingw-w64-i686
if [ "$WINE" = "32" ]
then
echo "Cross mingw32"
sed -i -e '/CMPLR_PREFIX/d' epics-base/configure/os/CONFIG_SITE.linux-x86.win32-x86-mingw
cat << EOF >> epics-base/configure/os/CONFIG_SITE.linux-x86.win32-x86-mingw
CMPLR_PREFIX=i686-w64-mingw32-
EOF
cat << EOF >> epics-base/configure/CONFIG_SITE
CROSS_COMPILER_TARGET_ARCHS+=win32-x86-mingw
EOF
fi
if [ "$STATIC" = "YES" ]
then
echo "Build static libraries/executables"
cat << EOF >> epics-base/configure/CONFIG_SITE
SHARED_LIBRARIES=NO
STATIC_BUILD=YES
EOF
fi
case "$CMPLR" in
clang)
echo "Host compiler is clang"
cat << EOF >> epics-base/configure/os/CONFIG_SITE.Common.$EPICS_HOST_ARCH
GNU = NO
CMPLR_CLASS = clang
CC = clang
CCC = clang++
EOF
# hack
sed -i -e 's/CMPLR_CLASS = gcc/CMPLR_CLASS = clang/' epics-base/configure/CONFIG.gnuCommon
clang --version
;;
*)
echo "Host compiler is default"
gcc --version
;;
esac
cat <<EOF >> epics-base/configure/CONFIG_SITE
USR_CPPFLAGS += $USR_CPPFLAGS
USR_CFLAGS += $USR_CFLAGS
USR_CXXFLAGS += $USR_CXXFLAGS
EOF
# set RTEMS to eg. "4.9" or "4.10"
# requires qemu, bison, flex, texinfo, install-info
if [ -n "$RTEMS" ]
then
echo "Cross RTEMS${RTEMS} for pc386"
install -d /home/travis/.cache
curl -L "https://github.com/mdavidsaver/rsb/releases/download/travis-20160306-2/rtems${RTEMS}-i386-trusty-20190306-2.tar.gz" \
| tar -C /home/travis/.cache -xj
sed -i -e '/^RTEMS_VERSION/d' -e '/^RTEMS_BASE/d' epics-base/configure/os/CONFIG_SITE.Common.RTEMS
cat << EOF >> epics-base/configure/os/CONFIG_SITE.Common.RTEMS
RTEMS_VERSION=$RTEMS
RTEMS_BASE=/home/travis/.cache/rtems${RTEMS}-i386
EOF
cat << EOF >> epics-base/configure/CONFIG_SITE
CROSS_COMPILER_TARGET_ARCHS+=RTEMS-pc386
EOF
# find local qemu-system-i386
export PATH="$HOME/.cache/qemu/usr/bin:$PATH"
echo -n "Using QEMU: "
type qemu-system-i386 || echo "Missing qemu"
EXTRA=RTEMS_QEMU_FIXUPS=YES
fi
make -j2 -C epics-base $EXTRA

View File

@@ -1,26 +0,0 @@
sudo: false
dist: trusty
language: c
compiler:
- gcc
addons:
apt:
packages:
- libreadline6-dev
- libncurses5-dev
- perl
- clang
- g++-mingw-w64-i686
install:
- ./.ci/travis-prepare.sh
script:
- ./.ci/travis-build.sh
env:
- BRCORE=master BRLIBCOM=master BRCA=master
- CMPLR=clang
- USR_CXXFLAGS=-std=c++11
- CMPLR=clang USR_CXXFLAGS=-std=c++11
- WINE=32 TEST=NO STATIC=YES
- WINE=32 TEST=NO STATIC=NO
- RTEMS=4.10 TEST=NO
- RTEMS=4.9 TEST=NO

View File

@@ -1,19 +0,0 @@
#*************************************************************************
# Copyright (c) 2002 The University of Chicago, as Operator of Argonne
# National Laboratory.
# Copyright (c) 2002 The Regents of the University of California, as
# Operator of Los Alamos National Laboratory.
# EPICS BASE is distributed subject to a Software License Agreement found
# in file LICENSE that is included with this distribution.
#*************************************************************************
TOP = .
include $(TOP)/configure/CONFIG
DIRS += configure src
src_DEPEND_DIRS = configure
DIRS += test
test_DEPEND_DIRS = src
include $(TOP)/configure/RULES_TOP

View File

@@ -1,36 +0,0 @@
# CONFIG - Load build configuration data
#
# Do not make changes to this file!
# Allow user to override where the build rules come from
RULES = $(EPICS_BASE)
# RELEASE files point to other application tops
include $(TOP)/configure/RELEASE
-include $(TOP)/configure/RELEASE.$(EPICS_HOST_ARCH).Common
ifdef T_A
-include $(TOP)/configure/RELEASE.Common.$(T_A)
-include $(TOP)/configure/RELEASE.$(EPICS_HOST_ARCH).$(T_A)
endif
BUILDING_DATABASE = DEFINED
CONFIG = $(RULES)/configure
include $(CONFIG)/CONFIG
# Override the Base definition:
INSTALL_LOCATION = $(TOP)
# Use new RSET definition
BASE_CPPFLAGS += -DUSE_TYPED_RSET
# Shared library ABI version.
SHRLIB_VERSION = 3.17.0
# CONFIG_SITE files contain other build configuration settings
include $(TOP)/configure/CONFIG_SITE
-include $(TOP)/configure/CONFIG_SITE.$(EPICS_HOST_ARCH).Common
ifdef T_A
-include $(TOP)/configure/CONFIG_SITE.Common.$(T_A)
-include $(TOP)/configure/CONFIG_SITE.$(EPICS_HOST_ARCH).$(T_A)
endif

View File

@@ -1,26 +0,0 @@
#*************************************************************************
# Copyright (c) 2017 UChicago Argonne LLC, as Operator of Argonne
# National Laboratory.
# EPICS BASE is distributed subject to a Software License Agreement found
# in file LICENSE that is included with this distribution.
#*************************************************************************
# Set EPICS_DATABASE if necessary
ifndef EPICS_DATABASE
EPICS_DATABASE = $(if $(BUILDING_DATABASE),$(INSTALL_LOCATION),$(EPICS_BASE))
# Paths to tools built here
EPICS_DATABASE_HOST_BIN = $(EPICS_DATABASE)/bin/$(EPICS_HOST_ARCH)
endif
# Set location of locally-built tools
MAKEBPT = $(EPICS_DATABASE_HOST_BIN)/makeBpt$(HOSTEXE)
DBEXPAND = $(PERL) $(EPICS_DATABASE_HOST_BIN)/dbdExpand.pl
DBTORECORDTYPEH = $(PERL) $(EPICS_DATABASE_HOST_BIN)/dbdToRecordtypeH.pl
DBTOMENUH = $(PERL) $(EPICS_DATABASE_HOST_BIN)/dbdToMenuH.pl
DBDTOHTML = $(PERL) $(EPICS_DATABASE_HOST_BIN)/dbdToHtml.pl
REGISTERRECORDDEVICEDRIVER = $(PERL) $(EPICS_DATABASE_HOST_BIN)/registerRecordDeviceDriver.pl
MSI3_15 = $(EPICS_DATABASE_HOST_BIN)/msi$(HOSTEXE)
# Libraries needed to link a basic IOC
EPICS_BASE_IOC_LIBS = dbRecStd dbCore ca Com

View File

@@ -1,4 +0,0 @@
EPICS_DATABASE_MAJOR_VERSION = 3
EPICS_DATABASE_MINOR_VERSION = 17
EPICS_DATABASE_MAINTENANCE_VERSION = 1
EPICS_DATABASE_DEVELOPMENT_FLAG = 1

View File

@@ -1,42 +0,0 @@
# CONFIG_SITE
# Make any application-specific changes to the EPICS build
# configuration variables in this file.
#
# Host/target specific settings can be specified in files named
# CONFIG_SITE.$(EPICS_HOST_ARCH).Common
# CONFIG_SITE.Common.$(T_A)
# CONFIG_SITE.$(EPICS_HOST_ARCH).$(T_A)
# CHECK_RELEASE controls the consistency checking of the support
# applications pointed to by the RELEASE* files.
# Normally CHECK_RELEASE should be set to YES.
# Set CHECK_RELEASE to NO to disable checking completely.
# Set CHECK_RELEASE to WARN to perform consistency checking but
# continue building even if conflicts are found.
CHECK_RELEASE = YES
# Set this when you only want to compile this application
# for a subset of the cross-compiled target architectures
# that Base is built for.
#CROSS_COMPILER_TARGET_ARCHS = vxWorks-ppc32
# To install files into a location other than $(TOP) define
# INSTALL_LOCATION here.
#INSTALL_LOCATION=</absolute/path/to/install/top>
# Set this when the IOC and build host use different paths
# to the install location. This may be needed to boot from
# a Microsoft FTP server say, or on some NFS configurations.
#IOCS_APPL_TOP = </IOC's/absolute/path/to/install/top>
# For application debugging purposes, override the HOST_OPT and/
# or CROSS_OPT settings from base/configure/CONFIG_SITE
#HOST_OPT = NO
#CROSS_OPT = NO
# These allow developers to override the CONFIG_SITE variable
# settings without having to modify the configure/CONFIG_SITE
# file itself.
-include $(TOP)/../CONFIG_SITE.local
-include $(TOP)/configure/CONFIG_SITE.local

View File

@@ -1,15 +0,0 @@
#*************************************************************************
# EPICS BASE is distributed subject to a Software License Agreement found
# in file LICENSE that is included with this distribution.
#*************************************************************************
TOP = ..
include $(TOP)/configure/CONFIG
TARGETS = $(CONFIG_TARGETS)
CONFIGS += $(subst ../,,$(wildcard $(CONFIG_INSTALLS)))
CFG += CONFIG_DATABASE_MODULE
CFG += CONFIG_DATABASE_VERSION
include $(TOP)/configure/RULES

View File

@@ -1,40 +0,0 @@
# RELEASE - Location of external support modules
#
# IF YOU CHANGE ANY PATHS in this file or make API changes to
# any modules it refers to, you should do a "make rebuild" in
# this application's top level directory.
#
# The EPICS build process does not check dependencies against
# any files from outside the application, so it is safest to
# rebuild it completely if any modules it depends on change.
#
# Host- or target-specific settings can be given in files named
# RELEASE.$(EPICS_HOST_ARCH).Common
# RELEASE.Common.$(T_A)
# RELEASE.$(EPICS_HOST_ARCH).$(T_A)
#
# This file is parsed by both GNUmake and an EPICS Perl script,
# so it may ONLY contain definititions of paths to other support
# modules, variable definitions that are used in module paths,
# and include statements that pull in other RELEASE files.
# Variables may be used before their values have been set.
# Build variables that are NOT used in paths should be set in
# the CONFIG_SITE file.
# Variables and paths to dependent modules:
#MODULES = /path/to/modules
#MYMODULE = $(MODULES)/my-module
# If building the EPICS modules individually, set these:
#EPICS_CA = $(MODULES)/ca-4.13.1
#EPICS_LIBCOM = $(MODULES)/libcom-3.17.0
#EPICS_BASE = $(MODULES)/core-7.0.1
# Set RULES here if you want to use build rules from elsewhere:
#RULES = $(MODULES)/build-rules
# These lines allow developers to override these RELEASE settings
# without having to modify this file directly.
-include $(TOP)/../RELEASE.local
-include $(TOP)/../RELEASE.$(EPICS_HOST_ARCH).local
-include $(TOP)/configure/RELEASE.local

View File

@@ -1,6 +0,0 @@
# RULES
include $(CONFIG)/RULES
# Library should be rebuilt because LIBOBJS may have changed.
$(LIBNAME): ../Makefile

View File

@@ -1,2 +0,0 @@
#RULES.ioc
include $(CONFIG)/RULES.ioc

View File

@@ -1,2 +0,0 @@
#RULES_DIRS
include $(CONFIG)/RULES_DIRS

View File

@@ -1,2 +0,0 @@
#RULES_TOP
include $(CONFIG)/RULES_TOP

View File

@@ -1,31 +0,0 @@
#*************************************************************************
# Copyright (c) 2008 UChicago Argonne LLC, as Operator of Argonne
# National Laboratory.
# Copyright (c) 2002 The Regents of the University of California, as
# Operator of Los Alamos National Laboratory.
# EPICS BASE is distributed subject to a Software License Agreement found
# in the file LICENSE that is included with this distribution.
#*************************************************************************
TOP = ..
include $(TOP)/configure/CONFIG
# PDB Tools
DIRS += tools
# PDB Core
DIRS += ioc
ioc_DEPEND_DIRS = tools
# PDB Standard Record Definitions
DIRS += std
std_DEPEND_DIRS = ioc
# Templates
DIRS += template
include $(TOP)/configure/RULES_DIRS

View File

@@ -1,27 +0,0 @@
/*************************************************************************\
* Copyright (c) 2017 UChicago Argonne LLC, as Operator of Argonne
* National Laboratory.
* EPICS BASE is distributed subject to a Software License Agreement found
* in file LICENSE that is included with this distribution.
\*************************************************************************/
#ifndef DATABASEVERSION_H
#define DATABASEVERSION_H
#include <epicsVersion.h>
#ifndef VERSION_INT
# define VERSION_INT(V,R,M,P) ( ((V)<<24) | ((R)<<16) | ((M)<<8) | (P))
#endif
/* include generated headers with:
* EPICS_DATABASE_MAJOR_VERSION
* EPICS_DATABASE_MINOR_VERSION
* EPICS_DATABASE_MAINTENANCE_VERSION
* EPICS_DATABASE_DEVELOPMENT_FLAG
*/
#include "databaseVersionNum.h"
#define DATABASE_VERSION_INT VERSION_INT(EPICS_DATABASE_MAJOR_VERSION, EPICS_DATABASE_MINOR_VERSION, EPICS_DATABASE_MAINTENANCE_VERSION, 0)
#endif // DATABASEVERSION_H

View File

@@ -1,7 +0,0 @@
#ifndef DATABASEVERSION_H
# error include databaseVersion.h, not this header
#endif
#define EPICS_DATABASE_MAJOR_VERSION @EPICS_DATABASE_MAJOR_VERSION@
#define EPICS_DATABASE_MINOR_VERSION @EPICS_DATABASE_MINOR_VERSION@
#define EPICS_DATABASE_MAINTENANCE_VERSION @EPICS_DATABASE_MAINTENANCE_VERSION@
#define EPICS_DATABASE_DEVELOPMENT_FLAG @EPICS_DATABASE_DEVELOPMENT_FLAG@

View File

@@ -1,140 +0,0 @@
/*************************************************************************\
* Copyright (c) 2014 UChicago Argonne LLC, as Operator of Argonne
* National Laboratory.
* EPICS BASE is distributed subject to a Software License Agreement found
* in file LICENSE that is included with this distribution.
\*************************************************************************/
/*
* Author: Andrew Johnson <anj@aps.anl.gov>
*/
#include <stddef.h>
#include <string.h>
#include "ellLib.h"
#include "envDefs.h"
#include "epicsStdio.h"
#define epicsExportSharedSymbols
#include "dbServer.h"
static ELLLIST serverList = ELLLIST_INIT;
static enum { registering, initialized, running, paused, stopped }
state = registering;
static char *stateNames[] = {
"registering", "initialized", "running", "paused", "stopped"
};
int dbRegisterServer(dbServer *psrv)
{
const char * ignore = envGetConfigParamPtr(&EPICS_IOC_IGNORE_SERVERS);
if (!psrv || !psrv->name || state != registering)
return -1;
if (strchr(psrv->name, ' ')) {
fprintf(stderr, "dbRegisterServer: Bad server name '%s'\n",
psrv->name);
return -1;
}
if (ignore) {
size_t len = strlen(psrv->name);
const char *found;
while ((found = strstr(ignore, psrv->name))) {
/* Make sure the name isn't just a substring */
if ((found == ignore || (found > ignore && found[-1] == ' ')) &&
(found[len] == 0 || found[len] == ' ')) {
fprintf(stderr, "dbRegisterServer: Ignoring '%s', per environment\n",
psrv->name);
return 0;
}
/* It was, try again further down */
ignore = found + len;
}
}
if (ellNext(&psrv->node) || ellLast(&serverList) == &psrv->node) {
fprintf(stderr, "dbRegisterServer: '%s' registered twice?\n",
psrv->name);
return -1;
}
ellAdd(&serverList, &psrv->node);
return 0;
}
int dbUnregisterServer(dbServer *psrv)
{
if (state != registering && state != stopped) {
fprintf(stderr, "dbUnregisterServer: Servers still active!\n");
return -1;
}
if (ellFind(&serverList, &psrv->node) < 0) {
fprintf(stderr, "dbUnregisterServer: '%s' not registered.\n",
psrv->name);
return -1;
}
if (state == stopped && psrv->stop == NULL) {
fprintf(stderr, "dbUnregisterServer: '%s' has no stop() method.\n",
psrv->name);
return -1;
}
ellDelete(&serverList, &psrv->node);
return 0;
}
void dbsr(unsigned level)
{
dbServer *psrv = (dbServer *)ellFirst(&serverList);
if (!psrv) {
printf("No server layers registered with IOC\n");
return;
}
printf("Server state: %s\n", stateNames[state]);
while (psrv) {
printf("Server '%s'\n", psrv->name);
if (state == running && psrv->report)
psrv->report(level);
psrv = (dbServer *)ellNext(&psrv->node);
}
}
int dbServerClient(char *pBuf, size_t bufSize)
{
dbServer *psrv = (dbServer *)ellFirst(&serverList);
if (state != running)
return -1;
while (psrv) {
if (psrv->client &&
psrv->client(pBuf, bufSize) == 0)
return 0;
psrv = (dbServer *)ellNext(&psrv->node);
}
return -1;
}
#define STARTSTOP(routine, method, newState) \
void routine(void) \
{ \
dbServer *psrv = (dbServer *)ellFirst(&serverList); \
\
while (psrv) { \
if (psrv->method) \
psrv->method(); \
psrv = (dbServer *)ellNext(&psrv->node); \
} \
state = newState; \
}
STARTSTOP(dbInitServers, init, initialized)
STARTSTOP(dbRunServers, run, running)
STARTSTOP(dbPauseServers, pause, paused)
STARTSTOP(dbStopServers, stop, stopped)

View File

@@ -1,175 +0,0 @@
/*************************************************************************\
* Copyright (c) 2014 UChicago Argonne LLC, as Operator of Argonne
* National Laboratory.
* EPICS BASE is distributed subject to a Software License Agreement found
* in file LICENSE that is included with this distribution.
\*************************************************************************/
/**
* @file dbServer.h
* @author Andrew Johnson <anj@aps.anl.gov>
*
* @brief The IOC's interface to the server layers that publish its PVs.
*
* All server layers which publish IOC record data should initialize a
* dbServer structure and register it with the IOC. The methods that
* the dbServer interface provides allow the IOC to start, pause and stop
* the servers together, and to provide status and debugging information
* to the IOC user/developer through a common set of commands.
*
* @todo No API is provided yet for calling stats() methods.
* Nothing in the IOC calls dbStopServers(), not sure where it should go.
*/
#ifndef INC_dbServer_H
#define INC_dbServer_H
#include <stddef.h>
#include "ellLib.h"
#include "shareLib.h"
#ifdef __cplusplus
extern "C" {
#endif
/** @brief Server information structure.
*
* Every server layer should initialize and register an instance of this
* structure with the IOC by passing it to the dbRegisterServer() routine.
*
* All methods in this struct are optional; use @c NULL if a server is
* unable to support a particular operation (or if it hasn't been
* implemented yet).
*/
typedef struct dbServer {
/** @brief Linked list node; initialize to @c ELLNODE_INIT */
ELLNODE node;
/** @brief A short server identifier; printable, with no spaces */
const char *name;
/** @brief Print level-dependent status report to stdout.
*
* @param level Interest level, specifies how much detail to print.
*/
void (* report) (unsigned level);
/** @brief Get number of channels and clients currently connected.
*
* @param channels NULL or pointer for returning channel count.
* @param clients NULL or pointer for returning client count.
*/
void (* stats) (unsigned *channels, unsigned *clients);
/** @brief Get identity of client initiating the calling thread.
*
* Must fill in the buffer with the client's identity when called from a
* thread that belongs to this server layer. For other threads, the
* method should do nothing, just return -1.
* @param pBuf Buffer for client identity string.
* @param bufSize Number of chars available in pBuf.
* @return -1 means calling thread is not owned by this server.
* 0 means the thread was recognized and pBuf has been filled in.
*/
int (* client) (char *pBuf, size_t bufSize);
/** @name Control Methods
* These control methods for the server will be called by routines
* related to iocInit for all registered servers in turn when the IOC
* is being initialized, run, paused and stopped respectively.
*
* @{
*/
/** @brief Server init method.
*
* Called for all registered servers by dbInitServers().
*/
void (* init) (void);
/** @brief Server run method.
*
* Called for all registered servers by dbRunServers().
*/
void (* run) (void);
/** @brief Server pause method.
*
* Called for all registered servers by dbPauseServers().
*/
void (* pause) (void);
/** @brief Server stop method.
*
* Called for all registered servers by dbStopServers().
*/
void (* stop) (void);
/** @}
*/
} dbServer;
/** @brief Register a server layer with the IOC
*
* This should only be called once for each server layer.
* @param psrv Server information structure for the server
*/
epicsShareFunc int dbRegisterServer(dbServer *psrv);
/** @brief Unregister a server layer
*
* This should only be called when the servers are inactive.
* @param psrv Server information structure for the server
*/
epicsShareFunc int dbUnregisterServer(dbServer *psrv);
/** @brief Print dbServer Reports.
*
* Calls the report methods of all registered servers.
* This routine is provided as an IOC Shell command.
* @param level Interest level, specifies how much detail to print.
*/
epicsShareFunc void dbsr(unsigned level);
/** @brief Query servers for client's identity.
*
* This routine is called by code that wants to identify who (or what)
* is responsible for the thread which is currently running. Setting
* the @c TPRO field of a record is one way to trigger this; the identity
* of the calling thread is printed along with the record name whenever
* the record is subsequently processed.
*/
epicsShareFunc int dbServerClient(char *pBuf, size_t bufSize);
/** @brief Initialize all registered servers.
*
* Calls all dbServer::init() methods.
*/
epicsShareFunc void dbInitServers(void);
/** @brief Run all registered servers.
*
* Calls all dbServer::run() methods.
*/
epicsShareFunc void dbRunServers(void);
/** @brief Pause all registered servers.
*
* Calls all dbServer::pause() methods.
*/
epicsShareFunc void dbPauseServers(void);
/** @brief Stop all registered servers.
*
* Calls all dbServer::stop() methods.
*/
epicsShareFunc void dbStopServers(void);
#ifdef __cplusplus
}
#endif
#endif /* INC_dbServer_H */

View File

@@ -1,3 +0,0 @@
# This DBD file links the RSRV CA server into the IOC
registrar(rsrvRegistrar)

View File

@@ -1,134 +0,0 @@
#*************************************************************************
# Copyright (c) 2002 The University of Chicago, as Operator of Argonne
# National Laboratory.
# Copyright (c) 2002 The Regents of the University of California, as
# Operator of Los Alamos National Laboratory.
# EPICS BASE is distributed subject to a Software License Agreement found
# in file LICENSE that is included with this distribution.
#*************************************************************************
recordtype(bi) {
include "dbCommon.dbd"
field(INP,DBF_INLINK) {
prompt("Input Specification")
promptgroup("40 - Input")
interest(1)
}
field(VAL,DBF_ENUM) {
prompt("Current Value")
promptgroup("40 - Input")
asl(ASL0)
pp(TRUE)
}
field(ZSV,DBF_MENU) {
prompt("Zero Error Severity")
promptgroup("70 - Alarm")
pp(TRUE)
interest(1)
menu(menuAlarmSevr)
}
field(OSV,DBF_MENU) {
prompt("One Error Severity")
promptgroup("70 - Alarm")
pp(TRUE)
interest(1)
menu(menuAlarmSevr)
}
field(COSV,DBF_MENU) {
prompt("Change of State Svr")
promptgroup("70 - Alarm")
pp(TRUE)
interest(1)
menu(menuAlarmSevr)
}
field(ZNAM,DBF_STRING) {
prompt("Zero Name")
promptgroup("80 - Display")
pp(TRUE)
interest(1)
size(26)
prop(YES)
}
field(ONAM,DBF_STRING) {
prompt("One Name")
promptgroup("80 - Display")
pp(TRUE)
interest(1)
size(26)
prop(YES)
}
field(RVAL,DBF_ULONG) {
prompt("Raw Value")
pp(TRUE)
}
field(ORAW,DBF_ULONG) {
prompt("prev Raw Value")
special(SPC_NOMOD)
interest(3)
}
field(MASK,DBF_ULONG) {
prompt("Hardware Mask")
special(SPC_NOMOD)
interest(1)
}
field(LALM,DBF_USHORT) {
prompt("Last Value Alarmed")
special(SPC_NOMOD)
interest(3)
}
field(MLST,DBF_USHORT) {
prompt("Last Value Monitored")
special(SPC_NOMOD)
interest(3)
}
field(SIOL,DBF_INLINK) {
prompt("Simulation Input Link")
promptgroup("90 - Simulate")
interest(1)
}
field(SVAL,DBF_ULONG) {
prompt("Simulation Value")
}
field(SIML,DBF_INLINK) {
prompt("Simulation Mode Link")
promptgroup("90 - Simulate")
interest(1)
}
field(SIMM,DBF_MENU) {
prompt("Simulation Mode")
special(SPC_MOD)
interest(1)
menu(menuSimm)
}
field(SIMS,DBF_MENU) {
prompt("Simulation Mode Severity")
promptgroup("90 - Simulate")
interest(2)
menu(menuAlarmSevr)
}
field(OLDSIMM,DBF_MENU) {
prompt("Prev. Simulation Mode")
special(SPC_NOMOD)
interest(4)
menu(menuSimm)
}
field(SSCN,DBF_MENU) {
prompt("Sim. Mode Scan")
promptgroup("90 - Simulate")
interest(1)
menu(menuScan)
initial("65535")
}
field(SDLY,DBF_DOUBLE) {
prompt("Sim. Mode Async Delay")
promptgroup("90 - Simulate")
interest(2)
initial("-1.0")
}
%#include "callback.h"
field(SIMPVT,DBF_NOACCESS) {
prompt("Sim. Mode Private")
special(SPC_NOMOD)
interest(4)
extra("CALLBACK *simpvt")
}
}

View File

@@ -1,182 +0,0 @@
#*************************************************************************
# Copyright (c) 2002 The University of Chicago, as Operator of Argonne
# National Laboratory.
# Copyright (c) 2002 The Regents of the University of California, as
# Operator of Los Alamos National Laboratory.
# EPICS BASE is distributed subject to a Software License Agreement found
# in file LICENSE that is included with this distribution.
#*************************************************************************
recordtype(bo) {
include "dbCommon.dbd"
field(VAL,DBF_ENUM) {
prompt("Current Value")
promptgroup("50 - Output")
asl(ASL0)
pp(TRUE)
}
field(OMSL,DBF_MENU) {
prompt("Output Mode Select")
promptgroup("50 - Output")
interest(1)
menu(menuOmsl)
}
field(DOL,DBF_INLINK) {
prompt("Desired Output Loc")
promptgroup("40 - Input")
interest(1)
}
field(OUT,DBF_OUTLINK) {
prompt("Output Specification")
promptgroup("50 - Output")
interest(1)
}
field(HIGH,DBF_DOUBLE) {
prompt("Seconds to Hold High")
promptgroup("30 - Action")
interest(1)
}
field(ZNAM,DBF_STRING) {
prompt("Zero Name")
promptgroup("80 - Display")
pp(TRUE)
interest(1)
size(26)
prop(YES)
}
field(ONAM,DBF_STRING) {
prompt("One Name")
promptgroup("80 - Display")
pp(TRUE)
interest(1)
size(26)
prop(YES)
}
field(RVAL,DBF_ULONG) {
prompt("Raw Value")
pp(TRUE)
}
field(ORAW,DBF_ULONG) {
prompt("prev Raw Value")
special(SPC_NOMOD)
interest(3)
}
field(MASK,DBF_ULONG) {
prompt("Hardware Mask")
special(SPC_NOMOD)
interest(1)
}
field(RPVT,DBF_NOACCESS) {
prompt("Record Private")
special(SPC_NOMOD)
interest(4)
extra("void * rpvt")
}
field(WDPT,DBF_NOACCESS) {
prompt("Watch Dog Timer ID")
special(SPC_NOMOD)
interest(4)
extra("void * wdpt")
}
field(ZSV,DBF_MENU) {
prompt("Zero Error Severity")
promptgroup("70 - Alarm")
pp(TRUE)
interest(1)
menu(menuAlarmSevr)
}
field(OSV,DBF_MENU) {
prompt("One Error Severity")
promptgroup("70 - Alarm")
pp(TRUE)
interest(1)
menu(menuAlarmSevr)
}
field(COSV,DBF_MENU) {
prompt("Change of State Sevr")
promptgroup("70 - Alarm")
pp(TRUE)
interest(1)
menu(menuAlarmSevr)
}
field(RBV,DBF_ULONG) {
prompt("Readback Value")
special(SPC_NOMOD)
}
field(ORBV,DBF_ULONG) {
prompt("Prev Readback Value")
special(SPC_NOMOD)
interest(3)
}
field(MLST,DBF_USHORT) {
prompt("Last Value Monitored")
special(SPC_NOMOD)
interest(3)
}
field(LALM,DBF_USHORT) {
prompt("Last Value Alarmed")
special(SPC_NOMOD)
interest(3)
}
field(SIOL,DBF_OUTLINK) {
prompt("Simulation Output Link")
promptgroup("90 - Simulate")
interest(1)
}
field(SIML,DBF_INLINK) {
prompt("Simulation Mode Link")
promptgroup("90 - Simulate")
interest(1)
}
field(SIMM,DBF_MENU) {
prompt("Simulation Mode")
special(SPC_MOD)
interest(1)
menu(menuYesNo)
}
field(SIMS,DBF_MENU) {
prompt("Simulation Mode Severity")
promptgroup("90 - Simulate")
interest(2)
menu(menuAlarmSevr)
}
field(OLDSIMM,DBF_MENU) {
prompt("Prev. Simulation Mode")
special(SPC_NOMOD)
interest(4)
menu(menuSimm)
}
field(SSCN,DBF_MENU) {
prompt("Sim. Mode Scan")
promptgroup("90 - Simulate")
interest(1)
menu(menuScan)
initial("65535")
}
field(SDLY,DBF_DOUBLE) {
prompt("Sim. Mode Async Delay")
promptgroup("90 - Simulate")
interest(2)
initial("-1.0")
}
%#include "callback.h"
field(SIMPVT,DBF_NOACCESS) {
prompt("Sim. Mode Private")
special(SPC_NOMOD)
interest(4)
extra("CALLBACK *simpvt")
}
field(IVOA,DBF_MENU) {
prompt("INVALID outpt action")
promptgroup("50 - Output")
interest(2)
menu(menuIvoa)
}
field(IVOV,DBF_USHORT) {
prompt("INVALID output value")
promptgroup("50 - Output")
interest(2)
}
}
variable(boHIGHprecision, int)
variable(boHIGHlimit, double)

View File

@@ -1,324 +0,0 @@
#*************************************************************************
# Copyright (c) 2007 UChicago Argonne LLC, as Operator of Argonne
# National Laboratory.
# Copyright (c) 2002 The Regents of the University of California, as
# Operator of Los Alamos National Laboratory.
# EPICS BASE is distributed subject to a Software License Agreement found
# in file LICENSE that is included with this distribution.
#*************************************************************************
recordtype(calc) {
include "dbCommon.dbd"
field(VAL,DBF_DOUBLE) {
prompt("Result")
promptgroup("50 - Output")
asl(ASL0)
}
field(CALC,DBF_STRING) {
prompt("Calculation")
promptgroup("30 - Action")
special(SPC_CALC)
pp(TRUE)
size(80)
initial("0")
}
field(INPA,DBF_INLINK) {
prompt("Input A")
promptgroup("41 - Input A-F")
interest(1)
}
field(INPB,DBF_INLINK) {
prompt("Input B")
promptgroup("41 - Input A-F")
interest(1)
}
field(INPC,DBF_INLINK) {
prompt("Input C")
promptgroup("41 - Input A-F")
interest(1)
}
field(INPD,DBF_INLINK) {
prompt("Input D")
promptgroup("41 - Input A-F")
interest(1)
}
field(INPE,DBF_INLINK) {
prompt("Input E")
promptgroup("41 - Input A-F")
interest(1)
}
field(INPF,DBF_INLINK) {
prompt("Input F")
promptgroup("41 - Input A-F")
interest(1)
}
field(INPG,DBF_INLINK) {
prompt("Input G")
promptgroup("42 - Input G-L")
interest(1)
}
field(INPH,DBF_INLINK) {
prompt("Input H")
promptgroup("42 - Input G-L")
interest(1)
}
field(INPI,DBF_INLINK) {
prompt("Input I")
promptgroup("42 - Input G-L")
interest(1)
}
field(INPJ,DBF_INLINK) {
prompt("Input J")
promptgroup("42 - Input G-L")
interest(1)
}
field(INPK,DBF_INLINK) {
prompt("Input K")
promptgroup("42 - Input G-L")
interest(1)
}
field(INPL,DBF_INLINK) {
prompt("Input L")
promptgroup("42 - Input G-L")
interest(1)
}
field(EGU,DBF_STRING) {
prompt("Engineering Units")
promptgroup("80 - Display")
interest(1)
size(16)
prop(YES)
}
field(PREC,DBF_SHORT) {
prompt("Display Precision")
promptgroup("80 - Display")
interest(1)
prop(YES)
}
field(HOPR,DBF_DOUBLE) {
prompt("High Operating Rng")
promptgroup("80 - Display")
interest(1)
prop(YES)
}
field(LOPR,DBF_DOUBLE) {
prompt("Low Operating Range")
promptgroup("80 - Display")
interest(1)
prop(YES)
}
field(HIHI,DBF_DOUBLE) {
prompt("Hihi Alarm Limit")
promptgroup("70 - Alarm")
pp(TRUE)
interest(1)
prop(YES)
}
field(LOLO,DBF_DOUBLE) {
prompt("Lolo Alarm Limit")
promptgroup("70 - Alarm")
pp(TRUE)
interest(1)
prop(YES)
}
field(HIGH,DBF_DOUBLE) {
prompt("High Alarm Limit")
promptgroup("70 - Alarm")
pp(TRUE)
interest(1)
prop(YES)
}
field(LOW,DBF_DOUBLE) {
prompt("Low Alarm Limit")
promptgroup("70 - Alarm")
pp(TRUE)
interest(1)
prop(YES)
}
field(HHSV,DBF_MENU) {
prompt("Hihi Severity")
promptgroup("70 - Alarm")
pp(TRUE)
interest(1)
prop(YES)
menu(menuAlarmSevr)
}
field(LLSV,DBF_MENU) {
prompt("Lolo Severity")
promptgroup("70 - Alarm")
pp(TRUE)
interest(1)
prop(YES)
menu(menuAlarmSevr)
}
field(HSV,DBF_MENU) {
prompt("High Severity")
promptgroup("70 - Alarm")
pp(TRUE)
interest(1)
prop(YES)
menu(menuAlarmSevr)
}
field(LSV,DBF_MENU) {
prompt("Low Severity")
promptgroup("70 - Alarm")
pp(TRUE)
interest(1)
prop(YES)
menu(menuAlarmSevr)
}
field(AFTC, DBF_DOUBLE) {
prompt("Alarm Filter Time Constant")
promptgroup("70 - Alarm")
interest(1)
}
field(AFVL, DBF_DOUBLE) {
prompt("Alarm Filter Value")
special(SPC_NOMOD)
interest(3)
}
field(HYST,DBF_DOUBLE) {
prompt("Alarm Deadband")
promptgroup("70 - Alarm")
interest(1)
}
field(ADEL,DBF_DOUBLE) {
prompt("Archive Deadband")
promptgroup("80 - Display")
interest(1)
}
field(MDEL,DBF_DOUBLE) {
prompt("Monitor Deadband")
promptgroup("80 - Display")
interest(1)
}
field(A,DBF_DOUBLE) {
prompt("Value of Input A")
pp(TRUE)
}
field(B,DBF_DOUBLE) {
prompt("Value of Input B")
pp(TRUE)
}
field(C,DBF_DOUBLE) {
prompt("Value of Input C")
pp(TRUE)
}
field(D,DBF_DOUBLE) {
prompt("Value of Input D")
pp(TRUE)
}
field(E,DBF_DOUBLE) {
prompt("Value of Input E")
pp(TRUE)
}
field(F,DBF_DOUBLE) {
prompt("Value of Input F")
pp(TRUE)
}
field(G,DBF_DOUBLE) {
prompt("Value of Input G")
pp(TRUE)
}
field(H,DBF_DOUBLE) {
prompt("Value of Input H")
pp(TRUE)
}
field(I,DBF_DOUBLE) {
prompt("Value of Input I")
pp(TRUE)
}
field(J,DBF_DOUBLE) {
prompt("Value of Input J")
pp(TRUE)
}
field(K,DBF_DOUBLE) {
prompt("Value of Input K")
pp(TRUE)
}
field(L,DBF_DOUBLE) {
prompt("Value of Input L")
pp(TRUE)
}
field(LA,DBF_DOUBLE) {
prompt("Prev Value of A")
special(SPC_NOMOD)
interest(3)
}
field(LB,DBF_DOUBLE) {
prompt("Prev Value of B")
special(SPC_NOMOD)
interest(3)
}
field(LC,DBF_DOUBLE) {
prompt("Prev Value of C")
special(SPC_NOMOD)
interest(3)
}
field(LD,DBF_DOUBLE) {
prompt("Prev Value of D")
special(SPC_NOMOD)
interest(3)
}
field(LE,DBF_DOUBLE) {
prompt("Prev Value of E")
special(SPC_NOMOD)
interest(3)
}
field(LF,DBF_DOUBLE) {
prompt("Prev Value of F")
special(SPC_NOMOD)
interest(3)
}
field(LG,DBF_DOUBLE) {
prompt("Prev Value of G")
special(SPC_NOMOD)
interest(3)
}
field(LH,DBF_DOUBLE) {
prompt("Prev Value of H")
special(SPC_NOMOD)
interest(3)
}
field(LI,DBF_DOUBLE) {
prompt("Prev Value of I")
special(SPC_NOMOD)
interest(3)
}
field(LJ,DBF_DOUBLE) {
prompt("Prev Value of J")
special(SPC_NOMOD)
interest(3)
}
field(LK,DBF_DOUBLE) {
prompt("Prev Value of K")
special(SPC_NOMOD)
interest(3)
}
field(LL,DBF_DOUBLE) {
prompt("Prev Value of L")
special(SPC_NOMOD)
interest(3)
}
field(LALM,DBF_DOUBLE) {
prompt("Last Value Alarmed")
special(SPC_NOMOD)
interest(3)
}
field(ALST,DBF_DOUBLE) {
prompt("Last Value Archived")
special(SPC_NOMOD)
interest(3)
}
field(MLST,DBF_DOUBLE) {
prompt("Last Val Monitored")
special(SPC_NOMOD)
interest(3)
}
%#include "postfix.h"
field(RPCL,DBF_NOACCESS) {
prompt("Reverse Polish Calc")
special(SPC_NOMOD)
interest(4)
extra("char rpcl[INFIX_TO_POSTFIX_SIZE(80)]")
}
}

View File

@@ -1,530 +0,0 @@
#*************************************************************************
# Copyright (c) 2007 UChicago Argonne LLC, as Operator of Argonne
# National Laboratory.
# Copyright (c) 2002 The Regents of the University of California, as
# Operator of Los Alamos National Laboratory.
# EPICS BASE is distributed subject to a Software License Agreement found
# in file LICENSE that is included with this distribution.
#*************************************************************************
menu(calcoutOOPT) {
choice(calcoutOOPT_Every_Time,"Every Time")
choice(calcoutOOPT_On_Change,"On Change")
choice(calcoutOOPT_When_Zero,"When Zero")
choice(calcoutOOPT_When_Non_zero,"When Non-zero")
choice(calcoutOOPT_Transition_To_Zero,"Transition To Zero")
choice(calcoutOOPT_Transition_To_Non_zero,"Transition To Non-zero")
}
menu(calcoutDOPT) {
choice(calcoutDOPT_Use_VAL,"Use CALC")
choice(calcoutDOPT_Use_OVAL,"Use OCAL")
}
menu(calcoutINAV) {
choice(calcoutINAV_EXT_NC,"Ext PV NC")
choice(calcoutINAV_EXT,"Ext PV OK")
choice(calcoutINAV_LOC,"Local PV")
choice(calcoutINAV_CON,"Constant")
}
recordtype(calcout) {
include "dbCommon.dbd"
field(RPVT,DBF_NOACCESS) {
prompt("Record Private")
special(SPC_NOMOD)
interest(4)
extra("struct rpvtStruct *rpvt")
}
field(VAL,DBF_DOUBLE) {
prompt("Result")
promptgroup("50 - Output")
asl(ASL0)
}
field(PVAL,DBF_DOUBLE) {
prompt("Previous Value")
}
field(CALC,DBF_STRING) {
prompt("Calculation")
promptgroup("30 - Action")
special(SPC_CALC)
pp(TRUE)
size(80)
initial("0")
}
field(CLCV,DBF_LONG) {
prompt("CALC Valid")
interest(1)
}
field(INPA,DBF_INLINK) {
prompt("Input A")
special(SPC_MOD)
promptgroup("41 - Input A-F")
interest(1)
}
field(INPB,DBF_INLINK) {
prompt("Input B")
special(SPC_MOD)
promptgroup("41 - Input A-F")
interest(1)
}
field(INPC,DBF_INLINK) {
prompt("Input C")
special(SPC_MOD)
promptgroup("41 - Input A-F")
interest(1)
}
field(INPD,DBF_INLINK) {
prompt("Input D")
special(SPC_MOD)
promptgroup("41 - Input A-F")
interest(1)
}
field(INPE,DBF_INLINK) {
prompt("Input E")
special(SPC_MOD)
promptgroup("41 - Input A-F")
interest(1)
}
field(INPF,DBF_INLINK) {
prompt("Input F")
special(SPC_MOD)
promptgroup("41 - Input A-F")
interest(1)
}
field(INPG,DBF_INLINK) {
prompt("Input G")
special(SPC_MOD)
promptgroup("42 - Input G-L")
interest(1)
}
field(INPH,DBF_INLINK) {
prompt("Input H")
special(SPC_MOD)
promptgroup("42 - Input G-L")
interest(1)
}
field(INPI,DBF_INLINK) {
prompt("Input I")
special(SPC_MOD)
promptgroup("42 - Input G-L")
interest(1)
}
field(INPJ,DBF_INLINK) {
prompt("Input J")
special(SPC_MOD)
promptgroup("42 - Input G-L")
interest(1)
}
field(INPK,DBF_INLINK) {
prompt("Input K")
special(SPC_MOD)
promptgroup("42 - Input G-L")
interest(1)
}
field(INPL,DBF_INLINK) {
prompt("Input L")
special(SPC_MOD)
promptgroup("42 - Input G-L")
interest(1)
}
field(OUT,DBF_OUTLINK) {
prompt("Output Specification")
special(SPC_MOD)
promptgroup("50 - Output")
interest(1)
}
field(INAV,DBF_MENU) {
prompt("INPA PV Status")
special(SPC_NOMOD)
interest(1)
menu(calcoutINAV)
initial("1")
}
field(INBV,DBF_MENU) {
prompt("INPB PV Status")
special(SPC_NOMOD)
interest(1)
menu(calcoutINAV)
initial("1")
}
field(INCV,DBF_MENU) {
prompt("INPC PV Status")
special(SPC_NOMOD)
interest(1)
menu(calcoutINAV)
initial("1")
}
field(INDV,DBF_MENU) {
prompt("INPD PV Status")
special(SPC_NOMOD)
interest(1)
menu(calcoutINAV)
initial("1")
}
field(INEV,DBF_MENU) {
prompt("INPE PV Status")
special(SPC_NOMOD)
interest(1)
menu(calcoutINAV)
initial("1")
}
field(INFV,DBF_MENU) {
prompt("INPF PV Status")
special(SPC_NOMOD)
interest(1)
menu(calcoutINAV)
initial("1")
}
field(INGV,DBF_MENU) {
prompt("INPG PV Status")
special(SPC_NOMOD)
interest(1)
menu(calcoutINAV)
initial("1")
}
field(INHV,DBF_MENU) {
prompt("INPH PV Status")
special(SPC_NOMOD)
interest(1)
menu(calcoutINAV)
initial("1")
}
field(INIV,DBF_MENU) {
prompt("INPI PV Status")
special(SPC_NOMOD)
interest(1)
menu(calcoutINAV)
initial("1")
}
field(INJV,DBF_MENU) {
prompt("INPJ PV Status")
special(SPC_NOMOD)
interest(1)
menu(calcoutINAV)
initial("1")
}
field(INKV,DBF_MENU) {
prompt("INPK PV Status")
special(SPC_NOMOD)
interest(1)
menu(calcoutINAV)
initial("1")
}
field(INLV,DBF_MENU) {
prompt("INPL PV Status")
special(SPC_NOMOD)
interest(1)
menu(calcoutINAV)
initial("1")
}
field(OUTV,DBF_MENU) {
prompt("OUT PV Status")
special(SPC_NOMOD)
interest(1)
menu(calcoutINAV)
}
field(OOPT,DBF_MENU) {
prompt("Output Execute Opt")
promptgroup("50 - Output")
interest(1)
menu(calcoutOOPT)
}
field(ODLY,DBF_DOUBLE) {
prompt("Output Execute Delay")
promptgroup("50 - Output")
asl(ASL0)
interest(1)
}
field(DLYA,DBF_USHORT) {
prompt("Output Delay Active")
special(SPC_NOMOD)
asl(ASL0)
}
field(DOPT,DBF_MENU) {
prompt("Output Data Opt")
promptgroup("30 - Action")
interest(1)
menu(calcoutDOPT)
}
field(OCAL,DBF_STRING) {
prompt("Output Calculation")
promptgroup("30 - Action")
special(SPC_CALC)
pp(TRUE)
size(80)
initial("0")
}
field(OCLV,DBF_LONG) {
prompt("OCAL Valid")
interest(1)
}
field(OEVT,DBF_STRING) {
prompt("Event To Issue")
promptgroup("30 - Action")
special(SPC_MOD)
asl(ASL0)
size(40)
}
%#include "dbScan.h"
field(EPVT, DBF_NOACCESS) {
prompt("Event private")
special(SPC_NOMOD)
interest(4)
extra("EVENTPVT epvt")
}
field(IVOA,DBF_MENU) {
prompt("INVALID output action")
promptgroup("50 - Output")
interest(2)
menu(menuIvoa)
}
field(IVOV,DBF_DOUBLE) {
prompt("INVALID output value")
promptgroup("50 - Output")
interest(2)
}
field(EGU,DBF_STRING) {
prompt("Engineering Units")
promptgroup("80 - Display")
interest(1)
size(16)
prop(YES)
}
field(PREC,DBF_SHORT) {
prompt("Display Precision")
promptgroup("80 - Display")
interest(1)
prop(YES)
}
field(HOPR,DBF_DOUBLE) {
prompt("High Operating Rng")
promptgroup("80 - Display")
interest(1)
prop(YES)
}
field(LOPR,DBF_DOUBLE) {
prompt("Low Operating Range")
promptgroup("80 - Display")
interest(1)
prop(YES)
}
field(HIHI,DBF_DOUBLE) {
prompt("Hihi Alarm Limit")
promptgroup("70 - Alarm")
pp(TRUE)
interest(1)
prop(YES)
}
field(LOLO,DBF_DOUBLE) {
prompt("Lolo Alarm Limit")
promptgroup("70 - Alarm")
pp(TRUE)
interest(1)
prop(YES)
}
field(HIGH,DBF_DOUBLE) {
prompt("High Alarm Limit")
promptgroup("70 - Alarm")
pp(TRUE)
interest(1)
prop(YES)
}
field(LOW,DBF_DOUBLE) {
prompt("Low Alarm Limit")
promptgroup("70 - Alarm")
pp(TRUE)
interest(1)
prop(YES)
}
field(HHSV,DBF_MENU) {
prompt("Hihi Severity")
promptgroup("70 - Alarm")
pp(TRUE)
interest(1)
prop(YES)
menu(menuAlarmSevr)
}
field(LLSV,DBF_MENU) {
prompt("Lolo Severity")
promptgroup("70 - Alarm")
pp(TRUE)
interest(1)
prop(YES)
menu(menuAlarmSevr)
}
field(HSV,DBF_MENU) {
prompt("High Severity")
promptgroup("70 - Alarm")
pp(TRUE)
interest(1)
prop(YES)
menu(menuAlarmSevr)
}
field(LSV,DBF_MENU) {
prompt("Low Severity")
promptgroup("70 - Alarm")
pp(TRUE)
interest(1)
prop(YES)
menu(menuAlarmSevr)
}
field(HYST,DBF_DOUBLE) {
prompt("Alarm Deadband")
promptgroup("70 - Alarm")
interest(1)
}
field(ADEL,DBF_DOUBLE) {
prompt("Archive Deadband")
promptgroup("80 - Display")
interest(1)
}
field(MDEL,DBF_DOUBLE) {
prompt("Monitor Deadband")
promptgroup("80 - Display")
interest(1)
}
field(A,DBF_DOUBLE) {
prompt("Value of Input A")
pp(TRUE)
}
field(B,DBF_DOUBLE) {
prompt("Value of Input B")
pp(TRUE)
}
field(C,DBF_DOUBLE) {
prompt("Value of Input C")
pp(TRUE)
}
field(D,DBF_DOUBLE) {
prompt("Value of Input D")
pp(TRUE)
}
field(E,DBF_DOUBLE) {
prompt("Value of Input E")
pp(TRUE)
}
field(F,DBF_DOUBLE) {
prompt("Value of Input F")
pp(TRUE)
}
field(G,DBF_DOUBLE) {
prompt("Value of Input G")
pp(TRUE)
}
field(H,DBF_DOUBLE) {
prompt("Value of Input H")
pp(TRUE)
}
field(I,DBF_DOUBLE) {
prompt("Value of Input I")
pp(TRUE)
}
field(J,DBF_DOUBLE) {
prompt("Value of Input J")
pp(TRUE)
}
field(K,DBF_DOUBLE) {
prompt("Value of Input K")
pp(TRUE)
}
field(L,DBF_DOUBLE) {
prompt("Value of Input L")
pp(TRUE)
}
field(OVAL,DBF_DOUBLE) {
prompt("Output Value")
asl(ASL0)
}
field(LA,DBF_DOUBLE) {
prompt("Prev Value of A")
special(SPC_NOMOD)
interest(3)
}
field(LB,DBF_DOUBLE) {
prompt("Prev Value of B")
special(SPC_NOMOD)
interest(3)
}
field(LC,DBF_DOUBLE) {
prompt("Prev Value of C")
special(SPC_NOMOD)
interest(3)
}
field(LD,DBF_DOUBLE) {
prompt("Prev Value of D")
special(SPC_NOMOD)
interest(3)
}
field(LE,DBF_DOUBLE) {
prompt("Prev Value of E")
special(SPC_NOMOD)
interest(3)
}
field(LF,DBF_DOUBLE) {
prompt("Prev Value of F")
special(SPC_NOMOD)
interest(3)
}
field(LG,DBF_DOUBLE) {
prompt("Prev Value of G")
special(SPC_NOMOD)
interest(3)
}
field(LH,DBF_DOUBLE) {
prompt("Prev Value of H")
special(SPC_NOMOD)
interest(3)
}
field(LI,DBF_DOUBLE) {
prompt("Prev Value of I")
special(SPC_NOMOD)
interest(3)
}
field(LJ,DBF_DOUBLE) {
prompt("Prev Value of J")
special(SPC_NOMOD)
interest(3)
}
field(LK,DBF_DOUBLE) {
prompt("Prev Value of K")
special(SPC_NOMOD)
interest(3)
}
field(LL,DBF_DOUBLE) {
prompt("Prev Value of L")
special(SPC_NOMOD)
interest(3)
}
field(POVL,DBF_DOUBLE) {
prompt("Prev Value of OVAL")
asl(ASL0)
}
field(LALM,DBF_DOUBLE) {
prompt("Last Value Alarmed")
special(SPC_NOMOD)
interest(3)
}
field(ALST,DBF_DOUBLE) {
prompt("Last Value Archived")
special(SPC_NOMOD)
interest(3)
}
field(MLST,DBF_DOUBLE) {
prompt("Last Val Monitored")
special(SPC_NOMOD)
interest(3)
}
%#include "postfix.h"
field(RPCL,DBF_NOACCESS) {
prompt("Reverse Polish Calc")
special(SPC_NOMOD)
interest(4)
extra("char rpcl[INFIX_TO_POSTFIX_SIZE(80)]")
}
field(ORPC,DBF_NOACCESS) {
prompt("Reverse Polish OCalc")
special(SPC_NOMOD)
interest(4)
extra("char orpc[INFIX_TO_POSTFIX_SIZE(80)]")
}
}
variable(calcoutODLYprecision, int)
variable(calcoutODLYlimit, double)

View File

@@ -1,204 +0,0 @@
#*************************************************************************
# Copyright (c) 2002 The University of Chicago, as Operator of Argonne
# National Laboratory.
# Copyright (c) 2002 The Regents of the University of California, as
# Operator of Los Alamos National Laboratory.
# EPICS BASE is distributed subject to a Software License Agreement found
# in file LICENSE that is included with this distribution.
#*************************************************************************
menu(dfanoutSELM) {
choice(dfanoutSELM_All,"All")
choice(dfanoutSELM_Specified,"Specified")
choice(dfanoutSELM_Mask,"Mask")
}
recordtype(dfanout) {
include "dbCommon.dbd"
field(VAL,DBF_DOUBLE) {
prompt("Desired Output")
promptgroup("40 - Input")
asl(ASL0)
pp(TRUE)
}
field(SELM,DBF_MENU) {
prompt("Select Mechanism")
promptgroup("30 - Action")
interest(1)
menu(dfanoutSELM)
}
field(SELN,DBF_USHORT) {
prompt("Link Selection")
interest(1)
initial("1")
}
field(SELL,DBF_INLINK) {
prompt("Link Selection Loc")
promptgroup("30 - Action")
interest(1)
}
field(OUTA,DBF_OUTLINK) {
prompt("Output Spec A")
promptgroup("50 - Output")
interest(1)
}
field(OUTB,DBF_OUTLINK) {
prompt("Output Spec B")
promptgroup("50 - Output")
interest(1)
}
field(OUTC,DBF_OUTLINK) {
prompt("Output Spec C")
promptgroup("50 - Output")
interest(1)
}
field(OUTD,DBF_OUTLINK) {
prompt("Output Spec D")
promptgroup("50 - Output")
interest(1)
}
field(OUTE,DBF_OUTLINK) {
prompt("Output Spec E")
promptgroup("50 - Output")
interest(1)
}
field(OUTF,DBF_OUTLINK) {
prompt("Output Spec F")
promptgroup("50 - Output")
interest(1)
}
field(OUTG,DBF_OUTLINK) {
prompt("Output Spec G")
promptgroup("50 - Output")
interest(1)
}
field(OUTH,DBF_OUTLINK) {
prompt("Output Spec H")
promptgroup("50 - Output")
interest(1)
}
field(DOL,DBF_INLINK) {
prompt("Desired Output Loc")
promptgroup("40 - Input")
interest(1)
}
field(OMSL,DBF_MENU) {
prompt("Output Mode Select")
promptgroup("50 - Output")
interest(1)
menu(menuOmsl)
}
field(EGU,DBF_STRING) {
prompt("Engineering Units")
promptgroup("80 - Display")
interest(1)
size(16)
prop(YES)
}
field(PREC,DBF_SHORT) {
prompt("Display Precision")
promptgroup("80 - Display")
interest(1)
prop(YES)
}
field(HOPR,DBF_DOUBLE) {
prompt("High Operating Range")
promptgroup("80 - Display")
interest(1)
prop(YES)
}
field(LOPR,DBF_DOUBLE) {
prompt("Low Operating Range")
promptgroup("80 - Display")
interest(1)
prop(YES)
}
field(HIHI,DBF_DOUBLE) {
prompt("Hihi Alarm Limit")
promptgroup("70 - Alarm")
pp(TRUE)
interest(1)
prop(YES)
}
field(LOLO,DBF_DOUBLE) {
prompt("Lolo Alarm Limit")
promptgroup("70 - Alarm")
pp(TRUE)
interest(1)
prop(YES)
}
field(HIGH,DBF_DOUBLE) {
prompt("High Alarm Limit")
promptgroup("70 - Alarm")
pp(TRUE)
interest(1)
prop(YES)
}
field(LOW,DBF_DOUBLE) {
prompt("Low Alarm Limit")
promptgroup("70 - Alarm")
pp(TRUE)
interest(1)
prop(YES)
}
field(HHSV,DBF_MENU) {
prompt("Hihi Severity")
promptgroup("70 - Alarm")
pp(TRUE)
interest(1)
prop(YES)
menu(menuAlarmSevr)
}
field(LLSV,DBF_MENU) {
prompt("Lolo Severity")
promptgroup("70 - Alarm")
pp(TRUE)
interest(1)
prop(YES)
menu(menuAlarmSevr)
}
field(HSV,DBF_MENU) {
prompt("High Severity")
promptgroup("70 - Alarm")
pp(TRUE)
interest(1)
prop(YES)
menu(menuAlarmSevr)
}
field(LSV,DBF_MENU) {
prompt("Low Severity")
promptgroup("70 - Alarm")
pp(TRUE)
interest(1)
prop(YES)
menu(menuAlarmSevr)
}
field(HYST,DBF_DOUBLE) {
prompt("Alarm Deadband")
promptgroup("70 - Alarm")
interest(1)
}
field(ADEL,DBF_DOUBLE) {
prompt("Archive Deadband")
promptgroup("80 - Display")
interest(1)
}
field(MDEL,DBF_DOUBLE) {
prompt("Monitor Deadband")
promptgroup("80 - Display")
interest(1)
}
field(LALM,DBF_DOUBLE) {
prompt("Last Value Alarmed")
special(SPC_NOMOD)
interest(3)
}
field(ALST,DBF_DOUBLE) {
prompt("Last Value Archived")
special(SPC_NOMOD)
interest(3)
}
field(MLST,DBF_DOUBLE) {
prompt("Last Val Monitored")
special(SPC_NOMOD)
interest(3)
}
}

View File

@@ -1,65 +0,0 @@
TOP=../..
include $(TOP)/configure/CONFIG
TEMPLATES_DIR = makeBaseApp
TEMPLATES += top/iocApp/Makefile
TEMPLATES += top/iocApp/Db/Makefile
TEMPLATES += top/iocApp/src/Makefile
TEMPLATES += top/iocApp/src/_APPNAME_Main.cpp
TEMPLATES += top/exampleApp/Makefile
TEMPLATES += top/exampleApp/Db/Makefile
TEMPLATES += top/exampleApp/Db/circle.db
TEMPLATES += top/exampleApp/Db/dbExample1.db
TEMPLATES += top/exampleApp/Db/dbExample2.db
TEMPLATES += top/exampleApp/Db/_APPNAME_Version.db
TEMPLATES += top/exampleApp/Db/dbSubExample.db
TEMPLATES += top/exampleApp/Db/user.substitutions
TEMPLATES += top/exampleApp/src/Makefile
TEMPLATES += top/exampleApp/src/dev_APPNAME_Version.c
TEMPLATES += top/exampleApp/src/dev_APPNAME_Version.dbd
TEMPLATES += top/exampleApp/src/xxxRecord.dbd
TEMPLATES += top/exampleApp/src/xxxRecord.c
TEMPLATES += top/exampleApp/src/devXxxSoft.c
TEMPLATES += top/exampleApp/src/xxxSupport.dbd
TEMPLATES += top/exampleApp/src/sncExample.stt
TEMPLATES += top/exampleApp/src/sncProgram.st
TEMPLATES += top/exampleApp/src/sncExample.dbd
TEMPLATES += top/exampleApp/src/dbSubExample.c
TEMPLATES += top/exampleApp/src/dbSubExample.dbd
TEMPLATES += top/exampleApp/src/_APPNAME_Main.cpp
TEMPLATES += top/exampleApp/src/_APPNAME_Hello.c
TEMPLATES += top/exampleApp/src/_APPNAME_Hello.dbd
TEMPLATES += top/exampleApp/src/initTrace.c
TEMPLATES += top/exampleApp/src/initTrace.dbd
TEMPLATES += top/exampleBoot/Makefile
TEMPLATES += top/exampleBoot/nfsCommands@vxWorks
TEMPLATES += top/exampleBoot/nfsCommands@RTEMS
TEMPLATES += top/exampleBoot/ioc/Makefile@Common
TEMPLATES += top/exampleBoot/ioc/Makefile@vxWorks
TEMPLATES += top/exampleBoot/ioc/Makefile@win32
TEMPLATES += top/exampleBoot/ioc/Makefile@windows
TEMPLATES += top/exampleBoot/ioc/Makefile@cygwin
TEMPLATES += top/exampleBoot/ioc/st.cmd@Common
TEMPLATES += top/exampleBoot/ioc/st.cmd@vxWorks
TEMPLATES += top/exampleBoot/ioc/st.cmd@RTEMS
TEMPLATES += top/exampleBoot/ioc/README@Common
TEMPLATES += top/exampleBoot/ioc/README@vxWorks
TEMPLATES += top/iocBoot/Makefile
TEMPLATES += top/iocBoot/nfsCommands@vxWorks
TEMPLATES += top/iocBoot/nfsCommands@RTEMS
TEMPLATES += top/iocBoot/ioc/Makefile@Common
TEMPLATES += top/iocBoot/ioc/Makefile@vxWorks
TEMPLATES += top/iocBoot/ioc/Makefile@win32
TEMPLATES += top/iocBoot/ioc/Makefile@windows
TEMPLATES += top/iocBoot/ioc/Makefile@cygwin
TEMPLATES += top/iocBoot/ioc/st.cmd@Common
TEMPLATES += top/iocBoot/ioc/st.cmd@Cross
TEMPLATES += top/iocBoot/ioc/st.cmd@vxWorks
TEMPLATES += top/iocBoot/ioc/st.cmd@RTEMS
include $(TOP)/configure/RULES

View File

@@ -1,31 +0,0 @@
# Makefile at top of application tree
TOP = .
include $(TOP)/configure/CONFIG
# Directories to build, any order
DIRS += configure
DIRS += $(wildcard *Sup)
DIRS += $(wildcard *App)
DIRS += $(wildcard *Top)
DIRS += $(wildcard iocBoot)
# The build order is controlled by these dependency rules:
# All dirs except configure depend on configure
$(foreach dir, $(filter-out configure, $(DIRS)), \
$(eval $(dir)_DEPEND_DIRS += configure))
# Any *App dirs depend on all *Sup dirs
$(foreach dir, $(filter %App, $(DIRS)), \
$(eval $(dir)_DEPEND_DIRS += $(filter %Sup, $(DIRS))))
# Any *Top dirs depend on all *Sup and *App dirs
$(foreach dir, $(filter %Top, $(DIRS)), \
$(eval $(dir)_DEPEND_DIRS += $(filter %Sup %App, $(DIRS))))
# iocBoot depends on all *App dirs
iocBoot_DEPEND_DIRS += $(filter %App,$(DIRS))
# Add any additional dependency rules here:
include $(TOP)/configure/RULES_TOP

View File

@@ -1,72 +0,0 @@
record(ao, "$(user):circle:step") {
field(VAL , "1.0")
field(DRVL, "0.0")
field(DRVH, "359")
field(PINI, "YES")
}
record(ao, "$(user):circle:period") {
field(VAL , "1.0")
field(PINI, "YES")
field(OUT , "$(user):circle:tick.ODLY NPP")
}
record(calc, "$(user):circle:angle") {
field(PINI, "RUNNING") # bootstrap
field(INPA, "$(user):circle:angle NPP")
field(INPB, "$(user):circle:step NPP")
field(INPD, "360")
field(DESC, "Angle")
field(EGU , "deg")
field(LOLO, "45")
field(LOW , "135")
field(HIGH, "225")
field(HIHI, "315")
field(LLSV, "MAJOR")
field(LSV , "MINOR")
field(HSV , "MINOR")
field(HHSV, "MAJOR")
field(CALC, "C:=A+B;(C>=D)?C-D:C")
field(FLNK, "$(user):circle:x")
field(PREC, "3")
info(Q:group, {
"$(user):circle":{"angle": {+channel:"VAL"}},
"$(user):line":{"a": {+channel:"VAL"}}
})
alias("$(user):line:a")
}
record(calc, "$(user):circle:x") {
field(INPA, "$(user):circle:angle NPP")
field(CALC, "cos(A*PI/180)")
field(TSEL, "$(user):circle:angle.TIME")
field(FLNK, "$(user):circle:y")
field(PREC, "3")
info(Q:group, {
"$(user):circle":{"x": {+channel:"VAL"}}
})
}
record(calc, "$(user):circle:y") {
field(INPA, "$(user):circle:angle NPP")
field(CALC, "sin(A*PI/180)")
field(TSEL, "$(user):circle:angle.TIME")
field(PREC, "3")
field(FLNK, "$(user):line:b")
info(Q:group, {
"$(user):circle":{"y": {+channel:"VAL", +trigger:"*"}}
})
}
record(ai, "$(user):line:b") {
field(INP, "$(user):line:a NPP")
field(FLNK, "$(user):circle:tick")
info(Q:group, {
"$(user):line":{"b": {+channel:"VAL", +trigger:"*"}}
})
}
record(calcout, "$(user):circle:tick") {
field(ODLY, "1.0")
field(OUT , "$(user):circle:angle.PROC CA") # loop
}

View File

@@ -1,18 +0,0 @@
TOP=../..
include $(TOP)/configure/CONFIG
#----------------------------------------
# ADD MACRO DEFINITIONS AFTER THIS LINE
#----------------------------------------------------
# Create and install (or just install) into <top>/db
# databases, templates, substitutions like this
#DB += xxx.db
#----------------------------------------------------
# If <anyname>.db template is not named <anyname>*.template add
# <anyname>_template = <templatename>
include $(TOP)/configure/RULES
#----------------------------------------
# ADD RULES AFTER THIS LINE

View File

@@ -1,7 +0,0 @@
TOP = ..
include $(TOP)/configure/CONFIG
DIRS := $(DIRS) $(filter-out $(DIRS), $(wildcard *src*))
DIRS := $(DIRS) $(filter-out $(DIRS), $(wildcard *Src*))
DIRS := $(DIRS) $(filter-out $(DIRS), $(wildcard *db*))
DIRS := $(DIRS) $(filter-out $(DIRS), $(wildcard *Db*))
include $(TOP)/configure/RULES_DIRS

View File

@@ -1,28 +0,0 @@
TOP=../..
include $(TOP)/configure/CONFIG
#----------------------------------------
# ADD MACRO DEFINITIONS AFTER THIS LINE
#=============================
#==================================================
# build a support library
LIBRARY_IOC += _APPNAME_
# xxxRecord.h will be created from xxxRecord.dbd
#DBDINC += xxxRecord
# install _APPNAME_.dbd into <top>/dbd
DBD += _APPNAME_.dbd
# specify all source files to be compiled and added to the library
#_APPNAME__SRCS += xxx
_APPNAME__LIBS += $(EPICS_BASE_IOC_LIBS)
#===========================
include $(TOP)/configure/RULES
#----------------------------------------
# ADD RULES AFTER THIS LINE

View File

@@ -1,6 +0,0 @@
# provide definitions such as
#include "xxxRecord.dbd"
#device(xxx,CONSTANT,devXxxSoft,"SoftChannel")
#driver(myDriver)
#registrar(myRegistrar)
#variable(myVariable)

View File

@@ -1,489 +0,0 @@
######################################################################
# EPICS BASE is distributed subject to a Software License Agreement
# found in file LICENSE that is included with this distribution.
#
# Original Author: Shantha Condamoor, SLAC
# Creation Date: 1-Sep-2011
# Current Author: Andrew Johnson
use strict;
use warnings;
package EPICS::IOC;
require 5.010;
=head1 NAME
EPICS::IOC - Manage an EPICS IOC
=head1 SYNOPSIS
use EPICS::IOC;
my $ioc = EPICS::IOC->new;
$ioc->debug(1); # Show IOC stdio streams
$ioc->start('bin/@ARCH@/ioc', 'iocBoot/ioc/st.cmd');
$ioc->cmd; # Wait for the iocsh prompt
my @records = $ioc->dbl;
my @values = map { $ioc->dbgf($_); } @records;
$ioc->kill;
=head1 DESCRIPTION
This module provides an object-oriented API for starting, interacting with and
stopping one or more EPICS IOCs under program control, and is generally intended
for writing test programs.
The IOC should not be configured to emit unsolicited messages on stdout as this
could interfere with the ability of the software to detect an end-of-command
from the IOC shell, which is achieved by setting the prompt to a known string
(normally C<__END__>). Unsolicited messages on stderr will not cause problems,
but can't be seen on Windows systems.
=head1 CONSTRUCTOR
=over 4
=cut
use Symbol 'gensym';
use IPC::Open3;
use IO::Select;
=item new ()
Calling C<new> creates an C<EPICS::IOC> object that can be used to start and
interact with a single IOC. After this IOC has been shut down (by calling its
C<kill> method) the C<EPICS::IOC> object may be reused for another IOC.
=back
=cut
sub new {
my $proto = shift;
my $class = ref $proto || $proto;
my $self = {
pid => undef,
stdin => gensym,
stdout => gensym,
stderr => gensym,
select => IO::Select->new(),
errbuf => '',
debug => 0,
terminator => '__END__'
};
bless $self, $class;
}
=head1 METHODS
=over 4
=item debug ( [FLAG] )
Each C<EPICS::IOC> object has its own debug flag which when non-zero causes all
IOC console traffic sent or read by other methods to be printed to stdout along
with the IOC's pid and a direction indicator. The C<debug> method optionally
sets and returns the value of this flag.
The optional FLAG is treated as a true/false value. If provided this sets the
debug flag value.
The method's return value is the current (new if given) value of the flag.
=cut
sub debug {
my $self = shift;
$self->{debug} = shift if scalar @_;
return $self->{debug};
}
=item start ( EXECUTABLE [, ARGUMENTS ...] )
Launch an IOC binary given by EXECUTABLE with ARGUMENTS. The method dies if it
can't run the program as given, or if the IOC is already running.
In most cases the C<cmd> method should be called next with no command string,
which waits for the IOC's boot process to finish and the first iocsh prompt to
be displayed.
The C<start> method sets two environment variables that control how the IOC
shell behaves: C<IOCSH_HISTEDIT_DISABLE> is set to prevent it calling the GNU
Readline library, and C<IOCSH_PS1> is set to a known string which is used as a
terminator for the previous command.
=cut
sub start {
my ($self, $exe, @args) = @_;
croak("IOC already running") if $self->started;
# Turn off readline or its equivalents
local $ENV{IOCSH_HISTEDIT_DISABLE} = "TRUE";
# The iocsh prompt marks the end of the previous command
local $ENV{IOCSH_PS1} = $self->{terminator} . "\n";
# Run the IOC as a child process
$self->{pid} = open3($self->{stdin}, $self->{stdout}, $self->{stderr},
$exe, @args)
or die "can't start $exe: $!";
$self->{select}->add($self->{stderr});
printf "#%d running %s\n", $self->{pid}, $exe if $self->{debug};
}
=item pid ()
Returns the process-ID of the IOC process, or undef if the IOC process has not
yet been started.
=cut
sub pid {
my $self = shift;
return $self->{pid};
}
=item started ()
Returns a true value if the IOC has been started and not yet killed. This state
will not change if the IOC dies by itself, it indicates that the start method
has been called without the kill method.
=cut
sub started {
my $self = shift;
return defined($self->pid);
}
=item _send ( COMMAND )
The C<_send> method is a primitive for internal use that sends a COMMAND string
to the IOC shell, and prints it to stdout if the debug flag is set.
=cut
sub _send {
my ($self, $cmd) = @_;
my $stdin = $self->{stdin};
printf "#%d << %s", $self->{pid}, $cmd if $self->{debug};
local $SIG{PIPE} = sub {
printf "#%d << <PIPE>\n", $self->{pid} if $self->{debug};
};
print $stdin $cmd;
}
=item _getline ()
The C<_getline> method is also designed for internal use, it fetches a single
line output by the IOC, and prints it to stdout if the debug flag is set.
Any CR/LF is stripped from the line before returning it. If the stream gets
closed because the IOC shuts down an C<EOF> debug message may be shown and an
undef value will be returned.
=cut
sub _getline {
my $self = shift;
my $line = readline $self->{stdout};
if (defined $line) {
chomp $line;
printf "#%d >> %s\n", $self->{pid}, $line if $self->{debug};
}
elsif (eof($self->{stdout})) {
printf "#%d >> <EOF>\n", $self->{pid} if $self->{debug};
}
else {
printf "#%d Error: %s\n", $self->{pid}, $! if $self->{debug};
}
return $line;
}
=item _getlines ( [TERM] )
Another internal method C<_getlines> fetches multiple lines from the IOC. It
takes an optional TERM string or regexp parameter which is matched against each
input line in turn to determine when the IOC's output has been completed.
Termination also occurs on an EOF from the output stream.
The return value is a list of all the lines received (with the final CR/LF
stripped) including the line that matched the terminator.
=cut
sub _getlines {
my ($self, $term) = @_;
my @response = ();
while (my $line = $self->_getline) {
push @response, $line;
last if defined $term && $line =~ $term;
}
return @response;
}
=item _geterrors ( )
Returns a list of lines output by the IOC to stderr since last called. Only
complete lines are included, and trailing newlines have been removed.
NOTE: This doesn't work on Windows because it uses select which Perl doesn't
support on that OS, but it doesn't seem to cause any problems for short-lived
IOCs at least, it just never returns any text from the IOC's stderr output.
=cut
sub _geterrors {
my ($self) = @_;
my @errors;
while ($self->{select}->can_read(0.01)) {
sysread $self->{stderr}, my $errbuf, 1024;
push @errors, split m/\n/, $self->{errbuf} . $errbuf, -1;
last unless @errors;
$self->{errbuf} = pop @errors;
}
return @errors;
}
=item cmd ( [COMMAND [, ARGUMENTS ...]] )
If the C<cmd> method is given an optional COMMAND string along with any number
of ARGUMENTS it constructs a command-line, quoting each argument as necessary.
This is sent to the IOC and a line read back and discarded if it matches the
command-line.
With no COMMAND string the method starts here; it then collects lines from the
IOC until one matches the terminator. A list of all the lines received prior to
the terminator line is returned.
=cut
sub cmd {
my ($self, $cmd, @args) = @_;
my @response;
my $term = $self->{terminator};
if (defined $cmd) {
if (@args) {
# FIXME: This quoting stuff isn't quite right
my @qargs = map {
m/^ (?: -? [0-9.eE+\-]+ ) | (?: " .* " ) $/x ? $_ : "'$_'"
} @args;
$cmd .= ' ' . join(' ', @qargs);
}
$self->_send("$cmd\n");
my $echo = $self->_getline;
return @response unless defined $echo; # undef => reached EOF
if ($echo ne $cmd) {
return @response if $echo =~ $term;
push @response, $echo;
}
}
push @response, $self->_getlines($term);
pop @response if @response and $response[-1] =~ $term;
my @errors = $self->_geterrors;
if (scalar @errors && $self->{debug}) {
my $indent = sprintf "#%d e>", $self->{pid};
print map {"$indent $_\n"} @errors;
}
return @response;
}
=item kill ()
The C<kill> method attempts to stop an IOC that is still running in several
ways. First it sends an C<exit> command to the IOC shell. Next it closes the
IOC's stdin stream which will trigger an end-of-file on that stream, and it
fetches any remaining lines from the IOC's stdout stream before closing both
that and the stderr stream. Finally (unless running on MS-Windows) it sends a
SIGTERM signal to the child process and waits for it to clean up.
=cut
sub kill {
my $self = shift;
return ()
unless $self->started;
$self->_send("exit\n"); # Don't wait
close $self->{stdin};
$self->{stdin} = gensym;
my @response = $self->_getlines; # No terminator
close $self->{stdout};
$self->{stdout} = gensym;
$self->{select}->remove($self->{stderr});
close $self->{stderr};
$self->{stderr} = gensym;
if ($^O ne "MSWin32") {
kill 'TERM', $self->{pid};
waitpid $self->{pid}, 0;
}
$self->{pid} = undef;
return @response;
}
=item DESTROY ()
C<EPICS::IOC> objects have a destructor which calls the C<kill> method, but it
is not recommended that this be relied on to terminate an IOC process. Better to
use an C<END {}> block and/or trap the necessary signals to explicitly kill the
IOC.
=cut
sub DESTROY {
shift->kill;
}
=back
=head1 CONVENIENCE METHODS
The following methods provide an easy way to perform various common IOC
operations.
=over 4
=item dbLoadRecords ( FILE [, MACROS] )
Instructs the IOC to load a database (.db) from FILE. If provided, the MACROS
parameter is a single string containing one or more comma-separated assignment
statements like C<a=1> for macros that are used in the database file.
This method can also be used to load a database definition (.dbd) file.
=cut
sub dbLoadRecords {
my ($self, $file, $macros) = @_;
$macros = '' unless defined $macros;
$self->cmd('dbLoadRecords', $file, $macros);
}
=item iocInit ()
Start the IOC executing.
=cut
sub iocInit {
shift->cmd('iocInit');
}
=item dbl ( [RECORDTYPE])
This method uses the C<dbl> command to fetch a list of all of the record names
the IOC has loaded. If a RECORDTYPE name is given, the list will only comprise
records of that type.
=cut
sub dbl {
my ($self, $rtyp) = @_;
return $self->cmd('dbl', $rtyp)
}
=item dbgf ( PV )
The C<dbgf> method returns the value of the process variable PV, or C<undef> if
the PV doesn't exist. This only works when the PV holds a scalar or an array
with one element.
=cut
# Regexps for the output from dbgf, currently supporting scalars only
my $RXdbfstr = qr/ DB[FR]_(STRING) : \s* " ( (?> \\. | [^"\\] )* ) " /x;
my $RXdbfint = qr/ DB[FR]_(U?(?:CHAR|SHORT|LONG|INT64)) : \s* ( -? [0-9]+ ) /x;
my $RXdbfflt = qr/ DB[FR]_(FLOAT|DOUBLE) : \s* ( [0-9.eE+\-]+ ) /x;
my $RXdbf = qr/ (?| $RXdbfstr | $RXdbfint | $RXdbfflt ) /x;
sub dbgf {
my ($self, $pv) = @_;
my @res = $self->cmd('dbgf', $pv);
return undef unless scalar @res;
my ($type, $result) = ($res[0] =~ m/^ $RXdbf /x);
$result =~ s/\\([\\"'])/$1/gx
if $type eq 'STRING';
return $result;
}
=item dbpf ( PV, VALUE )
This method sets PV to VALUE, and returns the new value, or C<undef> if the PV
doesn't exist. If the put fails the return value is the previous value of the
PV. As with the C<dbgf> method this only works for scalar or single-element
arrays, but PV may be an array field which will be set to one element.
=cut
sub dbpf {
my ($self, $pv, $val) = @_;
my @res = $self->cmd('dbpf', $pv, $val);
return undef unless scalar @res;
my ($type, $result) = ($res[0] =~ m/^ $RXdbf /x);
$result =~ s/\\([\\"'])/$1/gx
if $type eq 'STRING';
return $result;
}
=back
=head1 COPYRIGHT AND LICENSE
Portions Copyright (C) 2011 UChicago Argonne LLC, as Operator of Argonne
National Laboratory.
This software is distributed under the terms of the EPICS Open License.
=cut
1;
__END__

View File

@@ -1,43 +0,0 @@
#*************************************************************************
# Copyright (c) 2018 UChicago Argonne LLC, as Operator of Argonne
# National Laboratory.
# EPICS BASE is distributed subject to a Software License Agreement found
# in file LICENSE that is included with this distribution.
#*************************************************************************
TOP=../..
include $(TOP)/configure/CONFIG
PERL_MODULES += DBD.pm
PERL_MODULES += DBD/Base.pm
PERL_MODULES += DBD/Breaktable.pm
PERL_MODULES += DBD/Device.pm
PERL_MODULES += DBD/Driver.pm
PERL_MODULES += DBD/Link.pm
PERL_MODULES += DBD/Function.pm
PERL_MODULES += DBD/Menu.pm
PERL_MODULES += DBD/Output.pm
PERL_MODULES += DBD/Parser.pm
PERL_MODULES += DBD/Recfield.pm
PERL_MODULES += DBD/Recordtype.pm
PERL_MODULES += DBD/Record.pm
PERL_MODULES += DBD/Registrar.pm
PERL_MODULES += DBD/Variable.pm
PERL_MODULES += EPICS/IOC.pm
HTMLS += EPICS/IOC.html
PERL_SCRIPTS += databaseModuleDirs.pm
PERL_SCRIPTS += makeIncludeDbd.pl
PERL_SCRIPTS += dbdToMenuH.pl
PERL_SCRIPTS += dbdToRecordtypeH.pl
PERL_SCRIPTS += dbdExpand.pl
PERL_SCRIPTS += dbExpand.pl
PERL_SCRIPTS += dbdToHtml.pl
PERL_SCRIPTS += registerRecordDeviceDriver.pl
HTMLS += dbdToHtml.html
include $(TOP)/configure/RULES

View File

@@ -1,21 +0,0 @@
#*************************************************************************
# Copyright (c) 2002 The University of Chicago, as Operator of Argonne
# National Laboratory.
# Copyright (c) 2002 The Regents of the University of California, as
# Operator of Los Alamos National Laboratory.
# EPICS BASE is distributed subject to a Software License Agreement found
# in file LICENSE that is included with this distribution.
#*************************************************************************
TOP = ..
include $(TOP)/configure/CONFIG
DIRS += ioc/db
DIRS += ioc/dbtemplate
DIRS += std/rec
DIRS += std/filters
DIRS += tools
include $(TOP)/configure/RULES_TOP

View File

@@ -1,190 +0,0 @@
/*************************************************************************\
* Copyright (c) 2017 UChicago Argonne LLC, as Operator of Argonne
* National Laboratory.
* EPICS BASE is distributed subject to a Software License Agreement found
* in file LICENSE that is included with this distribution.
\*************************************************************************/
/*
* Author: Andrew Johnson <anj@aps.anl.gov>
*/
#include <string.h>
#include "dbServer.h"
#include <envDefs.h>
#include <epicsUnitTest.h>
#include <testMain.h>
enum {
NOTHING_CALLED,
REPORT_CALLED,
CLIENT_CALLED_UNKNOWN,
CLIENT_CALLED_KNOWN,
STATS_CALLED,
INIT_CALLED,
RUN_CALLED,
PAUSE_CALLED,
STOP_CALLED
} oneState;
char *oneSim;
void oneReport(unsigned level)
{
oneState = REPORT_CALLED;
}
void oneStats(unsigned *channels, unsigned *clients)
{
oneState = STATS_CALLED;
}
int oneClient(char *pbuf, size_t len)
{
if (oneSim) {
strncpy(pbuf, oneSim, len);
oneState = CLIENT_CALLED_KNOWN;
oneSim = NULL;
return 0;
}
oneState = CLIENT_CALLED_UNKNOWN;
return -1;
}
void oneInit(void)
{
oneState = INIT_CALLED;
}
void oneRun(void)
{
oneState = RUN_CALLED;
}
void onePause(void)
{
oneState = PAUSE_CALLED;
}
void oneStop(void)
{
oneState = STOP_CALLED;
}
dbServer one = {
ELLNODE_INIT, "one",
oneReport, oneStats, oneClient,
oneInit, oneRun, onePause, oneStop
};
/* Server layer for testing NULL methods */
dbServer no_routines = {
ELLNODE_INIT, "no-routines",
NULL, NULL, NULL,
NULL, NULL, NULL, NULL
};
/* Server layer which should be disabled */
int disInitialized = 0;
void disInit(void)
{
disInitialized = 1;
}
dbServer disabled = {
ELLNODE_INIT, "disabled",
NULL, NULL, NULL,
disInit, NULL, NULL, NULL
};
dbServer illegal = {
ELLNODE_INIT, "bad name",
NULL, NULL, NULL,
disInit, NULL, NULL, NULL
};
dbServer toolate = {
ELLNODE_INIT, "toolate",
NULL, NULL, NULL,
disInit, NULL, NULL, NULL
};
MAIN(dbServerTest)
{
char name[16];
char *theName = "The One";
int status;
testPlan(24);
/* Prove that we handle substring names properly */
epicsEnvSet("EPICS_IOC_IGNORE_SERVERS", "none ones");
testDiag("Registering dbServer 'one'");
testOk(dbRegisterServer(&one) == 0, "Registered 'one'");
testOk1(oneState == NOTHING_CALLED);
testOk(dbRegisterServer(&one) != 0, "Duplicate registration rejected");
testOk(dbRegisterServer(&illegal) != 0, "Illegal registration rejected");
testDiag("Registering dbServer 'no-routines'");
testOk(dbRegisterServer(&no_routines) == 0, "Registered 'no-routines'");
testOk(dbUnregisterServer(&no_routines) == 0, "'no-routines' unreg'd");
testOk(dbRegisterServer(&no_routines) == 0, "Re-registered 'no-routines'");
epicsEnvSet("EPICS_IOC_IGNORE_SERVERS", "disabled nonexistent");
testDiag("Registering dbServer 'disabled'");
testOk(dbRegisterServer(&disabled) == 0, "Registration accepted");
testDiag("Changing server state");
dbInitServers();
testOk(oneState == INIT_CALLED, "dbInitServers");
testOk(disInitialized == 0, "Disabled server not initialized");
testOk(dbRegisterServer(&toolate) != 0, "No registration while active");
dbRunServers();
testOk(oneState == RUN_CALLED, "dbRunServers");
testOk(dbUnregisterServer(&one) != 0, "No unregistration while active");
testDiag("Checking server methods called");
dbsr(0);
testOk(oneState == REPORT_CALLED, "dbsr called report()");
oneSim = NULL;
name[0] = 0;
status = dbServerClient(name, sizeof(name));
testOk(oneState == CLIENT_CALLED_UNKNOWN, "Client unknown");
testOk(status == -1 && name[0] == 0,
"dbServerClient mismatch");
oneSim = theName;
name[0] = 0;
status = dbServerClient(name, sizeof(name));
testOk(oneState == CLIENT_CALLED_KNOWN, "Client known");
testOk(status == 0 && strcmp(name, theName) == 0,
"dbServerClient match");
dbPauseServers();
testOk(oneState == PAUSE_CALLED, "dbPauseServers");
dbsr(0);
testOk(oneState != REPORT_CALLED, "No call to report() when paused");
status = dbServerClient(name, sizeof(name));
testOk(oneState != CLIENT_CALLED_KNOWN, "No call to client() when paused");
dbStopServers();
testOk(oneState == STOP_CALLED, "dbStopServers");
testOk(dbUnregisterServer(&toolate) != 0, "No unreg' if not reg'ed");
testOk(dbUnregisterServer(&no_routines) != 0, "No unreg' of 'no-routines'");
return testDone();
}

View File

@@ -1,78 +0,0 @@
#!/usr/bin/env perl
use strict;
use warnings;
use lib '@TOP@/lib/perl';
use Test::More tests => 3;
use EPICS::IOC;
$ENV{HARNESS_ACTIVE} = 1 if scalar @ARGV && shift eq '-tap';
# Keep traffic local and avoid duplicates over multiple interfaces
$ENV{EPICS_CA_AUTO_ADDR_LIST} = 'NO';
$ENV{EPICS_CA_ADDR_LIST} = 'localhost';
$ENV{EPICS_CAS_INTF_ADDR_LIST} = 'localhost';
$ENV{EPICS_PVA_AUTO_ADDR_LIST} = 'NO';
$ENV{EPICS_PVA_ADDR_LIST} = 'localhost';
$ENV{EPICS_PVAS_INTF_ADDR_LIST} = 'localhost';
my $bin = "@TOP@/bin/@ARCH@";
my $exe = ($^O =~ m/^(MSWin32|cygwin)$/x) ? '.exe' : '';
my $prefix = "test-$$";
my $ioc = EPICS::IOC->new();
#$ioc->debug(1);
$SIG{__DIE__} = $SIG{'INT'} = $SIG{'QUIT'} = sub {
$ioc->kill
if ref($ioc) eq 'EPICS::IOC' && $ioc->started;
BAIL_OUT('Caught signal');
};
my $softIoc = "$bin/softIocPVA$exe";
$softIoc = "$bin/softIoc$exe"
unless -x $softIoc;
BAIL_OUT("Can't find a softIoc executable")
unless -x $softIoc;
$ioc->start($softIoc, '-x', $prefix);
$ioc->cmd; # Wait for command prompt
my $pv = "$prefix:BaseVersion";
my @pvs = $ioc->dbl('stringin');
grep(m/$pv/, @pvs)
or BAIL_OUT('No BaseVersion record found');
my $version = $ioc->dbgf("$pv");
like($version, qr/^ \d+ \. \d+ \. \d+ /x,
"Got BaseVersion '$version' from iocsh");
note("CA server configuration:\n",
map(" $_\n", $ioc->cmd('casr', 1)));
my $caget = "$bin/caget$exe";
SKIP: {
skip "caget not available", 1 unless -x $caget;
my $caVersion = `$caget $pv`;
like($caVersion, qr/$pv \s+ \Q$version\E/x,
'Got same BaseVersion from caget');
}
my $pvget = "$bin/pvget$exe";
SKIP: {
skip "softIocPVA not available", 1
if $softIoc eq "$bin/softIoc$exe";
note("PVA server configuration:\n",
map(" $_\n", $ioc->cmd('pvasr')));
skip "pvget not available", 1
unless -x $pvget;
my $pvaVersion = `$pvget $pv`;
like($pvaVersion, qr/$pv \s .* \Q$version\E/x,
'Got same BaseVersion from pvget');
}
$ioc->kill;

View File

@@ -1,16 +0,0 @@
# no info
record(ai, "ai-0") {
}
# only scan
record(ai, "ai-1") {
field(SSCN,"2 second")
}
# only delay
record(ai, "ai-2") {
field(SDLY,".234")
}
# scan and delay
record(ai, "ai-3") {
field(SSCN,"5 second")
field(SDLY,".345")
}

View File

@@ -1,6 +0,0 @@
# siml target doesn't exist
record(ao, "ao-0") {
field(SIML, "non-exist")
field(HIGH, "1.5")
field(HSV, "MINOR")
}

View File

@@ -1,502 +0,0 @@
/*************************************************************************\
* Copyright (c) 2017 ITER Organization
* EPICS BASE is distributed subject to a Software License Agreement found
* in file LICENSE that is included with this distribution.
\*************************************************************************/
#include <limits.h>
#include <string.h>
#include <dbUnitTest.h>
#include <testMain.h>
#include <dbAccess.h>
#include <epicsTime.h>
#include <epicsThread.h>
#include <errlog.h>
#include <alarm.h>
#include "recSup.h"
#include "aiRecord.h"
#include "aoRecord.h"
#include "aaiRecord.h"
#include "aaoRecord.h"
#include "biRecord.h"
#include "boRecord.h"
#include "mbbiRecord.h"
#include "mbboRecord.h"
#include "mbbiDirectRecord.h"
#include "mbboDirectRecord.h"
#include "longinRecord.h"
#include "longoutRecord.h"
#include "int64inRecord.h"
#include "int64outRecord.h"
#include "stringinRecord.h"
#include "stringoutRecord.h"
#include "lsiRecord.h"
#include "lsoRecord.h"
#include "eventRecord.h"
#include "histogramRecord.h"
#include "waveformRecord.h"
/*
* Tests for simulation mode
*/
void simmTest_registerRecordDeviceDriver(struct dbBase *);
static
void startSimmTestIoc(const char *dbfile)
{
testdbPrepare();
testdbReadDatabase("simmTest.dbd", NULL, NULL);
simmTest_registerRecordDeviceDriver(pdbbase);
testdbReadDatabase(dbfile, NULL, NULL);
eltc(0);
testIocInitOk();
eltc(1);
}
static char *rawSupp[] = {
"ai",
"bi",
"mbbi",
"mbbiDirect",
};
static
int hasRawSimmSupport(const char *rectype) {
int i;
for (i = 0; i < (sizeof(rawSupp)/sizeof(rawSupp[0])); i++)
if (strcmp(rectype, rawSupp[i]) == 0) return 1;
return 0;
}
#define PVNAMELENGTH 60
static char nameVAL[PVNAMELENGTH];
static char nameB0[PVNAMELENGTH];
static char nameRVAL[PVNAMELENGTH];
static char nameSGNL[PVNAMELENGTH];
static char nameSIMM[PVNAMELENGTH];
static char nameSIML[PVNAMELENGTH];
static char nameSVAL[PVNAMELENGTH];
static char nameSIOL[PVNAMELENGTH];
static char nameSCAN[PVNAMELENGTH];
static char namePROC[PVNAMELENGTH];
static char namePACT[PVNAMELENGTH];
static char nameSTAT[PVNAMELENGTH];
static char nameSEVR[PVNAMELENGTH];
static char nameSIMS[PVNAMELENGTH];
static char nameTSE[PVNAMELENGTH];
static char nameSimmode[PVNAMELENGTH];
static char nameSimval[PVNAMELENGTH];
static char nameSimvalNORD[PVNAMELENGTH];
static char nameSimvalLEN[PVNAMELENGTH];
#define SETNAME(field) strcpy(name ## field, name); strcat(name ## field, "." #field)
static
void setNames(const char *name)
{
SETNAME(VAL); SETNAME(B0); SETNAME(RVAL); SETNAME(SGNL);
SETNAME(SVAL); SETNAME(SIMM); SETNAME(SIML); SETNAME(SIOL); SETNAME(SIMS);
SETNAME(SCAN); SETNAME(PROC); SETNAME(PACT);
SETNAME(STAT); SETNAME(SEVR); SETNAME(TSE);
strcpy(nameSimmode, name); strcat(nameSimmode, ":simmode");
strcpy(nameSimval, name); strcat(nameSimval, ":simval");
strcpy(nameSimvalNORD, name); strcat(nameSimvalNORD, ":simval.NORD");
strcpy(nameSimvalLEN, name); strcat(nameSimvalLEN, ":simval.LEN");
}
/*
* Parsing of info items and xsimm structure setting
*/
static
void testSimmSetup(void)
{
aiRecord *precai;
testDiag("##### Simm initialization #####");
/* no config */
precai = (aiRecord*)testdbRecordPtr("ai-0");
testOk(precai->simpvt == NULL, "ai-0.SIMPVT = %p == NULL [no callback]", precai->simpvt);
testOk(precai->sscn == USHRT_MAX, "ai-0.SSCN = %u == USHRT_MAX (not set)", precai->sscn);
testOk(precai->sdly < 0., "ai-0.SDLY = %g < 0.0 (not set)", precai->sdly);
/* with SCAN */
precai = (aiRecord*)testdbRecordPtr("ai-1");
testOk(precai->sscn == 5, "ai-1.SSCN = %u == 5 (2 second)", precai->sscn);
testOk(precai->sdly < 0., "ai-1.SDLY = %g < 0.0 (not set)", precai->sdly);
/* with DELAY */
precai = (aiRecord*)testdbRecordPtr("ai-2");
testOk(precai->sscn == USHRT_MAX, "ai-2.SSCN = %u == USHRT_MAX (not set)", precai->sscn);
testOk(precai->sdly == 0.234, "ai-2.SDLY = %g == 0.234", precai->sdly);
/* with SCAN and DELAY */
precai = (aiRecord*)testdbRecordPtr("ai-3");
testOk(precai->sscn == 4, "ai-3.SSCN = %u == 4 (5 second)", precai->sscn);
testOk(precai->sdly == 0.345, "ai-3.SDLY = %g == 0.345", precai->sdly);
}
/*
* Invalid SIML link sets LINK/NO_ALARM if in NO_ALARM
*/
static
void testSimlFail(void)
{
aoRecord *precao;
testDiag("##### Behavior for failing SIML #####");
precao = (aoRecord*)testdbRecordPtr("ao-0");
/* before anything: UDF INVALID */
testOk(precao->stat == UDF_ALARM, "ao-0.STAT = %u [%s] == %u [UDF]",
precao->stat, epicsAlarmConditionStrings[precao->stat], UDF_ALARM);
testOk(precao->sevr == INVALID_ALARM, "ao-0.SEVR = %u [%s] == %u [INVALID]",
precao->sevr, epicsAlarmSeverityStrings[precao->sevr], INVALID_ALARM);
/* legal value: LINK NO_ALARM */
testdbPutFieldOk("ao-0.VAL", DBR_DOUBLE, 1.0);
testOk(precao->stat == LINK_ALARM, "ao-0.STAT = %u [%s] == %u [LINK]",
precao->stat, epicsAlarmConditionStrings[precao->stat], LINK_ALARM);
testOk(precao->sevr == NO_ALARM, "ao-0.SEVR = %u [%s] == %u [NO_ALARM]",
precao->sevr, epicsAlarmSeverityStrings[precao->sevr], NO_ALARM);
/* HIGH/MINOR overrides */
testdbPutFieldOk("ao-0.VAL", DBR_DOUBLE, 2.0);
testOk(precao->stat == HIGH_ALARM, "ao-0.STAT = %u [%s] == %u [HIGH]",
precao->stat, epicsAlarmConditionStrings[precao->stat], HIGH_ALARM);
testOk(precao->sevr == MINOR_ALARM, "ao-0.SEVR = %u [%s] == %u [MINOR]",
precao->sevr, epicsAlarmSeverityStrings[precao->sevr], MINOR_ALARM);
}
/*
* SIMM triggered SCAN swapping, by writing to SIMM and through SIML
*/
static
void testSimmToggle(const char *name, epicsEnum16 *psscn)
{
testDiag("## SIMM toggle and SCAN swapping ##");
/* SIMM mode by setting the field */
testdbGetFieldEqual(nameSCAN, DBR_USHORT, 0);
testOk(*psscn == 1, "SSCN = %u == 1 (Event)", *psscn);
testDiag("set SIMM to YES");
testdbPutFieldOk(nameSIMM, DBR_STRING, "YES");
testdbGetFieldEqual(nameSCAN, DBR_USHORT, 1);
testOk(*psscn == 0, "SSCN = %u == 0 (Passive)", *psscn);
/* Change simm:SCAN when simmYES */
testdbPutFieldOk(nameSCAN, DBR_USHORT, 3);
testDiag("set SIMM to NO");
testdbPutFieldOk(nameSIMM, DBR_STRING, "NO");
testdbGetFieldEqual(nameSCAN, DBR_USHORT, 0);
testOk(*psscn == 3, "SSCN = %u == 3 (10 second)", *psscn);
*psscn = 1;
if (hasRawSimmSupport(name)) {
testDiag("set SIMM to RAW");
testdbPutFieldOk(nameSIMM, DBR_STRING, "RAW");
testdbGetFieldEqual(nameSCAN, DBR_USHORT, 1);
testOk(*psscn == 0, "SSCN = %u == 0 (Passive)", *psscn);
testDiag("set SIMM to NO");
testdbPutFieldOk(nameSIMM, DBR_STRING, "NO");
testdbGetFieldEqual(nameSCAN, DBR_USHORT, 0);
testOk(*psscn == 1, "SSCN = %u == 1 (Event)", *psscn);
} else {
testDiag("Record type %s has no support for simmRAW", name);
}
/* SIMM mode through SIML */
testdbPutFieldOk(nameSIML, DBR_STRING, nameSimmode);
testDiag("set SIMM (via SIML -> simmode) to YES");
testdbPutFieldOk(nameSimmode, DBR_USHORT, 1);
testdbPutFieldOk(namePROC, DBR_LONG, 0);
testdbGetFieldEqual(nameSIMM, DBR_USHORT, 1);
testdbGetFieldEqual(nameSCAN, DBR_USHORT, 1);
testOk(*psscn == 0, "SSCN = %u == 0 (Passive)", *psscn);
testDiag("set SIMM (via SIML -> simmode) to NO");
testdbPutFieldOk(nameSimmode, DBR_USHORT, 0);
testdbPutFieldOk(namePROC, DBR_LONG, 0);
testdbGetFieldEqual(nameSIMM, DBR_USHORT, 0);
testdbGetFieldEqual(nameSCAN, DBR_USHORT, 0);
testOk(*psscn == 1, "SSCN = %u == 1 (Event)", *psscn);
if (hasRawSimmSupport(name)) {
testDiag("set SIMM (via SIML -> simmode) to RAW");
testdbPutFieldOk(nameSimmode, DBR_USHORT, 2);
testdbPutFieldOk(namePROC, DBR_LONG, 0);
testdbGetFieldEqual(nameSIMM, DBR_USHORT, 2);
testdbGetFieldEqual(nameSCAN, DBR_USHORT, 1);
testOk(*psscn == 0, "SSCN = %u == 0 (Passive)", *psscn);
testDiag("set SIMM (via SIML -> simmode) to NO");
testdbPutFieldOk(nameSimmode, DBR_USHORT, 0);
testdbPutFieldOk(namePROC, DBR_LONG, 0);
testdbGetFieldEqual(nameSIMM, DBR_USHORT, 0);
testdbGetFieldEqual(nameSCAN, DBR_USHORT, 0);
testOk(*psscn == 1, "SSCN = %u == 1 (Event)", *psscn);
} else {
testDiag("Record type %s has no support for simmRAW", name);
}
}
/*
* Reading from SVAL (direct write or through SIOL link)
*/
static
void testSvalRead(const char *name,
const epicsTimeStamp *mytime,
const epicsTimeStamp *svtime)
{
epicsTimeStamp last;
if (strcmp(name, "histogram") == 0)
strcpy(nameVAL, nameSGNL);
if (strcmp(name, "aai") != 0 &&
strcmp(name, "waveform") != 0 &&
strcmp(name, "lsi") != 0) {
testDiag("## Reading from SVAL ##");
testDiag("in simmNO, SVAL must be ignored");
testdbPutFieldOk(nameSimmode, DBR_USHORT, 0);
testdbPutFieldOk(nameVAL, DBR_LONG, 0);
if (strcmp(name, "stringin") == 0)
testdbPutFieldOk(nameSVAL, DBR_STRING, "1");
else
testdbPutFieldOk(nameSVAL, DBR_USHORT, 1);
testdbPutFieldOk(namePROC, DBR_LONG, 0);
testdbGetFieldEqual(nameVAL, DBR_USHORT, 0);
testDiag("in simmYES, SVAL is used for VAL");
testdbPutFieldOk(nameSIMS, DBR_USHORT, 0);
testdbPutFieldOk(nameSimmode, DBR_USHORT, 1);
testdbPutFieldOk(namePROC, DBR_LONG, 0);
testdbGetFieldEqual(nameVAL, DBR_USHORT, 1);
testDiag("No SIMS setting: STAT/SEVR == NO_ALARM");
testdbGetFieldEqual(nameSTAT, DBR_STRING, "NO_ALARM");
testdbGetFieldEqual(nameSEVR, DBR_USHORT, 0);
if (hasRawSimmSupport(name)) {
testDiag("in simmRAW, SVAL is used for RVAL");
testdbPutFieldOk(nameSimmode, DBR_USHORT, 2);
testdbPutFieldOk(namePROC, DBR_LONG, 0);
testdbGetFieldEqual(nameRVAL, DBR_USHORT, 1);
} else {
testDiag("Record type %s has no support for simmRAW", name);
}
}
testDiag("## Reading from SIOL->SVAL ##");
/* Set SIOL link to simval */
testdbPutFieldOk(nameSIOL, DBR_STRING, nameSimval);
testDiag("in simmNO, SIOL->SVAL must be ignored");
testdbPutFieldOk(nameSimmode, DBR_USHORT, 0);
testdbPutFieldOk(nameVAL, DBR_LONG, 0);
testdbPutFieldOk(nameSimval, DBR_LONG, 1);
testdbPutFieldOk(namePROC, DBR_LONG, 0);
testdbGetFieldEqual(nameVAL, DBR_USHORT, 0);
testDiag("in simmYES, SIOL->SVAL is used for VAL");
testdbPutFieldOk(nameSIMS, DBR_USHORT, 3);
testdbPutFieldOk(nameSimmode, DBR_USHORT, 1);
testdbPutFieldOk(namePROC, DBR_LONG, 0);
testdbGetFieldEqual(nameVAL, DBR_USHORT, 1);
testDiag("SIMS is INVALID: STAT/SEVR == SIMM/INVALID");
testdbGetFieldEqual(nameSTAT, DBR_STRING, "SIMM");
testdbGetFieldEqual(nameSEVR, DBR_USHORT, 3);
testdbPutFieldOk(nameSIMS, DBR_USHORT, 0);
if (hasRawSimmSupport(name)) {
testDiag("in simmRAW, SIOL->SVAL is used for RVAL");
testdbPutFieldOk(nameSimmode, DBR_USHORT, 2);
testdbPutFieldOk(namePROC, DBR_LONG, 0);
testdbGetFieldEqual(nameRVAL, DBR_USHORT, 1);
} else {
testDiag("Record type %s has no support for simmRAW", name);
}
/* My timestamp must be later than simval's */
testOk(epicsTimeLessThan(svtime, mytime), "simval time < my time [TSE = 0]");
testDiag("for TSE=-2 (from device) and simmYES, take time stamp from IOC or input link");
/* Set simmYES */
testdbPutFieldOk(nameSimmode, DBR_USHORT, 1);
/* Set TSE to -2 (from device) and reprocess: timestamps is taken through SIOL from simval */
testdbPutFieldOk(nameTSE, DBR_SHORT, -2);
testdbPutFieldOk(namePROC, DBR_LONG, 0);
testOk(epicsTimeEqual(svtime, mytime), "simval time == my time [TSE = -2]");
last = *mytime;
/* With TSE=-2 and no SIOL, timestamp is taken from IOC */
testdbPutFieldOk(nameSIOL, DBR_STRING, "");
testdbPutFieldOk(namePROC, DBR_LONG, 0);
testOk(epicsTimeLessThan(&last, mytime), "new time stamp from IOC [TSE = -2, no SIOL]");
/* Reset TSE */
testdbPutFieldOk(nameTSE, DBR_SHORT, 0);
}
/*
* Writing through SIOL link
*/
static
void testSiolWrite(const char *name,
const epicsTimeStamp *mytime)
{
epicsTimeStamp now;
testDiag("## Writing through SIOL ##");
/* Set SIOL link to simval */
testdbPutFieldOk(nameSIOL, DBR_STRING, nameSimval);
testDiag("in simmNO, SIOL must be ignored");
testdbPutFieldOk(nameSimmode, DBR_USHORT, 0);
if (strcmp(name, "mbboDirect") == 0)
testdbPutFieldOk(nameB0, DBR_LONG, 1);
else
testdbPutFieldOk(nameVAL, DBR_LONG, 1);
if (strcmp(name, "aao") == 0)
testdbGetFieldEqual(nameSimvalNORD, DBR_USHORT, 0);
else if (strcmp(name, "lso") == 0)
testdbGetFieldEqual(nameSimvalLEN, DBR_USHORT, 0);
else
testdbGetFieldEqual(nameSimval, DBR_USHORT, 0);
testDiag("in simmYES, SIOL is used to write VAL");
testdbPutFieldOk(nameSimmode, DBR_USHORT, 1);
if (strcmp(name, "mbboDirect") == 0)
testdbPutFieldOk(nameB0, DBR_LONG, 1);
else
testdbPutFieldOk(nameVAL, DBR_LONG, 1);
testdbGetFieldEqual(nameSimval, DBR_USHORT, 1);
/* Set TSE to -2 (from device) and reprocess: timestamp is taken from IOC */
epicsTimeGetCurrent(&now);
testdbPutFieldOk(nameTSE, DBR_SHORT, -2);
testdbPutFieldOk(namePROC, DBR_LONG, 0);
testOk(epicsTimeLessThan(&now, mytime), "new time stamp from IOC [TSE = -2]");
/* Reset TSE */
testdbPutFieldOk(nameTSE, DBR_SHORT, 0);
}
/*
* Asynchronous processing using simm:DELAY
*/
static
void testSimmDelay(const char *name,
epicsFloat64 *psdly,
const epicsTimeStamp *mytime)
{
epicsTimeStamp now;
const double delay = 0.01; /* 10 ms */
testDiag("## Asynchronous processing with simm:DELAY ##");
/* Set delay to something just long enough */
*psdly = delay;
/* Process in simmNO: synchronous */
testDiag("simm:DELAY and simmNO processes synchronously");
testdbPutFieldOk(nameSimmode, DBR_USHORT, 0);
epicsTimeGetCurrent(&now);
testdbPutFieldOk(namePROC, DBR_LONG, 0);
testdbGetFieldEqual(namePACT, DBR_USHORT, 0);
testOk(epicsTimeLessThan(&now, mytime), "time stamp is recent");
/* Process in simmYES: asynchronous */
testDiag("simm:DELAY and simmYES processes asynchronously");
testdbPutFieldOk(nameSimmode, DBR_USHORT, 1);
testdbPutFieldOk(namePROC, DBR_LONG, 0);
testdbGetFieldEqual(namePACT, DBR_USHORT, 1);
epicsTimeGetCurrent(&now);
epicsThreadSleep(1.75*delay);
testdbGetFieldEqual(namePACT, DBR_USHORT, 0);
testOk(epicsTimeLessThan(&now, mytime), "time stamp taken from second pass processing");
/* Reset delay */
*psdly = -1.;
}
#define RUNALLTESTSREAD(type) \
testDiag("################################################### Record Type " #type); \
setNames(#type); \
testSimmToggle(#type, &((type ## Record*)testdbRecordPtr(#type))->sscn); \
testSvalRead(#type, &((type ## Record*)testdbRecordPtr(#type))->time, \
&((type ## Record*)testdbRecordPtr(#type ":simval"))->time); \
testSimmDelay(#type, &((type ## Record*)testdbRecordPtr(#type))->sdly, \
&((type ## Record*)testdbRecordPtr(#type))->time)
#define RUNALLTESTSWRITE(type) \
testDiag("################################################### Record Type " #type); \
setNames(#type); \
testSimmToggle(#type, &((type ## Record*)testdbRecordPtr(#type))->sscn); \
testSiolWrite(#type, &((type ## Record*)testdbRecordPtr(#type))->time); \
testSimmDelay(#type, &((type ## Record*)testdbRecordPtr(#type))->sdly, \
&((type ## Record*)testdbRecordPtr(#type))->time)
static
void testAllRecTypes(void)
{
RUNALLTESTSREAD(ai);
RUNALLTESTSWRITE(ao);
RUNALLTESTSREAD(aai);
RUNALLTESTSWRITE(aao);
RUNALLTESTSREAD(bi);
RUNALLTESTSWRITE(bo);
RUNALLTESTSREAD(mbbi);
RUNALLTESTSWRITE(mbbo);
RUNALLTESTSREAD(mbbiDirect);
RUNALLTESTSWRITE(mbboDirect);
RUNALLTESTSREAD(longin);
RUNALLTESTSWRITE(longout);
RUNALLTESTSREAD(int64in);
RUNALLTESTSWRITE(int64out);
RUNALLTESTSREAD(stringin);
RUNALLTESTSWRITE(stringout);
RUNALLTESTSREAD(lsi);
RUNALLTESTSWRITE(lso);
RUNALLTESTSREAD(event);
RUNALLTESTSREAD(waveform);
RUNALLTESTSREAD(histogram);
}
MAIN(simmTest)
{
testPlan(1176);
startSimmTestIoc("simmTest.db");
testSimmSetup();
testSimlFail();
testAllRecTypes();
testIocShutdownOk();
testdbCleanup();
return testDone();
}

View File

@@ -1,32 +0,0 @@
file "simmTestSimple.template" {
{ TYPE="ai" }
{ TYPE="ao" }
{ TYPE="bi" }
{ TYPE="bo" }
{ TYPE="mbbi" }
{ TYPE="mbbo" }
{ TYPE="mbbiDirect" }
{ TYPE="mbboDirect" }
{ TYPE="longin" }
{ TYPE="longout" }
{ TYPE="int64in" }
{ TYPE="int64out" }
{ TYPE="stringin" }
{ TYPE="stringout" }
{ TYPE="lsi" }
{ TYPE="lso" }
{ TYPE="event" }
}
file "simmTestArray.template" {
{ TYPE="aai" }
{ TYPE="aao" }
{ TYPE="waveform" }
}
file "simmTestHistogram.template" {
{ TYPE="histogram" }
}
file "simmSetup.db" {
{}
file "simmSimlFail.db" {
{}
}

View File

@@ -1,15 +0,0 @@
# Array type records
# Regular simulation mode and simm:SCAN tests
record($(TYPE), "$(TYPE)") {
field(SSCN,"Event")
field(FTVL,"SHORT")
field(NELM,"2")
}
record($(TYPE), "$(TYPE):simval") {
field(FTVL,"SHORT")
field(NELM,"2")
}
record(bo, "$(TYPE):simmode") {
field(ZNAM,"off")
field(ONAM,"on")
}

View File

@@ -1,12 +0,0 @@
# Array type records
# Regular simulation mode and simm:SCAN tests
record($(TYPE), "$(TYPE)") {
field(SSCN,"Event")
field(NELM,"2")
}
record(ai, "$(TYPE):simval") {
}
record(bo, "$(TYPE):simmode") {
field(ZNAM,"off")
field(ONAM,"on")
}

View File

@@ -1,10 +0,0 @@
# Regular simulation mode and simm:SCAN tests
record($(TYPE), "$(TYPE)") {
field(SSCN,"Event")
}
record($(TYPE), "$(TYPE):simval") {
}
record(bo, "$(TYPE):simmode") {
field(ZNAM,"off")
field(ONAM,"on")
}

View File

@@ -1,21 +0,0 @@
#!/bin/sh
set -e -x
# set RTEMS to eg. "4.9" or "4.10"
# requires qemu, bison, flex, texinfo, install-info
if [ -n "$RTEMS" ]
then
# find local qemu-system-i386
export PATH="$HOME/.cache/qemu/usr/bin:$PATH"
echo -n "Using QEMU: "
type qemu-system-i386 || echo "Missing qemu"
EXTRA=RTEMS_QEMU_FIXUPS=YES
fi
make -j2 $EXTRA
if [ "$TEST" != "NO" ]
then
make -j2 tapfiles
make -s test-results
fi

View File

@@ -1,123 +0,0 @@
#!/bin/sh
set -e -x
CURDIR="$PWD"
QDIR="$HOME/.cache/qemu"
if [ -n "$RTEMS" -a "$TEST" = "YES" ]
then
git clone --quiet --branch vme --depth 10 https://github.com/mdavidsaver/qemu.git "$HOME/.build/qemu"
cd "$HOME/.build/qemu"
HEAD=`git log -n1 --pretty=format:%H`
echo "HEAD revision $HEAD"
[ -e "$HOME/.cache/qemu/built" ] && BUILT=`cat "$HOME/.cache/qemu/built"`
echo "Cached revision $BUILT"
if [ "$HEAD" != "$BUILT" ]
then
echo "Building QEMU"
git submodule --quiet update --init
install -d "$HOME/.build/qemu/build"
cd "$HOME/.build/qemu/build"
"$HOME/.build/qemu/configure" --prefix="$HOME/.cache/qemu/usr" --target-list=i386-softmmu --disable-werror
make -j2
make install
echo "$HEAD" > "$HOME/.cache/qemu/built"
fi
fi
cd "$CURDIR"
cat << EOF > configure/RELEASE.local
EPICS_BASE=$HOME/.source/epics-base
EOF
install -d "$HOME/.source"
cd "$HOME/.source"
git clone --quiet --depth 5 --branch core/"${BRCORE:-master}" https://github.com/${REPOBASE:-epics-base}/epics-base.git epics-base
(cd epics-base && git log -n1 )
EPICS_HOST_ARCH=`sh epics-base/startup/EpicsHostArch`
# requires wine and g++-mingw-w64-i686
if [ "$WINE" = "32" ]
then
echo "Cross mingw32"
sed -i -e '/CMPLR_PREFIX/d' epics-base/configure/os/CONFIG_SITE.linux-x86.win32-x86-mingw
cat << EOF >> epics-base/configure/os/CONFIG_SITE.linux-x86.win32-x86-mingw
CMPLR_PREFIX=i686-w64-mingw32-
EOF
cat << EOF >> epics-base/configure/CONFIG_SITE
CROSS_COMPILER_TARGET_ARCHS+=win32-x86-mingw
EOF
fi
if [ "$STATIC" = "YES" ]
then
echo "Build static libraries/executables"
cat << EOF >> epics-base/configure/CONFIG_SITE
SHARED_LIBRARIES=NO
STATIC_BUILD=YES
EOF
fi
case "$CMPLR" in
clang)
echo "Host compiler is clang"
cat << EOF >> epics-base/configure/os/CONFIG_SITE.Common.$EPICS_HOST_ARCH
GNU = NO
CMPLR_CLASS = clang
CC = clang
CCC = clang++
EOF
# hack
sed -i -e 's/CMPLR_CLASS = gcc/CMPLR_CLASS = clang/' epics-base/configure/CONFIG.gnuCommon
clang --version
;;
*)
echo "Host compiler is default"
gcc --version
;;
esac
cat <<EOF >> epics-base/configure/CONFIG_SITE
USR_CPPFLAGS += $USR_CPPFLAGS
USR_CFLAGS += $USR_CFLAGS
USR_CXXFLAGS += $USR_CXXFLAGS
EOF
# set RTEMS to eg. "4.9" or "4.10"
# requires qemu, bison, flex, texinfo, install-info
if [ -n "$RTEMS" ]
then
echo "Cross RTEMS${RTEMS} for pc386"
install -d /home/travis/.cache
curl -L "https://github.com/mdavidsaver/rsb/releases/download/travis-20160306-2/rtems${RTEMS}-i386-trusty-20190306-2.tar.gz" \
| tar -C /home/travis/.cache -xj
sed -i -e '/^RTEMS_VERSION/d' -e '/^RTEMS_BASE/d' epics-base/configure/os/CONFIG_SITE.Common.RTEMS
cat << EOF >> epics-base/configure/os/CONFIG_SITE.Common.RTEMS
RTEMS_VERSION=$RTEMS
RTEMS_BASE=/home/travis/.cache/rtems${RTEMS}-i386
EOF
cat << EOF >> epics-base/configure/CONFIG_SITE
CROSS_COMPILER_TARGET_ARCHS+=RTEMS-pc386
EOF
# find local qemu-system-i386
export PATH="$HOME/.cache/qemu/usr/bin:$PATH"
echo -n "Using QEMU: "
type qemu-system-i386 || echo "Missing qemu"
EXTRA=RTEMS_QEMU_FIXUPS=YES
fi
make -j2 -C epics-base $EXTRA

View File

@@ -1,26 +0,0 @@
sudo: false
dist: trusty
language: c
compiler:
- gcc
addons:
apt:
packages:
- libreadline6-dev
- libncurses5-dev
- perl
- clang
- g++-mingw-w64-i686
install:
- ./.ci/travis-prepare.sh
script:
- ./.ci/travis-build.sh
env:
- BRCORE=master
- CMPLR=clang
- USR_CXXFLAGS=-std=c++11
- CMPLR=clang USR_CXXFLAGS=-std=c++11
- WINE=32 TEST=NO STATIC=YES
- WINE=32 TEST=NO STATIC=NO
- RTEMS=4.10 TEST=NO
- RTEMS=4.9 TEST=NO

View File

@@ -1,25 +0,0 @@
#*************************************************************************
# Copyright (c) 2002 The University of Chicago, as Operator of Argonne
# National Laboratory.
# Copyright (c) 2002 The Regents of the University of California, as
# Operator of Los Alamos National Laboratory.
# EPICS BASE is distributed subject to a Software License Agreement found
# in file LICENSE that is included with this distribution.
#*************************************************************************
TOP = .
include $(TOP)/configure/CONFIG
DIRS += configure src
src_DEPEND_DIRS = configure
DIRS += RTEMS
RTEMS_DEPEND_DIRS = src
DIRS += vxWorks
vxWorks_DEPEND_DIRS = src
DIRS += test
test_DEPEND_DIRS = RTEMS vxWorks
include $(TOP)/configure/RULES_TOP

View File

@@ -1,85 +0,0 @@
#!/usr/bin/env perl
#
use File::Basename;
use Text::Wrap;
use strict;
my $outfile = shift;
my $varname = shift;
open(my $DST, '>', $outfile)
or die "Failed to open $outfile";
my $inputs = join "\n * ", @ARGV;
print $DST <<EOF;
/* $outfile containing
* $inputs
*/
#include <epicsMemFs.h>
EOF
my $N = 0;
$Text::Wrap::break = ',';
$Text::Wrap::columns = 78;
$Text::Wrap::separator = ",\n";
for my $fname (@ARGV) {
my $realfname = $fname;
# strip leading "../" "./" or "/"
$fname =~ s(^\.{0,2}/)()g;
my $file = basename($fname);
my @dirs = split('/', dirname($fname));
print $DST "/* $realfname */\n",
"static const char * const file_${N}_dir[] = {",
map("\"$_\", ", @dirs), "NULL};\n",
"static const char file_${N}_data[] = {\n",
" ";
open(my $SRC, '<', $realfname)
or die "Failed to open $realfname";
binmode $SRC;
my ($buf, @bufs);
while (read($SRC, $buf, 4096)) {
@bufs[-1] .= ',' if @bufs; # Need ',' between buffers
push @bufs, join(",", map(ord, split(//, $buf)));
}
print $DST wrap('', ' ', @bufs);
close $SRC;
print $DST <<EOF;
};
static const epicsMemFile file_${N} = {
file_${N}_dir,
\"$file\",
file_${N}_data,
sizeof(file_${N}_data)
};
EOF
$N++;
}
my $files = join ', ', map "&file_${_}", (0 .. $N-1);
print $DST <<EOF;
static const epicsMemFile* files[] = {
$files, NULL
};
static
const epicsMemFS ${varname}_image = {&files[0]};
const epicsMemFS * $varname = &${varname}_image;
EOF
close $DST;

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