Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V3.7.3 #8

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
165 changes: 84 additions & 81 deletions .ci/assemble_synApps.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/bin/bash
shopt -s expand_aliases
set -x

# This file is intended to gather everything in or used in synApps.
# The version numbers in this file are not guaranteed to be up to date,
Expand All @@ -12,140 +13,140 @@ shallow_repo()
RELEASE_NAME=$3
TAG=$4

FOLDER_NAME=$MODULE_NAME-${TAG//./-}
FOLDER_NAME=$MODULE_NAME-${TAG//./-}

echo
echo
echo "Grabbing $MODULE_NAME at tag: $TAG"
echo

if [ ! -e "$FOLDER_NAME" ]
if [ ! -d "$FOLDER_NAME" ]
then
git clone --branch $TAG --depth 1 git://github.com/$PROJECT/$MODULE_NAME.git $FOLDER_NAME
fi

echo "$RELEASE_NAME=\$(SUPPORT)/$FOLDER_NAME" >> ./configure/RELEASE
echo "$RELEASE_NAME=\$(SUPPORT)/$FOLDER_NAME" >> ./configure/RELEASE

echo
echo
}

shallow_support()
{
git clone --branch $2 --depth 1 git://github.com/EPICS-synApps/$1.git
if [ ! -d "$1" ]
then
git clone --branch $2 --depth 1 git://github.com/EPICS-synApps/$1.git
fi
}


alias get_support='shallow_support'
alias get_repo='shallow_repo'

cd $HOME/.cache

EPICS_BASE=$HOME/.cache/base-$BASE

if [ ! -e "$EPICS_BASE" ]
if [ ! -d "$EPICS_BASE" ]
then
git clone --branch $BASE --depth 1 git://github.com/epics-base/epics-base.git base-$BASE

EPICS_HOST_ARCH=`sh $EPICS_BASE/startup/EpicsHostArch`

case "$STATIC" in
static)
cat << EOF >> "$EPICS_BASE/configure/CONFIG_SITE"
EPICS_HOST_ARCH=`sh $EPICS_BASE/startup/EpicsHostArch`

case "$STATIC" in
static)
cat << EOF >> "$EPICS_BASE/configure/CONFIG_SITE"
SHARED_LIBRARIES=NO
STATIC_BUILD=YES
EOF
;;
*) ;;
esac

case "$CMPLR" in
clang)
echo "Host compiler is clang"
cat << EOF >> $EPICS_BASE/configure/os/CONFIG_SITE.Common.$EPICS_HOST_ARCH
;;
*) ;;
esac

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
;;
*) echo "Host compiler is default";;
esac

# 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
;;
*) echo "Host compiler is default";;
esac
# 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
cat << EOF >> "$EPICS_BASE/configure/CONFIG_SITE"
CROSS_COMPILER_TARGET_ARCHS+=win32-x86-mingw
EOF
fi

# set RTEMS to eg. "4.9" or "4.10"
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
fi
# set RTEMS to eg. "4.9" or "4.10"
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
cat << EOF >> $EPICS_BASE/configure/CONFIG_SITE
CROSS_COMPILER_TARGET_ARCHS+=RTEMS-pc386
EOF

fi

make -C "$EPICS_BASE" -j2

fi

make -C "$EPICS_BASE" -j2
# get MSI for 3.14
case "$BASE" in
3.14*)
echo "Build MSI"
install -d "$HOME/msi/extensions/src"
curl https://www.aps.anl.gov/epics/download/extensions/extensionsTop_20120904.tar.gz | tar -C "$HOME/msi" -xvz
curl https://www.aps.anl.gov/epics/download/extensions/msi1-7.tar.gz | tar -C "$HOME/msi/extensions/src" -xvz
mv "$HOME/msi/extensions/src/msi1-7" "$HOME/msi/extensions/src/msi"

cat << EOF > "$HOME/msi/extensions/configure/RELEASE"
# get MSI for 3.14
case "$BASE" in
3.14*)
if [ ! -d "$HOME/msi/extensions/src" ]
then
echo "Build MSI"
install -d "$HOME/msi/extensions/src"
curl https://epics.anl.gov/download/extensions/extensionsTop_20120904.tar.gz | tar -C "$HOME/msi" -xvz
curl https://epics.anl.gov/download/extensions/msi1-7.tar.gz | tar -C "$HOME/msi/extensions/src" -xvz
mv "$HOME/msi/extensions/src/msi1-7" "$HOME/msi/extensions/src/msi"
cat << EOF > "$HOME/msi/extensions/configure/RELEASE"
EPICS_BASE=$EPICS_BASE
EPICS_EXTENSIONS=\$(TOP)
EOF
make -C "$HOME/msi/extensions"
cp "$HOME/msi/extensions/bin/$EPICS_HOST_ARCH/msi" "$EPICS_BASE/bin/$EPICS_HOST_ARCH/"
echo 'MSI:=$(EPICS_BASE)/bin/$(EPICS_HOST_ARCH)/msi' >> "$EPICS_BASE/configure/CONFIG_SITE"

