Compare commits

...

150 Commits

Author SHA1 Message Date
a40737c06b Add RHEL8 support
Some checks failed
Base / Ub-20 clang-10 C++11 (push) Has been cancelled
Base / MacOS clang-12 (push) Has been cancelled
Base / Ub-20 gcc-9 + MinGW (push) Has been cancelled
Base / Ub-16 clang-9 (push) Has been cancelled
Base / Ub-20 clang-10 (push) Has been cancelled
Base / Ub-20 gcc-9 + RT-4.10 (push) Has been cancelled
Base / Ub-20 gcc-9 + RT-4.9 (push) Has been cancelled
Base / Win2019 mingw (push) Has been cancelled
Base / Ub-20 gcc-9 C++11, static (push) Has been cancelled
Base / Ub-20 gcc-9 + MinGW, static (push) Has been cancelled
Base / Ub-16 gcc-4.8 (push) Has been cancelled
Base / Ub-16 gcc-4.9 (push) Has been cancelled
Base / Ub-20 gcc-8 (push) Has been cancelled
Base / Ub-20 gcc-9 (push) Has been cancelled
Base / Win2019 MSC-19 (push) Has been cancelled
Base / Win2019 MSC-19, static (push) Has been cancelled
2021-04-07 13:54:19 +02:00
34aebf7eea get rid of explicit templates for VxWorks 2021-04-07 13:53:17 +02:00
da350d0d54 use latest versions 2021-04-07 13:48:40 +02:00
243807cbe5 updated submodules 2021-03-26 17:07:27 +01:00
b3c18ebc4e use only 3 version digits for INSTALL_LOCATION 2021-03-24 14:51:34 +01:00
f25f067e9c Merge branch '7.0' into PSI-7.0
Conflicts:
	modules/database/test/std/link/Makefile
	modules/libcom/src/osi/os/posix/osdMutex.c
	modules/libcom/src/osi/os/vxWorks/osdThread.h
2021-03-24 14:45:02 +01:00
74d269304c simplified SL6-x86 config 2021-03-24 14:29:04 +01:00
Michael Davidsaver
54e9d3f5d1 ci: github actions add mingw 2021-03-18 14:06:45 -07:00
Michael Davidsaver
7e01cdacac ci: GHA always upload tapfiles 2021-03-18 14:06:45 -07:00
Ziga Oven
746d21c71d Add usage messages 2021-03-18 14:06:45 -07:00
Oksana Ivashkevych
7eb7988e55 Add usage to miscIocRegister.c and dbStaticIocRegister.c 2021-03-14 16:30:28 -07:00
Matthew Pearson
5daf4fc932 epicsStdlib.h: add doxygen comments. 2021-03-14 16:30:28 -07:00
Matthew Pearson
ef878808ce errlog.h: added doxygen comments. 2021-03-14 16:30:28 -07:00
Dominic Oram
1fcbdad5e9 Adds doxygen annotations to epicsType.h 2021-03-14 16:30:28 -07:00
Michael Davidsaver
ca3ef9c61e dbUnitTest use dbChannel
Allows testing of server side filters
2021-03-12 09:16:31 -08:00
Andrew Johnson
e10b1d7660 Merge 3.15 branch into 7.0
Includes support for 'make inc'
2021-03-12 00:04:32 -06:00
Andrew Johnson
0c4ab7b24a Merge my 'make-inc-fix' branch into 3.15 2021-03-11 20:45:37 -06:00
Andrew Johnson
d831c2b384 Merge 'FreddieAkeroyd-use_epicsStrtod' into 3.15 2021-03-11 20:18:57 -06:00
Andrew Johnson
34d06b6e36 Merge branch 'gabrielfedel-fix_msi' into 3.15 2021-03-11 20:12:07 -06:00
Andrew Johnson
b2f7f4e173 Minor fixes in configure/RULES files 2021-03-11 18:13:44 -06:00
Michael Davidsaver
f30e9533c4 epicsLoadTest use INSTALL_LOCATION 2021-03-11 09:30:28 -08:00
Freddie Akeroyd
3c7fb7990f Use <epicsStdlib.h> 2021-03-11 15:08:00 +00:00
Andrew Johnson
c359b49aed Fix the 3.15 'make inc' build target
Now generates and installs dbd, header and html files.
No compilation involved/required.
2021-03-10 22:05:39 -06:00
Gabriel Fedel
0bc2a3e999 Fix variable type and cast on msi.cpp
This way the attribution of i to cmdind is a valid value.
2021-03-10 14:37:14 +01:00
Freddie Akeroyd
8e7702c8a5 Use epicsStrtod, remove some warnings 2021-03-10 11:29:45 +00:00
Gabriel Fedel
6ac10d43b1 Fix type comparision on msi.cpp
This change fix the comparision of different signedess (int and long
unsigned int).
2021-03-10 09:45:01 +01:00
Andrew Johnson
436a5e7fa2 Fix markdown link in Release Notes
Found by Kathryn Baker
2021-03-10 01:14:56 -06:00
Andrew Johnson
09820d799e Fix POD-generated HTML anchor IDs 2021-03-10 01:14:56 -06:00
Andrew Johnson
9184983cf0 Merge branch Ticket80_use_os_strtod_if_above_vs_2015 2021-03-09 18:27:18 -06:00
Michael Davidsaver
979445c8fe ci: add gcc-9 build 2021-03-09 09:26:44 -08:00
Jack Harper
30172226f9 whoops, MSVC 1900 not 1800 2021-03-09 13:13:16 +00:00
Jack Harper
2ea0994507 tests passing 2021-03-09 13:04:57 +00:00
Andrew Johnson
f571c5950b Modify DBD processing scripts to output Doxygen comments 2021-03-08 21:39:39 -06:00
Andrew Johnson
6786b2e7c2 Modify the Doxyfile to match earlier settings 2021-03-08 21:25:24 -06:00
Michael Davidsaver
504191441d Merge remote-tracking branch 'github/pr/99' into 7.0
* github/pr/99:
  fix an out-dated comment in the array filter code
  add macro dbfl_pfield to db_field_log.h and use it in dbGet
  fix in dbGet: decide use of db_field_log based on whether it has copy or not
  add macro dbfl_has_copy to db_field_log.h and use it in dbAccess.c
  refactor db_field_log and filters to get rid of dbfl_type_rec
  make it clearer what the result of wrapArrayIndices will be
2021-03-07 21:17:21 -08:00
Andrew Johnson
3ba778c08b documentation/Makefile tweaks 2021-03-07 21:35:07 -06:00
Andrew Johnson
1fbbae73de Modify documentation/Doxyfile to parse include directory
Excludes the include/pv and include/pva directories,
which are processed separately in their own modules.
2021-03-07 20:27:45 -06:00
Andrew Johnson
4baf7912e1 Tidying up in documentation directory 2021-03-07 20:23:19 -06:00
c949cb5c8c new license server name needed for cross compiler 2021-03-05 14:20:53 +01:00
Andrew Johnson
bbb4d86f78 Enable RTEMS testing in modules/database/test/std/link 2021-03-03 18:17:31 -06:00
2495919611 (re-)enable 32 bit SL6 cross build 2021-03-03 15:53:02 +01:00
7ed4f6c704 we don't build 32 bit RHEL7-x86 2021-03-03 15:47:33 +01:00
eb828f3807 use C++11 whereever possible 2021-03-03 15:39:02 +01:00
a98708302b drop SL5 support 2021-03-03 14:48:15 +01:00
Brendan Chandler
f41276bef8 epicPosicMutexInit: avoid calling with 0 which is platform dependent
Different platforms (RTEMS5) can define different values for
PTHREAD_MUTEX_DEFAULT, so we shouldn't pass 0 assuming its
PTHREAD_MUTEX_DEFAULT.
2021-03-02 22:44:56 -08:00
Andrew Johnson
f9e3e86401 Support VxWorks 6.9.x before taskWait() was added
We don't know exactly which version this was added in,
but it is present in 6.9.4.1 so use that.

Fixes lp: #1913699
2021-03-02 11:54:17 -06:00
0dae3e206f fix for vxWorks 6.9.0 2021-03-02 17:28:55 +01:00
505e6f45c1 fix for older vxWorks installations 2021-03-02 17:28:13 +01:00
424de7d9c4 fix for old posix implementations 2021-03-02 17:27:43 +01:00
Michael Davidsaver
3c46542630 posix: epicsMutexOsdShowAll check for PI support 2021-03-02 06:47:43 -08:00
1a0de528e1 Merge tag 'R7.0.5' into PSI-7.0
ANJ: Tagged for release

Conflicts:
	configure/os/CONFIG_SITE.Common.linuxCommon
2021-03-02 09:18:43 +01:00
Andrew Johnson
f8eb0be7a4 Update submodules after release 2021-02-28 21:39:28 -06:00
Andrew Johnson
ff5df5fbf3 Update version numbers after tagging 2021-02-28 20:21:41 -06:00
Ben Franksen
236bb2c671 fix an out-dated comment in the array filter code 2021-01-15 15:13:47 +01:00
Ben Franksen
372e937717 add macro dbfl_pfield to db_field_log.h and use it in dbGet 2021-01-14 17:45:25 +01:00
Ben Franksen
56f05d722d fix in dbGet: decide use of db_field_log based on whether it has copy or not 2021-01-14 17:40:37 +01:00
Ben Franksen
85822f3051 add macro dbfl_has_copy to db_field_log.h and use it in dbAccess.c
It encapsulates the slightly tricky logic to decide whether a pointer
to a db_field_log has ownership of the data or not.
2021-01-12 17:49:10 +01:00
Ben Franksen
27fe3e4468 refactor db_field_log and filters to get rid of dbfl_type_rec
This refactor simplifies and streamlines the code associated with server
side filters. Apart from immediate benefits (clearer code, less duplication)
it is also hoped that this will make it easier to add write filters.

The data pointer dbfl_ref.field can now either point to a copy owned by a
filter, or it can point to the original data owned by a record. In the
latter case, the dbfl_ref.dtor is NULL.

The dbExtractArray* functions are unified to the single function
dbExtractArray and stripped of conversion functionality. This is redundant
because we always call dbGet after applying filters, which takes care of
conversion. Accordingly, dbChannelMakeArrayCopy is now obsolete and its
single use (in the ts filter) replaced with dbExtractArray. Instead, we add
the helper function dbChannelGetArrayInfo to wrap the common boilerplate
around calls to the get_array_info method, used in both arr.c and ts.c.
2021-01-12 17:49:10 +01:00
Ben Franksen
4ab9808180 make it clearer what the result of wrapArrayIndices will be 2021-01-12 15:56:32 +01:00
d795dd76a6 bugfix for older compilers: have all declarations before instructions 2020-11-16 17:58:01 +01:00
Andrew Johnson
45924d28e0 Add -v (verbose) flag to softIoc
Only display the startup steps taken if -v was given.
Show each step *before* running it, so error messages follow it.
2020-11-16 17:44:51 +01:00
Andrew Johnson
b1d0a0d036 Build: Do clean before uninstall actions (if requested) 2020-11-16 17:44:21 +01:00
Andrew Johnson
45e9cf9a94 Warn about NULL dbevEventUserFreeList 2020-11-16 17:44:01 +01:00
Andrew Johnson
a8dcff2f0d Merge fix-wrong-order-phas fixes from 3.15 branch 2020-11-16 17:41:08 +01:00
53a7d25923 allow constant links with numeric 1 element arrays like [42] 2020-11-16 17:34:20 +01:00
Ralph Lange
c701e7e98e Redo d3d40689 that was lost in upmerging 2020-11-16 17:33:25 +01:00
Michael Davidsaver
bf8e097756 compat IPPORT_USERRESERVED
musl libc doesn't define IPPORT_USERRESERVED
2020-11-16 17:32:29 +01:00
Andrew Johnson
837a2bbdde const init a char array from a string value
Conflicts:
	documentation/RELEASE_NOTES.md
2020-11-16 17:31:08 +01:00
Andrew Johnson
6fb361a965 Fix Cygwin TCP_NODELAY issue from Paul Chu & Freddie
Conflicts:
	documentation/RELEASE_NOTES.md
2020-11-16 17:27:56 +01:00
1db2cba81d Merge commit '10d472202dc2bf1fa5c569d2a14d460e95030564' into PSI-7.0
This is before PVA is modified
2020-11-16 17:06:22 +01:00
ce43a67cbd re-add removed .ci submodule 2020-11-13 10:07:34 +01:00
7ac8f056ed added missing header for close() in VxWorks 6.3 2020-11-12 11:21:26 +01:00
d157e96aac remove compiler warning 2020-11-12 10:59:54 +01:00
1d1e3e9527 calc backward compatibility: allow incomplete conditional 2020-11-12 10:54:11 +01:00
48d37e6b45 drop support for 32 bit SL6 2020-07-06 14:02:04 +02:00
5d03f20831 build for VxWorks 6.9 2020-07-06 14:00:15 +02:00
9e72edb544 fix comment and linker flag 2020-07-06 10:56:02 +02:00
4476c71f62 removed 'git describe' from EPICS version string, as it is now shown in Revision string 2020-06-26 11:17:51 +02:00
e9471b3072 Merge branch '7.0' of https://git.launchpad.net/epics-base into PSI-7.0 2020-06-24 18:01:47 +02:00
4082cb27c3 new architecture nilrt7-armv7a (NI Linux Real Time) for ESI 2020-06-03 10:47:14 +02:00
88cdffddb6 Merge branch '7.0' release 7.4.0.1 into PSI-7.0
Conflicts:
	.gitmodules
	modules/database/src/ioc/db/Makefile
	modules/libcom/test/epicsAtomicTest.cpp
	modules/pvAccess
	modules/pvData
	modules/pvDatabase
	modules/pva2pva
2020-06-03 10:46:07 +02:00
b27d1416b5 install location with patch level 2020-04-07 15:38:05 +02:00
ab97b5fe54 Bring back VxWorks 5 compatibility 2020-04-07 15:37:32 +02:00
bbaa207603 Merge remote-tracking branch 'remotes/xiaoqiang/wine_msvc' into PSI-7.0 2020-04-06 14:00:56 +02:00
Xiaoqiang Wang
605937bbac use the msvc from a new location 2020-04-06 11:05:04 +02:00
Xiaoqiang Wang
594fcb9a0d CXXFLAGS from CONFIG_win32-x86.Common 2020-04-03 15:10:46 +02:00
Xiaoqiang Wang
e033c0cfb2 use MSVC via WINE to compile for windows 2020-04-01 14:44:38 +02:00
Xiaoqiang Wang
53ebbab941 use MSVC_DIR to pick up MSVC toolchains 2020-04-01 14:42:18 +02:00
86adc529ef Merge remote-tracking branch 'origin' into PSI-7.0
Conflicts:
	configure/os/CONFIG_SITE.Common.linuxCommon
	modules/libcom/src/log/iocLog.c
	modules/libcom/src/log/logClient.c
	modules/pvAccess
	modules/pvData
	modules/pvDatabase
