Compare commits
368 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4e84f36faf | ||
|
|
5b37663bcb | ||
|
|
a808e3c790 | ||
|
|
0743aabaad | ||
|
|
0035ca1846 | ||
|
|
d7434eadc3 | ||
|
|
e542a22631 | ||
|
|
97edcfc289 | ||
|
|
951b6acbbc | ||
|
|
3c99391d93 | ||
|
|
957f386d77 | ||
|
|
60aaa16e1d | ||
|
|
82b3856535 | ||
|
|
3506d11558 | ||
|
|
29bdca3b84 | ||
|
|
a6cdb4c5b6 | ||
|
|
aee99a5987 | ||
|
|
809a1553bf | ||
|
|
8029a72fec | ||
|
|
bcbaffc158 | ||
|
|
10d472202d | ||
|
|
f99bb637b9 | ||
|
|
c55a95fc98 | ||
|
|
7d9746003b | ||
|
|
7d2e352f6a | ||
|
|
5c03f8ba79 | ||
|
|
1eeac6da2f | ||
|
|
d4781bca28 | ||
|
|
32ff3b2ed9 | ||
|
|
25681eca4c | ||
|
|
dcee015f71 | ||
|
|
fddd65ccb1 | ||
|
|
7f9fefc2a4 | ||
|
|
bf7a1605c6 | ||
|
|
0fbfc74182 | ||
|
|
b34aa594c8 | ||
|
|
3124d972bf | ||
|
|
49889d8549 | ||
|
|
a4bdee82c3 | ||
|
|
4160610885 | ||
|
|
19146a597b | ||
|
|
4eb8ea33ea | ||
|
|
1e425159ed | ||
|
|
9259e40483 | ||
|
|
b8f0fd4cdb | ||
|
|
b248023eb2 | ||
|
|
92374b2be2 | ||
|
|
579fc9d0c7 | ||
|
|
cd47bbf99b | ||
|
|
d3d40689c8 | ||
|
|
d5eb055bb7 | ||
|
|
97b29129af | ||
|
|
801710b8c7 | ||
|
|
30f5c3b301 | ||
|
|
69d4c238e7 | ||
|
|
7d1ff1411f | ||
|
|
f0e143b907 | ||
|
|
545550dd9a | ||
|
|
eb060e7fcd | ||
|
|
786c4c2ca2 | ||
|
|
48eb4ff4ac | ||
|
|
6c914d19c3 | ||
|
|
d6f8e9038c | ||
|
|
5917990908 | ||
|
|
eeb198db15 | ||
|
|
1fec685eed | ||
|
|
0bfe0eda0c | ||
|
|
6188d3fdaf | ||
|
|
cd07888149 | ||
|
|
745d2755f9 | ||
|
|
688bc3247c | ||
|
|
f0d814d5c7 | ||
|
|
005580556c | ||
|
|
591e1f22dd | ||
|
|
75a3442669 | ||
|
|
c3cb72a2ca | ||
|
|
d41b3979fb | ||
|
|
a6f85ffd1a | ||
|
|
c56311424c | ||
|
|
7ba12f600c | ||
|
|
808cf80579 | ||
|
|
dd1b65f32c | ||
|
|
1f4e812223 | ||
|
|
ee39b05839 | ||
|
|
9ff6c4bb36 | ||
|
|
ab281f0f53 | ||
|
|
f89ef1f12f | ||
|
|
290f2d7e7d | ||
|
|
88d34c2d38 | ||
|
|
b2fb83179a | ||
|
|
04dd52c79a | ||
|
|
2f2c023a51 | ||
|
|
0f88c67473 | ||
|
|
4eeb205374 | ||
|
|
4c192e7bba | ||
|
|
96f9f355c9 | ||
| 36a8b51d8e | |||
|
|
055223dbe4 | ||
|
|
799e72b1e3 | ||
|
|
b2750bbe93 | ||
|
|
b0cd3518e4 | ||
|
|
4b848ef344 | ||
|
|
9142eca878 | ||
|
|
e923790c41 | ||
|
|
c7e42fab3c | ||
|
|
2f28ce94f4 | ||
|
|
732f8b19be | ||
|
|
b03e2f376b | ||
|
|
59c68807b6 | ||
|
|
a09b1c8569 | ||
|
|
2e7ed02a60 | ||
|
|
089954aaab | ||
|
|
34e0b2f305 | ||
|
|
ceb13797a6 | ||
|
|
084557bd3e | ||
|
|
aeed7cfbdd | ||
|
|
183c3b2a3e | ||
|
|
cf2fef2405 | ||
|
|
298c8706ec | ||
|
|
a9934792a0 | ||
|
|
bc595e3a70 | ||
|
|
5149627242 | ||
|
|
5d5e552a7e | ||
|
|
fd5edce919 | ||
|
|
8709fbb63f | ||
|
|
18a632b0e9 | ||
|
|
6d625f36e3 | ||
|
|
49de2ec498 | ||
|
|
e0015ef5f3 | ||
|
|
0aa6e9603b | ||
|
|
65e7a3e3ef | ||
|
|
958af54895 | ||
|
|
44ed397517 | ||
|
|
ce4fb6085f | ||
|
|
cd32a7cb1e | ||
|
|
f1cbe93b6c | ||
|
|
314e09d8ca | ||
|
|
076175386f | ||
|
|
f40d379485 | ||
|
|
445cbb8221 | ||
|
|
a9c8d8d5d3 | ||
|
|
17efb0b82c | ||
|
|
54efe4b7cd | ||
|
|
1ff64f72a9 | ||
|
|
199979a44c | ||
|
|
f10d0d95b0 | ||
|
|
dfbda1394d | ||
|
|
d05d8807ec | ||
|
|
582a9dbef5 | ||
|
|
b655662131 | ||
|
|
be061e1084 | ||
|
|
379ea6e586 | ||
|
|
c6670e756e | ||
|
|
0d8fb0a895 | ||
|
|
9edb9c2050 | ||
|
|
aa7c2a647c | ||
|
|
6e41f2911b | ||
|
|
91c18c32d4 | ||
|
|
3790ce4452 | ||
|
|
566ab038d2 | ||
|
|
648589e6ab | ||
|
|
841effe9ee | ||
|
|
a9727fd5cb | ||
|
|
fde0485d6b | ||
|
|
db2cd68ce3 | ||
|
|
1492baace9 | ||
|
|
cbf917e833 | ||
|
|
85d1982890 | ||
|
|
45cf2ea5ce | ||
|
|
a95635a018 | ||
|
|
9df39475cd | ||
|
|
bdf01e7a67 | ||
|
|
0dd5f863ef | ||
|
|
38339b6ccf | ||
|
|
2aecf3142a | ||
|
|
ad44c7a501 | ||
|
|
1687757752 | ||
|
|
1533a4f13f | ||
|
|
a1aeb23314 | ||
|
|
933e276e1a | ||
|
|
7f02f8a386 | ||
|
|
cb3fb18f40 | ||
|
|
062c75a078 | ||
|
|
1d6fcd46d6 | ||
|
|
5040af322d | ||
|
|
6f44f64afb | ||
|
|
24df056bcb | ||
|
|
d3b2298bcb | ||
|
|
872009336e | ||
|
|
a8b2bc5c3b | ||
|
|
bac8851132 | ||
|
|
46fa31020e | ||
|
|
b2160bd618 | ||
|
|
5b7f896312 | ||
|
|
5009f288ae | ||
|
|
5f1b3a5419 | ||
|
|
25bb966cbc | ||
|
|
0f35d0c3f9 | ||
|
|
b4625a0c1f | ||
|
|
d38ede55c5 | ||
|
|
809fb88fa2 | ||
|
|
33c3b1c89a | ||
|
|
017d561b8d | ||
|
|
eb817ba056 | ||
|
|
18402f0354 | ||
|
|
02a24a144d | ||
|
|
0cf38bfb29 | ||
|
|
9e7fc1915b | ||
|
|
eaee851a2d | ||
|
|
a9034bb586 | ||
|
|
e13b01208b | ||
|
|
048689d6db | ||
|
|
23cac3c1a8 | ||
|
|
8b9c313941 | ||
|
|
3871f89dcd | ||
|
|
227a749105 | ||
|
|
f9820577c1 | ||
|
|
fdacb6b92e | ||
|
|
5361888997 | ||
|
|
cc4d888ae8 | ||
|
|
e6914f3b80 | ||
|
|
41f1b0ffb5 | ||
|
|
d82d3d3679 | ||
| e48cdb48ac | |||
|
|
3944b32e04 | ||
|
|
a0667a122b | ||
|
|
f2b4c412d3 | ||
|
|
8250339e0d | ||
|
|
803593560d | ||
|
|
bfae080af4 | ||
|
|
6ae3f56560 | ||
|
|
4844fbbd82 | ||
|
|
983937a52f | ||
|
|
90c0f5c48d | ||
|
|
d82529058a | ||
|
|
8668cc1267 | ||
|
|
3465c0c8b0 | ||
|
|
b5be8b2eaf | ||
|
|
97bf9171c6 | ||
|
|
c54237e34a | ||
|
|
bf533ac195 | ||
|
|
6dba2ec1d7 | ||
|
|
819b0de65b | ||
|
|
6867f97346 | ||
|
|
754eb73334 | ||
|
|
8075b3c316 | ||
|
|
1d9e9ff4f7 | ||
|
|
eb8ca22704 | ||
|
|
6feb1c788d | ||
|
|
6e0706a312 | ||
|
|
45bbe274e9 | ||
|
|
2bcaa5448c | ||
|
|
66f2a509db | ||
|
|
538f532184 | ||
|
|
bfd289e85f | ||
|
|
a5bae49dab | ||
|
|
7a612f9524 | ||
|
|
55ec813908 | ||
|
|
0db8f8ca1b | ||
|
|
e6810a4224 | ||
|
|
7b6e48f4e0 | ||
|
|
f0bf61b4cb | ||
|
|
db6e7c7a22 | ||
|
|
5064931aa6 | ||
|
|
dbd6f7e807 | ||
|
|
d0c4cc0cec | ||
|
|
65ef6e9d59 | ||
|
|
8dc131dc4c | ||
|
|
54cd7e7ba1 | ||
|
|
cbe6173417 | ||
|
|
468f965dc2 | ||
|
|
8f358f4dd8 | ||
|
|
05e0381b19 | ||
|
|
06728e0e0b | ||
|
|
3b20e71da5 | ||
|
|
81df1b2892 | ||
|
|
aad8a96b0d | ||
|
|
83d2941405 | ||
|
|
b62ab817c6 | ||
|
|
70ea8d5476 | ||
|
|
5dc7995477 | ||
|
|
cb0d8d1297 | ||
|
|
71278477bc | ||
|
|
e7715ba7b4 | ||
|
|
f64f84744e | ||
|
|
d97a12f095 | ||
|
|
475963453c | ||
|
|
f5a442c0de | ||
|
|
df519ce1a2 | ||
|
|
189060c14f | ||
|
|
feb938fae2 | ||
|
|
e068191684 | ||
|
|
33f2d8c4aa | ||
|
|
60a092fa50 | ||
|
|
24f08460bb | ||
|
|
247fea0fa9 | ||
|
|
8a9637568e | ||
|
|
87229fdef0 | ||
|
|
b0418e5274 | ||
|
|
2e89a60c2d | ||
|
|
09ec3af337 | ||
|
|
70e9d46d75 | ||
|
|
4c99a94453 | ||
|
|
5407a25775 | ||
|
|
6eaef18347 | ||
|
|
f6d8a1ab6c | ||
|
|
3450c9d442 | ||
|
|
a7cb9524c2 | ||
|
|
90ef40e62b | ||
|
|
1290ab7c6c | ||
|
|
45c7039a45 | ||
|
|
b1b51cc70e | ||
|
|
7e1d165092 | ||
|
|
7893445a2e | ||
|
|
465ab44606 | ||
|
|
23450fcfc8 | ||
|
|
37ed77006c | ||
|
|
578608b1c7 | ||
|
|
1d18aa3e6c | ||
|
|
a85967caea | ||
|
|
3c0d4ccf49 | ||
|
|
218459f454 | ||
|
|
13234afc40 | ||
|
|
156b137af0 | ||
|
|
fab9c52858 | ||
|
|
019c20476a | ||
|
|
f3d63da77b | ||
|
|
a50b850ebd | ||
|
|
6767bcd31e | ||
|
|
81550ac4d3 | ||
| d2d8674cb9 | |||
| 6f193242e0 | |||
| 39e8ccdef4 | |||
| eb8992a750 | |||
| 62fb49f93b | |||
| a5c9db8c8e | |||
| 04e752c83a | |||
| a16ce877e7 | |||
| 15f28f1183 | |||
| 9c18ce007a | |||
| 765af2efea | |||
| 059c385286 | |||
| feb1f9b0df | |||
| 9d9840ad1e | |||
| af73e4cf65 | |||
| ad861a0617 | |||
| 1b88e834d6 | |||
| e000ea4913 | |||
| 06f1a8ec23 | |||
| cf2658be53 | |||
| 74a403090b | |||
| dc123a0a37 | |||
|
|
a4e5b9c528 | ||
|
|
b43aafae70 | ||
|
|
905ca4b7ac | ||
|
|
7acd7c6145 | ||
|
|
05c93e954f | ||
|
|
bef9a08f6d | ||
|
|
3e7ad9a86f | ||
|
|
76b9461ee8 | ||
|
|
7eee262486 | ||
|
|
a10379327c | ||
|
|
b37bfe3ed0 | ||
|
|
41d86ecd7a | ||
|
|
961dd2bc5d | ||
|
|
6d8bf7c8ef | ||
|
|
98e5367126 | ||
|
|
8734863f69 |
@@ -1,11 +1,18 @@
|
||||
# AppVeyor configuration for EPICS Base
|
||||
|
||||
# Ralph Lange <ralph.lange@gmx.de>
|
||||
# Copyright (c) 2016-2017 ITER Organization
|
||||
# .appveyor.yml for use with EPICS Base ci-scripts
|
||||
# (see: https://github.com/epics-base/ci-scripts)
|
||||
|
||||
# Version format
|
||||
version: base-{branch}-{build}
|
||||
|
||||
#---------------------------------#
|
||||
# build cache #
|
||||
#---------------------------------#
|
||||
# The AppVeyor cache allowance is way too small (1GB per account across all projects, branches and jobs)
|
||||
# to be used for the dependency builds.
|
||||
|
||||
cache:
|
||||
- C:\Users\appveyor\.tools
|
||||
|
||||
#---------------------------------#
|
||||
# repository cloning #
|
||||
#---------------------------------#
|
||||
@@ -16,20 +23,22 @@ init:
|
||||
- git config --global core.autocrlf true
|
||||
|
||||
# Set clone depth (do not fetch complete history)
|
||||
clone_depth: 50
|
||||
clone_depth: 5
|
||||
|
||||
# Skipping commits affecting only specific files
|
||||
skip_commits:
|
||||
files:
|
||||
- 'documentation/*'
|
||||
- 'templates/*'
|
||||
- '**/*.html'
|
||||
- '**/*.md'
|
||||
- '.travis.yml'
|
||||
|
||||
#---------------------------------#
|
||||
# build matrix configuration #
|
||||
#---------------------------------#
|
||||
|
||||
image: Visual Studio 2015
|
||||
|
||||
# Build Configurations: dll/static, regular/debug
|
||||
configuration:
|
||||
- dynamic
|
||||
@@ -37,45 +46,45 @@ configuration:
|
||||
- dynamic-debug
|
||||
- static-debug
|
||||
|
||||
# Environment variables: compiler toolchain
|
||||
# Environment variables: compiler toolchain, base version, setup file, ...
|
||||
environment:
|
||||
matrix:
|
||||
- TOOLCHAIN: mingw
|
||||
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
|
||||
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
|
||||
TOOLCHAIN: 2019
|
||||
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
|
||||
TOOLCHAIN: 2017
|
||||
- TOOLCHAIN: 14.0
|
||||
- TOOLCHAIN: 12.0
|
||||
- TOOLCHAIN: 11.0
|
||||
- TOOLCHAIN: 10.0
|
||||
# common / default variables for all jobs
|
||||
SETUP_PATH: .ci-local:.ci
|
||||
BASE: SELF
|
||||
EPICS_TEST_IMPRECISE_TIMING: YES
|
||||
|
||||
# Platform: architecture
|
||||
matrix:
|
||||
- CMP: vs2019
|
||||
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
|
||||
- CMP: vs2017
|
||||
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
|
||||
- CMP: vs2015
|
||||
- CMP: vs2013
|
||||
- CMP: vs2012
|
||||
- CMP: vs2010
|
||||
- CMP: gcc
|
||||
|
||||
# Platform: processor architecture
|
||||
platform:
|
||||
- x86
|
||||
- x64
|
||||
|
||||
# Matrix configuration: allow specific failing jobs
|
||||
# Matrix configuration: exclude sets of jobs
|
||||
matrix:
|
||||
exclude:
|
||||
# VS Express installs don't have the 64 bit compiler
|
||||
# VS2012 and older installs don't have the 64 bit compiler
|
||||
- platform: x64
|
||||
TOOLCHAIN: 10.0
|
||||
# Exclude to reduce total job runtime
|
||||
# skip 64-bit for older and 32-bit for newer
|
||||
CMP: vs2012
|
||||
- platform: x64
|
||||
TOOLCHAIN: 11.0
|
||||
CMP: vs2010
|
||||
- platform: x64
|
||||
CMP: vs2008
|
||||
# Exclude more jobs to reduce build time
|
||||
# Skip 32-bit for "middle-aged" compilers
|
||||
- platform: x86
|
||||
TOOLCHAIN: mingw
|
||||
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
|
||||
CMP: vs2017
|
||||
- platform: x86
|
||||
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
|
||||
TOOLCHAIN: 2019
|
||||
- platform: x86
|
||||
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
|
||||
TOOLCHAIN: 2017
|
||||
|
||||
CMP: vs2015
|
||||
|
||||
#---------------------------------#
|
||||
# building & testing #
|
||||
@@ -83,18 +92,17 @@ matrix:
|
||||
|
||||
install:
|
||||
- cmd: git submodule update --init --recursive
|
||||
- cmd: .ci/appveyor-prepare.bat
|
||||
- cmd: python .ci/cue.py prepare
|
||||
|
||||
build_script:
|
||||
- cmd: .ci/appveyor-make.bat
|
||||
- cmd: python .ci/cue.py build
|
||||
|
||||
test_script:
|
||||
- cmd: .ci/appveyor-make.bat tapfiles
|
||||
- cmd: .ci/appveyor-make.bat test-results
|
||||
- cmd: python .ci/cue.py test
|
||||
|
||||
on_finish:
|
||||
- ps: Get-ChildItem *.tap -Recurse -Force | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name }
|
||||
|
||||
- cmd: python .ci/cue.py build test-results -s
|
||||
|
||||
#---------------------------------#
|
||||
# debugging #
|
||||
@@ -104,10 +112,13 @@ on_finish:
|
||||
## note that you will need to connect within the usual build timeout limit (60 minutes)
|
||||
## so you may want to adjust the build matrix above to just build the one of interest
|
||||
|
||||
#on_failure:
|
||||
# print the connection info
|
||||
#init:
|
||||
# - ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
|
||||
# - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
|
||||
|
||||
# block a failed build (until the watchdog barks)
|
||||
#on_failure:
|
||||
# - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
|
||||
|
||||
#---------------------------------#
|
||||
# notifications #
|
||||
|
||||
1
.ci
Submodule
1
.ci
Submodule
Submodule .ci added at 87942a7c29
19
.ci-local/travis-fixup.sh
Executable file
19
.ci-local/travis-fixup.sh
Executable file
@@ -0,0 +1,19 @@
|
||||
#!/bin/sh
|
||||
set -e -u -x
|
||||
|
||||
env|grep TRAVIS
|
||||
|
||||
[ "$TRAVIS_OS_NAME" = "linux" ] || exit 0
|
||||
|
||||
# Ensure there is an interface with a (correct) broadcast address
|
||||
# eg. 'trusty' VMs have interface broadcast address mis-configured
|
||||
# (why oh why do people insist on setting this explicitly?)
|
||||
|
||||
sudo ip tuntap add dev tap42 mode tap
|
||||
|
||||
sudo ip addr add 192.168.240.1/24 broadcast + dev tap42
|
||||
|
||||
sudo ip link set dev tap42 up
|
||||
|
||||
# note that this device will be UP but not RUNNING
|
||||
# so java will see it as not UP since java confuses UP and RUNNING
|
||||
@@ -1,132 +0,0 @@
|
||||
:: Universal build script for AppVeyor (https://ci.appveyor.com/)
|
||||
:: Environment:
|
||||
:: TOOLCHAIN - toolchain version [10.0/11.0/12.0/14.0/2017/2019/mingw]
|
||||
:: CONFIGURATION - determines EPICS build [dynamic/static]
|
||||
:: PLATFORM - architecture [x86/x64]
|
||||
::
|
||||
:: All command line args are passed to make
|
||||
|
||||
Setlocal EnableDelayedExpansion
|
||||
|
||||
:: we do not currently have a combined static and debug EPICS_HOST_ARCH target
|
||||
:: So a combined debug and static target will appear to be just static
|
||||
:: but debug will have been specified in CONFIG_SITE by appveyor-prepare.bat
|
||||
set "ST="
|
||||
echo.%CONFIGURATION% | findstr /C:"debug">nul && (
|
||||
set "ST=-debug"
|
||||
)
|
||||
echo.%CONFIGURATION% | findstr /C:"static">nul && (
|
||||
set "ST=-static"
|
||||
)
|
||||
|
||||
set MY_OS=64BIT
|
||||
if "%PLATFORM%"=="x86" set MY_OS=32BIT
|
||||
|
||||
echo [INFO] Platform: %MY_OS%
|
||||
|
||||
:: Use parallel make, except for 3.14
|
||||
set "MAKEARGS=-j2 -Otarget"
|
||||
if "%APPVEYOR_REPO_BRANCH%"=="3.14" set MAKEARGS=
|
||||
|
||||
if "%TOOLCHAIN%"=="mingw" (
|
||||
set "MAKE=mingw32-make"
|
||||
if "%MY_OS%"=="64BIT" (
|
||||
set "EPICS_HOST_ARCH=windows-x64-mingw"
|
||||
set "INCLUDE=C:\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64\include;%INCLUDE%"
|
||||
set "PATH=C:\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64\bin;%PATH%"
|
||||
echo [INFO] MinGW Toolchain 64bit
|
||||
) else (
|
||||
set "EPICS_HOST_ARCH=win32-x86-mingw"
|
||||
set "INCLUDE=C:\mingw-w64\i686-6.3.0-posix-dwarf-rt_v5-rev1\mingw32\include;%INCLUDE%"
|
||||
set "PATH=C:\mingw-w64\i686-6.3.0-posix-dwarf-rt_v5-rev1\mingw32\bin;%PATH%"
|
||||
echo [INFO] MinGW Toolchain 32bit
|
||||
)
|
||||
echo [INFO] Compiler Version
|
||||
gcc -v
|
||||
goto Finish
|
||||
)
|
||||
|
||||
if "%TOOLCHAIN%"=="2019" (
|
||||
echo [INFO] Setting strawberry perl path
|
||||
set "PATH=c:\strawberry\perl\site\bin;C:\strawberry\perl\bin;%PATH%"
|
||||
)
|
||||
|
||||
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 "%MY_OS%"=="64BIT" (
|
||||
set EPICS_HOST_ARCH=windows-x64%ST%
|
||||
:: VS 2017/2019
|
||||
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/2019
|
||||
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% / %MY_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% %*
|
||||
@@ -1,52 +0,0 @@
|
||||
:: Build script for AppVeyor (https://ci.appveyor.com/)
|
||||
:: Environment:
|
||||
:: TOOLCHAIN - Toolchain Version [9.0/10.0/11.0/12.0/14.0/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 Mingw (TOOLCHAIN setting) in the in the appropriate flavor
|
||||
:: - Download and install Make-4.1 from EPICS download page
|
||||
|
||||
Setlocal EnableDelayedExpansion
|
||||
|
||||
set MY_OS=64BIT
|
||||
if "%PLATFORM%"=="x86" set MY_OS=32BIT
|
||||
|
||||
echo [INFO] Platform: %MY_OS%
|
||||
|
||||
:: with MSVC either static or debug can be handled as part
|
||||
:: of EPICS_HOST_ARCH but not both. So we set the appropriate
|
||||
:: options in CONFIG_SITE. For mingw and cygwin they are missing
|
||||
:: some static and debug targets so set things here too
|
||||
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
|
||||
)
|
||||
|
||||
echo [INFO] Installing Make 4.2.1 from ANL web site
|
||||
curl -fsS --retry 3 -o C:\tools\make-4.2.1.zip https://epics.anl.gov/download/tools/make-4.2.1-win64.zip
|
||||
cd \tools
|
||||
"C:\Program Files\7-Zip\7z" e make-4.2.1.zip
|
||||
|
||||
set "PERLVER=5.30.0.1"
|
||||
if "%TOOLCHAIN%"=="2019" (
|
||||
echo [INFO] Installing Strawberry Perl %PERLVER%
|
||||
curl -fsS --retry 3 -o C:\tools\perl-%PERLVER%.zip http://strawberryperl.com/download/%PERLVER%/strawberry-perl-%PERLVER%-64bit.zip
|
||||
cd \tools
|
||||
"C:\Program Files\7-Zip\7z" x perl-%PERLVER%.zip -oC:\strawberry
|
||||
cd \strawberry
|
||||
:: we set PATH in appveyor-build.bat
|
||||
call relocation.pl.bat
|
||||
)
|
||||
@@ -1,8 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Checkout submodules on their appropriate branches
|
||||
#
|
||||
|
||||
git submodule foreach '\
|
||||
git checkout `git config -f $toplevel/.gitmodules submodule.$name.branch` && \
|
||||
git pull '
|
||||
@@ -1,77 +0,0 @@
|
||||
#!/bin/sh
|
||||
set -e -x
|
||||
|
||||
die() {
|
||||
echo "$1" >&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
CACHEKEY=1
|
||||
|
||||
export EPICS_HOST_ARCH=`perl src/tools/EpicsHostArch.pl`
|
||||
|
||||
[ -e configure/os/CONFIG_SITE.Common.linux-x86 ] || die "Wrong location: $PWD"
|
||||
|
||||
case "$CMPLR" in
|
||||
clang)
|
||||
echo "Host compiler is clang"
|
||||
cat << EOF >> configure/os/CONFIG_SITE.Common.$EPICS_HOST_ARCH
|
||||
GNU = NO
|
||||
CMPLR_CLASS = clang
|
||||
CC = clang
|
||||
CCC = clang++
|
||||
EOF
|
||||
;;
|
||||
*) echo "Host compiler is default";;
|
||||
esac
|
||||
|
||||
if [ "$STATIC" = "YES" ]
|
||||
then
|
||||
echo "Build static libraries/executables"
|
||||
cat << EOF >> configure/CONFIG_SITE
|
||||
SHARED_LIBRARIES=NO
|
||||
STATIC_BUILD=YES
|
||||
EOF
|
||||
fi
|
||||
|
||||
# requires wine and g++-mingw-w64-i686
|
||||
if [ "$WINE" = "32" ]
|
||||
then
|
||||
echo "Cross mingw32"
|
||||
sed -i -e '/CMPLR_PREFIX/d' configure/os/CONFIG_SITE.linux-x86.win32-x86-mingw
|
||||
cat << EOF >> configure/os/CONFIG_SITE.linux-x86.win32-x86-mingw
|
||||
CMPLR_PREFIX=i686-w64-mingw32-
|
||||
EOF
|
||||
cat << EOF >> configure/CONFIG_SITE
|
||||
CROSS_COMPILER_TARGET_ARCHS+=win32-x86-mingw
|
||||
EOF
|
||||
fi
|
||||
|
||||
# set RTEMS to eg. "4.9" or "4.10"
|
||||
if [ -n "$RTEMS" ]
|
||||
then
|
||||
echo "Cross RTEMS${RTEMS} for pc386"
|
||||
curl -L "https://github.com/mdavidsaver/rsb/releases/download/20171203-${RTEMS}/i386-rtems${RTEMS}-trusty-20171203-${RTEMS}.tar.bz2" \
|
||||
| tar -C / -xmj
|
||||
|
||||
sed -i -e '/^RTEMS_VERSION/d' -e '/^RTEMS_BASE/d' configure/os/CONFIG_SITE.Common.RTEMS
|
||||
cat << EOF >> configure/os/CONFIG_SITE.Common.RTEMS
|
||||
RTEMS_VERSION=$RTEMS
|
||||
RTEMS_BASE=$HOME/.rtems
|
||||
EOF
|
||||
cat << EOF >> configure/CONFIG_SITE
|
||||
CROSS_COMPILER_TARGET_ARCHS += RTEMS-pc386-qemu
|
||||
EOF
|
||||
|
||||
# find local qemu-system-i386
|
||||
echo -n "Using QEMU: "
|
||||
type qemu-system-i386 || echo "Missing qemu"
|
||||
fi
|
||||
|
||||
make -j2 $EXTRA
|
||||
|
||||
if [ "$TEST" != "NO" ]
|
||||
then
|
||||
make -j2 tapfiles
|
||||
make -s test-results
|
||||
fi
|
||||
4
.gitmodules
vendored
4
.gitmodules
vendored
@@ -22,3 +22,7 @@
|
||||
path = modules/pva2pva
|
||||
url = https://github.com/epics-base/pva2pva
|
||||
branch = master
|
||||
[submodule ".ci"]
|
||||
path = .ci
|
||||
url = https://github.com/epics-base/ci-scripts
|
||||
branch = master
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
#
|
||||
# Make tar for git repo w/ one level of sub modules.
|
||||
#
|
||||
@@ -9,14 +9,18 @@ die() {
|
||||
exit 1
|
||||
}
|
||||
|
||||
TOPREV="$1"
|
||||
FINALTAR="$2"
|
||||
PREFIX="$3"
|
||||
maybedie() {
|
||||
if [ "$DEVMODE" ]; then
|
||||
echo "Warning: $1" >&2
|
||||
else
|
||||
echo "Error: $1" >&2
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
if ! [ "$TOPREV" ]
|
||||
then
|
||||
usage() {
|
||||
cat <<EOF >&2
|
||||
usage: $0 <rev> [<outfile> [<prefix>]]
|
||||
usage: $0 [-v] [-s] <rev> [<outfile> [<prefix>]]
|
||||
|
||||
<rev> may be any git revision spec. (tag, branch, or commit id).
|
||||
|
||||
@@ -24,9 +28,33 @@ usage: $0 <rev> [<outfile> [<prefix>]]
|
||||
If <outfile> is omitted, "base-<rev>.tar.gz" will be used.
|
||||
If provided, <prefix> must end with "/". If <prefix> is omitted,
|
||||
the default is "base-<rev>/".
|
||||
|
||||
Options:
|
||||
|
||||
-v Enable verbose prints
|
||||
-d Enable permissive developer mode
|
||||
EOF
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
export DEVMODE=
|
||||
|
||||
while getopts "vd" OPT
|
||||
do
|
||||
case "$OPT" in
|
||||
v) set -x;;
|
||||
d) DEVMODE=1;;
|
||||
?) echo "Unknown option"
|
||||
usage;;
|
||||
esac
|
||||
done
|
||||
shift $(($OPTIND - 1))
|
||||
|
||||
TOPREV="$1"
|
||||
FINALTAR="$2"
|
||||
PREFIX="${3:-}"
|
||||
|
||||
[ "$TOPREV" ] || usage
|
||||
|
||||
case "$FINALTAR" in
|
||||
"")
|
||||
@@ -59,16 +87,13 @@ case "$PREFIX" in
|
||||
esac
|
||||
|
||||
# Check for both <tag> and R<tag>
|
||||
if [ "$TOPREV" = "HEAD" ]
|
||||
then
|
||||
true
|
||||
elif ! [ `git tag -l $TOPREV` ]
|
||||
if ! [ `git tag -l $TOPREV` ]
|
||||
then
|
||||
if [ `git tag -l R$TOPREV` ]
|
||||
then
|
||||
TOPREV="R$TOPREV"
|
||||
else
|
||||
die "No tags exist '$TOPREV' or 'R$TOPREV'"
|
||||
maybedie "No tags exist '$TOPREV' or 'R$TOPREV'"
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -89,11 +114,17 @@ git archive --prefix=$PREFIX $TOPREV | tar -C "$TDIR"/tar -x
|
||||
#
|
||||
# sub-modules appear in tree as eg.:
|
||||
# 160000 commit c3a6cfcf0dad4a4eeecf59b474710d06ff3eb68a modules/ca
|
||||
git ls-tree -r $TOPREV | awk '/^[0-9]+ commit / {print $3, $4}' | \
|
||||
git ls-tree -r $TOPREV | \
|
||||
awk '/^[0-9]+ commit / && $4 != ".ci" {print $3, $4}' | \
|
||||
while read HASH MODDIR
|
||||
do
|
||||
echo "Visiting $HASH $MODDIR"
|
||||
git -C $MODDIR archive --prefix=${PREFIX}${MODDIR}/ $HASH | tar -C "$TDIR"/tar -x
|
||||
if [ -e $MODDIR/.git ]
|
||||
then
|
||||
git -C $MODDIR archive --prefix=${PREFIX}${MODDIR}/ $HASH | tar -C "$TDIR"/tar -x
|
||||
else
|
||||
maybedie " Submodule not checked out."
|
||||
fi
|
||||
done
|
||||
|
||||
# make a list of files copied and filter out undesirables
|
||||
@@ -105,13 +136,17 @@ sed -i -e 's|^\./||' "$TDIR"/list.1
|
||||
|
||||
# Exclude files
|
||||
sed \
|
||||
-e '/\/\.\?ci\//d' \
|
||||
-e '/\/\.ci\//d' \
|
||||
-e '/\/\.ci-local\//d' \
|
||||
-e '/\/\.tools\//d' \
|
||||
-e '/\/jenkins\//d' \
|
||||
-e '/\/\.git/d' \
|
||||
-e '/\/\.hgtags$/d' \
|
||||
-e '/\/\.cproject$/d' \
|
||||
-e '/\/\.project$/d' \
|
||||
-e '/\/\.travis\.yml$/d' \
|
||||
-e '/\/\.appveyor\.yml$/d' \
|
||||
-e '/\/\.readthedocs\.yml$/d' \
|
||||
"$TDIR"/list.1 > "$TDIR"/list.2
|
||||
|
||||
if ! diff -U 0 "$TDIR"/list.1 "$TDIR"/list.2
|
||||
@@ -129,5 +164,5 @@ tar -t $TAROPT -f "$FINALTAR" > "$TDIR"/list.3
|
||||
# make sure we haven't picked up anything extra
|
||||
if ! diff -u "$TDIR"/list.2 "$TDIR"/list.3
|
||||
then
|
||||
echo "Oops! Tarfile diff against plan shown above"
|
||||
die "Oops! Tarfile diff against plan shown above"
|
||||
fi
|
||||
|
||||
98
.travis.yml
98
.travis.yml
@@ -1,27 +1,91 @@
|
||||
sudo: false
|
||||
dist: trusty
|
||||
language: c
|
||||
compiler:
|
||||
- gcc
|
||||
# .travis.yml for use with EPICS Base ci-scripts
|
||||
# (see: https://github.com/epics-base/ci-scripts)
|
||||
|
||||
language: cpp
|
||||
compiler: gcc
|
||||
dist: xenial
|
||||
|
||||
cache:
|
||||
directories:
|
||||
- $HOME/.cache
|
||||
|
||||
env:
|
||||
global:
|
||||
- SETUP_PATH=.ci-local:.ci
|
||||
- BASE=SELF
|
||||
- EPICS_TEST_IMPRECISE_TIMING=YES
|
||||
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
# for all EPICS builds
|
||||
- libreadline6-dev
|
||||
- libncurses5-dev
|
||||
- perl
|
||||
# for clang compiler
|
||||
- clang
|
||||
# for mingw builds (32bit and 64bit)
|
||||
- g++-mingw-w64-i686
|
||||
- g++-mingw-w64-x86-64
|
||||
# for RTEMS cross builds
|
||||
- qemu-system-x86
|
||||
homebrew:
|
||||
packages:
|
||||
# for all EPICS builds
|
||||
- bash
|
||||
update: true
|
||||
|
||||
install:
|
||||
- ./.ci-local/travis-fixup.sh
|
||||
- python .ci/cue.py prepare
|
||||
|
||||
script:
|
||||
- .ci/travis-build.sh
|
||||
env:
|
||||
- CMPLR=gcc EXTRA=LINKER_USE_RPATH=ORIGIN
|
||||
- CMPLR=clang
|
||||
- CMPLR=gcc STATIC=YES
|
||||
- CMPLR=clang STATIC=YES
|
||||
- CMPLR=gcc EXTRA=CMD_CXXFLAGS=-std=c++11
|
||||
- CMPLR=clang EXTRA=CMD_CXXFLAGS=-std=c++11
|
||||
- WINE=32 TEST=NO STATIC=YES
|
||||
- WINE=32 TEST=NO STATIC=NO
|
||||
- RTEMS=4.10 TEST=YES
|
||||
- RTEMS=4.9 TEST=YES
|
||||
- python .ci/cue.py build
|
||||
- python .ci/cue.py test
|
||||
- python .ci/cue.py test-results
|
||||
|
||||
# Define build jobs
|
||||
|
||||
jobs:
|
||||
include:
|
||||
|
||||
# Different configurations of default gcc and clang
|
||||
- dist: bionic
|
||||
|
||||
- dist: xenial
|
||||
|
||||
- dist: bionic
|
||||
env: BCFG=static EXTRA="CMD_CXXFLAGS=-std=c++11"
|
||||
|
||||
- dist: trusty
|
||||
env: EXTRA="CMD_CXXFLAGS=-std=c++11"
|
||||
|
||||
- dist: bionic
|
||||
compiler: clang
|
||||
|
||||
- compiler: clang
|
||||
|
||||
- dist: trusty
|
||||
compiler: clang
|
||||
env: BCFG=static
|
||||
|
||||
# Cross-compilations to Windows using MinGW and WINE
|
||||
|
||||
- env: WINE=32 TEST=NO BCFG=static
|
||||
|
||||
- env: WINE=32 TEST=NO
|
||||
|
||||
# Cross-compilation to RTEMS
|
||||
|
||||
- env: RTEMS=4.10
|
||||
|
||||
- env: RTEMS=4.9
|
||||
|
||||
# MacOS build
|
||||
|
||||
- os: osx
|
||||
env:
|
||||
- EXTRA="CMD_CFLAGS=-mmacosx-version-min=10.7"
|
||||
- EXTRA1="CMD_CXXFLAGS=-mmacosx-version-min=10.7 -std=c++11 -stdlib=libc++"
|
||||
- EXTRA2="CMD_LDXFLAGS=-mmacosx-version-min=10.7 -std=c++11 -stdlib=libc++"
|
||||
compiler: clang
|
||||
|
||||
@@ -58,12 +58,8 @@ include $(CONFIG)/CONFIG_BASE_VERSION
|
||||
include $(CONFIG)/os/CONFIG.$(EPICS_HOST_ARCH).Common
|
||||
-include $(CONFIG)/os/CONFIG_SITE.$(EPICS_HOST_ARCH).Common
|
||||
|
||||
# Parse configure/RELEASE
|
||||
# except when building Base itself, where this file is empty,
|
||||
# and would error in src/tools/ anyway.
|
||||
ifndef BASE_TOP
|
||||
# Parse configure/RELEASE to find all upstream modules
|
||||
RELEASE_TOPS := $(shell $(CONVERTRELEASE) -T $(TOP) releaseTops)
|
||||
endif
|
||||
|
||||
ifdef T_A
|
||||
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
# 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
|
||||
# EPICS Base is distributed subject to a Software License Agreement found
|
||||
# in file LICENSE that is included with this distribution.
|
||||
#*************************************************************************
|
||||
|
||||
|
||||
@@ -42,8 +42,6 @@ FIND_TOOL = $(firstword $(wildcard $(TOOLS)/$(1) $(EPICS_BASE)/src/tools/$(1)))
|
||||
PODTOHTML = $(PERL) $(TOOLS)/podToHtml.pl
|
||||
CONVERTRELEASE = $(PERL) $(call FIND_TOOL,convertRelease.pl)
|
||||
FULLPATHNAME = $(PERL) $(TOOLS)/fullPathName.pl
|
||||
TAPTOJUNIT = $(PERL) $(TOOLS)/tap-to-junit-xml.pl
|
||||
PROVE = $(PERL) $(TOOLS)/epicsProve.pl
|
||||
GENVERSIONHEADER = $(PERL) $(TOOLS)/genVersionHeader.pl $(QUIET_FLAG) $(QUESTION_FLAG)
|
||||
|
||||
MAKERPATH = $(PYTHON) $(TOOLS)/makeRPath.py
|
||||
@@ -63,3 +61,13 @@ REPLACEVAR = $(PERL) $(TOOLS)/replaceVAR.pl
|
||||
# tools for cleaning out unwanted files
|
||||
CVSCLEAN = $(call FIND_TOOL,cvsclean.pl)
|
||||
DEPCLEAN = $(call FIND_TOOL,depclean.pl)
|
||||
|
||||
#---------------------------------------------------------------
|
||||
# Tools for testing
|
||||
TAPTOJUNIT = $(PERL) $(TOOLS)/tap-to-junit-xml.pl
|
||||
PROVE = $(PERL) $(TOOLS)/epicsProve.pl
|
||||
PROVE.tap = $(PROVE) --ext .tap --exec "$(CAT)"
|
||||
|
||||
TEST_FAILURE_FILENAME = .tests-failed.log
|
||||
TEST_FAILURE_FILE = $(TOP)/$(TEST_FAILURE_FILENAME)
|
||||
PROVE_FAILURE = echo $(abspath .)>> $(TEST_FAILURE_FILE)
|
||||
|
||||
@@ -48,7 +48,7 @@ EPICS_VERSION = 7
|
||||
EPICS_REVISION = 0
|
||||
|
||||
# EPICS_MODIFICATION must be a number >=0 and <256
|
||||
EPICS_MODIFICATION = 3
|
||||
EPICS_MODIFICATION = 4
|
||||
|
||||
# EPICS_PATCH_LEVEL must be a number (win32 resource file requirement)
|
||||
# Not included in the official EPICS version number if zero
|
||||
@@ -57,15 +57,6 @@ EPICS_PATCH_LEVEL = 1
|
||||
# Immediately after an official release the EPICS_PATCH_LEVEL is incremented
|
||||
# and the -DEV suffix is added (similar to the Maven -SNAPSHOT versions)
|
||||
EPICS_DEV_SNAPSHOT=
|
||||
#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
|
||||
|
||||
# No changes should be needed below here
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
EPICS_CA_MAJOR_VERSION = 4
|
||||
EPICS_CA_MINOR_VERSION = 13
|
||||
EPICS_CA_MAINTENANCE_VERSION = 5
|
||||
EPICS_CA_MAINTENANCE_VERSION = 7
|
||||
|
||||
# Development flag, set to zero for release versions
|
||||
|
||||
|
||||
@@ -306,7 +306,7 @@ LDLIBS = $(POSIX_LDLIBS) $(ARCH_DEP_LDLIBS) $(DEBUG_LDLIBS) $(OP_SYS_LDLIBS)\
|
||||
CPPFLAGS = $($(BUILD_CLASS)_CPPFLAGS) $(POSIX_CPPFLAGS) $(OPT_CPPFLAGS)\
|
||||
$(DEBUG_CPPFLAGS) $(WARN_CPPFLAGS) $(BASE_CPPFLAGS) $(TARGET_CPPFLAGS)\
|
||||
$(USR_CPPFLAGS) $(CMD_CPPFLAGS) $(ARCH_DEP_CPPFLAGS) $(OP_SYS_CPPFLAGS)\
|
||||
$(OP_SYS_INCLUDE_CPPFLAGS) $(CODE_CPPFLAGS)
|
||||
$(OP_SYS_INCLUDE_CPPFLAGS) $(CODE_CPPFLAGS) $(API_CPPFLAGS)
|
||||
|
||||
#--------------------------------------------------
|
||||
# ar definition default
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
# Version number for the database APIs and shared library
|
||||
|
||||
EPICS_DATABASE_MAJOR_VERSION = 3
|
||||
EPICS_DATABASE_MINOR_VERSION = 17
|
||||
EPICS_DATABASE_MAINTENANCE_VERSION = 5
|
||||
EPICS_DATABASE_MINOR_VERSION = 18
|
||||
EPICS_DATABASE_MAINTENANCE_VERSION = 1
|
||||
|
||||
# Development flag, set to zero for release versions
|
||||
|
||||
|
||||
@@ -3,9 +3,8 @@
|
||||
# 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.
|
||||
# EPICS BASE is distributed subject to a Software License Agreement found
|
||||
# in file LICENSE that is included with this distribution.
|
||||
#*************************************************************************
|
||||
# Author: Andrew Johnson
|
||||
# Date: 20 April 1995
|
||||
@@ -54,8 +53,3 @@ EPICS_IOC_IGNORE_SERVERS=""
|
||||
# EPICS_IOC_LOG_PORT Log server port number etc.
|
||||
EPICS_IOC_LOG_PORT=7004
|
||||
|
||||
# Other services:
|
||||
|
||||
EPICS_CMD_PROTO_PORT=
|
||||
EPICS_AR_PORT=7002
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
# Version number for the libcom APIs and shared library
|
||||
|
||||
EPICS_LIBCOM_MAJOR_VERSION = 3
|
||||
EPICS_LIBCOM_MINOR_VERSION = 17
|
||||
EPICS_LIBCOM_MAINTENANCE_VERSION = 6
|
||||
EPICS_LIBCOM_MINOR_VERSION = 18
|
||||
EPICS_LIBCOM_MAINTENANCE_VERSION = 1
|
||||
|
||||
# Development flag, set to zero for release versions
|
||||
|
||||
|
||||
@@ -67,8 +67,7 @@
|
||||
# linux-586 (linux-x86 host)
|
||||
# linux-686 (linux-x86 host)
|
||||
# linux-arm (linux-x86 or -x86_64 host)
|
||||
# linux-arm_eb (linux-x86 host)
|
||||
# linux-arm_el (linux-x86 host)
|
||||
# linux-aarch64 (linux-x86_64 host)
|
||||
# linux-athlon (linux-x86 host)
|
||||
# linux-cris (Axis GNU crosscompiler on linux-x86 host)
|
||||
# linux-cris_v10 (Axis GNU crosscompiler on linux-x86 host)
|
||||
@@ -76,9 +75,6 @@
|
||||
# linux-microblaze
|
||||
# linux-xscale_be
|
||||
# vxWorks-486
|
||||
# vxWorks-68040
|
||||
# vxWorks-68040lc
|
||||
# vxWorks-68060
|
||||
# vxWorks-pentium
|
||||
# vxWorks-ppc32 (32-bit PowerPC CPUs with full FPU)
|
||||
# vxWorks-ppc32sf (32-bit PowerPC CPUs without FPU)
|
||||
|
||||
@@ -436,7 +436,7 @@ $(COMMON_DIR)/%.html: %.dbd.pod
|
||||
|
||||
$(COMMON_DIR)/%.html: %.pod
|
||||
@$(RM) $(notdir $@)
|
||||
$(PODTOHTML) -o $(notdir $@) $<
|
||||
$(PODTOHTML) -s -s -o $(notdir $@) $<
|
||||
@$(MV) $(notdir $@) $@
|
||||
|
||||
$(COMMON_DIR)/%.html: %.pm
|
||||
|
||||
@@ -108,17 +108,17 @@ PRODTARGETS += $(PRODNAME) $(MUNCHNAME) $(CTDT_SRCS) $(CTDT_OBJS) $(NMS)
|
||||
TESTPRODTARGETS += $(TESTPRODNAME) $(TESTMUNCHNAME)
|
||||
|
||||
#---------------------------------------------------------------
|
||||
# Test specifications and test result files
|
||||
# Test result files
|
||||
#
|
||||
ifneq (,$(strip $(TESTS)))
|
||||
TARGETS += testspec
|
||||
endif
|
||||
|
||||
# Enable testing if this host can run tests on the current target
|
||||
ifneq (,$(findstring $(T_A),$(EPICS_HOST_ARCH) $(CROSS_COMPILER_RUNTEST_ARCHS)))
|
||||
# Enable testing if this host can run tests for the current target
|
||||
ifneq (,$(filter $(T_A), $(EPICS_HOST_ARCH) $(CROSS_COMPILER_RUNTEST_ARCHS)))
|
||||
RUNTESTS_ENABLED = YES
|
||||
TAPFILES += $(TESTSCRIPTS:.t=.tap)
|
||||
JUNITFILES += $(TAPFILES:.tap=.xml)
|
||||
TESTSCRIPTS.t = $(filter %.t, $(TESTSCRIPTS))
|
||||
TAPFILES.t += $(TESTSCRIPTS.t:.t=.tap)
|
||||
JUNITFILES.t += $(TESTSCRIPTS.t:.t=-results.xml)
|
||||
TAPFILES += $(TAPFILES.t)
|
||||
JUNITFILES += $(JUNITFILES.t)
|
||||
endif
|
||||
|
||||
#---------------------------------------------------------------
|
||||
@@ -173,9 +173,9 @@ ifdef RES
|
||||
@$(RM) *$(RES)
|
||||
endif
|
||||
|
||||
# Sort mkdir targets to remove duplicates & make parents first
|
||||
$(DIRECTORY_TARGETS):
|
||||
$(MKDIR) $(sort $@)
|
||||
# Sort directories to remove duplicates & make parents first
|
||||
$(sort $(DIRECTORY_TARGETS)):
|
||||
$(MKDIR) $@
|
||||
|
||||
# Install LIB_INSTALLS libraries before linking executables
|
||||
$(TESTPRODNAME) $(PRODNAME): | $(INSTALL_LIB_INSTALLS)
|
||||
@@ -354,23 +354,22 @@ $(MODNAME): %$(MODEXT): %$(EXE)
|
||||
#---------------------------------------------------------------
|
||||
# Automated testing
|
||||
|
||||
runtests: $(TESTSCRIPTS)
|
||||
runtests: run-tap-tests
|
||||
run-tap-tests: $(TESTSCRIPTS.t)
|
||||
ifneq ($(TESTSCRIPTS.t),)
|
||||
ifdef RUNTESTS_ENABLED
|
||||
$(PERL) -MTest::Harness -e 'runtests @ARGV if @ARGV;' $^
|
||||
$(PROVE) --failures --color $^ || $(PROVE_FAILURE)
|
||||
endif
|
||||
endif
|
||||
|
||||
testspec: $(TESTSCRIPTS)
|
||||
@$(RM) $@
|
||||
@echo OS-class: $(OS_CLASS) > $@
|
||||
@echo Target-arch: $(T_A) >> $@
|
||||
$(if $^, @echo Tests: $^ >> $@)
|
||||
$(if $(TESTFILES), @echo Files: $(TESTFILES) >> $@)
|
||||
$(if $(TESTSPEC_$(OS_CLASS)), @echo "Harness: $(TESTSPEC_$(OS_CLASS))" >> $@)
|
||||
tapfiles: $(TAPFILES)
|
||||
junitfiles: $(JUNITFILES)
|
||||
|
||||
test-results: tapfiles
|
||||
ifneq ($(TAPFILES),)
|
||||
test-results: tap-results
|
||||
tap-results: $(TAPFILES)
|
||||
ifneq ($(strip $(TAPFILES)),)
|
||||
ifdef RUNTESTS_ENABLED
|
||||
$(PROVE) --failures --ext .tap --exec "$(CAT)" --color $(TAPFILES)
|
||||
$(PROVE.tap) --failures --color $^ || $(PROVE_FAILURE)
|
||||
endif
|
||||
|
||||
CURRENT_TAPFILES := $(wildcard $(TAPFILES))
|
||||
@@ -385,16 +384,13 @@ ifneq ($(CURRENT_JUNITFILES),)
|
||||
$(RM) $(CURRENT_JUNITFILES)
|
||||
endif
|
||||
|
||||
tapfiles: $(TESTSCRIPTS) $(TAPFILES)
|
||||
junitfiles: $(JUNITFILES)
|
||||
|
||||
# A .tap file is the output from running the associated test script
|
||||
%.tap: %.t
|
||||
$(TAPFILES.t): %.tap: %.t
|
||||
ifdef RUNTESTS_ENABLED
|
||||
$(PERL) $< -tap > $@
|
||||
endif
|
||||
|
||||
%.xml: %.tap
|
||||
$(JUNITFILES.t): %-results.xml: %.tap
|
||||
$(TAPTOJUNIT) --puretap --output $@ --input $< $*
|
||||
|
||||
# If there's a perl test script (.plt) available, use it
|
||||
@@ -409,6 +405,23 @@ endif
|
||||
$(PERL) $(TOOLS)/makeTestfile.pl $(T_A) $(EPICS_HOST_ARCH) $@ $<
|
||||
|
||||
#---------------------------------------------------------------
|
||||
# Generate $(API_HEADER) files on request (%API.h)
|
||||
|
||||
ifdef API_HEADER
|
||||
# Install them
|
||||
INC += $(API_HEADER)
|
||||
|
||||
# Ensure we generate them early enough
|
||||
INSTALL_API_HEADERS = $(addprefix $(INSTALL_INCLUDE)/,$(API_HEADER))
|
||||
$(filter-out $(INSTALL_API_HEADERS), $(INSTALL_INC)) $(HDEPENDS_FILES): \
|
||||
| $(INSTALL_API_HEADERS)
|
||||
|
||||
# How to make one
|
||||
$(COMMON_DIR)/%API.h: $(TOOLS)/makeAPIheader.pl
|
||||
@$(RM) $@
|
||||
$(PERL) $(TOOLS)/makeAPIheader.pl -o $@ $(@:$(COMMON_DIR)/%API.h=%)
|
||||
endif
|
||||
|
||||
# Generate header with version number from VCS
|
||||
|
||||
ifneq ($(GENVERSION),)
|
||||
@@ -553,8 +566,8 @@ include $(CONFIG)/RULES_EXPAND
|
||||
.PRECIOUS: $(COMMON_INC)
|
||||
|
||||
.PHONY: all host inc build install clean rebuild buildInstall build_clean
|
||||
.PHONY: runtests tapfiles clean-tests test-results junitfiles
|
||||
.PHONY: checkRelease warnRelease noCheckRelease FORCE
|
||||
.PHONY: runtests run-tap-tests tapfiles junitfiles test-results tap-results
|
||||
.PHONY: clean-tests checkRelease warnRelease noCheckRelease FORCE
|
||||
|
||||
include $(CONFIG)/RULES_COMMON
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
# Copyright (c) 2002 The Regents of the University of California, as
|
||||
# Operator of Los Alamos National Laboratory.
|
||||
# EPICS BASE is distributed subject to a Software License Agreement found
|
||||
# in the file LICENSE that is included with this distribution.
|
||||
# in the file LICENSE that is included with this distribution.
|
||||
#*************************************************************************
|
||||
|
||||
ARCHS += $(BUILD_ARCHS)
|
||||
@@ -54,7 +54,7 @@ $(foreach dir, $(DIRS), \
|
||||
|
||||
define DEP_template2
|
||||
$(1)$$(DIVIDER)$(2) : $$(foreach ddir, $$($(1)_DEPEND_DIRS), \
|
||||
$$(addsuffix $$(DIVIDER)$(2),$$(ddir)))
|
||||
$$(addsuffix $$(DIVIDER)$(2),$$(ddir))) | before-$(2)
|
||||
endef
|
||||
$(foreach action, $(ACTIONS), \
|
||||
$(foreach dir, $(DIRS), \
|
||||
@@ -79,18 +79,24 @@ $(foreach arch, $(ARCHS), \
|
||||
|
||||
dirPart = $(join $(dir $@), $(word 1, $(subst $(DIVIDER), ,$(notdir $@))))
|
||||
actionArchPart = $(join $(word 2, $(subst $(DIVIDER), ,$(notdir $@))), \
|
||||
$(addprefix $(DIVIDER),$(word 3, $(subst $(DIVIDER), ,$(notdir $@)))))
|
||||
$(DIRS) $(dirActionTargets) $(dirArchTargets) $(dirActionArchTargets) :
|
||||
$(addprefix $(DIVIDER),$(word 3, $(subst $(DIVIDER), ,$(notdir $@)))))
|
||||
|
||||
$(DIRS) $(dirActionTargets) $(dirArchTargets) $(dirActionArchTargets):
|
||||
$(MAKE) -C $(dirPart) $(actionArchPart)
|
||||
|
||||
# before-action rules are run once prior to recursing through the
|
||||
# list of subdirectories and running the action rule in each one.
|
||||
# See DEP_template2 above for how that rule ordering is achieved.
|
||||
beforeActions = $(addprefix before-,$(ACTIONS))
|
||||
$(beforeActions):
|
||||
|
||||
$(ARCHS) $(ACTIONS) $(actionArchTargets) :%: \
|
||||
$(foreach dir, $(DIRS), $(dir)$(DIVIDER)%)
|
||||
|
||||
|
||||
.PHONY: $(DIRS) all host rebuild
|
||||
.PHONY: $(ARCHS) $(ACTIONS)
|
||||
.PHONY: $(dirActionTargets) $(dirArchTargets)
|
||||
.PHONY: $(dirActionArchTargets)
|
||||
.PHONY: $(actionArchTargets)
|
||||
.PHONY : $(DIRS) all host rebuild
|
||||
.PHONY : $(ARCHS) $(ACTIONS) $(beforeActions)
|
||||
.PHONY : $(dirActionTargets) $(dirArchTargets)
|
||||
.PHONY : $(dirActionArchTargets)
|
||||
.PHONY : $(actionArchTargets)
|
||||
|
||||
include $(CONFIG)/RULES_COMMON
|
||||
|
||||
@@ -12,28 +12,72 @@
|
||||
vpath %@ $(USR_VPATH) $(ALL_SRC_DIRS)
|
||||
|
||||
#---------------------------------------------------------------
|
||||
# Variable expansion
|
||||
# Template variable expansion
|
||||
|
||||
# This feature allows you to instantiate simple template files at
|
||||
# build-time, replacing macros spelled @NAME@ with values provided
|
||||
# by the Makefile. The template filename must end with an @ sign,
|
||||
# which is removed to create the expanded filename.
|
||||
|
||||
# Makefiles can use this variable expansion as follows:
|
||||
#
|
||||
# 1. Add the template filename (with the trailing @ sign) to either
|
||||
# the EXPAND or EXPAND_COMMON variable, for example:
|
||||
# EXPAND_COMMON += myVersion.h@
|
||||
# Use EXPAND_COMMON for templates that don't depend on the
|
||||
# target architecture (these will be generated in O.Common).
|
||||
# 2. There are 2 ways of defining template macros. The simplest
|
||||
# is to add a NAME=VALUE string to the EXPAND_VARS variable for
|
||||
# the desired macros, e.g.:
|
||||
# EXPAND_VARS += MY_MAJOR_VERSION=$(MY_MAJOR_VERSION)
|
||||
# EXPAND_VARS += MY_MINOR_VERSION=$(MY_MINOR_VERSION)
|
||||
# These values may not contain spaces, even if inside quotes.
|
||||
# 3. A better way in the above case is to add the names of any
|
||||
# Makefile variables that should be provided as macros to the
|
||||
# variable EXPAND_ME, like this:
|
||||
# EXPAND_ME += MY_MAJOR_VERSION
|
||||
# EXPAND_ME += MY_MINOR_VERSION
|
||||
# The values of these variables may contain spaces.
|
||||
# 4. The macros TOP and ARCH will be set by the build system.
|
||||
# TOP is the value of $(INSTALL_LOCATION) for this module.
|
||||
# ARCH is the target architecture $(T_A), but is only set
|
||||
# while expanding files in EXPAND
|
||||
# 5. Add the expanded filename to some other variable that will
|
||||
# cause it to be created and used, such as INC here:
|
||||
# INC += myVersion.h
|
||||
|
||||
# Default settings
|
||||
EXPAND_TOOL ?= $(PERL) $(TOOLS)/expandVars.pl
|
||||
|
||||
EXPANDFLAGS += -t $(INSTALL_LOCATION) -a $(T_A)
|
||||
EXPANDFLAGS += $(addprefix -D ,$(EXPAND_VARS))
|
||||
EXPANDARCH = -a $(T_A)
|
||||
EXPANDFLAGS += -t $(INSTALL_LOCATION)
|
||||
EXPANDFLAGS += $(addprefix -D ,$(EXPAND_VARS) $($@_EXPAND_VARS))
|
||||
EXPANDFLAGS += $(foreach var, $(EXPAND_ME) $($@_EXPAND_ME), \
|
||||
-D$(var)="$(strip $($(var)))")
|
||||
|
||||
# The names of files to be expanded must end with '@'
|
||||
EXPANDED = $(EXPAND:%@=%)
|
||||
EXPANDED_COM = $(EXPAND_COMMON:%@=%)
|
||||
EXPANDED_COMMON = $(EXPANDED_COM:%=$(COMMON_DIR)/%)
|
||||
|
||||
$(EXPANDED): %: %@
|
||||
$(ECHO) "Expanding $< to $@"
|
||||
@$(RM) $@
|
||||
@$(EXPAND_TOOL) $(EXPANDFLAGS) $($@_EXPANDFLAGS) $< $@
|
||||
$(EXPAND_TOOL) $(EXPANDARCH) $(EXPANDFLAGS) $($@_EXPANDFLAGS) $< $@
|
||||
|
||||
$(EXPANDED_COM): %: %@
|
||||
$(ECHO) "Expanding $< to $(COMMON_DIR)/$@"
|
||||
@$(RM) $@
|
||||
$(EXPAND_TOOL) $(EXPANDFLAGS) $($@_EXPANDFLAGS) $< $@
|
||||
$(EXPANDED_COMMON): $(COMMON_DIR)/%: %
|
||||
@$(MV) $< $@
|
||||
|
||||
clean: expand_clean
|
||||
|
||||
expand_clean:
|
||||
@$(RM) $(EXPANDED)
|
||||
@$(RM) $(EXPANDED) $(EXPANDED_COMMON)
|
||||
|
||||
.PRECIOUS: $(EXPANDED)
|
||||
.PRECIOUS: $(EXPANDED) $(EXPANDED_COMMON)
|
||||
.PHONY: expand_clean
|
||||
|
||||
#---------------------------------------------------------------
|
||||
@@ -70,4 +114,3 @@ $1$(DEP):
|
||||
endef
|
||||
$(foreach asy, $(sort $(COMMON_ASSEMBLIES) $(ASSEMBLIES)), \
|
||||
$(eval $(call ASSEMBLY_DEP_template,$(strip $(asy)))))
|
||||
|
||||
|
||||
@@ -23,7 +23,8 @@
|
||||
# -include $(TOP)/../CONFIG_SITE.local
|
||||
|
||||
# Add checked-out submodules to DIRS
|
||||
DIRS += $(subst /Makefile,,$(wildcard $(addsuffix /Makefile, $(SUBMODULES))))
|
||||
LIVE_SUBMODULES = $(subst /Makefile,,$(wildcard $(addsuffix /Makefile, $(SUBMODULES))))
|
||||
DIRS += $(LIVE_SUBMODULES)
|
||||
|
||||
include $(CONFIG)/RULES_DIRS
|
||||
|
||||
@@ -45,3 +46,15 @@ realclean:
|
||||
$(RM) $(wildcard RELEASE.*.local)
|
||||
|
||||
.PHONY: RELEASE.host realclean
|
||||
|
||||
# Append all our live submodule failure files
|
||||
FAILURE_FILES = $(addsuffix /$(TEST_FAILURE_FILENAME), $(LIVE_SUBMODULES))
|
||||
|
||||
define combine_failure_files
|
||||
@$(TOUCH) $(FAILURE_FILES)
|
||||
@$(CAT) $(FAILURE_FILES) >> $(TEST_FAILURE_FILE)
|
||||
endef
|
||||
runtests: | $(addsuffix $(DIVIDER)runtests, $(LIVE_SUBMODULES))
|
||||
$(if $(FAILURE_FILES), $(combine_failure_files))
|
||||
test-results: | $(addsuffix $(DIVIDER)test-results, $(LIVE_SUBMODULES))
|
||||
$(if $(FAILURE_FILES), $(combine_failure_files))
|
||||
|
||||
@@ -95,12 +95,20 @@ $(1)_DLL_DEPLIBS=$$(foreach lib, $$($(1)_DLL_LIBS), \
|
||||
$$(LIB_PREFIX)$(1)$$(LIB_SUFFIX):$$($(1)_OBJSNAME) $$($(1)_RESS)
|
||||
$$(LIB_PREFIX)$(1)$$(LIB_SUFFIX):$$($(1)_DEPLIBS)
|
||||
|
||||
ifneq ($$($(1)_API),)
|
||||
$$(LIB_PREFIX)$(1)$$(LIB_SUFFIX): API_CPPFLAGS += -DBUILDING_$$($(1)_API)_API
|
||||
endif
|
||||
|
||||
ifeq ($$(SHARED_LIBRARIES),YES)
|
||||
|
||||
ifdef SHRLIB_SUFFIX
|
||||
$$(SHRLIB_PREFIX)$(1)$$(SHRLIB_SUFFIX):$$($(1)_OBJSNAME) $$($(1)_RESS)
|
||||
$$(SHRLIB_PREFIX)$(1)$$(SHRLIB_SUFFIX):$$($(1)_DEPLIBS)
|
||||
$$(SHRLIB_PREFIX)$(1)$$(SHRLIB_SUFFIX):$$($(1)_DLL_DEPLIBS)
|
||||
|
||||
ifneq ($$($(1)_API),)
|
||||
$$(SHRLIB_PREFIX)$(1)$$(SHRLIB_SUFFIX): API_CPPFLAGS += -DBUILDING_$$($(1)_API)_API
|
||||
endif
|
||||
endif
|
||||
|
||||
endif
|
||||
@@ -141,6 +149,11 @@ $(1)_DLL_DEPLIBS=$$(foreach lib, $$($(1)_DLL_LIBS),\
|
||||
$$(LOADABLE_SHRLIB_PREFIX)$(1)$$(LOADABLE_SHRLIB_SUFFIX):$$($(1)_OBJSNAME) $$($(1)_RESS)
|
||||
$$(LOADABLE_SHRLIB_PREFIX)$(1)$$(LOADABLE_SHRLIB_SUFFIX):$$($(1)_DEPLIBS)
|
||||
$$(LOADABLE_SHRLIB_PREFIX)$(1)$$(LOADABLE_SHRLIB_SUFFIX):$$($(1)_DLL_DEPLIBS)
|
||||
|
||||
ifneq ($$($(1)_API),)
|
||||
$$(LOADABLE_SHRLIB_PREFIX)$(1)$$(LOADABLE_SHRLIB_SUFFIX): \
|
||||
API_CPPFLAGS += -DBUILDING_$$($(1)_API)_API
|
||||
endif
|
||||
endef
|
||||
|
||||
$(foreach target, $(LOADABLE_LIBRARY), \
|
||||
|
||||
@@ -26,8 +26,7 @@ ifndef DISABLE_TOP_RULES
|
||||
distclean: realclean cvsclean realuninstall
|
||||
|
||||
realuninstall: uninstallDirs
|
||||
$(RMDIR) $(INSTALL_LOCATION_BIN)
|
||||
$(RMDIR) $(INSTALL_LOCATION_LIB)
|
||||
$(RMDIR) $(INSTALL_LOCATION_BIN) $(INSTALL_LOCATION_LIB)
|
||||
|
||||
UNINSTALL_DIRS += $(INSTALL_DB) $(INSTALL_DBD) $(INSTALL_DOC) $(INSTALL_HTML)
|
||||
UNINSTALL_DIRS += $(INSTALL_INCLUDE) $(INSTALL_TEMPLATES) $(DIRECTORY_TARGETS)
|
||||
@@ -37,36 +36,37 @@ endif
|
||||
uninstallDirs:
|
||||
$(RMDIR) $(UNINSTALL_DIRS)
|
||||
|
||||
# Remove the bin and lib directories if they have no sub-directories
|
||||
#
|
||||
EMPTY_INSTALL_DIRS = \
|
||||
$(if $(wildcard $(INSTALL_LOCATION_BIN)/*),,$(INSTALL_LOCATION_BIN)) \
|
||||
$(if $(wildcard $(INSTALL_LOCATION_LIB)/*),,$(INSTALL_LOCATION_LIB))
|
||||
uninstall: archuninstall uninstallDirs
|
||||
$(RMDIR) $(EMPTY_INSTALL_DIRS)
|
||||
|
||||
archuninstall: $(addprefix uninstall$(DIVIDER),$(BUILD_ARCHS)) | cleandirs
|
||||
archuninstall: $(addprefix uninstall$(DIVIDER),$(BUILD_ARCHS))
|
||||
|
||||
archPart = $(word 2, $(subst $(DIVIDER), ,$@))
|
||||
uninstall$(DIVIDER)%:
|
||||
$(RMDIR) $(INSTALL_LOCATION_BIN)/$(archPart)
|
||||
$(RMDIR) $(INSTALL_LOCATION_LIB)/$(archPart)
|
||||
$(RMDIR) $(addsuffix /$(subst uninstall$(DIVIDER),,$@), \
|
||||
$(INSTALL_LOCATION_BIN) $(INSTALL_LOCATION_LIB))
|
||||
|
||||
# Remove the bin and lib directories if they have no sub-directories
|
||||
#
|
||||
cleandirs:
|
||||
@$(NOP)
|
||||
ifeq ($(wildcard $(INSTALL_LOCATION_BIN)/*),)
|
||||
$(RMDIR) $(INSTALL_LOCATION_BIN)
|
||||
endif
|
||||
ifeq ($(wildcard $(INSTALL_LOCATION_LIB)/*),)
|
||||
$(RMDIR) $(INSTALL_LOCATION_LIB)
|
||||
endif
|
||||
runtests test-results:
|
||||
@$(PERL) $(TOOLS)/testFailures.pl $(TEST_FAILURE_FILE)
|
||||
|
||||
else
|
||||
#
|
||||
# Using a disabled rule aborts
|
||||
#
|
||||
|
||||
cleandirs distclean uninstall realuninstall archuninstall:
|
||||
distclean uninstall realuninstall archuninstall:
|
||||
$(error Target '$@' not available in a submodule)
|
||||
|
||||
endif # DISABLE_TOP_RULES
|
||||
|
||||
before-runtests before-test-results: rm-failure-file
|
||||
rm-failure-file:
|
||||
@$(RM) $(TEST_FAILURE_FILE)
|
||||
@$(TOUCH) $(TEST_FAILURE_FILE)
|
||||
|
||||
help:
|
||||
@echo "Usage: gnumake [options] [target] ..."
|
||||
@@ -106,7 +106,7 @@ endif
|
||||
@echo "Object targets are supported by the O.<arch> level Makefile .e.g"
|
||||
@echo " xxxRecord.o"
|
||||
|
||||
.PHONY: cleandirs distclean uninstall help
|
||||
.PHONY: distclean uninstall rm-failure-file help
|
||||
.PHONY: realuninstall archuninstall uninstallDirs
|
||||
|
||||
ifndef DISABLE_TOP_RULES
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
# 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
|
||||
# SPDX-License-Identifier: EPICS
|
||||
# EPICS Base is distributed subject to a Software License Agreement found
|
||||
# in file LICENSE that is included with this distribution.
|
||||
#*************************************************************************
|
||||
# Makefile for base/src/sample
|
||||
|
||||
11
configure/os/CONFIG.Common.linux-aarch64
Normal file
11
configure/os/CONFIG.Common.linux-aarch64
Normal file
@@ -0,0 +1,11 @@
|
||||
# CONFIG.Common.linux-aarch64
|
||||
#
|
||||
# Definitions for linux-arm target builds
|
||||
# Override these settings in CONFIG_SITE.Common.linux-aarch64
|
||||
#-------------------------------------------------------
|
||||
|
||||
# Include definitions common to all Linux targets
|
||||
include $(CONFIG)/os/CONFIG.Common.linuxCommon
|
||||
|
||||
ARCH_CLASS = aarch64
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
# CONFIG.Common.linux-arm_eb
|
||||
#
|
||||
# Definitions for linux-arm_eb (big endian) target builds
|
||||
# Sites may override these definitions in CONFIG_SITE.Common.linux-arm_eb
|
||||
#-------------------------------------------------------
|
||||
|
||||
# Include definitions common to all Linux-arm targets
|
||||
include $(CONFIG)/os/CONFIG.Common.linux-arm
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
# CONFIG.Common.linux-arm_el
|
||||
#
|
||||
# Definitions for linux-arm_el (little endian) target builds
|
||||
# Sites may override these definitions in CONFIG_SITE.Common.linux-arm_el
|
||||
#-------------------------------------------------------
|
||||
|
||||
# Include definitions common to all linux-arm targets
|
||||
include $(CONFIG)/os/CONFIG.Common.linux-arm
|
||||
|
||||
@@ -30,7 +30,7 @@ ARCH_DEP_LDFLAGS += -m32
|
||||
# Compiler does not define __unix __unix__ unix
|
||||
|
||||
# Override for -DUNIX from CONFIG.Common.UnixCommon
|
||||
OP_SYS_CPPFLAGS = -D_MINGW
|
||||
OP_SYS_CPPFLAGS = -D_MINGW -D__USE_MINGW_ANSI_STDIO
|
||||
|
||||
EXE = .exe
|
||||
RES = .coff
|
||||
|
||||
@@ -11,6 +11,7 @@ RM = rm -f
|
||||
MKDIR = mkdir -p
|
||||
RMDIR = rm -rf
|
||||
CAT = cat
|
||||
TOUCH = touch
|
||||
|
||||
# Allow site overrides
|
||||
-include $(CONFIG)/os/CONFIG_SITE.UnixCommon.Common
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
# CONFIG.linux-x86.linux-arm_eb
|
||||
#
|
||||
# Definitions for linux-x86 host - linux-arm_eb (big endian) target builds
|
||||
# Sites may override these definitions in CONFIG_SITE.linux-x86.linux-arm_eb
|
||||
#-------------------------------------------------------
|
||||
|
||||
# Include definitions for linux-arm targets
|
||||
include $(CONFIG)/os/CONFIG.linux-x86.linux-arm
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
# CONFIG.linux-x86.linux-arm_el
|
||||
#
|
||||
# Definitions for linux-x86 host - linux-arm_el (little endian) target builds
|
||||
# Sites may override these definitions in CONFIG_SITE.linux-x86.linux-arm_el
|
||||
#-------------------------------------------------------
|
||||
|
||||
# Include definitions for linux-arm targets
|
||||
include $(CONFIG)/os/CONFIG.linux-x86.linux-arm
|
||||
|
||||
@@ -21,4 +21,4 @@ LOADABLE_SHRLIB_LDFLAGS = -shared \
|
||||
GNU_LDLIBS_YES =
|
||||
|
||||
# Link with system libraries
|
||||
OP_SYS_LDLIBS = -lws2_32 -ladvapi32 -luser32 -lkernel32 -lwinmm -ldbghelp
|
||||
OP_SYS_LDLIBS = -lpsapi -lws2_32 -ladvapi32 -luser32 -lkernel32 -lwinmm -ldbghelp
|
||||
|
||||
@@ -4,21 +4,5 @@
|
||||
# Override these definitions in CONFIG_SITE.linux-x86.windows-x64-mingw
|
||||
#-------------------------------------------------------
|
||||
|
||||
# Include common gnu compiler definitions
|
||||
include $(CONFIG)/CONFIG.gnuCommon
|
||||
|
||||
# Add resource compiler
|
||||
RCCMD = $(GNU_BIN)/$(CMPLR_PREFIX)windres$(CMPLR_SUFFIX) $(INCLUDES) $< $@
|
||||
|
||||
# Remove -fPIC flags, add out-implib
|
||||
SHRLIB_CFLAGS =
|
||||
SHRLIB_LDFLAGS = -shared \
|
||||
-Wl,--out-implib,$(DLLSTUB_PREFIX)$*$(DLLSTUB_SUFFIX)
|
||||
LOADABLE_SHRLIB_LDFLAGS = -shared \
|
||||
-Wl,--out-implib,$(DLLSTUB_PREFIX)$*$(DLLSTUB_SUFFIX)
|
||||
|
||||
# No need to explicitly link with gcc library
|
||||
GNU_LDLIBS_YES =
|
||||
|
||||
# Link with winsock2
|
||||
OP_SYS_LDLIBS = -lws2_32
|
||||
# Use the definitions from the win32-x86-mingw target
|
||||
include $(CONFIG)/os/CONFIG.linux-x86.win32-x86-mingw
|
||||
|
||||
28
configure/os/CONFIG.linux-x86_64.linux-aarch64
Normal file
28
configure/os/CONFIG.linux-x86_64.linux-aarch64
Normal file
@@ -0,0 +1,28 @@
|
||||
# CONFIG.linux-x86_64.linux-aarch64
|
||||
#
|
||||
# Definitions for linux-x86_64 host - linux-aarch64 target builds
|
||||
# Sites may override these in CONFIG_SITE.linux-x86_64.linux-aarch64
|
||||
#-------------------------------------------------------
|
||||
|
||||
VALID_BUILDS = Ioc
|
||||
GNU_TARGET = aarch64-linux
|
||||
|
||||
# prefix of compiler tools
|
||||
CMPLR_SUFFIX =
|
||||
CMPLR_PREFIX = $(addsuffix -,$(GNU_TARGET))
|
||||
|
||||
# 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
|
||||
STATIC_LDFLAGS_NO=
|
||||
STATIC_LDLIBS_YES= -Wl,-Bdynamic
|
||||
STATIC_LDLIBS_NO=
|
||||
|
||||
@@ -32,4 +32,4 @@ LOADABLE_SHRLIB_LDFLAGS = -shared \
|
||||
GNU_LDLIBS_YES =
|
||||
|
||||
# Link with system libraries
|
||||
OP_SYS_LDLIBS = -lws2_32 -ladvapi32 -luser32 -lkernel32 -lwinmm -ldbghelp
|
||||
OP_SYS_LDLIBS = -lpsapi -lws2_32 -ladvapi32 -luser32 -lkernel32 -lwinmm -ldbghelp
|
||||
|
||||
@@ -11,6 +11,7 @@ MKDIR = $(PERL) -MExtUtils::Command -e mkpath
|
||||
RMDIR = $(PERL) -MExtUtils::Command -e rm_rf
|
||||
NOP = $(PERL) -e ''
|
||||
CAT = $(PERL) -MExtUtils::Command -e cat
|
||||
TOUCH = $(PERL) -MExtUtils::Command -e touch
|
||||
|
||||
WIND_HOST_TYPE = x86-win32
|
||||
OSITHREAD_USE_DEFAULT_STACK = NO
|
||||
|
||||
32
configure/os/CONFIG_SITE.Common.linux-aarch64
Normal file
32
configure/os/CONFIG_SITE.Common.linux-aarch64
Normal file
@@ -0,0 +1,32 @@
|
||||
# CONFIG_SITE.Common.linux-aarch64
|
||||
#
|
||||
# Site Specific definitions for all linux-aarch64 targets
|
||||
#-------------------------------------------------------
|
||||
|
||||
# NOTE for SHARED_LIBRARIES: In most cases if this is set to YES the
|
||||
# shared libraries will be found automatically. However if the .so
|
||||
# files are installed at a different path to their compile-time path
|
||||
# then in order to be found at runtime do one of these:
|
||||
# a) LD_LIBRARY_PATH must include the full absolute pathname to
|
||||
# $(INSTALL_LOCATION)/lib/$(EPICS_HOST_ARCH) when invoking base
|
||||
# executables.
|
||||
# b) Add the runtime path to SHRLIB_DEPLIB_DIRS and PROD_DEPLIB_DIRS, which
|
||||
# will add the named directory to the list contained in the executables.
|
||||
# c) Add the runtime path to /etc/ld.so.conf and run ldconfig
|
||||
# to inform the system of the shared library location.
|
||||
|
||||
# Depending on your version of Linux you'll want one of the following
|
||||
# lines to enable command-line editing and history in iocsh. If you're
|
||||
# not sure which, start with the top one and work downwards until the
|
||||
# build doesn't fail to link the readline library. If none of them work,
|
||||
# comment them all out to build without readline support.
|
||||
|
||||
# No other libraries needed (recent Fedora, Ubuntu etc.):
|
||||
#COMMANDLINE_LIBRARY = READLINE
|
||||
|
||||
# Needs -lncurses (RHEL 5 etc.):
|
||||
#COMMANDLINE_LIBRARY = READLINE_NCURSES
|
||||
|
||||
# Needs -lcurses (older versions)
|
||||
#COMMANDLINE_LIBRARY = READLINE_CURSES
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
# CONFIG_SITE.linux-x86.linux-arm_eb
|
||||
#
|
||||
# Site specific definitions for linux-x86 host - linux-arm_eb target builds
|
||||
#-------------------------------------------------------
|
||||
|
||||
# Include definitions for linux-arm targets
|
||||
include $(CONFIG)/os/CONFIG_SITE.linux-x86.linux-arm
|
||||
|
||||
# Path to the GNU toolset for linux-arm_eb (big endian) target
|
||||
#GNU_DIR = /local/anj/cross-arm/gcc-3.4.5-glibc-2.3.6/armeb-linux
|
||||
|
||||
# GNU crosscompiler target name
|
||||
#GNU_TARGET = armeb-linux
|
||||
@@ -1,13 +0,0 @@
|
||||
# CONFIG_SITE.linux-x86.linux-arm_el
|
||||
#
|
||||
# Site specific definitions for linux-x86 host - linux-arm_el target builds
|
||||
#-------------------------------------------------------
|
||||
|
||||
# Include definitions for linux-arm targets
|
||||
include $(CONFIG)/os/CONFIG_SITE.linux-x86.linux-arm
|
||||
|
||||
# Path to the GNU toolset for linux-arm_el (little endian) target
|
||||
#GNU_DIR = /local/anj/cross-arm/gcc-3.4.5-glibc-2.3.6/armel-linux
|
||||
|
||||
# GNU crosscompiler target name
|
||||
#GNU_TARGET = armel-linux
|
||||
30
configure/os/CONFIG_SITE.linux-x86_64.linux-aarch64
Normal file
30
configure/os/CONFIG_SITE.linux-x86_64.linux-aarch64
Normal file
@@ -0,0 +1,30 @@
|
||||
# CONFIG_SITE.linux-x86.linux-aarch64
|
||||
#
|
||||
# Site specific definitions for linux-x86 host - linux-aarch64 target builds
|
||||
#-------------------------------------------------------
|
||||
|
||||
# Set GNU crosscompiler target name
|
||||
GNU_TARGET = aarch64-linux-gnu
|
||||
|
||||
# Set GNU tools install path
|
||||
# Examples is the installation at the APS:
|
||||
GNU_DIR = /usr/local/Xilinx/SDK/2018.3/gnu/aarch64/lin/aarch64-linux
|
||||
|
||||
# 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 embedding compile-time library paths into the generated files.
|
||||
# You will need to provide another way for programs to find their shared
|
||||
# libraries at runtime, such as by setting LD_LIBRARY_PATH or (better) using
|
||||
# mechanisms related to /etc/ld.so.conf
|
||||
#SHRLIBDIR_RPATH_LDFLAGS_YES_NO =
|
||||
#PRODDIR_RPATH_LDFLAGS_YES_NO =
|
||||
# However it is usually simpler to set STATIC_BUILD=YES here and not
|
||||
# try to use shared libraries at all when cross-building, like this:
|
||||
STATIC_BUILD=YES
|
||||
SHARED_LIBRARIES=NO
|
||||
|
||||
# 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
|
||||
3
documentation/.gitignore
vendored
Normal file
3
documentation/.gitignore
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
*.db
|
||||
epics-base.tag
|
||||
html/
|
||||
2407
documentation/Doxyfile@
Normal file
2407
documentation/Doxyfile@
Normal file
File diff suppressed because it is too large
Load Diff
33
documentation/Makefile
Normal file
33
documentation/Makefile
Normal file
@@ -0,0 +1,33 @@
|
||||
TOP = ..
|
||||
include $(TOP)/configure/CONFIG
|
||||
|
||||
ifdef T_A
|
||||
|
||||
DOXYGEN=doxygen
|
||||
|
||||
EXPAND = Doxyfile
|
||||
|
||||
EXPAND_ME += EPICS_VERSION
|
||||
EXPAND_ME += EPICS_REVISION
|
||||
EXPAND_ME += EPICS_MODIFICATION
|
||||
EXPAND_ME += EPICS_PATCH_LEVEL
|
||||
|
||||
ME = documentation/O.$(T_A)/html
|
||||
|
||||
install: doxygen
|
||||
|
||||
doxygen: Doxyfile
|
||||
$(DOXYGEN)
|
||||
rsync -av $(TOP)/html/ html/
|
||||
|
||||
.PHONY: doxygen
|
||||
|
||||
commit: doxygen
|
||||
$(TOUCH) html/.nojekyll
|
||||
(cd $(TOP) && $(CURDIR)/../commit-gh.sh $(ME)/ $(ME)/.nojekyll $(ME)/*.* $(ME)/*/*.*)
|
||||
|
||||
.PHONY: commit
|
||||
|
||||
endif # T_A
|
||||
|
||||
include $(TOP)/configure/RULES
|
||||
@@ -1,4 +1,4 @@
|
||||
# Installation Instructions
|
||||
# Installation Instructions {#install}
|
||||
|
||||
## EPICS Base Release 7.0.3.1
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# EPICS 7.0 Release Notes
|
||||
# EPICS 7.0 Release Notes {#releasenotes}
|
||||
|
||||
These release notes describe changes that have been made since the previous
|
||||
release of this series of EPICS Base. **Note that changes which were merged up
|
||||
@@ -8,11 +8,247 @@ which they were originally committed.** Thus it is important to read more than
|
||||
just the first section to understand everything that has changed in each
|
||||
release.
|
||||
|
||||
The external PVA submodules each have their own separate set of release notes
|
||||
which should also be read to understand what has changed since an earlier
|
||||
release.
|
||||
The PVA submodules each have their own individual sets of release notes which
|
||||
should also be read to understand what has changed since earlier releases.
|
||||
|
||||
# EPICS Release 7.0.3.1
|
||||
**This version of EPICS has not been released yet.**
|
||||
|
||||
## Changes made on the 7.0 branch since 7.0.4.1
|
||||
|
||||
<!-- Insert new items immediately below here ... -->
|
||||
|
||||
## EPICS Release 7.0.4.1
|
||||
|
||||
### ARM Architecture Changes
|
||||
|
||||
Build configuration files for a new cross-build architecture `linux-aarch64`
|
||||
have been added, and the targets `linux-arm_el` and `linux-arm_eb` removed.
|
||||
The 64-bit ARM architecture target doesn't have build files for self-hosting
|
||||
yet but they should be relatively easy to add, contributions welcome!
|
||||
|
||||
### Bug fixes
|
||||
|
||||
The following bugs/issues have fixes included in this release:
|
||||
|
||||
- [lp: 1884339](https://bugs.launchpad.net/epics-base/+bug/1884339),
|
||||
Inaccessible CA servers on Windows
|
||||
- [github: 83](https://github.com/epics-base/epics-base/issues/83)
|
||||
osdTimeGetCurrent doesn't work for subprocess on macOS
|
||||
- Recent Cygwin build problem with a missing `TCP_NODELAY` declaration.
|
||||
|
||||
### Perl CA Bindings under Conda
|
||||
|
||||
Builds of the Perl CA bindings weren't working properly when the Perl
|
||||
installation was from Conda. This release also fixed the capr.pl script
|
||||
to handle the INT64 data types, and to be able to properly handle missing
|
||||
fields, as happens if the IOC is running an older EPICS version for example.
|
||||
|
||||
### epicsMessageQueue implementation on RTEMS
|
||||
|
||||
The implementation of the `epicsMessageQueue` used on RTEMS has switched from
|
||||
the native RTEMS-specific one to the EPICS generic version, avoiding a bug
|
||||
in the RTEMS Kernel message queue code.
|
||||
|
||||
### Record Name Validation
|
||||
|
||||
Historically, there have been very few restrictions on which characters
|
||||
may be present in record and alias names. Base 3.14.12.3 added a warning
|
||||
for names containing space, single or double quote, period/dot, or
|
||||
dollar sign.
|
||||
|
||||
```
|
||||
Bad character ' ' in record name "bad practice"
|
||||
```
|
||||
|
||||
7.0.4.1 Turns this warning into an error, and adds a new warning
|
||||
if a record name begins with a minus, plus, left square bracket,
|
||||
or left curly bracket.
|
||||
|
||||
## EPICS Release 7.0.4
|
||||
|
||||
### Bug fixes
|
||||
|
||||
The following launchpad bugs have fixes included in this release:
|
||||
|
||||
- [lp: 1812084](https://bugs.launchpad.net/bugs/1812084), Build failure on
|
||||
RTEMS 4.10.2
|
||||
- [lp: 1829919](https://bugs.launchpad.net/bugs/1829919), IOC segfaults when
|
||||
calling dbLoadRecords after iocInit
|
||||
- [lp: 1838792](https://bugs.launchpad.net/bugs/1838792), epicsCalc bit-wise
|
||||
operators on aarch64
|
||||
- [lp: 1853148](https://bugs.launchpad.net/bugs/1853148), mingw compiler
|
||||
problem with printf/scanf formats
|
||||
- [lp: 1852653](https://bugs.launchpad.net/bugs/1852653), USE_TYPED_DSET
|
||||
incompatible with C++
|
||||
- [lp: 1862328](https://bugs.launchpad.net/bugs/1862328), Race condition on
|
||||
IOC start leaves rsrv unresponsive
|
||||
- [lp: 1866651](https://bugs.launchpad.net/bugs/1866651), thread joinable race
|
||||
- [lp: 1868486](https://bugs.launchpad.net/bugs/1868486), epicsMessageQueue
|
||||
lost messages
|
||||
- [lp: 1868680](https://bugs.launchpad.net/bugs/1868680), Access Security file
|
||||
reload (asInit) fails
|
||||
|
||||
### \*_API macros in EPICS headers
|
||||
|
||||
Internally, the Com and ca libraries now express dllimport/export (Windows)
|
||||
and symbol visibility (GCC) using library-specific macros (eg. `LIBCOM_API`)
|
||||
instead of the macros `epicsShareFunc`, `epicsShareClass`, `epicsShareDef` etc.
|
||||
that are defined in the `shareLib.h` header.
|
||||
This change may affect some user code which uses the `epicsShare*` macros
|
||||
without having explicitly included the `shareLib.h` header themselves.
|
||||
Such code should be changed to include `shareLib.h` directly.
|
||||
|
||||
A new helper script `makeAPIheader.pl` and build rules to generate a
|
||||
library-specific `*API.h` header file has been added. Run `makeAPIheader.pl -h`
|
||||
for information on how to use this in your own applications, but note that the
|
||||
resulting sources will not be able to be compiled using earlier versions of
|
||||
EPICS Base.
|
||||
|
||||
### IOCsh usage messages
|
||||
|
||||
At the iocShell prompt `help <cmd>` now prints a descriptive usage message
|
||||
for many internal IOCsh commands in addition to the command parameters.
|
||||
Try `help *` to see all commands, or a glob pattern such as `help db*` to see
|
||||
a subset.
|
||||
|
||||
External code may provide usage messages when registering commands using a
|
||||
new `const char *usage` member of the `iocshFuncDef` structure.
|
||||
The `iocsh.h` header also now defines a macro `IOCSHFUNCDEF_HAS_USAGE` which
|
||||
can be used to detect Base versions that support this feature at compile-time.
|
||||
|
||||
### Variable names in RELEASE files
|
||||
|
||||
`configure/RELEASE` files are parsed by both GNUmake and the `convertRelease.pl`
|
||||
script. While GNUmake is quite relaxed about what characters may be used in a
|
||||
RELEASE variable name, the `convertRelease.pl` script parser has only recognized
|
||||
variable names that match the Perl regular expression `\w+`, i.e. upper and
|
||||
lower-case letters, digits and underscore characters.
|
||||
|
||||
The script has been modified so now RELEASE variable names must start with a
|
||||
letter or underscore, and be followed by any number of letters, digits,
|
||||
underscore or hyphen characters, matching the regular expression
|
||||
`[A-Za-z_][A-Za-z_0-9-]*`. The hyphen character `-` was not previously allowed
|
||||
and if used would have prevented a build from finding include files and
|
||||
libraries in any module using that in its RELEASE variable name.
|
||||
|
||||
This change does disallow names that start with a digit which used to be
|
||||
allowed, but hopefully nobody has been relying on that ability. The regular
|
||||
expression used for names can be found in the file `src/tools/EPICS/Release.pm`
|
||||
and can be adjusted locally if necessary.
|
||||
|
||||
### caRepeater /dev/null
|
||||
|
||||
On \*NIX targets caRepeater will now partially daemonize by redirecting
|
||||
stdin/out/err to /dev/null. This prevents caRepeater from inheriting
|
||||
the stdin/out of a process, like caget, which has spawned it in the
|
||||
background. This has been known to cause problems in some cases when
|
||||
caget is itself being run from a shell script.
|
||||
|
||||
caRepeater will now understand the `-v` argument to retain stdin/out/err
|
||||
which may be necessary to see any error messages it may emit.
|
||||
|
||||
### `state` record deprecated
|
||||
|
||||
IOCs now emit a warning when a database file containing the `state` record is
|
||||
loaded. This record has been deprecated for a while and will be removed
|
||||
beginning with EPICS 7.1. Consider using the `stringin` record instead.
|
||||
|
||||
### Record types publish dset's
|
||||
|
||||
The record types in Base now define their device support entry table (DSET)
|
||||
structures in the record header file. While still optional, developers of
|
||||
external support modules are encouraged to start converting their code to use
|
||||
the record's new definitions instead of the traditional approach of copying the
|
||||
structure definitions into each source file that needs them. By following the
|
||||
instructions below it is still possible for the converted code to build and
|
||||
work with older Base releases.
|
||||
|
||||
This would also be a good time to modify the device support to use the type-safe
|
||||
device support entry tables that were introduced in Base-3.16.2 -- see
|
||||
[#type-safe-device-and-driver-support-tables](this entry below) for the
|
||||
description of that change, which is also optional for now.
|
||||
|
||||
Look at the aiRecord for example. Near the top of the generated `aiRecord.h`
|
||||
header file is a new section that declares the `aidset`:
|
||||
|
||||
```C
|
||||
/* Declare Device Support Entry Table */
|
||||
struct aiRecord;
|
||||
typedef struct aidset {
|
||||
dset common;
|
||||
long (*read_ai)(struct aiRecord *prec);
|
||||
long (*special_linconv)(struct aiRecord *prec, int after);
|
||||
} aidset;
|
||||
#define HAS_aidset
|
||||
```
|
||||
|
||||
Notice that the common members (`number`, `report()`, `init()`, `init_record()`
|
||||
and `get_ioint_info()` don't appear directly but are included by embedding the
|
||||
`dset common` member instead. This avoids the need to have separate definitions
|
||||
of those members in each record dset, but does require those members to be
|
||||
wrapped inside another set of braces `{}` when initializing the data structure
|
||||
for the individual device supports. It also requires changes to code that
|
||||
references those common members, but that code usually only appears inside the
|
||||
record type implementation and very rarely in device supports.
|
||||
|
||||
An aiRecord device support that will only be built against this or later
|
||||
versions of EPICS can now declare its dset like this:
|
||||
|
||||
```C
|
||||
aidset devAiSoft = {
|
||||
{ 6, NULL, NULL, init_record, NULL },
|
||||
read_ai, NULL
|
||||
};
|
||||
epicsExportAddress(dset, devAiSoft);
|
||||
```
|
||||
|
||||
However most device support that is not built into EPICS itself will need to
|
||||
remain compatible with older EPICS versions, which is why the ai record's header
|
||||
file also declares the preprocessor macro `HAS_aidset`. This makes it easy to
|
||||
define the `aidset` in the device support code when it's needed, and not when
|
||||
it's provided in the header:
|
||||
|
||||
```C
|
||||
#ifndef HAS_aidset
|
||||
typedef struct aidset {
|
||||
dset common;
|
||||
long (*read_ai)(aiRecord *prec);
|
||||
long (*special_linconv)(aiRecord *prec, int after);
|
||||
} aidset;
|
||||
#endif
|
||||
aidset devAiSoft = {
|
||||
{ 6, NULL, NULL, init_record, NULL },
|
||||
read_ai, NULL
|
||||
};
|
||||
epicsExportAddress(dset, devAiSoft);
|
||||
```
|
||||
|
||||
The above `typedef struct` declaration was copied directly from the new
|
||||
aiRecord.h file and wrapped in the `#ifndef HAS_aidset` conditional.
|
||||
|
||||
This same pattern should be followed for all record types except for the lsi,
|
||||
lso and printf record types, which have published their device support entry
|
||||
table structures since they were first added to Base but didn't previously embed
|
||||
the `dset common` member. Device support for these record types therefore can't
|
||||
use the dset name since the new definitions are different from the originals and
|
||||
will cause a compile error, so this pattern should be used instead:
|
||||
|
||||
```C
|
||||
#ifndef HAS_lsidset
|
||||
struct {
|
||||
dset common;
|
||||
long (*read_string)(lsiRecord *prec);
|
||||
}
|
||||
#else
|
||||
lsidset
|
||||
#endif
|
||||
devLsiEtherIP = {
|
||||
{5, NULL, lsi_init, lsi_init_record, get_ioint_info},
|
||||
lsi_read
|
||||
};
|
||||
```
|
||||
|
||||
## EPICS Release 7.0.3.1
|
||||
|
||||
**IMPORTANT NOTE:** *Some record types in this release will not be compatible
|
||||
with device support binaries compiled against earlier versions of those record
|
||||
@@ -162,7 +398,7 @@ set to their default values.
|
||||
void startitup(void) {
|
||||
epicsThreadOpts opts = EPICS_THREAD_OPTS_INIT;
|
||||
epicsThreadId tid;
|
||||
|
||||
|
||||
opts.priority = epicsThreadPriorityMedium;
|
||||
tid = epicsThreadCreateOpt("my thread", &threadMain, NULL, &opts);
|
||||
}
|
||||
@@ -205,7 +441,7 @@ necessary, all RTEMS targets should now link although the IOC won't be able to
|
||||
be used with the VME I/O on those systems (that we don't have VMEbus I/O
|
||||
support for in libCom).
|
||||
|
||||
# EPICS Release 7.0.3
|
||||
## EPICS Release 7.0.3
|
||||
|
||||
### `epicsTimeGetCurrent()` optimization
|
||||
|
||||
@@ -225,7 +461,7 @@ This may result in slightly fewer, but larger frames being sent.
|
||||
Report NOBT as "precision" through the dbAccess API. This is not accessible
|
||||
through CA, but is planned to be used through QSRV.
|
||||
|
||||
# EPICS Release 7.0.2.2
|
||||
## EPICS Release 7.0.2.2
|
||||
|
||||
### Build System changes
|
||||
|
||||
@@ -259,7 +495,7 @@ substantial than bug fixes.
|
||||
|
||||
Turns out this is ~10x slower to query than `CLOCK_MONOTONIC`.
|
||||
|
||||
# EPICS Release 7.0.2.1
|
||||
## EPICS Release 7.0.2.1
|
||||
|
||||
### Linking shared libraries on macOS
|
||||
|
||||
@@ -310,7 +546,7 @@ rewrite of the link address parser code in dbStaticLib. This release fixes that
|
||||
issue, although in some cases the output may be slightly different than it used
|
||||
to be.
|
||||
|
||||
# EPICS Release 7.0.2
|
||||
## EPICS Release 7.0.2
|
||||
|
||||
### Launchpad Bugs
|
||||
|
||||
@@ -327,7 +563,7 @@ modules. The layout of the source files has not changed at all however, so the
|
||||
source code for libcom, ca and the database are still found separately under
|
||||
the module subdirectory.
|
||||
|
||||
# EPICS Release 7.0.1.1
|
||||
## EPICS Release 7.0.1.1
|
||||
|
||||
### Changed SIML failure behavior
|
||||
|
||||
@@ -629,14 +865,14 @@ number instead, like this:
|
||||
|
||||
```
|
||||
#include <epicsVersion.h>
|
||||
|
||||
|
||||
#ifndef VERSION_INT
|
||||
# define VERSION_INT(V,R,M,P) ( ((V)<<24) | ((R)<<16) | ((M)<<8) | (P))
|
||||
#endif
|
||||
#ifndef EPICS_VERSION_INT
|
||||
# define EPICS_VERSION_INT VERSION_INT(EPICS_VERSION, EPICS_REVISION, EPICS_MODIFICATION, EPICS_PATCH_LEVEL)
|
||||
#endif
|
||||
|
||||
|
||||
#if EPICS_VERSION_INT >= VERSION_INT(3,16,1,0)
|
||||
/* Code where Base has INT64 support */
|
||||
#else
|
||||
@@ -962,7 +1198,7 @@ excerpts from a database file:
|
||||
record(ai, math:pi) {
|
||||
field(INP, {const: 3.14159265358979}) # Correct
|
||||
field(SIOL, "{const: 3.142857}") # Wrong
|
||||
|
||||
|
||||
info(autosave, { # White-space and comments are allowed
|
||||
fields:[DESC, SIMM],
|
||||
pass0:[VAL]
|
||||
@@ -1110,7 +1346,7 @@ this:
|
||||
|
||||
```
|
||||
#include "epicsTime.h"
|
||||
|
||||
|
||||
#ifndef M_time
|
||||
/* S_time_... status values were not provided before Base 3.16 */
|
||||
#define S_time_unsynchronized epicsTimeERROR
|
||||
@@ -1135,9 +1371,123 @@ Added a new macro `callbackGetPriority(prio, callback)` to the callback.h
|
||||
header and removed the need for dbScan.c to reach into the internals of its
|
||||
`CALLBACK` objects.
|
||||
|
||||
## Changes from the 3.15 branch since 3.15.7
|
||||
|
||||
> None.
|
||||
# Changes incorporated from the 3.15 branch
|
||||
|
||||
|
||||
## Changes made on the 3.15 branch since 3.15.8
|
||||
|
||||
### Change to the `junitfiles` self-test build target
|
||||
|
||||
The names of the generated junit xml test output files have been changed
|
||||
from `<testname>.xml` to `<testname>-results.xml`, to allow better
|
||||
distinction from other xml files. (I.e., for easy wildcard matching.)
|
||||
|
||||
|
||||
## Changes made between 3.15.7 and 3.15.8
|
||||
|
||||
### Bug fixes
|
||||
|
||||
The following launchpad bugs have fixes included in this release:
|
||||
|
||||
- [lp: 1812084](https://bugs.launchpad.net/epics-base/+bug/1812084), Build
|
||||
failure on RTEMS 4.10.2
|
||||
- [lp: 1829770](https://bugs.launchpad.net/epics-base/+bug/1829770), event
|
||||
record device support broken with constant INP
|
||||
- [lp: 1829919](https://bugs.launchpad.net/epics-base/+bug/1829919), IOC
|
||||
segfaults when calling dbLoadRecords after iocInit
|
||||
- [lp: 1838792](https://bugs.launchpad.net/epics-base/+bug/1838792), epicsCalc
|
||||
bit-wise operators on aarch64
|
||||
- [lp: 1841608](https://bugs.launchpad.net/epics-base/+bug/1841608), logClient
|
||||
falsely sends error logs on all connections
|
||||
- [lp: 1853168](https://bugs.launchpad.net/epics-base/+bug/1853168), undefined
|
||||
reference to `clock_gettime()`
|
||||
- [lp: 1862328](https://bugs.launchpad.net/epics-base/+bug/1862328), Race
|
||||
condition on IOC start leaves rsrv unresponsive
|
||||
- [lp: 1868486](https://bugs.launchpad.net/epics-base/+bug/1868486),
|
||||
epicsMessageQueue lost messages
|
||||
|
||||
### Improvements to the self-test build targets
|
||||
|
||||
This release contains changes that make it possible to integrate another test
|
||||
running and reporting system (such as Google's gtest) into the EPICS build
|
||||
system. The built-in test-runner and reporting system will continue to be used
|
||||
by the test programs inside Base however.
|
||||
|
||||
These GNUmake `tapfiles` and `test-results` build targets now collect a list of
|
||||
the directories that experienced test failures and display those at the end of
|
||||
running and/or reporting all of the tests. The GNUmake process will also only
|
||||
exit with an error status after running and/or reporting all of the test
|
||||
results; previously the `-k` flag to make was needed and even that didn't always
|
||||
work.
|
||||
|
||||
Continuous Integration systems are recommended to run `make tapfiles` (or if
|
||||
they can read junittest output instead of TAP `make junitfiles`) followed by
|
||||
`make -s test-results` to display the results of the tests. If multiple CPUs are
|
||||
available the `-j` flag can be used to run tests in parallel, giving the maximum
|
||||
jobs that should be allowed so `make -j4 tapfiles` for a system with 4 CPUs say.
|
||||
Running many more jobs than you have CPUs is likely to be slower and is not
|
||||
recommended.
|
||||
|
||||
### Calc Engine Fixes and Enhancements
|
||||
|
||||
The code that implements bit operations for Calc expressions has been reworked
|
||||
to better handle some CPU architectures and compilers. As part of this work a
|
||||
new operator has been added: `>>>` performs a logical right-shift, inserting
|
||||
zero bits into the most significant bits (the operator `>>` is an arithmetic
|
||||
right-shift which copies the sign bit as it shifts the value rightwards).
|
||||
|
||||
### IOC logClient Changes
|
||||
|
||||
The IOC's error logging system has been updated significantly to fix a number
|
||||
of issues including:
|
||||
|
||||
- Only send errlog messages to iocLogClient listeners
|
||||
- Try to minimize lost messages while the log server is down:
|
||||
+ Detect disconnects sooner
|
||||
+ Don't discard the buffer on disconnect
|
||||
+ Flush the buffer immediately after a server reconnects
|
||||
|
||||
### epicsThread: Main thread defaults to allow blocking I/O
|
||||
|
||||
VxWorks IOCs (and potentially RTEMS IOCs running GeSys) have had problems with
|
||||
garbled error messages from dbStaticLib routines for some time — messages
|
||||
printed before `iocInit` were being queued through the errlog thread instead of
|
||||
being output immediately. This has been fixed by initializing the main thread
|
||||
with its `OkToBlock` flag set instead of cleared. IOCs running on other
|
||||
operating systems that use iocsh to execute the startup script previously had
|
||||
that set anyway in iocsh so were not affected, but this change might cause other
|
||||
programs that don't use iocsh to change their behavior slightly if they use
|
||||
`errlogPrintf()`, `epicsPrintf()` or `errPrintf()`.
|
||||
|
||||
### catools: Handle data type changes in camonitor
|
||||
|
||||
The camonitor program didn't properly cope if subscribed to a channel whose data
|
||||
type changed when its IOC was rebooted without restarting the camonitor program.
|
||||
This has now been fixed.
|
||||
|
||||
### More Record Reference Documentation
|
||||
|
||||
The remaining record types have had their reference pages moved from the Wiki,
|
||||
and some new reference pages have been written to cover the analog array and
|
||||
long string input and output record types plus the printf record type, none of
|
||||
which were previously documented. The wiki reference pages covering the fields
|
||||
common to all, input, and output record types have also been added, thanks to
|
||||
Rolf Keitel. The POD conversion scripts have also been improved and they now
|
||||
properly support linking to subsections in a different document, although the
|
||||
POD changes to add the cross-links that appeared in the original wiki pages
|
||||
still needs to be done in most cases.
|
||||
|
||||
### Fix build issues with newer MinGW versions
|
||||
|
||||
The `clock_gettime()` routine is no longer used under MinGW since newer versions
|
||||
don't provide it any more.
|
||||
|
||||
### Fix race for port in RSRV when multiple IOCs start simultaneously
|
||||
|
||||
If multiple IOCs were started at the same time, by systemd say, they could race
|
||||
to obtain the Channel Access TCP port number 5064. This issue has been fixed.
|
||||
|
||||
|
||||
## Changes made between 3.15.6 and 3.15.7
|
||||
|
||||
@@ -1320,8 +1670,8 @@ cases. This fixes
|
||||
Some documentation has been added to the `dbdToHtml.pl` script
|
||||
explaining how Perl POD (Plain Old Documentation) markup can be added to
|
||||
`.dbd` files to generate HTML documentation for the record types. To see
|
||||
these instructions, run `perl bin/<host>/dbdToHtml.pl -H`
|
||||
or `perldoc bin/<host>/dbdToHtml.pl`.
|
||||
these instructions, run `perl bin/<host>/dbdToHtml.pl -H`
|
||||
or `perldoc bin/<host>/dbdToHtml.pl`.
|
||||
|
||||
### Fix problem with numeric soft events
|
||||
|
||||
@@ -1854,4 +2204,3 @@ Simpler versions of the `epicsTime_gmtime()` and `epicsTime_localtime()`
|
||||
routines have been included in the Windows implementations, and a new test
|
||||
program added. The original versions do not report DST status properly. Fixes
|
||||
[Launchpad bug 1528284](https://bugs.launchpad.net/bugs/1528284).
|
||||
|
||||
|
||||
68
documentation/RecordReference.md
Normal file
68
documentation/RecordReference.md
Normal file
@@ -0,0 +1,68 @@
|
||||
# Record Reference Documentation {#recordrefmanual}
|
||||
|
||||
The following documentation for the record types and menus include with Base was
|
||||
converted from the old EPICS Wiki pages and updated. This list only includes the
|
||||
record types supplied with Base.
|
||||
|
||||
* [Fields Common to All Record Types](dbCommonRecord.html)
|
||||
* [Fields Common to Input Record Types](dbCommonInput.html)
|
||||
* [Fields Common to Output Record Types](dbCommonOutput.html)
|
||||
|
||||
## Record Types
|
||||
|
||||
* [Analog Array Input Record (aai)](aaiRecord.html)
|
||||
* [Analog Array Output Record (aao)](aaoRecord.html)
|
||||
* [Analog Input Record (ai)](aiRecord.html)
|
||||
* [Analog Output Record (ao)](aoRecord.html)
|
||||
* [Array Subroutine Record (aSub)](aSubRecord.html)
|
||||
* [Binary Input Record (bi)](biRecord.html)
|
||||
* [Binary Output Record (bo)](boRecord.html)
|
||||
* [Calculation Output Record (calcout)](calcoutRecord.html)
|
||||
* [Calculation Record (calc)](calcRecord.html)
|
||||
* [Compression Record (compress)](compressRecord.html)
|
||||
* [Data Fanout Record (dfanout)](dfanoutRecord.html)
|
||||
* [Event Record (event)](eventRecord.html)
|
||||
* [Fanout Record (fanout)](fanoutRecord.html)
|
||||
* [Histogram Record (histogram)](histogramRecord.html)
|
||||
* [64bit Integer Input Record (int64in)](int64inRecord.html)
|
||||
* [64bit Integer Output Record (int64out)](int64outRecord.html)
|
||||
* [Long Input Record (longin)](longinRecord.html)
|
||||
* [Long Output Record (longout)](longoutRecord.html)
|
||||
* [Long String Input Record (lsi)](lsiRecord.html)
|
||||
* [Long String Output Record (lso)](lsoRecord.html)
|
||||
* [Multi-Bit Binary Input Direct Record (mbbiDirect)](mbbiDirectRecord.html)
|
||||
* [Multi-Bit Binary Input Record (mbbi)](mbbiRecord.html)
|
||||
* [Multi-Bit Binary Output Direct Record (mbboDirect)](mbboDirectRecord.html)
|
||||
* [Multi-Bit Binary Output Record (mbbo)](mbboRecord.html)
|
||||
* [Permissive Record (permissive)](permissiveRecord.html)
|
||||
* [Printf Record (prinf)](printfRecord.html)
|
||||
* [Select Record (sel)](selRecord.html)
|
||||
* [Sequence Record (seq)](seqRecord.html)
|
||||
* [State Record (state)](stateRecord.html)
|
||||
* [String Input Record (stringin)](stringinRecord.html)
|
||||
* [String Output Record (stringout)](stringoutRecord.html)
|
||||
* [Sub-Array Record (subArray)](subArrayRecord.html)
|
||||
* [Subroutine Record (sub)](subRecord.html)
|
||||
* [Waveform Record (waveform)](waveformRecord.html)
|
||||
|
||||
## Menu Definitions
|
||||
|
||||
* [Alarm Severity Menu](menuAlarmSevr.html)
|
||||
* [Alarm Status Menu](menuAlarmStat.html)
|
||||
* [Analog Conversions Menu](menuConvert.html)
|
||||
* [Field Type Menu](menuFtype.html)
|
||||
* [Invalid Value Output Action Menu](menuIvoa.html)
|
||||
* [Output Mode Select Menu](menuOmsl.html)
|
||||
* [Scan Menu](menuScan.html)
|
||||
* [Simulation Mode Menu](menuSimm.html)
|
||||
* [Yes/No Menu](menuYesNo.html)
|
||||
|
||||
## Corrections and Updates
|
||||
|
||||
Corrections to these documents can be submitted as patch files to the EPICS core
|
||||
developers, or as merge requests or pull requests to the 7.0 branch of Base.
|
||||
The document sources can be found in the `modules/database/src/std/rec` and
|
||||
`modules/database/src/ioc/db` directories in files with extension `.dbd.pod`.
|
||||
The documentation source format is a combination of the EPICS DBD file format
|
||||
with an extended version of Perl's POD (plain old documentation); run `perldoc
|
||||
pod` for details of POD.
|
||||
@@ -147,17 +147,17 @@ starting at <a href="#ReleaseApproval">Release Approval</a>.</p>
|
||||
<td>Tag the module in Git, using these tag conventions:
|
||||
<ul>
|
||||
<li>
|
||||
<tt>R7.0.3.1-pre<i>n</i></tt>
|
||||
<tt>R7.0.4.1-pre<i>n</i></tt>
|
||||
— pre-release tag
|
||||
</li>
|
||||
<li>
|
||||
<tt>R7.0.3.1-rc<i>n</i></tt>
|
||||
<tt>R7.0.4.1-rc<i>n</i></tt>
|
||||
— release candidate tag
|
||||
</li>
|
||||
</ul>
|
||||
<blockquote><tt>
|
||||
cd base-7.0<br />
|
||||
git tag -m 'ANJ: Tagged for 7.0.3.1-rc1' R7.0.3.1-rc1
|
||||
git tag -m 'ANJ: Tagged for 7.0.4.1-rc1' R7.0.4.1-rc1
|
||||
</tt></blockquote>
|
||||
Note that submodules must <em>not</em> be tagged with the version used
|
||||
for the top-level, they each have their own separate version numbers
|
||||
@@ -171,11 +171,11 @@ starting at <a href="#ReleaseApproval">Release Approval</a>.</p>
|
||||
files and directories that are only used for continuous integration:
|
||||
<blockquote><tt>
|
||||
cd base-7.0<br />
|
||||
./.tools/make-tar.sh R7.0.3.1-rc1 base-7.0.3.1-rc1.tar.gz base-7.0.3.1-rc1/
|
||||
./.tools/make-tar.sh R7.0.4.1-rc1 base-7.0.4.1-rc1.tar.gz base-7.0.4.1-rc1/
|
||||
</tt></blockquote>
|
||||
Create a GPG signature file of the tarfile as follows:
|
||||
<blockquote><tt>
|
||||
gpg --armor --sign --detach-sig base-7.0.3.1-rc1.tar.gz
|
||||
gpg --armor --sign --detach-sig base-7.0.4.1-rc1.tar.gz
|
||||
</tt></blockquote>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -298,7 +298,7 @@ starting at <a href="#ReleaseApproval">Release Approval</a>.</p>
|
||||
|
||||
<li>Tag the module:
|
||||
<blockquote><tt>
|
||||
git tag -m 'ANJ: Tag for EPICS 7.0.3.1' <module-version>
|
||||
git tag -m 'ANJ: Tag for EPICS 7.0.4.1' <module-version>
|
||||
</tt></blockquote>
|
||||
</li>
|
||||
|
||||
@@ -355,7 +355,7 @@ starting at <a href="#ReleaseApproval">Release Approval</a>.</p>
|
||||
<td>Tag the epics-base module in Git:
|
||||
<blockquote><tt>
|
||||
cd base-7.0<br />
|
||||
git tag -m 'ANJ: Tagged for 7.0.3.1' R7.0.3.1
|
||||
git tag -m 'ANJ: Tagged for release' R7.0.4.1
|
||||
</tt></blockquote>
|
||||
<p>Don't push these commits or the new tag to the Launchpad repository
|
||||
yet.</p>
|
||||
@@ -387,11 +387,12 @@ starting at <a href="#ReleaseApproval">Release Approval</a>.</p>
|
||||
files and directories that are only used for continuous integration:
|
||||
<blockquote><tt>
|
||||
cd base-7.0<br />
|
||||
./.tools/make-tar.sh R7.0.3.1 base-7.0.3.1.tar.gz base-7.0.3.1/
|
||||
./.tools/make-tar.sh R7.0.4.1 ../base-7.0.4.1.tar.gz base-7.0.4.1/
|
||||
</tt></blockquote>
|
||||
Create a GPG signature file of the tarfile as follows:
|
||||
<blockquote><tt>
|
||||
gpg --armor --sign --detach-sig base-7.0.3.1.tar.gz
|
||||
cd ..<br />
|
||||
gpg --armor --sign --detach-sig base-7.0.4.1.tar.gz
|
||||
</tt></blockquote>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -456,7 +457,7 @@ starting at <a href="#ReleaseApproval">Release Approval</a>.</p>
|
||||
<td>Upload the tar file and its <tt>.asc</tt> signature file to the
|
||||
epics-controls web-server.
|
||||
<blockquote><tt>
|
||||
scp base-7.0.3.1.tar.gz base-7.0.3.1.tar.gz.asc epics-controls:download/base<br />
|
||||
scp base-7.0.4.1.tar.gz base-7.0.4.1.tar.gz.asc epics-controls:download/base<br />
|
||||
</tt></blockquote>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
45
documentation/commit-gh.sh
Executable file
45
documentation/commit-gh.sh
Executable file
@@ -0,0 +1,45 @@
|
||||
#!/bin/sh
|
||||
set -e -x
|
||||
# Usage: commit-gh <sub-directory-prefix> <files...>
|
||||
#
|
||||
# Creates a commit containing only the files in the sub-directory provided as an argument
|
||||
#
|
||||
# Does not disturb the working copy or index
|
||||
|
||||
prefix="$1"
|
||||
shift
|
||||
|
||||
# Commit to this branch
|
||||
BRANCH=refs/heads/gh-pages
|
||||
|
||||
# Use the main branch description as the gh-pages commit message
|
||||
MSG=`git describe --tags --always`
|
||||
|
||||
# Scratch space
|
||||
TDIR=`mktemp -d -p $PWD`
|
||||
|
||||
# Automatic cleanup of scratch space
|
||||
trap 'rm -rf $TDIR' INT TERM QUIT EXIT
|
||||
|
||||
export GIT_INDEX_FILE="$TDIR/index"
|
||||
|
||||
# Add listed files to a new (empty) index
|
||||
git update-index --add "$@"
|
||||
|
||||
# Write the index into the repo, get tree hash
|
||||
TREE=`git write-tree --prefix="$prefix"`
|
||||
|
||||
echo "TREE $TREE"
|
||||
git cat-file -p $TREE
|
||||
|
||||
# Create a commit with our new tree
|
||||
# Reference current branch head as parent (if any)
|
||||
CMT=`git commit-tree -m "$MSG" $TREE`
|
||||
|
||||
echo "COMMIT $CMT"
|
||||
git cat-file -p $CMT
|
||||
|
||||
# Update the branch with the new commit tree hash
|
||||
git update-ref $BRANCH $CMT
|
||||
|
||||
echo "Done"
|
||||
16
documentation/mainpage.dox
Normal file
16
documentation/mainpage.dox
Normal file
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
@mainpage EPICS Base
|
||||
|
||||
Documentation index
|
||||
|
||||
@ul
|
||||
@li @ref releasenotes
|
||||
@li @ref install
|
||||
@li @ref recordrefmanual
|
||||
@li <a href="CAref.html">Channel Access Reference Manual</a>
|
||||
@li <a href="filters.html">Server Side Filters Reference</a>
|
||||
@li <a href="msi.html">msi: Macro Substitution and Include Tool</a>
|
||||
@li <a href="links.html">JSON Link Types</a>
|
||||
@li <a href="CA.html">Perl 5 Interface to Channel Access</a>
|
||||
|
||||
*/
|
||||
@@ -12,4 +12,4 @@ include $(TOP)/configure/CONFIG
|
||||
|
||||
DIRS += src
|
||||
|
||||
include $(TOP)/configure/RULES_TOP
|
||||
include $(TOP)/configure/RULES_DIRS
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
* National Laboratory.
|
||||
* Copyright (c) 2002 The Regents of the University of California, as
|
||||
* Operator of Los Alamos National Laboratory.
|
||||
* SPDX-License-Identifier: EPICS
|
||||
* EPICS BASE is distributed subject to a Software License Agreement found
|
||||
* in file LICENSE that is included with this distribution.
|
||||
\*************************************************************************/
|
||||
@@ -18,7 +19,6 @@
|
||||
|
||||
#include "errlog.h"
|
||||
|
||||
#define epicsExportSharedSymbols
|
||||
#include "iocinf.h"
|
||||
#include "syncGroup.h"
|
||||
#include "oldAccess.h"
|
||||
@@ -83,7 +83,7 @@ int CASG::block (
|
||||
return ECA_TIMEOUT;
|
||||
}
|
||||
|
||||
cur_time = epicsTime::getMonotonic ();
|
||||
cur_time = epicsTime::getCurrent ();
|
||||
|
||||
this->client.flush ( guard );
|
||||
|
||||
@@ -121,7 +121,7 @@ int CASG::block (
|
||||
/*
|
||||
* force a time update
|
||||
*/
|
||||
cur_time = epicsTime::getMonotonic ();
|
||||
cur_time = epicsTime::getCurrent ();
|
||||
|
||||
delay = cur_time - beg_time;
|
||||
}
|
||||
@@ -209,23 +209,23 @@ bool CASG::ioComplete (
|
||||
return this->ioPendingList.count () == 0u;
|
||||
}
|
||||
|
||||
void CASG::put ( epicsGuard < epicsMutex > & guard, chid pChan,
|
||||
void CASG::put ( epicsGuard < epicsMutex > & guard, chid pChan,
|
||||
unsigned type, arrayElementCount count, const void * pValue )
|
||||
{
|
||||
guard.assertIdenticalMutex ( this->client.mutexRef() );
|
||||
sgAutoPtr < syncGroupWriteNotify > pNotify ( guard, *this );
|
||||
pNotify = syncGroupWriteNotify::factory (
|
||||
pNotify = syncGroupWriteNotify::factory (
|
||||
this->freeListWriteOP, *this, & CASG :: recycleWriteNotifyIO, pChan );
|
||||
pNotify->begin ( guard, type, count, pValue );
|
||||
pNotify.release ();
|
||||
}
|
||||
|
||||
void CASG::get ( epicsGuard < epicsMutex > & guard, chid pChan,
|
||||
void CASG::get ( epicsGuard < epicsMutex > & guard, chid pChan,
|
||||
unsigned type, arrayElementCount count, void *pValue )
|
||||
{
|
||||
guard.assertIdenticalMutex ( this->client.mutexRef() );
|
||||
sgAutoPtr < syncGroupReadNotify > pNotify ( guard, *this );
|
||||
pNotify = syncGroupReadNotify::factory (
|
||||
pNotify = syncGroupReadNotify::factory (
|
||||
this->freeListReadOP, *this, & CASG :: recycleReadNotifyIO, pChan, pValue );
|
||||
pNotify->begin ( guard, type, count );
|
||||
pNotify.release ();
|
||||
@@ -242,14 +242,14 @@ void CASG::completionNotify (
|
||||
}
|
||||
}
|
||||
|
||||
void CASG :: recycleReadNotifyIO ( epicsGuard < epicsMutex > & guard,
|
||||
void CASG :: recycleReadNotifyIO ( epicsGuard < epicsMutex > & guard,
|
||||
syncGroupReadNotify & io )
|
||||
{
|
||||
guard.assertIdenticalMutex ( this->client.mutexRef() );
|
||||
this->freeListReadOP.release ( & io );
|
||||
}
|
||||
|
||||
void CASG :: recycleWriteNotifyIO ( epicsGuard < epicsMutex > & guard,
|
||||
void CASG :: recycleWriteNotifyIO ( epicsGuard < epicsMutex > & guard,
|
||||
syncGroupWriteNotify & io )
|
||||
{
|
||||
guard.assertIdenticalMutex ( this->client.mutexRef() );
|
||||
|
||||
@@ -26,7 +26,13 @@ INC += cacIO.h
|
||||
INC += caDiagnostics.h
|
||||
INC += net_convert.h
|
||||
INC += caVersion.h
|
||||
INC += caVersionNum.h
|
||||
|
||||
EXPAND_COMMON += caVersion.h@
|
||||
|
||||
EXPAND_ME += EPICS_CA_MAJOR_VERSION
|
||||
EXPAND_ME += EPICS_CA_MINOR_VERSION
|
||||
EXPAND_ME += EPICS_CA_MAINTENANCE_VERSION
|
||||
EXPAND_ME += EPICS_CA_DEVELOPMENT_FLAG
|
||||
|
||||
LIBSRCS += cac.cpp
|
||||
LIBSRCS += cacChannel.cpp
|
||||
@@ -73,6 +79,9 @@ LIBSRCS += comBuf.cpp
|
||||
LIBSRCS += hostNameCache.cpp
|
||||
LIBSRCS += msgForMultiplyDefinedPV.cpp
|
||||
|
||||
API_HEADER = libCaAPI.h
|
||||
ca_API = libCa
|
||||
|
||||
LIBRARY=ca
|
||||
|
||||
ca_RCS = ca.rc
|
||||
@@ -117,20 +126,7 @@ ca_test_SYS_LIBS_WIN32 = ws2_32 advapi32 user32
|
||||
|
||||
OBJS_vxWorks += ca_test
|
||||
|
||||
EXPANDVARS += EPICS_CA_MAJOR_VERSION
|
||||
EXPANDVARS += EPICS_CA_MINOR_VERSION
|
||||
EXPANDVARS += EPICS_CA_MAINTENANCE_VERSION
|
||||
EXPANDVARS += EPICS_CA_DEVELOPMENT_FLAG
|
||||
|
||||
EXPANDFLAGS += $(foreach var,$(EXPANDVARS),-D$(var)="$(strip $($(var)))")
|
||||
|
||||
# shared library ABI version.
|
||||
SHRLIB_VERSION = $(EPICS_CA_MAJOR_VERSION).$(EPICS_CA_MINOR_VERSION).$(EPICS_CA_MAINTENANCE_VERSION)
|
||||
|
||||
include $(TOP)/configure/RULES
|
||||
|
||||
|
||||
# Can't use EXPAND as generated headers must appear
|
||||
# in O.Common, but EXPAND emits rules for O.$(T_A)
|
||||
../O.Common/caVersionNum.h: ../caVersionNum.h@
|
||||
$(EXPAND_TOOL) $(EXPANDFLAGS) $($@_EXPANDFLAGS) $< $@
|
||||
|
||||
@@ -3,13 +3,13 @@
|
||||
* 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.
|
||||
* SPDX-License-Identifier: EPICS
|
||||
* EPICS Base is distributed subject to a Software License Agreement found
|
||||
* in file LICENSE that is included with this distribution.
|
||||
\*************************************************************************/
|
||||
|
||||
#ifndef SearchDest_h
|
||||
#define SearchDest_h
|
||||
#ifndef INC_SearchDest_H
|
||||
#define INC_SearchDest_H
|
||||
|
||||
#include <osiSock.h>
|
||||
#include <epicsTime.h>
|
||||
@@ -28,7 +28,7 @@ struct SearchDest :
|
||||
virtual void notify (
|
||||
const caHdr & msg, const void * pPayload,
|
||||
const osiSockAddr & addr, const epicsTime & ) = 0;
|
||||
virtual void show (
|
||||
virtual void show (
|
||||
epicsGuard < epicsMutex > &, unsigned level ) const = 0;
|
||||
};
|
||||
virtual void searchRequest ( epicsGuard < epicsMutex > &,
|
||||
@@ -36,4 +36,4 @@ struct SearchDest :
|
||||
virtual void show ( epicsGuard < epicsMutex > &, unsigned level ) const = 0;
|
||||
};
|
||||
|
||||
#endif // SearchDest_h
|
||||
#endif // ifndef INC_SearchDest_H
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
* 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
|
||||
* SPDX-License-Identifier: EPICS
|
||||
* EPICS BASE is distributed subject to a Software License Agreement found
|
||||
* in file LICENSE that is included with this distribution.
|
||||
\*************************************************************************/
|
||||
|
||||
@@ -40,7 +40,6 @@
|
||||
*/
|
||||
#define CAC_VERSION_GLOBAL
|
||||
|
||||
#define epicsExportSharedSymbols
|
||||
#include "iocinf.h"
|
||||
#include "oldAccess.h"
|
||||
#include "cac.h"
|
||||
@@ -165,13 +164,13 @@ int fetchClientContext ( ca_client_context **ppcac )
|
||||
* ca_task_initialize ()
|
||||
*/
|
||||
// extern "C"
|
||||
int epicsShareAPI ca_task_initialize ( void )
|
||||
int epicsStdCall ca_task_initialize ( void )
|
||||
{
|
||||
return ca_context_create ( ca_disable_preemptive_callback );
|
||||
}
|
||||
|
||||
// extern "C"
|
||||
int epicsShareAPI ca_context_create (
|
||||
int epicsStdCall ca_context_create (
|
||||
ca_preemptive_callback_select premptiveCallbackSelect )
|
||||
{
|
||||
ca_client_context *pcac;
|
||||
@@ -183,19 +182,19 @@ int epicsShareAPI ca_context_create (
|
||||
}
|
||||
|
||||
pcac = ( ca_client_context * ) epicsThreadPrivateGet ( caClientContextId );
|
||||
if ( pcac ) {
|
||||
if ( pcac ) {
|
||||
if ( premptiveCallbackSelect == ca_enable_preemptive_callback &&
|
||||
! pcac->preemptiveCallbakIsEnabled() ) {
|
||||
return ECA_NOTTHREADED;
|
||||
}
|
||||
return ECA_NORMAL;
|
||||
}
|
||||
return ECA_NORMAL;
|
||||
}
|
||||
|
||||
pcac = new ca_client_context (
|
||||
premptiveCallbackSelect == ca_enable_preemptive_callback );
|
||||
if ( ! pcac ) {
|
||||
return ECA_ALLOCMEM;
|
||||
}
|
||||
if ( ! pcac ) {
|
||||
return ECA_ALLOCMEM;
|
||||
}
|
||||
|
||||
epicsThreadPrivateSet ( caClientContextId, (void *) pcac );
|
||||
}
|
||||
@@ -211,7 +210,7 @@ int epicsShareAPI ca_context_create (
|
||||
// defunct
|
||||
//
|
||||
// extern "C"
|
||||
int epicsShareAPI ca_modify_host_name ( const char * )
|
||||
int epicsStdCall ca_modify_host_name ( const char * )
|
||||
{
|
||||
return ECA_NORMAL;
|
||||
}
|
||||
@@ -222,7 +221,7 @@ int epicsShareAPI ca_modify_host_name ( const char * )
|
||||
// defunct
|
||||
//
|
||||
// extern "C"
|
||||
int epicsShareAPI ca_modify_user_name ( const char * )
|
||||
int epicsStdCall ca_modify_user_name ( const char * )
|
||||
{
|
||||
return ECA_NORMAL;
|
||||
}
|
||||
@@ -231,7 +230,7 @@ int epicsShareAPI ca_modify_user_name ( const char * )
|
||||
// ca_context_destroy ()
|
||||
//
|
||||
// extern "C"
|
||||
void epicsShareAPI ca_context_destroy ()
|
||||
void epicsStdCall ca_context_destroy ()
|
||||
{
|
||||
ca_client_context *pcac;
|
||||
|
||||
@@ -250,7 +249,7 @@ void epicsShareAPI ca_context_destroy ()
|
||||
* releases all resources alloc to a channel access client
|
||||
*/
|
||||
// extern "C"
|
||||
int epicsShareAPI ca_task_exit ()
|
||||
int epicsStdCall ca_task_exit ()
|
||||
{
|
||||
ca_context_destroy ();
|
||||
return ECA_NORMAL;
|
||||
@@ -263,7 +262,7 @@ int epicsShareAPI ca_task_exit ()
|
||||
* backwards compatible entry point to ca_search_and_connect()
|
||||
*/
|
||||
// extern "C"
|
||||
int epicsShareAPI ca_build_and_connect ( const char *name_str, chtype get_type,
|
||||
int epicsStdCall ca_build_and_connect ( const char *name_str, chtype get_type,
|
||||
arrayElementCount get_count, chid * chan, void *pvalue,
|
||||
caCh *conn_func, void *puser )
|
||||
{
|
||||
@@ -278,7 +277,7 @@ int epicsShareAPI ca_build_and_connect ( const char *name_str, chtype get_type,
|
||||
* ca_search_and_connect()
|
||||
*/
|
||||
// extern "C"
|
||||
int epicsShareAPI ca_search_and_connect (
|
||||
int epicsStdCall ca_search_and_connect (
|
||||
const char * name_str, chid * chanptr,
|
||||
caCh * conn_func, void * puser )
|
||||
{
|
||||
@@ -287,7 +286,7 @@ int epicsShareAPI ca_search_and_connect (
|
||||
}
|
||||
|
||||
// extern "C"
|
||||
int epicsShareAPI ca_create_channel (
|
||||
int epicsStdCall ca_create_channel (
|
||||
const char * name_str, caCh * conn_func, void * puser,
|
||||
capri priority, chid * chanptr )
|
||||
{
|
||||
@@ -362,7 +361,7 @@ int epicsShareAPI ca_create_channel (
|
||||
* its context
|
||||
*/
|
||||
// extern "C"
|
||||
int epicsShareAPI ca_clear_channel ( chid pChan )
|
||||
int epicsStdCall ca_clear_channel ( chid pChan )
|
||||
{
|
||||
ca_client_context & cac = pChan->getClientCtx ();
|
||||
{
|
||||
@@ -401,7 +400,7 @@ int epicsShareAPI ca_clear_channel ( chid pChan )
|
||||
* Specify an event subroutine to be run for asynch exceptions
|
||||
*/
|
||||
// extern "C"
|
||||
int epicsShareAPI ca_add_exception_event ( caExceptionHandler *pfunc, void *arg )
|
||||
int epicsStdCall ca_add_exception_event ( caExceptionHandler *pfunc, void *arg )
|
||||
{
|
||||
ca_client_context *pcac;
|
||||
int caStatus = fetchClientContext ( &pcac );
|
||||
@@ -417,7 +416,7 @@ int epicsShareAPI ca_add_exception_event ( caExceptionHandler *pfunc, void *arg
|
||||
/*
|
||||
* ca_add_masked_array_event
|
||||
*/
|
||||
int epicsShareAPI ca_add_masked_array_event (
|
||||
int epicsStdCall ca_add_masked_array_event (
|
||||
chtype type, arrayElementCount count, chid pChan,
|
||||
caEventCallBackFunc *pCallBack, void *pCallBackArg,
|
||||
ca_real, ca_real, ca_real,
|
||||
@@ -430,19 +429,19 @@ int epicsShareAPI ca_add_masked_array_event (
|
||||
/*
|
||||
* ca_clear_event ()
|
||||
*/
|
||||
int epicsShareAPI ca_clear_event ( evid pMon )
|
||||
int epicsStdCall ca_clear_event ( evid pMon )
|
||||
{
|
||||
return ca_clear_subscription ( pMon );
|
||||
}
|
||||
|
||||
// extern "C"
|
||||
chid epicsShareAPI ca_evid_to_chid ( evid pMon )
|
||||
chid epicsStdCall ca_evid_to_chid ( evid pMon )
|
||||
{
|
||||
return & pMon->channel ();
|
||||
}
|
||||
|
||||
// extern "C"
|
||||
int epicsShareAPI ca_pend ( ca_real timeout, int early )
|
||||
int epicsStdCall ca_pend ( ca_real timeout, int early )
|
||||
{
|
||||
if ( early ) {
|
||||
return ca_pend_io ( timeout );
|
||||
@@ -456,7 +455,7 @@ int epicsShareAPI ca_pend ( ca_real timeout, int early )
|
||||
* ca_pend_event ()
|
||||
*/
|
||||
// extern "C"
|
||||
int epicsShareAPI ca_pend_event ( ca_real timeout )
|
||||
int epicsStdCall ca_pend_event ( ca_real timeout )
|
||||
{
|
||||
ca_client_context *pcac;
|
||||
int status = fetchClientContext ( &pcac );
|
||||
@@ -467,7 +466,7 @@ int epicsShareAPI ca_pend_event ( ca_real timeout )
|
||||
try {
|
||||
// preserve past odd ball behavior of waiting forever when
|
||||
// the delay is zero
|
||||
if ( timeout == 0.0 ) {
|
||||
if ( timeout == 0.0 ) {
|
||||
while ( true ) {
|
||||
pcac->pendEvent ( 60.0 );
|
||||
}
|
||||
@@ -483,7 +482,7 @@ int epicsShareAPI ca_pend_event ( ca_real timeout )
|
||||
* ca_pend_io ()
|
||||
*/
|
||||
// extern "C"
|
||||
int epicsShareAPI ca_pend_io ( ca_real timeout )
|
||||
int epicsStdCall ca_pend_io ( ca_real timeout )
|
||||
{
|
||||
ca_client_context *pcac;
|
||||
int status = fetchClientContext ( &pcac );
|
||||
@@ -508,7 +507,7 @@ int epicsShareAPI ca_pend_io ( ca_real timeout )
|
||||
/*
|
||||
* ca_flush_io ()
|
||||
*/
|
||||
int epicsShareAPI ca_flush_io ()
|
||||
int epicsStdCall ca_flush_io ()
|
||||
{
|
||||
ca_client_context * pcac;
|
||||
int caStatus = fetchClientContext (&pcac);
|
||||
@@ -525,7 +524,7 @@ int epicsShareAPI ca_flush_io ()
|
||||
/*
|
||||
* CA_TEST_IO ()
|
||||
*/
|
||||
int epicsShareAPI ca_test_io ()
|
||||
int epicsStdCall ca_test_io ()
|
||||
{
|
||||
ca_client_context *pcac;
|
||||
int caStatus = fetchClientContext ( &pcac );
|
||||
@@ -545,7 +544,7 @@ int epicsShareAPI ca_test_io ()
|
||||
* CA_SIGNAL()
|
||||
*/
|
||||
// extern "C"
|
||||
void epicsShareAPI ca_signal ( long ca_status, const char *message )
|
||||
void epicsStdCall ca_signal ( long ca_status, const char *message )
|
||||
{
|
||||
ca_signal_with_file_and_lineno ( ca_status, message, NULL, 0 );
|
||||
}
|
||||
@@ -560,7 +559,7 @@ void epicsShareAPI ca_signal ( long ca_status, const char *message )
|
||||
* (if they call this routine again).
|
||||
*/
|
||||
// extern "C"
|
||||
const char * epicsShareAPI ca_message ( long ca_status )
|
||||
const char * epicsStdCall ca_message ( long ca_status )
|
||||
{
|
||||
unsigned msgNo = CA_EXTRACT_MSG_NO ( ca_status );
|
||||
|
||||
@@ -576,7 +575,7 @@ const char * epicsShareAPI ca_message ( long ca_status )
|
||||
* ca_signal_with_file_and_lineno()
|
||||
*/
|
||||
// extern "C"
|
||||
void epicsShareAPI ca_signal_with_file_and_lineno ( long ca_status,
|
||||
void epicsStdCall ca_signal_with_file_and_lineno ( long ca_status,
|
||||
const char *message, const char *pfilenm, int lineno )
|
||||
{
|
||||
ca_signal_formated ( ca_status, pfilenm, lineno, message );
|
||||
@@ -586,7 +585,7 @@ void epicsShareAPI ca_signal_with_file_and_lineno ( long ca_status,
|
||||
* ca_signal_formated()
|
||||
*/
|
||||
// extern "C"
|
||||
void epicsShareAPI ca_signal_formated ( long ca_status, const char *pfilenm,
|
||||
void epicsStdCall ca_signal_formated ( long ca_status, const char *pfilenm,
|
||||
int lineno, const char *pFormat, ... )
|
||||
{
|
||||
ca_client_context *pcac;
|
||||
@@ -605,7 +604,7 @@ void epicsShareAPI ca_signal_formated ( long ca_status, const char *pfilenm,
|
||||
}
|
||||
else {
|
||||
fprintf ( stderr, "CA exception in thread w/o CA ctx: status=%s file=%s line=%d: \n",
|
||||
ca_message ( ca_status ), pfilenm, lineno );
|
||||
ca_message ( ca_status ), pfilenm ? pfilenm : "<null>", lineno );
|
||||
if ( pFormat ) {
|
||||
vfprintf ( stderr, pFormat, theArgs );
|
||||
}
|
||||
@@ -622,7 +621,7 @@ void epicsShareAPI ca_signal_formated ( long ca_status, const char *pfilenm,
|
||||
*
|
||||
*/
|
||||
// extern "C"
|
||||
int epicsShareAPI ca_add_fd_registration ( CAFDHANDLER * func, void * arg )
|
||||
int epicsStdCall ca_add_fd_registration ( CAFDHANDLER * func, void * arg )
|
||||
{
|
||||
ca_client_context *pcac;
|
||||
int caStatus = fetchClientContext ( &pcac );
|
||||
@@ -640,7 +639,7 @@ int epicsShareAPI ca_add_fd_registration ( CAFDHANDLER * func, void * arg )
|
||||
* function that returns the CA version string
|
||||
*/
|
||||
// extern "C"
|
||||
const char * epicsShareAPI ca_version ()
|
||||
const char * epicsStdCall ca_version ()
|
||||
{
|
||||
return CA_VERSION_STRING ( CA_MINOR_PROTOCOL_REVISION );
|
||||
}
|
||||
@@ -649,7 +648,7 @@ const char * epicsShareAPI ca_version ()
|
||||
* ca_replace_printf_handler ()
|
||||
*/
|
||||
// extern "C"
|
||||
int epicsShareAPI ca_replace_printf_handler ( caPrintfFunc *ca_printf_func )
|
||||
int epicsStdCall ca_replace_printf_handler ( caPrintfFunc *ca_printf_func )
|
||||
{
|
||||
ca_client_context *pcac;
|
||||
int caStatus = fetchClientContext (&pcac);
|
||||
@@ -669,7 +668,7 @@ int epicsShareAPI ca_replace_printf_handler ( caPrintfFunc *ca_printf_func )
|
||||
* (for testing purposes only)
|
||||
*/
|
||||
// extern "C"
|
||||
unsigned epicsShareAPI ca_get_ioc_connection_count ()
|
||||
unsigned epicsStdCall ca_get_ioc_connection_count ()
|
||||
{
|
||||
ca_client_context * pcac;
|
||||
int caStatus = fetchClientContext ( & pcac );
|
||||
@@ -680,7 +679,7 @@ unsigned epicsShareAPI ca_get_ioc_connection_count ()
|
||||
return pcac->circuitCount ();
|
||||
}
|
||||
|
||||
unsigned epicsShareAPI ca_beacon_anomaly_count ()
|
||||
unsigned epicsStdCall ca_beacon_anomaly_count ()
|
||||
{
|
||||
ca_client_context * pcac;
|
||||
int caStatus = fetchClientContext ( & pcac );
|
||||
@@ -692,15 +691,15 @@ unsigned epicsShareAPI ca_beacon_anomaly_count ()
|
||||
}
|
||||
|
||||
// extern "C"
|
||||
int epicsShareAPI ca_channel_status ( epicsThreadId /* tid */ )
|
||||
int epicsStdCall ca_channel_status ( epicsThreadId /* tid */ )
|
||||
{
|
||||
::printf ("The R3.14 EPICS OS abstraction API does not allow peeking at thread private storage of another thread.\n");
|
||||
::printf ("Please call \"ca_client_status ( unsigned level )\" from the subsystem specific diagnostic code.\n");
|
||||
return ECA_ANACHRONISM;
|
||||
return ECA_ANACHRONISM;
|
||||
}
|
||||
|
||||
// extern "C"
|
||||
int epicsShareAPI ca_client_status ( unsigned level )
|
||||
int epicsStdCall ca_client_status ( unsigned level )
|
||||
{
|
||||
ca_client_context *pcac;
|
||||
int caStatus = fetchClientContext ( &pcac );
|
||||
@@ -712,7 +711,7 @@ int epicsShareAPI ca_client_status ( unsigned level )
|
||||
return ECA_NORMAL;
|
||||
}
|
||||
|
||||
int epicsShareAPI ca_context_status ( ca_client_context * pcac, unsigned level )
|
||||
int epicsStdCall ca_context_status ( ca_client_context * pcac, unsigned level )
|
||||
{
|
||||
pcac->show ( level );
|
||||
return ECA_NORMAL;
|
||||
@@ -725,7 +724,7 @@ int epicsShareAPI ca_context_status ( ca_client_context * pcac, unsigned level )
|
||||
* by another thread
|
||||
*/
|
||||
// extern "C"
|
||||
struct ca_client_context * epicsShareAPI ca_current_context ()
|
||||
struct ca_client_context * epicsStdCall ca_current_context ()
|
||||
{
|
||||
struct ca_client_context *pCtx;
|
||||
if ( caClientContextId ) {
|
||||
@@ -745,7 +744,7 @@ struct ca_client_context * epicsShareAPI ca_current_context ()
|
||||
* by another thread
|
||||
*/
|
||||
// extern "C"
|
||||
int epicsShareAPI ca_attach_context ( struct ca_client_context * pCtx )
|
||||
int epicsStdCall ca_attach_context ( struct ca_client_context * pCtx )
|
||||
{
|
||||
ca_client_context *pcac = (ca_client_context *) epicsThreadPrivateGet ( caClientContextId );
|
||||
if ( pcac && pCtx != 0 ) {
|
||||
@@ -758,14 +757,14 @@ int epicsShareAPI ca_attach_context ( struct ca_client_context * pCtx )
|
||||
return ECA_NORMAL;
|
||||
}
|
||||
|
||||
void epicsShareAPI ca_detach_context ()
|
||||
void epicsStdCall ca_detach_context ()
|
||||
{
|
||||
if ( caClientContextId ) {
|
||||
epicsThreadPrivateSet ( caClientContextId, 0 );
|
||||
}
|
||||
}
|
||||
|
||||
int epicsShareAPI ca_preemtive_callback_is_enabled ()
|
||||
int epicsStdCall ca_preemtive_callback_is_enabled ()
|
||||
{
|
||||
ca_client_context *pcac = (ca_client_context *) epicsThreadPrivateGet ( caClientContextId );
|
||||
if ( ! pcac ) {
|
||||
@@ -776,7 +775,7 @@ int epicsShareAPI ca_preemtive_callback_is_enabled ()
|
||||
|
||||
|
||||
// extern "C"
|
||||
void epicsShareAPI ca_self_test ()
|
||||
void epicsStdCall ca_self_test ()
|
||||
{
|
||||
ca_client_context *pcac = (ca_client_context *) epicsThreadPrivateGet ( caClientContextId );
|
||||
if ( ! pcac ) {
|
||||
@@ -785,8 +784,7 @@ void epicsShareAPI ca_self_test ()
|
||||
pcac->selfTest ();
|
||||
}
|
||||
|
||||
// extern "C"
|
||||
epicsShareDef const int epicsTypeToDBR_XXXX [lastEpicsType+1] = {
|
||||
const int epicsTypeToDBR_XXXX [lastEpicsType+1] = {
|
||||
DBR_SHORT, /* forces conversion fronm uint8 to int16 */
|
||||
DBR_CHAR,
|
||||
DBR_SHORT,
|
||||
@@ -800,265 +798,257 @@ epicsShareDef const int epicsTypeToDBR_XXXX [lastEpicsType+1] = {
|
||||
DBR_STRING
|
||||
};
|
||||
|
||||
// extern "C"
|
||||
epicsShareDef const epicsType DBR_XXXXToEpicsType [LAST_BUFFER_TYPE+1] = {
|
||||
epicsOldStringT,
|
||||
epicsInt16T,
|
||||
epicsFloat32T,
|
||||
epicsEnum16T,
|
||||
epicsUInt8T,
|
||||
epicsInt32T,
|
||||
epicsFloat64T,
|
||||
const epicsType DBR_XXXXToEpicsType [LAST_BUFFER_TYPE+1] = {
|
||||
epicsOldStringT,
|
||||
epicsInt16T,
|
||||
epicsFloat32T,
|
||||
epicsEnum16T,
|
||||
epicsUInt8T,
|
||||
epicsInt32T,
|
||||
epicsFloat64T,
|
||||
|
||||
epicsOldStringT,
|
||||
epicsInt16T,
|
||||
epicsFloat32T,
|
||||
epicsEnum16T,
|
||||
epicsUInt8T,
|
||||
epicsInt32T,
|
||||
epicsFloat64T,
|
||||
epicsOldStringT,
|
||||
epicsInt16T,
|
||||
epicsFloat32T,
|
||||
epicsEnum16T,
|
||||
epicsUInt8T,
|
||||
epicsInt32T,
|
||||
epicsFloat64T,
|
||||
|
||||
epicsOldStringT,
|
||||
epicsInt16T,
|
||||
epicsFloat32T,
|
||||
epicsEnum16T,
|
||||
epicsUInt8T,
|
||||
epicsInt32T,
|
||||
epicsFloat64T,
|
||||
epicsOldStringT,
|
||||
epicsInt16T,
|
||||
epicsFloat32T,
|
||||
epicsEnum16T,
|
||||
epicsUInt8T,
|
||||
epicsInt32T,
|
||||
epicsFloat64T,
|
||||
|
||||
epicsOldStringT,
|
||||
epicsInt16T,
|
||||
epicsFloat32T,
|
||||
epicsEnum16T,
|
||||
epicsUInt8T,
|
||||
epicsInt32T,
|
||||
epicsFloat64T,
|
||||
epicsOldStringT,
|
||||
epicsInt16T,
|
||||
epicsFloat32T,
|
||||
epicsEnum16T,
|
||||
epicsUInt8T,
|
||||
epicsInt32T,
|
||||
epicsFloat64T,
|
||||
|
||||
epicsOldStringT,
|
||||
epicsInt16T,
|
||||
epicsFloat32T,
|
||||
epicsEnum16T,
|
||||
epicsUInt8T,
|
||||
epicsInt32T,
|
||||
epicsFloat64T,
|
||||
epicsOldStringT,
|
||||
epicsInt16T,
|
||||
epicsFloat32T,
|
||||
epicsEnum16T,
|
||||
epicsUInt8T,
|
||||
epicsInt32T,
|
||||
epicsFloat64T,
|
||||
|
||||
epicsUInt16T,
|
||||
epicsUInt16T,
|
||||
epicsOldStringT,
|
||||
epicsOldStringT
|
||||
epicsUInt16T,
|
||||
epicsUInt16T,
|
||||
epicsOldStringT,
|
||||
epicsOldStringT
|
||||
};
|
||||
|
||||
// extern "C"
|
||||
epicsShareDef const unsigned short dbr_size[LAST_BUFFER_TYPE+1] = {
|
||||
sizeof(dbr_string_t), /* string max size */
|
||||
sizeof(dbr_short_t), /* short */
|
||||
sizeof(dbr_float_t), /* IEEE Float */
|
||||
sizeof(dbr_enum_t), /* item number */
|
||||
sizeof(dbr_char_t), /* character */
|
||||
const unsigned short dbr_size[LAST_BUFFER_TYPE+1] = {
|
||||
sizeof(dbr_string_t), /* string max size */
|
||||
sizeof(dbr_short_t), /* short */
|
||||
sizeof(dbr_float_t), /* IEEE Float */
|
||||
sizeof(dbr_enum_t), /* item number */
|
||||
sizeof(dbr_char_t), /* character */
|
||||
|
||||
sizeof(dbr_long_t), /* long */
|
||||
sizeof(dbr_double_t), /* double */
|
||||
sizeof(struct dbr_sts_string), /* string field with status */
|
||||
sizeof(struct dbr_sts_short), /* short field with status */
|
||||
sizeof(struct dbr_sts_float), /* float field with status */
|
||||
sizeof(dbr_long_t), /* long */
|
||||
sizeof(dbr_double_t), /* double */
|
||||
sizeof(struct dbr_sts_string), /* string field with status */
|
||||
sizeof(struct dbr_sts_short), /* short field with status */
|
||||
sizeof(struct dbr_sts_float), /* float field with status */
|
||||
|
||||
sizeof(struct dbr_sts_enum), /* item number with status */
|
||||
sizeof(struct dbr_sts_char), /* char field with status */
|
||||
sizeof(struct dbr_sts_long), /* long field with status */
|
||||
sizeof(struct dbr_sts_double), /* double field with time */
|
||||
sizeof(struct dbr_time_string), /* string field with time */
|
||||
sizeof(struct dbr_sts_enum), /* item number with status */
|
||||
sizeof(struct dbr_sts_char), /* char field with status */
|
||||
sizeof(struct dbr_sts_long), /* long field with status */
|
||||
sizeof(struct dbr_sts_double), /* double field with time */
|
||||
sizeof(struct dbr_time_string), /* string field with time */
|
||||
|
||||
sizeof(struct dbr_time_short), /* short field with time */
|
||||
sizeof(struct dbr_time_float), /* float field with time */
|
||||
sizeof(struct dbr_time_enum), /* item number with time */
|
||||
sizeof(struct dbr_time_char), /* char field with time */
|
||||
sizeof(struct dbr_time_long), /* long field with time */
|
||||
sizeof(struct dbr_time_short), /* short field with time */
|
||||
sizeof(struct dbr_time_float), /* float field with time */
|
||||
sizeof(struct dbr_time_enum), /* item number with time */
|
||||
sizeof(struct dbr_time_char), /* char field with time */
|
||||
sizeof(struct dbr_time_long), /* long field with time */
|
||||
|
||||
sizeof(struct dbr_time_double), /* double field with time */
|
||||
sizeof(struct dbr_sts_string), /* graphic string info */
|
||||
sizeof(struct dbr_gr_short), /* graphic short info */
|
||||
sizeof(struct dbr_gr_float), /* graphic float info */
|
||||
sizeof(struct dbr_gr_enum), /* graphic item info */
|
||||
sizeof(struct dbr_time_double), /* double field with time */
|
||||
sizeof(struct dbr_sts_string), /* graphic string info */
|
||||
sizeof(struct dbr_gr_short), /* graphic short info */
|
||||
sizeof(struct dbr_gr_float), /* graphic float info */
|
||||
sizeof(struct dbr_gr_enum), /* graphic item info */
|
||||
|
||||
sizeof(struct dbr_gr_char), /* graphic char info */
|
||||
sizeof(struct dbr_gr_long), /* graphic long info */
|
||||
sizeof(struct dbr_gr_double), /* graphic double info */
|
||||
sizeof(struct dbr_sts_string), /* control string info */
|
||||
sizeof(struct dbr_ctrl_short), /* control short info */
|
||||
sizeof(struct dbr_gr_char), /* graphic char info */
|
||||
sizeof(struct dbr_gr_long), /* graphic long info */
|
||||
sizeof(struct dbr_gr_double), /* graphic double info */
|
||||
sizeof(struct dbr_sts_string), /* control string info */
|
||||
sizeof(struct dbr_ctrl_short), /* control short info */
|
||||
|
||||
sizeof(struct dbr_ctrl_float), /* control float info */
|
||||
sizeof(struct dbr_ctrl_enum), /* control item info */
|
||||
sizeof(struct dbr_ctrl_char), /* control char info */
|
||||
sizeof(struct dbr_ctrl_long), /* control long info */
|
||||
sizeof(struct dbr_ctrl_double), /* control double info */
|
||||
sizeof(struct dbr_ctrl_float), /* control float info */
|
||||
sizeof(struct dbr_ctrl_enum), /* control item info */
|
||||
sizeof(struct dbr_ctrl_char), /* control char info */
|
||||
sizeof(struct dbr_ctrl_long), /* control long info */
|
||||
sizeof(struct dbr_ctrl_double), /* control double info */
|
||||
|
||||
sizeof(dbr_put_ackt_t), /* put ackt */
|
||||
sizeof(dbr_put_acks_t), /* put acks */
|
||||
sizeof(struct dbr_stsack_string),/* string field with status/ack*/
|
||||
sizeof(dbr_string_t), /* string max size */
|
||||
sizeof(dbr_put_ackt_t), /* put ackt */
|
||||
sizeof(dbr_put_acks_t), /* put acks */
|
||||
sizeof(struct dbr_stsack_string),/* string field with status/ack*/
|
||||
sizeof(dbr_string_t), /* string max size */
|
||||
};
|
||||
|
||||
// extern "C"
|
||||
epicsShareDef const unsigned short dbr_value_size[LAST_BUFFER_TYPE+1] = {
|
||||
sizeof(dbr_string_t), /* string max size */
|
||||
sizeof(dbr_short_t), /* short */
|
||||
sizeof(dbr_float_t), /* IEEE Float */
|
||||
sizeof(dbr_enum_t), /* item number */
|
||||
sizeof(dbr_char_t), /* character */
|
||||
const unsigned short dbr_value_size[LAST_BUFFER_TYPE+1] = {
|
||||
sizeof(dbr_string_t), /* string max size */
|
||||
sizeof(dbr_short_t), /* short */
|
||||
sizeof(dbr_float_t), /* IEEE Float */
|
||||
sizeof(dbr_enum_t), /* item number */
|
||||
sizeof(dbr_char_t), /* character */
|
||||
|
||||
sizeof(dbr_long_t), /* long */
|
||||
sizeof(dbr_double_t), /* double */
|
||||
sizeof(dbr_string_t), /* string max size */
|
||||
sizeof(dbr_short_t), /* short */
|
||||
sizeof(dbr_float_t), /* IEEE Float */
|
||||
sizeof(dbr_long_t), /* long */
|
||||
sizeof(dbr_double_t), /* double */
|
||||
sizeof(dbr_string_t), /* string max size */
|
||||
sizeof(dbr_short_t), /* short */
|
||||
sizeof(dbr_float_t), /* IEEE Float */
|
||||
|
||||
sizeof(dbr_enum_t), /* item number */
|
||||
sizeof(dbr_char_t), /* character */
|
||||
sizeof(dbr_long_t), /* long */
|
||||
sizeof(dbr_double_t), /* double */
|
||||
sizeof(dbr_string_t), /* string max size */
|
||||
sizeof(dbr_enum_t), /* item number */
|
||||
sizeof(dbr_char_t), /* character */
|
||||
sizeof(dbr_long_t), /* long */
|
||||
sizeof(dbr_double_t), /* double */
|
||||
sizeof(dbr_string_t), /* string max size */
|
||||
|
||||
sizeof(dbr_short_t), /* short */
|
||||
sizeof(dbr_float_t), /* IEEE Float */
|
||||
sizeof(dbr_enum_t), /* item number */
|
||||
sizeof(dbr_char_t), /* character */
|
||||
sizeof(dbr_long_t), /* long */
|
||||
sizeof(dbr_short_t), /* short */
|
||||
sizeof(dbr_float_t), /* IEEE Float */
|
||||
sizeof(dbr_enum_t), /* item number */
|
||||
sizeof(dbr_char_t), /* character */
|
||||
sizeof(dbr_long_t), /* long */
|
||||
|
||||
sizeof(dbr_double_t), /* double */
|
||||
sizeof(dbr_string_t), /* string max size */
|
||||
sizeof(dbr_short_t), /* short */
|
||||
sizeof(dbr_float_t), /* IEEE Float */
|
||||
sizeof(dbr_enum_t), /* item number */
|
||||
sizeof(dbr_double_t), /* double */
|
||||
sizeof(dbr_string_t), /* string max size */
|
||||
sizeof(dbr_short_t), /* short */
|
||||
sizeof(dbr_float_t), /* IEEE Float */
|
||||
sizeof(dbr_enum_t), /* item number */
|
||||
|
||||
sizeof(dbr_char_t), /* character */
|
||||
sizeof(dbr_long_t), /* long */
|
||||
sizeof(dbr_double_t), /* double */
|
||||
sizeof(dbr_string_t), /* string max size */
|
||||
sizeof(dbr_short_t), /* short */
|
||||
sizeof(dbr_char_t), /* character */
|
||||
sizeof(dbr_long_t), /* long */
|
||||
sizeof(dbr_double_t), /* double */
|
||||
sizeof(dbr_string_t), /* string max size */
|
||||
sizeof(dbr_short_t), /* short */
|
||||
|
||||
sizeof(dbr_float_t), /* IEEE Float */
|
||||
sizeof(dbr_enum_t), /* item number */
|
||||
sizeof(dbr_char_t), /* character */
|
||||
sizeof(dbr_long_t), /* long */
|
||||
sizeof(dbr_double_t), /* double */
|
||||
sizeof(dbr_float_t), /* IEEE Float */
|
||||
sizeof(dbr_enum_t), /* item number */
|
||||
sizeof(dbr_char_t), /* character */
|
||||
sizeof(dbr_long_t), /* long */
|
||||
sizeof(dbr_double_t), /* double */
|
||||
|
||||
sizeof(dbr_ushort_t), /* put_ackt */
|
||||
sizeof(dbr_ushort_t), /* put_acks */
|
||||
sizeof(dbr_string_t), /* string max size */
|
||||
sizeof(dbr_string_t), /* string max size */
|
||||
sizeof(dbr_ushort_t), /* put_ackt */
|
||||
sizeof(dbr_ushort_t), /* put_acks */
|
||||
sizeof(dbr_string_t), /* string max size */
|
||||
sizeof(dbr_string_t), /* string max size */
|
||||
};
|
||||
|
||||
//extern "C"
|
||||
epicsShareDef const enum dbr_value_class dbr_value_class[LAST_BUFFER_TYPE+1] = {
|
||||
dbr_class_string, /* string max size */
|
||||
dbr_class_int, /* short */
|
||||
dbr_class_float, /* IEEE Float */
|
||||
dbr_class_int, /* item number */
|
||||
dbr_class_int, /* character */
|
||||
dbr_class_int, /* long */
|
||||
dbr_class_float, /* double */
|
||||
const enum dbr_value_class dbr_value_class[LAST_BUFFER_TYPE+1] = {
|
||||
dbr_class_string, /* string max size */
|
||||
dbr_class_int, /* short */
|
||||
dbr_class_float, /* IEEE Float */
|
||||
dbr_class_int, /* item number */
|
||||
dbr_class_int, /* character */
|
||||
dbr_class_int, /* long */
|
||||
dbr_class_float, /* double */
|
||||
|
||||
dbr_class_string, /* string max size */
|
||||
dbr_class_int, /* short */
|
||||
dbr_class_float, /* IEEE Float */
|
||||
dbr_class_int, /* item number */
|
||||
dbr_class_int, /* character */
|
||||
dbr_class_int, /* long */
|
||||
dbr_class_float, /* double */
|
||||
dbr_class_string, /* string max size */
|
||||
dbr_class_int, /* short */
|
||||
dbr_class_float, /* IEEE Float */
|
||||
dbr_class_int, /* item number */
|
||||
dbr_class_int, /* character */
|
||||
dbr_class_int, /* long */
|
||||
dbr_class_float, /* double */
|
||||
|
||||
dbr_class_string, /* string max size */
|
||||
dbr_class_int, /* short */
|
||||
dbr_class_float, /* IEEE Float */
|
||||
dbr_class_int, /* item number */
|
||||
dbr_class_int, /* character */
|
||||
dbr_class_int, /* long */
|
||||
dbr_class_float, /* double */
|
||||
dbr_class_string, /* string max size */
|
||||
dbr_class_int, /* short */
|
||||
dbr_class_float, /* IEEE Float */
|
||||
dbr_class_int, /* item number */
|
||||
dbr_class_int, /* character */
|
||||
dbr_class_int, /* long */
|
||||
dbr_class_float, /* double */
|
||||
|
||||
dbr_class_string, /* string max size */
|
||||
dbr_class_int, /* short */
|
||||
dbr_class_float, /* IEEE Float */
|
||||
dbr_class_int, /* item number */
|
||||
dbr_class_int, /* character */
|
||||
dbr_class_int, /* long */
|
||||
dbr_class_float, /* double */
|
||||
dbr_class_string, /* string max size */
|
||||
dbr_class_int, /* short */
|
||||
dbr_class_float, /* IEEE Float */
|
||||
dbr_class_int, /* item number */
|
||||
dbr_class_int, /* character */
|
||||
dbr_class_int, /* long */
|
||||
dbr_class_float, /* double */
|
||||
|
||||
dbr_class_string, /* string max size */
|
||||
dbr_class_int, /* short */
|
||||
dbr_class_float, /* IEEE Float */
|
||||
dbr_class_int, /* item number */
|
||||
dbr_class_int, /* character */
|
||||
dbr_class_int, /* long */
|
||||
dbr_class_float, /* double */
|
||||
dbr_class_int,
|
||||
dbr_class_int,
|
||||
dbr_class_string,
|
||||
dbr_class_string, /* string max size */
|
||||
dbr_class_string, /* string max size */
|
||||
dbr_class_int, /* short */
|
||||
dbr_class_float, /* IEEE Float */
|
||||
dbr_class_int, /* item number */
|
||||
dbr_class_int, /* character */
|
||||
dbr_class_int, /* long */
|
||||
dbr_class_float, /* double */
|
||||
dbr_class_int,
|
||||
dbr_class_int,
|
||||
dbr_class_string,
|
||||
dbr_class_string, /* string max size */
|
||||
};
|
||||
|
||||
// extern "C"
|
||||
epicsShareDef const unsigned short dbr_value_offset[LAST_BUFFER_TYPE+1] = {
|
||||
0, /* string */
|
||||
0, /* short */
|
||||
0, /* IEEE Float */
|
||||
0, /* item number */
|
||||
0, /* character */
|
||||
0, /* long */
|
||||
0, /* IEEE double */
|
||||
(unsigned short) offsetof(dbr_sts_string,value[0]),/* string field with status */
|
||||
(unsigned short) offsetof(dbr_sts_short,value), /* short field with status */
|
||||
(unsigned short) offsetof(dbr_sts_float,value), /* float field with status */
|
||||
(unsigned short) offsetof(dbr_sts_enum,value), /* item number with status */
|
||||
(unsigned short) offsetof(dbr_sts_char,value), /* char field with status */
|
||||
(unsigned short) offsetof(dbr_sts_long,value), /* long field with status */
|
||||
(unsigned short) offsetof(dbr_sts_double,value), /* double field with time */
|
||||
(unsigned short) offsetof(dbr_time_string,value[0] ),/* string field with time */
|
||||
(unsigned short) offsetof(dbr_time_short,value), /* short field with time */
|
||||
(unsigned short) offsetof(dbr_time_float,value), /* float field with time */
|
||||
(unsigned short) offsetof(dbr_time_enum,value), /* item number with time */
|
||||
(unsigned short) offsetof(dbr_time_char,value), /* char field with time */
|
||||
(unsigned short) offsetof(dbr_time_long,value), /* long field with time */
|
||||
(unsigned short) offsetof(dbr_time_double,value), /* double field with time */
|
||||
(unsigned short) offsetof(dbr_sts_string,value[0]),/* graphic string info */
|
||||
(unsigned short) offsetof(dbr_gr_short,value), /* graphic short info */
|
||||
(unsigned short) offsetof(dbr_gr_float,value), /* graphic float info */
|
||||
(unsigned short) offsetof(dbr_gr_enum,value), /* graphic item info */
|
||||
(unsigned short) offsetof(dbr_gr_char,value), /* graphic char info */
|
||||
(unsigned short) offsetof(dbr_gr_long,value), /* graphic long info */
|
||||
(unsigned short) offsetof(dbr_gr_double,value), /* graphic double info */
|
||||
(unsigned short) offsetof(dbr_sts_string,value[0]),/* control string info */
|
||||
(unsigned short) offsetof(dbr_ctrl_short,value), /* control short info */
|
||||
(unsigned short) offsetof(dbr_ctrl_float,value), /* control float info */
|
||||
(unsigned short) offsetof(dbr_ctrl_enum,value), /* control item info */
|
||||
(unsigned short) offsetof(dbr_ctrl_char,value), /* control char info */
|
||||
(unsigned short) offsetof(dbr_ctrl_long,value), /* control long info */
|
||||
(unsigned short) offsetof(dbr_ctrl_double,value), /* control double info */
|
||||
0, /* put ackt */
|
||||
0, /* put acks */
|
||||
(unsigned short) offsetof(dbr_stsack_string,value[0]),/* string field with status */
|
||||
0, /* string */
|
||||
const unsigned short dbr_value_offset[LAST_BUFFER_TYPE+1] = {
|
||||
0, /* string */
|
||||
0, /* short */
|
||||
0, /* IEEE Float */
|
||||
0, /* item number */
|
||||
0, /* character */
|
||||
0, /* long */
|
||||
0, /* IEEE double */
|
||||
(unsigned short) offsetof(dbr_sts_string,value[0]), /* string field with status */
|
||||
(unsigned short) offsetof(dbr_sts_short,value), /* short field with status */
|
||||
(unsigned short) offsetof(dbr_sts_float,value), /* float field with status */
|
||||
(unsigned short) offsetof(dbr_sts_enum,value), /* item number with status */
|
||||
(unsigned short) offsetof(dbr_sts_char,value), /* char field with status */
|
||||
(unsigned short) offsetof(dbr_sts_long,value), /* long field with status */
|
||||
(unsigned short) offsetof(dbr_sts_double,value), /* double field with time */
|
||||
(unsigned short) offsetof(dbr_time_string,value[0] ), /* string field with time */
|
||||
(unsigned short) offsetof(dbr_time_short,value), /* short field with time */
|
||||
(unsigned short) offsetof(dbr_time_float,value), /* float field with time */
|
||||
(unsigned short) offsetof(dbr_time_enum,value), /* item number with time */
|
||||
(unsigned short) offsetof(dbr_time_char,value), /* char field with time */
|
||||
(unsigned short) offsetof(dbr_time_long,value), /* long field with time */
|
||||
(unsigned short) offsetof(dbr_time_double,value), /* double field with time */
|
||||
(unsigned short) offsetof(dbr_sts_string,value[0]), /* graphic string info */
|
||||
(unsigned short) offsetof(dbr_gr_short,value), /* graphic short info */
|
||||
(unsigned short) offsetof(dbr_gr_float,value), /* graphic float info */
|
||||
(unsigned short) offsetof(dbr_gr_enum,value), /* graphic item info */
|
||||
(unsigned short) offsetof(dbr_gr_char,value), /* graphic char info */
|
||||
(unsigned short) offsetof(dbr_gr_long,value), /* graphic long info */
|
||||
(unsigned short) offsetof(dbr_gr_double,value), /* graphic double info */
|
||||
(unsigned short) offsetof(dbr_sts_string,value[0]), /* control string info */
|
||||
(unsigned short) offsetof(dbr_ctrl_short,value), /* control short info */
|
||||
(unsigned short) offsetof(dbr_ctrl_float,value), /* control float info */
|
||||
(unsigned short) offsetof(dbr_ctrl_enum,value), /* control item info */
|
||||
(unsigned short) offsetof(dbr_ctrl_char,value), /* control char info */
|
||||
(unsigned short) offsetof(dbr_ctrl_long,value), /* control long info */
|
||||
(unsigned short) offsetof(dbr_ctrl_double,value), /* control double info */
|
||||
0, /* put ackt */
|
||||
0, /* put acks */
|
||||
(unsigned short) offsetof(dbr_stsack_string,value[0]), /* string field with status */
|
||||
0, /* string */
|
||||
};
|
||||
|
||||
// extern "C"
|
||||
epicsShareDef const char *dbf_text[LAST_TYPE+3] = {
|
||||
"TYPENOTCONN",
|
||||
"DBF_STRING",
|
||||
"DBF_SHORT",
|
||||
"DBF_FLOAT",
|
||||
"DBF_ENUM",
|
||||
"DBF_CHAR",
|
||||
"DBF_LONG",
|
||||
"DBF_DOUBLE",
|
||||
"DBF_NO_ACCESS"
|
||||
const char *dbf_text[LAST_TYPE+3] = {
|
||||
"TYPENOTCONN",
|
||||
"DBF_STRING",
|
||||
"DBF_SHORT",
|
||||
"DBF_FLOAT",
|
||||
"DBF_ENUM",
|
||||
"DBF_CHAR",
|
||||
"DBF_LONG",
|
||||
"DBF_DOUBLE",
|
||||
"DBF_NO_ACCESS"
|
||||
};
|
||||
|
||||
// extern "C"
|
||||
epicsShareDef const char *dbf_text_invalid = "DBF_invalid";
|
||||
const char *dbf_text_invalid = "DBF_invalid";
|
||||
|
||||
// extern "C"
|
||||
epicsShareDef const short dbf_text_dim = (sizeof dbf_text)/(sizeof (char *));
|
||||
const short dbf_text_dim = (sizeof dbf_text)/(sizeof (char *));
|
||||
|
||||
// extern "C"
|
||||
epicsShareDef const char *dbr_text[LAST_BUFFER_TYPE+1] = {
|
||||
const char *dbr_text[LAST_BUFFER_TYPE+1] = {
|
||||
"DBR_STRING",
|
||||
"DBR_SHORT",
|
||||
"DBR_FLOAT",
|
||||
@@ -1100,8 +1090,6 @@ epicsShareDef const char *dbr_text[LAST_BUFFER_TYPE+1] = {
|
||||
"DBR_CLASS_NAME"
|
||||
};
|
||||
|
||||
// extern "C"
|
||||
epicsShareDef const char *dbr_text_invalid = "DBR_invalid";
|
||||
const char *dbr_text_invalid = "DBR_invalid";
|
||||
|
||||
// extern "C"
|
||||
epicsShareDef const short dbr_text_dim = (sizeof dbr_text) / (sizeof (char *)) + 1;
|
||||
const short dbr_text_dim = (sizeof dbr_text) / (sizeof (char *)) + 1;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -3,9 +3,9 @@
|
||||
* 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.
|
||||
* SPDX-License-Identifier: EPICS
|
||||
* EPICS Base is distributed subject to a Software License Agreement found
|
||||
* in file LICENSE that is included with this distribution.
|
||||
\*************************************************************************/
|
||||
|
||||
#include <stdio.h>
|
||||
@@ -19,15 +19,15 @@ int main ( int argc, char **argv )
|
||||
unsigned progressLoggingLevel;
|
||||
unsigned channelCount;
|
||||
unsigned repetitionCount;
|
||||
enum ca_preemptive_callback_select preempt;
|
||||
int aBoolean;
|
||||
enum ca_preemptive_callback_select preempt;
|
||||
int aBoolean;
|
||||
|
||||
|
||||
if ( argc < 2 || argc > 6 ) {
|
||||
printf ("usage: %s <PV name> [progress logging level] [channel count] "
|
||||
"[repetition count] [enable preemptive callback]\n",
|
||||
"[repetition count] [enable preemptive callback]\n",
|
||||
argv[0] );
|
||||
return 1;
|
||||
return 1;
|
||||
}
|
||||
|
||||
if ( argc >= 3 ) {
|
||||
@@ -57,12 +57,12 @@ int main ( int argc, char **argv )
|
||||
else {
|
||||
aBoolean = 0;
|
||||
}
|
||||
if ( aBoolean ) {
|
||||
preempt = ca_enable_preemptive_callback;
|
||||
}
|
||||
else {
|
||||
preempt = ca_disable_preemptive_callback;
|
||||
}
|
||||
if ( aBoolean ) {
|
||||
preempt = ca_enable_preemptive_callback;
|
||||
}
|
||||
else {
|
||||
preempt = ca_disable_preemptive_callback;
|
||||
}
|
||||
|
||||
acctst ( argv[1], progressLoggingLevel, channelCount, repetitionCount, preempt );
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
* National Laboratory.
|
||||
* Copyright (c) 2002 The Regents of the University of California, as
|
||||
* Operator of Los Alamos National Laboratory.
|
||||
* SPDX-License-Identifier: EPICS
|
||||
* EPICS BASE is distributed subject to a Software License Agreement found
|
||||
* in file LICENSE that is included with this distribution.
|
||||
\*************************************************************************/
|
||||
@@ -60,7 +61,7 @@ struct AutoInit {
|
||||
AutoInit ();
|
||||
};
|
||||
|
||||
AutoInit :: AutoInit ()
|
||||
AutoInit :: AutoInit ()
|
||||
{
|
||||
iocshRegister ( &acctstFuncDef, acctstCallFunc );
|
||||
}
|
||||
|
||||
@@ -3,38 +3,39 @@
|
||||
* 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.
|
||||
* SPDX-License-Identifier: EPICS
|
||||
* EPICS BASE is distributed subject to a Software License Agreement found
|
||||
* in file LICENSE that is included with this distribution.
|
||||
\*************************************************************************/
|
||||
|
||||
#ifndef addrListh
|
||||
#define addrListh
|
||||
#ifndef INC_addrList_H
|
||||
#define INC_addrList_H
|
||||
|
||||
#include "shareLib.h"
|
||||
#include "envDefs.h"
|
||||
#include "envDefs.h"
|
||||
#include "osiSock.h"
|
||||
|
||||
#include "libCaAPI.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
epicsShareFunc void epicsShareAPI configureChannelAccessAddressList
|
||||
LIBCA_API void epicsStdCall configureChannelAccessAddressList
|
||||
( struct ELLLIST *pList, SOCKET sock, unsigned short port );
|
||||
|
||||
epicsShareFunc int epicsShareAPI addAddrToChannelAccessAddressList
|
||||
( struct ELLLIST *pList, const ENV_PARAM *pEnv,
|
||||
LIBCA_API int epicsStdCall addAddrToChannelAccessAddressList
|
||||
( struct ELLLIST *pList, const ENV_PARAM *pEnv,
|
||||
unsigned short port, int ignoreNonDefaultPort );
|
||||
|
||||
epicsShareFunc void epicsShareAPI printChannelAccessAddressList
|
||||
LIBCA_API void epicsStdCall printChannelAccessAddressList
|
||||
( const struct ELLLIST *pList );
|
||||
|
||||
epicsShareFunc void epicsShareAPI removeDuplicateAddresses
|
||||
LIBCA_API void epicsStdCall removeDuplicateAddresses
|
||||
( struct ELLLIST *pDestList, ELLLIST *pSrcList, int silent);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* ifndef addrListh */
|
||||
#endif /* ifndef INC_addrList_H */
|
||||
|
||||
|
||||
@@ -3,41 +3,32 @@
|
||||
* 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.
|
||||
* SPDX-License-Identifier: EPICS
|
||||
* EPICS BASE is distributed subject to a Software License Agreement found
|
||||
* in file LICENSE that is included with this distribution.
|
||||
\*************************************************************************/
|
||||
|
||||
/*
|
||||
/*
|
||||
*
|
||||
*
|
||||
*
|
||||
* L O S A L A M O S
|
||||
* Los Alamos National Laboratory
|
||||
* Los Alamos, New Mexico 87545
|
||||
*
|
||||
*
|
||||
* Copyright, The Regents of the University of California.
|
||||
*
|
||||
*
|
||||
* Author Jeffrey O. Hill
|
||||
* johill@lanl.gov
|
||||
* 505 665 1831
|
||||
*
|
||||
*
|
||||
* Author Jeffrey O. Hill
|
||||
* johill@lanl.gov
|
||||
* 505 665 1831
|
||||
*/
|
||||
|
||||
#ifndef autoPtrFreeListh
|
||||
#define autoPtrFreeListh
|
||||
|
||||
#ifdef epicsExportSharedSymbols
|
||||
# define autoPtrFreeListh_epicsExportSharedSymbols
|
||||
# undef epicsExportSharedSymbols
|
||||
#endif
|
||||
#ifndef INC_autoPtrFreeList_H
|
||||
#define INC_autoPtrFreeList_H
|
||||
|
||||
#include "tsFreeList.h"
|
||||
#include "compilerDependencies.h"
|
||||
|
||||
#ifdef autoPtrFreeListh_epicsExportSharedSymbols
|
||||
# define epicsExportSharedSymbols
|
||||
#endif
|
||||
|
||||
template < class T, unsigned N = 0x400, class MUTEX = epicsMutex >
|
||||
class autoPtrFreeList {
|
||||
public:
|
||||
@@ -56,7 +47,7 @@ private:
|
||||
};
|
||||
|
||||
template < class T, unsigned N, class MUTEX >
|
||||
inline autoPtrFreeList < T, N, MUTEX >::autoPtrFreeList (
|
||||
inline autoPtrFreeList < T, N, MUTEX >::autoPtrFreeList (
|
||||
tsFreeList < T, N, MUTEX > & freeListIn, T * pIn ) :
|
||||
p ( pIn ), freeList ( freeListIn ) {}
|
||||
|
||||
@@ -101,4 +92,4 @@ inline T * autoPtrFreeList < T, N, MUTEX >::release ()
|
||||
return pTmp;
|
||||
}
|
||||
|
||||
#endif // #ifdef autoPtrFreeListh
|
||||
#endif // #ifndef INC_autoPtrFreeList_H
|
||||
|
||||
@@ -3,24 +3,24 @@
|
||||
* 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.
|
||||
* SPDX-License-Identifier: EPICS
|
||||
* EPICS Base is distributed subject to a Software License Agreement found
|
||||
* in file LICENSE that is included with this distribution.
|
||||
\*************************************************************************/
|
||||
|
||||
/*
|
||||
/*
|
||||
*
|
||||
*
|
||||
*
|
||||
* L O S A L A M O S
|
||||
* Los Alamos National Laboratory
|
||||
* Los Alamos, New Mexico 87545
|
||||
*
|
||||
*
|
||||
* Copyright, The Regents of the University of California.
|
||||
*
|
||||
*
|
||||
* Author Jeffrey O. Hill
|
||||
* johill@lanl.gov
|
||||
* 505 665 1831
|
||||
*
|
||||
*
|
||||
* Author Jeffrey O. Hill
|
||||
* johill@lanl.gov
|
||||
* 505 665 1831
|
||||
*/
|
||||
|
||||
#ifndef autoPtrRecycleh
|
||||
@@ -29,7 +29,7 @@
|
||||
template < class T >
|
||||
class autoPtrRecycle {
|
||||
public:
|
||||
autoPtrRecycle (
|
||||
autoPtrRecycle (
|
||||
epicsGuard < epicsMutex > &, chronIntIdResTable < baseNMIU > &,
|
||||
cacRecycle &, T * );
|
||||
~autoPtrRecycle ();
|
||||
@@ -43,12 +43,12 @@ private:
|
||||
chronIntIdResTable < baseNMIU > & ioTable;
|
||||
epicsGuard < epicsMutex > & guard;
|
||||
// not implemented
|
||||
autoPtrRecycle ( const autoPtrRecycle & );
|
||||
autoPtrRecycle & operator = ( const autoPtrRecycle & );
|
||||
autoPtrRecycle ( const autoPtrRecycle & );
|
||||
autoPtrRecycle & operator = ( const autoPtrRecycle & );
|
||||
};
|
||||
|
||||
template < class T >
|
||||
inline autoPtrRecycle<T>::autoPtrRecycle (
|
||||
inline autoPtrRecycle<T>::autoPtrRecycle (
|
||||
epicsGuard < epicsMutex > & guardIn, chronIntIdResTable < baseNMIU > & tbl,
|
||||
cacRecycle & rIn, T * pIn ) :
|
||||
p ( pIn ), r ( rIn ), ioTable ( tbl ), guard ( guardIn ) {}
|
||||
|
||||
@@ -3,12 +3,12 @@
|
||||
* 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.
|
||||
* SPDX-License-Identifier: EPICS
|
||||
* EPICS BASE is distributed subject to a Software License Agreement found
|
||||
* in file LICENSE that is included with this distribution.
|
||||
\*************************************************************************/
|
||||
|
||||
/*
|
||||
/*
|
||||
*
|
||||
* L O S A L A M O S
|
||||
* Los Alamos National Laboratory
|
||||
|
||||
@@ -3,12 +3,12 @@
|
||||
* 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.
|
||||
* SPDX-License-Identifier: EPICS
|
||||
* EPICS BASE is distributed subject to a Software License Agreement found
|
||||
* in file LICENSE that is included with this distribution.
|
||||
\*************************************************************************/
|
||||
|
||||
/*
|
||||
|
||||
/*
|
||||
*
|
||||
* L O S A L A M O S
|
||||
* Los Alamos National Laboratory
|
||||
@@ -28,7 +28,6 @@
|
||||
|
||||
#include "errlog.h"
|
||||
|
||||
#define epicsExportSharedSymbols
|
||||
#include "iocinf.h"
|
||||
#include "virtualCircuit.h"
|
||||
#include "bhe.h"
|
||||
@@ -42,12 +41,12 @@
|
||||
* start up
|
||||
*
|
||||
* if creating this in response to a search reply
|
||||
* and not in response to a beacon then
|
||||
* and not in response to a beacon then
|
||||
* we set the beacon time stamp to
|
||||
* zero (so we can correctly compute the period
|
||||
* between the 1st and 2nd beacons)
|
||||
*/
|
||||
bhe::bhe ( epicsMutex & mutexIn, const epicsTime & initialTimeStamp,
|
||||
bhe::bhe ( epicsMutex & mutexIn, const epicsTime & initialTimeStamp,
|
||||
unsigned initialBeaconNumber, const inetAddrID & addr ) :
|
||||
inetAddrID ( addr ), timeStamp ( initialTimeStamp ), averagePeriod ( - DBL_MAX ),
|
||||
mutex ( mutexIn ), pIIU ( 0 ), lastBeaconNumber ( initialBeaconNumber )
|
||||
@@ -74,7 +73,7 @@ void bhe::beaconAnomalyNotify ( epicsGuard < epicsMutex > & guard )
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
void bhe::logBeacon ( const char * pDiagnostic,
|
||||
void bhe::logBeacon ( const char * pDiagnostic,
|
||||
const double & currentPeriod,
|
||||
const epicsTime & currentTime )
|
||||
{
|
||||
@@ -82,10 +81,10 @@ void bhe::logBeacon ( const char * pDiagnostic,
|
||||
char name[64];
|
||||
this->name ( name, sizeof ( name ) );
|
||||
char date[64];
|
||||
currentTime.strftime ( date, sizeof ( date ),
|
||||
currentTime.strftime ( date, sizeof ( date ),
|
||||
"%a %b %d %Y %H:%M:%S.%f");
|
||||
::printf ( "%s cp=%g ap=%g %s %s\n",
|
||||
pDiagnostic, currentPeriod,
|
||||
pDiagnostic, currentPeriod,
|
||||
this->averagePeriod, name, date );
|
||||
}
|
||||
}
|
||||
@@ -105,7 +104,7 @@ void bhe::logBeaconDiscard ( unsigned beaconAdvance,
|
||||
char name[64];
|
||||
this->name ( name, sizeof ( name ) );
|
||||
char date[64];
|
||||
currentTime.strftime ( date, sizeof ( date ),
|
||||
currentTime.strftime ( date, sizeof ( date ),
|
||||
"%a %b %d %Y %H:%M:%S.%f");
|
||||
::printf ( "bb %u %s %s\n",
|
||||
beaconAdvance, name, date );
|
||||
@@ -123,16 +122,16 @@ void bhe::logBeaconDiscard ( unsigned /* beaconAdvance */,
|
||||
*
|
||||
* updates beacon period, and looks for beacon anomalies
|
||||
*/
|
||||
bool bhe::updatePeriod (
|
||||
epicsGuard < epicsMutex > & guard, const epicsTime & programBeginTime,
|
||||
const epicsTime & currentTime, ca_uint32_t beaconNumber,
|
||||
bool bhe::updatePeriod (
|
||||
epicsGuard < epicsMutex > & guard, const epicsTime & programBeginTime,
|
||||
const epicsTime & currentTime, ca_uint32_t beaconNumber,
|
||||
unsigned protocolRevision )
|
||||
{
|
||||
guard.assertIdenticalMutex ( this->mutex );
|
||||
|
||||
//
|
||||
// this block is enetered if the beacon was created as a side effect of
|
||||
// creating a connection and so we dont yet know the first beacon time
|
||||
// creating a connection and so we dont yet know the first beacon time
|
||||
// and sequence number
|
||||
//
|
||||
if ( this->timeStamp == epicsTime () ) {
|
||||
@@ -142,7 +141,7 @@ bool bhe::updatePeriod (
|
||||
|
||||
this->beaconAnomalyNotify ( guard );
|
||||
|
||||
/*
|
||||
/*
|
||||
* this is the 1st beacon seen - the beacon time stamp
|
||||
* was not initialized during BHE create because
|
||||
* a TCP/IP connection created the beacon.
|
||||
@@ -167,15 +166,15 @@ bool bhe::updatePeriod (
|
||||
}
|
||||
this->lastBeaconNumber = beaconNumber;
|
||||
|
||||
// throw out sequence numbers just prior to, or the same as, the last one received
|
||||
// throw out sequence numbers just prior to, or the same as, the last one received
|
||||
// (this situation is probably caused by a temporary duplicate route )
|
||||
if ( beaconSeqAdvance == 0 || beaconSeqAdvance > ca_uint32_max - 256 ) {
|
||||
logBeaconDiscard ( beaconSeqAdvance, currentTime );
|
||||
return false;
|
||||
}
|
||||
|
||||
// throw out sequence numbers that jump forward by only a few numbers
|
||||
// (this situation is probably caused by a duplicate route
|
||||
// throw out sequence numbers that jump forward by only a few numbers
|
||||
// (this situation is probably caused by a duplicate route
|
||||
// or a beacon due to input queue overun)
|
||||
if ( beaconSeqAdvance > 1 && beaconSeqAdvance < 4 ) {
|
||||
logBeaconDiscard ( beaconSeqAdvance, currentTime );
|
||||
@@ -205,7 +204,7 @@ bool bhe::updatePeriod (
|
||||
/*
|
||||
* ignore beacons seen for the first time shortly after
|
||||
* init, but do not ignore beacons arriving with a short
|
||||
* period because the IOC was rebooted soon after the
|
||||
* period because the IOC was rebooted soon after the
|
||||
* client starts up.
|
||||
*/
|
||||
totalRunningTime = this->timeStamp - programBeginTime;
|
||||
@@ -217,24 +216,24 @@ bool bhe::updatePeriod (
|
||||
|
||||
/*
|
||||
* Is this an IOC seen because of a restored
|
||||
* network segment?
|
||||
* network segment?
|
||||
*
|
||||
* It may be possible to get false triggers here
|
||||
* It may be possible to get false triggers here
|
||||
* if the client is busy, but this does not cause
|
||||
* problems because the echo response will tell us
|
||||
* problems because the echo response will tell us
|
||||
* that the server is available
|
||||
*/
|
||||
if ( currentPeriod >= this->averagePeriod * 1.25 ) {
|
||||
|
||||
/*
|
||||
* trigger on any missing beacon
|
||||
/*
|
||||
* trigger on any missing beacon
|
||||
* if connected to this server
|
||||
*/
|
||||
*/
|
||||
this->beaconAnomalyNotify ( guard );
|
||||
|
||||
if ( currentPeriod >= this->averagePeriod * 3.25 ) {
|
||||
/*
|
||||
* trigger on any 3 contiguous missing beacons
|
||||
/*
|
||||
* trigger on any 3 contiguous missing beacons
|
||||
* if not connected to this server
|
||||
*/
|
||||
netChange = true;
|
||||
@@ -248,9 +247,9 @@ bool bhe::updatePeriod (
|
||||
* IOC reboots). Lower tolarance here because we
|
||||
* dont have to worry about lost beacons.
|
||||
*
|
||||
* It may be possible to get false triggers here
|
||||
* It may be possible to get false triggers here
|
||||
* if the client is busy, but this does not cause
|
||||
* problems because the echo response will tell us
|
||||
* problems because the echo response will tell us
|
||||
* that the server is available
|
||||
*/
|
||||
else if ( currentPeriod <= this->averagePeriod * 0.80 ) {
|
||||
@@ -259,14 +258,14 @@ bool bhe::updatePeriod (
|
||||
logBeacon ( "bal", currentPeriod, currentTime );
|
||||
}
|
||||
else if ( this->pIIU ) {
|
||||
// update state of health for active virtual circuits
|
||||
// update state of health for active virtual circuits
|
||||
// if the beacon looks ok
|
||||
this->pIIU->beaconArrivalNotify ( guard );
|
||||
logBeacon ( "vb", currentPeriod, currentTime );
|
||||
}
|
||||
|
||||
// update a running average period
|
||||
this->averagePeriod = currentPeriod * 0.125 +
|
||||
this->averagePeriod = currentPeriod * 0.125 +
|
||||
this->averagePeriod * 0.875;
|
||||
}
|
||||
|
||||
@@ -286,22 +285,22 @@ void bhe::show ( epicsGuard < epicsMutex > &, unsigned level ) const
|
||||
char host [64];
|
||||
this->name ( host, sizeof ( host ) );
|
||||
if ( this->averagePeriod == -DBL_MAX ) {
|
||||
::printf ( "CA beacon hash entry for %s <no period estimate>\n",
|
||||
::printf ( "CA beacon hash entry for %s <no period estimate>\n",
|
||||
host );
|
||||
}
|
||||
else {
|
||||
::printf ( "CA beacon hash entry for %s with period estimate %f\n",
|
||||
::printf ( "CA beacon hash entry for %s with period estimate %f\n",
|
||||
host, this->averagePeriod );
|
||||
}
|
||||
if ( level > 0u ) {
|
||||
char date[64];
|
||||
this->timeStamp.strftime ( date, sizeof ( date ), "%a %b %d %Y %H:%M:%S");
|
||||
::printf ( "\tbeacon number %u, on %s\n",
|
||||
::printf ( "\tbeacon number %u, on %s\n",
|
||||
this->lastBeaconNumber, date );
|
||||
}
|
||||
}
|
||||
|
||||
double bhe::period ( epicsGuard < epicsMutex > & guard ) const
|
||||
double bhe::period ( epicsGuard < epicsMutex > & guard ) const
|
||||
{
|
||||
guard.assertIdenticalMutex ( this->mutex );
|
||||
return this->averagePeriod;
|
||||
@@ -313,14 +312,14 @@ epicsTime bhe::updateTime ( epicsGuard < epicsMutex > & guard ) const
|
||||
return this->timeStamp;
|
||||
}
|
||||
|
||||
void bhe::registerIIU (
|
||||
void bhe::registerIIU (
|
||||
epicsGuard < epicsMutex > & guard, tcpiiu & iiu )
|
||||
{
|
||||
guard.assertIdenticalMutex ( this->mutex );
|
||||
this->pIIU = & iiu;
|
||||
}
|
||||
|
||||
void bhe::unregisterIIU (
|
||||
void bhe::unregisterIIU (
|
||||
epicsGuard < epicsMutex > & guard, tcpiiu & iiu )
|
||||
{
|
||||
guard.assertIdenticalMutex ( this->mutex );
|
||||
|
||||
@@ -3,12 +3,12 @@
|
||||
* 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.
|
||||
* SPDX-License-Identifier: EPICS
|
||||
* EPICS BASE is distributed subject to a Software License Agreement found
|
||||
* in file LICENSE that is included with this distribution.
|
||||
\*************************************************************************/
|
||||
|
||||
/*
|
||||
/*
|
||||
*
|
||||
* L O S A L A M O S
|
||||
* Los Alamos National Laboratory
|
||||
@@ -19,24 +19,15 @@
|
||||
* Author: Jeff Hill
|
||||
*/
|
||||
|
||||
#ifndef bheh
|
||||
#define bheh
|
||||
|
||||
#ifdef epicsExportSharedSymbols
|
||||
# define bhehEpicsExportSharedSymbols
|
||||
# undef epicsExportSharedSymbols
|
||||
#endif
|
||||
#ifndef INC_bhe_H
|
||||
#define INC_bhe_H
|
||||
|
||||
#include "tsDLList.h"
|
||||
#include "tsFreeList.h"
|
||||
#include "epicsTime.h"
|
||||
#include "compilerDependencies.h"
|
||||
|
||||
#ifdef bhehEpicsExportSharedSymbols
|
||||
# define epicsExportSharedSymbols
|
||||
# include "shareLib.h"
|
||||
#endif
|
||||
|
||||
#include "libCaAPI.h"
|
||||
#include "inetAddrID.h"
|
||||
#include "caProto.h"
|
||||
|
||||
@@ -45,7 +36,7 @@ class bheMemoryManager;
|
||||
|
||||
// using a pure abstract wrapper class around the free list avoids
|
||||
// Tornado 2.0.1 GNU compiler bugs
|
||||
class epicsShareClass bheMemoryManager {
|
||||
class LIBCA_API bheMemoryManager {
|
||||
public:
|
||||
virtual ~bheMemoryManager ();
|
||||
virtual void * allocate ( size_t ) = 0;
|
||||
@@ -54,24 +45,24 @@ public:
|
||||
|
||||
class bhe : public tsSLNode < bhe >, public inetAddrID {
|
||||
public:
|
||||
epicsShareFunc bhe (
|
||||
epicsMutex &, const epicsTime & initialTimeStamp,
|
||||
LIBCA_API bhe (
|
||||
epicsMutex &, const epicsTime & initialTimeStamp,
|
||||
unsigned initialBeaconNumber, const inetAddrID & addr );
|
||||
epicsShareFunc ~bhe ();
|
||||
epicsShareFunc bool updatePeriod (
|
||||
LIBCA_API ~bhe ();
|
||||
LIBCA_API bool updatePeriod (
|
||||
epicsGuard < epicsMutex > &,
|
||||
const epicsTime & programBeginTime,
|
||||
const epicsTime & currentTime, ca_uint32_t beaconNumber,
|
||||
const epicsTime & programBeginTime,
|
||||
const epicsTime & currentTime, ca_uint32_t beaconNumber,
|
||||
unsigned protocolRevision );
|
||||
epicsShareFunc double period ( epicsGuard < epicsMutex > & ) const;
|
||||
epicsShareFunc epicsTime updateTime ( epicsGuard < epicsMutex > & ) const;
|
||||
epicsShareFunc void show ( unsigned level ) const;
|
||||
epicsShareFunc void show ( epicsGuard < epicsMutex > &, unsigned /* level */ ) const;
|
||||
epicsShareFunc void registerIIU ( epicsGuard < epicsMutex > &, tcpiiu & );
|
||||
epicsShareFunc void unregisterIIU ( epicsGuard < epicsMutex > &, tcpiiu & );
|
||||
epicsShareFunc void * operator new ( size_t size, bheMemoryManager & );
|
||||
LIBCA_API double period ( epicsGuard < epicsMutex > & ) const;
|
||||
LIBCA_API epicsTime updateTime ( epicsGuard < epicsMutex > & ) const;
|
||||
LIBCA_API void show ( unsigned level ) const;
|
||||
LIBCA_API void show ( epicsGuard < epicsMutex > &, unsigned /* level */ ) const;
|
||||
LIBCA_API void registerIIU ( epicsGuard < epicsMutex > &, tcpiiu & );
|
||||
LIBCA_API void unregisterIIU ( epicsGuard < epicsMutex > &, tcpiiu & );
|
||||
LIBCA_API void * operator new ( size_t size, bheMemoryManager & );
|
||||
#ifdef CXX_PLACEMENT_DELETE
|
||||
epicsShareFunc void operator delete ( void *, bheMemoryManager & );
|
||||
LIBCA_API void operator delete ( void *, bheMemoryManager & );
|
||||
#endif
|
||||
private:
|
||||
epicsTime timeStamp;
|
||||
@@ -80,14 +71,14 @@ private:
|
||||
tcpiiu * pIIU;
|
||||
ca_uint32_t lastBeaconNumber;
|
||||
void beaconAnomalyNotify ( epicsGuard < epicsMutex > & );
|
||||
void logBeacon ( const char * pDiagnostic,
|
||||
void logBeacon ( const char * pDiagnostic,
|
||||
const double & currentPeriod,
|
||||
const epicsTime & currentTime );
|
||||
void logBeaconDiscard ( unsigned beaconAdvance,
|
||||
const epicsTime & currentTime );
|
||||
bhe ( const bhe & );
|
||||
bhe & operator = ( const bhe & );
|
||||
epicsShareFunc void operator delete ( void * );
|
||||
bhe ( const bhe & );
|
||||
bhe & operator = ( const bhe & );
|
||||
LIBCA_API void operator delete ( void * );
|
||||
};
|
||||
|
||||
// using a wrapper class around the free list avoids
|
||||
@@ -99,24 +90,24 @@ public:
|
||||
void release ( void * );
|
||||
private:
|
||||
tsFreeList < bhe, 0x100 > freeList;
|
||||
bheFreeStore ( const bheFreeStore & );
|
||||
bheFreeStore & operator = ( const bheFreeStore & );
|
||||
bheFreeStore ( const bheFreeStore & );
|
||||
bheFreeStore & operator = ( const bheFreeStore & );
|
||||
};
|
||||
|
||||
inline void * bhe::operator new ( size_t size,
|
||||
inline void * bhe::operator new ( size_t size,
|
||||
bheMemoryManager & mgr )
|
||||
{
|
||||
{
|
||||
return mgr.allocate ( size );
|
||||
}
|
||||
|
||||
#ifdef CXX_PLACEMENT_DELETE
|
||||
inline void bhe::operator delete ( void * pCadaver,
|
||||
inline void bhe::operator delete ( void * pCadaver,
|
||||
bheMemoryManager & mgr )
|
||||
{
|
||||
{
|
||||
mgr.release ( pCadaver );
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // ifdef bheh
|
||||
#endif // ifndef INC_bhe_H
|
||||
|
||||
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
* 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.
|
||||
* SPDX-License-Identifier: EPICS
|
||||
* EPICS BASE is distributed subject to a Software License Agreement found
|
||||
* in file LICENSE that is included with this distribution.
|
||||
\*************************************************************************/
|
||||
|
||||
#include <stdio.h>
|
||||
@@ -60,50 +60,50 @@ void caConnTest ( const char *pNameIn, unsigned channelCountIn, double delayIn )
|
||||
{
|
||||
unsigned iteration = 0u;
|
||||
int status;
|
||||
unsigned i;
|
||||
chid *pChans;
|
||||
unsigned i;
|
||||
chid *pChans;
|
||||
|
||||
channelCount = channelCountIn;
|
||||
|
||||
pChans = new chid [channelCount];
|
||||
|
||||
while ( 1 ) {
|
||||
|
||||
while ( 1 ) {
|
||||
connCount = 0u;
|
||||
subsequentConnect = false;
|
||||
begin = epicsTime::getCurrent ();
|
||||
|
||||
printf ( "initializing CA client library\n" );
|
||||
|
||||
status = ca_task_initialize();
|
||||
SEVCHK ( status, "CA init failed" );
|
||||
status = ca_task_initialize();
|
||||
SEVCHK ( status, "CA init failed" );
|
||||
|
||||
printf ( "creating channels\n" );
|
||||
|
||||
for ( i = 0u; i < channelCount; i++ ) {
|
||||
status = ca_search_and_connect ( pNameIn,
|
||||
for ( i = 0u; i < channelCount; i++ ) {
|
||||
status = ca_search_and_connect ( pNameIn,
|
||||
&pChans[i], caConnTestConnHandler, 0 );
|
||||
SEVCHK ( status, "CA search problems" );
|
||||
}
|
||||
SEVCHK ( status, "CA search problems" );
|
||||
}
|
||||
|
||||
printf ( "all channels were created\n" );
|
||||
|
||||
ca_pend_event ( delayIn );
|
||||
ca_pend_event ( delayIn );
|
||||
|
||||
if ( iteration & 1 ) {
|
||||
for ( i = 0u; i < channelCount; i++ ) {
|
||||
status = ca_clear_channel ( pChans[i] );
|
||||
SEVCHK ( status, "ca_clear_channel() problems" );
|
||||
}
|
||||
for ( i = 0u; i < channelCount; i++ ) {
|
||||
status = ca_clear_channel ( pChans[i] );
|
||||
SEVCHK ( status, "ca_clear_channel() problems" );
|
||||
}
|
||||
printf ( "all channels were destroyed\n" );
|
||||
}
|
||||
|
||||
printf ( "shutting down CA client library\n" );
|
||||
|
||||
status = ca_task_exit ();
|
||||
SEVCHK ( status, "task exit problems" );
|
||||
status = ca_task_exit ();
|
||||
SEVCHK ( status, "task exit problems" );
|
||||
|
||||
iteration++;
|
||||
}
|
||||
}
|
||||
|
||||
//delete [] pChans;
|
||||
}
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
* 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.
|
||||
* SPDX-License-Identifier: EPICS
|
||||
* EPICS BASE is distributed subject to a Software License Agreement found
|
||||
* in file LICENSE that is included with this distribution.
|
||||
\*************************************************************************/
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
@@ -3,13 +3,13 @@
|
||||
* 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.
|
||||
* SPDX-License-Identifier: EPICS
|
||||
* EPICS BASE is distributed subject to a Software License Agreement found
|
||||
* in file LICENSE that is included with this distribution.
|
||||
\*************************************************************************/
|
||||
|
||||
#ifndef caDiagnosticsh
|
||||
#define caDiagnosticsh
|
||||
#ifndef INC_caDiagnostics_H
|
||||
#define INC_caDiagnostics_H
|
||||
|
||||
#include "cadef.h"
|
||||
|
||||
@@ -20,8 +20,8 @@ extern "C" {
|
||||
enum appendNumberFlag {appendNumber, dontAppendNumber};
|
||||
int catime ( const char *channelName, unsigned channelCount, enum appendNumberFlag appNF );
|
||||
|
||||
int acctst ( const char *pname, unsigned logggingInterestLevel,
|
||||
unsigned channelCount, unsigned repetitionCount,
|
||||
int acctst ( const char *pname, unsigned logggingInterestLevel,
|
||||
unsigned channelCount, unsigned repetitionCount,
|
||||
enum ca_preemptive_callback_select select );
|
||||
|
||||
#define CATIME_OK 0
|
||||
@@ -33,6 +33,6 @@ int acctst ( const char *pname, unsigned logggingInterestLevel,
|
||||
|
||||
void caConnTest ( const char *pNameIn, unsigned channelCountIn, double delayIn );
|
||||
|
||||
#endif /* caDiagnosticsh */
|
||||
#endif /* ifndef INC_caDiagnostics_H */
|
||||
|
||||
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
* 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.
|
||||
* SPDX-License-Identifier: EPICS
|
||||
* EPICS BASE is distributed subject to a Software License Agreement found
|
||||
* in file LICENSE that is included with this distribution.
|
||||
\*************************************************************************/
|
||||
|
||||
#include <stdio.h>
|
||||
@@ -38,50 +38,50 @@ void caEventRate ( const char *pName, unsigned count )
|
||||
chid * pChidTable = new chid [ count ];
|
||||
|
||||
{
|
||||
printf ( "Connecting to CA Channel \"%s\" %u times.",
|
||||
printf ( "Connecting to CA Channel \"%s\" %u times.",
|
||||
pName, count );
|
||||
fflush ( stdout );
|
||||
|
||||
|
||||
epicsTime begin = epicsTime::getCurrent ();
|
||||
for ( unsigned i = 0u; i < count; i++ ) {
|
||||
int status = ca_search ( pName, & pChidTable[i] );
|
||||
SEVCHK ( status, NULL );
|
||||
}
|
||||
|
||||
|
||||
int status = ca_pend_io ( 10000.0 );
|
||||
if ( status != ECA_NORMAL ) {
|
||||
fprintf ( stderr, " not found.\n" );
|
||||
return;
|
||||
}
|
||||
epicsTime end = epicsTime::getCurrent ();
|
||||
|
||||
|
||||
printf ( " done(%f sec).\n", end - begin );
|
||||
}
|
||||
|
||||
{
|
||||
printf ( "Subscribing %u times.", count );
|
||||
fflush ( stdout );
|
||||
|
||||
|
||||
epicsTime begin = epicsTime::getCurrent ();
|
||||
for ( unsigned i = 0u; i < count; i++ ) {
|
||||
int addEventStatus = ca_add_event ( DBR_FLOAT,
|
||||
int addEventStatus = ca_add_event ( DBR_FLOAT,
|
||||
pChidTable[i], eventCallBack, &eventCount, NULL);
|
||||
SEVCHK ( addEventStatus, __FILE__ );
|
||||
}
|
||||
|
||||
|
||||
int status = ca_flush_io ();
|
||||
SEVCHK ( status, __FILE__ );
|
||||
|
||||
|
||||
epicsTime end = epicsTime::getCurrent ();
|
||||
|
||||
|
||||
printf ( " done(%f sec).\n", end - begin );
|
||||
}
|
||||
|
||||
|
||||
{
|
||||
printf ( "Waiting for initial value events." );
|
||||
fflush ( stdout );
|
||||
|
||||
// let the first one go by
|
||||
|
||||
// let the first one go by
|
||||
epicsTime begin = epicsTime::getCurrent ();
|
||||
while ( eventCount < count ) {
|
||||
int status = ca_pend_event ( 0.01 );
|
||||
@@ -90,7 +90,7 @@ void caEventRate ( const char *pName, unsigned count )
|
||||
}
|
||||
}
|
||||
epicsTime end = epicsTime::getCurrent ();
|
||||
|
||||
|
||||
printf ( " done(%f sec).\n", end - begin );
|
||||
}
|
||||
|
||||
@@ -128,7 +128,7 @@ void caEventRate ( const char *pName, unsigned count )
|
||||
double mean = X / N;
|
||||
double stdDev = sqrt ( XX / N - mean * mean );
|
||||
|
||||
printf ( "CA Event Rate (Hz): current %g mean %g std dev %g\n",
|
||||
printf ( "CA Event Rate (Hz): current %g mean %g std dev %g\n",
|
||||
Hz, mean, stdDev );
|
||||
|
||||
if ( samplePeriod < maxSamplePeriod ) {
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
* 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.
|
||||
* SPDX-License-Identifier: EPICS
|
||||
* EPICS BASE is distributed subject to a Software License Agreement found
|
||||
* in file LICENSE that is included with this distribution.
|
||||
\*************************************************************************/
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
* 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.
|
||||
* SPDX-License-Identifier: EPICS
|
||||
* EPICS BASE is distributed subject to a Software License Agreement found
|
||||
* in file LICENSE that is included with this distribution.
|
||||
\*************************************************************************/
|
||||
/*
|
||||
*
|
||||
@@ -14,15 +14,15 @@
|
||||
* 505 665 1831
|
||||
*/
|
||||
|
||||
#ifndef __CAPROTO__
|
||||
#define __CAPROTO__
|
||||
#ifndef INC_caProto_H
|
||||
#define INC_caProto_H
|
||||
|
||||
#define capStrOf(A) #A
|
||||
#define capStrOfX(A) capStrOf ( A )
|
||||
|
||||
/*
|
||||
/*
|
||||
* CA protocol revision
|
||||
* TCP/UDP port number (bumped each major protocol change)
|
||||
* TCP/UDP port number (bumped each major protocol change)
|
||||
*/
|
||||
#define CA_MAJOR_PROTOCOL_REVISION 4
|
||||
#define CA_VERSION_STRING( MINOR_REVISION ) \
|
||||
@@ -30,7 +30,7 @@
|
||||
#define CA_UKN_MINOR_VERSION 0u /* unknown minor version */
|
||||
#define CA_MINIMUM_SUPPORTED_VERSION 4u
|
||||
# define CA_VSUPPORTED(MINOR) ((MINOR)>=CA_MINIMUM_SUPPORTED_VERSION)
|
||||
# define CA_V41(MINOR) ((MINOR)>=1u)
|
||||
# define CA_V41(MINOR) ((MINOR)>=1u)
|
||||
# define CA_V42(MINOR) ((MINOR)>=2u)
|
||||
# define CA_V43(MINOR) ((MINOR)>=3u)
|
||||
# define CA_V44(MINOR) ((MINOR)>=4u)
|
||||
@@ -45,8 +45,8 @@
|
||||
# define CA_V413(MINOR) ((MINOR)>=13u) /* Allow zero length in requests. */
|
||||
|
||||
/*
|
||||
* These port numbers are only used if the CA repeater and
|
||||
* CA server port numbers cant be obtained from the EPICS
|
||||
* These port numbers are only used if the CA repeater and
|
||||
* CA server port numbers cant be obtained from the EPICS
|
||||
* environment variables "EPICS_CA_REPEATER_PORT" and
|
||||
* "EPICS_CA_SERVER_PORT"
|
||||
*/
|
||||
@@ -54,8 +54,8 @@
|
||||
#define CA_SERVER_PORT (CA_PORT_BASE+CA_MAJOR_PROTOCOL_REVISION*2u)
|
||||
#define CA_REPEATER_PORT (CA_PORT_BASE+CA_MAJOR_PROTOCOL_REVISION*2u+1u)
|
||||
|
||||
/*
|
||||
* 1500 (max of ethernet and 802.{2,3} MTU) - 20(IP) - 8(UDP)
|
||||
/*
|
||||
* 1500 (max of ethernet and 802.{2,3} MTU) - 20(IP) - 8(UDP)
|
||||
* (the MTU of Ethernet is currently independent of its speed varient)
|
||||
*/
|
||||
#define ETHERNET_MAX_UDP ( 1500u - 20u - 8u )
|
||||
@@ -89,10 +89,10 @@ typedef ca_uint32_t caResId;
|
||||
#define CA_PROTO_SNAPSHOT 5u /* snapshot of the system */
|
||||
#define CA_PROTO_SEARCH 6u /* IOC channel search */
|
||||
#define CA_PROTO_BUILD 7u /* build - obsolete */
|
||||
#define CA_PROTO_EVENTS_OFF 8u /* flow control */
|
||||
#define CA_PROTO_EVENTS_ON 9u /* flow control */
|
||||
#define CA_PROTO_READ_SYNC 10u /* purge old reads */
|
||||
#define CA_PROTO_ERROR 11u /* an operation failed */
|
||||
#define CA_PROTO_EVENTS_OFF 8u /* flow control */
|
||||
#define CA_PROTO_EVENTS_ON 9u /* flow control */
|
||||
#define CA_PROTO_READ_SYNC 10u /* purge old reads */
|
||||
#define CA_PROTO_ERROR 11u /* an operation failed */
|
||||
#define CA_PROTO_CLEAR_CHANNEL 12u /* free chan resources */
|
||||
#define CA_PROTO_RSRV_IS_UP 13u /* CA server has joined the net */
|
||||
#define CA_PROTO_NOT_FOUND 14u /* channel not found */
|
||||
@@ -172,7 +172,7 @@ typedef struct ca_hdr {
|
||||
*/
|
||||
struct mon_info {
|
||||
ca_float32_t m_lval; /* low delta */
|
||||
ca_float32_t m_hval; /* high delta */
|
||||
ca_float32_t m_hval; /* high delta */
|
||||
ca_float32_t m_toval; /* period btween samples */
|
||||
ca_uint16_t m_mask; /* event select mask */
|
||||
ca_uint16_t m_pad; /* extend to 32 bits */
|
||||
@@ -183,5 +183,5 @@ struct mon_info {
|
||||
*/
|
||||
#define unreasonablePVNameSize 500u
|
||||
|
||||
#endif /* __CAPROTO__ */
|
||||
#endif /* ifndef INC_caProto_H */
|
||||
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
* 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.
|
||||
* SPDX-License-Identifier: EPICS
|
||||
* EPICS BASE is distributed subject to a Software License Agreement found
|
||||
* in file LICENSE that is included with this distribution.
|
||||
\*************************************************************************/
|
||||
/*
|
||||
*
|
||||
@@ -31,12 +31,65 @@
|
||||
|
||||
#define epicsAssertAuthor "Jeff Hill johill@lanl.gov"
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#if !defined(_WIN32) && !defined(__rtems__) && !defined(vxWorks)
|
||||
# include <sys/types.h>
|
||||
# include <sys/stat.h>
|
||||
# include <fcntl.h>
|
||||
#define CAN_DETACH_STDINOUT
|
||||
#endif
|
||||
|
||||
#include "epicsAssert.h"
|
||||
#include "osiUnistd.h"
|
||||
#include "epicsGetopt.h"
|
||||
#include "udpiiu.h"
|
||||
|
||||
int main()
|
||||
static void usage(char* argv[])
|
||||
{
|
||||
fprintf(stderr, "Usage: %s -hv\n"
|
||||
"\n"
|
||||
" -h - Print this message\n"
|
||||
" -v - Do not replace stdin/out/err with /dev/null\n",
|
||||
argv[0]);
|
||||
}
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
bool detachinout = true;
|
||||
|
||||
int opt;
|
||||
while ((opt = getopt(argc, argv, "hv")) != -1) {
|
||||
switch (opt) {
|
||||
default:
|
||||
usage(argv);
|
||||
fprintf(stderr, "\nUnknown argument '%c'\n", opt);
|
||||
return 1;
|
||||
case 'h':
|
||||
usage(argv);
|
||||
return 0;
|
||||
case 'v':
|
||||
detachinout = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef CAN_DETACH_STDINOUT
|
||||
if(detachinout) {
|
||||
int readfd = open("/dev/null", O_RDONLY);
|
||||
int writefd = open("/dev/null", O_WRONLY);
|
||||
|
||||
dup2(readfd, 0);
|
||||
dup2(writefd, 1);
|
||||
dup2(writefd, 2);
|
||||
|
||||
close(readfd);
|
||||
close(writefd);
|
||||
}
|
||||
#else
|
||||
(void)detachinout;
|
||||
#endif
|
||||
|
||||
chdir ( "/" );
|
||||
ca_repeater ();
|
||||
return ( 0 );
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
* 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.
|
||||
* SPDX-License-Identifier: EPICS
|
||||
* EPICS BASE is distributed subject to a Software License Agreement found
|
||||
* in file LICENSE that is included with this distribution.
|
||||
\*************************************************************************/
|
||||
/*
|
||||
*
|
||||
@@ -18,8 +18,8 @@
|
||||
* Author: Jeff Hill
|
||||
*/
|
||||
|
||||
#ifndef caServerIDh
|
||||
#define caServerIDh
|
||||
#ifndef INC_caServerID_H
|
||||
#define INC_caServerID_H
|
||||
|
||||
#include "osiSock.h"
|
||||
#include "resourceLib.h"
|
||||
@@ -37,7 +37,7 @@ private:
|
||||
ca_uint8_t pri;
|
||||
};
|
||||
|
||||
inline caServerID::caServerID (
|
||||
inline caServerID::caServerID (
|
||||
const struct sockaddr_in & addrIn, unsigned priorityIn ) :
|
||||
addr ( addrIn ), pri ( static_cast <ca_uint8_t> ( priorityIn ) )
|
||||
{
|
||||
@@ -46,7 +46,7 @@ inline caServerID::caServerID (
|
||||
|
||||
inline bool caServerID::operator == ( const caServerID & rhs ) const
|
||||
{
|
||||
if ( this->addr.sin_addr.s_addr == rhs.addr.sin_addr.s_addr &&
|
||||
if ( this->addr.sin_addr.s_addr == rhs.addr.sin_addr.s_addr &&
|
||||
this->addr.sin_port == rhs.addr.sin_port &&
|
||||
this->pri == rhs.pri ) {
|
||||
return true;
|
||||
@@ -67,7 +67,7 @@ inline resTableIndex caServerID::hash () const
|
||||
index ^= this->addr.sin_port;
|
||||
index ^= this->addr.sin_port >> 8u;
|
||||
index ^= this->pri;
|
||||
return integerHash ( caServerMinIndexBitWidth,
|
||||
return integerHash ( caServerMinIndexBitWidth,
|
||||
caServerMaxIndexBitWidth, index );
|
||||
}
|
||||
|
||||
@@ -83,6 +83,4 @@ inline unsigned caServerID::priority () const
|
||||
return this->pri;
|
||||
}
|
||||
|
||||
#endif // ifdef caServerID
|
||||
|
||||
|
||||
#endif // ifdef INC_caServerID_H
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
/*************************************************************************\
|
||||
* Copyright (c) 2017 UChicago Argonne LLC, as Operator of Argonne
|
||||
* National Laboratory.
|
||||
* EPICS BASE is distributed subject to a Software License Agreement found
|
||||
* in file LICENSE that is included with this distribution.
|
||||
\*************************************************************************/
|
||||
|
||||
#ifndef CAVERSION_H
|
||||
#define CAVERSION_H
|
||||
|
||||
#include <epicsVersion.h>
|
||||
#include <shareLib.h>
|
||||
|
||||
#ifndef VERSION_INT
|
||||
# define VERSION_INT(V,R,M,P) ( ((V)<<24) | ((R)<<16) | ((M)<<8) | (P))
|
||||
#endif
|
||||
|
||||
/* include generated headers with:
|
||||
* EPICS_CA_MAJOR_VERSION
|
||||
* EPICS_CA_MINOR_VERSION
|
||||
* EPICS_CA_MAINTENANCE_VERSION
|
||||
* EPICS_CA_DEVELOPMENT_FLAG
|
||||
*/
|
||||
#include "caVersionNum.h"
|
||||
|
||||
#define CA_VERSION_INT VERSION_INT(EPICS_CA_MAJOR_VERSION, EPICS_CA_MINOR_VERSION, EPICS_CA_MAINTENANCE_VERSION, 0)
|
||||
|
||||
#endif // CAVERSION_H
|
||||
22
modules/ca/src/client/caVersion.h@
Normal file
22
modules/ca/src/client/caVersion.h@
Normal file
@@ -0,0 +1,22 @@
|
||||
/*************************************************************************\
|
||||
* Copyright (c) 2017 UChicago Argonne LLC, as Operator of Argonne
|
||||
* National Laboratory.
|
||||
* SPDX-License-Identifier: EPICS
|
||||
* EPICS BASE is distributed subject to a Software License Agreement found
|
||||
* in file LICENSE that is included with this distribution.
|
||||
\*************************************************************************/
|
||||
|
||||
#ifndef INC_caVersion_H
|
||||
#define INC_caVersion_H
|
||||
|
||||
#define EPICS_CA_MAJOR_VERSION @EPICS_CA_MAJOR_VERSION@
|
||||
#define EPICS_CA_MINOR_VERSION @EPICS_CA_MINOR_VERSION@
|
||||
#define EPICS_CA_MAINTENANCE_VERSION @EPICS_CA_MAINTENANCE_VERSION@
|
||||
#define EPICS_CA_DEVELOPMENT_FLAG @EPICS_CA_DEVELOPMENT_FLAG@
|
||||
|
||||
#include <epicsVersion.h>
|
||||
|
||||
#define CA_VERSION_INT VERSION_INT(EPICS_CA_MAJOR_VERSION, \
|
||||
EPICS_CA_MINOR_VERSION, EPICS_CA_MAINTENANCE_VERSION, 0)
|
||||
|
||||
#endif /* INC_caVersion_H */
|
||||
@@ -1,7 +0,0 @@
|
||||
#ifndef CAVERSION_H
|
||||
# error include caVersion.h, not this header
|
||||
#endif
|
||||
#define EPICS_CA_MAJOR_VERSION @EPICS_CA_MAJOR_VERSION@
|
||||
#define EPICS_CA_MINOR_VERSION @EPICS_CA_MINOR_VERSION@
|
||||
#define EPICS_CA_MAINTENANCE_VERSION @EPICS_CA_MAINTENANCE_VERSION@
|
||||
#define EPICS_CA_DEVELOPMENT_FLAG @EPICS_CA_DEVELOPMENT_FLAG@
|
||||
@@ -3,6 +3,7 @@
|
||||
* National Laboratory.
|
||||
* Copyright (c) 2002 The Regents of the University of California, as
|
||||
* Operator of Los Alamos National Laboratory.
|
||||
* SPDX-License-Identifier: EPICS
|
||||
* EPICS BASE is distributed subject to a Software License Agreement found
|
||||
* in file LICENSE that is included with this distribution.
|
||||
\*************************************************************************/
|
||||
@@ -17,9 +18,9 @@
|
||||
* Copyright, 1986, The Regents of the University of California.
|
||||
*
|
||||
*
|
||||
* Author Jeffrey O. Hill
|
||||
* johill@lanl.gov
|
||||
* 505 665 1831
|
||||
* Author Jeffrey O. Hill
|
||||
* johill@lanl.gov
|
||||
* 505 665 1831
|
||||
*/
|
||||
|
||||
#ifdef _MSC_VER
|
||||
@@ -34,12 +35,11 @@
|
||||
#include "errlog.h"
|
||||
#include "locationException.h"
|
||||
|
||||
#define epicsExportSharedSymbols
|
||||
#include "iocinf.h"
|
||||
#include "oldAccess.h"
|
||||
#include "cac.h"
|
||||
|
||||
epicsShareDef epicsThreadPrivateId caClientCallbackThreadId;
|
||||
epicsThreadPrivateId caClientCallbackThreadId;
|
||||
|
||||
static epicsThreadOnceId cacOnce = EPICS_THREAD_ONCE_INIT;
|
||||
|
||||
@@ -475,7 +475,7 @@ int ca_client_context::pendIO ( const double & timeout )
|
||||
}
|
||||
|
||||
int status = ECA_NORMAL;
|
||||
epicsTime beg_time = epicsTime::getMonotonic ();
|
||||
epicsTime beg_time = epicsTime::getCurrent ();
|
||||
double remaining = timeout;
|
||||
|
||||
epicsGuard < epicsMutex > guard ( this->mutex );
|
||||
@@ -493,7 +493,7 @@ int ca_client_context::pendIO ( const double & timeout )
|
||||
this->blockForEventAndEnableCallbacks ( this->ioDone, remaining );
|
||||
}
|
||||
|
||||
double delay = epicsTime::getMonotonic () - beg_time;
|
||||
double delay = epicsTime::getCurrent () - beg_time;
|
||||
if ( delay < timeout ) {
|
||||
remaining = timeout - delay;
|
||||
}
|
||||
@@ -522,7 +522,7 @@ int ca_client_context::pendEvent ( const double & timeout )
|
||||
return ECA_EVDISALLOW;
|
||||
}
|
||||
|
||||
epicsTime current = epicsTime::getMonotonic ();
|
||||
epicsTime current = epicsTime::getCurrent ();
|
||||
|
||||
{
|
||||
epicsGuard < epicsMutex > guard ( this->mutex );
|
||||
@@ -563,7 +563,7 @@ int ca_client_context::pendEvent ( const double & timeout )
|
||||
this->noWakeupSincePend = true;
|
||||
}
|
||||
|
||||
double elapsed = epicsTime::getMonotonic() - current;
|
||||
double elapsed = epicsTime::getCurrent() - current;
|
||||
double delay;
|
||||
|
||||
if ( timeout > elapsed ) {
|
||||
@@ -736,12 +736,12 @@ void ca_client_context::installDefaultService ( cacService & service )
|
||||
ca_client_context::pDefaultService = & service;
|
||||
}
|
||||
|
||||
void epicsShareAPI caInstallDefaultService ( cacService & service )
|
||||
void epicsStdCall caInstallDefaultService ( cacService & service )
|
||||
{
|
||||
ca_client_context::installDefaultService ( service );
|
||||
}
|
||||
|
||||
epicsShareFunc int epicsShareAPI ca_clear_subscription ( evid pMon )
|
||||
LIBCA_API int epicsStdCall ca_clear_subscription ( evid pMon )
|
||||
{
|
||||
oldChannelNotify & chan = pMon->channel ();
|
||||
ca_client_context & cac = chan.getClientCtx ();
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
* National Laboratory.
|
||||
* Copyright (c) 2002 The Regents of the University of California, as
|
||||
* Operator of Los Alamos National Laboratory.
|
||||
* SPDX-License-Identifier: EPICS
|
||||
* EPICS BASE is distributed subject to a Software License Agreement found
|
||||
* in file LICENSE that is included with this distribution.
|
||||
\*************************************************************************/
|
||||
@@ -34,7 +35,6 @@
|
||||
#include "errlog.h"
|
||||
#include "epicsExport.h"
|
||||
|
||||
#define epicsExportSharedSymbols
|
||||
#include "addrList.h"
|
||||
#include "iocinf.h"
|
||||
#include "cac.h"
|
||||
@@ -53,7 +53,7 @@
|
||||
|
||||
static const char pVersionCAC[] =
|
||||
"@(#) " EPICS_VERSION_STRING
|
||||
", CA Client Library " __DATE__;
|
||||
", CA Client Library";
|
||||
|
||||
// TCP response dispatch table
|
||||
const cac::pProtoStubTCP cac::tcpJumpTableCAC [] =
|
||||
@@ -130,7 +130,7 @@ cac::cac (
|
||||
epicsMutex & callbackControlIn,
|
||||
cacContextNotify & notifyIn ) :
|
||||
_refLocalHostName ( localHostNameCache.getReference () ),
|
||||
programBeginTime ( epicsTime::getMonotonic() ),
|
||||
programBeginTime ( epicsTime::getCurrent() ),
|
||||
connTMO ( CA_CONN_VERIFY_PERIOD ),
|
||||
mutex ( mutualExclusionIn ),
|
||||
cbMutex ( callbackControlIn ),
|
||||
@@ -155,7 +155,7 @@ cac::cac (
|
||||
}
|
||||
|
||||
try {
|
||||
long status;
|
||||
long status;
|
||||
|
||||
/*
|
||||
* Certain os, such as HPUX, do not unblock a socket system call
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
* National Laboratory.
|
||||
* Copyright (c) 2002 The Regents of the University of California, as
|
||||
* Operator of Los Alamos National Laboratory.
|
||||
* SPDX-License-Identifier: EPICS
|
||||
* EPICS BASE is distributed subject to a Software License Agreement found
|
||||
* in file LICENSE that is included with this distribution.
|
||||
\*************************************************************************/
|
||||
@@ -19,13 +20,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef cach
|
||||
#define cach
|
||||
|
||||
#ifdef epicsExportSharedSymbols
|
||||
# define cach_restore_epicsExportSharedSymbols
|
||||
# undef epicsExportSharedSymbols
|
||||
#endif
|
||||
#ifndef INC_cac_H
|
||||
#define INC_cac_H
|
||||
|
||||
#include "compilerDependencies.h"
|
||||
#include "ipAddrToAsciiAsynchronous.h"
|
||||
@@ -35,11 +31,7 @@
|
||||
#include "freeList.h"
|
||||
#include "localHostName.h"
|
||||
|
||||
#ifdef cach_restore_epicsExportSharedSymbols
|
||||
# define epicsExportSharedSymbols
|
||||
# include "shareLib.h"
|
||||
#endif
|
||||
|
||||
#include "libCaAPI.h"
|
||||
#include "nciu.h"
|
||||
#include "comBuf.h"
|
||||
#include "bhe.h"
|
||||
@@ -81,8 +73,8 @@ public:
|
||||
void release ( void * );
|
||||
private:
|
||||
tsFreeList < comBuf, 0x20 > freeList;
|
||||
cacComBufMemoryManager ( const cacComBufMemoryManager & );
|
||||
cacComBufMemoryManager & operator = ( const cacComBufMemoryManager & );
|
||||
cacComBufMemoryManager ( const cacComBufMemoryManager & );
|
||||
cacComBufMemoryManager & operator = ( const cacComBufMemoryManager & );
|
||||
};
|
||||
|
||||
class notifyGuard {
|
||||
@@ -348,8 +340,8 @@ private:
|
||||
const char *pCtx, unsigned status );
|
||||
static const pExcepProtoStubTCP tcpExcepJumpTableCAC [];
|
||||
|
||||
cac ( const cac & );
|
||||
cac & operator = ( const cac & );
|
||||
cac ( const cac & );
|
||||
cac & operator = ( const cac & );
|
||||
|
||||
friend class tcpiiu;
|
||||
};
|
||||
@@ -432,4 +424,4 @@ inline double cac ::
|
||||
return this->connTMO;
|
||||
}
|
||||
|
||||
#endif // ifdef cach
|
||||
#endif // ifndef INC_cac_H
|
||||
|
||||
@@ -3,13 +3,13 @@
|
||||
* 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.
|
||||
* SPDX-License-Identifier: EPICS
|
||||
* EPICS BASE is distributed subject to a Software License Agreement found
|
||||
* in file LICENSE that is included with this distribution.
|
||||
\*************************************************************************/
|
||||
|
||||
|
||||
/*
|
||||
/*
|
||||
*
|
||||
* L O S A L A M O S
|
||||
* Los Alamos National Laboratory
|
||||
@@ -27,7 +27,6 @@
|
||||
|
||||
#include "errlog.h"
|
||||
|
||||
#define epicsExportSharedSymbols
|
||||
#include "iocinf.h"
|
||||
#include "localHostName.h"
|
||||
#include "cacIO.h"
|
||||
@@ -41,7 +40,7 @@ private:
|
||||
epicsSingleton < localHostName > :: reference
|
||||
_refLocalHostName;
|
||||
};
|
||||
|
||||
|
||||
static epicsThreadOnceId cacChannelIdOnce = EPICS_THREAD_ONCE_INIT;
|
||||
|
||||
const cacChannel::priLev cacChannel::priorityMax = 99u;
|
||||
@@ -55,63 +54,63 @@ cacChannel::~cacChannel ()
|
||||
{
|
||||
}
|
||||
|
||||
caAccessRights cacChannel::accessRights (
|
||||
epicsGuard < epicsMutex > & ) const
|
||||
caAccessRights cacChannel::accessRights (
|
||||
epicsGuard < epicsMutex > & ) const
|
||||
{
|
||||
static caAccessRights ar ( true, true );
|
||||
return ar;
|
||||
}
|
||||
|
||||
unsigned cacChannel::searchAttempts (
|
||||
epicsGuard < epicsMutex > & ) const
|
||||
unsigned cacChannel::searchAttempts (
|
||||
epicsGuard < epicsMutex > & ) const
|
||||
{
|
||||
return 0u;
|
||||
}
|
||||
|
||||
double cacChannel::beaconPeriod (
|
||||
epicsGuard < epicsMutex > & ) const
|
||||
double cacChannel::beaconPeriod (
|
||||
epicsGuard < epicsMutex > & ) const
|
||||
{
|
||||
return - DBL_MAX;
|
||||
}
|
||||
|
||||
double cacChannel::receiveWatchdogDelay (
|
||||
double cacChannel::receiveWatchdogDelay (
|
||||
epicsGuard < epicsMutex > & ) const
|
||||
{
|
||||
return - DBL_MAX;
|
||||
}
|
||||
|
||||
bool cacChannel::ca_v42_ok (
|
||||
epicsGuard < epicsMutex > & ) const
|
||||
epicsGuard < epicsMutex > & ) const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
bool cacChannel::connected (
|
||||
epicsGuard < epicsMutex > & ) const
|
||||
epicsGuard < epicsMutex > & ) const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
CACChannelPrivate ::
|
||||
CACChannelPrivate ::
|
||||
CACChannelPrivate() :
|
||||
_refLocalHostName ( localHostNameCache.getReference () )
|
||||
{
|
||||
}
|
||||
|
||||
inline unsigned CACChannelPrivate ::
|
||||
inline unsigned CACChannelPrivate ::
|
||||
getHostName ( char * pBuf, unsigned bufLength )
|
||||
{
|
||||
return _refLocalHostName->getName ( pBuf, bufLength );
|
||||
}
|
||||
|
||||
inline const char * CACChannelPrivate ::
|
||||
|
||||
inline const char * CACChannelPrivate ::
|
||||
pHostName ()
|
||||
{
|
||||
return _refLocalHostName->pointer ();
|
||||
}
|
||||
|
||||
static CACChannelPrivate * pCACChannelPrivate = 0;
|
||||
|
||||
|
||||
// runs once only for each process
|
||||
extern "C" void cacChannelSetup ( void * )
|
||||
{
|
||||
@@ -119,7 +118,7 @@ extern "C" void cacChannelSetup ( void * )
|
||||
}
|
||||
|
||||
// the default is to assume that it is a locally hosted channel
|
||||
unsigned cacChannel::getHostName (
|
||||
unsigned cacChannel::getHostName (
|
||||
epicsGuard < epicsMutex > &,
|
||||
char * pBuf, unsigned bufLength ) const throw ()
|
||||
{
|
||||
|
||||
@@ -3,32 +3,30 @@
|
||||
* 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.
|
||||
* SPDX-License-Identifier: EPICS
|
||||
* EPICS BASE is distributed subject to a Software License Agreement found
|
||||
* in file LICENSE that is included with this distribution.
|
||||
\*************************************************************************/
|
||||
/*
|
||||
/*
|
||||
*
|
||||
*
|
||||
*
|
||||
* L O S A L A M O S
|
||||
* Los Alamos National Laboratory
|
||||
* Los Alamos, New Mexico 87545
|
||||
*
|
||||
*
|
||||
* Copyright, 1986, The Regents of the University of California.
|
||||
*
|
||||
*
|
||||
* Author Jeffrey O. Hill
|
||||
* johill@lanl.gov
|
||||
* 505 665 1831
|
||||
*
|
||||
*
|
||||
* Author Jeffrey O. Hill
|
||||
* johill@lanl.gov
|
||||
* 505 665 1831
|
||||
*/
|
||||
|
||||
#include "iocinf.h"
|
||||
|
||||
#define epicsExportSharedSymbols
|
||||
#include "cacIO.h"
|
||||
#undef epicsExportSharedSymbols
|
||||
|
||||
cacChannelNotify::~cacChannelNotify ()
|
||||
cacChannelNotify::~cacChannelNotify ()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -3,12 +3,12 @@
|
||||
* 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.
|
||||
* SPDX-License-Identifier: EPICS
|
||||
* EPICS BASE is distributed subject to a Software License Agreement found
|
||||
* in file LICENSE that is included with this distribution.
|
||||
\*************************************************************************/
|
||||
|
||||
/*
|
||||
/*
|
||||
*
|
||||
* L O S A L A M O S
|
||||
* Los Alamos National Laboratory
|
||||
@@ -23,19 +23,17 @@
|
||||
|
||||
#include "iocinf.h"
|
||||
|
||||
#define epicsExportSharedSymbols
|
||||
#include "cacIO.h"
|
||||
#undef epicsExportSharedSymbols
|
||||
|
||||
cacContextNotify::~cacContextNotify ()
|
||||
{
|
||||
}
|
||||
|
||||
void cacContextNotify::callbackProcessingInitiateNotify ()
|
||||
void cacContextNotify::callbackProcessingInitiateNotify ()
|
||||
{
|
||||
}
|
||||
|
||||
void cacContextNotify::callbackProcessingCompleteNotify ()
|
||||
void cacContextNotify::callbackProcessingCompleteNotify ()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
* 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
|
||||
* SPDX-License-Identifier: EPICS
|
||||
* EPICS BASE is distributed subject to a Software License Agreement found
|
||||
* in file LICENSE that is included with this distribution.
|
||||
\*************************************************************************/
|
||||
/*
|
||||
@@ -17,13 +17,13 @@
|
||||
* Copyright, 1986, The Regents of the University of California.
|
||||
*
|
||||
*
|
||||
* Author Jeffrey O. Hill
|
||||
* johill@lanl.gov
|
||||
* 505 665 1831
|
||||
* Author Jeffrey O. Hill
|
||||
* johill@lanl.gov
|
||||
* 505 665 1831
|
||||
*/
|
||||
|
||||
#ifndef cacIOh
|
||||
#define cacIOh
|
||||
#ifndef INC_cacIO_H
|
||||
#define INC_cacIO_H
|
||||
|
||||
//
|
||||
// Open Issues
|
||||
@@ -47,20 +47,12 @@
|
||||
#include <new>
|
||||
#include <stdarg.h>
|
||||
|
||||
#ifdef epicsExportSharedSymbols
|
||||
# define cacIOh_restore_epicsExportSharedSymbols
|
||||
# undef epicsExportSharedSymbols
|
||||
#endif
|
||||
|
||||
#include "tsDLList.h"
|
||||
#include "epicsMutex.h"
|
||||
#include "epicsGuard.h"
|
||||
#include "epicsThread.h"
|
||||
|
||||
#ifdef cacIOh_restore_epicsExportSharedSymbols
|
||||
# define epicsExportSharedSymbols
|
||||
# include "shareLib.h"
|
||||
#endif
|
||||
#include "libCaAPI.h"
|
||||
|
||||
|
||||
class cacChannel;
|
||||
@@ -69,7 +61,7 @@ typedef unsigned long arrayElementCount;
|
||||
|
||||
// 1) this should not be passing caerr.h status to the exception callback
|
||||
// 2) needless-to-say the data should be passed here using the new data access API
|
||||
class epicsShareClass cacWriteNotify {
|
||||
class LIBCA_API cacWriteNotify {
|
||||
public:
|
||||
virtual ~cacWriteNotify () = 0;
|
||||
virtual void completion ( epicsGuard < epicsMutex > & ) = 0;
|
||||
@@ -82,7 +74,7 @@ public:
|
||||
|
||||
// 1) this should not be passing caerr.h status to the exception callback
|
||||
// 2) needless-to-say the data should be passed here using the new data access API
|
||||
class epicsShareClass cacReadNotify {
|
||||
class LIBCA_API cacReadNotify {
|
||||
public:
|
||||
virtual ~cacReadNotify () = 0;
|
||||
virtual void completion (
|
||||
@@ -97,7 +89,7 @@ public:
|
||||
|
||||
// 1) this should not be passing caerr.h status to the exception callback
|
||||
// 2) needless-to-say the data should be passed here using the new data access API
|
||||
class epicsShareClass cacStateNotify {
|
||||
class LIBCA_API cacStateNotify {
|
||||
public:
|
||||
virtual ~cacStateNotify () = 0;
|
||||
virtual void current (
|
||||
@@ -131,7 +123,7 @@ private:
|
||||
bool f_operatorConfirmationRequest:1;
|
||||
};
|
||||
|
||||
class epicsShareClass cacChannelNotify {
|
||||
class LIBCA_API cacChannelNotify {
|
||||
public:
|
||||
virtual ~cacChannelNotify () = 0;
|
||||
virtual void connectNotify ( epicsGuard < epicsMutex > & ) = 0;
|
||||
@@ -169,7 +161,7 @@ private:
|
||||
// but perhaps is a bad practice that should be eliminated? If so,
|
||||
// then the IO should not store or use a pointer to the channel.
|
||||
//
|
||||
class epicsShareClass cacChannel {
|
||||
class LIBCA_API cacChannel {
|
||||
public:
|
||||
typedef unsigned priLev;
|
||||
static const priLev priorityMax;
|
||||
@@ -273,11 +265,11 @@ protected:
|
||||
|
||||
private:
|
||||
cacChannelNotify & callback;
|
||||
cacChannel ( const cacChannel & );
|
||||
cacChannel & operator = ( const cacChannel & );
|
||||
cacChannel ( const cacChannel & );
|
||||
cacChannel & operator = ( const cacChannel & );
|
||||
};
|
||||
|
||||
class epicsShareClass cacContext {
|
||||
class LIBCA_API cacContext {
|
||||
public:
|
||||
virtual ~cacContext ();
|
||||
virtual cacChannel & createChannel (
|
||||
@@ -296,7 +288,7 @@ public:
|
||||
epicsGuard < epicsMutex > &, unsigned level ) const = 0;
|
||||
};
|
||||
|
||||
class epicsShareClass cacContextNotify {
|
||||
class LIBCA_API cacContextNotify {
|
||||
public:
|
||||
virtual ~cacContextNotify () = 0;
|
||||
virtual cacContext & createNetworkContext (
|
||||
@@ -316,7 +308,7 @@ public:
|
||||
// **** Lock Hierarchy ****
|
||||
// callbackControl must be taken before mutualExclusion if both are held at
|
||||
// the same time
|
||||
class epicsShareClass cacService {
|
||||
class LIBCA_API cacService {
|
||||
public:
|
||||
virtual ~cacService () = 0;
|
||||
virtual cacContext & contextCreate (
|
||||
@@ -325,9 +317,9 @@ public:
|
||||
cacContextNotify & ) = 0;
|
||||
};
|
||||
|
||||
epicsShareFunc void epicsShareAPI caInstallDefaultService ( cacService & service );
|
||||
LIBCA_API void epicsStdCall caInstallDefaultService ( cacService & service );
|
||||
|
||||
epicsShareExtern epicsThreadPrivateId caClientCallbackThreadId;
|
||||
LIBCA_API extern epicsThreadPrivateId caClientCallbackThreadId;
|
||||
|
||||
inline cacChannel::cacChannel ( cacChannelNotify & notify ) :
|
||||
callback ( notify )
|
||||
@@ -389,4 +381,4 @@ inline bool caAccessRights::operatorConfirmationRequest () const
|
||||
return this->f_operatorConfirmationRequest;
|
||||
}
|
||||
|
||||
#endif // ifndef cacIOh
|
||||
#endif // ifndef INC_cacIO_H
|
||||
|
||||
@@ -3,12 +3,12 @@
|
||||
* 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.
|
||||
* SPDX-License-Identifier: EPICS
|
||||
* EPICS BASE is distributed subject to a Software License Agreement found
|
||||
* in file LICENSE that is included with this distribution.
|
||||
\*************************************************************************/
|
||||
|
||||
/*
|
||||
/*
|
||||
*
|
||||
* L O S A L A M O S
|
||||
* Los Alamos National Laboratory
|
||||
@@ -21,9 +21,7 @@
|
||||
|
||||
#include "iocinf.h"
|
||||
|
||||
#define epicsExportSharedSymbols
|
||||
#include "cacIO.h"
|
||||
#undef epicsExportSharedSymbols
|
||||
|
||||
cacReadNotify::~cacReadNotify ()
|
||||
{
|
||||
|
||||
@@ -3,12 +3,12 @@
|
||||
* 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.
|
||||
* SPDX-License-Identifier: EPICS
|
||||
* EPICS BASE is distributed subject to a Software License Agreement found
|
||||
* in file LICENSE that is included with this distribution.
|
||||
\*************************************************************************/
|
||||
|
||||
/*
|
||||
/*
|
||||
*
|
||||
* L O S A L A M O S
|
||||
* Los Alamos National Laboratory
|
||||
@@ -21,9 +21,7 @@
|
||||
|
||||
#include "iocinf.h"
|
||||
|
||||
#define epicsExportSharedSymbols
|
||||
#include "cacIO.h"
|
||||
#undef epicsExportSharedSymbols
|
||||
|
||||
cacStateNotify::~cacStateNotify ()
|
||||
{
|
||||
|
||||
@@ -3,12 +3,12 @@
|
||||
* 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.
|
||||
* SPDX-License-Identifier: EPICS
|
||||
* EPICS BASE is distributed subject to a Software License Agreement found
|
||||
* in file LICENSE that is included with this distribution.
|
||||
\*************************************************************************/
|
||||
|
||||
/*
|
||||
/*
|
||||
*
|
||||
* L O S A L A M O S
|
||||
* Los Alamos National Laboratory
|
||||
@@ -21,9 +21,7 @@
|
||||
|
||||
#include "iocinf.h"
|
||||
|
||||
#define epicsExportSharedSymbols
|
||||
#include "cacIO.h"
|
||||
#undef epicsExportSharedSymbols
|
||||
|
||||
cacWriteNotify::~cacWriteNotify ()
|
||||
{
|
||||
|
||||
@@ -3,11 +3,11 @@
|
||||
* 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.
|
||||
* SPDX-License-Identifier: EPICS
|
||||
* EPICS BASE is distributed subject to a Software License Agreement found
|
||||
* in file LICENSE that is included with this distribution.
|
||||
\*************************************************************************/
|
||||
/*
|
||||
/*
|
||||
*
|
||||
* L O S A L A M O S
|
||||
* Los Alamos National Laboratory
|
||||
@@ -21,8 +21,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef INCLcadefh
|
||||
#define INCLcadefh
|
||||
#ifndef INC_cadef_H
|
||||
#define INC_cadef_H
|
||||
|
||||
/*
|
||||
* done in two ifdef steps so that we will remain compatible with
|
||||
@@ -32,19 +32,9 @@
|
||||
# include <stdarg.h>
|
||||
#endif
|
||||
|
||||
#ifdef epicsExportSharedSymbols
|
||||
# define INCLcadefh_accessh_epicsExportSharedSymbols
|
||||
# undef epicsExportSharedSymbols
|
||||
#endif
|
||||
|
||||
#include "epicsThread.h"
|
||||
|
||||
#ifdef INCLcadefh_accessh_epicsExportSharedSymbols
|
||||
# define epicsExportSharedSymbols
|
||||
# include "shareLib.h"
|
||||
#endif
|
||||
|
||||
|
||||
#include "libCaAPI.h"
|
||||
#include "caerr.h"
|
||||
#include "db_access.h"
|
||||
#include "caeventmask.h"
|
||||
@@ -83,8 +73,8 @@ typedef void caArh (struct access_rights_handler_args args);
|
||||
/* The conversion routine to call for each type */
|
||||
#define VALID_TYPE(TYPE) (((unsigned short)TYPE)<=LAST_BUFFER_TYPE)
|
||||
|
||||
/*
|
||||
* Arguments passed to event handlers and get/put call back handlers.
|
||||
/*
|
||||
* Arguments passed to event handlers and get/put call back handlers.
|
||||
*
|
||||
* The status field below is the CA ECA_XXX status of the requested
|
||||
* operation which is saved from when the operation was attempted in the
|
||||
@@ -95,14 +85,14 @@ typedef void caArh (struct access_rights_handler_args args);
|
||||
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 */
|
||||
} evargs;
|
||||
typedef void caEventCallBackFunc (struct event_handler_args);
|
||||
|
||||
epicsShareFunc void epicsShareAPI ca_test_event
|
||||
LIBCA_API void epicsStdCall ca_test_event
|
||||
(
|
||||
struct event_handler_args
|
||||
);
|
||||
@@ -133,8 +123,8 @@ typedef unsigned CA_SYNC_GID;
|
||||
#define CA_OP_CLEAR_EVENT 4
|
||||
#define CA_OP_OTHER 5
|
||||
|
||||
/*
|
||||
* used with connection_handler_args
|
||||
/*
|
||||
* used with connection_handler_args
|
||||
*/
|
||||
#define CA_OP_CONN_UP 6
|
||||
#define CA_OP_CONN_DOWN 7
|
||||
@@ -158,46 +148,46 @@ typedef unsigned CA_SYNC_GID;
|
||||
|
||||
|
||||
#define TYPENOTCONN (-1) /* the channel's native type when disconnected */
|
||||
epicsShareFunc short epicsShareAPI ca_field_type (chid chan);
|
||||
epicsShareFunc unsigned long epicsShareAPI ca_element_count (chid chan);
|
||||
epicsShareFunc const char * epicsShareAPI ca_name (chid chan);
|
||||
epicsShareFunc void epicsShareAPI ca_set_puser (chid chan, void *puser);
|
||||
epicsShareFunc void * epicsShareAPI ca_puser (chid chan);
|
||||
epicsShareFunc unsigned epicsShareAPI ca_read_access (chid chan);
|
||||
epicsShareFunc unsigned epicsShareAPI ca_write_access (chid chan);
|
||||
LIBCA_API short epicsStdCall ca_field_type (chid chan);
|
||||
LIBCA_API unsigned long epicsStdCall ca_element_count (chid chan);
|
||||
LIBCA_API const char * epicsStdCall ca_name (chid chan);
|
||||
LIBCA_API void epicsStdCall ca_set_puser (chid chan, void *puser);
|
||||
LIBCA_API void * epicsStdCall ca_puser (chid chan);
|
||||
LIBCA_API unsigned epicsStdCall ca_read_access (chid chan);
|
||||
LIBCA_API unsigned epicsStdCall ca_write_access (chid chan);
|
||||
|
||||
/*
|
||||
* cs_ - `channel state'
|
||||
*
|
||||
* cs_ - `channel state'
|
||||
*
|
||||
* cs_never_conn valid chid, IOC not found
|
||||
* cs_prev_conn valid chid, IOC was found, but unavailable
|
||||
* cs_conn valid chid, IOC was found, still available
|
||||
* cs_closed channel deleted by user
|
||||
*/
|
||||
enum channel_state {cs_never_conn, cs_prev_conn, cs_conn, cs_closed};
|
||||
epicsShareFunc enum channel_state epicsShareAPI ca_state (chid chan);
|
||||
LIBCA_API enum channel_state epicsStdCall ca_state (chid chan);
|
||||
|
||||
/************************************************************************/
|
||||
/* Perform Library Initialization */
|
||||
/* */
|
||||
/* Must be called once before calling any of the other routines */
|
||||
/************************************************************************/
|
||||
epicsShareFunc int epicsShareAPI ca_task_initialize (void);
|
||||
enum ca_preemptive_callback_select
|
||||
LIBCA_API int epicsStdCall ca_task_initialize (void);
|
||||
enum ca_preemptive_callback_select
|
||||
{ ca_disable_preemptive_callback, ca_enable_preemptive_callback };
|
||||
epicsShareFunc int epicsShareAPI
|
||||
LIBCA_API int epicsStdCall
|
||||
ca_context_create (enum ca_preemptive_callback_select select);
|
||||
epicsShareFunc void epicsShareAPI ca_detach_context ();
|
||||
LIBCA_API void epicsStdCall ca_detach_context ();
|
||||
|
||||
/************************************************************************/
|
||||
/* Remove CA facility from your task */
|
||||
/* */
|
||||
/* Normally called automatically at task exit */
|
||||
/************************************************************************/
|
||||
epicsShareFunc int epicsShareAPI ca_task_exit (void);
|
||||
epicsShareFunc void epicsShareAPI ca_context_destroy (void);
|
||||
LIBCA_API int epicsStdCall ca_task_exit (void);
|
||||
LIBCA_API void epicsStdCall ca_context_destroy (void);
|
||||
|
||||
typedef unsigned capri;
|
||||
typedef unsigned capri;
|
||||
#define CA_PRIORITY_MAX 99
|
||||
#define CA_PRIORITY_MIN 0
|
||||
#define CA_PRIORITY_DEFAULT CA_PRIORITY_MIN
|
||||
@@ -210,7 +200,7 @@ typedef unsigned capri;
|
||||
* ca_create_channel ()
|
||||
*
|
||||
* pChanName R channel name string
|
||||
* pConnStateCallback R address of connection state change
|
||||
* pConnStateCallback R address of connection state change
|
||||
* callback function
|
||||
* pUserPrivate R placed in the channel's user private field
|
||||
* o can be fetched later by ca_puser(CHID)
|
||||
@@ -218,10 +208,10 @@ typedef unsigned capri;
|
||||
* priority R priority level in the server 0 - 100
|
||||
* pChanID RW channel id written here
|
||||
*/
|
||||
epicsShareFunc int epicsShareAPI ca_create_channel
|
||||
LIBCA_API int epicsStdCall ca_create_channel
|
||||
(
|
||||
const char *pChanName,
|
||||
caCh *pConnStateCallback,
|
||||
const char *pChanName,
|
||||
caCh *pConnStateCallback,
|
||||
void *pUserPrivate,
|
||||
capri priority,
|
||||
chid *pChanID
|
||||
@@ -230,10 +220,10 @@ epicsShareFunc int epicsShareAPI ca_create_channel
|
||||
/*
|
||||
* ca_change_connection_event()
|
||||
*
|
||||
* chan R channel identifier
|
||||
* chan R channel identifier
|
||||
* pfunc R address of connection call-back function
|
||||
*/
|
||||
epicsShareFunc int epicsShareAPI ca_change_connection_event
|
||||
LIBCA_API int epicsStdCall ca_change_connection_event
|
||||
(
|
||||
chid chan,
|
||||
caCh * pfunc
|
||||
@@ -242,10 +232,10 @@ epicsShareFunc int epicsShareAPI ca_change_connection_event
|
||||
/*
|
||||
* ca_replace_access_rights_event ()
|
||||
*
|
||||
* chan R channel identifier
|
||||
* chan R channel identifier
|
||||
* pfunc R address of access rights call-back function
|
||||
*/
|
||||
epicsShareFunc int epicsShareAPI ca_replace_access_rights_event (
|
||||
LIBCA_API int epicsStdCall ca_replace_access_rights_event (
|
||||
chid chan,
|
||||
caArh *pfunc
|
||||
);
|
||||
@@ -256,11 +246,11 @@ epicsShareFunc int epicsShareAPI ca_replace_access_rights_event (
|
||||
* replace the default exception handler
|
||||
*
|
||||
* pfunc R address of exception call-back function
|
||||
* pArg R copy of this pointer passed to exception
|
||||
* pArg R copy of this pointer passed to exception
|
||||
* call-back function
|
||||
*/
|
||||
typedef void caExceptionHandler (struct exception_handler_args);
|
||||
epicsShareFunc int epicsShareAPI ca_add_exception_event
|
||||
LIBCA_API int epicsStdCall ca_add_exception_event
|
||||
(
|
||||
caExceptionHandler *pfunc,
|
||||
void *pArg
|
||||
@@ -272,7 +262,7 @@ epicsShareFunc int epicsShareAPI ca_add_exception_event
|
||||
*
|
||||
* chanId R channel ID
|
||||
*/
|
||||
epicsShareFunc int epicsShareAPI ca_clear_channel
|
||||
LIBCA_API int epicsStdCall ca_clear_channel
|
||||
(
|
||||
chid chanId
|
||||
);
|
||||
@@ -283,10 +273,10 @@ epicsShareFunc int epicsShareAPI ca_clear_channel
|
||||
/*
|
||||
* ca_bput()
|
||||
*
|
||||
* WARNING: this copies the new value from a string (dbr_string_t)
|
||||
* WARNING: this copies the new value from a string (dbr_string_t)
|
||||
* (and not as an integer)
|
||||
*
|
||||
* chan R channel identifier
|
||||
* chan R channel identifier
|
||||
* pValue R new channel value string copied from this location
|
||||
*/
|
||||
#define ca_bput(chan, pValue) \
|
||||
@@ -295,9 +285,9 @@ ca_array_put(DBR_STRING, 1u, chan, (const dbr_string_t *) (pValue))
|
||||
/*
|
||||
* ca_rput()
|
||||
*
|
||||
* WARNING: this copies the new value from a dbr_float_t
|
||||
* WARNING: this copies the new value from a dbr_float_t
|
||||
*
|
||||
* chan R channel identifier
|
||||
* chan R channel identifier
|
||||
* pValue R new channel value copied from this location
|
||||
*/
|
||||
#define ca_rput(chan,pValue) \
|
||||
@@ -307,7 +297,7 @@ ca_array_put(DBR_FLOAT, 1u, chan, (const dbr_float_t *) pValue)
|
||||
* ca_put()
|
||||
*
|
||||
* type R data type from db_access.h
|
||||
* chan R channel identifier
|
||||
* chan R channel identifier
|
||||
* pValue R new channel value copied from this location
|
||||
*/
|
||||
#define ca_put(type, chan, pValue) ca_array_put (type, 1u, chan, pValue)
|
||||
@@ -317,13 +307,13 @@ ca_array_put(DBR_FLOAT, 1u, chan, (const dbr_float_t *) pValue)
|
||||
*
|
||||
* type R data type from db_access.h
|
||||
* count R array element count
|
||||
* chan R channel identifier
|
||||
* chan R channel identifier
|
||||
* pValue R new channel value copied from this location
|
||||
*/
|
||||
epicsShareFunc int epicsShareAPI ca_array_put
|
||||
LIBCA_API int epicsStdCall ca_array_put
|
||||
(
|
||||
chtype type,
|
||||
unsigned long count,
|
||||
chtype type,
|
||||
unsigned long count,
|
||||
chid chanId,
|
||||
const void * pValue
|
||||
);
|
||||
@@ -331,8 +321,8 @@ epicsShareFunc int epicsShareAPI ca_array_put
|
||||
/*
|
||||
* ca_array_put_callback()
|
||||
*
|
||||
* This routine functions identically to the original ca put request
|
||||
* with the addition of a callback to the user supplied function
|
||||
* This routine functions identically to the original ca put request
|
||||
* with the addition of a callback to the user supplied function
|
||||
* after recod processing completes in the IOC. The arguments
|
||||
* to the user supplied callback function are declared in
|
||||
* the structure event_handler_args and include the pointer
|
||||
@@ -340,15 +330,15 @@ epicsShareFunc int epicsShareAPI ca_array_put
|
||||
*
|
||||
* type R data type from db_access.h
|
||||
* count R array element count
|
||||
* chan R channel identifier
|
||||
* chan R channel identifier
|
||||
* pValue R new channel value copied from this location
|
||||
* pFunc R pointer to call-back function
|
||||
* pArg R copy of this pointer passed to pFunc
|
||||
*/
|
||||
epicsShareFunc int epicsShareAPI ca_array_put_callback
|
||||
LIBCA_API int epicsStdCall ca_array_put_callback
|
||||
(
|
||||
chtype type,
|
||||
unsigned long count,
|
||||
chtype type,
|
||||
unsigned long count,
|
||||
chid chanId,
|
||||
const void * pValue,
|
||||
caEventCallBackFunc * pFunc,
|
||||
@@ -365,10 +355,10 @@ epicsShareFunc int epicsShareAPI ca_array_put_callback
|
||||
/*
|
||||
* ca_bget()
|
||||
*
|
||||
* WARNING: this copies the new value into a string (dbr_string_t)
|
||||
* WARNING: this copies the new value into a string (dbr_string_t)
|
||||
* (and not into an integer)
|
||||
*
|
||||
* chan R channel identifier
|
||||
* chan R channel identifier
|
||||
* pValue W channel value copied to this location
|
||||
*/
|
||||
#define ca_bget(chan, pValue) \
|
||||
@@ -377,9 +367,9 @@ ca_array_get(DBR_STRING, 1u, chan, (dbr_string_t *)(pValue))
|
||||
/*
|
||||
* ca_rget()
|
||||
*
|
||||
* WARNING: this copies the new value into a 32 bit float (dbr_float_t)
|
||||
* WARNING: this copies the new value into a 32 bit float (dbr_float_t)
|
||||
*
|
||||
* chan R channel identifier
|
||||
* chan R channel identifier
|
||||
* pValue W channel value copied to this location
|
||||
*/
|
||||
#define ca_rget(chan, pValue) \
|
||||
@@ -389,7 +379,7 @@ ca_array_get(DBR_FLOAT, 1u, chan, (dbr_float_t *)(pValue))
|
||||
* ca_rget()
|
||||
*
|
||||
* type R data type from db_access.h
|
||||
* chan R channel identifier
|
||||
* chan R channel identifier
|
||||
* pValue W channel value copied to this location
|
||||
*/
|
||||
#define ca_get(type, chan, pValue) ca_array_get(type, 1u, chan, pValue)
|
||||
@@ -399,13 +389,13 @@ ca_array_get(DBR_FLOAT, 1u, chan, (dbr_float_t *)(pValue))
|
||||
*
|
||||
* type R data type from db_access.h
|
||||
* count R array element count
|
||||
* chan R channel identifier
|
||||
* chan R channel identifier
|
||||
* pValue W channel value copied to this location
|
||||
*/
|
||||
epicsShareFunc int epicsShareAPI ca_array_get
|
||||
LIBCA_API int epicsStdCall ca_array_get
|
||||
(
|
||||
chtype type,
|
||||
unsigned long count,
|
||||
chtype type,
|
||||
unsigned long count,
|
||||
chid chanId,
|
||||
void * pValue
|
||||
);
|
||||
@@ -419,10 +409,10 @@ epicsShareFunc int epicsShareAPI ca_array_get
|
||||
/*
|
||||
* ca_bget_callback()
|
||||
*
|
||||
* WARNING: this returns the new value as a string (dbr_string_t)
|
||||
* WARNING: this returns the new value as a string (dbr_string_t)
|
||||
* (and not as an integer)
|
||||
*
|
||||
* chan R channel identifier
|
||||
* chan R channel identifier
|
||||
* pFunc R pointer to call-back function
|
||||
* pArg R copy of this pointer passed to pFunc
|
||||
*/
|
||||
@@ -432,9 +422,9 @@ ca_array_get_callback (DBR_STRING, 1u, chan, pFunc, pArg)
|
||||
/*
|
||||
* ca_rget_callback()
|
||||
*
|
||||
* WARNING: this returns the new value as a float (dbr_float_t)
|
||||
* WARNING: this returns the new value as a float (dbr_float_t)
|
||||
*
|
||||
* chan R channel identifier
|
||||
* chan R channel identifier
|
||||
* pFunc R pointer to call-back function
|
||||
* pArg R copy of this pointer passed to pFunc
|
||||
*/
|
||||
@@ -445,7 +435,7 @@ ca_array_get_callback (DBR_FLOAT, 1u, chan, pFunc, pArg)
|
||||
* ca_get_callback()
|
||||
*
|
||||
* type R data type from db_access.h
|
||||
* chan R channel identifier
|
||||
* chan R channel identifier
|
||||
* pFunc R pointer to call-back function
|
||||
* pArg R copy of this pointer passed to pFunc
|
||||
*/
|
||||
@@ -457,14 +447,14 @@ ca_array_get_callback (type, 1u, chan, pFunc, pArg)
|
||||
*
|
||||
* type R data type from db_access.h
|
||||
* count R array element count
|
||||
* chan R channel identifier
|
||||
* chan R channel identifier
|
||||
* pFunc R pointer to call-back function
|
||||
* pArg R copy of this pointer passed to pFunc
|
||||
*/
|
||||
epicsShareFunc int epicsShareAPI ca_array_get_callback
|
||||
LIBCA_API int epicsStdCall ca_array_get_callback
|
||||
(
|
||||
chtype type,
|
||||
unsigned long count,
|
||||
chtype type,
|
||||
unsigned long count,
|
||||
chid chanId,
|
||||
caEventCallBackFunc * pFunc,
|
||||
void * pArg
|
||||
@@ -476,7 +466,7 @@ epicsShareFunc int epicsShareAPI ca_array_get_callback
|
||||
/* NOTES: */
|
||||
/* 1) Evid may be omited by passing a NULL pointer */
|
||||
/* */
|
||||
/* 2) An array count of zero specifies the native db count */
|
||||
/* 2) An array count of zero specifies the native db count */
|
||||
/* */
|
||||
/************************************************************************/
|
||||
|
||||
@@ -485,16 +475,16 @@ epicsShareFunc int epicsShareAPI ca_array_get_callback
|
||||
*
|
||||
* type R data type from db_access.h
|
||||
* count R array element count
|
||||
* chan R channel identifier
|
||||
* chan R channel identifier
|
||||
* mask R event mask - one of {DBE_VALUE, DBE_ALARM, DBE_LOG}
|
||||
* pFunc R pointer to call-back function
|
||||
* pArg R copy of this pointer passed to pFunc
|
||||
* pEventID W event id written at specified address
|
||||
*/
|
||||
epicsShareFunc int epicsShareAPI ca_create_subscription
|
||||
LIBCA_API int epicsStdCall ca_create_subscription
|
||||
(
|
||||
chtype type,
|
||||
unsigned long count,
|
||||
chtype type,
|
||||
unsigned long count,
|
||||
chid chanId,
|
||||
long mask,
|
||||
caEventCallBackFunc * pFunc,
|
||||
@@ -512,12 +502,12 @@ epicsShareFunc int epicsShareAPI ca_create_subscription
|
||||
*
|
||||
* eventID R event id
|
||||
*/
|
||||
epicsShareFunc int epicsShareAPI ca_clear_subscription
|
||||
LIBCA_API int epicsStdCall ca_clear_subscription
|
||||
(
|
||||
evid eventID
|
||||
);
|
||||
|
||||
epicsShareFunc chid epicsShareAPI ca_evid_to_chid ( evid id );
|
||||
LIBCA_API chid epicsStdCall ca_evid_to_chid ( evid id );
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
@@ -535,24 +525,24 @@ epicsShareFunc chid epicsShareAPI ca_evid_to_chid ( evid id );
|
||||
/* FLOW OF TYPICAL APPLICATION */
|
||||
/* */
|
||||
/* search() ! Obtain Channel ids */
|
||||
/* . ! " */
|
||||
/* . ! " */
|
||||
/* . ! " */
|
||||
/* pend_io ! wait for channels to connect */
|
||||
/* */
|
||||
/* get() ! several requests for remote info */
|
||||
/* get() ! " */
|
||||
/* add_event() ! " */
|
||||
/* get() ! " */
|
||||
/* get() ! " */
|
||||
/* add_event() ! " */
|
||||
/* get() ! " */
|
||||
/* . */
|
||||
/* . */
|
||||
/* . */
|
||||
/* flush_io() ! send get requests */
|
||||
/* ! optional parallel processing */
|
||||
/* . ! " */
|
||||
/* . ! " */
|
||||
/* . ! " */
|
||||
/* . ! " */
|
||||
/* pend_io() ! wait for replies from get requests */
|
||||
/* . ! access to requested data */
|
||||
/* . ! " */
|
||||
/* . ! " */
|
||||
/* pend_event() ! wait for requested events */
|
||||
/* */
|
||||
/************************************************************************/
|
||||
@@ -562,7 +552,7 @@ epicsShareFunc chid epicsShareAPI ca_evid_to_chid ( evid id );
|
||||
/* functions specified with add_event when events occur. If the */
|
||||
/* timeout is specified as 0 an infinite timeout is assumed. */
|
||||
/* ca_flush_io() is called by this routine. If ca_pend_io () */
|
||||
/* is called when no IO is outstanding then it will return immediately */
|
||||
/* is called when no IO is outstanding then it will return immediately */
|
||||
/* without processing. */
|
||||
/************************************************************************/
|
||||
|
||||
@@ -571,28 +561,28 @@ epicsShareFunc chid epicsShareAPI ca_evid_to_chid ( evid id );
|
||||
*
|
||||
* timeOut R wait for this delay in seconds
|
||||
*/
|
||||
epicsShareFunc int epicsShareAPI ca_pend_event (ca_real timeOut);
|
||||
LIBCA_API int epicsStdCall ca_pend_event (ca_real timeOut);
|
||||
#define ca_poll() ca_pend_event(1e-12)
|
||||
|
||||
/*
|
||||
* ca_pend_io()
|
||||
*
|
||||
* timeOut R wait for this delay in seconds but return early
|
||||
* if all get requests (or search requests with null
|
||||
* timeOut R wait for this delay in seconds but return early
|
||||
* if all get requests (or search requests with null
|
||||
* connection handler pointer have completed)
|
||||
*/
|
||||
epicsShareFunc int epicsShareAPI ca_pend_io (ca_real timeOut);
|
||||
LIBCA_API int epicsStdCall ca_pend_io (ca_real timeOut);
|
||||
|
||||
/* calls ca_pend_io() if early is true otherwise ca_pend_event() is called */
|
||||
epicsShareFunc int epicsShareAPI ca_pend (ca_real timeout, int early);
|
||||
LIBCA_API int epicsStdCall ca_pend (ca_real timeout, int early);
|
||||
|
||||
/*
|
||||
* ca_test_io()
|
||||
*
|
||||
* returns TRUE when get requests (or search requests with null
|
||||
* returns TRUE when get requests (or search requests with null
|
||||
* connection handler pointer) are outstanding
|
||||
*/
|
||||
epicsShareFunc int epicsShareAPI ca_test_io (void);
|
||||
LIBCA_API int epicsStdCall ca_test_io (void);
|
||||
|
||||
/************************************************************************/
|
||||
/* Send out all outstanding messages in the send queue */
|
||||
@@ -600,7 +590,7 @@ epicsShareFunc int epicsShareAPI ca_test_io (void);
|
||||
/*
|
||||
* ca_flush_io()
|
||||
*/
|
||||
epicsShareFunc int epicsShareAPI ca_flush_io (void);
|
||||
LIBCA_API int epicsStdCall ca_flush_io (void);
|
||||
|
||||
|
||||
/*
|
||||
@@ -609,10 +599,10 @@ epicsShareFunc int epicsShareAPI ca_flush_io (void);
|
||||
* errorCode R status returned from channel access function
|
||||
* pCtxStr R context string included with error print out
|
||||
*/
|
||||
epicsShareFunc void epicsShareAPI ca_signal
|
||||
LIBCA_API void epicsStdCall ca_signal
|
||||
(
|
||||
long errorCode,
|
||||
const char *pCtxStr
|
||||
long errorCode,
|
||||
const char *pCtxStr
|
||||
);
|
||||
|
||||
/*
|
||||
@@ -623,12 +613,12 @@ epicsShareFunc void epicsShareAPI ca_signal
|
||||
* lineNo R line number included with error print out
|
||||
*
|
||||
*/
|
||||
epicsShareFunc void epicsShareAPI ca_signal_with_file_and_lineno
|
||||
LIBCA_API void epicsStdCall ca_signal_with_file_and_lineno
|
||||
(
|
||||
long errorCode,
|
||||
const char *pCtxStr,
|
||||
const char *pFileStr,
|
||||
int lineNo
|
||||
long errorCode,
|
||||
const char *pCtxStr,
|
||||
const char *pFileStr,
|
||||
int lineNo
|
||||
);
|
||||
|
||||
/*
|
||||
@@ -639,7 +629,7 @@ epicsShareFunc void epicsShareAPI ca_signal_with_file_and_lineno
|
||||
* pFormat R printf dtyle format string (and optional arguments)
|
||||
*
|
||||
*/
|
||||
epicsShareFunc void epicsShareAPI ca_signal_formated (long ca_status, const char *pfilenm,
|
||||
LIBCA_API void epicsStdCall ca_signal_formated (long ca_status, const char *pfilenm,
|
||||
int lineno, const char *pFormat, ...);
|
||||
|
||||
/*
|
||||
@@ -649,15 +639,15 @@ epicsShareFunc void epicsShareAPI ca_signal_formated (long ca_status, const char
|
||||
*
|
||||
* !!!! this function is _not_ thread safe !!!!
|
||||
*/
|
||||
epicsShareFunc const char * epicsShareAPI ca_host_name (chid channel);
|
||||
LIBCA_API const char * epicsStdCall ca_host_name (chid channel);
|
||||
/* thread safe version */
|
||||
epicsShareFunc unsigned epicsShareAPI ca_get_host_name ( chid pChan,
|
||||
LIBCA_API unsigned epicsStdCall ca_get_host_name ( chid pChan,
|
||||
char *pBuf, unsigned bufLength );
|
||||
|
||||
/*
|
||||
* CA_ADD_FD_REGISTRATION
|
||||
*
|
||||
* call their function with their argument whenever
|
||||
* call their function with their argument whenever
|
||||
* a new fd is added or removed
|
||||
* (for use with a manager of the select system call under UNIX)
|
||||
*
|
||||
@@ -665,7 +655,7 @@ epicsShareFunc unsigned epicsShareAPI ca_get_host_name ( chid pChan,
|
||||
* if (!opened) then fd was deleted
|
||||
*
|
||||
*/
|
||||
typedef void CAFDHANDLER (void *parg, int fd, int opened);
|
||||
typedef void CAFDHANDLER (void *parg, int fd, int opened);
|
||||
|
||||
/*
|
||||
* ca_add_fd_registration()
|
||||
@@ -674,7 +664,7 @@ typedef void CAFDHANDLER (void *parg, int fd, int opened);
|
||||
* when an fd is created or deleted
|
||||
* pArg R argument passed to above function
|
||||
*/
|
||||
epicsShareFunc int epicsShareAPI ca_add_fd_registration
|
||||
LIBCA_API int epicsStdCall ca_add_fd_registration
|
||||
(
|
||||
CAFDHANDLER *pHandler,
|
||||
void *pArg
|
||||
@@ -696,29 +686,29 @@ epicsShareFunc int epicsShareAPI ca_add_fd_registration
|
||||
*
|
||||
* create a sync group
|
||||
*
|
||||
* pgid W pointer to sync group id that will be written
|
||||
* pgid W pointer to sync group id that will be written
|
||||
*/
|
||||
epicsShareFunc int epicsShareAPI ca_sg_create (CA_SYNC_GID * pgid);
|
||||
LIBCA_API int epicsStdCall ca_sg_create (CA_SYNC_GID * pgid);
|
||||
|
||||
/*
|
||||
* ca_sg_delete()
|
||||
*
|
||||
* delete a sync group
|
||||
*
|
||||
* gid R sync group id
|
||||
* gid R sync group id
|
||||
*/
|
||||
epicsShareFunc int epicsShareAPI ca_sg_delete (const CA_SYNC_GID gid);
|
||||
LIBCA_API int epicsStdCall ca_sg_delete (const CA_SYNC_GID gid);
|
||||
|
||||
/*
|
||||
* ca_sg_block()
|
||||
*
|
||||
* block for IO performed within a sync group to complete
|
||||
* block for IO performed within a sync group to complete
|
||||
*
|
||||
* gid R sync group id
|
||||
* gid R sync group id
|
||||
* timeout R wait for this duration prior to timing out
|
||||
* and returning ECA_TIMEOUT
|
||||
*/
|
||||
epicsShareFunc int epicsShareAPI ca_sg_block (const CA_SYNC_GID gid, ca_real timeout);
|
||||
LIBCA_API int epicsStdCall ca_sg_block (const CA_SYNC_GID gid, ca_real timeout);
|
||||
|
||||
/*
|
||||
* ca_sg_test()
|
||||
@@ -726,17 +716,17 @@ epicsShareFunc int epicsShareAPI ca_sg_block (const CA_SYNC_GID gid, ca_real tim
|
||||
* test for sync group IO operations in progress
|
||||
*
|
||||
* gid R sync group id
|
||||
*
|
||||
*
|
||||
* returns one of ECA_BADSYNCGRP, ECA_IOINPROGRESS, ECA_IODONE
|
||||
*/
|
||||
epicsShareFunc int epicsShareAPI ca_sg_test (const CA_SYNC_GID gid);
|
||||
LIBCA_API int epicsStdCall ca_sg_test (const CA_SYNC_GID gid);
|
||||
|
||||
/*
|
||||
* ca_sg_reset
|
||||
*
|
||||
* gid R sync group id
|
||||
*/
|
||||
epicsShareFunc int epicsShareAPI ca_sg_reset(const CA_SYNC_GID gid);
|
||||
LIBCA_API int epicsStdCall ca_sg_reset(const CA_SYNC_GID gid);
|
||||
|
||||
/*
|
||||
* ca_sg_array_get()
|
||||
@@ -747,16 +737,16 @@ epicsShareFunc int epicsShareAPI ca_sg_reset(const CA_SYNC_GID gid);
|
||||
* gid R sync group id
|
||||
* type R data type from db_access.h
|
||||
* count R array element count
|
||||
* chan R channel identifier
|
||||
* chan R channel identifier
|
||||
* pValue W channel value copied to this location
|
||||
*/
|
||||
epicsShareFunc int epicsShareAPI ca_sg_array_get
|
||||
LIBCA_API int epicsStdCall ca_sg_array_get
|
||||
(
|
||||
const CA_SYNC_GID gid,
|
||||
chtype type,
|
||||
chtype type,
|
||||
unsigned long count,
|
||||
chid chan,
|
||||
void *pValue
|
||||
void *pValue
|
||||
);
|
||||
|
||||
#define ca_sg_get(gid, type, chan, pValue) \
|
||||
@@ -771,16 +761,16 @@ ca_sg_array_get (gid, type, 1u, chan, pValue)
|
||||
* gid R sync group id
|
||||
* type R data type from db_access.h
|
||||
* count R array element count
|
||||
* chan R channel identifier
|
||||
* chan R channel identifier
|
||||
* pValue R new channel value copied from this location
|
||||
*/
|
||||
epicsShareFunc int epicsShareAPI ca_sg_array_put
|
||||
LIBCA_API int epicsStdCall ca_sg_array_put
|
||||
(
|
||||
const CA_SYNC_GID gid,
|
||||
chtype type,
|
||||
chtype type,
|
||||
unsigned long count,
|
||||
chid chan,
|
||||
const void *pValue
|
||||
const void *pValue
|
||||
);
|
||||
|
||||
#define ca_sg_put(gid, type, chan, pValue) \
|
||||
@@ -793,29 +783,29 @@ ca_sg_array_put (gid, type, 1u, chan, pValue)
|
||||
*
|
||||
* gid R sync group id
|
||||
*/
|
||||
epicsShareFunc int epicsShareAPI ca_sg_stat (CA_SYNC_GID gid);
|
||||
LIBCA_API int epicsStdCall ca_sg_stat (CA_SYNC_GID gid);
|
||||
|
||||
epicsShareFunc void epicsShareAPI ca_dump_dbr (chtype type, unsigned count, const void * pbuffer);
|
||||
LIBCA_API void epicsStdCall ca_dump_dbr (chtype type, unsigned count, const void * pbuffer);
|
||||
|
||||
|
||||
/*
|
||||
* ca_v42_ok()
|
||||
*
|
||||
* Put call back is available if the CA server is on version is 4.2
|
||||
* Put call back is available if the CA server is on version is 4.2
|
||||
* or higher.
|
||||
*
|
||||
* chan R channel identifier
|
||||
*
|
||||
*
|
||||
* (returns true or false)
|
||||
*/
|
||||
epicsShareFunc int epicsShareAPI ca_v42_ok (chid chan);
|
||||
LIBCA_API int epicsStdCall ca_v42_ok (chid chan);
|
||||
|
||||
/*
|
||||
* ca_version()
|
||||
*
|
||||
* returns the CA version string
|
||||
*/
|
||||
epicsShareFunc const char * epicsShareAPI ca_version (void);
|
||||
LIBCA_API const char * epicsStdCall ca_version (void);
|
||||
|
||||
/*
|
||||
* ca_replace_printf_handler ()
|
||||
@@ -830,7 +820,7 @@ epicsShareFunc const char * epicsShareAPI ca_version (void);
|
||||
*/
|
||||
#ifndef CA_DONT_INCLUDE_STDARGH
|
||||
typedef int caPrintfFunc (const char *pformat, va_list args);
|
||||
epicsShareFunc int epicsShareAPI ca_replace_printf_handler (
|
||||
LIBCA_API int epicsStdCall ca_replace_printf_handler (
|
||||
caPrintfFunc *ca_printf_func
|
||||
);
|
||||
#endif /*CA_DONT_INCLUDE_STDARGH*/
|
||||
@@ -838,24 +828,24 @@ epicsShareFunc int epicsShareAPI ca_replace_printf_handler (
|
||||
/*
|
||||
* (for testing purposes only)
|
||||
*/
|
||||
epicsShareFunc unsigned epicsShareAPI ca_get_ioc_connection_count (void);
|
||||
epicsShareFunc int epicsShareAPI ca_preemtive_callback_is_enabled (void);
|
||||
epicsShareFunc void epicsShareAPI ca_self_test (void);
|
||||
epicsShareFunc unsigned epicsShareAPI ca_beacon_anomaly_count (void);
|
||||
epicsShareFunc unsigned epicsShareAPI ca_search_attempts (chid chan);
|
||||
epicsShareFunc double epicsShareAPI ca_beacon_period (chid chan);
|
||||
epicsShareFunc double epicsShareAPI ca_receive_watchdog_delay (chid chan);
|
||||
LIBCA_API unsigned epicsStdCall ca_get_ioc_connection_count (void);
|
||||
LIBCA_API int epicsStdCall ca_preemtive_callback_is_enabled (void);
|
||||
LIBCA_API void epicsStdCall ca_self_test (void);
|
||||
LIBCA_API unsigned epicsStdCall ca_beacon_anomaly_count (void);
|
||||
LIBCA_API unsigned epicsStdCall ca_search_attempts (chid chan);
|
||||
LIBCA_API double epicsStdCall ca_beacon_period (chid chan);
|
||||
LIBCA_API double epicsStdCall ca_receive_watchdog_delay (chid chan);
|
||||
|
||||
/*
|
||||
* used when an auxillary thread needs to join a CA client context started
|
||||
* by another thread
|
||||
*/
|
||||
epicsShareFunc struct ca_client_context * epicsShareAPI ca_current_context ();
|
||||
epicsShareFunc int epicsShareAPI ca_attach_context ( struct ca_client_context * context );
|
||||
LIBCA_API struct ca_client_context * epicsStdCall ca_current_context ();
|
||||
LIBCA_API int epicsStdCall ca_attach_context ( struct ca_client_context * context );
|
||||
|
||||
|
||||
epicsShareFunc int epicsShareAPI ca_client_status ( unsigned level );
|
||||
epicsShareFunc int epicsShareAPI ca_context_status ( struct ca_client_context *, unsigned level );
|
||||
LIBCA_API int epicsStdCall ca_client_status ( unsigned level );
|
||||
LIBCA_API int epicsStdCall ca_context_status ( struct ca_client_context *, unsigned level );
|
||||
|
||||
/*
|
||||
* deprecated
|
||||
@@ -864,16 +854,16 @@ epicsShareFunc int epicsShareAPI ca_context_status ( struct ca_client_context *,
|
||||
ca_build_and_connect(NAME, XXXXX, 1, CHIDPTR, YYYYY, 0, 0)
|
||||
#define ca_array_build(NAME,XXXXX, ZZZZZZ, CHIDPTR,YYYYY)\
|
||||
ca_build_and_connect(NAME, XXXXX, ZZZZZZ, CHIDPTR, YYYYY, 0, 0)
|
||||
epicsShareFunc int epicsShareAPI ca_build_and_connect
|
||||
( const char *pChanName, chtype, unsigned long,
|
||||
LIBCA_API int epicsStdCall ca_build_and_connect
|
||||
( const char *pChanName, chtype, unsigned long,
|
||||
chid * pChanID, void *, caCh * pFunc, void * pArg );
|
||||
#define ca_search(pChanName, pChanID)\
|
||||
ca_search_and_connect (pChanName, pChanID, 0, 0)
|
||||
epicsShareFunc int epicsShareAPI ca_search_and_connect
|
||||
( const char * pChanName, chid * pChanID,
|
||||
LIBCA_API int epicsStdCall ca_search_and_connect
|
||||
( const char * pChanName, chid * pChanID,
|
||||
caCh *pFunc, void * pArg );
|
||||
epicsShareFunc int epicsShareAPI ca_channel_status (epicsThreadId tid);
|
||||
epicsShareFunc int epicsShareAPI ca_clear_event ( evid eventID );
|
||||
LIBCA_API int epicsStdCall ca_channel_status (epicsThreadId tid);
|
||||
LIBCA_API int epicsStdCall ca_clear_event ( evid eventID );
|
||||
#define ca_add_event(type,chan,pFunc,pArg,pEventID)\
|
||||
ca_add_array_event(type,1u,chan,pFunc,pArg,0.0,0.0,0.0,pEventID)
|
||||
#define ca_add_delta_event(TYPE,CHID,ENTRY,ARG,DELTA,EVID)\
|
||||
@@ -882,7 +872,7 @@ ca_add_array_event(type,1u,chan,pFunc,pArg,0.0,0.0,0.0,pEventID)
|
||||
ca_add_array_event(TYPE,1,CHID,ENTRY,ARG,P_DELTA,N_DELTA,TO,EVID)
|
||||
#define ca_add_array_event(TYPE,COUNT,CHID,ENTRY,ARG,P_DELTA,N_DELTA,TO,EVID)\
|
||||
ca_add_masked_array_event(TYPE,COUNT,CHID,ENTRY,ARG,P_DELTA,N_DELTA,TO,EVID, DBE_VALUE | DBE_ALARM)
|
||||
epicsShareFunc int epicsShareAPI ca_add_masked_array_event
|
||||
LIBCA_API int epicsStdCall ca_add_masked_array_event
|
||||
( chtype type, unsigned long count, chid chanId, caEventCallBackFunc * pFunc,
|
||||
void * pArg, ca_real p_delta, ca_real n_delta, ca_real timeout,
|
||||
evid * pEventID, long mask );
|
||||
@@ -890,8 +880,8 @@ epicsShareFunc int epicsShareAPI ca_add_masked_array_event
|
||||
/*
|
||||
* defunct
|
||||
*/
|
||||
epicsShareFunc int epicsShareAPI ca_modify_user_name ( const char *pUserName );
|
||||
epicsShareFunc int epicsShareAPI ca_modify_host_name ( const char *pHostName );
|
||||
LIBCA_API int epicsStdCall ca_modify_user_name ( const char *pUserName );
|
||||
LIBCA_API int epicsStdCall ca_modify_host_name ( const char *pHostName );
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
@@ -900,5 +890,5 @@ epicsShareFunc int epicsShareAPI ca_modify_host_name ( const char *pHostName );
|
||||
/*
|
||||
* no additions below this endif
|
||||
*/
|
||||
#endif /* ifndef INCLcadefh */
|
||||
#endif /* ifndef INC_cadef_H */
|
||||
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
* 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.
|
||||
* SPDX-License-Identifier: EPICS
|
||||
* EPICS BASE is distributed subject to a Software License Agreement found
|
||||
* in file LICENSE that is included with this distribution.
|
||||
\*************************************************************************/
|
||||
/*
|
||||
*
|
||||
@@ -17,23 +17,15 @@
|
||||
*
|
||||
* Author: Jeffrey O. Hill
|
||||
*
|
||||
*/
|
||||
*/
|
||||
|
||||
|
||||
#ifndef INCLcaerrh
|
||||
#define INCLcaerrh
|
||||
#ifndef INC_caerr_H
|
||||
#define INC_caerr_H
|
||||
|
||||
#ifdef epicsExportSharedSymbols
|
||||
# define INCLcaerrh_accessh_epicsExportSharedSymbols
|
||||
# undef epicsExportSharedSymbols
|
||||
#endif
|
||||
#include "epicsTypes.h"
|
||||
|
||||
# include "epicsTypes.h"
|
||||
|
||||
#ifdef INCLcaerrh_accessh_epicsExportSharedSymbols
|
||||
# define epicsExportSharedSymbols
|
||||
# include "shareLib.h"
|
||||
#endif
|
||||
#include "libCaAPI.h"
|
||||
|
||||
/* CA Status Code Definitions */
|
||||
|
||||
@@ -78,9 +70,9 @@
|
||||
(CA_INSERT_MSG_NO(NUMBER) | CA_INSERT_SEVERITY(SEVERITY))
|
||||
|
||||
/*
|
||||
* In the lines below "defunct" indicates that current release
|
||||
* In the lines below "defunct" indicates that current release
|
||||
* servers and client library will not return this error code, but
|
||||
* servers on earlier releases that communicate with current clients
|
||||
* servers on earlier releases that communicate with current clients
|
||||
* might still generate exceptions with these error constants
|
||||
*/
|
||||
#define ECA_NORMAL DEFMSG(CA_K_SUCCESS, 0) /* success */
|
||||
@@ -89,10 +81,10 @@
|
||||
#define ECA_UKNSERV DEFMSG(CA_K_ERROR, 3) /* defunct */
|
||||
#define ECA_SOCK DEFMSG(CA_K_ERROR, 4) /* defunct */
|
||||
#define ECA_CONN DEFMSG(CA_K_WARNING, 5) /* defunct */
|
||||
#define ECA_ALLOCMEM DEFMSG(CA_K_WARNING, 6)
|
||||
#define ECA_ALLOCMEM DEFMSG(CA_K_WARNING, 6)
|
||||
#define ECA_UKNCHAN DEFMSG(CA_K_WARNING, 7) /* defunct */
|
||||
#define ECA_UKNFIELD DEFMSG(CA_K_WARNING, 8) /* defunct */
|
||||
#define ECA_TOLARGE DEFMSG(CA_K_WARNING, 9)
|
||||
#define ECA_TOLARGE DEFMSG(CA_K_WARNING, 9)
|
||||
#define ECA_TIMEOUT DEFMSG(CA_K_WARNING, 10)
|
||||
#define ECA_NOSUPPORT DEFMSG(CA_K_WARNING, 11) /* defunct */
|
||||
#define ECA_STRTOBIG DEFMSG(CA_K_WARNING, 12) /* defunct */
|
||||
@@ -149,9 +141,9 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
epicsShareFunc const char * epicsShareAPI ca_message(long ca_status);
|
||||
LIBCA_API const char * epicsStdCall ca_message(long ca_status);
|
||||
|
||||
epicsShareExtern const char * ca_message_text [];
|
||||
LIBCA_API extern const char * ca_message_text [];
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
* 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.
|
||||
* SPDX-License-Identifier: EPICS
|
||||
* EPICS Base is distributed subject to a Software License Agreement found
|
||||
* in file LICENSE that is included with this distribution.
|
||||
\*************************************************************************/
|
||||
|
||||
#ifndef INCLcaeventmaskh
|
||||
@@ -13,12 +13,12 @@
|
||||
|
||||
/*
|
||||
event selections
|
||||
(If any more than 8 of these are needed then update the
|
||||
select field in the event_block struct in db_event.c from
|
||||
(If any more than 8 of these are needed then update the
|
||||
select field in the event_block struct in db_event.c from
|
||||
unsigned char to unsigned short)
|
||||
|
||||
|
||||
DBE_VALUE
|
||||
DBE_VALUE
|
||||
Trigger an event when a significant change in the channel's value
|
||||
occurs. Relies on the monitor deadband field under DCT.
|
||||
|
||||
|
||||
@@ -3,12 +3,12 @@
|
||||
* 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.
|
||||
* SPDX-License-Identifier: EPICS
|
||||
* EPICS BASE is distributed subject to a Software License Agreement found
|
||||
* in file LICENSE that is included with this distribution.
|
||||
\*************************************************************************/
|
||||
|
||||
/*
|
||||
/*
|
||||
*
|
||||
* L O S A L A M O S
|
||||
* Los Alamos National Laboratory
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
#define epicsAssertAuthor "Jeff Hill johill@lanl.gov"
|
||||
|
||||
#include "envDefs.h"
|
||||
#include "envDefs.h"
|
||||
#include "errlog.h"
|
||||
#include "osiWireFormat.h"
|
||||
|
||||
@@ -40,8 +40,8 @@ public:
|
||||
void release ( void * );
|
||||
private:
|
||||
tsFreeList < class bhe, 0x100 > freeList;
|
||||
bheFreeStoreMgr ( const bheFreeStoreMgr & );
|
||||
bheFreeStoreMgr & operator = ( const bheFreeStoreMgr & );
|
||||
bheFreeStoreMgr ( const bheFreeStoreMgr & );
|
||||
bheFreeStoreMgr & operator = ( const bheFreeStoreMgr & );
|
||||
};
|
||||
|
||||
void * bheFreeStoreMgr::allocate ( size_t size )
|
||||
@@ -59,7 +59,7 @@ int main ( int argc, char ** argv )
|
||||
epicsMutex mutex;
|
||||
epicsGuard < epicsMutex > guard ( mutex );
|
||||
bheFreeStoreMgr bheFreeList;
|
||||
epicsTime programBeginTime = epicsTime::getMonotonic ();
|
||||
epicsTime programBeginTime = epicsTime::getCurrent();
|
||||
bool validCommandLine = false;
|
||||
unsigned interest = 0u;
|
||||
SOCKET sock;
|
||||
@@ -108,7 +108,7 @@ int main ( int argc, char ** argv )
|
||||
sock = epicsSocketCreate ( AF_INET, SOCK_DGRAM, IPPROTO_UDP );
|
||||
if ( sock == INVALID_SOCKET ) {
|
||||
char sockErrBuf[64];
|
||||
epicsSocketConvertErrnoToString (
|
||||
epicsSocketConvertErrnoToString (
|
||||
sockErrBuf, sizeof ( sockErrBuf ) );
|
||||
errlogPrintf ("casw: unable to create datagram socket because = \"%s\"\n",
|
||||
sockErrBuf );
|
||||
@@ -122,7 +122,7 @@ int main ( int argc, char ** argv )
|
||||
status = bind ( sock, &addr.sa, sizeof (addr) );
|
||||
if ( status < 0 ) {
|
||||
char sockErrBuf[64];
|
||||
epicsSocketConvertErrnoToString (
|
||||
epicsSocketConvertErrnoToString (
|
||||
sockErrBuf, sizeof ( sockErrBuf ) );
|
||||
epicsSocketDestroy ( sock );
|
||||
errlogPrintf ( "casw: unable to bind to an unconstrained address because = \"%s\"\n",
|
||||
@@ -134,7 +134,7 @@ int main ( int argc, char ** argv )
|
||||
status = socket_ioctl ( sock, FIONBIO, &yes );
|
||||
if ( status < 0 ) {
|
||||
char sockErrBuf[64];
|
||||
epicsSocketConvertErrnoToString (
|
||||
epicsSocketConvertErrnoToString (
|
||||
sockErrBuf, sizeof ( sockErrBuf ) );
|
||||
epicsSocketDestroy ( sock );
|
||||
errlogPrintf ( "casw: unable to set socket to nonblocking state because \"%s\"\n",
|
||||
@@ -169,7 +169,7 @@ int main ( int argc, char ** argv )
|
||||
status = socket_ioctl ( sock, FIONBIO, &no );
|
||||
if ( status < 0 ) {
|
||||
char sockErrBuf[64];
|
||||
epicsSocketConvertErrnoToString (
|
||||
epicsSocketConvertErrnoToString (
|
||||
sockErrBuf, sizeof ( sockErrBuf ) );
|
||||
epicsSocketDestroy ( sock );
|
||||
errlogPrintf ( "casw: unable to set socket to blocking state because \"%s\"\n",
|
||||
@@ -185,7 +185,7 @@ int main ( int argc, char ** argv )
|
||||
&addr.sa, &addrSize );
|
||||
if ( status <= 0 ) {
|
||||
char sockErrBuf[64];
|
||||
epicsSocketConvertErrnoToString (
|
||||
epicsSocketConvertErrnoToString (
|
||||
sockErrBuf, sizeof ( sockErrBuf ) );
|
||||
epicsSocketDestroy ( sock );
|
||||
errlogPrintf ("casw: error from recv was = \"%s\"\n",
|
||||
@@ -196,7 +196,7 @@ int main ( int argc, char ** argv )
|
||||
if ( addr.sa.sa_family != AF_INET ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
unsigned byteCount = static_cast <unsigned> ( status );
|
||||
pCurMsg = reinterpret_cast < const caHdr * > ( ( pCurBuf = buf ) );
|
||||
while ( byteCount ) {
|
||||
@@ -213,9 +213,9 @@ int main ( int argc, char ** argv )
|
||||
epicsTime previousTime;
|
||||
struct sockaddr_in ina;
|
||||
|
||||
/*
|
||||
/*
|
||||
* this allows a fan-out server to potentially
|
||||
* insert the true address of the CA server
|
||||
* insert the true address of the CA server
|
||||
*
|
||||
* old servers:
|
||||
* 1) set this field to one of the ip addresses of the host _or_
|
||||
@@ -244,7 +244,7 @@ int main ( int argc, char ** argv )
|
||||
ca_uint32_t beaconNumber = ntohl ( pCurMsg->m_cid );
|
||||
unsigned protocolRevision = ntohs ( pCurMsg->m_dataType );
|
||||
|
||||
epicsTime currentTime = epicsTime::getMonotonic();
|
||||
epicsTime currentTime = epicsTime::getCurrent();
|
||||
|
||||
/*
|
||||
* look for it in the hash table
|
||||
@@ -252,8 +252,8 @@ int main ( int argc, char ** argv )
|
||||
bhe *pBHE = beaconTable.lookup ( ina );
|
||||
if ( pBHE ) {
|
||||
previousTime = pBHE->updateTime ( guard );
|
||||
anomaly = pBHE->updatePeriod (
|
||||
guard, programBeginTime,
|
||||
anomaly = pBHE->updatePeriod (
|
||||
guard, programBeginTime,
|
||||
currentTime, beaconNumber, protocolRevision );
|
||||
}
|
||||
else {
|
||||
@@ -264,7 +264,7 @@ int main ( int argc, char ** argv )
|
||||
* time that we have seen a server's beacon
|
||||
* shortly after the program started up)
|
||||
*/
|
||||
pBHE = new ( bheFreeList )
|
||||
pBHE = new ( bheFreeList )
|
||||
bhe ( mutex, currentTime, beaconNumber, ina );
|
||||
if ( pBHE ) {
|
||||
if ( beaconTable.add ( *pBHE ) < 0 ) {
|
||||
@@ -275,7 +275,7 @@ int main ( int argc, char ** argv )
|
||||
}
|
||||
if ( anomaly || interest > 1 ) {
|
||||
char date[64];
|
||||
currentTime.strftime ( date, sizeof ( date ),
|
||||
currentTime.strftime ( date, sizeof ( date ),
|
||||
"%Y-%m-%d %H:%M:%S.%09f");
|
||||
char host[64];
|
||||
ipAddrToA ( &ina, host, sizeof ( host ) );
|
||||
@@ -288,11 +288,11 @@ int main ( int argc, char ** argv )
|
||||
pPrefix = " ";
|
||||
}
|
||||
}
|
||||
printf ( "%s%-40s %s\n",
|
||||
printf ( "%s%-40s %s\n",
|
||||
pPrefix, host, date );
|
||||
if ( anomaly && interest > 0 ) {
|
||||
printf ( "\testimate=%f current=%f\n",
|
||||
pBHE->period ( guard ),
|
||||
printf ( "\testimate=%f current=%f\n",
|
||||
pBHE->period ( guard ),
|
||||
currentTime - previousTime );
|
||||
}
|
||||
fflush(stdout);
|
||||
|
||||
@@ -3,19 +3,19 @@
|
||||
* 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.
|
||||
* SPDX-License-Identifier: EPICS
|
||||
* EPICS Base is distributed subject to a Software License Agreement found
|
||||
* in file LICENSE that is included with this distribution.
|
||||
\*************************************************************************/
|
||||
/*
|
||||
*
|
||||
* CA performance test
|
||||
* CA performance test
|
||||
*
|
||||
* History
|
||||
* History
|
||||
* joh 09-12-89 Initial release
|
||||
* joh 12-20-94 portability
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
@@ -45,7 +45,7 @@ typedef struct testItem {
|
||||
char name[128];
|
||||
int type;
|
||||
int count;
|
||||
void * pValue;
|
||||
void * pValue;
|
||||
} ti;
|
||||
|
||||
typedef void tf ( ti *pItems, unsigned iterations, unsigned *pInlineIter );
|
||||
@@ -144,7 +144,7 @@ unsigned *pInlineIter
|
||||
{
|
||||
int status;
|
||||
unsigned i;
|
||||
|
||||
|
||||
for (i=0u; i<iterations; i++) {
|
||||
status = ca_clear_channel (pItems[i].chix);
|
||||
SEVCHK (status, NULL);
|
||||
@@ -166,7 +166,7 @@ unsigned *pInlineIter
|
||||
ti *pi;
|
||||
int status;
|
||||
dbr_int_t val;
|
||||
|
||||
|
||||
for (pi=pItems; pi < &pItems[iterations]; pi++) {
|
||||
status = ca_array_put(
|
||||
pi->type,
|
||||
@@ -257,7 +257,7 @@ unsigned *pInlineIter
|
||||
{
|
||||
ti *pi;
|
||||
int status;
|
||||
|
||||
|
||||
for (pi=pItems; pi<&pItems[iterations]; pi++) {
|
||||
status = ca_array_get(
|
||||
pi->type,
|
||||
@@ -337,7 +337,7 @@ unsigned *pInlineIter
|
||||
{
|
||||
ti *pi;
|
||||
int status;
|
||||
|
||||
|
||||
for (pi=pItems; pi<&pItems[iterations]; pi++) {
|
||||
status = ca_array_get(
|
||||
pi->type,
|
||||
@@ -361,9 +361,9 @@ static void measure_get_latency (ti *pItems, unsigned iterations)
|
||||
epicsTimeStamp start_time;
|
||||
double delay;
|
||||
double X = 0u;
|
||||
double XX = 0u;
|
||||
double max = DBL_MIN;
|
||||
double min = DBL_MAX;
|
||||
double XX = 0u;
|
||||
double max = DBL_MIN;
|
||||
double min = DBL_MAX;
|
||||
double mean;
|
||||
double stdDev;
|
||||
ti *pi;
|
||||
@@ -371,7 +371,7 @@ static void measure_get_latency (ti *pItems, unsigned iterations)
|
||||
|
||||
for ( pi = pItems; pi < &pItems[iterations]; pi++ ) {
|
||||
epicsTimeGetCurrent ( &start_time );
|
||||
status = ca_array_get ( pi->type, pi->count,
|
||||
status = ca_array_get ( pi->type, pi->count,
|
||||
pi->chix, pi->pValue );
|
||||
SEVCHK ( status, NULL );
|
||||
status = ca_pend_io ( 100.0 );
|
||||
@@ -395,13 +395,13 @@ static void measure_get_latency (ti *pItems, unsigned iterations)
|
||||
|
||||
mean = X/iterations;
|
||||
stdDev = sqrt ( XX/iterations - mean*mean );
|
||||
printf (
|
||||
printf (
|
||||
"Get Latency - "
|
||||
"mean = %3.1f uS, "
|
||||
"std dev = %3.1f uS, "
|
||||
"min = %3.1f uS "
|
||||
"max = %3.1f uS\n",
|
||||
mean * 1e6, stdDev * 1e6,
|
||||
mean * 1e6, stdDev * 1e6,
|
||||
min * 1e6, max * 1e6 );
|
||||
}
|
||||
|
||||
@@ -412,9 +412,9 @@ static void printSearchStat ( const ti * pi, unsigned iterations )
|
||||
{
|
||||
unsigned i;
|
||||
double X = 0u;
|
||||
double XX = 0u;
|
||||
double max = DBL_MIN;
|
||||
double min = DBL_MAX;
|
||||
double XX = 0u;
|
||||
double max = DBL_MIN;
|
||||
double min = DBL_MAX;
|
||||
double mean;
|
||||
double stdDev;
|
||||
|
||||
@@ -432,7 +432,7 @@ static void printSearchStat ( const ti * pi, unsigned iterations )
|
||||
|
||||
mean = X / iterations;
|
||||
stdDev = sqrt( XX / iterations - mean * mean );
|
||||
printf (
|
||||
printf (
|
||||
"Search tries per chan - "
|
||||
"mean = %3.1f "
|
||||
"std dev = %3.1f "
|
||||
@@ -458,10 +458,10 @@ void timeIt ( tf *pfunc, ti *pItems, unsigned iterations,
|
||||
delay = epicsTimeDiffInSeconds ( &end_time, &start_time );
|
||||
if ( delay > 0.0 ) {
|
||||
double freq = ( iterations * inlineIter ) / delay;
|
||||
printf ( "Per Op, %8.4f uS ( %8.4f MHz )",
|
||||
printf ( "Per Op, %8.4f uS ( %8.4f MHz )",
|
||||
1e6 / freq, freq / 1e6 );
|
||||
if ( pItems != NULL ) {
|
||||
printf(", %8.4f snd Mbps, %8.4f rcv Mbps\n",
|
||||
printf(", %8.4f snd Mbps, %8.4f rcv Mbps\n",
|
||||
(inlineIter*nBytesSent*CHAR_BIT)/(delay*1e6),
|
||||
(inlineIter*nBytesRecv*CHAR_BIT)/(delay*1e6) );
|
||||
}
|
||||
@@ -479,13 +479,13 @@ static void test ( ti *pItems, unsigned iterations )
|
||||
unsigned payloadSize, dblPayloadSize;
|
||||
unsigned nBytesSent, nBytesRecv;
|
||||
|
||||
payloadSize =
|
||||
payloadSize =
|
||||
dbr_size_n ( pItems[0].type, pItems[0].count );
|
||||
payloadSize = CA_MESSAGE_ALIGN ( payloadSize );
|
||||
|
||||
dblPayloadSize = dbr_size [ DBR_DOUBLE ];
|
||||
dblPayloadSize = CA_MESSAGE_ALIGN ( dblPayloadSize );
|
||||
|
||||
|
||||
if ( payloadSize > dblPayloadSize ) {
|
||||
unsigned factor = payloadSize / dblPayloadSize;
|
||||
while ( factor ) {
|
||||
@@ -500,15 +500,15 @@ static void test ( ti *pItems, unsigned iterations )
|
||||
printf ( "\t### async put test ###\n");
|
||||
nBytesSent = sizeof ( caHdr ) + CA_MESSAGE_ALIGN( payloadSize );
|
||||
nBytesRecv = 0u;
|
||||
timeIt ( test_put, pItems, iterations,
|
||||
nBytesSent * iterations,
|
||||
timeIt ( test_put, pItems, iterations,
|
||||
nBytesSent * iterations,
|
||||
nBytesRecv * iterations );
|
||||
|
||||
printf ( "\t### async get test ###\n");
|
||||
nBytesSent = sizeof ( caHdr );
|
||||
nBytesRecv = sizeof ( caHdr ) + CA_MESSAGE_ALIGN ( payloadSize );
|
||||
timeIt ( test_get, pItems, iterations,
|
||||
nBytesSent * ( iterations ),
|
||||
timeIt ( test_get, pItems, iterations,
|
||||
nBytesSent * ( iterations ),
|
||||
nBytesRecv * ( iterations ) );
|
||||
|
||||
printf ("\t### synch get test ###\n");
|
||||
@@ -520,7 +520,7 @@ static void test ( ti *pItems, unsigned iterations )
|
||||
else if ( iterations > 10 ) {
|
||||
iterations /= 10;
|
||||
}
|
||||
timeIt ( test_wait, pItems, iterations,
|
||||
timeIt ( test_wait, pItems, iterations,
|
||||
nBytesSent * iterations,
|
||||
nBytesRecv * iterations );
|
||||
}
|
||||
@@ -528,7 +528,7 @@ static void test ( ti *pItems, unsigned iterations )
|
||||
/*
|
||||
* catime ()
|
||||
*/
|
||||
int catime ( const char * channelName,
|
||||
int catime ( const char * channelName,
|
||||
unsigned channelCount, enum appendNumberFlag appNF )
|
||||
{
|
||||
unsigned i;
|
||||
@@ -536,7 +536,7 @@ int catime ( const char * channelName,
|
||||
unsigned strsize;
|
||||
unsigned nBytesSent, nBytesRecv;
|
||||
ti *pItemList;
|
||||
|
||||
|
||||
if ( channelCount == 0 ) {
|
||||
printf ( "channel count was zero\n" );
|
||||
return 0;
|
||||
@@ -547,15 +547,15 @@ int catime ( const char * channelName,
|
||||
return -1;
|
||||
}
|
||||
|
||||
SEVCHK ( ca_context_create ( ca_disable_preemptive_callback ),
|
||||
SEVCHK ( ca_context_create ( ca_disable_preemptive_callback ),
|
||||
"Unable to initialize" );
|
||||
|
||||
if ( appNF == appendNumber ) {
|
||||
printf ( "Testing with %u channels named %snnn\n",
|
||||
printf ( "Testing with %u channels named %snnn\n",
|
||||
channelCount, channelName );
|
||||
}
|
||||
else {
|
||||
printf ( "Testing with %u channels named %s\n",
|
||||
printf ( "Testing with %u channels named %s\n",
|
||||
channelCount, channelName );
|
||||
}
|
||||
|
||||
@@ -573,7 +573,7 @@ int catime ( const char * channelName,
|
||||
pItemList[i].name[strsize]= '\0';
|
||||
pItemList[i].count = 0;
|
||||
pItemList[i].pValue = 0;
|
||||
nBytesSent += 2 * ( CA_MESSAGE_ALIGN ( strlen ( pItemList[i].name ) )
|
||||
nBytesSent += 2 * ( CA_MESSAGE_ALIGN ( strlen ( pItemList[i].name ) )
|
||||
+ sizeof (caHdr) );
|
||||
nBytesRecv += 2 * sizeof (caHdr);
|
||||
}
|
||||
@@ -582,7 +582,7 @@ int catime ( const char * channelName,
|
||||
printf ( "--------------------\n" );
|
||||
timeIt ( test_search, pItemList, channelCount, nBytesSent, nBytesRecv );
|
||||
printSearchStat ( pItemList, channelCount );
|
||||
|
||||
|
||||
for ( i = 0; i < channelCount; i++ ) {
|
||||
size_t count = ca_element_count ( pItemList[i].chix );
|
||||
size_t size = sizeof ( dbr_string_t ) * count;
|
||||
@@ -608,7 +608,7 @@ int catime ( const char * channelName,
|
||||
for ( j = 0; j < pItemList[i].count; j++ ) {
|
||||
pFltVal[j] = (dbr_float_t) val;
|
||||
}
|
||||
pItemList[i].type = DBR_FLOAT;
|
||||
pItemList[i].type = DBR_FLOAT;
|
||||
}
|
||||
printf ( "DBR_FLOAT Test\n" );
|
||||
printf ( "--------------\n" );
|
||||
@@ -621,13 +621,13 @@ int catime ( const char * channelName,
|
||||
for ( j = 0; j < pItemList[i].count; j++ ) {
|
||||
pDblVal[j] = (dbr_double_t) val;
|
||||
}
|
||||
pItemList[i].type = DBR_DOUBLE;
|
||||
pItemList[i].type = DBR_DOUBLE;
|
||||
}
|
||||
printf ( "DBR_DOUBLE Test\n" );
|
||||
printf ( "---------------\n" );
|
||||
test ( pItemList, channelCount );
|
||||
|
||||
|
||||
|
||||
for ( i = 0; i < channelCount; i++ ) {
|
||||
dbr_string_t * pStrVal = ( dbr_string_t * ) pItemList[i].pValue;
|
||||
double val = i;
|
||||
@@ -635,7 +635,7 @@ int catime ( const char * channelName,
|
||||
for ( j = 0; j < pItemList[i].count; j++ ) {
|
||||
sprintf ( pStrVal[j], "%f", val );
|
||||
}
|
||||
pItemList[i].type = DBR_STRING;
|
||||
pItemList[i].type = DBR_STRING;
|
||||
}
|
||||
printf ( "DBR_STRING Test\n" );
|
||||
printf ( "---------------\n" );
|
||||
@@ -648,7 +648,7 @@ int catime ( const char * channelName,
|
||||
for ( j = 0; j < pItemList[i].count; j++ ) {
|
||||
pIntVal[j] = (dbr_int_t) val;
|
||||
}
|
||||
pItemList[i].type = DBR_INT;
|
||||
pItemList[i].type = DBR_INT;
|
||||
}
|
||||
printf ( "DBR_INT Test\n" );
|
||||
printf ( "------------\n" );
|
||||
@@ -661,8 +661,8 @@ int catime ( const char * channelName,
|
||||
for ( j = 0; j < pItemList[i].count; j++ ) {
|
||||
pDblVal[j] = 0;
|
||||
}
|
||||
pItemList[i].type = DBR_DOUBLE;
|
||||
}
|
||||
pItemList[i].type = DBR_DOUBLE;
|
||||
}
|
||||
measure_get_latency ( pItemList, channelCount );
|
||||
|
||||
printf ( "Free Channel Test\n" );
|
||||
@@ -670,10 +670,10 @@ int catime ( const char * channelName,
|
||||
timeIt ( test_free, pItemList, channelCount, 0, 0 );
|
||||
|
||||
SEVCHK ( ca_task_exit (), "Unable to free resources at exit" );
|
||||
|
||||
|
||||
for ( i = 0; i < channelCount; i++ ) {
|
||||
free ( pItemList[i].pValue );
|
||||
}
|
||||
}
|
||||
|
||||
free ( pItemList );
|
||||
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
* 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.
|
||||
* SPDX-License-Identifier: EPICS
|
||||
* EPICS Base is distributed subject to a Software License Agreement found
|
||||
* in file LICENSE that is included with this distribution.
|
||||
\*************************************************************************/
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
@@ -3,22 +3,22 @@
|
||||
* 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.
|
||||
* SPDX-License-Identifier: EPICS
|
||||
* EPICS BASE is distributed subject to a Software License Agreement found
|
||||
* in file LICENSE that is included with this distribution.
|
||||
\*************************************************************************/
|
||||
/*
|
||||
/*
|
||||
*
|
||||
*
|
||||
*
|
||||
* L O S A L A M O S
|
||||
* Los Alamos National Laboratory
|
||||
* Los Alamos, New Mexico 87545
|
||||
*
|
||||
*
|
||||
* Copyright, 1986, The Regents of the University of California.
|
||||
*
|
||||
*
|
||||
* Author Jeffrey O. Hill
|
||||
* johill@lanl.gov
|
||||
*
|
||||
*
|
||||
* Author Jeffrey O. Hill
|
||||
* johill@lanl.gov
|
||||
*/
|
||||
|
||||
#include <stdexcept>
|
||||
@@ -33,7 +33,7 @@ bool comBuf::flushToWire ( wireSendAdapter & wire, const epicsTime & currentTime
|
||||
unsigned index = this->nextReadIndex;
|
||||
unsigned finalIndex = this->commitIndex;
|
||||
while ( index < finalIndex ) {
|
||||
unsigned nBytes = wire.sendBytes (
|
||||
unsigned nBytes = wire.sendBytes (
|
||||
&this->buf[index], finalIndex - index, currentTime );
|
||||
if ( nBytes == 0u ) {
|
||||
this->nextReadIndex = index;
|
||||
@@ -45,9 +45,9 @@ bool comBuf::flushToWire ( wireSendAdapter & wire, const epicsTime & currentTime
|
||||
return true;
|
||||
}
|
||||
|
||||
// throwing the exception from a function that isnt inline
|
||||
// throwing the exception from a function that isnt inline
|
||||
// shrinks the GNU compiled object code
|
||||
void comBuf::throwInsufficentBytesException ()
|
||||
void comBuf::throwInsufficentBytesException ()
|
||||
{
|
||||
throw comBuf::insufficentBytesAvailable ();
|
||||
}
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
* 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.
|
||||
* SPDX-License-Identifier: EPICS
|
||||
* EPICS BASE is distributed subject to a Software License Agreement found
|
||||
* in file LICENSE that is included with this distribution.
|
||||
\*************************************************************************/
|
||||
/*
|
||||
*
|
||||
@@ -17,12 +17,12 @@
|
||||
* Copyright, 1986, The Regents of the University of California.
|
||||
*
|
||||
*
|
||||
* Author Jeffrey O. Hill
|
||||
* johill@lanl.gov
|
||||
* Author Jeffrey O. Hill
|
||||
* johill@lanl.gov
|
||||
*/
|
||||
|
||||
#ifndef comBufh
|
||||
#define comBufh
|
||||
#ifndef INC_comBuf_H
|
||||
#define INC_comBuf_H
|
||||
|
||||
#include <new>
|
||||
#include <cstring>
|
||||
@@ -40,23 +40,23 @@ static const unsigned comBufSize = 0x4000;
|
||||
class comBufMemoryManager {
|
||||
public:
|
||||
virtual ~comBufMemoryManager ();
|
||||
virtual void * allocate ( size_t ) = 0;
|
||||
virtual void release ( void * ) = 0;
|
||||
virtual void * allocate ( size_t ) = 0;
|
||||
virtual void release ( void * ) = 0;
|
||||
};
|
||||
|
||||
class wireSendAdapter {
|
||||
public:
|
||||
virtual unsigned sendBytes ( const void * pBuf,
|
||||
unsigned nBytesInBuf,
|
||||
virtual unsigned sendBytes ( const void * pBuf,
|
||||
unsigned nBytesInBuf,
|
||||
const class epicsTime & currentTime ) = 0;
|
||||
protected:
|
||||
virtual ~wireSendAdapter() {}
|
||||
};
|
||||
|
||||
enum swioCircuitState {
|
||||
swioConnected,
|
||||
swioPeerHangup,
|
||||
swioPeerAbort,
|
||||
enum swioCircuitState {
|
||||
swioConnected,
|
||||
swioPeerHangup,
|
||||
swioPeerAbort,
|
||||
swioLinkFailure,
|
||||
swioLocalAbort
|
||||
};
|
||||
@@ -67,7 +67,7 @@ struct statusWireIO {
|
||||
|
||||
class wireRecvAdapter {
|
||||
public:
|
||||
virtual void recvBytes ( void * pBuf,
|
||||
virtual void recvBytes ( void * pBuf,
|
||||
unsigned nBytesInBuf, statusWireIO & ) = 0;
|
||||
protected:
|
||||
virtual ~wireRecvAdapter() {}
|
||||
@@ -106,7 +106,7 @@ public:
|
||||
template < class T >
|
||||
popStatus pop ( T & );
|
||||
static void throwInsufficentBytesException ();
|
||||
void * operator new ( size_t size,
|
||||
void * operator new ( size_t size,
|
||||
comBufMemoryManager & );
|
||||
epicsPlacementDeleteOperator (( void *, comBufMemoryManager & ))
|
||||
private:
|
||||
@@ -119,14 +119,14 @@ private:
|
||||
bool push ( const T * ); // disabled
|
||||
};
|
||||
|
||||
inline void * comBuf::operator new ( size_t size,
|
||||
inline void * comBuf::operator new ( size_t size,
|
||||
comBufMemoryManager & mgr )
|
||||
{
|
||||
return mgr.allocate ( size );
|
||||
}
|
||||
|
||||
|
||||
#ifdef CXX_PLACEMENT_DELETE
|
||||
inline void comBuf::operator delete ( void * pCadaver,
|
||||
inline void comBuf::operator delete ( void * pCadaver,
|
||||
comBufMemoryManager & mgr )
|
||||
{
|
||||
mgr.release ( pCadaver );
|
||||
@@ -162,8 +162,8 @@ inline unsigned comBuf :: uncommittedBytes () const
|
||||
|
||||
inline unsigned comBuf :: push ( comBuf & bufIn )
|
||||
{
|
||||
unsigned nBytes = this->copyInBytes (
|
||||
& bufIn.buf[ bufIn.nextReadIndex ],
|
||||
unsigned nBytes = this->copyInBytes (
|
||||
& bufIn.buf[ bufIn.nextReadIndex ],
|
||||
bufIn.commitIndex - bufIn.nextReadIndex );
|
||||
bufIn.nextReadIndex += nBytes;
|
||||
return nBytes;
|
||||
@@ -174,11 +174,11 @@ inline unsigned comBuf :: capacityBytes ()
|
||||
return comBufSize;
|
||||
}
|
||||
|
||||
inline void comBuf :: fillFromWire (
|
||||
inline void comBuf :: fillFromWire (
|
||||
wireRecvAdapter & wire, statusWireIO & stat )
|
||||
{
|
||||
wire.recvBytes (
|
||||
& this->buf[this->nextWriteIndex],
|
||||
wire.recvBytes (
|
||||
& this->buf[this->nextWriteIndex],
|
||||
sizeof ( this->buf ) - this->nextWriteIndex, stat );
|
||||
if ( stat.circuitState == swioConnected ) {
|
||||
this->nextWriteIndex += stat.bytesCopied;
|
||||
@@ -332,4 +332,4 @@ comBuf :: popStatus comBuf :: pop ( T & returnVal )
|
||||
return status;
|
||||
}
|
||||
|
||||
#endif // ifndef comBufh
|
||||
#endif // ifndef INC_comBuf_H
|
||||
|
||||
@@ -3,11 +3,11 @@
|
||||
* 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.
|
||||
* SPDX-License-Identifier: EPICS
|
||||
* EPICS BASE is distributed subject to a Software License Agreement found
|
||||
* in file LICENSE that is included with this distribution.
|
||||
\*************************************************************************/
|
||||
/*
|
||||
/*
|
||||
*
|
||||
*
|
||||
* L O S A L A M O S
|
||||
@@ -26,8 +26,8 @@
|
||||
#include "iocinf.h"
|
||||
#include "virtualCircuit.h"
|
||||
|
||||
comQueRecv::comQueRecv ( comBufMemoryManager & comBufMemoryManagerIn ):
|
||||
comBufMemMgr ( comBufMemoryManagerIn ), nBytesPending ( 0u )
|
||||
comQueRecv::comQueRecv ( comBufMemoryManager & comBufMemoryManagerIn ):
|
||||
comBufMemMgr ( comBufMemoryManagerIn ), nBytesPending ( 0u )
|
||||
{
|
||||
}
|
||||
|
||||
@@ -101,7 +101,7 @@ void comQueRecv::popString ( epicsOldString *pStr )
|
||||
}
|
||||
|
||||
void comQueRecv::pushLastComBufReceived ( comBuf & bufIn )
|
||||
|
||||
|
||||
{
|
||||
bufIn.commitIncomming ();
|
||||
comBuf * pComBuf = this->bufs.last ();
|
||||
@@ -172,7 +172,7 @@ void comQueRecv::removeAndDestroyBuf ( comBuf & buf )
|
||||
this->comBufMemMgr.release ( & buf );
|
||||
}
|
||||
|
||||
epicsUInt8 comQueRecv::popUInt8 ()
|
||||
epicsUInt8 comQueRecv::popUInt8 ()
|
||||
{
|
||||
comBuf * pComBuf = this->bufs.first ();
|
||||
if ( ! pComBuf ) {
|
||||
|
||||
@@ -3,28 +3,28 @@
|
||||
* 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.
|
||||
* SPDX-License-Identifier: EPICS
|
||||
* EPICS BASE is distributed subject to a Software License Agreement found
|
||||
* in file LICENSE that is included with this distribution.
|
||||
\*************************************************************************/
|
||||
|
||||
/*
|
||||
/*
|
||||
*
|
||||
*
|
||||
*
|
||||
* L O S A L A M O S
|
||||
* Los Alamos National Laboratory
|
||||
* Los Alamos, New Mexico 87545
|
||||
*
|
||||
*
|
||||
* Copyright, 1986, The Regents of the University of California.
|
||||
*
|
||||
*
|
||||
* Author Jeffrey O. Hill
|
||||
* johill@lanl.gov
|
||||
* 505 665 1831
|
||||
*
|
||||
*
|
||||
* Author Jeffrey O. Hill
|
||||
* johill@lanl.gov
|
||||
* 505 665 1831
|
||||
*/
|
||||
|
||||
#ifndef comQueRecvh
|
||||
#define comQueRecvh
|
||||
#ifndef INC_comQueRecv_H
|
||||
#define INC_comQueRecv_H
|
||||
|
||||
#include "comBuf.h"
|
||||
|
||||
@@ -54,8 +54,8 @@ private:
|
||||
epicsUInt16 multiBufferPopUInt16 ();
|
||||
epicsUInt32 multiBufferPopUInt32 ();
|
||||
void removeAndDestroyBuf ( comBuf & );
|
||||
comQueRecv ( const comQueRecv & );
|
||||
comQueRecv & operator = ( const comQueRecv & );
|
||||
comQueRecv ( const comQueRecv & );
|
||||
comQueRecv & operator = ( const comQueRecv & );
|
||||
};
|
||||
|
||||
inline unsigned comQueRecv::occupiedBytes () const
|
||||
@@ -108,4 +108,4 @@ inline epicsFloat64 comQueRecv::popFloat64 ()
|
||||
return AlignedWireRef < epicsFloat64 > ( tmp._fp );
|
||||
}
|
||||
|
||||
#endif // ifndef comQueRecvh
|
||||
#endif // ifndef INC_comQueRecv_H
|
||||
|
||||
@@ -3,23 +3,23 @@
|
||||
* 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.
|
||||
* SPDX-License-Identifier: EPICS
|
||||
* EPICS BASE is distributed subject to a Software License Agreement found
|
||||
* in file LICENSE that is included with this distribution.
|
||||
\*************************************************************************/
|
||||
|
||||
/*
|
||||
/*
|
||||
*
|
||||
*
|
||||
*
|
||||
* L O S A L A M O S
|
||||
* Los Alamos National Laboratory
|
||||
* Los Alamos, New Mexico 87545
|
||||
*
|
||||
*
|
||||
* Copyright, 1986, The Regents of the University of California.
|
||||
*
|
||||
*
|
||||
* Author Jeffrey O. Hill
|
||||
* johill@lanl.gov
|
||||
*
|
||||
*
|
||||
* Author Jeffrey O. Hill
|
||||
* johill@lanl.gov
|
||||
*/
|
||||
|
||||
//
|
||||
@@ -35,7 +35,7 @@
|
||||
// a connection dropped.
|
||||
// 4) Do not allocate too much memory in exception situatons (such as
|
||||
// after a circuit disconnect).
|
||||
// 5) Avoid allocating more memory than is absolutely necessary to meet
|
||||
// 5) Avoid allocating more memory than is absolutely necessary to meet
|
||||
// the above requirements.
|
||||
// 6) Message fragments must never be sent to the IOC when there isnt
|
||||
// enough memory to queue part of a message (we also must not force
|
||||
@@ -44,7 +44,7 @@
|
||||
// protocol stream.
|
||||
//
|
||||
// Implementation:
|
||||
// 1) When queuing a complete message, first test to see if a flush is
|
||||
// 1) When queuing a complete message, first test to see if a flush is
|
||||
// required. If it is a receive thread scheduals the flush with the
|
||||
// send thread, and otherwise directly execute the system call. The
|
||||
// send thread must run at a higher priority than the receive thread
|
||||
@@ -52,14 +52,14 @@
|
||||
// 2) Preallocate space for the entire message prior to copying in the
|
||||
// message so that message fragments are not flushed out just prior
|
||||
// to detecting that memory is unavailable.
|
||||
// 3) Return a special error constant when the following situations
|
||||
// 3) Return a special error constant when the following situations
|
||||
// are detected when the user is attempting to queue a request
|
||||
// from within a user callback executed by a receive thread:
|
||||
// a) A user is queuing more requests that demand a response from a
|
||||
// a) A user is queuing more requests that demand a response from a
|
||||
// callback than are removed by the response that initiated the
|
||||
// callback, and this situation persists for many callbacks until
|
||||
// all buffering in the system is exausted.
|
||||
// b) A user is queuing many requests that demand a response from one
|
||||
// b) A user is queuing many requests that demand a response from one
|
||||
// callback until all buffering in the system is exausted.
|
||||
// c) Some combination of both (a) nad (b).
|
||||
//
|
||||
@@ -67,21 +67,20 @@
|
||||
|
||||
#define epicsAssertAuthor "Jeff Hill johill@lanl.gov"
|
||||
|
||||
#define epicsExportSharedSymbols
|
||||
#include "iocinf.h"
|
||||
#include "virtualCircuit.h"
|
||||
#include "db_access.h" // for dbr_short_t etc
|
||||
|
||||
// nill message alignment pad bytes
|
||||
const char cacNillBytes [] =
|
||||
{
|
||||
const char cacNillBytes [] =
|
||||
{
|
||||
0, 0, 0, 0,
|
||||
0, 0, 0, 0
|
||||
};
|
||||
|
||||
comQueSend::comQueSend ( wireSendAdapter & wireIn,
|
||||
comQueSend::comQueSend ( wireSendAdapter & wireIn,
|
||||
comBufMemoryManager & comBufMemMgrIn ):
|
||||
comBufMemMgr ( comBufMemMgrIn ), wire ( wireIn ),
|
||||
comBufMemMgr ( comBufMemMgrIn ), wire ( wireIn ),
|
||||
nBytesPending ( 0u )
|
||||
{
|
||||
}
|
||||
@@ -91,7 +90,7 @@ comQueSend::~comQueSend ()
|
||||
this->clear ();
|
||||
}
|
||||
|
||||
void comQueSend::clear ()
|
||||
void comQueSend::clear ()
|
||||
{
|
||||
comBuf *pBuf;
|
||||
|
||||
@@ -181,32 +180,32 @@ const comQueSend::copyScalarFunc_t comQueSend::dbrCopyScalar [39] = {
|
||||
&comQueSend::copy_dbr_invalid // DBR_CLASS_NAME
|
||||
};
|
||||
|
||||
void comQueSend::copy_dbr_string ( const void *pValue, unsigned nElem )
|
||||
void comQueSend::copy_dbr_string ( const void *pValue, unsigned nElem )
|
||||
{
|
||||
this->push ( static_cast < const char * > ( pValue ), nElem * MAX_STRING_SIZE );
|
||||
}
|
||||
|
||||
void comQueSend::copy_dbr_short ( const void *pValue, unsigned nElem )
|
||||
void comQueSend::copy_dbr_short ( const void *pValue, unsigned nElem )
|
||||
{
|
||||
this->push ( static_cast <const dbr_short_t *> ( pValue ), nElem );
|
||||
}
|
||||
|
||||
void comQueSend::copy_dbr_float ( const void *pValue, unsigned nElem )
|
||||
void comQueSend::copy_dbr_float ( const void *pValue, unsigned nElem )
|
||||
{
|
||||
this->push ( static_cast <const dbr_float_t *> ( pValue ), nElem );
|
||||
}
|
||||
|
||||
void comQueSend::copy_dbr_char ( const void *pValue, unsigned nElem )
|
||||
void comQueSend::copy_dbr_char ( const void *pValue, unsigned nElem )
|
||||
{
|
||||
this->push ( static_cast <const dbr_char_t *> ( pValue ), nElem );
|
||||
}
|
||||
|
||||
void comQueSend::copy_dbr_long ( const void *pValue, unsigned nElem )
|
||||
void comQueSend::copy_dbr_long ( const void *pValue, unsigned nElem )
|
||||
{
|
||||
this->push ( static_cast <const dbr_long_t *> ( pValue ), nElem );
|
||||
}
|
||||
|
||||
void comQueSend::copy_dbr_double ( const void *pValue, unsigned nElem )
|
||||
void comQueSend::copy_dbr_double ( const void *pValue, unsigned nElem )
|
||||
{
|
||||
this->push ( static_cast <const dbr_double_t *> ( pValue ), nElem );
|
||||
}
|
||||
@@ -258,7 +257,7 @@ const comQueSend::copyVectorFunc_t comQueSend::dbrCopyVector [39] = {
|
||||
&comQueSend::copy_dbr_invalid // DBR_CLASS_NAME
|
||||
};
|
||||
|
||||
comBuf * comQueSend::popNextComBufToSend ()
|
||||
comBuf * comQueSend::popNextComBufToSend ()
|
||||
{
|
||||
comBuf *pBuf = this->bufs.get ();
|
||||
if ( pBuf ) {
|
||||
@@ -279,9 +278,9 @@ comBuf * comQueSend::popNextComBufToSend ()
|
||||
}
|
||||
|
||||
void comQueSend::insertRequestHeader (
|
||||
ca_uint16_t request, ca_uint32_t payloadSize,
|
||||
ca_uint16_t dataType, ca_uint32_t nElem, ca_uint32_t cid,
|
||||
ca_uint32_t requestDependent, bool v49Ok )
|
||||
ca_uint16_t request, ca_uint32_t payloadSize,
|
||||
ca_uint16_t dataType, ca_uint32_t nElem, ca_uint32_t cid,
|
||||
ca_uint32_t requestDependent, bool v49Ok )
|
||||
{
|
||||
if ( payloadSize < 0xffff && nElem < 0xffff ) {
|
||||
comBuf * pComBuf = this->bufs.last ();
|
||||
@@ -289,12 +288,12 @@ void comQueSend::insertRequestHeader (
|
||||
pComBuf = newComBuf ();
|
||||
this->pushComBuf ( *pComBuf );
|
||||
}
|
||||
pComBuf->push ( request );
|
||||
pComBuf->push ( static_cast < ca_uint16_t > ( payloadSize ) );
|
||||
pComBuf->push ( dataType );
|
||||
pComBuf->push ( static_cast < ca_uint16_t > ( nElem ) );
|
||||
pComBuf->push ( cid );
|
||||
pComBuf->push ( requestDependent );
|
||||
pComBuf->push ( request );
|
||||
pComBuf->push ( static_cast < ca_uint16_t > ( payloadSize ) );
|
||||
pComBuf->push ( dataType );
|
||||
pComBuf->push ( static_cast < ca_uint16_t > ( nElem ) );
|
||||
pComBuf->push ( cid );
|
||||
pComBuf->push ( requestDependent );
|
||||
}
|
||||
else if ( v49Ok ) {
|
||||
comBuf * pComBuf = this->bufs.last ();
|
||||
@@ -302,14 +301,14 @@ void comQueSend::insertRequestHeader (
|
||||
pComBuf = newComBuf ();
|
||||
this->pushComBuf ( *pComBuf );
|
||||
}
|
||||
pComBuf->push ( request );
|
||||
pComBuf->push ( static_cast < ca_uint16_t > ( 0xffff ) );
|
||||
pComBuf->push ( dataType );
|
||||
pComBuf->push ( static_cast < ca_uint16_t > ( 0u ) );
|
||||
pComBuf->push ( cid );
|
||||
pComBuf->push ( requestDependent );
|
||||
pComBuf->push ( payloadSize );
|
||||
pComBuf->push ( nElem );
|
||||
pComBuf->push ( request );
|
||||
pComBuf->push ( static_cast < ca_uint16_t > ( 0xffff ) );
|
||||
pComBuf->push ( dataType );
|
||||
pComBuf->push ( static_cast < ca_uint16_t > ( 0u ) );
|
||||
pComBuf->push ( cid );
|
||||
pComBuf->push ( requestDependent );
|
||||
pComBuf->push ( payloadSize );
|
||||
pComBuf->push ( nElem );
|
||||
}
|
||||
else {
|
||||
throw cacChannel::outOfBounds ();
|
||||
@@ -317,9 +316,9 @@ void comQueSend::insertRequestHeader (
|
||||
}
|
||||
|
||||
void comQueSend::insertRequestWithPayLoad (
|
||||
ca_uint16_t request, unsigned dataType, arrayElementCount nElem,
|
||||
ca_uint32_t cid, ca_uint32_t requestDependent,
|
||||
const void * pPayload, bool v49Ok )
|
||||
ca_uint16_t request, unsigned dataType, arrayElementCount nElem,
|
||||
ca_uint32_t cid, ca_uint32_t requestDependent,
|
||||
const void * pPayload, bool v49Ok )
|
||||
{
|
||||
if ( INVALID_DB_REQ ( dataType ) ) {
|
||||
throw cacChannel::badType ();
|
||||
@@ -337,16 +336,16 @@ void comQueSend::insertRequestWithPayLoad (
|
||||
throw cacChannel::outOfBounds();
|
||||
}
|
||||
payloadSize = CA_MESSAGE_ALIGN ( size );
|
||||
this->insertRequestHeader ( request, payloadSize,
|
||||
static_cast <ca_uint16_t> ( dataType ),
|
||||
this->insertRequestHeader ( request, payloadSize,
|
||||
static_cast <ca_uint16_t> ( dataType ),
|
||||
nElem, cid, requestDependent, v49Ok );
|
||||
this->pushString ( pStr, size );
|
||||
this->pushString ( pStr, size );
|
||||
}
|
||||
else {
|
||||
size = dbr_size[dataType];
|
||||
payloadSize = CA_MESSAGE_ALIGN ( size );
|
||||
this->insertRequestHeader ( request, payloadSize,
|
||||
static_cast <ca_uint16_t> ( dataType ),
|
||||
this->insertRequestHeader ( request, payloadSize,
|
||||
static_cast <ca_uint16_t> ( dataType ),
|
||||
nElem, cid, requestDependent, v49Ok );
|
||||
( this->*dbrCopyScalar [dataType] ) ( pPayload );
|
||||
}
|
||||
@@ -357,22 +356,22 @@ void comQueSend::insertRequestWithPayLoad (
|
||||
maxBytes = 0xffffffff;
|
||||
}
|
||||
else {
|
||||
maxBytes = MAX_TCP - sizeof ( caHdr );
|
||||
maxBytes = MAX_TCP - sizeof ( caHdr );
|
||||
}
|
||||
arrayElementCount maxElem =
|
||||
( maxBytes - sizeof (dbr_double_t) - dbr_size[dataType] ) /
|
||||
arrayElementCount maxElem =
|
||||
( maxBytes - sizeof (dbr_double_t) - dbr_size[dataType] ) /
|
||||
dbr_value_size[dataType];
|
||||
if ( nElem >= maxElem ) {
|
||||
throw cacChannel::outOfBounds();
|
||||
}
|
||||
// the above checks verify that the total size
|
||||
// is lest that 0xffffffff
|
||||
size = static_cast < ca_uint32_t >
|
||||
size = static_cast < ca_uint32_t >
|
||||
( dbr_size_n ( dataType, nElem ) );
|
||||
payloadSize = CA_MESSAGE_ALIGN ( size );
|
||||
this->insertRequestHeader ( request, payloadSize,
|
||||
static_cast <ca_uint16_t> ( dataType ),
|
||||
static_cast < ca_uint32_t > ( nElem ),
|
||||
this->insertRequestHeader ( request, payloadSize,
|
||||
static_cast <ca_uint16_t> ( dataType ),
|
||||
static_cast < ca_uint32_t > ( nElem ),
|
||||
cid, requestDependent, v49Ok );
|
||||
( this->*dbrCopyVector [dataType] ) ( pPayload, nElem );
|
||||
}
|
||||
@@ -383,7 +382,7 @@ void comQueSend::insertRequestWithPayLoad (
|
||||
}
|
||||
}
|
||||
|
||||
void comQueSend::commitMsg ()
|
||||
void comQueSend::commitMsg ()
|
||||
{
|
||||
while ( this->pFirstUncommited.valid() ) {
|
||||
this->nBytesPending += this->pFirstUncommited->uncommittedBytes ();
|
||||
|
||||
@@ -3,31 +3,31 @@
|
||||
* 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.
|
||||
* SPDX-License-Identifier: EPICS
|
||||
* EPICS BASE is distributed subject to a Software License Agreement found
|
||||
* in file LICENSE that is included with this distribution.
|
||||
\*************************************************************************/
|
||||
|
||||
|
||||
/*
|
||||
/*
|
||||
*
|
||||
*
|
||||
*
|
||||
* L O S A L A M O S
|
||||
* Los Alamos National Laboratory
|
||||
* Los Alamos, New Mexico 87545
|
||||
*
|
||||
*
|
||||
* Copyright, 1986, The Regents of the University of California.
|
||||
*
|
||||
*
|
||||
* Author Jeffrey O. Hill
|
||||
* johill@lanl.gov
|
||||
* 505 665 1831
|
||||
*
|
||||
*
|
||||
* Author Jeffrey O. Hill
|
||||
* johill@lanl.gov
|
||||
* 505 665 1831
|
||||
*/
|
||||
|
||||
#ifndef comQueSendh
|
||||
#define comQueSendh
|
||||
#ifndef INC_comQueSend_H
|
||||
#define INC_comQueSend_H
|
||||
|
||||
#include <new>
|
||||
#include <new>
|
||||
|
||||
#include "tsDLList.h"
|
||||
#include "comBuf.h"
|
||||
@@ -39,7 +39,7 @@ template < class T > class epicsGuard;
|
||||
|
||||
class comQueSendMsgMinder {
|
||||
public:
|
||||
comQueSendMsgMinder (
|
||||
comQueSendMsgMinder (
|
||||
class comQueSend &, epicsGuard < epicsMutex > & );
|
||||
~comQueSendMsgMinder ();
|
||||
void commit ();
|
||||
@@ -56,20 +56,20 @@ public:
|
||||
comQueSend ( wireSendAdapter &, comBufMemoryManager & );
|
||||
~comQueSend ();
|
||||
void clear ();
|
||||
unsigned occupiedBytes () const;
|
||||
unsigned occupiedBytes () const;
|
||||
bool flushEarlyThreshold ( unsigned nBytesThisMsg ) const;
|
||||
bool flushBlockThreshold () const;
|
||||
bool flushBlockThreshold () const;
|
||||
void pushUInt16 ( const ca_uint16_t value );
|
||||
void pushUInt32 ( const ca_uint32_t value );
|
||||
void pushFloat32 ( const ca_float32_t value );
|
||||
void pushString ( const char *pVal, unsigned nChar );
|
||||
void insertRequestHeader (
|
||||
ca_uint16_t request, ca_uint32_t payloadSize,
|
||||
ca_uint16_t dataType, ca_uint32_t nElem, ca_uint32_t cid,
|
||||
void insertRequestHeader (
|
||||
ca_uint16_t request, ca_uint32_t payloadSize,
|
||||
ca_uint16_t dataType, ca_uint32_t nElem, ca_uint32_t cid,
|
||||
ca_uint32_t requestDependent, bool v49Ok );
|
||||
void insertRequestWithPayLoad (
|
||||
ca_uint16_t request, unsigned dataType, arrayElementCount nElem,
|
||||
ca_uint32_t cid, ca_uint32_t requestDependent,
|
||||
ca_uint16_t request, unsigned dataType, arrayElementCount nElem,
|
||||
ca_uint32_t cid, ca_uint32_t requestDependent,
|
||||
const void * pPayload, bool v49Ok );
|
||||
comBuf * popNextComBufToSend ();
|
||||
private:
|
||||
@@ -79,43 +79,43 @@ private:
|
||||
wireSendAdapter & wire;
|
||||
unsigned nBytesPending;
|
||||
|
||||
typedef void ( comQueSend::*copyScalarFunc_t ) (
|
||||
typedef void ( comQueSend::*copyScalarFunc_t ) (
|
||||
const void * pValue );
|
||||
static const copyScalarFunc_t dbrCopyScalar [comQueSendCopyDispatchSize];
|
||||
void copy_dbr_string ( const void * pValue );
|
||||
void copy_dbr_short ( const void * pValue );
|
||||
void copy_dbr_float ( const void * pValue );
|
||||
void copy_dbr_char ( const void * pValue );
|
||||
void copy_dbr_long ( const void * pValue );
|
||||
void copy_dbr_double ( const void * pValue );
|
||||
void copy_dbr_short ( const void * pValue );
|
||||
void copy_dbr_float ( const void * pValue );
|
||||
void copy_dbr_char ( const void * pValue );
|
||||
void copy_dbr_long ( const void * pValue );
|
||||
void copy_dbr_double ( const void * pValue );
|
||||
void copy_dbr_invalid ( const void * pValue );
|
||||
|
||||
typedef void ( comQueSend::*copyVectorFunc_t ) (
|
||||
typedef void ( comQueSend::*copyVectorFunc_t ) (
|
||||
const void * pValue, unsigned nElem );
|
||||
static const copyVectorFunc_t dbrCopyVector [comQueSendCopyDispatchSize];
|
||||
void copy_dbr_string ( const void *pValue, unsigned nElem );
|
||||
void copy_dbr_short ( const void *pValue, unsigned nElem );
|
||||
void copy_dbr_float ( const void *pValue, unsigned nElem );
|
||||
void copy_dbr_char ( const void *pValue, unsigned nElem );
|
||||
void copy_dbr_long ( const void *pValue, unsigned nElem );
|
||||
void copy_dbr_double ( const void *pValue, unsigned nElem );
|
||||
void copy_dbr_short ( const void *pValue, unsigned nElem );
|
||||
void copy_dbr_float ( const void *pValue, unsigned nElem );
|
||||
void copy_dbr_char ( const void *pValue, unsigned nElem );
|
||||
void copy_dbr_long ( const void *pValue, unsigned nElem );
|
||||
void copy_dbr_double ( const void *pValue, unsigned nElem );
|
||||
void copy_dbr_invalid ( const void * pValue, unsigned nElem );
|
||||
|
||||
void pushComBuf ( comBuf & );
|
||||
comBuf * newComBuf ();
|
||||
void pushComBuf ( comBuf & );
|
||||
comBuf * newComBuf ();
|
||||
|
||||
void beginMsg ();
|
||||
void commitMsg ();
|
||||
void beginMsg ();
|
||||
void commitMsg ();
|
||||
void clearUncommitedMsg ();
|
||||
|
||||
friend class comQueSendMsgMinder;
|
||||
|
||||
//
|
||||
// visual C++ versions 6 & 7 do not allow out of
|
||||
// visual C++ versions 6 & 7 do not allow out of
|
||||
// class member template function definition
|
||||
//
|
||||
template < class T >
|
||||
inline void push ( const T *pVal, const unsigned nElem )
|
||||
inline void push ( const T *pVal, const unsigned nElem )
|
||||
{
|
||||
comBuf * pLastBuf = this->bufs.last ();
|
||||
unsigned nCopied;
|
||||
@@ -127,18 +127,18 @@ private:
|
||||
}
|
||||
while ( nElem > nCopied ) {
|
||||
comBuf * pComBuf = newComBuf ();
|
||||
nCopied += pComBuf->push
|
||||
nCopied += pComBuf->push
|
||||
( &pVal[nCopied], nElem - nCopied );
|
||||
this->pushComBuf ( *pComBuf );
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// visual C++ versions 6 and 7 do not allow out of
|
||||
// visual C++ versions 6 and 7 do not allow out of
|
||||
// class member template function definition
|
||||
//
|
||||
template < class T >
|
||||
inline void push ( const T & val )
|
||||
inline void push ( const T & val )
|
||||
{
|
||||
comBuf * pComBuf = this->bufs.last ();
|
||||
if ( pComBuf && pComBuf->push ( val ) ) {
|
||||
@@ -159,8 +159,8 @@ private:
|
||||
|
||||
extern const char cacNillBytes[];
|
||||
|
||||
inline comQueSendMsgMinder::comQueSendMsgMinder (
|
||||
class comQueSend & sendQueIn, epicsGuard < epicsMutex > & ) :
|
||||
inline comQueSendMsgMinder::comQueSendMsgMinder (
|
||||
class comQueSend & sendQueIn, epicsGuard < epicsMutex > & ) :
|
||||
pSendQue ( & sendQueIn )
|
||||
{
|
||||
sendQueIn.beginMsg ();
|
||||
@@ -181,32 +181,32 @@ inline void comQueSendMsgMinder::commit ()
|
||||
}
|
||||
}
|
||||
|
||||
inline void comQueSend::beginMsg ()
|
||||
inline void comQueSend::beginMsg ()
|
||||
{
|
||||
this->pFirstUncommited = this->bufs.lastIter ();
|
||||
}
|
||||
|
||||
inline void comQueSend::pushUInt16 ( const ca_uint16_t value )
|
||||
inline void comQueSend::pushUInt16 ( const ca_uint16_t value )
|
||||
{
|
||||
this->push ( value );
|
||||
}
|
||||
|
||||
inline void comQueSend::pushUInt32 ( const ca_uint32_t value )
|
||||
inline void comQueSend::pushUInt32 ( const ca_uint32_t value )
|
||||
{
|
||||
this->push ( value );
|
||||
}
|
||||
|
||||
inline void comQueSend::pushFloat32 ( const ca_float32_t value )
|
||||
inline void comQueSend::pushFloat32 ( const ca_float32_t value )
|
||||
{
|
||||
this->push ( value );
|
||||
}
|
||||
|
||||
inline void comQueSend::pushString ( const char *pVal, unsigned nChar )
|
||||
inline void comQueSend::pushString ( const char *pVal, unsigned nChar )
|
||||
{
|
||||
this->push ( pVal, nChar );
|
||||
}
|
||||
|
||||
inline void comQueSend::pushComBuf ( comBuf & cb )
|
||||
inline void comQueSend::pushComBuf ( comBuf & cb )
|
||||
{
|
||||
this->bufs.add ( cb );
|
||||
if ( ! this->pFirstUncommited.valid() ) {
|
||||
@@ -214,7 +214,7 @@ inline void comQueSend::pushComBuf ( comBuf & cb )
|
||||
}
|
||||
}
|
||||
|
||||
inline unsigned comQueSend::occupiedBytes () const
|
||||
inline unsigned comQueSend::occupiedBytes () const
|
||||
{
|
||||
return this->nBytesPending;
|
||||
}
|
||||
@@ -235,4 +235,4 @@ inline comBuf * comQueSend::newComBuf ()
|
||||
return new ( this->comBufMemMgr ) comBuf;
|
||||
}
|
||||
|
||||
#endif // ifndef comQueSendh
|
||||
#endif // ifndef INC_comQueSend_H
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user