cat <<EOF >> configure/CONFIG_SITE

fi

make -C "$HOME/msi/extensions"
cp "$HOME/msi/extensions/bin/$EPICS_HOST_ARCH/msi" "$EPICS_BASE/bin/$EPICS_HOST_ARCH/"
echo 'MSI:=$(EPICS_BASE)/bin/$(EPICS_HOST_ARCH)/msi' >> "$EPICS_BASE/configure/CONFIG_SITE"

cat <<EOF >> configure/CONFIG_SITE
MSI = \$(EPICS_BASE)/bin/\$(EPICS_HOST_ARCH)/msi
EOF

;;
*) echo "Use MSI from Base"
;;
esac
;;
*) echo "Use MSI from Base"
;;
esac
fi

cd $EPICS_BASE

make

cd ..

# Assume user has nothing but this file, just in case that's true.
mkdir synApps
cd synApps
alias get_support='shallow_support'
alias get_repo='shallow_repo'

get_support support synApps_5_8
cd support

get_support configure synApps_5_8

echo "SUPPORT=$HOME/.cache/synApps/support" > configure/RELEASE
echo "SUPPORT=$HOME/.cache/support" > configure/RELEASE
echo "EPICS_BASE=$EPICS_BASE" >> configure/RELEASE

# modules ##################################################################
Expand All @@ -165,6 +166,8 @@ echo "SNCSEQ=\$(SUPPORT)/seq-${SNCSEQ//./-}" >> ./configure/RELEASE

fi