2020-02-06 17:28:40 +01:00
3a774d37f8 call shell to get EPICS_SITE_VERSION only when compiling EPICS base 2019-09-20 09:02:35 +02:00
5f6b1e2b16 (Re-)connect only when there is something to send. This avoids constant useless disconnect/connect cycles if the server (or firewall) keeps closing the connection. 2019-09-04 10:14:05 +02:00
584caf54b2 don't use space in version string 2019-09-03 09:17:38 +02:00
d602c1cdcb detect when server closes connection. can only be done reliably with recv, not with send 2019-09-02 17:47:43 +02:00
12ce14b6e5 no need to delay startup only because log server is currently not available 2019-09-02 17:47:43 +02:00
e02709b3a4 send pending log messages directly after connecting 2019-09-02 17:47:43 +02:00
b19709039d avoid needless memmove calls 2019-09-02 17:47:42 +02:00
3c4ffbf267 elimitate duplicate code in logClient 2019-09-02 17:47:42 +02:00
4942da0c88 do not discard unsent messages when log server has closed connection, instead try to send them after reconnect 2019-09-02 17:47:42 +02:00
5f547257ac speed up logRestart thread termination at exit 2019-09-02 17:47:42 +02:00
1b99366887 don't send errlog on all logClients 2019-09-02 17:47:42 +02:00
871af36ac5 move -fno-strict-aliasing flag to central place for all Linux version 2019-09-02 16:44:53 +02:00
0ad6d2aec9 typo in comment 2019-09-02 13:53:21 +02:00
8837d2f275 use perl instead of date in EPICS_SITE_VERSION because of Windows 2019-09-02 10:49:44 +02:00
09a17127a9 make xxxTestHarness TESTPRODs instead of PRODs 2019-09-02 10:47:43 +02:00
3699c5bc4c fix strict-aliasing warnings 2019-08-26 15:50:07 +02:00
157b0867fa removed unused vxWorks version defaults 2019-08-14 14:06:05 +02:00
56529964f3 always use -g for non-vxWorks gnu compiler 2019-08-14 13:55:07 +02:00
c28e240fce clear whitespace 2019-08-14 11:39:30 +02:00
b04b2dab22 fix astac crash 2019-08-13 15:13:54 +02:00
8edcd7b07f use READLINE as default for all Linux systems 2019-08-09 16:21:08 +02:00
ca78451122 move PSI specifics out to CONFIG_SITE. files 2019-08-09 13:33:41 +02:00
4cc44e3dce cleanup spaces 2019-08-09 13:32:49 +02:00
e81d3a1d7d remove strict-aliasing warnings in RHEL7 2019-08-09 11:34:50 +02:00
53dd61b80a merged with R7.0.3 2019-08-09 11:31:43 +02:00
5b754d320f fix posix epicsThreadSleepQuantum() implementation not to return 0.01 on Linux 2019-07-24 14:17:25 +02:00
2be2658cfc added modules/pcas 2019-07-22 17:12:22 +02:00
2b157096e6 merge branch '7.0' into 'PSI-7.0' 2019-07-22 15:44:08 +02:00
71eaddfd84 Merge branch 'refs/heads/PSI-7.0.1' into PSI-7.0 2019-07-22 15:36:33 +02:00
5589deb3ad make sure softIoc for vxWorks contains all functions 2019-07-22 15:17:18 +02:00
0bb80e373b add simple calculations to macros 2019-05-10 14:44:17 +02:00
4acdd83984 also build pcas 2019-05-10 11:13:23 +02:00
d12d38f970 re-enable -fno-strict-aliasing for vxWorks 2019-05-10 11:08:48 +02:00
74d9749255 fix install location 2019-05-10 11:07:50 +02:00
3276ada78a build for DeltaTau with ELDK-5.3 for newer C++ compiler 2019-05-08 17:32:50 +02:00
de378eec34 also build pcas 2019-04-03 15:14:34 +02:00
dbb2d875fb undo commit 2206934 which introduces a MKDIR rule that conflicts with driver/makefile 2019-04-03 15:13:00 +02:00
c7f966a1f5 fix install location 2019-04-03 15:10:28 +02:00
7889dda6f8 merged with upstream 2019-02-20 10:51:02 +01:00
a2ccf3b631 add raspberryPi and skip unused vxWorks archs 2018-10-31 15:23:05 +01:00
57db34b303 Merge branch 'FixShellCommands' into PSI-7.0 2018-10-24 09:25:44 +02:00
4f790758af no PVA for mvl40-xscale_be 2018-10-23 10:01:13 +02:00
ce9dfc6bb4 need some .o files, but there aren't many any more 2018-10-18 16:20:45 +02:00
4f40ad1927 build for mvl40-xscale_be (without PVA)configure/os/CONFIG.Common.mvl40-xscale_be 2018-10-18 16:20:13 +02:00
a42a4010d6 skip building with clang on old SL6 to avoid problems with cross build from RHEL7 2018-10-11 13:20:59 +02:00
a2aa17fafc some drivers complain about strict-aliasing 2018-10-11 08:36:35 +02:00
5bf2784db2 add -fno-strict-aliasing for those archs which complain about anyscalar.h 2018-10-05 10:43:08 +02:00
7a4e7b7600 add tar and copysrc make rules 2018-10-03 17:13:13 +02:00
70aa23513f use -isystem option to find correct headers for cross compiling for old Linux host versions 2018-10-03 16:47:57 +02:00
71ded2f25f install dbCaPvt.h needed by devIocStats/ioccar 2018-10-03 16:43:32 +02:00
11103351b2 add build year-month to version string 2018-10-03 16:38:53 +02:00
146a413977 add -isystem to avoid system headers in .d files (does not work for vxWorks 5) 2018-10-03 13:48:09 +02:00
4e44550f62 Merge branch 'FixShellCommands' into PSI-7.0 2018-09-28 11:41:52 +02:00
9952470486 Merge branch 'FixShellCommands' into PSI-7.0 2018-09-27 13:58:23 +02:00
02d30dedbc install server.h for misc module 2018-09-26 16:10:30 +02:00
5ed0fe52a0 Merge branch '7.0' into PSI-7.0 2018-09-26 11:45:19 +02:00
42b1f774da add PSI configuration 2018-09-25 11:13:08 +02:00
7738b68320 fix missing template instances for old vxWorks (uses -fno-implicit-templates) 2018-09-24 18:00:53 +02:00
1199fabe90 Fix strange compiler errors with gcc 2.96:
using <namespace::function>; seems not to work but
using namespace <namespace>; works
Also 'add' only works with explicit namespace. Why?
2018-09-21 16:21:13 +02:00
1aefc5f2f0 re-enable building vxWorks 5 2018-09-21 16:20:17 +02:00
6f666c6c22 Add mechanism to skip modules for selected architectures 2018-09-21 15:50:06 +02:00
142 changed files with 1843 additions and 636 deletions

2
.ci

Submodule .ci updated: 3db08b5977...7d9d426629

View File

@@ -98,6 +98,12 @@ jobs:
configuration: default
name: "Ub-20 gcc-8"
- os: ubuntu-20.04
cmp: gcc-9
utoolchain: "9"
configuration: default
name: "Ub-20 gcc-9"
- os: ubuntu-20.04
cmp: clang
configuration: default
@@ -118,6 +124,11 @@ jobs:
configuration: static
name: "Win2019 MSC-19, static"
- os: windows-2019
cmp: gcc
configuration: default
name: "Win2019 mingw"
steps:
- uses: actions/checkout@v2
with:
@@ -144,6 +155,7 @@ jobs:
- name: Run main module tests
run: python .ci/cue.py test
- name: Upload tapfiles Artifact
if: ${{ always() }}
uses: actions/upload-artifact@v2
with:
name: tapfiles ${{ matrix.name }}

3
.gitmodules vendored
View File

@@ -26,3 +26,6 @@
path = .ci
url = https://github.com/epics-base/ci-scripts
branch = master
[submodule "modules/pcas"]
path = modules/pcas
url = https://github.com/epics-modules/pcas

View File

