Compare commits
105 Commits
R3.16.1-rc
...
R3.14.12.8
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
922ed30136 | ||
|
|
9f9f119e7e | ||
|
|
d8214a4531 | ||
|
|
120b100e7e | ||
|
|
949e9d788a | ||
|
|
27c6e6a385 | ||
|
|
4b59476170 | ||
|
|
526b565c6b | ||
|
|
1b7b2bcceb | ||
|
|
49c925d064 | ||
|
|
d3bcf5737f | ||
|
|
6c5505ad3e | ||
|
|
4247d98b08 | ||
|
|
13735a8088 | ||
|
|
58d4242b68 | ||
|
|
8e42f516b0 | ||
|
|
9051cdbb34 | ||
|
|
2548a37267 | ||
|
|
1dc1b25aaa | ||
|
|
fb31dd784b | ||
| 89870e2817 | |||
| 4e9cf72d71 | |||
| 80869a0868 | |||
| 998fa984ba | |||
| 31844af88e | |||
| 8f161f9463 | |||
| e0399478ad | |||
|
|
2a2a1e54ac | ||
|
|
20d2cff501 | ||
|
|
860ce156a2 | ||
|
|
31fc35fbe8 | ||
| ab493264b2 | |||
| 68779943eb | |||
| 7a5ff26984 | |||
| eae59183cc | |||
|
|
b32629c3bf | ||
|
|
220e404203 | ||
|
|
8f55a1307d | ||
|
|
e459e8bdd4 | ||
|
|
b558bd9b16 | ||
|
|
3c16c3c0da | ||
|
|
67844bacc3 | ||
|
|
7e7d230d8c | ||
|
|
c1ece40f41 | ||
|
|
a732539eee | ||
|
|
3bc0805a89 | ||
|
|
c72e35c769 | ||
|
|
2d9c5e99a1 | ||
|
|
ca22d50831 | ||
|
|
5cb91d9f6d | ||
|
|
116c90c2ea | ||
|
|
3f3696fb91 | ||
|
|
91ce807e8b | ||
|
|
b9443f8813 | ||
|
|
b7d4609e57 | ||
|
|
c8a7e1597d | ||
|
|
ceaff61c09 | ||
|
|
6cc623a7b4 | ||
|
|
ac4d5c95ac | ||
|
|
de442e9584 | ||
|
|
713c2d5080 | ||
|
|
734d16291f | ||
|
|
1454f42a27 | ||
|
|
c830a3a4ee | ||
|
|
8a1477ecab | ||
|
|
006ce1a240 | ||
|
|
276dee2c3e | ||
|
|
98a2871727 | ||
|
|
5ca1bb3bd5 | ||
|
|
f6be3c7f70 | ||
|
|
00924dcba0 | ||
|
|
5278799575 | ||
|
|
2af98c33c9 | ||
|
|
22debb3532 | ||
|
|
c441cdd5a4 | ||
|
|
13fa1e2722 | ||
|
|
fad89189da | ||
|
|
4ab56518a0 | ||
|
|
80dbc7aeef | ||
|
|
238f6772bd | ||
|
|
dc9859cee9 | ||
|
|
5d5f27a486 | ||
|
|
ad6a16d7c4 | ||
|
|
5c8e5c52ef | ||
|
|
546df1c1f0 | ||
|
|
603331e7a5 | ||
|
|
4b272cc0cf | ||
|
|
619a99bf99 | ||
|
|
1f8cb740f1 | ||
|
|
322f7a97de | ||
|
|
0fc770166c | ||
|
|
1a70855e25 | ||
|
|
6b5e7da4fd | ||
|
|
a1dc16848c | ||
|
|
2819d7ea3d | ||
|
|
6ef995525a | ||
|
|
18dee384ec | ||
|
|
b369aa67f1 | ||
|
|
c853234e01 | ||
|
|
9c859ffdca | ||
|
|
0dc850f4ec | ||
|
|
672fd16ec8 | ||
|
|
dcadeac903 | ||
|
|
b7b3dd2b37 | ||
|
|
82396ee3ef |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -10,3 +10,4 @@ O.*/
|
||||
/QtC-*
|
||||
*.orig
|
||||
*.log
|
||||
.*.swp
|
||||
|
||||
2
README
2
README
@@ -20,5 +20,5 @@ Additional information about EPICS including mailing list
|
||||
archives and subscription instructions, documentation and
|
||||
training materials, additional components, links to other
|
||||
websites etc. is available on the EPICS home page at
|
||||
http://www.aps.anl.gov/epics/
|
||||
https://epics.anl.gov/
|
||||
|
||||
|
||||
85
appveyor.yml
Normal file
85
appveyor.yml
Normal file
@@ -0,0 +1,85 @@
|
||||
# AppVeyor configuration for EPICS Base
|
||||
|
||||
# Ralph Lange <ralph.lange@gmx.de>
|
||||
# Copyright (c) 2016-2017 ITER Organization
|
||||
|
||||
# Version format
|
||||
version: base-{branch}-{build}
|
||||
|
||||
#---------------------------------#
|
||||
# repository cloning #
|
||||
#---------------------------------#
|
||||
|
||||
# Called at very beginning, before repo cloning
|
||||
init:
|
||||
# Set autocrlf to make batch files work
|
||||
- git config --global core.autocrlf true
|
||||
|
||||
# Set clone depth (do not fetch complete history)
|
||||
clone_depth: 2
|
||||
|
||||
# Skipping commits affecting only specific files
|
||||
skip_commits:
|
||||
files:
|
||||
- 'documentation/*'
|
||||
- 'templates/*'
|
||||
- '**/*.html'
|
||||
- '**/*.md'
|
||||
|
||||
#---------------------------------#
|
||||
# build matrix configuration #
|
||||
#---------------------------------#
|
||||
|
||||
# Build Configurations: dll/static, regular/debug
|
||||
configuration:
|
||||
- dynamic
|
||||
- static
|
||||
- dynamic-debug
|
||||
- static-debug
|
||||
|
||||
# Environment variables: compiler toolchain
|
||||
environment:
|
||||
matrix:
|
||||
- TOOLCHAIN: 10.0
|
||||
- TOOLCHAIN: 11.0
|
||||
- TOOLCHAIN: 12.0
|
||||
- TOOLCHAIN: 14.0
|
||||
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
|
||||
TOOLCHAIN: 2017
|
||||
- TOOLCHAIN: cygwin
|
||||
- TOOLCHAIN: mingw
|
||||
|
||||
# Platform: architecture
|
||||
platform:
|
||||
- x86
|
||||
- x64
|
||||
|
||||
# Matrix configuration: allow specific failing jobs
|
||||
matrix:
|
||||
exclude:
|
||||
# VS Express installs don't have the 64 bit compiler
|
||||
- platform: x64
|
||||
TOOLCHAIN: 10.0
|
||||
|
||||
#---------------------------------#
|
||||
# building & testing #
|
||||
#---------------------------------#
|
||||
|
||||
install:
|
||||
- cmd: ci/appveyor-prepare.bat
|
||||
|
||||
build_script:
|
||||
- cmd: ci/appveyor-make.bat
|
||||
|
||||
test_script:
|
||||
- cmd: ci/appveyor-make.bat runtests
|
||||
|
||||
#---------------------------------#
|
||||
# notifications #
|
||||
#---------------------------------#
|
||||
|
||||
notifications:
|
||||
|
||||
- provider: Slack
|
||||
incoming_webhook:
|
||||
secure: RYOm3FIUYeZGjWKaeTVKwq+C3fzK54AKwbmAoECED45mex3lN+8HmrC845a6mg9xPUJ/ND51RopWVaKDD9/UzaM0SO195RQLKqUTIUafiuM=
|
||||
137
ci/appveyor-make.bat
Normal file
137
ci/appveyor-make.bat
Normal file
@@ -0,0 +1,137 @@
|
||||
:: Universal build script for AppVeyor (https://ci.appveyor.com/)
|
||||
:: Environment:
|
||||
:: TOOLCHAIN - toolchain version [10.0/11.0/12.0/14.0/2017/cygwin/mingw]
|
||||
:: CONFIGURATION - determines EPICS build [dynamic/static]
|
||||
:: PLATFORM - architecture [x86/x64]
|
||||
::
|
||||
:: All command line args are passed to make
|
||||
|
||||
Setlocal EnableDelayedExpansion
|
||||
|
||||
set "ST="
|
||||
if /i "%CONFIGURATION%"=="static" set ST=-static
|
||||
|
||||
set OS=64BIT
|
||||
if "%PLATFORM%"=="x86" set OS=32BIT
|
||||
|
||||
echo [INFO] Platform: %OS%
|
||||
|
||||
:: Use parallel make, except for 3.14
|
||||
set "MAKEARGS=-j2 -Otarget"
|
||||
if "%APPVEYOR_REPO_BRANCH%"=="3.14" set MAKEARGS=
|
||||
|
||||
if "%TOOLCHAIN%"=="cygwin" (
|
||||
set "MAKE=make"
|
||||
if "%OS%"=="64BIT" (
|
||||
set "EPICS_HOST_ARCH=cygwin-x86_64"
|
||||
set "INCLUDE=C:\cygwin64\include;%INCLUDE%"
|
||||
set "PATH=C:\cygwin64\bin;%PATH%"
|
||||
echo [INFO] Cygwin Toolchain 64bit
|
||||
) else (
|
||||
set "EPICS_HOST_ARCH=cygwin-x86"
|
||||
set "INCLUDE=C:\cygwin\include;%INCLUDE%"
|
||||
set "PATH=C:\cygwin\bin;%PATH%"
|
||||
echo [INFO] Cygwin Toolchain 32bit
|
||||
)
|
||||
echo [INFO] Compiler Version
|
||||
gcc -v
|
||||
goto Finish
|
||||
)
|
||||
|
||||
if "%TOOLCHAIN%"=="mingw" (
|
||||
set "MAKE=mingw32-make"
|
||||
if "%OS%"=="64BIT" (
|
||||
set "EPICS_HOST_ARCH=windows-x64-mingw"
|
||||
set "INCLUDE=C:\tools\mingw64\include;%INCLUDE%"
|
||||
set "PATH=C:\tools\mingw64\bin;%PATH%"
|
||||
echo [INFO] MinGW Toolchain 64bit
|
||||
) else (
|
||||
set "EPICS_HOST_ARCH=win32-x86-mingw"
|
||||
set "INCLUDE=C:\tools\mingw32\include;%INCLUDE%"
|
||||
set "PATH=C:\tools\mingw32\bin;%PATH%"
|
||||
echo [INFO] MinGW Toolchain 32bit
|
||||
)
|
||||
echo [INFO] Compiler Version
|
||||
gcc -v
|
||||
goto Finish
|
||||
)
|
||||
|
||||
set "VSINSTALL=C:\Program Files (x86)\Microsoft Visual Studio %TOOLCHAIN%"
|
||||
if not exist "%VSINSTALL%\" set "VSINSTALL=C:\Program Files (x86)\Microsoft Visual Studio\%TOOLCHAIN%\Community"
|
||||
if not exist "%VSINSTALL%\" goto MSMissing
|
||||
|
||||
set "MAKE=C:\tools\make"
|
||||
|
||||
echo [INFO] APPVEYOR_BUILD_WORKER_IMAGE=%APPVEYOR_BUILD_WORKER_IMAGE%
|
||||
|
||||
if "%OS%"=="64BIT" (
|
||||
set EPICS_HOST_ARCH=windows-x64%ST%
|
||||
:: VS 2017
|
||||
if exist "%VSINSTALL%\VC\Auxiliary\Build\vcvars64.bat" (
|
||||
call "%VSINSTALL%\VC\Auxiliary\Build\vcvars64.bat"
|
||||
where cl
|
||||
if !ERRORLEVEL! NEQ 0 goto MSMissing
|
||||
goto MSFound
|
||||
)
|
||||
if exist "%VSINSTALL%\VC\vcvarsall.bat" (
|
||||
call "%VSINSTALL%\VC\vcvarsall.bat" amd64
|
||||
where cl
|
||||
if !ERRORLEVEL! NEQ 0 (
|
||||
call "%VSINSTALL%\VC\vcvarsall.bat" x86_amd64
|
||||
where cl
|
||||
if !ERRORLEVEL! NEQ 0 goto MSMissing
|
||||
)
|
||||
goto MSFound
|
||||
)
|
||||
if exist "%VSINSTALL%\VC\bin\amd64\vcvars64.bat" (
|
||||
call "%VSINSTALL%\VC\bin\amd64\vcvars64.bat"
|
||||
where cl
|
||||
if !ERRORLEVEL! NEQ 0 goto MSMissing
|
||||
goto MSFound
|
||||
)
|
||||
) else (
|
||||
set EPICS_HOST_ARCH=win32-x86%ST%
|
||||
:: VS 2017
|
||||
if exist "%VSINSTALL%\VC\Auxiliary\Build\vcvars32.bat" (
|
||||
call "%VSINSTALL%\VC\Auxiliary\Build\vcvars32.bat"
|
||||
where cl
|
||||
if !ERRORLEVEL! NEQ 0 goto MSMissing
|
||||
goto MSFound
|
||||
)
|
||||
if exist "%VSINSTALL%\VC\vcvarsall.bat" (
|
||||
call "%VSINSTALL%\VC\vcvarsall.bat" x86
|
||||
where cl
|
||||
if !ERRORLEVEL! NEQ 0 goto MSMissing
|
||||
goto MSFound
|
||||
)
|
||||
if exist "%VSINSTALL%\VC\bin\vcvars32.bat" (
|
||||
call "%VSINSTALL%\VC\bin\vcvars32.bat"
|
||||
where cl
|
||||
if !ERRORLEVEL! NEQ 0 goto MSMissing
|
||||
goto MSFound
|
||||
)
|
||||
if exist "%VSINSTALL%\Common7\Tools\vsvars32.bat" (
|
||||
call "%VSINSTALL%\Common7\Tools\vsvars32.bat"
|
||||
where cl
|
||||
if !ERRORLEVEL! NEQ 0 goto MSMissing
|
||||
goto MSFound
|
||||
)
|
||||
)
|
||||
|
||||
:MSMissing
|
||||
echo [INFO] Installation for MSVC Toolchain %TOOLCHAIN% / %OS% seems to be missing
|
||||
exit 1
|
||||
|
||||
:MSFound
|
||||
echo [INFO] Microsoft Visual Studio Toolchain %TOOLCHAIN%
|
||||
echo [INFO] Compiler Version
|
||||
cl
|
||||
|
||||
:Finish
|
||||
echo [INFO] EPICS_HOST_ARCH: %EPICS_HOST_ARCH%
|
||||
echo [INFO] Make version
|
||||
%MAKE% --version
|
||||
echo [INFO] Perl version
|
||||
perl --version
|
||||
|
||||
%MAKE% %MAKEARGS% %*
|
||||
70
ci/appveyor-prepare.bat
Normal file
70
ci/appveyor-prepare.bat
Normal file
@@ -0,0 +1,70 @@
|
||||
:: Build script for AppVeyor (https://ci.appveyor.com/)
|
||||
:: Environment:
|
||||
:: TOOLCHAIN - Toolchain Version [9.0/10.0/11.0/12.0/14.0/cygwin/mingw]
|
||||
:: CONFIGURATION - determines EPICS build [dynamic/static, -debug]
|
||||
:: PLATFORM - "x86" -> use 32bit architecture
|
||||
::
|
||||
:: Prepares an Appveyor build by excuting the following steps
|
||||
:: - Set up configure\CONFIG_SITE for static vs. dynamic build
|
||||
:: - Install Cygwin / Mingw (TOOLCHAIN setting) in the in the appropriate flavor
|
||||
:: - Download and install Make-4.1 from EPICS download page
|
||||
|
||||
Setlocal EnableDelayedExpansion
|
||||
|
||||
set OS=64BIT
|
||||
if "%PLATFORM%"=="x86" set OS=32BIT
|
||||
|
||||
echo [INFO] Platform: %OS%
|
||||
|
||||
if "%TOOLCHAIN%"=="cygwin" (
|
||||
echo.%CONFIGURATION% | findstr /C:"static">nul && (
|
||||
echo SHARED_LIBRARIES=NO>> configure\CONFIG_SITE
|
||||
echo STATIC_BUILD=YES>> configure\CONFIG_SITE
|
||||
echo [INFO] EPICS set up for static build
|
||||
) || (
|
||||
echo [INFO] EPICS set up for dynamic build
|
||||
)
|
||||
echo.%CONFIGURATION% | findstr /C:"debug">nul && (
|
||||
echo HOST_OPT=NO>> configure\CONFIG_SITE
|
||||
echo [INFO] EPICS set up for debug build
|
||||
) || (
|
||||
echo [INFO] EPICS set up for optimized build
|
||||
)
|
||||
if "%OS%"=="64BIT" (
|
||||
echo [INFO] Installing Cygwin 64bit and dependencies
|
||||
@powershell -Command "(new-object net.webclient).DownloadFile('http://www.cygwin.com/setup-x86_64.exe', 'C:\cygwin64\setup-x86_64.exe')"
|
||||
C:\cygwin64\setup-x86_64.exe -q -P "libreadline-devel,libncursesw-devel"
|
||||
) else (
|
||||
echo [INFO] Installing Cygwin 32bit and dependencies
|
||||
@powershell -Command "(new-object net.webclient).DownloadFile('http://www.cygwin.com/setup-x86.exe', 'C:\cygwin\setup-x86.exe')"
|
||||
C:\cygwin\setup-x86.exe -q -P "libreadline-devel,libncursesw-devel"
|
||||
)
|
||||
)
|
||||
|
||||
if "%TOOLCHAIN%"=="mingw" (
|
||||
echo.%CONFIGURATION% | findstr /C:"static">nul && (
|
||||
echo SHARED_LIBRARIES=NO>> configure\CONFIG_SITE
|
||||
echo STATIC_BUILD=YES>> configure\CONFIG_SITE
|
||||
echo [INFO] EPICS set up for static build
|
||||
) || (
|
||||
echo [INFO] EPICS set up for dynamic build
|
||||
)
|
||||
echo.%CONFIGURATION% | findstr /C:"debug">nul && (
|
||||
echo HOST_OPT=NO>> configure\CONFIG_SITE
|
||||
echo [INFO] EPICS set up for debug build
|
||||
) || (
|
||||
echo [INFO] EPICS set up for optimized build
|
||||
)
|
||||
if "%OS%"=="64BIT" (
|
||||
echo [INFO] Installing MinGW 64bit
|
||||
cinst mingw || cinst mingw
|
||||
) else (
|
||||
echo [INFO] Installing MinGW 32bit
|
||||
cinst mingw --x86 || cinst mingw --x86
|
||||
)
|
||||
)
|
||||
|
||||
echo [INFO] Installing Make 4.1
|
||||
curl -fsS --retry 3 -o C:\tools\make-4.1.zip https://epics.anl.gov/download/tools/make-4.1-win64.zip
|
||||
cd \tools
|
||||
"C:\Program Files\7-Zip\7z" e make-4.1.zip
|
||||
@@ -17,7 +17,7 @@ ticker() {
|
||||
|
||||
CACHEKEY=1
|
||||
|
||||
EPICS_HOST_ARCH=`sh startup/EpicsHostArch`
|
||||
EPICS_HOST_ARCH=`perl src/tools/EpicsHostArch.pl`
|
||||
|
||||
[ -e configure/os/CONFIG_SITE.Common.linux-x86 ] || die "Wrong location: $PWD"
|
||||
|
||||
@@ -86,5 +86,5 @@ make -j2 $EXTRA
|
||||
if [ "$TEST" != "NO" ]
|
||||
then
|
||||
make tapfiles
|
||||
find . -name '*.tap' -print0 | xargs -0 -n1 prove -e cat -f
|
||||
make -s test-results
|
||||
fi
|
||||
|
||||
@@ -20,11 +20,15 @@ else
|
||||
endif
|
||||
|
||||
# Provide a default if the user hasn't set EPICS_HOST_ARCH
|
||||
ifeq ($(origin EPICS_HOST_ARCH), undefined)
|
||||
# NB: We use a simply expanded variable here for performance:
|
||||
EPICS_HOST_ARCH := $(shell $(CONFIG)/../startup/EpicsHostArch.pl)
|
||||
endif
|
||||
#
|
||||
ifeq ($(origin EPICS_HOST_ARCH), undefined)
|
||||
# Bootstrapping ...
|
||||
EHA := $(firstword $(wildcard $(EPICS_BASE)/lib/perl/EpicsHostArch.pl \
|
||||
$(TOP)/src/tools/EpicsHostArch.pl))
|
||||
# NB: We use a simply expanded variable here for performance:
|
||||
export EPICS_HOST_ARCH := $(shell perl $(EHA))
|
||||
undefine EHA
|
||||
endif
|
||||
|
||||
-include $(CONFIG)/os/CONFIG_COMPAT
|
||||
|
||||
@@ -75,17 +79,17 @@ ifdef T_A
|
||||
#
|
||||
-include $(CONFIG)/os/CONFIG.$(EPICS_HOST_ARCH).$(T_A)
|
||||
|
||||
# Site specific target and host-target definitions and overrides
|
||||
#
|
||||
-include $(CONFIG)/os/CONFIG_SITE.Common.$(T_A)
|
||||
-include $(CONFIG)/os/CONFIG_SITE.$(EPICS_HOST_ARCH).$(T_A)
|
||||
|
||||
# RELEASE file specific definitions
|
||||
#
|
||||
ifneq ($(CONFIG),$(TOP)/configure)
|
||||
-include $(CONFIG)/CONFIG_APP_INCLUDE
|
||||
endif
|
||||
|
||||
# Site specific target and host-target definitions
|
||||
#
|
||||
-include $(CONFIG)/os/CONFIG_SITE.Common.$(T_A)
|
||||
-include $(CONFIG)/os/CONFIG_SITE.$(EPICS_HOST_ARCH).$(T_A)
|
||||
|
||||
endif # ifdef T_A
|
||||
|
||||
|
||||
|
||||
@@ -17,14 +17,14 @@ BUILD_CLASS = CROSS
|
||||
# ifdef CROSS looks better than ifeq ($(BUILD_CLASS),CROSS)
|
||||
CROSS = YES
|
||||
|
||||
GNU_TARGET_INCLUDE_DIR = $(GNU_TARGET:%= $(GNU_DIR)/%/include)
|
||||
GNU_TARGET_LIB_DIR = $(GNU_TARGET:%= $(GNU_DIR)/%/lib)
|
||||
GNU_TARGET_INCLUDE_DIR = $(wildcard $(GNU_TARGET:%=$(GNU_DIR)/%/include))
|
||||
GNU_TARGET_LIB_DIR = $(wildcard $(GNU_TARGET:%=$(GNU_DIR)/%/lib))
|
||||
|
||||
CROSS_INCLUDES = $(addprefix -I,$(GNU_TARGET_INCLUDE_DIR))
|
||||
CROSS_LDFLAGS = $(addprefix -L,$(GNU_TARGET_LIB_DIR))
|
||||
CROSS_INCLUDES = $(GNU_TARGET_INCLUDE_DIR:%=-I%)
|
||||
CROSS_LDFLAGS = $(GNU_TARGET_LIB_DIR:%=-L%)
|
||||
|
||||
CMPLR_PREFIX_CROSS=$(addsuffix -,$(GNU_TARGET))
|
||||
CMPLR_PREFIX=$(CMPLR_PREFIX_$(BUILD_CLASS))
|
||||
CMPLR_PREFIX_CROSS = $(addsuffix -,$(GNU_TARGET))
|
||||
CMPLR_PREFIX = $(CMPLR_PREFIX_$(BUILD_CLASS))
|
||||
|
||||
# Cross builds usually use the gnu compiler
|
||||
include $(CONFIG)/CONFIG.gnuCommon
|
||||
|
||||
@@ -66,6 +66,7 @@ DBTOMENUH = $(call PATH_FILTER, $(TOOLS)/dbToMenuH$(HOSTEXE))
|
||||
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
|
||||
|
||||
#-------------------------------------------------------
|
||||
# tools for installing libraries and products
|
||||
|
||||
@@ -28,19 +28,10 @@ EPICS_MODIFICATION = 12
|
||||
|
||||
# EPICS_PATCH_LEVEL must be a number (win32 resource file requirement)
|
||||
# Not included if zero
|
||||
EPICS_PATCH_LEVEL = 6
|
||||
EPICS_PATCH_LEVEL = 8
|
||||
|
||||
# This will end in -DEV between official releases
|
||||
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-DEV
|
||||
#EPICS_DEV_SNAPSHOT=-rc2
|
||||
#EPICS_DEV_SNAPSHOT=-rc2-DEV
|
||||
#EPICS_DEV_SNAPSHOT=
|
||||
EPICS_DEV_SNAPSHOT=
|
||||
|
||||
# No changes should be needed below here
|
||||
|
||||
|
||||
@@ -121,11 +121,10 @@ CROSS_COMPILER_TARGET_ARCHS=
|
||||
#
|
||||
CROSS_COMPILER_HOST_ARCHS=
|
||||
|
||||
# The 'make runtests' and 'make tapfiles' build targets normally only run
|
||||
# The 'runtests', 'tapfiles' and 'junitfiles' make targets normally only run
|
||||
# self-tests for the EPICS_HOST_ARCH architecture. If the host can execute
|
||||
# the self-test programs for any other cross-built architectures such as
|
||||
# a -debug architecture, those architectures can be named here.
|
||||
#
|
||||
# a -debug architecture, those architectures must be named in this variable:
|
||||
CROSS_COMPILER_RUNTEST_ARCHS=
|
||||
|
||||
# Build shared libraries?
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#
|
||||
# CONFIG_SITE_ENV - EPICS Environment Parameter Site configuration file
|
||||
#
|
||||
# This file is read by the script base/src/libCom/env/bldEnvdata.pl
|
||||
# This file is read by the script base/src/libCom/env/bldEnvData.pl
|
||||
# Variable definitions must take the form
|
||||
# VAR = VALUE
|
||||
# or
|
||||
@@ -26,31 +26,42 @@
|
||||
|
||||
# Time service:
|
||||
# EPICS_TIMEZONE
|
||||
# local timezone info for vxWorks and RTEMS IOCs. The format is
|
||||
# <name>::<minutesWest>:<start daylight>:<end daylight>
|
||||
# where the start and end are mmddhh - that is month,day,hour
|
||||
# e.g. for ANL in 2016: EPICS_TIMEZONE=CUS::360:031302:110602
|
||||
# Local timezone info for vxWorks and RTEMS. The format is
|
||||
# <name>::<minutesWest>:<startDST>:<endDST>
|
||||
# where <name> is only used by strftime() for %Z conversions,
|
||||
# and <startDST> and <endDST> are mmddhh - that is month,day,hour
|
||||
# e.g. for ANL in 2018: EPICS_TIMEZONE=CUS::360:031102:110402
|
||||
# The future dates below assume the rules don't get changed;
|
||||
# see http://www.timeanddate.com/time/dst/2018.html to check.
|
||||
#
|
||||
# DST for 2016 US: Mar 13 - Nov 06
|
||||
# EU: Mar 27 - Oct 30
|
||||
# DST for 2017 US: Mar 12 - Nov 05
|
||||
# EU: Mar 26 - Oct 29
|
||||
# DST for 2018 US: Mar 11 - Nov 04
|
||||
# EU: Mar 25 - Oct 28
|
||||
EPICS_TIMEZONE = CUS::360:031102:110402
|
||||
#EPICS_TIMEZONE = MET::-60:032502:102803
|
||||
#
|
||||
# DST for 2019 US: Mar 10 - Nov 03
|
||||
# EU: Mar 31 - Oct 27
|
||||
#EPICS_TIMEZONE = CUS::360:031002:110302
|
||||
#EPICS_TIMEZONE = MET::-60:033102:102703
|
||||
#
|
||||
# DST for 2020 US: Mar 08 - Nov 01
|
||||
# EU: Mar 29 - Oct 25
|
||||
#EPICS_TIMEZONE = CUS::360:030802:110102
|
||||
#EPICS_TIMEZONE = MET::-60:032902:102503
|
||||
#
|
||||
# DST for 2021 US: Mar 14 - Nov 07
|
||||
# EU: Mar 28 - Oct 31
|
||||
# (see: http://www.timeanddate.com/time/dst/2016.html etc. )
|
||||
#EPICS_TIMEZONE = CUS::360:031402:110702
|
||||
#EPICS_TIMEZONE = MET::-60:032802:103103
|
||||
#
|
||||
# These values are for 2016:
|
||||
EPICS_TIMEZONE=CUS::360:031302:110602
|
||||
#EPICS_TIMEZONE=MET::-60:032702:103002
|
||||
# DST for 2022 US: Mar 13 - Nov 06
|
||||
# EU: Mar 27 - Oct 30
|
||||
#EPICS_TIMEZONE = CUS::360:031302:110602
|
||||
#EPICS_TIMEZONE = MET::-60:032702:103003
|
||||
|
||||
# EPICS_TS_NTP_INET
|
||||
# NTP time server ip address. Uses boot host if not set.
|
||||
# NTP time server ip address for VxWorks and RTEMS.
|
||||
# IOC will use its boot host if this is not set.
|
||||
EPICS_TS_NTP_INET=
|
||||
|
||||
# IOC Shell:
|
||||
|
||||
@@ -134,7 +134,7 @@ ACTIONS += build
|
||||
ACTIONS += install
|
||||
ACTIONS += buildInstall
|
||||
ACTIONS += browse
|
||||
ACTIONS += runtests tapfiles
|
||||
ACTIONS += runtests tapfiles clean-tests test-results junitfiles
|
||||
|
||||
actionArchTargets = $(foreach x, $(ACTIONS),\ $(foreach arch,$(BUILD_ARCHS), $(x)$(DIVIDER)$(arch)))
|
||||
|
||||
@@ -150,6 +150,7 @@ buildInstall : build
|
||||
rebuild: clean install
|
||||
|
||||
.PHONY: all inc build install clean rebuild buildInstall
|
||||
.PHONY: runtests tapfiles clean-tests test-results junitfiles
|
||||
|
||||
$(actionArchTargets) $(BUILD_ARCHS):install
|
||||
$(cleanArchTargets):clean
|
||||
@@ -300,6 +301,20 @@ $(foreach file, $(DBD_INSTALLS), $(eval $(call DBD_INSTALLS_template, $(file))))
|
||||
|
||||
.PRECIOUS: $(COMMON_DBDS) $(COMMON_DIR)/%Include.dbd
|
||||
|
||||
##################################################### HTML files
|
||||
|
||||
$(COMMON_DIR)/%.html: %.pm $(TOOLS)/podToHtml.pl
|
||||
@$(RM) $(notdir $@)
|
||||
$(PERL) $(TOOLS)/podToHtml.pl -o $(notdir $@) $<
|
||||
@$(MV) $(notdir $@) $@
|
||||
|
||||
$(COMMON_DIR)/%.html: ../%.pm $(TOOLS)/podToHtml.pl
|
||||
@$(RM) $(notdir $@)
|
||||
$(PERL) $(TOOLS)/podToHtml.pl -o $(notdir $@) $<
|
||||
@$(MV) $(notdir $@) $@
|
||||
|
||||
.PRECIOUS: $(COMMON_DIR)/%.html %.html
|
||||
|
||||
##################################################### DB files
|
||||
|
||||
$(COMMON_DIR)/%.db$(RAW): $(COMMON_DIR)/%.edf
|
||||
|
||||
@@ -14,7 +14,7 @@ ACTIONS += build
|
||||
ACTIONS += install
|
||||
ACTIONS += buildInstall
|
||||
ACTIONS += browse
|
||||
ACTIONS += runtests tapfiles
|
||||
ACTIONS += runtests tapfiles clean-tests test-results junitfiles
|
||||
#ACTIONS += rebuild
|
||||
|
||||
actionArchTargets = $(foreach action, $(ACTIONS), \
|
||||
|
||||
@@ -101,6 +101,7 @@ endif
|
||||
ifneq (,$(findstring $(T_A),$(EPICS_HOST_ARCH) $(CROSS_COMPILER_RUNTEST_ARCHS)))
|
||||
RUNTESTS_ENABLED = YES
|
||||
TAPFILES += $(TESTSCRIPTS:.t=.tap)
|
||||
JUNITFILES += $(TAPFILES:.tap=.xml)
|
||||
endif
|
||||
|
||||
#---------------------------------------------------------------
|
||||
@@ -148,7 +149,7 @@ clean::
|
||||
$(INC) $(TARGETS) $(DLL_LINK_LIBNAME) $(TDS) \
|
||||
*.out MakefileInclude $(LOADABLE_SHRLIBNAME) *.manifest *.exp \
|
||||
$(COMMON_INC) $(HDEPENDS_FILES) $(PRODTARGETS) \
|
||||
$(TESTSCRIPTS) $(TAPFILES)
|
||||
$(TESTSCRIPTS) $(TAPFILES) $(JUNITFILES)
|
||||
ifdef RES
|
||||
@$(RM) *$(RES)
|
||||
endif
|
||||
@@ -353,7 +354,23 @@ testspec: $(TESTSCRIPTS)
|
||||
$(if $^, @echo Tests: $^ >> $@)
|
||||
$(if $(TESTSPEC_$(OS_CLASS)), @echo "Harness: $(TESTSPEC_$(OS_CLASS))" >> $@)
|
||||
|
||||
test-results: tapfiles
|
||||
ifneq ($(TAPFILES),)
|
||||
ifdef RUNTESTS_ENABLED
|
||||
prove --failures --ext .tap --exec cat --color $(TAPFILES)
|
||||
endif
|
||||
endif
|
||||
|
||||
clean-tests:
|
||||
ifneq ($(TAPFILES),)
|
||||
$(RM) $(TAPFILES)
|
||||
endif
|
||||
ifneq ($(JUNITFILES),)
|
||||
$(RM) $(JUNITFILES)
|
||||
endif
|
||||
|
||||
tapfiles: $(TESTSCRIPTS) $(TAPFILES)
|
||||
junitfiles: $(JUNITFILES)
|
||||
|
||||
# A .tap file is the output from running the associated test script
|
||||
%.tap: %.t
|
||||
@@ -361,6 +378,9 @@ ifdef RUNTESTS_ENABLED
|
||||
-$(PERL) $< -tap > $@
|
||||
endif
|
||||
|
||||
%.xml: %.tap
|
||||
$(TAPTOJUNIT) --puretap --output $@ --input $< $*
|
||||
|
||||
# If there's a perl test script (.plt) available, use it
|
||||
%.t: ../%.plt
|
||||
@$(RM) $@
|
||||
@@ -480,6 +500,10 @@ $(INSTALL_HTML)/$(HTMLS_DIR)/%: ../%
|
||||
$(ECHO) "Installing html $@"
|
||||
@$(INSTALL) -d -m $(INSTALL_PERMISSIONS) $< $(@D)
|
||||
|
||||
$(INSTALL_HTML)/$(HTMLS_DIR)/%: $(COMMON_DIR)/%
|
||||
$(ECHO) "Installing generated html $@"
|
||||
@$(INSTALL) -d -m $(INSTALL_PERMISSIONS) $< $(@D)
|
||||
|
||||
$(INSTALL_TEMPLATES_SUBDIR)/%: ../%
|
||||
$(ECHO) "Installing $@"
|
||||
@$(INSTALL) -d -m $(INSTALL_PERMISSIONS) $< $(@D)
|
||||
@@ -494,7 +518,8 @@ $(INSTALL_TEMPLATES_SUBDIR)/%: %
|
||||
.PRECIOUS: $(COMMON_INC)
|
||||
|
||||
.PHONY: all inc build install clean rebuild buildInstall
|
||||
.PHONY: runtests checkRelease warnRelease noCheckRelease
|
||||
.PHONY: runtests tapfiles clean-tests test-results junitfiles
|
||||
.PHONY: checkRelease warnRelease noCheckRelease
|
||||
|
||||
endif # BASE_RULES_BUILD
|
||||
# EOF RULES_BUILD
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
ARCHS += $(BUILD_ARCHS)
|
||||
ACTIONS += inc build install buildInstall clean realclean archclean
|
||||
ACTIONS += runtests tapfiles
|
||||
ACTIONS += runtests tapfiles clean-tests test-results junitfiles
|
||||
|
||||
dirActionArchTargets = $(foreach dir, $(DIRS), \
|
||||
$(foreach action, $(ACTIONS), \
|
||||
|
||||
@@ -58,6 +58,7 @@ help:
|
||||
@echo " Cannot be used within an O.<arch> dir"
|
||||
@echo " rebuild - Same as clean install"
|
||||
@echo " archclean - Removes O.<arch> dirs but not O.Common dir"
|
||||
@echo " runtests - Run self-tests, summarize results"
|
||||
@echo "\"Partial\" build targets supported by Makefiles:"
|
||||
@echo " inc$(DIVIDER)<arch> - Installs <arch> only header files."
|
||||
@echo " build$(DIVIDER)<arch> - Builds and installs <arch> only."
|
||||
|
||||
@@ -15,5 +15,14 @@ ARCH_CLASS = xscale
|
||||
ifeq ($(BUILD_CLASS),CROSS)
|
||||
VALID_BUILDS = Ioc
|
||||
GNU_TARGET = xscale_be
|
||||
CMPLR_PREFIX = $(addsuffix -,$(GNU_TARGET))
|
||||
CMPLR_PREFIX = $(GNU_TARGET:%=%-)
|
||||
|
||||
# Configure for readline if requested
|
||||
OP_SYS_INCLUDES += $(READLINE_DIR:%=-I%/include)
|
||||
READLINE_LDFLAGS = $(READLINE_DIR:%=-L%/lib)
|
||||
RUNTIME_LDFLAGS_READLINE_YES_NO = $(READLINE_DIR:%=-Wl,-rpath,%/lib)
|
||||
RUNTIME_LDFLAGS += \
|
||||
$(RUNTIME_LDFLAGS_READLINE_$(LINKER_USE_RPATH)_$(STATIC_BUILD))
|
||||
SHRLIBDIR_LDFLAGS += $(READLINE_LDFLAGS)
|
||||
PRODDIR_LDFLAGS += $(READLINE_LDFLAGS)
|
||||
endif
|
||||
|
||||
@@ -21,13 +21,15 @@ STATIC_LDFLAGS_YES= -Wl,-Bstatic
|
||||
STATIC_LDFLAGS_NO=
|
||||
STATIC_LDLIBS_YES= -Wl,-Bdynamic
|
||||
|
||||
# Set runtime path for shared libraries
|
||||
SHRLIBDIR_RPATH_LDFLAGS_YES += $(SHRLIB_DEPLIB_DIRS:%=-Wl,-rpath,%)
|
||||
SHRLIBDIR_LDFLAGS += $(SHRLIBDIR_RPATH_LDFLAGS_$(LINKER_USE_RPATH))
|
||||
# Set runtime path for shared libraries if USE_RPATH=YES and STATIC_BUILD=NO
|
||||
SHRLIBDIR_RPATH_LDFLAGS_YES_NO = $(SHRLIB_DEPLIB_DIRS:%=-Wl,-rpath,%)
|
||||
SHRLIBDIR_LDFLAGS += \
|
||||
$(SHRLIBDIR_RPATH_LDFLAGS_$(LINKER_USE_RPATH)_$(STATIC_BUILD))
|
||||
|
||||
# Set runtime path for products
|
||||
PRODDIR_RPATH_LDFLAGS_YES += $(PROD_DEPLIB_DIRS:%=-Wl,-rpath,%)
|
||||
PRODDIR_LDFLAGS += $(PRODDIR_RPATH_LDFLAGS_$(LINKER_USE_RPATH))
|
||||
# Set runtime path for products if USE_RPATH=YES and STATIC_BUILD=NO
|
||||
PRODDIR_RPATH_LDFLAGS_YES_NO = $(PROD_DEPLIB_DIRS:%=-Wl,-rpath,%)
|
||||
PRODDIR_LDFLAGS += \
|
||||
$(PRODDIR_RPATH_LDFLAGS_$(LINKER_USE_RPATH)_$(STATIC_BUILD))
|
||||
|
||||
# Link libraries controlled by COMMANDLINE_LIBRARY
|
||||
# The newest Linux versions only need readline, older ones need both
|
||||
|
||||
@@ -122,20 +122,10 @@ GNU_DIR_6 = $(WIND_BASE)/gnu/$(VX_GNU_VERSION)-vxworks-$(VXWORKS_VERSION)/$(WIND
|
||||
GNU_DIR = $(GNU_DIR_$(VXWORKS_MAJOR_VERSION))
|
||||
|
||||
#--------------------------------------------------
|
||||
# Wind River moved nm out of GNU_BIN in some versions
|
||||
# This finds nm on any supported VxWorks version
|
||||
|
||||
WORKBENCH_BIN = $(WIND_BASE)/workbench-$(WORKBENCH_VERSION)/$(WIND_HOST_TYPE)/bin
|
||||
UTILITIES_BIN = $(WIND_BASE)/utilities-$(UTILITIES_VERSION)/$(WIND_HOST_TYPE)/bin
|
||||
|
||||
NM_DIR_6.4 = $(WORKBENCH_BIN)
|
||||
NM_DIR_6.5 = $(WORKBENCH_BIN)
|
||||
NM_DIR_6.6 = $(WORKBENCH_BIN)
|
||||
NM_DIR_6.7 = $(GNU_BIN)
|
||||
NM_DIR_6.8 = $(UTILITIES_BIN)
|
||||
NM_DIR_6.9 = $(UTILITIES_BIN)
|
||||
NM_DIR = $(firstword $(NM_DIR_$(VXWORKS_VERSION)) $(GNU_BIN))
|
||||
|
||||
NM = $(NM_DIR)/$(CMPLR_PREFIX)nm$(CMPLR_SUFFIX)$(HOSTEXE)
|
||||
NMPROG = $(CMPLR_PREFIX)nm$(CMPLR_SUFFIX)$(HOSTEXE)
|
||||
NM = $(firstword $(wildcard $(WIND_BASE)/*/$(WIND_HOST_TYPE)/bin/$(NMPROG)))
|
||||
|
||||
#--------------------------------------------------
|
||||
# A linker script is essential for munching from vxWorks 6.6 onwards
|
||||
@@ -146,14 +136,10 @@ MUNCH_LDFLAGS_6 = -T $(VX_DIR)/target/h/tool/gnu/ldscripts/link.OUT
|
||||
MUNCH_LDFLAGS = $(MUNCH_LDFLAGS_$(VXWORKS_MAJOR_VERSION))
|
||||
|
||||
#--------------------------------------------------
|
||||
# The follow 2 exports prevent gnu cross-compiler
|
||||
# from finding wrong assembler (as).
|
||||
# These are required by some of the Wind River tools
|
||||
export WIND_BASE
|
||||
export WIND_HOME = $(WIND_BASE)
|
||||
export WIND_HOST_TYPE
|
||||
|
||||
#--------------------------------------------------
|
||||
# Tornado2.2
|
||||
# The follow export allows vxWorks.h to include gnu header files
|
||||
export TOOL_FAMILY = GNU
|
||||
|
||||
#--------------------------------------------------
|
||||
@@ -196,6 +182,8 @@ OSITHREAD_USE_DEFAULT_STACK = NO
|
||||
|
||||
#--------------------------------------------------
|
||||
# Link definitions
|
||||
CROSS_LDFLAGS =
|
||||
#
|
||||
LINK.cpp = $(LD) -o $@ $(STATIC_LDFLAGS) $(PRODDIR_LDFLAGS) $(LDFLAGS)
|
||||
LINK.cpp += $(PROD_LDFLAGS) $(PROD_LD_OBJS) $(PROD_LD_RESS) $(PROD_LDLIBS)
|
||||
|
||||
|
||||
@@ -11,19 +11,14 @@ GNU_TARGET = arm-linux
|
||||
CMPLR_SUFFIX =
|
||||
CMPLR_PREFIX = $(addsuffix -,$(GNU_TARGET))
|
||||
|
||||
# Provide a link-time path for shared libraries
|
||||
SHRLIBDIR_RPATH_LDFLAGS_YES += $(SHRLIB_DEPLIB_DIRS:%=-Wl,-rpath-link,%)
|
||||
SHRLIBDIR_LDFLAGS += $(SHRLIBDIR_RPATH_LDFLAGS_$(LINKER_USE_RPATH))
|
||||
|
||||
# Provide a link-time path for products
|
||||
PRODDIR_RPATH_LDFLAGS_YES += $(PROD_DEPLIB_DIRS:%=-Wl,-rpath-link,%)
|
||||
PRODDIR_LDFLAGS += $(PRODDIR_RPATH_LDFLAGS_$(LINKER_USE_RPATH))
|
||||
|
||||
# Provide a link-time path for readline
|
||||
RUNTIME_LDFLAGS_READLINE_YES = -Wl,-rpath-link,$(GNU_DIR)/lib
|
||||
RUNTIME_LDFLAGS_READLINE = $(RUNTIME_LDFLAGS_READLINE_$(LINKER_USE_RPATH))
|
||||
RUNTIME_LDFLAGS_READLINE_CURSES = $(RUNTIME_LDFLAGS_READLINE_$(LINKER_USE_RPATH))
|
||||
RUNTIME_LDFLAGS_READLINE_NCURSES = $(RUNTIME_LDFLAGS_READLINE_$(LINKER_USE_RPATH))
|
||||
# Provide a link-time path for readline if needed
|
||||
OP_SYS_INCLUDES += $(READLINE_DIR:%=-I%/include)
|
||||
READLINE_LDFLAGS = $(READLINE_DIR:%=-L%/lib)
|
||||
RUNTIME_LDFLAGS_READLINE_YES_NO = $(READLINE_DIR:%=-Wl,-rpath,%/lib)
|
||||
RUNTIME_LDFLAGS += \
|
||||
$(RUNTIME_LDFLAGS_READLINE_$(LINKER_USE_RPATH)_$(STATIC_BUILD))
|
||||
SHRLIBDIR_LDFLAGS += $(READLINE_LDFLAGS)
|
||||
PRODDIR_LDFLAGS += $(READLINE_LDFLAGS)
|
||||
|
||||
# Library flags
|
||||
STATIC_LDFLAGS_YES= -Wl,-Bstatic
|
||||
|
||||
@@ -85,16 +85,20 @@ CPP = cl -nologo -C -E
|
||||
|
||||
# Configure OS vendor C++ compiler
|
||||
#
|
||||
# __STDC__=0 gives us both:
|
||||
# 1) define STDC for code (pretend ANSI conformance)
|
||||
# 2) set it to 0 to use MS C "extensions" (open for _open etc.)
|
||||
# because MS uses: if __STDC__ ... disable many nice things
|
||||
#
|
||||
# -EHsc - generate code for exceptions
|
||||
# -GR - generate code for run time type identification
|
||||
#
|
||||
CCC = cl -EHsc -GR
|
||||
CODE_CPPFLAGS += -nologo -D__STDC__=0
|
||||
|
||||
# Other compiler flags, used for CPP, C and C++
|
||||
#
|
||||
# -FC - Show absolute path of source file in diagnostics
|
||||
# -D__STDC__=0 gives us both:
|
||||
# 1) define STDC for code (pretend ANSI conformance)
|
||||
# 2) set it to 0 to use MS C "extensions" (open for _open etc.)
|
||||
# because MS uses: if __STDC__ ... disable many nice things
|
||||
#
|
||||
CODE_CPPFLAGS += -nologo -FC -D__STDC__=0
|
||||
CODE_CPPFLAGS += -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE
|
||||
|
||||
|
||||
@@ -142,6 +146,17 @@ STATIC_LDLIBS_NO=
|
||||
STATIC_LDFLAGS=
|
||||
RANLIB=
|
||||
|
||||
#
|
||||
# option needed for parallel builds with Visual Studio 2015 onward
|
||||
#
|
||||
# -FS Force Synchronous PDB Writes
|
||||
ifneq ($(VisualStudioVersion),)
|
||||
OPT_CXXFLAGS_NO += -FS
|
||||
OPT_CFLAGS_NO += -FS
|
||||
endif
|
||||
|
||||
|
||||
#
|
||||
# add -profile here to run the ms profiler
|
||||
# -LTCG whole program optimization
|
||||
# -incremental:no full linking
|
||||
|
||||
@@ -1,10 +1,4 @@
|
||||
# CONFIG_SITE.Common.linux-xscale_be
|
||||
#
|
||||
# Site specific definitions for linux-xscale_be target builds.
|
||||
# Site specific definitions for all linux-xscale_be target builds.
|
||||
#-------------------------------------------------------
|
||||
|
||||
# Set GNU_DIR to point to directory containing the tool-chain
|
||||
|
||||
# APS:
|
||||
GNU_DIR = /usr/local/vw/xscale_be
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
# Note: vxWorks 5.3 (Tornado 1.x) is not supported
|
||||
|
||||
#VXWORKS_VERSION = 5.4
|
||||
VXWORKS_VERSION = 5.5
|
||||
#VXWORKS_VERSION = 5.5
|
||||
#VXWORKS_VERSION = 6.0
|
||||
#VXWORKS_VERSION = 6.1
|
||||
#VXWORKS_VERSION = 6.2
|
||||
@@ -20,7 +20,7 @@ VXWORKS_VERSION = 5.5
|
||||
#VXWORKS_VERSION = 6.6
|
||||
#VXWORKS_VERSION = 6.7
|
||||
#VXWORKS_VERSION = 6.8
|
||||
#VXWORKS_VERSION = 6.9
|
||||
VXWORKS_VERSION = 6.9
|
||||
|
||||
|
||||
# Sites may override the following path for a particular host
|
||||
@@ -31,19 +31,6 @@ VXWORKS_VERSION = 5.5
|
||||
# Under vxWorks 6.x this is *not* the same as the old VX_DIR setting
|
||||
|
||||
#WIND_BASE = /usr/local/vw/tornado202p1
|
||||
WIND_BASE = /usr/local/vw/tornado22-$(ARCH_CLASS)
|
||||
#WIND_BASE = /usr/local/vw/vxWorks-$(VXWORKS_VERSION)
|
||||
#WIND_BASE = /usr/local/vw/tornado22-$(ARCH_CLASS)
|
||||
WIND_BASE = /usr/local/vw/vxWorks-$(VXWORKS_VERSION)
|
||||
#WIND_BASE = /ade/vxWorks/$(VXWORKS_VERSION)
|
||||
|
||||
|
||||
# WorkBench Version number, required for vxWorks 6.x
|
||||
|
||||
#WORKBENCH_VERSION = 2.6
|
||||
#WORKBENCH_VERSION = 3.0
|
||||
#WORKBENCH_VERSION = 3.2
|
||||
#WORKBENCH_VERSION = 3.3
|
||||
|
||||
|
||||
# Utilities Version number, required from vxWorks 6.8 and later
|
||||
|
||||
#UTILITIES_VERSION = 1.0
|
||||
|
||||
@@ -7,8 +7,25 @@
|
||||
GNU_TARGET = arm-xilinx-linux-gnueabi
|
||||
|
||||
# Set GNU tools install path
|
||||
# This is the install path at APS:
|
||||
# Examples are installations at the APS:
|
||||
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
|
||||
|
||||
# If cross-building shared libraries and the paths on the target machine are
|
||||
# different than on the build host, you should uncomment the lines below to
|
||||
# disable putting runtime library paths in products and shared libraries.
|
||||
# You will also need to provide another way for programs to find their shared
|
||||
# libraries at runtime, such as by setting LD_LIBRARY_PATH or by using
|
||||
# mechanisms related to /etc/ld.so.conf
|
||||
#SHRLIBDIR_RPATH_LDFLAGS_YES_NO =
|
||||
#PRODDIR_RPATH_LDFLAGS_YES_NO =
|
||||
# Note: It may be simpler to just set STATIC_BUILD=YES here and not
|
||||
# try to use shared libraries at all in these circumstances.
|
||||
|
||||
# To use libreadline, point this to its install prefix
|
||||
#READLINE_DIR = $(GNU_DIR)
|
||||
#READLINE_DIR = /tools/cross/linux-x86.linux-arm/readline
|
||||
# See CONFIG_SITE.Common.linux-arm for other COMMANDLINE_LIBRARY values
|
||||
#COMMANDLINE_LIBRARY = READLINE
|
||||
|
||||
# With a Xilinx SDK, it'll be something like
|
||||
#GNU_DIR = /usr/local/zynq/Xilinx/SDK/2015.4/gnu/arm/lin
|
||||
|
||||
11
configure/os/CONFIG_SITE.linux-x86.linux-xscale_be
Normal file
11
configure/os/CONFIG_SITE.linux-x86.linux-xscale_be
Normal file
@@ -0,0 +1,11 @@
|
||||
# CONFIG_SITE.linux-x86.linux-xscale_be
|
||||
#
|
||||
# Site specific definitions for linux-x86 host - linux-xscale_be targets
|
||||
#-------------------------------------------------------
|
||||
|
||||
# Set GNU_DIR to point to directory containing the tool-chain
|
||||
GNU_DIR = /usr/local/vw/xscale_be
|
||||
|
||||
# If readline is available, configure it
|
||||
READLINE_DIR = $(GNU_DIR)/target/usr
|
||||
COMMANDLINE_LIBRARY = READLINE
|
||||
7
configure/os/CONFIG_SITE.linux-x86_64.linux-xscale_be
Normal file
7
configure/os/CONFIG_SITE.linux-x86_64.linux-xscale_be
Normal file
@@ -0,0 +1,7 @@
|
||||
# CONFIG_SITE.linux-x86_64.linux-xscale_be
|
||||
#
|
||||
# Site specific settings for linux-x86_64 host - linux-xscale_be target
|
||||
#-------------------------------------------------------
|
||||
|
||||
# Inherit setting from linux-x86
|
||||
include $(CONFIG)/os/CONFIG_SITE.linux-x86.linux-xscale_be
|
||||
@@ -4,27 +4,16 @@
|
||||
<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 R3.14.12.1</title>
|
||||
<title>Known Problems in R3.14.12.8</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h1 style="text-align: center">EPICS Base R3.14.12.1: Known Problems</h1>
|
||||
<h1 style="text-align: center">EPICS Base R3.14.12.8: Known Problems</h1>
|
||||
|
||||
<p>Any patch files linked below should be applied at the root of the
|
||||
base-3.14.12.1 tree. Download them, then use the GNU Patch program as
|
||||
follows:</p>
|
||||
|
||||
<blockquote><pre>% <b>cd <i>/path/to/</i>base-3.14.12.1</b>
|
||||
% <b>patch -p0 < <i>/path/to/</i>file.patch</b></pre></blockquote>
|
||||
|
||||
<p>The following significant problems have been reported with this
|
||||
version of EPICS Base:</p>
|
||||
|
||||
<ul>
|
||||
|
||||
<li>None yet.</li>
|
||||
|
||||
</ul>
|
||||
<p>This was the last release in the Base-3.14 series, so we are no longer
|
||||
tracking bugs in this branch. Please upgrade to one of the newer releases which
|
||||
have incorporated many bug fixes and new features since they branched off the
|
||||
Base-3.14 release series.</p>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -221,14 +221,11 @@
|
||||
|
||||
base/startup directory - contains scripts to set environment and path
|
||||
|
||||
EpicsHostArch C shell script to set EPICS_HOST_ARCH env variable
|
||||
EpicsHostArch.pl Perl script to set EPICS_HOST_ARCH env variable
|
||||
Site.profile bourne shell script to set path and env variables
|
||||
Site.cshrc c shell script to set path and env variables
|
||||
borland.bat WIN32 bat file to set borland path and env variables
|
||||
cygwin.bat WIN32 bat file to set cygwin path and env variables
|
||||
win32.bat WIN32 bat file to set path and env variables
|
||||
win32-debug.bat WIN32 debug bat file to set debug path and env variables
|
||||
EpicsHostArch Shell script to set EPICS_HOST_ARCH env variable
|
||||
unix.csh C shell script to set path and env variables
|
||||
unix.sh Bourne shell script to set path and env variables
|
||||
win32.bat Bat file example to configure win32-x86 target
|
||||
windows.bat Bat file example to configure windows-x64 target
|
||||
|
||||
base/configure directory - contains build definitions and rules
|
||||
|
||||
@@ -436,6 +433,6 @@
|
||||
|
||||
References
|
||||
|
||||
1. http://www.aps.anl.gov/epics/base/tornado.php
|
||||
2. http://www.aps.anl.gov/epics/base/vxWorks6.php
|
||||
3. http://www.aps.anl.gov/epics/
|
||||
1. https://epics.anl.gov/base/tornado.php
|
||||
2. https://epics.anl.gov/base/vxWorks6.php
|
||||
3. https://epics.anl.gov/
|
||||
|
||||
@@ -21,7 +21,7 @@ of my Bash login script (~/.bash_login):
|
||||
#
|
||||
EPICS_BASE="${HOME}/src/EPICS/base"
|
||||
EPICS_EXTENSIONS="${HOME}/src/EPICS/extensions"
|
||||
<strong>.</strong> "${EPICS_BASE}"/startup/Site.profile
|
||||
<strong>.</strong> "${EPICS_BASE}"/startup/unix.sh
|
||||
</pre>
|
||||
</li>
|
||||
<li>
|
||||
|
||||
@@ -96,8 +96,8 @@
|
||||
needed to build for these target systems. The absolute path to and version
|
||||
number of the vxWorks installation is normally specified in the
|
||||
base/configure/os/CONFIG_SITE.Common.vxWorksCommon file. Consult the EPICS web
|
||||
pages about <a href="http://www.aps.anl.gov/epics/base/tornado.php">vxWorks
|
||||
5.x</a> and <a href="http://www.aps.anl.gov/epics/base/vxWorks6.php">vxWorks
|
||||
pages about <a href="https://epics.anl.gov/base/tornado.php">vxWorks
|
||||
5.x</a> and <a href="https://epics.anl.gov/base/vxWorks6.php">vxWorks
|
||||
6.x</a> and the vxWorks documentation for information about configuring your
|
||||
vxWorks operating system for use with EPICS.</P>
|
||||
|
||||
@@ -126,7 +126,7 @@
|
||||
|
||||
<H3><A NAME="0_0_8"> Documentation</A></H3>
|
||||
<BLOCKQUOTE>EPICS documentation is available through the
|
||||
<a href="http://www.aps.anl.gov/epics/">EPICS website</a> at Argonne.
|
||||
<a href="https://epics.anl.gov/">EPICS website</a> at Argonne.
|
||||
<P>Release specific documentation can also be found in the base/documentation
|
||||
directory of the distribution.</BLOCKQUOTE>
|
||||
|
||||
@@ -230,14 +230,11 @@
|
||||
|
||||
<H4>base/startup directory - contains scripts to set environment and path</H4>
|
||||
<PRE>
|
||||
EpicsHostArch C shell script to set EPICS_HOST_ARCH env variable
|
||||
EpicsHostArch.pl Perl script to set EPICS_HOST_ARCH env variable
|
||||
Site.profile bourne shell script to set path and env variables
|
||||
Site.cshrc c shell script to set path and env variables
|
||||
borland.bat WIN32 bat file to set borland path and env variables
|
||||
cygwin.bat WIN32 bat file to set cygwin path and env variables
|
||||
win32.bat WIN32 bat file to set path and env variables
|
||||
win32-debug.bat WIN32 debug bat file to set debug path and env variables
|
||||
EpicsHostArch Shell script to set EPICS_HOST_ARCH env variable
|
||||
unix.csh C shell script to set path and env variables
|
||||
unix.sh Bourne shell script to set path and env variables
|
||||
win32.bat Bat file example to configure win32-x86 target
|
||||
windows.bat Bat file example to configure windows-x64 target
|
||||
</PRE>
|
||||
|
||||
<H4>base/configure directory - contains build definitions and rules</H4>
|
||||
|
||||
@@ -3,15 +3,177 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
|
||||
<title>EPICS Base R3.14.12.7 Release Notes</title>
|
||||
<title>EPICS Base R3.14.12.8 Release Notes</title>
|
||||
</head>
|
||||
|
||||
<body lang="en">
|
||||
<h1 align="center">EPICS Base Release 3.14.12.7</h1>
|
||||
<h1 align="center">EPICS Base Release 3.14.12.8</h1>
|
||||
|
||||
<p>This is the final release in the Base-3.14 series, please upgrade to the
|
||||
Base-3.15 series or to EPICS 7.</p>
|
||||
|
||||
<h2 align="center">Changes between 3.14.12.7 and 3.14.12.8</h2>
|
||||
|
||||
<!-- Insert new items immediately below here ... -->
|
||||
|
||||
<h3>Fix broken <tt>EPICS_IOC_LOG_FILE_LIMIT=0</tt> setting</h3>
|
||||
|
||||
<p>The Application Developers' Guide says this is allowed and disables the
|
||||
limit on the log-file, but it hasn't actually worked for some time (if ever).
|
||||
Note that the iocLogServer will be removed from newer Base release sometime
|
||||
soon as its functionality can be implemented by other dedicated log servers
|
||||
such as logstash or syslog-ng.</p>
|
||||
|
||||
<p>Fixes <a href="https://bugs.launchpad.net/bugs/1786858">lp:1786858</a>
|
||||
and part of <a href="https://bugs.launchpad.net/bugs/1786966">lp:1786966</a>.
|
||||
</p>
|
||||
|
||||
<h3>Cleanup of startup directory</h3>
|
||||
|
||||
<p>The files in the startup directory have not been maintained in recent years
|
||||
and have grown crufty (technical term). This release includes the following
|
||||
updates to these files:</p>
|
||||
|
||||
<ul>
|
||||
|
||||
<li>The Perl <tt>EpicsHostArch.pl</tt> script has been rewritten, and support
|
||||
for a few previously missing host architectures has been added to it.</li>
|
||||
|
||||
<li>The <tt>EpicsHostArch.pl</tt> script has also been moved into the standard
|
||||
<tt>src/tools</tt> directory, from where it will be installed into
|
||||
<tt>lib/perl</tt>. In this new location it is no longer executable, so it must
|
||||
be run by the <tt>perl</tt> executable.</li>
|
||||
|
||||
<li>The build system has been adjusted to look for <tt>EpicsHostArch.pl</tt> in
|
||||
both places if the <tt>EPICS_HOST_ARCH</tt> environment variable has not been
|
||||
set at build-time.</li>
|
||||
|
||||
<li>Sites that used the original Perl script to set <tt>EPICS_HOST_ARCH</tt> as
|
||||
part of their standard environment will need to adjust their scripts when they
|
||||
upgrade to this release.</li>
|
||||
|
||||
<li>The <tt>EpicsHostArch</tt> shell script has been replaced with a wrapper
|
||||
routine that calls the Perl <tt>EpicsHostArch.pl</tt> script. Sites that rely on
|
||||
this script to set <tt>EPICS_HOST_ARCH</tt> should consider switching to the
|
||||
Perl script instead.</li>
|
||||
|
||||
<li>The <tt>Site.cshrc</tt> and <tt>Site.profile</tt> files have been renamed to
|
||||
<tt>unix.csh</tt> and <tt>unix.sh</tt>, respectively.</li>
|
||||
|
||||
<li>The existing <tt>win32.bat</tt> file has been cleaned up and a new
|
||||
<tt>windows.bat</tt> file added for 64-bit targets. The contents of these files
|
||||
should be seen as examples, don't uncomment or install parts for software that
|
||||
you don't explicitly know that you need.</li>
|
||||
|
||||
</ul>
|
||||
|
||||
<h3>Recent Apple XCode Build Issues</h3>
|
||||
|
||||
<p>The latest version of XCode will not compile calls to <tt>system()</tt> or
|
||||
<tt>clock_settime()</tt> for iOS targets. There were several places in Base
|
||||
where these were being compiled, although there were probably never called. The
|
||||
code has now been modified to permit iOS builds to complete again.</p>
|
||||
|
||||
<h3>Prevent illegal alarm severities</h3>
|
||||
|
||||
<p>A check has been added to <tt>recGblResetAlarms()</tt> that prevents records
|
||||
from getting an alarm severity higher than INVALID_ALARM. It is still possible
|
||||
for a field like HSV to get set to a value that is not a legal alarm severity,
|
||||
but the core IOC code should never copy such a value into a record's SEVR or
|
||||
ACKS fields. With this fix the record's alarm severity will be limited to
|
||||
INVALID_ALARM.</p>
|
||||
|
||||
<h3>Fixes for Launchpad bugs</h3>
|
||||
|
||||
<p>The following launchpad bugs have fixes included:</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="https://bugs.launchpad.net/epics-base/+bug/1786320">
|
||||
lp: #1786320</a>, dbCa subscribes twice to ENUM</li>
|
||||
<li><a href="https://bugs.launchpad.net/epics-base/+bug/541221">
|
||||
lp: #541221</a>, 'assert (pca->pgetNative)' failed in ../dbCa.c</li>
|
||||
<li><a href="https://bugs.launchpad.net/epics-base/+bug/1747091">
|
||||
lp: #1747091</a>, epicsTimeGetEvent() / generalTime bug</li>
|
||||
<li><a href="https://bugs.launchpad.net/epics-base/+bug/1743076">
|
||||
lp: #1743076</a>, Segfault in ca_attach_context() during exits</li>
|
||||
<li><a href="https://bugs.launchpad.net/epics-base/+bug/1751380">
|
||||
lp: #1751380</a>, Deadlock in ca_clear_subscription()</li>
|
||||
<li><a href="https://bugs.launchpad.net/epics-base/+bug/1597809">
|
||||
lp: #1597809</a>, Setting NAME field in DB file may break IOC</li>
|
||||
<li><a href="https://bugs.launchpad.net/epics-base/+bug/1770292">
|
||||
lp: #1770292</a>, get_alarm_double() inconsistent across record types</li>
|
||||
<li><a href="https://bugs.launchpad.net/epics-base/+bug/1771298">
|
||||
lp: #1771298</a>, Conversion of NaN to integer relies on undefined
|
||||
behavior</li>
|
||||
</ul>
|
||||
|
||||
<h3>Updated VxWorks Timezone settings</h3>
|
||||
|
||||
<p>Removed the settings for 2017; fixed the hour of the change for MET.</p>
|
||||
|
||||
<h3>Back-port podToHtml.pl and Rules from Base-3.15</h3>
|
||||
|
||||
<p>This script permits Base to be built with Perl installations that do not
|
||||
provide the podchecker and pod2html scripts (e.g. Fedora 27).</p>
|
||||
|
||||
<h3>Fixed camonitor server side relative timestamps bug</h3>
|
||||
|
||||
<p>Initialize the first time-stamp from the first monitor, not the client-side
|
||||
current time in this configuration.</p>
|
||||
|
||||
<h3>Build changes for MSVC</h3>
|
||||
|
||||
<p>Windows builds using Visual Studio 2015 and later now use the <tt>-FS</tt>
|
||||
compiler option to allow parallel builds to work properly.</p>
|
||||
|
||||
<p>We now give the <tt>-FC</tt> option to tell the compiler to print absolute
|
||||
paths for source files in diagnostic messages.</p>
|
||||
|
||||
<h2 align="center">Changes between 3.14.12.6 and 3.14.12.7</h2>
|
||||
|
||||
<!-- Insert new items immediately below here ... -->
|
||||
<h3>Extend maximum Posix epicsEventWaitWithTimeout() delay</h3>
|
||||
|
||||
<p>The Posix implementation of epicsEventWaitWithTimeout() was limiting the
|
||||
timeout delay to at most 60 minutes (3600.0 seconds). This has been changed to
|
||||
10 years; significantly longer maximum delays cause problems on systems where
|
||||
<tt>time_t</tt> is still a signed 32-bit integer so cannot represent absolute
|
||||
time-stamps after 2038-01-19. Our assumption is that such 32-bit systems will
|
||||
have been retired before the year 2028, but some additional tests have been
|
||||
added to the epicsTimeTest program to detect and fail if this assumption is
|
||||
violated.</p>
|
||||
|
||||
<h3>New test-related make targets</h3>
|
||||
|
||||
<p>This release adds several new make targets intended for use by developers
|
||||
and Continuous Integration systems which simplify the task of running the
|
||||
built-in self-test programs and viewing the results. Since these targets are
|
||||
intended for limited use they can have requirements for the build host which
|
||||
go beyond the standard minimum set needed to build and run Base.</p>
|
||||
|
||||
<blockquote>
|
||||
|
||||
<h4><tt>test-results</tt> — Summarize test results</h4>
|
||||
|
||||
<p>The new make target <tt>test-results</tt> will run the self-tests if
|
||||
necessary to generate a TAP file for each test, then summarizes the TAP output
|
||||
files in each test directory in turn, displaying the details of any failures.
|
||||
This step uses the program <q>prove</q> which comes with Perl, but also needs
|
||||
<q>cat</q> to be provided in the default search path so will not work on most
|
||||
Windows systems.</p>
|
||||
|
||||
<h4><tt>junitfiles</tt> — Convert test results to JUnit XML Format</h4>
|
||||
|
||||
<p>The new make target <tt>junitfiles</tt> will run the self-tests if necessary
|
||||
and then convert the TAP output files into the more commonly-supported JUnit
|
||||
XML format. The program that performs this conversion needs the Perl module
|
||||
<q><tt>XML::Generator</tt></q> to have been installed.</p>
|
||||
|
||||
<h4><tt>clean-tests</tt> — Delete test result files</h4>
|
||||
|
||||
<p>The new make target <tt>clean-tests</tt> removes any test result files from
|
||||
previous test runs. It cleans both TAP and JUnit XML files.</p>
|
||||
|
||||
</blockquote>
|
||||
|
||||
<h3>Fix DNS related crash on exit</h3>
|
||||
|
||||
|
||||
@@ -1009,7 +1009,7 @@ d:/user/R3.14.clean/epics/base/lib/WIN32-x86/</code></p>
|
||||
<h2><a name="CommandUtils">Command Line Utilities</a></h2>
|
||||
|
||||
<h3><a name="acctst">acctst</a></h3>
|
||||
<pre>acctst <PV name> [progress logging level] [channel duplication count]
|
||||
<pre>acctst <PV name> [progress logging level] [channel duplication count]
|
||||
[test repetition count] [enable preemptive callback]</pre>
|
||||
|
||||
<h4>Description</h4>
|
||||
@@ -2079,7 +2079,7 @@ example, be beneficial when tuning an archiver installation.</p>
|
||||
<p>Significant performance gains can be realized when the CA client library
|
||||
doesn't wait for a response to return from the server after each request. All
|
||||
requests which require interaction with a CA server are accumulated (buffered)
|
||||
and not forwarded to the IOC until one of <code>ca_flush_io()</code>,
|
||||
and not forwarded to the IOC until one of <code>ca_flush_io()</code>,
|
||||
<code>ca_pend_io()</code>, <code>ca_pend_event()</code>, or
|
||||
<code>ca_sg_block()</code> are called allowing several operations to be
|
||||
efficiently sent over the network together. Any process variable values written
|
||||
@@ -2103,16 +2103,16 @@ shouldn't test the success of a CA function call by checking to see if the
|
||||
returned value is zero as is the UNIX convention. Below are several methods to
|
||||
test CA function returns. See <a href="#ca_signal"><code>ca_signal()</code> and
|
||||
<code>SEVCHK()</code></a> for more information on this topic.</p>
|
||||
<pre>status = ca_XXXX();
|
||||
SEVCHK( status, "ca_XXXX() returned failure status");
|
||||
<pre>status = ca_XXXX();
|
||||
SEVCHK( status, "ca_XXXX() returned failure status");
|
||||
|
||||
if ( status & CA_M_SUCCESS ) {
|
||||
printf ( "The requested ca_XXXX() operation didn't complete successfully");
|
||||
}
|
||||
if ( status & CA_M_SUCCESS ) {
|
||||
printf ( "The requested ca_XXXX() operation didn't complete successfully");
|
||||
}
|
||||
|
||||
if ( status != ECA_NORMAL ) {
|
||||
if ( status != ECA_NORMAL ) {
|
||||
printf("The requested ca_XXXX() operation didn't complete successfully because \"%s\"\n",
|
||||
ca_message ( status ) );
|
||||
ca_message ( status ) );
|
||||
}</pre>
|
||||
|
||||
<h3><a name="Channel">Channel Access Data Types</a></h3>
|
||||
@@ -2285,7 +2285,7 @@ int main ( int argc, char ** argv )
|
||||
unsigned nBytes;
|
||||
unsigned elementCount;
|
||||
char timeString[32];
|
||||
unsigned i;
|
||||
unsigned i;
|
||||
chid chan;
|
||||
double sum;
|
||||
int status;
|
||||
@@ -2328,7 +2328,7 @@ int main ( int argc, char ** argv )
|
||||
epicsTimeToStrftime ( timeString, sizeof ( timeString ),
|
||||
"%a %b %d %Y %H:%M:%S.%f", & pTD->stamp );
|
||||
|
||||
printf ( "The sum of elements in %s at %s was %f\n",
|
||||
printf ( "The sum of elements in %s at %s was %f\n",
|
||||
argv[1], timeString, sum );
|
||||
|
||||
ca_clear_channel ( chan );
|
||||
@@ -2359,7 +2359,7 @@ executing within the user's callback function.</p>
|
||||
<pre>typedef struct event_handler_args {
|
||||
void *usr; /* user argument supplied with request */
|
||||
chanId chid; /* channel id */
|
||||
long type; /* the type of the item returned */
|
||||
long type; /* the type of the item returned */
|
||||
long count; /* the element count of the item returned */
|
||||
const void *dbr; /* a pointer to the item returned */
|
||||
int status; /* ECA_XXX status of the requested op from the server */
|
||||
@@ -2382,7 +2382,7 @@ attached to the request, an exception handler is executed in the client. The
|
||||
default exception handler prints a message on the console and exits if the
|
||||
exception condition is severe. Certain internal exceptions within the CA client
|
||||
library, and failures detected by the SEVCHK macro may also cause the exception
|
||||
handler to be invoked. To modify this behavior see
|
||||
handler to be invoked. To modify this behavior see
|
||||
<code><a href="#ca_add_exception_event">ca_add_exception_event</a>()</code>.</p>
|
||||
|
||||
<h3><a name="Server">Server and Client Share the Same Address Space on The Same
|
||||
@@ -2674,6 +2674,14 @@ automatically released by the system when the process exits and
|
||||
vxWorks or RTEMS no cleanup occurs unless the application calls
|
||||
<code>ca_context_destroy()</code>.</p>
|
||||
|
||||
<p>Note: This operation blocks until any user callbacks for any channel
|
||||
created in the current context have run to completion. If callbacks take a
|
||||
lock (mutex) then it is the user's responsibility to ensure that this lock
|
||||
is not held when <code>ca_clear_context()</code> is called, otherwise a
|
||||
deadlock may ensue. (See also
|
||||
<code><a href="#ca_clear_channel">ca_clear_channel</a>()</code> and
|
||||
<code><a href="#ca_clear_event">ca_clear_subscription</a>()</code>.)</p>
|
||||
|
||||
<h4>Returns</h4>
|
||||
|
||||
<p>ECA_NORMAL - Normal successful completion</p>
|
||||
@@ -2746,7 +2754,7 @@ time.</p>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><code>USERFUNC</code></dt>
|
||||
<dd>Optional address of the user's callback function to be run when the
|
||||
<dd>Optional pointer to the user's callback function to be run when the
|
||||
connection state changes. Casual users of channel access may decide to
|
||||
set this field to null or 0 if they do not need to have a callback
|
||||
function run in response to each connection state change event.
|
||||
@@ -2819,6 +2827,12 @@ efficiently sent over the network in one message.</p>
|
||||
clearing a channel does shutdown and reclaim any channel state change event
|
||||
subscriptions (monitors) registered with the channel.</p>
|
||||
|
||||
<p>Note: This operation blocks until any user callbacks for this channel
|
||||
have run to completion. If callbacks take a lock (mutex) then it is the
|
||||
user's responsibility to ensure that this lock is not held when
|
||||
<code>ca_clear_channel()</code> is called, otherwise a deadlock may ensue.
|
||||
(See also <code><a href="#ca_clear_event">ca_clear_subscription</a>()</code>.)</p>
|
||||
|
||||
<h4>Arguments</h4>
|
||||
<dl>
|
||||
<dt><code>CHID</code></dt>
|
||||
@@ -2833,16 +2847,16 @@ subscriptions (monitors) registered with the channel.</p>
|
||||
|
||||
<h3><code><a name="ca_put">ca_put()</a></code></h3>
|
||||
<pre>#include <cadef.h>
|
||||
int ca_put ( chtype TYPE,
|
||||
chid CHID, void *PVALUE );
|
||||
int ca_array_put ( chtype TYPE, unsigned long COUNT,
|
||||
int ca_put ( chtype TYPE,
|
||||
chid CHID, void *PVALUE );
|
||||
int ca_array_put ( chtype TYPE, unsigned long COUNT,
|
||||
chid CHID, const void *PVALUE);
|
||||
typedef void ( caEventCallBackFunc ) (struct event_handler_args);
|
||||
int ca_put_callback ( chtype TYPE,
|
||||
chid CHID, const void *PVALUE,
|
||||
caEventCallBackFunc PFUNC, void *USERARG );
|
||||
int ca_array_put_callback ( chtype TYPE, unsigned long COUNT,
|
||||
chid CHID, const void *PVALUE,
|
||||
int ca_put_callback ( chtype TYPE,
|
||||
chid CHID, const void *PVALUE,
|
||||
caEventCallBackFunc PFUNC, void *USERARG );
|
||||
int ca_array_put_callback ( chtype TYPE, unsigned long COUNT,
|
||||
chid CHID, const void *PVALUE,
|
||||
caEventCallBackFunc PFUNC, void *USERARG );</pre>
|
||||
|
||||
<h4>Description</h4>
|
||||
@@ -2921,7 +2935,7 @@ but they do not cause the record to be processed.</p>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><code>PFUNC</code></dt>
|
||||
<dd>address of <a href="#User">user supplied callback function</a> to be
|
||||
<dd>Pointer to a <a href="#User">user supplied callback function</a> to be
|
||||
run when the requested operation completes</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
@@ -3029,7 +3043,7 @@ when a CA get request is initiated.</p>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><code>USERFUNC</code></dt>
|
||||
<dd>Address of <a href="#User">user supplied callback function</a> to be
|
||||
<dd>Pointer to a <a href="#User">user supplied callback function</a> to be
|
||||
run when the requested operation completes.</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
@@ -3069,7 +3083,7 @@ when a CA get request is initiated.</p>
|
||||
typedef void ( caEventCallBackFunc ) (struct event_handler_args);
|
||||
int ca_create_subscription ( chtype TYPE, unsigned long COUNT,
|
||||
chid CHID, unsigned long MASK,
|
||||
caEventCallBackFunc USERFUNC, void *USERARG,
|
||||
caEventCallBackFunc USERFUNC, void *USERARG,
|
||||
evid *PEVID );</pre>
|
||||
|
||||
<h4>Description</h4>
|
||||
@@ -3130,8 +3144,8 @@ indicating the current state of the channel.</p>
|
||||
<dd>channel identifier</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><code>USRERFUNC</code></dt>
|
||||
<dd>The address of <a href="#User">user supplied callback function</a> to
|
||||
<dt><code>USERFUNC</code></dt>
|
||||
<dd>Pointer to a <a href="#User">user supplied callback function</a> to
|
||||
be invoked with each subscription update.</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
@@ -3153,7 +3167,7 @@ indicating the current state of the channel.</p>
|
||||
<dt><code>MASK</code></dt>
|
||||
<dd>A mask with bits set for each of the event trigger types requested. The
|
||||
event trigger mask must be a <em>bitwise or</em> of one or more of the
|
||||
following constants.
|
||||
following constants.
|
||||
<ul>
|
||||
<li>DBE_VALUE - Trigger events when the channel value exceeds the
|
||||
monitor dead band</li>
|
||||
@@ -3200,6 +3214,13 @@ and not forwarded to the server until one of <code>ca_flush_io()</code>, <code>c
|
||||
<code>ca_pend_event()</code>, or <code>ca_sg_block()</code> are called. This allows several requests to be
|
||||
efficiently sent together in one message.</p>
|
||||
|
||||
<p>Note: This operation blocks until any user callbacks for this channel
|
||||
have run to completion. If callbacks take a lock (mutex) then it is the
|
||||
user's responsibility to ensure that this lock is not held when
|
||||
<code>ca_clear_subscription()</code> is called, otherwise a deadlock may
|
||||
ensue. (See also <code><a
|
||||
href="#ca_clear_channel">ca_clear_channel</a>()</code>.)</p>
|
||||
|
||||
<h4>Arguments</h4>
|
||||
<dl>
|
||||
<dt>EVID</dt>
|
||||
@@ -3364,7 +3385,7 @@ becomes full.</p>
|
||||
|
||||
<h3><code><a name="ca_signal">ca_signal()</a></code></h3>
|
||||
<pre>#include <cadef.h>
|
||||
int ca_signal ( long CA_STATUS, const char * CONTEXT_STRING );
|
||||
int ca_signal ( long CA_STATUS, const char * CONTEXT_STRING );
|
||||
void SEVCHK( CA_STATUS, CONTEXT_STRING );</pre>
|
||||
|
||||
<h4>Description</h4>
|
||||
@@ -3381,7 +3402,7 @@ recommended error handler for simple applications which do not wish to write
|
||||
code testing the status returned from each channel access call.</p>
|
||||
|
||||
<h4>Examples</h4>
|
||||
<pre>status = ca_context_create (...);
|
||||
<pre>status = ca_context_create (...);
|
||||
SEVCHK ( status, "Unable to create a CA client context" );</pre>
|
||||
|
||||
<p>If the application only wishes to print the message associated with an error
|
||||
@@ -3405,7 +3426,7 @@ this purpose.</p>
|
||||
|
||||
<h3><code><a
|
||||
name="ca_add_exception_event">ca_add_exception_event()</a></code></h3>
|
||||
<pre>#include <cadef.h>
|
||||
<pre>#include <cadef.h>
|
||||
typedef void (*pCallback) ( struct exception_handler_args HANDLERARGS );
|
||||
int ca_add_exception_event ( pCallback USERFUNC, void *USERARG );</pre>
|
||||
|
||||
@@ -3429,7 +3450,7 @@ field should not be used.</p>
|
||||
<h4>Arguments</h4>
|
||||
<dl>
|
||||
<dt><code>USERFUNC</code></dt>
|
||||
<dd>Address of user callback function to be executed when an exceptions
|
||||
<dd>Pointer to a user callback function to be executed when exceptions
|
||||
occur. Passing a null value causes the default exception handler to be
|
||||
reinstalled. The following structure is passed by value to the user's
|
||||
callback function. Currently, the <code>op</code> field can be one of
|
||||
@@ -3564,7 +3585,7 @@ default handler uses fprintf to send messages to 'stderr'.</p>
|
||||
<h4>Arguments</h4>
|
||||
<dl>
|
||||
<dt><code>PFUNC</code></dt>
|
||||
<dd>The address of a user supplied callback handler to be invoked when CA
|
||||
<dd>A pointer to a user supplied callback handler to be invoked when CA
|
||||
prints diagnostic messages. Installing a null pointer will cause the
|
||||
default callback handler to be reinstalled.</dd>
|
||||
</dl>
|
||||
@@ -3612,9 +3633,9 @@ specified channel.</p>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><code>PFUNC</code></dt>
|
||||
<dd>Address of user supplied callback function. A null pointer uninstalls
|
||||
<dd>Pointer to a user supplied callback function. A null pointer uninstalls
|
||||
the current handler. The following arguments are passed <em>by value</em>
|
||||
to the supplied callback handler.
|
||||
to the supplied callback handler.
|
||||
<pre>typedef struct ca_access_rights {
|
||||
unsigned read_access:1;
|
||||
unsigned write_access:1;
|
||||
@@ -3954,8 +3975,8 @@ type.</p>
|
||||
prints diagnostics to standard out.</p>
|
||||
|
||||
<h4>Examples</h4>
|
||||
<pre>void ca_test_event ();
|
||||
status = ca_create_subscription ( type, chid, ca_test_event, NULL, NULL );
|
||||
<pre>void ca_test_event ();
|
||||
status = ca_create_subscription ( type, chid, ca_test_event, NULL, NULL );
|
||||
SEVCHK ( status, .... );</pre>
|
||||
|
||||
<h4>See Also</h4>
|
||||
@@ -3989,8 +4010,8 @@ outstanding within them at any given time.</p>
|
||||
</dl>
|
||||
|
||||
<h4>Examples</h4>
|
||||
<pre>CA_SYNC_GID gid;
|
||||
status = ca_sg_create ( &gid );
|
||||
<pre>CA_SYNC_GID gid;
|
||||
status = ca_sg_create ( &gid );
|
||||
SEVCHK ( status, Sync group create failed );</pre>
|
||||
|
||||
<h4>Returns</h4>
|
||||
@@ -4028,8 +4049,8 @@ int ca_sg_delete ( CA_SYNC_GID GID );</pre>
|
||||
</dl>
|
||||
|
||||
<h4>Examples</h4>
|
||||
<pre>CA_SYNC_GID gid;
|
||||
status = ca_sg_delete ( gid );
|
||||
<pre>CA_SYNC_GID gid;
|
||||
status = ca_sg_delete ( gid );
|
||||
SEVCHK ( status, Sync group delete failed );</pre>
|
||||
|
||||
<h4>Returns</h4>
|
||||
@@ -4140,7 +4161,7 @@ will not block unless additional subsequent requests are made.</p>
|
||||
</dl>
|
||||
|
||||
<h4>Examples</h4>
|
||||
<pre>CA_SYNC_GID gid;
|
||||
<pre>CA_SYNC_GID gid;
|
||||
status = ca_sg_reset(gid);</pre>
|
||||
|
||||
<h4>Returns</h4>
|
||||
@@ -4153,7 +4174,7 @@ status = ca_sg_reset(gid);</pre>
|
||||
<pre>#include <cadef.h>
|
||||
int ca_sg_put ( CA_SYNC_GID GID, chtype TYPE,
|
||||
chid CHID, void *PVALUE );
|
||||
int ca_sg_array_put ( CA_SYNC_GID GID, chtype TYPE,
|
||||
int ca_sg_array_put ( CA_SYNC_GID GID, chtype TYPE,
|
||||
unsigned long COUNT, chid CHID, void *PVALUE );</pre>
|
||||
|
||||
<p>Write a value, or array of values, to a channel and increment the outstanding
|
||||
@@ -4294,7 +4315,7 @@ reissued.</p>
|
||||
|
||||
<h3><code><a name="ca_client_status">ca_client_status()</a></code></h3>
|
||||
<pre>int ca_client_status ( unsigned level );
|
||||
int ca_context_status ( struct ca_client_context *CONTEXT,
|
||||
int ca_context_status ( struct ca_client_context *CONTEXT,
|
||||
unsigned LEVEL );</pre>
|
||||
|
||||
<h4>Description</h4>
|
||||
|
||||
@@ -127,21 +127,10 @@ const char * ca_message_text []
|
||||
|
||||
static epicsThreadOnceId caClientContextIdOnce = EPICS_THREAD_ONCE_INIT;
|
||||
|
||||
extern "C" void ca_client_exit_handler (void *)
|
||||
{
|
||||
if ( caClientContextId ) {
|
||||
epicsThreadPrivateDelete ( caClientContextId );
|
||||
caClientContextId = 0;
|
||||
}
|
||||
}
|
||||
|
||||
// runs once only for each process
|
||||
extern "C" void ca_init_client_context ( void * )
|
||||
{
|
||||
caClientContextId = epicsThreadPrivateCreate ();
|
||||
if ( caClientContextId ) {
|
||||
epicsAtExit ( ca_client_exit_handler,0 );
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -639,7 +639,7 @@ not follow this pattern, but are still printable strings.
|
||||
|
||||
=item [1] R3.14 Channel Access Reference Manual by Jeffrey O. Hill
|
||||
|
||||
L<http://www.aps.anl.gov/epics/base/R3-14/12-docs/CAref.html>
|
||||
L<https://epics.anl.gov/base/R3-14/12-docs/CAref.html>
|
||||
|
||||
=back
|
||||
|
||||
|
||||
@@ -66,10 +66,6 @@ ifdef T_A
|
||||
$(RM) $@ $@_new
|
||||
$(PERL) $(XSUBPP) -typemap $(EXTUTILS)/typemap $< > $@_new && $(MV) $@_new $@
|
||||
|
||||
%.html: ../%.pm
|
||||
$(RM) $@
|
||||
podchecker $< && pod2html --infile=$< --outfile=$@
|
||||
|
||||
$(INSTALL_PERL_MODULES)/$(PERL_ARCHPATH)/%: %
|
||||
$(ECHO) "Installing loadable shared library $@"
|
||||
@$(INSTALL_LIBRARY) -d -m $(LIB_PERMISSIONS) $< $(INSTALL_PERL_MODULES)/$(PERL_ARCHPATH)
|
||||
|
||||
@@ -140,6 +140,10 @@ sub display {
|
||||
printf " Lo ctrl limit: %g\n", $data->{lower_ctrl_limit};
|
||||
printf " Hi ctrl limit: %g\n", $data->{upper_ctrl_limit};
|
||||
}
|
||||
if (exists $data->{ackt}) {
|
||||
printf " Ack transients: %s\n", $data->{ackt} ? 'YES' : 'NO';
|
||||
printf " Ack severity: %s\n", $data->{acks};
|
||||
}
|
||||
} else {
|
||||
my $value = format_number($data, $type);
|
||||
if ($opt_t) {
|
||||
|
||||
@@ -74,10 +74,9 @@ LIBSRCS += casStreamIO.cc
|
||||
LIBSRCS += ipIgnoreEntry.cc
|
||||
|
||||
# There is a bug in some vxWorks compilers that these work around:
|
||||
ifeq ($(VX_GNU_VERSION), 4.1.2)
|
||||
casStreamOS_CXXFLAGS_vxWorks-ppc604_altivec = -O0
|
||||
casStreamOS_CXXFLAGS_vxWorks-ppc604_long = -O0
|
||||
casStreamOS_CXXFLAGS_vxWorks-ppc604 = -O0
|
||||
ifeq ($(VXWORKS_VERSION)$(filter -mcpu=604,$(ARCH_DEP_CFLAGS)), 6.6-mcpu=604)
|
||||
casDGIntfOS_CXXFLAGS = -fno-inline
|
||||
casStreamOS_CXXFLAGS = -fno-inline
|
||||
endif
|
||||
|
||||
LIBSRCS_vxWorks += templateInstances.cpp
|
||||
|
||||
@@ -646,6 +646,11 @@ caStatus casDGClient::processDG ()
|
||||
if ( status != S_cas_success ) {
|
||||
break;
|
||||
}
|
||||
|
||||
if ( this->in.bytesPresent () > 0 && dgInBytesConsumed == 0 && status == S_cas_success ) {
|
||||
this->in.removeMsg ( this->in.bytesPresent() );
|
||||
}
|
||||
|
||||
}
|
||||
return status;
|
||||
}
|
||||
|
||||
@@ -530,8 +530,20 @@ caStatus casStrmClient::readResponse ( epicsGuard < casClientMutex > & guard,
|
||||
pChan->getCID(), status, ECA_GETFAIL );
|
||||
}
|
||||
|
||||
aitUint32 elementCount = 0;
|
||||
if (desc.isContainer()) {
|
||||
aitUint32 index;
|
||||
int gdds = gddApplicationTypeTable::app_table.mapAppToIndex
|
||||
( desc.applicationType(), gddAppType_value, index );
|
||||
if ( gdds ) {
|
||||
return S_cas_badType;
|
||||
}
|
||||
elementCount = desc.getDD(index)->getDataSizeElements();
|
||||
} else {
|
||||
elementCount = desc.getDataSizeElements();
|
||||
}
|
||||
ca_uint32_t count = (msg.m_count == 0) ?
|
||||
(ca_uint32_t)desc.getDataSizeElements() :
|
||||
(ca_uint32_t)elementCount :
|
||||
msg.m_count;
|
||||
|
||||
void * pPayload;
|
||||
@@ -659,8 +671,20 @@ caStatus casStrmClient::readNotifyResponse ( epicsGuard < casClientMutex > & gua
|
||||
return ecaStatus;
|
||||
}
|
||||
|
||||
aitUint32 elementCount = 0;
|
||||
if (desc.isContainer()) {
|
||||
aitUint32 index;
|
||||
int gdds = gddApplicationTypeTable::app_table.mapAppToIndex
|
||||
( desc.applicationType(), gddAppType_value, index );
|
||||
if ( gdds ) {
|
||||
return S_cas_badType;
|
||||
}
|
||||
elementCount = desc.getDD(index)->getDataSizeElements();
|
||||
} else {
|
||||
elementCount = desc.getDataSizeElements();
|
||||
}
|
||||
ca_uint32_t count = (msg.m_count == 0) ?
|
||||
(ca_uint32_t)desc.getDataSizeElements() :
|
||||
(ca_uint32_t)elementCount :
|
||||
msg.m_count;
|
||||
|
||||
void *pPayload;
|
||||
|
||||
@@ -81,14 +81,14 @@ static void sprint_long (char *ret, dbr_long_t val, IntFormatT outType)
|
||||
}
|
||||
else {
|
||||
const char *fmt[4] = { /* Order must match the enum IntFormatT */
|
||||
"%ld" /* dec */,
|
||||
"0" /* bin, val is 0 */,
|
||||
"0o%lo" /* oct */,
|
||||
"0x%lX" /* hex */
|
||||
"%d" /* dec */,
|
||||
"0" /* bin and val is 0 */,
|
||||
"0o%o" /* oct */,
|
||||
"0x%X" /* hex */
|
||||
};
|
||||
|
||||
/* Formats have long modifier, pass value as a long */
|
||||
sprintf(ret, fmt[outType], (long) val);
|
||||
/* dbr_long_t is actually an int on all supported platforms */
|
||||
sprintf(ret, fmt[outType], (int) val);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -416,6 +416,12 @@ char *dbr2str (const void *value, unsigned type)
|
||||
ptsNewS = &((struct TYPE *)value)->stamp; \
|
||||
ptsNewC = &tsNow; \
|
||||
\
|
||||
if (!tsInitS) \
|
||||
{ \
|
||||
tsFirst = *ptsNewS; \
|
||||
tsInitS = 1; \
|
||||
} \
|
||||
\
|
||||
switch (tsType) { \
|
||||
case relative: \
|
||||
ptsRefC = &tsStart; \
|
||||
@@ -508,12 +514,6 @@ void print_time_val_sts (pv* pv, unsigned long reqElems)
|
||||
epicsTimeGetCurrent(&tsNow);
|
||||
epicsTimeToStrftime(timeText, TIMETEXTLEN, timeFormatStr, &tsNow);
|
||||
|
||||
if (!tsInitS)
|
||||
{
|
||||
tsFirst = tsNow;
|
||||
tsInitS = 1;
|
||||
}
|
||||
|
||||
if (pv->nElems <= 1 && fieldSeparator == ' ') printf("%-30s", pv->name);
|
||||
else printf("%s", pv->name);
|
||||
printf("%c", fieldSeparator);
|
||||
|
||||
@@ -60,6 +60,10 @@ static void *exitCallback;
|
||||
static char *threadName[NUM_CALLBACK_PRIORITIES] = {
|
||||
"cbLow", "cbMedium", "cbHigh"
|
||||
};
|
||||
#define FULL_MSG(name) "callbackRequest: " name " ring buffer full\n"
|
||||
static char *fullMessage[NUM_CALLBACK_PRIORITIES] = {
|
||||
FULL_MSG("cbLow"), FULL_MSG("cbMedium"), FULL_MSG("cbHigh")
|
||||
};
|
||||
static unsigned int threadPriority[NUM_CALLBACK_PRIORITIES] = {
|
||||
epicsThreadPriorityScanLow - 1,
|
||||
epicsThreadPriorityScanLow + 4,
|
||||
@@ -168,11 +172,7 @@ void callbackRequest(CALLBACK *pcallback)
|
||||
epicsInterruptUnlock(lockKey);
|
||||
|
||||
if (!pushOK) {
|
||||
char msg[48] = "callbackRequest: ";
|
||||
|
||||
strcat(msg, threadName[priority]);
|
||||
strcat(msg, " ring buffer full\n");
|
||||
epicsInterruptContextMessage(msg);
|
||||
epicsInterruptContextMessage(fullMessage[priority]);
|
||||
ringOverflow[priority] = TRUE;
|
||||
}
|
||||
epicsEventSignal(callbackSem[priority]);
|
||||
|
||||
@@ -297,10 +297,10 @@ static void get_alarm(DBADDR *paddr, char **ppbuffer,
|
||||
if (*options & DBR_AL_LONG) {
|
||||
struct dbr_alLong *pal = (struct dbr_alLong*) pbuffer;
|
||||
|
||||
pal->upper_alarm_limit = (epicsInt32) ald.upper_alarm_limit;
|
||||
pal->upper_warning_limit = (epicsInt32) ald.upper_warning_limit;
|
||||
pal->lower_warning_limit = (epicsInt32) ald.lower_warning_limit;
|
||||
pal->lower_alarm_limit = (epicsInt32) ald.lower_alarm_limit;
|
||||
pal->upper_alarm_limit = finite(ald.upper_alarm_limit) ? (epicsInt32) ald.upper_alarm_limit : 0;
|
||||
pal->upper_warning_limit = finite(ald.upper_warning_limit) ? (epicsInt32) ald.upper_warning_limit : 0;
|
||||
pal->lower_warning_limit = finite(ald.lower_warning_limit) ? (epicsInt32) ald.lower_warning_limit : 0;
|
||||
pal->lower_alarm_limit = finite(ald.lower_alarm_limit) ? (epicsInt32) ald.lower_alarm_limit : 0;
|
||||
|
||||
if (no_data)
|
||||
*options ^= DBR_AL_LONG; /*Turn off option*/
|
||||
|
||||
@@ -409,7 +409,7 @@ long epicsShareAPI dbd(const char *record_name)
|
||||
|
||||
precord = addr.precord;
|
||||
|
||||
if (! precord->bkpt & BKPT_ON_MASK) {
|
||||
if (!(precord->bkpt & BKPT_ON_MASK)) {
|
||||
printf(" BKPT> No breakpoint set in this record\n");
|
||||
return(S_db_bkptNotSet);
|
||||
}
|
||||
|
||||
@@ -591,11 +591,16 @@ static void connectionCallback(struct connection_handler_args arg)
|
||||
if (pca->gotFirstConnection) {
|
||||
if (pca->nelements != ca_element_count(arg.chid) ||
|
||||
pca->dbrType != ca_field_type(arg.chid)) {
|
||||
/* BUG: We have no way to clear any old subscription with the
|
||||
* originally chosen data type/size. That will continue
|
||||
* to send us data and will result in an assert() fail.
|
||||
*/
|
||||
/* Let next dbCaGetLink and/or dbCaPutLink determine options */
|
||||
/* Size or type changed, clear everything and let the next call
|
||||
to dbCaGetLink() and/or dbCaPutLink() reset everything */
|
||||
if (pca->evidNative) {
|
||||
ca_clear_event(pca->evidNative);
|
||||
pca->evidNative = 0;
|
||||
}
|
||||
if (pca->evidString) {
|
||||
ca_clear_event(pca->evidString);
|
||||
pca->evidString = 0;
|
||||
}
|
||||
plink->value.pv_link.pvlMask &=
|
||||
~(pvlOptInpNative | pvlOptInpString |
|
||||
pvlOptOutNative | pvlOptOutString);
|
||||
@@ -643,6 +648,7 @@ static void eventCallback(struct event_handler_args arg)
|
||||
struct dbr_time_double *pdbr_time_double;
|
||||
dbCaCallback monitor = 0;
|
||||
void *userPvt = 0;
|
||||
int doScan = 1;
|
||||
|
||||
assert(pca);
|
||||
epicsMutexMustLock(pca->lock);
|
||||
@@ -671,10 +677,13 @@ static void eventCallback(struct event_handler_args arg)
|
||||
memcpy(pca->pgetString, dbr_value_ptr(arg.dbr, arg.type), size);
|
||||
pca->gotInString = TRUE;
|
||||
} else switch (arg.type){
|
||||
case DBR_TIME_ENUM:
|
||||
/* Disable the record scan if we also have a string monitor */
|
||||
doScan = !(plink->value.pv_link.pvlMask & pvlOptInpString);
|
||||
/* fall through */
|
||||
case DBR_TIME_STRING:
|
||||
case DBR_TIME_SHORT:
|
||||
case DBR_TIME_FLOAT:
|
||||
case DBR_TIME_ENUM:
|
||||
case DBR_TIME_CHAR:
|
||||
case DBR_TIME_LONG:
|
||||
case DBR_TIME_DOUBLE:
|
||||
@@ -690,7 +699,7 @@ static void eventCallback(struct event_handler_args arg)
|
||||
pca->sevr = pdbr_time_double->severity;
|
||||
pca->stat = pdbr_time_double->status;
|
||||
memcpy(&pca->timeStamp, &pdbr_time_double->stamp, sizeof(epicsTimeStamp));
|
||||
if (precord) {
|
||||
if (doScan && precord) {
|
||||
struct pv_link *ppv_link = &plink->value.pv_link;
|
||||
|
||||
if ((ppv_link->pvlMask & pvlOptCP) ||
|
||||
@@ -969,7 +978,8 @@ static void dbCaTask(void *arg)
|
||||
status = ca_add_array_event(
|
||||
ca_field_type(pca->chid)+DBR_TIME_STRING,
|
||||
ca_element_count(pca->chid),
|
||||
pca->chid, eventCallback, pca, 0.0, 0.0, 0.0, 0);
|
||||
pca->chid, eventCallback, pca, 0.0, 0.0, 0.0,
|
||||
&pca->evidNative);
|
||||
if (status != ECA_NORMAL) {
|
||||
errlogPrintf("dbCaTask ca_add_array_event %s\n",
|
||||
ca_message(status));
|
||||
@@ -981,7 +991,8 @@ static void dbCaTask(void *arg)
|
||||
pca->pgetString = dbCalloc(1, MAX_STRING_SIZE);
|
||||
epicsMutexUnlock(pca->lock);
|
||||
status = ca_add_array_event(DBR_TIME_STRING, 1,
|
||||
pca->chid, eventCallback, pca, 0.0, 0.0, 0.0, 0);
|
||||
pca->chid, eventCallback, pca, 0.0, 0.0, 0.0,
|
||||
&pca->evidString);
|
||||
if (status != ECA_NORMAL) {
|
||||
errlogPrintf("dbCaTask ca_add_array_event %s\n",
|
||||
ca_message(status));
|
||||
|
||||
@@ -73,6 +73,8 @@ typedef struct caLink
|
||||
char *pgetString;
|
||||
void *pputNative;
|
||||
char *pputString;
|
||||
evid evidNative;
|
||||
evid evidString;
|
||||
char gotInNative;
|
||||
char gotInString;
|
||||
char gotOutNative;
|
||||
|
||||
105
src/db/dbEvent.c
105
src/db/dbEvent.c
@@ -90,7 +90,8 @@ struct event_user {
|
||||
epicsMutexId lock;
|
||||
epicsEventId ppendsem; /* Wait while empty */
|
||||
epicsEventId pflush_sem; /* wait for flush */
|
||||
|
||||
epicsEventId pexitsem; /* wait for event task to join */
|
||||
|
||||
EXTRALABORFUNC *extralabor_sub;/* off load to event task */
|
||||
void *extralabor_arg;/* parameter to above */
|
||||
|
||||
@@ -134,7 +135,9 @@ static char *EVENT_PEND_NAME = "eventTask";
|
||||
|
||||
static struct evSubscrip canceledEvent;
|
||||
|
||||
static unsigned short ringSpace ( const struct event_que *pevq )
|
||||
static epicsMutexId stopSync;
|
||||
|
||||
static unsigned short ringSpace ( const struct event_que *pevq )
|
||||
{
|
||||
if ( pevq->evque[pevq->putix] == EVENTQEMPTY ) {
|
||||
if ( pevq->getix > pevq->putix ) {
|
||||
@@ -274,7 +277,11 @@ int epicsShareAPI dbel ( const char *pname, unsigned level )
|
||||
dbEventCtx epicsShareAPI db_init_events (void)
|
||||
{
|
||||
struct event_user * evUser;
|
||||
|
||||
|
||||
if (!stopSync) {
|
||||
stopSync = epicsMutexMustCreate();
|
||||
}
|
||||
|
||||
if (!dbevEventUserFreeList) {
|
||||
freeListInitPvt(&dbevEventUserFreeList,
|
||||
sizeof(struct event_user),8);
|
||||
@@ -293,38 +300,49 @@ dbEventCtx epicsShareAPI db_init_events (void)
|
||||
if (!evUser) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
/* Flag will be cleared when event task starts */
|
||||
evUser->pendexit = TRUE;
|
||||
|
||||
evUser->firstque.evUser = evUser;
|
||||
evUser->firstque.writelock = epicsMutexCreate();
|
||||
if (!evUser->firstque.writelock) {
|
||||
return NULL;
|
||||
}
|
||||
if (!evUser->firstque.writelock)
|
||||
goto fail;
|
||||
|
||||
evUser->ppendsem = epicsEventCreate(epicsEventEmpty);
|
||||
if (!evUser->ppendsem) {
|
||||
epicsMutexDestroy (evUser->firstque.writelock);
|
||||
return NULL;
|
||||
}
|
||||
if (!evUser->ppendsem)
|
||||
goto fail;
|
||||
evUser->pflush_sem = epicsEventCreate(epicsEventEmpty);
|
||||
if (!evUser->pflush_sem) {
|
||||
epicsMutexDestroy (evUser->firstque.writelock);
|
||||
epicsEventDestroy (evUser->ppendsem);
|
||||
return NULL;
|
||||
}
|
||||
if (!evUser->pflush_sem)
|
||||
goto fail;
|
||||
evUser->lock = epicsMutexCreate();
|
||||
if (!evUser->lock) {
|
||||
epicsMutexDestroy (evUser->firstque.writelock);
|
||||
epicsEventDestroy (evUser->pflush_sem);
|
||||
epicsEventDestroy (evUser->ppendsem);
|
||||
return NULL;
|
||||
}
|
||||
if (!evUser->lock)
|
||||
goto fail;
|
||||
evUser->pexitsem = epicsEventCreate(epicsEventEmpty);
|
||||
if (!evUser->pexitsem)
|
||||
goto fail;
|
||||
|
||||
evUser->flowCtrlMode = FALSE;
|
||||
evUser->extraLaborBusy = FALSE;
|
||||
evUser->pSuicideEvent = NULL;
|
||||
return (dbEventCtx) evUser;
|
||||
fail:
|
||||
if(evUser->lock)
|
||||
epicsMutexDestroy (evUser->lock);
|
||||
if(evUser->firstque.writelock)
|
||||
epicsMutexDestroy (evUser->firstque.writelock);
|
||||
if(evUser->ppendsem)
|
||||
epicsEventDestroy (evUser->ppendsem);
|
||||
if(evUser->pflush_sem)
|
||||
epicsEventDestroy (evUser->pflush_sem);
|
||||
if(evUser->pexitsem)
|
||||
epicsEventDestroy (evUser->pexitsem);
|
||||
freeListFree(dbevEventUserFreeList,evUser);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
/* intentionally leak stopSync to avoid possible shutdown races */
|
||||
/*
|
||||
* DB_CLOSE_EVENTS()
|
||||
*
|
||||
@@ -346,10 +364,30 @@ void epicsShareAPI db_close_events (dbEventCtx ctx)
|
||||
* hazardous to the system's health.
|
||||
*/
|
||||
epicsMutexMustLock ( evUser->lock );
|
||||
evUser->pendexit = TRUE;
|
||||
if(!evUser->pendexit) { /* event task running */
|
||||
evUser->pendexit = TRUE;
|
||||
epicsMutexUnlock ( evUser->lock );
|
||||
|
||||
/* notify the waiting task */
|
||||
epicsEventSignal(evUser->ppendsem);
|
||||
/* wait for task to exit */
|
||||
epicsEventMustWait(evUser->pexitsem);
|
||||
|
||||
epicsMutexMustLock ( evUser->lock );
|
||||
}
|
||||
|
||||
epicsMutexUnlock ( evUser->lock );
|
||||
/* notify the waiting task */
|
||||
epicsEventSignal(evUser->ppendsem);
|
||||
|
||||
epicsMutexMustLock (stopSync);
|
||||
|
||||
epicsEventDestroy(evUser->pexitsem);
|
||||
epicsEventDestroy(evUser->ppendsem);
|
||||
epicsEventDestroy(evUser->pflush_sem);
|
||||
epicsMutexDestroy(evUser->lock);
|
||||
|
||||
epicsMutexUnlock (stopSync);
|
||||
|
||||
freeListFree(dbevEventUserFreeList, evUser);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -977,14 +1015,17 @@ static void event_task (void *pParm)
|
||||
}
|
||||
}
|
||||
|
||||
epicsEventDestroy(evUser->ppendsem);
|
||||
epicsEventDestroy(evUser->pflush_sem);
|
||||
epicsMutexDestroy(evUser->lock);
|
||||
|
||||
freeListFree(dbevEventUserFreeList, evUser);
|
||||
|
||||
taskwdRemove(epicsThreadGetIdSelf());
|
||||
|
||||
/* use stopSync to ensure pexitsem is not destroy'd
|
||||
* until epicsEventSignal() has returned.
|
||||
*/
|
||||
epicsMutexMustLock (stopSync);
|
||||
|
||||
epicsEventSignal(evUser->pexitsem);
|
||||
|
||||
epicsMutexUnlock(stopSync);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1008,7 +1049,6 @@ int epicsShareAPI db_start_events (
|
||||
return DB_EVENT_OK;
|
||||
}
|
||||
|
||||
evUser->pendexit = FALSE;
|
||||
evUser->init_func = init_func;
|
||||
evUser->init_func_arg = init_func_arg;
|
||||
if (!taskname) {
|
||||
@@ -1022,6 +1062,7 @@ int epicsShareAPI db_start_events (
|
||||
epicsMutexUnlock ( evUser->lock );
|
||||
return DB_EVENT_ERROR;
|
||||
}
|
||||
evUser->pendexit = FALSE;
|
||||
epicsMutexUnlock ( evUser->lock );
|
||||
return DB_EVENT_OK;
|
||||
}
|
||||
|
||||
@@ -525,10 +525,10 @@ long epicsShareAPI dblsr(char *recordname,int level)
|
||||
printf(" Not Locked\n");
|
||||
} else {
|
||||
printf(" thread %p",plockSet->thread_id);
|
||||
if(! plockSet->precord || !plockSet->precord->name)
|
||||
printf(" NULL record or record name\n");
|
||||
if(! plockSet->precord)
|
||||
printf(" NULL record\n");
|
||||
else
|
||||
printf(" record %s\n",plockSet->precord->name);
|
||||
printf(" record %s\n",plockSet->precord->name);
|
||||
}
|
||||
if(level==0) { if(recordname) break; continue; }
|
||||
for(plockRecord = (lockRecord *)ellFirst(&plockSet->lockRecordList);
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#include <limits.h>
|
||||
|
||||
#include "dbDefs.h"
|
||||
#include "alarm.h"
|
||||
#include "epicsMath.h"
|
||||
#include "epicsTime.h"
|
||||
#include "epicsPrint.h"
|
||||
@@ -222,6 +223,9 @@ unsigned short epicsShareAPI recGblResetAlarms(void *precord)
|
||||
epicsEnum16 val_mask = 0;
|
||||
epicsEnum16 stat_mask = 0;
|
||||
|
||||
if (new_sevr > INVALID_ALARM)
|
||||
new_sevr = INVALID_ALARM;
|
||||
|
||||
pdbc->stat = new_stat;
|
||||
pdbc->sevr = new_sevr;
|
||||
pdbc->nsta = 0;
|
||||
|
||||
@@ -960,23 +960,29 @@ static void dbRecordHead(char *recordType, char *name, int visible)
|
||||
|
||||
static void dbRecordField(char *name,char *value)
|
||||
{
|
||||
DBENTRY *pdbentry;
|
||||
tempListNode *ptempListNode;
|
||||
long status;
|
||||
DBENTRY *pdbentry;
|
||||
tempListNode *ptempListNode;
|
||||
long status;
|
||||
|
||||
if(duplicate) return;
|
||||
if (duplicate) return;
|
||||
ptempListNode = (tempListNode *)ellFirst(&tempList);
|
||||
pdbentry = ptempListNode->item;
|
||||
status = dbFindField(pdbentry,name);
|
||||
if(status) {
|
||||
epicsPrintf("Record \"%s\" does not have a field \"%s\"\n",
|
||||
dbGetRecordName(pdbentry), name);
|
||||
yyerror(NULL);
|
||||
return;
|
||||
if (status) {
|
||||
epicsPrintf("Record \"%s\" does not have a field \"%s\"\n",
|
||||
dbGetRecordName(pdbentry), name);
|
||||
yyerror(NULL);
|
||||
return;
|
||||
}
|
||||
if (pdbentry->indfield == 0) {
|
||||
epicsPrintf("Can't set \"NAME\" field of record \"%s\"\n",
|
||||
dbGetRecordName(pdbentry));
|
||||
yyerror(NULL);
|
||||
return;
|
||||
}
|
||||
dbTranslateEscape(value, value); /* yuck: in-place, but safe */
|
||||
status = dbPutString(pdbentry,value);
|
||||
if(status) {
|
||||
if (status) {
|
||||
epicsPrintf("Can't set \"%s.%s\" to \"%s\"\n",
|
||||
dbGetRecordName(pdbentry), name, value);
|
||||
yyerror(NULL);
|
||||
@@ -986,33 +992,33 @@ static void dbRecordField(char *name,char *value)
|
||||
|
||||
static void dbRecordInfo(char *name, char *value)
|
||||
{
|
||||
DBENTRY *pdbentry;
|
||||
tempListNode *ptempListNode;
|
||||
long status;
|
||||
DBENTRY *pdbentry;
|
||||
tempListNode *ptempListNode;
|
||||
long status;
|
||||
|
||||
if(duplicate) return;
|
||||
if (duplicate) return;
|
||||
ptempListNode = (tempListNode *)ellFirst(&tempList);
|
||||
pdbentry = ptempListNode->item;
|
||||
status = dbPutInfo(pdbentry,name,value);
|
||||
if(status) {
|
||||
epicsPrintf("Can't set \"%s\" info \"%s\" to \"%s\"\n",
|
||||
if (status) {
|
||||
epicsPrintf("Can't set \"%s\" info \"%s\" to \"%s\"\n",
|
||||
dbGetRecordName(pdbentry), name, value);
|
||||
yyerror(NULL);
|
||||
return;
|
||||
yyerror(NULL);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
static void dbRecordAlias(char *name)
|
||||
{
|
||||
DBENTRY *pdbentry;
|
||||
tempListNode *ptempListNode;
|
||||
long status;
|
||||
DBENTRY *pdbentry;
|
||||
tempListNode *ptempListNode;
|
||||
long status;
|
||||
|
||||
if(duplicate) return;
|
||||
if (duplicate) return;
|
||||
ptempListNode = (tempListNode *)ellFirst(&tempList);
|
||||
pdbentry = ptempListNode->item;
|
||||
status = dbCreateAlias(pdbentry, name);
|
||||
if(status) {
|
||||
if (status) {
|
||||
epicsPrintf("Can't create alias \"%s\" for \"%s\"\n",
|
||||
name, dbGetRecordName(pdbentry));
|
||||
yyerror(NULL);
|
||||
@@ -1022,15 +1028,16 @@ static void dbRecordAlias(char *name)
|
||||
|
||||
static void dbAlias(char *name, char *alias)
|
||||
{
|
||||
DBENTRY dbEntry;
|
||||
DBENTRY *pdbEntry = &dbEntry;
|
||||
DBENTRY dbEntry;
|
||||
DBENTRY *pdbEntry = &dbEntry;
|
||||
|
||||
dbInitEntry(pdbbase, pdbEntry);
|
||||
if (dbFindRecord(pdbEntry, name)) {
|
||||
epicsPrintf("Alias \"%s\" refers to unknown record \"%s\"\n",
|
||||
alias, name);
|
||||
yyerror(NULL);
|
||||
} else if (dbCreateAlias(pdbEntry, alias)) {
|
||||
}
|
||||
else if (dbCreateAlias(pdbEntry, alias)) {
|
||||
epicsPrintf("Can't create alias \"%s\" referring to \"%s\"\n",
|
||||
alias, name);
|
||||
yyerror(NULL);
|
||||
@@ -1040,14 +1047,14 @@ static void dbAlias(char *name, char *alias)
|
||||
|
||||
static void dbRecordBody(void)
|
||||
{
|
||||
DBENTRY *pdbentry;
|
||||
DBENTRY *pdbentry;
|
||||
|
||||
if(duplicate) {
|
||||
duplicate = FALSE;
|
||||
return;
|
||||
if (duplicate) {
|
||||
duplicate = FALSE;
|
||||
return;
|
||||
}
|
||||
pdbentry = (DBENTRY *)popFirstTemp();
|
||||
if(ellCount(&tempList))
|
||||
yyerrorAbort("dbRecordBody: tempList not empty");
|
||||
if (ellCount(&tempList))
|
||||
yyerrorAbort("dbRecordBody: tempList not empty");
|
||||
dbFreeEntry(pdbentry);
|
||||
}
|
||||
|
||||
@@ -116,7 +116,7 @@ epicsShareFunc void fdManager::process (double delay)
|
||||
|
||||
if ( ioPending ) {
|
||||
struct timeval tv;
|
||||
tv.tv_sec = static_cast<long> ( minDelay );
|
||||
tv.tv_sec = static_cast<time_t> ( minDelay );
|
||||
tv.tv_usec = static_cast<long> ( (minDelay-tv.tv_sec) * uSecPerSec );
|
||||
|
||||
fd_set * pReadSet = & this->fdSetsPtr[fdrRead];
|
||||
|
||||
@@ -269,7 +269,7 @@ static int generalTimeGetEventPriority(epicsTimeStamp *pDest, int eventNumber,
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (epicsTimeGreaterThanEqual(pDest,
|
||||
if (epicsTimeGreaterThanEqual(&ts,
|
||||
>Pvt.eventTime[eventNumber])) {
|
||||
*pDest = ts;
|
||||
gtPvt.eventTime[eventNumber] = ts;
|
||||
@@ -279,7 +279,6 @@ static int generalTimeGetEventPriority(epicsTimeStamp *pDest, int eventNumber,
|
||||
key = epicsInterruptLock();
|
||||
gtPvt.ErrorCounts++;
|
||||
epicsInterruptUnlock(key);
|
||||
}
|
||||
|
||||
IFDEBUG(10) {
|
||||
char last[40], buff[40];
|
||||
@@ -291,6 +290,7 @@ static int generalTimeGetEventPriority(epicsTimeStamp *pDest, int eventNumber,
|
||||
" %s, using %s instead\n",
|
||||
ptp->name, buff, last);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -67,14 +67,14 @@ convertDoubleToWakeTime(double timeout, struct timespec *wakeTime)
|
||||
mach_timespec_t now;
|
||||
struct timespec wait;
|
||||
|
||||
if (timeout < 0.0)
|
||||
timeout = 0.0;
|
||||
else if (timeout > 60 * 60 * 24 * 3652.5)
|
||||
timeout = 60 * 60 * 24 * 3652.5; /* 10 years */
|
||||
|
||||
clock_get_time(host_clock, &now);
|
||||
|
||||
if (timeout<0.0)
|
||||
timeout = 0.0;
|
||||
else if(timeout>3600.0)
|
||||
timeout = 3600.0;
|
||||
|
||||
wait.tv_sec = static_cast< long >(timeout);
|
||||
wait.tv_sec = static_cast< time_t >(timeout);
|
||||
wait.tv_nsec = static_cast< long >((timeout - (double)wait.tv_sec) * 1e9);
|
||||
|
||||
wakeTime->tv_sec = now.tv_sec + wait.tv_sec;
|
||||
|
||||
@@ -87,30 +87,35 @@ int epicsTime_localtime ( const time_t *clock, // X aCC 361
|
||||
extern "C" epicsShareFunc void
|
||||
convertDoubleToWakeTime(double timeout,struct timespec *wakeTime)
|
||||
{
|
||||
struct timespec wait;
|
||||
struct timespec now, wait;
|
||||
int status;
|
||||
|
||||
if(timeout<0.0) timeout = 0.0;
|
||||
else if(timeout>3600.0) timeout = 3600.0;
|
||||
if (timeout < 0.0)
|
||||
timeout = 0.0;
|
||||
else if (timeout > 60 * 60 * 24 * 3652.5)
|
||||
timeout = 60 * 60 * 24 * 3652.5; /* 10 years */
|
||||
|
||||
#ifdef CLOCK_REALTIME
|
||||
status = clock_gettime(CLOCK_REALTIME, wakeTime);
|
||||
status = clock_gettime(CLOCK_REALTIME, &now);
|
||||
#else
|
||||
{
|
||||
struct timeval tv;
|
||||
struct timezone tz;
|
||||
status = gettimeofday(&tv, &tz);
|
||||
wakeTime->tv_sec = tv.tv_sec;
|
||||
wakeTime->tv_nsec = tv.tv_usec * 1000;
|
||||
now.tv_sec = tv.tv_sec;
|
||||
now.tv_nsec = tv.tv_usec * 1000;
|
||||
}
|
||||
#endif
|
||||
if (status) {
|
||||
perror("convertDoubleToWakeTime");
|
||||
cantProceed("convertDoubleToWakeTime");
|
||||
}
|
||||
wait.tv_sec = static_cast< long >(timeout);
|
||||
|
||||
wait.tv_sec = static_cast< time_t >(timeout);
|
||||
wait.tv_nsec = static_cast< long >((timeout - (double)wait.tv_sec) * 1e9);
|
||||
wakeTime->tv_sec += wait.tv_sec;
|
||||
wakeTime->tv_nsec += wait.tv_nsec;
|
||||
|
||||
wakeTime->tv_sec = now.tv_sec + wait.tv_sec;
|
||||
wakeTime->tv_nsec = now.tv_nsec + wait.tv_nsec;
|
||||
if (wakeTime->tv_nsec >= 1000000000L) {
|
||||
wakeTime->tv_nsec -= 1000000000L;
|
||||
++wakeTime->tv_sec;
|
||||
|
||||
@@ -48,8 +48,10 @@ static epicsThreadOnceId onceId = EPICS_THREAD_ONCE_INIT;
|
||||
/* Forward references */
|
||||
|
||||
static int ClockTimeGetCurrent(epicsTimeStamp *pDest);
|
||||
static void ClockTimeSync(void *dummy);
|
||||
|
||||
#if defined(vxWorks) || defined(__rtems__)
|
||||
static void ClockTimeSync(void *dummy);
|
||||
#endif
|
||||
|
||||
/* ClockTime_Report iocsh command */
|
||||
static const iocshArg ReportArg0 = { "interest_level", iocshArgArgv};
|
||||
@@ -77,12 +79,14 @@ static void ClockTime_InitOnce(void *psync)
|
||||
ClockTimePvt.lock = epicsMutexCreate();
|
||||
ClockTimePvt.ClockTimeSyncInterval = 1.0; /* First sync */
|
||||
|
||||
#if defined(vxWorks) || defined(__rtems__)
|
||||
if (ClockTimePvt.synchronize) {
|
||||
/* Start the sync thread */
|
||||
epicsThreadCreate("ClockTimeSync", epicsThreadPriorityHigh,
|
||||
epicsThreadGetStackSize(epicsThreadStackSmall),
|
||||
ClockTimeSync, NULL);
|
||||
}
|
||||
#endif
|
||||
|
||||
epicsAtExit(ClockTime_Shutdown, NULL);
|
||||
|
||||
@@ -113,6 +117,7 @@ void ClockTime_Shutdown(void *dummy)
|
||||
|
||||
/* Synchronization thread */
|
||||
|
||||
#if defined(vxWorks) || defined(__rtems__)
|
||||
static void ClockTimeSync(void *dummy)
|
||||
{
|
||||
taskwdInsert(0, NULL, NULL);
|
||||
@@ -148,6 +153,7 @@ static void ClockTimeSync(void *dummy)
|
||||
ClockTimePvt.synchronized = 0;
|
||||
taskwdRemove(0);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/* Time Provider Routine */
|
||||
@@ -159,6 +165,7 @@ static int ClockTimeGetCurrent(epicsTimeStamp *pDest)
|
||||
/* If a Hi-Res clock is available and works, use it */
|
||||
#ifdef CLOCK_REALTIME_HR
|
||||
clock_gettime(CLOCK_REALTIME_HR, &clockNow) &&
|
||||
/* Note: Uses the lo-res clock below if the above call fails */
|
||||
#endif
|
||||
clock_gettime(CLOCK_REALTIME, &clockNow);
|
||||
|
||||
@@ -166,9 +173,15 @@ static int ClockTimeGetCurrent(epicsTimeStamp *pDest)
|
||||
clockNow.tv_sec < POSIX_TIME_AT_EPICS_EPOCH) {
|
||||
clockNow.tv_sec = POSIX_TIME_AT_EPICS_EPOCH + 86400;
|
||||
clockNow.tv_nsec = 0;
|
||||
|
||||
#if defined(vxWorks) || defined(__rtems__)
|
||||
clock_settime(CLOCK_REALTIME, &clockNow);
|
||||
errlogPrintf("WARNING: OS Clock time was read before being set.\n"
|
||||
"Using 1990-01-02 00:00:00.000000 UTC\n");
|
||||
#else
|
||||
errlogPrintf("WARNING: OS Clock pre-dates the EPICS epoch!\n"
|
||||
"Using 1990-01-02 00:00:00.000000 UTC\n");
|
||||
#endif
|
||||
}
|
||||
|
||||
epicsTimeFromTimespec(pDest, &clockNow);
|
||||
|
||||
@@ -48,7 +48,7 @@ MAIN(epicsTimeTest)
|
||||
const int wasteTime = 100000;
|
||||
const int nTimes = 10;
|
||||
|
||||
testPlan(15 + nTimes * 19);
|
||||
testPlan(17 + nTimes * 19);
|
||||
|
||||
try {
|
||||
const epicsTimeStamp epochTS = {0, 0};
|
||||
@@ -216,5 +216,35 @@ MAIN(epicsTimeTest)
|
||||
testOk1(beginTS + diff == now);
|
||||
}
|
||||
|
||||
epicsTime ten_years_hence;
|
||||
try {
|
||||
now = epicsTime::getCurrent();
|
||||
ten_years_hence = now + 60 * 60 * 24 * 3652.5;
|
||||
testPass("epicsTime can represent 10 years hence");
|
||||
}
|
||||
catch ( ... ) {
|
||||
testFail("epicsTime exception for value 10 years hence");
|
||||
}
|
||||
|
||||
try {
|
||||
/* This test exists because in libCom/osi/os/posix/osdTime.cpp
|
||||
* the convertDoubleToWakeTime() routine limits the timeout delay
|
||||
* to 10 years. libCom/timer/timerQueue.cpp returns DBL_MAX for
|
||||
* queues with no timers present, and convertDoubleToWakeTime()
|
||||
* has to return an absolute Posix timestamp. On 2028-01-19 any
|
||||
* systems that still implement time_t as a signed 32-bit integer
|
||||
* will be unable to represent that timestamp, so this will fail.
|
||||
*/
|
||||
time_t_wrapper os_time_t = ten_years_hence;
|
||||
epicsTime then = os_time_t; // No fractional seconds
|
||||
double delta = ten_years_hence - then;
|
||||
|
||||
testOk(delta >= 0 && delta < 1.0,
|
||||
"OS time_t can represent 10 years hence");
|
||||
}
|
||||
catch ( ... ) {
|
||||
testFail("OS time_t conversion exception for value 10 years hence");
|
||||
}
|
||||
|
||||
return testDone();
|
||||
}
|
||||
|
||||
@@ -74,13 +74,13 @@ void testTimer (fdctx *pfdm, double delay)
|
||||
|
||||
epicsTimeGetCurrent (&begin);
|
||||
cbs.done = 0;
|
||||
tmo.tv_sec = (unsigned long) delay;
|
||||
tmo.tv_sec = (time_t) delay;
|
||||
tmo.tv_usec = (unsigned long) ((delay - tmo.tv_sec) * uSecPerSec);
|
||||
aid = fdmgr_add_timeout (pfdm, &tmo, alarmCB, &cbs);
|
||||
verify (aid!=fdmgrNoAlarm);
|
||||
|
||||
while (!cbs.done) {
|
||||
tmo.tv_sec = (unsigned long) delay;
|
||||
tmo.tv_sec = (time_t) delay;
|
||||
tmo.tv_usec = (unsigned long) ((delay - tmo.tv_sec) * uSecPerSec);
|
||||
status = fdmgr_pend_event (pfdm, &tmo);
|
||||
verify (status==0);
|
||||
|
||||
@@ -107,7 +107,7 @@ private:
|
||||
epicsTime exceptMsgTimeStamp;
|
||||
bool cancelPending;
|
||||
static const double exceptMsgMinPeriod;
|
||||
void printExceptMsg ( const char * pName,
|
||||
void printExceptMsg ( const char * pName,
|
||||
const type_info & type );
|
||||
timerQueue ( const timerQueue & );
|
||||
timerQueue & operator = ( const timerQueue & );
|
||||
|
||||
@@ -198,8 +198,8 @@ static long get_alarm_double(DBADDR *paddr,struct dbr_alDouble *pad)
|
||||
|
||||
static void checkAlarms(xxxRecord *prec)
|
||||
{
|
||||
double val;
|
||||
float hyst, lalm, hihi, high, low, lolo;
|
||||
double val, hyst, lalm;
|
||||
float hihi, high, low, lolo;
|
||||
unsigned short hhsv, llsv, hsv, lsv;
|
||||
|
||||
if(prec->udf == TRUE ){
|
||||
|
||||
@@ -26,6 +26,7 @@ LIB_SRCS += miscIocRegister.c
|
||||
LIB_SRCS += dlload.c
|
||||
LIB_SRCS += iocshRegisterCommon.c
|
||||
|
||||
miscIocRegister_CFLAGS_iOS = -DSYSTEM_UNAVAILABLE
|
||||
|
||||
LIBRARY_IOC = miscIoc
|
||||
|
||||
|
||||
@@ -43,6 +43,9 @@ include "devSoft.dbd"
|
||||
registrar(asSub)
|
||||
variable(asCaDebug,int)
|
||||
|
||||
# CA server debug flag (very verbose) range[0,5]
|
||||
variable(CASDEBUG,int)
|
||||
|
||||
# dbStaticLib settings
|
||||
variable(dbRecordsOnceOnly,int)
|
||||
variable(dbBptNotMonotonic,int)
|
||||
|
||||
@@ -16,8 +16,6 @@
|
||||
#define epicsExportSharedSymbols
|
||||
#include "epicsRelease.h"
|
||||
|
||||
static const char id[] = "@(#) " EPICS_VERSION_STRING ", Misc. Utilities Library" __DATE__;
|
||||
|
||||
epicsShareFunc int epicsShareAPI coreRelease(void)
|
||||
{
|
||||
printf ( "############################################################################\n" );
|
||||
|
||||
@@ -66,10 +66,12 @@ void epicsShareAPI miscIocRegister(void)
|
||||
|
||||
/* system -- escape to system command interpreter.
|
||||
*
|
||||
* Disabled by default, for security reasons. To enable this command, add
|
||||
* Disabled by default for security reasons, not available on all OSs.
|
||||
* To enable this command, add
|
||||
* registrar(iocshSystemCommand)
|
||||
* to an application dbd file.
|
||||
* to an application dbd file, or include system.dbd
|
||||
*/
|
||||
#ifndef SYSTEM_UNAVAILABLE
|
||||
static const iocshArg systemArg0 = { "command string",iocshArgString};
|
||||
static const iocshArg * const systemArgs[] = {&systemArg0};
|
||||
static const iocshFuncDef systemFuncDef = {"system",1,systemArgs};
|
||||
@@ -77,12 +79,15 @@ static void systemCallFunc(const iocshArgBuf *args)
|
||||
{
|
||||
system(args[0].sval);
|
||||
}
|
||||
#endif
|
||||
|
||||
static void iocshSystemCommand(void)
|
||||
{
|
||||
#ifndef SYSTEM_UNAVAILABLE
|
||||
if (system(NULL))
|
||||
iocshRegister(&systemFuncDef, systemCallFunc);
|
||||
else
|
||||
#endif
|
||||
errlogPrintf ("Can't register 'system' command -- no command interpreter available.\n");
|
||||
}
|
||||
epicsExportRegistrar(iocshSystemCommand);
|
||||
|
||||
@@ -207,6 +207,14 @@ static long init_record(aSubRecord *prec, int pass)
|
||||
}
|
||||
strcpy(prec->onam, prec->snam);
|
||||
prec->oval = prec->val;
|
||||
for (i = 0; i < NUM_ARGS; i++) {
|
||||
epicsUInt32 nev = (&prec->neva)[i];
|
||||
|
||||
(&prec->onva)[i] = nev;
|
||||
if (nev)
|
||||
memcpy((&prec->ovla)[i], (&prec->vala)[i],
|
||||
dbValueSize((&prec->ftva)[i]) * nev);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
|
||||
#include "dbDefs.h"
|
||||
#include "epicsPrint.h"
|
||||
#include "epicsMath.h"
|
||||
#include "alarm.h"
|
||||
#include "dbAccess.h"
|
||||
#include "dbEvent.h"
|
||||
@@ -201,10 +202,10 @@ static long get_alarm_double(DBADDR *paddr, struct dbr_alDouble *pad)
|
||||
longinRecord *prec=(longinRecord *)paddr->precord;
|
||||
|
||||
if(paddr->pfield==(void *)&prec->val){
|
||||
pad->upper_alarm_limit = prec->hihi;
|
||||
pad->upper_warning_limit = prec->high;
|
||||
pad->lower_warning_limit = prec->low;
|
||||
pad->lower_alarm_limit = prec->lolo;
|
||||
pad->upper_alarm_limit = prec->hhsv ? prec->hihi : epicsNAN;
|
||||
pad->upper_warning_limit = prec->hsv ? prec->high : epicsNAN;
|
||||
pad->lower_warning_limit = prec->lsv ? prec->low : epicsNAN;
|
||||
pad->lower_alarm_limit = prec->llsv ? prec->lolo : epicsNAN;
|
||||
} else recGblGetAlarmDouble(paddr,pad);
|
||||
return(0);
|
||||
}
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
|
||||
#include "dbDefs.h"
|
||||
#include "epicsPrint.h"
|
||||
#include "epicsMath.h"
|
||||
#include "alarm.h"
|
||||
#include "dbAccess.h"
|
||||
#include "dbEvent.h"
|
||||
@@ -242,10 +243,10 @@ static long get_alarm_double(DBADDR *paddr,struct dbr_alDouble *pad)
|
||||
int fieldIndex = dbGetFieldIndex(paddr);
|
||||
|
||||
if(fieldIndex == longoutRecordVAL) {
|
||||
pad->upper_alarm_limit = prec->hihi;
|
||||
pad->upper_warning_limit = prec->high;
|
||||
pad->lower_warning_limit = prec->low;
|
||||
pad->lower_alarm_limit = prec->lolo;
|
||||
pad->upper_alarm_limit = prec->hhsv ? prec->hihi : epicsNAN;
|
||||
pad->upper_warning_limit = prec->hsv ? prec->high : epicsNAN;
|
||||
pad->lower_warning_limit = prec->lsv ? prec->low : epicsNAN;
|
||||
pad->lower_alarm_limit = prec->llsv ? prec->lolo : epicsNAN;
|
||||
} else recGblGetAlarmDouble(paddr,pad);
|
||||
return(0);
|
||||
}
|
||||
|
||||
@@ -216,10 +216,10 @@ va_list args
|
||||
/*
|
||||
* add their context string into the protocol
|
||||
*/
|
||||
localStatus = epicsVsnprintf ( pMsgString, maxDiagLen, pformat, args );
|
||||
localStatus = epicsVsnprintf ( pMsgString, maxDiagLen - size, pformat, args );
|
||||
if ( localStatus >= 1 ) {
|
||||
unsigned diagLen = ( unsigned ) localStatus;
|
||||
if ( diagLen < maxDiagLen ) {
|
||||
if ( diagLen < maxDiagLen - size ) {
|
||||
size += (ca_uint32_t) (diagLen + 1u);
|
||||
}
|
||||
else {
|
||||
@@ -227,7 +227,7 @@ va_list args
|
||||
"caserver: vsend_err: epicsVsnprintf detected "
|
||||
"error message truncation, pFormat = \"%s\"\n",
|
||||
pformat );
|
||||
size += maxDiagLen;
|
||||
size = maxDiagLen;
|
||||
pMsgString [ maxDiagLen - 1 ] = '\0';
|
||||
}
|
||||
}
|
||||
@@ -2528,8 +2528,10 @@ int camessage ( struct client *client )
|
||||
* aligned payloads
|
||||
*/
|
||||
if ( msgsize & 0x7 ) {
|
||||
SEND_LOCK(client);
|
||||
send_err ( &msg, ECA_INTERNAL, client,
|
||||
"CAS: Missaligned protocol rejected" );
|
||||
SEND_UNLOCK(client);
|
||||
log_header ( "CAS: Missaligned protocol rejected",
|
||||
client, &msg, 0, nmsg );
|
||||
status = RSRV_ERROR;
|
||||
@@ -2545,9 +2547,11 @@ int camessage ( struct client *client )
|
||||
if ( msgsize > client->recv.maxstk ) {
|
||||
casExpandRecvBuffer ( client, msgsize );
|
||||
if ( msgsize > client->recv.maxstk ) {
|
||||
SEND_LOCK(client);
|
||||
send_err ( &msg, ECA_TOLARGE, client,
|
||||
"CAS: Server unable to load large request message. Max bytes=%lu",
|
||||
rsrvSizeofLargeBufTCP );
|
||||
SEND_UNLOCK(client);
|
||||
log_header ( "CAS: server unable to load large request message",
|
||||
client, &msg, 0, nmsg );
|
||||
assert ( client->recv.cnt <= client->recv.maxstk );
|
||||
|
||||
@@ -41,30 +41,18 @@
|
||||
void camsgtask ( void *pParm )
|
||||
{
|
||||
struct client *client = (struct client *) pParm;
|
||||
int nchars;
|
||||
int status;
|
||||
|
||||
casAttachThreadToClient ( client );
|
||||
|
||||
/*
|
||||
* send the server's minor version number to the client
|
||||
*/
|
||||
status = cas_copy_in_header ( client, CA_PROTO_VERSION, 0,
|
||||
0, CA_MINOR_PROTOCOL_REVISION, 0, 0, 0 );
|
||||
if ( status != ECA_NORMAL ) {
|
||||
LOCK_CLIENTQ;
|
||||
ellDelete ( &clientQ, &client->node );
|
||||
UNLOCK_CLIENTQ;
|
||||
destroy_tcp_client ( client );
|
||||
return;
|
||||
}
|
||||
|
||||
while (castcp_ctl == ctlRun && !client->disconnect) {
|
||||
osiSockIoctl_t check_nchars;
|
||||
long nchars;
|
||||
int status;
|
||||
|
||||
/*
|
||||
* allow message to batch up if more are comming
|
||||
*/
|
||||
status = socket_ioctl (client->sock, FIONREAD, &nchars);
|
||||
status = socket_ioctl (client->sock, FIONREAD, &check_nchars);
|
||||
if (status < 0) {
|
||||
char sockErrBuf[64];
|
||||
|
||||
@@ -74,7 +62,7 @@ void camsgtask ( void *pParm )
|
||||
sockErrBuf);
|
||||
cas_send_bs_msg(client, TRUE);
|
||||
}
|
||||
else if (nchars == 0){
|
||||
else if (check_nchars == 0){
|
||||
cas_send_bs_msg(client, TRUE);
|
||||
}
|
||||
|
||||
@@ -150,6 +138,9 @@ void camsgtask ( void *pParm )
|
||||
}
|
||||
else {
|
||||
char buf[64];
|
||||
|
||||
/* flush any queued messages before shutdown */
|
||||
cas_send_bs_msg(client, 1);
|
||||
|
||||
client->recv.cnt = 0ul;
|
||||
|
||||
|
||||
@@ -37,11 +37,18 @@
|
||||
* cas_send_bs_msg()
|
||||
*
|
||||
* (channel access server send message)
|
||||
*
|
||||
*
|
||||
* Set lock_needed=1 unless SEND_LOCK() is held by caller
|
||||
*/
|
||||
void cas_send_bs_msg ( struct client *pclient, int lock_needed )
|
||||
{
|
||||
int status;
|
||||
|
||||
if ( lock_needed ) {
|
||||
SEND_LOCK ( pclient );
|
||||
}
|
||||
|
||||
if ( CASDEBUG > 2 && pclient->send.stk ) {
|
||||
errlogPrintf ( "CAS: Sending a message of %d bytes\n", pclient->send.stk );
|
||||
}
|
||||
@@ -52,13 +59,11 @@ void cas_send_bs_msg ( struct client *pclient, int lock_needed )
|
||||
pclient->sock, (unsigned) pclient->addr.sin_addr.s_addr );
|
||||
}
|
||||
pclient->send.stk = 0u;
|
||||
if(lock_needed)
|
||||
SEND_UNLOCK(pclient);
|
||||
return;
|
||||
}
|
||||
|
||||
if ( lock_needed ) {
|
||||
SEND_LOCK ( pclient );
|
||||
}
|
||||
|
||||
while ( pclient->send.stk && ! pclient->disconnect ) {
|
||||
status = send ( pclient->sock, pclient->send.buf, pclient->send.stk, 0 );
|
||||
if ( status >= 0 ) {
|
||||
|
||||
@@ -241,7 +241,6 @@ int rsrv_init (void)
|
||||
|
||||
clientQlock = epicsMutexMustCreate();
|
||||
|
||||
ellInit ( &clientQ );
|
||||
freeListInitPvt ( &rsrvClientFreeList, sizeof(struct client), 8 );
|
||||
freeListInitPvt ( &rsrvChanFreeList, sizeof(struct channel_in_use), 512 );
|
||||
freeListInitPvt ( &rsrvEventFreeList, sizeof(struct event_ext), 512 );
|
||||
@@ -951,16 +950,22 @@ struct client *create_tcp_client ( SOCKET sock )
|
||||
|
||||
void casStatsFetch ( unsigned *pChanCount, unsigned *pCircuitCount )
|
||||
{
|
||||
LOCK_CLIENTQ;
|
||||
if ( ! clientQlock ) {
|
||||
*pCircuitCount = 0;
|
||||
*pChanCount = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
LOCK_CLIENTQ;
|
||||
{
|
||||
int circuitCount = ellCount ( &clientQ );
|
||||
if ( circuitCount < 0 ) {
|
||||
*pCircuitCount = 0;
|
||||
*pCircuitCount = 0;
|
||||
}
|
||||
else {
|
||||
*pCircuitCount = (unsigned) circuitCount;
|
||||
*pCircuitCount = (unsigned) circuitCount;
|
||||
}
|
||||
*pChanCount = rsrvChannelCount;
|
||||
}
|
||||
UNLOCK_CLIENTQ;
|
||||
UNLOCK_CLIENTQ;
|
||||
}
|
||||
|
||||
@@ -72,7 +72,7 @@ void rsrv_online_notify_task(void *pParm)
|
||||
char * pStr;
|
||||
int autoBeaconAddr;
|
||||
ELLLIST autoAddrList;
|
||||
char buf[16];
|
||||
char buf[22];
|
||||
unsigned priorityOfUDP;
|
||||
epicsThreadBooleanStatus tbs;
|
||||
epicsThreadId tid;
|
||||
|
||||
@@ -7,11 +7,15 @@
|
||||
* in file LICENSE that is included with this distribution.
|
||||
\*************************************************************************/
|
||||
|
||||
#include "osiSock.h"
|
||||
#include "iocsh.h"
|
||||
#define epicsExportSharedSymbols
|
||||
#include "rsrv.h"
|
||||
#include "server.h"
|
||||
#include "rsrvIocRegister.h"
|
||||
|
||||
#include "epicsExport.h"
|
||||
|
||||
/* casr */
|
||||
static const iocshArg casrArg0 = { "level",iocshArgInt};
|
||||
static const iocshArg * const casrArgs[1] = {&casrArg0};
|
||||
@@ -21,8 +25,9 @@ static void casrCallFunc(const iocshArgBuf *args)
|
||||
casr(args[0].ival);
|
||||
}
|
||||
|
||||
|
||||
void epicsShareAPI rsrvIocRegister(void)
|
||||
{
|
||||
iocshRegister(&casrFuncDef,casrCallFunc);
|
||||
}
|
||||
|
||||
epicsExportAddress(int, CASDEBUG);
|
||||
|
||||
@@ -62,8 +62,10 @@ typedef struct caHdrLargeArray {
|
||||
enum messageBufferType { mbtUDP, mbtSmallTCP, mbtLargeTCP };
|
||||
struct message_buffer {
|
||||
char *buf;
|
||||
/*! points to first filled byte in buffer */
|
||||
unsigned stk;
|
||||
unsigned maxstk;
|
||||
/*! points to first unused byte in buffer (after filled bytes) */
|
||||
unsigned cnt;
|
||||
enum messageBufferType type;
|
||||
};
|
||||
@@ -72,7 +74,9 @@ extern epicsThreadPrivateId rsrvCurrentClient;
|
||||
|
||||
typedef struct client {
|
||||
ELLNODE node;
|
||||
/*! guarded by SEND_LOCK() aka. client::lock */
|
||||
struct message_buffer send;
|
||||
/*! accessed by receive thread w/o locks cf. camsgtask() */
|
||||
struct message_buffer recv;
|
||||
epicsMutexId lock;
|
||||
epicsMutexId putNotifyLock;
|
||||
@@ -156,7 +160,7 @@ enum ctl {ctlInit, ctlRun, ctlPause, ctlExit};
|
||||
/* NOTE: external used so they remember the state across loads */
|
||||
#ifdef GLBLSOURCE
|
||||
# define GLBLTYPE
|
||||
# define GLBLTYPE_INIT(A)
|
||||
# define GLBLTYPE_INIT(A) = A
|
||||
#else
|
||||
# define GLBLTYPE extern
|
||||
# define GLBLTYPE_INIT(A)
|
||||
@@ -176,7 +180,7 @@ GLBLTYPE int CASDEBUG;
|
||||
GLBLTYPE SOCKET IOC_sock;
|
||||
GLBLTYPE SOCKET IOC_cast_sock;
|
||||
GLBLTYPE unsigned short ca_server_port;
|
||||
GLBLTYPE ELLLIST clientQ; /* locked by clientQlock */
|
||||
GLBLTYPE ELLLIST clientQ GLBLTYPE_INIT(ELLLIST_INIT);
|
||||
GLBLTYPE ELLLIST beaconAddrList;
|
||||
GLBLTYPE epicsMutexId clientQlock;
|
||||
GLBLTYPE struct client *prsrv_cast_client;
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
eval 'exec perl -S $0 ${1+"$@"}' # -*- Mode: perl -*-
|
||||
if $running_under_some_shell;
|
||||
#!/usr/bin/env perl
|
||||
#*************************************************************************
|
||||
# Copyright (c) 2010 UChicago Argonne LLC, as Operator of Argonne
|
||||
# National Laboratory.
|
||||
|
||||
55
src/tools/EpicsHostArch.pl
Normal file
55
src/tools/EpicsHostArch.pl
Normal file
@@ -0,0 +1,55 @@
|
||||
#!/usr/bin/env perl
|
||||
#*************************************************************************
|
||||
# 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.
|
||||
#*************************************************************************
|
||||
|
||||
# Returns an architecture name for EPICS_HOST_ARCH that should be
|
||||
# appropriate for the CPU that this version of Perl was built for.
|
||||
# Any arguments to the program will be appended with separator '-'
|
||||
# to allow flags like -gnu -debug and/or -static to be added.
|
||||
|
||||
# Before Base has been built, use a command like this:
|
||||
# bash$ export EPICS_HOST_ARCH=`perl src/tools/EpicsHostArch.pl`
|
||||
#
|
||||
# If Base is already built, use
|
||||
# tcsh% setenv EPICS_HOST_ARCH `perl base/lib/perl/EpicsHostArch.pl`
|
||||
|
||||
# If your architecture is not recognized by this script, please send
|
||||
# the output from running 'perl --version' to the EPICS tech-talk
|
||||
# mailing list to have it added.
|
||||
|
||||
use strict;
|
||||
|
||||
use Config;
|
||||
use POSIX;
|
||||
|
||||
print join('-', HostArch(), @ARGV), "\n";
|
||||
|
||||
sub HostArch {
|
||||
my $arch = $Config{archname};
|
||||
for ($arch) {
|
||||
return 'linux-x86_64' if m/^x86_64-linux/;
|
||||
return 'linux-x86' if m/^i[3-6]86-linux/;
|
||||
return 'linux-arm' if m/^arm-linux/;
|
||||
return 'windows-x64' if m/^MSWin32-x64/;
|
||||
return 'win32-x86' if m/^MSWin32-x86/;
|
||||
return "cygwin-x86_64" if m/^x86_64-cygwin/;
|
||||
return "cygwin-x86" if m/^i[3-6]86-cygwin/;
|
||||
return 'solaris-sparc' if m/^sun4-solaris/;
|
||||
return 'solaris-x86' if m/^i86pc-solaris/;
|
||||
|
||||
my ($kernel, $hostname, $release, $version, $cpu) = uname;
|
||||
if (m/^darwin/) {
|
||||
for ($cpu) {
|
||||
return 'darwin-x86' if m/^(i386|x86_64)/;
|
||||
return 'darwin-ppc' if m/Power Macintosh/;
|
||||
}
|
||||
die "$0: macOS CPU type '$cpu' not recognized\n";
|
||||
}
|
||||
|
||||
die "$0: Architecture '$arch' not recognized\n";
|
||||
}
|
||||
}
|
||||
@@ -16,6 +16,9 @@ PERL_MODULES += EPICS/Path.pm
|
||||
PERL_MODULES += EPICS/Release.pm
|
||||
PERL_MODULES += EPICS/Getopts.pm
|
||||
|
||||
# This goes into lib/perl, not bin/<host>
|
||||
PERL_MODULES += EpicsHostArch.pl
|
||||
|
||||
PERL_SCRIPTS += convertRelease.pl
|
||||
PERL_SCRIPTS += cvsclean.pl
|
||||
PERL_SCRIPTS += dos2unix.pl
|
||||
@@ -28,7 +31,9 @@ PERL_SCRIPTS += makeMakefile.pl
|
||||
PERL_SCRIPTS += makeTestfile.pl
|
||||
PERL_SCRIPTS += mkmf.pl
|
||||
PERL_SCRIPTS += munch.pl
|
||||
PERL_SCRIPTS += podToHtml.pl
|
||||
PERL_SCRIPTS += replaceVAR.pl
|
||||
PERL_SCRIPTS += tap-to-junit-xml.pl
|
||||
PERL_SCRIPTS += useManifestTool.pl
|
||||
|
||||
include $(TOP)/configure/RULES
|
||||
|
||||
@@ -21,8 +21,7 @@ use Getopt::Std;
|
||||
use EPICS::Path;
|
||||
use EPICS::Release;
|
||||
|
||||
use vars qw($arch $top $iocroot $root);
|
||||
|
||||
our ($arch, $top, $iocroot, $root);
|
||||
our ($opt_a, $opt_t, $opt_T);
|
||||
|
||||
$Getopt::Std::OUTPUT_HELP_VERSION = 1;
|
||||
|
||||
45
src/tools/podToHtml.pl
Normal file
45
src/tools/podToHtml.pl
Normal file
@@ -0,0 +1,45 @@
|
||||
#!/usr/bin/env perl
|
||||
#*************************************************************************
|
||||
# Copyright (c) 2013 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.
|
||||
#*************************************************************************
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
use Getopt::Std;
|
||||
use Pod::Simple::HTML;
|
||||
|
||||
our ($opt_o);
|
||||
|
||||
$Getopt::Std::OUTPUT_HELP_VERSION = 1;
|
||||
&HELP_MESSAGE if !getopts('o:') || @ARGV != 1;
|
||||
|
||||
my $infile = shift @ARGV;
|
||||
|
||||
if (!$opt_o) {
|
||||
($opt_o = $infile) =~ s/\. \w+ $/.html/x;
|
||||
$opt_o =~ s/^.*\///;
|
||||
}
|
||||
|
||||
open my $out, '>', $opt_o or
|
||||
die "Can't create $opt_o: $!\n";
|
||||
|
||||
my $podHtml = Pod::Simple::HTML->new();
|
||||
|
||||
$podHtml->html_css('style.css');
|
||||
$podHtml->perldoc_url_prefix('');
|
||||
$podHtml->perldoc_url_postfix('.html');
|
||||
$podHtml->set_source($infile);
|
||||
$podHtml->output_string(\my $html);
|
||||
$podHtml->run;
|
||||
|
||||
print $out $html;
|
||||
close $out;
|
||||
|
||||
sub HELP_MESSAGE {
|
||||
print STDERR "Usage: podToHtml.pl [-o file.html] file.pod\n";
|
||||
exit 2;
|
||||
}
|
||||
546
src/tools/tap-to-junit-xml.pl
Normal file
546
src/tools/tap-to-junit-xml.pl
Normal file
@@ -0,0 +1,546 @@
|
||||
#!/usr/local/bin/perl
|
||||
=head1 NAME
|
||||
|
||||
tap-to-junit-xml - convert perl-style TAP test output to JUnit-style XML
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
tap-to-junit-xml [--help|--man]
|
||||
[--[no]hidesummary]
|
||||
[--input <tap input file>]
|
||||
[--output <junit output file>]
|
||||
[--puretap]
|
||||
[<test suite name>] [outputprefix]
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
Parse test suite output in TAP (Test Anything Protocol,
|
||||
C<http://testanything.org/>) format, and produce XML output in a similar format
|
||||
to that produced by the <junit> ant task. This is useful for consumption by
|
||||
continuous-integration systems like Hudson (C<https://hudson.dev.java.net/>).
|
||||
|
||||
C<"test suite name"> is a descriptive string used as the B<name> attribute on the
|
||||
top-level <testsuites> node of the output XML. Defaults to "make test".
|
||||
|
||||
If C<outputprefix> is specified, multi-file output will be generated, with
|
||||
multiple XML files created using C<outputprefix> as the start of their
|
||||
filenames. The files are separated by testplan. This option is ignored
|
||||
if --puretap is specified (TAP only allows one testplan per input file).
|
||||
This prefix may contain slashes, in which case the files will be
|
||||
placed into a directory hierarchy accordingly (although care should be taken to
|
||||
ensure these directories exist in advance).
|
||||
|
||||
If --input I<file name> is not specified, STDIN will be read.
|
||||
If C<outputprefix> or --output is not specified, a single XML file will be
|
||||
generated on STDOUT.
|
||||
|
||||
--output I<file name> is used to write a single XML file to I<file name>.
|
||||
|
||||
--puretap parses a single TAP source and handles parse errors and directives
|
||||
(todo, skip, bailout). --puretap ignores unknown (non-TAP) input. Without
|
||||
--puretap, the script will parse some additional non-TAP test input, such as
|
||||
Perl tests that can include a "Test Summary Report", but it won't generate
|
||||
correct XML unless the TAP testplan comes before the test cases.
|
||||
--hidesummary report (the default) will hide the summary report, --no-hidesummary
|
||||
will display it (neither has an effect when --puretap is specified).
|
||||
|
||||
=head1 EXAMPLE
|
||||
|
||||
prove -v 2>&1 | tee tests.log
|
||||
tap-to-junit-xml "make test" testxml/tests < tests.log
|
||||
|
||||
(JUnit-formatted XML is now in "testxml/tests*.xml".)
|
||||
|
||||
=head1 DEPENDENCIES
|
||||
|
||||
Getopt::Long
|
||||
Pod::Usage
|
||||
TAP::Parser
|
||||
Time::HiRes
|
||||
XML::Generator
|
||||
|
||||
=head1 BUGS
|
||||
|
||||
- Output is optimized for Hudson, and may not look quite as good in
|
||||
other UIs.
|
||||
- Doesn't do anything with the STDERR from tests.
|
||||
- Doesn't fill in the 'errors' attribute in the <testsuite> element.
|
||||
(--puretap handles parse errors)
|
||||
- Doesn't handle "todo" or "skip" (--puretap does)
|
||||
- Doesn't get the elapsed time for each 'test' (i.e. assertion.)
|
||||
(TAP output has no elapsed time convention).
|
||||
|
||||
=head1 SOURCE
|
||||
|
||||
http://github.com/jmason/tap-to-junit-xml/tree/master
|
||||
|
||||
=head1 AUTHOR
|
||||
|
||||
original, junit_xml.pl, by Matisse Enzer <matisse at matisse.net>; see
|
||||
C<http://twoalpha.blogspot.com/2007/01/junit-style-xml-from-perl-test-files.html>.
|
||||
|
||||
pretty much entirely rewritten by Justin Mason <junit at jmason.org>, Feb 2008.
|
||||
|
||||
Miscellaneous fixes and mods (--puretap) by Jascha Lee <jascha at yahoo-inc.com>, Mar 2009.
|
||||
|
||||
=head1 VERSION
|
||||
|
||||
Mar 27 2008 jm
|
||||
Mar 17 2009 jl
|
||||
|
||||
=head1 COPYRIGHT & LICENSE
|
||||
|
||||
Copyright (c) 2007 Matisse Enzer. All Rights Reserved.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
under the same terms as Perl itself.
|
||||
=cut
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
use Getopt::Long qw(:config no_ignore_case);
|
||||
use Pod::Usage;
|
||||
use TAP::Parser;
|
||||
use Time::HiRes qw(gettimeofday tv_interval);
|
||||
use XML::Generator qw(:noimport);
|
||||
|
||||
my %opts;
|
||||
pod2usage() unless GetOptions( \%opts, 'help|h',
|
||||
'hidesummary!',
|
||||
'input=s',
|
||||
'man',
|
||||
'output=s',
|
||||
'puretap'
|
||||
);
|
||||
|
||||
pod2usage(-verbose => 1) if defined $opts{'help'};
|
||||
pod2usage(-verbose => 2) if defined $opts{'man'};
|
||||
|
||||
my $opt_suitename = shift @ARGV;
|
||||
my $opt_multifile = 0;
|
||||
my $opt_mfprefix;
|
||||
|
||||
if (defined $ARGV[0]) {
|
||||
$opt_multifile = 1;
|
||||
$opt_mfprefix = $ARGV[0];
|
||||
}
|
||||
|
||||
# should the 'Test Summary Report' at the end of a test suite be displayed
|
||||
# as if it was a testcase? in my opinion, no
|
||||
my $HIDE_TEST_SUMMARY_REPORT = defined $opts{'hidesummary'} ? $opts{'hidesummary'} : 1;
|
||||
|
||||
my $suite_name = $opt_suitename || 'make test';
|
||||
my $safe_suite_name = $suite_name; $safe_suite_name =~ s/[^-:_A-Za-z0-9]+/_/gs;
|
||||
|
||||
# TODO: it'd be nice to respect 'Universal desirable behavior #1' from
|
||||
# http://testanything.org/wiki/index.php/TAP_Consumers -- 'Should work on the
|
||||
# TAP as a stream (ie. as each line is received) rather than wait until all the
|
||||
# TAP is received'. But it seems TAP::Parser itself doesn't support it!
|
||||
# maybe when TAP::Parser does that, we'll do it too.
|
||||
my $tapfh;
|
||||
if ( defined $opts{'input'} ) {
|
||||
open $tapfh, '<', $opts{'input'} or die "Can't open TAP file '$opts{'input'}': $!\n";
|
||||
}
|
||||
else {
|
||||
$tapfh = \*STDIN;
|
||||
}
|
||||
|
||||
my $outfh;
|
||||
if ( defined $opts{'output'} ) {
|
||||
open $outfh, '>', $opts{'output'} or die "Can't open output file '$opts{'output'}' for writing: $!\n";
|
||||
}
|
||||
else {
|
||||
$outfh = \*STDOUT;
|
||||
}
|
||||
|
||||
my $tap = TAP::Parser->new( { source => $tapfh } );
|
||||
my $xmlgen = XML::Generator->new( ':pretty');
|
||||
my $xmlgenunescaped = XML::Generator->new( escape => 'unescaped',
|
||||
conformance => 'strict',
|
||||
pretty => 2
|
||||
);
|
||||
my @properties = _get_properties($xmlgen);
|
||||
if ( defined $opts{'puretap'} ) {
|
||||
#
|
||||
# Instead of trying to parse everything in one pass, which fails if the
|
||||
# testplan is last, parse through the results for the test cases and
|
||||
# then construct the <testsuite> information from the TAP and wrap it
|
||||
# around the test cases. Ignore 'unknown' information. [JL]
|
||||
#
|
||||
my @testcases = _parse_testcases( $tap, $xmlgen );
|
||||
errorOut( $tap, $xmlgen ) if $tap->parse_errors;
|
||||
print $outfh $xmlgen->testsuites(
|
||||
$xmlgen->testsuite( { name => $safe_suite_name,
|
||||
tests => $tap->tests_planned,
|
||||
failures => scalar $tap->failed,
|
||||
errors => 0,
|
||||
time => 0,
|
||||
id => 1 },
|
||||
@testcases ));
|
||||
|
||||
}
|
||||
else {
|
||||
my $test_results = _parse_tests( $tap, $xmlgen );
|
||||
if ($opt_multifile) {
|
||||
_gen_junit_multifile_xml( $xmlgen, \@properties, $test_results );
|
||||
} else {
|
||||
print $outfh _get_junit_xml( $xmlgen, \@properties, $test_results );
|
||||
}
|
||||
}
|
||||
exit;
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
sub _get_junit_xml {
|
||||
my ( $xmlgen, $properties, $test_results ) = @_;
|
||||
my $xml = "<?xml version='1.0' encoding='UTF-8' ?>\n" .
|
||||
$xmlgen->testsuites({
|
||||
name => $suite_name,
|
||||
}, @$test_results);
|
||||
return $xml;
|
||||
}
|
||||
|
||||
sub _gen_junit_multifile_xml {
|
||||
my ( $xmlgen, $properties, $test_results ) = @_;
|
||||
my $count = 1;
|
||||
foreach my $testsuite (@$test_results) {
|
||||
open OUT, ">${opt_mfprefix}.${count}.xml"
|
||||
or die "cannot write ${opt_mfprefix}.${count}.xml";
|
||||
print OUT "<?xml version='1.0' encoding='UTF-8' ?>\n";
|
||||
print OUT $testsuite;
|
||||
close OUT;
|
||||
$count++;
|
||||
}
|
||||
}
|
||||
|
||||
#
|
||||
# Wrap up parse errors and output them as test cases.
|
||||
#
|
||||
sub errorOut {
|
||||
my $parser = shift;
|
||||
my $xmlgen = shift;
|
||||
die "errorOut() needs some args" unless $parser and $xmlgen;
|
||||
my ($xml, @errors, $name);
|
||||
my $count = 1;
|
||||
foreach my $error ( $parser->parse_errors ) {
|
||||
$name = sprintf "%s%02d", 'Error_', $count++;
|
||||
$xml = $xmlgen->testcase( { name => $name,
|
||||
classname => 'TestsNotRun.ParseError',
|
||||
time => 0 },
|
||||
|
||||
$xmlgen->error( { type => 'TAPParseError',
|
||||
message => $error } ));
|
||||
push @errors, $xml;
|
||||
}
|
||||
print $outfh $xmlgen->testsuites(
|
||||
$xmlgen->testsuite( { name => 'TestsNotRun.ParseError',
|
||||
tests => $tap->tests_planned,
|
||||
failures => 0,
|
||||
errors => scalar $tap->parse_errors,
|
||||
time => 0,
|
||||
id => 1 },
|
||||
@errors ));
|
||||
exit 86;
|
||||
}
|
||||
|
||||
#
|
||||
# Construct an array of XML'd test cases
|
||||
#
|
||||
sub _parse_testcases {
|
||||
my $parser = shift;
|
||||
my $xmlgen = shift;
|
||||
return () unless $parser and $xmlgen;
|
||||
my ($name, $directive, $xml, @testcases);
|
||||
|
||||
while ( my $result = $parser->next ) {
|
||||
if ( $result->is_bailout ) {
|
||||
$xml = $xmlgen->testcase( { name => 'BailOut',
|
||||
classname => "$safe_suite_name.Tests",
|
||||
time => 0 },
|
||||
|
||||
$xmlgen->error( { type => 'BailOut',
|
||||
message => $result->explanation } ));
|
||||
|
||||
push @testcases, $xml;
|
||||
last;
|
||||
}
|
||||
next unless $result->is_test;
|
||||
$directive = $result->directive;
|
||||
$name = sprintf "%s%02d", 'Test_', $result->number;
|
||||
$name .= "_$directive" if $directive;
|
||||
if ( $result->is_ok ) {
|
||||
$xml = $xmlgen->testcase( { name => $name,
|
||||
classname => "$safe_suite_name.Tests",
|
||||
time => 0 } );
|
||||
push @testcases, $xml;
|
||||
}
|
||||
else {
|
||||
$xml = $xmlgen->testcase( { name => $name,
|
||||
classname => "$safe_suite_name.Tests",
|
||||
time => 0 },
|
||||
$xmlgen->failure( { type => 'TAPTestFailed',
|
||||
message => $result->as_string } ));
|
||||
push @testcases, $xml;
|
||||
}
|
||||
}
|
||||
|
||||
return @testcases;
|
||||
}
|
||||
|
||||
sub _parse_tests {
|
||||
my ( $parser, $xmlgen ) = @_;
|
||||
|
||||
my $ctx = {
|
||||
testsuites => [ ],
|
||||
test_name => 'notest',
|
||||
plan_ntests => 0,
|
||||
case_id => 0,
|
||||
};
|
||||
|
||||
_new_ctx($ctx);
|
||||
|
||||
my $lastunk = '';
|
||||
|
||||
# unknown t/basic_lint.........
|
||||
# plan 1..1
|
||||
# comment # Running under perl version 5.008008 for linux
|
||||
# comment # Current time local: Thu Jan 24 17:44:30 2008
|
||||
# comment # Current time GMT: Thu Jan 24 17:44:30 2008
|
||||
# comment # Using Test.pm version 1.25
|
||||
# unknown /usr/bin/perl -T -w ../spamassassin.raw -C log/test_rules_copy --siteconfigpath log/localrules.tmp -p log/test_default.cf -L --lint
|
||||
# unknown Checking anything
|
||||
# test ok 1
|
||||
# test ok 2
|
||||
# unknown t/basic_meta.........
|
||||
# plan 1..2
|
||||
# comment # Running under perl version 5.008008 for linux
|
||||
# comment # Current time local: Thu Jan 24 17:44:31 2008
|
||||
# comment # Current time GMT: Thu Jan 24 17:44:31 2008
|
||||
# comment # Using Test.pm version 1.25
|
||||
# test not ok 1
|
||||
# comment # Failed test 1 in t/basic_meta.t at line 91
|
||||
# test ok 2
|
||||
# unknown Failed 1/2 subtests
|
||||
# unknown t/basic_obj_api......
|
||||
# plan 1..4
|
||||
# comment # Running under perl version 5.008008 for linux
|
||||
# comment # Current time local: Thu Jan 24 17:44:33 2008
|
||||
# comment # Current time GMT: Thu Jan 24 17:44:33 2008
|
||||
# comment # Using Test.pm version 1.25
|
||||
# test ok 1
|
||||
# test ok 2
|
||||
# test ok 3
|
||||
# test ok 4
|
||||
# test ok 9
|
||||
# unknown
|
||||
# unknown Test Summary Report
|
||||
# unknown -------------------
|
||||
# unknown t/basic_meta.t (Wstat: 0 Tests: 2 Failed: 1)
|
||||
# unknown Failed test: 1
|
||||
# unknown Files=3, Tests=7, 6 wallclock secs ( 0.01 usr 0.00 sys + 4.39 cusr 0.23 csys = 4.63 CPU)
|
||||
# unknown Result: FAIL
|
||||
# unknown Failed 1/3 test programs. 1/7 subtests failed.
|
||||
# unknown make: *** [test_dynamic] Error 255
|
||||
|
||||
while ( my $r = $parser->next ) {
|
||||
my $t = $r->type;
|
||||
my $s = $r->as_string; $s =~ s/\s+$//;
|
||||
|
||||
# warn "JMD $t $s";
|
||||
|
||||
if ($t eq 'unknown') {
|
||||
$lastunk = $s;
|
||||
|
||||
# PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(1, 'blib/lib', 'blib/arch')" t/basic_*
|
||||
# if ($s =~ /test_harness\(.*?\)" (.+)$/) {
|
||||
# $suite_name = $1;
|
||||
# }
|
||||
if ($s =~ /^Test Summary Report$/) {
|
||||
# create a <testsuite> block for the summary
|
||||
$ctx->{plan_ntests} = 0;
|
||||
$ctx->{test_name} = "Test Summary Report";
|
||||
$ctx->{case_tests} = 1;
|
||||
_finish_test_block($ctx);
|
||||
}
|
||||
elsif ($s =~ /^Result: FAIL$/) {
|
||||
$ctx->{case_tests}++;
|
||||
$ctx->{case_failures}++;
|
||||
my $test_case = {
|
||||
classname => test_name_to_classname($ctx->{test_name}),
|
||||
name => 'result',
|
||||
'time' => 0,
|
||||
};
|
||||
my $failure = $xmlgen->failure({
|
||||
type => "OverallTestsFailed",
|
||||
message => $s
|
||||
}, "__FAILUREMESSAGETODO__");
|
||||
|
||||
if (!$HIDE_TEST_SUMMARY_REPORT) {
|
||||
push @{$ctx->{test_cases}}, $xmlgen->testcase($test_case, $failure);
|
||||
}
|
||||
}
|
||||
elsif ($s =~ /^(\S+?)\.\.\.+1\.\.(\d+?)\s*$/) {
|
||||
# perl 5.6.x "Test" format plan line
|
||||
# unknown t/basic_lint....................1..1
|
||||
|
||||
my ($name, $nt) = ($1,$2);
|
||||
if ($ctx->{plan_ntests}) { # only if there have been tests planned
|
||||
_finish_test_block($ctx);
|
||||
}
|
||||
|
||||
$ctx->{plan_ntests} = $nt+0;
|
||||
$ctx->{test_name} = "$name.t";
|
||||
}
|
||||
}
|
||||
elsif ($t eq 'plan') {
|
||||
if ($ctx->{plan_ntests}) { # only if there have been tests planned
|
||||
_finish_test_block($ctx);
|
||||
}
|
||||
|
||||
$ctx->{plan_ntests} = 0;
|
||||
$s =~ /(\d+)$/ and $ctx->{plan_ntests} = $1+0;
|
||||
|
||||
$ctx->{test_name} = $lastunk;
|
||||
$ctx->{test_name} =~ s/\.*\s*$//gs;
|
||||
$ctx->{test_name} .= ".t";
|
||||
}
|
||||
elsif ($t eq 'test') {
|
||||
my $ntest = 0;
|
||||
if ($s =~ /(?:not |)\S+ (\d+)/) { $ntest = $1+0; }
|
||||
|
||||
if ($ntest > $ctx->{plan_ntests}) {
|
||||
# jump in test numbers, more than planned; this is probably TAP::Parser's wierdness.
|
||||
# (when it sees the "ok" line at the end of a test case with no number,
|
||||
# it outputs the current total number of tests so far.)
|
||||
next;
|
||||
}
|
||||
|
||||
# clean this up in a Hudson-compatible way; ":" and "/" are out, "." also causes
|
||||
# trouble by creating an extra "directory" in the results
|
||||
|
||||
my $test_case = {
|
||||
classname => test_name_to_classname($ctx->{test_name}),
|
||||
name => sprintf("test %6d", $ntest), # space-padding ensures ordering
|
||||
'time' => 0,
|
||||
};
|
||||
|
||||
$ctx->{case_tests}++;
|
||||
my $failure = undef;
|
||||
if ($s =~ /^not /i) {
|
||||
$ctx->{case_failures}++;
|
||||
$failure = $xmlgen->failure({
|
||||
type => "TAPTestFailed",
|
||||
message => $s
|
||||
}, "__FAILUREMESSAGETODO__");
|
||||
push @{$ctx->{test_cases}}, $xmlgen->testcase($test_case, $failure);
|
||||
}
|
||||
else {
|
||||
push @{$ctx->{test_cases}}, $xmlgen->testcase($test_case);
|
||||
}
|
||||
}
|
||||
|
||||
$ctx->{sysout} .= $s."\n";
|
||||
}
|
||||
|
||||
if (scalar(@{$ctx->{test_cases}}) == 0 &&
|
||||
scalar(@{$ctx->{testsuites}}) == 0)
|
||||
{
|
||||
# no tests found! create a <testsuite> block containing *something* at least
|
||||
$ctx->{case_tests}++;
|
||||
my $test_case = {
|
||||
classname => test_name_to_classname($ctx->{test_name}),
|
||||
name => 'result',
|
||||
'time' => 0,
|
||||
};
|
||||
push @{$ctx->{test_cases}}, $xmlgen->testcase($test_case);
|
||||
}
|
||||
|
||||
_finish_test_block($ctx);
|
||||
return $ctx->{testsuites};
|
||||
}
|
||||
|
||||
sub _new_ctx {
|
||||
my $ctx = shift;
|
||||
$ctx->{start_time} = [gettimeofday];
|
||||
$ctx->{test_cases} = [];
|
||||
$ctx->{case_tests} = 0;
|
||||
$ctx->{case_failures} = 0;
|
||||
$ctx->{case_time} = 0;
|
||||
$ctx->{case_id}++;
|
||||
$ctx->{sysout} = '';
|
||||
return $ctx;
|
||||
}
|
||||
|
||||
sub _finish_test_block {
|
||||
my $ctx = shift;
|
||||
$ctx->{sysout} =~ s/\n\S+\.*\s*\n$/\n/s; # remove next test's "t/foo....." line
|
||||
|
||||
my $elapsed_time = 0; # TODO
|
||||
#my $elapsed_time = tv_interval( $ctx->{start_time}, [gettimeofday] );
|
||||
|
||||
# clean it up to valid Java packagename format (or at least something Hudson will
|
||||
# consume)
|
||||
my $name = $ctx->{test_name};
|
||||
$name =~ s/[^-:_A-Za-z0-9]+/_/gs;
|
||||
$name = "$safe_suite_name.$name"; # a "directory" for the suite name
|
||||
|
||||
my $testsuite = {
|
||||
'time' => $elapsed_time,
|
||||
'name' => $name,
|
||||
tests => $ctx->{case_tests},
|
||||
failures => $ctx->{case_failures},
|
||||
'id' => $ctx->{case_id},
|
||||
errors => 0,
|
||||
};
|
||||
|
||||
my @fixedcases = ();
|
||||
foreach my $tc (@{$ctx->{test_cases}}) {
|
||||
if ($tc =~ s/__FAILUREMESSAGETODO__/ cdata($ctx->{sysout}) /ges) {
|
||||
push @fixedcases, \$tc; # inhibits escaping!
|
||||
} else {
|
||||
push @fixedcases, $tc;
|
||||
}
|
||||
}
|
||||
|
||||
# use "unescaped"; we have already fixed escaping on these strings.
|
||||
# note that a reference means 'this is unescaped', bizarrely.
|
||||
push @{$ctx->{testsuites}}, $xmlgenunescaped->testsuite($testsuite,
|
||||
@fixedcases,
|
||||
\("<system-out>\n".cdata($ctx->{sysout})."\n</system-out>"),
|
||||
\("<system-err />"));
|
||||
|
||||
_new_ctx($ctx);
|
||||
};
|
||||
|
||||
sub cdata {
|
||||
my $s = shift;
|
||||
$s =~ s/\]\]>/\](warning: defanged by tap-to-junit-xml)\]>/gs;
|
||||
return '<![CDATA['.$s.']]>';
|
||||
}
|
||||
|
||||
sub _get_properties {
|
||||
my $xmlgen = shift;
|
||||
my @props;
|
||||
foreach my $key ( sort keys %ENV ) {
|
||||
push @props, $xmlgen->property( { name => "$key", value => $ENV{$key} } );
|
||||
}
|
||||
return @props;
|
||||
}
|
||||
|
||||
sub test_name_to_classname {
|
||||
my $safe = shift;
|
||||
$safe =~ s/[^-:_A-Za-z0-9]+/_/gs;
|
||||
$safe = "$safe_suite_name.$safe"; # a "directory" for the suite name
|
||||
$safe;
|
||||
}
|
||||
|
||||
__END__
|
||||
|
||||
# JUnit references:
|
||||
# http://www.nabble.com/JUnit-4-XML-schematized--td13946472.html
|
||||
# http://jra1mw.cvs.cern.ch:8180/cgi-bin/jra1mw.cgi/org.glite.testing.unit/config/JUnitXSchema.xsd?view=markup
|
||||
# skipped tests:
|
||||
# https://hudson.dev.java.net/issues/show_bug.cgi?id=1251
|
||||
# Hudson source:
|
||||
# http://fisheye5.cenqua.com/browse/hudson/hudson/main/core/src/main/java/hudson/tasks/junit/CaseResult.java
|
||||
@@ -347,11 +347,6 @@ static int openLogFile (struct ioc_log_server *pserver)
|
||||
{
|
||||
enum TF_RETURN ret;
|
||||
|
||||
if (ioc_log_file_limit==0u) {
|
||||
pserver->poutfile = stderr;
|
||||
return IOCLS_ERROR;
|
||||
}
|
||||
|
||||
if (pserver->poutfile && pserver->poutfile != stderr){
|
||||
fclose (pserver->poutfile);
|
||||
pserver->poutfile = NULL;
|
||||
@@ -627,7 +622,7 @@ static void writeMessagesToLog (struct iocLogClient *pclient)
|
||||
strlen(pclient->ascii_time) + nchar + 3u;
|
||||
assert (nTotChar <= INT_MAX);
|
||||
ntci = (int) nTotChar;
|
||||
if ( pclient->pserver->filePos+ntci >= pclient->pserver->max_file_size ) {
|
||||
if ( pclient->pserver->max_file_size && pclient->pserver->filePos+ntci >= pclient->pserver->max_file_size ) {
|
||||
if ( pclient->pserver->max_file_size >= pclient->pserver->filePos ) {
|
||||
unsigned nPadChar;
|
||||
/*
|
||||
@@ -771,7 +766,7 @@ static int getConfig(void)
|
||||
&EPICS_IOC_LOG_FILE_LIMIT,
|
||||
&ioc_log_file_limit);
|
||||
if(status>=0){
|
||||
if (ioc_log_file_limit<=0) {
|
||||
if (ioc_log_file_limit < 0) {
|
||||
envFailureNotify (&EPICS_IOC_LOG_FILE_LIMIT);
|
||||
return IOCLS_ERROR;
|
||||
}
|
||||
|
||||
@@ -1,84 +1,21 @@
|
||||
#!/bin/sh
|
||||
#*************************************************************************
|
||||
# Copyright (c) 2011 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.
|
||||
#*************************************************************************
|
||||
#
|
||||
# EpicsHostArch - returns the Epics host architecture suitable
|
||||
# for assigning to the EPICS_HOST_ARCH variable
|
||||
# Script to find and run the Perl EpicsHostArch.pl script.
|
||||
|
||||
if [ "x${1}" != "x" ]
|
||||
then
|
||||
suffix="-"${1}
|
||||
else
|
||||
suffix=""
|
||||
fi
|
||||
# This script is provided for backwards-compatibility only and may be
|
||||
# dropped from future releases of Base. Please adjust callers to run
|
||||
# the Perl version directly as this startup directory isn't copied to
|
||||
# INSTALL_LOCATION by the EPICS build system.
|
||||
|
||||
sysname=`uname`
|
||||
EHA=EpicsHostArch.pl
|
||||
|
||||
case $sysname in
|
||||
Linux )
|
||||
os=linux
|
||||
cpu=`uname -m`
|
||||
case $cpu in
|
||||
i386 | i486 | i586 | i686 )
|
||||
cpu=x86 ;;
|
||||
x86_64 )
|
||||
;; # $cpu is correct
|
||||
armv6l | armv7l )
|
||||
cpu=arm ;;
|
||||
esac
|
||||
echo ${os}-${cpu}${suffix}
|
||||
;;
|
||||
Darwin )
|
||||
os=darwin
|
||||
cpu=`uname -m`
|
||||
case $cpu in
|
||||
"Power Macintosh")
|
||||
cpu=ppc ;;
|
||||
i386 | x86_64 )
|
||||
cpu=x86 ;;
|
||||
esac
|
||||
echo ${os}-${cpu}${suffix}
|
||||
;;
|
||||
SunOS )
|
||||
version=`uname -r | sed '1s/^\([0-9]*\).*$/\1/'`
|
||||
if [ ${version} -ge 5 ]; then
|
||||
os=solaris
|
||||
else
|
||||
os=sun4
|
||||
fi
|
||||
cpu=`uname -m`
|
||||
case $cpu in
|
||||
sun4*)
|
||||
cpu=sparc
|
||||
;;
|
||||
i86pc)
|
||||
cpu=x86
|
||||
;;
|
||||
esac
|
||||
echo ${os}-${cpu}${suffix}
|
||||
;;
|
||||
* )
|
||||
sysname=`uname -o`
|
||||
case $sysname in
|
||||
Cygwin )
|
||||
os=cygwin
|
||||
cpu=`uname -m`
|
||||
case $cpu in i386 | i486 | i586 | i686 )
|
||||
cpu=x86
|
||||
;;
|
||||
esac
|
||||
echo ${os}-${cpu}${suffix}
|
||||
;;
|
||||
* )
|
||||
echo unsupported
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
cd "$(dirname "$0")/.."
|
||||
|
||||
# Perl script will be installed into lib/perl
|
||||
[ -f lib/perl/$EHA ] && exec perl lib/perl/$EHA "$@"
|
||||
|
||||
# If Base hasn't been built yet, use the source Luke
|
||||
[ -f src/tools/$EHA ] && exec perl src/tools/$EHA "$@"
|
||||
|
||||
# Die with an error message
|
||||
echo "$0: Can't find $EHA" >&2
|
||||
exit 1
|
||||
|
||||
@@ -1,47 +0,0 @@
|
||||
eval 'exec perl -S $0 ${1+"$@"}' # -*- Mode: perl -*-
|
||||
if $running_under_some_shell; # EpicsHostArch.pl
|
||||
#*************************************************************************
|
||||
# Copyright (c) 2011 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.
|
||||
#*************************************************************************
|
||||
|
||||
# Returns the Epics host architecture suitable
|
||||
# for assigning to the EPICS_HOST_ARCH variable
|
||||
|
||||
use Config;
|
||||
use POSIX;
|
||||
|
||||
$suffix="";
|
||||
$suffix="-".$ARGV[0] if ($ARGV[0] ne "");
|
||||
|
||||
$EpicsHostArch = GetEpicsHostArch();
|
||||
print "$EpicsHostArch$suffix";
|
||||
|
||||
sub GetEpicsHostArch { # no args
|
||||
$arch=$Config{'archname'};
|
||||
if ($arch =~ /sun4-solaris/) { return "solaris-sparc";
|
||||
} elsif ($arch =~ m/i86pc-solaris/) { return "solaris-x86";
|
||||
} elsif ($arch =~ m/i[3-6]86-linux/){ return "linux-x86";
|
||||
} elsif ($arch =~ m/x86_64-linux/) { return "linux-x86_64";
|
||||
} elsif ($arch =~ m/arm-linux/) { return "linux-arm";
|
||||
} elsif ($arch =~ m/MSWin32-x86/) { return "win32-x86";
|
||||
} elsif ($arch =~ m/MSWin32-x64/) { return "windows-x64";
|
||||
} elsif ($arch =~ m/cygwin/) {
|
||||
my($kernel, $hostname, $release, $version, $cpu) = POSIX::uname();
|
||||
if ($cpu =~ m/x86_64/) { return "cygwin-x86_64"; }
|
||||
return "cygwin-x86";
|
||||
} elsif ($arch =~ m/darwin/) {
|
||||
my($kernel, $hostname, $release, $version, $cpu) = POSIX::uname();
|
||||
if ($cpu =~ m/Power Macintosh/) { return "darwin-ppc"; }
|
||||
elsif ($cpu =~ m/i386/) { return "darwin-x86"; }
|
||||
elsif ($cpu =~ m/x86_64/) { return "darwin-x86"; }
|
||||
else { return "unsupported"; }
|
||||
} else { return "unsupported"; }
|
||||
}
|
||||
|
||||
#EOF EpicsHostArch.pl
|
||||
|
||||
@@ -1,118 +0,0 @@
|
||||
#!/bin/csh -f
|
||||
#*************************************************************************
|
||||
# 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 Versions 3.13.7
|
||||
# and higher are distributed subject to a Software License Agreement found
|
||||
# in file LICENSE that is included with this distribution.
|
||||
#*************************************************************************
|
||||
# Site-specific EPICS environment settings
|
||||
#
|
||||
# sites should modify these definitions
|
||||
|
||||
# Location of epics base
|
||||
if ( ! $?EPICS_BASE ) then
|
||||
set EPICS_BASE=/usr/local/epics/base
|
||||
endif
|
||||
|
||||
# Location of epics extensions
|
||||
if ( ! $?EPICS_EXTENSIONS ) then
|
||||
setenv EPICS_EXTENSIONS /usr/local/epics/extensions
|
||||
endif
|
||||
|
||||
# Postscript printer definition needed by some extensions (eg medm, dp, dm, ...)
|
||||
if ( ! $?PSPRINTTER ) then
|
||||
setenv PSPRINTER lp
|
||||
endif
|
||||
|
||||
# Needed only by medm extension
|
||||
#setenv EPICS_DISPLAY_PATH
|
||||
# Needed only by medm extension
|
||||
setenv BROWSER firefox
|
||||
|
||||
# Needed only by orbitscreen extension
|
||||
if ( ! $?ORBITSCREENHOME ) then
|
||||
setenv ORBITSCREENHOME $EPICS_EXTENSIONS/src/orbitscreen
|
||||
endif
|
||||
|
||||
# Needed only by adt extension
|
||||
if ( ! $?ADTHOME ) then
|
||||
setenv ADTHOME /usr/local/oag/apps/src/appconfig/adt
|
||||
echo $ADTHOME
|
||||
endif
|
||||
|
||||
# Needed only by ar extension (archiver)
|
||||
setenv EPICS_AR_PORT 7002
|
||||
|
||||
# Needed for java extensions
|
||||
if ( $?CLASSPATH ) then
|
||||
setenv CLASSPATH "${CLASSPATH}:${EPICS_EXTENSIONS}/javalib"
|
||||
else
|
||||
setenv CLASSPATH "${EPICS_EXTENSIONS}/javalib"
|
||||
endif
|
||||
|
||||
# Allow private versions of extensions without a bin subdir
|
||||
if ( $?EPICS_EXTENSIONS_PVT ) then
|
||||
set path = ( $path $EPICS_EXTENSIONS_PVT)
|
||||
endif
|
||||
|
||||
##################################################################
|
||||
|
||||
# Start of set R3.14 environment variables
|
||||
|
||||
setenv EPICS_HOST_ARCH `$EPICS_BASE/startup/EpicsHostArch.pl`
|
||||
|
||||
# Allow private versions of base
|
||||
if ( $?EPICS_BASE_PVT ) then
|
||||
if ( -e $EPICS_BASE_PVT/bin/$EPICS_HOST_ARCH ) then
|
||||
set path = ( $path $EPICS_BASE_PVT/bin/$EPICS_HOST_ARCH)
|
||||
endif
|
||||
endif
|
||||
|
||||
# Allow private versions of extensions
|
||||
if ( $?EPICS_EXTENSIONS_PVT ) then
|
||||
if ( -e $EPICS_EXTENSIONS_PVT/bin/$EPICS_HOST_ARCH ) then
|
||||
set path = ( $path $EPICS_EXTENSIONS_PVT/bin/$EPICS_HOST_ARCH)
|
||||
endif
|
||||
endif
|
||||
set path = ( $path $EPICS_EXTENSIONS/bin/$EPICS_HOST_ARCH )
|
||||
|
||||
# End of set R3.14 environment variables
|
||||
##################################################################
|
||||
|
||||
|
||||
## Start of set pre R3.14 environment variables
|
||||
#
|
||||
## Time service:
|
||||
## EPICS_TS_MIN_WEST the local time difference from GMT.
|
||||
#setenv EPICS_TS_MIN_WEST 360
|
||||
#
|
||||
#if ( -e /usr/local/etc/setup/HostArch.pl ) then
|
||||
# setenv HOST_ARCH `/usr/local/etc/setup/HostArch.pl`
|
||||
#else
|
||||
# setenv HOST_ARCH `/usr/local/epics/startup/HostArch.pl`
|
||||
#endif
|
||||
#
|
||||
## Allow private versions of extensions
|
||||
#if ( $?EPICS_EXTENSIONS_PVT ) then
|
||||
# if ( -e $EPICS_EXTENSIONS_PVT/bin/$HOST_ARCH ) then
|
||||
# set path = ( $path $EPICS_EXTENSIONS_PVT/bin/$HOST_ARCH)
|
||||
# endif
|
||||
# # Needed if shared extension libraries are built
|
||||
# if ( -e $EPICS_EXTENSIONS_PVT/lib/$HOST_ARCH ) then
|
||||
# if ( $?LD_LIBRARY_PATH ) then
|
||||
# setenv LD_LIBRARY_PATH "${LD_LIBRARY_PATH}:${EPICS_EXTENSIONS_PVT}/lib/${HOST_ARCH}"
|
||||
# else
|
||||
# setenv LD_LIBRARY_PATH "${EPICS_EXTENSIONS_PVT}/lib/${HOST_ARCH}"
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
#
|
||||
#set path = ( $path $EPICS_EXTENSIONS/bin/$HOST_ARCH )
|
||||
## Needed if shared extension libraries are built
|
||||
#setenv LD_LIBRARY_PATH "${LD_LIBRARY_PATH}:${EPICS_EXTENSIONS}/lib/${HOST_ARCH}"
|
||||
|
||||
# End of set pre R3.14 environment variables
|
||||
##################################################################
|
||||
@@ -1,118 +0,0 @@
|
||||
#!/bin/sh
|
||||
#*************************************************************************
|
||||
# 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 Versions 3.13.7
|
||||
# and higher are distributed subject to a Software License Agreement found
|
||||
# in file LICENSE that is included with this distribution.
|
||||
#*************************************************************************
|
||||
# Site-specific EPICS environment settings
|
||||
#
|
||||
# sites should modify these definitions
|
||||
|
||||
# Location of epics base
|
||||
if [ -z "${MY_EPICS_BASE}" ] ; then
|
||||
MY_EPICS_BASE=/usr/local/epics/base
|
||||
fi
|
||||
|
||||
# Location of epics extensions (medm, msi, etc.)
|
||||
if [ -z "${EPICS_EXTENSIONS}" ] ; then
|
||||
EPICS_EXTENSIONS=/usr/local/epics/extensions
|
||||
fi
|
||||
|
||||
# Postscript printer definition needed by some extensions (eg medm, dp, dm, ...)
|
||||
if [ -z "${PSPRINTER}" ] ; then
|
||||
export PSPRINTER=lp
|
||||
fi
|
||||
|
||||
#Needed only by the idl and ezcaIDL extensions.
|
||||
#export EPICS_EXTENSIONS
|
||||
|
||||
# Needed only by medm extension
|
||||
#export EPICS_DISPLAY_PATH=/path/to/adl/files
|
||||
export BROWSER=firefox
|
||||
|
||||
# Needed only by orbitscreen extension
|
||||
#if [ -z "${ORBITSCREENHOME}" ] ; then
|
||||
# export "ORBITSCREENHOME=${EPICS_EXTENSIONS/src/orbitscreen}"
|
||||
#fi
|
||||
|
||||
# Needed only by adt extension
|
||||
#if [ -z "${ADTHOME}" ] ; then
|
||||
# ADTHOME=
|
||||
# export ADTHOME
|
||||
#fi
|
||||
|
||||
# Needed only by ar extension (archiver)
|
||||
#EPICS_AR_PORT=7002
|
||||
#export EPICS_AR_PORT
|
||||
|
||||
# Needed for java extensions
|
||||
if [ -z "${CLASSPATH}" ] ; then
|
||||
CLASSPATH="${EPICS_EXTENSIONS}/javalib"
|
||||
else
|
||||
CLASSPATH="${CLASSPATH}:${EPICS_EXTENSIONS}/javalib"
|
||||
fi
|
||||
export CLASSPATH
|
||||
|
||||
# Allow private versions of extensions without a bin subdir
|
||||
if [ -n "${EPICS_EXTENSIONS_PVT}" ] ; then
|
||||
PATH="${PATH}:${EPICS_EXTENSIONS_PVT}"
|
||||
fi
|
||||
|
||||
#---------------------------------------------------------------
|
||||
# Start of set R3.14 environment variables
|
||||
#
|
||||
EPICS_HOST_ARCH=`"${MY_EPICS_BASE}"/startup/EpicsHostArch.pl`
|
||||
export EPICS_HOST_ARCH
|
||||
|
||||
# Allow private versions of base
|
||||
if [ -n "${EPICS_BASE_PVT}" ] ; then
|
||||
if [ -d "${EPICS_BASE_PVT}/bin/${EPICS_HOST_ARCH}" ]; then
|
||||
PATH="${PATH}:${EPICS_BASE_PVT}/bin/${EPICS_HOST_ARCH}"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Allow private versions of extensions
|
||||
if [ -n "${EPICS_EXTENSIONS_PVT}" ] ; then
|
||||
if [ -d "${EPICS_EXTENSIONS_PVT}/bin/${EPICS_HOST_ARCH}" ]; then
|
||||
PATH="${PATH}:${EPICS_EXTENSIONS_PVT}/bin/${EPICS_HOST_ARCH}"
|
||||
fi
|
||||
fi
|
||||
PATH="${PATH}:${EPICS_EXTENSIONS}/bin/${EPICS_HOST_ARCH}"
|
||||
|
||||
# End of set R3.14 environment variables
|
||||
|
||||
#---------------------------------------------------------------
|
||||
#
|
||||
## Start of set pre R3.14 environment variables
|
||||
#
|
||||
## Time service:
|
||||
## EPICS_TS_MIN_WEST the local time difference from GMT.
|
||||
#EPICS_TS_MIN_WEST=360
|
||||
#export EPICS_TS_MIN_WEST
|
||||
#
|
||||
#HOST_ARCH=`"${MY_EPICS_BASE}"/startup/HostArch`
|
||||
#export HOST_ARCH
|
||||
#
|
||||
## Allow private versions of base
|
||||
#if [ -n "${EPICS_BASE_PVT}" ] ; then
|
||||
# if [ -d "${EPICS_BASE_PVT}/bin/${HOST_ARCH}" ]; then
|
||||
# PATH="${PATH}:${EPICS_BASE_PVT}/bin/${HOST_ARCH}"
|
||||
# fi
|
||||
#fi
|
||||
#
|
||||
## Allow private versions of extensions
|
||||
#if [ -n "${EPICS_EXTENSIONS_PVT}" ] ; then
|
||||
# if [ -d "${EPICS_EXTENSIONS_PVT}/bin/${HOST_ARCH}" ]; then
|
||||
# PATH="${PATH}:${EPICS_EXTENSIONS_PVT}/bin/${HOST_ARCH}"
|
||||
# fi
|
||||
#fi
|
||||
#
|
||||
#PATH="${PATH}:${EPICS_EXTENSIONS}/lib/${HOST_ARCH}"
|
||||
#
|
||||
# End of set pre R3.14 environment variables
|
||||
|
||||
#---------------------------------------------------------------
|
||||
@@ -1,122 +0,0 @@
|
||||
@ECHO OFF
|
||||
REM *************************************************************************
|
||||
REM Copyright (c) 2002 The University of Chicago, as Operator of Argonne
|
||||
REM National Laboratory.
|
||||
REM Copyright (c) 2002 The Regents of the University of California, as
|
||||
REM Operator of Los Alamos National Laboratory.
|
||||
REM EPICS BASE Versions 3.13.7
|
||||
REM and higher are distributed subject to a Software License Agreement found
|
||||
REM in file LICENSE that is included with this distribution.
|
||||
REM *************************************************************************
|
||||
REM
|
||||
REM Site-specific EPICS environment settings
|
||||
REM
|
||||
REM sites should modify these definitions
|
||||
|
||||
REM ======================================================
|
||||
REM ====== REQUIRED ENVIRONMENT VARIABLES FOLLOW ======
|
||||
REM ======================================================
|
||||
|
||||
REM ======================================================
|
||||
REM ---------------- WINDOWS ---------------------------
|
||||
REM ======================================================
|
||||
REM ----- WIN95 -----
|
||||
REM set PATH=C:\WINDOWS;C:\WINDOWS\COMMAND
|
||||
REM ----- WINNT, WIN2000 -----
|
||||
REM set PATH=C:\WINNT;C:\WINNT\SYSTEM32
|
||||
REM ----- WINXP, Vista, Windows 7 -----
|
||||
set PATH=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\SYSTEM32\Wbem
|
||||
|
||||
REM ======================================================
|
||||
REM ---------------- make and perl ---------------------
|
||||
REM ======================================================
|
||||
|
||||
REM --------------- ActiveState perl -------------------
|
||||
set PATH=C:\Perl\bin;%PATH%
|
||||
|
||||
REM --------------- mingw make ------------------------
|
||||
REM set PATH=C:\mingw-make\bin;%PATH%
|
||||
REM set PATH=C:\mingw-make82-3\bin;%PATH%
|
||||
|
||||
REM --------------- gnuwin32 make ----------------------
|
||||
set PATH=C:\gnuwin32\bin;%PATH%
|
||||
|
||||
REM ======================================================
|
||||
REM ---------------- cygwin tools ------------------------
|
||||
REM ======================================================
|
||||
REM (make & perl if above perl and make are REMs)
|
||||
REM Dont use cygwin GNU make and Perl!
|
||||
REM cygwin contains tk/tcl, vim, perl, and many unix tools
|
||||
REM need grep from here NOT from cvs directory
|
||||
set PATH=%PATH%;.;..
|
||||
set PATH=%PATH%;c:\cygwin\bin
|
||||
|
||||
REM ======================================================
|
||||
REM --------------- EPICS --------------------------------
|
||||
REM ======================================================
|
||||
set EPICS_HOST_ARCH=cygwin-x86
|
||||
set PATH=%PATH%;G:\epics\base\bin\%EPICS_HOST_ARCH%
|
||||
set PATH=%PATH%;G:\epics\extensions\bin\%EPICS_HOST_ARCH%
|
||||
|
||||
REM ======================================================
|
||||
REM ------- OPTIONAL ENVIRONMENT VARIABLES FOLLOW --------
|
||||
REM ======================================================
|
||||
|
||||
REM ======================================================
|
||||
REM ----------------- remote CVS -------------------------
|
||||
REM ======================================================
|
||||
REM set CVS_RSH=c:/cygwin/bin/ssh.exe
|
||||
REM set CVSROOT=:ext:jba@aps.anl.gov:/usr/local/epicsmgr/cvsroot
|
||||
REM set HOME=c:/users/%USERNAME%
|
||||
REM set HOME=c:/users/jba
|
||||
|
||||
REM ======================================================
|
||||
REM ------------------- Bazaar ---------------------------
|
||||
REM ======================================================
|
||||
set PATH=%PATH%;C:\Program files\Bazaar
|
||||
|
||||
REM ======================================================
|
||||
REM ----------------- GNU make flags ---------------------
|
||||
REM ======================================================
|
||||
set MAKEFLAGS=-w
|
||||
|
||||
REM ======================================================
|
||||
REM -------------- vim (use cygwin vim ) -----------------
|
||||
REM ======================================================
|
||||
REM HOME needed by vim to write .viminfo file.
|
||||
REM VIM needed by vim to find _vimrc file.
|
||||
REM set VIM=c:\cygwin
|
||||
|
||||
REM ======================================================
|
||||
REM --------------- Epics Channel Access -----------------
|
||||
REM Modify and uncomment the following lines
|
||||
REM to override the base/configure/CONFIG_ENV defaults
|
||||
REM ======================================================
|
||||
REM set EPICS_CA_ADDR_LIST=n.n.n.n n.n.n.n
|
||||
REM set EPICS_CA_AUTO_ADDR_LIST=YES
|
||||
|
||||
REM set EPICS_CA_CONN_TMO=30.0
|
||||
REM set EPICS_CA_BEACON_PERIOD=15.0
|
||||
REM set EPICS_CA_REPEATER_PORT=5065
|
||||
REM set EPICS_CA_SERVER_PORT=5064
|
||||
REM set EPICS_TS_MIN_WEST=420
|
||||
|
||||
REM ======================================================
|
||||
REM --------------- JAVA ---------------------------------
|
||||
REM ======================================================
|
||||
REM Needed for java extensions
|
||||
REM set CLASSPATH=G:\epics\extensions\javalib
|
||||
REM set PATH=%PATH%;C:\j2sdk1.4.1_01\bin
|
||||
REM set CLASSPATH=%CLASSPATH%;C:\j2sdk1.4.1_01\lib\tools.jar
|
||||
|
||||
REM ======================================================
|
||||
REM --------------- Exceed -------------------------------
|
||||
REM Needed for X11 extensions
|
||||
REM ======================================================
|
||||
REM set EX_VER=7.10
|
||||
REM set EX_VER=12.00
|
||||
REM set EX_VER=14.00
|
||||
REM set PATH=%PATH%;C:\Exceed%EX_VER%\XDK\
|
||||
REM set PATH=%PATH%;C:\Program Files\Hummingbird\Connectivity\%EX_VER%\Exceed\
|
||||
|
||||
|
||||
96
startup/unix.csh
Normal file
96
startup/unix.csh
Normal file
@@ -0,0 +1,96 @@
|
||||
#*************************************************************************
|
||||
# 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 Versions 3.13.7
|
||||
# and higher are distributed subject to a Software License Agreement found
|
||||
# in file LICENSE that is included with this distribution.
|
||||
#*************************************************************************
|
||||
#
|
||||
# Site-specific EPICS environment settings
|
||||
#
|
||||
# Attempts to set EPICS_HOST_ARCH. Optionally, adds the EPICS Base
|
||||
# install host architecture bin directory to PATH.
|
||||
#
|
||||
|
||||
#-----------------------------------------------------------------------
|
||||
# Site serviceable parts (These definitions may be modified)
|
||||
#-----------------------------------------------------------------------
|
||||
|
||||
# Automatically set up the environment when possible ("yes" or "no").
|
||||
# If set to yes, as much of the environment will be set up as possible.
|
||||
# If set to no, just the minimum environment will be set up. More
|
||||
# specific _auto_* definitions take precedence over this definition.
|
||||
set _auto=no
|
||||
|
||||
# Automatically append to PATH ("yes" or "no"). If set to yes, the
|
||||
# EPICS Base install host architecture bin directory will be added to
|
||||
# PATH if possible. If set to no, the bin directory will not be added
|
||||
# to PATH.
|
||||
set _auto_path_append=$_auto
|
||||
|
||||
# The program used to run Perl scripts (pathname).
|
||||
set _perl_prog=perl
|
||||
|
||||
# The EPICS host architecture specification for EPICS_HOST_ARCH
|
||||
# (<os>-<arch>[-<toolset>] as defined in configure/CONFIG_SITE). If
|
||||
# nonempty, the value will be used as the value of EPICS_HOST_ARCH. If
|
||||
# empty, an attempt will be made to automatically determine the value
|
||||
# with EpicsHostArch.pl.
|
||||
set _epics_host_arch=
|
||||
|
||||
# The install location of EPICS Base (pathname). If nonempty, the
|
||||
# EpicsHostArch.pl script from it, if it exists, will be used to
|
||||
# determine EPICS_HOST_ARCH. If nonempty and EPICS_HOST_ARCH was
|
||||
# determined successfully, it will be used to add the host architecture
|
||||
# bin directory to PATH if _auto_path_append is yes.
|
||||
set _epics_base=
|
||||
|
||||
# The source location of EPICS Base (pathname). If nonempty, the
|
||||
# EpicsHostArch.pl script from it, if it exists and _epics_base is empty
|
||||
# or it did not exist in the _epics_base location, will be used to
|
||||
# determine EPICS_HOST_ARCH.
|
||||
set _epics_base_src=
|
||||
|
||||
#-----------------------------------------------------------------------
|
||||
# Internal parts (There is typically no need to modify these)
|
||||
#-----------------------------------------------------------------------
|
||||
|
||||
# Define the possible locations of EpicsHostArch.pl
|
||||
set _epics_host_arch_pl=
|
||||
set _src_epics_host_arch_pl=
|
||||
if ("$_epics_base" != '') then
|
||||
set _epics_host_arch_pl="$_epics_base/lib/perl/EpicsHostArch.pl"
|
||||
endif
|
||||
if ("$_epics_base_src" != '') then
|
||||
set _src_epics_host_arch_pl="$_epics_base_src/src/tools/EpicsHostArch.pl"
|
||||
endif
|
||||
|
||||
# Set the EPICS host architecture specification
|
||||
if ("$_epics_host_arch" != '') then
|
||||
setenv EPICS_HOST_ARCH "$_epics_host_arch"
|
||||
else if (-e "$_epics_host_arch_pl") then
|
||||
set _epics_host_arch=`"$_perl_prog" "$_epics_host_arch_pl"`
|
||||
setenv EPICS_HOST_ARCH "$_epics_host_arch"
|
||||
else if (-e "$_src_epics_host_arch_pl") then
|
||||
set _epics_host_arch=`"$_perl_prog" "$_src_epics_host_arch_pl"`
|
||||
setenv EPICS_HOST_ARCH "$_epics_host_arch"
|
||||
endif
|
||||
|
||||
# Add the EPICS Base host architecture bin directory to PATH
|
||||
if ("$_auto_path_append" == yes) then
|
||||
if ("$_epics_base" != '' && "$_epics_host_arch" != '') then
|
||||
setenv PATH "${PATH}:$_epics_base/bin/$_epics_host_arch"
|
||||
endif
|
||||
endif
|
||||
|
||||
# Don't leak variables into the environment
|
||||
unset _auto
|
||||
unset _auto_path_append
|
||||
unset _perl_prog
|
||||
unset _epics_host_arch
|
||||
unset _epics_base
|
||||
unset _epics_base_src
|
||||
unset _epics_host_arch_pl
|
||||
unset _src_epics_host_arch_pl
|
||||
100
startup/unix.sh
Normal file
100
startup/unix.sh
Normal file
@@ -0,0 +1,100 @@
|
||||
#*************************************************************************
|
||||
# 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 Versions 3.13.7
|
||||
# and higher are distributed subject to a Software License Agreement found
|
||||
# in file LICENSE that is included with this distribution.
|
||||
#*************************************************************************
|
||||
#
|
||||
# Site-specific EPICS environment settings
|
||||
#
|
||||
# Attempts to set EPICS_HOST_ARCH. Optionally, adds the EPICS Base
|
||||
# install host architecture bin directory to PATH.
|
||||
#
|
||||
|
||||
#-----------------------------------------------------------------------
|
||||
# Site serviceable parts (These definitions may be modified)
|
||||
#-----------------------------------------------------------------------
|
||||
|
||||
# Automatically set up the environment when possible ("yes" or "no").
|
||||
# If set to yes, as much of the environment will be set up as possible.
|
||||
# If set to no, just the minimum environment will be set up. More
|
||||
# specific _auto_* definitions take precedence over this definition.
|
||||
_auto=no
|
||||
|
||||
# Automatically append to PATH ("yes" or "no"). If set to yes, the
|
||||
# EPICS Base install host architecture bin directory will be added to
|
||||
# PATH if possible. If set to no, the bin directory will not be added
|
||||
# to PATH.
|
||||
_auto_path_append=$_auto
|
||||
|
||||
# The program used to run Perl scripts (pathname).
|
||||
_perl_prog=perl
|
||||
|
||||
# The EPICS host architecture specification for EPICS_HOST_ARCH
|
||||
# (<os>-<arch>[-<toolset>] as defined in configure/CONFIG_SITE). If
|
||||
# nonempty, the value will be used as the value of EPICS_HOST_ARCH. If
|
||||
# empty, an attempt will be made to automatically determine the value
|
||||
# with EpicsHostArch.pl.
|
||||
_epics_host_arch=
|
||||
|
||||
# The install location of EPICS Base (pathname). If nonempty, the
|
||||
# EpicsHostArch.pl script from it, if it exists, will be used to
|
||||
# determine EPICS_HOST_ARCH. If nonempty and EPICS_HOST_ARCH was
|
||||
# determined successfully, it will be used to add the host architecture
|
||||
# bin directory to PATH if _auto_path_append is yes.
|
||||
_epics_base=
|
||||
|
||||
# The source location of EPICS Base (pathname). If nonempty, the
|
||||
# EpicsHostArch.pl script from it, if it exists and _epics_base is empty
|
||||
# or it did not exist in the _epics_base location, will be used to
|
||||
# determine EPICS_HOST_ARCH.
|
||||
_epics_base_src=
|
||||
|
||||
#-----------------------------------------------------------------------
|
||||
# Internal parts (There is typically no need to modify these)
|
||||
#-----------------------------------------------------------------------
|
||||
|
||||
# Define the possible locations of EpicsHostArch.pl
|
||||
_epics_host_arch_pl=
|
||||
_src_epics_host_arch_pl=
|
||||
if [ -n "$_epics_base" ]; then
|
||||
_epics_host_arch_pl="$_epics_base/lib/perl/EpicsHostArch.pl"
|
||||
fi
|
||||
if [ -n "$_epics_base_src" ]; then
|
||||
_src_epics_host_arch_pl="$_epics_base_src/src/tools/EpicsHostArch.pl"
|
||||
fi
|
||||
|
||||
# Set the EPICS host architecture specification
|
||||
if [ -n "$_epics_host_arch" ]; then
|
||||
EPICS_HOST_ARCH=$_epics_host_arch
|
||||
export EPICS_HOST_ARCH
|
||||
elif [ -e "$_epics_host_arch_pl" ]; then
|
||||
_epics_host_arch=$("$_perl_prog" "$_epics_host_arch_pl")
|
||||
EPICS_HOST_ARCH=$_epics_host_arch
|
||||
export EPICS_HOST_ARCH
|
||||
elif [ -e "$_src_epics_host_arch_pl" ]; then
|
||||
_epics_host_arch=$("$_perl_prog" "$_src_epics_host_arch_pl")
|
||||
EPICS_HOST_ARCH=$_epics_host_arch
|
||||
export EPICS_HOST_ARCH
|
||||
fi
|
||||
|
||||
# Add the EPICS Base host architecture bin directory to PATH
|
||||
if [ "$_auto_path_append" = yes ]; then
|
||||
if [ -n "$_epics_base" ] && [ -n "$_epics_host_arch" ]; then
|
||||
PATH="$PATH:$_epics_base/bin/$_epics_host_arch"
|
||||
export PATH
|
||||
fi
|
||||
fi
|
||||
|
||||
# Don't leak variables into the environment
|
||||
unset _auto
|
||||
unset _auto_path_append
|
||||
unset _perl_prog
|
||||
unset _epics_host_arch
|
||||
unset _epics_base
|
||||
unset _epics_base_src
|
||||
unset _epics_host_arch_pl
|
||||
unset _src_epics_host_arch_pl
|
||||
@@ -1,147 +1,105 @@
|
||||
@ECHO OFF
|
||||
REM *************************************************************************
|
||||
REM Copyright (c) 2002 The University of Chicago, as Operator of Argonne
|
||||
REM National Laboratory.
|
||||
REM Copyright (c) 2002 The Regents of the University of California, as
|
||||
REM Operator of Los Alamos National Laboratory.
|
||||
REM EPICS BASE Versions 3.13.7
|
||||
REM and higher are distributed subject to a Software License Agreement found
|
||||
REM in file LICENSE that is included with this distribution.
|
||||
REM *************************************************************************
|
||||
REM
|
||||
REM Site-specific EPICS environment settings
|
||||
REM
|
||||
REM sites should modify these definitions
|
||||
|
||||
REM ======================================================
|
||||
REM ====== REQUIRED ENVIRONMENT VARIABLES FOLLOW ======
|
||||
REM ======================================================
|
||||
|
||||
REM ======================================================
|
||||
REM ---------------- WINDOWS ---------------------------
|
||||
REM ======================================================
|
||||
REM ----- WIN95 -----
|
||||
REM set PATH=C:\WINDOWS;C:\WINDOWS\COMMAND
|
||||
REM ----- WINNT, WIN2000 -----
|
||||
REM set PATH=C:\WINNT;C:\WINNT\SYSTEM32
|
||||
REM ----- WINXP, Vista, Windows 7 -----
|
||||
set PATH=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\SYSTEM32\Wbem
|
||||
|
||||
REM ======================================================
|
||||
REM ---------------- make and perl ---------------------
|
||||
REM ======================================================
|
||||
|
||||
REM --------------- ActiveState perl -------------------
|
||||
set PATH=C:\Perl\bin;%PATH%
|
||||
|
||||
REM --------------- mingw make ------------------------
|
||||
REM set PATH=C:\mingw-make\bin;%PATH%
|
||||
REM set PATH=C:\mingw-make82-3\bin;%PATH%
|
||||
|
||||
REM --------------- gnuwin32 make ----------------------
|
||||
set PATH=C:\gnuwin32\bin;%PATH%
|
||||
|
||||
REM ======================================================
|
||||
REM ---------------- cygwin tools ------------------------
|
||||
REM ======================================================
|
||||
REM (make & perl if above perl and make are REMs)
|
||||
REM Dont use cygwin GNU make and Perl!
|
||||
REM cygwin contains tk/tcl, vim, perl, and many unix tools
|
||||
REM need grep from here NOT from cvs directory
|
||||
REM set PATH=%PATH%;.;..
|
||||
REM set PATH=%PATH%;c:\cygwin\bin
|
||||
|
||||
REM ======================================================
|
||||
REM --------------- Visual c++ -------------------------
|
||||
REM ======================================================
|
||||
|
||||
REM ------ Microsoft Visual Studio 2005 ------
|
||||
REM call "C:\Program files\Microsoft Visual Studio 8\VC\vcvarsall.bat" x86_amd64
|
||||
REM set PATH=%PATH%;C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin
|
||||
REM set INCLUDE=%INCLUDE%;C:\Program Files\Microsoft SDKs\Windows\v6.0A\include
|
||||
REM REM set LIBPATH=%LIBPATH%;C:\Program Files\Microsoft SDKs\Windows\v6.0A\lib
|
||||
REM set LIB=%LIB%;C:\Program Files\Microsoft SDKs\Windows\v6.0A\lib
|
||||
|
||||
REM ------ Microsoft Visual Studio 2008 ------
|
||||
REM call "C:\Program files\Microsoft Visual Studio 9.0\VC\bin\vcvars32.bat"
|
||||
REM call "C:\Program files\Microsoft Visual Studio 9.0\VC\vcvarsall.bat" x86_amd64
|
||||
REM set PATH=C:\Program Files\Microsoft SDKs\Windows\v7.0\bin;%PATH%
|
||||
REM set INCLUDE=C:\Program Files\Microsoft SDKs\Windows\v7.0\include;%INCLUDE%
|
||||
REM set LIBPATH=C:\Program Files\Microsoft SDKs\Windows\v7.0\lib;%LIBPATH%
|
||||
REM set LIB=C:\Program Files\Microsoft SDKs\Windows\v7.0\lib;%LIB%
|
||||
|
||||
REM ----- Visual Studion 2010 -----
|
||||
REM -- windows-x64 ---
|
||||
REM call "C:\Program files\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" x64
|
||||
REM -- win32-x86 ---
|
||||
call "C:\Program files\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" x86
|
||||
|
||||
REM ======================================================
|
||||
REM --------------- EPICS --------------------------------
|
||||
REM ======================================================
|
||||
REM set EPICS_HOST_ARCH=windows-x64
|
||||
set EPICS_HOST_ARCH=win32-x86
|
||||
set PATH=%PATH%;G:\epics\base\bin\%EPICS_HOST_ARCH%
|
||||
set PATH=%PATH%;G:\epics\extensions\bin\%EPICS_HOST_ARCH%
|
||||
|
||||
REM ======================================================
|
||||
REM ------- OPTIONAL ENVIRONMENT VARIABLES FOLLOW --------
|
||||
REM ======================================================
|
||||
|
||||
REM ======================================================
|
||||
REM ----------------- remote CVS -------------------------
|
||||
REM ======================================================
|
||||
REM set CVS_RSH=c:/cygwin/bin/ssh.exe
|
||||
REM set CVSROOT=:ext:jba@aps.anl.gov:/usr/local/epicsmgr/cvsroot
|
||||
REM set HOME=c:/users/%USERNAME%
|
||||
REM set HOME=c:/users/jba
|
||||
|
||||
REM ======================================================
|
||||
REM ------------------- Bazaar ---------------------------
|
||||
REM ======================================================
|
||||
set PATH=%PATH%;C:\Program files\Bazaar
|
||||
|
||||
REM ======================================================
|
||||
REM ----------------- GNU make flags ---------------------
|
||||
REM ======================================================
|
||||
set MAKEFLAGS=-w
|
||||
|
||||
REM ======================================================
|
||||
REM -------------- vim (use cygwin vim ) -----------------
|
||||
REM ======================================================
|
||||
REM HOME needed by vim to write .viminfo file.
|
||||
REM VIM needed by vim to find _vimrc file.
|
||||
REM set VIM=c:\cygwin
|
||||
|
||||
REM ======================================================
|
||||
REM --------------- Epics Channel Access -----------------
|
||||
REM Modify and uncomment the following lines
|
||||
REM to override the base/configure/CONFIG_ENV defaults
|
||||
REM ======================================================
|
||||
REM set EPICS_CA_ADDR_LIST=n.n.n.n n.n.n.n
|
||||
REM set EPICS_CA_AUTO_ADDR_LIST=YES
|
||||
|
||||
REM set EPICS_CA_CONN_TMO=30.0
|
||||
REM set EPICS_CA_BEACON_PERIOD=15.0
|
||||
REM set EPICS_CA_REPEATER_PORT=5065
|
||||
REM set EPICS_CA_SERVER_PORT=5064
|
||||
REM set EPICS_TS_MIN_WEST=420
|
||||
|
||||
REM ======================================================
|
||||
REM --------------- JAVA ---------------------------------
|
||||
REM ======================================================
|
||||
REM Needed for java extensions
|
||||
REM set CLASSPATH=G:\epics\extensions\javalib
|
||||
REM set PATH=%PATH%;C:\j2sdk1.4.1_01\bin
|
||||
REM set CLASSPATH=%CLASSPATH%;C:\j2sdk1.4.1_01\lib\tools.jar
|
||||
|
||||
REM ======================================================
|
||||
REM --------------- Exceed -------------------------------
|
||||
REM Needed for X11 extensions
|
||||
REM ======================================================
|
||||
REM set EX_VER=7.10
|
||||
REM set EX_VER=12.00
|
||||
REM set EX_VER=14.00
|
||||
REM set PATH=%PATH%;C:\Exceed%EX_VER%\XDK\
|
||||
REM set PATH=%PATH%;C:\Program Files\Hummingbird\Connectivity\%EX_VER%\Exceed\
|
||||
|
||||
@echo off
|
||||
rem *************************************************************************
|
||||
rem Copyright (c) 2017 UChicago Argonne LLC, as Operator of Argonne
|
||||
rem National Laboratory.
|
||||
rem Copyright (c) 2002 The Regents of the University of California, as
|
||||
rem Operator of Los Alamos National Laboratory.
|
||||
rem EPICS BASE is distributed subject to a Software License Agreement found
|
||||
rem in file LICENSE that is included with this distribution.
|
||||
rem *************************************************************************
|
||||
rem
|
||||
rem Site-specific EPICS environment settings
|
||||
rem
|
||||
rem Sets EPICS_HOST_ARCH and the environment for Microsoft Visual Studio.
|
||||
rem Optionally, resets PATH, adds Strawberry Perl to PATH, and adds the
|
||||
rem EPICS Base install host architecture bin directory to PATH.
|
||||
rem
|
||||
|
||||
rem ----------------------------------------------------------------------
|
||||
rem Site serviceable parts (These definitions may be modified)
|
||||
rem ----------------------------------------------------------------------
|
||||
|
||||
rem The values of the definitions in this section must not contain
|
||||
rem double-quotes.
|
||||
rem
|
||||
rem * Right: set _foo=C:\foo
|
||||
rem * Right: set "_foo=C:\foo"
|
||||
rem * Wrong: set _foo="C:\foo"
|
||||
|
||||
rem Automatically set up the environment when possible ("yes" or "no").
|
||||
rem If set to yes, as much of the environment will be set up as possible.
|
||||
rem If set to no, just the minimum environment will be set up. More
|
||||
rem specific _auto_* definitions take precedence over this definition.
|
||||
set _auto=no
|
||||
|
||||
rem Automatically reset PATH ("yes" or "no"). If set to yes, PATH will
|
||||
rem be reset to the value of _path_new. If set to no, PATH will not be
|
||||
rem reset.
|
||||
set _auto_path_reset=%_auto%
|
||||
|
||||
rem Automatically append to PATH ("yes" or "no"). If set to yes, the
|
||||
rem EPICS Base install host architecture bin directory will be added to
|
||||
rem PATH if possible. If set to no, the bin directory will not be added
|
||||
rem to PATH.
|
||||
set _auto_path_append=%_auto%
|
||||
|
||||
rem The new value for PATH. If _auto_path_reset is yes, PATH will be set
|
||||
rem to it.
|
||||
set _path_new=C:\Windows\System32;C:\Windows;C:\Windows\System32\wbem
|
||||
|
||||
rem The location of Strawberry Perl (pathname). If empty, Strawberry Perl
|
||||
rem is assumed to already be in PATH and will not be added. If nonempty,
|
||||
rem Strawberry Perl will be added to PATH.
|
||||
set _strawberry_perl_home=C:\Strawberry
|
||||
|
||||
rem The location of Microsoft Visual Studio (pathname).
|
||||
set _visual_studio_home=C:\Program Files (x86)\Microsoft Visual Studio 14.0
|
||||
|
||||
rem The EPICS host architecture specification for EPICS_HOST_ARCH
|
||||
rem (<os>-<arch>[-<toolset>] as defined in configure/CONFIG_SITE).
|
||||
set _epics_host_arch=win32-x86
|
||||
|
||||
rem The install location of EPICS Base (pathname). If nonempty and
|
||||
rem _auto_path_append is yes, it will be used to add the host architecture
|
||||
rem bin directory to PATH.
|
||||
set _epics_base=
|
||||
|
||||
rem ----------------------------------------------------------------------
|
||||
rem Internal parts (There is typically no need to modify these)
|
||||
rem ----------------------------------------------------------------------
|
||||
|
||||
rem Reset PATH
|
||||
if "%_auto_path_reset%" == "yes" (
|
||||
set "PATH=%_path_new%"
|
||||
)
|
||||
|
||||
rem Add Strawberry Perl to PATH
|
||||
if "%_strawberry_perl_home%" == "" goto after_add_strawberry_perl
|
||||
rem Can't do this inside parentheses because PATH would be read only once
|
||||
set "PATH=%PATH%;%_strawberry_perl_home%\c\bin"
|
||||
set "PATH=%PATH%;%_strawberry_perl_home%\perl\site\bin"
|
||||
set "PATH=%PATH%;%_strawberry_perl_home%\perl\bin"
|
||||
:after_add_strawberry_perl
|
||||
|
||||
rem Set the environment for Microsoft Visual Studio
|
||||
call "%_visual_studio_home%\VC\vcvarsall.bat" x86
|
||||
|
||||
rem Set the EPICS host architecture specification
|
||||
set "EPICS_HOST_ARCH=%_epics_host_arch%"
|
||||
|
||||
rem Add the EPICS Base host architecture bin directory to PATH
|
||||
if "%_auto_path_append%" == "yes" (
|
||||
if not "%_epics_base%" == "" (
|
||||
set "PATH=%PATH%;%_epics_base%\bin\%_epics_host_arch%"
|
||||
)
|
||||
)
|
||||
|
||||
rem Don't leak variables into the environment
|
||||
set _auto=
|
||||
set _auto_path_reset=
|
||||
set _auto_path_append=
|
||||
set _path_new=
|
||||
set _strawberry_perl_home=
|
||||
set _visual_studio_home=
|
||||
set _epics_host_arch=
|
||||
set _epics_base=
|
||||
|
||||
105
startup/windows.bat
Normal file
105
startup/windows.bat
Normal file
@@ -0,0 +1,105 @@
|
||||
@echo off
|
||||
rem *************************************************************************
|
||||
rem Copyright (c) 2017 UChicago Argonne LLC, as Operator of Argonne
|
||||
rem National Laboratory.
|
||||
rem Copyright (c) 2002 The Regents of the University of California, as
|
||||
rem Operator of Los Alamos National Laboratory.
|
||||
rem EPICS BASE is distributed subject to a Software License Agreement found
|
||||
rem in file LICENSE that is included with this distribution.
|
||||
rem *************************************************************************
|
||||
rem
|
||||
rem Site-specific EPICS environment settings
|
||||
rem
|
||||
rem Sets EPICS_HOST_ARCH and the environment for Microsoft Visual Studio.
|
||||
rem Optionally, resets PATH, adds Strawberry Perl to PATH, and adds the
|
||||
rem EPICS Base install host architecture bin directory to PATH.
|
||||
rem
|
||||
|
||||
rem ----------------------------------------------------------------------
|
||||
rem Site serviceable parts (These definitions may be modified)
|
||||
rem ----------------------------------------------------------------------
|
||||
|
||||
rem The values of the definitions in this section must not contain
|
||||
rem double-quotes.
|
||||
rem
|
||||
rem * Right: set _foo=C:\foo
|
||||
rem * Right: set "_foo=C:\foo"
|
||||
rem * Wrong: set _foo="C:\foo"
|
||||
|
||||
rem Automatically set up the environment when possible ("yes" or "no").
|
||||
rem If set to yes, as much of the environment will be set up as possible.
|
||||
rem If set to no, just the minimum environment will be set up. More
|
||||
rem specific _auto_* definitions take precedence over this definition.
|
||||
set _auto=no
|
||||
|
||||
rem Automatically reset PATH ("yes" or "no"). If set to yes, PATH will
|
||||
rem be reset to the value of _path_new. If set to no, PATH will not be
|
||||
rem reset.
|
||||
set _auto_path_reset=%_auto%
|
||||
|
||||
rem Automatically append to PATH ("yes" or "no"). If set to yes, the
|
||||
rem EPICS Base install host architecture bin directory will be added to
|
||||
rem PATH if possible. If set to no, the bin directory will not be added
|
||||
rem to PATH.
|
||||
set _auto_path_append=%_auto%
|
||||
|
||||
rem The new value for PATH. If _auto_path_reset is yes, PATH will be set
|
||||
rem to it.
|
||||
set _path_new=C:\Windows\System32;C:\Windows;C:\Windows\System32\wbem
|
||||
|
||||
rem The location of Strawberry Perl (pathname). If empty, Strawberry Perl
|
||||
rem is assumed to already be in PATH and will not be added. If nonempty,
|
||||
rem Strawberry Perl will be added to PATH.
|
||||
set _strawberry_perl_home=C:\Strawberry
|
||||
|
||||
rem The location of Microsoft Visual Studio (pathname).
|
||||
set _visual_studio_home=C:\Program Files (x86)\Microsoft Visual Studio 14.0
|
||||
|
||||
rem The EPICS host architecture specification for EPICS_HOST_ARCH
|
||||
rem (<os>-<arch>[-<toolset>] as defined in configure/CONFIG_SITE).
|
||||
set _epics_host_arch=windows-x64
|
||||
|
||||
rem The install location of EPICS Base (pathname). If nonempty and
|
||||
rem _auto_path_append is yes, it will be used to add the host architecture
|
||||
rem bin directory to PATH.
|
||||
set _epics_base=
|
||||
|
||||
rem ----------------------------------------------------------------------
|
||||
rem Internal parts (There is typically no need to modify these)
|
||||
rem ----------------------------------------------------------------------
|
||||
|
||||
rem Reset PATH
|
||||
if "%_auto_path_reset%" == "yes" (
|
||||
set "PATH=%_path_new%"
|
||||
)
|
||||
|
||||
rem Add Strawberry Perl to PATH
|
||||
if "%_strawberry_perl_home%" == "" goto after_add_strawberry_perl
|
||||
rem Can't do this inside parentheses because PATH would be read only once
|
||||
set "PATH=%PATH%;%_strawberry_perl_home%\c\bin"
|
||||
set "PATH=%PATH%;%_strawberry_perl_home%\perl\site\bin"
|
||||
set "PATH=%PATH%;%_strawberry_perl_home%\perl\bin"
|
||||
:after_add_strawberry_perl
|
||||
|
||||
rem Set the environment for Microsoft Visual Studio
|
||||
call "%_visual_studio_home%\VC\vcvarsall.bat" x64
|
||||
|
||||
rem Set the EPICS host architecture specification
|
||||
set "EPICS_HOST_ARCH=%_epics_host_arch%"
|
||||
|
||||
rem Add the EPICS Base host architecture bin directory to PATH
|
||||
if "%_auto_path_append%" == "yes" (
|
||||
if not "%_epics_base%" == "" (
|
||||
set "PATH=%PATH%;%_epics_base%\bin\%_epics_host_arch%"
|
||||
)
|
||||
)
|
||||
|
||||
rem Don't leak variables into the environment
|
||||
set _auto=
|
||||
set _auto_path_reset=
|
||||
set _auto_path_append=
|
||||
set _path_new=
|
||||
set _strawberry_perl_home=
|
||||
set _visual_studio_home=
|
||||
set _epics_host_arch=
|
||||
set _epics_base=
|
||||
Reference in New Issue
Block a user