cp -f configure/RELEASE sscan-${SSCAN//./-}/configure/RELEASE

make release
make

Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ envPaths
dllPath.bat
auto_settings.sav*
auto_positions.sav*

RELEASE.local
43 changes: 36 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ dist: trusty
language: c
compiler:
- gcc
notifications:
email: false
cache:
directories:
- $HOME/.cache
notifications:
email: false
addons:
apt:
packages:
Expand All @@ -17,15 +17,44 @@ addons:
- clang
- g++-mingw-w64-i686
- re2c
env:
- BASE=R3.15.5 STATIC=shared SSCAN=R2-10-2 SNCSEQ=2.2.4
- BASE=R3.14.12.6 STATIC=shared SSCAN=R2-10-2 SNCSEQ=2.2.4
matrix:
include:
- name: "3.16 master with Sequencer"
env: BASE=3.16 STATIC=shared SSCAN=master SNCSEQ=2.2.5

- name: "3.16 master without Sequencer"
env: BASE=3.16 STATIC=shared SSCAN=master

- name: "3.15 master with Sequencer"
env: BASE=3.15 STATIC=shared SSCAN=master SNCSEQ=2.2.5

- name: "3.15 master without Sequencer"
env: BASE=3.15 STATIC=shared SSCAN=master

- name: "3.14 master with Sequencer"
env: BASE=3.14 STATIC=shared SSCAN=master SNCSEQ=2.2.5

- name: "3.14 master without Sequencer"
env: BASE=3.14 STATIC=shared SSCAN=master

- name: "Windows Shared with Sequencer"
env: BASE=3.16 STATIC=shared CMPLR=clang WINE=32 SSCAN=master SNCSEQ=2.2.5

- name: "Windows Shared without Sequencer"
env: BASE=3.16 STATIC=shared CMPLR=clang WINE=32 SSCAN=master

- name: "Windows Static with Sequencer"
env: BASE=3.16 STATIC=static CMPLR=clang WINE=32 SSCAN=master SNCSEQ=2.2.5

- name: "Windows Static without Sequencer"
env: BASE=3.16 STATIC=static CMPLR=clang WINE=32 SSCAN=master



before_install: chmod +x ./.ci/assemble_synApps.sh

install: ./.ci/assemble_synApps.sh



script:
# Build the module
- make
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
APS BCDA synApps module: calc

For more information, see
http://www.aps.anl.gov/bcda/synApps
https://epics.anl.gov/bcda/synApps

[Report an issue with calc](https://github.com/epics-modules/calc/issues/new?title=%20ISSUE%20NAME%20HERE&body=**Describe%20the%20issue**%0A%0A**Steps%20to%20reproduce**%0A1.%20Step%20one%0A2.%20Step%20two%0A3.%20Step%20three%0A%0A**Expected%20behaivour**%0A%0A**Actual%20behaviour**%0A%0A**Build%20Environment**%0AArchitecture:%0AEpics%20Base%20Version:%0ADependent%20Module%20Versions:&labels=bug)
[Request a feature](https://github.com/epics-modules/calc/issues/new?title=%20FEATURE%20SHORT%20DESCRIPTION&body=**Feature%20Long%20Description**%0A%0A**Why%20should%20this%20be%20added?**%0A&labels=enhancement)
Expand All @@ -16,4 +16,4 @@ For more information, see
converted from APS SVN repository: Fri Nov 6 11:32:45 CST 2015

Regarding the license of tagged versions prior to synApps 4-5,
refer to http://www.aps.anl.gov/bcda/synApps/license.php
refer to https://epics.anl.gov/bcda/synApps/license.php
6 changes: 6 additions & 0 deletions calcApp/Db/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ include $(TOP)/configure/CONFIG
# databases, templates, substitutions like this
#DB += softMotorexample.db

DB += $(patsubst ../%, %, $(wildcard ../*.template))
DB += $(patsubst ../%, %, $(wildcard ../*.db))
DB += $(patsubst ../%, %, $(wildcard ../*.vdb))

REQ += $(patsubst ../%, %, $(wildcard ../*.req))

#----------------------------------------------------
# Declare template files which do not show up in DB
#USES_TEMPLATE += dbExample2.template
Expand Down
2 changes: 2 additions & 0 deletions calcApp/src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ include $(TOP)/configure/CONFIG
# ADD MACRO DEFINITIONS AFTER THIS LINE
#=============================

USR_CPPFLAGS += -DUSE_TYPED_RSET

#=============================
# xxxRecord.h will be created from xxxRecord.dbd

Expand Down
12 changes: 6 additions & 6 deletions calcApp/src/aCalcoutRecord.c
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ static long init_record(acalcoutRecord *pcalc, int pass)
if (pass==0) {
pcalc->vers = VERSION;
pcalc->rpvt = (void *)calloc(1, sizeof(struct rpvtStruct));
if ((pcalc->nuse < 0) || (pcalc->nuse > pcalc->nelm)) {
if (pcalc->nuse > pcalc->nelm) {
pcalc->nuse = pcalc->nelm;
db_post_events(pcalc,&pcalc->nuse,DBE_VALUE|DBE_LOG);
}
Expand Down Expand Up @@ -367,7 +367,7 @@ static long process(acalcoutRecord *pcalc)
pcalc->name, pcalc->pact, pcalc->cact, pcalc->dlya);

/* Make sure. Autosave is capable of setting NUSE to an illegal value. */
if ((pcalc->nuse < 0) || (pcalc->nuse > pcalc->nelm)) {
if (pcalc->nuse > pcalc->nelm) {
pcalc->nuse = pcalc->nelm;
db_post_events(pcalc,&pcalc->nuse, DBE_VALUE|DBE_LOG);
}
Expand Down Expand Up @@ -488,7 +488,7 @@ static long special(dbAddr *paddr, int after)
break;

case acalcoutRecordNUSE:
if ((pcalc->nuse < 0) || (pcalc->nuse > pcalc->nelm)) {
if (pcalc->nuse > pcalc->nelm) {
pcalc->nuse = pcalc->nelm;
db_post_events(pcalc,&pcalc->nuse,DBE_VALUE);
return(-1);
Expand Down Expand Up @@ -1325,7 +1325,7 @@ static long doCalc(acalcoutRecord *pcalc) {
static void acalcPerformTask(void *parm) {
calcMessage msg;
acalcoutRecord *pcalc;
struct rset *prset;
rset *prset;

if (aCalcoutRecordDebug >= 10)
printf("acalcPerformTask:entry\n");
Expand All @@ -1338,7 +1338,7 @@ static void acalcPerformTask(void *parm) {
}

pcalc = msg.pcalc;
prset = (struct rset *)(pcalc->rset);
prset = pcalc->rset;

dbScanLock((struct dbCommon *)pcalc);

Expand All @@ -1348,7 +1348,7 @@ static void acalcPerformTask(void *parm) {
if (aCalcoutRecordDebug >= 10)
printf("acalcPerformTask:processing '%s'\n", pcalc->name);

(*prset->process)(pcalc);
prset->process((dbCommon *) pcalc);
dbScanUnlock((struct dbCommon *)pcalc);
}
}
Expand Down
Loading