@@ -23,3 +23,10 @@ DIRS += modules
modules_DEPEND_DIRS = src
include $(TOP)/configure/RULES_TOP
UNINSTALL_DIRS += $(INSTALL_LOCATION)/src
copysrc:
tar cf - --exclude-vcs --exclude-backups --exclude=O.* modules/*/src | tar xf - -C $(INSTALL_LOCATION)
tar:
tar cfjP epics_base-$(EPICS_VERSION_NUMBER).tar.bz2 $(INSTALL_LOCATION)

View File

@@ -33,7 +33,7 @@ CODE_CFLAGS = $(PROF_CFLAGS_$(PROFILE)) $(GPROF_CFLAGS_$(GPROF))
CODE_CFLAGS += $(ASAN_FLAGS_$(ENABLE_ASAN))
WARN_CFLAGS_YES = -Wall -Werror-implicit-function-declaration
WARN_CFLAGS_NO = -w
OPT_CFLAGS_YES = -O3
OPT_CFLAGS_YES = -O3 -g
OPT_CFLAGS_NO = -g
PROF_CXXFLAGS_YES = -p
@@ -42,7 +42,7 @@ CODE_CXXFLAGS = $(PROF_CXXFLAGS_$(PROFILE)) $(GPROF_CXXFLAGS_$(GPROF))
CODE_CXXFLAGS += $(ASAN_FLAGS_$(ENABLE_ASAN))
WARN_CXXFLAGS_YES = -Wall
WARN_CXXFLAGS_NO = -w
OPT_CXXFLAGS_YES = -O3
OPT_CXXFLAGS_YES = -O3 -g
OPT_CXXFLAGS_NO = -g
CODE_LDFLAGS = $(PROF_CXXFLAGS_$(PROFILE)) $(GPROF_CXXFLAGS_$(GPROF))

View File

@@ -52,11 +52,11 @@ EPICS_MODIFICATION = 5
# EPICS_PATCH_LEVEL must be a number (win32 resource file requirement)
# Not included in the official EPICS version number if zero
EPICS_PATCH_LEVEL = 0
EPICS_PATCH_LEVEL = 1
# Immediately after an official release the EPICS_PATCH_LEVEL is incremented
# and the -DEV suffix is added (similar to the Maven -SNAPSHOT versions)
EPICS_DEV_SNAPSHOT=
EPICS_DEV_SNAPSHOT=-DEV
# No changes should be needed below here

View File

@@ -2,11 +2,11 @@
EPICS_CA_MAJOR_VERSION = 4
EPICS_CA_MINOR_VERSION = 13
EPICS_CA_MAINTENANCE_VERSION = 8
EPICS_CA_MAINTENANCE_VERSION = 9
# Development flag, set to zero for release versions
EPICS_CA_DEVELOPMENT_FLAG = 0
EPICS_CA_DEVELOPMENT_FLAG = 1
# Immediately after a release the MAINTENANCE_VERSION
# will be incremented and the DEVELOPMENT_FLAG set to 1

View File

@@ -2,11 +2,11 @@
EPICS_DATABASE_MAJOR_VERSION = 3
EPICS_DATABASE_MINOR_VERSION = 19
EPICS_DATABASE_MAINTENANCE_VERSION = 0
EPICS_DATABASE_MAINTENANCE_VERSION = 1
# Development flag, set to zero for release versions
EPICS_DATABASE_DEVELOPMENT_FLAG = 0
EPICS_DATABASE_DEVELOPMENT_FLAG = 1
# Immediately after a release the MAINTENANCE_VERSION
# will be incremented and the DEVELOPMENT_FLAG set to 1

View File

@@ -2,11 +2,11 @@
EPICS_LIBCOM_MAJOR_VERSION = 3
EPICS_LIBCOM_MINOR_VERSION = 19
EPICS_LIBCOM_MAINTENANCE_VERSION = 0
EPICS_LIBCOM_MAINTENANCE_VERSION = 1
# Development flag, set to zero for release versions
EPICS_LIBCOM_DEVELOPMENT_FLAG = 0
EPICS_LIBCOM_DEVELOPMENT_FLAG = 1
# Immediately after a release the MAINTENANCE_VERSION
# will be incremented and the DEVELOPMENT_FLAG set to 1

View File

@@ -157,7 +157,9 @@ USE_POSIX_THREAD_PRIORITY_SCHEDULING = YES
# Site version number, if set will append '-' and this string to the
# EPICS version number string that is reported by many tools.
EPICS_SITE_VERSION =
ifeq ($(INSTALL_LOCATION),$(EPICS_BASE))
EPICS_SITE_VERSION=$(shell $(PERL) -MPOSIX -e 'print strftime "%Y-%m-%d", localtime')
endif
# For GNU compiler, use pipes rather than temporary files for
# communication between the various stages of compilation.

View File

@@ -196,12 +196,12 @@ endif
#---------------------------------------------------------------
# build dependancies, clean rule
inc: $(COMMON_INC) $(INSTALL_INC)
inc: $(COMMON_INC) $(INSTALL_INC) $(COMMON_DBDS) $(COMMON_DBDCATS) \
$(INSTALL_DBDS) $(INSTALL_DBD_INSTALLS)
build: $(COMMON_DBDS) $(COMMON_DBS) $(COMMON_DBDCATS) \
$(INSTALL_DBDS) $(INSTALL_DBS) \
build: $(COMMON_DBS) $(INSTALL_DBS) \
$(DBDDEPENDS_FILES) $(TARGETS) \
$(INSTALL_DB_INSTALLS) $(INSTALL_DBD_INSTALLS)
$(INSTALL_DB_INSTALLS)
clean: db_clean

View File

@@ -100,20 +100,40 @@ include $(CONFIG)/RULES_FILE_TYPE
include $(CONFIG)/RULES.Db
#---------------------------------------------------------------
# Do not build anything if current path matches SKIP_BUILD
ifneq (,$(strip $(SKIP_BUILDS)))
CURRENT_MODULE=$(subst $(realpath $(TOP)/..)/,,$(subst $(realpath $(dir $(lastword $(MAKEFILE_LIST)))..)/,,$(realpath ..)))
ifneq ($(filter $(SKIP_BUILDS) $(addsuffix /%,$(SKIP_BUILDS)),$(CURRENT_MODULE)),)
$(info Skipping $(CURRENT_MODULE) for $(T_A))
PROD=
TESTPROD=
LIBRARY=
TESTLIBRARY=
LOADABLE_LIBRARY=
TESTS=
SRC_FILES=
endif
endif
#---------------------------------------------------------------
# Include defines and rules for prod, library and test* targets
#ifneq (,$(strip $(PROD) $(TESTPROD) $(LIBRARY) $(TESTLIBRARY) $(LOADABLE_LIBRARY) ))
ifneq (,$(strip $(PROD) $(TESTPROD) $(LIBRARY) $(TESTLIBRARY) \
$(LOADABLE_LIBRARY)))
include $(CONFIG)/RULES_TARGET
#endif
endif
#---------------------------------------------------------------
# Read dependency files
ifneq (inc,$(strip $(MAKECMDGOALS)))
ifneq (,$(strip $(HDEPENDS_FILES)))
$(filter-out $(wildcard *$(DEP)), $(HDEPENDS_FILES)): | $(COMMON_INC)
-include $(HDEPENDS_FILES)
endif
endif
#---------------------------------------------------------------
# Products and Object libraries
@@ -161,12 +181,13 @@ build: inc
build: $(OBJSNAME) $(LIBTARGETS) $(PRODTARGETS) $(TESTPRODTARGETS) \
$(TARGETS) $(TESTSCRIPTS) $(INSTALL_LIB_INSTALLS)
inc: $(COMMON_INC) $(INSTALL_INC) $(INSTALL_CONFIGS)
inc: $(COMMON_INC) $(INSTALL_INC) $(INSTALL_CONFIGS) $(INSTALLS_CFG) \
$(INSTALL_HTMLS) $(INSTALLS_PERL_MODULES) $(INSTALL_SCRIPTS)
buildInstall: \
$(INSTALL_SCRIPTS) $(INSTALL_PROD) $(INSTALL_MUNCHS) \
$(INSTALL_PROD) $(INSTALL_MUNCHS) \
$(INSTALL_TCLLIBS) $(INSTALL_TCLINDEX) \
$(INSTALL_HTMLS) $(INSTALL_DOCS) \
$(INSTALL_DOCS) \
$(INSTALL_OBJS) \
$(INSTALL_TEMPLATE) \
$(INSTALL_BIN_INSTALLS)
@@ -222,9 +243,9 @@ $(LOADABLE_SHRLIBNAME): FINAL_DIR=$(INSTALL_SHRLIB)
$(TESTPRODNAME) $(PRODNAME): $(PRODUCT_OBJS) $(PROD_RESS) $(PROD_DEPLIBS)
$(TESTPRODNAME) $(PRODNAME): %$(EXE): | $(INSTALL_LIB)
$(TESTPRODNAME) $(PRODNAME): %$(EXE):
@$(RM) $@
$(LINK.cpp)
$(DEBUGCMD) $(LINK.cpp)
$(MT_EXE_COMMAND)
%_ctdt$(OBJ): %_ctdt.c
@@ -325,10 +346,6 @@ $(LOADABLE_SHRLIBNAME): $(LOADABLE_SHRLIB_PREFIX)%$(LOADABLE_SHRLIB_SUFFIX):
$(LINK.shrlib)
$(MT_DLL_COMMAND)
$(LIBNAME) $(SHRLIBNAME) $(LOADABLE_SHRLIBNAME): | $(INSTALL_LIB)
$(INSTALL_LIB):
@$(MKDIR) $@
#---------------------------------------------------------------
# C++ munching for VxWorks
@@ -507,11 +524,9 @@ $(INSTALL_TCLLIB)/%: ../%
@$(INSTALL) -d -m $(BIN_PERMISSIONS) $< $(INSTALL_TCLLIB)
endif
ifneq ($(TCLINDEX),)
$(INSTALL_TCLLIB)/$(TCLINDEX): $(INSTALL_TCLLIBS)
$(ECHO) "Updating $@"
$(ECHO) eval auto_mkindex $(INSTALL_TCLLIB) "$(TCLLIBNAME)" | tclsh
endif
$(INSTALL_LOADABLE_SHRLIBS): $(INSTALL_SHRLIB)/%: %
$(ECHO) "Installing loadable shared library $@"

View File

@@ -21,7 +21,6 @@ $(foreach target, $(PROD) $(TESTPROD) $(LIBRARY) $(TESTLIBRARY) $(LOADABLE_LIBRA
#-----------------------------------------------------------------------
# This define block requires GNU make 3.81
define PROD_template
ifeq ($$(strip $$($(1)_OBJS) $$($(1)_SRCS) $$(PRODUCT_OBJS)),)
$(1)_OBJS = $(1)$$(OBJ)

View File

@@ -73,7 +73,7 @@ help:
@echo "Usage: gnumake [options] [target] ..."
@echo "Targets supported by all Makefiles:"
@echo " all - Same as install (default rule)"
@echo " inc - Installs header files"
@echo " inc - Installs header, dbd and html files"
@echo " build - Builds and installs all targets"
@echo " install - Builds and installs all targets"
@echo " buildInstall - Same as install (deprecated)"

View File

@@ -0,0 +1,2 @@
# Include definitions common to linux pentium targets
include $(CONFIG)/os/CONFIG.Common.linux-x86_64

View File

@@ -0,0 +1 @@
include $(CONFIG)/os/CONFIG.Common.linux-clang

View File

@@ -0,0 +1,2 @@
# Include definitions common to linux pentium targets
include $(CONFIG)/os/CONFIG.Common.linux-x86_64

View File

@@ -0,0 +1 @@
include $(CONFIG)/os/CONFIG.Common.linux-clang

View File

@@ -0,0 +1,7 @@
# Include definitions common to linux pentium targets
include $(CONFIG)/os/CONFIG.Common.linux-x86
ARCH_DEP_CFLAGS += -march=i686
# have no full C++11
STD_CXXFLAGS = -std=c++0x

View File

@@ -0,0 +1,5 @@
# Include definitions common to linux pentium targets
include $(CONFIG)/os/CONFIG.Common.linux-x86_64
# have no full C++11
STD_CXXFLAGS = -std=c++0x

View File

@@ -0,0 +1 @@
include $(CONFIG)/os/CONFIG.Common.linux-clang

View File

@@ -0,0 +1,8 @@
include $(CONFIG)/os/CONFIG.Common.vxWorks-ppc604_long
VXWORKS_VERSION = 5.5.1
WIND_BASE = /afs/psi.ch/project/vxworks/Tornado2.2.1
#there is a problem with our ccppc and optimization
# -O0 works, -O and -O1 and higher are buggy
OPT_CFLAGS_YES = -O0
OPT_CXXFLAGS_YES = -O0

View File

@@ -0,0 +1,2 @@
include $(CONFIG)/os/CONFIG.Common.vxWorks-ppc604_long
VXWORKS_VERSION = 6.2

View File

@@ -0,0 +1,5 @@
include $(CONFIG)/os/CONFIG.Common.vxWorks-ppc603_long
VXWORKS_VERSION = 6.3
# Buggy "uninitialized variable" warning produces many false positives
ARCH_DEP_CXXFLAGS += -Wno-uninitialized

View File

@@ -0,0 +1,5 @@
include $(CONFIG)/os/CONFIG.Common.vxWorks-ppc604_long
VXWORKS_VERSION = 6.3
# Buggy "uninitialized variable" warning produces many false positives
ARCH_DEP_CXXFLAGS += -Wno-uninitialized

View File

@@ -0,0 +1,2 @@
include $(CONFIG)/os/CONFIG.Common.vxWorks-ppc603_long
VXWORKS_VERSION = 6.6

View File

@@ -0,0 +1,2 @@
include $(CONFIG)/os/CONFIG.Common.vxWorks-ppc604_long
VXWORKS_VERSION = 6.6

View File

@@ -0,0 +1,8 @@
include $(CONFIG)/os/CONFIG.Common.vxWorks-ppc604_long
VXWORKS_VERSION = 6.7
# needed when including memPartLib.h, e.g. through moduleLib.h or loadLib.h
ARCH_DEP_CFLAGS += -D_VSB_CONFIG_FILE='<../lib/h/config/vsbConfig.h>'
# compiler tries to access license server (even though no license isneeded)
export LM_LICENSE_FILE=37000@lic-windriver.psi.ch

View File

@@ -0,0 +1,3 @@
include $(CONFIG)/os/CONFIG.Common.vxWorks-ppc32
VXWORKS_VERSION = 6.9
export LD_LIBRARY_PATH=$(WIND_BASE)/lmapi-5.0/$(WIND_HOST_TYPE)/lib

View File

@@ -0,0 +1,3 @@
include $(CONFIG)/os/CONFIG.Common.vxWorks-ppc604_long
VXWORKS_VERSION = 6.9
export LD_LIBRARY_PATH=$(WIND_BASE)/lmapi-5.0/$(WIND_HOST_TYPE)/lib

View File

@@ -0,0 +1,25 @@
# DeltaTau PowerPMAC with ELDK 4.2
# Include definitions common to all Linux targets
include $(CONFIG)/os/CONFIG.Common.linuxCommon
COMMANDLINE_LIBRARY = READLINE_NCURSES
ARCH_CLASS = ppc
ELDK=/opt/eldk-4.2
GNU_TARGET=ppc_4xxFP
GNU_DIR=$(ELDK)/usr
# This cross tool chain is installed in a somehow weired way
# Without the following lines it does not work on RHEL7
# but it worked on SL6
ARCH_DEP_CXXFLAGS += -I $(ELDK)/$(GNU_TARGET)/usr/include/c++/4.2.2
ARCH_DEP_CXXFLAGS += -I $(ELDK)/$(GNU_TARGET)/usr/include/c++/4.2.2/powerpc-linux
ARCH_DEP_CXXFLAGS += -I $(ELDK)/$(GNU_TARGET)/usr/include/c++/4.2.2/backward
ARCH_DEP_LDFLAGS += -Wl,-rpath-link,$(ELDK)/$(GNU_TARGET)/lib
ARCH_DEP_LDFLAGS += -Wl,-rpath-link,$(ELDK)/$(GNU_TARGET)/usr/lib
# have no C++11
STD_CXXFLAGS =

View File

@@ -0,0 +1,17 @@
# Virtex FPGA embedded Processor with ELDK 5.1
# Include definitions common to all Linux targets
include $(CONFIG)/os/CONFIG.Common.linuxCommon
ARCH_CLASS = ppc
SDK = eldk
SDK_DIR = /opt/eldk-5.1
SDK_HOST_ARCH = $(GNU_HOST_ARCH)-$(SDK)-$(GNU_HOST_OS)
GNU_TARGET = powerpc-4xx-softfloat
GNU_ARCH = ppc405-linux
GNU_DIR = $(SDK_DIR)/$(GNU_TARGET)/sysroots/$(SDK_HOST_ARCH)/usr
GNU_BIN = $(GNU_DIR)/bin/$(GNU_ARCH)
# have no full C++11
STD_CXXFLAGS = -std=c++0x

View File

@@ -0,0 +1,18 @@
# IOxOS IFC1210 with ELDK 5.2
# Include definitions common to all Linux targets
include $(CONFIG)/os/CONFIG.Common.linuxCommon
ARCH_CLASS = ppc
SDK = eldk
SDK_DIR = /opt/eldk-5.2
SDK_HOST_ARCH = $(GNU_HOST_ARCH)-$(SDK)-$(GNU_HOST_OS)
GNU_TARGET = powerpc-e500v2
GNU_ARCH = ppce500v2-linux-gnuspe
GNU_DIR = $(SDK_DIR)/$(GNU_TARGET)/sysroots/$(SDK_HOST_ARCH)/usr
GNU_BIN = $(GNU_DIR)/bin/$(GNU_ARCH)
GNU_TARGET_INCLUDE_DIR =
# have no full C++11
STD_CXXFLAGS = -std=c++0x

View File

@@ -0,0 +1,21 @@
# DeltaTau PowerPMAC with ELDK 5.3
# Include definitions common to all Linux targets
include $(CONFIG)/os/CONFIG.Common.linuxCommon
ARCH_CLASS = ppc
SDK = eldk
SDK_DIR = /opt/eldk-5.3
SDK_HOST_ARCH = $(GNU_HOST_ARCH)-$(SDK)-$(GNU_HOST_OS)
GNU_ARCH = ppc440e-linux
SDKTARGETSYSROOT=$(SDK_DIR)/powerpc-4xx/sysroots
GNU_DIR = $(SDKTARGETSYSROOT)/$(SDK_HOST_ARCH)/usr
GNU_BIN = $(GNU_DIR)/bin/$(GNU_ARCH)
GNU_TARGET_INCLUDE_DIR =
GNU_TARGET=powerpc-linux
ARCH_DEP_CPPFLAGS = -m32 -mcpu=440fp -mhard-float
ARCH_DEP_CPPFLAGS += --sysroot=$(SDKTARGETSYSROOT)/$(GNU_ARCH)
ARCH_DEP_LDFLAGS = --sysroot=$(SDKTARGETSYSROOT)/$(GNU_ARCH)
AS=$(GNU_BIN)/$(GNU_TARGET)-as

View File

@@ -0,0 +1,23 @@
# IOxOS IFC1211 with Freescale QorIQ 2.0 toolchain
# Include definitions common to all Linux targets
include $(CONFIG)/os/CONFIG.Common.linuxCommon
ARCH_CLASS = ppc
SDK = fslsdk
SDK_DIR = /opt/fsl-qoriq/2.0
SDK_HOST_ARCH = $(GNU_HOST_ARCH_64)-$(SDK)-$(GNU_HOST_OS)
SDK_TARGET = ppc64e6500-fsl-linux
GNU_TARGET = powerpc64-fsl-linux
SDKTARGETSYSROOT = $(SDK_DIR)/sysroots/$(SDK_TARGET)
GNU_DIR = $(SDK_DIR)/sysroots/$(SDK_HOST_ARCH)/usr
GNU_BIN = $(GNU_DIR)/bin/$(GNU_TARGET)
ARCH_DEP_CPPFLAGS = --sysroot=$(SDKTARGETSYSROOT)
ARCH_DEP_CFLAGS = -mcpu=e6500 -m64 -mhard-float
ARCH_DEP_LDFLAGS = --sysroot=$(SDKTARGETSYSROOT)
# warning -O2 and higher are broken!
#OPT_CFLAGS_YES = -O1
#OPT_CXXFLAGS_YES = -O1

View File

@@ -0,0 +1,5 @@
include $(CONFIG)/os/CONFIG.Common.linuxCommon
GNU = NO
CMPLR_CLASS = clang
CC = clang
CCC = clang++

View File

@@ -0,0 +1,19 @@
# Moxa DA-66x with SDK 4.2 and ARM7 processor
# Include definitions common to all Linux ARM targets
include $(CONFIG)/os/CONFIG.Common.linux-arm
GNU_DIR=/afs/psi.ch/project/embeddedlinux/moxa/arm-linux-4.4.2-v4
GNU_TARGET=arm
ARCH_DEP_LDFLAGS+=-Wl,-rpath-link,$(GNU_DIR)/arm-none-linux-gnueabi/lib
ARCH_DEP_LDFLAGS+=-Wl,-rpath-link,$(INSTALL_LIB)
COMMANDLINE_LIBRARY = READLINE_NCURSES
# suppress note "the mangling of 'va_list' has changed in GCC 4.4"
ARCH_DEP_CXXFLAGS += -Wno-psabi
ARCH_DEP_CFLAGS += -funwind-tables
# have no full C++11
STD_CXXFLAGS = -std=c++0x

View File

@@ -0,0 +1,18 @@
# Moxa DA-66x with Montavista Linux 4.0
# Include definitions common to all Linux targets
include $(CONFIG)/os/CONFIG.Common.linuxCommon
COMMANDLINE_LIBRARY = READLINE_CURSES
ARCH_CLASS = xscale
GNU_DIR=/afs/psi.ch/project/embeddedlinux/moxa/xscale_be/armv5teb-montavista-linuxeabi
ARCH_DEP_CFLAGS += -funwind-tables
# have no C++11
STD_CXXFLAGS =
# Cannot build PVA because of missing boost support
SKIP_BUILDS = pv% normativeTypes

View File

@@ -0,0 +1,18 @@
# National Instruments CompactRIO running LabView RT 19.5.1
# Include definitions common to all Linux targets
include $(CONFIG)/os/CONFIG.Common.linuxCommon
ARCH_CLASS = arm
GNU_TARGET = arm-linux-gnu
SYSROOT = /opt/LabVIEW-RT-19.5.1/arm/sysroots/armv7a-vfp-neon-nilrt-linux-gnueabi
ARCH_DEP_CPPFLAGS += -march=armv7-a -mthumb-interwork -mfloat-abi=softfp -mfpu=neon
ARCH_DEP_CPPFLAGS += --sysroot=$(SYSROOT)
ARCH_DEP_CPPFLAGS += -I$(SYSROOT)/usr/include/c++/4.7.2/arm-nilrt-linux-gnueabi/
ARCH_DEP_CPPFLAGS += -I$(SYSROOT)/usr/include/c++/4.7.2/
ARCH_DEP_LDFLAGS += --sysroot=$(SYSROOT)
COMMANDLINE_LIBRARY = READLINE_NCURSES

View File

@@ -0,0 +1,41 @@
# RaspberryPi with github.com/raspberrypi/tools toolchain
# Tested on:
# * Raspberry 3B+ Raspbian 9
# * Raspberry 2 Raspbian 7
# Include definitions common to all Linux targets
include $(CONFIG)/os/CONFIG.Common.linuxCommon
# Using readline:
# Due to missing/messed up libs in the toolchain, readline needs copies of
# libtinfo.so.5.9 and libreadline.so.6.2 from a Raspbian 7 rootfs
# /lib/arm-linux-gnueabihf/ to the toolchain, e.g.
# $(SDK_DIR)/gcc-linaro-arm-linux-gnueabihf-raspbian/arm-linux-gnueabihf/libc/lib/arm-linux-gnueabihf/
# and manually created links libtinfo.so.5 and libreadline.so.
# For gcc-linaro-arm-linux-gnueabihf-raspbian, an existing incompatible
# libtinfo.so.5 is in the way. Remove it.
# (Built with glibc 2.16 like installed on Raspbian 9 but toolchain uses glibc 2.13.)
# Also copy /usr/include/readline/ directory from some readline 6 installation
# to $(SDK_DIR)/gcc-linaro-arm-linux-gnueabihf-raspbian/arm-linux-gnueabihf/libc/usr/include/
ARCH_CLASS = arm
SDK_DIR = /opt/raspberrypi/arm-bcm2708
# Available SDK_TARGETs:
# gcc 4.8.3 for 32 bit hosts with GLIBC 2.3 or higher
SDK_TARGET = gcc-linaro-arm-linux-gnueabihf-raspbian
# gcc 4.8.3 for 64 bit hosts with GLIBC 2.14 or higher
# SDK_TARGET = gcc-linaro-arm-linux-gnueabihf-raspbian-x64
# gcc 4.7.1 for 64 bit hosts with GLIBC 2.8 or higher
# SDK_TARGET = arm-linux-gnueabihf
# gcc 4.7.1 for 32 bit hosts with GLIBC 2.4 or higher
# SDK_TARGET = arm-bcm2708hardfp-linux-gnueabi
# SDK_TARGET = arm-bcm2708-linux-gnueabi
GNU_DIR = $(SDK_DIR)/$(SDK_TARGET)
GNU_TARGET = $(if $(filter arm-bcm2708%,SDK_TARGET),$(SDK_TARGET),arm-linux-gnueabihf)

View File

@@ -14,6 +14,7 @@ ARCH_CLASS = ppc
# Architecture specific build flags
ARCH_DEP_CPPFLAGS = -DCPU=PPC32
ARCH_DEP_CPPFLAGS = -DCPU=PPC604
ARCH_DEP_CFLAGS = -mstrict-align
GNU_TARGET = powerpc-wrs-vxworks

View File

@@ -13,7 +13,7 @@ CMPLR_SUFFIX = ppc
ARCH_CLASS = ppc
# Architecture specific build flags
ARCH_DEP_CPPFLAGS = -DCPU=PPC603
ARCH_DEP_CPPFLAGS = -DCPU=PPC603
ARCH_DEP_CFLAGS = -mcpu=603 -mstrict-align
GNU_TARGET = powerpc-wrs-vxworks

View File

@@ -14,9 +14,12 @@ ARCH_CLASS = ppc
# Architecture specific build flags
ARCH_DEP_CPPFLAGS = -DCPU=PPC604
ARCH_DEP_CFLAGS_2 = -mcpu=604 -mstrict-align -mno-implicit-fp
ARCH_DEP_CFLAGS_3 = -mcpu=604 -mstrict-align -mno-implicit-fp
ARCH_DEP_CFLAGS_4 = -mcpu=604 -mstrict-align -fno-implicit-fp
ARCH_DEP_CFLAGS = $(ARCH_DEP_CFLAGS_$(VX_GNU_MAJOR_VERSION))
ARCH_DEP_CFLAGS = -mcpu=604 -mstrict-align
CODE_CFLAGS_2 = -mno-implicit-fp
CODE_CFLAGS_3 = -mno-implicit-fp
CODE_CFLAGS_4 = -fno-implicit-fp
CODE_CFLAGS += $(CODE_CFLAGS_$(VX_GNU_MAJOR_VERSION))
GNU_TARGET = powerpc-wrs-vxworks

View File

@@ -132,13 +132,6 @@ OPT_CXXFLAGS_YES = -O2
#--------------------------------------------------
# code flags
CODE_CFLAGS =
#
# For vxWorks versions before 6.3 we need this g++ compiler flag
CODE_CXXFLAGS_6.0 = -fno-implicit-templates
CODE_CXXFLAGS_6.1 = -fno-implicit-templates
CODE_CXXFLAGS_6.2 = -fno-implicit-templates
CODE_CXXFLAGS_6 = $(CODE_CXXFLAGS_$(VXWORKS_VERSION))
CODE_CXXFLAGS = $(CODE_CXXFLAGS_$(VXWORKS_MAJOR_VERSION))
#--------------------------------------------------
# no shared libs for vxWorks

View File

@@ -0,0 +1,18 @@
# XILINX Zynq with Yocto 2.1 / Petalinux toolchain
# Include definitions common to all Linux targets
include $(CONFIG)/os/CONFIG.Common.linuxCommon
ARCH_CLASS = arm64
SDK = petalinux
SDK_DIR = /opt/petalinux-gfa/2017.2
SDK_HOST_ARCH = $(GNU_HOST_ARCH_64)-$(SDK)-$(GNU_HOST_OS)
SDK_TARGET = aarch64-xilinx-linux
GNU_TARGET = $(SDK_TARGET)
SDKTARGETSYSROOT = $(SDK_DIR)/sysroots/$(SDK_TARGET)
GNU_DIR = $(SDK_DIR)/sysroots/$(SDK_HOST_ARCH)/usr
GNU_BIN = $(GNU_DIR)/bin/$(GNU_TARGET)
ARCH_DEP_CPPFLAGS = --sysroot=$(SDKTARGETSYSROOT)
ARCH_DEP_LDFLAGS = --sysroot=$(SDKTARGETSYSROOT)

View File

@@ -0,0 +1,3 @@
#CONFIG.$(EPICS_HOST_ARCH).Common is required by build system
#Include definitions common to linux hosts
include $(CONFIG)/os/CONFIG.linux-x86_64.Common

View File

@@ -0,0 +1,2 @@
# Include common linux definitions
include $(CONFIG)/os/CONFIG.linux-x86.linux-x86

View File

@@ -0,0 +1,6 @@
# "cross compile" for older Linux version (32 bit)
# It was neccessary to install 32 bit compatibility libraries manually
#-------------------------------------------------------
include $(CONFIG)/os/CONFIG.RHEL7-x86_64.SL6-x86_64
TARGET_LDFLAGS = -B /usr/lib/x86_64-redhat-linux6E/lib

View File

@@ -0,0 +1,16 @@
# "cross compile" for older Linux version
# Use older compiler and older libraries
# Used packages:
# compat-gcc-44-c++-4.4.7
# compat-gcc-44-4.4.7
# compat-glibc-headers-2.12
# compat-glibc-2.12
#-------------------------------------------------------
include $(CONFIG)/os/CONFIG.linux-x86.linux-x86
CC = $(GNU_BIN)/$(CMPLR_PREFIX)gcc44
CCC = $(GNU_BIN)/$(CMPLR_PREFIX)g++44
TARGET_CPPFLAGS = -isystem /usr/lib/x86_64-redhat-linux6E/include
TARGET_LDFLAGS = -B /usr/lib/x86_64-redhat-linux6E/lib64
LINK.cpp += --as-needed -lc -lm -lrt -lpthread -lreadline -ltinfo

View File

@@ -0,0 +1,8 @@
include $(CONFIG)/os/CONFIG.win32-x86.win32-x86
PATH_FILTER = $(subst /,/,$(1))
# Silence the tr1 namespace deprecation warnings
USR_CXXFLAGS_WIN32 += -D_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING
MSVC_DIR = /opt/wine-msvc-2017/bin/x86/

View File

@@ -0,0 +1,8 @@
include $(CONFIG)/os/CONFIG.windows-x64.windows-x64
PATH_FILTER = $(subst /,/,$(1))
# Silence the tr1 namespace deprecation warnings
USR_CXXFLAGS_WIN32 += -D_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING
MSVC_DIR = /opt/wine-msvc-2017/bin/x64/

View File

@@ -0,0 +1,3 @@
#CONFIG.$(EPICS_HOST_ARCH).Common is required by build system
#Include definitions common to linux hosts
include $(CONFIG)/os/CONFIG.linux-x86_64.Common

View File

@@ -0,0 +1,2 @@
# Include common linux definitions
include $(CONFIG)/os/CONFIG.linux-x86.linux-x86

View File

@@ -0,0 +1,8 @@
include $(CONFIG)/os/CONFIG.win32-x86.win32-x86
PATH_FILTER = $(subst /,/,$(1))
# Silence the tr1 namespace deprecation warnings
USR_CXXFLAGS_WIN32 += -D_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING
MSVC_DIR = /opt/wine-msvc-2017/bin/x86/

View File

@@ -0,0 +1,8 @@
include $(CONFIG)/os/CONFIG.windows-x64.windows-x64
PATH_FILTER = $(subst /,/,$(1))
# Silence the tr1 namespace deprecation warnings
USR_CXXFLAGS_WIN32 += -D_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING
MSVC_DIR = /opt/wine-msvc-2017/bin/x64/

View File

@@ -0,0 +1,2 @@
#CONFIG.$(EPICS_HOST_ARCH).Common is required by build system
#Include definitions common to linux hosts

View File

@@ -0,0 +1,2 @@
# Include common linux definitions
include $(CONFIG)/os/CONFIG.linux-x86.linux-x86

View File

@@ -0,0 +1,3 @@
#CONFIG.$(EPICS_HOST_ARCH).Common is required by build system
#Include definitions common to linux hosts
include $(CONFIG)/os/CONFIG.linux-x86_64.Common

View File

@@ -0,0 +1,2 @@
# Include common linux definitions
include $(CONFIG)/os/CONFIG.linux-x86.linux-x86

View File

@@ -0,0 +1,2 @@
# Include common linux definitions
include $(CONFIG)/os/CONFIG.linux-x86.linux-x86

View File

@@ -14,15 +14,15 @@ OPT_WHOLE_PROGRAM = YES
#-------------------------------------------------------
WINLINK = link
WINLINK = $(MSVC_DIR)link
RCCMD = rc -l 0x409 $(INCLUDES) -fo $@ $<
RCCMD = $(MSVC_DIR)rc -l 0x409 $(INCLUDES) -fo $@ $<
ARCMD = lib -nologo -verbose -out:$@ $(LIB_OPT_LDFLAGS) $(LIBRARY_LD_OBJS)
ARCMD = $(MSVC_DIR)lib -nologo -verbose -out:$@ $(LIB_OPT_LDFLAGS) $(LIBRARY_LD_OBJS)
#
# Configure OS vendor C compiler
CC = cl
CC = $(MSVC_DIR)cl
# Override CONFIG.gnuCommon settings for cross builds.
GNU = NO
@@ -75,14 +75,14 @@ STATIC_CFLAGS_YES= -MT$(VISC_CFLAGS_DEBUG) $(BUILD_DLL_CFLAGS)
STATIC_CFLAGS_NO= -MD$(VISC_CFLAGS_DEBUG) $(BUILD_DLL_CFLAGS) -DEPICS_CALL_DLL
# OS vendor c preprocessor
CPP = cl -nologo -C -E
CPP = $(MSVC_DIR)cl -nologo -C -E
# Configure OS vendor C++ compiler
#
# -EHsc - generate code for exceptions
# -GR - generate code for run time type identification
#
CCC = cl -EHsc -GR
CCC = $(MSVC_DIR)cl -EHsc -GR
# Other compiler flags, used for CPP, C and C++
#

View File

@@ -0,0 +1,2 @@
SHRLIB_SUFFIX = $(SHRLIB_SUFFIX_BASE)
LOADABLE_SHRLIB_SUFFIX = $(SHRLIB_SUFFIX_BASE)

View File

@@ -8,3 +8,7 @@
# They must be set in the host+target specific file instead:
# CONFIG_SITE.<linux-arch>.<linux-arch>
COMMANDLINE_LIBRARY = READLINE
CODE_CPPFLAGS += -fno-strict-aliasing
USR_CXXFLAGS += $(STD_CXXFLAGS)
STD_CXXFLAGS = -std=c++11

View File

@@ -2,24 +2,72 @@
#
# Site specific definitions for vxWorks target builds.
# Compiler options can vary with the vxWorks version number, so we
# need to know that. Do not include any third-level digits.
#### Fixes for CONFIG.Common.vxWorksCommon #######
# 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 = 6.6
#VXWORKS_VERSION = 6.7
#VXWORKS_VERSION = 6.8
VXWORKS_VERSION = 6.9
VX_GNU_VERSION_7 = 4.8.1.11
# Sites may override the following path for a particular host
# architecture by adding it to an appropriate
# CONFIG_SITE.$(EPICS_HOST_ARCH).vxWorksCommon file.
# These are needed for vxWorks 6.x; the GNU toolset version number
# is in the path to the compiler tools:
VX_GNU_VERSION_5 = 2.96
VX_GNU_VERSION_6 = $(VX_GNU_VERSION_$(VXWORKS_VERSION))
VX_GNU_VERSION = $(VX_GNU_VERSION_$(VXWORKS_MAJOR_VERSION))
VX_GNU_MAJOR_VERSION = $(firstword $(subst ., ,$(VX_GNU_VERSION)))
VX_GNU_MINOR_VERSION = $(word 2,$(subst ., ,$(VX_GNU_VERSION)))
# gcc version before 3.4 are "old" and need special treatment
VX_OLD_GCC_2 = OLD
VX_OLD_GCC_3.3 = OLD
VX_OLD_GCC_3 = $(VX_OLD_GCC_3.$(VX_GNU_MINOR_VERSION))
VX_OLD_GCC = $(VX_OLD_GCC_$(VX_GNU_MAJOR_VERSION))
# vxWorks directory definitions
VX_DIR_5 = $(WIND_BASE)
VX_DIR_6 = $(WIND_BASE)/vxworks-$(VXWORKS_VERSION)
VX_DIR_7 = $(WIND_BASE)/vxworks-$(VXWORKS_VERSION)/pkgs/os
VX_DIR = $(VX_DIR_$(VXWORKS_MAJOR_VERSION))
VX_INCLUDE_DIRS_5 = $(VX_DIR)/target/h
VX_INCLUDE_DIRS_6 = $(VX_DIR)/target/h
VX_INCLUDE_DIRS_6 += $(VX_DIR)/target/h/wrn/coreip
VX_INCLUDE_DIRS_7 = $(VX_DIR)/core/kernel-1.2.8.0/h
VX_INCLUDE_DIRS_7 += $(VX_DIR)/lang-lib/libc-1.0.0.1/libc-kernel-1.0.8.0/h
VX_INCLUDE_DIRS_7 += $(VX_DIR)/utils/ostools-1.0.5.0/h
VX_INCLUDE_DIRS_7 += $(VX_DIR)/utils/ostools-1.0.5.0/shareh
VX_INCLUDE_DIRS_7 += $(VX_DIR)/arch/ppc-1.3.4.0/kernel/base/h/
VX_INCLUDE_DIRS_7 += $(VX_DIR)/arch/ppc-1.3.4.0/kernel/60x/h/arch/ppc/
VX_INCLUDE_DIRS_7 += $(WIND_BASE)/vxworks-$(VXWORKS_VERSION)/samples/prebuilt_projects/vsb_vxsim_linux/krnl/h/public
GNU_TARGET_INCLUDE_DIR = $(VX_INCLUDE_DIRS_$(VXWORKS_MAJOR_VERSION))
TARGET_CPPFLAGS_5 = -isystem $(VX_DIR)/target/h
TARGET_CPPFLAGS_6 = -isystem $(VX_DIR)/target/h
TARGET_CPPFLAGS_7 = -isystem $(VX_DIR)/core/kernel-1.2.8.0/h -D_VSB_CONFIG_FILE='<$(WIND_BASE)/vxworks-$(VXWORKS_VERSION)/samples/prebuilt_projects/vsb_vxsim_linux/h/config/vsbConfig.h>'
TARGET_CPPFLAGS = $(TARGET_CPPFLAGS_$(VXWORKS_MAJOR_VERSION))
# 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_7 = $(WIND_BASE)/compilers/gnu-$(VX_GNU_VERSION)/$(WIND_HOST_TYPE)
GNU_DIR = $(GNU_DIR_$(VXWORKS_MAJOR_VERSION))
# Operating system flags
OP_SYS_CFLAGS += -fno-strict-aliasing
OP_SYS_INCLUDE_CPPFLAGS_5 += -include $(VX_DIR)/target/h/vxWorks.h
OP_SYS_INCLUDE_CPPFLAGS_6 += -include $(VX_DIR)/target/h/vxWorks.h
OP_SYS_INCLUDE_CPPFLAGS_7 += -include vxWorks.h
OP_SYS_INCLUDE_CPPFLAGS = $(OP_SYS_INCLUDE_CPPFLAGS_$(VXWORKS_MAJOR_VERSION))
# WIND_BASE is where you installed the Wind River software.
WIND_BASE = /afs/psi.ch/project/vxworks/VxWorks$(VXWORKS_VERSION)
#--------------------------------------------------
# Modules we cannot build with old compiler
PV_MODULES = pv% normativeTypes
SKIP_BUILDS_5 = $(PV_MODULES)
SKIP_BUILDS_OLD = $(PV_MODULES)
SKIP_BUILDS_6 = $(SKIP_BUILDS_$(VX_OLD_GCC))
SKIP_BUILDS = $(SKIP_BUILDS_$(VXWORKS_MAJOR_VERSION))
#WIND_BASE = /usr/local/vw/tornado22-$(ARCH_CLASS)
WIND_BASE = /usr/local/vw/vxWorks-$(VXWORKS_VERSION)
#WIND_BASE = /ade/vxWorks/$(VXWORKS_VERSION)

View File

@@ -0,0 +1,17 @@
include $(CONFIG)/os/CONFIG_SITE.linux-x86_64.Common
# Improved error checking with clang
CROSS_COMPILER_TARGET_ARCHS += RHEL7-x86_64-clang
# Build for old SL6 64 bit
CROSS_COMPILER_TARGET_ARCHS += SL6-x86_64
# Build for old SL6 32 bit
CROSS_COMPILER_TARGET_ARCHS += SL6-x86
# NI Linux Real-Time 7.x
# requires RPM gcc-c++-arm-linux-gnu
CROSS_COMPILER_TARGET_ARCHS += nilrt7-armv7a
# Windows cross builds using Wine
CROSS_COMPILER_TARGET_ARCHS += win32-x86 windows-x64

View File

@@ -0,0 +1,18 @@
include $(CONFIG)/os/CONFIG_SITE.linux-x86_64.Common
# Improved error checking with clang
CROSS_COMPILER_TARGET_ARCHS += RHEL8-x86_64-clang
# Build for old SL6 64 bit
#CROSS_COMPILER_TARGET_ARCHS += SL6-x86_64
# Build for old SL6 32 bit
#CROSS_COMPILER_TARGET_ARCHS += SL6-x86
# NI Linux Real-Time 7.x
# requires RPM gcc-c++-arm-linux-gnu
# not available yet for RHEL8
#CROSS_COMPILER_TARGET_ARCHS += nilrt7-armv7a
# Windows cross builds using Wine
CROSS_COMPILER_TARGET_ARCHS += win32-x86 windows-x64

View File

@@ -0,0 +1 @@
include $(CONFIG)/os/CONFIG_SITE.linux-x86.Common

View File

@@ -0,0 +1,7 @@
# Build 32 bit version as a cross architecture
#CROSS_COMPILER_TARGET_ARCHS += SL6-x86
# Improved error checking with clang
#CROSS_COMPILER_TARGET_ARCHS += SL6-x86_64-clang
include $(CONFIG)/os/CONFIG_SITE.linux-x86_64.Common

View File

@@ -1,9 +1,46 @@
# CONFIG_SITE.linux-x86.Common
#
# Site override definitions for linux-x86 host builds
#-------------------------------------------------------
INSTALL_LOCATION=/usr/local/epics/base-$(EPICS_VERSION).$(EPICS_REVISION).$(EPICS_MODIFICATION)
# JBA test override values
#CROSS_COMPILER_TARGET_ARCHS = vxWorks-68040 solaris-sparc
#CROSS_COMPILER_TARGET_ARCHS = vxWorks-68040
#CROSS_COMPILER_TARGET_ARCHS = RTEMS-mvme2100 RTEMS-pc386 # RTEMS-mvme5500 RTEMS-mvme167
GNU_HOST_ARCH=i686
GNU_HOST_OS=linux
# LD_LIBRARY_PATH may cause problems for eldk53-ppc4xxFP
LD_LIBRARY_PATH=
# vxWorks 5.5 for MVxxxx boards
CROSS_COMPILER_TARGET_ARCHS += T2-ppc604
# vxWorks 6.7 for MVxxxx boards
CROSS_COMPILER_TARGET_ARCHS += V67-ppc604
# vxWorks 6.9 for MVxxxx boards
CROSS_COMPILER_TARGET_ARCHS += V69-ppc604
CROSS_COMPILER_TARGET_ARCHS += V69-ppc32
# NI compact RIO
CROSS_COMPILER_TARGET_ARCHS += V63-ppc603
# MOXA montavista linux (No PVA because of missing boost support)
CROSS_COMPILER_TARGET_ARCHS += mvl40-xscale_be
# MOXA SDK 4.2
CROSS_COMPILER_TARGET_ARCHS += moxa42-armv6l
# Virtex embedded PPC
CROSS_COMPILER_TARGET_ARCHS += eldk51-ppc4xxSF
# IOxOS IFC1210
CROSS_COMPILER_TARGET_ARCHS += eldk52-e500v2
# DeltaTau PowerPMAC
CROSS_COMPILER_TARGET_ARCHS += eldk42-ppc4xxFP
CROSS_COMPILER_TARGET_ARCHS += eldk53-ppc4xxFP
# Test other vxWorks versions
#CROSS_COMPILER_TARGET_ARCHS += V66-ppc603
CROSS_COMPILER_TARGET_ARCHS += V66-ppc604
#CROSS_COMPILER_TARGET_ARCHS += V63-ppc604
# (No PVA because of old compiler)
CROSS_COMPILER_TARGET_ARCHS += V62-ppc604
# Raspberry Pi
CROSS_COMPILER_TARGET_ARCHS += raspbian-arm

View File

@@ -1,9 +1,9 @@
# CONFIG_SITE.linux-x86_64.Common
#
# Site override definitions for linux-x86_64 host builds
#-------------------------------------------------------
include $(CONFIG)/os/CONFIG_SITE.linux-x86.Common
#CROSS_COMPILER_TARGET_ARCHS = vxWorks-68040 solaris-sparc
#CROSS_COMPILER_TARGET_ARCHS = vxWorks-68040
#CROSS_COMPILER_TARGET_ARCHS = RTEMS-mvme2100
GNU_HOST_ARCH_64=x86_64
# IOxOS IFC1211
CROSS_COMPILER_TARGET_ARCHS += fslqoriq20-e6500_64
# Zynq
CROSS_COMPILER_TARGET_ARCHS += yocto21-aarch64

View File

@@ -107,7 +107,7 @@ BRIEF_MEMBER_DESC = YES
# brief descriptions will be completely suppressed.
# The default value is: YES.
REPEAT_BRIEF = YES
REPEAT_BRIEF = NO
# This tag implements a quasi-intelligent brief description abbreviator that is
# used to form the text in various listings. Each string in this list, if found
@@ -143,7 +143,7 @@ ALWAYS_DETAILED_SEC = NO
# operators of the base classes will not be shown.
# The default value is: NO.
INLINE_INHERITED_MEMB = NO
INLINE_INHERITED_MEMB = YES
# If the FULL_PATH_NAMES tag is set to YES doxygen will prepend the full path
# before files name in the file list and in the header files. If set to NO the
@@ -162,8 +162,8 @@ FULL_PATH_NAMES = YES
# will be relative from the directory where doxygen is started.
# This tag requires that the tag FULL_PATH_NAMES is set to YES.
STRIP_FROM_PATH = \
../
STRIP_FROM_PATH = @TOP@/include \
..
# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the
# path mentioned in the documentation of a class, which tells the reader which
@@ -172,7 +172,8 @@ STRIP_FROM_PATH = \
# specify the list of include paths that are normally passed to the compiler
# using the -I flag.
STRIP_FROM_INC_PATH = ../
STRIP_FROM_INC_PATH = @TOP@/include \
..
# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but
# less readable) file names. This can be useful is your file systems doesn't
@@ -227,7 +228,7 @@ SEPARATE_MEMBER_PAGES = NO
# uses this value to replace tabs by spaces in code fragments.
# Minimum value: 1, maximum value: 16, default value: 4.
TAB_SIZE = 4
TAB_SIZE = 8
# This tag can be used to specify a number of aliases that act as commands in
# the documentation. An alias has the form:
@@ -241,12 +242,6 @@ TAB_SIZE = 4
ALIASES =
# This tag can be used to specify a number of word-keyword mappings (TCL only).
# A mapping has the form "name=value". For example adding "class=itcl::class"
# will allow you to use the command class in the itcl::class meaning.
TCL_SUBST =
# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources
# only. Doxygen will then generate output that is more tailored for C. For
# instance, some of the names that are used will be different. The list of all
@@ -420,7 +415,7 @@ LOOKUP_CACHE_SIZE = 0
# normally produced when WARNINGS is set to YES.
# The default value is: NO.
EXTRACT_ALL = YES
EXTRACT_ALL = NO
# If the EXTRACT_PRIVATE tag is set to YES all private members of a class will
# be included in the documentation.
@@ -548,7 +543,7 @@ INLINE_INFO = YES
# name. If set to NO the members will appear in declaration order.
# The default value is: YES.
SORT_MEMBER_DOCS = YES
SORT_MEMBER_DOCS = NO
# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief
# descriptions of file, namespace and class members alphabetically by member
@@ -767,7 +762,8 @@ WARN_LOGFILE =
INPUT = ../mainpage.dox \
../RELEASE_NOTES.md \
../README.md \
../RecordReference.md
../RecordReference.md \
@TOP@/include
# This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
@@ -787,48 +783,10 @@ INPUT_ENCODING = UTF-8
# *.md, *.mm, *.dox, *.py, *.f90, *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf,
# *.qsf, *.as and *.js.
FILE_PATTERNS = *.c \
*.cc \
*.cxx \
*.cpp \
*.c++ \
*.java \
*.ii \
*.ixx \
*.ipp \
*.i++ \
*.inl \
*.idl \
*.ddl \
*.odl \
*.h \
*.hh \
*.hxx \
FILE_PATTERNS = *.h \
*.hpp \
*.h++ \
*.cs \
*.d \
*.php \
*.php4 \
*.php5 \
*.phtml \
*.inc \
*.m \
*.markdown \
*.md \
*.mm \
*.dox \
*.py \
*.f90 \
*.f \
*.for \
*.tcl \
*.vhd \
*.vhdl \
*.ucf \
*.qsf \
*.as \
*.js
*.dox
# The RECURSIVE tag can be used to specify whether or not subdirectories should
# be searched for input files as well.
@@ -843,7 +801,8 @@ RECURSIVE = YES
# Note that relative paths are relative to the directory from which doxygen is
# run.
EXCLUDE =
EXCLUDE = @TOP@/include/pv \
@TOP@/include/pva
# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
# directories that are symbolic links (a Unix file system feature) are excluded
@@ -859,7 +818,7 @@ EXCLUDE_SYMLINKS = NO
# Note that the wildcards are matched against the file with absolute path, so to
# exclude all test directories for example use the pattern */test/*
EXCLUDE_PATTERNS = O.*
EXCLUDE_PATTERNS = /O.*/
# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
# (namespaces, classes, functions, etc.) that should be excluded from the
@@ -2028,7 +1987,7 @@ INCLUDE_FILE_PATTERNS =
# recursively expanded use the := operator instead of the = operator.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
PREDEFINED =
PREDEFINED = __cplusplus
# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
# tag can be used to specify a list of macro names that should be expanded. The
@@ -2047,7 +2006,7 @@ EXPAND_AS_DEFINED =
# The default value is: YES.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
SKIP_FUNCTION_MACROS = YES
SKIP_FUNCTION_MACROS = NO
#---------------------------------------------------------------------------
# Configuration options related to external references
@@ -2094,12 +2053,6 @@ EXTERNAL_GROUPS = YES
EXTERNAL_PAGES = YES
# The PERL_PATH should be the absolute path and name of the perl script
# interpreter (i.e. the result of 'which perl').
# The default file (with absolute path) is: /usr/bin/perl.
PERL_PATH = /usr/bin/perl
#---------------------------------------------------------------------------
# Configuration options related to the dot tool
#---------------------------------------------------------------------------
@@ -2113,15 +2066,6 @@ PERL_PATH = /usr/bin/perl
CLASS_DIAGRAMS = YES
# You can define message sequence charts within doxygen comments using the \msc
# command. Doxygen will then run the mscgen tool (see:
# http://www.mcternan.me.uk/mscgen/)) to produce the chart and insert it in the
# documentation. The MSCGEN_PATH tag allows you to specify the directory where
# the mscgen tool resides. If left empty the tool is assumed to be found in the
# default search path.
MSCGEN_PATH =
# You can include diagrams made with dia in doxygen documentation. Doxygen will
# then run dia to produce the diagram and insert it in the documentation. The
# DIA_PATH tag allows you to specify the directory where the dia binary resides.

