Compare commits

...

581 Commits

Author SHA1 Message Date
Andrew Johnson
e785d8748f Set version 7.0.1-pre1 in CONFIG_BASE_VERSION 2017-11-16 11:55:09 -06:00
Andrew Johnson
8c074d0ecf Final submodule update before 7.0.1-pre1 2017-11-16 11:49:05 -06:00
Andrew Johnson
7afb789b41 Module updates 2017-11-15 23:35:56 -06:00
Andrew Johnson
e64fe15abc Update submodule 2017-11-15 10:30:54 -06:00
Andrew Johnson
260d43b9bc Adjust RELEASE.local generation for Windows
On Windows, neither the shell nor echo will strip double-quote
characters from the command-line, so just leave them out.
2017-11-15 10:30:14 -06:00
Andrew Johnson
b690e5abbd Move tool configs into module cfg/CONFIG* files 2017-11-14 23:41:20 -06:00
Andrew Johnson
ba2ff4993f Submodule updates 2017-11-14 21:39:32 -06:00
Andrew Johnson
33852b1e90 Adjust pvAccess dependencies 2017-11-14 21:36:40 -06:00
Andrew Johnson
202fbe4ffb Submodule build configuration fixes
Remove modules/RELEASE.local from repository,
create it at run-time instead of RELEASE.base.
2017-11-14 20:49:54 -06:00
Michael Davidsaver
7b71cbee7a modules/pva2pva: enable string array and fit put 2017-11-14 14:25:39 -06:00
Michael Davidsaver
a1f633fe27 add make-tar.sh 2017-11-14 13:29:00 -06:00
Andrew Johnson
75cdab3c17 Update modules 2017-11-12 00:29:12 -06:00
Andrew Johnson
5b66efb0e4 Merge installEpics.pl change into core/master 2017-11-11 18:42:37 -06:00
Andrew Johnson
f36ce8ca3d Merge 3.16 into 3.17 2017-11-11 18:17:54 -06:00
Andrew Johnson
aebfe587d8 Merge installEpics.pl fix from 3.15 into 3.16 2017-11-11 18:04:46 -06:00
Andrew Johnson
031e755303 installEpics.pl: Make temporary install filename more different
A parallel build was seen matching the temporary name in a wildcard.
Now the temporary name both starts and ends differently.
2017-11-11 18:00:57 -06:00
Andrew Johnson
2462e09319 Update modules 2017-11-10 15:29:36 -06:00
Andrew Johnson
1d732b3a92 Update modules 2017-11-07 22:44:04 -06:00
Andrew Johnson
716d297c85 Merge development branches into core/master 2017-11-07 21:28:01 -06:00
Andrew Johnson
c4c7bff625 Update PVA modules 2017-11-07 20:20:35 -06:00
Andrew Johnson
5e5e56b39a Restore dbVerify() to dbStaticLib 2017-11-07 17:54:50 -06:00
Michael Davidsaver
ed43284bce update PVD, PVA, and P2P
PVA fixes server issue with async getField() and lots of cleanup.

P2P fixes lock order issue with PDB monitor lists
2017-11-06 18:29:58 -06:00
Andrew Johnson
782b15ff4f Update modules pvData and pva2pva 2017-11-03 11:03:44 -05:00
Andrew Johnson
e569730acc modules/Makefile fix: Replace spaces with tab character
Also adds modules/RELEASE.base to .gitignore
2017-11-03 11:00:49 -05:00
Ralph Lange
75479e1a10 modules: fix creation of absolute EPICS_BASE (d7cda55d) 2017-11-03 09:26:28 +01:00
Andrew Johnson
94628f59f2 Merge branch 'monotonictime' into 3.17 2017-11-02 17:32:46 -05:00
Andrew Johnson
924e11a8bc rsrv: Fix include list for Windows builds
For some reason epicsExport.h doesn't work here, we have to
explicitly define epicsExportSharedSymbols and them pull in
epicsExport.h separately later. Must be something to do with
the #undef and redef that goes on in server.h
2017-11-02 17:08:42 -05:00
Andrew Johnson
2237061c85 Merge branch 'impr-sim-mode-2' into 3.17 2017-11-02 16:37:42 -05:00
Andrew Johnson
7fc6639bfa Merged branch 'rsrv-register' into 3.17 2017-11-02 14:45:05 -05:00
Andrew Johnson
2abb168e23 Removed modules/example from .gitmodules for now
Jenkins can't build Base-7.0 with the example in this Zombie state.
2017-11-02 09:48:41 -05:00
Andrew Johnson
82efcc3969 Update modules to latest
This combination builds for Linux, RTEMS 4.10 and VxWorks 6.9
2017-11-01 16:23:55 -05:00
Andrew Johnson
52a117c35a Merge changes from 3.16 and below into core/master 2017-11-01 16:11:04 -05:00
Andrew Johnson
75ae143361 Update pva2pva module 2017-10-31 15:31:24 -05:00
Andrew Johnson
e25f95be50 Source formatting in dbFastLinkConv 2017-10-31 12:54:41 -05:00
Andrew Johnson
9a0eacd67e More tests in rec/test/softTest 2017-10-31 12:54:03 -05:00
Andrew Johnson
c94c1b47d8 More debug printf()s in lnkConst 2017-10-31 12:52:46 -05:00
Andrew Johnson
a2b963b2d9 Fix bug in fast-convert from int64 to enum
Discovered on Solaris-sparc (big-endian).
2017-10-31 12:50:53 -05:00
Andrew Johnson
f76d453a7a ringPointerTest: Prevent warnings 2017-10-30 19:54:09 -05:00
Andrew Johnson
71675fc7a4 Disable yajlTest: Duh! 2017-10-30 18:15:37 -05:00
Andrew Johnson
fbcbd58c30 libCom/test: Disable yajlTest on WIN32
Works OK on Cygwin; Perl's IPC::Open3 is likely the problem.
2017-10-30 17:56:04 -05:00
Andrew Johnson
5f1435c775 Merge yajl-2.1.0 branch into 3.16 2017-10-30 16:14:35 -05:00
Andrew Johnson
0b5577205c Merge fix-tsel branch into 3.16 2017-10-30 14:16:50 -05:00
Andrew Johnson
49d638be97 VxWorks osdMonotonic implementation
PowerPC time-base frequencies are 32-bit.
Adjust when warnings are printed.
Use long double to calculate time from time-base.
2017-10-27 15:17:38 -05:00
Andrew Johnson
05d4d7431e Merge changes from 3.15 branch into 3.16 2017-10-27 12:32:14 -05:00
Andrew Johnson
e38252eecc Fix osiSockOptMcastLoop_t for solaris 2017-10-26 16:29:03 -05:00
Andrew Johnson
31c7d91884 libCom/test/Makefile: Clean up SYS_LIBS var's
Add PROD_SYS_LIBS_solaris global setting
Remove settings for individual tests
2017-10-26 16:28:24 -05:00
Andrew Johnson
42d37eb19a Merge branch 'osiSockTest' into 3.15 2017-10-26 14:30:38 -05:00
Andrew Johnson
77de87cfb0 dbServer: Only call client() and report() methods when running
Also adjusts the tests to confirm that behaviour.
2017-10-26 13:02:20 -05:00
Andrew Johnson
48ea653ba9 Clean up taskwdTest
Ensure other threads don't interfere with test results,
let only test threads generate pass/fail outputs.
2017-10-24 21:10:00 -05:00
Michael Davidsaver
d0378adc91 ioc/db/test: check TSEL to .TIME 2017-10-24 09:30:38 -05:00
Andrew Johnson
a1d2f337f4 Initial VxWorks support code
Implemented for both PowerPC and i86.
Builds, but not tested yet.
2017-10-23 11:30:29 -05:00
Andrew Johnson
62db42bf35 Delete unused variable 2017-10-23 11:27:51 -05:00
Andrew Johnson
cec4f4e24b Unify rsrv socket errors, add missing error string 2017-10-20 14:12:49 -05:00
Andrew Johnson
67323ed84f Fix warnings reported by clang 9.0.0 2017-10-20 10:47:50 -05:00
Ralph Lange
862451b1a8 Update submodules 2017-10-20 17:09:16 +02:00
Ralph Lange
077ff94f9f Merge from 3.16 branch 2017-10-20 16:55:36 +02:00
Andrew Johnson
d5a3df506c Fix regex's, add tests for DBD::Base
Changed $RXname to accept {} chars in the middle of a PV name.
RXdqs now handles escaped double-quotes and back-slashes properly.
New test program for the DBD::Base class and checks for each of
the $RXxxx variable regex's.
2017-10-19 23:19:27 -05:00
Andrew Johnson
7a0b095fd3 Remove /o flags from Perl regex's
Apparently they don't help in modern Perls, and can cause problems.
This commit also replaces \d with [0-9], \d also matches foreign digits.
2017-10-19 23:14:12 -05:00
Andrew Johnson
11d2a64507 Clarify release entry wording 2017-10-18 20:12:20 -05:00
Andrew Johnson
2b15bc5f70 Can't dbUnregisterServer() if stopped & no stop() method
Unregistration is allowed if we're still registering though.
This allows for cases like rsrv, which doesn't have a stop method.
However the semantics of restarting servers after they have been
stopped hasn't been defined, and rsrv probably wouldn't work if
you tried that anyway, so I'm not convinced this is useful.
2017-10-18 19:12:50 -05:00
Andrew Johnson
fb5a2d8475 Added dbUnregisterServer() routine, plus tests 2017-10-18 18:12:21 -05:00
Andrew Johnson
0406ecebe9 Ignore dbServer registrations after init
Actually store all server states, and display it in dbsr()
2017-10-18 17:35:37 -05:00
Andrew Johnson
a939324270 Added call to dbStopServers() in iocShutdown()
Renamed buildRSRV => buildServers.
Don't call other dbXxxServers() routines or announce their related
initHook states when in buildIsolated mode.
2017-10-18 17:13:46 -05:00
Andrew Johnson
e3c9d5900e Added timestamp support to the lnkCalc link type. 2017-10-18 15:39:22 -05:00
Ralph Lange
85712c5825 modules: remove example submodule 2017-10-17 11:48:51 +02:00
Ralph Lange
16b7a413df doc: add simulation mode changes to release notes 2017-10-17 11:28:02 +02:00
Ralph Lange
f482ee6fe1 rec: add tests for simulation mode 2017-10-16 17:15:36 +02:00
Ralph Lange
4541551211 rec: improve and streamline simulation mode 2017-10-16 17:15:01 +02:00
Ralph Lange
597c93681f db: add utility functions for simulation mode 2017-10-16 17:13:24 +02:00
Ralph Lange
c623715604 dbstatic: allow initial value of 65535 for MENU fields 2017-10-13 13:15:21 +02:00
Andrew Johnson
58460d25b9 Release Notes 2017-10-13 10:57:21 +02:00
Andrew Johnson
9e75b8b32d libcom/test: osiSockTest fix for RTEMS
Instead of 0/1 RTEMS gives 0/32 (32==SO_BROADCAST).
So switch the test to zero/non-zero.
2017-10-13 10:42:19 +02:00
Ralph Lange
3011ac2143 ioc/misc: remove double inclusion of dbBase.h in iocInit.c 2017-10-10 13:16:09 +02:00
Andrew Johnson
7eef48102c Merge changes from 3.15 branch into 3.16 2017-10-10 09:56:31 +02:00
Andrew Johnson
32a6f6c4f1 Fix DBD parsing slow-up with Perl 5.20 and later 2017-10-09 14:45:01 +02:00
Ralph Lange
d7cda55d80 modules: make RELEASE.local use an absolute Base path 2017-10-02 09:36:43 +02:00
Andrew Johnson
cd14e2ee9f Add missing calls to yajl_complete_parse()
Fixes leak when link parses OK but JSON errors follow.
Includes regression test.
2017-09-30 11:30:50 -05:00
Ralph Lange
d3387c16c3 travis-ci: fix scripts (executable bit, CONFIG_SITE location) 2017-09-28 16:25:34 +02:00
Ralph Lange
63cd93a5a4 modules: add pva2pva, example 2017-09-28 15:13:37 +02:00
Michael Davidsaver
d8d52e433c rsrv: epicsExport.h is last import 2017-09-27 17:11:58 -05:00
Michael Davidsaver
6f4e466989 yajl: add EPICS_YAJL_API_VERSION macro 2017-09-27 17:03:54 -05:00
Michael Davidsaver
8f679e1133 yajl: missing LL defs 2017-09-27 16:47:39 -05:00
Michael Davidsaver
06b2d4bb76 db/test: dbStressTest use monotonic
Conflicts:
	src/ioc/db/test/dbStressLock.c
2017-09-27 16:36:54 -05:00
Michael Davidsaver
1c00e79b6b monotonic: fix osx 2017-09-27 16:01:54 -05:00
Michael Davidsaver
cccab7437f move EPICS_EXPOSE_LIBCOM_MONOTONIC_PRIVATE before all local includes 2017-09-27 16:01:54 -05:00
Michael Davidsaver
6aec8d9bcb libCom/osi: fetch monotonic time 2017-09-27 16:01:54 -05:00
Ralph Lange
47c1bff49d Update submodules 2017-09-27 15:44:24 +02:00
Ralph Lange
d71262b458 modules: add normativeTypes, pvaClient, pvDatabase 2017-09-27 15:16:00 +02:00
Ralph Lange
b27cd36e41 travis-ci: add ca and database as dependencies for pvAccess 2017-09-26 15:42:43 +02:00
Ralph Lange
e7a8ac6c38 modules: add pvData, pvAccess 2017-09-26 13:39:04 +02:00
Andrew Johnson
169e9f2699 Merged 3.14 changes into 3.15 2017-09-25 15:45:53 -05:00
Andrew Johnson
22debb3532 Fix for LP: #1702298 2017-09-25 15:41:31 -05:00
Andrew Johnson
c441cdd5a4 Adjust comments about EPICS_TIMEZONE 2017-09-25 12:14:48 -05:00
Andrew Johnson
0818267371 Update submodules 2017-09-22 14:41:28 -05:00
Andrew Johnson
b6027d33bd Use 'make test-results' target 2017-09-22 14:40:20 -05:00
Andrew Johnson
cd8d8e6890 ModuleDirs files don't need TOP any more 2017-09-22 14:29:43 -05:00
Andrew Johnson
186a9f5329 Move maclib.pm to libcom 2017-09-22 14:21:36 -05:00
Andrew Johnson
10849a0df3 RULES: Expand @TOP@ and @ARCH@ in .plt files
Use this in Snippets.plt
2017-09-22 14:05:37 -05:00
Ralph Lange
c31b91e24c Add submodules libcom ca database 2017-09-20 16:51:24 +02:00
Ralph Lange
6bf805c420 Add submodule context 2017-09-20 14:39:32 +02:00
Ralph Lange
2692c0698a tools: add local TOP/lib/perl to Perl include path 2017-09-20 14:39:17 +02:00
Ralph Lange
bc4957155b ci: consolidate file and directory names 2017-09-20 14:37:46 +02:00
Andrew Johnson
a861760dbb Give dbRegisterServer a return value (0/-1)
Add tests to check registration failures.
2017-09-19 22:24:06 -05:00
Andrew Johnson
d1018d27a4 Fix check for double-registration, add test 2017-09-19 22:09:41 -05:00
Andrew Johnson
cffa2e8f46 Fix typo in cvtFast.c
Probably only affects MEDM
2017-09-19 16:38:27 -05:00
Ralph Lange
a27d7440f3 Add Perl include path mechanism (by Andrew) 2017-09-19 12:02:14 +02:00
Ralph Lange
f2a899b92b configure: no implicit installation (overwrite) of config files 2017-09-19 12:02:14 +02:00
Ralph Lange
53000504d0 configure: remove cas/gdd from EPICS_BASE_HOST_LIBS 2017-09-19 12:02:14 +02:00
Ralph Lange
d9515dbabc configure: clean up INSTALL_LOCATION/configure unless installing in TOP 2017-09-19 12:02:14 +02:00
Ralph Lange
80efa20729 configure: set Base version to 7.0.1-DEV 2017-09-19 12:02:14 +02:00
Ralph Lange
fa27a9dabb Structural changes to create core module 2017-09-19 12:02:12 +02:00
Andrew Johnson
5641afa0e2 Change pvlOptTSELisTime to DBLINK_FLAG_TSELisTIME
Renames recGblTSELwasModified() to TSEL_modified() in dbLink.c.
Adds some tests for using JSON link types in dbCommon links.
2017-09-19 00:12:18 -05:00
Michael Davidsaver
c036fd056b missing test files 2017-09-15 17:10:04 -05:00
Michael Davidsaver
522c2e562e libCom/test: epicsThreadTest cleanup 2017-09-15 17:06:03 -05:00
Michael Davidsaver
90359d87ba quiet win32 warnings 2017-09-15 17:05:46 -05:00
Andrew Johnson
6ee2cc6039 Merged 3.14 branch into 3.15 2017-09-07 17:48:05 -05:00
Andrew Johnson
13fa1e2722 Travis: Use 'make test-results' for more compact output 2017-09-07 17:39:42 -05:00
Andrew Johnson
fad89189da Fix typo in CAref.html 2017-09-07 17:38:58 -05:00
Andrew Johnson
1fe3e9e772 Add dummy putValue methods to const link types
Includes a new softTest program to detect regressions.
Resolves http://www.aps.anl.gov/epics/core-talk/2017/msg00503.php
2017-09-07 13:48:39 -05:00
Andrew Johnson
736b81e044 Merge changes from 3.15 branch
Includes separate fix for alarm severity regression.
2017-09-02 23:52:22 -05:00
Andrew Johnson
2e4634853c Don't inherit alarm severity from self-referential links
This behavior was present in 3.14 and got lost in my link changes.
Includes a new regression test to detect the broken behavior.
2017-09-02 23:35:07 -05:00
Andrew Johnson
e0757204cc More tests, check both true and false values for options. 2017-08-30 13:58:17 -05:00
Andrew Johnson
78abb25884 Add osiSockOptMcastLoop_t and osiSockTest 2017-08-28 22:36:25 -05:00
Andrew Johnson
73f3e76150 Merged 3.14 branch config changes into 3.15 2017-08-18 17:19:05 -05:00
Andrew Johnson
4ab56518a0 Add readline support to linux-xscale_be rules
Also moves cross-build config to the right host-arch's
2017-08-18 15:14:42 -05:00
Andrew Johnson
80dbc7aeef Clean up the cross-build rules slightly 2017-08-18 15:10:13 -05:00
Andrew Johnson
238f6772bd Dirk's simpler VxWorks version rules 2017-08-18 15:06:38 -05:00
Andrew Johnson
dc9859cee9 Fix RPATH and readline for linux-arm cross-builds 2017-08-18 11:59:17 -05:00
Andrew Johnson
5d5f27a486 Don't set RPATH if STATIC_BUILD=YES 2017-08-18 11:57:50 -05:00
Andrew Johnson
ad6a16d7c4 Update EPICS_TIMEZONE settings, extend to 2022 2017-08-18 11:33:17 -05:00
Michael Davidsaver
0205dcc61f Merge branch '3.15'
* 3.15:
  rsrv: fix recv() error handling on WIN32
  rsrv: export CASDEBUG to iocsh
  rsrv: flush any queued messages before forced disconnect
  rsrv: locking in cas_send_bs_msg()
  rsrv: missing send lock around send_err()
  rsrv: drop un-commited VERSION message
  rsrv: add some comments
  rsrv: avoid possible overflow in vsend_err()
  Use static strings for epicsInterruptContextMessage()

# Conflicts:
#	src/ioc/rsrv/camessage.c
2017-08-01 17:20:21 +02:00
Michael Davidsaver
111cac8e47 merge 3.14 2017-08-01 17:14:34 +02:00
Michael Davidsaver
5c8e5c52ef rsrv: fix recv() error handling on WIN32
For WIN32 osiSockIoctl_t is unsigned, so

> osiSockIoctl_t nchars = recv(...

is casting signed -> unsigned which treats
errors as success.
2017-08-01 17:02:41 +02:00
Michael Davidsaver
546df1c1f0 rsrv: export CASDEBUG to iocsh 2017-08-01 17:02:41 +02:00
Michael Davidsaver
603331e7a5 rsrv: flush any queued messages before forced disconnect
Avoid loss of various ERROR messages which camessage()
has queued.
2017-08-01 16:44:48 +02:00
Michael Davidsaver
4b272cc0cf rsrv: locking in cas_send_bs_msg()
Must lock around "pclient->send.stk = 0u;"
2017-08-01 16:44:48 +02:00
Michael Davidsaver
619a99bf99 rsrv: missing send lock around send_err() 2017-08-01 16:44:48 +02:00
Michael Davidsaver
1f8cb740f1 rsrv: drop un-commited VERSION message
This is a no-op as cas_commit_msg() isn't called.
A VERSION message is already queued during create_tcp_client().
2017-08-01 16:44:29 +02:00
Michael Davidsaver
322f7a97de rsrv: add some comments 2017-08-01 16:44:29 +02:00
Michael Davidsaver
0fc770166c rsrv: avoid possible overflow in vsend_err()
Accounting of message size doesn't take into account
space used by header of failed message (16 or 24 bytes).
This would allow a theoretical really long error message
to overflow the send buffer by 16 or 24 bytes.
2017-08-01 16:44:08 +02:00
Andrew Johnson
d1f60e4c8c dbRegisterServer: Don't ignore sub-string names
Also adjusts the tests to check we do it properly.
2017-07-29 01:30:45 -05:00
Andrew Johnson
7c6b037252 Add explicit "no servers" message to dbsr()
Make dbsr explicitly say so if no dbServer layers have been
registered with the dbServer API.
2017-07-29 00:51:31 -05:00
Michael Davidsaver
296fb35a5c db_cleanup_events handle 0 2017-07-28 11:18:56 +02:00
Andrew Johnson
519a75fde6 Merge vpath fix from 3.15 branch 2017-07-26 12:04:25 -05:00
Andrew Johnson
f04f17f9bf Remove vpath for %.pl files
It isn't needed, and in some configurations it causes build failures.
Similar problems could still occur for other file types with a similar
vpath, but it's less likely that other file types would be installed in
an equivalent $(TOP)/../<dir> path.

The original issue with .pl files was caused by an installation of Base
where the parent directory had a bin/<host> soft-link pointing to the
same bin/<host> of a newer installation of the same version of Base, so
it had all the necessary .pl files in it. The vpath allowed the build in
src/tools to search $(TOP)/../bin/<host> when checking the buildInstall
dependency, and since it found those .pl files through the vpath it
didn't bother to install them. When they were run later on in the build
from the $(TOP)/bin/<host>/ path they weren't present so it failed.
2017-07-26 12:02:24 -05:00
Michael Davidsaver
d2fad17be7 rsrv: fix large array expansion
Causes a crash when a larger buffer is made even larger.
Previous buffer not being free'd correctly.
2017-07-26 17:58:01 +02:00
Andrew Johnson
461daadd5b Release Notes entry 2017-07-25 00:39:40 -05:00
Andrew Johnson
2cf997ddbf Test EPICS_IOC_IGNORE_SERVERS variable 2017-07-25 00:38:34 -05:00
Andrew Johnson
1a70855e25 Use static strings for epicsInterruptContextMessage()
The callbackRequest() routine was passing a stack-allocated
string to epicsInterruptContextMessage() but on RTEMS the
pointer is queued without copying the string. This fix uses
static strings for the 3 messages instead.

Fixes LP: #1705219
2017-07-24 11:19:20 -05:00
Andrew Johnson
ba9763f551 Set test plan 2017-07-23 23:35:03 -05:00
Andrew Johnson
17e6060d16 Added some dbServer unit tests 2017-07-23 23:30:04 -05:00
Andrew Johnson
306a53503a Add no-strict-aliasing compiler flags to gdd & pcas 2017-07-05 17:02:28 -05:00
Andrew Johnson
7a571989f8 Add yajl test for trailing commas in arrays and maps 2017-06-26 23:34:07 -05:00
Andrew Johnson
50028f2eda Fix yajl_test bug
Test program doesn't always read from stdin, although in both
the original and the EPICS test director it does.
2017-06-26 23:32:10 -05:00
Andrew Johnson
c288de3bf2 Add yajl parser tests
yajl_test.c is the test runner, from the yajl distribution.
The yajlTestConverter.pl script converts the yajl distribution's
test case files into a data structure in yajlTestCases.pm.
yajlTest.plt is a test director which reads the test cases from
yajlTestCases.pm and runs them through the yajl_test program.
2017-06-26 00:40:17 -05:00
Andrew Johnson
08ad4de161 yajl: Out-of-memory handling; another size_t 2017-06-24 01:20:39 -05:00
Andrew Johnson
c2d22ed925 Added Doxygen comments for dbServer API 2017-06-24 00:04:20 -05:00
Andrew Johnson
db3e79e4b7 Merged changes from 3.15 branch into 3.16 2017-06-22 19:00:51 -05:00
Andrew Johnson
fb9e55a76e Fix scalar link initialization from hex constants
Partially fixes LP: #1699445
Includes regression tests, with TODO for arrays which are still broken
and need a full JSON5 parser to fix.
2017-06-22 18:45:10 -05:00
Andrew Johnson
745109e423 Add loop detection to Release.pm
GNUmake will *usually* spot recursive "include" loops first, but
not if the loop is in another module that we're just checking.
In that case Release.pm eats file descriptors until they run out
without this fix.
2017-06-22 18:38:07 -05:00
Andrew Johnson
b9d2712738 Argh!!! 2017-06-22 17:07:56 -05:00
Andrew Johnson
a69bd833fc More msi.plt retries for Jenkins builds on Windows 2017-06-22 16:45:00 -05:00
Andrew Johnson
630b4f375d Fix 'make test-results' rule for Windows 2017-06-22 16:42:53 -05:00
Andrew Johnson
9d4a90ac34 Fix link initialization from hex constants
Fixes LP: #1699445
Includes regression tests (some of which will fail on 3.16)
2017-06-22 14:29:04 -05:00
Andrew Johnson
cc0dacedb5 Merge changes from 3.15 branch into 3.16 2017-06-20 15:54:35 -05:00
Andrew Johnson
83cb50574a Merge bug-fix from 3.14 branch into 3.15 2017-06-20 15:50:49 -05:00
Andrew Johnson
6b5e7da4fd catools: dbr_long_t is only 32 bits wide
Don't print it as a native long.
Fixes LP: #1699332
2017-06-20 15:49:41 -05:00
Andrew Johnson
69d530f1db Cross-build fix for generated .t files
The *target* OS should determine whether to use system or exec.
2017-06-16 15:37:55 -05:00
Andrew Johnson
411a60c32d Add missing link libraries 2017-06-16 12:44:10 -05:00
Andrew Johnson
79fe79ad56 Merged changes from 3.15 branch into 3.16 2017-06-14 14:55:53 -05:00
Andrew Johnson
105e831442 Merge changes from 3.14 branch into 3.15 2017-06-14 10:17:31 -05:00
Andrew Johnson
a1dc16848c configure: Fix include CONFIG_APP_INCLUDE
which needs to happen *after* CONFIG_SITE overrides.
2017-06-14 10:03:43 -05:00
Andrew Johnson
2819d7ea3d Posix epicsEventWaitWithTimeout() max delay
Limit timeouts on Posix to max-out at 10 years.
Adds a test that will fail when that time-out hits Y2038 on
systems where time_t is still a 32-bit integer.
2017-06-14 10:01:23 -05:00
Andrew Johnson
6efe292494 Add EPICS_IOC_IGNORE_SERVERS environment variable
dbServers cannot be registered when their names appear in this
variable, so they should remain inactive. This feature is mainly
intended for debugging, so the crude name search should be OK.
2017-06-13 23:36:30 -05:00
Andrew Johnson
f464274439 Remove declarations of previously-deleted functions
Fixes LP: #1696801
2017-06-12 18:15:12 -05:00
Andrew Johnson
6ef995525a Restore the use of DBL_MAX in timerQueue.cpp 2017-06-09 13:44:30 -05:00
Andrew Johnson
18dee384ec Fix tv_sec casts to use time_t, not long 2017-06-09 12:20:16 -05:00
Andrew Johnson
b369aa67f1 Use 1000 years as 'forever' in timers
DBL_MAX causes problems...
2017-06-08 21:55:12 -05:00
Andrew Johnson
085fab4aed Merge 3.14 branch into 3.15 2017-06-08 09:55:05 -04:00
Andrew Johnson
c853234e01 Remove artificial 60-minute timeout limit (Posix) 2017-06-08 09:53:07 -04:00
Andrew Johnson
2d1d14e4b4 Make rsrv register itself using a DBD file
This allows the rsrv to be excluded by removing 'include rsrv.dbd'
from a local copy of the base.dbd file.
Server initialization, running and pausing are moved to new
methods of the dbServer object, and the existing registration
path is converted to just use the new rsrv.dbd file.
2017-06-06 23:18:55 -04:00
Andrew Johnson
4c6b570a46 Permit trailing commas in JSON maps & arrays
Handled in both dbYacc and yajl parsers.
Adds tests to linkInitTest.
2017-06-05 12:49:26 -05:00
Andrew Johnson
e1ba1c6bba Fix YAJL token names, brace <=> bracket
This breaks future updates from upstream, but it looks like the
original author has abandoned the project anyway.
2017-06-05 12:01:37 -05:00
Andrew Johnson
7980d78908 Add tests for 64-bit constant link initializers 2017-06-04 00:40:53 -05:00
Andrew Johnson
80fa616a86 Convert lnkConst to 64 bit integers 2017-06-04 00:40:53 -05:00
Andrew Johnson
70a46e9c2c Adjust IOC code for yajl-2.1.0 API 2017-06-04 00:40:53 -05:00
Andrew Johnson
de43941083 Upgrade yajl sources to 2.1.0 2017-06-04 00:40:53 -05:00
Andrew Johnson
d47b1a1854 Reset snapshot to -DEV 2017-06-02 14:57:58 -05:00
Andrew Johnson
ee91b29fe0 Clear version snapshot for 3.16.1 final release 2017-06-02 14:54:58 -05:00
Andrew Johnson
0c9254f768 Final documentation updates 2017-06-02 14:53:11 -05:00
Andrew Johnson
073f3f33a6 Merge 3.15 branch into 3.16 2017-06-01 16:42:10 -05:00
Andrew Johnson
1293747cf3 Merge 3.14 branch into 3.15 2017-06-01 16:40:33 -05:00
Andrew Johnson
9c859ffdca Protect casStatsFetch() if called before rsrv_init()
Also ensures clientQ is initialized before creating clientQlock.

Fixes LP: #1694966
2017-06-01 15:37:34 -05:00
Andrew Johnson
29c069db3d Testing msi: Add retries if necessary
Hoping this will fix the annoying problems on Windows Jenkins.
2017-05-31 12:51:39 -05:00
Andrew Johnson
77c00faabe Merge 3.15 branch into 3.16 2017-05-30 17:17:59 -05:00
Andrew Johnson
12d22e392f Merge 3.14 branch into 3.15 2017-05-30 17:14:56 -05:00
Andrew Johnson
0dc850f4ec A gitignore pattern for vi on MacOS 2017-05-30 17:13:56 -05:00
Andrew Johnson
117e294ec6 Set asynSoftTest plan 2017-05-27 21:59:44 -05:00
Andrew Johnson
afdb6af0c7 Fix buffer size issue in devI64inSoftCallback 2017-05-27 21:56:10 -05:00
Andrew Johnson
b97f04464c Add asyncSoftTest to record test harness 2017-05-27 21:45:46 -05:00
Andrew Johnson
b2473f939f Rename asyncSoft main routine 2017-05-27 21:41:37 -05:00
Andrew Johnson
c05fa4ddb7 Add tests for Async Soft Channel devices 2017-05-27 20:57:42 -05:00
Andrew Johnson
c8fcfbea9f Convert all Async Soft Channel input devices to use link support 2017-05-27 20:35:53 -05:00
Andrew Johnson
07aa712b07 Convert int64out Async Soft Channel device to use link support 2017-05-27 20:33:38 -05:00
Michael Davidsaver
1865e84321 ioc/db: dbLockCleanupRecords() warn only if lockSets remain 2017-05-24 18:41:32 -04:00
Andrew Johnson
7efba21d1f Fix 32-bit issue in linkInitTest.c 2017-05-24 16:41:34 -04:00
Andrew Johnson
c22c94a3aa Convert devI64inSoft for Link Support
Includes tests to make sure it actually works
2017-05-24 00:20:38 -04:00
Andrew Johnson
542353aedb Fix aai constant initialization
The aai record is "special" and does things its own way.
These changes let it support {const:[...]} initialization without
breaking regular input link types which could be initialized twice
without the new DBLINK_FLAG_INITIALIZED guard in dbInitLink().

Also adds tests for this, and for similar links for waveform.
2017-05-23 23:51:26 -04:00
Andrew Johnson
c670ef0199 Merge 3.15 branch into master 2017-05-19 17:42:40 -05:00
Andrew Johnson
98b0f7e48b Merge 3.14 branch into 3.15 2017-05-19 17:34:49 -05:00
Andrew Johnson
672fd16ec8 Add make targets test-results and clean-tests
These are mainly intended for CI builds.
2017-05-19 15:44:15 -05:00
Ralph Lange
dcadeac903 ci: add appveyor configuration 2017-05-19 13:38:39 +09:00
Andrew Johnson
43ea188385 Merge 3.15 branch into 3.16
# Conflicts:
#	configure/CONFIG_BASE
#	configure/RULES_BUILD
2017-05-18 17:10:40 -05:00
Andrew Johnson
0b3e44747e Merge 3.14 branch into 3.15
# Conflicts:
#	configure/RULES.Db
#	configure/RULES_ARCHS
#	configure/RULES_BUILD
#	documentation/RELEASE_NOTES.html
2017-05-18 17:07:41 -05:00
Andrew Johnson
b7b3dd2b37 Support for 'make junitfiles' target.
The Perl XML::Generator module must be installed to use this.
2017-05-18 16:31:43 -05:00
Andrew Johnson
ffa7399c71 Merge changes from 3.15 branch 2017-05-11 16:39:52 -05:00
Andrew Johnson
b14d77dcf2 Fix tools/test/*.plt 'use lib' lines
This allows the tests to work when INSTALL_LOCATION is set.
2017-05-11 15:29:52 -05:00
Andrew Johnson
cb89710bbd Update comments in the configure/RELEASE file 2017-05-11 14:50:00 -05:00
Andrew Johnson
b3bbf67ce8 Add support for a CONFIG_SITE.local file 2017-05-11 14:49:04 -05:00
Ralph Lange
78b910574d ci/appveyor: print perl version to console log 2017-05-10 17:31:25 +02:00
Xiaoqiang Wang
82396ee3ef fix data size of gdd container type
getDataSizeElement of gdd container returns the number of sub fields.
It has to be called on the "value" field. This fix has already been done
in monitorReponse.
2017-05-10 10:22:13 -05:00
Andrew Johnson
020f09e83a Fix EPICS_CA_AUTO_ARRAY_BYTES doc'n in CAref.html 2017-05-09 14:58:40 -05:00
Andrew Johnson
ac590e671e Adjustments to Checklist commands 2017-05-09 14:46:25 -05:00
Andrew Johnson
e0dea7ab23 Set snapshot to -rc1-DEV 2017-05-09 14:45:55 -05:00
Andrew Johnson
7aefee6737 Set Base version number for 3.16.1-rc1 2017-05-09 14:00:29 -05:00
Andrew Johnson
f9564a3b82 Various Release Notes tweaks 2017-05-09 13:57:17 -05:00
Andrew Johnson
17da4bfc1f Additional ReleaseChecklist updates 2017-05-09 13:08:59 -05:00
Ralph Lange
2fe8d82872 ci: make appveyor version number unambiguous 2017-05-09 14:03:40 +02:00
Ralph Lange
2ff9f249a0 ci: add appveyor configuration 2017-05-09 12:01:36 +02:00
Andrew Johnson
5ec1340902 Convert ReleaseChecklist commands to git 2017-05-08 20:45:39 -05:00
Michael Davidsaver
269f828733 ca: assume that CA name servers have minor version >=12
Assume that servers listed in EPICS_CA_NAME_SERVERS
support CA >=12, practically >=1 to support the
authentication messages.
2017-05-07 20:27:34 -04:00
Michael Davidsaver
4ce60c9797 src/tools: avoid dep. warning in rRDD generated
when building a support module
2017-05-07 20:27:34 -04:00
Michael Davidsaver
d5fc8c9b76 ioc/dbStatic: reduce warning spam for typed rset
There are an amazing number of warnings in any code which
includes recSup.h indirectly, including dbStaticLib.h.
Don't use the RECSUPFUN typedef internally to reduce
the number.
2017-05-07 10:06:38 -04:00
Andrew Johnson
93c0dcd3e5 Missing include 2017-05-06 01:11:53 -05:00
Andrew Johnson
fd583ac594 Fix MSC 2-digit-exponent in cvtFastTest.c 2017-05-06 00:41:52 -05:00
Michael Davidsaver
9621ff1552 libCom/test: cvtFastTest improve output 2017-05-05 20:54:19 -04:00
Michael Davidsaver
3f49787be1 ioc/db/test: fix jlinkz dllimport/export 2017-05-05 20:38:20 -04:00
Michael Davidsaver
bbd9ba0b6d std/filters: fix filters test harness 2017-05-05 20:15:03 -04:00
Michael Davidsaver
fcd443a026 missing test spec 2017-05-05 17:14:15 -04:00
Michael Davidsaver
02809de380 fix long long constants 2017-05-04 21:13:07 -04:00
Michael Davidsaver
987943be4e Merge remote-tracking branch 'int64b/master'
* int64b/master: (25 commits)
  std/rec: streamline variable names in int64in/int64out
  std/rec/test: recMiscTest check in64in/out
  ioc/db: dbUnitTest helps support int64
  std/rec: ioc64in/outRecord typed rset
  minor
  std/rec: fix copyright in int64in sources
  std: remove SCM keywords from int64in and int64out sources
  std/rec: fix promptgroups in dbd.pod files
  std/rec: add and improve pod for int64in and int64out
  std/rec: add pod documentation content for int64out
  std/rec: add pod documentation for int64out record
  dbStatic: dbPutStringNum() overflow handling
  dbStatic: more informative error for bad field value
  dbStatic: dbPutStringNum(, "") not an error
  Release Notes
  cvtFastPerform: Rename reserved member names, fix for vxWorks
  Simplify epicsConvertDoubleToFloat()
  More cvtFastPerform changes
  Collate and report by precision
  Restructure cvtFastPerform, fix VxWorks build
  ...
2017-05-04 20:18:24 -04:00
Michael Davidsaver
16a3657613 Merge remote-tracking branch 'linksup/master'
* linksup/master: (112 commits)
  ioc/dbStatic: rename link debugging info tags
  jlif future proof for 64-bit json parser
  Demonstrate and use numeric literals in calc args
  separate jlink and lset debug flags
  std/link: runtime conditional debugging in calc/const
  std/rec/test: extend linkRetargetLink w/ jlink
  ioc/db: dbUnitTest add testdbPutArrFieldOk()
  ioc/db: cleanup dbEvent freeLists
  ioc/db: dbUnitTest testMonitor leaks dbChannel
  std/link: all calc example
  jlink conditional debug print
  ioc/as: dbCore needs ca
  Additional linkInitTest checks
  Minimize work done in readLocked routine
  Minimize work done in readLocked() routine
  Cosmetic changes to various soft device supports
  Enhancements to subArray record & soft device support
  Fix bug in eventRecord::init_record
  Updates to Release Notes and links.html
  Make dbLinkIs{Constant|Volatile}() return only true/false
  ...

Conflicts:
	documentation/RELEASE_NOTES.html
	src/ioc/db/dbAccess.c
2017-05-04 20:14:30 -04:00
Michael Davidsaver
8ae7930375 ioc/dbStatic: rename link debugging info tags 2017-05-04 20:12:02 -04:00
Andrew Johnson
05d3e640cd Testing msi: Add retries if necessary
Hoping this will fix the annoying problems on Windows Jenkins.
2017-05-04 14:48:18 -05:00
Andrew Johnson
efe8d69f82 dbStaticTest: More friendly test output 2017-05-04 12:33:32 -05:00
Andrew Johnson
2c65739286 Change indfield settings in new dbInitEntryFrom*()
Can get indfield value from dbAddr->pflddes->indRecordType.
Make FromRecord set indfield=0 like dbFindRecord() does.

Adjust dbStaticTest to match.
2017-05-04 12:31:17 -05:00
Andrew Johnson
93fe387e87 Fix dbStaticTest recnode flags check 2017-05-04 12:23:57 -05:00
Ralph Lange
ad0695b119 std/rec: streamline variable names in int64in/int64out 2017-05-04 09:27:23 +02:00
Michael Davidsaver
8f880a614c ioc/db/test: check record node flags 2017-05-03 19:32:50 -04:00
Michael Davidsaver
7805fbe295 ioc/dbStatic: rename dbRecordNode aliasedRecord -> aliasedRecnode 2017-05-03 19:31:38 -04:00
Michael Davidsaver
2a81e0b338 std/rec/test: recMiscTest check in64in/out 2017-05-03 19:18:52 -04:00
Michael Davidsaver
5e0dc5d1c9 ioc/db: dbUnitTest helps support int64 2017-05-03 18:39:43 -04:00
Michael Davidsaver
1b16c7130b std/rec: ioc64in/outRecord typed rset 2017-05-03 17:58:29 -04:00
Michael Davidsaver
925d03bcec minor 2017-05-03 17:54:58 -04:00
Michael Davidsaver
1151d78cb5 Merge remote-tracking branch 'launchpad/master'
* launchpad/master: (116 commits)
  ioc/rsrv: bounds check DBR
  CAref mention EPICS_CA_MCAST_TTL
  EPICS_CA_AUTO_MAX_ARRAY_BYTES -> EPICS_CA_AUTO_ARRAY_BYTES
  missing include
  ioc/db/test: dbStaticTest dbInitEntryFromAddr() works before iocInit()
  ioc/db/test: dbStaticTest test operations on aliases
  ioc: rename dbCommonPvt::recnode
  ioc/dbStatic: better alias tracking
  ioc/dbStatic: add dbInitEntryFromRecord()
  ioc: populate RDES early
  rename dbInitEntryFromChannel -> dbInitEntryFromAddr
  ioc/db: Add dbCommonPvt
  ioc/dbStatic: add dbInitEntryFromChannel()
  ioc/dbStatic: dbAllocRecord whitespace
  ioc/rsrv: fix C89 issue
  add EPICS_CA_MCAST_TTL
  update RELEASE_NOTES
  replace caLimitArray with EPICS_CA_AUTO_MAX_ARRAY_BYTES
  update RELEASE_NOTES
  rename iocshFind -> iocshFindCommand
  ...

Conflicts:
	documentation/RELEASE_NOTES.html
	src/ioc/db/dbConvert.c
	src/ioc/db/dbFastLinkConv.c
	src/ioc/db/test/Makefile
	src/ioc/db/test/dbPutGetTest.c
	src/ioc/db/test/dbPutGetTest.db
	src/ioc/dbStatic/dbStaticRun.c
2017-05-03 17:54:43 -04:00
Michael Davidsaver
b4c625d8d1 jlif future proof for 64-bit json parser 2017-05-03 17:27:57 -04:00
Michael Davidsaver
096fb5e0a2 Merge remote-tracking branch 'addr2entry/master'
* addr2entry/master:
  ioc/db/test: dbStaticTest dbInitEntryFromAddr() works before iocInit()
  ioc/db/test: dbStaticTest test operations on aliases
  ioc: rename dbCommonPvt::recnode
  ioc/dbStatic: better alias tracking
  ioc/dbStatic: add dbInitEntryFromRecord()
  ioc: populate RDES early
  rename dbInitEntryFromChannel -> dbInitEntryFromAddr
  ioc/db: Add dbCommonPvt
  ioc/dbStatic: add dbInitEntryFromChannel()
  ioc/dbStatic: dbAllocRecord whitespace
2017-05-03 17:07:07 -04:00
Michael Davidsaver
8640e1c9fb Merge remote-tracking branch 'launchpad/3.15'
* launchpad/3.15:
  ioc/rsrv: bounds check DBR
2017-05-03 17:06:51 -04:00
Michael Davidsaver
a7c14ec995 Merge remote-tracking branch 'launchpad/3.14'
* launchpad/3.14:
  ioc/rsrv: bounds check DBR
2017-05-03 16:53:43 -04:00
Michael Davidsaver
e430d097b7 ioc/rsrv: bounds check DBR
avoid array overrun when evaluating dbr_size_n() macro.
2017-05-03 16:49:28 -04:00
Michael Davidsaver
d154d8eab7 CAref mention EPICS_CA_MCAST_TTL 2017-05-03 14:17:56 -04:00
Michael Davidsaver
3fbdcdb032 EPICS_CA_AUTO_MAX_ARRAY_BYTES -> EPICS_CA_AUTO_ARRAY_BYTES 2017-05-03 13:59:35 -04:00
Ralph Lange
eedf296cd2 std/rec: fix copyright in int64in sources 2017-05-03 17:07:46 +02:00
Ralph Lange
f0d7d42ab4 std: remove SCM keywords from int64in and int64out sources 2017-05-03 17:07:06 +02:00
Ralph Lange
5761028d6f std/rec: fix promptgroups in dbd.pod files 2017-05-03 17:00:19 +02:00
Michael Davidsaver
fbc1ed26f0 missing include 2017-05-03 10:18:32 -04:00
Ralph Lange
93b47f103e std/rec: add and improve pod for int64in and int64out 2017-05-03 16:17:27 +02:00
Michael Davidsaver
1917d0563a ioc/db/test: dbStaticTest dbInitEntryFromAddr() works before iocInit() 2017-05-02 21:30:43 -04:00
Michael Davidsaver
da4bf2d5ee ioc/db/test: dbStaticTest test operations on aliases 2017-05-02 21:12:09 -04:00
Michael Davidsaver
ec3a89e43c ioc: rename dbCommonPvt::recnode 2017-05-02 21:11:46 -04:00
Michael Davidsaver
62475a383e ioc/dbStatic: better alias tracking
Ensure that alias of alias sets DBRN_FLAGS_HASALIAS
on the aliased dbRecordNode.

Add dbFollowAlias() for completeness.
2017-05-02 21:11:46 -04:00
Michael Davidsaver
6ba949cdb4 ioc/dbStatic: add dbInitEntryFromRecord() 2017-05-02 21:11:46 -04:00
Michael Davidsaver
5d37bc2996 ioc: populate RDES early
The record type is known at allocation time,
so store RDES immediately.
2017-05-02 21:11:46 -04:00
Michael Davidsaver
2eaede9925 rename dbInitEntryFromChannel -> dbInitEntryFromAddr 2017-05-02 21:11:46 -04:00
Michael Davidsaver
12d68e6021 ioc/db: Add dbCommonPvt
Add some hidden "fields" for every record.
Allows Base internal hidden accounting
which can be changed without an ABI break.
2017-05-02 21:11:46 -04:00
Michael Davidsaver
78a7ad168e ioc/dbStatic: add dbInitEntryFromChannel()
Constant time population of a DBENTRY from
a valid dbAddr.
2017-05-02 21:11:46 -04:00
Michael Davidsaver
f716b1b26a ioc/dbStatic: dbAllocRecord whitespace 2017-05-02 21:11:46 -04:00
Michael Davidsaver
0bbb381efd ioc/rsrv: fix C89 issue 2017-05-02 21:06:35 -04:00
Michael Davidsaver
f2a1834dc9 add EPICS_CA_MCAST_TTL
may be necessary/helpful for mcast search/beacon usage
across sub-nets.
2017-05-02 20:35:00 -04:00
Michael Davidsaver
6572816a6a update RELEASE_NOTES 2017-05-02 20:16:49 -04:00
Michael Davidsaver
c304e29da6 Merge remote-tracking branch 'cahuge/master'
* cahuge/master:
  replace caLimitArray with EPICS_CA_AUTO_MAX_ARRAY_BYTES
  ca: fix export caLimitArray on win32
  rsrv: export variable caLimitArray
  rsrv: optional max_array_bytes
  cas: simplify buffer alloc
  ca: large array free list is optional
  rsrv: support larger than max. array bytes
  pcas: support larger than max array bytes
  ca: support alloc larger than max array bytes
2017-05-02 20:06:54 -04:00
Michael Davidsaver
9fd8eec2e2 replace caLimitArray with EPICS_CA_AUTO_MAX_ARRAY_BYTES 2017-05-02 19:31:21 -04:00
Michael Davidsaver
a873c4f3dc Merge remote-tracking branch 'launchpad/3.15'
* launchpad/3.15:
  rename iocshFind -> iocshFindCommand
  Added patch
  Changed function outputs to remove pointer to next function.
  more whitespace
  whitespace
  Added functions to allow access to what functions and variables the ioc shell has registered.
  missing include
  ioc/dbStatic: dbFreeBase() don't double free alias'd records
  ioc/dbStatic: plug leak in dbFreeBase()
  ioc/dbStatic: whitespace
  Fix indentation warning from GCC
  libCom/test: errlog test more verbose
  libCom: STATIC_ASSERT use c++11 static_assert when possible
  Check for empty PV names in Perl catools

Conflicts:
	src/std/rec/subRecord.c
2017-05-02 19:08:51 -04:00
Michael Davidsaver
26650d6cbf update RELEASE_NOTES 2017-05-02 19:02:18 -04:00
Michael Davidsaver
d1a0b74c83 Merge remote-tracking branch 'camodern/master'
* camodern/master:
  cas: ignore CA client version older than v4.4
  rsrv: remove !CA_V44() code
  rsrv: no ca exception response to UDP
  rsrv: ignore CA client version older than v4.4
  cas: honor DOREPLY for TCP searches
  cas: ignore echo and unexpected UDP
  rsrv: send channel create failure
  rsrv: UDP search ignore DOREPLY
  rsrv: ignore echo and unexpected UDP

Conflicts:
	src/ca/legacy/pcas/generic/casDGClient.cc
2017-05-02 18:41:09 -04:00
Michael Davidsaver
875e4db3f9 Merge remote-tracking branch 'launchpad/3.14'
* launchpad/3.14:
  missing include

Conflicts:
	src/ioc/dbStatic/dbStaticLib.c
2017-05-02 18:38:40 -04:00
Michael Davidsaver
8c8604c503 Merge remote-tracking branch 'launchpad/3.14'
* launchpad/3.14:
  ioc/dbStatic: dbFreeBase() don't double free alias'd records
  ioc/dbStatic: plug leak in dbFreeBase()
  ioc/dbStatic: whitespace
  Fix indentation warning from GCC
  libCom/test: errlog test more verbose
  libCom: STATIC_ASSERT use c++11 static_assert when possible
  Check for empty PV names in Perl catools

Conflicts:
	src/ioc/dbStatic/dbStaticLib.c
	src/libCom/osi/epicsAssert.h
2017-05-02 18:31:40 -04:00
Michael Davidsaver
9d7c4434ad rename iocshFind -> iocshFindCommand 2017-05-02 18:23:52 -04:00
Keenan Lang
67e12bca9f Added patch 2017-05-02 18:23:52 -04:00
Keenan Lang
15cb72acbc Changed function outputs to remove pointer to next function. 2017-05-02 18:23:52 -04:00
Keenan Lang
45ed461665 more whitespace 2017-05-02 18:23:52 -04:00
Keenan Lang
3986e43135 whitespace 2017-05-02 18:23:51 -04:00
Keenan Lang
daad3c6995 Added functions to allow access to what functions and variables the ioc shell has registered. 2017-05-02 18:23:51 -04:00
Michael Davidsaver
38be82a154 missing include 2017-05-02 18:22:57 -04:00
Michael Davidsaver
27cd9fd051 ioc/dbStatic: dbFreeBase() don't double free alias'd records
dbFreeBase() has been broken since alias() was introduced.

Traversal of recList in the function assumed that dbDeleteRecord()
remove only the current dbRecordNode.  However, dbDeleteRecord()
called dbDeleteAliases() which removes alias dbRecordNode s.
If this happens (as it often does) to be the node immediately
after the real node, dbFreeBase() will then iterate using
a ellDelete()d node.
2017-05-02 18:04:06 -04:00
Michael Davidsaver
1ffce72a38 ioc/dbStatic: plug leak in dbFreeBase() 2017-05-02 18:02:05 -04:00
Michael Davidsaver
dcac64d50f ioc/dbStatic: whitespace 2017-05-02 18:01:39 -04:00
Andrew Johnson
83428d2b2c db/test: Cleanup unused variable 2017-05-02 12:39:09 -05:00
Ralph Lange
1235ad76e7 std/rec: add pod documentation content for int64out 2017-05-02 13:51:44 +02:00
Andrew Johnson
1cad1c5ba6 Demonstrate and use numeric literals in calc args 2017-04-29 20:43:54 -05:00
Michael Davidsaver
12fc7ed07c libCom: add EPICS_FUNCTION
Automatic macro which expands to the current function name.
Useful in debug prints.
2017-04-28 19:19:14 -04:00
Michael Davidsaver
564ef01951 typo 2017-04-28 19:19:14 -04:00
Michael Davidsaver
f65b2119ad separate jlink and lset debug flags
"lsetDebug" for lset callbacks and "jlinkDebug" for jlink parsing.
2017-04-28 17:11:47 -04:00
Michael Davidsaver
4a9fe82575 std/link: runtime conditional debugging in calc/const 2017-04-28 16:59:26 -04:00
Michael Davidsaver
2a1f790909 std/rec/test: extend linkRetargetLink w/ jlink 2017-04-28 16:59:26 -04:00
Michael Davidsaver
d752b962d5 ioc/db: dbUnitTest add testdbPutArrFieldOk() 2017-04-28 16:44:18 -04:00
Andrew Johnson
0bf789db4c Fix indentation warning from GCC 2017-04-28 14:56:18 -05:00
Michael Davidsaver
b4db176e48 ioc/db: cleanup dbEvent freeLists 2017-04-28 15:47:27 -04:00
Michael Davidsaver
d397f0fd92 ioc/db: dbUnitTest testMonitor leaks dbChannel 2017-04-28 15:43:17 -04:00
Ralph Lange
b096dc3e01 std/rec: add pod documentation for int64out record 2017-04-28 16:41:02 +02:00
Michael Davidsaver
be8de34130 std/link: all calc example 2017-04-27 19:50:46 -04:00
Michael Davidsaver
579a0791ea jlink conditional debug print
Enable magic info("linkDebug","YES") to enable
debug prints during parsing.
2017-04-27 19:46:33 -04:00
Michael Davidsaver
e51cc39b0c ioc/as: dbCore needs ca 2017-04-27 17:24:23 -04:00
Michael Davidsaver
e296e99667 Merge remote-tracking branch 'launchpad/master'
* launchpad/master:
  libCom: dbmfMalloc cantProeed() on failure
  ioc/db/test: dbCaLinkTest fix sync
  oops
  std/filter/test: use dbUnitTest
  travis-ci enable mingw w/ dll
  travisci
  catools: Fix SEGFAULT from bad PV names
  typo
  Fix for dbCa warning seg-fault
  Fix postfix.h macro arg, document
  libCom/test: epicsCalcTest use exact postifx buffers

Conflicts:
	src/ioc/db/test/dbCaLinkTest.c
2017-04-27 17:17:29 -04:00
Michael Davidsaver
57cbe61709 libCom/test: errlog test more verbose 2017-04-27 16:53:40 -04:00
Michael Davidsaver
a2ab17a782 libCom: STATIC_ASSERT use c++11 static_assert when possible 2017-04-27 16:52:33 -04:00
Michael Davidsaver
8677c84528 libCom: dbmfMalloc cantProeed() on failure
most calling code doesn't check for NULL.
2017-04-27 15:30:35 -04:00
Michael Davidsaver
052573f4ca ioc/db/test: dbCaLinkTest fix sync 2017-04-27 15:14:58 -04:00
Michael Davidsaver
7a727bbd41 Merge remote-tracking branch 'launchpad/3.15'
* launchpad/3.15:
  oops
  std/filter/test: use dbUnitTest
  travis-ci enable mingw w/ dll
  travisci
  catools: Fix SEGFAULT from bad PV names
  typo
  Fix for dbCa warning seg-fault
  Fix postfix.h macro arg, document
  libCom/test: epicsCalcTest use exact postifx buffers
2017-04-27 14:31:53 -04:00
Michael Davidsaver
c6910decfc oops 2017-04-27 14:19:15 -04:00
Michael Davidsaver
b01dd38526 std/filter/test: use dbUnitTest 2017-04-27 14:09:41 -04:00
Andrew Johnson
d825f87359 Check for empty PV names in Perl catools 2017-04-27 12:10:27 -05:00
Michael Davidsaver
82ff67a204 travis-ci enable mingw w/ dll 2017-04-27 12:57:01 -04:00
Michael Davidsaver
e751480b06 Merge remote-tracking branch 'launchpad/3.14'
* launchpad/3.14:
  travisci
  catools: Fix SEGFAULT from bad PV names
  typo
2017-04-27 12:55:35 -04:00
Michael Davidsaver
3184371e8d travisci 2017-04-27 12:53:35 -04:00
Andrew Johnson
f2e54be965 catools: Fix SEGFAULT from bad PV names 2017-04-27 10:52:07 -05:00
Andrew Johnson
0748adfb9a Additional linkInitTest checks
Now tests array record types and the eventRecord.
Also moved repeated IOC startup code into separate function.
2017-04-26 16:04:13 -05:00
Andrew Johnson
4813b37538 Minimize work done in readLocked routine
Move post-I/O back to read_event.
Fix initialization bug.
2017-04-26 16:01:09 -05:00
Andrew Johnson
bbd94928bb Minimize work done in readLocked() routine
Move post-I/O work back to the read_xx routines.
2017-04-26 15:59:03 -05:00
Andrew Johnson
c13a4f24ce Cosmetic changes to various soft device supports 2017-04-26 15:55:03 -05:00
Andrew Johnson
d1af663705 Enhancements to subArray record & soft device support
Permit record's use as a look-up-table by reading constant
input array data in dset::read_sa() routine.

Move sub-array operation into a separate function.
Extract subarray from constant INP value at device init.
Reduce the work done inside readLocked() to a minimum.
Limit NELM value to at most MALM in record init routine.
2017-04-26 15:52:08 -05:00
Andrew Johnson
4eafb6fd8e Fix bug in eventRecord::init_record
Look up event handle /after/ the device init routine has been run,
in case it modified the event name in VAL. That didn't used to
be possible because constant links couldn't return strings.
2017-04-26 15:03:43 -05:00
Andrew Johnson
33f3145fcc Updates to Release Notes and links.html 2017-04-25 22:52:08 -05:00
Andrew Johnson
c71afb631c Make dbLinkIs{Constant|Volatile}() return only true/false 2017-04-25 20:37:09 -05:00
Jeong Han Lee
c22670cbb0 typo 2017-04-24 21:06:30 -04:00
Andrew Johnson
35385bc688 Merge changes from 3.14 into 3.15
Changes to be committed:
	modified:   src/ioc/db/dbCa.c
	modified:   src/libCom/calc/postfix.h
	modified:   src/libCom/test/epicsCalcTest.cpp
2017-04-24 18:10:53 -05:00
Andrew Johnson
c5decfbd12 Fix for dbCa warning seg-fault
Don't queue an errlog message containing a pointer to a string
that will disappear soon.

Thanks to Matt Pearson for the bug analysis.
2017-04-24 18:03:53 -05:00
Andrew Johnson
da94b7a2e4 Fix dbConstLink to handle a long-string array properly
Added a new parser dbLSConvertJSON for long-string arrays.
New test checks that only the first string element is used.
2017-04-24 17:09:01 -05:00
Andrew Johnson
311ad57e93 printfRecord: Handle const long-strings in "%ls"
Adds some tests for printfRecord.
2017-04-24 15:18:52 -05:00
Andrew Johnson
30e634b97b Adjust calcout's handling of undefined links 2017-04-23 23:32:15 -05:00
Andrew Johnson
421a2c8eb9 Tidy up lnkConst.c after Michael's bug-fix changes
Should make the code easier to follow.
2017-04-23 00:11:22 -05:00
Michael Davidsaver
cfe9a51c5d std/rec/test: start linkInitTest 2017-04-21 17:26:58 -04:00
Michael Davidsaver
066984e11d Merge branch 'master' into link
* master: (226 commits)
  ioc/db: testdbGetFieldEqual() detect zero size
  Cleanup in asLib
  Allow whitespace before comments in AS config files
  Supress MS warning C4251
  Add a plan to std/filters/test/syncTest.c
  Fix dbUnitTest.c
  avoid void* +=
  Fix and test for macLib losing error status
  update notes
  libCom/test: ipAddrToAsciiTest skip cleanup unless valgrind is possible
  libCom/test: add ipAddrToAsciiTest to testHarness
  db/test: dbPutGetTest check dbGet() of long string field
  db: dbGet() ensure long string nil and actual string length
  db/test: dbPutGetTest check for dbGet() attribute crash
  db: fix dbGet() for attributes as long string
  db/test: dbPutGetTest add test for lp:1678494
  db: fix dbGet() of link fields as DBF_CHAR
  dbUnitTest: add testdbGetArrFieldEqual()
  db/test: add dbPutGetTest
  Update release notes as per Michael's review comment
  ...

Conflicts:
	src/ioc/db/dbLink.c
	src/ioc/db/test/Makefile
	src/std/dev/devSoSoftCallback.c
	src/std/rec/boRecord.c
	src/std/rec/dfanoutRecord.c
	src/std/rec/longinRecord.c
	src/std/rec/longoutRecord.c
2017-04-21 17:20:12 -04:00
Andrew Johnson
e25a2964bc Fix postfix.h macro arg, document 2017-04-21 16:09:36 -05:00
Michael Davidsaver
6c062981fb Merge remote-tracking branch 'launchpad/3.15'
* launchpad/3.15:
  ioc/db: testdbGetFieldEqual() detect zero size
  Cleanup in asLib
  Allow whitespace before comments in AS config files
  Supress MS warning C4251
  Add a plan to std/filters/test/syncTest.c
  Fix dbUnitTest.c
  avoid void* +=
  Fix and test for macLib losing error status
  update notes
  libCom/test: ipAddrToAsciiTest skip cleanup unless valgrind is possible
  libCom/test: add ipAddrToAsciiTest to testHarness
  Adjusted .gitignore patterns
  libCom/test: add network libraries for Windows builds
  Moved .bzrignore to .gitignore
  libCom/test: add ipAddrToAsciiTest
  libCom: revise ipAddrToAscii
2017-04-21 16:16:03 -04:00
Michael Davidsaver
22b10adf29 ioc/db: testdbGetFieldEqual() detect zero size 2017-04-21 16:14:43 -04:00
Michael Davidsaver
8382367495 libCom/test: epicsCalcTest use exact postifx buffers
exposes INFIX_TO_POSTFIX_SIZE() bug
2017-04-21 16:13:18 -04:00
Michael Davidsaver
54e94a1e12 std/link: lnkConst refactor
Avoid variable with same name as typedef.
Confuses qtcreator.
2017-04-21 16:08:48 -04:00
Michael Davidsaver
414e5b82b8 std/link: lnkCalc require expression
error if 'expr' key isn't provided.
2017-04-21 16:08:33 -04:00
Michael Davidsaver
b99a7b9252 std/link: lnkConst fix mem leak and hard fail on no mem 2017-04-21 16:08:15 -04:00
Michael Davidsaver
43f6a06bcd std/link: lnkConst avoid cantProceed() 2017-04-21 16:08:10 -04:00
Michael Davidsaver
7121b016d5 ioc/db: dbConstLoadLS handle size=0
handle size=0 and clarify
2017-04-21 16:08:04 -04:00
Michael Davidsaver
8b24383e9e arrayOpTest: check initial dbGet value 2017-04-21 16:07:55 -04:00
Andrew Johnson
e99fe61e07 Fix postfix.h macro arg and document 2017-04-21 14:18:05 -05:00
Andrew Johnson
23cef0339e Fix buffer allocation bug in lnkCalc.c 2017-04-21 13:56:49 -05:00
Andrew Johnson
611cb3f52e Fix typos, remove FIXMEs from lnkConst.c 2017-04-21 13:55:59 -05:00
Andrew Johnson
7e60faae10 No need to truncate const string array elements 2017-04-21 13:04:53 -05:00
Andrew Johnson
821fb1302b Merged changes from 3.14 branch into 3.15 2017-04-20 16:57:08 -05:00
Andrew Johnson
64c16c0f6e Cleanup in asLib
Improve error messages.
Remove unnecessary pointer casts.
2017-04-20 16:27:20 -05:00
Andrew Johnson
9f01c47542 Allow whitespace before comments in AS config files
Fixes lp: #1677302
Makes the lexer patterns more like dbStatic.
Handle non-printable invalid characters in input properly.
2017-04-20 16:23:36 -05:00
Andrew Johnson
aca7b44a05 Supress MS warning C4251 2017-04-20 11:42:52 -05:00
Michael Davidsaver
4f1b244589 ca: fix export caLimitArray on win32 2017-04-20 09:54:05 -04:00
Andrew Johnson
dcb1f75b4d Cosmetic cleanups 2017-04-19 16:53:12 -05:00
Andrew Johnson
89f13aa51b Modify soft devices to synchronize TSEL=-2 timestamps
Use dbLinkDoLocked() to ensure a timestamp set by TSEL=-2
comes from the same update as the value.
2017-04-19 16:50:38 -05:00
Andrew Johnson
d2db634ed2 Add dbLinkDoLocked() support
New lset method, implemented in all link types.
Includes a test for the dbCa implementation.
2017-04-19 16:44:11 -05:00
Andrew Johnson
b8f542fc0d Add a plan to std/filters/test/syncTest.c 2017-04-18 14:49:40 -05:00
Andrew Johnson
6f9905d060 Fix dbUnitTest.c 2017-04-18 14:48:54 -05:00
Michael Davidsaver
f3841c4767 avoid void* += 2017-04-17 18:58:19 -04:00
Andrew Johnson
4f8fd545fa Merge branch 'fix-async-dns/master' into 3.14 2017-04-17 15:52:10 -05:00
Andrew Johnson
d4552af39b Fix and test for macLib losing error status
Problem found & diagnosed by Mark Rivers.
2017-04-17 11:47:21 -05:00
Michael Davidsaver
0c02c5cb30 update notes 2017-04-15 19:38:56 -04:00
Michael Davidsaver
1f90e98491 libCom/test: ipAddrToAsciiTest skip cleanup unless valgrind is possible 2017-04-15 19:34:04 -04:00
Michael Davidsaver
352fd32c45 libCom/test: add ipAddrToAsciiTest to testHarness 2017-04-12 20:30:23 -04:00
Michael Davidsaver
6bf66d1c93 Merge remote-tracking branch 'launchpad/3.15'
* launchpad/3.15:
  db/test: dbPutGetTest check dbGet() of long string field
  db: dbGet() ensure long string nil and actual string length
  db/test: dbPutGetTest check for dbGet() attribute crash
  db: fix dbGet() for attributes as long string
  db/test: dbPutGetTest add test for lp:1678494
  db: fix dbGet() of link fields as DBF_CHAR
  dbUnitTest: add testdbGetArrFieldEqual()
  db/test: add dbPutGetTest
  Adjusted .gitignore patterns
  Move .bzrignore to .gitignore
2017-04-06 20:32:48 -04:00
Michael Davidsaver
b624222a0f db/test: dbPutGetTest check dbGet() of long string field 2017-04-06 20:28:04 -04:00
Michael Davidsaver
739a112bec db: dbGet() ensure long string nil and actual string length 2017-04-06 20:28:01 -04:00
Michael Davidsaver
5e082bb75d db/test: dbPutGetTest check for dbGet() attribute crash 2017-04-06 20:27:37 -04:00
Michael Davidsaver
8ebfd0821a db: fix dbGet() for attributes as long string
dbGet() of "rec.RTYP$" with DBF_CHAR and nRequest==1
not handled correctly.  Results in crash.
2017-04-06 20:27:34 -04:00
Michael Davidsaver
fc8d4c2b5f db/test: dbPutGetTest add test for lp:1678494 2017-04-06 20:27:18 -04:00
Michael Davidsaver
1888253093 db: fix dbGet() of link fields as DBF_CHAR
dbGet() DBF_CHAR with nRequest==1 not handled correctly.
Results in crash.
2017-04-06 20:27:13 -04:00
Michael Davidsaver
8edefb9d63 dbUnitTest: add testdbGetArrFieldEqual() 2017-04-06 20:27:03 -04:00
Michael Davidsaver
0f31e35b87 db/test: add dbPutGetTest 2017-04-06 20:25:55 -04:00
Ralph Lange
865a870912 Merged typed-recsup branch (by Ben / Ralph) 2017-04-05 09:42:16 +02:00
Ralph Lange
9bfc8d8fad Update release notes as per Michael's review comment 2017-04-03 09:55:06 +02:00
Andrew Johnson
23a856ae9b Adjusted .gitignore patterns 2017-03-31 12:22:29 -05:00
Andrew Johnson
5a73ac59a1 Adjusted .gitignore patterns 2017-03-31 12:18:43 -05:00
Andrew Johnson
e0af3e2af5 Adjusted .gitignore patterns 2017-03-31 12:08:03 -05:00
Ralph Lange
5726ca6964 libCom/test: add network libraries for Windows builds 2017-03-31 15:01:51 +02:00
Ralph Lange
f164b14ba1 Moved .bzrignore to .gitignore 2017-03-30 15:43:15 -05:00
Ralph Lange
4c06cdc660 Move .bzrignore to .gitignore 2017-03-30 17:10:52 +02:00
Ralph Lange
6884e0ce61 Moved .bzrignore to .gitignore 2017-03-30 17:08:29 +02:00
Ralph Lange
9e778511ee Add opt-in switch to makeBaseApp example 2017-03-30 16:35:54 +02:00
Ralph Lange
bad1b0ead3 Update release notes with opt-in instructions 2017-03-30 16:26:54 +02:00
Ralph Lange
ecf5ab4a4c Deprecate RECSUPFUN and the untyped struct rset. 2017-03-30 16:14:09 +02:00
Ralph Lange
2f510af603 Use (typed) rset instead of (untyped) struct rset inside Base 2017-03-30 14:35:24 +02:00
Ralph Lange
0f2e26bc4c Make generated code always use typed_rset
always cast to cover old-style supports
2017-03-30 14:33:06 +02:00
Ralph Lange
26a4e1489f Make compilation inside Base USE_TYPED_RSET 2017-03-30 14:30:53 +02:00
Ralph Lange
19be96ec3a Add opt-in switch USE_TYPED_RSET 2017-03-30 14:28:48 +02:00
Ralph Lange
6397204354 Update release notes, C++ instructions are tested 2017-03-27 09:51:32 +02:00
Ralph Lange
89a858f655 Remove remaining REC_TYPE defines 2017-03-27 09:49:30 +02:00
Ralph Lange
0b410c1b03 Update release notes entry 2017-03-24 17:16:18 +01:00
Ralph Lange
4f8134c63c Fix xxxRecord in templates to make exampleApp work 2017-03-24 17:08:07 +01:00
Ralph Lange
ef2da59c24 Remove REC_TYPE and UNTYPED_RSET/oldRecSup.h; add casts to record types 2017-03-24 17:07:22 +01:00
Ben Franksen
40c9e4799b use new typed rset only if UNTYPED_RSET is not defined, adapted release notes
Also moved the old definition(s) to a separate header file named oldRecSup.h
to avoid cluttering the new header file.
2017-03-21 17:01:13 +01:00
Michael Davidsaver
675c2aff14 rsrv: export variable caLimitArray 2017-03-18 17:41:33 -04:00
Michael Davidsaver
1636f3d9fe rsrv: optional max_array_bytes
use of large array free list is optional
2017-03-18 17:41:33 -04:00
Michael Davidsaver
1e7c80c909 cas: simplify buffer alloc
eliminate casBufferFactory.
move small buffer free list into clientBufMemoryManager
2017-03-18 17:41:33 -04:00
Michael Davidsaver
2096c60652 ca: large array free list is optional 2017-03-18 17:41:33 -04:00
Michael Davidsaver
3009f88f64 rsrv: support larger than max. array bytes 2017-03-13 19:22:56 -04:00
Michael Davidsaver
b783427bf7 pcas: support larger than max array bytes
clientBufMemoryManager already supports allocations
larger than max array bytes, adjust callers inBuf/outBuf
to actually request larger allocations.
2017-03-13 19:22:53 -04:00
Michael Davidsaver
85b6b5c507 ca: support alloc larger than max array bytes
automatically try to allocate a custom buffer
when a message larger than ca max array bytes
is encountered.
2017-03-13 19:22:50 -04:00
Andrew Johnson
20627c0465 Merged changes from 3.15 branch to revno 12809 2017-03-08 10:36:41 -06:00
Andrew Johnson
f71102982f Fix "make -q" problems with shared library stubs 2017-03-06 18:46:46 -06:00
Andrew Johnson
d6b0c3041e Merged changes from 3.14 branch to revno 12703 2017-03-06 15:40:28 -06:00
Andrew Johnson
214e9534cc Allow 'make -q' to work with CHECK_RELEASE=NO 2017-03-03 18:18:57 -06:00
Andrew Johnson
17bd1ae6d0 db/test: Fix warning from clang 2017-03-03 12:23:36 -06:00
Ben Franksen
f71fe62bc3 added release notes entry 2017-03-03 17:40:24 +01:00
Ben Franksen
825c075df7 fixes in recSup and record types according to merge review
* removed struct valueDes
* made get_value take void (no arguments), added deprecation note
* removed misleading array size comment for get_units

Also added const to method parameters exactly where called in base with
const arguments.
2017-03-03 16:43:50 +01:00
Ben Franksen
ff91ede462 revert use of struct dbr_precision in call to get_precision in dbAccess.c 2017-03-03 16:41:03 +01:00
Michael Davidsaver
1d749ac7e7 dbLock: add assert in dbScanLock
catch locking attempts before iocInit()
2017-02-28 21:00:57 -06:00
Michael Davidsaver
6377c2e1e4 db/test: dbPutLinkTest include json links and more 2017-02-28 20:58:11 -06:00
Andrew Johnson
8069d9d80b dbUnitTest: Improve output slightly 2017-02-28 20:55:05 -06:00
Michael Davidsaver
46993a5e38 dbUnitTest: more informative dbPutField*() 2017-02-28 20:09:21 -06:00
Michael Davidsaver
2bb02e732a libCom: add errSymMsg() error message lookup
Like errSymLookup() but always returns a static string.
2017-02-28 20:06:42 -06:00
Michael Davidsaver
428dfe7a5c add testing lset 2017-02-28 18:00:51 -06:00
Andrew Johnson
5dcd3483ba dbStatic: dbPutStringNum() overflow handling
Default to accepting over-size integers in DB fields, truncate to field size.
E.g. permits setting DBF_LONG fields to 0xffffffff.
Adds dbConvertStrict config variable to disable this.
2017-02-28 00:25:43 -06:00
Michael Davidsaver
2a0cd00958 libca: lock when removing from msgMultiPVList 2017-02-27 14:48:30 -05:00
Michael Davidsaver
d744b06a28 libca: findOrCreateVirtCircuit() can return w/ piiu==NULL 2017-02-27 11:07:17 -05:00
Ben Franksen
1c3ffa1c76 fixed the wrong fix for getOptions in dbAccess.h 2017-02-26 13:54:58 +01:00
Michael Davidsaver
048b75304d libCom/test: add ipAddrToAsciiTest 2017-02-25 19:08:46 -05:00
Ben Franksen
aaafb1a5de db: call rset::get_precision with wrong type 2017-02-25 16:42:29 -05:00
Ben Franksen
cc946b760c partly fix lp:1666924, i.e. for rset only, as described in the ticket
This means:

* typed method definitions for struct rset
* using REC_TYPE macro in place of dbCommon
* define REC_TYPE as dbCommon unless defined
* in record supports, define REC_TYPE before including epics headers
* fix a few method types in record supports (e.g. void* -> REC_TYPE*)
* fix the type errors gcc finds in dbAccess.c and dbConvert.c
2017-02-24 21:11:11 +01:00
Michael Davidsaver
5783823e25 libCom: revise ipAddrToAscii
create multiple light-weight engines to
track transactions by engine and cancel
all transactions when an engine is released.

prior to fix for lp:1527636 this was ensured
for the last/only owner for the engine singleton.
2017-02-23 20:08:46 -05:00
Andrew Johnson
00549c832a Fix HTML entities 2017-02-17 14:16:57 -06:00
Andrew Johnson
c52088205e Remove constant link checks from test device 2017-02-17 14:15:31 -06:00
Andrew Johnson
e95fcb2e06 Merged changes from 3.15 branch, to revno 12807 2017-02-01 11:57:04 -06:00
Andrew Johnson
a7f0525ac7 Update Release Checklist 2017-01-30 18:04:47 -06:00
Andrew Johnson
de698f370a Merged Windows fixes from 3.14 branch, to revno 12699 2017-01-30 14:31:04 -06:00
Andrew Johnson
faf691a5be VS2015 starting to dislike '/' for compiler flags 2017-01-30 12:11:29 -06:00
Andrew Johnson
3a0e52fc3f Fix Windows dllPath.bat properly 2017-01-24 14:17:37 -06:00
Andrew Johnson
a105c6f538 Always quote Windows PATH arg's 2017-01-24 11:48:36 -06:00
Andrew Johnson
73eecbb759 Merged ARCH and bind fixes from 3.14 branch, revno 12696 2017-01-23 17:20:51 -06:00
Andrew Johnson
3e58c59377 Fix CA server bind issue from Freddie Akeroyd 2017-01-19 12:33:54 -06:00
Andrew Johnson
b9ae6c3308 Allow ARCH with trailing spaces 2017-01-18 10:59:36 -06:00
Andrew Johnson
3fd659e693 Merged PATH fix from 3.14 branch, revno 12694 2017-01-16 16:12:04 -06:00
Andrew Johnson
7310d78057 Prepend to PATH, not append 2017-01-16 10:46:56 -06:00
Andrew Johnson
051c059938 Removed some Revision-Id keywords 2017-01-06 17:31:51 -06:00
Andrew Johnson
dfc1b8ac23 Merged scan-rate protection changes from 3.14 branch, to revno 12693 2017-01-06 17:24:57 -06:00
Andrew Johnson
49e0e23f76 Better protection against bad periodic scan rates 2017-01-06 15:38:03 -06:00
Andrew Johnson
4a0fd0b954 Fix error message 2017-01-05 14:09:03 -06:00
Andrew Johnson
20dda339cc Make *_INC files order-only prerequisites 2017-01-04 16:32:13 -06:00
Andrew Johnson
7ec6be5d14 Update version numbers in documents for 3.15.6 2016-12-13 17:03:54 -06:00
Ralph Lange
eff44268e9 Set version to 3.15.5-DEV, close 3.15.5 chapter in release notes 2016-12-13 15:33:01 +01:00
Ralph Lange
fd53e175b4 Update CONFIG_BASE_VERSION for 3.15.5, remove "not released" from RELEASE_NOTES 2016-12-13 14:25:23 +01:00
Andrew Johnson
fab5ce675f Update comments in calcoutRecord 2016-12-12 17:44:01 -06:00
Andrew Johnson
85b5551b3b Merged final changes from 3.14.12.6 release 2016-12-09 17:27:35 -06:00
Andrew Johnson
260bc64b59 Set SNAPSHOT back to -DEV 2016-12-09 13:50:17 -06:00
Andrew Johnson
5097ac3230 Set SNAPSHOT for 3.14.12.6 2016-12-09 13:48:55 -06:00
Andrew Johnson
8d7bf52e51 One more cppcheck issue fixed 2016-12-09 11:17:43 -06:00
Andrew Johnson
a13416309c Merged asLib fix from 3.14 branch, to revno 12688 2016-12-08 14:00:52 -06:00
Andrew Johnson
1cb75ebb6e asLib message buffer too small (Freddie Akeroyd) 2016-12-08 13:57:23 -06:00
Andrew Johnson
63b059c35e Resolve additional cppcheck issues; fix iOS build 2016-12-07 17:51:00 -06:00
Andrew Johnson
dba6971e07 Merged changes from 3.14 branch to revno 12687 2016-12-07 16:36:58 -06:00
Andrew Johnson
94397b52fc Resolve some cppcheck errors & warnings 2016-12-07 13:53:26 -06:00
Andrew Johnson
7fe152ce1b Merge Bruce Hill's pcas-deadlock-fix-3.14 branch 2016-12-07 10:43:06 -06:00
Bruce Hill
d3568605ce Fetch nativeCount() in casChannelI constructor to avoid deadlock
if we fetch it from eventSysProcess()
2016-12-06 13:43:59 -08:00
Andrew Johnson
666721c7ad Document caput scalar arg's, update usage docs 2016-12-06 12:16:35 -06:00
Andrew Johnson
c3bb2bf2c2 Merged changes from 3.14 branch to revno 12682 2016-11-30 12:04:00 -06:00
0f7f4710c6 PCAS dynamic array support for GDD container types 2016-11-30 11:58:24 -06:00
Ralph Lange
2841af7069 rec: add promptgroups for OFFS and SHFT of fanout and seq 2016-11-29 14:48:57 +01:00
Andrew Johnson
0a4981093a Update mingw32 cross-target name for RHEL7 2016-11-15 17:44:21 -06:00
Andrew Johnson
726d7c6715 Fix chfPluginTest for MS 2015 compiler 2016-11-15 10:34:10 -06:00
Andrew Johnson
f1439f8b1c Fix epicsStdioTest for MS 2015 compiler 2016-11-15 09:56:42 -06:00
Andrew Johnson
aa6e976f92 Add .local includes to makeBaseApp templates 2016-11-04 17:18:14 -05:00
Andrew Johnson
3e0ddbb542 Set snapshot to -rc1-DEV 2016-10-31 18:06:50 -05:00
Andrew Johnson
67daaaa9b7 Set snapshot to -rc1-DEV 2016-10-31 17:06:19 -05:00
Andrew Johnson
a36443557b Set version to 3.14.12.6-rc1 2016-10-31 17:03:35 -05:00
Michael Davidsaver
99500b9be4 dbStatic: more informative error for bad field value 2016-09-18 17:35:19 -04:00
Michael Davidsaver
0821c8c4ff dbStatic: dbPutStringNum(, "") not an error
Restore previous behavour that empty string
is equivalent to numeric zero.

epicsParse*() returns S_stdlib_noConversion
where previously strtoul() did not.

Conflicts:
	src/ioc/db/test/Makefile
2016-09-12 18:20:02 -04:00
Andrew Johnson
da5455ed22 Fixes for Windows builds 2016-09-09 11:14:59 -05:00
Andrew Johnson
58c78af4f9 Initialize all fields of jlink, link types may not use calloc 2016-09-07 23:35:39 -05:00
Andrew Johnson
813166128e Merged changes from 3.15 branch, to revno 12781 2016-09-07 10:04:54 -05:00
Andrew Johnson
b2012fdfb5 Added test link type, fix dbPutLinkTest for JSON_LINKs 2016-09-07 00:50:40 -05:00
Andrew Johnson
c12a35e388 Clean up memory leaks 2016-09-07 00:47:51 -05:00
Andrew Johnson
8a9707e74f Fixed a small memory leak in lnkCalc 2016-09-06 22:28:36 -05:00
Andrew Johnson
2d4301f0bb Fix warnings from clang 2016-09-05 22:36:45 -05:00
Andrew Johnson
268e59b052 Minor updates 2016-09-05 15:38:16 -05:00
Andrew Johnson
5b74799605 Some documentation updates 2016-09-05 15:12:09 -05:00
Andrew Johnson
cd49e245c2 Added JLink reporting infrastructure
Command 'dbjlr <record|*> <level>' calls the report method for
all JSON links in all records, or in one named record.
Added level and indent arguments to the jlif::report() method.

Added jlif::map_children() method for recursing through all
JSON links, plus dbJLinkMapChildren() and dbJLinkMapAll() APIs.

Implemented the report and map_children methods in the const
and calc link types.
2016-09-05 14:25:33 -05:00
Andrew Johnson
19447dc7ff Make the long-string buffer for link fields bigger
When representing a link field as a long string (.INP$)
we have to pick some size limit for the buffer.
Previously this was the max length of a PV name + 12 chars,
but with JSON links that's not big enough.

This commit sets it to 1KB and defines a macro so it will be
easier to change in the future if necessary.
2016-09-04 16:56:15 -05:00
Andrew Johnson
dd311be319 JLink: Convert parser->linkDepth into jlink->parseDepth
This counter is indicates when we've finished parsing a link,
and needs to be stored with link rather than the parser so it
keeps its value while parsing embedded links. This fixes the
embedded links bug.

Also removed the limit on a link name's length.
2016-09-04 16:33:10 -05:00
Andrew Johnson
4448317d73 Add lnkConst_remove, fix debug messages 2016-09-04 16:02:59 -05:00
Andrew Johnson
ec6d86c91c Fix jlink memory leak in dbStaticLib
Added dbFreeLinkInfo(), use everywhere to release dbLinkInfo resources.

Renamed link_type => expected_type in db[Can]SetLink(),
my brain understands this name faster.
2016-09-04 15:56:39 -05:00
Andrew Johnson
4302da3628 Minor fixes to the calc link-type 2016-09-03 22:24:55 -05:00
Andrew Johnson
25315882ec Clean up JSON_LINKs in doCloseLinks 2016-09-03 22:22:12 -05:00
Andrew Johnson
f8d6cd98a0 Minor cleanups 2016-09-03 19:44:49 -05:00
Andrew Johnson
5fe3e8bfb5 Added calc link-type 2016-09-03 19:22:55 -05:00
Andrew Johnson
8d1c416551 Moved PV_LINK-specific code out of dbLink.c into link types
This required a change to the lset::getValue arguments, removing
the pstat and psevr pointers. Links can still return a non-zero
value from getValue and trigger a LINK:INVALID alarm, but for any
other alarm settings they must manipulate the record themselves.
2016-09-03 19:21:11 -05:00
Andrew Johnson
07b09eed1f Fixes to dbJLink, added dbJLinkFree()
Moved the clearing of key_is_link to the right place,
embedded links now parse correctly.
2016-09-03 13:36:17 -05:00
Andrew Johnson
1e1c52cb69 Use new epicsStrnDup() API 2016-09-03 13:27:30 -05:00
Andrew Johnson
6e88d48615 Added epicsStrnDup() and dbmfStrndup() routines
The JSON parser passes string arguments with a length
instead or nil-terminating them. These routines make it
simple to copy such strings into either permanent or
temporary storage.
2016-09-03 13:25:19 -05:00
Andrew Johnson
23c71e9965 Various improvements
* Added new lset::openLink() method, called on JSON_LINKs only
* Cleanup in dbJLink.c to prevent memory leaks.
* Removed jlif::start_parse() method.
* Renamed jlif::end_parse() to end_child, which will be called on
the parent link when a child link has succesfully finished parsing.
2016-09-01 23:21:23 -05:00
Andrew Johnson
3992d4b92a Split dbJLinkInit, JLinks are now parsed at load-time 2016-09-01 00:56:26 -05:00
Andrew Johnson
40a3a66745 Added loadLS routine to lset
The long string in/out records use a different initializer
for constant links. The new loadLS method allows a constant
link type to initialize such a long string field.

NB: This routine was added in the middle of the lset table.
Any external link support implementations must be adjusted.
2016-08-31 00:36:23 -05:00
Andrew Johnson
d0dcd61b23 Add code for arrays of strings 2016-08-30 23:03:08 -05:00
Andrew Johnson
5ec0633282 Pass link dbfType to jlif allocator; needed! 2016-08-30 01:13:15 -05:00
Andrew Johnson
33e565b67d Fix build warning from clang 2016-08-29 10:41:51 -05:00
Andrew Johnson
7edc0c67ca JSON Links implementation
The lnkConst.c implementation is not yet complete, no support for arrays of
strings (JMOP).

Link error messages should display their record & field name, which is not yet
possible.

The ability to embed links as parameters to other link types is not complete
yet; this will be required for the calc link type.

This code currently passes all existing tests, but additional tests are needed
for the new functionality.
2016-08-29 01:12:09 -05:00
Andrew Johnson
056edc0d8a Undo buggy change 2016-08-28 23:41:35 -05:00
Andrew Johnson
fc66793ee2 Start documenting changes 2016-08-27 16:31:49 -05:00
Andrew Johnson
37b6cbb50c Use new dbLink APIs instead of checking link.type 2016-08-27 16:30:48 -05:00
Andrew Johnson
cca6a5d05a Add isConstant and isVolatile to LSET 2016-08-27 16:26:55 -05:00
Andrew Johnson
82385c9f1b Missed a spot handling JSON_LINK field values 2016-08-18 00:18:41 -05:00
Andrew Johnson
cbc7af0ef8 Remove 2 obsolete dbStatic routines (forms) 2016-08-15 20:19:19 -05:00
Andrew Johnson
bed1c618a8 Use dbPutLinkAsync() in all output SoftCallback dev's 2016-08-13 21:53:31 -05:00
Andrew Johnson
7df97f074e Add lset::dbPutLinkAsync and S_db_noLSET 2016-08-13 21:42:23 -05:00
Andrew Johnson
fe71fc98b8 Undo a small & unnecessary behaviour change 2016-08-12 23:53:42 -05:00
Andrew Johnson
d3a9ba7701 Fix issues related to const array initialization 2016-08-12 23:21:26 -05:00
Andrew Johnson
bb58598eba A cleaner way to close CA & DB links 2016-08-12 23:20:24 -05:00
Michael Davidsaver
899feb24b2 iocInit: close CA_LINKs through lset 2016-08-12 19:50:17 -04:00
Andrew Johnson
fb785e45c7 Adjust record and device support for array constants 2016-08-10 12:53:39 -05:00
Andrew Johnson
519208833f Add lset::loadArray and JSON parsing
Replace lset::loadLink with lset::loadScalar, add lset::loadArray
Add dbLoadLinkArray() routine to dbLink.h API
New dbConvertJSON.h API for use by dbConstLoadArray()
2016-08-10 12:49:49 -05:00
Andrew Johnson
ae2180f5b5 Comments in Makefile 2016-08-10 12:21:03 -05:00
Andrew Johnson
dafe2a83a3 libCom: Make yajl_alloc.h usable 2016-08-10 12:19:53 -05:00
Michael Davidsaver
ebfaca8228 cas: ignore CA client version older than v4.4
CAS ignore search and version messages
from CA minor versions older than 4.4.
2016-07-30 11:45:42 -04:00
Michael Davidsaver
da78e01e89 rsrv: remove !CA_V44() code
Remove code supporting deprecated
CA minor versions < 3
2016-07-31 19:49:08 -04:00
Michael Davidsaver
caf70216d3 rsrv: no ca exception response to UDP 2016-07-31 19:35:25 -04:00
Michael Davidsaver
95fd255dd6 rsrv: ignore CA client version older than v4.4
RSRV ignore search and version messages
from CA minor versions older than 4.
2016-07-30 10:35:49 -04:00
Michael Davidsaver
2dd16f4362 cas: honor DOREPLY for TCP searches 2016-07-31 15:10:36 -04:00
Michael Davidsaver
4c2b8819cd cas: ignore echo and unexpected UDP
Ignore UDP echo.
By default, don't log unexpected/invalid
UDP messages.
2016-07-30 11:46:28 -04:00
Michael Davidsaver
8992d5a593 rsrv: send channel create failure 2016-07-30 12:09:33 -04:00
Michael Davidsaver
802f29df47 rsrv: UDP search ignore DOREPLY
Don't send notice of failure
for lookup via. UDP.
2016-07-30 10:46:21 -04:00
Michael Davidsaver
16c419350b rsrv: ignore echo and unexpected UDP
Ignore UDP echo.
By default, don't log unexpected/invalid
UDP messages.
2016-07-30 10:41:39 -04:00
Andrew Johnson
935ab02bc1 Fix build failure on Solaris 2016-06-07 12:31:15 -05:00
Andrew Johnson
63d8651474 Make Perl DB parser handle duplicates and rtyp '*' 2016-06-07 01:00:38 -05:00
Andrew Johnson
c01967d64f Remove spurious include dbCa.h 2016-06-02 22:29:45 -05:00
Andrew Johnson
d1986edd9e Simplify link-type checks in record supports 2016-06-02 22:22:11 -05:00
Andrew Johnson
7627454f63 Simplify link-type checks in soft device supports 2016-06-02 22:02:54 -05:00
Andrew Johnson
667f74759d Allow (discard) comments inside JSON 2016-06-01 15:46:24 -05:00
Andrew Johnson
1f726c8760 Recognize arrays as constant links 2016-05-24 12:01:38 +02:00
Andrew Johnson
08b7802009 Recognize numbers before barewords 2016-05-24 11:59:08 +02:00
Andrew Johnson
f6c4099634 Make info tags also JSON objects 2016-05-23 12:00:11 +02:00
Andrew Johnson
c76041b14c Rename JSON_STR to JSON_LINK 2016-05-20 20:32:39 -05:00
Andrew Johnson
7ea544673a Accept bareword JSON strings, quote them 2016-05-20 00:02:45 -05:00
Andrew Johnson
6e6ae4354b Fix warnings from dbmfStrdup() change 2016-05-19 14:01:05 -05:00
Andrew Johnson
61e82ee1ae Fix memory allocation bugs 2016-05-19 01:32:12 -05:00
Andrew Johnson
28b3b1678c ioc/dbStatic: Add JSON parsing of field values
The parsing removes all white-space outside of quotes from the JSON.
dbRecordField() now strips quotes from simple string values itself.
2016-05-19 01:15:33 -05:00
Andrew Johnson
efb5ba27ae libCom/dbmf: Add dbmfStrcat3() for JSON parsing
Also removed all epicsShareAPI attributes
Made string arguments const char *
2016-05-19 00:58:45 -05:00
Andrew Johnson
574db56740 Make antelope's error messages slightly nicer 2016-05-19 00:51:23 -05:00
Andrew Johnson
998c3c1648 Clean up warnings from gcc 5.2 2016-05-16 14:55:58 -05:00
Andrew Johnson
6a592dc2c0 Support "link(name, lset)" syntax in DBD files
Both Perl and dbStaticLib support included.
Also added a new std/link directory for link types.
Nothing looks up the registered link support tables yet.
2016-05-08 22:57:42 -05:00
Andrew Johnson
ac5c7b0314 Merged Michael's cxxcleanup branch 2016-05-04 17:50:59 -05:00
Michael Davidsaver
d674866219 epicsGuard.h add typedefs linking guard and release 2016-05-02 20:53:51 -04:00
Michael Davidsaver
a1bd644502 drop all templateInstances.cpp
No longer needed by any targets.
2016-05-02 20:51:11 -04:00
Michael Davidsaver
a38dccfb1a add guard/release typedefs for epicsMutex 2016-04-28 09:20:13 -04:00
Michael Davidsaver
17edfd0652 use epicsMin/Max instead of tsMin/Max
Don't remove tsMinMax.h yet as it appeared
in caServerApp template.
2016-04-28 09:20:13 -04:00
Michael Davidsaver
afd48be98c drop unused tsBTree.h 2016-04-28 09:20:13 -04:00
Michael Davidsaver
d92af8c44d remove unused autoPtrDestroy.h 2016-04-28 09:20:13 -04:00
Michael Davidsaver
2af37d076d drop unused epicsOnce 2016-04-28 09:20:13 -04:00
Michael Davidsaver
64c1a28f69 remove unused locationException.h includes 2016-04-28 09:20:13 -04:00
Michael Davidsaver
954874dbd6 drop epicsMemory.h 2016-04-28 09:20:13 -04:00
Michael Davidsaver
673cb24fc2 replace use of epics_auto_ptr w/ eapt_array
add helpers for udpiiu to calculate parameters maxPeriod and nTimers,
allowing them to be const.
Add SearchArray to hold fixed-size array of auto_ptr.
2016-04-28 09:20:13 -04:00
Michael Davidsaver
05c347434b use auto_ptr instead of epics_auto_ptr where applicable 2016-04-28 09:20:13 -04:00
Andrew Johnson
13294f80cc Add basic support and tests for a JSON link address type 2016-04-27 20:47:17 -05:00
Andrew Johnson
778aa18c00 More cleanup 2016-04-27 20:29:16 -05:00
Andrew Johnson
0348c2295b Cleanup 2016-04-26 22:13:12 -05:00
Andrew Johnson
8a5d1a08ad Restore loadLink to lset, move CONSTANT link code into its own source file 2016-04-03 01:29:28 -05:00
Andrew Johnson
1e028d68d8 Move DBLINK support code into its own source file 2016-04-03 00:49:36 -05:00
Andrew Johnson
d33c402b00 Release Notes 2016-03-23 17:15:57 -05:00
Andrew Johnson
bc2a47b849 cvtFastPerform: Rename reserved member names, fix for vxWorks 2016-03-23 16:56:34 -05:00
Andrew Johnson
0a0b9a93a2 Simplify epicsConvertDoubleToFloat() 2016-03-22 18:14:12 -05:00
Andrew Johnson
d949e34c13 More cvtFastPerform changes
Added a converter using std::streambuf (slow!)
Pass buffer size to converters
Added verbose flag and # numbers to measure
Do the small number tests first
2016-03-22 17:47:03 -05:00
Andrew Johnson
db4f208659 Collate and report by precision 2016-03-22 01:01:51 -05:00
Andrew Johnson
e82449171f Restructure cvtFastPerform, fix VxWorks build 2016-03-18 17:45:52 -05:00
Andrew Johnson
e7bba39737 Add int64 record types and device support, from long 2016-03-16 13:14:49 -05:00
Andrew Johnson
f97c1a345e Fix cvtFast and tests
We might still want to change the actual behaviour though,
see the FIXME comments.
2016-03-16 09:44:35 -05:00
Andrew Johnson
4a5a675ef8 Remove development printf() statements 2014-08-24 23:48:32 -05:00
Andrew Johnson
2d4243981f Fix warnings found by clang 2014-07-12 01:12:08 -05:00
Andrew Johnson
2fb0b0763d Implement 64-bit database field types.
Incorporates major reworking of the dbConvert.c file.
if the 64-bit stuff gets rejected most of that should
get pulled in anyway.
2014-07-10 18:13:28 -05:00
Michael Davidsaver
428268a71e rsrv: avoid strlen() on possible unterminated strings
Detect these w/o risk of SIGSEGV
2014-01-11 10:59:57 -05:00
Michael Davidsaver
746c739769 add epicsStrnLen()
Base currently requires only POSIX 2001 while
strnlen() is part of POSIX 2008.
2014-01-11 10:58:39 -05:00
1383 changed files with 3129 additions and 250564 deletions

86
.appveyor.yml Normal file
View File

@@ -0,0 +1,86 @@
# AppVeyor configuration for EPICS Base
# Ralph Lange <ralph.lange@gmx.de>
# Copyright (c) 2016-2017 ITER Organization
# Version format
version: base-{branch}-{build}
#---------------------------------#
# repository cloning #
#---------------------------------#
# Called at very beginning, before repo cloning
init:
# Set autocrlf to make batch files work
- git config --global core.autocrlf true
# Set clone depth (do not fetch complete history)
clone_depth: 2
# Skipping commits affecting only specific files
skip_commits:
files:
- 'documentation/*'
- 'templates/*'
- '**/*.html'
- '**/*.md'
#---------------------------------#
# build matrix configuration #
#---------------------------------#
# Build Configurations: dll/static, regular/debug
configuration:
- dynamic
- static
- dynamic-debug
- static-debug
# Environment variables: compiler toolchain
environment:
matrix:
- TOOLCHAIN: 9.0
- TOOLCHAIN: 10.0
- TOOLCHAIN: 11.0
- TOOLCHAIN: 12.0
- TOOLCHAIN: 14.0
- TOOLCHAIN: cygwin
- TOOLCHAIN: mingw
# Platform: architecture
platform:
- x86
- x64
# Matrix configuration: allow specific failing jobs
matrix:
exclude:
# VS Express installs don't have the 64 bit compiler
- platform: x64
TOOLCHAIN: 9.0
- platform: x64
TOOLCHAIN: 10.0
#---------------------------------#
# building & testing #
#---------------------------------#
install:
- cmd: .ci/appveyor-prepare.bat
build_script:
- cmd: .ci/appveyor-make.bat
test_script:
- cmd: .ci/appveyor-make.bat runtests
#---------------------------------#
# notifications #
#---------------------------------#
notifications:
- provider: Slack
incoming_webhook:
secure: RYOm3FIUYeZGjWKaeTVKwq+C3fzK54AKwbmAoECED45mex3lN+8HmrC845a6mg9xPUJ/ND51RopWVaKDD9/UzaM0SO195RQLKqUTIUafiuM=

View File

@@ -1,9 +0,0 @@
./bin
./lib
./db
./dbd
./html
./include
./templates
**/O.*
./QtC-*

118
.ci/appveyor-make.bat Normal file
View File

@@ -0,0 +1,118 @@
:: Universal build script for AppVeyor (https://ci.appveyor.com/)
:: Environment:
:: TOOLCHAIN - toolchain version [9.0/10.0/11.0/12.0/14.0/cygwin/mingw]
:: CONFIGURATION - determines EPICS build [dynamic/static]
:: PLATFORM - architecture [x86/x64]
::
:: All command line args are passed to make
Setlocal EnableDelayedExpansion
set "ST="
if /i "%CONFIGURATION%"=="static" set ST=-static
set OS=64BIT
if "%PLATFORM%"=="x86" set OS=32BIT
echo [INFO] Platform: %OS%
:: Use parallel make, except for 3.14
set "MAKEARGS=-j2 -Otarget"
if "%APPVEYOR_REPO_BRANCH%"=="3.14" set MAKEARGS=
if "%TOOLCHAIN%"=="cygwin" (
set "MAKE=make"
if "%OS%"=="64BIT" (
set "EPICS_HOST_ARCH=cygwin-x86_64"
set "INCLUDE=C:\cygwin64\include;%INCLUDE%"
set "PATH=C:\cygwin64\bin;%PATH%"
echo [INFO] Cygwin Toolchain 64bit
) else (
set "EPICS_HOST_ARCH=cygwin-x86"
set "INCLUDE=C:\cygwin\include;%INCLUDE%"
set "PATH=C:\cygwin\bin;%PATH%"
echo [INFO] Cygwin Toolchain 32bit
)
echo [INFO] Compiler Version
gcc -v
goto Finish
)
if "%TOOLCHAIN%"=="mingw" (
set "MAKE=mingw32-make"
if "%OS%"=="64BIT" (
set "EPICS_HOST_ARCH=windows-x64-mingw"
set "INCLUDE=C:\tools\mingw64\include;%INCLUDE%"
set "PATH=C:\tools\mingw64\bin;%PATH%"
echo [INFO] MinGW Toolchain 64bit
) else (
set "EPICS_HOST_ARCH=win32-x86-mingw"
set "INCLUDE=C:\tools\mingw32\include;%INCLUDE%"
set "PATH=C:\tools\mingw32\bin;%PATH%"
echo [INFO] MinGW Toolchain 32bit
)
echo [INFO] Compiler Version
gcc -v
goto Finish
)
set "VSINSTALL=C:\Program Files (x86)\Microsoft Visual Studio %TOOLCHAIN%"
set "MAKE=C:\tools\make"
if "%OS%"=="64BIT" (
set EPICS_HOST_ARCH=windows-x64%ST%
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%
if exist "%VSINSTALL%\VC\vcvarsall.bat" (
call "%VSINSTALL%\VC\vcvarsall.bat" x86
where cl
if !ERRORLEVEL! NEQ 0 goto MSMissing
goto MSFound
)
if exist "%VSINSTALL%\VC\bin\vcvars32.bat" (
call "%VSINSTALL%\VC\bin\vcvars32.bat"
where cl
if !ERRORLEVEL! NEQ 0 goto MSMissing
goto MSFound
)
if exist "%VSINSTALL%\Common7\Tools\vsvars32.bat" (
call "%VSINSTALL%\Common7\Tools\vsvars32.bat"
where cl
if !ERRORLEVEL! NEQ 0 goto MSMissing
goto MSFound
)
)
:MSMissing
echo [INFO] Installation for MSVC Toolchain %TOOLCHAIN% / %OS% seems to be missing
exit 1
:MSFound
echo [INFO] Microsoft Visual Studio Toolchain %TOOLCHAIN%
echo [INFO] Compiler Version
cl
:Finish
echo [INFO] EPICS_HOST_ARCH: %EPICS_HOST_ARCH%
echo [INFO] Make version
%MAKE% --version
echo [INFO] Perl version
perl --version
%MAKE% %MAKEARGS% %*

70
.ci/appveyor-prepare.bat Normal file
View File

@@ -0,0 +1,70 @@
:: Build script for AppVeyor (https://ci.appveyor.com/)
:: Environment:
:: TOOLCHAIN - Toolchain Version [9.0/10.0/11.0/12.0/14.0/cygwin/mingw]
:: CONFIGURATION - determines EPICS build [dynamic/static, -debug]
:: PLATFORM - "x86" -> use 32bit architecture
::
:: Prepares an Appveyor build by excuting the following steps
:: - Set up configure\CONFIG_SITE for static vs. dynamic build
:: - Install Cygwin / Mingw (TOOLCHAIN setting) in the in the appropriate flavor
:: - Download and install Make-4.1 from EPICS download page
Setlocal EnableDelayedExpansion
set OS=64BIT
if "%PLATFORM%"=="x86" set OS=32BIT
echo [INFO] Platform: %OS%
if "%TOOLCHAIN%"=="cygwin" (
echo.%CONFIGURATION% | findstr /C:"static">nul && (
echo SHARED_LIBRARIES=NO>> configure\CONFIG_SITE
echo STATIC_BUILD=YES>> configure\CONFIG_SITE
echo [INFO] EPICS set up for static build
) || (
echo [INFO] EPICS set up for dynamic build
)
echo.%CONFIGURATION% | findstr /C:"debug">nul && (
echo HOST_OPT=NO>> configure\CONFIG_SITE
echo [INFO] EPICS set up for debug build
) || (
echo [INFO] EPICS set up for optimized build
)
if "%OS%"=="64BIT" (
echo [INFO] Installing Cygwin 64bit and dependencies
@powershell -Command "(new-object net.webclient).DownloadFile('http://www.cygwin.com/setup-x86_64.exe', 'C:\cygwin64\setup-x86_64.exe')"
C:\cygwin64\setup-x86_64.exe -q -P "libreadline-devel,libncursesw-devel"
) else (
echo [INFO] Installing Cygwin 32bit and dependencies
@powershell -Command "(new-object net.webclient).DownloadFile('http://www.cygwin.com/setup-x86.exe', 'C:\cygwin\setup-x86.exe')"
C:\cygwin\setup-x86.exe -q -P "libreadline-devel,libncursesw-devel"
)
)
if "%TOOLCHAIN%"=="mingw" (
echo.%CONFIGURATION% | findstr /C:"static">nul && (
echo SHARED_LIBRARIES=NO>> configure\CONFIG_SITE
echo STATIC_BUILD=YES>> configure\CONFIG_SITE
echo [INFO] EPICS set up for static build
) || (
echo [INFO] EPICS set up for dynamic build
)
echo.%CONFIGURATION% | findstr /C:"debug">nul && (
echo HOST_OPT=NO>> configure\CONFIG_SITE
echo [INFO] EPICS set up for debug build
) || (
echo [INFO] EPICS set up for optimized build
)
if "%OS%"=="64BIT" (
echo [INFO] Installing MinGW 64bit
cinst mingw || cinst mingw
) else (
echo [INFO] Installing MinGW 32bit
cinst mingw --x86 || cinst mingw --x86
)
)
echo [INFO] Installing Make 4.1
@powershell -Command "(new-object net.webclient).DownloadFile('https://www.aps.anl.gov/epics/download/tools/make-4.1-win64.zip', 'C:\tools\make-4.1.zip')"
cd \tools
"C:\Program Files\7-Zip\7z" e make-4.1.zip

77
.ci/make-tar.sh Executable file
View File

@@ -0,0 +1,77 @@
#!/bin/sh
#
# Make tar for git repo w/ one level of sub modules.
#
set -e
TOPREV="$1"
FINALTAR="$2"
PREFIX="$3"
if ! [ "$TOPREV" ]
then
cat <<EOF >&2
usage: $0 [rev] [outfile.tar.gz] [prefix/]
"<rev>" may be any git revision spec. (tag, branch, or commit id).
Output file may be .tar.gz, .tar.bz2, or any extension supported by "tar -a".
If output file name is omitted, then "<rev>.tar.gz" is the default.
If prefix is omitted, then the default is "<rev>/".
EOF
exit 1
fi
[ "$FINALTAR" ] || FINALTAR="$TOPREV.tar.gz"
[ "PREFIX" ] || PREFIX="$TOPREV/"
# temporary directory w/ automatic cleanup
TDIR=`mktemp -d`
trap 'rm -rf "$TDIR"' EXIT INT QUIT TERM
mkdir "$TDIR"/tar
echo "Export revision $TOPREV as $FINALTAR with prefix $PREFIX"
# Use git-archive to copy files at the given revision into our temp. dir.
# Respects 'export-exclude' in .gitattributes files.
git archive --prefix=$PREFIX $TOPREV | tar -C "$TDIR"/tar -x
# use ls-tree instead of submodule-foreach to capture submodule revision associated with supermodule rev.
#
# sub-modules appear in tree as eg.:
# 160000 commit c3a6cfcf0dad4a4eeecf59b474710d06ff3eb68a modules/ca
git ls-tree -r $TOPREV | awk '/^[0-9]+ commit / {print $3, $4}' | \
while read HASH MODDIR
do
echo "visit $HASH $MODDIR"
(cd $MODDIR && git archive --prefix=${PREFIX}${MODDIR}/ $HASH) | tar -C "$TDIR"/tar -x
done
# make a list of files copied and filter out undesirables
(cd "$TDIR"/tar && find .) > "$TDIR"/list.1
sed \
-e '/.*ci$/d' \
-e '/.*ci\//d' \
-e '/.*jenkins$/d' \
-e '/.*jenkins\//d' \
-e '/\.git/d' \
-e '/\.project/d' \
-e '/.*\.travis\.yml$/d' \
-e '/.*\.appveyor\.yml$/d' \
"$TDIR"/list.1 > "$TDIR"/list.2
if ! diff -u "$TDIR"/list.1 "$TDIR"/list.2
then
echo "Warning: prohibited files being ignored"
fi
# Use the filtered list to build the final tar
# The -a option chooses compression automatically based on output file name.
tar -C "$TDIR"/tar --files-from="$TDIR"/list.2 -caf "$FINALTAR"
echo "Wrote $FINALTAR"

90
.ci/travis-build.sh Executable file
View File

@@ -0,0 +1,90 @@
#!/bin/sh
set -e -x
die() {
echo "$1" >&2
exit 1
}
ticker() {
while true
do
sleep 60
date -R
[ -r "$1" ] && tail -n10 "$1"
done
}
CACHEKEY=1
EPICS_HOST_ARCH=`sh startup/EpicsHostArch`
[ -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"
# requires qemu, bison, flex, texinfo, install-info
if [ -n "$RTEMS" ]
then
echo "Cross RTEMS${RTEMS} for pc386"
install -d /home/travis/.cache
curl -L "https://github.com/mdavidsaver/rsb/releases/download/travis-20160306-2/rtems${RTEMS}-i386-trusty-20190306-2.tar.gz" \
| tar -C /home/travis/.cache -xj
sed -i -e '/^RTEMS_VERSION/d' -e '/^RTEMS_BASE/d' configure/os/CONFIG_SITE.Common.RTEMS
cat << EOF >> configure/os/CONFIG_SITE.Common.RTEMS
RTEMS_VERSION=$RTEMS
RTEMS_BASE=/home/travis/.cache/rtems${RTEMS}-i386
EOF
cat << EOF >> configure/CONFIG_SITE
CROSS_COMPILER_TARGET_ARCHS+=RTEMS-pc386
EOF
# find local qemu-system-i386
export PATH="$HOME/.cache/qemu/usr/bin:$PATH"
echo -n "Using QEMU: "
type qemu-system-i386 || echo "Missing qemu"
EXTRA=RTEMS_QEMU_FIXUPS=YES
fi
make -j2 $EXTRA
if [ "$TEST" != "NO" ]
then
make -j2 tapfiles
make -s test-results
fi

46
.ci/travis-prepare.sh Executable file
View File

@@ -0,0 +1,46 @@
#!/bin/sh
set -e -x
die() {
echo "$1" >&2
exit 1
}
CURDIR="$PWD"
QDIR="$HOME/.cache/qemu"
if [ -n "$RTEMS" -a "$TEST" = "YES" ]
then
git clone --quiet --branch vme --depth 10 https://github.com/mdavidsaver/qemu.git "$HOME/.build/qemu"
cd "$HOME/.build/qemu"
HEAD=`git log -n1 --pretty=format:%H`
echo "HEAD revision $HEAD"
[ -e "$HOME/.cache/qemu/built" ] && BUILT=`cat "$HOME/.cache/qemu/built"`
echo "Cached revision $BUILT"
if [ "$HEAD" != "$BUILT" ]
then
echo "Building QEMU"
git submodule --quiet update --init
install -d "$HOME/.build/qemu/build"
cd "$HOME/.build/qemu/build"
"$HOME/.build/qemu/configure" --prefix="$HOME/.cache/qemu/usr" --target-list=i386-softmmu --disable-werror
make -j2
make install
echo "$HEAD" > "$HOME/.cache/qemu/built"
fi
fi
cd "$CURDIR"
cat <<EOF >> configure/CONFIG_SITE
USR_CPPFLAGS += $USR_CPPFLAGS
USR_CFLAGS += $USR_CFLAGS
USR_CXXFLAGS += $USR_CXXFLAGS
EOF

4
.gitattributes vendored Normal file
View File

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

15
.gitignore vendored Normal file
View File

@@ -0,0 +1,15 @@
/cfg/
/bin/
/lib/
/db/
/dbd/
/html/
/include/
/templates/
/configure/*.local
/modules/RELEASE.local
O.*/
/QtC-*
*.orig
*.log
.*.swp

36
.gitmodules vendored Normal file
View File

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

33
.travis.yml Normal file
View File

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

View File

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

13
README
View File

@@ -2,14 +2,14 @@
EPICS Base - the central core of a control system toolkit
---------------------------------------------------------
Copyright (c) 1991-2003 The University of Chicago, as Operator
of Argonne National Laboratory.
Copyright UChicago Argonne LLC, as Operator of Argonne
National Laboratory.
Copyright (c) 1991-2003 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 the
file LICENSE that is included with this distribution.
EPICS Base is distributed subject to a Software License
Agreement found in the file LICENSE that is included with
this distribution.
---------------------------------------------------------
@@ -22,3 +22,6 @@ training materials, additional components, links to other
websites etc. is available on the EPICS home page at
http://www.aps.anl.gov/epics/
$Format:%cD$
$Format:%H$
https://code.launchpad.net/epics-base

View File

@@ -73,17 +73,17 @@ ifdef T_A
#
-include $(CONFIG)/os/CONFIG.$(EPICS_HOST_ARCH).$(T_A)
# Site specific target and host-target definitions and overrides
#
-include $(CONFIG)/os/CONFIG_SITE.Common.$(T_A)
-include $(CONFIG)/os/CONFIG_SITE.$(EPICS_HOST_ARCH).$(T_A)
# RELEASE file specific definitions
#
ifneq ($(CONFIG),$(TOP)/configure)
-include $(CONFIG)/CONFIG_APP_INCLUDE
endif
# Site specific target and host-target definitions
#
-include $(CONFIG)/os/CONFIG_SITE.Common.$(T_A)
-include $(CONFIG)/os/CONFIG_SITE.$(EPICS_HOST_ARCH).$(T_A)
endif # ifdef T_A

View File

@@ -17,14 +17,14 @@ BUILD_CLASS = CROSS
# ifdef CROSS looks better than ifeq ($(BUILD_CLASS),CROSS)
CROSS = YES
GNU_TARGET_INCLUDE_DIR = $(GNU_TARGET:%= $(GNU_DIR)/%/include)
GNU_TARGET_LIB_DIR = $(GNU_TARGET:%= $(GNU_DIR)/%/lib)
GNU_TARGET_INCLUDE_DIR = $(wildcard $(GNU_TARGET:%=$(GNU_DIR)/%/include))
GNU_TARGET_LIB_DIR = $(wildcard $(GNU_TARGET:%=$(GNU_DIR)/%/lib))
CROSS_INCLUDES = $(addprefix -I,$(GNU_TARGET_INCLUDE_DIR))
CROSS_LDFLAGS = $(addprefix -L,$(GNU_TARGET_LIB_DIR))
CROSS_INCLUDES = $(GNU_TARGET_INCLUDE_DIR:%=-I%)
CROSS_LDFLAGS = $(GNU_TARGET_LIB_DIR:%=-L%)
CMPLR_PREFIX_CROSS=$(addsuffix -,$(GNU_TARGET))
CMPLR_PREFIX=$(CMPLR_PREFIX_$(BUILD_CLASS))
CMPLR_PREFIX_CROSS = $(addsuffix -,$(GNU_TARGET))
CMPLR_PREFIX = $(CMPLR_PREFIX_$(BUILD_CLASS))
# Cross builds usually use the gnu compiler
include $(CONFIG)/CONFIG.gnuCommon

View File

@@ -3,13 +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.
# EPICS BASE is distributed subject to a Software License Agreement found
# in file LICENSE that is included with this distribution.
#*************************************************************************
#---------------------------------------------------------------
# Epics base directories
# EPICS Base directories
EPICS_BASE_HOST_BIN = $(EPICS_BASE)/bin/$(EPICS_HOST_ARCH)
EPICS_BASE_HOST_LIB = $(EPICS_BASE)/lib/$(EPICS_HOST_ARCH)
@@ -18,17 +17,6 @@ ifdef T_A
EPICS_BASE_BIN = $(EPICS_BASE)/bin/$(T_A)
endif
#---------------------------------------------------------------
# Epics base Ioc libraries
EPICS_BASE_IOC_LIBS += dbRecStd dbCore ca Com
#---------------------------------------------------------------
# Epics base Host libraries
EPICS_BASE_HOST_LIBS += cas gdd
EPICS_BASE_HOST_LIBS += ca Com
#---------------------------------------------------------------
# Version number for base shared libraries (and win32 products)
@@ -39,17 +27,6 @@ ifdef BASE_TOP
PROD_VERSION = $(EPICS_VERSION).$(EPICS_REVISION)
endif # BASE_TOP
#---------------------------------------------------------------
# Base c preprocessor flags
BASE_CPPFLAGS =
# osithread default stack
OSITHREAD_USE_DEFAULT_STACK = NO
OSITHREAD_DEFAULT_STACK_FLAGS_YES = -DOSITHREAD_USE_DEFAULT_STACK
OSITHREAD_DEFAULT_STACK_FLAGS_NO =
BASE_CPPFLAGS += $(OSITHREAD_DEFAULT_STACK_FLAGS_$(OSITHREAD_USE_DEFAULT_STACK))
#---------------------------------------------------------------
# Where to find the installed build tools
# Windows does not like commands with relative paths starting ../
@@ -59,59 +36,21 @@ TOOLS = $(abspath $(EPICS_BASE_HOST_BIN))
FIND_TOOL = $(firstword $(wildcard $(TOOLS)/$(1) $(TOP)/src/tools/$(1)))
#---------------------------------------------------------------
# Epics base build tools and tool flags
# EPICS Base build tools and tool flags
MAKEBPT = $(TOOLS)/makeBpt$(HOSTEXE)
DBEXPAND = $(PERL) $(TOOLS)/dbdExpand.pl
DBTORECORDTYPEH = $(PERL) $(TOOLS)/dbdToRecordtypeH.pl
DBTOMENUH = $(PERL) $(TOOLS)/dbdToMenuH.pl
REGISTERRECORDDEVICEDRIVER = $(PERL) $(TOOLS)/registerRecordDeviceDriver.pl
CONVERTRELEASE = $(PERL) $(call FIND_TOOL,convertRelease.pl)
FULLPATHNAME = $(PERL) $(TOOLS)/fullPathName.pl
PODTOHTML = $(PERL) $(TOOLS)/podToHtml.pl
CONVERTRELEASE = $(PERL) $(call FIND_TOOL,convertRelease.pl)
FULLPATHNAME = $(PERL) $(TOOLS)/fullPathName.pl
TAPTOJUNIT = $(PERL) $(TOOLS)/tap-to-junit-xml.pl
GENVERSIONHEADER = $(PERL) $(TOOLS)/genVersionHeader.pl $(QUIET_FLAG)
#-------------------------------------------------------
#---------------------------------------------------------------
# tools for installing libraries and products
INSTALL_QUIETLY := $(if $(findstring s,$(MAKEFLAGS)),-q,)
INSTALL = $(PERL) $(TOOLS)/installEpics.pl $(INSTALL_QUIETLY)
INSTALL = $(PERL) $(TOOLS)/installEpics.pl $(QUIET_FLAG)
INSTALL_PRODUCT = $(INSTALL)
INSTALL_LIBRARY = $(INSTALL)
#---------------------------------------------------------------
# tools for making header dependancies and variable replacement
MKMF = $(PERL) $(TOOLS)/mkmf.pl
REPLACEVAR = $(PERL) $(TOOLS)/replaceVAR.pl
#---------------------------------------------------------------
# private versions of lex/yacc from EPICS
EYACC = $(TOOLS)/antelope$(HOSTEXE)
ELEX = $(TOOLS)/e_flex$(HOSTEXE) -S$(EPICS_BASE)/include/flex.skel.static
YACC = $(EYACC)
LEX = $(ELEX)
#---------------------------------------------------------------
# Our use of msi is incompatible with older versions
MSI3_15 = $(EPICS_BASE_HOST_BIN)/msi
#---------------------------------------------------------------
# External tools and tool flags - must be in path or defined in application
ADL2DL ?= adl2dl
# sch2edif compiler and flags
SCH2EDIF = sch2edif
SCH2EDIF_PATH =
SCH2EDIF_SYSFLAGS = -n -ap -p.+..+$(SCH2EDIF_PATH)+$(CAPFAST_TEMPLATES)/sym+
SCH2EDIF_FLAGS =
# e2db and flags
# - again there is an assumption where edb.def is installed.
E2DB ?= e2db
E2DB_SYSFLAGS = -ate -d $(CAPFAST_TEMPLATES)/edb.def
E2DB_FLAGS =
DBST ?= dbst
# tools for making header dependencies and variable replacement
MKMF = $(PERL) $(TOOLS)/mkmf.pl
REPLACEVAR = $(PERL) $(TOOLS)/replaceVAR.pl

View File

@@ -4,7 +4,7 @@
# Copyright (c) 2002 The Regents of the University of California, as
# Operator of Los Alamos National Laboratory.
# EPICS BASE is distributed subject to a Software License Agreement found
# in the file LICENSE that is included with this distribution.
# in the file LICENSE that is included with this distribution.
#*************************************************************************
#
# EPICS Version information
@@ -15,19 +15,31 @@
# EPICS_SITE_VERSION is defined in CONFIG_SITE for sites that want a local
# version number to be included in the reported version string.
# In 3.15 we still define BASE_3_14 so "ifdef BASE_3_14" means
# 3.14 or later, but "ifeq ($(BASE_3_14),YES)" means 3.14 only.
# We define BASE_3_14 and BASE_3_15 as NO and BASE_3_16 as YES, so
# ifdef BASE_3_14
# true for 3.14 or later
# ifdef BASE_3_15
# true for 3.15 or later
# ifeq ($(BASE_3_14),YES)
# true for 3.14.x only
# ifeq ($(BASE_3_15),YES)
# true for 3.15 only
# ifeq ($(BASE_3_16),YES)
# true for 3.16 only.
BASE_3_14 = NO
BASE_3_15 = YES
BASE_3_15 = NO
BASE_3_16 = NO
BASE_7_0 = YES
# EPICS_VERSION must be a number >0 and <256
EPICS_VERSION = 3
EPICS_VERSION = 7
# EPICS_REVISION must be a number >=0 and <256
EPICS_REVISION = 15
EPICS_REVISION = 0
# EPICS_MODIFICATION must be a number >=0 and <256
EPICS_MODIFICATION = 5
EPICS_MODIFICATION = 1
# EPICS_PATCH_LEVEL must be a number (win32 resource file requirement)
# Not included if zero
@@ -35,11 +47,11 @@ EPICS_PATCH_LEVEL = 0
# This will end in -DEV between official releases
#EPICS_DEV_SNAPSHOT=-DEV
#EPICS_DEV_SNAPSHOT=-pre1
EPICS_DEV_SNAPSHOT=-pre1
#EPICS_DEV_SNAPSHOT=-pre1-DEV
#EPICS_DEV_SNAPSHOT=-pre2
#EPICS_DEV_SNAPSHOT=-pre2-DEV
EPICS_DEV_SNAPSHOT=-rc1
#EPICS_DEV_SNAPSHOT=-rc1
#EPICS_DEV_SNAPSHOT=-rc1-DEV
#EPICS_DEV_SNAPSHOT=-rc2
#EPICS_DEV_SNAPSHOT=-rc2-DEV

View File

@@ -38,10 +38,6 @@ BUILD_ARCHS = $(EPICS_HOST_ARCH) $(CROSS1) $(CROSS2)
# otherwise override this in os/CONFIG_SITE.<host_arch>.Common
PERL = perl -CSD
#-------------------------------------------------------
# dbst based database optimization default
DB_OPT = NO
#-------------------------------------------------------
# Check configure/RELEASE file for consistency
CHECK_RELEASE_YES = checkRelease
@@ -83,6 +79,7 @@ IOCS_APPL_TOP = $(shell $(FULLPATHNAME) $(INSTALL_LOCATION))
# Make echo output - suppress echoing if make's '-s' flag is set
NOP = :
ECHO = @$(if $(findstring s,$(patsubst T_A=%,,$(MAKEFLAGS))),$(NOP),echo)
QUIET_FLAG := $(if $(findstring s,$(MAKEFLAGS)),-q,)
#-------------------------------------------------------
ifdef T_A
@@ -332,6 +329,14 @@ COMPILE.cpp = $(CCC) $(CPPFLAGS) $(CXXFLAGS) $(INCLUDES)
# C preprocessor command
PREPROCESS.cpp = $(CPP) $(CPPFLAGS) $(INCLUDES) $< > $@
#--------------------------------------------------
# genVersion header defaults
# C macro name
GENVERSIONMACRO = VCSVERSION
# C macro default value (empty to use date+time)
GENVERSIONDEFAULT =
#--------------------------------------------------
# Header dependency file generation

View File

@@ -35,8 +35,10 @@ EPICS_CA_CONN_TMO=30.0
EPICS_CA_REPEATER_PORT=5065
EPICS_CA_SERVER_PORT=5064
EPICS_CA_MAX_ARRAY_BYTES=16384
EPICS_CA_AUTO_ARRAY_BYTES=YES
EPICS_CA_BEACON_PERIOD=15.0
EPICS_CA_MAX_SEARCH_PERIOD=300.0
EPICS_CA_MCAST_TTL=1
EPICS_CAS_BEACON_PERIOD=
EPICS_CAS_BEACON_PORT=
EPICS_CAS_AUTO_BEACON_ADDR_LIST=""
@@ -45,6 +47,9 @@ EPICS_CAS_SERVER_PORT=
EPICS_CAS_INTF_ADDR_LIST=""
EPICS_CAS_IGNORE_ADDR_LIST=""
# Servers to disable
EPICS_IOC_IGNORE_SERVERS=""
# Log Server:
# EPICS_IOC_LOG_PORT Log server port number etc.
EPICS_IOC_LOG_PORT=7004

View File

@@ -117,11 +117,10 @@ CROSS_COMPILER_TARGET_ARCHS=
# configure/os/CONFIG_SITE.<host>.Common files instead.
CROSS_COMPILER_HOST_ARCHS=
# The 'make runtests' and 'make tapfiles' build targets normally only run
# The 'runtests', 'tapfiles' and 'junitfiles' make targets normally only run
# self-tests for the EPICS_HOST_ARCH architecture. If the host can execute
# the self-test programs for any other cross-built architectures such as
# a -debug architecture, those architectures can be named here.
#
# a -debug architecture, those architectures must be named in this variable:
CROSS_COMPILER_RUNTEST_ARCHS=
# Build shared libraries (DLLs on Windows).
@@ -175,3 +174,5 @@ GCC_PIPE = NO
# run at build-time, e.g. set the LD_LIBRARY_PATH environment variable.
LINKER_USE_RPATH = YES
# Overrides for the settings above may appear in a CONFIG_SITE.local file
-include $(CONFIG)/CONFIG_SITE.local

View File

@@ -13,7 +13,7 @@
#
# CONFIG_SITE_ENV - EPICS Environment Parameter Site configuration file
#
# This file is read by the script base/src/libCom/env/bldEnvdata.pl
# This file is read by the script base/src/libCom/env/bldEnvData.pl
# Variable definitions must take the form
# VAR = VALUE
# or
@@ -26,31 +26,47 @@
# Time service:
# EPICS_TIMEZONE
# local timezone info for vxWorks and RTEMS IOCs. The format is
# <name>::<minutesWest>:<start daylight>:<end daylight>
# where the start and end are mmddhh - that is month,day,hour
# e.g. for ANL in 2016: EPICS_TIMEZONE=CST/CDT::360:031302:110602
# Local timezone info for vxWorks and RTEMS. The format is
# <name>::<minutesWest>:<startDST>:<endDST>
# where <name> is only used by strftime() for %Z conversions,
# and <startDST> and <endDST> are mmddhh - that is month,day,hour
# e.g. for ANL in 2018: EPICS_TIMEZONE=CUS::360:031102:110402
# The future dates below assume the rules don't get changed;
# see http://www.timeanddate.com/time/dst/2018.html to check.
#
# DST for 2016 US: Mar 13 - Nov 06
# EU: Mar 27 - Oct 30
# DST for 2017 US: Mar 12 - Nov 05
# EU: Mar 26 - Oct 29
EPICS_TIMEZONE = CUS::360:031202:110502
#EPICS_TIMEZONE = MET::-60:032602:102902
#
# DST for 2018 US: Mar 11 - Nov 04
# EU: Mar 25 - Oct 28
#EPICS_TIMEZONE = CUS::360:031102:110402
#EPICS_TIMEZONE = MET::-60:032502:102802
#
# DST for 2019 US: Mar 10 - Nov 03
# EU: Mar 31 - Oct 27
#EPICS_TIMEZONE = CUS::360:031002:110302
#EPICS_TIMEZONE = MET::-60:033102:102702
#
# DST for 2020 US: Mar 08 - Nov 01
# EU: Mar 29 - Oct 25
#EPICS_TIMEZONE = CUS::360:030802:110102
#EPICS_TIMEZONE = MET::-60:032902:102502
#
# DST for 2021 US: Mar 14 - Nov 07
# EU: Mar 28 - Oct 31
# (see: http://www.timeanddate.com/time/dst/2016.html etc. )
#EPICS_TIMEZONE = CUS::360:031402:110702
#EPICS_TIMEZONE = MET::-60:032802:103102
#
# These values are for 2016:
EPICS_TIMEZONE=CST/CDT::360:031302:110602
#EPICS_TIMEZONE=CET/CEST::-60:032702:103002
# DST for 2022 US: Mar 13 - Nov 06
# EU: Mar 27 - Oct 30
#EPICS_TIMEZONE = CUS::360:031302:110602
#EPICS_TIMEZONE = MET::-60:032702:103002
# EPICS_TS_NTP_INET
# NTP time server ip address. Uses boot host if not set.
# NTP time server ip address for VxWorks and RTEMS.
# IOC will use its boot host if this is not set.
EPICS_TS_NTP_INET=
# IOC Shell:
@@ -58,8 +74,11 @@ EPICS_TS_NTP_INET=
# Prompt string
# IOCSH_HISTSIZE
# Number of lines of command history to keep.
# IOCSH_HISTEDIT_DISABLE
# Prevents use of readline or equivalent if defined.
IOCSH_PS1="epics> "
IOCSH_HISTSIZE=50
IOCSH_HISTEDIT_DISABLE=
# Log Server:
# EPICS_IOC_LOG_INET

View File

@@ -1,19 +1,20 @@
#*************************************************************************
# Copyright (c) 2002 The University of Chicago, as Operator of Argonne
# Copyright (c) 2012 UChicago Argonne LLC, as Operator of Argonne
# National Laboratory.
# Copyright (c) 2002 The Regents of the University of California, as
# Operator of Los Alamos National Laboratory.
# EPICS BASE 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 the file LICENSE that is included with this distribution.
#*************************************************************************
# RELEASE: Define location of external EPICS products
#
# RELEASE: Define the location of external EPICS products
#
# The version of this file in Base should normally be empty.
#
# Define INSTALL_LOCATION in CONFIG_SITE
# VX_DIR definition now in os/CONFIG_SITE.Common.vxWorksCommon
# RTEMS_BASE (and RTEMS_VERSION) now in os/CONFIG_SITE.Common.RTEMS
# NB: Settings in RELEASE files can be overridden in files named
# RELEASE.$(EPICS_HOST_ARCH).Common
# RELEASE.Common.$(T_A)

View File

@@ -8,10 +8,12 @@
#*************************************************************************
#RULES.Db
# Set db substitutions file suffix
# Set db substitutions and template file suffixes
SUBST_SUFFIX ?= .substitutions
TEMPL_SUFFIX ?= .template
##################################################### vpath
#---------------------------------------------------------------
# vpath
vpath %.pm $(USR_VPATH) $(SRC_DIRS) $(dir $(DBD))
vpath %.pod $(USR_VPATH) $(SRC_DIRS) $(dir $(DBD))
@@ -19,12 +21,13 @@ vpath %.dbd $(USR_VPATH) $(SRC_DIRS) $(dir $(DBD))
vpath %.db $(USR_VPATH) $(SRC_DIRS) $(dir $(DB))
vpath %.vdb $(USR_VPATH) $(SRC_DIRS) $(dir $(DB))
vpath %$(SUBST_SUFFIX) $(USR_VPATH) $(SRC_DIRS) $(COMMON_DIR)
vpath %.template $(USR_VPATH) $(SRC_DIRS) $(COMMON_DIR)
vpath %$(TEMPL_SUFFIX) $(USR_VPATH) $(SRC_DIRS) $(COMMON_DIR)
vpath bpt%.data $(USR_VPATH) $(SRC_DIRS) $(COMMON_DIR)
vpath %.acf $(USR_VPATH) $(SRC_DIRS) $(COMMON_DIR)
vpath %.acs $(USR_VPATH) $(SRC_DIRS) $(COMMON_DIR)
##################################################### dbflags dbdflags
#---------------------------------------------------------------
# dbflags dbdflags
DBD_SEARCH_DIRS = . .. $(COMMON_DIR) $(SRC_DIRS) $(INSTALL_DBD) $(RELEASE_DBD_DIRS)
DB_SEARCH_DIRS = . .. $(COMMON_DIR) $(SRC_DIRS) $(INSTALL_DB) $(RELEASE_DB_DIRS)
@@ -33,13 +36,15 @@ DBDFLAGS = $(USR_DBDFLAGS) $(CMD_DBDFLAGS) $(addprefix -I,$(DBD_SEARCH_DIRS))
DBFLAGS = $($*_DBFLAGS) $(USR_DBFLAGS) $(CMD_DBFLAGS) $(addprefix -I,$(DB_SEARCH_DIRS))
REGRDDFLAGS = $(DBDFLAGS) $($*_REGRDDFLAGS) $(USR_REGRDDFLAGS) $(CMD_REGRDDFLAGS)
##################################################### Targets
#---------------------------------------------------------------
# Targets
# ---------------------------------------------------
# To allow os specific dbd files AND have the -j option work properly,
CROSS_TARGET_OS_TYPES = $(sort $(foreach target, \
$(EPICS_HOST_ARCH) $(CROSS_COMPILER_TARGET_ARCHS),$(firstword $(subst -, ,$(target)))))
CROSS_TARGET_OS_TYPES = $(sort $(foreach target, \
$(EPICS_HOST_ARCH) $(CROSS_COMPILER_TARGET_ARCHS), \
$(firstword $(subst -, ,$(target)))))
DBD += $(foreach type, $(CROSS_TARGET_OS_TYPES), $(DBD_$(type)))
# Users add os specific dbd files to a Makefile as follows
@@ -86,31 +91,28 @@ SOURCE_DB_bbb = $(foreach dir, $(GENERIC_SRC_DIRS), $(SOURCE_DB_aaa) )
SOURCE_DB_aaa = $(addsuffix /$(file), $(dir) )
COMMONS = $(COMMON_DIR)/*.dbd $(COMMON_DIR)/*.db $(COMMON_DIR)/*.h \
$(COMMON_DIR)/*$(SUBST_SUFFIX) $(COMMON_DIR)/*.template
$(COMMON_DIR)/*$(SUBST_SUFFIX) $(COMMON_DIR)/*$(TEMPL_SUFFIX)
# Remove trailing numbers (to 99) on stem
TEMPLATE1=$(patsubst %0,%,$(patsubst %1,%,$(patsubst %2,%,$(patsubst %3,%,$(patsubst %4,%, \
$(patsubst %5,%,$(patsubst %6,%,$(patsubst %7,%,$(patsubst %8,%,$(patsubst %9,%, \
$*))))))))))
TEMPLATE2=$(patsubst %0,%,$(patsubst %1,%,$(patsubst %2,%,$(patsubst %3,%,$(patsubst %4,%, \
$(patsubst %5,%,$(patsubst %6,%,$(patsubst %7,%,$(patsubst %8,%,$(patsubst %9,%, \
$(TEMPLATE1)))))))))))
TEMPLATE3=$(addsuffix .template,$(addprefix ../,$(TEMPLATE2)))
TEMPLATE_FILENAME=$(firstword $(wildcard $($*_TEMPLATE) $(addprefix ../,$($*_TEMPLATE)) ../$*.template $(TEMPLATE3) ../template))
# dbst based database optimization
ifeq '$(DB_OPT)' 'YES'
RAW=.raw
DBS = $(filter %.db,$(DB)) $(addsuffix $(RAW),$(filter %.db,$(DB)))
COMMON_DBS = $(addprefix $(COMMON_DIR)/,$(DBS))
endif
TEMPLATE1 = $(patsubst %0,%,$(patsubst %1,%,$(patsubst %2,%,$(patsubst %3,%, \
$(patsubst %4,%,$(patsubst %5,%,$(patsubst %6,%,$(patsubst %7,%, \
$(patsubst %8,%,$(patsubst %9,%,$*))))))))))
TEMPLATE2 = $(patsubst %0,%,$(patsubst %1,%,$(patsubst %2,%,$(patsubst %3,%, \
$(patsubst %4,%,$(patsubst %5,%,$(patsubst %6,%,$(patsubst %7,%, \
$(patsubst %8,%,$(patsubst %9,%,$(TEMPLATE1)))))))))))
TEMPLATE3 = $(addsuffix $(TEMPL_SUFFIX),$(addprefix ../,$(TEMPLATE2)))
TEMPLATE_FILENAME = $(firstword $(wildcard $($*_TEMPLATE) \
$(addprefix ../,$($*_TEMPLATE)) ../$*$(TEMPL_SUFFIX) $(TEMPLATE3) \
../template))
INSTALL_DB_INSTALLS = $(addprefix $(INSTALL_DB)/,$(notdir $(DB_INSTALLS)))
INSTALL_DBD_INSTALLS = $(addprefix $(INSTALL_DBD)/,$(notdir $(DBD_INSTALLS)))
COMMONDEP_TARGET = $(COMMON_DIR)/$(basename $@)
##################################################### acf files
#---------------------------------------------------------------
# acf files
# An access security configuration file, *.acf, can be created from
# an *.acs file (has format of acf file plus #include "filename" lines)
@@ -123,7 +125,8 @@ ACF_INCLUDES = -I. $(TARGET_INCLUDES) $(USR_INCLUDES)\
ACFDEPENDS_CMD = $(MKMF) -m $@ $(ACF_INCLUDES) $(COMMONDEP_TARGET) $<
ACF_CMD = $(CPP) $(ACF_CPPFLAGS) $(ACF_INCLUDES) $< > $@
##################################################### dependancies
#---------------------------------------------------------------
# dependencies
HINC += $(addsuffix .h,$(DBDINC_NAME))
COMMON_DBDINC += $(addprefix $(COMMON_DIR)/,$(HINC))
@@ -133,12 +136,12 @@ DBDDEPENDS_FILES += $(addsuffix $(DEP),$(HINC) \
$(patsubst $(COMMON_DIR)/%,%, \
$(filter-out $(COMMON_DIR)/bpt%.dbd,$(COMMON_DBDS))))
#####################################################
#---------------------------------------------------------------
ifndef T_A
DEP = .d
TEMPLATE3+=$(addsuffix .template, $(TEMPLATE2))
TEMPLATE3 += $(addsuffix $(TEMPL_SUFFIX), $(TEMPLATE2))
COMMON_DIR = .
INSTALL_DBDS =
@@ -151,20 +154,15 @@ ACTIONS = inc
ACTIONS += build
ACTIONS += install
ACTIONS += buildInstall
ACTIONS += runtests tapfiles
ACTIONS += runtests tapfiles clean-tests test-results junitfiles
actionArchTargets = $(foreach x, $(ACTIONS),\ $(foreach arch,$(BUILD_ARCHS), $(x)$(DIVIDER)$(arch)))
actionArchTargets = $(foreach action, $(ACTIONS), \
$(foreach arch, $(BUILD_ARCHS), $(action)$(DIVIDER)$(arch)))
cleanArchTargets = $(foreach arch, $(BUILD_ARCHS), clean$(DIVIDER)$(arch))
cleanArchTargets = $(foreach arch,$(BUILD_ARCHS), clean$(DIVIDER)$(arch))
-include $(TOP)/configure/CONFIG_APP_INCLUDE
all: install
ifeq ($(EPICS_HOST_ARCH),$T_A)
host: install
else
# Do nothing
host:
endif
install: buildInstall
@@ -172,20 +170,30 @@ buildInstall : build
rebuild: clean install
.PHONY: all host $(ACTIONS)
.PHONY: all $(ACTIONS)
$(actionArchTargets) $(BUILD_ARCHS): install
$(cleanArchTargets): clean
.PHONY: $(BUILD_ARCHS) $(actionArchTargets) $(cleanArchTargets)
endif # T_A defined
else
# T_A is defined
ifeq ($(EPICS_HOST_ARCH),$(T_A))
host: install
else
host:
endif
.PHONY: host
endif # T_A
ifneq (,$(strip $(DBDDEPENDS_FILES)))
-include $(DBDDEPENDS_FILES)
endif
##################################################### build dependancies, clean rule
#---------------------------------------------------------------
# build dependancies, clean rule
inc : $(COMMON_INC) $(INSTALL_INC)
@@ -205,7 +213,8 @@ db_clean :
realclean: clean
##################################################### Dependency files
#---------------------------------------------------------------
# Dependency files
%Record.h$(DEP): $(COMMON_DIR)/%Record.dbd
@$(RM) $@
@@ -256,19 +265,19 @@ menu%.h$(DEP): ../menu%.dbd
@$(DBEXPAND) -D $(DBDFLAGS) -o $(COMMONDEP_TARGET) $($*_DBD) > $@
@echo "$(COMMONDEP_TARGET): ../Makefile" >> $@
%.db$(RAW)$(DEP): %$(SUBST_SUFFIX)
%.db$(DEP): %$(SUBST_SUFFIX)
@$(RM) $@
$(MSI3_15) -D $(DBFLAGS) -o $(COMMONDEP_TARGET) -S$< $(TEMPLATE_FILENAME) > $@
%.db$(RAW)$(DEP): ../%$(SUBST_SUFFIX)
%.db$(DEP): ../%$(SUBST_SUFFIX)
@$(RM) $@
$(MSI3_15) -D $(DBFLAGS) -o $(COMMONDEP_TARGET) -S$< $(TEMPLATE_FILENAME) > $@
%.db$(RAW)$(DEP): %.template
%.db$(DEP): %$(TEMPL_SUFFIX)
@$(RM) $@
$(MSI3_15) -D $(DBFLAGS) -o $(COMMONDEP_TARGET) $< > $@
%.db$(RAW)$(DEP): ../%.template
%.db$(DEP): ../%$(TEMPL_SUFFIX)
@$(RM) $@
$(MSI3_15) -D $(DBFLAGS) -o $(COMMONDEP_TARGET) $< > $@
@@ -282,14 +291,8 @@ menu%.h$(DEP): ../menu%.dbd
.PRECIOUS: %$(DEP)
##################################################### CapFast filter
$(COMMON_DIR)/%.edf: ../%.sch $(DEPSCHS)
@$(RM) $@
@if [ ! -f cad.rc -a -r ../cad.rc ] ; then ln -s ../cad.rc ; fi
$(SCH2EDIF) $(SCH2EDIF_SYSFLAGS) $(SCH2EDIF_FLAGS) -o $@ $<
##################################################### Substitution files
#---------------------------------------------------------------
# Substitution files
# WARNING: CREATESUBSTITUTIONS script needs output dir on command line
@@ -310,25 +313,21 @@ $(INSTALL_DB)/%$(SUBST_SUFFIX): ../%$(SUBST_SUFFIX)
.PRECIOUS: $(COMMON_DIR)/%$(SUBST_SUFFIX)
##################################################### Template files
#---------------------------------------------------------------
# Template files
$(COMMON_DIR)/%.template: $(COMMON_DIR)/%.edf
@$(RM) $@
$(E2DB) $(E2DB_SYSFLAGS) $(E2DB_FLAGS) -n $@.VAR $<
@$(REPLACEVAR) < $@.VAR > $@
@$(RM) $@.VAR
$(INSTALL_DB)/%.template: %.template
$(INSTALL_DB)/%$(TEMPL_SUFFIX): %$(TEMPL_SUFFIX)
$(ECHO) "Installing template file $@"
@$(INSTALL) -d -m $(INSTALL_PERMISSIONS) $< $(@D)
$(INSTALL_DB)/%.template: ../%.template
$(INSTALL_DB)/%$(TEMPL_SUFFIX): ../%$(TEMPL_SUFFIX)
$(ECHO) "Installing template file $@"
@$(INSTALL) -d -m $(INSTALL_PERMISSIONS) $< $(@D)
.PRECIOUS: $(COMMON_DIR)/%.template
.PRECIOUS: $(COMMON_DIR)/%$(TEMPL_SUFFIX)
##################################################### INC files
#---------------------------------------------------------------
# INC files
$(COMMON_DIR)/%Record.h: $(COMMON_DIR)/%Record.dbd
@$(RM) $(notdir $@)
@@ -362,7 +361,8 @@ $(COMMON_DIR)/menu%.h: ../menu%.dbd
.PRECIOUS: $(COMMON_DIR)/%.h
##################################################### DBD files
#---------------------------------------------------------------
# DBD files
$(COMMON_DIR)/bpt%.dbd: bpt%.data
@$(RM) $(notdir $@)
@@ -425,56 +425,64 @@ $(foreach file, $(DBD_INSTALLS), $(eval $(call DBD_INSTALLS_template, $(file))))
.PRECIOUS: $(COMMON_DBDS) $(COMMON_DIR)/%.dbd
##################################################### HTML files
#---------------------------------------------------------------
# HTML files
$(COMMON_DIR)/%.html: %.dbd.pod $(TOOLS)/dbdToHtml.pl
$(COMMON_DIR)/%.html: %.dbd.pod
@$(RM) $(notdir $@)
$(PERL) $(TOOLS)/dbdToHtml.pl $(DBDFLAGS) -o $(notdir $@) $<
$(DBDTOHTML) $(DBDFLAGS) -o $(notdir $@) $<
@$(MV) $(notdir $@) $@
$(COMMON_DIR)/%.html: %.pod $(TOOLS)/podToHtml.pl
$(COMMON_DIR)/%.html: %.pod
@$(RM) $(notdir $@)
$(PERL) $(TOOLS)/podToHtml.pl -o $(notdir $@) $<
$(PODTOHTML) -o $(notdir $@) $<
@$(MV) $(notdir $@) $@
$(COMMON_DIR)/%.html: %.pm $(TOOLS)/podToHtml.pl
$(COMMON_DIR)/%.html: %.pm
@$(RM) $(notdir $@)
$(PERL) $(TOOLS)/podToHtml.pl -o $(notdir $@) $<
$(PODTOHTML) -o $(notdir $@) $<
@$(MV) $(notdir $@) $@
$(COMMON_DIR)/%.html: ../%.pm $(TOOLS)/podToHtml.pl
$(COMMON_DIR)/%.html: ../%.pm
@$(RM) $(notdir $@)
$(PERL) $(TOOLS)/podToHtml.pl -o $(notdir $@) $<
$(PODTOHTML) -s -o $(notdir $@) $<
@$(MKDIR) $(dir $@)
@$(MV) $(notdir $@) $@
$(COMMON_DIR)/%.html: ../%.pl
@$(RM) $(notdir $@)
$(PODTOHTML) -s -o $(notdir $@) $<
@$(MV) $(notdir $@) $@
.PRECIOUS: $(COMMON_DIR)/%.html %.html
##################################################### DB files
#---------------------------------------------------------------
# DB files
$(COMMON_DIR)/%.db$(RAW): $(COMMON_DIR)/%.edf
$(COMMON_DIR)/%.db: $(COMMON_DIR)/%.edf
$(E2DB) $(E2DB_SYSFLAGS) $(E2DB_FLAGS) -n $*.VAR $<
@$(REPLACEVAR) < $*.VAR > $@
@$(RM) $*.VAR
$(COMMON_DIR)/%.db$(RAW): %$(SUBST_SUFFIX)
$(COMMON_DIR)/%.db: %$(SUBST_SUFFIX)
$(ECHO) "Inflating database from $< $(TEMPLATE_FILENAME)"
@$(RM) $(notdir $@)
$(MSI3_15) $(DBFLAGS) -o $(notdir $@) -S$< $(TEMPLATE_FILENAME)
@$(MV) $(notdir $@) $@
$(COMMON_DIR)/%.db$(RAW): ../%$(SUBST_SUFFIX)
$(COMMON_DIR)/%.db: ../%$(SUBST_SUFFIX)
$(ECHO) "Inflating database from $< $(TEMPLATE_FILENAME)"
@$(RM) $(notdir $@)
$(MSI3_15) $(DBFLAGS) -o $(notdir $@) -S$< $(TEMPLATE_FILENAME)
@$(MV) $(notdir $@) $@
$(COMMON_DIR)/%.db$(RAW): %.template
$(COMMON_DIR)/%.db: %$(TEMPL_SUFFIX)
$(ECHO) "Inflating database from $<"
@$(RM) $(notdir $@)
$(MSI3_15) $(DBFLAGS) -o $(notdir $@) $<
@$(MV) $(notdir $@) $@
$(COMMON_DIR)/%.db$(RAW): ../%.template
$(COMMON_DIR)/%.db: ../%$(TEMPL_SUFFIX)
$(ECHO) "Inflating database from $<"
@$(RM) $(notdir $@)
$(MSI3_15) $(DBFLAGS) -o $(notdir $@) $<
@@ -492,22 +500,6 @@ $(COMMON_DIR)/%.acf: ../%.acs
.PRECIOUS: $(COMMON_DIR)/%.acf
# dbst based database optimization
ifeq '$(DB_OPT)' 'YES'
$(COMMON_DIR)/%.db$(RAW): ../%.db
@$(RM) $@
$(CP) $< $@
$(COMMON_DIR)/%.db: $(COMMON_DIR)/%.db$(RAW)
$(ECHO) "Optimizing database $@"
@$(RM) $@
$(DBST) . $< -d > $@
.PRECIOUS: $(COMMON_DIR)/%.db
.PRECIOUS: $(DB:%=$(COMMON_DIR)/%$(RAW))
else
$(INSTALL_DB)/%: %
$(ECHO) "Installing $@"
@$(INSTALL) -d -m $(INSTALL_PERMISSIONS) $< $(@D)
@@ -515,7 +507,6 @@ $(INSTALL_DB)/%: %
$(INSTALL_DB)/%: ../%
$(ECHO) "Installing $@"
@$(INSTALL) -d -m $(INSTALL_PERMISSIONS) $< $(@D)
endif
$(INSTALL_DB)/%.db: $(COMMON_DIR)/%.db
$(ECHO) "Installing created db file $@"
@@ -531,8 +522,8 @@ $(foreach file, $(DB_INSTALLS), $(eval $(call DB_INSTALLS_template, $(file))))
.PRECIOUS: $(COMMON_DIR)/%.edf
.PRECIOUS: $(COMMON_DBS)
##################################################### register record,device,driver support
#---------------------------------------------------------------
# register record,device,driver support
%_registerRecordDeviceDriver.cpp: $(COMMON_DIR)/%.dbd
@$(RM) $@
@@ -548,4 +539,3 @@ $(foreach file, $(DB_INSTALLS), $(eval $(call DB_INSTALLS_template, $(file))))
.PRECIOUS: %_registerRecordDeviceDriver.cpp
##################################################### END OF FILE

View File

@@ -14,7 +14,7 @@ build$(DIVIDER)$(ARCH) build: buildInstall
install$(DIVIDER)$(ARCH) install: buildInstall
$(ARCH): buildInstall
ifeq ($(filter $(ARCH),$(BUILD_ARCHS)),$(ARCH))
ifeq ($(filter $(ARCH),$(BUILD_ARCHS)),$(strip $(ARCH)))
buildInstall$(DIVIDER)$(ARCH) buildInstall: $(TARGETS)
clean$(DIVIDER)$(ARCH) clean:
@@ -35,4 +35,3 @@ envPaths: $(wildcard $(TOP)/configure/RELEASE*) \
realclean:
$(RM) cdCommands envPaths dllPath.bat relPaths.sh

View File

@@ -14,7 +14,7 @@ ACTIONS = inc
ACTIONS += build
ACTIONS += install
ACTIONS += buildInstall
ACTIONS += runtests tapfiles
ACTIONS += runtests tapfiles clean-tests test-results junitfiles
actionArchTargets = $(foreach action, $(ACTIONS), \
$(addprefix $(action)$(DIVIDER), $(BUILD_ARCHS)))

View File

@@ -4,7 +4,7 @@
# Copyright (c) 2002 The Regents of the University of California, as
# Operator of Los Alamos National Laboratory.
# EPICS BASE is distributed subject to a Software License Agreement found
# in the file LICENSE that is included with this distribution.
# in the file LICENSE that is included with this distribution.
#*************************************************************************
#
# Rules for making things specified in Makefile
@@ -25,7 +25,6 @@ vpath %.html $(USR_VPATH) $(ALL_SRC_DIRS)
vpath %.skel.static $(USR_VPATH) $(ALL_SRC_DIRS)
vpath %.y $(USR_VPATH) $(ALL_SRC_DIRS)
vpath %.l $(USR_VPATH) $(ALL_SRC_DIRS)
vpath %.pl $(USR_VPATH) $(ALL_SRC_DIRS)
#---------------------------------------------------------------
@@ -115,10 +114,11 @@ endif
ifneq (,$(findstring $(T_A),$(EPICS_HOST_ARCH) $(CROSS_COMPILER_RUNTEST_ARCHS)))
RUNTESTS_ENABLED = YES
TAPFILES += $(TESTSCRIPTS:.t=.tap)
JUNITFILES += $(TAPFILES:.tap=.xml)
endif
#---------------------------------------------------------------
# Libraries
# Libraries
#
LIBTARGETS += $(LIBNAME) $(INSTALL_LIBS) $(TESTLIBNAME) \
@@ -129,16 +129,16 @@ LIBTARGETS += $(LIBNAME) $(INSTALL_LIBS) $(TESTLIBNAME) \
# Main targets
install: buildInstall
install: buildInstall
buildInstall : build
buildInstall: build
# Allows rebuild to work with parallel builds option, -j.
install: $(patsubst rebuild,clean,$(filter rebuild,$(MAKECMDGOALS)))
rebuild: clean install
build : inc
build: inc
build: $(OBJSNAME) $(LIBTARGETS) $(PRODTARGETS) $(TESTPRODNAME) \
$(TARGETS) $(TESTSCRIPTS) $(INSTALL_LIB_INSTALLS)
@@ -165,13 +165,13 @@ build_clean:
$(INC) $(TARGETS) $(TDS) $(CLEANS) \
*.out MakefileInclude *.manifest *.exp \
$(COMMON_INC) $(HDEPENDS_FILES) $(PRODTARGETS) \
$(TESTSCRIPTS) $(TAPFILES)
$(TESTSCRIPTS) $(TAPFILES) $(JUNITFILES)
ifdef RES
@$(RM) *$(RES)
endif
$(DIRECTORY_TARGETS) :
$(MKDIR) -p $@
$(MKDIR) $@
# Install LIB_INSTALLS libraries before linking executables
$(TESTPRODNAME) $(PRODNAME): | $(INSTALL_LIB_INSTALLS)
@@ -188,7 +188,7 @@ warnRelease:
-$(CONVERTRELEASE) checkRelease
noCheckRelease:
ifeq ($(EPICS_HOST_ARCH),$(T_A))
@echo "Warning: RELEASE file consistency checks have been disabled"
$(info Warning: RELEASE file consistency checks have been disabled)
endif
#---------------------------------------------------------------
@@ -279,13 +279,17 @@ endif # RANLIB
$(SHRLIBNAME) $(DLLSTUB_LIBNAME) $(TESTSHRLIBNAME) $(TESTDLLSTUB_LIBNAME): \
$(LIBRARY_OBJS) $(LIBRARY_RESS) $(SHRLIB_DEPLIBS)
$(DLLSTUB_LIBNAME): $(SHRLIBNAME);
# Stub library timestamps may be earlier than the DLL itself.
# This order-only prerequisite resolves any related problems.
# The $(LINK.shrlib) command must build both library files if
# the target requires a separate stub library file.
$(DLLSTUB_LIBNAME): | $(SHRLIBNAME);
$(SHRLIBNAME): $(SHRLIB_PREFIX)%$(SHRLIB_SUFFIX):
@$(RM) $@
$(LINK.shrlib)
$(MT_DLL_COMMAND)
$(TESTDLLSTUB_LIBNAME): $(TESTSHRLIBNAME);
$(TESTDLLSTUB_LIBNAME): | $(TESTSHRLIBNAME);
$(TESTSHRLIBNAME): $(SHRLIB_PREFIX)%$(SHRLIB_SUFFIX):
@$(RM) $@
$(LINK.shrlib)
@@ -324,6 +328,12 @@ $(MODNAME): %$(MODEXT): %$(EXE)
@$(RM) $@
$(LINK.mod)
#---------------------------------------------------------------
# Generate Perl include path module
%ModuleDirs.pm: $(wildcard $(TOP)/configure/RELEASE*)
@$(MKDIR) $(dir $@)
$(CONVERTRELEASE) -T $(TOP) $@
#---------------------------------------------------------------
# Automated testing
@@ -340,7 +350,23 @@ testspec: $(TESTSCRIPTS)
$(if $(TESTFILES), @echo Files: $(TESTFILES) >> $@)
$(if $(TESTSPEC_$(OS_CLASS)), @echo "Harness: $(TESTSPEC_$(OS_CLASS))" >> $@)
test-results: tapfiles
ifneq ($(TAPFILES),)
ifdef RUNTESTS_ENABLED
prove --failures --ext .tap --exec "$(CAT)" --color $(TAPFILES)
endif
endif
clean-tests:
ifneq ($(TAPFILES),)
$(RM) $(TAPFILES)
endif
ifneq ($(JUNITFILES),)
$(RM) $(JUNITFILES)
endif
tapfiles: $(TESTSCRIPTS) $(TAPFILES)
junitfiles: $(JUNITFILES)
# A .tap file is the output from running the associated test script
%.tap: %.t
@@ -348,10 +374,13 @@ ifdef RUNTESTS_ENABLED
-$(PERL) $< -tap > $@
endif
%.xml: %.tap
$(TAPTOJUNIT) --puretap --output $@ --input $< $*
# If there's a perl test script (.plt) available, use it
%.t: ../%.plt
@$(RM) $@
$(CP) $< $@
$(EXPAND_TOOL) -t $(INSTALL_LOCATION) -a $(T_A) $< $@
# Test programs (.t files) must be written in Perl.
# Generate a perl program to exec the real test binary.
@@ -359,6 +388,14 @@ endif
@$(RM) $@
$(PERL) $(TOOLS)/makeTestfile.pl $@ $<
#---------------------------------------------------------------
# Generate header with version number from VCS
ifneq ($(GENVERSION),)
$(COMMON_DIR)/$(GENVERSION): FORCE
$(GENVERSIONHEADER) -t $(TOP) -N $(GENVERSIONMACRO) -V "$(GENVERSIONDEFAULT)" $@
endif
#---------------------------------------------------------------
# Install rules for BIN_INSTALLS and LIB_INSTALLS
@@ -434,6 +471,7 @@ ifneq (,$(strip $(LOADABLE_SHRLIB_VERSION)))
endif # LOADABLE_SHRLIB_VERSION
endif # LOADABLE_SHRLIB_SUFFIX
ifneq ($(INSTALL_CONFIGS),)
$(INSTALL_CONFIG)/%: %
$(ECHO) "Installing config file $@"
@$(INSTALL) -d -m $(INSTALL_PERMISSIONS) $< $(@D)
@@ -441,6 +479,7 @@ $(INSTALL_CONFIG)/%: %
$(INSTALL_CONFIG)/%: ../%
$(ECHO) "Installing config file $@"
@$(INSTALL) -d -m $(INSTALL_PERMISSIONS) $< $(@D)
endif
$(INSTALL_INCLUDE)/% : $(COMMON_DIR)/%
$(ECHO) "Installing generated generic include file $@"
@@ -492,7 +531,8 @@ $(INSTALL_TEMPLATES_SUBDIR)/%: %
.PRECIOUS: $(COMMON_INC)
.PHONY: all host inc build install clean rebuild buildInstall build_clean
.PHONY: runtests tapfiles checkRelease warnRelease noCheckRelease
.PHONY: runtests tapfiles clean-tests test-results junitfiles
.PHONY: checkRelease warnRelease noCheckRelease FORCE
endif # BASE_RULES_BUILD
# EOF RULES_BUILD

View File

@@ -9,7 +9,7 @@
ARCHS += $(BUILD_ARCHS)
ACTIONS += inc build install buildInstall clean realclean archclean
ACTIONS += runtests tapfiles
ACTIONS += runtests tapfiles clean-tests test-results junitfiles
dirActionArchTargets = $(foreach dir, $(DIRS), \
$(foreach action, $(ACTIONS), \

View File

@@ -21,6 +21,9 @@ realuninstall: uninstallDirs
UNINSTALL_DIRS += $(INSTALL_DBD) $(INSTALL_INCLUDE) $(INSTALL_DOC) \
$(INSTALL_HTML) $(INSTALL_TEMPLATES) $(INSTALL_DB) $(DIRECTORY_TARGETS)
ifneq ($(INSTALL_LOCATION),$(TOP))
UNINSTALL_DIRS += $(INSTALL_CONFIG)
endif
uninstallDirs:
$(RMDIR) $(UNINSTALL_DIRS)
@@ -57,6 +60,7 @@ help:
@echo " Cannot be used within an O.<arch> dir"
@echo " rebuild - Same as clean install"
@echo " archclean - Removes O.<arch> dirs but not O.Common dir"
@echo " runtests - Run self-tests, summarize results"
@echo "\"Partial\" build targets supported by Makefiles:"
@echo " host - Builds and installs $(EPICS_HOST_ARCH) only."
@echo " inc$(DIVIDER)<arch> - Installs <arch> only header files."

View File

@@ -15,5 +15,14 @@ ARCH_CLASS = xscale
ifeq ($(BUILD_CLASS),CROSS)
VALID_BUILDS = Ioc
GNU_TARGET = xscale_be
CMPLR_PREFIX = $(addsuffix -,$(GNU_TARGET))
CMPLR_PREFIX = $(GNU_TARGET:%=%-)
# Configure for readline if requested
OP_SYS_INCLUDES += $(READLINE_DIR:%=-I%/include)
READLINE_LDFLAGS = $(READLINE_DIR:%=-L%/lib)
RUNTIME_LDFLAGS_READLINE_YES_NO = $(READLINE_DIR:%=-Wl,-rpath,%/lib)
RUNTIME_LDFLAGS += \
$(RUNTIME_LDFLAGS_READLINE_$(LINKER_USE_RPATH)_$(STATIC_BUILD))
SHRLIBDIR_LDFLAGS += $(READLINE_LDFLAGS)
PRODDIR_LDFLAGS += $(READLINE_LDFLAGS)
endif

View File

@@ -23,13 +23,15 @@ STATIC_LDFLAGS_YES= -Wl,-Bstatic
STATIC_LDFLAGS_NO=
STATIC_LDLIBS_YES= -Wl,-Bdynamic
# Set runtime path for shared libraries
SHRLIBDIR_RPATH_LDFLAGS_YES += $(SHRLIB_DEPLIB_DIRS:%=-Wl,-rpath,%)
SHRLIBDIR_LDFLAGS += $(SHRLIBDIR_RPATH_LDFLAGS_$(LINKER_USE_RPATH))
# Set runtime path for shared libraries if USE_RPATH=YES and STATIC_BUILD=NO
SHRLIBDIR_RPATH_LDFLAGS_YES_NO = $(SHRLIB_DEPLIB_DIRS:%=-Wl,-rpath,%)
SHRLIBDIR_LDFLAGS += \
$(SHRLIBDIR_RPATH_LDFLAGS_$(LINKER_USE_RPATH)_$(STATIC_BUILD))
# Set runtime path for products
PRODDIR_RPATH_LDFLAGS_YES += $(PROD_DEPLIB_DIRS:%=-Wl,-rpath,%)
PRODDIR_LDFLAGS += $(PRODDIR_RPATH_LDFLAGS_$(LINKER_USE_RPATH))
# Set runtime path for products if USE_RPATH=YES and STATIC_BUILD=NO
PRODDIR_RPATH_LDFLAGS_YES_NO = $(PROD_DEPLIB_DIRS:%=-Wl,-rpath,%)
PRODDIR_LDFLAGS += \
$(PRODDIR_RPATH_LDFLAGS_$(LINKER_USE_RPATH)_$(STATIC_BUILD))
# Link libraries controlled by COMMANDLINE_LIBRARY
# The newest Linux versions only need readline, older ones need both

View File

@@ -1,7 +1,7 @@
# CONFIG.Common.vxWorksCommon
#
# Definitions for vxWorks target archs
# Sites may override these definitions in CONFIG_SITE.Common.vxWorksCommon
# Override these definitions in CONFIG_SITE.Common.vxWorksCommon
# or CONFIG_SITE.<host>.vxWorksCommon
#-------------------------------------------------------
@@ -63,8 +63,6 @@ VXWORKS_MAJOR_VERSION = $(basename $(basename $(VXWORKS_VERSION)))
# These are needed for vxWorks 6.x; the GNU toolset version number
# is in the path to the compiler tools:
VX_GNU_VERSION_5.4 = 2.95
VX_GNU_VERSION_5.5 = 2.96
VX_GNU_VERSION_6.0 = 3.3.2
VX_GNU_VERSION_6.1 = 3.3.2
VX_GNU_VERSION_6.2 = 3.3.2
@@ -80,58 +78,38 @@ VX_GNU_VERSION = $(VX_GNU_VERSION_$(VXWORKS_VERSION))
VX_GNU_MAJOR_VERSION = $(basename $(basename $(VX_GNU_VERSION)))
#--------------------------------------------------
# Fix WIND_BASE for vxWorks 6.x on linux
# NB: We know the value of WIND_HOST_TYPE here, but not VXWORKS_VERSION
# Fix old Linux WIND_HOST_TYPE
ifeq ($(WIND_HOST_TYPE),x86-linux)
WIND_HOST_TYPE_5 = x86-linux
WIND_HOST_TYPE_6 = x86-linux2
WIND_HOST_TYPE = $(WIND_HOST_TYPE_$(VXWORKS_MAJOR_VERSION))
WIND_HOST_TYPE = x86-linux2
endif
#--------------------------------------------------
# vxWorks directory definitions
VX_DIR_5 = $(WIND_BASE)
VX_DIR_6 = $(WIND_BASE)/vxworks-$(VXWORKS_VERSION)
VX_DIR = $(VX_DIR_$(VXWORKS_MAJOR_VERSION))
VX_DIR = $(WIND_BASE)/vxworks-$(VXWORKS_VERSION)
VX_INCLUDE_DIRS_5 = $(VX_DIR)/target/h
VX_INCLUDE_DIRS_6 = $(VX_DIR)/target/h $(VX_DIR)/target/h/wrn/coreip
GNU_TARGET_INCLUDE_DIR = $(VX_INCLUDE_DIRS_$(VXWORKS_MAJOR_VERSION))
GNU_TARGET_INCLUDE_DIR = $(VX_DIR)/target/h $(VX_DIR)/target/h/wrn/coreip
#--------------------------------------------------
# vxWorks GNU directories
GNU_DIR_5 = $(WIND_BASE)/host/$(WIND_HOST_TYPE)
GNU_DIR_6 = $(WIND_BASE)/gnu/$(VX_GNU_VERSION)-vxworks-$(VXWORKS_VERSION)/$(WIND_HOST_TYPE)
GNU_DIR = $(GNU_DIR_$(VXWORKS_MAJOR_VERSION))
GNU_DIR = $(WIND_BASE)/gnu/$(VX_GNU_VERSION)-vxworks-$(VXWORKS_VERSION)/$(WIND_HOST_TYPE)
#--------------------------------------------------
# Wind River moved nm out of GNU_BIN in some versions
# This finds nm on any supported VxWorks version
WORKBENCH_BIN = $(WIND_BASE)/workbench-$(WORKBENCH_VERSION)/$(WIND_HOST_TYPE)/bin
UTILITIES_BIN = $(WIND_BASE)/utilities-$(UTILITIES_VERSION)/$(WIND_HOST_TYPE)/bin
NM_DIR_6.4 = $(WORKBENCH_BIN)
NM_DIR_6.5 = $(WORKBENCH_BIN)
NM_DIR_6.6 = $(WORKBENCH_BIN)
NM_DIR_6.7 = $(GNU_BIN)
NM_DIR_6.8 = $(UTILITIES_BIN)
NM_DIR_6.9 = $(UTILITIES_BIN)
NM_DIR = $(firstword $(NM_DIR_$(VXWORKS_VERSION)) $(GNU_BIN))
NM = $(NM_DIR)/$(CMPLR_PREFIX)nm$(CMPLR_SUFFIX)$(HOSTEXE)
NMPROG = $(CMPLR_PREFIX)nm$(CMPLR_SUFFIX)$(HOSTEXE)
NM = $(firstword $(wildcard $(WIND_BASE)/*/$(WIND_HOST_TYPE)/bin/$(NMPROG)))
#--------------------------------------------------
# A linker script is essential for munching from vxWorks 6.6 onwards
# (i.e. with versions that use gcc 4.1.2 or later). It can be used
# with any vxWorks 5 or 6 version, but apparently should not be used
# when compiling for 68K (which isn't supported in vxWorks 6 anyway)
# (i.e. with versions that use gcc 4.1.2 or later).
MUNCH_LDFLAGS_6 = -T $(VX_DIR)/target/h/tool/gnu/ldscripts/link.OUT
MUNCH_LDFLAGS = $(MUNCH_LDFLAGS_$(VXWORKS_MAJOR_VERSION))
#--------------------------------------------------
# These are required by some of the Wind River tools
export WIND_BASE
export WIND_HOME = $(WIND_BASE)
export WIND_HOST_TYPE
export TOOL_FAMILY = GNU
@@ -140,11 +118,10 @@ export TOOL_FAMILY = GNU
OP_SYS_CPPFLAGS += -DvxWorks=vxWorks
OP_SYS_CFLAGS += -fno-builtin
# Fix for vxWorks 5 headers that use macros defined in vxWorks.h but
# Fix for vxWorks headers that use macros defined in vxWorks.h but
# which don't actually include vxWorks.h themselves, for example the
# target/h/sys/stat.h file which uses ULONG. This also stops dbDefs.h
# from defining the OFFSET macro, which generates lots of warnings in
# both vxWorks 5 and 6.
# from defining the OFFSET macro, which generates lots of warnings.
OP_SYS_INCLUDE_CPPFLAGS += -include $(VX_DIR)/target/h/vxWorks.h
#--------------------------------------------------
@@ -157,7 +134,6 @@ OPT_CXXFLAGS_YES = -O2
CODE_CFLAGS =
#
# For vxWorks versions before 6.3 we need this g++ compiler flag
CODE_CXXFLAGS_5 = -fno-implicit-templates
CODE_CXXFLAGS_6.0 = -fno-implicit-templates
CODE_CXXFLAGS_6.1 = -fno-implicit-templates
CODE_CXXFLAGS_6.2 = -fno-implicit-templates
@@ -179,6 +155,8 @@ OSITHREAD_USE_DEFAULT_STACK = NO
#--------------------------------------------------
# Link definitions
CROSS_LDFLAGS =
#
LINK.cpp = $(LD) -o $@ $(STATIC_LDFLAGS) $(PRODDIR_LDFLAGS) $(LDFLAGS)
LINK.cpp += $(PROD_LDFLAGS) $(PROD_LD_OBJS) $(PROD_LD_RESS) $(PROD_LDLIBS)

View File

@@ -8,7 +8,7 @@
CP = cp
MV = mv
RM = rm -f
MKDIR = mkdir
MKDIR = mkdir -p
RMDIR = rm -rf
CAT = cat

View File

@@ -7,4 +7,4 @@
#Include definitions common to unix hosts
include $(CONFIG)/os/CONFIG.UnixCommon.Common
WIND_HOST_TYPE = x86-linux
WIND_HOST_TYPE = x86-linux2

View File

@@ -7,4 +7,4 @@
#Include definitions common to unix hosts
include $(CONFIG)/os/CONFIG.UnixCommon.Common
WIND_HOST_TYPE = x86-linux
WIND_HOST_TYPE = x86-linux2

View File

@@ -7,4 +7,4 @@
#Include definitions common to unix hosts
include $(CONFIG)/os/CONFIG.UnixCommon.Common
WIND_HOST_TYPE = x86-linux
WIND_HOST_TYPE = x86-linux2

View File

@@ -7,4 +7,4 @@
#Include definitions common to unix hosts
include $(CONFIG)/os/CONFIG.UnixCommon.Common
WIND_HOST_TYPE = x86-linux
WIND_HOST_TYPE = x86-linux2

View File

@@ -7,4 +7,4 @@
#Include definitions common to unix hosts
include $(CONFIG)/os/CONFIG.UnixCommon.Common
WIND_HOST_TYPE = x86-linux
WIND_HOST_TYPE = x86-linux2

View File

@@ -11,19 +11,14 @@ GNU_TARGET = arm-linux
CMPLR_SUFFIX =
CMPLR_PREFIX = $(addsuffix -,$(GNU_TARGET))
# Provide a link-time path for shared libraries
SHRLIBDIR_RPATH_LDFLAGS_YES += $(SHRLIB_DEPLIB_DIRS:%=-Wl,-rpath-link,%)
SHRLIBDIR_LDFLAGS += $(SHRLIBDIR_RPATH_LDFLAGS_$(LINKER_USE_RPATH))
# Provide a link-time path for products
PRODDIR_RPATH_LDFLAGS_YES += $(PROD_DEPLIB_DIRS:%=-Wl,-rpath-link,%)
PRODDIR_LDFLAGS += $(PRODDIR_RPATH_LDFLAGS_$(LINKER_USE_RPATH))
# Provide a link-time path for readline
RUNTIME_LDFLAGS_READLINE_YES = -Wl,-rpath-link,$(GNU_DIR)/lib
RUNTIME_LDFLAGS_READLINE = $(RUNTIME_LDFLAGS_READLINE_$(LINKER_USE_RPATH))
RUNTIME_LDFLAGS_READLINE_CURSES = $(RUNTIME_LDFLAGS_READLINE_$(LINKER_USE_RPATH))
RUNTIME_LDFLAGS_READLINE_NCURSES = $(RUNTIME_LDFLAGS_READLINE_$(LINKER_USE_RPATH))
# Provide a link-time path for readline if needed
OP_SYS_INCLUDES += $(READLINE_DIR:%=-I%/include)
READLINE_LDFLAGS = $(READLINE_DIR:%=-L%/lib)
RUNTIME_LDFLAGS_READLINE_YES_NO = $(READLINE_DIR:%=-Wl,-rpath,%/lib)
RUNTIME_LDFLAGS += \
$(RUNTIME_LDFLAGS_READLINE_$(LINKER_USE_RPATH)_$(STATIC_BUILD))
SHRLIBDIR_LDFLAGS += $(READLINE_LDFLAGS)
PRODDIR_LDFLAGS += $(READLINE_LDFLAGS)
# Library flags
STATIC_LDFLAGS_YES= -Wl,-Bstatic

View File

@@ -7,4 +7,4 @@
#Include definitions common to unix hosts
include $(CONFIG)/os/CONFIG.UnixCommon.Common
WIND_HOST_TYPE = x86-linux
WIND_HOST_TYPE = x86-linux2

View File

@@ -95,11 +95,12 @@ CODE_CPPFLAGS += -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE
# Compiler flags for C++ files
#
# -W<N> use warning level N
# (maximum lint level warnings at level 4)
# -w44355 set "'this' used in the base initializer list" to be level 4
# -W<n> disable warnings from levels > n
# -w<n><m> set warning m to level n
# -w44355 "'this' used in the base initializer list"
# -w44344 "behavior change: use of explicit template arguments results in ..."
WARN_CXXFLAGS_YES = -W3 -w44355 -w44344
# -w44251 "class needs to have dll-interface to be used by clients of ..."
WARN_CXXFLAGS_YES = -W3 -w44355 -w44344 -w44251
WARN_CXXFLAGS_NO = -W1
#
@@ -165,48 +166,38 @@ EXE=.exe
OBJ=.obj
RES=.res
# Problem: MS Visual C++ does not recognize *.cc as C++ source,
# so we do C++ compiles using the global flag -TP
# MS Visual C++ doesn't recognize *.cc as a C++ source file,
# so C++ compiles get the flag -TP
COMPILER_CXXFLAGS = -TP
# Operating system flags
# Operating system flags
OP_SYS_CFLAGS =
OP_SYS_CXXFLAGS = $(COMPILER_CXXFLAGS)
#
# Files and flags needed to link DLLs (used in RULES_BUILD)
#
WIN32_DLLFLAGS = /subsystem:windows /dll $(OPT_LDFLAGS) \
# Files and flags needed to link DLLs (used in RULES_BUILD)
WIN32_DLLFLAGS = -subsystem:windows -dll $(OPT_LDFLAGS) \
$(USR_LDFLAGS) $(CMD_LDFLAGS) $(TARGET_LDFLAGS) $(LIB_LDFLAGS)
#
# specify dll .def file only if it exists
#
# Specify dll .def file only if it exists
DLL_DEF_FLAG = $(addprefix -def:,$(wildcard ../$(addsuffix .def,$*)))
#
# A WIN32 dll has three parts:
# A WIN32 dll has three parts:
# x.dll: the real dll (SHRLIBNAME)
# x.lib: what you link to progs that use the dll (DLLSTUB_LIBNAME)
# x.exp: what you need to build the dll (in no variable)
#
LINK.shrlib = $(WINLINK) -nologo $(WIN32_DLLFLAGS) -out:$@ \
-implib:$(@:%$(SHRLIB_SUFFIX)=%$(LIB_SUFFIX)) \
$(DLL_DEF_FLAG) $(LIBRARY_LD_OBJS) $(LIBRARY_LD_RESS) $(SHRLIB_LDLIBS)
# adjust names of libraries to build
#
# Adjust names of libraries to build
SHRLIB_SUFFIX_BASE = .dll
SHRLIB_SUFFIX = $(SHRLIB_SUFFIX_BASE)
SHRLIBNAME_YES = $(BUILD_LIBRARY:%=%$(SHRLIB_SUFFIX))
LOADABLE_SHRLIBNAME = $(LOADABLE_BUILD_LIBRARY:%=%$(SHRLIB_SUFFIX))
TESTSHRLIBNAME_YES = $(TESTBUILD_LIBRARY:%=%$(SHRLIB_SUFFIX_BASE))
#
# When SHARED_LIBRARIES is YES we are building a DLL link library
# and when SHARED_LIBRARIES is NO we are building an object library
#
# When SHARED_LIBRARIES is YES we are building a DLL shared library.
# When SHARED_LIBRARIES is NO we are building an object library
DLLSTUB_SUFFIX = .lib
DLLSTUB_LIBNAME_YES = $(BUILD_LIBRARY:%=%.lib)
DLLSTUB_LIBNAME = $(DLLSTUB_LIBNAME_$(SHARED_LIBRARIES))
@@ -220,7 +211,7 @@ LIBNAME = $(LIBNAME_$(SHARED_LIBRARIES))
TESTLIBNAME_NO = $(TESTBUILD_LIBRARY:%=%.lib)
TESTLIBNAME = $(TESTLIBNAME_$(SHARED_LIBRARIES))
# dll install location
# dll install location
INSTALL_SHRLIB = $(INSTALL_BIN)
@@ -280,7 +271,7 @@ LINK.cpp = $(WINLINK) -nologo $(STATIC_LDFLAGS) $(LDFLAGS) $(PROD_LDFLAGS) \
#--------------------------------------------------
# UseManifestTool.pl checks MS Visual c++ compiler version number to
# decide whether or not to use the Manifest Tool command to embed the
# linker created .manifest file into a library or product target.
# linker created .manifest file into a library or product target.
# useManifestTool.pl returns 0(don't use) or 1(use).
#
MT.exe = mt.exe -nologo -manifest $@.manifest
@@ -290,4 +281,3 @@ MT_EXE_COMMAND_NO = $(MT.exe) "-outputresource:$@;\#1"
MT_EXE_COMMAND1 = $(MT_EXE_COMMAND_$(STATIC_BUILD))
MT_DLL_COMMAND = $(MT_DLL_COMMAND$(shell $(PERL) $(TOOLS)/useManifestTool.pl))
MT_EXE_COMMAND = $(MT_EXE_COMMAND$(shell $(PERL) $(TOOLS)/useManifestTool.pl))

View File

@@ -8,8 +8,7 @@
include $(CONFIG)/os/CONFIG.win32-x86.win32-x86
-include $(CONFIG)/os/CONFIG_SITE.win32-x86.win32-x86
OPT_LDFLAGS += /MACHINE:X64
# /MACHINE:X64
# /MACHINE:IA64 (Itanium)
# /MACHINE:X86
OPT_LDFLAGS += -MACHINE:X64
# -MACHINE:X64
# -MACHINE:IA64 (Itanium)
# -MACHINE:X86

View File

@@ -1,10 +1,4 @@
# CONFIG_SITE.Common.linux-xscale_be
#
# Site specific definitions for linux-xscale_be target builds.
# Site specific definitions for all linux-xscale_be target builds.
#-------------------------------------------------------
# Set GNU_DIR to point to directory containing the tool-chain
# APS:
GNU_DIR = /usr/local/vw/xscale_be

View File

@@ -1,25 +1,17 @@
# CONFIG_SITE.Common.vxWorksCommon
#
# Site specific definitions for vxWorks target builds.
# Only the local epics system manager should modify this file
# Compiler options can vary with the vxWorks version number, so we
# need to know that. However don't include any third-level digits
# (e.g. the .2 in 5.5.2) because we don't need them.
# need to know that. Do not include any third-level digits.
# Note: vxWorks 5.4.x (Tornado 2.0.x) is not supported
# Note: vxWorks 5.4.x and 5.5.x (Tornado 2.x) are not supported.
# VxWorks 6.0 through 6.5 use older, untested versions of GCC.
VXWORKS_VERSION = 5.5
#VXWORKS_VERSION = 6.0
#VXWORKS_VERSION = 6.1
#VXWORKS_VERSION = 6.2
#VXWORKS_VERSION = 6.3
#VXWORKS_VERSION = 6.4
#VXWORKS_VERSION = 6.5
#VXWORKS_VERSION = 6.6
#VXWORKS_VERSION = 6.7
#VXWORKS_VERSION = 6.8
#VXWORKS_VERSION = 6.9
VXWORKS_VERSION = 6.9
# Sites may override the following path for a particular host
@@ -27,21 +19,7 @@ VXWORKS_VERSION = 5.5
# CONFIG_SITE.$(EPICS_HOST_ARCH).vxWorksCommon file.
# WIND_BASE is where you installed the Wind River software.
# Under vxWorks 6.x this is *not* the same as the old VX_DIR setting
WIND_BASE = /usr/local/vw/tornado22-$(ARCH_CLASS)
#WIND_BASE = /usr/local/vw/vxWorks-$(VXWORKS_VERSION)
#WIND_BASE = /usr/local/vw/tornado22-$(ARCH_CLASS)
WIND_BASE = /usr/local/vw/vxWorks-$(VXWORKS_VERSION)
#WIND_BASE = /ade/vxWorks/$(VXWORKS_VERSION)
# WorkBench Version number, if you're using vxWorks 6.x
#WORKBENCH_VERSION = 2.6
#WORKBENCH_VERSION = 3.0
#WORKBENCH_VERSION = 3.2
#WORKBENCH_VERSION = 3.3
# Utilities Version number, required from vxWorks 6.8 and later
#UTILITIES_VERSION = 1.0

View File

@@ -7,8 +7,25 @@
GNU_TARGET = arm-xilinx-linux-gnueabi
# Set GNU tools install path
# This is the install path at APS:
# Examples are installations at the APS:
GNU_DIR = /usr/local/vw/zynq-2011.09
#GNU_DIR = /usr/local/Xilinx/SDK/2016.3/gnu/arm/lin
#GNU_DIR = /APSshare/XilinxSDK/2015.4/gnu/arm/lin
# If cross-building shared libraries and the paths on the target machine are
# different than on the build host, you should uncomment the lines below to
# disable putting runtime library paths in products and shared libraries.
# You will also need to provide another way for programs to find their shared
# libraries at runtime, such as by setting LD_LIBRARY_PATH or by using
# mechanisms related to /etc/ld.so.conf
#SHRLIBDIR_RPATH_LDFLAGS_YES_NO =
#PRODDIR_RPATH_LDFLAGS_YES_NO =
# Note: It may be simpler to just set STATIC_BUILD=YES here and not
# try to use shared libraries at all in these circumstances.
# To use libreadline, point this to its install prefix
#READLINE_DIR = $(GNU_DIR)
#READLINE_DIR = /tools/cross/linux-x86.linux-arm/readline
# See CONFIG_SITE.Common.linux-arm for other COMMANDLINE_LIBRARY values
#COMMANDLINE_LIBRARY = READLINE
# With a Xilinx SDK, it'll be something like
#GNU_DIR = /usr/local/zynq/Xilinx/SDK/2015.4/gnu/arm/lin

View File

@@ -0,0 +1,11 @@
# CONFIG_SITE.linux-x86.linux-xscale_be
#
# Site specific definitions for linux-x86 host - linux-xscale_be targets
#-------------------------------------------------------
# Set GNU_DIR to point to directory containing the tool-chain
GNU_DIR = /usr/local/vw/xscale_be
# If readline is available, configure it
READLINE_DIR = $(GNU_DIR)/target/usr
COMMANDLINE_LIBRARY = READLINE

View File

@@ -14,10 +14,10 @@
#GNU_DIR = /usr/local
# Different distribution cross-build packages use different prefixes:
# Ubuntu:
#CMPLR_PREFIX = i686-w64-mingw32-
# RHEL:
CMPLR_PREFIX = i686-pc-mingw32-
# Ubuntu, RHEL7:
CMPLR_PREFIX = i686-w64-mingw32-
# RHEL6:
#CMPLR_PREFIX = i686-pc-mingw32-
# Debian?
#CMPLR_PREFIX = i586-mingw32msvc-

View File

@@ -0,0 +1,7 @@
# CONFIG_SITE.linux-x86_64.linux-xscale_be
#
# Site specific settings for linux-x86_64 host - linux-xscale_be target
#-------------------------------------------------------
# Inherit setting from linux-x86
include $(CONFIG)/os/CONFIG_SITE.linux-x86.linux-xscale_be

View File

@@ -4,25 +4,37 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Known Problems in R3.15.5</title>
<title>Known Problems in Base-3.16.1</title>
</head>
<body>
<h1 style="text-align: center">EPICS Base R3.15.5: Known Problems</h1>
<h1 style="text-align: center">EPICS Base R3.16.1: Known Problems</h1>
<p>Any patch files linked below should be applied at the root of the
base-3.15.5 tree. Download them, then use the GNU Patch program as
base-3.16.1 tree. Download them, then use the GNU Patch program as
follows:</p>
<blockquote><pre>% <b>cd <i>/path/to/</i>base-3.15.5</b>
% <b>patch -p0 &lt; <i>/path/to/</i>file.patch</b></pre></blockquote>
<blockquote><pre>% <b>cd <i>/path/to/</i>base-3.16.1</b>
% <b>patch -p1 &lt; <i>/path/to/</i>file.patch</b></pre></blockquote>
<p>The following significant problems have been reported with this
version of EPICS Base:</p>
<p>The following problems were known by the developers at the time of this
release:</p>
<ul>
<li>None known as yet.</li>
<!-- Items added after release should be formatted thusly:
<li>YYYY-MM-DD: Description of problem.
<a href="fix.patch">This patch</a> fixes the problem.
...</li>
-->
<li>IOCs running on some versions of Cygwin may display warnings at iocInit
about duplicate EPICS CA Address list entries. These warnings might be due
to a bug in Cygwin; they are benign and can be ignored.</li>
<li>64-bit Windows builds of the CAS library may not work with some compilers.
The code in <tt>src/legacy/gdd</tt> is incompatible with the LLP64 model
that Windows uses for its 64-bit ABI.</li>
</ul>

View File

@@ -1,24 +1,24 @@
Installation Instructions
EPICS Base Release 3.15.5
EPICS Base Release 3.16.1
--------------------------------------------------------------------------
Table of Contents
* What is EPICS base?
* What is new in this release?
* Copyright
* Supported platforms
* Supported compilers
* Software requirements
* Host system storage requirements
* Documentation
* Directory Structure
* Build related components
* Building EPICS base (Unix and Win32)
* Example application and extension
* Multiple host platforms
* What is EPICS base?
* What is new in this release?
* Copyright
* Supported platforms
* Supported compilers
* Software requirements
* Host system storage requirements
* Documentation
* Directory Structure
* Build related components
* Building EPICS base (Unix and Win32)
* Example application and extension
* Multiple host platforms
--------------------------------------------------------------------------
@@ -85,17 +85,17 @@
as processes on the host platform.
vxWorks
You must have vxWorks 5.5.x or 6.x installed if any of your target
systems are vxWorks systems; the C++ compiler for vxWorks 5.4 is now too
old to support. The vxWorks installation provides the cross-compiler and
header files needed to build for these targets. The absolute path to and
the version number of the vxWorks installation must be set in the
You must have vxWorks 6 installed if any of your target systems are
vxWorks systems; the C++ compilers for vxWorks 5.x are now too old to
support. The vxWorks installation provides the cross-compiler and header
files needed to build for these targets. The absolute path to and the
version number of the vxWorks installation must be set in the
base/configure/os/CONFIG_SITE.Common.vxWorksCommon file or in one of its
target-specific overrides.
Consult the vxWorks 5.x or vxWorks 6.x EPICS web pages about and the
vxWorks documentation for information about configuring your vxWorks
operating system for use with EPICS.
Consult the vxWorks 6.x EPICS web pages and the vxWorks documentation
for information about configuring your vxWorks operating system for use
with EPICS.
RTEMS
For RTEMS targets, you need RTEMS core and toolset version 4.9.2 or

View File

@@ -9,7 +9,7 @@
<BODY>
<CENTER>
<H1>Installation Instructions</H1>
<H2>EPICS Base Release 3.15.5</H2><BR>
<H2>EPICS Base Release 3.16.1</H2><BR>
</CENTER>
<HR>
<H3> Table of Contents</H3>
@@ -90,17 +90,16 @@
as processes on the host platform.</P>
<P><B>vxWorks</B><BR>
You must have vxWorks 5.5.x or 6.x installed if any of your target systems are
vxWorks systems; the C++ compiler for vxWorks 5.4 is now too old to support.
The vxWorks installation provides the cross-compiler and header files needed to
You must have vxWorks 6 installed if any of your target systems are vxWorks
systems; the C++ compilers for vxWorks 5.x are now too old to support. The
vxWorks installation provides the cross-compiler and header files needed to
build for these targets. The absolute path to and the version number of the
vxWorks installation must be set in the
base/configure/os/CONFIG_SITE.Common.vxWorksCommon file or in one of its
target-specific overrides.</P>
<P>Consult the <a href="http://www.aps.anl.gov/epics/base/tornado.php">vxWorks
5.x</a> or <a href="http://www.aps.anl.gov/epics/base/vxWorks6.php">vxWorks
6.x</a> EPICS web pages about and the vxWorks documentation for information
<P>Consult the <a href="http://www.aps.anl.gov/epics/base/vxWorks6.php">vxWorks
6.x</a> EPICS web pages and the vxWorks documentation for information
about configuring your vxWorks operating system for use with EPICS.</P>
<P><B>RTEMS</B><BR>
@@ -191,12 +190,12 @@
CONFIG.CrossCommon Cross build definitions
CONFIG.gnuCommon Gnu compiler build definitions for all archs
CONFIG_ADDONS Definitions for &lt;osclass&gt; and DEFAULT options
CONFIG_APP_INCLUDE
CONFIG_APP_INCLUDE
CONFIG_BASE EPICS base tool and location definitions
CONFIG_BASE_VERSION Definitions for EPICS base version number
CONFIG_COMMON Definitions common to all builds
CONFIG_ENV Definitions of EPICS environment variables
CONFIG_FILE_TYPE
CONFIG_FILE_TYPE
CONFIG_SITE Site specific make definitions
CONFIG_SITE_ENV Site defaults for EPICS environment variables
MAKEFILE Installs CONFIG* RULES* creates
@@ -207,9 +206,9 @@
RULES_ARCHS Definitions and rules for building architectures
RULES_BUILD Build and install rules and definitions
RULES_DIRS Definitions and rules for building subdirectories
RULES_EXPAND
RULES_FILE_TYPE
RULES_TARGET
RULES_EXPAND
RULES_FILE_TYPE
RULES_TARGET
RULES_TOP Rules specific to a &lt;top&gt; dir (uninstall and tar)
Sample.Makefile Sample makefile with comments
</PRE>
@@ -341,7 +340,7 @@ Files in the base/startup directory have been provided to
<H3><A NAME="0_0_13"> Example application and extension</A></H3>
<BLOCKQUOTE>A perl tool, makeBaseApp.pl is included in the distribution
file. This script will create a sample application that can be built
and then executed to try out this release of base.
and then executed to try out this release of base.
<P>
Instructions for building and executing the 3.15 example application
@@ -351,8 +350,8 @@ Files in the base/startup directory have been provided to
create and build an example application in a user created &lt;top&gt;
directory. It also explains how to run the example application on a
vxWorks ioc or as a process on the host system.
By running the example application as a host-based IOC, you will be
able to quickly implement a complete EPICS system and be able to run channel
By running the example application as a host-based IOC, you will be
able to quickly implement a complete EPICS system and be able to run channel
access clients on the host system.
<P>

File diff suppressed because it is too large Load Diff

View File

@@ -33,30 +33,29 @@
<h1>EPICS Base Release Procedures &amp; Checklist</h1>
<p>This document describes the procedures and provides a checklist of tasks
that should be performed when creating new releases of EPICS Base.</p>
that should be performed when creating production releases of EPICS Base.</p>
<h3>The Release Process</h3>
<p>The version released on the Feature Freeze date is designated the first
pre-release, <tt>-pre1</tt>. The first Release Candidate <tt>-rc1</tt> is the
pre-release, <tt>-pre1</tt>. The first release candidate <tt>-rc1</tt> is the
first version that has undergone widespread testing and which has no known
problems in it that are slated to be fixed in this release. New versions should
be made at about weekly intervals during the testing and debugging period, and
will be designated as either pre-release versions or Release Candidates by the
Release Manager. A Release Candidate that has received widespread testing for a
week without any additional problems being discovered or significant changes
being committed can be designated as the final release version.</p>
will be designated as either pre-release or release candidate versions by the
Release Manager. After a release candidate has been available to the whole
community for testing for at least a week without any additional problems being
reported or significant changes being committed, the branch can be designated as
the final release version.</p>
<h3>Roles</h3>
<p>The following roles are required. The individuals named here have have been
responsible for these tasks in the past and are expected to continue in the
relevent roles unless the Release Manager designates otherwise:</p>
<p>The following roles are used below:</p>
<dl>
<dt><strong>Release Manager</strong> (Ralph Lange)</dt>
<dt><strong>Release Manager</strong> ()</dt>
<dd>Responsible for managing and tagging the release</dd>
<dt><strong>Platform Developers</strong></dt>
<dt><strong>Platform Developers</strong> (optional)</dt>
<dd>Responsible for individual operating system platforms</dd>
<dt><strong>Application Developers</strong></dt>
<dd>Responsible for support modules that depend on EPICS Base.</dd>
@@ -90,7 +89,7 @@ relevent roles unless the Release Manager designates otherwise:</p>
<tr>
<td>&nbsp;</td>
<td>Release Manager</td>
<td>Set the Feature Freeze date, by which time all Bazaar commits for
<td>Set the Feature Freeze date, by which time all Git commits for
enhancements and new functionality should have been completed. After
this date, commits should only be made to fix problems that show up
during testing.</td>
@@ -132,39 +131,40 @@ relevent roles unless the Release Manager designates otherwise:</p>
<tr>
<td>&nbsp;</td>
<td>Release Manager</td>
<td>Tag the module in Bazaar, using these tag conventions:
<td>Tag the module in Git using these tag conventions:
<ul>
<li>
<tt>R3.15.5-pre<i>n</i></tt>
<tt>R3.16.1-pre<i>n</i></tt>
&mdash; pre-release tag
</li>
<li>
<tt>R3.15.5-rc<i>n</i></tt>
&mdash; release candidate tag, note the <tt>rc</tt> is now
lower-case</li>
<tt>R3.16.1-rc<i>n</i></tt>
&mdash; release candidate tag
</li>
</ul>
<blockquote><tt>
cd ~/base/mirror-3.15<br />
bzr tag R3.15.5-rc<i>n</i>
cd base-3.16<br />
git tag -m 'ANJ: Tagged for 3.16.1-rc1' R3.16.1-rc1
</tt></blockquote>
</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>Release Manager</td>
<td>Export the tagged version into a tarfile. Note that this command
generates a gzipped tarfile directly from the repository:
<td>Export the tagged version into a tarfile. This command generates a
gzipped tarfile directly from the repository, excluding those files and
directories needed only for continuous integration:
<blockquote><tt>
cd ~/base<br />
bzr export
--root=base-3.15.5-rc<i>n</i>
-r tag:R3.15.5-rc<i>n</i>
base-3.15.5-rc<i>n</i>.tar.gz
mirror-3.15
cd base-3.16<br />
git archive
--prefix=base-3.16.1-rc1/
--output=../base-3.16.1-rc1.tar.gz
R3.16.1-rc1
configure documentation LICENSE Makefile README src startup
</tt></blockquote>
Create a GPG signature file of the tarfile as follows:
<blockquote><tt>
gpg --armor --sign --detach-sig base-3.15.5-rc<i>n</i>.tar.gz
gpg --armor --sign --detach-sig base-3.16.1-rc1.tar.gz
</tt></blockquote>
</td>
</tr>
@@ -258,7 +258,7 @@ relevent roles unless the Release Manager designates otherwise:</p>
<td>&nbsp;</td>
<td>Release Manager</td>
<td>Obtain a positive <q>Ok to release</q> from all platform developers
once a Release Candidate version has gone a whole week without any
once a release candidate version has gone a whole week without any
issues being reported.</td>
</tr>
<tr>
@@ -273,29 +273,30 @@ relevent roles unless the Release Manager designates otherwise:</p>
<tr>
<td>&nbsp;</td>
<td>Release Manager</td>
<td>Tag the module in Bazaar:
<td>Tag the module in Git:
<blockquote><tt>
cd ~/base/mirror-3.15<br />
bzr tag R3.15.5</i>
cd base-3.16<br />
git tag -m 'ANJ: Tagged for 3.16.1' R3.16.1</i>
</tt></blockquote>
</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>Release Manager</td>
<td>Export the tagged version into a tarfile. Note that this command
generates a gzipped tarfile directly from the repository:
<td>Export the tagged version into a tarfile. This command generates a
gzipped tarfile directly from the repository, excluding those files and
directories needed only for continuous integration:
<blockquote><tt>
cd ~/base<br />
bzr export
--root=base-3.15.5
-r tag:R3.15.5
base-3.15.5.tar.gz
mirror-3.15
cd base-3.16<br />
git archive
--prefix=base-3.16.1/
--output=../base-3.16.1.tar.gz
R3.16.1
configure documentation LICENSE Makefile README src startup
</tt></blockquote>
Create a GPG signature file of the tarfile as follows:
<blockquote><tt>
gpg --armor --sign --detach-sig base-3.15.5.tar.gz
gpg --armor --sign --detach-sig base-3.16.1.tar.gz
</tt></blockquote>
</td>
</tr>
@@ -305,14 +306,24 @@ relevent roles unless the Release Manager designates otherwise:</p>
<td>Test the tar file by extracting its contents and building it on at
least one supported platform</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>Release Manager</td>
<td>Upload the release tar file to the Launchpad download area.</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>Release Manager</td>
<td>Find all Launchpad bug reports with the status Fix Committed which
have been fixed in this release and mark them Fix Released.</td>
</tr>
<tr>
<th colspan="3">Publish and Announce it</th>
</tr>
<tr>
<td>&nbsp;</td>
<td>Website Manager</td>
<td>If necessary recreate the tarfile following the instructions above.
Copy the tar file and its <tt>.asc</tt> signature file to the Base
<td>Copy the tar file and its <tt>.asc</tt> signature file to the Base
download area of the website.</td>
</tr>
<tr>
@@ -343,24 +354,13 @@ relevent roles unless the Release Manager designates otherwise:</p>
<tr>
<td>&nbsp;</td>
<td>Website Manager</td>
<td>Upload the release tar file to the Launchpad download area.</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>Website Manager</td>
<td>Find all Launchpad bug reports with the status Fix Committed which
have been fixed in this release and mark them Fix Released.</td>
<td>Add an entry to the website News page, linking to the new version
webpage.</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>Release Manager</td>
<td>Email tech-talk</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>Website Manager</td>
<td>Add an entry to the website News page, linking to the new version
webpage.</td>
<td>Announce the release on the tech-talk mailing list.</td>
</tr>
</tbody>
</table>

View File

@@ -1,11 +1,10 @@
#*************************************************************************
# Copyright (c) 2012 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.
#*************************************************************************
menu(menuPost) {
choice(menuPost_OnChange, "On Change")
choice(menuPost_Always, "Always")
}
# When building submodules, this should always be true:
INSTALL_LOCATION = $(EPICS_BASE)
# Stop submodules from installing their configuration files:
CONFIG_INSTALLS =

51
modules/Makefile Normal file
View File

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

1
modules/ca Submodule

Submodule modules/ca added at 5dfd1fc0f0

1
modules/database Submodule

Submodule modules/database added at 73c7b8224d

1
modules/libcom Submodule

Submodule modules/libcom added at ea7802a838

1
modules/pvAccess Submodule

Submodule modules/pvAccess added at ba3b777978

1
modules/pvData Submodule

Submodule modules/pvData added at 7196658166

1
modules/pvDatabase Submodule

Submodule modules/pvDatabase added at 955947fd0f

1
modules/pva2pva Submodule

Submodule modules/pva2pva added at 413102a4bc

1
modules/pvaClient Submodule

Submodule modules/pvaClient added at 5a84b94520

View File

@@ -4,7 +4,7 @@
# Copyright (c) 2002 The Regents of the University of California, as
# Operator of Los Alamos National Laboratory.
# EPICS BASE is distributed subject to a Software License Agreement found
# in the file LICENSE that is included with this distribution.
# in the file LICENSE that is included with this distribution.
#*************************************************************************
TOP = ..
@@ -12,69 +12,10 @@ include $(TOP)/configure/CONFIG
DIRS += tools
DIRS += tools/test
tools/test_DEPEND_DIRS = tools
DIRS += template/base
template/base_DEPEND_DIRS = tools
DIRS += template/ext
template/ext_DEPEND_DIRS = tools
# Common
DIRS += libCom
libCom_DEPEND_DIRS = tools
DIRS += libCom/RTEMS
libCom/RTEMS_DEPEND_DIRS = libCom
DIRS += libCom/test
libCom/test_DEPEND_DIRS = libCom/RTEMS
# Channel Access
DIRS += ca/client
ca/client_DEPEND_DIRS = libCom
DIRS += ca/client/tools
ca/client/tools_DEPEND_DIRS = ca/client
DIRS += ca/legacy/gdd
ca/legacy/gdd_DEPEND_DIRS = ca/client
DIRS += ca/legacy/pcas
ca/legacy/pcas_DEPEND_DIRS = ca/legacy/gdd
DIRS += ca/legacy/pcas/ex
# needs ioc for dbStaticHost
ca/legacy/pcas/ex_DEPEND_DIRS = ca/legacy/pcas libCom ioc
DIRS += ca/client/perl
ca/client/perl_DEPEND_DIRS = ca/client
# PDB Core
DIRS += ioc
ioc_DEPEND_DIRS = libCom ca/client
DIRS += ioc/db/test
ioc/db/test_DEPEND_DIRS = ioc libCom/RTEMS
DIRS += ioc/dbtemplate/test
ioc/dbtemplate/test_DEPEND_DIRS = ioc
# PDB Standard Record Definitions
DIRS += std
std_DEPEND_DIRS = ioc libCom/RTEMS
DIRS += std/filters/test
std/filters/test_DEPEND_DIRS = std
DIRS += std/rec/test
std/rec/test_DEPEND_DIRS = std
include $(TOP)/configure/RULES_DIRS

View File

@@ -1,308 +0,0 @@
/*************************************************************************\
* Copyright (c) 2002 The University of Chicago, as Operator of Argonne
* National Laboratory.
* Copyright (c) 2002 The Regents of the University of California, as
* Operator of Los Alamos National Laboratory.
* EPICS BASE is distributed subject to a Software License Agreement found
* in file LICENSE that is included with this distribution.
\*************************************************************************/
/*
* Author: Jeffrey O. Hill
*/
#include <string>
#include <stdexcept>
#define epicsAssertAuthor "Jeff Hill johill@lanl.gov"
#include "errlog.h"
#define epicsExportSharedSymbols
#include "iocinf.h"
#include "syncGroup.h"
#include "oldAccess.h"
#include "cac.h"
#include "sgAutoPtr.h"
CASG::CASG ( epicsGuard < epicsMutex > & guard, ca_client_context & cacIn ) :
client ( cacIn ), magic ( CASG_MAGIC )
{
client.installCASG ( guard, *this );
}
CASG::~CASG ()
{
}
void CASG::destructor (
CallbackGuard & cbGuard,
epicsGuard < epicsMutex > & guard )
{
guard.assertIdenticalMutex ( this->client.mutexRef() );
if ( this->verify ( guard ) ) {
this->reset ( cbGuard, guard );
this->client.uninstallCASG ( guard, *this );
this->magic = 0;
}
else {
this->printFormated ( "cac: attempt to destroy invalid sync group ignored\n" );
}
this->~CASG ();
}
bool CASG::verify ( epicsGuard < epicsMutex > & ) const
{
return ( this->magic == CASG_MAGIC );
}
/*
* CASG::block ()
*/
int CASG::block (
epicsGuard < epicsMutex > * pcbGuard,
epicsGuard < epicsMutex > & guard,
double timeout )
{
epicsTime cur_time;
epicsTime beg_time;
double delay;
double remaining;
int status;
guard.assertIdenticalMutex ( this->client.mutexRef() );
// prevent recursion nightmares by disabling blocking
// for IO from within a CA callback.
if ( epicsThreadPrivateGet ( caClientCallbackThreadId ) ) {
return ECA_EVDISALLOW;
}
if ( timeout < 0.0 ) {
return ECA_TIMEOUT;
}
cur_time = epicsTime::getCurrent ();
this->client.flush ( guard );
beg_time = cur_time;
delay = 0.0;
while ( 1 ) {
if ( this->ioPendingList.count() == 0u ) {
status = ECA_NORMAL;
break;
}
remaining = timeout - delay;
if ( remaining <= CAC_SIGNIFICANT_DELAY ) {
/*
* Make sure that we take care of
* recv backlog at least once
*/
status = ECA_TIMEOUT;
break;
}
if ( pcbGuard ) {
epicsGuardRelease < epicsMutex > unguard ( guard );
{
epicsGuardRelease < epicsMutex > uncbGuard ( *pcbGuard );
this->sem.wait ( remaining );
}
}
else {
epicsGuardRelease < epicsMutex > unguard ( guard );
this->sem.wait ( remaining );
}
/*
* force a time update
*/
cur_time = epicsTime::getCurrent ();
delay = cur_time - beg_time;
}
return status;
}
void CASG::reset (
CallbackGuard & cbGuard,
epicsGuard < epicsMutex > & guard )
{
guard.assertIdenticalMutex ( this->client.mutexRef() );
this->destroyCompletedIO ( cbGuard, guard );
this->destroyPendingIO ( cbGuard, guard );
}
// lock must be applied
void CASG::destroyCompletedIO (
CallbackGuard & cbGuard,
epicsGuard < epicsMutex > & guard )
{
guard.assertIdenticalMutex ( this->client.mutexRef() );
syncGroupNotify * pNotify;
while ( ( pNotify = this->ioCompletedList.get () ) ) {
pNotify->destroy ( cbGuard, guard );
}
}
void CASG::destroyPendingIO (
CallbackGuard & cbGuard,
epicsGuard < epicsMutex > & guard )
{
guard.assertIdenticalMutex ( this->client.mutexRef() );
while ( syncGroupNotify * pNotify = this->ioPendingList.first () ) {
pNotify->cancel ( cbGuard, guard );
// cancel must release the guard while
// canceling put callbacks so we
// must double check list membership
if ( pNotify->ioPending ( guard ) ) {
this->ioPendingList.remove ( *pNotify );
}
else {
this->ioCompletedList.remove ( *pNotify );
}
pNotify->destroy ( cbGuard, guard );
}
}
void CASG::show ( unsigned level ) const
{
epicsGuard < epicsMutex > guard ( this->client.mutexRef () );
this->show ( guard, level );
}
void CASG::show (
epicsGuard < epicsMutex > & guard, unsigned level ) const
{
guard.assertIdenticalMutex ( this->client.mutexRef() );
::printf ( "Sync Group: id=%u, magic=%u, opPend=%u\n",
this->getId (), this->magic, this->ioPendingList.count () );
if ( level ) {
::printf ( "\tPending" );
tsDLIterConst < syncGroupNotify > notifyPending =
this->ioPendingList.firstIter ();
while ( notifyPending.valid () ) {
notifyPending->show ( guard, level - 1u );
notifyPending++;
}
::printf ( "\tCompleted" );
tsDLIterConst < syncGroupNotify > notifyCompleted =
this->ioCompletedList.firstIter ();
while ( notifyCompleted.valid () ) {
notifyCompleted->show ( guard, level - 1u );
notifyCompleted++;
}
}
}
bool CASG::ioComplete (
CallbackGuard & cbGuard,
epicsGuard < epicsMutex > & guard )
{
guard.assertIdenticalMutex ( this->client.mutexRef() );
this->destroyCompletedIO ( cbGuard, guard );
return this->ioPendingList.count () == 0u;
}
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 (
this->freeListWriteOP, *this, & CASG :: recycleWriteNotifyIO, pChan );
pNotify->begin ( guard, type, count, pValue );
pNotify.release ();
}
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 (
this->freeListReadOP, *this, & CASG :: recycleReadNotifyIO, pChan, pValue );
pNotify->begin ( guard, type, count );
pNotify.release ();
}
void CASG::completionNotify (
epicsGuard < epicsMutex > & guard, syncGroupNotify & notify )
{
guard.assertIdenticalMutex ( this->client.mutexRef() );
this->ioPendingList.remove ( notify );
this->ioCompletedList.add ( notify );
if ( this->ioPendingList.count () == 0u ) {
this->sem.signal ();
}
}
void CASG :: recycleReadNotifyIO ( epicsGuard < epicsMutex > & guard,
syncGroupReadNotify & io )
{
guard.assertIdenticalMutex ( this->client.mutexRef() );
this->freeListReadOP.release ( & io );
}
void CASG :: recycleWriteNotifyIO ( epicsGuard < epicsMutex > & guard,
syncGroupWriteNotify & io )
{
guard.assertIdenticalMutex ( this->client.mutexRef() );
this->freeListWriteOP.release ( & io );
}
int CASG :: printFormated ( const char *pformat, ... )
{
va_list theArgs;
int status;
va_start ( theArgs, pformat );
status = this->client.varArgsPrintFormated ( pformat, theArgs );
va_end ( theArgs );
return status;
}
void CASG::exception (
epicsGuard < epicsMutex > & guard,
int status, const char * pContext,
const char * pFileName, unsigned lineNo )
{
guard.assertIdenticalMutex ( this->client.mutexRef() );
if ( status != ECA_CHANDESTROY ) {
this->client.exception (
guard, status, pContext, pFileName, lineNo );
}
}
void CASG::exception (
epicsGuard < epicsMutex > & guard,
int status, const char * pContext,
const char * pFileName, unsigned lineNo, oldChannelNotify & chan,
unsigned type, arrayElementCount count, unsigned op )
{
guard.assertIdenticalMutex ( this->client.mutexRef() );
if ( status != ECA_CHANDESTROY ) {
this->client.exception (
guard, status, pContext, pFileName,
lineNo, chan, type, count, op );
}
}
void CASG::operator delete ( void * )
{
// Visual C++ .net appears to require operator delete if
// placement operator delete is defined? I smell a ms rat
// because if I declare placement new and delete, but
// comment out the placement delete definition there are
// no undefined symbols.
errlogPrintf ( "%s:%d this compiler is confused about placement delete - memory was probably leaked",
__FILE__, __LINE__ );
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,118 +0,0 @@
#*************************************************************************
# Copyright (c) 2002 The University of Chicago, as Operator of Argonne
# National Laboratory.
# Copyright (c) 2002 The Regents of the University of California, as
# Operator of Los Alamos National Laboratory.
# EPICS BASE is distributed subject to a Software License Agreement found
# in file LICENSE that is included with this distribution.
#*************************************************************************
TOP=../../..
include $(TOP)/configure/CONFIG
HTMLS += CAref.html
#
# includes to install from this subproject
#
INC += cadef.h
INC += caerr.h
INC += caeventmask.h
INC += caProto.h
INC += db_access.h
INC += addrList.h
INC += cacIO.h
INC += caDiagnostics.h
LIBSRCS += cac.cpp
LIBSRCS += cacChannel.cpp
LIBSRCS += cacChannelNotify.cpp
LIBSRCS += cacContextNotify.cpp
LIBSRCS += cacReadNotify.cpp
LIBSRCS += cacWriteNotify.cpp
LIBSRCS += cacStateNotify.cpp
LIBSRCS += access.cpp
LIBSRCS += iocinf.cpp
LIBSRCS += convert.cpp
LIBSRCS += test_event.cpp
LIBSRCS += repeater.cpp
LIBSRCS += searchTimer.cpp
LIBSRCS += disconnectGovernorTimer.cpp
LIBSRCS += repeaterSubscribeTimer.cpp
LIBSRCS += baseNMIU.cpp
LIBSRCS += nciu.cpp
LIBSRCS += netiiu.cpp
LIBSRCS += udpiiu.cpp
LIBSRCS += tcpiiu.cpp
LIBSRCS += noopiiu.cpp
LIBSRCS += netReadNotifyIO.cpp
LIBSRCS += netWriteNotifyIO.cpp
LIBSRCS += netSubscription.cpp
LIBSRCS += tcpSendWatchdog.cpp
LIBSRCS += tcpRecvWatchdog.cpp
LIBSRCS += bhe.cpp
LIBSRCS += ca_client_context.cpp
LIBSRCS += oldChannelNotify.cpp
LIBSRCS += oldSubscription.cpp
LIBSRCS += getCallback.cpp
LIBSRCS += getCopy.cpp
LIBSRCS += putCallback.cpp
LIBSRCS += syncgrp.cpp
LIBSRCS += CASG.cpp
LIBSRCS += syncGroupNotify.cpp
LIBSRCS += syncGroupReadNotify.cpp
LIBSRCS += syncGroupWriteNotify.cpp
LIBSRCS += localHostName.cpp
LIBSRCS += comQueRecv.cpp
LIBSRCS += comQueSend.cpp
LIBSRCS += comBuf.cpp
LIBSRCS += hostNameCache.cpp
LIBSRCS += msgForMultiplyDefinedPV.cpp
LIBSRCS_vxWorks += templateInstances.cpp
LIBRARY=ca
ca_RCS = ca.rc
ca_LIBS = Com
ca_SYS_LIBS_WIN32 = ws2_32 advapi32 user32
# libs needed for PROD and TESTPRODUCT
PROD_LIBS = ca Com
# needed when its an object library build
PROD_SYS_LIBS_WIN32 = ws2_32 advapi32 user32
PROD_DEFAULT += caRepeater catime acctst caConnTest casw caEventRate
PROD_vxWorks = -nil-
PROD_RTEMS = -nil-
PROD_iOS = -nil-
OBJS_vxWorks = catime acctst caConnTest casw caEventRate acctstRegister
caRepeater_SRCS = caRepeater.cpp
catime_SRCS = catimeMain.c catime.c
acctst_SRCS = acctstMain.c acctst.c
caEventRate_SRCS = caEventRateMain.cpp caEventRate.cpp
casw_SRCS = casw.cpp
caConnTest_SRCS = caConnTestMain.cpp caConnTest.cpp
casw_SYS_LIBS_solaris = socket
SCRIPTS_HOST = S99caRepeater
SCRIPTS_Linux = caRepeater.service
EXPAND += S99caRepeater@
EXPAND += caRepeater.service@
EXPAND_VARS = INSTALL_BIN=$(abspath $(INSTALL_BIN))
SRC_DIRS += $(TOP)/src/ca/client/test
PROD_HOST += ca_test
ca_test_SRCS = ca_test_main.c ca_test.c
ca_test_LIBS = ca Com
ca_test_SYS_LIBS_WIN32 = ws2_32 advapi32 user32
OBJS_vxWorks += ca_test
include $(TOP)/configure/RULES

View File

@@ -1,28 +0,0 @@
#!/bin/sh
#
# System-V init script for the EPICS CA Repeater.
#
INSTALL_BIN=@INSTALL_BIN@
# To change the default values for the EPICS environment parameters,
# uncomment and modify the relevant lines below. These are the only
# EPICS environment variables that the CA Repeater makes use of.
# EPICS_CA_REPEATER_PORT="5065" export EPICS_CA_REPEATER_PORT
if [ $1 = "start" ]; then
if [ -x $INSTALL_BIN/caRepeater ]; then
echo "Starting EPICS CA Repeater "
$INSTALL_BIN/caRepeater &
fi
else
if [ $1 = "stop" ]; then
pid=`ps -e | sed -ne '/caRepeat/s/^ *\([1-9][0-9]*\).*$/\1/p'`
if [ "${pid}" != "" ]; then
echo "Stopping EPICS CA Repeater "
kill ${pid}
fi
fi
fi

View File

@@ -1,39 +0,0 @@
/*************************************************************************\
* Copyright (c) 2002 The University of Chicago, as Operator of Argonne
* National Laboratory.
* Copyright (c) 2002 The Regents of the University of California, as
* Operator of Los Alamos National Laboratory.
* EPICS BASE Versions 3.13.7
* and higher are distributed subject to a Software License Agreement found
* in file LICENSE that is included with this distribution.
\*************************************************************************/
#ifndef SearchDest_h
#define SearchDest_h
#include <osiSock.h>
#include <epicsTime.h>
#include <tsDLList.h>
#include "caProto.h"
class channelNode;
class epicsMutex;
template < class T > class epicsGuard;
struct SearchDest :
public tsDLNode < SearchDest > {
virtual ~SearchDest () {};
struct Callback {
virtual ~Callback () {};
virtual void notify (
const caHdr & msg, const void * pPayload,
const osiSockAddr & addr, const epicsTime & ) = 0;
virtual void show (
epicsGuard < epicsMutex > &, unsigned level ) const = 0;
};
virtual void searchRequest ( epicsGuard < epicsMutex > &,
const char * pbuf, size_t len ) = 0;
virtual void show ( epicsGuard < epicsMutex > &, unsigned level ) const = 0;
};
#endif // SearchDest_h

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,70 +0,0 @@
/*************************************************************************\
* Copyright (c) 2002 The University of Chicago, as Operator of Argonne
* National Laboratory.
* Copyright (c) 2002 The Regents of the University of California, as
* Operator of Los Alamos National Laboratory.
* EPICS BASE Versions 3.13.7
* and higher are distributed subject to a Software License Agreement found
* in file LICENSE that is included with this distribution.
\*************************************************************************/
#include <stdio.h>
#include <stdlib.h>
#include "cadef.h"
#include "caDiagnostics.h"
int main ( int argc, char **argv )
{
unsigned progressLoggingLevel;
unsigned channelCount;
unsigned repetitionCount;
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",
argv[0] );
return 1;
}
if ( argc >= 3 ) {
progressLoggingLevel = atoi ( argv[2] );
}
else {
progressLoggingLevel = 0;
}
if ( argc >= 4 ) {
channelCount = atoi ( argv[3] );
}
else {
channelCount = 20000;
}
if ( argc >= 5 ) {
repetitionCount = atoi ( argv[4] );
}
else {
repetitionCount = 1;
}
if ( argc >= 6 ) {
aBoolean = atoi ( argv[5] );
}
else {
aBoolean = 0;
}
if ( aBoolean ) {
preempt = ca_enable_preemptive_callback;
}
else {
preempt = ca_disable_preemptive_callback;
}
acctst ( argv[1], progressLoggingLevel, channelCount, repetitionCount, preempt );
return 0;
}

View File

@@ -1,69 +0,0 @@
/*************************************************************************\
* Copyright (c) 2002 The University of Chicago, as Operator of Argonne
* National Laboratory.
* Copyright (c) 2002 The Regents of the University of California, as
* Operator of Los Alamos National Laboratory.
* EPICS BASE is distributed subject to a Software License Agreement found
* in file LICENSE that is included with this distribution.
\*************************************************************************/
/*
* CA client library diagnostics IOC shell registration
* Authors:
* Jeff Hill
*/
#include <iocsh.h>
#include "caDiagnostics.h"
/* Information needed by iocsh */
static const iocshArg acctstArg0 = { "channel name", iocshArgString };
static const iocshArg acctstArg1 = { "interest level", iocshArgInt };
static const iocshArg acctstArg2 = { "channel count", iocshArgInt };
static const iocshArg acctstArg3 = { "repetition count", iocshArgInt };
static const iocshArg acctstArg4 = { "preemptive callback select", iocshArgInt };
static const iocshArg *acctstArgs[] =
{
&acctstArg0,
&acctstArg1,
&acctstArg2,
&acctstArg3,
&acctstArg4
};
static const iocshFuncDef acctstFuncDef = {"acctst", 5, acctstArgs};
/* Wrapper called by iocsh, selects the argument types that print needs */
static void acctstCallFunc(const iocshArgBuf *args) {
if ( args[1].ival < 0 ) {
printf ( "negative interest level not allowed\n" );
return;
}
if ( args[2].ival < 0 ) {
printf ( "negative channel count not allowed\n" );
return;
}
if ( args[3].ival < 0 ) {
printf ( "negative repetition count not allowed\n" );
return;
}
acctst (
args[0].sval, /* channel name */
( unsigned ) args[1].ival, /* interest level */
( unsigned ) args[2].ival, /* channel count */
( unsigned ) args[3].ival, /* repetition count */
( ca_preemptive_callback_select ) args[4].ival ); /* preemptive callback select */
}
struct AutoInit {
AutoInit ();
};
AutoInit :: AutoInit ()
{
iocshRegister ( &acctstFuncDef, acctstCallFunc );
}
AutoInit autoInit;

View File

@@ -1,40 +0,0 @@
/*************************************************************************\
* Copyright (c) 2002 The University of Chicago, as Operator of Argonne
* National Laboratory.
* Copyright (c) 2002 The Regents of the University of California, as
* Operator of Los Alamos National Laboratory.
* EPICS BASE Versions 3.13.7
* and higher are distributed subject to a Software License Agreement found
* in file LICENSE that is included with this distribution.
\*************************************************************************/
#ifndef addrListh
#define addrListh
#include "shareLib.h"
#include "envDefs.h"
#include "osiSock.h"
#ifdef __cplusplus
extern "C" {
#endif
epicsShareFunc void epicsShareAPI configureChannelAccessAddressList
( struct ELLLIST *pList, SOCKET sock, unsigned short port );
epicsShareFunc int epicsShareAPI addAddrToChannelAccessAddressList
( struct ELLLIST *pList, const ENV_PARAM *pEnv,
unsigned short port, int ignoreNonDefaultPort );
epicsShareFunc void epicsShareAPI printChannelAccessAddressList
( const struct ELLLIST *pList );
epicsShareFunc void epicsShareAPI removeDuplicateAddresses
( struct ELLLIST *pDestList, ELLLIST *pSrcList, int silent);
#ifdef __cplusplus
}
#endif
#endif /* ifndef addrListh */

View File

@@ -1,94 +0,0 @@
/*************************************************************************\
* Copyright (c) 2002 The University of Chicago, as Operator of Argonne
* National Laboratory.
* Copyright (c) 2002 The Regents of the University of California, as
* Operator of Los Alamos National Laboratory.
* EPICS BASE Versions 3.13.7
* and higher are 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
*/
#ifndef autoPtrDestroyh
#define autoPtrDestroyh
template < class T >
class autoPtrDestroy {
public:
autoPtrDestroy ( T * );
~autoPtrDestroy ();
T & operator * () const;
T * operator -> () const;
autoPtrDestroy<T> & operator = ( T * );
T * get () const;
T * release ();
private:
T * p;
// not implemented
autoPtrDestroy<T> & operator = ( const autoPtrDestroy<T> & );
autoPtrDestroy ( const autoPtrDestroy<T> & );
};
template < class T >
inline autoPtrDestroy<T>::autoPtrDestroy ( T *pIn ) :
p ( pIn ) {}
template < class T >
inline autoPtrDestroy<T>::~autoPtrDestroy ()
{
if ( this->p ) {
this->p->destroy ();
}
}
template < class T >
inline T & autoPtrDestroy<T>::operator * () const
{
return * this->p;
}
template < class T >
inline T * autoPtrDestroy<T>::operator -> () const
{
return this->p;
}
template < class T >
inline autoPtrDestroy<T> & autoPtrDestroy<T>::operator = ( T * pIn )
{
if ( this->p ) {
this->p->destroy ();
}
this->p = pIn;
return *this;
}
template < class T >
inline T * autoPtrDestroy<T>::get () const
{
return this->p;
}
template < class T >
inline T * autoPtrDestroy<T>::release ()
{
T *pTmp = this->p;
this->p = 0;
return pTmp;
}
#endif // #ifdef autoPtrDestroyh

View File

@@ -1,104 +0,0 @@
/*************************************************************************\
* Copyright (c) 2002 The University of Chicago, as Operator of Argonne
* National Laboratory.
* Copyright (c) 2002 The Regents of the University of California, as
* Operator of Los Alamos National Laboratory.
* EPICS BASE Versions 3.13.7
* and higher are 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
*/
#ifndef autoPtrFreeListh
#define autoPtrFreeListh
#ifdef epicsExportSharedSymbols
# define autoPtrFreeListh_epicsExportSharedSymbols
# undef epicsExportSharedSymbols
#endif
#include "tsFreeList.h"
#include "compilerDependencies.h"
#ifdef autoPtrFreeListh_epicsExportSharedSymbols
# define epicsExportSharedSymbols
#endif
template < class T, unsigned N = 0x400, class MUTEX = epicsMutex >
class autoPtrFreeList {
public:
autoPtrFreeList ( tsFreeList < T, N, MUTEX > &, T * );
~autoPtrFreeList ();
T & operator * () const;
T * operator -> () const;
T * get () const;
T * release ();
private:
T * p;
tsFreeList < T, N, MUTEX > & freeList;
// not implemented
autoPtrFreeList & operator = ( const autoPtrFreeList & );
autoPtrFreeList ( const autoPtrFreeList < T, N, MUTEX > & );
};
template < class T, unsigned N, class MUTEX >
inline autoPtrFreeList < T, N, MUTEX >::autoPtrFreeList (
tsFreeList < T, N, MUTEX > & freeListIn, T * pIn ) :
p ( pIn ), freeList ( freeListIn ) {}
template < class T, unsigned N, class MUTEX >
inline autoPtrFreeList < T, N, MUTEX >::~autoPtrFreeList ()
{
if ( this->p ) {
this->p->~T();
// its probably a good idea to require that the class has placement delete
// by calling it during cleanup if the compiler supports it
# if defined ( CXX_PLACEMENT_DELETE )
T::operator delete ( this->p, this->freeList );
# else
this->freeList.release ( this->p );
# endif
}
}
template < class T, unsigned N, class MUTEX >
inline T & autoPtrFreeList < T, N, MUTEX >::operator * () const
{
return * this->p;
}
template < class T, unsigned N, class MUTEX >
inline T * autoPtrFreeList < T, N, MUTEX >::operator -> () const
{
return this->p;
}
template < class T, unsigned N, class MUTEX >
inline T * autoPtrFreeList < T, N, MUTEX >::get () const
{
return this->p;
}
template < class T, unsigned N, class MUTEX >
inline T * autoPtrFreeList < T, N, MUTEX >::release ()
{
T *pTmp = this->p;
this->p = 0;
return pTmp;
}
#endif // #ifdef autoPtrFreeListh

View File

@@ -1,92 +0,0 @@
/*************************************************************************\
* Copyright (c) 2002 The University of Chicago, as Operator of Argonne
* National Laboratory.
* Copyright (c) 2002 The Regents of the University of California, as
* Operator of Los Alamos National Laboratory.
* EPICS BASE Versions 3.13.7
* and higher are 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
*/
#ifndef autoPtrRecycleh
#define autoPtrRecycleh
template < class T >
class autoPtrRecycle {
public:
autoPtrRecycle (
epicsGuard < epicsMutex > &, chronIntIdResTable < baseNMIU > &,
cacRecycle &, T * );
~autoPtrRecycle ();
T & operator * () const;
T * operator -> () const;
T * get () const;
T * release ();
private:
T * p;
cacRecycle & r;
chronIntIdResTable < baseNMIU > & ioTable;
epicsGuard < epicsMutex > & guard;
// not implemented
autoPtrRecycle ( const autoPtrRecycle & );
autoPtrRecycle & operator = ( const autoPtrRecycle & );
};
template < class T >
inline autoPtrRecycle<T>::autoPtrRecycle (
epicsGuard < epicsMutex > & guardIn, chronIntIdResTable < baseNMIU > & tbl,
cacRecycle & rIn, T * pIn ) :
p ( pIn ), r ( rIn ), ioTable ( tbl ), guard ( guardIn ) {}
template < class T >
inline autoPtrRecycle<T>::~autoPtrRecycle ()
{
if ( this->p ) {
baseNMIU *pb = this->p;
this->ioTable.remove ( *pb );
pb->destroy ( this->guard, this->r );
}
}
template < class T >
inline T & autoPtrRecycle<T>::operator * () const
{
return * this->p;
}
template < class T >
inline T * autoPtrRecycle<T>::operator -> () const
{
return this->p;
}
template < class T >
inline T * autoPtrRecycle<T>::get () const
{
return this->p;
}
template < class T >
inline T * autoPtrRecycle<T>::release ()
{
T *pTmp = this->p;
this->p = 0;
return pTmp;
}
#endif // #ifdef autoPtrRecycleh

View File

@@ -1,39 +0,0 @@
/*************************************************************************\
* Copyright (c) 2002 The University of Chicago, as Operator of Argonne
* National Laboratory.
* Copyright (c) 2002 The Regents of the University of California, as
* Operator of Los Alamos National Laboratory.
* EPICS BASE Versions 3.13.7
* and higher are 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: Jeff Hill
*/
#define epicsAssertAuthor "Jeff Hill johill@lanl.gov"
#include "iocinf.h"
#include "nciu.h"
#include "netIO.h"
baseNMIU::~baseNMIU ()
{
}
void baseNMIU::forceSubscriptionUpdate (
epicsGuard < epicsMutex > &, nciu & )
{
}

View File

@@ -1,358 +0,0 @@
/*************************************************************************\
* Copyright (c) 2002 The University of Chicago, as Operator of Argonne
* National Laboratory.
* Copyright (c) 2002 The Regents of the University of California, as
* Operator of Los Alamos National Laboratory.
* EPICS BASE Versions 3.13.7
* and higher are 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: Jeff Hill
*/
#include <string>
#include <stdexcept>
#include <limits.h>
#include <float.h>
#define epicsAssertAuthor "Jeff Hill johill@lanl.gov"
#include "errlog.h"
#define epicsExportSharedSymbols
#include "iocinf.h"
#include "virtualCircuit.h"
#include "bhe.h"
/*
* set average to -1.0 so that when the next beacon
* occurs we can distinguish between:
* o new server
* o existing server's beacon we are seeing
* for the first time shortly after program
* start up
*
* if creating this in response to a search reply
* 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,
unsigned initialBeaconNumber, const inetAddrID & addr ) :
inetAddrID ( addr ), timeStamp ( initialTimeStamp ), averagePeriod ( - DBL_MAX ),
mutex ( mutexIn ), pIIU ( 0 ), lastBeaconNumber ( initialBeaconNumber )
{
# ifdef DEBUG
{
char name[64];
addr.name ( name, sizeof ( name ) );
::printf ( "created beacon entry for %s\n", name );
}
# endif
}
bhe::~bhe ()
{
}
void bhe::beaconAnomalyNotify ( epicsGuard < epicsMutex > & guard )
{
guard.assertIdenticalMutex ( this->mutex );
if ( this->pIIU ) {
this->pIIU->beaconAnomalyNotify ( guard );
}
}
#ifdef DEBUG
void bhe::logBeacon ( const char * pDiagnostic,
const double & currentPeriod,
const epicsTime & currentTime )
{
if ( this->pIIU ) {
char name[64];
this->name ( name, sizeof ( name ) );
char date[64];
currentTime.strftime ( date, sizeof ( date ),
"%a %b %d %Y %H:%M:%S.%f");
::printf ( "%s cp=%g ap=%g %s %s\n",
pDiagnostic, currentPeriod,
this->averagePeriod, name, date );
}
}
#else
inline void bhe::logBeacon ( const char * /* pDiagnostic */,
const double & /* currentPeriod */,
const epicsTime & /* currentTime */ )
{
}
#endif
#ifdef DEBUG
void bhe::logBeaconDiscard ( unsigned beaconAdvance,
const epicsTime & currentTime )
{
if ( this->pIIU ) {
char name[64];
this->name ( name, sizeof ( name ) );
char date[64];
currentTime.strftime ( date, sizeof ( date ),
"%a %b %d %Y %H:%M:%S.%f");
::printf ( "bb %u %s %s\n",
beaconAdvance, name, date );
}
}
#else
void bhe::logBeaconDiscard ( unsigned /* beaconAdvance */,
const epicsTime & /* currentTime */ )
{
}
#endif
/*
* update beacon period
*
* updates beacon period, and looks for beacon anomalies
*/
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
// and sequence number
//
if ( this->timeStamp == epicsTime () ) {
if ( CA_V410 ( protocolRevision ) ) {
this->lastBeaconNumber = beaconNumber;
}
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.
* (nothing to do but set the beacon time stamp and return)
*/
this->timeStamp = currentTime;
logBeacon ( "fb", - DBL_MAX, currentTime );
return false;
}
// 1) detect beacon duplications due to redundant routes
// 2) detect lost beacons due to input queue overrun or damage
if ( CA_V410 ( protocolRevision ) ) {
unsigned beaconSeqAdvance;
if ( beaconNumber >= this->lastBeaconNumber ) {
beaconSeqAdvance = beaconNumber - this->lastBeaconNumber;
}
else {
beaconSeqAdvance = ( ca_uint32_max - this->lastBeaconNumber ) + beaconNumber;
}
this->lastBeaconNumber = beaconNumber;
// 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
// or a beacon due to input queue overun)
if ( beaconSeqAdvance > 1 && beaconSeqAdvance < 4 ) {
logBeaconDiscard ( beaconSeqAdvance, currentTime );
return false;
}
}
// compute the beacon period (if we have seen at least two beacons)
bool netChange = false;
double currentPeriod = currentTime - this->timeStamp;
if ( this->averagePeriod < 0.0 ) {
double totalRunningTime;
this->beaconAnomalyNotify ( guard );
/*
* this is the 2nd beacon seen. We cant tell about
* the change in period at this point so we just
* initialize the average period and return.
*/
this->averagePeriod = currentPeriod;
logBeacon ( "fp", currentPeriod, currentTime );
/*
* 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
* client starts up.
*/
totalRunningTime = this->timeStamp - programBeginTime;
if ( currentPeriod <= totalRunningTime ) {
netChange = true;
}
}
else {
/*
* Is this an IOC seen because of a restored
* network segment?
*
* 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
* that the server is available
*/
if ( currentPeriod >= this->averagePeriod * 1.25 ) {
/*
* 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
* if not connected to this server
*/
netChange = true;
}
logBeacon ( "bah", currentPeriod, currentTime );
}
/*
* Is this an IOC seen because of an IOC reboot
* (beacon come at a higher rate just after the
* IOC reboots). Lower tolarance here because we
* dont have to worry about lost beacons.
*
* 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
* that the server is available
*/
else if ( currentPeriod <= this->averagePeriod * 0.80 ) {
this->beaconAnomalyNotify ( guard );
netChange = true;
logBeacon ( "bal", currentPeriod, currentTime );
}
else if ( this->pIIU ) {
// 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 * 0.875;
}
this->timeStamp = currentTime;
return netChange;
}
void bhe::show ( unsigned level ) const
{
epicsGuard < epicsMutex > guard ( this->mutex );
this->show ( guard, level );
}
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",
host );
}
else {
::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",
this->lastBeaconNumber, date );
}
}
double bhe::period ( epicsGuard < epicsMutex > & guard ) const
{
guard.assertIdenticalMutex ( this->mutex );
return this->averagePeriod;
}
epicsTime bhe::updateTime ( epicsGuard < epicsMutex > & guard ) const
{
guard.assertIdenticalMutex ( this->mutex );
return this->timeStamp;
}
void bhe::registerIIU (
epicsGuard < epicsMutex > & guard, tcpiiu & iiu )
{
guard.assertIdenticalMutex ( this->mutex );
this->pIIU = & iiu;
}
void bhe::unregisterIIU (
epicsGuard < epicsMutex > & guard, tcpiiu & iiu )
{
guard.assertIdenticalMutex ( this->mutex );
if ( this->pIIU == & iiu ) {
this->pIIU = 0;
this->timeStamp = epicsTime();
this->averagePeriod = - DBL_MAX;
logBeacon ( "ui", this->averagePeriod, epicsTime::getCurrent () );
}
}
void bhe::operator delete ( void * )
{
// Visual C++ .net appears to require operator delete if
// placement operator delete is defined? I smell a ms rat
// because if I declare placement new and delete, but
// comment out the placement delete definition there are
// no undefined symbols.
errlogPrintf ( "%s:%d this compiler is confused about placement delete - memory was probably leaked",
__FILE__, __LINE__ );
}
void * bheFreeStore::allocate ( size_t size )
{
return freeList.allocate ( size );
}
void bheFreeStore::release ( void * pCadaver )
{
freeList.release ( pCadaver );
}
bheMemoryManager::~bheMemoryManager () {}

View File

@@ -1,122 +0,0 @@
/*************************************************************************\
* Copyright (c) 2002 The University of Chicago, as Operator of Argonne
* National Laboratory.
* Copyright (c) 2002 The Regents of the University of California, as
* Operator of Los Alamos National Laboratory.
* EPICS BASE Versions 3.13.7
* and higher are 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: Jeff Hill
*/
#ifndef bheh
#define bheh
#ifdef epicsExportSharedSymbols
# define bhehEpicsExportSharedSymbols
# undef epicsExportSharedSymbols
#endif
#include "tsDLList.h"
#include "tsFreeList.h"
#include "epicsTime.h"
#include "compilerDependencies.h"
#ifdef bhehEpicsExportSharedSymbols
# define epicsExportSharedSymbols
# include "shareLib.h"
#endif
#include "inetAddrID.h"
#include "caProto.h"
class tcpiiu;
class bheMemoryManager;
// using a pure abstract wrapper class around the free list avoids
// Tornado 2.0.1 GNU compiler bugs
class epicsShareClass bheMemoryManager {
public:
virtual ~bheMemoryManager ();
virtual void * allocate ( size_t ) = 0;
virtual void release ( void * ) = 0;
};
class bhe : public tsSLNode < bhe >, public inetAddrID {
public:
epicsShareFunc bhe (
epicsMutex &, const epicsTime & initialTimeStamp,
unsigned initialBeaconNumber, const inetAddrID & addr );
epicsShareFunc ~bhe ();
epicsShareFunc bool updatePeriod (
epicsGuard < epicsMutex > &,
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 & );
#ifdef CXX_PLACEMENT_DELETE
epicsShareFunc void operator delete ( void *, bheMemoryManager & );
#endif
private:
epicsTime timeStamp;
double averagePeriod;
epicsMutex & mutex;
tcpiiu * pIIU;
ca_uint32_t lastBeaconNumber;
void beaconAnomalyNotify ( epicsGuard < epicsMutex > & );
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 * );
};
// using a wrapper class around the free list avoids
// Tornado 2.0.1 GNU compiler bugs
class bheFreeStore : public bheMemoryManager {
public:
bheFreeStore () {}
void * allocate ( size_t );
void release ( void * );
private:
tsFreeList < bhe, 0x100 > freeList;
bheFreeStore ( const bheFreeStore & );
bheFreeStore & operator = ( const bheFreeStore & );
};
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,
bheMemoryManager & mgr )
{
mgr.release ( pCadaver );
}
#endif
#endif // ifdef bheh

View File

@@ -1,36 +0,0 @@
#include <winver.h>
#include "epicsVersion.h"
VS_VERSION_INFO VERSIONINFO
FILEVERSION EPICS_VERSION,EPICS_REVISION,EPICS_MODIFICATION,EPICS_PATCH_LEVEL
PRODUCTVERSION EPICS_VERSION,EPICS_REVISION,EPICS_MODIFICATION,EPICS_PATCH_LEVEL
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS VOS__WINDOWS32
FILETYPE VFT_UNKNOWN
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "Comments","Channel Access Library for EPICS\0"
VALUE "CompanyName", "The EPICS collaboration\0"
VALUE "FileDescription", "Channel Access Library\0"
VALUE "FileVersion", EPICS_VERSION_STRING "\0"
VALUE "InternalName", "ca\0"
VALUE "LegalCopyright", "Copyright (C) Univ. of California, Univ. of Chicago\0"
VALUE "OriginalFilename", "ca.dll\0"
VALUE "ProductName", "Experimental Physics and Industrial Control System (EPICS)\0"
VALUE "ProductVersion", EPICS_VERSION_STRING "\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END

View File

@@ -1,109 +0,0 @@
/*************************************************************************\
* Copyright (c) 2002 The University of Chicago, as Operator of Argonne
* National Laboratory.
* Copyright (c) 2002 The Regents of the University of California, as
* Operator of Los Alamos National Laboratory.
* EPICS BASE Versions 3.13.7
* and higher are distributed subject to a Software License Agreement found
* in file LICENSE that is included with this distribution.
\*************************************************************************/
#include <stdio.h>
#include <stdlib.h>
#define epicsAssertAuthor "Jeff Hill johill@lanl.gov"
#include "cadef.h"
#include "epicsTime.h"
static unsigned channelCount = 0u;
static unsigned connCount = 0u;
static bool subsequentConnect = false;
epicsTime begin;
extern "C" void caConnTestConnHandler ( struct connection_handler_args args )
{
if ( args.op == CA_OP_CONN_UP ) {
if ( connCount == 0u ) {
if ( subsequentConnect ) {
printf ("the first channel connected\n");
begin = epicsTime::getCurrent ();
}
}
connCount++;
// printf ( "." );
// fflush ( stdout );
if ( connCount == channelCount ) {
epicsTime current = epicsTime::getCurrent ();
double delay = current - begin;
printf ( "all channels connected after %f sec ( %f sec per channel)\n",
delay, delay / channelCount );
}
}
else if ( args.op == CA_OP_CONN_DOWN ) {
if ( connCount == channelCount ) {
printf ( "channels are disconnected\n" );
subsequentConnect = true;
}
connCount--;
if ( connCount == 0u ) {
printf ( "all channels are disconnected\n" );
}
}
else {
assert ( 0 );
}
}
void caConnTest ( const char *pNameIn, unsigned channelCountIn, double delayIn )
{
unsigned iteration = 0u;
int status;
unsigned i;
chid *pChans;
channelCount = channelCountIn;
pChans = new chid [channelCount];
while ( 1 ) {
connCount = 0u;
subsequentConnect = false;
begin = epicsTime::getCurrent ();
printf ( "initializing CA client library\n" );
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,
&pChans[i], caConnTestConnHandler, 0 );
SEVCHK ( status, "CA search problems" );
}
printf ( "all channels were created\n" );
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" );
}
printf ( "all channels were destroyed\n" );
}
printf ( "shutting down CA client library\n" );
status = ca_task_exit ();
SEVCHK ( status, "task exit problems" );
iteration++;
}
//delete [] pChans;
}

View File

@@ -1,45 +0,0 @@
/*************************************************************************\
* Copyright (c) 2002 The University of Chicago, as Operator of Argonne
* National Laboratory.
* Copyright (c) 2002 The Regents of the University of California, as
* Operator of Los Alamos National Laboratory.
* EPICS BASE Versions 3.13.7
* and higher are distributed subject to a Software License Agreement found
* in file LICENSE that is included with this distribution.
\*************************************************************************/
#include <stdio.h>
#include <epicsStdlib.h>
#include "caDiagnostics.h"
int main ( int argc, char **argv )
{
double delay = 60.0 * 5.0;
unsigned count = 2000;
if ( argc < 2 || argc > 4 ) {
printf ( "usage: %s < channel name > [ < count > ] [ < delay sec > ]\n", argv[0] );
return -1;
}
if ( argc >= 3 ) {
int nConverted = sscanf ( argv[2], "%u", &count );
if ( nConverted != 1 ) {
printf ( "conversion failed, changing channel count arg \"%s\" to %u\n",
argv[1], count );
}
}
if ( argc >= 4 ) {
int nConverted = epicsScanDouble( argv[3], &delay );
if ( nConverted != 1 ) {
printf ( "conversion failed, changing delay arg \"%s\" to %f\n",
argv[2], delay );
}
}
caConnTest ( argv[1], count, delay );
return 0;
}

View File

@@ -1,38 +0,0 @@
/*************************************************************************\
* Copyright (c) 2002 The University of Chicago, as Operator of Argonne
* National Laboratory.
* Copyright (c) 2002 The Regents of the University of California, as
* Operator of Los Alamos National Laboratory.
* EPICS BASE Versions 3.13.7
* and higher are distributed subject to a Software License Agreement found
* in file LICENSE that is included with this distribution.
\*************************************************************************/
#ifndef caDiagnosticsh
#define caDiagnosticsh
#include "cadef.h"
#ifdef __cplusplus
extern "C" {
#endif
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,
enum ca_preemptive_callback_select select );
#define CATIME_OK 0
#define CATIME_ERROR -1
#ifdef __cplusplus
}
#endif
void caConnTest ( const char *pNameIn, unsigned channelCountIn, double delayIn );
#endif /* caDiagnosticsh */

View File

@@ -1,139 +0,0 @@
/*************************************************************************\
* Copyright (c) 2002 The University of Chicago, as Operator of Argonne
* National Laboratory.
* Copyright (c) 2002 The Regents of the University of California, as
* Operator of Los Alamos National Laboratory.
* EPICS BASE Versions 3.13.7
* and higher are distributed subject to a Software License Agreement found
* in file LICENSE that is included with this distribution.
\*************************************************************************/
#include <stdio.h>
#include <limits.h>
#include <math.h>
#include "cadef.h"
#include "dbDefs.h"
#include "epicsTime.h"
#include "errlog.h"
/*
* event_handler()
*/
extern "C" void eventCallBack ( struct event_handler_args args )
{
unsigned *pCount = static_cast < unsigned * > ( args.usr );
(*pCount)++;
}
/*
* caEventRate ()
*/
void caEventRate ( const char *pName, unsigned count )
{
static const double initialSamplePeriod = 1.0;
static const double maxSamplePeriod = 60.0 * 5.0;
unsigned eventCount = 0u;
chid * pChidTable = new chid [ count ];
{
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,
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
epicsTime begin = epicsTime::getCurrent ();
while ( eventCount < count ) {
int status = ca_pend_event ( 0.01 );
if ( status != ECA_TIMEOUT ) {
SEVCHK ( status, NULL );
}
}
epicsTime end = epicsTime::getCurrent ();
printf ( " done(%f sec).\n", end - begin );
}
double samplePeriod = initialSamplePeriod;
double X = 0.0;
double XX = 0.0;
unsigned N = 0u;
while ( true ) {
unsigned nEvents, lastEventCount, curEventCount;
epicsTime beginPend = epicsTime::getCurrent ();
lastEventCount = eventCount;
int status = ca_pend_event ( samplePeriod );
curEventCount = eventCount;
epicsTime endPend = epicsTime::getCurrent ();
if ( status != ECA_TIMEOUT ) {
SEVCHK ( status, NULL );
}
if ( curEventCount >= lastEventCount ) {
nEvents = curEventCount - lastEventCount;
}
else {
nEvents = ( UINT_MAX - lastEventCount ) + curEventCount + 1u;
}
N++;
double period = endPend - beginPend;
double Hz = nEvents / period;
X += Hz;
XX += Hz * Hz;
double mean = X / N;
double stdDev = sqrt ( XX / N - mean * mean );
printf ( "CA Event Rate (Hz): current %g mean %g std dev %g\n",
Hz, mean, stdDev );
if ( samplePeriod < maxSamplePeriod ) {
samplePeriod += samplePeriod;
}
}
}

View File

@@ -1,38 +0,0 @@
/*************************************************************************\
* Copyright (c) 2002 The University of Chicago, as Operator of Argonne
* National Laboratory.
* Copyright (c) 2002 The Regents of the University of California, as
* Operator of Los Alamos National Laboratory.
* EPICS BASE Versions 3.13.7
* and higher are distributed subject to a Software License Agreement found
* in file LICENSE that is included with this distribution.
\*************************************************************************/
#include <stdio.h>
#include <stdlib.h>
void caEventRate ( const char *pName, unsigned count );
int main ( int argc, char **argv )
{
if ( argc < 2 || argc > 3 ) {
fprintf ( stderr, "usage: %s < PV name > [subscription count]\n", argv[0] );
return 0;
}
unsigned count;
if ( argc == 3 ) {
int status = sscanf ( argv[2], " %u ", & count );
if ( status != 1 ) {
fprintf ( stderr, "expected unsigned integer 2nd argument\n" );
return 0;
}
}
else {
count = 1;
}
caEventRate ( argv[1], count );
return 0;
}

View File

@@ -1,215 +0,0 @@
/*************************************************************************\
* Copyright (c) 2002 The University of Chicago, as Operator of Argonne
* National Laboratory.
* Copyright (c) 2002 The Regents of the University of California, as
* Operator of Los Alamos National Laboratory.
* EPICS BASE Versions 3.13.7
* and higher are distributed subject to a Software License Agreement found
* in file LICENSE that is included with this distribution.
\*************************************************************************/
/*
*
* Author Jeffrey O. Hill
* johill@lanl.gov
* 505 665 1831
*/
#ifndef __CAPROTO__
#define __CAPROTO__
#define capStrOf(A) #A
#define capStrOfX(A) capStrOf ( A )
/*
* CA protocol revision
* TCP/UDP port number (bumped each major protocol change)
*/
#define CA_MAJOR_PROTOCOL_REVISION 4
#define CA_VERSION_STRING( MINOR_REVISION ) \
( capStrOfX ( CA_MAJOR_PROTOCOL_REVISION ) "." capStrOfX ( MINOR_REVISION ) )
#define CA_UKN_MINOR_VERSION 0u /* unknown minor version */
#if CA_MAJOR_PROTOCOL_REVISION == 4u
# define CA_V41(MINOR) ((MINOR)>=1u)
# define CA_V42(MINOR) ((MINOR)>=2u)
# define CA_V43(MINOR) ((MINOR)>=3u)
# define CA_V44(MINOR) ((MINOR)>=4u)
# define CA_V45(MINOR) ((MINOR)>=5u)
# define CA_V46(MINOR) ((MINOR)>=6u)
# define CA_V47(MINOR) ((MINOR)>=7u)
# define CA_V48(MINOR) ((MINOR)>=8u)
# define CA_V49(MINOR) ((MINOR)>=9u) /* large arrays, dispatch priorities */
# define CA_V410(MINOR) ((MINOR)>=10u) /* beacon counter */
# define CA_V411(MINOR) ((MINOR)>=11u) /* sequence numbers in UDP version command */
# define CA_V412(MINOR) ((MINOR)>=12u) /* TCP-based search requests */
# define CA_V413(MINOR) ((MINOR)>=13u) /* Allow zero length in requests. */
#elif CA_MAJOR_PROTOCOL_REVISION > 4u
# define CA_V41(MINOR) ( 1u )
# define CA_V42(MINOR) ( 1u )
# define CA_V43(MINOR) ( 1u )
# define CA_V44(MINOR) ( 1u )
# define CA_V45(MINOR) ( 1u )
# define CA_V46(MINOR) ( 1u )
# define CA_V47(MINOR) ( 1u )
# define CA_V48(MINOR) ( 1u )
# define CA_V49(MINOR) ( 1u )
# define CA_V410(MINOR) ( 1u )
# define CA_V411(MINOR) ( 1u )
# define CA_V412(MINOR) ( 1u )
# define CA_V413(MINOR) ( 1u )
#else
# define CA_V41(MINOR) ( 0u )
# define CA_V42(MINOR) ( 0u )
# define CA_V43(MINOR) ( 0u )
# define CA_V44(MINOR) ( 0u )
# define CA_V45(MINOR) ( 0u )
# define CA_V46(MINOR) ( 0u )
# define CA_V47(MINOR) ( 0u )
# define CA_V48(MINOR) ( 0u )
# define CA_V49(MINOR) ( 0u )
# define CA_V410(MINOR) ( 0u )
# define CA_V411(MINOR) ( 0u )
# define CA_V412(MINOR) ( 0u )
# define CA_V413(MINOR) ( 0u )
#endif
/*
* 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"
*/
#define CA_PORT_BASE IPPORT_USERRESERVED + 56U
#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)
* (the MTU of Ethernet is currently independent of its speed varient)
*/
#define ETHERNET_MAX_UDP ( 1500u - 20u - 8u )
#define MAX_UDP_RECV ( 0xffff + 16u ) /* allow large frames to be received in the future */
#define MAX_UDP_SEND 1024u /* original MAX_UDP */
#define MAX_TCP ( 1024 * 16u ) /* so waveforms fit */
#define MAX_MSG_SIZE ( MAX_TCP ) /* the larger of tcp and udp max */
#define CA_PROTO_PRIORITY_MIN 0u
#define CA_PROTO_PRIORITY_MAX 99u
/*
* architecture independent types
*
* (so far this works on all archs we have ported to)
*/
typedef unsigned char ca_uint8_t;
typedef unsigned short ca_uint16_t;
typedef unsigned int ca_uint32_t;
typedef float ca_float32_t;
typedef ca_uint32_t caResId;
#define ca_uint32_max 0xffffffff
/* values for m_cmmd */
#define CA_PROTO_VERSION 0u /* set minor version and priority (used to be NOOP cmd) */
#define CA_PROTO_EVENT_ADD 1u /* add an event */
#define CA_PROTO_EVENT_CANCEL 2u /* cancel an event */
#define CA_PROTO_READ 3u /* read and return a channel value*/
#define CA_PROTO_WRITE 4u /* write a channel value */
#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_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 */
#define CA_PROTO_READ_NOTIFY 15u /* add a one shot event */
#define CA_PROTO_READ_BUILD 16u /* read and build - obsolete */
#define REPEATER_CONFIRM 17u /* registration confirmation */
#define CA_PROTO_CREATE_CHAN 18u /* client creates channel in server */
#define CA_PROTO_WRITE_NOTIFY 19u /* notify after write chan value */
#define CA_PROTO_CLIENT_NAME 20u /* CA V4.1 identify client */
#define CA_PROTO_HOST_NAME 21u /* CA V4.1 identify client */
#define CA_PROTO_ACCESS_RIGHTS 22u /* CA V4.2 asynch access rights chg */
#define CA_PROTO_ECHO 23u /* CA V4.3 connection verify */
#define REPEATER_REGISTER 24u /* register for repeater fan out */
#define CA_PROTO_SIGNAL 25u /* knock the server out of select */
#define CA_PROTO_CREATE_CH_FAIL 26u /* unable to create chan resource in server */
#define CA_PROTO_SERVER_DISCONN 27u /* server deletes PV (or channel) */
#define CA_PROTO_LAST_CMMD CA_PROTO_SERVER_DISCONN
/*
* for use with search and not_found (if search fails and
* its not a broadcast tell the client to look elesewhere)
*/
#define DOREPLY 10u
#define DONTREPLY 5u
/*
* for use with the m_dataType field in UDP messages emitted by servers
*/
#define sequenceNoIsValid 1
/* size of object in bytes rounded up to nearest oct word */
#define OCT_ROUND(A) (((A)+7)/8)
#define OCT_SIZEOF(A) (OCT_ROUND(sizeof(A)))
/* size of object in bytes rounded up to nearest long word */
#define QUAD_ROUND(A) ((A)+3)/4)
#define QUAD_SIZEOF(A) (QUAD_ROUND(sizeof(A)))
/* size of object in bytes rounded up to nearest short word */
#define BI_ROUND(A) (((A)+1)/2)
#define BI_SIZEOF(A) (BI_ROUND(sizeof(A)))
/*
* For communicating access rights to the clients
*
* (placed in m_available hdr field of CA_PROTO_ACCESS_RIGHTS cmmd
*/
#define CA_PROTO_ACCESS_RIGHT_READ (1u<<0u)
#define CA_PROTO_ACCESS_RIGHT_WRITE (1u<<1u)
/*
* All structures passed in the protocol must have individual
* fields aligned on natural boundaries.
*
* NOTE: all structures declared in this file must have a
* byte count which is evenly divisible by 8 matching
* the largest atomic data type in db_access.h.
*/
#define CA_MESSAGE_ALIGN(A) (OCT_ROUND(A)<<3u)
/*
* the common part of each message sent/recv by the
* CA server.
*/
typedef struct ca_hdr {
ca_uint16_t m_cmmd; /* operation to be performed */
ca_uint16_t m_postsize; /* size of payload */
ca_uint16_t m_dataType; /* operation data type */
ca_uint16_t m_count; /* operation data count */
ca_uint32_t m_cid; /* channel identifier */
ca_uint32_t m_available; /* protocol stub dependent */
} caHdr;
/*
* for monitor (event) message extension
*/
struct mon_info {
ca_float32_t m_lval; /* low 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 */
};
/*
* PV names greater than this length assumed to be invalid
*/
#define unreasonablePVNameSize 500u
#endif /* __CAPROTO__ */

View File

@@ -1,42 +0,0 @@
/*************************************************************************\
* Copyright (c) 2002 The University of Chicago, as Operator of Argonne
* National Laboratory.
* Copyright (c) 2002 The Regents of the University of California, as
* Operator of Los Alamos National Laboratory.
* EPICS BASE Versions 3.13.7
* and higher are distributed subject to a Software License Agreement found
* in file LICENSE that is included with this distribution.
\*************************************************************************/
/*
*
* CA UDP repeater standalone executable
*
* Author: Jeff Hill
* Date: 3-27-90
*
* PURPOSE:
* Broadcasts fan out over the LAN, but old IP kernels do not allow
* two processes on the same machine to get the same broadcast
* (and modern IP kernels do not allow two processes on the same machine
* to receive the same unicast).
*
* This code fans out UDP messages sent to the CA repeater port
* to all CA client processes that have subscribed.
*
* NOTES:
*
* see repeater.c
*
*/
#define epicsAssertAuthor "Jeff Hill johill@lanl.gov"
#include "epicsAssert.h"
#include "udpiiu.h"
int main()
{
ca_repeater ();
return ( 0 );
}

View File

@@ -1,25 +0,0 @@
#
# Linux systemd service file for the EPICS CA Repeater
#
# To install this file, as root:
# cp caRepeater.service /etc/systemd/system
# chmod 664 /etc/systemd/system/caRepeater.service
# systemctl daemon-reload
# systemctl enable caRepeater
# systemctl start caRepeater
#
# To check the status:
# systemctl status caRepeater
[Unit]
Description=EPICS CA Repeater
Requires=network.target
After=network.target
[Service]
ExecStart=@INSTALL_BIN@/caRepeater
Restart=always
User=daemon
[Install]
WantedBy=multi-user.target

View File

@@ -1,88 +0,0 @@
/*************************************************************************\
* Copyright (c) 2002 The University of Chicago, as Operator of Argonne
* National Laboratory.
* Copyright (c) 2002 The Regents of the University of California, as
* Operator of Los Alamos National Laboratory.
* EPICS BASE Versions 3.13.7
* and higher are 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: Jeff Hill
*/
#ifndef caServerIDh
#define caServerIDh
#include "osiSock.h"
#include "resourceLib.h"
#include "caProto.h"
class caServerID {
public:
caServerID ( const struct sockaddr_in & addrIn, unsigned priority );
bool operator == ( const caServerID & ) const;
resTableIndex hash () const;
osiSockAddr address () const;
unsigned priority () const;
private:
struct sockaddr_in addr;
ca_uint8_t pri;
};
inline caServerID::caServerID (
const struct sockaddr_in & addrIn, unsigned priorityIn ) :
addr ( addrIn ), pri ( static_cast <ca_uint8_t> ( priorityIn ) )
{
assert ( priorityIn <= 0xff );
}
inline bool caServerID::operator == ( const caServerID & rhs ) const
{
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;
}
return false;
}
inline resTableIndex caServerID::hash () const
{
// start with a very small server table to speed
// up the flush traverse for the frequent case -
// a small numbers of servers
const unsigned caServerMinIndexBitWidth = 2u;
const unsigned caServerMaxIndexBitWidth = 32u;
unsigned index;
index = this->addr.sin_addr.s_addr;
index ^= this->addr.sin_port;
index ^= this->addr.sin_port >> 8u;
index ^= this->pri;
return integerHash ( caServerMinIndexBitWidth,
caServerMaxIndexBitWidth, index );
}
inline osiSockAddr caServerID::address () const
{
osiSockAddr tmp;
tmp.ia = this->addr;
return tmp;
}
inline unsigned caServerID::priority () const
{
return this->pri;
}
#endif // ifdef caServerID

View File

@@ -1,811 +0,0 @@
/*************************************************************************\
* Copyright (c) 2002 The University of Chicago, as Operator of Argonne
* National Laboratory.
* Copyright (c) 2002 The Regents of the University of California, as
* Operator of Los Alamos National Laboratory.
* EPICS BASE is distributed subject to a Software License Agreement found
* in file LICENSE that is included with this distribution.
\*************************************************************************/
/*
*
*
* 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
*/
#ifdef _MSC_VER
# pragma warning(disable:4355)
#endif
#include <stdexcept>
#include <string> // vxWorks 6.0 requires this include
#include <stdio.h>
#include "epicsExit.h"
#include "errlog.h"
#include "locationException.h"
#define epicsExportSharedSymbols
#include "iocinf.h"
#include "oldAccess.h"
#include "cac.h"
epicsShareDef epicsThreadPrivateId caClientCallbackThreadId;
static epicsThreadOnceId cacOnce = EPICS_THREAD_ONCE_INIT;
const unsigned ca_client_context :: flushBlockThreshold = 0x58000;
extern "C" void cacExitHandler ( void *)
{
epicsThreadPrivateDelete ( caClientCallbackThreadId );
caClientCallbackThreadId = 0;
delete ca_client_context::pDefaultServiceInstallMutex;
}
// runs once only for each process
extern "C" void cacOnceFunc ( void * )
{
caClientCallbackThreadId = epicsThreadPrivateCreate ();
assert ( caClientCallbackThreadId );
ca_client_context::pDefaultServiceInstallMutex = newEpicsMutex;
epicsAtExit ( cacExitHandler,0 );
}
extern epicsThreadPrivateId caClientContextId;
cacService * ca_client_context::pDefaultService = 0;
epicsMutex * ca_client_context::pDefaultServiceInstallMutex;
ca_client_context::ca_client_context ( bool enablePreemptiveCallback ) :
createdByThread ( epicsThreadGetIdSelf () ),
ca_exception_func ( 0 ), ca_exception_arg ( 0 ),
pVPrintfFunc ( errlogVprintf ), fdRegFunc ( 0 ), fdRegArg ( 0 ),
pndRecvCnt ( 0u ), ioSeqNo ( 0u ), callbackThreadsPending ( 0u ),
localPort ( 0 ), fdRegFuncNeedsToBeCalled ( false ),
noWakeupSincePend ( true )
{
static const unsigned short PORT_ANY = 0u;
if ( ! osiSockAttach () ) {
throwWithLocation ( noSocket () );
}
epicsThreadOnce ( & cacOnce, cacOnceFunc, 0 );
{
epicsGuard < epicsMutex > guard ( *ca_client_context::pDefaultServiceInstallMutex );
if ( ca_client_context::pDefaultService ) {
this->pServiceContext.reset (
& ca_client_context::pDefaultService->contextCreate (
this->mutex, this->cbMutex, *this ) );
}
else {
this->pServiceContext.reset ( new cac ( this->mutex, this->cbMutex, *this ) );
}
}
this->sock = epicsSocketCreate ( AF_INET, SOCK_DGRAM, IPPROTO_UDP );
if ( this->sock == INVALID_SOCKET ) {
char sockErrBuf[64];
epicsSocketConvertErrnoToString ( sockErrBuf, sizeof ( sockErrBuf ) );
this->printFormated (
"ca_client_context: unable to create "
"datagram socket because = \"%s\"\n",
sockErrBuf );
throwWithLocation ( noSocket () );
}
{
osiSockIoctl_t yes = true;
int status = socket_ioctl ( this->sock,
FIONBIO, & yes);
if ( status < 0 ) {
char sockErrBuf[64];
epicsSocketConvertErrnoToString ( sockErrBuf, sizeof ( sockErrBuf ) );
epicsSocketDestroy ( this->sock );
this->printFormated (
"%s: non blocking IO set fail because \"%s\"\n",
__FILE__, sockErrBuf );
throwWithLocation ( noSocket () );
}
}
// force a bind to an unconstrained address so we can obtain
// the local port number below
{
osiSockAddr addr;
memset ( (char *)&addr, 0 , sizeof ( addr ) );
addr.ia.sin_family = AF_INET;
addr.ia.sin_addr.s_addr = htonl ( INADDR_ANY );
addr.ia.sin_port = htons ( PORT_ANY );
int status = bind (this->sock, &addr.sa, sizeof (addr) );
if ( status < 0 ) {
char sockErrBuf[64];
epicsSocketConvertErrnoToString ( sockErrBuf, sizeof ( sockErrBuf ) );
epicsSocketDestroy (this->sock);
this->printFormated (
"CAC: unable to bind to an unconstrained "
"address because = \"%s\"\n",
sockErrBuf );
throwWithLocation ( noSocket () );
}
}
{
osiSockAddr tmpAddr;
osiSocklen_t saddr_length = sizeof ( tmpAddr );
int status = getsockname ( this->sock, & tmpAddr.sa, & saddr_length );
if ( status < 0 ) {
char sockErrBuf[64];
epicsSocketConvertErrnoToString ( sockErrBuf, sizeof ( sockErrBuf ) );
epicsSocketDestroy ( this->sock );
this->printFormated ( "CAC: getsockname () error was \"%s\"\n", sockErrBuf );
throwWithLocation ( noSocket () );
}
if ( tmpAddr.sa.sa_family != AF_INET) {
epicsSocketDestroy ( this->sock );
this->printFormated ( "CAC: UDP socket was not inet addr family\n" );
throwWithLocation ( noSocket () );
}
this->localPort = htons ( tmpAddr.ia.sin_port );
}
epics_auto_ptr < CallbackGuard > pCBGuard;
if ( ! enablePreemptiveCallback ) {
pCBGuard.reset ( new CallbackGuard ( this->cbMutex ) );
}
// multiple steps ensure exception safety
this->pCallbackGuard = pCBGuard;
}
ca_client_context::~ca_client_context ()
{
if ( this->fdRegFunc ) {
( *this->fdRegFunc )
( this->fdRegArg, this->sock, false );
}
epicsSocketDestroy ( this->sock );
osiSockRelease ();
// force a logical shutdown order
// so that the cac class does not hang its
// receive threads during their shutdown sequence
// and so that classes using this classes mutex
// are destroyed before the mutex is destroyed
if ( this->pCallbackGuard.get() ) {
epicsGuardRelease < epicsMutex > unguard ( *this->pCallbackGuard );
this->pServiceContext.reset ( 0 );
}
else {
this->pServiceContext.reset ( 0 );
}
}
void ca_client_context::destroyGetCopy (
epicsGuard < epicsMutex > & guard, getCopy & gc )
{
guard.assertIdenticalMutex ( this->mutex );
gc.~getCopy ();
this->getCopyFreeList.release ( & gc );
}
void ca_client_context::destroyGetCallback (
epicsGuard < epicsMutex > & guard, getCallback & gcb )
{
guard.assertIdenticalMutex ( this->mutex );
gcb.~getCallback ();
this->getCallbackFreeList.release ( & gcb );
}
void ca_client_context::destroyPutCallback (
epicsGuard < epicsMutex > & guard, putCallback & pcb )
{
guard.assertIdenticalMutex ( this->mutex );
pcb.~putCallback ();
this->putCallbackFreeList.release ( & pcb );
}
void ca_client_context::destroySubscription (
epicsGuard < epicsMutex > & guard, oldSubscription & os )
{
guard.assertIdenticalMutex ( this->mutex );
os.~oldSubscription ();
this->subscriptionFreeList.release ( & os );
}
void ca_client_context::changeExceptionEvent (
caExceptionHandler * pfunc, void * arg )
{
epicsGuard < epicsMutex > guard ( this->mutex );
this->ca_exception_func = pfunc;
this->ca_exception_arg = arg;
// should block here until releated callback in progress completes
}
void ca_client_context::replaceErrLogHandler (
caPrintfFunc * ca_printf_func )
{
epicsGuard < epicsMutex > guard ( this->mutex );
if ( ca_printf_func ) {
this->pVPrintfFunc = ca_printf_func;
}
else {
this->pVPrintfFunc = epicsVprintf;
}
// should block here until releated callback in progress completes
}
void ca_client_context::registerForFileDescriptorCallBack (
CAFDHANDLER *pFunc, void *pArg )
{
epicsGuard < epicsMutex > guard ( this->mutex );
this->fdRegFunc = pFunc;
this->fdRegArg = pArg;
this->fdRegFuncNeedsToBeCalled = true;
if ( pFunc ) {
// the receive thread might already be blocking
// w/o having sent the wakeup message
this->_sendWakeupMsg ();
}
// should block here until releated callback in progress completes
}
int ca_client_context :: printFormated (
const char *pformat, ... ) const
{
va_list theArgs;
int status;
va_start ( theArgs, pformat );
status = this->ca_client_context :: varArgsPrintFormated ( pformat, theArgs );
va_end ( theArgs );
return status;
}
int ca_client_context :: varArgsPrintFormated (
const char *pformat, va_list args ) const
{
caPrintfFunc * pFunc;
{
epicsGuard < epicsMutex > guard ( this->mutex );
pFunc = this->pVPrintfFunc;
}
if ( pFunc ) {
return ( *pFunc ) ( pformat, args );
}
else {
return :: vfprintf ( stderr, pformat, args );
}
}
void ca_client_context::exception (
epicsGuard < epicsMutex > & guard, int stat, const char * pCtx,
const char * pFile, unsigned lineNo )
{
struct exception_handler_args args;
caExceptionHandler * pFunc = this->ca_exception_func;
void * pArg = this->ca_exception_arg;
{
epicsGuardRelease < epicsMutex > unguard ( guard );
// NOOP if they disable exceptions
if ( pFunc ) {
args.chid = NULL;
args.type = TYPENOTCONN;
args.count = 0;
args.addr = NULL;
args.stat = stat;
args.op = CA_OP_OTHER;
args.ctx = pCtx;
args.pFile = pFile;
args.lineNo = lineNo;
args.usr = pArg;
( *pFunc ) ( args );
}
else {
this->signal ( stat, pFile, lineNo, pCtx );
}
}
}
void ca_client_context::exception (
epicsGuard < epicsMutex > & guard, int status, const char * pContext,
const char * pFileName, unsigned lineNo, oldChannelNotify & chan,
unsigned type, arrayElementCount count, unsigned op )
{
struct exception_handler_args args;
caExceptionHandler * pFunc = this->ca_exception_func;
void * pArg = this->ca_exception_arg;
{
epicsGuardRelease < epicsMutex > unguard ( guard );
// NOOP if they disable exceptions
if ( pFunc ) {
args.chid = &chan;
args.type = type;
args.count = count;
args.addr = NULL;
args.stat = status;
args.op = op;
args.ctx = pContext;
args.pFile = pFileName;
args.lineNo = lineNo;
args.usr = pArg;
( *pFunc ) ( args );
}
else {
this->signal ( status, pFileName, lineNo,
"op=%u, channel=%s, type=%s, count=%lu, ctx=\"%s\"",
op, ca_name ( &chan ),
dbr_type_to_text ( static_cast <int> ( type ) ),
count, pContext );
}
}
}
void ca_client_context::signal ( int ca_status, const char * pfilenm,
int lineno, const char * pFormat, ... )
{
va_list theArgs;
va_start ( theArgs, pFormat );
this->vSignal ( ca_status, pfilenm, lineno, pFormat, theArgs);
va_end ( theArgs );
}
void ca_client_context :: vSignal (
int ca_status, const char *pfilenm,
int lineno, const char *pFormat, va_list args )
{
static const char *severity[] =
{
"Warning",
"Success",
"Error",
"Info",
"Fatal",
"Fatal",
"Fatal",
"Fatal"
};
this->printFormated ( "CA.Client.Exception...............................................\n" );
this->printFormated ( " %s: \"%s\"\n",
severity[ CA_EXTRACT_SEVERITY ( ca_status ) ],
ca_message ( ca_status ) );
if ( pFormat ) {
this->printFormated ( " Context: \"" );
this->varArgsPrintFormated ( pFormat, args );
this->printFormated ( "\"\n" );
}
if ( pfilenm ) {
this->printFormated ( " Source File: %s line %d\n",
pfilenm, lineno );
}
epicsTime current = epicsTime::getCurrent ();
char date[64];
current.strftime ( date, sizeof ( date ), "%a %b %d %Y %H:%M:%S.%f");
this->printFormated ( " Current Time: %s\n", date );
/*
* Terminate execution if unsuccessful
*/
if( ! ( ca_status & CA_M_SUCCESS ) &&
CA_EXTRACT_SEVERITY ( ca_status ) != CA_K_WARNING ){
errlogFlush ();
abort ();
}
this->printFormated ( "..................................................................\n" );
}
void ca_client_context::show ( unsigned level ) const
{
epicsGuard < epicsMutex > guard ( this->mutex );
::printf ( "ca_client_context at %p pndRecvCnt=%u ioSeqNo=%u\n",
static_cast <const void *> ( this ),
this->pndRecvCnt, this->ioSeqNo );
if ( level > 0u ) {
this->pServiceContext->show ( guard, level - 1u );
::printf ( "\tpreemptive callback is %s\n",
this->pCallbackGuard.get() ? "disabled" : "enabled" );
::printf ( "\tthere are %u unsatisfied IO operations blocking ca_pend_io()\n",
this->pndRecvCnt );
::printf ( "\tthe current io sequence number is %u\n",
this->ioSeqNo );
::printf ( "IO done event:\n");
this->ioDone.show ( level - 1u );
::printf ( "Synchronous group identifier hash table:\n" );
this->sgTable.show ( level - 1u );
}
}
void ca_client_context::attachToClientCtx ()
{
assert ( ! epicsThreadPrivateGet ( caClientContextId ) );
epicsThreadPrivateSet ( caClientContextId, this );
}
void ca_client_context::incrementOutstandingIO (
epicsGuard < epicsMutex > & guard, unsigned ioSeqNoIn )
{
guard.assertIdenticalMutex ( this->mutex );
if ( this->ioSeqNo == ioSeqNoIn ) {
assert ( this->pndRecvCnt < UINT_MAX );
this->pndRecvCnt++;
}
}
void ca_client_context::decrementOutstandingIO (
epicsGuard < epicsMutex > & guard, unsigned ioSeqNoIn )
{
guard.assertIdenticalMutex ( this->mutex );
if ( this->ioSeqNo == ioSeqNoIn ) {
assert ( this->pndRecvCnt > 0u );
this->pndRecvCnt--;
if ( this->pndRecvCnt == 0u ) {
this->ioDone.signal ();
}
}
}
// !!!! This routine is only visible in the old interface - or in a new ST interface.
// !!!! In the old interface we restrict thread attach so that calls from threads
// !!!! other than the initializing thread are not allowed if preemptive callback
// !!!! is disabled. This prevents the preemptive callback lock from being released
// !!!! by other threads than the one that locked it.
//
int ca_client_context::pendIO ( const double & timeout )
{
// prevent recursion nightmares by disabling calls to
// pendIO () from within a CA callback.
if ( epicsThreadPrivateGet ( caClientCallbackThreadId ) ) {
return ECA_EVDISALLOW;
}
int status = ECA_NORMAL;
epicsTime beg_time = epicsTime::getCurrent ();
double remaining = timeout;
epicsGuard < epicsMutex > guard ( this->mutex );
this->flush ( guard );
while ( this->pndRecvCnt > 0 ) {
if ( remaining < CAC_SIGNIFICANT_DELAY ) {
status = ECA_TIMEOUT;
break;
}
{
epicsGuardRelease < epicsMutex > unguard ( guard );
this->blockForEventAndEnableCallbacks ( this->ioDone, remaining );
}
double delay = epicsTime::getCurrent () - beg_time;
if ( delay < timeout ) {
remaining = timeout - delay;
}
else {
remaining = 0.0;
}
}
this->ioSeqNo++;
this->pndRecvCnt = 0u;
return status;
}
// !!!! This routine is only visible in the old interface - or in a new ST interface.
// !!!! In the old interface we restrict thread attach so that calls from threads
// !!!! other than the initializing thread are not allowed if preemptive callback
// !!!! is disabled. This prevents the preemptive callback lock from being released
// !!!! by other threads than the one that locked it.
//
int ca_client_context::pendEvent ( const double & timeout )
{
// prevent recursion nightmares by disabling calls to
// pendIO () from within a CA callback.
if ( epicsThreadPrivateGet ( caClientCallbackThreadId ) ) {
return ECA_EVDISALLOW;
}
epicsTime current = epicsTime::getCurrent ();
{
epicsGuard < epicsMutex > guard ( this->mutex );
this->flush ( guard );
}
// process at least once if preemptive callback is disabled
if ( this->pCallbackGuard.get() ) {
epicsGuardRelease < epicsMutex > cbUnguard ( *this->pCallbackGuard );
epicsGuard < epicsMutex > guard ( this->mutex );
//
// This is needed because in non-preemptive callback mode
// legacy applications that use file descriptor managers
// will register for ca receive thread activity and keep
// calling ca_pend_event until all of the socket data has
// been read. We must guarantee that other threads get a
// chance to run if there is data in any of the sockets.
//
if ( this->fdRegFunc ) {
epicsGuardRelease < epicsMutex > unguard ( guard );
// remove short udp message sent to wake
// up a file descriptor manager
osiSockAddr tmpAddr;
osiSocklen_t addrSize = sizeof ( tmpAddr.sa );
char buf = 0;
int status = 0;
do {
status = recvfrom ( this->sock, & buf, sizeof ( buf ),
0, & tmpAddr.sa, & addrSize );
} while ( status > 0 );
}
while ( this->callbackThreadsPending > 0 ) {
epicsGuardRelease < epicsMutex > unguard ( guard );
this->callbackThreadActivityComplete.wait ( 30.0 );
}
this->noWakeupSincePend = true;
}
double elapsed = epicsTime::getCurrent() - current;
double delay;
if ( timeout > elapsed ) {
delay = timeout - elapsed;
}
else {
delay = 0.0;
}
if ( delay >= CAC_SIGNIFICANT_DELAY ) {
if ( this->pCallbackGuard.get() ) {
epicsGuardRelease < epicsMutex > unguard ( *this->pCallbackGuard );
epicsThreadSleep ( delay );
}
else {
epicsThreadSleep ( delay );
}
}
return ECA_TIMEOUT;
}
void ca_client_context::blockForEventAndEnableCallbacks (
epicsEvent & event, const double & timeout )
{
if ( this->pCallbackGuard.get() ) {
epicsGuardRelease < epicsMutex > unguard ( *this->pCallbackGuard );
event.wait ( timeout );
}
else {
event.wait ( timeout );
}
}
void ca_client_context::callbackProcessingInitiateNotify ()
{
// if preemptive callback is enabled then this is a noop
if ( this->pCallbackGuard.get() ) {
bool sendNeeded = false;
{
epicsGuard < epicsMutex > guard ( this->mutex );
this->callbackThreadsPending++;
if ( this->fdRegFunc && this->noWakeupSincePend ) {
this->noWakeupSincePend = false;
sendNeeded = true;
}
}
if ( sendNeeded ) {
_sendWakeupMsg ();
}
}
}
void ca_client_context :: _sendWakeupMsg ()
{
// send short udp message to wake up a file descriptor manager
// when a message arrives
osiSockAddr tmpAddr;
tmpAddr.ia.sin_family = AF_INET;
tmpAddr.ia.sin_addr.s_addr = htonl ( INADDR_LOOPBACK );
tmpAddr.ia.sin_port = htons ( this->localPort );
char buf = 0;
sendto ( this->sock, & buf, sizeof ( buf ),
0, & tmpAddr.sa, sizeof ( tmpAddr.sa ) );
}
void ca_client_context::callbackProcessingCompleteNotify ()
{
// if preemptive callback is enabled then this is a noop
if ( this->pCallbackGuard.get() ) {
bool signalNeeded = false;
{
epicsGuard < epicsMutex > guard ( this->mutex );
if ( this->callbackThreadsPending <= 1 ) {
if ( this->callbackThreadsPending == 1 ) {
this->callbackThreadsPending = 0;
signalNeeded = true;
}
}
else {
this->callbackThreadsPending--;
}
}
if ( signalNeeded ) {
this->callbackThreadActivityComplete.signal ();
}
}
}
cacChannel & ca_client_context::createChannel (
epicsGuard < epicsMutex > & guard, const char * pChannelName,
cacChannelNotify & chan, cacChannel::priLev pri )
{
guard.assertIdenticalMutex ( this->mutex );
return this->pServiceContext->createChannel (
guard, pChannelName, chan, pri );
}
void ca_client_context::flush ( epicsGuard < epicsMutex > & guard )
{
this->pServiceContext->flush ( guard );
}
unsigned ca_client_context::circuitCount () const
{
epicsGuard < epicsMutex > guard ( this->mutex );
return this->pServiceContext->circuitCount ( guard );
}
unsigned ca_client_context::beaconAnomaliesSinceProgramStart () const
{
epicsGuard < epicsMutex > guard ( this->mutex );
return this->pServiceContext->beaconAnomaliesSinceProgramStart ( guard );
}
void ca_client_context::installCASG (
epicsGuard < epicsMutex > & guard, CASG & sg )
{
guard.assertIdenticalMutex ( this->mutex );
this->sgTable.idAssignAdd ( sg );
}
void ca_client_context::uninstallCASG (
epicsGuard < epicsMutex > & guard, CASG & sg )
{
guard.assertIdenticalMutex ( this->mutex );
this->sgTable.remove ( sg );
}
CASG * ca_client_context::lookupCASG (
epicsGuard < epicsMutex > & guard, unsigned idIn )
{
guard.assertIdenticalMutex ( this->mutex );
CASG * psg = this->sgTable.lookup ( idIn );
if ( psg ) {
if ( ! psg->verify ( guard ) ) {
psg = 0;
}
}
return psg;
}
void ca_client_context::selfTest () const
{
epicsGuard < epicsMutex > guard ( this->mutex );
this->sgTable.verify ();
this->pServiceContext->selfTest ( guard );
}
epicsMutex & ca_client_context::mutexRef () const
{
return this->mutex;
}
cacContext & ca_client_context::createNetworkContext (
epicsMutex & mutexIn, epicsMutex & cbMutexIn )
{
return * new cac ( mutexIn, cbMutexIn, *this );
}
void ca_client_context::installDefaultService ( cacService & service )
{
epicsThreadOnce ( & cacOnce, cacOnceFunc, 0 );
epicsGuard < epicsMutex > guard ( *ca_client_context::pDefaultServiceInstallMutex );
if ( ca_client_context::pDefaultService ) {
throw std::logic_error
( "CA in-memory service already installed and can't be replaced");
}
ca_client_context::pDefaultService = & service;
}
void epicsShareAPI caInstallDefaultService ( cacService & service )
{
ca_client_context::installDefaultService ( service );
}
epicsShareFunc int epicsShareAPI ca_clear_subscription ( evid pMon )
{
oldChannelNotify & chan = pMon->channel ();
ca_client_context & cac = chan.getClientCtx ();
// !!!! the order in which we take the mutex here prevents deadlocks
{
epicsGuard < epicsMutex > guard ( cac.mutex );
try {
// if this stalls out on a live circuit then an exception
// can be forthcoming which we must ignore as the clear
// request must always be successful
chan.eliminateExcessiveSendBacklog ( guard );
}
catch ( cacChannel::notConnected & ) {
// intentionally ignored
}
}
if ( cac.pCallbackGuard.get() &&
cac.createdByThread == epicsThreadGetIdSelf () ) {
epicsGuard < epicsMutex > guard ( cac.mutex );
pMon->cancel ( *cac.pCallbackGuard.get(), guard );
}
else {
//
// we will definately stall out here if all of the
// following are true
//
// o user creates non-preemtive mode client library context
// o user doesnt periodically call a ca function
// o user calls this function from an auxiillary thread
//
CallbackGuard cbGuard ( cac.cbMutex );
epicsGuard < epicsMutex > guard ( cac.mutex );
pMon->cancel ( cbGuard, guard );
}
return ECA_NORMAL;
}
void ca_client_context :: eliminateExcessiveSendBacklog (
epicsGuard < epicsMutex > & guard, cacChannel & chan )
{
if ( chan.requestMessageBytesPending ( guard ) >
ca_client_context :: flushBlockThreshold ) {
if ( this->pCallbackGuard.get() &&
this->createdByThread == epicsThreadGetIdSelf () ) {
// we need to be very careful about lock hierarchy
// inversion in this situation
epicsGuardRelease < epicsMutex > unguard ( guard );
{
epicsGuardRelease < epicsMutex > cbunguard (
* this->pCallbackGuard.get() );
{
epicsGuard < epicsMutex > nestedGuard ( this->mutex );
chan.flush ( nestedGuard );
}
}
}
else {
chan.flush ( guard );
}
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,467 +0,0 @@
/*************************************************************************\
* Copyright (c) 2002 The University of Chicago, as Operator of Argonne
* National Laboratory.
* Copyright (c) 2002 The Regents of the University of California, as
* Operator of Los Alamos National Laboratory.
* EPICS BASE is distributed subject to a Software License Agreement found
* in file LICENSE that is included with this distribution.
\*************************************************************************/
/*
* 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: Jeff Hill
*
*/
#ifndef cach
#define cach
#ifdef epicsExportSharedSymbols
# define cach_restore_epicsExportSharedSymbols
# undef epicsExportSharedSymbols
#endif
#include "compilerDependencies.h"
#include "ipAddrToAsciiAsynchronous.h"
#include "msgForMultiplyDefinedPV.h"
#include "epicsTimer.h"
#include "epicsEvent.h"
#include "freeList.h"
#include "localHostName.h"
#ifdef cach_restore_epicsExportSharedSymbols
# define epicsExportSharedSymbols
# include "shareLib.h"
#endif
#include "nciu.h"
#include "comBuf.h"
#include "bhe.h"
#include "cacIO.h"
#include "netIO.h"
#include "localHostName.h"
#include "virtualCircuit.h"
class netWriteNotifyIO;
class netReadNotifyIO;
class netSubscription;
// used to control access to cac's recycle routines which
// should only be indirectly invoked by CAC when its lock
// is applied
class cacRecycle {
public:
virtual void recycleReadNotifyIO (
epicsGuard < epicsMutex > &, netReadNotifyIO &io ) = 0;
virtual void recycleWriteNotifyIO (
epicsGuard < epicsMutex > &, netWriteNotifyIO &io ) = 0;
virtual void recycleSubscription (
epicsGuard < epicsMutex > &, netSubscription &io ) = 0;
protected:
virtual ~cacRecycle() {}
};
struct CASG;
class inetAddrID;
class caServerID;
struct caHdrLargeArray;
class cacComBufMemoryManager : public comBufMemoryManager
{
public:
cacComBufMemoryManager () {}
void * allocate ( size_t );
void release ( void * );
private:
tsFreeList < comBuf, 0x20 > freeList;
cacComBufMemoryManager ( const cacComBufMemoryManager & );
cacComBufMemoryManager & operator = ( const cacComBufMemoryManager & );
};
class notifyGuard {
public:
notifyGuard ( cacContextNotify & );
~notifyGuard ();
private:
cacContextNotify & notify;
notifyGuard ( const notifyGuard & );
notifyGuard & operator = ( const notifyGuard & );
};
class callbackManager : public notifyGuard {
public:
callbackManager (
cacContextNotify &,
epicsMutex & callbackControl );
epicsGuard < epicsMutex > cbGuard;
};
class cac :
public cacContext,
private cacRecycle,
private callbackForMultiplyDefinedPV
{
public:
cac (
epicsMutex & mutualExclusion,
epicsMutex & callbackControl,
cacContextNotify & );
virtual ~cac ();
// beacon management
void beaconNotify ( const inetAddrID & addr, const epicsTime & currentTime,
ca_uint32_t beaconNumber, unsigned protocolRevision );
unsigned beaconAnomaliesSinceProgramStart (
epicsGuard < epicsMutex > & ) const;
// IO management
void flush ( epicsGuard < epicsMutex > & guard );
bool executeResponse ( callbackManager &, tcpiiu &,
const epicsTime & currentTime, caHdrLargeArray &, char *pMsgBody );
// channel routines
void transferChanToVirtCircuit (
unsigned cid, unsigned sid,
ca_uint16_t typeCode, arrayElementCount count,
unsigned minorVersionNumber, const osiSockAddr &,
const epicsTime & currentTime );
cacChannel & createChannel (
epicsGuard < epicsMutex > & guard, const char * pChannelName,
cacChannelNotify &, cacChannel::priLev );
void destroyChannel (
epicsGuard < epicsMutex > &, nciu & );
void initiateConnect (
epicsGuard < epicsMutex > &, nciu &, netiiu * & );
nciu * lookupChannel (
epicsGuard < epicsMutex > &, const cacChannel::ioid & );
// IO requests
netWriteNotifyIO & writeNotifyRequest (
epicsGuard < epicsMutex > &, nciu &, privateInterfaceForIO &,
unsigned type, arrayElementCount nElem, const void * pValue,
cacWriteNotify & );
netReadNotifyIO & readNotifyRequest (
epicsGuard < epicsMutex > &, nciu &, privateInterfaceForIO &,
unsigned type, arrayElementCount nElem,
cacReadNotify & );
netSubscription & subscriptionRequest (
epicsGuard < epicsMutex > &, nciu &, privateInterfaceForIO &,
unsigned type, arrayElementCount nElem, unsigned mask,
cacStateNotify &, bool channelIsInstalled );
bool destroyIO (
CallbackGuard & callbackGuard,
epicsGuard < epicsMutex > & mutualExclusionGuard,
const cacChannel::ioid & idIn,
nciu & chan );
void disconnectAllIO (
epicsGuard < epicsMutex > & cbGuard,
epicsGuard < epicsMutex > & guard,
nciu &, tsDLList < baseNMIU > & ioList );
void ioShow (
epicsGuard < epicsMutex > & guard,
const cacChannel::ioid &id, unsigned level ) const;
// exception generation
void exception (
epicsGuard < epicsMutex > & cbGuard,
epicsGuard < epicsMutex > & guard,
int status, const char * pContext,
const char * pFileName, unsigned lineNo );
// search destination management
void registerSearchDest (
epicsGuard < epicsMutex > &, SearchDest & req );
bool findOrCreateVirtCircuit (
epicsGuard < epicsMutex > &, const osiSockAddr &,
unsigned, tcpiiu *&, unsigned, SearchDestTCP * pSearchDest = NULL );
// diagnostics
unsigned circuitCount ( epicsGuard < epicsMutex > & ) const;
void show ( epicsGuard < epicsMutex > &, unsigned level ) const;
int printFormated (
epicsGuard < epicsMutex > & callbackControl,
const char *pformat, ... ) const;
int varArgsPrintFormated (
epicsGuard < epicsMutex > & callbackControl,
const char *pformat, va_list args ) const;
double connectionTimeout ( epicsGuard < epicsMutex > & );
// buffer management
char * allocateSmallBufferTCP ();
void releaseSmallBufferTCP ( char * );
unsigned largeBufferSizeTCP () const;
char * allocateLargeBufferTCP ();
void releaseLargeBufferTCP ( char * );
unsigned maxContiguousFrames ( epicsGuard < epicsMutex > & ) const;
// misc
const char * userNamePointer () const;
unsigned getInitializingThreadsPriority () const;
epicsMutex & mutexRef ();
void attachToClientCtx ();
void selfTest (
epicsGuard < epicsMutex > & ) const;
double beaconPeriod (
epicsGuard < epicsMutex > &,
const nciu & chan ) const;
static unsigned lowestPriorityLevelAbove ( unsigned priority );
static unsigned highestPriorityLevelBelow ( unsigned priority );
void destroyIIU ( tcpiiu & iiu );
const char * pLocalHostName ();
private:
epicsSingleton < localHostName > :: reference _refLocalHostName;
chronIntIdResTable < nciu > chanTable;
//
// !!!! There is at this point no good reason
// !!!! to maintain one IO table for all types of
// !!!! IO. It would probably be better to maintain
// !!!! an independent table for each IO type. The
// !!!! new adaptive sized hash table will not
// !!!! waste memory. Making this change will
// !!!! avoid virtual function overhead when
// !!!! accessing the different types of IO. This
// !!!! approach would also probably be safer in
// !!!! terms of detecting damaged protocol.
//
chronIntIdResTable < baseNMIU > ioTable;
resTable < bhe, inetAddrID > beaconTable;
resTable < tcpiiu, caServerID > serverTable;
tsDLList < tcpiiu > circuitList;
tsDLList < SearchDest > searchDestList;
tsDLList < msgForMultiplyDefinedPV > msgMultiPVList;
tsFreeList
< class tcpiiu, 32, epicsMutexNOOP >
freeListVirtualCircuit;
tsFreeList
< class netReadNotifyIO, 1024, epicsMutexNOOP >
freeListReadNotifyIO;
tsFreeList
< class netWriteNotifyIO, 1024, epicsMutexNOOP >
freeListWriteNotifyIO;
tsFreeList
< class netSubscription, 1024, epicsMutexNOOP >
freeListSubscription;
tsFreeList
< class nciu, 1024, epicsMutexNOOP >
channelFreeList;
tsFreeList
< class msgForMultiplyDefinedPV, 16 >
mdpvFreeList;
cacComBufMemoryManager comBufMemMgr;
bheFreeStore bheFreeList;
epicsTime programBeginTime;
double connTMO;
// **** lock hierarchy ****
// 1) callback lock must always be acquired before
// the primary mutex if both locks are needed
epicsMutex & mutex;
epicsMutex & cbMutex;
epicsEvent iiuUninstall;
ipAddrToAsciiEngine & ipToAEngine;
epicsTimerQueueActive & timerQueue;
char * pUserName;
class udpiiu * pudpiiu;
void * tcpSmallRecvBufFreeList;
void * tcpLargeRecvBufFreeList;
cacContextNotify & notify;
epicsThreadId initializingThreadsId;
unsigned initializingThreadsPriority;
unsigned maxRecvBytesTCP;
unsigned maxContigFrames;
unsigned beaconAnomalyCount;
unsigned short _serverPort;
unsigned iiuExistenceCount;
bool cacShutdownInProgress;
void recycleReadNotifyIO (
epicsGuard < epicsMutex > &, netReadNotifyIO &io );
void recycleWriteNotifyIO (
epicsGuard < epicsMutex > &, netWriteNotifyIO &io );
void recycleSubscription (
epicsGuard < epicsMutex > &, netSubscription &io );
void disconnectChannel (
epicsGuard < epicsMutex > & cbGuard,
epicsGuard < epicsMutex > & guard, nciu & chan );
void ioExceptionNotify ( unsigned id, int status,
const char * pContext, unsigned type, arrayElementCount count );
void ioExceptionNotifyAndUninstall ( unsigned id, int status,
const char * pContext, unsigned type, arrayElementCount count );
void pvMultiplyDefinedNotify ( msgForMultiplyDefinedPV & mfmdpv,
const char * pChannelName, const char * pAcc, const char * pRej );
// recv protocol stubs
bool versionAction ( callbackManager &, tcpiiu &,
const epicsTime & currentTime, const caHdrLargeArray &, void *pMsgBdy );
bool echoRespAction ( callbackManager &, tcpiiu &,
const epicsTime & currentTime, const caHdrLargeArray &, void *pMsgBdy );
bool writeNotifyRespAction ( callbackManager &, tcpiiu &,
const epicsTime & currentTime, const caHdrLargeArray &, void *pMsgBdy );
bool searchRespAction ( callbackManager &, tcpiiu &,
const epicsTime & currentTime, const caHdrLargeArray &, void *pMsgBdy );
bool readNotifyRespAction ( callbackManager &, tcpiiu &,
const epicsTime & currentTime, const caHdrLargeArray &, void *pMsgBdy );
bool eventRespAction ( callbackManager &, tcpiiu &,
const epicsTime & currentTime, const caHdrLargeArray &, void *pMsgBdy );
bool readRespAction ( callbackManager &, tcpiiu &,
const epicsTime & currentTime, const caHdrLargeArray &, void *pMsgBdy );
bool clearChannelRespAction ( callbackManager &, tcpiiu &,
const epicsTime & currentTime, const caHdrLargeArray &, void *pMsgBdy );
bool exceptionRespAction ( callbackManager &, tcpiiu &,
const epicsTime & currentTime, const caHdrLargeArray &, void *pMsgBdy );
bool accessRightsRespAction ( callbackManager &, tcpiiu &,
const epicsTime & currentTime, const caHdrLargeArray &, void *pMsgBdy );
bool createChannelRespAction ( callbackManager &, tcpiiu &,
const epicsTime & currentTime, const caHdrLargeArray &, void *pMsgBdy );
bool verifyAndDisconnectChan ( callbackManager &, tcpiiu &,
const epicsTime & currentTime, const caHdrLargeArray &, void *pMsgBdy );
bool badTCPRespAction ( callbackManager &, tcpiiu &,
const epicsTime & currentTime, const caHdrLargeArray &, void *pMsgBdy );
typedef bool ( cac::*pProtoStubTCP ) (
callbackManager &, tcpiiu &,
const epicsTime & currentTime, const caHdrLargeArray &, void *pMsgBdy );
static const pProtoStubTCP tcpJumpTableCAC [];
bool defaultExcep ( callbackManager &, tcpiiu &iiu, const caHdrLargeArray &hdr,
const char *pCtx, unsigned status );
bool eventAddExcep ( callbackManager &, tcpiiu &iiu, const caHdrLargeArray &hdr,
const char *pCtx, unsigned status );
bool readExcep ( callbackManager &, tcpiiu &iiu, const caHdrLargeArray &hdr,
const char *pCtx, unsigned status );
bool writeExcep ( callbackManager &, tcpiiu &iiu, const caHdrLargeArray &hdr,
const char *pCtx, unsigned status );
bool clearChanExcep ( callbackManager &, tcpiiu &iiu, const caHdrLargeArray &hdr,
const char *pCtx, unsigned status );
bool readNotifyExcep ( callbackManager &, tcpiiu &iiu, const caHdrLargeArray &hdr,
const char *pCtx, unsigned status );
bool writeNotifyExcep ( callbackManager &, tcpiiu &iiu, const caHdrLargeArray &hdr,
const char *pCtx, unsigned status );
typedef bool ( cac::*pExcepProtoStubTCP ) (
callbackManager &, tcpiiu &iiu, const caHdrLargeArray &hdr,
const char *pCtx, unsigned status );
static const pExcepProtoStubTCP tcpExcepJumpTableCAC [];
cac ( const cac & );
cac & operator = ( const cac & );
};
inline const char * cac::userNamePointer () const
{
return this->pUserName;
}
inline unsigned cac::getInitializingThreadsPriority () const
{
return this->initializingThreadsPriority;
}
inline epicsMutex & cac::mutexRef ()
{
return this->mutex;
}
inline int cac :: varArgsPrintFormated (
epicsGuard < epicsMutex > & callbackControl,
const char *pformat, va_list args ) const
{
callbackControl.assertIdenticalMutex ( this->cbMutex );
return this->notify.varArgsPrintFormated ( pformat, args );
}
inline void cac::attachToClientCtx ()
{
this->notify.attachToClientCtx ();
}
inline char * cac::allocateSmallBufferTCP ()
{
// this locks internally
return ( char * ) freeListMalloc ( this->tcpSmallRecvBufFreeList );
}
inline void cac::releaseSmallBufferTCP ( char *pBuf )
{
// this locks internally
freeListFree ( this->tcpSmallRecvBufFreeList, pBuf );
}
inline unsigned cac::largeBufferSizeTCP () const
{
return this->maxRecvBytesTCP;
}
inline char * cac::allocateLargeBufferTCP ()
{
// this locks internally
return ( char * ) freeListMalloc ( this->tcpLargeRecvBufFreeList );
}
inline void cac::releaseLargeBufferTCP ( char *pBuf )
{
// this locks internally
freeListFree ( this->tcpLargeRecvBufFreeList, pBuf );
}
inline unsigned cac::beaconAnomaliesSinceProgramStart (
epicsGuard < epicsMutex > & guard ) const
{
guard.assertIdenticalMutex ( this->mutex );
return this->beaconAnomalyCount;
}
inline notifyGuard::notifyGuard ( cacContextNotify & notifyIn ) :
notify ( notifyIn )
{
this->notify.callbackProcessingInitiateNotify ();
}
inline notifyGuard::~notifyGuard ()
{
this->notify.callbackProcessingCompleteNotify ();
}
inline callbackManager::callbackManager (
cacContextNotify & notify, epicsMutex & callbackControl ) :
notifyGuard ( notify ), cbGuard ( callbackControl )
{
}
inline nciu * cac::lookupChannel (
epicsGuard < epicsMutex > & guard,
const cacChannel::ioid & idIn )
{
guard.assertIdenticalMutex ( this->mutex );
return this->chanTable.lookup ( idIn );
}
inline const char * cac :: pLocalHostName ()
{
return _refLocalHostName->pointer ();
}
inline unsigned cac ::
maxContiguousFrames ( epicsGuard < epicsMutex > & ) const
{
return maxContigFrames;
}
inline double cac ::
connectionTimeout ( epicsGuard < epicsMutex > & guard )
{
guard.assertIdenticalMutex ( this->mutex );
return this->connTMO;
}
#endif // ifdef cach

View File

@@ -1,145 +0,0 @@
/*************************************************************************\
* Copyright (c) 2002 The University of Chicago, as Operator of Argonne
* National Laboratory.
* Copyright (c) 2002 The Regents of the University of California, as
* Operator of Los Alamos National Laboratory.
* EPICS BASE Versions 3.13.7
* and higher are 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: Jeff Hill
*/
#include <stdexcept>
#include <float.h>
#define epicsAssertAuthor "Jeff Hill johill@lanl.gov"
#include "errlog.h"
#define epicsExportSharedSymbols
#include "iocinf.h"
#include "localHostName.h"
#include "cacIO.h"
class CACChannelPrivate {
public:
CACChannelPrivate ();
unsigned getHostName ( char * pBuf, unsigned bufLength );
const char * pHostName ();
private:
epicsSingleton < localHostName > :: reference
_refLocalHostName;
};
static epicsThreadOnceId cacChannelIdOnce = EPICS_THREAD_ONCE_INIT;
const cacChannel::priLev cacChannel::priorityMax = 99u;
const cacChannel::priLev cacChannel::priorityMin = 0u;
const cacChannel::priLev cacChannel::priorityDefault = priorityMin;
const cacChannel::priLev cacChannel::priorityLinksDB = priorityMax;
const cacChannel::priLev cacChannel::priorityArchive = ( priorityMax - priorityMin ) / 2;
const cacChannel::priLev cacChannel::priorityOPI = priorityMin;
cacChannel::~cacChannel ()
{
}
caAccessRights cacChannel::accessRights (
epicsGuard < epicsMutex > & ) const
{
static caAccessRights ar ( true, true );
return ar;
}
unsigned cacChannel::searchAttempts (
epicsGuard < epicsMutex > & ) const
{
return 0u;
}
double cacChannel::beaconPeriod (
epicsGuard < epicsMutex > & ) const
{
return - DBL_MAX;
}
double cacChannel::receiveWatchdogDelay (
epicsGuard < epicsMutex > & ) const
{
return - DBL_MAX;
}
bool cacChannel::ca_v42_ok (
epicsGuard < epicsMutex > & ) const
{
return true;
}
bool cacChannel::connected (
epicsGuard < epicsMutex > & ) const
{
return true;
}
CACChannelPrivate ::
CACChannelPrivate() :
_refLocalHostName ( localHostNameCache.getReference () )
{
}
inline unsigned CACChannelPrivate ::
getHostName ( char * pBuf, unsigned bufLength )
{
return _refLocalHostName->getName ( pBuf, bufLength );
}
inline const char * CACChannelPrivate ::
pHostName ()
{
return _refLocalHostName->pointer ();
}
static CACChannelPrivate * pCACChannelPrivate = 0;
// runs once only for each process
extern "C" void cacChannelSetup ( void * )
{
pCACChannelPrivate = new CACChannelPrivate ();
}
// the default is to assume that it is a locally hosted channel
unsigned cacChannel::getHostName (
epicsGuard < epicsMutex > &,
char * pBuf, unsigned bufLength ) const throw ()
{
if ( bufLength ) {
epicsThreadOnce ( & cacChannelIdOnce, cacChannelSetup, 0);
return pCACChannelPrivate->getHostName ( pBuf, bufLength );
}
return 0u;
}
// the default is to assume that it is a locally hosted channel
const char * cacChannel::pHostName (
epicsGuard < epicsMutex > & ) const throw ()
{
epicsThreadOnce ( & cacChannelIdOnce, cacChannelSetup, 0);
return pCACChannelPrivate->pHostName ();
}
cacContext::~cacContext () {}
cacService::~cacService () {}

View File

@@ -1,34 +0,0 @@
/*************************************************************************\
* Copyright (c) 2002 The University of Chicago, as Operator of Argonne
* National Laboratory.
* Copyright (c) 2002 The Regents of the University of California, as
* Operator of Los Alamos National Laboratory.
* EPICS BASE Versions 3.13.7
* and higher are 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
*/
#include "iocinf.h"
#define epicsExportSharedSymbols
#include "cacIO.h"
#undef epicsExportSharedSymbols
cacChannelNotify::~cacChannelNotify ()
{
}

View File

@@ -1,43 +0,0 @@
/*************************************************************************\
* Copyright (c) 2002 The University of Chicago, as Operator of Argonne
* National Laboratory.
* Copyright (c) 2002 The Regents of the University of California, as
* Operator of Los Alamos National Laboratory.
* EPICS BASE Versions 3.13.7
* and higher are 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: Jeff Hill
*/
#include <stdlib.h>
#include "iocinf.h"
#define epicsExportSharedSymbols
#include "cacIO.h"
#undef epicsExportSharedSymbols
cacContextNotify::~cacContextNotify ()
{
}
void cacContextNotify::callbackProcessingInitiateNotify ()
{
}
void cacContextNotify::callbackProcessingCompleteNotify ()
{
}

View File

@@ -1,392 +0,0 @@
/*************************************************************************\
* Copyright (c) 2002 The University of Chicago, as Operator of Argonne
* National Laboratory.
* Copyright (c) 2002 The Regents of the University of California, as
* Operator of Los Alamos National Laboratory.
* EPICS BASE Versions 3.13.7
* and higher are 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
*/
#ifndef cacIOh
#define cacIOh
//
// Open Issues
// -----------
//
// 1) A status code from the old client side interface is passed
// to the exception notify callback. Should we just pass a string?
// If so, then how do they detect the type of error and recover.
// Perhaps we should call a different vf for each type of exception.
//
// 2) Some exception types are present here but there is no common
// exception base class in use.
//
// 3) Should I be passing the channel reference in cacChannelNotify?
//
// 4) Should the code for caAccessRights not be inline so that this
// interface is version independent.
//
//
#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
class cacChannel;
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 {
public:
virtual ~cacWriteNotify () = 0;
virtual void completion ( epicsGuard < epicsMutex > & ) = 0;
// we should probably have a different vf for each type of exception ????
virtual void exception (
epicsGuard < epicsMutex > &,
int status, const char * pContext,
unsigned type, arrayElementCount count ) = 0;
};
// 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 {
public:
virtual ~cacReadNotify () = 0;
virtual void completion (
epicsGuard < epicsMutex > &, unsigned type,
arrayElementCount count, const void * pData ) = 0;
// we should probably have a different vf for each type of exception ????
virtual void exception (
epicsGuard < epicsMutex > &, int status,
const char * pContext, unsigned type,
arrayElementCount count ) = 0;
};
// 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 {
public:
virtual ~cacStateNotify () = 0;
virtual void current (
epicsGuard < epicsMutex > &, unsigned type,
arrayElementCount count, const void * pData ) = 0;
// we should probably have a different vf for each type of exception ????
virtual void exception (
epicsGuard < epicsMutex > &, int status,
const char *pContext, unsigned type,
arrayElementCount count ) = 0;
};
class caAccessRights {
public:
caAccessRights (
bool readPermit = false,
bool writePermit = false,
bool operatorConfirmationRequest = false);
void setReadPermit ();
void setWritePermit ();
void setOperatorConfirmationRequest ();
void clrReadPermit ();
void clrWritePermit ();
void clrOperatorConfirmationRequest ();
bool readPermit () const;
bool writePermit () const;
bool operatorConfirmationRequest () const;
private:
bool f_readPermit:1;
bool f_writePermit:1;
bool f_operatorConfirmationRequest:1;
};
class epicsShareClass cacChannelNotify {
public:
virtual ~cacChannelNotify () = 0;
virtual void connectNotify ( epicsGuard < epicsMutex > & ) = 0;
virtual void disconnectNotify ( epicsGuard < epicsMutex > & ) = 0;
virtual void serviceShutdownNotify (
epicsGuard < epicsMutex > & mutualExclusionGuard ) = 0;
virtual void accessRightsNotify (
epicsGuard < epicsMutex > &, const caAccessRights & ) = 0;
virtual void exception (
epicsGuard < epicsMutex > &, int status, const char *pContext ) = 0;
// we should probably have a different vf for each type of exception ????
virtual void readException (
epicsGuard < epicsMutex > &, int status, const char *pContext,
unsigned type, arrayElementCount count, void *pValue ) = 0;
// we should probably have a different vf for each type of exception ????
virtual void writeException (
epicsGuard < epicsMutex > &, int status, const char * pContext,
unsigned type, arrayElementCount count ) = 0;
};
class CallbackGuard :
public epicsGuard < epicsMutex > {
public:
CallbackGuard ( epicsMutex & mutex ) :
epicsGuard < epicsMutex > ( mutex ) {}
private:
CallbackGuard ( const CallbackGuard & );
CallbackGuard & operator = ( const CallbackGuard & );
};
//
// Notes
// 1) This interface assumes that when a channel is deleted then all
// attached IO is deleted. This is left over from the old interface,
// 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 {
public:
typedef unsigned priLev;
static const priLev priorityMax;
static const priLev priorityMin;
static const priLev priorityDefault;
static const priLev priorityLinksDB;
static const priLev priorityArchive;
static const priLev priorityOPI;
typedef unsigned ioid;
enum ioStatus { iosSynch, iosAsynch };
cacChannel ( cacChannelNotify & );
virtual void destroy (
CallbackGuard & callbackGuard,
epicsGuard < epicsMutex > & mutualExclusionGuard ) = 0;
cacChannelNotify & notify () const; // required ?????
virtual unsigned getName (
epicsGuard < epicsMutex > &,
char * pBuf, unsigned bufLen ) const throw () = 0;
// !! deprecated, avoid use !!
virtual const char * pName (
epicsGuard < epicsMutex > & guard ) const throw () = 0;
virtual void show (
epicsGuard < epicsMutex > &,
unsigned level ) const = 0;
virtual void initiateConnect (
epicsGuard < epicsMutex > & ) = 0;
virtual unsigned requestMessageBytesPending (
epicsGuard < epicsMutex > & mutualExclusionGuard ) = 0;
virtual void flush (
epicsGuard < epicsMutex > & mutualExclusionGuard ) = 0;
virtual ioStatus read (
epicsGuard < epicsMutex > &,
unsigned type, arrayElementCount count,
cacReadNotify &, ioid * = 0 ) = 0;
virtual void write (
epicsGuard < epicsMutex > &,
unsigned type, arrayElementCount count,
const void *pValue ) = 0;
virtual ioStatus write (
epicsGuard < epicsMutex > &,
unsigned type, arrayElementCount count,
const void *pValue, cacWriteNotify &, ioid * = 0 ) = 0;
virtual void subscribe (
epicsGuard < epicsMutex > &, unsigned type,
arrayElementCount count, unsigned mask, cacStateNotify &,
ioid * = 0 ) = 0;
// The primary mutex must be released when calling the user's
// callback, and therefore a finite interval exists when we are
// moving forward with the intent to call the users callback
// but the users IO could be deleted during this interval.
// To prevent the user's callback from being called after
// destroying his IO we must past a guard for the callback
// mutex here.
virtual void ioCancel (
CallbackGuard & callbackGuard,
epicsGuard < epicsMutex > & mutualExclusionGuard,
const ioid & ) = 0;
virtual void ioShow (
epicsGuard < epicsMutex > &,
const ioid &, unsigned level ) const = 0;
virtual short nativeType (
epicsGuard < epicsMutex > & ) const = 0;
virtual arrayElementCount nativeElementCount (
epicsGuard < epicsMutex > & ) const = 0;
virtual caAccessRights accessRights (
epicsGuard < epicsMutex > & ) const;
virtual unsigned searchAttempts (
epicsGuard < epicsMutex > & ) const;
virtual double beaconPeriod (
epicsGuard < epicsMutex > & ) const; // negative DBL_MAX if UKN
virtual double receiveWatchdogDelay (
epicsGuard < epicsMutex > & ) const; // negative DBL_MAX if UKN
virtual bool ca_v42_ok (
epicsGuard < epicsMutex > & ) const;
virtual bool connected (
epicsGuard < epicsMutex > & ) const;
virtual unsigned getHostName (
epicsGuard < epicsMutex > &,
char * pBuf, unsigned bufLength ) const throw ();
// !! deprecated, avoid use !!
virtual const char * pHostName (
epicsGuard < epicsMutex > & guard ) const throw ();
// exceptions
class badString {};
class badType {};
class badPriority {};
class outOfBounds {};
class badEventSelection {};
class noWriteAccess {};
class noReadAccess {};
class notConnected {};
class unsupportedByService {};
class msgBodyCacheTooSmall {}; // hopefully this one goes away in the future
class requestTimedOut {};
protected:
virtual ~cacChannel () = 0;
private:
cacChannelNotify & callback;
cacChannel ( const cacChannel & );
cacChannel & operator = ( const cacChannel & );
};
class epicsShareClass cacContext {
public:
virtual ~cacContext ();
virtual cacChannel & createChannel (
epicsGuard < epicsMutex > &,
const char * pChannelName, cacChannelNotify &,
cacChannel::priLev = cacChannel::priorityDefault ) = 0;
virtual void flush (
epicsGuard < epicsMutex > & ) = 0;
virtual unsigned circuitCount (
epicsGuard < epicsMutex > & ) const = 0;
virtual void selfTest (
epicsGuard < epicsMutex > & ) const = 0;
virtual unsigned beaconAnomaliesSinceProgramStart (
epicsGuard < epicsMutex > & ) const = 0;
virtual void show (
epicsGuard < epicsMutex > &, unsigned level ) const = 0;
};
class epicsShareClass cacContextNotify {
public:
virtual ~cacContextNotify () = 0;
virtual cacContext & createNetworkContext (
epicsMutex & mutualExclusion, epicsMutex & callbackControl ) = 0;
// we should probably have a different vf for each type of exception ????
virtual void exception (
epicsGuard < epicsMutex > &, int status, const char * pContext,
const char * pFileName, unsigned lineNo ) = 0;
// perhaps this should be phased out in deference to the exception mechanism
virtual int varArgsPrintFormated ( const char * pformat, va_list args ) const = 0;
// backwards compatibility (from here down)
virtual void attachToClientCtx () = 0;
virtual void callbackProcessingInitiateNotify () = 0;
virtual void callbackProcessingCompleteNotify () = 0;
};
// **** Lock Hierarchy ****
// callbackControl must be taken before mutualExclusion if both are held at
// the same time
class epicsShareClass cacService {
public:
virtual ~cacService () = 0;
virtual cacContext & contextCreate (
epicsMutex & mutualExclusion,
epicsMutex & callbackControl,
cacContextNotify & ) = 0;
};
epicsShareFunc void epicsShareAPI caInstallDefaultService ( cacService & service );
epicsShareExtern epicsThreadPrivateId caClientCallbackThreadId;
inline cacChannel::cacChannel ( cacChannelNotify & notify ) :
callback ( notify )
{
}
inline cacChannelNotify & cacChannel::notify () const
{
return this->callback;
}
inline caAccessRights::caAccessRights (
bool readPermit, bool writePermit, bool operatorConfirmationRequest) :
f_readPermit ( readPermit ), f_writePermit ( writePermit ),
f_operatorConfirmationRequest ( operatorConfirmationRequest ) {}
inline void caAccessRights::setReadPermit ()
{
this->f_readPermit = true;
}
inline void caAccessRights::setWritePermit ()
{
this->f_writePermit = true;
}
inline void caAccessRights::setOperatorConfirmationRequest ()
{
this->f_operatorConfirmationRequest = true;
}
inline void caAccessRights::clrReadPermit ()
{
this->f_readPermit = false;
}
inline void caAccessRights::clrWritePermit ()
{
this->f_writePermit = false;
}
inline void caAccessRights::clrOperatorConfirmationRequest ()
{
this->f_operatorConfirmationRequest = false;
}
inline bool caAccessRights::readPermit () const
{
return this->f_readPermit;
}
inline bool caAccessRights::writePermit () const
{
return this->f_writePermit;
}
inline bool caAccessRights::operatorConfirmationRequest () const
{
return this->f_operatorConfirmationRequest;
}
#endif // ifndef cacIOh

View File

@@ -1,30 +0,0 @@
/*************************************************************************\
* Copyright (c) 2002 The University of Chicago, as Operator of Argonne
* National Laboratory.
* Copyright (c) 2002 The Regents of the University of California, as
* Operator of Los Alamos National Laboratory.
* EPICS BASE Versions 3.13.7
* and higher are 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: Jeff Hill
*/
#include "iocinf.h"
#define epicsExportSharedSymbols
#include "cacIO.h"
#undef epicsExportSharedSymbols
cacReadNotify::~cacReadNotify ()
{
}

View File

@@ -1,30 +0,0 @@
/*************************************************************************\
* Copyright (c) 2002 The University of Chicago, as Operator of Argonne
* National Laboratory.
* Copyright (c) 2002 The Regents of the University of California, as
* Operator of Los Alamos National Laboratory.
* EPICS BASE Versions 3.13.7
* and higher are 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: Jeff Hill
*/
#include "iocinf.h"
#define epicsExportSharedSymbols
#include "cacIO.h"
#undef epicsExportSharedSymbols
cacStateNotify::~cacStateNotify ()
{
}

View File

@@ -1,30 +0,0 @@
/*************************************************************************\
* Copyright (c) 2002 The University of Chicago, as Operator of Argonne
* National Laboratory.
* Copyright (c) 2002 The Regents of the University of California, as
* Operator of Los Alamos National Laboratory.
* EPICS BASE Versions 3.13.7
* and higher are 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: Jeff Hill
*/
#include "iocinf.h"
#define epicsExportSharedSymbols
#include "cacIO.h"
#undef epicsExportSharedSymbols
cacWriteNotify::~cacWriteNotify ()
{
}

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