View File

@@ -1,22 +1,24 @@
TOP = ..
include $(TOP)/configure/CONFIG
ifdef T_A
ifeq ($(T_A),$(EPICS_HOST_ARCH))
DOXYGEN=doxygen
EXPAND = Doxyfile
EXPAND = Doxyfile@
EXPAND_ME += EPICS_VERSION
EXPAND_ME += EPICS_REVISION
EXPAND_ME += EPICS_MODIFICATION
EXPAND_ME += EPICS_PATCH_LEVEL
EXPAND_ME += OS_CLASS CMPLR_CLASS
ME = documentation/O.$(T_A)/html
GH_FILES = $(ME)/ $(ME)/.nojekyll $(ME)/*.* $(ME)/*/*.*
install: doxygen
doxygen: Doxyfile
doxygen: Doxyfile ../mainpage.dox
$(DOXYGEN)
rsync -av $(TOP)/html/ html/
@@ -24,10 +26,10 @@ doxygen: Doxyfile
commit: doxygen
$(TOUCH) html/.nojekyll
(cd $(TOP) && $(CURDIR)/../commit-gh.sh $(ME)/ $(ME)/.nojekyll $(ME)/*.* $(ME)/*/*.*)
(cd $(TOP) && $(CURDIR)/../commit-gh.sh $(GH_FILES))
.PHONY: commit
endif # T_A
endif # EPICS_HOST_ARCH
include $(TOP)/configure/RULES

View File

@@ -11,6 +11,15 @@ release.
The PVA submodules each have their own individual sets of release notes which
should also be read to understand what has changed since earlier releases.
**This version of EPICS has not been released yet.**
## Changes made on the 7.0 branch since 7.0.5
<!-- Insert new items immediately below here ... -->
-----
## EPICS Release 7.0.5
### Fix aai's Device Support Initialization
@@ -448,7 +457,7 @@ work with older Base releases.
This would also be a good time to modify the device support to use the type-safe
device support entry tables that were introduced in Base-3.16.2 -- see
[#type-safe-device-and-driver-support-tables](this entry below) for the
[this entry below](#type-safe-device-and-driver-support-tables) for the
description of that change, which is also optional for now.
Look at the aiRecord for example. Near the top of the generated `aiRecord.h`

View File

@@ -3,7 +3,6 @@
Documentation index
@ul
@li @ref releasenotes
@li @ref install
@li @ref recordrefmanual

View File

@@ -37,6 +37,9 @@ pva2pva_DEPEND_DIRS = pvAccess
SUBMODULES += example
example_DEPEND_DIRS = pva2pva pvaClient
SUBMODULES += pcas
pcas_DEPEND_DIRS = ca
# Allow sites to add extra submodules
-include Makefile.local

View File

@@ -38,6 +38,7 @@ ifeq ($(wildcard $(PERL_h)),)
endif
endif
ifneq (inc,$(strip $(MAKECMDGOALS)))
ifeq ($(T_A),$(EPICS_HOST_ARCH)) # No cross-builds (wrong Perl!)
ifeq ($(strip $(XSUBPP)),)
$(warning Perl's xsubpp program was not found.)
@@ -62,6 +63,7 @@ endif
endif
endif
endif
endif
Cap5_SRCS = Cap5.xs
Cap5_LIBS = ca Com

View File

@@ -120,7 +120,9 @@ static void ascarCallFunc(const iocshArgBuf *args)
}
/* asDumpHash */
static const iocshFuncDef asDumpHashFuncDef = {"asDumpHash",0,0};
static const iocshFuncDef asDumpHashFuncDef = {"asDumpHash",0,0,
"Show the contents of the hash table used "
"to locate UAGs and HAGs.\n"};
static void asDumpHashCallFunc(const iocshArgBuf *args)
{
asDumpHash();

View File

@@ -19,7 +19,10 @@ BPT_DBD += bptTypeJdegC.dbd
BPT_DBD += bptTypeJdegF.dbd
BPT_DBD += bptTypeKdegC.dbd
BPT_DBD += bptTypeKdegF.dbd
ifneq (inc,$(strip $(MAKECMDGOALS)))
DBD += $(BPT_DBD)
endif
PROD_HOST += makeBpt

View File

@@ -42,6 +42,7 @@ INC += dbState.h
INC += db_access_routines.h
INC += db_convert.h
INC += dbUnitTest.h
INC += dbCaPvt.h
# Generate menuGlobal.dbd, not really by concatenation, see RULES
DBDCAT += menuGlobal.dbd

View File

@@ -339,7 +339,7 @@ static void getOptions(DBADDR *paddr, char **poriginal, long *options,
dbCommon *pcommon;
char *pbuffer = *poriginal;
if (!pfl || pfl->type == dbfl_type_rec)
if (!pfl)
field_type = paddr->field_type;
else
field_type = pfl->field_type;
@@ -349,7 +349,7 @@ static void getOptions(DBADDR *paddr, char **poriginal, long *options,
if( (*options) & DBR_STATUS ) {
unsigned short *pushort = (unsigned short *)pbuffer;
if (!pfl || pfl->type == dbfl_type_rec) {
if (!pfl) {
*pushort++ = pcommon->stat;
*pushort++ = pcommon->sevr;
} else {
@@ -383,7 +383,7 @@ static void getOptions(DBADDR *paddr, char **poriginal, long *options,
if( (*options) & DBR_TIME ) {
epicsUInt32 *ptime = (epicsUInt32 *)pbuffer;
if (!pfl || pfl->type == dbfl_type_rec) {
if (!pfl) {
*ptime++ = pcommon->time.secPastEpoch;
*ptime++ = pcommon->time.nsec;
} else {
@@ -904,22 +904,23 @@ long dbGet(DBADDR *paddr, short dbrType,
if (nRequest && *nRequest == 0)
return 0;
if (!pfl || pfl->type == dbfl_type_rec) {
if (!pfl) {
field_type = paddr->field_type;
no_elements = capacity = paddr->no_elements;
/* Update field info from record
* may modify paddr->pfield
*/
if (paddr->pfldDes->special == SPC_DBADDR &&
(prset = dbGetRset(paddr)) &&
prset->get_array_info) {
status = prset->get_array_info(paddr, &no_elements, &offset);
} else
offset = 0;
} else {
field_type = pfl->field_type;
no_elements = capacity = pfl->no_elements;
}
/* Update field info from record (if neccessary);
* may modify paddr->pfield.
*/
if (!dbfl_has_copy(pfl) &&
paddr->pfldDes->special == SPC_DBADDR &&
(prset = dbGetRset(paddr)) &&
prset->get_array_info) {
status = prset->get_array_info(paddr, &no_elements, &offset);
} else {
offset = 0;
}
@@ -951,7 +952,7 @@ long dbGet(DBADDR *paddr, short dbrType,
goto done;
}
if (!pfl || pfl->type == dbfl_type_rec) {
if (!dbfl_has_copy(pfl)) {
status = dbFastGetConvertRoutine[field_type][dbrType]
(paddr->pfield, pbuf, paddr);
} else {
@@ -964,11 +965,9 @@ long dbGet(DBADDR *paddr, short dbrType,
localAddr.field_type = pfl->field_type;
localAddr.field_size = pfl->field_size;
/* not used by dbFastConvert: */
localAddr.no_elements = pfl->no_elements;
if (pfl->type == dbfl_type_val)
localAddr.pfield = (char *) &pfl->u.v.field;
else
localAddr.pfield = (char *) pfl->u.r.field;
localAddr.pfield = dbfl_pfield(pfl);
status = dbFastGetConvertRoutine[field_type][dbrType]
(localAddr.pfield, pbuf, &localAddr);
}
@@ -979,6 +978,8 @@ long dbGet(DBADDR *paddr, short dbrType,
if (nRequest) {
if (no_elements < *nRequest)
*nRequest = no_elements;
if (capacity < *nRequest)
*nRequest = capacity;
n = *nRequest;
} else {
n = 1;
@@ -995,8 +996,8 @@ long dbGet(DBADDR *paddr, short dbrType,
}
/* convert data into the caller's buffer */
if (n <= 0) {
;/*do nothing*/
} else if (!pfl || pfl->type == dbfl_type_rec) {
; /*do nothing */
} else if (!dbfl_has_copy(pfl)) {
status = convert(paddr, pbuf, n, capacity, offset);
} else {
DBADDR localAddr = *paddr; /* Structure copy */
@@ -1008,11 +1009,9 @@ long dbGet(DBADDR *paddr, short dbrType,
localAddr.field_type = pfl->field_type;
localAddr.field_size = pfl->field_size;
/* not used by dbConvert, it uses the passed capacity instead: */
localAddr.no_elements = pfl->no_elements;
if (pfl->type == dbfl_type_val)
localAddr.pfield = (char *) &pfl->u.v.field;
else
localAddr.pfield = (char *) pfl->u.r.field;
localAddr.pfield = dbfl_pfield(pfl);
status = convert(&localAddr, pbuf, n, capacity, offset);
}

View File

@@ -52,14 +52,12 @@ typedef struct parseContext {
static void *dbChannelFreeList;
static void *chFilterFreeList;
static void *dbchStringFreeList;
void dbChannelExit(void)
{
freeListCleanup(dbChannelFreeList);
freeListCleanup(chFilterFreeList);
freeListCleanup(dbchStringFreeList);
dbChannelFreeList = chFilterFreeList = dbchStringFreeList = NULL;
dbChannelFreeList = chFilterFreeList = NULL;
}
void dbChannelInit (void)
@@ -69,7 +67,6 @@ void dbChannelInit (void)
freeListInitPvt(&dbChannelFreeList, sizeof(dbChannel), 128);
freeListInitPvt(&chFilterFreeList, sizeof(chFilter), 64);
freeListInitPvt(&dbchStringFreeList, sizeof(epicsOldString), 128);
db_init_event_freelists();
}
@@ -449,28 +446,6 @@ static long parseArrayRange(dbChannel* chan, const char *pname, const char **ppn
return status;
}
/* Stolen from dbAccess.c: */
static short mapDBFToDBR[DBF_NTYPES] =
{
/* DBF_STRING => */DBR_STRING,
/* DBF_CHAR => */DBR_CHAR,
/* DBF_UCHAR => */DBR_UCHAR,
/* DBF_SHORT => */DBR_SHORT,
/* DBF_USHORT => */DBR_USHORT,
/* DBF_LONG => */DBR_LONG,
/* DBF_ULONG => */DBR_ULONG,
/* DBF_INT64 => */DBR_INT64,
/* DBF_UINT64 => */DBR_UINT64,
/* DBF_FLOAT => */DBR_FLOAT,
/* DBF_DOUBLE => */DBR_DOUBLE,
/* DBF_ENUM, => */DBR_ENUM,
/* DBF_MENU, => */DBR_ENUM,
/* DBF_DEVICE => */DBR_ENUM,
/* DBF_INLINK => */DBR_STRING,
/* DBF_OUTLINK => */DBR_STRING,
/* DBF_FWDLINK => */DBR_STRING,
/* DBF_NOACCESS => */DBR_NOACCESS };
dbChannel * dbChannelCreate(const char *name)
{
const char *pname = name;
@@ -743,37 +718,24 @@ void dbChannelDelete(dbChannel *chan)
freeListFree(dbChannelFreeList, chan);
}
static void freeArray(db_field_log *pfl) {
if (pfl->field_type == DBF_STRING && pfl->no_elements == 1) {
freeListFree(dbchStringFreeList, pfl->u.r.field);
} else {
free(pfl->u.r.field);
}
}
void dbChannelMakeArrayCopy(void *pvt, db_field_log *pfl, dbChannel *chan)
/*
* Helper function to adjust no_elements, offset, and pfield
* when copying an array from a record.
*/
void dbChannelGetArrayInfo(dbChannel *chan,
void **pfield, long *no_elements, long *offset)
{
void *p;
struct dbCommon *prec = dbChannelRecord(chan);
if (pfl->type != dbfl_type_rec) return;
pfl->type = dbfl_type_ref;
pfl->stat = prec->stat;
pfl->sevr = prec->sevr;
pfl->time = prec->time;
pfl->field_type = chan->addr.field_type;
pfl->no_elements = chan->addr.no_elements;
pfl->field_size = chan->addr.field_size;
pfl->u.r.dtor = freeArray;
pfl->u.r.pvt = pvt;
if (pfl->field_type == DBF_STRING && pfl->no_elements == 1) {
p = freeListCalloc(dbchStringFreeList);
} else {
p = calloc(pfl->no_elements, pfl->field_size);
rset *prset;
if (dbChannelSpecial(chan) == SPC_DBADDR &&
(prset = dbGetRset(&chan->addr)) &&
prset->get_array_info)
{
void *pfieldsave = dbChannelField(chan);
/* it is expected that this call always succeeds */
prset->get_array_info(&chan->addr, no_elements, offset);
*pfield = dbChannelField(chan);
dbChannelField(chan) = pfieldsave;
}
if (p) dbGet(&chan->addr, mapDBFToDBR[pfl->field_type], p, NULL, &pfl->no_elements, NULL);
pfl->u.r.field = p;
}
/* FIXME: Do these belong in a different file? */

View File

@@ -65,8 +65,8 @@ typedef struct dbChannel {
/* Prototype for the channel event function that is called in filter stacks
*
* When invoked the scan lock for the record associated with 'chan' _may_ be locked.
* If pLog->type==dbfl_type_rec then dbScanLock() must be called before copying
* data out of the associated record.
* Unless dbfl_has_copy(pLog), it must call dbScanLock before accessing the data,
* as this indicates the data is still owned by the record.
*
* This function has ownership of the field log pLog, if it wishes to discard
* this update it should free the field log with db_delete_field_log() and
@@ -225,7 +225,8 @@ DBCORE_API void dbRegisterFilter(const char *key, const chFilterIf *fif, void *p
DBCORE_API db_field_log* dbChannelRunPreChain(dbChannel *chan, db_field_log *pLogIn);
DBCORE_API db_field_log* dbChannelRunPostChain(dbChannel *chan, db_field_log *pLogIn);
DBCORE_API const chFilterPlugin * dbFindFilter(const char *key, size_t len);
DBCORE_API void dbChannelMakeArrayCopy(void *pvt, db_field_log *pfl, dbChannel *chan);
DBCORE_API void dbChannelGetArrayInfo(dbChannel *chan,
void **pfield, long *no_elements, long *offset);
#ifdef __cplusplus
}

View File

@@ -668,27 +668,21 @@ int db_post_extra_labor (dbEventCtx ctx)
return DB_EVENT_OK;
}
/*
* DB_CREATE_EVENT_LOG()
*
* NOTE: This assumes that the db scan lock is already applied
* (as it copies data from the record)
*/
db_field_log* db_create_event_log (struct evSubscrip *pevent)
static db_field_log* db_create_field_log (struct dbChannel *chan, int use_val)
{
db_field_log *pLog = (db_field_log *) freeListCalloc(dbevFieldLogFreeList);
if (pLog) {
struct dbChannel *chan = pevent->chan;
struct dbCommon *prec = dbChannelRecord(chan);
pLog->ctx = dbfl_context_event;
if (pevent->useValque) {
pLog->stat = prec->stat;
pLog->sevr = prec->sevr;
pLog->time = prec->time;
pLog->field_type = dbChannelFieldType(chan);
pLog->field_size = dbChannelFieldSize(chan);
pLog->no_elements = dbChannelElements(chan);
if (use_val) {
pLog->type = dbfl_type_val;
pLog->stat = prec->stat;
pLog->sevr = prec->sevr;
pLog->time = prec->time;
pLog->field_type = dbChannelFieldType(chan);
pLog->no_elements = dbChannelElements(chan);
/*
* use memcpy to avoid a bus error on
* union copy of char in the db at an odd
@@ -698,23 +692,46 @@ db_field_log* db_create_event_log (struct evSubscrip *pevent)
dbChannelField(chan),
dbChannelFieldSize(chan));
} else {
pLog->type = dbfl_type_rec;
pLog->type = dbfl_type_ref;
/* don't make a copy yet, just reference the field value */
pLog->u.r.field = dbChannelField(chan);
/* indicate field value still owned by record */
pLog->u.r.dtor = NULL;
/* no private data yet, may be set by a filter */
pLog->u.r.pvt = NULL;
}
}
return pLog;
}
/*
* DB_CREATE_EVENT_LOG()
*
* NOTE: This assumes that the db scan lock is already applied
* (as it calls rset->get_array_info)
*/
db_field_log* db_create_event_log (struct evSubscrip *pevent)
{
db_field_log *pLog = db_create_field_log(pevent->chan, pevent->useValque);
if (pLog) {
pLog->ctx = dbfl_context_event;
}
return pLog;
}
/*
* DB_CREATE_READ_LOG()
*
*/
db_field_log* db_create_read_log (struct dbChannel *chan)
{
db_field_log *pLog = (db_field_log *) freeListCalloc(dbevFieldLogFreeList);
db_field_log *pLog = db_create_field_log(chan,
dbChannelElements(chan) == 1 &&
dbChannelSpecial(chan) != SPC_DBADDR &&
dbChannelFieldSize(chan) <= sizeof(union native_value));
if (pLog) {
pLog->ctx = dbfl_context_read;
pLog->type = dbfl_type_rec;
}
return pLog;
}
@@ -737,20 +754,6 @@ static void db_queue_event_log (evSubscrip *pevent, db_field_log *pLog)
LOCKEVQUE (ev_que);
/*
* if we have an event on the queue and both the last
* event on the queue and the current event are emtpy
* (i.e. of type dbfl_type_rec), simply ignore duplicate
* events (saving empty events serves no purpose)
*/
if (pevent->npend > 0u &&
(*pevent->pLastLog)->type == dbfl_type_rec &&
pLog->type == dbfl_type_rec) {
db_delete_field_log(pLog);
UNLOCKEVQUE (ev_que);
return;
}
/*
* add to task local event que
*/

View File

@@ -14,11 +14,12 @@
/*
* Author: Ralph Lange <Ralph.Lange@bessy.de>
*
* based on dbConvert.c
* based on dbConvert.c, see copyNoConvert
* written by: Bob Dalesio, Marty Kraimer
*/
#include <string.h>
#include <assert.h>
#include "epicsTypes.h"
@@ -26,61 +27,30 @@
#include "dbAddr.h"
#include "dbExtractArray.h"
void dbExtractArrayFromRec(const dbAddr *paddr, void *pto,
long nRequest, long no_elements, long offset, long increment)
void dbExtractArray(const void *pfrom, void *pto, short field_size,
long nRequest, long no_elements, long offset, long increment)
{
char *pdst = (char *) pto;
char *psrc = (char *) paddr->pfield;
long nUpperPart;
int i;
short srcSize = paddr->field_size;
short dstSize = srcSize;
char isString = (paddr->field_type == DBF_STRING);
const char *psrc = (char *) pfrom;
if (nRequest > no_elements) nRequest = no_elements;
if (isString && srcSize > MAX_STRING_SIZE) dstSize = MAX_STRING_SIZE;
if (increment == 1 && dstSize == srcSize) {
nUpperPart = nRequest < no_elements - offset ? nRequest : no_elements - offset;
memcpy(pdst, &psrc[offset * srcSize], dstSize * nUpperPart);
if (nRequest > nUpperPart)
memcpy(&pdst[dstSize * nUpperPart], psrc, dstSize * (nRequest - nUpperPart));
if (isString)
for (i = 1; i <= nRequest; i++)
pdst[dstSize*i-1] = '\0';
} else {
for (; nRequest > 0; nRequest--, pdst += dstSize, offset += increment) {
offset %= no_elements;
memcpy(pdst, &psrc[offset*srcSize], dstSize);
if (isString) pdst[dstSize-1] = '\0';
}
}
}
void dbExtractArrayFromBuf(const void *pfrom, void *pto,
short field_size, short field_type,
long nRequest, long no_elements, long offset, long increment)
{
char *pdst = (char *) pto;
char *psrc = (char *) pfrom;
int i;
short srcSize = field_size;
short dstSize = srcSize;
char isString = (field_type == DBF_STRING);
if (nRequest > no_elements) nRequest = no_elements;
if (offset > no_elements - 1) offset = no_elements - 1;
if (isString && dstSize >= MAX_STRING_SIZE) dstSize = MAX_STRING_SIZE - 1;
/* assert preconditions */
assert(nRequest >= 0);
assert(no_elements >= 0);
assert(increment > 0);
assert(0 <= offset);
assert(offset < no_elements);
if (increment == 1) {
memcpy(pdst, &psrc[offset * srcSize], dstSize * nRequest);
if (isString)
for (i = 1; i <= nRequest; i++)
pdst[dstSize*i] = '\0';
long nUpperPart =
nRequest < no_elements - offset ? nRequest : no_elements - offset;
memcpy(pdst, psrc + (offset * field_size), field_size * nUpperPart);
if (nRequest > nUpperPart)
memcpy(pdst + (field_size * nUpperPart), psrc,
field_size * (nRequest - nUpperPart));
} else {
for (; nRequest > 0; nRequest--, pdst += srcSize, offset += increment) {
memcpy(pdst, &psrc[offset*srcSize], dstSize);
if (isString) pdst[dstSize] = '\0';
for (; nRequest > 0; nRequest--, pdst += field_size, offset += increment) {
offset %= no_elements;
memcpy(pdst, psrc + (offset * field_size), field_size);
}
}
}

View File

@@ -22,11 +22,36 @@
extern "C" {
#endif
epicsShareFunc void dbExtractArrayFromRec(const DBADDR *paddr, void *pto,
long nRequest, long no_elements, long offset, long increment);
epicsShareFunc void dbExtractArrayFromBuf(const void *pfrom, void *pto,
short field_size, short field_type,
long nRequest, long no_elements, long offset, long increment);
/** @brief Make a copy of parts of an array.
*
* The source array may or may not be a record field.
*
* The increment parameter is used to support array filters; it
* means: copy only every increment'th element, starting at offset.
*
* The offset and no_elements parameters are used to support the
* circular buffer feature of record fields: elements before offset
* are treated as if they came right after no_elements.
*
* This function does not do any conversion on the array elements.
*
* Preconditions:
* nRequest >= 0, no_elements >= 0, increment > 0
* 0 <= offset < no_elements
* pto points to a buffer with at least field_size*nRequest bytes
* pfrom points to a buffer with exactly field_size*no_elements bytes
*
* @param pfrom Pointer to source array.
* @param pto Pointer to target array.
* @param field_size Size of an array element.
* @param nRequest Number of elements to copy.
* @param no_elements Number of elements in source array.
* @param offset Wrap-around point in source array.
* @param increment Copy only every increment'th element.
*/
epicsShareFunc void dbExtractArray(const void *pfrom, void *pto,
short field_size, long nRequest, long no_elements, long offset,
long increment);
#ifdef __cplusplus
}

View File

@@ -112,12 +112,13 @@ union anybuf {
long testdbVPutField(const char* pv, short dbrType, va_list ap)
{
DBADDR addr;
dbChannel *chan = dbChannelCreate(pv);
union anybuf pod;
long ret = S_dbLib_recNotFound;
if (dbNameToAddr(pv, &addr)) {
testFail("Missing PV \"%s\"", pv);
return S_dbLib_recNotFound;
if(!chan || (ret=dbChannelOpen(chan))) {
testFail("Channel error (%p, %ld) : %s", chan, ret, pv);
goto done;
}
switch(dbrType) {
@@ -125,14 +126,18 @@ long testdbVPutField(const char* pv, short dbrType, va_list ap)
const char *uarg = va_arg(ap,char*);
strncpy(pod.valStr, uarg, sizeof(pod.valStr));
pod.valStr[sizeof(pod.valStr)-1] = '\0';
return dbPutField(&addr, dbrType, pod.valStr, 1);
ret = dbChannelPutField(chan, dbrType, pod.valStr, 1);
break;
}
/* The Type parameter takes into consideration
* the C language rules for promotion of argument types
* in variadic functions.
*/
#define OP(DBR,Type,mem) case DBR: {pod.val.mem = va_arg(ap,Type); break;}
#define OP(DBR,Type,mem) case DBR: \
pod.val.mem = va_arg(ap,Type); \
ret = dbChannelPutField(chan, dbrType, pod.bytes, 1); \
break;
OP(DBR_CHAR, int, int8);
OP(DBR_UCHAR, int, uInt8);
OP(DBR_SHORT, int, int16);
@@ -147,11 +152,15 @@ long testdbVPutField(const char* pv, short dbrType, va_list ap)
#undef OP
default:
testFail("invalid DBR: dbPutField(\"%s\", %d, ...)",
addr.precord->name, dbrType);
return S_db_badDbrtype;
dbChannelName(chan), dbrType);
ret = S_db_badDbrtype;
break;
}
return dbPutField(&addr, dbrType, pod.bytes, 1);
done:
if(chan)
dbChannelDelete(chan);
return ret;
}
void testdbPutFieldOk(const char* pv, int dbrType, ...)
@@ -190,23 +199,35 @@ void testdbGetFieldEqual(const char* pv, int dbrType, ...)
void testdbVGetFieldEqual(const char* pv, short dbrType, va_list ap)
{
DBADDR addr;
dbChannel *chan = dbChannelCreate(pv);
db_field_log *pfl = NULL;
long nReq = 1;
union anybuf pod;
long status;
long status = S_dbLib_recNotFound;
if(dbNameToAddr(pv, &addr)) {
testFail("Missing PV \"%s\"", pv);
return;
if(!chan || (status=dbChannelOpen(chan))) {
testFail("Channel error (%p, %ld) : %s", chan, status, pv);
goto done;
}
status = dbGetField(&addr, dbrType, pod.bytes, NULL, &nReq, NULL);
if(ellCount(&chan->filters)) {
pfl = db_create_read_log(chan);
if (!pfl) {
testFail("can't db_create_read_log w/ %s", pv);
goto done;
}
pfl = dbChannelRunPreChain(chan, pfl);
pfl = dbChannelRunPostChain(chan, pfl);
}
status = dbChannelGetField(chan, dbrType, pod.bytes, NULL, &nReq, pfl);
if (status) {
testFail("dbGetField(\"%s\", %d, ...) -> %#lx (%s)", pv, dbrType, status, errSymMsg(status));
return;
goto done;
} else if(nReq==0) {
testFail("dbGetField(\"%s\", %d, ...) -> zero length", pv, dbrType);
return;
goto done;
}
switch(dbrType) {
@@ -236,35 +257,56 @@ void testdbVGetFieldEqual(const char* pv, short dbrType, va_list ap)
default:
testFail("dbGetField(\"%s\", %d) -> unsupported dbf", pv, dbrType);
}
done:
db_delete_field_log(pfl);
if(chan)
dbChannelDelete(chan);
}
void testdbPutArrFieldOk(const char* pv, short dbrType, unsigned long count, const void *pbuf)
{
DBADDR addr;
dbChannel *chan = dbChannelCreate(pv);
long status;
if (dbNameToAddr(pv, &addr)) {
testFail("Missing PV \"%s\"", pv);
return;
if(!chan || (status=dbChannelOpen(chan))) {
testFail("Channel error (%p, %ld) : %s", chan, status, pv);
goto done;
}
status = dbPutField(&addr, dbrType, pbuf, count);
status = dbChannelPutField(chan, dbrType, pbuf, count);
testOk(status==0, "dbPutField(\"%s\", dbr=%d, count=%lu, ...) -> %ld", pv, dbrType, count, status);
done:
if(chan)
dbChannelDelete(chan);
}
void testdbGetArrFieldEqual(const char* pv, short dbfType, long nRequest, unsigned long cnt, const void *pbufraw)
{
DBADDR addr;
dbChannel *chan = dbChannelCreate(pv);
db_field_log *pfl = NULL;
const long vSize = dbValueSize(dbfType);
const long nStore = vSize * nRequest;
long status;
long status = S_dbLib_recNotFound;
char *gbuf, *gstore;
const char *pbuf = pbufraw;
if(dbNameToAddr(pv, &addr)) {
testFail("Missing PV \"%s\"", pv);
return;
if(!chan || (status=dbChannelOpen(chan))) {
testFail("Channel error (%p, %ld) : %s", chan, status, pv);
goto done;
}
if(ellCount(&chan->filters)) {
pfl = db_create_read_log(chan);
if (!pfl) {
testFail("can't db_create_read_log w/ %s", pv);
goto done;
}
pfl = dbChannelRunPreChain(chan, pfl);
pfl = dbChannelRunPostChain(chan, pfl);
}
gbuf = gstore = malloc(nStore);
@@ -273,7 +315,7 @@ void testdbGetArrFieldEqual(const char* pv, short dbfType, long nRequest, unsign
return;
}
status = dbGetField(&addr, dbfType, gbuf, NULL, &nRequest, NULL);
status = dbChannelGetField(chan, dbfType, gbuf, NULL, &nRequest, pfl);
if (status) {
testFail("dbGetField(\"%s\", %d, ...) -> %#lx", pv, dbfType, status);
@@ -318,7 +360,10 @@ void testdbGetArrFieldEqual(const char* pv, short dbfType, long nRequest, unsign
testOk(match, "dbGetField(\"%s\", dbrType=%d, nRequest=%ld ...) match", pv, dbfType, nRequest);
}
done:
free(gstore);
if(chan)
dbChannelDelete(chan);
}
dbCommon* testdbRecordPtr(const char* pv)

View File

@@ -57,20 +57,31 @@ union native_value {
struct db_field_log;
typedef void (dbfl_freeFunc)(struct db_field_log *pfl);
/* Types of db_field_log: rec = use record, val = val inside, ref = reference inside */
/*
* A db_field_log has one of two types:
*
* dbfl_type_ref - Reference to value
* Used for variable size (array) data types. Meta-data
* is stored in the field log, but value data is stored externally.
* Only the dbfl_ref side of the data union is valid.
*
* dbfl_type_val - Internal value
* Used to store small scalar data. Meta-data and value are
* present in this structure and no external references are used.
* Only the dbfl_val side of the data union is valid.
*/
typedef enum dbfl_type {
dbfl_type_rec = 0,
dbfl_type_val,
dbfl_type_ref
} dbfl_type;
/* Context of db_field_log: event = subscription update, read = read reply */
typedef enum dbfl_context {
dbfl_context_read = 0,
dbfl_context_read,
dbfl_context_event
} dbfl_context;
#define dbflTypeStr(t) (t==dbfl_type_val?"val":t==dbfl_type_rec?"rec":"ref")
#define dbflTypeStr(t) (t==dbfl_type_val?"val":"ref")
struct dbfl_val {
union native_value field; /* Field value */
@@ -82,6 +93,8 @@ struct dbfl_val {
* db_delete_field_log(). Any code which changes a dbfl_type_ref
* field log to another type, or to reference different data,
* must explicitly call the dtor function.
* If the dtor is NULL and no_elements > 0, then this means the array
* data is still owned by a record. See the macro dbfl_has_copy below.
*/
struct dbfl_ref {
dbfl_freeFunc *dtor; /* Callback to free filter-allocated resources */
@@ -89,8 +102,11 @@ struct dbfl_ref {
void *field; /* Field value */
};
/*
* Note that field_size may be larger than MAX_STRING_SIZE.
*/
typedef struct db_field_log {
unsigned int type:2; /* type (union) selector */
unsigned int type:1; /* type (union) selector */
/* ctx is used for all types */
unsigned int ctx:1; /* context (operation type) */
/* the following are used for value and reference types */
@@ -98,8 +114,8 @@ typedef struct db_field_log {
unsigned short stat; /* Alarm Status */
unsigned short sevr; /* Alarm Severity */
short field_type; /* DBF type of data */
short field_size; /* Data size */
long no_elements; /* No of array elements */
short field_size; /* Size of a single element */
long no_elements; /* No of valid array elements */
union {
struct dbfl_val v;
struct dbfl_ref r;
@@ -107,27 +123,19 @@ typedef struct db_field_log {
} db_field_log;
/*
* A db_field_log will in one of three types:
*
* dbfl_type_rec - Reference to record
* The field log stores no data itself. Data must instead be taken
* via the dbChannel* which must always be provided when along
* with the field log.
* For this type only the 'type' and 'ctx' members are used.
*
* dbfl_type_ref - Reference to outside value
* Used for variable size (array) data types. Meta-data
* is stored in the field log, but value data is stored externally
* (see struct dbfl_ref).
* For this type all meta-data members are used. The dbfl_ref side of the
* data union is used.
*
* dbfl_type_val - Internal value
* Used to store small scalar data. Meta-data and value are
* present in this structure and no external references are used.
* For this type all meta-data members are used. The dbfl_val side of the
* data union is used.
* Whether a db_field_log* owns the field data. If this is the case, then the
* db_field_log is fully decoupled from the record: there is no need to lock
* the record when accessing the data, nor to call any rset methods (like
* get_array_info) because this has already been done when we made the copy. A
* special case here is that of no (remaining) data (i.e. no_elements==0). In
* this case, making a copy is redundant, so we have no dtor. But conceptually
* the db_field_log still owns the (empty) data.
*/
#define dbfl_has_copy(p)\
((p) && ((p)->type==dbfl_type_val || (p)->u.r.dtor || (p)->no_elements==0))
#define dbfl_pfield(p)\
((p)->type==dbfl_type_val ? &p->u.v.field : p->u.r.field)
#ifdef __cplusplus
}

View File

@@ -34,8 +34,10 @@ static void dbDumpPathCallFunc(const iocshArgBuf *args)
static const iocshArg dbDumpRecordArg2 = { "interest level",iocshArgInt};
static const iocshArg * const dbDumpRecordArgs[] =
{&argPdbbase, &argRecType, &dbDumpRecordArg2};
static const iocshFuncDef dbDumpRecordFuncDef =
{"dbDumpRecord",3,dbDumpRecordArgs};
static const iocshFuncDef dbDumpRecordFuncDef = {"dbDumpRecord",3,dbDumpRecordArgs,
"Dump information about the recordTypeName with 'interest level' details.\n"
"Example: dbDumpRecord ai 2\n"
"If last argument(s) are missing, dump all recordType information in the database.\n"};
static void dbDumpRecordCallFunc(const iocshArgBuf *args)
{
dbDumpRecord(*iocshPpdbbase,args[1].sval,args[2].ival);
@@ -45,7 +47,10 @@ static void dbDumpRecordCallFunc(const iocshArgBuf *args)
static const iocshArg dbDumpMenuArg1 = { "menuName",iocshArgString};
static const iocshArg * const dbDumpMenuArgs[] = {
&argPdbbase, &dbDumpMenuArg1};
static const iocshFuncDef dbDumpMenuFuncDef = {"dbDumpMenu",2,dbDumpMenuArgs};
static const iocshFuncDef dbDumpMenuFuncDef = {"dbDumpMenu",2,dbDumpMenuArgs,
"Dump information about the available menuNames and choices defined withing each menuName.\n"
"Example: dbDumpMenu pdbbase menuAlarmStat \n"
"If last argument(s) are missing, dump all menuNames information in the database.\n"};
static void dbDumpMenuCallFunc(const iocshArgBuf *args)
{
dbDumpMenu(*iocshPpdbbase,args[1].sval);
@@ -54,8 +59,10 @@ static void dbDumpMenuCallFunc(const iocshArgBuf *args)
/* dbDumpRecordType */
static const iocshArg * const dbDumpRecordTypeArgs[] =
{&argPdbbase, &argRecType};
static const iocshFuncDef dbDumpRecordTypeFuncDef =
{"dbDumpRecordType",2,dbDumpRecordTypeArgs};
static const iocshFuncDef dbDumpRecordTypeFuncDef = {"dbDumpRecordType",2,dbDumpRecordTypeArgs,
"Dump information about available fields in the recortTypeName sorted by index and name.\n"
"Example: dbDumpRecordType pdbbase calcout\n"
"If last argument(s) are missing, dump fields information for all records in the database.\n"};
static void dbDumpRecordTypeCallFunc(const iocshArgBuf *args)
{
dbDumpRecordType(*iocshPpdbbase,args[1].sval);
@@ -65,7 +72,11 @@ static void dbDumpRecordTypeCallFunc(const iocshArgBuf *args)
static const iocshArg dbDumpFieldArg2 = { "fieldName",iocshArgString};
static const iocshArg * const dbDumpFieldArgs[] =
{&argPdbbase, &argRecType,&dbDumpFieldArg2};
static const iocshFuncDef dbDumpFieldFuncDef = {"dbDumpField",3,dbDumpFieldArgs};
static const iocshFuncDef dbDumpFieldFuncDef = {"dbDumpField",3,dbDumpFieldArgs,
"Dump information about the fieldName in the recordTypeName.\n"
"Example: dbDumpField pdbbase calcout A\n"
"If last argument(s) are missing, dump information\n"
"about all fieldName in all recordTypeName in the database.\n"};
static void dbDumpFieldCallFunc(const iocshArgBuf *args)
{
dbDumpField(*iocshPpdbbase,args[1].sval,args[2].sval);
@@ -74,7 +85,11 @@ static void dbDumpFieldCallFunc(const iocshArgBuf *args)
/* dbDumpDevice */
static const iocshArg * const dbDumpDeviceArgs[] = {
&argPdbbase, &argRecType};
static const iocshFuncDef dbDumpDeviceFuncDef = {"dbDumpDevice",2,dbDumpDeviceArgs};
static const iocshFuncDef dbDumpDeviceFuncDef = {"dbDumpDevice",2,dbDumpDeviceArgs,
"Dump device support information for the recordTypeName.\n"
"Example: dbDumpDevice pdbbase ai\n"
"If last argument(s) are missing, dump device support\n"
"information for all records in the database.\n"};
static void dbDumpDeviceCallFunc(const iocshArgBuf *args)
{
dbDumpDevice(*iocshPpdbbase,args[1].sval);
@@ -82,7 +97,9 @@ static void dbDumpDeviceCallFunc(const iocshArgBuf *args)
/* dbDumpDriver */
static const iocshArg * const dbDumpDriverArgs[] = { &argPdbbase};
static const iocshFuncDef dbDumpDriverFuncDef = {"dbDumpDriver",1,dbDumpDriverArgs};
static const iocshFuncDef dbDumpDriverFuncDef = {"dbDumpDriver",1,dbDumpDriverArgs,
"Dump device support information.\n"
"Example: dbDumpDriver pdbbase\n"};
static void dbDumpDriverCallFunc(const iocshArgBuf *args)
{
dbDumpDriver(*iocshPpdbbase);
@@ -98,7 +115,10 @@ static void dbDumpLinkCallFunc(const iocshArgBuf *args)
/* dbDumpRegistrar */
static const iocshArg * const dbDumpRegistrarArgs[] = { &argPdbbase};
static const iocshFuncDef dbDumpRegistrarFuncDef = {"dbDumpRegistrar",1,dbDumpRegistrarArgs};
static const iocshFuncDef dbDumpRegistrarFuncDef = {"dbDumpRegistrar",1,dbDumpRegistrarArgs,
"Dump list of registered functions including ones for subroutine records,\n"
"and ones that can be invoked from iocsh.\n"
"Example: dbDumpRegistrar pdbbase\n"};
static void dbDumpRegistrarCallFunc(const iocshArgBuf *args)
{
dbDumpRegistrar(*iocshPpdbbase);
@@ -106,7 +126,9 @@ static void dbDumpRegistrarCallFunc(const iocshArgBuf *args)
/* dbDumpFunction */
static const iocshArg * const dbDumpFunctionArgs[] = { &argPdbbase};
static const iocshFuncDef dbDumpFunctionFuncDef = {"dbDumpFunction",1,dbDumpFunctionArgs};
static const iocshFuncDef dbDumpFunctionFuncDef = {"dbDumpFunction",1,dbDumpFunctionArgs,
"Dump list of registered subroutine functions.\n"
"Example: dbDumpFunction pddbase\n"};
static void dbDumpFunctionCallFunc(const iocshArgBuf *args)
{
dbDumpFunction(*iocshPpdbbase);
@@ -114,7 +136,9 @@ static void dbDumpFunctionCallFunc(const iocshArgBuf *args)
/* dbDumpVariable */
static const iocshArg * const dbDumpVariableArgs[] = { &argPdbbase};
static const iocshFuncDef dbDumpVariableFuncDef = {"dbDumpVariable",1,dbDumpVariableArgs};
static const iocshFuncDef dbDumpVariableFuncDef = {"dbDumpVariable",1,dbDumpVariableArgs,
"Dump list of variables used in the database.\n"
"Example: dbDumpVariable pddbase\n"};
static void dbDumpVariableCallFunc(const iocshArgBuf *args)
{
dbDumpVariable(*iocshPpdbbase);
@@ -124,8 +148,7 @@ static void dbDumpVariableCallFunc(const iocshArgBuf *args)
static const iocshArg dbDumpBreaktableArg1 = { "tableName",iocshArgString};
static const iocshArg * const dbDumpBreaktableArgs[] =
{&argPdbbase,&dbDumpBreaktableArg1};
static const iocshFuncDef dbDumpBreaktableFuncDef =
{"dbDumpBreaktable",2,dbDumpBreaktableArgs};
static const iocshFuncDef dbDumpBreaktableFuncDef = {"dbDumpBreaktable",2,dbDumpBreaktableArgs};
static void dbDumpBreaktableCallFunc(const iocshArgBuf *args)
{
dbDumpBreaktable(*iocshPpdbbase,args[1].sval);
@@ -145,8 +168,7 @@ static void dbPvdDumpCallFunc(const iocshArgBuf *args)
static const iocshArg dbPvdTableSizeArg0 = { "size",iocshArgInt};
static const iocshArg * const dbPvdTableSizeArgs[1] =
{&dbPvdTableSizeArg0};
static const iocshFuncDef dbPvdTableSizeFuncDef =
{"dbPvdTableSize",1,dbPvdTableSizeArgs};
static const iocshFuncDef dbPvdTableSizeFuncDef = {"dbPvdTableSize",1,dbPvdTableSizeArgs};
static void dbPvdTableSizeCallFunc(const iocshArgBuf *args)
{
dbPvdTableSize(args[0].ival);
@@ -154,8 +176,7 @@ static void dbPvdTableSizeCallFunc(const iocshArgBuf *args)
/* dbReportDeviceConfig */
static const iocshArg * const dbReportDeviceConfigArgs[] = {&argPdbbase};
static const iocshFuncDef dbReportDeviceConfigFuncDef = {
"dbReportDeviceConfig",1,dbReportDeviceConfigArgs};
static const iocshFuncDef dbReportDeviceConfigFuncDef = {"dbReportDeviceConfig",1,dbReportDeviceConfigArgs};
static void dbReportDeviceConfigCallFunc(const iocshArgBuf *args)
{
dbReportDeviceConfig(*iocshPpdbbase,stdout);

View File

@@ -301,11 +301,11 @@ static void makeSubstitutions(inputData * const inputPvt,
char *pstart;
char *pend;
int cmdind=-1;
int i;
size_t i;
for (i = 0; i < NELEMENTS(cmdNames); i++) {
if (strstr(command, cmdNames[i])) {
cmdind = i;
cmdind = (int)i;
}
}
if (cmdind < 0) goto endcmd;

View File

@@ -20,35 +20,43 @@
#include "miscIocRegister.h"
/* iocInit */
static const iocshFuncDef iocInitFuncDef = {"iocInit",0,NULL};
static const iocshFuncDef iocInitFuncDef = {"iocInit",0,NULL,
"Initializes the various epics components and starts the IOC running.\n"};
static void iocInitCallFunc(const iocshArgBuf *args)
{
iocshSetError(iocInit());
}
/* iocBuild */
static const iocshFuncDef iocBuildFuncDef = {"iocBuild",0,NULL};
static const iocshFuncDef iocBuildFuncDef = {"iocBuild",0,NULL,
"First step of the IOC initialization, puts the IOC into a ready-to-run (quiescent) state.\n"
"Needs iocRun() to make the IOC live.\n"};
static void iocBuildCallFunc(const iocshArgBuf *args)
{
iocshSetError(iocBuild());
}
/* iocRun */
static const iocshFuncDef iocRunFuncDef = {"iocRun",0,NULL};
static const iocshFuncDef iocRunFuncDef = {"iocRun",0,NULL,
"Bring the IOC out of its initial quiescent state to the running state.\n"
"See more: iocBuild, iocPause"};
static void iocRunCallFunc(const iocshArgBuf *args)
{
iocshSetError(iocRun());
}
/* iocPause */
static const iocshFuncDef iocPauseFuncDef = {"iocPause",0,NULL};
static const iocshFuncDef iocPauseFuncDef = {"iocPause",0,NULL,
"Brings a running IOC to a quiescent state with all record processing frozen.\n"
"See more: iocBuild, iocRub, iocInit"};
static void iocPauseCallFunc(const iocshArgBuf *args)
{
iocshSetError(iocPause());
}
/* coreRelease */
static const iocshFuncDef coreReleaseFuncDef = {"coreRelease",0,NULL};
static const iocshFuncDef coreReleaseFuncDef = {"coreRelease",0,NULL,
"Print release information for iocCore.\n"};
static void coreReleaseCallFunc(const iocshArgBuf *args)
{
coreRelease ();
@@ -75,7 +83,11 @@ void miscIocRegister(void)
#ifndef SYSTEM_UNAVAILABLE
static const iocshArg systemArg0 = { "command string",iocshArgString};
static const iocshArg * const systemArgs[] = {&systemArg0};
static const iocshFuncDef systemFuncDef = {"system",1,systemArgs};
static const iocshFuncDef systemFuncDef = {"system",1,systemArgs,
"Send command string to the system command interpreter for execution.\n"
"Not available on all OSs.\n"
"To enable this command, add registrar(iocshSystemCommand) to an application dbd file,\n"
"or include system.dbd\n"};
static void systemCallFunc(const iocshArgBuf *args)
{
iocshSetError(system(args[0].sval));

View File

@@ -16,6 +16,7 @@ caserverio_INCLUDES = -I$(SRC)/ca/client
camessage_INCLUDES = -I$(SRC)/ca/client
INC += rsrv.h
INC += server.h
DBD += rsrv.dbd

View File

@@ -20,7 +20,12 @@
/* casr */
static const iocshArg casrArg0 = { "level",iocshArgInt};
static const iocshArg * const casrArgs[1] = {&casrArg0};
static const iocshFuncDef casrFuncDef = {"casr",1,casrArgs};
static const iocshFuncDef casrFuncDef = {"casr",1,casrArgs,
"Channel Access Server Report with following levels:\n"
" 0 - servers protocol version level and summary for each attached client\n"
" 1 - extends report with information about connected clients and beacons\n"
" 2 - extends report with specific channel names and UDP search requests\n"
" 3+ - expert\n"};
static void casrCallFunc(const iocshArgBuf *args)
{
casr(args[0].ival);

View File

@@ -13,16 +13,14 @@
#include <stdio.h>
#include <freeList.h>
#include <dbAccess.h>
#include <dbExtractArray.h>
#include <db_field_log.h>
#include <dbLock.h>
#include <recSup.h>
#include <epicsExit.h>
#include <special.h>
#include <chfPlugin.h>
#include <epicsExport.h>
#include "chfPlugin.h"
#include "dbAccessDefs.h"
#include "dbExtractArray.h"
#include "db_field_log.h"
#include "dbLock.h"
#include "epicsExit.h"
#include "freeList.h"
#include "epicsExport.h"
typedef struct myStruct {
epicsInt32 start;
@@ -46,6 +44,8 @@ static void * allocPvt(void)
myStruct *my = (myStruct*) freeListCalloc(myStructFreeList);
if (!my) return NULL;
/* defaults */
my->start = 0;
my->incr = 1;
my->end = -1;
return (void *) my;
@@ -77,8 +77,6 @@ static void freeArray(db_field_log *pfl)
static long wrapArrayIndices(long *start, const long increment, long *end,
const long no_elements)
{
long len = 0;
if (*start < 0) *start = no_elements + *start;
if (*start < 0) *start = 0;
if (*start > no_elements) *start = no_elements;
@@ -87,85 +85,53 @@ static long wrapArrayIndices(long *start, const long increment, long *end,
if (*end < 0) *end = 0;
if (*end >= no_elements) *end = no_elements - 1;
if (*end - *start >= 0) len = 1 + (*end - *start) / increment;
return len;
if (*end - *start >= 0)
return 1 + (*end - *start) / increment;
else
return 0;
}
static db_field_log* filter(void* pvt, dbChannel *chan, db_field_log *pfl)
{
myStruct *my = (myStruct*) pvt;
struct dbCommon *prec;
rset *prset;
int must_lock;
long start = my->start;
long end = my->end;
long nTarget = 0;
long nTarget;
void *pTarget;
long offset = 0;
long nSource = dbChannelElements(chan);
long capacity = nSource;
void *pdst;
long nSource = pfl->no_elements;
void *pSource = pfl->u.r.field;
switch (pfl->type) {
case dbfl_type_val:
/* Only filter arrays */
/* TODO Treat scalars as arrays with 1 element */
break;
case dbfl_type_rec:
/* Extract from record */
if (dbChannelSpecial(chan) == SPC_DBADDR &&
nSource > 1 &&
(prset = dbGetRset(&chan->addr)) &&
prset->get_array_info)
{
void *pfieldsave = dbChannelField(chan);
prec = dbChannelRecord(chan);
dbScanLock(prec);
prset->get_array_info(&chan->addr, &nSource, &offset);
nTarget = wrapArrayIndices(&start, my->incr, &end, nSource);
pfl->type = dbfl_type_ref;
pfl->stat = prec->stat;
pfl->sevr = prec->sevr;
pfl->time = prec->time;
pfl->field_type = dbChannelFieldType(chan);
pfl->field_size = dbChannelFieldSize(chan);
pfl->no_elements = nTarget;
if (nTarget) {
pdst = freeListCalloc(my->arrayFreeList);
if (pdst) {
pfl->u.r.dtor = freeArray;
pfl->u.r.pvt = my->arrayFreeList;
offset = (offset + start) % dbChannelElements(chan);
dbExtractArrayFromRec(&chan->addr, pdst, nTarget, capacity,
offset, my->incr);
pfl->u.r.field = pdst;
}
}
dbScanUnlock(prec);
dbChannelField(chan) = pfieldsave;
}
break;
/* Extract from buffer */
case dbfl_type_ref:
pdst = NULL;
nSource = pfl->no_elements;
nTarget = wrapArrayIndices(&start, my->incr, &end, nSource);
pfl->no_elements = nTarget;
if (nTarget) {
/* Copy the data out */
void *psrc = pfl->u.r.field;
pdst = freeListCalloc(my->arrayFreeList);
if (!pdst) break;
offset = start;
dbExtractArrayFromBuf(psrc, pdst, pfl->field_size, pfl->field_type,
nTarget, nSource, offset, my->incr);
must_lock = !pfl->u.r.dtor;
if (must_lock) {
dbScanLock(dbChannelRecord(chan));
dbChannelGetArrayInfo(chan, &pSource, &nSource, &offset);
}
if (pfl->u.r.dtor) pfl->u.r.dtor(pfl);
if (nTarget) {
nTarget = wrapArrayIndices(&start, my->incr, &end, nSource);
if (nTarget > 0) {
/* copy the data */
pTarget = freeListCalloc(my->arrayFreeList);
if (!pTarget) break;
/* must do the wrap-around with the original no_elements */
offset = (offset + start) % pfl->no_elements;
dbExtractArray(pSource, pTarget, pfl->field_size,
nTarget, pfl->no_elements, offset, my->incr);
if (pfl->u.r.dtor) pfl->u.r.dtor(pfl);
pfl->u.r.field = pTarget;
pfl->u.r.dtor = freeArray;
pfl->u.r.pvt = my->arrayFreeList;
pfl->u.r.field = pdst;
}
/* adjust no_elements (even if zero elements remain) */
pfl->no_elements = nTarget;
if (must_lock)
dbScanUnlock(dbChannelRecord(chan));
break;
}
return pfl;

View File

@@ -12,21 +12,44 @@
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <chfPlugin.h>
#include <dbLock.h>
#include <db_field_log.h>
#include <epicsExport.h>
#include "chfPlugin.h"
#include "db_field_log.h"
#include "dbExtractArray.h"
#include "dbLock.h"
#include "epicsExport.h"
/*
* The size of the data is different for each channel, and can even
* change at runtime, so a freeList doesn't make much sense here.
*/
static void freeArray(db_field_log *pfl) {
free(pfl->u.r.field);
}
static db_field_log* filter(void* pvt, dbChannel *chan, db_field_log *pfl) {
epicsTimeStamp now;
epicsTimeGetCurrent(&now);
/* If string or array, must make a copy (to ensure coherence between time and data) */
if (pfl->type == dbfl_type_rec) {
dbScanLock(dbChannelRecord(chan));
dbChannelMakeArrayCopy(pvt, pfl, chan);
dbScanUnlock(dbChannelRecord(chan));
/* If reference and not already copied,
must make a copy (to ensure coherence between time and data) */
if (pfl->type == dbfl_type_ref && !pfl->u.r.dtor) {
void *pTarget = calloc(pfl->no_elements, pfl->field_size);
void *pSource = pfl->u.r.field;
if (pTarget) {
long offset = 0;
long nSource = pfl->no_elements;
dbScanLock(dbChannelRecord(chan));
dbChannelGetArrayInfo(chan, &pSource, &nSource, &offset);
dbExtractArray(pSource, pTarget, pfl->field_size,
nSource, pfl->no_elements, offset, 1);
pfl->u.r.field = pTarget;
pfl->u.r.dtor = freeArray;
pfl->u.r.pvt = pvt;
dbScanUnlock(dbChannelRecord(chan));
}
}
pfl->time = now;

View File

@@ -12,6 +12,8 @@ SRC_DIRS += $(STDDIR)/softIoc
PROD_IOC_DEFAULT = softIoc
PROD_IOC_iOS = -nil-
PROD_LDFLAGS_vxWorks = --whole-archive
DBD += base.dbd
DBD += asSub.dbd
DBD += softIoc.dbd

View File

@@ -67,13 +67,16 @@ sub toDeclaration {
my $name = $this->name;
my $macro_name = "${name}_NUM_CHOICES";
my @choices = map {
sprintf " %-31s /* %s */", @{$_}[0], escapeCcomment(@{$_}[1]);
sprintf " %-31s /**< \@brief State string \"%s\" */",
@{$_}[0], escapeCcomment(@{$_}[1]);
} $this->choices;
my $num = scalar @choices;
return "#ifndef $macro_name\n" .
"/** \@brief Enumerated type from menu $name */\n" .
"typedef enum {\n" .
join(",\n", @choices) .
"\n} $name;\n" .
"/** \@brief Number of states defined for menu $name */\n" .
"#define $macro_name $num\n" .
"#endif\n\n";
}

View File

@@ -185,7 +185,7 @@ sub toDeclaration {
my $name = $this->C_name;
my $result = sprintf " %-19s %-12s", $ctype, "$name;";
my $prompt = $this->attribute('prompt');
$result .= "/* $prompt */" if defined $prompt;
$result .= "/**< \@brief $prompt */" if defined $prompt;
return $result;
}
@@ -217,7 +217,7 @@ sub toDeclaration {
my $size = $this->attribute('size');
my $result = sprintf " %-19s %-12s", 'char', "${name}[${size}];";
my $prompt = $this->attribute('prompt');
$result .= "/* $prompt */" if defined $prompt;
$result .= "/**< \@brief $prompt */" if defined $prompt;
return $result;
}
@@ -540,7 +540,7 @@ sub toDeclaration {
my $extra = $this->attribute('extra');
my $result = sprintf " %-31s ", "$extra;";
my $prompt = $this->attribute('prompt');
$result .= "/* $prompt */" if defined $prompt;
$result .= "/**< \@brief $prompt */" if defined $prompt;
return $result;
}

View File

@@ -132,10 +132,15 @@ sub toDeclaration {
$_->toDeclaration
} $this->fields;
my $name = $this->name;
$name .= "Record" unless $name eq "dbCommon";
return "typedef struct $name {\n" .
join("\n", @fields) .
"\n} $name;\n\n";
my $doc = $name;
if ($name ne 'dbCommon') {
$name .= 'Record';
$doc .= ' record type.';
}
return "/** \@brief Declaration of $doc */\n" .
"typedef struct $name {\n" .
join("\n", @fields) .
"\n} $name;\n\n";
}
1;

View File

@@ -11,6 +11,8 @@
use FindBin qw($Bin);
use lib ("$Bin/../../lib/perl");
use strict;
use EPICS::Getopts;
use File::Basename;
use DBD;
@@ -57,7 +59,9 @@ if ($opt_D) {
print map { "$_:\n" } @uniqfiles;
} else {
open OUTFILE, ">$outfile" or die "$tool: Can't open $outfile: $!\n";
print OUTFILE "/* $outbase generated from $inbase */\n\n",
print OUTFILE "/** \@file $outbase\n",
" * \@brief Declarations generated from $inbase\n",
" */\n\n",
"#ifndef $guard_name\n",
"#define $guard_name\n\n";
my $menus = $dbd->menus;

View File

@@ -61,13 +61,19 @@ if ($opt_D) { # Output dependencies only, to stdout
print "$outfile: ", join(" \\\n ", @uniqfiles), "\n\n";
print map { "$_:\n" } @uniqfiles;
} else {
our ($rn, $rtyp) = each %{$rtypes};
my $rtn = $rn;
$rtn .= 'Record' if $rn ne 'dbCommon';
open OUTFILE, ">$outfile" or die "$tool: Can't open $outfile: $!\n";
print OUTFILE "/* $outbase generated from $inbase */\n\n",
print OUTFILE "/** \@file $outbase\n",
" * \@brief Declarations for the \@ref $rtn \"$rn\" record type.\n",
" *\n",
" * This header was generated from $inbase\n",
" */\n\n",
"#ifndef $guard_name\n",
"#define $guard_name\n\n";
our ($rn, $rtyp) = each %{$rtypes};
print OUTFILE $rtyp->toCdefs;
my @menu_fields = grep {

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