Compare commits

..

398 Commits

Author SHA1 Message Date
Andrew Johnson
86154953f5 Final commit for 7.0.9
Some checks failed
Check EditorConfig / editorconfig (push) Failing after 2s
Base / Cross linux-aarch64 (push) Failing after 1s
Base / Cross linux-arm gnueabi (push) Failing after 2s
Base / Cross linux-arm gnueabihf (push) Failing after 1s
Base / Fedora-33 (push) Failing after 2s
Base / Fedora-latest (push) Failing after 1s
CodeQL / Analyze (cpp) (push) Failing after 2s
Base / Ub-20 gcc + RT-5.1 uC5282 (push) Has been cancelled
Base / Ub-20 gcc + RT-5.1 xilinx_zynq_a9_qemu (push) Has been cancelled
Base / Win2019 mingw (push) Has been cancelled
Base / Ub-20 gcc + MinGW (push) Has been cancelled
Base / Ub-20 gcc unsigned char (push) Has been cancelled
Base / Ub-20 gcc C++11, static (push) Has been cancelled
Base / Ub-20 gcc + MinGW, static (push) Has been cancelled
Base / Ub-22 gcc-12 c++20 Werror (push) Has been cancelled
Base / Win2019 MSC-19 (push) Has been cancelled
Base / Win2019 MSC-19, debug (push) Has been cancelled
Base / Win2019 MSC-19, static (push) Has been cancelled
Base / Ub-20 clang C++11 (push) Has been cancelled
Base / MacOS clang (push) Has been cancelled
Base / Ub-20 clang (push) Has been cancelled
Base / Ub-20 gcc + RT-5.1 beatnik (push) Has been cancelled
Base / Ub-20 gcc + RT-4.10 (push) Has been cancelled
Base / Ub-20 gcc + RT-4.9 (push) Has been cancelled
Base / Ub-20 gcc + RT-5.1 pc686 (push) Has been cancelled
2025-02-21 17:31:33 -06:00
Andrew Johnson
07572ab025 Update submodules to released versions 2025-02-21 15:47:00 -06:00
Andrew Johnson
0733beae50 Fix for PR #597 breakage of VS-2012/2010 builds 2025-02-20 10:27:41 -06:00
Andrew Johnson
a3d8531008 Revert PR #589
* Revert "Release Notes for PYTHON=python3"
  commit 2612b47c3f.

* Revert "Remove Python build dependency when LINKER_USE_RPATH=ORIGIN"
  commit f4c474eb77.
2025-02-19 14:10:16 -06:00
Michael Davidsaver
7a6e11cae0 make casStatsFetch() safe-ish when RSRV not initialized
Maybe too early.  Or maybe RSRV disabled via dbServer.
2025-02-18 07:30:51 -08:00
Michael Davidsaver
7384351181 clarify cantProceed() message 2025-02-18 07:30:51 -08:00
Michael Davidsaver
890cbc2c0d doc 2025-02-18 07:30:51 -08:00
Andrew Johnson
2612b47c3f Release Notes for PYTHON=python3 2025-02-17 22:47:27 -06:00
Andrew Johnson
f4c474eb77 Remove Python build dependency when LINKER_USE_RPATH=ORIGIN
This change converts the makeRPath.py script to Perl.
Also changes the PYTHON default to run `python3`
2025-02-17 22:47:27 -06:00
Andrew Johnson
1735a821db Update pvDatabase 2025-02-11 17:44:51 -06:00
Michael Davidsaver
1d19ba4cc2 doc and log for *MustSucceed()
Replace the "never returns NULL." statement which is
manifestly not true.
2025-02-07 09:09:22 -08:00
JJL772
144f9756ea Add iocshSetError in a bunch of places 2025-02-05 10:16:16 -06:00
DW
48eed22f3b check IOCSH_STARTUP_SCRIPT before set 2025-02-05 10:03:35 -06:00
Érico Nogueira
8ac2c87156 Post monitors from compress record when resetting it
This way clients receive updates with an empty array after writing into
the RES field.
2025-02-05 09:59:18 -06:00
Simon Rose
0d2ffcd97f Typo fix on arch name (#593) 2025-02-05 09:47:24 -06:00
Andrew Johnson
c8eccfcb8f Edit Release messages for English & Markdown 2025-02-03 11:36:37 -06:00
Michael Davidsaver
6fb40b02fe update RELEASE_NOTES 2025-02-02 20:16:38 -08:00
Andrew Johnson
dad0ee9c89 Revert "Limit _FORTIFY_SOURCE <= 2"
This reverts commit 5fe563bed8.
2025-02-02 19:59:39 -08:00
Timo Korhonen
065fe7cab6 Fix internal link 2025-01-28 15:05:55 -08:00
Michael Davidsaver
e4ad4becde rationalize osdMutex
Avoids split allocation.
Eliminates special case free-list.

win32: eliminate pre-XP
rtems-score: eliminate non-fast
2024-12-29 16:35:26 -08:00
Michael Davidsaver
1cd141c540 dbLoadTemplate: error propagation and more context on .db syntax error 2024-12-29 16:35:26 -08:00
72026a27a0 allow to load the same alias multiple times (unless dbRecordsOnceOnly is set) 2024-12-29 16:35:25 -08:00
Simon Rose
9fb820b46e Add tests for relative include paths 2024-12-29 16:34:10 -08:00
Jeremy Lorelli
721e9cc3a7 Add ABORT_ON_ASSERT flag to CONFIG_SITE
This flag causes EPICS to call abort() on assertion failures rather than
suspend the executing thread. With the epicsThreadSuspendSelf() behavior,
an IOC can end up in a difficult to detect error state where one or more
threads has essentially crashed due to an assertion failure.

This also matches the C behavior of assert(3)
2024-12-29 16:34:10 -08:00
Simon Rose
0186836449 Reading a file from the command-line should not use include paths 2024-12-29 16:34:10 -08:00
Simon Rose
b90ab7de13 Improve relative path check for msi
For posix-ish systems, we previously checked that a path was relative
by simpy checking if it included a '/' character. This meant that you
could not, for example, do
```
$ cat foo.substitutions
file rel/to/bar.template {
}

$ msi -I /some/path foo.substitutions
```
where our template file is located at `/some/path/rel/to/bar.template`.

Note that relateive paths work differently on Windows, so we carve out
an exception there.
2024-12-29 16:34:10 -08:00
Jeremy Lorelli
333be085c0 Fix compile error in tsSLList.h 2024-12-28 12:40:27 -08:00
Ralph Lange
169948967f Merge pull request #578 from ralphlange/doc-udfs
Add documentation for the UDFS field
2024-12-27 15:10:43 +01:00
Ralph Lange
5a11954c51 Add documentation for the UDFS field 2024-12-26 18:44:23 +01:00
Jure Varlec
9f8a8b9c1f Update RELEASE_NOTES with AMSG propagation 2024-12-11 09:38:02 -06:00
Jure Varlec
d0cf47cd6f Propagate AMSG through MSS links
MS and MSI links do not propagate STAT and therefore do not propagate
AMSG, either. CA, CP and CPP links also do not propagate AMSG, but the
reason is technical: the message is not available over Channel Access.
2024-12-11 09:38:02 -06:00
Simon Rose
f4aee8e6b7 Add debug build configuration for os x mX arch 2024-12-11 09:33:24 -06:00
dac620a708 loop safe wrapper for dbGet added 2024-12-11 09:31:49 -06:00
4ee766b6b1 correct mask for finding field in linkGrp
It worked before because the get_xxx functions are never called for
the links (bit0 = 1), but checking both bits looks cleaner.
2024-12-11 09:31:49 -06:00
5143258011 fix support for link 0 2024-12-11 09:31:49 -06:00
Michael Davidsaver
ead8b7e82b doc getIocState() 2024-12-09 17:00:03 -08:00
Jure Varlec
8483ff9560 Clear NAMSG together with NSTAT and NSEV
Previously, there was no way to clear AMSG when setting a no-alarm
status: it kept the last error message, and it is strange to have a
record that has no alarm while showing an error. With this change, the
NAMSG field is treated the same as NSTA and NSEV: they are cleared when
their content is moved to STAT, SEVR, and AMSG.
2024-11-27 07:40:39 -08:00
b7cc33c3c9 Send DBE_PROPERTY events before DBE_VALUE | DBE_LOG events to allow clients to update their formatting etc in time 2024-11-13 10:00:12 -06:00
9e7cd241e0 fix DBE_PROPERTY events for mbbi/mbbo records 2024-11-13 10:00:12 -06:00
faac1df1c6 send DBE_PROPERTY events only if property field actually changed 2024-11-13 10:00:12 -06:00
Andrew Johnson
1f8851a5dc GHA: rm cmp versions from names when we don't specify them 2024-11-01 11:46:15 -05:00
Andrew Johnson
ac3e8af9fd Update github action versions 2024-11-01 11:00:37 -05:00
Chris Johns
98a30e8029 rtems: Extend the BSP checks for 5 to 5 or greater 2024-10-31 16:21:49 -05:00
Chris Johns
594e5ee9db rtems: Set the name of EPICS threads so RTEMS commands report the name
Use the NP POSIX call pthread_setname_np to set the POSIX thread name.
2024-10-31 16:21:49 -05:00
Chris Johns
135193c4bd rtems: Fix shell networking commands
This patch cleans up the shell defines for the libbsd and legacy
network stack shell commands.

The top and rtems shell commands have been added.
2024-10-31 16:21:49 -05:00
Chris Johns
9d65da5c61 rtems: Fix rtems_bsdnet_bootp_server_address decl with RTEMS_LEGACY_STACK
The legacy stack provides this variable and this decl clashed. This was
seen before now due to the link order of libraries.
2024-10-31 16:21:49 -05:00
Chris Johns
f9d1fbeedb rtems: BSP mvme2700 is now supported in RTEMS
This patch changes the name for RTEMS 6 or later from mvme2307 to
mvme2700.
2024-10-31 16:21:49 -05:00
Chris Johns
2b8a944a7d rtems: Add legacy network support and fix LDFLAGS
RTEMS 6 has moved the legacy network support out of the main repo
to a 3rd party library. This change adds support for using the
legacy networking stack with EPICS in a backwards compatible way.

A BSP can be built with libbsd or the legacy stack and by default
EPICS 7 assumes libbsd.

This patch also fixes the LDFLAGS adding the RTEMS LDFLAGS imported
from Makefile.inc.
2024-10-31 16:21:49 -05:00
Chris Johns
83cbf8a4c7 freebsd: Add support for x86 and amd64 builds
Use the OS compiler, ie cc and c++.
2024-10-31 16:16:45 -05:00
Andrew Johnson
47880fbcf7 Fix config.yml syntax, disable git submodules 2024-10-31 15:20:32 -05:00
Andrew Johnson
b0bff556c9 Move query selections into config file
Ignore `goto`s and "recommendations" for now.
2024-10-31 15:20:32 -05:00
Andrew Johnson
932e506df1 Adjustments to suggested configuration
* Rebased to latest 7.0
* Check 7.0 branch and tags only
* Ignore text files
* Drop Python checks
* Remove .lgtm.yml file, adjust skips
2024-10-31 15:20:32 -05:00
LGTM Migrator
b7991b6eca Add CodeQL workflow for GitHub code scanning 2024-10-31 15:20:32 -05:00
Michael Davidsaver
f6cd43b7cc asTrap serverSpecific is dbChannel
Save/restore dbAddr::pfield around callbacks to
avoid corruption if CB forgets to restore.

Need to peak at dbChannel.h during libCom build.
So generate dbCoreAPI.h early, and add extra
-I to source location when compiling dbTrapWrite.c
2024-10-31 12:30:15 -05:00
Timo Korhonen
e6a2047bbf formatting fixes, as requested 2024-10-30 11:07:25 -05:00
Timo Korhonen
7923076b1c edit to reduce Codacy warnings. May not fix all but this is my best guess. 2024-10-30 11:07:25 -05:00
Timo Korhonen
46ad962cd8 replaced the html version of msi document with markdown. 2024-10-30 11:07:25 -05:00
Andrew Johnson
f47e1d94a3 Use Perl for filtering MAKEFLAGS properly
Requires moving the checkflags code into CONFIG_BASE
as that's where FIND_TOOL gets defined.

Fixes #545
2024-10-30 09:51:37 -05:00
Michael Davidsaver
022b8d468b document dbScan.h 2024-10-20 10:18:30 -07:00
Michael Davidsaver
152d306ad8 avoid UB with self pthread_join() 2024-10-02 09:22:00 -05:00
Michael Davidsaver
012139638d posix: epicsThreadCreateOpt() avoid leak of joinable on EPERM
On a system where RT priorities have been probed.
When creating a joinable thread, but still fails
with EPERM, the first epicsThreadOSD was leaked.
2024-10-02 09:22:00 -05:00
Minijackson
78b575f487 documentation: fix RELEASE_NOTES Sphinx warning
Apparently, starting a section with a horizontal line is not permitted
2024-10-02 09:16:29 -05:00
Minijackson
74713632a6 documentation: fix title underline of menu-API 2024-10-02 09:16:29 -05:00
Minijackson
dd5df7363c documentation: migrate ComponentReference to markdown
This enables us to use toctrees, which informs Sphinx on the global
documentation structure, and removes warnings about not-included
documents.

The old ComponentReference.pod was kept, in order to not break the old
HTML output, but the new Markdown file is used as source for the
generated markdown files in doc/
2024-10-02 09:16:29 -05:00
Andrew Johnson
3888e9dec7 Make header file links use Markdown for Sphinx toctree 2024-10-02 09:16:29 -05:00
Andrew Johnson
af206ba7fc Move Sphinx sources to O.Common/rtd-src
Adds the build target 'sphinx' for manual Sphinx runs, and
installs the output of that under $(INSTALL_HTML)/readthedocs

Adjusted some Sphinx config parameters and titles.
2024-10-02 09:16:29 -05:00
Minijackson
be4d1604ba documentation/RELEASE_NOTES: remove main anchor 2024-10-02 09:16:29 -05:00
Minijackson
8e2217dbf7 documentation: remove KnownProblems
From @anjohnson:

> I haven't actually published a Known Problems page online since EPICS 7.0.1,
> maintaining it was becoming too time-consuming.
2024-10-02 09:16:29 -05:00
Minijackson
34b3306faa documentation: Edit & add README 2024-10-02 09:16:29 -05:00
Minijackson
8c88d052bb Add readthedocs templates and build rules
Co-authored-by: Timo Korhonen <timo.korhonen@ess.eu>
Co-authored-by: Andrew Johnson <anj@anl.gov>
2024-10-02 09:16:29 -05:00
Minijackson
ad7575f5a4 documentation/Doxyfile: adapt for Sphinx Breathe
Co-authored-by: Timo Korhonen <timo.korhonen@ess.eu>
2024-10-02 09:16:29 -05:00
Minijackson
601ac051db documentation/Makefile: Remove gh-pages rules
Co-authored-by: Andrew Johnson <anj@anl.gov>
2024-10-02 09:16:29 -05:00
Minijackson
c0aeb4c69b Move and fix ComponentReference.pod
Co-authored-by: Timo Korhonen <timo.korhonen@ess.eu>
Co-authored-by: Andrew Johnson <anj@anl.gov>
2024-10-02 09:16:29 -05:00
Minijackson
7cdaaf716a Generate Markdown from all .pod and .dbd.pod files
Co-authored-by: Timo Korhonen <timo.korhonen@ess.eu>
2024-10-02 09:16:29 -05:00
Minijackson
615ba73044 Rules to generate and install Markdown
Markdown can be generated from .pod and .dbd.pod files.
Markdown will be generated and installed by "make inc".

Co-authored-by: Timo Korhonen <timo.korhonen@ess.eu>
Co-authored-by: Andrew Johnson <anj@anl.gov>
2024-10-02 09:16:29 -05:00
Minijackson
c285f2a78f dbdToMD.pl: create
Co-authored-by: Timo Korhonen <timo.korhonen@ess.eu>
2024-10-02 09:16:29 -05:00
Minijackson
fcb227ed97 podToMD.pl: create
Co-authored-by: Timo Korhonen <timo.korhonen@ess.eu>
2024-10-02 09:16:29 -05:00
Andrew Johnson
4f6aa7ec29 Add Pod::Markdown and EPICS::PodMD Perl modules
Co-authored-by: Timo Korhonen <timo.korhonen@ess.eu>
2024-10-02 09:16:29 -05:00
60f6ba7b49 Drop execute bits from startup/win32.bat
The file startup/win32.bat shouldn't be executable, so drop the execute
bits from its file mode.
2024-10-02 09:14:22 -05:00
Érico Nogueira
8045770751 libCom: don't use std::unexpected in epicsThread.
Besides being deprecated in C++11 and removed in C++17, the intended use
case for this was always wrong, since std::unexpected() is called by the
C++ runtime when a function throws an exception that was not specified
in its "dynamic exception specification", which is different from an
exception thrown by user code which wasn't caught [1,2]. Using abort()
keeps the same behavior, but with the intended semantics.

We don't use std::abort() to simplify backwards compatibility.

[1] https://github.com/epics-base/epics-base/issues/343
[2] https://en.cppreference.com/w/cpp/error/unexpected
2024-09-09 07:27:32 -07:00
Michael Davidsaver
2e4113b63b Add typing to dbEvent.h opaque structs when -DUSE_TYPED_DBEVENT 2024-09-04 10:15:55 -05:00
Érico Nogueira
3b50194837 genVersionHeader: work with git submodules and worktrees.
When the epics-base directory is used as a git submodule, or checked out
in multiple places as a git worktree, ".git" is not a directory, but a
file which points to the location of the git directory. In that case,
the git tools can still be used to determine the version information.

Without this change, the version string is determined from the build
date/time, which has multiple issues:

- it doesn't include the full information about the build environment
- it is not reproducible
- it leads to unnecessary rebuilds, since a lot of files depend on
  "epicsVCS.h"
2024-09-04 10:14:22 -05:00
99f70a1081 Print link types as text instead of numbers 2024-09-04 10:13:08 -05:00
Grzegorz Kowalski
5d9ffe15da caget: free PV value after printing 2024-09-04 10:02:49 -05:00
Grzegorz Kowalski
3ac8dcc3de caget: free memory allocated for PV array 2024-09-04 10:02:49 -05:00
Jure Varlec
25e155ee8c Fix a mis-asssignemnt of copyright
Copyright was previously assigned based on the author's email, which had
been modifified by repository conversion from CVS to git. This rectifies
the situation by assigning copyright to the authors employer at the time
of creation of the file.
2024-09-04 10:02:04 -05:00
Jure Varlec
049cc175a9 Fix a mangled copyright header 2024-09-04 10:02:04 -05:00
Jure Varlec
0d92b74aae Compactify SPDX tags in README files 2024-09-04 10:02:04 -05:00
Jure Varlec
ecba8a3a5e Move SPDX tags in st file for compatibility 2024-09-04 10:02:04 -05:00
Jure Varlec
466a9b565e Change comment style for SPDX tags in C files 2024-09-04 10:02:04 -05:00
Jure Varlec
c304b7db53 Add SPDX license tags to templates
Copyright information was gathered using `git log` with per-line history
tracking, which allows following the history of a file through renames.
2024-09-04 10:02:04 -05:00
Grzegorz Kowalski
0eb31ed70b free memory allocated for filenames 2024-09-04 09:59:55 -05:00
Chris Johns
c5f5e4e508 rtems: Allow site local override of the default tick period
Add to configure/CONFIG_SITE.local:

 OP_SYS_CFLAGS += -DCONFIGURE_MICROSECONDS_PER_TICK=1000
2024-09-04 09:59:13 -05:00
Freddie Akeroyd
9866815dab Improve error message wording 2024-09-04 09:58:29 -05:00
Freddie Akeroyd
0e66b3edff Improve error message for mingw64 architecture 2024-09-04 09:58:29 -05:00
Freddie Akeroyd
dd154180bf Avoid isnan/isinf redefine in c++ on VS2013 and above 2024-09-04 09:48:03 -05:00
Freddie Akeroyd
574fe116fc protect isnan/isinf define on c++ 2024-09-04 09:48:03 -05:00
Michael Davidsaver
052a0c7e19 test get_enum_strs() 2024-08-21 10:01:26 -05:00
Michael Davidsaver
979dde8376 redo get_enum_strs() to pacify _FORTIFY_SOURCES=3 2024-08-21 10:01:26 -05:00
Michael Davidsaver
9a0113f834 GHA: add gcc with -D_FORTIFY_SOURCE=3 2024-08-21 10:01:26 -05:00
Michael Davidsaver
3d70e70640 Add dbPvt2Rec() cast
Reverse of dbRec2Pvt()

pacify -D_FORTIFY_SOURCE=3 and __builtin_object_size() as
"&precord->common" does not know than common as actually
the prefix of a variable sized struct.
2024-08-21 10:01:26 -05:00
Michael Davidsaver
f9e53dded6 show buffered line along with DB parse error 2024-08-21 09:53:38 -05:00
403ebab858 use more standard permissions for bins and libs 2024-08-21 09:50:26 -05:00
Hinko Kocevar
8e62ea4965 handle deletion of the non-existant record with field 2024-08-21 09:48:23 -05:00
Hinko Kocevar
f00de26be1 directory path name is free'd before it is used in testAbort() 2024-08-21 09:48:23 -05:00
Hinko Kocevar
50b6a3801a check if precordType is null in dbGetRecordTypeName() 2024-08-21 09:48:23 -05:00
Michael Davidsaver
2a5def7fc6 test removal of non-existant record 2024-08-21 09:48:23 -05:00
Michael Davidsaver
fd072e4429 add more information to record(# warning 2024-08-21 09:48:23 -05:00
Hinko Kocevar
3a5c9ab0cd add a warning if deleting a non-existent record 2024-08-21 09:48:23 -05:00
Hinko Kocevar
c735de4ff8 fix number of tests to execute 2024-08-21 09:48:23 -05:00
Hinko Kocevar
bb5423171d remove warning and error messages, fix duplicate flag setting 2024-08-21 09:48:23 -05:00
Hinko Kocevar
4e4e55ca89 invoke dbFreeLinkContents() to clean up link related allocations 2024-08-21 09:48:23 -05:00
Hinko Kocevar
e9748881cd make codacy happy 2024-08-21 09:48:23 -05:00
Hinko Kocevar
39b0301062 plug memory leak resulting from record deletion 2024-08-21 09:48:23 -05:00
Hinko Kocevar
2f98251c9f add unit tests for record deletion 2024-08-21 09:48:23 -05:00
Hinko Kocevar
535c9c2a06 Allow deleting a record at database creation.
Using a magical record type "#" will allow the user to
delete previously created record  from the database.
2024-08-21 09:48:23 -05:00
Michael Davidsaver
057eb87101 readline: only keep history for interactive session 2024-08-21 09:36:39 -05:00
457387ed38 fix warning when dbf_type_to_text is called with an unsigned type argument 2024-08-21 09:35:53 -05:00
b6fffc2225 fix string to epicsUInt32 conversion via double 2024-08-21 09:28:45 -05:00
86cdfc596f fix wrong (unsigned) comparison 2024-08-12 10:29:08 -04:00
Andrew Johnson
3dae29b7e8 Oops, needed stdint.h 2024-08-10 14:45:28 -05:00
Andrew Johnson
9d393c4437 Cast sizeOffset to uintptr_t for ordered comparison
Issue report & fix by Dirk Zimoch.
2024-08-10 13:21:30 -05:00
Andrew Johnson
a5c3330c8e Update .ci module, disable CentOS-7 build 2024-08-07 09:54:16 -05:00
Andrew Johnson
856f345d2c Fix Codacy complaint about C-style casts 2024-08-07 09:54:16 -05:00
Andrew Johnson
3f4d080260 Make dbFastGet/PutConvertRoutine arrays const
Also added Doxygen annotations for them.
2024-08-07 09:54:16 -05:00
Andrew Johnson
1e8d49f2a6 Drop debugging diagnostics 2024-08-07 09:54:16 -05:00
Andrew Johnson
31b22fd253 Add test of jlinkz::putValue() to dbPutLinkTest
Add OUTP link field to xRecord
xRecord::process() puts VAL to the OUTP link
jlinkz writes the output value to the record's own PHAS field
Correct the dbFastPutConvertRoutine lookup
Test sets OUTP link, processes record and confirms that PHAS was set
2024-08-07 09:54:16 -05:00
Andrew Johnson
916b17ef3f Fix review comment 2024-08-07 09:54:16 -05:00
Andrew Johnson
437320926b Move declaration back 2024-08-07 09:54:16 -05:00
Andrew Johnson
7890e67d37 Various misc warnings 2024-08-07 09:54:16 -05:00
Andrew Johnson
918a188285 Define USE_TYPED_DRVET, use drvet * instead of struct drvet * 2024-08-07 09:54:16 -05:00
Andrew Johnson
2f730b8e9f Add arg's to function pointer typedefs and prototypes 2024-08-07 09:54:16 -05:00
Andrew Johnson
1835187a86 Change fast convert routines to match prototype
Most of these edits were make using regexes in find/replace.
2024-08-07 09:54:16 -05:00
Andrew Johnson
f287cfa2ac Introduce & use FASTCONVERTFUNC with full prototype 2024-08-07 09:54:16 -05:00
Andrew Johnson
785237e41a Remove duplicate link libraries 2024-08-07 09:54:16 -05:00
23999a106b use -nologo with rc like with many other MSVC commands 2024-08-07 09:40:29 -05:00
Andrew Johnson
91e1d0ab80 Update release process files 2024-06-27 22:20:19 -05:00
Andrew Johnson
172bfce1f3 Merge 'Release 7.0.8.1' branch into 7.0 2024-06-27 21:07:50 -05:00
Andrew Johnson
615e7e99ce Update version numbers and submodules after release 2024-06-27 20:56:47 -05:00
Andrew Johnson
57c930fbee Release R7.0.8.1
Some checks failed
Check EditorConfig / editorconfig (push) Failing after 1s
Base / Cross linux-aarch64 (push) Failing after 2s
Base / Cross linux-arm gnueabi (push) Failing after 1s
Base / Cross linux-arm gnueabihf (push) Failing after 2s
Base / CentOS-7 (push) Failing after 1s
Base / Fedora-33 (push) Failing after 2s
Base / Fedora-latest (push) Failing after 1s
Base / Ub-20 clang-10 C++11 (push) Has been cancelled
Base / MacOS clang-12 (push) Has been cancelled
Base / Ub-20 clang-10 (push) Has been cancelled
Base / Ub-20 gcc-9 + RT-5.1 beatnik (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 / Ub-20 gcc-9 + RT-5.1 pc686 (push) Has been cancelled
Base / Ub-20 gcc-9 + RT-5.1 uC5282 (push) Has been cancelled
Base / Ub-20 gcc-9 + RT-5.1 xilinx_zynq_a9_qemu (push) Has been cancelled
Base / Win2019 mingw (push) Has been cancelled
Base / Ub-20 gcc-9 + MinGW (push) Has been cancelled
Base / Ub-20 gcc-9 unsigned char (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-22 gcc-12 c++20 Werror (push) Has been cancelled
Base / Win2019 MSC-19 (push) Has been cancelled
Base / Win2019 MSC-19, debug (push) Has been cancelled
Base / Win2019 MSC-19, static (push) Has been cancelled
2024-06-27 20:55:03 -05:00
Andrew Johnson
785b777baf Update Release Notes, set version numbers 2024-06-26 14:59:18 -05:00
Andrew Johnson
d0d15ee911 Replace UNRELEASED with 7.0.8.1 2024-06-26 14:59:18 -05:00
Andrew Johnson
5af9c7e50d Revert submodules to versions at R7.0.8 2024-06-26 14:59:18 -05:00
Andrew Johnson
5fe563bed8 Limit _FORTIFY_SOURCE <= 2 2024-06-26 14:58:53 -05:00
Tynan Ford
772c10d904 Fix issue with RSRV_SERVER_PORT above 9999
don't worry about null termination on epicsSnprintf call
2024-06-19 09:38:23 -07:00
Michael Davidsaver
72d50ce274 fix dblsr()
clearly doesn't get called very often...
2024-06-14 16:45:07 -07:00
Michael Davidsaver
0a6b9e4511 dbScan: handle scanStop() before start 2024-06-14 16:45:07 -07:00
be8f8b41ff centralize -g flag for gnu targets 2024-06-13 14:35:43 -07:00
Simon Rose
1b46077096 Fix off by one error in constant link fetch
For long string buffers, we currently write a null terminator one byte
past the end of the buffer. This can be seen with a record of the type

```
record(aai, foo) {
  field(NELM, 1)
  field(FTVL, CHAR)
  field(INP, {const: "foo"})
}
```
where the buffer is only of size 1, but then we write at index 1 (aka
past the end of the buffer).

Co-authored-by: Lucas A. M. Magalhães <lucmaga@gmail.com>
2024-06-12 16:19:36 -07:00
Chris Guerrero
ede745cc34 Update aSubRecord.dbd.pod 2024-06-12 09:14:30 -07:00
Michael Davidsaver
a864f16318 dbCa test sync. improvements 2024-06-11 19:37:23 -07:00
seifalrahman
4c20518864 modifying the condition from (status!=0) to (status>0) to skip the block in case the status variable ==-1 2024-06-11 18:45:33 -07:00
Michael Davidsaver
6ca716a77f iocsh: add more iocshSetError() 2024-06-11 13:52:03 -07:00
Michael Davidsaver
aa77b1c04a iocInit errors say ERROR 2024-06-11 11:14:07 -07:00
Michael Davidsaver
fe4247d57d Send .db parser errors to stderr 2024-06-11 11:14:07 -07:00
Michael Davidsaver
77490d4939 space in errPrintf() output 2024-06-11 11:14:07 -07:00
Michael Davidsaver
0495ac3bc5 WARN for FLNK uses CA without PROC 2024-06-11 11:14:07 -07:00
Michael Davidsaver
4a305a42a7 softMain log iocInit() failure. 2024-06-11 11:14:07 -07:00
DW
11fba63d18 Fix histogram doc 2024-05-29 09:17:03 -05:00
Simon Rose
1db37bcd91 Update release notes 2024-05-29 09:15:35 -05:00
Simon Rose
beec00b403 Fix issue with compress record
The handling of N-to-M array compression was broken with the addition
of the partial buffer option, which broke the bounds check that was
being used.

Note that this also makes the partial buffer option more consistent;
if, for example, you have
```
record(compress, foo) {
  field(ALG, "N to 1 Average")
  field(INP, "bar NPP")
  field(NSAM, 2)
  field(N, 2)
  field(PBUF, YES)
}
```
(with `bar` having, e.g. length 3), then this will now behave as
expected on both of the samples.
2024-05-29 09:15:35 -05:00
DW
4966baf423 fix sizv for printf & fix doc 2024-05-20 09:18:26 -04:00
Michael Davidsaver
e5b4829074 bound lso/lsi to limit of dbAddr::field_size 2024-05-19 11:57:19 -04:00
Ralph Lange
d8b5616772 ci: bump checkout to v4 in check-editorconfig.yml
- fix node16.js usage warning
2024-05-16 10:07:12 +02:00
Ralph Lange
92615a77fe ci: fix last commit (GHA workaround) 2024-05-15 18:04:58 +02:00
Ralph Lange
b3f92d81db ci: add workaround for GHA node20@centos7 failures 2024-05-15 16:57:34 +02:00
Simon Rose
839f764bcb Clean up some potential memory leaks
The watchdog tasks are allocated, but not consistently removed. In
general this doesn't matter: they run in threads that will only
end when the process actually quits. For consistency and for the
purpose of future-proofing, I think there is value in having the
cleanup added in each case.
2024-05-15 09:26:09 -05:00
Simon Rose
4bb50fe664 Memory leak in caservertask.c 2024-05-15 09:26:09 -05:00
Ralph Lange
c77f32b19c Merge pull request #482 from ericonr/calcout-docs
Fix calcout doc typo.
2024-05-03 04:04:41 +09:00
Érico Nogueira
66ce1c2076 Fix calcout doc typo. 2024-05-02 15:29:22 -03:00
Érico Nogueira
1a9dc993c1 Fix gmtime messages in epicsTimeZoneTest. 2024-04-29 15:10:47 -07:00
Michael Davidsaver
cb1571783b link.h wrong type
Change to unsigned incorrectly increased size.

e88a186fc3
2024-04-02 08:35:25 -07:00
Freddie Akeroyd
5dfc6caf3c Accept should return SOCKET rather than int 2024-03-06 09:48:26 -06:00
Ralph Lange
cb49bd0133 Update ci-scripts to 3.4.1
Builds on AppVeyor (VS2019) started to fail
because of the Python version/distutils
2024-03-01 18:00:40 +01:00
Freddie Akeroyd
4720b61c1f Move call to setThreadName()
The call to setThreadName() is moved to avoid a race condition that
can happen with very short lived processes. If the process terminates
very quickly e.g. is a google test runner or the msi.exe command
called from a Makefile during a build, then very occasionally a
crash can occur during process termination if setThreadName() when called
from the newly created thread. This looks to be becauae the DLL it is
trying to call gets unloaded between it getting a handle to the DLL
and making the call. Moving the setThreadName() call to the creating
thread avoids this problem. The issue was only ever seen with statically
linked epics executables, I am unsure if the way a DLL based epics
program unloads might avoid this, or just make it less likely but
still possible. As mentioned above, the issue will only ever occur
to threads that are created during process termination and so would
not affect running IOCs
2024-02-21 09:59:36 -06:00
4383cf291e allow macros with defaults in dbLoadRecords without substitutions 2024-02-21 09:50:03 -06:00
Simon Rose
a6977ae731 Fix issue where VSCode makefile extension can delete files
The problem is that VSCode's make extension, in order to determine
some information about the project, runs
```
make --dry-run --always-make
```
which despite its name will actually try to remake the configure/*
files. Running `installEpics.pl` on these will delete them first,
then try copy them, resulting in an error.
2024-02-21 09:45:14 -06:00
Michael Davidsaver
07cbf00187 posix: warn on epicsSocketCreate() without osiSockAttach() 2023-12-22 10:26:28 -08:00
Michael Davidsaver
c75b9ad0be add dbRecordNode::order
Keep track of parse order of record instances.
2023-12-22 10:26:28 -08:00
Michael Davidsaver
87acb98d1e ca: remove hostname length limit when parsing address lists 2023-12-22 10:26:28 -08:00
Michael Davidsaver
403e203325 quieting clang-tidy, use unsigned
places where we shouldn't be negative anyway
2023-12-22 10:26:28 -08:00
Michael Davidsaver
a7a56912eb default/epicsMessageQueue: initialize threadNode 2023-12-22 10:26:28 -08:00
Michael Davidsaver
fe4a32e425 default/epicsMessageQueue: avoid volatile flag
Only one place where eventSent was accessed
without locking.  Move this load earlier.
2023-12-22 10:26:28 -08:00
Michael Davidsaver
823386573f ipAddrToAsciiGlobal::run() keep scratch buffer as local 2023-12-22 10:26:28 -08:00
Michael Davidsaver
ea8247586f adjustToWorstCaseAlignment() simplify
Add some STATIC_ASSERT to check assumptions.

Only in-tree use is freeListLib to ensure chunks in
a malloc()'d block are aligned.
2023-12-22 10:26:28 -08:00
Michael Davidsaver
e88a186fc3 make link::flags bit field unsigned 2023-12-22 10:26:28 -08:00
Michael Davidsaver
20f32068c3 gha add workflow_dispatch 2023-12-22 10:26:28 -08:00
Andrew Johnson
8998341588 Update version numbers and submodules after release 2023-12-15 13:03:57 -06:00
Andrew Johnson
448fde0671 Set release version numbers
Some checks failed
Check EditorConfig / editorconfig (push) Failing after 2s
Base / Cross linux-aarch64 (push) Failing after 1s
Base / Cross linux-arm gnueabi (push) Failing after 2s
Base / Cross linux-arm gnueabihf (push) Failing after 1s
Base / CentOS-7 (push) Failing after 2s
Base / Fedora-33 (push) Failing after 1s
Base / Fedora-latest (push) Failing after 2s
Base / Ub-20 clang-10 C++11 (push) Has been cancelled
Base / MacOS clang-12 (push) Has been cancelled
Base / Ub-20 clang-10 (push) Has been cancelled
Base / Ub-20 gcc-9 + RT-5.1 beatnik (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 / Ub-20 gcc-9 + RT-5.1 pc686 (push) Has been cancelled
Base / Ub-20 gcc-9 + RT-5.1 uC5282 (push) Has been cancelled
Base / Ub-20 gcc-9 + RT-5.1 xilinx_zynq_a9_qemu (push) Has been cancelled
Base / Win2019 mingw (push) Has been cancelled
Base / Ub-20 gcc-9 + MinGW (push) Has been cancelled
Base / Ub-20 gcc-9 unsigned char (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-22 gcc-12 c++20 Werror (push) Has been cancelled
Base / Win2019 MSC-19 (push) Has been cancelled
Base / Win2019 MSC-19, debug (push) Has been cancelled
Base / Win2019 MSC-19, static (push) Has been cancelled
2023-12-14 16:42:10 -06:00
Andrew Johnson
477e36b1f0 Update submodules to tagged versions 2023-12-14 16:42:10 -06:00
Andrew Johnson
fad830bd14 Remove example sub-module 2023-12-14 16:42:10 -06:00
Andrew Johnson
331df3d7e4 UNRELEASED => 7.0.8 2023-12-14 16:42:10 -06:00
Andrew Johnson
4a53713f37 Update Release Procedures/Checklist 2023-12-14 16:31:42 -06:00
Andrew Johnson
2e6fd505d2 Use epicsSnprintf() for old MSVC compilers 2023-12-14 11:31:36 -06:00
Andrew Johnson
5ecf7d18a8 Clean up Clang 15 sprintf() warnings in libcom and ca 2023-12-13 13:34:25 -06:00
Andrew Johnson
56dbc949ff Add declarations to flex, cleans up Clang 15 warnings. 2023-12-12 13:44:08 -06:00
Simon Rose
6a369acd0b Add newline to help text 2023-12-05 08:05:12 -08:00
Simon Rose
d9d35a4eab Allow auto-declarations for dbdExpand.pl 2023-12-01 09:19:03 -06:00
Ralph Lange
116881ad87 Use split() for fetching last tag with darcs
(setting $/='' breaks reading multi-line into an array)
2023-11-29 09:53:24 -06:00
96857d92bc fix problem with commands returning multiple trailing newlines 2023-11-29 09:53:24 -06:00
Érico Nogueira
0cf8c934f9 Set ASL0 for mbboDirect Bx fields.
Since the record's VAL field is ASL0, it doesn't make sense to gate
writes into the Bx fields with ASL1.
2023-11-29 09:44:03 -06:00
Michael Davidsaver
69d05fe5b0 Add ERROR to error messages 2023-11-26 15:25:09 -08:00
Michael Davidsaver
511bf1ffca const-ify dbLink arrays
external code really should never be modifying pamaplinkType[]
2023-11-25 14:52:16 -08:00
Uchenna Ezeobi
7a7028de56 Config: Fixed Hard coded LDFLAGS in MVME2500 2023-11-17 15:20:32 -06:00
Michael Davidsaver
7a65c001ce update submodules 2023-11-15 07:31:53 -08:00
Michael Davidsaver
0bc6ff3d4c release notes 2023-11-07 16:00:46 -08:00
Michael Davidsaver
f2fe9d1203 bi "Raw Soft Channel" use MASK
If set, apply MASK to value read into RVAL.
2023-11-07 15:53:41 -08:00
Michael Davidsaver
ffc2d0f23a incorrect error check on GetStdHandle()
Likely inconsequential as GetConsoleMode() should
return 0 when given an invalid handle.
2023-11-07 15:53:41 -08:00
Michael Davidsaver
a352865df9 print ANSI escapes to stderr
unconditionally print ANSI some escapes (to colorize errors)
to the stderr stream.
2023-11-07 15:53:22 -08:00
Michael Davidsaver
63740f2edd colorize more errlog messages 2023-11-07 15:53:22 -08:00
Jeremy Lorelli
f4be9daf4d Null check callback function in callbackRequest
Previously, calling callbackRequest(pcallback), where pcallback->callback
is NULL, would result in a crash on one of the callback threads.
2023-11-07 15:17:04 -08:00
Michael Davidsaver
3fa1932345 update ci-scripts 2023-11-07 15:14:09 -08:00
Michael Davidsaver
95bd5453d9 dbRecordField() add "did you mean..." hint for unknown field 2023-11-01 09:52:32 -05:00
Michael Davidsaver
eb3f8a004c const-ify dbCopyEntry() and dbCopyEntryContents() 2023-11-01 09:52:32 -05:00
Michael Davidsaver
9f868a1074 avoid hang during concurrent db_cancel_event()
cf. fab8fd7102
2023-11-01 09:24:44 -05:00
Michael Davidsaver
b41787b6bf doc 2023-10-22 17:42:36 -07:00
19b232545c gha: turn most warnings into errors in github build 2023-10-22 17:42:36 -07:00
Michael Davidsaver
2ca70d3aa2 iocsh: keep history file 2023-10-22 17:42:36 -07:00
JJL772
395015aac4 Com: Make STATIC_ASSERT macro typedefs unique 2023-10-22 17:42:36 -07:00
Michael Davidsaver
92cae86ff2 dbRecordsOnceOnly allow append only with "*"
with

> record(ai, "myrec") {}

dbRecordsOnceOnly!=0 currently disallows appending fields with either form:

> record("*", "myrec") {} # error
> record(ai, "myrec") {}  # error

Change the meaning such that dbRecordsOnceOnly!=0
allways allows appending when explicitly intended (rtype "*").

> record("*", "myrec") {} # allowed
> record(ai, "myrec") {}  # error

Also clearly label this parse error.
2023-10-22 17:42:36 -07:00
Jack Harper
49ea46ee5e iocsh: add comment to cvtArg explaining default iocsharg behaviour 2023-10-22 17:42:36 -07:00
Michael Davidsaver
df908f299b remove unused local 2023-10-22 17:42:36 -07:00
AlexWells
6dec68554c iocsh: Add underline separator between help outputs
Also tweaks the overall format of the message a bit.
Add tests for new help output format
2023-10-22 17:42:36 -07:00
Michael Davidsaver
badd8f518d update modules/pvData 2023-10-22 17:42:35 -07:00
Michael Davidsaver
766c9906b5 update ci-scripts 2023-10-22 14:46:28 -07:00
Jeremy Lorelli
60fa2d31da libCom: Fix buggy pointer dereference in postfix() 2023-09-26 09:52:13 -07:00
Michael Davidsaver
88ea1507f4 Fix compile w/ vs2012 2023-09-22 08:20:27 -07:00
Emilio Perez
8c08c57247 Allow adding error symbols after early initialization
This was acomplished by making errSymbolAdd add the error symbol directly
into the global hash table and removing errnumlist which is not needed
anymore.

Unit tests were added for checking the following cases:
- Adding a valid symbol and checking that it exists (fixed by this change)
- Getting an existing error symbol
- Getting a non existing error symbol
- Adding an invalid error symbol (fixed by this change)
- Adding an error symbol with a code that already
  exists (fixed by this change)

Therefore, issue #268 was fixed

error: statically allocate error symbol hash table

This will allow calling errSymbolAdd before errSymBld, therefore, a
function adding error symbols can now be run before iocInit or errlogInit

error: add a constant for the minimum module number

Make adding an identical error symbol not fail

A test case was also added which test that adding an error symbol
with same error code and message as one added before will not fail

Add locking to error symbol table

This protects the cases of:
- simultaneously adding and requesting of an error symbol
- simultaneously adding many error symbols

Update release notes regarding adding error symbols
2023-09-22 08:20:19 -07:00
Michael Davidsaver
45b3bce515 epicsThreadShow() zombies
Flag when the thread has returned, but the tracking
struct is still around.  eg. in need of joining.
2023-09-22 08:19:25 -07:00
Érico Nogueira
7c4a21eab4 libCom: detect support for backtrace() with __has_include.
This is necessary in order to build epics-base with musl libc, for
example, and any other C libraries which don't include this
functionality. In order to not regress builds with older compilers, we
still support the uclibc check. Furthermore, it has been checked that
uclibc-ng (the maintained version of uclibc) doesn't install the
<execinfo.h> header when the functionality is disabled [1] [2].

To avoid repetition, we don't define HAS_EXECINFO to 0 when it is not
available.

[1] https://cgit.uclibc-ng.org/cgi/cgit/uclibc-ng.git/tree/Makefile.in?id=cdb07d2cd52af39feb425e6d36c02b30916b9f0a#n224
[2] https://cgit.uclibc-ng.org/cgi/cgit/uclibc-ng.git/tree/Makefile.in?id=cdb07d2cd52af39feb425e6d36c02b30916b9f0a#n277
2023-09-21 08:18:49 -07:00
Michael Davidsaver
fab8fd7102 dbEvent: handle multiple db_event_cancel()
Allow for multiple db_event_cancel() (concurrent or
self-cancel) prior to event_task wakeup.

In db_event_cancel(), immediate free() only if idle
(not queued or in progress).  Otherwise, defer free()
to event task.  Avoids need to immediately expunge
canceled event from queue.  Allow event task to
process canceled events as normal (except no user_sub)
until npend==0.
2023-09-21 08:18:49 -07:00
Michael Davidsaver
3d25756065 privatize evSubscrip 2023-09-21 08:18:49 -07:00
Michael Davidsaver
5aca4c684c dbEvent minor 2023-09-14 08:54:40 +02:00
Michael Davidsaver
39b5c01c5d minor 2023-09-14 08:54:40 +02:00
Michael Davidsaver
3b22e5f710 doc dbLock.h 2023-09-14 08:54:40 +02:00
Michael Davidsaver
9f660f2238 add initHookAtPrepare 2023-09-05 08:54:48 +02:00
Michael Davidsaver
ca9c957e62 doc add page for initHooks.h 2023-09-05 08:53:40 +02:00
Michael Davidsaver
8488c9e891 initHookName() assert length
basic compile time consistency check.
2023-09-05 08:53:07 +02:00
Michael Davidsaver
1f2edb69d2 silence -Wformat-security for printfRecord
we know what we are doing... right?
2023-09-05 08:53:03 +02:00
Michael Davidsaver
fe3ee85aee doc errSymTbl.h 2023-09-05 08:52:58 +02:00
Michael Davidsaver
a74789d9c0 db: decimate and sync filters don't drop DBE_PROPERTY 2023-08-28 14:17:00 +02:00
Michael Davidsaver
7830345e59 move IocshRegister() to iocshInit()
No need for both global ctor and lazy init
2023-08-28 14:17:00 +02:00
Michael Davidsaver
1595ed8860 quieting clang-tidy, non-functional changes
Changes to syntax which should not effect generated code
2023-08-28 14:17:00 +02:00
Michael Davidsaver
d97943b697 timerPrivate.h: mark override/final
Clarify the class hierarchy by decorating types and
method override and/or final whenever possible.
Does not change the hierarchy.
2023-08-28 14:17:00 +02:00
Michael Davidsaver
f8f4376594 ~fdRegForOldFdmgr() can't throw doubleDelete
Exceptions can't actually be thrown from a
C++ class destructor.
2023-08-28 14:17:00 +02:00
Érico Nogueira
df397f4ade fix typo in boRecord.dbd.pod 2023-08-28 14:17:00 +02:00
Zainab Olalekan
7fd690e53e Fix libcom test failure on RTEMS 2023-08-28 14:17:00 +02:00
Andrew Johnson
bc5d347bb2 Call perror() before close(), add detail to messages 2023-08-28 14:17:00 +02:00
Chris Johns
3ea29f581b rtems: Close NTP socket 2023-08-28 14:17:00 +02:00
AlexWells
6de82bb0fd Additional help messages for iocsh
Henrique Silva <henrique.silva@ess.eu>
2023-08-28 13:24:16 +02:00
e1a51e2839 extra parentheses around second sizeof to silence "does not compute number of elements" warning 2023-08-28 13:24:16 +02:00
Michael Davidsaver
0f59d823d3 appveyor remove skip_commits: 2023-08-28 13:24:16 +02:00
Ralph Lange
00dc55b8a2 Fix usage info in .tools/make-tar.sh 2023-08-08 10:29:09 +02:00
Rolf Keitel
524f81b8bd Doc updates to PINI, PHAS & EVNT 2023-07-25 11:36:44 -05:00
Michael Davidsaver
80e62031e9 doc 2023-07-23 08:43:32 -07:00
Minijackson
d87fd0db01 Fix MAKEFLAGS parsing with Make 4.4+
Since Make version 4.4, MAKEFLAGS also contains long options and
overridden variables on the command-line[1].

[1]: https://git.savannah.gnu.org/cgit/make.git/tree/NEWS?h=4.4#n67

This means that parsing by filtering out '--%' doesn't work reliably
anymore, since it doesn't remove overrides:

Running 'make VAR=quacks' gives 'MAKEFLAGS=" -- VAR=quacks"', and
'checkflags' would understand that flags -q, -s, ... were set.

This would get transmitted below into 'QUIET_FLAGS' and
'QUESTION_FLAG', then passed to the 'genVersionHeader.pl' as '-i' and
'-q'.

The result would be that 'genVersionHeader.pl' would never create the
version header (only check for its up-to-date status), leading to
confusing errors:

  ../misc/epicsRelease.c:25:32: error: expected ')' before 'EPICS_VCS_VERSION'
     25 |     printf ( "## %s\n", "Rev. " EPICS_VCS_VERSION );
        |            ~                   ^~~~~~~~~~~~~~~~~~

The NEWS file[1] recommends using 'firstword', but unfortunately this is
not compatible with GNUMake < 3.82.
2023-07-22 08:36:43 -07:00
Ralph Lange
6636b4b9e7 libCom: check calloc() failure in RTEMS-posix/osdMessageQueue.c 2023-07-22 08:35:59 -07:00
Ralph Lange
b51d1de283 libCom: fix possible memory leak in RTEMS-posix/osdMessageQueue.c
found by static code analysis (cppcheck @ sonarqube)
2023-07-22 08:35:59 -07:00
Ralph Lange
38c99df2e0 libCom: fix possible memory leaks in iocLogServer.c
found by static code analysis (cppcheck @ sonarqube)
2023-07-22 08:35:59 -07:00
Ralph Lange
688195a273 libCom: handle realloc() failures correctly in macEnv.c
found by static code analysis (cppcheck @ sonarqube)
2023-07-22 08:35:59 -07:00
Ralph Lange
d691acc001 ca: init local variable in catime.c
found by static code analysis (cppcheck @ sonarqube)
2023-07-22 08:35:59 -07:00
Ralph Lange
059d32a975 db: init struct members in dbChannel.c
found by static code analysis (cppcheck @ sonarqube)
2023-07-22 08:35:59 -07:00
Henrique Silva
5c99031157 Add missing AFTC documentation to records
Fixes #313
2023-07-22 08:33:19 -07:00
Henrique Silva
a01c671399 Add missing HYST field documentation to longin record 2023-07-22 08:33:19 -07:00
Minijackson
b2c80efd33 release notes: link release notes from submodules'
fixes #226
2023-07-22 08:33:08 -07:00
Karl Vestin
39b6fa26da Added unit test for binary output record type 2023-07-22 08:32:16 -07:00
Karl Vestin
3ee6097ab7 Fixes #361 2023-07-22 08:30:44 -07:00
Emilio Perez
500a57738b Validate target record name when creating an alias
This fixes issue #312 by printing an error when a field is specified
2023-07-22 08:29:09 -07:00
AlexWells
f488765631 Add tests for PR#310
Also add missing NULL/empty checks
2023-07-22 08:28:25 -07:00
Sebastian Marsching
3a2d225682 Detect error in fprintf and return (fixes #309).
fprintf returns a negative value in order to signal an error. We have to
detect this situation in epicsStrPrintEscaped and return a negative
when fprintf returns a negative value in order to give the calling code
a chance to detect this situation.

The old implementation (of simply accumulating the return values of
fprintf) was wrong anyway, because it would not only lead to an error in
fprintf to be lost but would also cause the returned number to be too
small (not representing the actual number of bytes written) in such a
case.

The only case where the old implementation would work correctly was when
all calls to fprintf succeeded or all these calls failed.
2023-07-22 08:27:32 -07:00
Doug Murray
1d056c6fe4 Add support for CA tools timeout from environment variable EPICS_CLI_TIMEOUT 2023-07-22 08:24:22 -07:00
Michael Davidsaver
42604fc794 Allow clang with GCC compilerSpecific.h
Some checks failed
Check EditorConfig / editorconfig (push) Failing after 1s
Base / Cross linux-aarch64 (push) Failing after 2s
Base / Cross linux-arm gnueabi (push) Failing after 1s
Base / Cross linux-arm gnueabihf (push) Failing after 2s
Base / CentOS-7 (push) Failing after 1s
Base / Fedora-33 (push) Failing after 2s
Base / Fedora-latest (push) Failing after 1s
Base / Ub-20 clang-10 C++11 (push) Has been cancelled
Base / Ub-20 gcc-9 + RT-4.10 (push) Has been cancelled
Base / Ub-20 gcc-9 + RT-5.1 xilinx_zynq_a9_qemu (push) Has been cancelled
Base / Win2019 mingw (push) Has been cancelled
Base / Ub-20 gcc-9 + MinGW (push) Has been cancelled
Base / Ub-20 gcc-9 unsigned char (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 / MacOS clang-12 (push) Has been cancelled
Base / Ub-20 clang-10 (push) Has been cancelled
Base / Ub-20 gcc-9 + RT-5.1 beatnik (push) Has been cancelled
Base / Ub-20 gcc-9 + RT-4.9 (push) Has been cancelled
Base / Ub-20 gcc-9 + RT-5.1 pc686 (push) Has been cancelled
Base / Ub-20 gcc-9 + RT-5.1 uC5282 (push) Has been cancelled
Base / Win2019 MSC-19 (push) Has been cancelled
Base / Win2019 MSC-19, debug (push) Has been cancelled
Base / Win2019 MSC-19, static (push) Has been cancelled
Makes it easier to run clang derivative analysis tools
on builds configured for GCC.
2023-06-13 08:47:13 -07:00
Michael Davidsaver
4ecc0daa79 make mapDBFToDBR[] const 2023-06-13 08:47:13 -07:00
Michael Davidsaver
5a1f3ecc8b doc: note when some record types were introduced 2023-05-18 11:57:41 -07:00
Michael Davidsaver
cb97d662a7 doc 2023-05-01 10:31:01 -07:00
Michael Davidsaver
d4fab0d20e iocsh: dbCompleteRecord() missing NULL check 2023-05-01 10:31:01 -07:00
Michael Davidsaver
0c13e6ba6c iocsh: tab completion handle iocshArgArgv 2023-05-01 10:31:01 -07:00
Michael Davidsaver
8f1243da40 epicsSingleton: eliminate global ctor with >= c++11 2023-05-01 10:25:29 -07:00
Michael Davidsaver
fe9995c0b5 Update recommendation for CONFIGURE_MAXIMUM_FILE_DESCRIPTORS 2023-05-01 09:06:59 -07:00
Freddie Akeroyd
f56412d6a5 WIN32: use FlsAlloc() to cleanup epicsThreadOSD
Adjust macros for compiling for older MSVC/Win SDK versions

Try to cover missing fibres include in 7.0 SDK

Support Windows XP and above.
Also removed explicit define of _WIN32_WINNT in code if it has not
been passed on compile line. This is possibly a matter for
further discussion
2023-05-01 09:03:52 -07:00
Érico Nogueira
07d18c55ba Clean whitespace in makeBaseApp template README 2023-05-01 09:03:52 -07:00
Minijackson
9f97f25669 ci: add cross-compilation tests for aarch64, arm soft and hard float 2023-05-01 09:03:52 -07:00
912a82c0b5 replace deprecated decrementing volatile with atomic decrement 2023-05-01 09:03:52 -07:00
acf2241fd0 Some archs define ECHO in termios.h 2023-05-01 09:03:52 -07:00
Eva Lott
b878295d06 Added the new annotation EPICS_PRINTF_FMT 2023-05-01 09:03:45 -07:00
f41f11c7f6 fix compiler warning on 32 bit systems 2023-04-28 09:35:49 -05:00
Michael Davidsaver
216359974c update release notes 2023-04-18 13:11:59 -05:00
Torsten Bögershausen
17ad04505e Change compiler for FreeBSD 13: Use clang
FreeBSD 13 uses clang, not gcc, any more.
GNU_DIR must be set to /usr/local

Note: This change touches both the x86 and the x86_64 files.
It was tested on 'amd64' system only, which is x86_64
2023-04-18 09:51:33 -05:00
Michael Davidsaver
3500a02034 iocsh: expose dbCreateAlias 2023-04-18 09:51:28 -05:00
Michael Davidsaver
52b18d56a0 dbCreateAlias fixup error handling 2023-04-18 09:51:28 -05:00
Michael Davidsaver
5507646ce7 posix: optimize epicsThreadOnce()
Use atomic ops to short circuit when already initialized
2023-04-18 09:51:24 -05:00
Michael Davidsaver
625c2ef159 epicsThreadPerform: time epicsThreadOnce() 2023-04-18 09:51:24 -05:00
Jure Varlec
bdaca51d96 Update shareLib API docs, directing the reader to makeAPIheader.pl 2023-04-18 09:51:21 -05:00
Jure Varlec
9655b78e11 Update release notes: ts filter 2023-04-18 09:51:07 -05:00
Jure Varlec
e11f88017d ts filter: port to the new db_field_log 2023-04-18 09:51:07 -05:00
Jure Varlec
8a3020033e ts filter: replace cantProceed with a non-fatal error msg 2023-04-18 09:51:07 -05:00
Jure Varlec
bd1af9ac95 ts filter: fix unused variable warnings 2023-04-18 09:51:07 -05:00
Jure Varlec
d5959ca20a ts filter: handle calloc failures 2023-04-18 09:51:07 -05:00
Jure Varlec
e10dcede7d ts filter: clear the dtor field after destruction 2023-04-18 09:51:07 -05:00
Jure Varlec
c042b08ab0 Extend timestamp filter, giving access to the record timestamp 2023-04-18 09:51:07 -05:00
Michael Davidsaver
5eff3803a8 update release notes 2023-03-10 12:02:29 +00:00
Michael Davidsaver
151256533f renamed hidden pdbbase in dbd parser
avoid confusion with non-static pdbbase global
2023-03-10 11:00:58 +00:00
Michael Davidsaver
3b484f58d3 for links, treat "" the same as unset. 2023-03-10 11:00:58 +00:00
Michael Davidsaver
d3f93746a8 1<<31 upsets ubsan 2023-03-10 10:57:35 +00:00
Michael Davidsaver
f99a1cb0f3 dbdToRecordtypeH use offsetof()
quiets UB sanitizer
2023-03-10 10:57:35 +00:00
Michael Davidsaver
531a769007 fix rtems_ne2kpci_driver_attach prototype 2023-03-10 10:57:35 +00:00
Henrique Silva
3e51491628 Fix generalTimeReport interest_level argument type
Setting to iocshArgInt actually makes the function verbosity to be able
to be controlled by the value
2023-03-10 10:56:58 +00:00
0b01fb20db make buffer large enough for any argument value 2023-03-10 10:56:58 +00:00
Minijackson
c7a769e5da editorconfig: add workflow to check if config is upheld 2023-03-10 10:56:58 +00:00
Minijackson
a9fd57a865 editorconfig: add initial version forcing final newlines
See #337
2023-03-10 10:56:58 +00:00
e862f0e95f fix warning "if clause does not guard..." 2023-03-10 10:56:58 +00:00
172597e0e6 avoid accessing dbr_text[type] when type is out of range 2023-03-10 10:56:58 +00:00
bcdeeed206 fix missing newline at end of file 2023-03-10 10:56:58 +00:00
Michael Davidsaver
b6626e4f60 dbEvent: try to detect possible "stall"
event_read() should not return if the last callback
was delivered with eventsRemaining!=0
2023-03-10 10:56:58 +00:00
Michael Davidsaver
e1c1bb8b1b dbEvent: correct eventsRemaining
Only pass eventsRemaining when no queued events have been canceled.
Also possible race bt accessing ev_que with locking.
2023-03-10 10:56:58 +00:00
Torsten Bögershausen
90ae51e8f2 MacOs: Use readline from MacPorts
Commit b38ff09f6e and
commit d9ca8a70f0 introduced the TAB
completion in iocsh.

Commit 1f75813a4d enabled it for MacOs
having readline installed via HomeBrew.

This commit enables it for MacPorts.
2023-03-10 10:56:58 +00:00
Brendan Chandler
832abbd3b1 Return an error if subrecord processing fails due to bad INP links
If a sub record has an invalid INPx link, it was silently failing (and
not running the proc function).  This change plumbs in the error, so
the put fails and the user knows something went wrong.
2023-03-10 10:56:58 +00:00
Michael Davidsaver
52cc68433f COMMANDLINE_LIBRARY fallback to $(wildcard $(GNU_DIR) 2023-03-10 09:52:30 +00:00
Michael Davidsaver
f430389ee7 iocShutdown(): Always stop worker threads 2023-03-10 09:52:08 +00:00
Michael Davidsaver
bded79f14d dbScan join threads 2023-03-10 09:52:08 +00:00
Michael Davidsaver
2ff44cb386 callback join threads 2023-03-10 09:52:08 +00:00
Michael Davidsaver
a9ade9669a switch dbScan to epicsThreadCreateOpt() 2023-03-10 09:52:08 +00:00
Michael Davidsaver
f902d70006 switch callback to epicsThreadCreateOpt() 2023-03-10 09:52:08 +00:00
Michael Davidsaver
e22d74310b RTEMS: ensure epicsThreadMustJoin() short-circuits 2023-03-10 09:52:08 +00:00
Simon Rose
e5ad12e638 Updated RELEASE_NOTES 2023-03-10 09:51:08 +00:00
Simon Rose
b963a4564e Added commend about PBUF having no effect on 'Average' algorithm 2023-03-10 09:51:08 +00:00
Simon Rose
579c125b01 Updated documentation 2023-03-10 09:51:08 +00:00
Simon Rose
84d9617375 Added one more put/process to go over the buffer length
Note that it is not really a circular buffer in this case, but
a full reset of the buffer to the beginning. This matches the
documentation, but it seems valuable to add an explicit test for
this case.
2023-03-10 09:51:08 +00:00
Simon Rose
d66e90a016 Fixing 'error C2057: expected constant expression' error 2023-03-10 09:51:08 +00:00
Simon Rose
373e5440ac General cleanup 2023-03-10 09:51:08 +00:00
Simon Rose
dec23501e1 Added test for array_average 2023-03-10 09:51:08 +00:00
Simon Rose
11a4bed9aa compress_scalar for average works correctly now 2023-03-10 09:51:08 +00:00
Simon Rose
bf4a4c6b78 Added failing test for partial ai average 2023-03-10 09:51:08 +00:00
Simon Rose
b54d4b9a24 Added test for low value 2023-03-10 09:51:08 +00:00
Simon Rose
84f4771691 Single input data test passes 2023-03-10 09:51:08 +00:00
Simon Rose
1dc34a02e2 Add test path for single input data 2023-03-10 09:51:08 +00:00
Simon Rose
3ab22818da Added failing test for partially filled buffer average 2023-03-10 09:51:08 +00:00
Simon Rose
1ab474638d Initial test for averaging 2023-03-10 09:51:08 +00:00
Michael Davidsaver
eea361bf5e Com: Allow runtime bypass of freeListLib
By environment or iocsh variable.
2023-03-10 09:48:27 +00:00
Michael Davidsaver
d9052f7105 update ci-scripts 2023-03-09 14:26:45 +00:00
Michael Davidsaver
fa00572780 update pvData 2023-03-06 15:54:34 +00:00
Ralph Lange
636f5517b2 Add QT Creator 9.x dir to .gitignore 2023-03-06 09:30:02 +00:00
Andrew Johnson
718da5c9be Convert RecordReference.md to ComponentReference.pod
That .pod file will now be converted to .html using the same style as
the individual local documents that it links to.

The dbdToHtml output files now include a header and footer that link to
the ComponentReference.html file (they started pointing to the original
RecordReference.html but that was broken on most people's builds because
we weren't converting that from the original Markdown version).

This commit also adjusts documentation/Makefile to use the build system
properly, and reorders the Doxygen main page index.
2023-02-04 22:56:19 -06:00
Michael Davidsaver
e5335ce760 GHA: Add -funsigned-char build 2023-02-01 09:25:10 -08:00
3dbc9ea264 iocsh: fix argument splitting
Since commit 60128ee9 "Com: separate iocsh argument splitting",
iocsh is broken on VxWorks (tested with version 6.9.4.12)

Any command prints the error "Unbalanced quote."

> iocsh
epics> echo
Unbalanced quote.
epics> "echo"
Unbalanced quote.
epics> "echo
Unbalanced quote.
epics> echo bla
Unbalanced quote.
epics> echo 1 2 3
Unbalanced quote.
epics> exit
Unbalanced quote.
2023-02-01 09:25:10 -08:00
Michael Davidsaver
80da400f9c dbLock: avoid possibly lost log prior to cantProceed 2023-02-01 09:25:10 -08:00
Michael Davidsaver
5787125bbb doc 2023-02-01 09:25:10 -08:00
Andrew Johnson
bc54524270 Fix bad JSON char detection in dbStatic
Thanks to Dirk Zimoch for pointing this out.
2023-01-24 11:08:13 -06:00
Andrew Johnson
a2d53c05f6 Explain SNC registration in template 2023-01-24 11:06:48 -06:00
Andrew Johnson
3293a29d59 Darwin: Remove '-undefined dynamic_lookup' from SHRLIB_LDFLAGS
It's been deprecated by Apple in latest XCode and generates warning
messages when creating .dylib libraries, but they don't yet have a
solution for use when creating loadable libraries (.bundle files).
2023-01-19 11:05:21 -06:00
Andrew Johnson
550e902bf3 iocLogPrefix: skip "already set" warning if prefix identical 2023-01-19 11:00:14 -06:00
Andrew Johnson
84e5cc0b69 softIoc -v -x prefix should show loading exit_file 2023-01-19 10:56:46 -06:00
Andrew Johnson
4b63882f28 Appveyor config fixes 2023-01-06 15:28:15 -06:00
Andrew Johnson
fb742beae3 Fix epicsThreadOnceTest.c
Replace epicsThreadSleep() with proper thread synchronization.
The main thread was reading runCount without taking lock first.
Taking the lock before accessing doneCount might not be necessary
given the epicsEventMustWait(), but not 100% sure.
2023-01-06 15:24:56 -06:00
Andrew Johnson
7ef0c80630 errSymLib: status 0 => "Ok" 2022-12-31 19:14:57 -06:00
Andrew Johnson
1f75813a4d Have macOS builds use Homebrew's GNU readline if present 2022-12-31 19:12:49 -06:00
Andrew Johnson
34ad8e2347 Edits to Release Notes and postfix.h documentation 2022-12-31 19:10:49 -06:00
Andrew Johnson
413f14e4ae Remove now-unused pdset variable. 2022-12-29 18:10:38 -06:00
Andrew Johnson
c22895d499 Adjust documentation about longout feature 2022-12-29 18:04:48 -06:00
Andrew Johnson
e63184e518 Merge PR #63, longout.OOPT 2022-12-29 16:31:42 -06:00
Andrew Johnson
755a4541c5 Update the RecordReference.md index; add links and filters. 2022-12-28 15:53:48 -06:00
Andrew Johnson
05cd7edf71 Update channel filter documentation, adding $ syntax 2022-12-28 15:52:30 -06:00
Andrew Johnson
5759726a89 Update link documentation 2022-12-28 15:43:35 -06:00
Andrew Johnson
14e7926d22 Add RecRef links to the top & bottom of each reference page 2022-12-28 15:30:25 -06:00
Andrew Johnson
c068fe3525 capr.pl: Fetch link fields as long strings 2022-12-28 12:43:38 -06:00
Andrew Johnson
c2364d9d1c Add license header to new epicsReadlinePvt.h 2022-12-28 12:42:51 -06:00
Michael Davidsaver
6be0372257 doc 2022-12-21 09:50:07 -08:00
Michael Davidsaver
e994ad78db GHA update 2022-12-21 08:15:26 -08:00
Michael Davidsaver
49fddaa13e errlogRemoveListeners() handle self-removal
Handle errlogRemoveListeners() during a callback.
2022-12-20 20:12:04 -08:00
Michael Davidsaver
7448a8bfa9 errlog: worker exit when buffer is empty
Allow the worker to flush any buffered messages.
After pvt.atExit, further logging will be synchronous.
Ensure any flusher gets a final wakeup.
2022-12-20 20:12:04 -08:00
Michael Davidsaver
166267a32f ringPointerTest in thread 2022-12-20 20:12:04 -08:00
Andrew Johnson
b460c2659e Fix for GH issue #219, menu fields with non-choice values
It's rare, but menu fields may hold a value that does not correspond
to one of the menu choices; the default value of the SSCN fields is
the most common example (65535). Change the type conversion routines
to return a numeric string instead of giving an error.

DBF_DEVICE was fixed in dbFastLinkConv.c before the 7.0.7 release.
2022-12-20 20:12:04 -08:00
Michael Skoufis
7ccc3ab82d Modify pointer type in example to match options from epicsTypes.h 2022-12-20 20:12:04 -08:00
Michael Davidsaver
adb0c898a6 doc 2022-12-20 20:12:04 -08:00
Michael Davidsaver
b38ff09f6e Com: iocsh: Tab completion of variable names for "var" 2022-12-20 20:12:04 -08:00
Michael Davidsaver
d9ca8a70f0 Com: iocsh: Tab completion
Add tab completion for "help ...", record names, and "pdbbase"
2022-12-20 20:12:04 -08:00
Michael Davidsaver
60128ee924 Com: separate iocsh argument splitting 2022-12-20 20:12:04 -08:00
Michael Davidsaver
b189991f9d Com: iocsh: add tab completion for command names 2022-12-20 20:12:04 -08:00
Michael Davidsaver
07ffc1ffae Com: introduce epicsReadlinePvt.h
Helping IDEs understand gnuReadline.c and osdReadline.c
2022-12-20 20:11:45 -08:00
Michael Davidsaver
a6afef4850 calc: add FMOD 2022-12-20 20:11:44 -08:00
Michael Davidsaver
9c0c486111 appveyor: bypass auto-detect of readline 2022-12-08 09:12:45 -08:00
Michael Davidsaver
3f5cf61fb6 update pvData 2022-12-05 10:51:47 -08:00
Andrew Johnson
6222902688 Update pva2pva module 2022-12-01 12:43:18 -06:00
Andrew Johnson
7febee04fa More & better Perl script dependencies 2022-11-30 13:35:56 -06:00
Andrew Johnson
4640f0a8ae Fix dbdExpand.pl issue 2022-11-30 13:34:22 -06:00
Andrew Johnson
8969a952e4 configure: Make Perl-generated files dependent on their .pl script 2022-11-24 17:57:05 -06:00
Michael Davidsaver
bc9415bb10 epicsErrlogTest: osiSockAttach() 2022-11-15 10:07:26 -08:00
Andrew Johnson
cbd86ada20 regRecDevDrv.pl: Don't break long symbol names in DBD files
Makes a test symbol name long enough to trigger the problem.

Fixes lp: #1995728
2022-11-04 11:09:06 -05:00
Michael Davidsaver
0f8ea3aa36 doc update dbUnitTest.h 2022-09-25 09:34:13 -07:00
Andrew Johnson
f62f68fd66 Update all submodules for future development 2022-09-07 17:00:45 -05:00
Andrew Johnson
eddafd2827 Release Checklist used for 7.0.7 2022-09-07 16:58:21 -05:00
Andrew Johnson
e3ce9d7f1a Adjustments to the make-tar.sh script 2022-09-07 16:57:09 -05:00
Andrew Johnson
df96e6df0f Set next development versions 2022-09-07 13:54:12 -05:00
Joao Paulo Martins
6c573b496a longout rec: fix behaviour when record is processed for the first time and OOPT is On Change 2021-03-10 18:50:42 +01:00
Joao Paulo Martins
1d85bc7424 longout record: detect OUT link change using special function AFTER put, better documentation 2021-03-10 11:07:30 +01:00
Joao Paulo Martins
f4d94b9725 Longout OOPT field refactoring and updated documentation; Release notes additions 2021-03-09 16:31:54 +01:00
Joao Paulo Martins
4e7a18bfb4 Adding test routines for longout record with OOPT field 2021-03-09 16:31:54 +01:00
Joao Paulo Martins
c1ae5064b8 Added OOPT to longout record 2021-03-09 16:31:54 +01:00
505 changed files with 13992 additions and 4467 deletions

View File

@@ -25,18 +25,6 @@ init:
# Set clone depth (do not fetch complete history)
clone_depth: 5
# Skipping commits affecting only specific files
skip_commits:
files:
- 'documentation/*'
- 'startup/*'
- '.github/*'
- '.tools/*'
- '.gitattributes'
- '.lgtm.yml'
- '**/*.html'
- '**/*.md'
#---------------------------------#
# build matrix configuration #
#---------------------------------#
@@ -68,6 +56,8 @@ environment:
- CMP: vs2010
- CMP: gcc
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
# TODO: static linking w/ readline isn't working. Bypass auto-detect
COMMANDLINE_LIBRARY: EPICS
# Platform: processor architecture
platform:

View File

@@ -32,18 +32,6 @@ init:
# Set clone depth (do not fetch complete history)
clone_depth: 5
# Skipping commits affecting only specific files
skip_commits:
files:
- 'documentation/*'
- 'startup/*'
- '.github/*'
- '.tools/*'
- '.lgtm.yml'
- '.gitattributes'
- '**/*.html'
- '**/*.md'
#---------------------------------#
# build matrix configuration #
#---------------------------------#
@@ -74,6 +62,9 @@ environment:
- CMP: vs2012
- CMP: vs2010
- CMP: gcc
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
# TODO: static linking w/ readline isn't working. Bypass auto-detect
COMMANDLINE_LIBRARY: EPICS
# Platform: processor architecture
platform:

2
.ci

Submodule .ci updated: 8a2666a9de...0e93b70855

8
.editorconfig Normal file
View File

@@ -0,0 +1,8 @@
# Documentation for this file: https://EditorConfig.org
root = true
# Unix-style newlines ending every file,
# as some compilers complain about files not ending in newline
[*]
insert_final_newline = true

14
.gitattributes vendored
View File

@@ -1,9 +1,11 @@
.ci/ export-ignore
.tools/ export-ignore
.github/ export-ignore
.appveyor/ export-ignore
.appveyor.yml export-ignore
README export-subst
.appveyor.yml export-ignore
.appveyor/ export-ignore
.ci/ export-ignore
.github/ export-ignore
.gitmodules export-ignore
.readthedocs.yml export-ignore
.tools/ export-ignore
README export-subst
#Which files need CRLF handling
# default to automatic

22
.github/codeql/config.yml vendored Normal file
View File

@@ -0,0 +1,22 @@
name: "CodeQL Config"
# Queries and the suites they belong to are documented at
# https://codeql.github.com/codeql-query-help/cpp/
queries:
- uses: security-and-quality
# Choose the above from 3 query suites:
# default
# The default set of queries
# security-extended
# `default` suite plus lower severity and precision queries
# security-and-quality
# `security-extended`, plus maintainability and reliability queries
query-filters:
-
exclude:
id: cpp/use-of-goto
-
exclude:
problem.severity: recommendation

View File

@@ -0,0 +1,13 @@
name: Check EditorConfig
on:
push:
pull_request:
jobs:
editorconfig:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: EditorConfig-Action
uses: greut/eclint-action@v0

View File

@@ -15,7 +15,6 @@ on:
- 'startup/*'
- '.appveyor/*'
- '.tools/*'
- '.lgtm.yml'
- '.gitattributes'
- '**/*.html'
- '**/*.md'
@@ -25,10 +24,10 @@ on:
- 'startup/*'
- '.appveyor/*'
- '.tools/*'
- '.lgtm.yml'
- '.gitattributes'
- '**/*.html'
- '**/*.md'
workflow_dispatch:
env:
SETUP_PATH: .ci-local:.ci
@@ -43,9 +42,7 @@ jobs:
env:
CMP: ${{ matrix.cmp }}
BCFG: ${{ matrix.configuration }}
WINE: ${{ matrix.wine }}
RTEMS: ${{ matrix.rtems }}
RTEMS_TARGET: ${{ matrix.rtems_target }}
CI_CROSS_TARGETS: ${{ matrix.cross }}
EXTRA: ${{ matrix.extra }}
TEST: ${{ matrix.test }}
strategy:
@@ -53,114 +50,120 @@ jobs:
matrix:
# Job names also name artifacts, character limitations apply
include:
- os: ubuntu-22.04
cmp: gcc-12
name: "Ub-22 gcc-12 c++20 Werror"
# Turn all warnings into errors,
# except for those we could not fix (yet).
# Remove respective -Wno-error=... flag once it is fixed.
extra: "CMD_CXXFLAGS=-std=c++20
CMD_CPPFLAGS='-fdiagnostics-color
-fstack-protector-strong
-Wformat
-Werror
-Werror=format-security
-Wno-error=deprecated-declarations
-Wno-error=stringop-truncation
-Wno-error=restrict
-Wno-error=sizeof-pointer-memaccess
-Wno-error=nonnull
-Wno-error=dangling-pointer
-Wno-error=format-overflow
-Wno-error=stringop-overread
-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3'
CMD_LDFLAGS=-Wl,-z,relro"
- os: ubuntu-20.04
cmp: gcc
configuration: default
wine: "64"
name: "Ub-20 gcc-9 + MinGW"
cross: "windows-x64-mingw"
name: "Ub-20 gcc + MinGW"
- os: ubuntu-20.04
cmp: gcc
configuration: static
wine: "64"
name: "Ub-20 gcc-9 + MinGW, static"
cross: "windows-x64-mingw"
name: "Ub-20 gcc + MinGW, static"
- os: ubuntu-20.04
cmp: gcc
configuration: static
extra: "CMD_CXXFLAGS=-std=c++11"
name: "Ub-20 gcc-9 C++11, static"
name: "Ub-20 gcc C++11, static"
- os: ubuntu-20.04
cmp: gcc
configuration: static
extra: "CMD_CFLAGS=-funsigned-char CMD_CXXFLAGS=-funsigned-char"
name: "Ub-20 gcc unsigned char"
- os: ubuntu-20.04
cmp: clang
configuration: default
name: "Ub-20 clang-10"
name: "Ub-20 clang"
- os: ubuntu-20.04
cmp: clang
configuration: default
extra: "CMD_CXXFLAGS=-std=c++11"
name: "Ub-20 clang-10 C++11"
name: "Ub-20 clang C++11"
- os: ubuntu-20.04
cmp: gcc
configuration: default
rtems: "5"
rtems_target: RTEMS-pc686-qemu
name: "Ub-20 gcc-9 + RT-5.1 pc686"
cross: "RTEMS-pc686-qemu@5"
name: "Ub-20 gcc + RT-5.1 pc686"
- os: ubuntu-20.04
cmp: gcc
configuration: default
rtems: "5"
rtems_target: RTEMS-beatnik
cross: "RTEMS-beatnik@5"
test: NO
name: "Ub-20 gcc-9 + RT-5.1 beatnik"
# Only build one RTEMS target per CPU family
# unless it's running the tests
#
# - os: ubuntu-20.04
# cmp: gcc
# configuration: default
# rtems: "5"
# rtems_target: RTEMS-mvme3100
# test: NO
# name: "Ub-20 gcc-9 + RT-5.1 mvme3100"
#
# - os: ubuntu-20.04
# cmp: gcc
# configuration: default
# rtems: "5"
# rtems_target: RTEMS-qoriq_e500
# test: NO
# name: "Ub-20 gcc-9 + RT-5.1 qoriq_e500"
name: "Ub-20 gcc + RT-5.1 beatnik"
- os: ubuntu-20.04
cmp: gcc
configuration: default
rtems: "5"
rtems_target: RTEMS-xilinx_zynq_a9_qemu
cross: "RTEMS-xilinx_zynq_a9_qemu@5"
test: NO
name: "Ub-20 gcc-9 + RT-5.1 xilinx_zynq_a9_qemu"
name: "Ub-20 gcc + RT-5.1 xilinx_zynq_a9_qemu"
- os: ubuntu-20.04
cmp: gcc
configuration: default
rtems: "5"
rtems_target: RTEMS-uC5282
cross: "RTEMS-uC5282@5"
test: NO
name: "Ub-20 gcc-9 + RT-5.1 uC5282"
name: "Ub-20 gcc + RT-5.1 uC5282"
- os: ubuntu-20.04
cmp: gcc
configuration: default
rtems: "4.10"
name: "Ub-20 gcc-9 + RT-4.10"
rtems_target: RTEMS-pc386-qemu
name: "Ub-20 gcc + RT-4.10"
cross: "RTEMS-pc386-qemu@4.10"
test: NO
- os: ubuntu-20.04
cmp: gcc
configuration: default
rtems: "4.9"
name: "Ub-20 gcc-9 + RT-4.9"
rtems_target: RTEMS-pc386-qemu
name: "Ub-20 gcc + RT-4.9"
cross: "RTEMS-pc386-qemu@4.9"
- os: macos-latest
cmp: clang
configuration: default
name: "MacOS clang-12"
name: "MacOS clang"
- os: windows-2019
cmp: vs2019
configuration: default
configuration: debug
name: "Win2019 MSC-19"
extra: "CMD_CXXFLAGS=-analysis"
- os: windows-2019
cmp: vs2019
configuration: static
configuration: static-debug
name: "Win2019 MSC-19, static"
extra: "CMD_CXXFLAGS=-analysis"
- os: windows-2019
cmp: vs2019
@@ -172,8 +175,28 @@ jobs:
configuration: default
name: "Win2019 mingw"
# Cross builds
- os: ubuntu-latest
cmp: gcc
configuration: default
name: "Cross linux-aarch64"
cross: linux-aarch64
- os: ubuntu-latest
cmp: gcc
configuration: default
name: "Cross linux-arm gnueabi"
cross: linux-arm@arm-linux-gnueabi
- os: ubuntu-latest
cmp: gcc
configuration: default
name: "Cross linux-arm gnueabihf"
cross: linux-arm@arm-linux-gnueabihf
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
submodules: true
- name: Automatic core dumper analysis
@@ -191,7 +214,7 @@ jobs:
run: python .ci/cue.py -T 60M test
- name: Upload tapfiles Artifact
if: ${{ always() }}
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: tapfiles ${{ matrix.name }}
path: '**/O.*/*.tap'
@@ -216,10 +239,10 @@ jobs:
matrix:
# Job names also name artifacts, character limitations apply
include:
- name: "CentOS-7"
image: centos:7
cmp: gcc
configuration: default
#- name: "CentOS-7"
# image: centos:7
# cmp: gcc
# configuration: default
- name: "Fedora-33"
image: fedora:33
@@ -258,11 +281,15 @@ jobs:
# people would rather just break all existing scripts...
[ -e /usr/bin/python ] || ln -sf python3 /usr/bin/python
python --version
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
submodules: true
- name: Automatic core dumper analysis
uses: mdavidsaver/ci-core-dumper@master
if: matrix.image!='centos:7'
- name: Automatic core dumper analysis
uses: mdavidsaver/ci-core-dumper@node16
if: matrix.image=='centos:7'
- name: Prepare and compile dependencies
run: python .ci/cue.py prepare
- name: Build main module
@@ -271,7 +298,7 @@ jobs:
run: python .ci/cue.py -T 20M test
- name: Upload tapfiles Artifact
if: ${{ always() }}
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: tapfiles ${{ matrix.name }}
path: '**/O.*/*.tap'

64
.github/workflows/codeql.yml vendored Normal file
View File

@@ -0,0 +1,64 @@
name: "CodeQL"
on:
push:
branches: 7.0
tags: 'R7.0.*'
pull_request:
branches: 7.0
paths-ignore:
- '.appveyor/*'
- '.tools/*'
- 'documentation/*'
- 'startup/*'
- '**/*.md'
- '**/*.html'
jobs:
analyze:
name: Analyze
runs-on:
- ubuntu-latest
# - windows-latest
# Supported by CodeQL which would check the Windows
# port, but needs more work here to set it up
permissions:
# Required for all workflows:
security-events: write
strategy:
fail-fast: false
matrix:
language: [ cpp ]
steps:
- name: Checkout Repositories
uses: actions/checkout@v4
with:
submodules: false
- name: Install Packages
run: |
sudo apt-get update
sudo apt-get install --yes libreadline-dev
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
config-file: ./.github/codeql/config.yml
- name: Build C/C++
run: |
echo '*** Building with these versions >>>'
g++ --version
make --version
perl --version
echo '<<<'
make -sj2 || echo '*** Ignoring build failure for CodeQL ***'
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{ matrix.language }}"

3
.gitignore vendored
View File

@@ -3,6 +3,7 @@
/lib/
/db/
/dbd/
/doc/
/html/
/include/
/templates/
@@ -11,8 +12,10 @@
/modules/Makefile.local
O.*/
/QtC-*
/.qtc_*
/.vscode/
*.orig
*.log
.*.swp
.DS_Store
.iocsh_history

View File

@@ -1,50 +0,0 @@
# Configuration for lgtm.com
#
path_classifiers:
test:
- exclude: /
- test
- "modules/*/test*"
library:
- modules/libcom/src/yacc
- modules/libcom/src/flex
template:
- src/template
- modules/ca/src/template
- modules/database/src/template
extraction:
cpp:
prepare:
packages:
- "libreadline-dev"
index:
build_command:
- "g++ --version"
- "make --version"
- "perl --version"
- "make -sj2 || echo '*** Build failed, ignored for lgtm ***'"
python:
index:
include:
- src/tools
# Interpreted languages to be excluded
javascript:
index:
exclude:
- "*"
# Compiled languages to be excluded
java:
index:
build_command: "echo No Java code in this project"
csharp:
index:
build_command: "echo No C# code in this project"
go:
index:
build_command: "echo No Go code in this project"

36
.readthedocs.yaml Normal file
View File

@@ -0,0 +1,36 @@
# .readthedocs.yml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
# Required
version: 2
build:
os: ubuntu-22.04
tools:
python: "3.9"
apt_packages:
- graphviz
- rsync
jobs:
pre_build:
- make inc
- make -C documentation rtd
# Build documentation in the documentation/O.Common directory with Sphinx
sphinx:
configuration: documentation/O.Common/rtd-src/conf.py
# Build documentation with MkDocs
#mkdocs:
# configuration: mkdocs.yml
# Optionally build your docs in additional formats such as PDF and ePub
#formats: []
submodules:
exclude: all
python:
install:
- requirements: documentation/requirements.txt

View File

@@ -20,9 +20,9 @@ maybedie() {
usage() {
cat <<EOF >&2
usage: $0 [-v] [-s] <rev> [<outfile> [<prefix>]]
usage: $0 [-v] [-d] <rev> [<outfile> [<prefix>]]
<rev> may be any git revision spec. (tag, branch, or commit id).
<rev> may be any git revision spec. (tag or, using -d, branch or commit id).
If provided, <outfile> must end with ".tar", ".tar.gz" or ".tar.bz2".
If <outfile> is omitted, "base-<rev>.tar.gz" will be used.
@@ -136,17 +136,20 @@ sed -i -e 's|^\./||' "$TDIR"/list.1
# Exclude files
sed \
-e '/\/\.ci\//d' \
-e '/\/\.ci-local\//d' \
-e '/\/\.tools\//d' \
-e '/\/jenkins\//d' \
-e '/\/\.git/d' \
-e '/\/\.hgtags$/d' \
-e '/\/\.cproject$/d' \
-e '/\/\.project$/d' \
-e '/\/\.travis\.yml$/d' \
-e '/\/\.appveyor\.yml$/d' \
-e '/\/\.appveyor\//d' \
-e '/\/\.ci-local\//d' \
-e '/\/\.ci\//d' \
-e '/\/\.cproject$/d' \
-e '/\/\.github\//d' \
-e '/\/\.gitmodules$/d' \
-e '/\/\.hgtags$/d' \
-e '/\/\.lgtm\.yml$/d' \
-e '/\/\.project$/d' \
-e '/\/\.readthedocs\.yml$/d' \
-e '/\/\.tools\//d' \
-e '/\/\.travis\.yml$/d' \
-e '/\/jenkins\//d' \
"$TDIR"/list.1 > "$TDIR"/list.2
if ! diff -U 0 "$TDIR"/list.1 "$TDIR"/list.2

View File

@@ -27,13 +27,17 @@ RANLIB = $(GNU_BIN)/$(CMPLR_PREFIX)ranlib$(CMPLR_SUFFIX)
ASAN_FLAGS_YES = -fsanitize=address
ASAN_LDFLAGS_YES = $(ASAN_FLAGS_YES)
# It makes sense to include debugging symbols even in optimized builds
# in case you want to attach gdb to the process or examine a core-dump.
# This does cost disk space, but not memory as debug symbols are not
# loaded into RAM when the binary is loaded.
PROF_CFLAGS_YES = -p
GPROF_CFLAGS_YES = -pg
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 +46,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

@@ -38,11 +38,20 @@ TOOLS = $(abspath $(EPICS_BASE_HOST_BIN))
FIND_TOOL = $(firstword $(wildcard $(TOOLS)/$(1) \
$(TOP)/src/tools/$(1)) $(EPICS_BASE)/src/tools/$(1))
#---------------------------------------------------------------
# Find Perl modules for dependencies
FIND_PM = $(wildcard $(EPICS_BASE)/lib/perl/$(1))
#---------------------------------------------------------------
# EPICS Base build tools and tool flags
PODTOHTML = $(PERL) $(TOOLS)/podToHtml.pl
PODTOMD_pl = $(TOOLS)/podToMD.pl
PODTOMD = $(PERL) $(PODTOMD_pl)
PODTOHTML_pl = $(TOOLS)/podToHtml.pl
PODTOHTML_dep = $(PODTOHTML_pl) $(call FIND_PM,EPICS/PodHtml.pm)
PODTOHTML = $(PERL) $(PODTOHTML_pl)
CONVERTRELEASE = $(PERL) $(call FIND_TOOL,convertRelease.pl)
FILTERMAKEFLAGS = $(PERL) $(call FIND_TOOL,filterMakeflags.pl)
FULLPATHNAME = $(PERL) $(TOOLS)/fullPathName.pl
GENVERSIONHEADER = $(PERL) $(TOOLS)/genVersionHeader.pl $(QUIET_FLAG) $(QUESTION_FLAG)
@@ -59,6 +68,24 @@ INSTALL_LIBRARY = $(INSTALL)
MKMF = $(PERL) $(TOOLS)/mkmf.pl
REPLACEVAR = $(PERL) $(TOOLS)/replaceVAR.pl
#---------------------------------------------------------------
# How to portably check the flags to make
# GNUmake versions before 4.0 gave different values
makeflags := $(shell $(FILTERMAKEFLAGS) $(MAKEFLAGS))
define checkflags
make-$1 := $(findstring $1,$(makeflags))
endef
# This is extensible to most single letter flags:
$(foreach flag,s q, $(eval $(call checkflags,$(flag))))
# Silent builds - suppress messages during 'make -s'
NOP = :
ECHO = @$(if $(make-s),$(NOP),echo)
QUIET_FLAG := $(if $(make-s),-q,)
# Convert 'make -q' flag into '-i' for genVersionHeader.pl
QUESTION_FLAG := $(if $(make-q),-i,)
#---------------------------------------------------------------
# tools for cleaning out unwanted files
CVSCLEAN = $(call FIND_TOOL,cvsclean.pl)

View File

@@ -48,7 +48,7 @@ EPICS_VERSION = 7
EPICS_REVISION = 0
# EPICS_MODIFICATION must be a number >=0 and <256
EPICS_MODIFICATION = 7
EPICS_MODIFICATION = 9
# EPICS_PATCH_LEVEL must be a number (win32 resource file requirement)
# Not included in the official EPICS version number if zero

View File

@@ -2,7 +2,7 @@
EPICS_CA_MAJOR_VERSION = 4
EPICS_CA_MINOR_VERSION = 14
EPICS_CA_MAINTENANCE_VERSION = 2
EPICS_CA_MAINTENANCE_VERSION = 5
# Development flag, set to zero for release versions

View File

@@ -81,22 +81,6 @@ FINAL_LOCATION = $(INSTALL_ABSOLUTE)
# IOC's view of install path
IOCS_APPL_TOP = $(INSTALL_ABSOLUTE)
#-------------------------------------------------------
# How to portably check the flags to make
define checkflags
make-$1 = $(findstring $1,$(filter-out --%,$(MAKEFLAGS)))
endef
# This is extensible to most single letter flags:
$(foreach flag,s q, $(eval $(call checkflags,$(flag))))
# Silent builds - suppress messages during 'make -s'
NOP = :
ECHO = @$(if $(make-s),$(NOP),echo)
QUIET_FLAG := $(if $(make-s),-q,)
# Convert 'make -q' flag into '-i' for genVersionHeader.pl
QUESTION_FLAG := $(if $(make-q),-i,)
#-------------------------------------------------------
ifdef T_A
@@ -421,9 +405,9 @@ INSTALL_LIB_INSTALLS = $(addprefix $(INSTALL_LIB)/,$(notdir $(LIB_INSTALLS)))
#---------------------------------------------------------------
# Installed file permissions
BIN_PERMISSIONS = 555
LIB_PERMISSIONS = 444
SHRLIB_PERMISSIONS = 555
BIN_PERMISSIONS = 755
LIB_PERMISSIONS = 644
SHRLIB_PERMISSIONS = 755
INSTALL_PERMISSIONS = 444
#---------------------------------------------------------------
@@ -485,4 +469,9 @@ COMMON_INC += $(filter $(COMMON_DIR)/%, \
$(foreach dir, $(ALL_SRC_DIRS), \
$(addsuffix /$(file), $(dir)))) $(COMMON_DIR)/$(file))))
COMMON_DOCS += $(filter $(COMMON_DIR)/%, \
$(foreach file, $(DOCS), \
$(firstword $(wildcard $(file) \
$(foreach dir, $(ALL_SRC_DIRS), \
$(addsuffix /$(file), $(dir)))) $(COMMON_DIR)/$(file))))
endif

View File

@@ -5,14 +5,28 @@
# in file LICENSE that is included with this distribution.
#*************************************************************************
# Our locally-built tools
DBEXPAND = $(PERL) $(EPICS_BASE_HOST_BIN)/dbdExpand.pl
DBTORECORDTYPEH = $(PERL) $(EPICS_BASE_HOST_BIN)/dbdToRecordtypeH.pl
DBTOMENUH = $(PERL) $(EPICS_BASE_HOST_BIN)/dbdToMenuH.pl
DBDTOHTML = $(PERL) $(EPICS_BASE_HOST_BIN)/dbdToHtml.pl
REGISTERRECORDDEVICEDRIVER = $(PERL) $(EPICS_BASE_HOST_BIN)/registerRecordDeviceDriver.pl
# Installed perl scripts and dependent modules that have
# a significant effect on the script's output
DBDEXPAND_pl = $(EPICS_BASE_HOST_BIN)/dbdExpand.pl
DBDTORECTYPEH_pl = $(EPICS_BASE_HOST_BIN)/dbdToRecordtypeH.pl
DBDTORECTYPEH_dep = $(DBDTORECTYPEH_pl) $(call FIND_PM,DBD/Rec*.pm)
DBDTOMENUH_pl = $(EPICS_BASE_HOST_BIN)/dbdToMenuH.pl
DBDTOMENUH_dep = $(DBDTOMENUH_pl) $(call FIND_PM,DBD/Menu.pm)
DBDTOMD_pl = $(EPICS_BASE_HOST_BIN)/dbdToMD.pl
DBDTOHTML_pl = $(EPICS_BASE_HOST_BIN)/dbdToHtml.pl
DBDTOHTML_dep = $(DBDTOHTML_pl) $(call FIND_PM,EPICS/Pod*Html.pm)
REGRECDEVDRV_pl = $(EPICS_BASE_HOST_BIN)/registerRecordDeviceDriver.pl
REGRECDEVDRV_dep = $(REGRECDEVDRV_pl)
# Windows can need these paths to be quoted
# Commands for running scripts in recipes
DBEXPAND = $(PERL) $(DBDEXPAND_pl)
DBTORECORDTYPEH = $(PERL) $(DBDTORECTYPEH_pl)
DBTOMENUH = $(PERL) $(DBDTOMENUH_pl)
DBDTOMD = $(PERL) $(DBDTOMD_pl)
DBDTOHTML = $(PERL) $(DBDTOHTML_pl)
REGISTERRECORDDEVICEDRIVER = $(PERL) $(REGRECDEVDRV_pl)
# Installed binary executables, quoted for running on Windows
MAKEBPT = "$(EPICS_BASE_HOST_BIN)/makeBpt$(HOSTEXE)"
MSI3_15 = "$(EPICS_BASE_HOST_BIN)/msi$(HOSTEXE)"

View File

@@ -1,7 +1,7 @@
# Version number for the database APIs and shared library
EPICS_DATABASE_MAJOR_VERSION = 3
EPICS_DATABASE_MINOR_VERSION = 22
EPICS_DATABASE_MINOR_VERSION = 24
EPICS_DATABASE_MAINTENANCE_VERSION = 0
# Development flag, set to zero for release versions

View File

@@ -1,7 +1,7 @@
# Version number for the libcom APIs and shared library
EPICS_LIBCOM_MAJOR_VERSION = 3
EPICS_LIBCOM_MINOR_VERSION = 22
EPICS_LIBCOM_MINOR_VERSION = 24
EPICS_LIBCOM_MAINTENANCE_VERSION = 0
# Development flag, set to zero for release versions

View File

@@ -92,3 +92,6 @@ EPICS_IOC_LOG_FILE_NAME=
EPICS_IOC_LOG_FILE_COMMAND=
EPICS_IOC_LOG_FILE_LIMIT=1000000
# Set to 'YES' to call abort() rather than suspend the current thread
# when an assert() fails
EPICS_ABORT_ON_ASSERT=NO

View File

@@ -34,5 +34,9 @@ CFG += TOOLCHAIN.$(EPICS_HOST_ARCH).$(T_A)
include $(TOP)/configure/RULES
ifeq ($(GNU),YES)
# Pass compiler flags to preprocessor to enable _FORTIFY_SOURCE
TOOLCHAIN.$(EPICS_HOST_ARCH).$(T_A): CPPFLAGS += $(CFLAGS)
endif
TOOLCHAIN.$(EPICS_HOST_ARCH).$(T_A): toolchain.c
$(PREPROCESS.cpp)

View File

@@ -17,7 +17,7 @@ TEMPL_SUFFIX ?= .template
# vpath
vpath %.pm $(USR_VPATH) $(SRC_DIRS) $(dir $(DBD))
vpath %.pod $(USR_VPATH) $(SRC_DIRS) $(dir $(DBD))
vpath %.pod $(USR_VPATH) $(SRC_DIRS) .. $(dir $(DBD))
vpath %.dbd $(USR_VPATH) $(SRC_DIRS) $(dir $(DBD))
vpath %.db $(USR_VPATH) $(SRC_DIRS) $(dir $(DB))
vpath %.vdb $(USR_VPATH) $(SRC_DIRS) $(dir $(DB))
@@ -197,7 +197,7 @@ endif
# build dependancies, clean rule
inc: $(COMMON_INC) $(INSTALL_INC) $(COMMON_DBDS) $(COMMON_DBDCATS) \
$(INSTALL_DBDS) $(INSTALL_DBD_INSTALLS)
$(INSTALL_DBDS) $(INSTALL_DBD_INSTALLS) $(COMMON_DOCS)
build: $(COMMON_DBS) $(INSTALL_DBS) \
$(DBDDEPENDS_FILES) $(TARGETS) \
@@ -217,32 +217,32 @@ realclean: clean
#---------------------------------------------------------------
# Dependency files
%Record.h$(DEP): $(COMMON_DIR)/%Record.dbd
%Record.h$(DEP): $(COMMON_DIR)/%Record.dbd $(DBDTORECTYPEH_dep)
@$(RM) $@
@$(DBTORECORDTYPEH) -D $(DBDFLAGS) -o $(COMMONDEP_TARGET) $< > $@
@echo "$(COMMONDEP_TARGET): ../Makefile" >> $@
%Record.h$(DEP): %Record.dbd
%Record.h$(DEP): %Record.dbd $(DBDTORECTYPEH_dep)
@$(RM) $@
@$(DBTORECORDTYPEH) -D $(DBDFLAGS) -o $(COMMONDEP_TARGET) $< > $@
@echo "$(COMMONDEP_TARGET): ../Makefile" >> $@
%Record.h$(DEP): ../%Record.dbd
%Record.h$(DEP): ../%Record.dbd $(DBDTORECTYPEH_dep)
@$(RM) $@
@$(DBTORECORDTYPEH) -D $(DBDFLAGS) -o $(COMMONDEP_TARGET) $< > $@
@echo "$(COMMONDEP_TARGET): ../Makefile" >> $@
menu%.h$(DEP): $(COMMON_DIR)/menu%.dbd
menu%.h$(DEP): $(COMMON_DIR)/menu%.dbd $(DBDTOMENUH_dep)
@$(RM) $@
@$(DBTOMENUH) -D $(DBDFLAGS) -o $(COMMONDEP_TARGET) $< > $@
@echo "$(COMMONDEP_TARGET): ../Makefile" >> $@
menu%.h$(DEP): menu%.dbd
menu%.h$(DEP): menu%.dbd $(DBDTOMENUH_dep)
@$(RM) $@
@$(DBTOMENUH) -D $(DBDFLAGS) -o $(COMMONDEP_TARGET) $< > $@
@echo "$(COMMONDEP_TARGET): ../Makefile" >> $@
menu%.h$(DEP): ../menu%.dbd
menu%.h$(DEP): ../menu%.dbd $(DBDTOMENUH_dep)
@$(RM) $@
@$(DBTOMENUH) -D $(DBDFLAGS) -o $(COMMONDEP_TARGET) $< > $@
@echo "$(COMMONDEP_TARGET): ../Makefile" >> $@
@@ -261,7 +261,7 @@ menu%.h$(DEP): ../menu%.dbd
@$(DBEXPAND) -D $(DBDFLAGS) -o $(COMMONDEP_TARGET) $< > $@
@echo "$(COMMONDEP_TARGET): ../Makefile" >> $@
%.dbd$(DEP):
%.dbd$(DEP): $($*_DBD)
@$(RM) $@
@$(DBEXPAND) -D $(DBDFLAGS) -o $(COMMONDEP_TARGET) $($*_DBD) > $@
@echo "$(COMMONDEP_TARGET): ../Makefile" >> $@
@@ -330,32 +330,32 @@ $(INSTALL_DB)/%$(TEMPL_SUFFIX): ../%$(TEMPL_SUFFIX)
#---------------------------------------------------------------
# INC files
$(COMMON_DIR)/%Record.h: $(COMMON_DIR)/%Record.dbd
$(COMMON_DIR)/%Record.h: $(COMMON_DIR)/%Record.dbd $(DBDTORECTYPEH_dep)
@$(RM) $(notdir $@)
$(DBTORECORDTYPEH) $(DBDFLAGS) -o $(notdir $@) $<
@$(MV) $(notdir $@) $@
$(COMMON_DIR)/%Record.h: %Record.dbd
$(COMMON_DIR)/%Record.h: %Record.dbd $(DBDTORECTYPEH_dep)
@$(RM) $(notdir $@)
$(DBTORECORDTYPEH) $(DBDFLAGS) -o $(notdir $@) $<
@$(MV) $(notdir $@) $@
$(COMMON_DIR)/%Record.h: ../%Record.dbd
$(COMMON_DIR)/%Record.h: ../%Record.dbd $(DBDTORECTYPEH_dep)
@$(RM) $(notdir $@)
$(DBTORECORDTYPEH) $(DBDFLAGS) -o $(notdir $@) $<
@$(MV) $(notdir $@) $@
$(COMMON_DIR)/menu%.h: $(COMMON_DIR)/menu%.dbd
$(COMMON_DIR)/menu%.h: $(COMMON_DIR)/menu%.dbd $(DBDTOMENUH_dep)
@$(RM) $(notdir $@)
$(DBTOMENUH) $(DBDFLAGS) -o $(notdir $@) $<
@$(MV) $(notdir $@) $@
$(COMMON_DIR)/menu%.h: menu%.dbd
$(COMMON_DIR)/menu%.h: menu%.dbd $(DBDTOMENUH_dep)
@$(RM) $(notdir $@)
$(DBTOMENUH) $(DBDFLAGS) -o $(notdir $@) $<
@$(MV) $(notdir $@) $@
$(COMMON_DIR)/menu%.h: ../menu%.dbd
$(COMMON_DIR)/menu%.h: ../menu%.dbd $(DBDTOMENUH_dep)
@$(RM) $(notdir $@)
$(DBTOMENUH) $(DBDFLAGS) -o $(notdir $@) $<
@$(MV) $(notdir $@) $@
@@ -400,7 +400,7 @@ $(COMMON_DBDCATS):$(COMMON_DIR)/%.dbd:
$(DBDCAT_COMMAND)
@$(MV) $(notdir $@) $@
$(COMMON_DIR)/%.dbd:
$(COMMON_DIR)/%.dbd: $($*_DBD)
$(ECHO) "Creating dbd file $(notdir $@)"
@$(RM) $(notdir $@)
$(DBEXPAND) $(DBDFLAGS) -o $(notdir $@) $($*_DBD)
@@ -427,31 +427,51 @@ $(foreach file, $(DBD_INSTALLS), $(eval $(call DBD_INSTALLS_template, $(file))))
.PRECIOUS: $(COMMON_DBDS) $(COMMON_DIR)/%.dbd
#---------------------------------------------------------------
# Markdown files
$(COMMON_DIR)/%.md: %.dbd.pod $(DBDTOMD_pl)
@$(RM) $(notdir $@)
$(DBDTOMD) $(DBDFLAGS) -o $(notdir $@) $<
@$(MV) $(notdir $@) $@
$(COMMON_DIR)/%.md: %.pod $(PODTOMD_pl)
@$(RM) $(notdir $@)
$(PODTOMD) -o $(notdir $@) $<
@$(MV) $(notdir $@) $@
$(COMMON_DIR)/%.md: ../%.pl $(PODTOMD_pl)
@$(RM) $(notdir $@)
$(PODTOMD) -o $(notdir $@) $<
@$(MV) $(notdir $@) $@
.PRECIOUS: $(COMMON_DIR)/%.md
#---------------------------------------------------------------
# HTML files
$(COMMON_DIR)/%.html: %.dbd.pod
$(COMMON_DIR)/%.html: %.dbd.pod $(DBDTOHTML_pl)
@$(RM) $(notdir $@)
$(DBDTOHTML) $(DBDFLAGS) -o $(notdir $@) $<
@$(MV) $(notdir $@) $@
$(COMMON_DIR)/%.html: %.pod
$(COMMON_DIR)/%.html: %.pod $(PODTOHTML_dep)
@$(RM) $(notdir $@)
$(PODTOHTML) -s -s -o $(notdir $@) $<
@$(MV) $(notdir $@) $@
$(COMMON_DIR)/%.html: %.pm
$(COMMON_DIR)/%.html: %.pm $(PODTOHTML_dep)
@$(RM) $(notdir $@)
$(PODTOHTML) -o $(notdir $@) $<
@$(MV) $(notdir $@) $@
$(COMMON_DIR)/%.html: ../%.pm
$(COMMON_DIR)/%.html: ../%.pm $(PODTOHTML_dep)
@$(RM) $(notdir $@)
$(PODTOHTML) -s -o $(notdir $@) $<
@$(MKDIR) $(dir $@)
@$(MV) $(notdir $@) $@
$(COMMON_DIR)/%.html: ../%.pl
$(COMMON_DIR)/%.html: ../%.pl $(PODTOHTML_dep)
@$(RM) $(notdir $@)
$(PODTOHTML) -s -o $(notdir $@) $<
@$(MV) $(notdir $@) $@
@@ -527,16 +547,19 @@ $(foreach file, $(DB_INSTALLS), $(eval $(call DB_INSTALLS_template, $(file))))
#---------------------------------------------------------------
# register record,device,driver support
%_registerRecordDeviceDriver.cpp: $(COMMON_DIR)/%.dbd $(EPICS_BASE_HOST_BIN)/registerRecordDeviceDriver.pl
%_registerRecordDeviceDriver.cpp: $(COMMON_DIR)/%.dbd $(REGRECDEVDRV_dep)
@$(RM) $@
$(REGISTERRECORDDEVICEDRIVER) $(REGRDDFLAGS) -o $@ $< $(basename $@) $(IOCS_APPL_TOP)
$(REGISTERRECORDDEVICEDRIVER) $(REGRDDFLAGS) -o $@ \
$< $(basename $@) $(IOCS_APPL_TOP)
%_registerRecordDeviceDriver.cpp: %.dbd $(EPICS_BASE_HOST_BIN)/registerRecordDeviceDriver.pl
%_registerRecordDeviceDriver.cpp: %.dbd $(REGRECDEVDRV_dep)
@$(RM) $@
$(REGISTERRECORDDEVICEDRIVER) $(REGRDDFLAGS) -o $@ $< $(basename $@) $(IOCS_APPL_TOP)
$(REGISTERRECORDDEVICEDRIVER) $(REGRDDFLAGS) -o $@ \
$< $(basename $@) $(IOCS_APPL_TOP)
%_registerRecordDeviceDriver.cpp: ../%.dbd $(EPICS_BASE_HOST_BIN)/registerRecordDeviceDriver.pl
%_registerRecordDeviceDriver.cpp: ../%.dbd $(REGRECDEVDRV_dep)
@$(RM) $@
$(REGISTERRECORDDEVICEDRIVER) $(REGRDDFLAGS) -o $@ $< $(basename $@) $(IOCS_APPL_TOP)
$(REGISTERRECORDDEVICEDRIVER) $(REGRDDFLAGS) -o $@ \
$< $(basename $@) $(IOCS_APPL_TOP)
.PRECIOUS: %_registerRecordDeviceDriver.cpp

View File

@@ -22,7 +22,8 @@ vpath %.cpp $(USR_VPATH) $(ALL_SRC_DIRS)
vpath %.rc $(USR_VPATH) $(ALL_SRC_DIRS)
vpath %.h $(USR_VPATH) $(ALL_SRC_DIRS)
vpath %.hpp $(USR_VPATH) $(ALL_SRC_DIRS)
vpath %.html $(USR_VPATH) $(ALL_SRC_DIRS)
vpath %.html $(USR_VPATH) $(ALL_SRC_DIRS) $(COMMON_DIR)
vpath %.md $(USR_VPATH) $(ALL_SRC_DIRS) $(COMMON_DIR)
vpath %.skel.static $(USR_VPATH) $(ALL_SRC_DIRS)
vpath %.y $(USR_VPATH) $(ALL_SRC_DIRS)
vpath %.l $(USR_VPATH) $(ALL_SRC_DIRS)
@@ -111,7 +112,7 @@ endif
#---------------------------------------------------------------
# Read dependency files
ifneq (inc,$(strip $(MAKECMDGOALS)))
ifneq ($(filter-out inc,$(strip $(MAKECMDGOALS))),)
ifneq (,$(strip $(HDEPENDS_FILES)))
$(filter-out $(wildcard *$(DEP)), $(HDEPENDS_FILES)): | $(COMMON_INC)
-include $(HDEPENDS_FILES)
@@ -165,12 +166,12 @@ build: $(OBJSNAME) $(LIBTARGETS) $(PRODTARGETS) $(TESTPRODTARGETS) \
$(TARGETS) $(TESTSCRIPTS) $(INSTALL_LIB_INSTALLS)
inc: $(COMMON_INC) $(INSTALL_INC) $(INSTALL_CONFIGS) $(INSTALLS_CFG) \
$(INSTALL_HTMLS) $(INSTALLS_PERL_MODULES) $(INSTALL_SCRIPTS)
$(INSTALL_HTMLS) $(INSTALLS_PERL_MODULES) $(INSTALL_SCRIPTS) \
$(INSTALL_DOCS)
buildInstall: \
$(INSTALL_PROD) $(INSTALL_MUNCHS) \
$(INSTALL_TCLLIBS) $(INSTALL_TCLINDEX) \
$(INSTALL_DOCS) \
$(INSTALL_OBJS) \
$(INSTALL_TEMPLATE) \
$(INSTALL_BIN_INSTALLS)
@@ -532,11 +533,11 @@ endif # LOADABLE_SHRLIB_SUFFIX
ifneq ($(INSTALL_CONFIGS),)
$(INSTALL_CONFIG)/%: %
$(ECHO) "Installing config file $@"
@$(INSTALL) -d -m $(INSTALL_PERMISSIONS) $< $(@D)
@$(INSTALL) -d -m $(INSTALL_PERMISSIONS) $(abspath $< $(@D))
$(INSTALL_CONFIG)/%: ../%
$(ECHO) "Installing config file $@"
@$(INSTALL) -d -m $(INSTALL_PERMISSIONS) $< $(@D)
@$(INSTALL) -d -m $(INSTALL_PERMISSIONS) $(abspath $< $(@D))
endif
$(INSTALL_INCLUDE)/%: $(COMMON_DIR)/%
@@ -555,6 +556,10 @@ $(INSTALL_INCLUDE)/compiler/$(CMPLR_CLASS)/%: %
$(ECHO) "Installing compiler dependent include file $@"
@$(INSTALL) -d -m $(INSTALL_PERMISSIONS) $< $(@D)
$(INSTALL_DOC)/%: $(COMMON_DIR)/%
$(ECHO) "Installing generated doc $@"
@$(INSTALL) -d -m $(INSTALL_PERMISSIONS) $< $(@D)
$(INSTALL_DOC)/%: %
$(ECHO) "Installing doc $@"
@$(INSTALL) -d -m $(INSTALL_PERMISSIONS) $< $(INSTALL_DOC)

View File

@@ -65,7 +65,7 @@ CXXFLAGS = $($(BUILD_CLASS)_CXXFLAGS) $(POSIX_CXXFLAGS) $(OPT_CXXFLAGS)\
$(USR_CXXFLAGS) $(CMD_CXXFLAGS) $(ARCH_DEP_CXXFLAGS) $(CODE_CXXFLAGS)\
$(STATIC_CXXFLAGS) $(OP_SYS_CXXFLAGS) $(LIBRARY_SRC_CFLAGS)
LDFLAGS = $(OPT_LDFLAGS) $(TARGET_LDFLAGS) $(USR_LDFLAGS) $(CMD_LDFLAGS)\
LDFLAGS += $(OPT_LDFLAGS) $(TARGET_LDFLAGS) $(USR_LDFLAGS) $(CMD_LDFLAGS)\
$(POSIX_LDFLAGS) $(ARCH_DEP_LDFLAGS) $(DEBUG_LDFLAGS) $(OP_SYS_LDFLAGS)\
$($(BUILD_CLASS)_LDFLAGS) $(RUNTIME_LDFLAGS) $(CODE_LDFLAGS)
@@ -102,15 +102,47 @@ OS_CLASS = RTEMS
# Operating system compile & link flags
OP_SYS_CFLAGS += -D__LINUX_ERRNO_EXTENSIONS__
OP_SYS_CFLAGS_NET_yes = -DRTEMS_LEGACY_STACK
OP_SYS_CFLAGS += $(OP_SYS_CFLAGS_NET_$(RTEMS_HAS_NETWORKING))
ifeq ($(RTEMS_HAS_POSIX_API),yes)
POSIX_CPPFLAGS = -D_GNU_SOURCE -D_DEFAULT_SOURCE
# Has RTEMS been built with the internal legacy stack?
ifeq ($(RTEMS_LEGACY_NETWORKING_INTERNAL),yes)
RTEMS_HAS_NETWORKING = yes
RTEMS_NETWORKING = legacy_internal
endif
OP_SYS_LDLIBS_posix_NET_yes = -ltftpfs -lnfs -lz -ltelnetd
OP_SYS_LDLIBS_posix_NET_no = -ltftpfs -lbsd -lz
# Has RTEMS been built with the legacy stack as a separate package?
ifeq ($(RTEMS_LEGACY_NETWORKING),yes)
RTEMS_HAS_NETWORKING = yes
RTEMS_NETWORKING = legacy
endif
# Has RTEMS been built with the libbsd stack as a separate package?
ifeq ($(RTEMS_BSD_NETWORKING),yes)
RTEMS_HAS_NETWORKING = yes
RTEMS_NETWORKING = bsd
endif
RTEMS_LEGACY_NET_LIB_no=
# Legacy network with RTEMS 5 and earlier
RTEMS_NET_LIB_legacy_internal=-lnfs
OP_SYS_CFLAGS_NET_legacy_internal = -DRTEMS_LEGACY_STACK
# Legacy network with RTEMS 6 is a separate package and library
RTEMS_NET_LIB_legacy=-lnfs -lnetworking -lnfs
OP_SYS_CFLAGS_NET_legacy = -DRTEMS_LEGACY_STACK
# LibBSD network with RTEMS 5 and 6 is a separate package and library
RTEMS_NET_LIB_bsd=-lbsd
OP_SYS_CFLAGS_NET_bsd = -DRTEMS_LIBBSD_STACK
# Set the networking flags
OP_SYS_CFLAGS += $(OP_SYS_CFLAGS_NET_$(RTEMS_NETWORKING))
POSIX_CPPFLAGS_posix = -D_GNU_SOURCE -D_DEFAULT_SOURCE
POSIX_CPPFLAGS = $(POSIX_CPPFLAGS_$(OS_API))
OP_SYS_LDLIBS_posix_NET_yes = -ltftpfs -lz -ltelnetd
OP_SYS_LDLIBS_posix_NET_yes += $(RTEMS_NET_LIB_$(RTEMS_NETWORKING))
OP_SYS_LDLIBS_posix_NET_no = -ltftpfs -lz
OP_SYS_LDLIBS_score_NET_yes = -lnfs
OP_SYS_LDLIBS_score_NET_no = -lnfs
OP_SYS_LDLIBS += -lrtemsCom -lCom

View File

@@ -1,7 +1,6 @@
#
# Author: Matt Rippa
#
RTEMS_BSP = mvme2307
RTEMS_TARGET_CPU = powerpc
ARCH_DEP_CFLAGS += -DMY_DO_BOOTP=NULL
ARCH_DEP_CFLAGS += -DHAVE_PPCBUG
@@ -23,3 +22,9 @@ define MUNCH_CMD
endef
include $(CONFIG)/os/CONFIG.Common.RTEMS
ifeq ($(shell test $(RTEMS_VERSION) -ge 5; echo $$?),0)
RTEMS_BSP = mvme2700
else
RTEMS_BSP = mvme2307
endif

View File

@@ -25,7 +25,7 @@ include $(CONFIG)/os/CONFIG.Common.RTEMS
OP_SYS_LDFLAGS += -Wl,-Ttext,0x100000
# This check must appear after the above include
ifeq ($(RTEMS_VERSION),5)
ifeq ($(shell test $(RTEMS_VERSION) -ge 5; echo $$?),0)
$(info *** This target is not compatible with the configured RTEMS version.)
$(info *** Build the RTEMS-pc686 (-qemu) target for RTEMS 5.x)
$(error Can't continue)

View File

@@ -32,7 +32,7 @@ OP_SYS_LDFLAGS += -Wl,-Ttext,0x100000
# This check must appear after the above include
ifneq ($(RTEMS_VERSION),5)
ifeq ($(shell test $(RTEMS_VERSION) -lt 5; echo $$?),0)
$(info *** This target is not compatible with the configured RTEMS version.)
$(info *** Build the RTEMS-pc386 (-qemu) target for RTEMS 4.x)
$(error Can't continue)

View File

@@ -22,7 +22,7 @@ ARCH_DEP_CFLAGS += -DRTEMS_HAS_ALTIVEC
#OP_SYS_LDLIBS += -lbspExt #does not use posix stuff ... want to ignore
OP_SYS_LDLIBS += -Wl,--gc-sections
#ARCH_DEP_LDFLAGS = -mcpu=8540 -meabi -msdata=sysv -mstrict-align -mspe -mabi=spe -mfloat-gprs=double
ARCH_DEP_LDFLAGS = -L$(RTEMS_BASE)/powerpc-rtems5/qoriq_e500/lib
ARCH_DEP_LDFLAGS = -L$(RTEMS_BASE)/$(GNU_TARGET)$(RTEMS_VERSION)/$(RTEMS_BSP)/lib
MUNCH_SUFFIX = .img
MUNCHNAME = $(PRODNAME:%$(EXE)=%$(MUNCH_SUFFIX))

View File

@@ -7,6 +7,10 @@
# Include definitions common to all Unix targets
include $(CONFIG)/os/CONFIG.Common.UnixCommon
GNU = NO
CMPLR_CLASS = clang
CC = clang
CCC = clang++
OS_CLASS = freebsd

View File

@@ -42,12 +42,6 @@ ARCH_DEP_LDFLAGS += $(ARCH_DEP_FLAGS)
OP_SYS_CFLAGS += -isysroot $(SDK_DIR)
OP_SYS_LDFLAGS += -isysroot $(SDK_DIR)
#--------------------------------------------------
# Always compile in debugging symbol table information
#
OPT_CFLAGS_YES += -g
OPT_CXXFLAGS_YES += -g
#-------------------------------------------------------
# Compiler definitions:

View File

@@ -0,0 +1,11 @@
# CONFIG.darwin-aarch64-debug.Common
#
# Definitions for darwin-aarch64-debug host builds - darwin-aarch64 target build with debug compiler flags
# Sites may override these definitions in CONFIG_SITE.darwin-aarch64-debug.Common
#-------------------------------------------------------
include $(CONFIG)/os/CONFIG.darwin-aarch64.Common
# Removes -O optimization and adds -g compile option
HOST_OPT=NO

View File

@@ -0,0 +1,14 @@
# CONFIG.darwin-aarch64.darwin-aarch64-debug
#
# Definitions for darwin-aarch64 host - darwin-aarch64-debug target build with debug compiler flags
# Sites may override these definitions in CONFIG_SITE.darwin-aarch64.darwin-aarch64-debug
#-------------------------------------------------------
-include $(CONFIG)/os/CONFIG.Common.darwin-aarch64
-include $(CONFIG)/os/CONFIG.darwin-aarch64.darwin-aarch64
-include $(CONFIG)/os/CONFIG_SITE.Common.darwin-aarch64
-include $(CONFIG)/os/CONFIG_SITE.darwin-aarch64.darwin-aarch64
BUILD_CLASS=HOST
HOST_OPT = NO

View File

@@ -0,0 +1,11 @@
# CONFIG.darwin-x86-debug.Common
#
# Definitions for darwin-x86-debug host builds - darwin-x86 target build with debug compiler flags
# Sites may override these definitions in CONFIG_SITE.darwin-x86-debug.Common
#-------------------------------------------------------
include $(CONFIG)/os/CONFIG.darwin-x86.Common
# Removes -O optimization and adds -g compile option
HOST_OPT=NO

View File

@@ -39,12 +39,6 @@ OP_SYS_CFLAGS += -fno-common
#
OP_SYS_CPPFLAGS += -Ddarwin
#
# Always compile in debugging symbol table information
#
OPT_CFLAGS_YES += -g
OPT_CXXFLAGS_YES += -g
#
# Libraries for command-line editing.
#
@@ -66,7 +60,7 @@ GNU = NO
#
# Darwin shared libraries
#
SHRLIB_LDFLAGS = -dynamiclib -flat_namespace -undefined dynamic_lookup \
SHRLIB_LDFLAGS = -dynamiclib -flat_namespace \
-install_name $(abspath $(INSTALL_LIB))/$@ \
$(addprefix -compatibility_version , $(SHRLIB_VERSION)) \
$(addprefix -current_version , $(SHRLIB_VERSION))

View File

@@ -5,3 +5,4 @@
#Include definitions common to unix hosts
include $(CONFIG)/os/CONFIG.UnixCommon.Common
CMPLR_CLASS = clang

View File

@@ -2,6 +2,7 @@
# Definitions for freebsd-x86 host - freebsd-x86 target builds
# Sites may override these definitions in CONFIG_SITE.freebsd-x86.freebsd-x86
#-------------------------------------------------------
GNU_DIR=/usr/local
# Include common gnu compiler definitions
include $(CONFIG)/CONFIG.gnuCommon

View File

@@ -2,12 +2,23 @@
# Definitions for freebsd-x86_64 host - freebsd-x86_64 target builds
# Sites may override these definitions in CONFIG_SITE.freebsd-x86_64.freebsd-x86_64
#-------------------------------------------------------
GNU_DIR=/usr
# Include common gnu compiler definitions
include $(CONFIG)/CONFIG.gnuCommon
GNU_BIN = $(GNU_DIR)/bin
GNU_LIB = $(GNU_DIR)/lib
CMPLR_CLASS = clang
CC = $(GNU_BIN)/$(CMPLR_PREFIX)cc$(CMPLR_SUFFIX)
CCC = $(GNU_BIN)/$(CMPLR_PREFIX)c++$(CMPLR_SUFFIX)
CPP = $(CC) -x c -E
GNU_LDLIBS_YES =
STATIC_LDFLAGS_YES= -Wl,-Bstatic
STATIC_LDFLAGS_NO=
STATIC_LDLIBS_YES= -Wl,-Bdynamic
STATIC_LDLIBS_NO=

View File

@@ -16,7 +16,7 @@ OPT_WHOLE_PROGRAM = YES
WINLINK = link
RCCMD = rc -l 0x409 $(INCLUDES) -fo $@ $<
RCCMD = rc -nologo -l 0x409 $(INCLUDES) -fo $@ $<
ARCMD = lib -nologo -verbose -out:$@ $(LIB_OPT_LDFLAGS) $(LIBRARY_LD_OBJS)

View File

@@ -6,11 +6,3 @@
# GNU_DIR used when COMMANDLINE_LIBRARY is READLINE
#GNU_DIR=C:/cygwin
# It makes sense to include debugging symbols even in optimized builds
# in case you want to attach gdb to the process or examine a core-dump.
# This does cost disk space, but not memory as debug symbols are not
# loaded into RAM when the binary is loaded.
OPT_CFLAGS_YES += -g
OPT_CXXFLAGS_YES += -g

View File

@@ -3,21 +3,27 @@
# Site specific definitions for darwin builds
#-------------------------------------------------------
# Note the dir/firstword/wildcard functions below are used
# to avoid warnings about missing directories.
# These settings are designed for users of Homebrew.
# Users of other third-party package managers are welcome to
# provide patches appropriate for their manager.
ifneq (,$(wildcard /opt/homebrew))
# Default location on aarch64
HOMEBREW_DIR = /opt/homebrew
else ifneq (,$(wildcard /usr/local/Homebrew))
# Default location on x86_64
HOMEBREW_DIR = /usr/local
else ifneq (,$(wildcard /opt/local/include/readline))
# MacPorts
READLINE_DIR = /opt/local
endif
# Mix-and-match of different package systems is probably not advisable,
# but you can try that if you like...
# Uncomment these definitions when using Homebrew packages:
#OP_SYS_INCLUDES += -I/usr/local/include
#OP_SYS_LDFLAGS += $(addprefix -L,$(dir $(firstword $(wildcard /usr/local/lib/*))))
# Uncomment these definitions when using DarwinPorts packages:
#OP_SYS_INCLUDES += -I/opt/local/include
#OP_SYS_LDFLAGS += $(addprefix -L,$(dir $(firstword $(wildcard /opt/local/lib/*))))
# Uncomment these definitions when using Fink packages:
#OP_SYS_INCLUDES += -I/sw/include
#OP_SYS_LDFLAGS += $(addprefix -L,$(dir $(firstword $(wildcard /sw/lib/*))))
# Look for Homebrew's readline
ifneq (,$(wildcard $(HOMEBREW_DIR)/opt/readline))
READLINE_DIR = $(HOMEBREW_DIR)/opt/readline
endif
# Use GNU readline if it's avaiilable
ifneq (,$(wildcard $(READLINE_DIR)/include/readline/readline.h))
INCLUDES_READLINE = -I$(READLINE_DIR)/include
LDFLAGS_READLINE = -L$(READLINE_DIR)/lib
endif

View File

@@ -3,10 +3,3 @@
# Site specific definitions for native linux-aarch64 builds
#-------------------------------------------------------
# It makes sense to include debugging symbols even in optimized builds
# in case you want to attach gdb to the process or examine a core-dump.
# This does cost disk space, but not memory as debug symbols are not
# loaded into RAM when the binary is loaded.
OPT_CFLAGS_YES += -g
OPT_CXXFLAGS_YES += -g

View File

@@ -3,13 +3,6 @@
# Site specific definitions for linux-x86 host - linux-x86 target builds
#-------------------------------------------------------
# It makes sense to include debugging symbols even in optimized builds
# in case you want to attach gdb to the process or examine a core-dump.
# This does cost disk space, but not memory as debug symbols are not
# loaded into RAM when the binary is loaded.
OPT_CFLAGS_YES += -g
OPT_CXXFLAGS_YES += -g
# Uncomment the followings lines to build with CLANG instead of GCC.
#
#GNU = NO

View File

@@ -3,13 +3,6 @@
# Site specific definitions for linux-x86_64 host - linux-x86_64 target builds
#-------------------------------------------------------
# It makes sense to include debugging symbols even in optimized builds
# in case you want to attach gdb to the process or examine a core-dump.
# This does cost disk space, but not memory as debug symbols are not
# loaded into RAM when the binary is loaded.
OPT_CFLAGS_YES += -g
OPT_CXXFLAGS_YES += -g
# Uncomment the followings lines to build with CLANG instead of GCC.
#
#GNU = NO

View File

@@ -30,9 +30,26 @@ MSVC_VER = _MSC_VER
#ifdef __rtems__
#include <rtems/score/cpuopts.h>
# if __RTEMS_MAJOR__>=5
OS_API = posix
OS_API = posix
# else
OS_API = score
OS_API = score
# endif
# if defined(RTEMS_NETWORKING)
/* legacy stack circa RTEMS <= 5 and networking internal to RTEMS */
RTEMS_LEGACY_NETWORKING_INTERNAL = yes
# else
# if !defined(__has_include)
/* assume old GCC implies RTEMS < 5 with mis-configured BSP */
# error rebuild BSP with --enable-network
# elif __has_include(<machine/rtems-net-legacy.h>)
/* legacy stack circa RTEMS > 5 */
RTEMS_LEGACY_NETWORKING = yes
# elif __has_include(<machine/rtems-bsd-version.h>)
/* libbsd stack */
RTEMS_BSD_NETWORKING = yes
# else
# error Cannot determine RTEMS network configuration
# endif
# endif
#endif
@@ -45,5 +62,5 @@ COMMANDLINE_LIBRARY ?= READLINE
COMMANDLINE_LIBRARY ?= EPICS
# endif
#else
COMMANDLINE_LIBRARY ?= EPICS
COMMANDLINE_LIBRARY ?= $(strip $(if $(wildcard $(if $(GNU_DIR),$(GNU_DIR)/include/readline/readline.h)), READLINE, EPICS))
#endif

View File

@@ -1,3 +0,0 @@
*.db
epics-base.tag
html/

View File

@@ -759,11 +759,10 @@ WARN_LOGFILE =
# spaces.
# Note: If this tag is empty the current directory is searched.
INPUT = ../mainpage.dox \
../RELEASE_NOTES.md \
INPUT = ../RELEASE_NOTES.md \
../README.md \
../RecordReference.md \
@TOP@/include
@TOP@/include \
@TOP@/doc
# 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
@@ -1834,7 +1833,7 @@ MAN_LINKS = NO
# captures the structure of the code including all documentation.
# The default value is: NO.
GENERATE_XML = NO
GENERATE_XML = YES
# The XML_OUTPUT tag is used to specify where the XML pages will be put. If a
# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
@@ -1842,7 +1841,7 @@ GENERATE_XML = NO
# The default directory is: xml.
# This tag requires that the tag GENERATE_XML is set to YES.
XML_OUTPUT = xml
XML_OUTPUT = @RTD_SRC@/xml
# If the XML_PROGRAMLISTING tag is set to YES doxygen will dump the program
# listings (including syntax highlighting and cross-referencing information) to
@@ -1947,7 +1946,7 @@ ENABLE_PREPROCESSING = YES
# The default value is: NO.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
MACRO_EXPANSION = NO
MACRO_EXPANSION = YES
# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES then
# the macro expansion is limited to the macros specified with the PREDEFINED and
@@ -1987,7 +1986,17 @@ 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 = __cplusplus
PREDEFINED = __cplusplus \
LIBCOM_API \
DBCORE_API \
LIBCA_API \
DBRECSTD_API \
EPICS_ALWAYS_INLINE \
epicsShareExtern \
epicsShareClass \
epicsShareFunc \
epicsShareAPI \
epicsStdCall
# 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

View File

@@ -0,0 +1,4 @@
# @HEADER@.h
```{doxygenfile} @HEADER@.h
```

View File

@@ -1,34 +0,0 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Known Problems in EPICS 7.0.3.1</title>
</head>
<body>
<h1 style="text-align: center">EPICS 7.0.3.1: Known Problems</h1>
<p>Any patch files linked below should be applied at the root of the
base-7.0.3.1 tree. Download them, then use the GNU Patch program as
follows:</p>
<blockquote><pre>% <b>cd <i>/path/to/</i>base-7.0.3.1</b>
% <b>patch -p1 &lt; <i>/path/to/</i>file.patch</b></pre></blockquote>
<p>The following problems were known by the developers at the time of this
release:</p>
<ul>
<!-- Items added after release should be formatted thusly:
<li>YYYY-MM-DD: Description of problem.
<a href="fix.patch">This patch</a> fixes the problem.
...</li>
-->
</ul>
</body>
</html>

View File

@@ -1,35 +1,174 @@
TOP = ..
include $(TOP)/configure/CONFIG
ifeq ($(T_A),$(EPICS_HOST_ARCH))
DOXYGEN=doxygen
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
EXPAND_ME += RTD_SRC
ME = documentation/O.$(T_A)/html
GH_FILES = $(ME)/ $(ME)/.nojekyll $(ME)/*.* $(ME)/*/*.*
DOXYGEN ?= doxygen
install: doxygen
libcom_HEADERS += adjustment
libcom_HEADERS += alarm
libcom_HEADERS += alarmString
libcom_HEADERS += asTrapWrite
libcom_HEADERS += bucketLib
libcom_HEADERS += cantProceed
libcom_HEADERS += compilerDependencies
libcom_HEADERS += cvtFast
libcom_HEADERS += dbmf
libcom_HEADERS += devLibVME
libcom_HEADERS += devLibVMEImpl
libcom_HEADERS += ellLib
libcom_HEADERS += envDefs
libcom_HEADERS += epicsAlgorithm
libcom_HEADERS += epicsAssert
libcom_HEADERS += epicsAtomic
libcom_HEADERS += epicsEvent
libcom_HEADERS += epicsExit
libcom_HEADERS += epicsExport
libcom_HEADERS += epicsGeneralTime
libcom_HEADERS += epicsGuard
libcom_HEADERS += epicsMessageQueue
libcom_HEADERS += epicsMutex
libcom_HEADERS += epicsReadline
libcom_HEADERS += epicsRingBytes
libcom_HEADERS += epicsRingPointer
libcom_HEADERS += epicsSignal
libcom_HEADERS += epicsSpin
libcom_HEADERS += epicsStackTrace
libcom_HEADERS += epicsStdio
libcom_HEADERS += epicsStdlib
libcom_HEADERS += epicsString
libcom_HEADERS += epicsTempFile
libcom_HEADERS += epicsThread
libcom_HEADERS += epicsTime
libcom_HEADERS += epicsTypes
libcom_HEADERS += epicsUnitTest
libcom_HEADERS += errlog
libcom_HEADERS += freeList
libcom_HEADERS += iocsh
libcom_HEADERS += ipAddrToAsciiAsynchronous
libcom_HEADERS += logClient
libcom_HEADERS += macLib
libcom_HEADERS += osiPoolStatus
libcom_HEADERS += osiProcess
libcom_HEADERS += osiSock
libcom_HEADERS += postfix
libcom_HEADERS += shareLib
libcom_HEADERS += testMain
libcom_HEADERS += yajl_alloc
libcom_HEADERS += yajl_common
libcom_HEADERS += yajl_gen
libcom_HEADERS += yajl_parse
doxygen: Doxyfile ../mainpage.dox
$(DOXYGEN)
rsync -av $(TOP)/html/ html/
database_HEADERS += chfPlugin
database_HEADERS += dbChannel
database_HEADERS += dbCommon
database_HEADERS += dbDefs
database_HEADERS += dbExtractArray
database_HEADERS += dbLink
database_HEADERS += dbServer
database_HEADERS += dbState
database_HEADERS += dbStaticLib
database_HEADERS += dbUnitTest
database_HEADERS += devLib
database_HEADERS += devSup
database_HEADERS += drvSup
database_HEADERS += initHooks
.PHONY: doxygen
record_HEADERS += aaiRecord
record_HEADERS += aaoRecord
record_HEADERS += aiRecord
record_HEADERS += aoRecord
record_HEADERS += aSubRecord
record_HEADERS += biRecord
record_HEADERS += boRecord
record_HEADERS += calcRecord
record_HEADERS += calcoutRecord
record_HEADERS += compressRecord
record_HEADERS += dfanoutRecord
record_HEADERS += eventRecord
record_HEADERS += fanoutRecord
record_HEADERS += histogramRecord
record_HEADERS += int64inRecord
record_HEADERS += int64outRecord
record_HEADERS += longinRecord
record_HEADERS += longoutRecord
record_HEADERS += lsiRecord
record_HEADERS += lsoRecord
record_HEADERS += mbbiRecord
record_HEADERS += mbbiDirectRecord
record_HEADERS += mbboRecord
record_HEADERS += mbboDirectRecord
record_HEADERS += permissiveRecord
record_HEADERS += printfRecord
record_HEADERS += selRecord
record_HEADERS += seqRecord
record_HEADERS += stateRecord
record_HEADERS += stringinRecord
record_HEADERS += stringoutRecord
record_HEADERS += subRecord
record_HEADERS += subArrayRecord
record_HEADERS += waveformRecord
commit: doxygen
$(TOUCH) html/.nojekyll
(cd $(TOP) && $(CURDIR)/../commit-gh.sh $(GH_FILES))
menu_HEADERS += menuAlarmSevr
menu_HEADERS += menuAlarmStat
menu_HEADERS += menuConvert
menu_HEADERS += menuFtype
menu_HEADERS += menuIvoa
menu_HEADERS += menuOmsl
menu_HEADERS += menuPini
menu_HEADERS += menuPost
menu_HEADERS += menuPriority
menu_HEADERS += menuScan
menu_HEADERS += menuSimm
menu_HEADERS += menuYesNo
.PHONY: commit
HEADER_TYPES = libcom database record menu
endif # EPICS_HOST_ARCH
HEADER_MD_FILES = $(foreach t, $(HEADER_TYPES), \
$(addsuffix _h.md, $($t_HEADERS)))
API_RST_FILES = $(addsuffix -api.rst, $(HEADER_TYPES))
RTD_SRC = $(COMMON_DIR)/rtd-src
DOCS += README.md
DOCS += RELEASE_NOTES.md
include $(TOP)/configure/RULES
$(HEADER_MD_FILES): %_h.md: ../HEADER_h.md
$(EXPAND_TOOL) -t $(INSTALL_LOCATION) -DHEADER=$* $< $@
$(API_RST_FILES): %-api.rst: ../%-API.rst
@$(RM) $@
@$(ECHO) Creating $@
@$(CP) $< $@
@$(foreach h, $($*_HEADERS), \
echo " $h_h.rst" >> $@;)
ifndef T_A
doxygen rtd sphinx: inc
$(MAKE) -C O.$(EPICS_HOST_ARCH) $@
else
doxygen: Doxyfile
@$(MKDIR) $(RTD_SRC)
$(DOXYGEN)
rtd: doxygen $(API_RST_FILES) $(HEADER_MD_FILES)
rsync -av $(INSTALL_DOC)/ $(RTD_SRC)/
rsync -av $(HEADER_MD_FILES) $(RTD_SRC)/
rsync -av $(API_RST_FILES) $(RTD_SRC)/
rsync -av ../index.rst ../conf.py $(RTD_SRC)/
sphinx: rtd
cd $(COMMON_DIR); $(PYTHON) -m sphinx rtd-src readthedocs
rsync -av $(COMMON_DIR)/readthedocs $(INSTALL_HTML)/
endif
.PHONY: doxygen rtd sphinx

View File

@@ -1,27 +1,7 @@
# Installation Instructions {#install}
# Installation instructions
## EPICS Base Release 7.0.x
-----
### Table of Contents
- [What is EPICS base?](#what-is-epics-base?)
- [What is new in this release?](#what-is-new-in-this-release?)
- [Copyright](#copyright)
- [Supported platforms](#supported-platforms)
- [Supported compilers](#supported-compilers)
- [Software requirements](#software-requirements)
- [Host system storage requirements](#host-system-storage-requirements)
- [Documentation](#documentation)
- [Directory Structure](#directory-structure)
- [Site-specific build configuration](#site-specific-build-configuration)
- [Building EPICS base](#building-epics-base)
- [Example application and extension](#example-application-and-extension)
- [Multiple host platforms](#multiple-host-platforms)
-----
### What is EPICS base?
The Experimental Physics and Industrial Control Systems (EPICS) is an
@@ -36,8 +16,8 @@ interfaces) of various types.
### What is new in this release?
Please check the `documentation/RELEASE_NOTES.md` file for
description of changes and release migration details.
Please check the [release notes](RELEASE_NOTES.md)
for description of changes and release migration details.
### Copyright
@@ -80,8 +60,7 @@ executable must be found through your normal search path.
#### Unzip and tar (Winzip on WIN32 systems)
You must have tools available to unzip and untar the EPICS base
distribution file.
You may need tools to unzip and untar the EPICS base distribution file.
#### Target systems
@@ -91,7 +70,7 @@ running as processes on the host platform.
#### vxWorks
You must have vxWorks 6.8 or later installed if any of your target
You must have vxWorks 6.8 or 6.9 installed if any of your target
systems are vxWorks systems; the C++ compiler from older versions cannot
compile recently developed code. The vxWorks installation provides the
cross-compiler and header files needed to build for these targets. The
@@ -120,16 +99,10 @@ readline is available and will then use it. RTEMS targets may be
configured to use `LIBTECLA` if available, and on vxWorks the OS's
ledLib line-editing library is normally used.
### Host system storage requirements
The compressed tar file is approximately 3 MB in size. The
distribution source tree takes up approximately 21 MB. A 64-bit host
architecture may need around 610 MB to compile, while cross-compiled
targets are somewhat smaller.
### Documentation
EPICS documentation is available through the [EPICS website](https://epics.anl.gov/) at Argonne.
EPICS documentation is available from the
[EPICS Documentation Website](https://docs.epics-controls.org/).
Release specific documentation can also be found in the
`base/documentation` directory of the distribution.
@@ -143,8 +116,10 @@ Release specific documentation can also be found in the
base/configure Build rules and OS-independent config files
base/configure/os OS-dependent build config files
base/documentation Distribution documentation
base/src Source code in various subdirectories
base/src Source code for templates and build tools
base/modules Source code for distribution submodules
base/startup Scripts for setting up path and environment
base/test Unit tests for build tools
```
#### Directories created by the build
@@ -158,7 +133,8 @@ configuration variable if that has been set.
cfg Installed build configuration files
db Installed database files
dbd Installed database definition files
html Installed html documentation
doc Installed Markdown documentation
html Installed HTML documentation
include Installed header files
include/os Installed OS-specific header files in subdirs
include/compiler Installed compiler-specific header files
@@ -169,12 +145,11 @@ configuration variable if that has been set.
#### `base/documentation` Directory
This contains documents on how to setup, build, and install EPICS.
This contains EPICS reference documentation.
```
README.md This file
RELEASE_NOTES.md Notes on release changes
KnownProblems.html List of known problems and workarounds
```
#### `base/startup` Directory
@@ -272,8 +247,7 @@ need C and C++ compilers in your search path. When building base you
must have `echo` in your search path. For Unix host builds you will
also need `cp`, `rm`, `mv`, and `mkdir` in your search path. Some Unix
systems may also need `ar` and `ranlib`, and the C/C++ compilers may
require `as` and `ld` in your path. On Solaris systems you need
`uname` in your path.
require `as` and `ld` in your path.
* **`LD_LIBRARY_PATH`**
EPICS shared libraries and executables normally contain the full path
@@ -290,7 +264,6 @@ Shared libraries are now built by default on all Unix type hosts.
To configure EPICS, you may want to modify some values set in the
following files:
>>>>>>> mirror/3.15
```
configure/CONFIG_SITE Build settings. Specify target archs.

View File

@@ -1,4 +1,4 @@
# EPICS 7.0 Release Notes {#releasenotes}
# EPICS 7.0 Release Notes
These release notes describe changes that have been made since the previous
release of this series of EPICS Base. **Note that changes which were merged up
@@ -8,9 +8,416 @@ under the 3.15 release to which they were originally committed.** Thus it is
important to read more than just the first section to understand everything that
has changed in each release.
The PVA submodules each have their own individual sets of release notes which
should also be read to understand what has changed since earlier releases.
The external PVA submodules each have their own individual release notes files.
However the entries describing changes included in those submodules since EPICS
7.0.5 have now been copied into the appropriate place of this file.
## EPICS Release 7.0.9
### Core documentation published at ReadTheDocs
The `documentation` directory's `Makefile` can now run various publication scripts including Sphinx and Doxygen to generate formatted documentation that is now being published
[at docs.epics-controls.org](https://docs.epics-controls.org/projects/base/en/latest/index.html)
and integrated into the main [EPICS Documentation website](https://docs.epics-controls.org/en/latest/index.html).
The best place to find out more about these mechanisms is the
[Contribution Guide](https://docs.epics-controls.org/en/latest/CONTRIBUTING.html)
although it doesn't currently cover the new processes added to epics-base.
Much of the documentation generated from .dbd.pod files at build time is now
also being converted into MarkDown (.md) files and installed into the top-level
`doc` directory. Some users might find it quicker to look up information about a
record type by opening these files in a text editor intead of opening a browser
and loading the HTML versions or finding and opening the files from the EPICS
Documentation site.
### Post monitors from compress record when it's reset
Writing into a compress record's `RES` field now posts a monitor event instead
of only changing `VAL`. Monitor clients will therefore receive an empty array.
### The AMSG error message propagates through MSS links
A database link with the MSS attribute will now propagate not only SEVR and
STAT, but also AMSG. This field contains additional information that complements
STAT. Links with MS or MSI attributes do not propagate STAT, and therefore do
not propagate AMSG, either.
Channel Access links do not propagate AMSG, regardless of the MSS attribute,
because the message is not available as Channel metadata.
### Reloading record aliases
Aliases can now be defined more than once as long as they still refer to the
same record, unless the global variable `dbRecordsOnceOnly` is non-zero.
This allows database files to be loaded multiple times, even if they contain
alias definitions.
### `DBE_PROPERTY` event rate changed
Updating property fields now only posts `DBE_PROPERTY` events if the
field actually changed.
### Changes to msi related to include paths
There are two changes to `msi` included here.
`msi` now treats files included by .template or .substutiions files in a more
consistent way: for relative paths, it will always look relative to the current
working directory if no `-I` flags are passed, and if they are passed then it
will search for the _relative_ path from each of those flags. That is, the
following will now find the file `bar.template` located at
`/some/path/rel/path/bar.template`
```
$ cat foo.substitutions
file rel/path/bar.template {
# contents
}
$ msi -I /some/path foo.substitutions
```
Note that this does provide one change from previous behaviour: when opening a
file from the command line, `msi` will not use the `-I`-specified paths to
search for the file, but will only work relative to the current working
directory, consistent with most commandline utilities.
### Allow users to delete previously created records from the database
From this release, record instances and aliases that have already been loaded
by an IOC can be removed from the database again before the call to iocInit
by loading a second instance of the named records but using `"#"` in place of
the record type. Values for the fields are not required or advised, just use
an empty record body `{}`. This is useful when a template defines records that
are not wanted in some IOCs, without having to split or duplicate the original
template.
For example this will remove the record named "unwanted":
```
record("#", "unwanted") {}
```
### Only keep readline history for interactive sessions
Previously, all IOCsh commands were persisited in the libreadline history
(when readline support is included).
Going forward, only interactive commands are saved.
### Type change to asTrap serverSpecific data
Change `void*` to `dbChannel*` in `asTrapWriteBeforeWithData()` and
`asTrapWriteMessage::serverSpecific` to reflect the reality since
the `dbAddr*` to `dbChannel*` migration.
External code wishing to support both before and after 3.15 should
already be conditionally casting to/from the appropriate type.
### Fix issues with `_FORTIFY_SOURCE=3`
This release fixes the false positives failures whhen building with `_FORTIFY_SOURCE` level 3.
The override introduced in 7.0.8.1 has been removed.
### Other
- genVersionHeader: work with git submodules and worktrees.
- avoid UB with self `pthread_join()`
- freebsd: Add support for x86 and amd64 builds
- Clear AMSG when SEVR becomes zero.
- `seqRecord` fix support for link `DLY0`
- Add `ABORT_ON_ASSERT` flag to `CONFIG_SITE_ENV`
- rationalize osdMutex
### Submodule updates
The pvDatabase module was updated to version 4.7.2:
* Resolved issue with changed field set in the case where the top level (master)
field ("_") is not requested by the client, but the master field callback causes
all fields to be marked as updated, rather than only those fields that have
actually been modified.
-----
## EPICS Release 7.0.8.1
### Limit to `_FORTIFY_SOURCE=2`
GCC versions 12 and beyond and glibc have added some aggressive runtime
checks for buffer overflows in libc functions at runtime, and the
[Ubuntu 2024.04](https://wiki.ubuntu.com/ToolChain/CompilerFlags) release
increased their default gcc fortification level from 2 to 3.
This has started causing EPICS Base builds to fail on that version, and
other OS releases may make that configuration change with similar results.
This release detects a compiler configured with `_FORTIFY_SOURCE=3` and
overrides it to 2.
Later releases of Base will adjust the code, providing information to the
compiler to avoid triggering these incorrect protections.
### Fix issue with compress record
In Base 7.0.8, an update to the compress record was added to allow for certain
algorithms to use partially filled buffers in their computations. Unfortunately,
this broke the behaviour of the records in certain cases. This has been fixed.
### Various minor changes
These included fixing minor memory leaks and documentation corrections. The
`SIZV` field of lsi, lso and printf record VAL fields now can't exceed 32767
characters, to match an internal limit.
### `epicsSocketAccept()` now returns `SOCKET`, not `int`
This might have some effect on downstream modules still using `int`, but the
OS-specific osdSock.h headers which osiSock.h includes have all declared
`SOCKET` (in most casese as a typedef for `int`) for many releases.
This change removes a compiler warning on WIN32.
Further details and the discussion about this change can be found
[here](https://github.com/epics-base/epics-base/pull/458).
### `dbLoadRecords` allows macros with default values
Previously the parser assumed that files containing macro substitutions were
bad if no macro definitions were provided; that assumption was made incorrect
once macro substitutions were allowed to provide a default value.
### Hostname length limit in CA removed
Before this release, the CA client library only handled hostnames in address
list environment variables up to 255 characters long.
This limit has been removed.
-----
## EPICS Release 7.0.8
### bi "Raw Soft Channel" use MASK
If MASK is non-zero, The raw device support will now apply MASK to the
value read into RVAL.
eg. allows extraction of a bit from an input integer.
```
record(longin, "integer") {
field(VAL, "0xff")
}
record(bi, "bit1") {
field(DESC, "extract bit 1")
field(DTYP, "Raw Soft Channel")
field(INP , "integer")
field(MASK, "0x2")
field(ZNAM, "Clear")
field(ONAM, "Set")
}
```
### ANSI escapes in stderr
ANSI escape charactor sequences may now be printed to the stderr stream.
These escapes will appear in logs captured from that stream.
Tools which parse and/or render these logs may need to be adjusted to
either strip out the escapes, or to translate them into markup.
(see [ansi2html](https://pypi.org/project/ansi2html/) for example)
### Allow explicit append with `dbRecordsOnceOnly!=0`
Previously setting `dbRecordsOnceOnly!=0` prevented any further changes to a record via a .db file. eg.
```
record(ai, "myrec") {}
```
`dbRecordsOnceOnly!=0` previously disallowed appending fields with either form:
```
record("*", "myrec") {} # error
record(ai, "myrec") {} # error
```
Beginning with this release, `dbRecordsOnceOnly!=0` allows appending when explicitly intended (when record type is `"*"`).
```
record("*", "myrec") {} # allowed
record(ai, "myrec") {} # error
```
### Add `$EPICS_CLI_TIMEOUT`
Add support for CA tools timeout from environment variable `$EPICS_CLI_TIMEOUT`
which sets the default the default timeout for `caget` et al.
The `-w` argument continues to take precedence.
### Fixed leak from a non-EPICS thread on WIN32
On Windows targets, if a thread not created by `epicsThreadCreate*()` directly
or indirectly calls an `epicsThread*()` function, a specific tracking struct
is allocated. Prior to this release the allocation would not be `free()`d,
resulting in a memory leak.
A similar issue on POSIX targets was previously fixed.
### Change compiler for FreeBSD to clang
The default compiler for FreeBSD targets changes from GCC to clang.
### Expose `dbCreateAlias` in IOC shell
Add a new IOC shell command `dbCreateAlias` allow record aliases to be added.
Intended for use before `iocInit`. eg. to add an alias "bar" for a record "foo".
```
dbLoadRecords("some.db") # includes: record(ai, "foo") { ...
dbCreateAlias("foo", "bar")
iocInit()
```
### dbEvent eventsRemaining missed on cancel
In some cases, RSRV may queue a subscription update, but not flush it.
This partially addresses this issue.
### subRecord on bad INP links
Previously, if a subRecord has an invalid `INP*` link, it was silently failing
(and not running the proc function). Now the the status code returned by the
subroutine is returned from `dbProcess()`.
### COMMANDLINE\_LIBRARY fallback to GNU\_DIR
Fall back to the previous behavior when searching for `readline.h` with older compilers.
### Search for readline installed via HomeBrew.
Look for `/opt/local/include/readline` on OSX.
### Always stop worker threads
The SCAN and callback threads are now stopped during normal IOC shutdown.
### Allow runtime bypass of free list allocator
The environment variable `$EPICS_FREELIST_BYPASS` may be set to `YES` to cause the `freeListLib` functions to always call directly to `malloc()`/`free()`. May be useful when troubleshooting some kinds of memory allocation bugs which would otherwise be "hidden". eg. use-after-free data races. This may also improve the results of dynamic analysis tools which are not aware of this internal free list.
### `compress` record enhancement
The compress record now supports the use of partially-filled buffers when using
any of the N-to-one algorithms. This is achieved by setting the new field `PBUF`
to `YES`.
### Extended timestamp channel filter
The `"ts"` filter can now retrieve the record's timestamp in several numeric
and string formats, some of which support full nanosecond precision.
Hal$ caget -a test:channel
test:channel 2021-03-11 18:23:48.265386 42
Hal$ caget -f9 'test:channel.{"ts": {"num": "dbl"}}'
test:channel.{"ts": {"num": "dbl"}} 984331428.265386105
Hal$ caget 'test:channel.{"ts": {"str": "iso"}}'
test:channel.{"ts": {"str": "iso"}} 2021-03-11T18:23:48.265386+0100
Hal$ caget -f1 'test:channel.{"ts": {"num": "ts"}}'
test:channel.{"ts": {"num": "ts"}} 2 984331428.0 265386163.0
More information is included in the filters documentation, which can be found in
the `html/filters.html` document that is generated during the build
### Allow adding new error symbols at any time
`errSymbolAdd` can now be called after early initialization.
### Add conditional output (OOPT) to the longout record
The longout record can now be configured using its new OOPT and OOCH fields
to (not) write to its output link depending on the contents of VAL, in a
similar manner to the calcout record. More information can be found on the
reference page for the longout record type that accompanies this release.
This functionality was suggested in
[lp# 1398215](https://bugs.launchpad.net/epics-base/+bug/1398215) and may
be added to other output record types if the community finds it useful,
please send feedback about the feature to tech-talk.
### IOC Shell
#### Tab completion
When built with optional GNU libreadline support, the interactive IOC shell
will perform tab completion for command names as well as for some arguments
of the built-in commands. For example, the record name argument of `dbpr`,
and the path name argument of `cd`.
Externally defined commands have a limited ability to opt into completion by
using the new `iocshArgStringRecord` and `iocshArgStringPath` argument types.
Both function identically to `iocshArgString` but indicate how to suggest
completion strings.
Builds on macOS (`darwin-x86` or `darwin-aarch64` targets) normally use Apple's
libedit library in readline compatibility mode, which doesn't support the tab
completion API that GNU readline provides. You can use Homebrew or some other
third-party package manager to install the GNU readline package, then edit the
`configure/os/CONFIG_SITE.darwinCommon.darwinCommon` file to have EPICS use the
real thing to get tab completion in the IOC shell. The default settings in that
file currently look for and use a Homebrew-installed readline if present.
#### Persist history
Attempt to read and write command to a file (`./.iocsh_history` by default).
Name may be overwritten with by setting `$EPICS_IOCSH_HISTFILE` to an
alternate path, or disabled by setting to an empty string.
#### Changes to help output
Rework the `help` command output to improve formatting and readability,
and include a visual marker (a line of underlines) between different help commands.
### Add FMOD as CALC Expression
The floating point modulo function `FMOD(NUM,DEN)` has been added to the CALC
expression engine and is available to all software using that (calc and calcout
record types, access security library and some extensions).
### Submodule updates
The pvData module was updated to version 8.0.6:
- Compatible changes
- Actually enable JSON-5 output in PVStructure::Formatter::JSON when available.
- Fix unaligned access issues for some ARM/Linux targets.
The pvAccess module was updated to version 7.1.7:
- Changes
- Registering the PVA server with the IOC now sets the `PVAS_SERVER_PORT`
variable in the environment.
The pva2pva module was updated to version 1.4.1:
- Bug Fixes
- `dbLoadGroup` was fixed
- Additions
- Support for "meta" member at top of array of structs
The pvDatabase module was updated to version 4.7.1:
* Added data distributor plugin which can be used for distributing data between
a group of clients. The plugin is triggered by the request string of the
form:
`_[distributor=group:<group id>;set:<set_id>;trigger:<field_name>;updates:<n_updates>;mode:<update_mode>]`
The plugin parameters are optional and are described bellow:
- group: this parameter indicates a group that client application belongs to (default value: "default"); groups of clients are completely independent of each other
- set: this parameter designates a client set that application belongs to within its group (default value: "default")
- trigger: this is the PV structure field that distinguishes different channel updates (default value: "timeStamp"); for example, for area detector images one could use the "uniqueId" field of the NTND structure
- updates: this parameter configures how many sequential updates a client (or a set of clients) will receive before the data distributor starts updating the next one (default value: "1")
- mode: this parameter configures how channel updates are to be distributed between clients in a set:
- one: update goes to one client per set
- all: update goes to all clients in a set
- default is "one" if client set id is not specified, and "all" if set id is specified
-----
## EPICS Release 7.0.7
@@ -88,10 +495,10 @@ changed to `(p)->dtor`.
The order over operations when processing a waveformRecord is adjusted
so that updates to NORD is posted with the correct timestamp.
### Automatic COMMANDLINE_LIBRARY w/ newer compilers
### Automatic `COMMANDLINE_LIBRARY` with newer compilers
When built with a compiler supporting `__has_include<>`, the presence
of the `<readline/readline.h>` will be used to automatically determine
of a `readline/readline.h` header will be used to automatically determine
a default value for `COMMANDLINE_LIBRARY`.
Mingw builds with readline support now link `-ltermcap` instead of `-lcurses`.
@@ -151,6 +558,32 @@ This release fixed the leak on POSIX targets.
See the associated github [issue 241](https://github.com/epics-base/epics-base/issues/241)
for WIN32 status.
### Fixed leak from a non-EPICS thread
On some targets, if a thread not created by `epicsThreadCreate*()` directly
or indirectly calls an `epicsThread*()` function, a specific tracking struct
is allocated.
Prior to this release, on POSIX and WIN32 targets, this
allocation would not be `free()`d, resulting in a memory leak.
This release fixed the leak on POSIX and WIN32 targets (excluding
MSVC before vs2012, and the WINE runtime).
### Fixed leak from a non-EPICS thread
On some targets, if a thread not created by `epicsThreadCreate*()` directly
or indirectly calls an `epicsThread*()` function, a specific tracking struct
is allocated.
Prior to this release, on POSIX and WIN32 targets, this
struct would not be `free()`d, resulting in a memory leak.
This release fixed the leak on POSIX targets.
See the associated github [issue 241](https://github.com/epics-base/epics-base/issues/241)
for WIN32 status.
### Fix `CHECK_RELEASE = WARN`
This now works again, it was broken in 2019 (7.0.3.1) by an errant commit.
@@ -234,6 +667,44 @@ or if unsupported (`$TERM` not set, or Windows < 10).
The `dbnd` server side filter now passes through alarm and property
change events, even when not exceeding the deadband.
### Submodule updates
The pvData module was updated to version 8.0.5:
- Compatible changes
- Internal changes to use the YAJL API for generating JSON and JSON-5 output.
The pvAccess module was updated to version 7.1.6:
- Changes to caProvider
- Bug fix related to enum values.
- More internal changes to improve performance when connecting tens of
thousands of CA channels.
- Several minor internal improvements.
The pva2pva module was updated to version 1.4.0:
- Bug Fixes
- Apply ACF when writing to atomic group
- Additions
- Add new "structure" to @ref qsrv_group_map_types
- Changes
- Add Access Security hooks for single and group writes.
- Enable "Async Soft Channel" for output links
- When built against Base 7.0.6.1, set timeStamp.userTag from UTAG field.
- Add DTYP="QSRV Set UTag" for longin, which sets UTAG=VAL.
The pvDatabase module was updated to version 4.7.0:
* Added support for the whole structure (master field) server side plugins.
The whole structure is identified as the `_` string, and a pvRequest string
that applies a plugin to it takes the form:
`field(_[XYZ=A:3;B:uniqueId])`
where `XYZ` is the name of a specific filter plugin that takes parameters
`A` and `B` with values `3` and `uniqueId` respectively.
-----
## EPICS Release 7.0.6.1
@@ -300,6 +771,15 @@ This was done to simplify the code and may have improved performance slightly fo
Many of the built-in record types have had improvements to their documentation with additional fields added to the tables, rewrites of descriptions and links to other documents added or fixed.
### Submodule updates
The pvAccess module was updated to version 7.1.4:
- Changes to caProvider
- Resolve issues with pv structures that don't have a value field
- Add NULL checks for handling unusual structures
- Speed up channel creation when using large numbers of channels
-----
## EPICS Release 7.0.6
@@ -310,7 +790,7 @@ These target architectures have been removed:
+ darwin-ppc, darwin-ppcx86
+ linux-386, linux-486, linux-586, linux-686, linux-athlon (cross-build)
+ linux-cris, linux-cris_v10, linux-cris_v32 (cross-build)
+ linux-cris, linux-cris\_v10, linux-cris\_v32 (cross-build)
+ RTEMS-at91rm9200ek, RTEMS-gen68360, RTEMS-mcp750, RTEMS-mvme167,
RTEMS-psim (cross-build)
@@ -328,9 +808,9 @@ running on RTEMS 5:
- RTEMS-beagleboneblack
- RTEMS-pc686
- RTEMS-qoriq_e500 (MVME2500)
- RTEMS-xilinx_zynq_a9_qemu
- RTEMS-xilinx_zynq_zedboard
- RTEMS-qoriq\_e500 (MVME2500)
- RTEMS-xilinx\_zynq\_a9\_qemu
- RTEMS-xilinx\_zynq\_zedboard
The EPICS support for RTEMS 4 has always relied on RTEMS-specific
kernel APIs which cannot be used on an SMP system, so a new port was
@@ -342,7 +822,7 @@ to run `make distclean` if switching a single source tree from one
to the other (both header files and dependency files are different
between the two and must be cleaned out).
The configuration variable RTEMS_VERSION in the EPICS config file
The configuration variable `RTEMS_VERSION` in the EPICS config file
`configure/os/CONFIG_SITE.Common.RTEMS` must be set to the full 3-
part version number for RTEMS 4 releases, e.g. `4.9.1`, `4.10.2`
but for RTEMS 5.1 and later it must only contain the major version
@@ -540,6 +1020,39 @@ Test programs written directly in Perl as a `.plt` script should implement a
similar timeout for themselves. The "netget" test in Base does this in a way
that works on Windows as well as Unix-like hosts.
### Submodule updates
The pvAccess module was updated to version 7.1.4:
- Changes
- Adjust argument parsing with pvput (Jesus Vasquez).
The pva2pva module was updated to version 1.3.1:
- Bug Fixes
- Correct handling for server side filters.
- Changes
- Syncing softMain.cpp with epics-base
The pvDatabase module was updated to version 4.6.0:
* Access Security is now supported.
* <b>special</b> has been revised and extended.
* addRecord, removeRecord, processRecord, and traceRecord are replaced by pvdbcr versions.
* <b>support</b> is DEPRECATED
The pvaClient module was updated to version 4.8.0:
* `PvaClientNTMultiData::getChannelChangeFlags` is a new method. It fixes
issue #66.
* Fix for issue #68. Both `PvaClientArray` and `PvaClientField` are not longer
present. Neither was previously implemented.
* Several public methods are now protected. They were never meant to be called
by clients.
* Issue #70 has been fixed.
* Changes was made to increase the performance of `pvaMultiChannel`.
* doxygen changes were made.
-----
## EPICS Release 7.0.5
@@ -577,7 +1090,7 @@ compile device supports as loadable modules.
### Priority inversion safe Posix mutexes
On Posix systems, epicsMutex now support priority inheritance if available.
The IOC needs to run with SCHED_FIFO engaged to use these.
The IOC needs to run with `SCHED_FIFO` engaged to use these.
Support for Posix implementations before POSIX.1-2001 (`_XOPEN_SOURCE < 500`,
glibc version &lt; 2.3.3) has been dropped.
@@ -710,14 +1223,14 @@ properly handle zero-length arrays. The `caget`, `caput` and `camonitor`
client programs are known to work with empty arrays as long as they were
built with this or a later version of EPICS.
#### Change to the db_access.h `dbr_size_n(TYPE, COUNT)` macro
#### Change to the db\_access.h `dbr_size_n(TYPE, COUNT)` macro
When called with COUNT=0 this macro no longer returns the number of bytes
required for a scalar (1 element) but for an empty array (0 elements).
Make sure code that uses this doesn't call it with COUNT=0 when it really
means COUNT=1.
Note that the db_access.h header file is included by cadef.h so the change
Note that the db\_access.h header file is included by cadef.h so the change
can impact Channel Access client programs that use this macro.
#### Channel Access support for zero-length arrays
@@ -827,6 +1340,35 @@ GNUmake added the directive `undefine` in version 3.82 to allow variables to
be undefined. Support for this has been added to the EPICS Release file parser,
so `undefine` can now be used in configure/RELEASE files to unset variables.
### Submodule updates
The pvData module was updated to version 8.0.4:
- Incompatible changes
- Remove `ByteBuffer::align()`
- Compatible changes
- Deprecate `SerializableControl::alignBuffer()` and
`DeserializableControl::alignData()`
- `shared_vector_convert<>()` fix convert of empty, untyped, array
The pvAccess module was updated to version 7.1.3:
- Bug fixes
- Increase default TCP timeout to 40 seconds.
Applies a 4/3 multiplier on `$EPICS_PVA_CONN_TMO` for compatibility.
- CA Provider implementation restructured to simplify, reduce duplication
and fix issues #163 and #165.
- Changes
- Enable building of pvtools to all except vxWorks, RTEMS and iOS.
The pva2pva module was updated to version 1.3.0:
- Changes
- Add `dbLoadGroup()` iocsh function to read group JSON definitions
from a file. Mappings in files must refer to full record names
instead of fields. eg. 'recname.VAL' instead of 'VAL'.
-----
## EPICS Release 7.0.4.1
@@ -892,7 +1434,7 @@ The following launchpad bugs have fixes included in this release:
operators on aarch64
- [lp: 1853148](https://bugs.launchpad.net/bugs/1853148), mingw compiler
problem with printf/scanf formats
- [lp: 1852653](https://bugs.launchpad.net/bugs/1852653), USE_TYPED_DSET
- [lp: 1852653](https://bugs.launchpad.net/bugs/1852653), `USE_TYPED_DSET`
incompatible with C++
- [lp: 1862328](https://bugs.launchpad.net/bugs/1862328), Race condition on
IOC start leaves rsrv unresponsive
@@ -902,7 +1444,7 @@ The following launchpad bugs have fixes included in this release:
- [lp: 1868680](https://bugs.launchpad.net/bugs/1868680), Access Security file
reload (asInit) fails
### \*_API macros in EPICS headers
### `*_API` macros in EPICS headers
Internally, the Com and ca libraries now express dllimport/export (Windows)
and symbol visibility (GCC) using library-specific macros (eg. `LIBCOM_API`)
@@ -1136,7 +1678,7 @@ The API functions `epicsGetExecDir()` and `epicsGetExecName()` are also
added to `osiFileName.h` to provide runtime access to the directory or
filename of the executable with which the process was started.
### Decouple LINKER_USE_RPATH and STATIC_BUILD
### Decouple `LINKER_USE_RPATH` and `STATIC_BUILD`
Previously, setting `STATIC_BUILD=NO` implied `LINKER_USE_RPATH=NO`.
This is no longer the case. Setting `LINKER_USE_RPATH=YES` will
@@ -1715,7 +2257,7 @@ number instead, like this:
Channel Access does not (and probably never will) directly support 64-bit
integer types, so the new field types are presented to the CA server as
`DBF_DOUBLE` values. This means that field values larger than 2^52
(0x10_0000_0000_0000 = 4503599627370496) cannot be transported over Channel
(0x10\_0000\_0000\_0000 = 4503599627370496) cannot be transported over Channel
Access without their least significant bits being truncated. The EPICS V4
pvAccess network protocol _can_ transport 64-bit data types however, and a
future release of the pvaSrv module will connect this ability to the fields of

View File

@@ -1,74 +0,0 @@
# Record Reference Documentation {#recordrefmanual}
The documentation below for the record types and menus included with Base was
converted from the old EPICS Wiki pages and updated. This list only includes the
record types supplied with Base. The first two links below are to an external
website where these original reference chapters are now being published.
* [Introduction to EPICS](https://docs.epics-controls.org/en/latest/guides/EPICS_Intro.html)
* [Process Database Concepts](https://docs.epics-controls.org/en/latest/guides/EPICS_Process_Database_Concepts.html)
* [Fields Common to All Record Types](dbCommonRecord.html)
* [Fields Common to Input Record Types](dbCommonInput.html)
* [Fields Common to Output Record Types](dbCommonOutput.html)
## Record Types
* [Analog Array Input Record (aai)](aaiRecord.html)
* [Analog Array Output Record (aao)](aaoRecord.html)
* [Analog Input Record (ai)](aiRecord.html)
* [Analog Output Record (ao)](aoRecord.html)
* [Array Subroutine Record (aSub)](aSubRecord.html)
* [Binary Input Record (bi)](biRecord.html)
* [Binary Output Record (bo)](boRecord.html)
* [Calculation Output Record (calcout)](calcoutRecord.html)
* [Calculation Record (calc)](calcRecord.html)
* [Compression Record (compress)](compressRecord.html)
* [Data Fanout Record (dfanout)](dfanoutRecord.html)
* [Event Record (event)](eventRecord.html)
* [Fanout Record (fanout)](fanoutRecord.html)
* [Histogram Record (histogram)](histogramRecord.html)
* [64bit Integer Input Record (int64in)](int64inRecord.html)
* [64bit Integer Output Record (int64out)](int64outRecord.html)
* [Long Input Record (longin)](longinRecord.html)
* [Long Output Record (longout)](longoutRecord.html)
* [Long String Input Record (lsi)](lsiRecord.html)
* [Long String Output Record (lso)](lsoRecord.html)
* [Multi-Bit Binary Input Direct Record (mbbiDirect)](mbbiDirectRecord.html)
* [Multi-Bit Binary Input Record (mbbi)](mbbiRecord.html)
* [Multi-Bit Binary Output Direct Record (mbboDirect)](mbboDirectRecord.html)
* [Multi-Bit Binary Output Record (mbbo)](mbboRecord.html)
* [Permissive Record (permissive)](permissiveRecord.html)
* [Printf Record (printf)](printfRecord.html)
* [Select Record (sel)](selRecord.html)
* [Sequence Record (seq)](seqRecord.html)
* [State Record (state)](stateRecord.html)
* [String Input Record (stringin)](stringinRecord.html)
* [String Output Record (stringout)](stringoutRecord.html)
* [Sub-Array Record (subArray)](subArrayRecord.html)
* [Subroutine Record (sub)](subRecord.html)
* [Waveform Record (waveform)](waveformRecord.html)
## Menu Definitions
* [Alarm Severity Menu](menuAlarmSevr.html)
* [Alarm Status Menu](menuAlarmStat.html)
* [Analog Conversions Menu](menuConvert.html)
* [Field Type Menu](menuFtype.html)
* [Invalid Value Output Action Menu](menuIvoa.html)
* [Output Mode Select Menu](menuOmsl.html)
* [Process at iocInit Menu](menuPini.html)
* [Post Monitors Menu](menuPost.html)
* [Priority Menu](menuPriority.html)
* [Scan Menu](menuScan.html)
* [Simulation Mode Menu](menuSimm.html)
* [Yes/No Menu](menuYesNo.html)
## Corrections and Updates
Corrections to these documents can be submitted as patch files to the EPICS core
developers, or as merge requests or pull requests to the 7.0 branch of Base.
The document sources can be found in the `modules/database/src/std/rec` and
`modules/database/src/ioc/db` directories in files with extension `.dbd.pod`.
The documentation source format is a combination of the EPICS DBD file format
with an extended version of Perl's POD (plain old documentation); run `perldoc
pod` for details of POD.

View File

@@ -48,14 +48,14 @@ everything that has to be done since it's so easy to miss steps.</p>
<p>The following roles are used below:</p>
<dl>
<dt><strong>Release Manager</strong> ()</dt>
<dt><strong>Release Manager</strong></dt>
<dd>Responsible for managing and tagging the release</dd>
<dt><strong>Platform Developers</strong> (informal)</dt>
<dd>Responsible for individual operating system platforms</dd>
<dt><strong>Core Developers</strong></dt>
<dd>Responsible for maintaining the EPICS software</dd>
<dt><strong>Application Developers</strong></dt>
<dd>Responsible for support modules that depend on EPICS Base.</dd>
<dt><strong>Website Editor</strong> (Andrew Johnson)</dt>
<dd>Responsible for the EPICS website</dd>
<dt><strong>Website Editors</strong></dt>
<dd>Responsible for the EPICS websites</dd>
</dl>
<form>
@@ -72,23 +72,22 @@ everything that has to be done since it's so easy to miss steps.</p>
<tr>
<td>&nbsp;</td>
<td>Release Manager</td>
<td>Email all developers about the upcoming release and ask for a list
of remaining tasks that must be finished.</td>
<td>Notify core developers about the upcoming release and ask about any
remaining tasks that must be finished.</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>All developers</td>
<td>Check the bug tracker for any outstanding items and handle
appropriately. All bugs that have been fixed should have been marked
as Fix Committed.</td>
appropriately.</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>Release Manager</td>
<td>Set the Feature Freeze date, by which time all Git commits for
enhancements and new functionality should have been completed. After
this date, commits should only be made to fix problems that show up
during testing.</td>
<td>Set a Feature Freeze date, by which time all Git branches for
enhancements and new functionality should have been merged. After this
date, commits and merges should only be made to fix problems that show
up during testing.</td>
</tr>
<tr>
<td>&nbsp;</td>
@@ -97,6 +96,7 @@ everything that has to be done since it's so easy to miss steps.</p>
<td>Ensure that documentation will be updated before the release date:
<ul>
<li>Release Notes</li>
<li>Doxygen annotations</li>
<li>Other documents</li>
</ul>
</td>
@@ -104,13 +104,8 @@ everything that has to be done since it's so easy to miss steps.</p>
<tr>
<td>&nbsp;</td>
<td>Release Manager</td>
<td>Review and update this checklist for the upcoming release.</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>Release Manager</td>
<td>Create a release milestone on Launchpad. If a target release date is
known set "Date Targeted" to the expected release date.</td>
<td>Review and update this checklist for the upcoming release.
Update the release version number in the tags and messages below.</td>
</tr>
<tr>
<th colspan="3">Testing</th>
@@ -118,7 +113,7 @@ everything that has to be done since it's so easy to miss steps.</p>
<tr>
<td>&nbsp;</td>
<td>Platform Developers</td>
<td>Run the built-in test programs on all available host platforms using
<td>Run the internal test programs on all available host platforms using
<blockquote><tt>
make -s runtests
</tt></blockquote></td>
@@ -156,6 +151,7 @@ everything that has to be done since it's so easy to miss steps.</p>
<td>Check that documentation has been updated:
<ul>
<li>Release Notes</li>
<li>Doxygen annotations</li>
<li>Other documents</li>
</ul>
</td>
@@ -167,8 +163,8 @@ everything that has to be done since it's so easy to miss steps.</p>
</tr>
<tr>
<td><input type="checkbox"></td>
<td>Release Manager</td>
<td>Obtain a positive <q>Ok to release</q> from developers.</td>
<td>Core Developers</td>
<td>Reach a consensus that the software is ready to release.</td>
</tr>
<tr>
<th colspan="3">Creating the final release version</th>
@@ -180,35 +176,59 @@ everything that has to be done since it's so easy to miss steps.</p>
<p><b>For each external submodule</b> in turn (assuming it has not been
tagged yet):</p>
<ol>
<li><tt>git grep UNRELEASED</tt> and insert the module version to any
doxygen annotations that have a <tt>@since UNRELEASED</tt> comment.
Commit (don't push yet).</li>
<li>Check that the module's Release Notes have been updated to cover
all changes; add items as necessary, and set the module version
number and release date if appropriate. Convert to HTML and view in
a browser to check the formatting:
<blockquote><tt>
cd base-7.0/modules/&lt;module&gt;/documentation<br />
pandoc -f gfm -t html -o RELEASE_NOTES.html RELEASE_NOTES.md
</tt></blockquote>
Commit changes (don't push yet).</li>
number and release date if appropriate.
Commit these changes (don't push).</li>
<li>Edit the module's release version file
<tt>configure/CONFIG_<i>module</i>_VERSION</tt> and its top-level
<tt>Doxyfile</tt>; set the <tt>DEVELOPMENT_FLAG</tt> value to 0 and
remove <tt>-dev</tt> from the <tt>PROJECT_NUMBER</tt> string.
Commit changes (don't push).</li>
<li>Tag the module:
<tt>configure/CONFIG_<i>module</i>_VERSION</tt> and the
<tt>Doxyfile</tt>s in the top-level and/or documentation
directories. In these, set <tt>DEVELOPMENT_FLAG</tt> to 0 and remove
<tt>-dev</tt> from the <tt>PROJECT_NUMBER</tt> string. Commit these
changes (don't push):
<blockquote><tt>
git tag -m 'ANJ: Tag for EPICS 7.0.6.1' &lt;module-version&gt;
git ci -m 'Final commit for &lt;module-version&gt;'
</tt></blockquote>
</li>
<li>Tag the module:
<blockquote><tt>
git tag -m 'ANJ: Tag for EPICS 7.0.8.2' &lt;module-version&gt;
</tt></blockquote>
</li>
<li>Generate documentation or Release Notes using one of these:
<ul>
<li>For older modules with a RELEASE_NOTES.md file convert it to
HTML and view in a browser to check the formatting as follows:
<blockquote><tt>
cd base-7.0/modules/&lt;module&gt;/documentation<br />
pandoc -f gfm -t html -o RELEASE_NOTES.html RELEASE_NOTES.md
</tt></blockquote>
<li>For newer modules with release_notes.dox file, generate the
new github-pages website as follows:
<blockquote><tt>
cd base-7.0/modules/&lt;module&gt;/documentation<br />
make commit
git push --force upstream gh-pages
</tt></blockquote>
<i>Q: Delay this <tt>git push</tt> until later?</i></li>
</ul></li>
<li>Update the git submodule on the Base-7.0 branch to the
newly-tagged version, but don't commit yet:
newly-tagged version, check the module's status matches the tag:
<blockquote><tt>
cd base-7.0/modules<br />
git add &lt;module&gt;<br />
git submodule status --cached
</tt></blockquote>
Don't commit the submodule updates yet.
</li>
<li>Edit the module's release version file
@@ -218,7 +238,8 @@ everything that has to be done since it's so easy to miss steps.</p>
<tt>PROJECT_NUMBER</tt> string, appending <tt>-dev</tt> to the new
module version number. Commit changes.</li>
<li>Push commits and the new tag to the submodule's GitHub repository:
<li>Push commits and the new tag to the submodule's GitHub repository
(assumed to be the <tt>upstream</tt> remote):
<blockquote><tt>
cd base-7.0/modules/&lt;module&gt;<br />
git push --follow-tags upstream master
@@ -267,10 +288,9 @@ everything that has to be done since it's so easy to miss steps.</p>
<td>Tag the epics-base module in Git:
<blockquote><tt>
cd base-7.0<br />
git tag -m 'ANJ: Tagged for release' R7.0.6.1
git tag -m 'ANJ: Tagged for release' R7.0.8.2
</tt></blockquote>
<p>Don't push anything to the Launchpad repository
yet.</p>
<p>Don't push to GitHub yet.</p>
</td>
</tr>
<tr>
@@ -302,12 +322,12 @@ everything that has to be done since it's so easy to miss steps.</p>
files and directories that are only used for continuous integration:
<blockquote><tt>
cd base-7.0<br />
./.tools/make-tar.sh R7.0.6.1 ../base-7.0.6.1.tar.gz base-7.0.6.1/
./.tools/make-tar.sh R7.0.8.2 ../base-7.0.8.2.tar.gz base-7.0.8.2/
</tt></blockquote>
Create a GPG signature file of the tarfile as follows:
<blockquote><tt>
cd ..<br />
gpg --armor --sign --detach-sig base-7.0.6.1.tar.gz
gpg --armor --sign --detach-sig base-7.0.8.2.tar.gz
</tt></blockquote>
</td>
</tr>
@@ -315,8 +335,9 @@ everything that has to be done since it's so easy to miss steps.</p>
<td><input type="checkbox"></td>
<td>Release Manager</td>
<td>Test the tar file by extracting its contents and building it on at
least one supported platform. When this succeeds the commits and new git
tag can be pushed to the Launchpad repository:
least one supported platform. If this succeeds the commits and new git
tag can be pushed to the GitHub repository's 7.0 branch (assumed to be
the <tt>upstream</tt> remote):
<blockquote><tt>
git push --follow-tags upstream 7.0
</tt></blockquote>
@@ -364,7 +385,7 @@ everything that has to be done since it's so easy to miss steps.</p>
</tr>
<tr>
<th colspan="3">Publish to epics-controls</th>
<th colspan="3">Publish to epics-controls.org</th>
</tr>
<tr>
<td><input type="checkbox"></td>
@@ -372,7 +393,7 @@ everything that has to be done since it's so easy to miss steps.</p>
<td>Upload the tar file and its <tt>.asc</tt> signature file to the
epics-controls web-server.
<blockquote><tt>
scp base-7.0.6.1.tar.gz base-7.0.6.1.tar.gz.asc epics-controls:download/base<br />
scp base-7.0.8.2.tar.gz base-7.0.8.2.tar.gz.asc epics-controls:download/base<br />
</tt></blockquote>
</td>
</tr>
@@ -389,22 +410,22 @@ everything that has to be done since it's so easy to miss steps.</p>
</tr>
<tr>
<th colspan="3">Publish to Launchpad</th>
<th colspan="3">Publish to GitHub</th>
</tr>
<tr>
<td><input type="checkbox"></td>
<td>Release Manager</td>
<td>Go to the Launchpad milestone for this release. Click the Create
release button and add the release date. Put a URL for the release page
in the Release notes box, and click the Create release button. Upload
the tar file and its <tt>.asc</tt> signature file to the new Launchpad
release page.</td>
<td>Go to the GitHub
<a href="https://github.com/epics-base/epics-base/releases/new?tag=R7.0.8.2">
Create release from tag R7.0.8.2</a> page.
Upload the tar file and its <tt>.asc</tt> signature file to the new
GitHub release page.</td>
</tr>
<tr>
<td><input type="checkbox"></td>
<td>Release Manager</td>
<td>Find all Launchpad bug reports with the status Fix Committed which
have been fixed in this release and mark them Fix Released.</td>
<td>We used to close out bug reports in Launchpad at release-time, this
would be the time to do that if we have an equivalent on GitHub.</td>
</tr>
<tr>

View File

@@ -1,45 +0,0 @@
#!/bin/sh
set -e -x
# Usage: commit-gh <sub-directory-prefix> <files...>
#
# Creates a commit containing only the files in the sub-directory provided as an argument
#
# Does not disturb the working copy or index
prefix="$1"
shift
# Commit to this branch
BRANCH=refs/heads/gh-pages
# Use the main branch description as the gh-pages commit message
MSG=`git describe --tags --always`
# Scratch space
TDIR=`mktemp -d -p $PWD`
# Automatic cleanup of scratch space
trap 'rm -rf $TDIR' INT TERM QUIT EXIT
export GIT_INDEX_FILE="$TDIR/index"
# Add listed files to a new (empty) index
git update-index --add "$@"
# Write the index into the repo, get tree hash
TREE=`git write-tree --prefix="$prefix"`
echo "TREE $TREE"
git cat-file -p $TREE
# Create a commit with our new tree
# Reference current branch head as parent (if any)
CMT=`git commit-tree -m "$MSG" $TREE`
echo "COMMIT $CMT"
git cat-file -p $CMT
# Update the branch with the new commit tree hash
git update-ref $BRANCH $CMT
echo "Done"

130
documentation/conf.py Normal file
View File

@@ -0,0 +1,130 @@
# Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# http://www.sphinx-doc.org/en/master/config
# -- Path setup --------------------------------------------------------------
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
import os
import sys
sys.path.insert(0, os.path.abspath("."))
# -- Project information -----------------------------------------------------
project = "EPICS Base Documentation"
copyright = "EPICS Controls"
author = "The EPICS Collaboration"
# -- General configuration ---------------------------------------------------
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
"hoverxref.extension",
"breathe",
"sphinx.ext.mathjax",
"sphinx.ext.ifconfig",
"sphinx.ext.graphviz",
"sphinx_copybutton",
"sphinx.ext.intersphinx",
'myst_parser',
]
# Setup the breathe extension
breathe_projects = {"epics-base": "xml"}
breathe_default_project = "epics-base"
# Tell sphinx what the primary language being documented is.
primary_domain = "cpp"
# Tell sphinx what the pygments highlight language should be.
highlight_language = "cpp"
# Add any paths that contain templates here, relative to this directory.
# templates_path = ()
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store", "O.*", "venv"]
# Intersphinx links to subprojects
intersphinx_mapping = {
"epics": ("https://docs.epics-controls.org/en/latest/", None),
}
intersphinx_disabled_reftypes = ["*"]
hoverxref_role_types = {
"hoverxref": "tooltip",
"ref": "modal",
"confval": "tooltip",
"mod": "modal",
"class": "modal",
"obj": "tooltip",
}
hoverxref_intersphinx_types = {
"readthedocs": "modal",
"sphinx": "tooltip",
}
hoverxref_domains = [
"py",
]
# Enabled Markdown extensions.
# See here for what they do:
# https://myst-parser.readthedocs.io/en/latest/syntax/optional.html
myst_enable_extensions = [
"amsmath",
"colon_fence",
"deflist",
"dollarmath",
"fieldlist",
"html_image",
"replacements",
"smartquotes",
"strikethrough",
"tasklist",
]
# Allows auto-generated header anchors:
# https://myst-parser.readthedocs.io/en/latest/syntax/optional.html#auto-generated-header-anchors
myst_heading_anchors = 4
# -- Options for HTML output -------------------------------------------------
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = "sphinx_rtd_theme"
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
# html_static_path = ['_static']
# html_css_files = [
# 'css/custom.css',
# ]
master_doc = "index"
# html_theme_options = {
# 'logo_only': True,
# }
# html_logo = "images/EPICS_white_logo_v02.png"
# html_extra_path = ['../html']
# Breathe directives

View File

@@ -0,0 +1,7 @@
IOC Database C/C++ APIs
=======================
.. toctree::
:maxdepth: 1
:caption: IOC Header Files

30
documentation/index.rst Normal file
View File

@@ -0,0 +1,30 @@
EPICS Base Documentation
========================
.. toctree::
:hidden:
EPICS Documentation Index <https://docs.epics-controls.org/en/latest/>
.. toctree::
:maxdepth: 1
:caption: General Information
README
RELEASE_NOTES
.. toctree::
:maxdepth: 2
:caption: IOC Component Reference
ComponentReference
.. toctree::
:maxdepth: 1
:caption: C/C++ Headers
libcom-api
database-api
record-api
menu-api

View File

@@ -0,0 +1,7 @@
Common Library C/C++ APIs
=========================
.. toctree::
:maxdepth: 1
:caption: LibCom Header Files

View File

@@ -1,15 +0,0 @@
/**
@mainpage EPICS Base
Documentation index
@li @ref releasenotes
@li @ref install
@li @ref recordrefmanual
@li <a href="CAref.html">Channel Access Reference Manual</a>
@li <a href="filters.html">Server Side Filters Reference</a>
@li <a href="msi.html">msi: Macro Substitution and Include Tool</a>
@li <a href="links.html">JSON Link Types</a>
@li <a href="CA.html">Perl 5 Interface to Channel Access</a>
*/

View File

@@ -0,0 +1,7 @@
C/C++ Headers from Menus
========================
.. toctree::
:maxdepth: 1
:caption: Generated Menu Header Files

View File

@@ -0,0 +1,7 @@
C/C++ Headers from Record Types
===============================
.. toctree::
:maxdepth: 1
:caption: Generated Record Header Files

View File

@@ -0,0 +1,6 @@
sphinx==7.2.6
myst-parser==2.0.0
breathe==4.35.0
sphinx_copybutton==0.5.2
sphinx-hoverxref==1.3.0
sphinx-rtd-theme==2.0.0

View File

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

View File

@@ -118,7 +118,6 @@ EXPAND_VARS = INSTALL_BIN=$(FINAL_LOCATION)/bin/$(T_A)
SRC_DIRS += $(CURDIR)/test
PROD_HOST += ca_test
ca_test_SRCS = ca_test_main.c ca_test.c
ca_test_LIBS = ca Com
ca_test_SYS_LIBS_WIN32 = ws2_32 advapi32 user32
OBJS_vxWorks += ca_test

View File

@@ -2575,7 +2575,8 @@ void monitorUpdateTest ( chid chan, unsigned interestLevel )
SEVCHK ( ca_get ( DBR_FLOAT, chan, &temp ), NULL );
SEVCHK ( ca_pend_io ( timeoutToPendIO ), NULL );
/* printf ( "flow control bypassed %u events\n", flowCtrlCount ); */
if (0)
printf ( "flow control bypassed %u events\n", flowCtrlCount );
showProgressEnd ( interestLevel );
}

View File

@@ -25,6 +25,7 @@
#include <stdexcept>
#include <string> // vxWorks 6.0 requires this include
#include "epicsStdio.h"
#include "dbDefs.h"
#include "epicsGuard.h"
#include "epicsVersion.h"
@@ -1008,7 +1009,7 @@ bool cac::defaultExcep (
char buf[512];
char hostName[64];
iiu.getHostName ( guard, hostName, sizeof ( hostName ) );
sprintf ( buf, "host=%s ctx=%.400s", hostName, pCtx );
epicsSnprintf( buf, sizeof(buf), "host=%s ctx=%.400s", hostName, pCtx );
this->notify.exception ( guard, status, buf, 0, 0u );
return true;
}
@@ -1312,7 +1313,7 @@ void cac::pvMultiplyDefinedNotify ( msgForMultiplyDefinedPV & mfmdpv,
const char * pChannelName, const char * pAcc, const char * pRej )
{
char buf[256];
sprintf ( buf, "Channel: \"%.64s\", Connecting to: %.64s, Ignored: %.64s",
epicsSnprintf( buf, sizeof(buf), "Channel: \"%.64s\", Connecting to: %.64s, Ignored: %.64s",
pChannelName, pAcc, pRej );
{
callbackManager mgr ( this->notify, this->cbMutex );

View File

@@ -450,7 +450,7 @@ void timeIt ( tf *pfunc, ti *pItems, unsigned iterations,
epicsTimeStamp end_time;
epicsTimeStamp start_time;
double delay;
unsigned inlineIter;
unsigned inlineIter = 0;
epicsTimeGetCurrent ( &start_time );
(*pfunc) ( pItems, iterations, &inlineIter );

View File

@@ -676,7 +676,7 @@ union db_access_val{
(type)%(LAST_TYPE+1) == DBR_DOUBLE)
#define dbf_type_to_text(type) \
( ((type) >= -1 && (type) < dbf_text_dim-2) ? \
( ((type+1) >= 0 && (type) < dbf_text_dim-2) ? \
dbf_text[type+1] : dbf_text_invalid )
#define dbf_text_to_type(text, type) \

View File

@@ -21,6 +21,9 @@
#define epicsAssertAuthor "Jeff Hill johill@lanl.gov"
#include <vector>
#include <exception>
#include <ctype.h>
#include <string.h>
#include <stdlib.h>
@@ -28,6 +31,7 @@
#include "envDefs.h"
#include "epicsAssert.h"
#include "epicsString.h"
#include "epicsStdioRedirect.h"
#include "errlog.h"
#include "osiWireFormat.h"
@@ -35,39 +39,6 @@
#include "addrList.h"
#include "iocinf.h"
/*
* getToken()
*/
static char *getToken ( const char **ppString, char *pBuf, unsigned bufSIze )
{
bool tokenFound = false;
const char *pToken;
unsigned i;
pToken = *ppString;
while ( isspace (*pToken) && *pToken ){
pToken++;
}
for ( i=0u; i<bufSIze; i++ ) {
if ( isspace (pToken[i]) || pToken[i]=='\0' ) {
pBuf[i] = '\0';
*ppString = &pToken[i];
if ( i != 0 ) {
tokenFound = true;
}
break;
}
pBuf[i] = pToken[i];
}
if ( tokenFound ) {
pBuf[bufSIze-1] = '\0';
return pBuf;
}
return NULL;
}
/*
* addAddrToChannelAccessAddressList ()
*/
@@ -77,9 +48,7 @@ extern "C" int epicsStdCall addAddrToChannelAccessAddressList
{
osiSockAddrNode *pNewNode;
const char *pStr;
const char *pToken;
struct sockaddr_in addr;
char buf[256u]; /* large enough to hold an IP address or hostname */
int status, ret = -1;
pStr = envGetConfigParamPtr (pEnv);
@@ -87,31 +56,45 @@ extern "C" int epicsStdCall addAddrToChannelAccessAddressList
return ret;
}
while ( ( pToken = getToken (&pStr, buf, sizeof (buf) ) ) ) {
status = aToIPAddr ( pToken, port, &addr );
if (status<0) {
fprintf ( stderr, "%s: Parsing '%s'\n", __FILE__, pEnv->name);
fprintf ( stderr, "\tBad internet address or host name: '%s'\n", pToken);
continue;
try {
std::vector<char> scratch(pStr, pStr+strlen(pStr)+1); // copy chars and trailing nil
char *save = NULL;
for(const char *pToken = epicsStrtok_r(&scratch[0], " \t\n\r", &save);
pToken;
pToken = epicsStrtok_r(NULL, " \t\n\r", &save))
{
if(!pToken[0]) {
continue;
}
status = aToIPAddr ( pToken, port, &addr );
if (status<0) {
fprintf ( stderr, "%s: Parsing '%s'\n", __FILE__, pEnv->name);
fprintf ( stderr, "\tBad internet address or host name: '%s'\n", pToken);
continue;
}
if ( ignoreNonDefaultPort && ntohs ( addr.sin_port ) != port ) {
continue;
}
pNewNode = (osiSockAddrNode *) calloc (1, sizeof(*pNewNode));
if (pNewNode==NULL) {
fprintf ( stderr, "addAddrToChannelAccessAddressList(): no memory available for configuration\n");
break;
}
pNewNode->addr.ia = addr;
/*
* LOCK applied externally
*/
ellAdd (pList, &pNewNode->node);
ret = 0; /* success if anything is added to the list */
}
if ( ignoreNonDefaultPort && ntohs ( addr.sin_port ) != port ) {
continue;
}
pNewNode = (osiSockAddrNode *) calloc (1, sizeof(*pNewNode));
if (pNewNode==NULL) {
fprintf ( stderr, "addAddrToChannelAccessAddressList(): no memory available for configuration\n");
break;
}
pNewNode->addr.ia = addr;
/*
* LOCK applied externally
*/
ellAdd (pList, &pNewNode->node);
ret = 0; /* success if anything is added to the list */
} catch(std::exception&) { // only bad_alloc currently possible
ret = -1;
}
return ret;

View File

@@ -56,6 +56,7 @@ extern "C" void epicsStdCall ca_dump_dbr (
if ( INVALID_DB_REQ ( type ) ) {
printf ( "bad DBR type %ld\n", type );
return;
}
printf ( "%s\t", dbr_text[type] );

View File

@@ -549,7 +549,7 @@ void epicsStdCall caRepeaterRegistrationMessage (
char sockErrBuf[64];
epicsSocketConvertErrnoToString (
sockErrBuf, sizeof ( sockErrBuf ) );
fprintf ( stderr, "error sending registration message to CA repeater daemon was \"%s\"\n",
fprintf ( stderr, ERL_ERROR " sending registration message to CA repeater daemon was \"%s\"\n",
sockErrBuf );
}
}
@@ -813,13 +813,13 @@ bool udpiiu::exceptionRespAction (
if ( msg.m_postsize > sizeof ( caHdr ) ){
errlogPrintf (
"error condition \"%s\" detected by %s with context \"%s\" at %s\n",
ERL_ERROR " condition \"%s\" detected by %s with context \"%s\" at %s\n",
ca_message ( msg.m_available ),
name, reinterpret_cast <const char *> ( &reqMsg + 1 ), date );
}
else{
errlogPrintf (
"error condition \"%s\" detected by %s at %s\n",
ERL_ERROR " condition \"%s\" detected by %s at %s\n",
ca_message ( msg.m_available ), name, date );
}

View File

@@ -38,7 +38,7 @@ ifeq ($(wildcard $(PERL_h)),)
endif
endif
ifneq (inc,$(strip $(MAKECMDGOALS)))
ifneq ($(filter-out 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.)

View File

@@ -150,6 +150,7 @@ sub parseDbd {
$thisField = $1;
$thisType = $2;
$isAfield = 1;
$thisSize = 1024 if $thisType =~ m/^ DBF_(IN|OUT|FWD)LINK $/x;
}
elsif ( m/interest \s* \( \s* (\w+) \s* \)/x ) {
die "File format error at line $i of file\n $opt_d\n"

View File

@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2003 Argonne National Laboratory
#
# SPDX-License-Identifier: EPICS
TOP=..
include $(TOP)/configure/CONFIG

View File

@@ -1,3 +1,7 @@
/* SPDX-FileCopyrightText: 1998 Argonne National Laboratory */
/* SPDX-License-Identifier: EPICS */
/*caExample.c*/
#include <stddef.h>
#include <stdlib.h>

View File

@@ -1,3 +1,7 @@
/* SPDX-FileCopyrightText: 2000 Argonne National Laboratory */
/* SPDX-License-Identifier: EPICS */
/*caMonitor.c*/
/* This example accepts the name of a file containing a list of pvs to monitor.

View File

@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2018 Argonne National Laboratory
#
# SPDX-License-Identifier: EPICS
TOP=..
include $(TOP)/configure/CONFIG

View File

@@ -1,5 +1,9 @@
#!/usr/bin/env perl
# SPDX-FileCopyrightText: 2008 Argonne National Laboratory
#
# SPDX-License-Identifier: EPICS
use strict;
# This construct sets @INC to search lib/perl of all RELEASE entries

View File

@@ -1,5 +1,9 @@
#!/usr/bin/env perl
# SPDX-FileCopyrightText: 2008 Argonne National Laboratory
#
# SPDX-License-Identifier: EPICS
use strict;
# This construct sets @INC to search lib/perl of all RELEASE entries

View File

@@ -1,5 +1,9 @@
#!/usr/bin/env perl
# SPDX-FileCopyrightText: 2008 Argonne National Laboratory
#
# SPDX-License-Identifier: EPICS
use strict;
# This construct sets @INC to search lib/perl of all RELEASE entries

View File

@@ -1,5 +1,9 @@
#!/usr/bin/env perl
# SPDX-FileCopyrightText: 2008 Argonne National Laboratory
#
# SPDX-License-Identifier: EPICS
use strict;
# This construct sets @INC to search lib/perl of all RELEASE entries

View File

@@ -343,6 +343,7 @@ static int caget (pv *pvs, int nPvs, RequestT request, OutputT format,
default :
break;
}
free(pvs[n].value);
}
return 0;
}
@@ -388,10 +389,12 @@ int main (int argc, char *argv[])
int digits = 0; /* getopt() no. of float digits */
int nPvs; /* Number of PVs */
pv* pvs; /* Array of PV structures */
pv* pvs = NULL; /* Array of PV structures */
LINE_BUFFER(stdout); /* Configure stdout buffering */
use_ca_timeout_env ( &caTimeout);
while ((opt = getopt(argc, argv, ":taicnhsSVe:f:g:l:#:d:0:w:p:F:")) != -1) {
switch (opt) {
case 'h': /* Print usage */
@@ -437,8 +440,8 @@ int main (int argc, char *argv[])
if(epicsScanDouble(optarg, &caTimeout) != 1)
{
fprintf(stderr, "'%s' is not a valid timeout value "
"- ignored. ('caget -h' for help.)\n", optarg);
caTimeout = DEFAULT_TIMEOUT;
"- ignored, using '%.1f'. ('caget -h' for help.)\n",
optarg, caTimeout);
}
break;
case '#': /* Array count */
@@ -554,6 +557,7 @@ int main (int argc, char *argv[])
result = caget(pvs, nPvs, request, format, type, count);
/* Shut down Channel Access */
free(pvs);
ca_context_destroy();
return result;

View File

@@ -141,6 +141,8 @@ int main (int argc, char *argv[])
LINE_BUFFER(stdout); /* Configure stdout buffering */
use_ca_timeout_env ( &caTimeout);
while ((opt = getopt(argc, argv, ":nhVw:s:p:")) != -1) {
switch (opt) {
case 'h': /* Print usage */
@@ -150,11 +152,16 @@ int main (int argc, char *argv[])
printf( "\nEPICS Version %s, CA Protocol version %s\n", EPICS_VERSION_STRING, ca_version() );
return 0;
case 'w': /* Set CA timeout value */
/*
* epicsScanDouble is a macro defined as epicsParseDouble,
* (found in modules/libcom/src/misc) which will only
* change caTimeout here if it finds an acceptable value.
*/
if(epicsScanDouble(optarg, &caTimeout) != 1)
{
fprintf(stderr, "'%s' is not a valid timeout value "
"- ignored. ('cainfo -h' for help.)\n", optarg);
caTimeout = DEFAULT_TIMEOUT;
"- ignored, using '%.1f'. ('cainfo -h' for help.)\n",
optarg, caTimeout);
}
break;
case 's': /* ca_client_status interest level */

View File

@@ -219,6 +219,8 @@ int main (int argc, char *argv[])
LINE_BUFFER(stdout); /* Configure stdout buffering */
use_ca_timeout_env ( &caTimeout);
while ((opt = getopt(argc, argv, ":nhVm:sSe:f:g:l:#:0:w:t:p:F:")) != -1) {
switch (opt) {
case 'h': /* Print usage */
@@ -251,11 +253,16 @@ int main (int argc, char *argv[])
}
break;
case 'w': /* Set CA timeout value */
/*
* epicsScanDouble is a macro defined as epicsParseDouble,
* (found in modules/libcom/src/misc) which will only
* change caTimeout here if it finds an acceptable value.
*/
if(epicsScanDouble(optarg, &caTimeout) != 1)
{
fprintf(stderr, "'%s' is not a valid timeout value "
"- ignored. ('camonitor -h' for help.)\n", optarg);
caTimeout = DEFAULT_TIMEOUT;
"- ignored, using '%.1f'. ('camonitor -h' for help.)\n",
optarg, caTimeout);
}
break;
case '#': /* Array count */

View File

@@ -35,6 +35,7 @@
#include <epicsStdlib.h>
#include <cadef.h>
#include <errlog.h>
#include <epicsGetopt.h>
#include <epicsEvent.h>
#include <epicsString.h>
@@ -284,6 +285,8 @@ int main (int argc, char *argv[])
LINE_BUFFER(stdout); /* Configure stdout buffering */
putenv("POSIXLY_CORRECT="); /* Behave correct on GNU getopt systems */
use_ca_timeout_env ( &caTimeout);
while ((opt = getopt(argc, argv, ":cnlhatsVS#:w:p:F:")) != -1) {
switch (opt) {
case 'h': /* Print usage */
@@ -318,11 +321,16 @@ int main (int argc, char *argv[])
request = callback;
break;
case 'w': /* Set CA timeout value */
/*
* epicsScanDouble is a macro defined as epicsParseDouble,
* (found in modules/libcom/src/misc) which will only
* change caTimeout here if it finds an acceptable value.
*/
if(epicsScanDouble(optarg, &caTimeout) != 1)
{
fprintf(stderr, "'%s' is not a valid timeout value "
"- ignored. ('caput -h' for help.)\n", optarg);
caTimeout = DEFAULT_TIMEOUT;
"- ignored, using '%.1f'. ('caput -h' for help.)\n",
optarg, caTimeout);
}
break;
case '#': /* Array count */
@@ -337,7 +345,7 @@ int main (int argc, char *argv[])
if (sscanf(optarg,"%u", &caPriority) != 1)
{
fprintf(stderr, "'%s' is not a valid CA priority "
"- ignored. ('caget -h' for help.)\n", optarg);
"- ignored. ('caput -h' for help.)\n", optarg);
caPriority = DEFAULT_CA_PRIORITY;
}
if (caPriority > CA_PRIORITY_MAX) caPriority = CA_PRIORITY_MAX;
@@ -542,7 +550,7 @@ int main (int argc, char *argv[])
result = ca_array_put (dbrType, count, pvs[0].chid, pbuf);
}
if (result != ECA_NORMAL) {
fprintf(stderr, "Error from put operation: %s\n", ca_message(result));
fprintf(stderr, ERL_ERROR " from put operation: %s\n", ca_message(result));
free(sbuf); free(dbuf); free(ebuf);
return 1;
}
@@ -563,7 +571,7 @@ int main (int argc, char *argv[])
}
if (result != ECA_NORMAL) {
fprintf(stderr, "Error occured writing data: %s\n", ca_message(result));
fprintf(stderr, ERL_ERROR " occured writing data: %s\n", ca_message(result));
free(sbuf); free(dbuf); free(ebuf);
return 1;
}

View File

@@ -28,6 +28,7 @@
#include <alarm.h>
#include <epicsTime.h>
#include <epicsStdlib.h>
#include <epicsString.h>
#include <cadef.h>
@@ -53,7 +54,7 @@ char fieldSeparator = ' '; /* OFS default is whitespace */
int enumAsNr = 0; /* used for -n option - get DBF_ENUM as number */
int charArrAsStr = 0; /* used for -S option - treat char array as (long) string */
double caTimeout = 1.0; /* wait time default (see -w option) */
double caTimeout = DEFAULT_TIMEOUT; /* wait time default (see -w option) */
capri caPriority = DEFAULT_CA_PRIORITY; /* CA Priority */
#define TIMETEXTLEN 28 /* Length of timestamp text buffer */
@@ -639,3 +640,22 @@ int connect_pvs (pv* pvs, int nPvs)
}
return returncode;
}
/* Set the timeout to EPICS_CLI_TIMEOUT */
void use_ca_timeout_env ( double* timeout)
{
const char* tmoStr; /* contents of environment var */
if ((tmoStr = getenv("EPICS_CLI_TIMEOUT")) != NULL && timeout != NULL)
{
if(epicsScanDouble(tmoStr, timeout) != 1)
{
fprintf(stderr, "'%s' is not a valid timeout value "
"(from 'EPICS_CLI_TIMEOUT' in the environment) - "
"ignored. (use '-h' for help.)\n", tmoStr);
*timeout = DEFAULT_TIMEOUT;
}
}
}

View File

@@ -100,6 +100,7 @@ extern char *dbr2str (const void *value, unsigned type);
extern void print_time_val_sts (pv *pv, unsigned long reqElems);
extern int create_pvs (pv *pvs, int nPvs, caCh *pCB );
extern int connect_pvs (pv *pvs, int nPvs );
extern void use_ca_timeout_env (double* timeout);
/*
* no additions below this endif

View File

@@ -16,7 +16,7 @@ USR_CPPFLAGS += -DUSE_TYPED_RSET -DUSE_TYPED_DSET
# Shared library ABI version.
SHRLIB_VERSION = $(EPICS_DATABASE_MAJOR_VERSION).$(EPICS_DATABASE_MINOR_VERSION).$(EPICS_DATABASE_MAINTENANCE_VERSION)
API_HEADER = dbCoreAPI.h
# dbCoreAPI.h generated earlier during libcom/
dbCore_API = dbCore
LIBRARY_IOC += dbCore

View File

@@ -23,4 +23,4 @@ dbCore_SRCS += asIocRegister.c
PROD_HOST += ascheck
ascheck_SRCS = ascheck.c
ascheck_LIBS = dbCore ca Com
ascheck_LIBS = dbCore ca

View File

@@ -225,6 +225,11 @@ static void asCaTask(void)
if(asCaDebug) printf("asCaTask has cleared all channels\n");
epicsEventSignal(asCaTaskWait);
}
/* ATM never reached, just a placeholder */
cantProceed("Unreachable. Perpetual thread.");
taskwdRemove(0);
}
void asCaStart(void)

View File

@@ -16,12 +16,13 @@
#include "asIocRegister.h"
/* asSetFilename */
static const iocshArg asSetFilenameArg0 = { "ascf",iocshArgString};
static const iocshArg asSetFilenameArg0 = { "ascf",iocshArgStringPath};
static const iocshArg * const asSetFilenameArgs[] = {&asSetFilenameArg0};
static const iocshFuncDef asSetFilenameFuncDef =
{"asSetFilename",1,asSetFilenameArgs,
"Set path+file name of ACF file.\n"
"No immediate effect. Run as asInit() to (re)load.\n"};
"No immediate effect. Run asInit to (re)load.\n"
"Example: asSetFilename /full/path/to/accessSecurityFile\n"};
static void asSetFilenameCallFunc(const iocshArgBuf *args)
{
asSetFilename(args[0].sval);
@@ -33,7 +34,8 @@ static const iocshArg * const asSetSubstitutionsArgs[] = {&asSetSubstitutionsArg
static const iocshFuncDef asSetSubstitutionsFuncDef =
{"asSetSubstitutions",1,asSetSubstitutionsArgs,
"Set subtitutions used when reading ACF file.\n"
"No immediate effect. Run as asInit() to (re)load.\n"};
"No immediate effect. Run asInit to (re)load.\n"
"Example: asSetSubstitutions var1=5,var2=hello\n"};
static void asSetSubstitutionsCallFunc(const iocshArgBuf *args)
{
asSetSubstitutions(args[0].sval);
@@ -59,7 +61,10 @@ static void asdbdumpCallFunc(const iocshArgBuf *args)
static const iocshArg aspuagArg0 = { "uagname",iocshArgString};
static const iocshArg * const aspuagArgs[] = {&aspuagArg0};
static const iocshFuncDef aspuagFuncDef = {"aspuag",1,aspuagArgs,
"Show members of User Access Group.\n"};
"Show members of the User Access Group.\n"
"If no Group is specified then the members\n"
"of all user access groups are displayed.\n"
"Example: aspuag mygroup\n"};
static void aspuagCallFunc(const iocshArgBuf *args)
{
aspuag(args[0].sval);
@@ -69,7 +74,10 @@ static void aspuagCallFunc(const iocshArgBuf *args)
static const iocshArg asphagArg0 = { "hagname",iocshArgString};
static const iocshArg * const asphagArgs[] = {&asphagArg0};
static const iocshFuncDef asphagFuncDef = {"asphag",1,asphagArgs,
"Show members of Host Access Group.\n"};
"Show members of the Host Access Group.\n"
"If no Group is specified then the members\n"
"of all host access groups are displayed\n"
"Example: asphag mygroup\n"};
static void asphagCallFunc(const iocshArgBuf *args)
{
asphag(args[0].sval);
@@ -78,8 +86,12 @@ static void asphagCallFunc(const iocshArgBuf *args)
/* asprules */
static const iocshArg asprulesArg0 = { "asgname",iocshArgString};
static const iocshArg * const asprulesArgs[] = {&asprulesArg0};
static const iocshFuncDef asprulesFuncDef = {"asprules",1,asprulesArgs,
"List rules of an Access Security Group.\n"};
static const iocshFuncDef asprulesFuncDef = {
"asprules",1,asprulesArgs,
"List rules of an Access Security Group.\n"
"If no Group is specified then list the rules for all groups\n"
"Example: asprules mygroup\n"
};
static void asprulesCallFunc(const iocshArgBuf *args)
{
asprules(args[0].sval);
@@ -89,20 +101,28 @@ static void asprulesCallFunc(const iocshArgBuf *args)
static const iocshArg aspmemArg0 = { "asgname",iocshArgString};
static const iocshArg aspmemArg1 = { "clients",iocshArgInt};
static const iocshArg * const aspmemArgs[] = {&aspmemArg0,&aspmemArg1};
static const iocshFuncDef aspmemFuncDef = {"aspmem",2,aspmemArgs,
"List members of Access Security Group.\n"};
static const iocshFuncDef aspmemFuncDef = {
"aspmem",2,aspmemArgs,
"List members of Access Security Group.\n"
"If no Group is specified then print the members for all Groups.\n"
"If clients is (0, 1) then Channel Access clients attached to each member\n"
"(are not, are) shown\n"
"Example: aspmem mygroup 1\n",
};
static void aspmemCallFunc(const iocshArgBuf *args)
{
aspmem(args[0].sval,args[1].ival);
}
/* astac */
static const iocshArg astacArg0 = { "recordname",iocshArgString};
static const iocshArg astacArg0 = { "recordname",iocshArgStringRecord};
static const iocshArg astacArg1 = { "user",iocshArgString};
static const iocshArg astacArg2 = { "host",iocshArgString};
static const iocshArg * const astacArgs[] = {&astacArg0,&astacArg1,&astacArg2};
static const iocshFuncDef astacFuncDef = {"astac",3,astacArgs,
"Test Access Security privlages granted to user+host.\n"};
static const iocshFuncDef astacFuncDef = {
"astac",3,astacArgs,
"Show what read/write permissions the user:host would have when\n"
"accessing a certain PV.\n"};
static void astacCallFunc(const iocshArgBuf *args)
{
astac(args[0].sval,args[1].sval,args[2].sval);
@@ -111,8 +131,14 @@ static void astacCallFunc(const iocshArgBuf *args)
/* ascar */
static const iocshArg ascarArg0 = { "level",iocshArgInt};
static const iocshArg * const ascarArgs[] = {&ascarArg0};
static const iocshFuncDef ascarFuncDef = {"ascar",1,ascarArgs,
"Report status of PVs used in INP*() Access Security rules.\n"};
static const iocshFuncDef ascarFuncDef = {
"ascar",1,ascarArgs,
"Report status of PVs used in INP*() Access Security rules.\n"
"Level 0 - Summary report\n"
" 1 - Summary report plus details on unconnected channels\n"
" 2 - Summary report plus detail report on each channel\n"
"Example: ascar 1\n"
};
static void ascarCallFunc(const iocshArgBuf *args)
{
ascar(args[0].ival);

View File

@@ -20,7 +20,7 @@ BPT_DBD += bptTypeJdegF.dbd
BPT_DBD += bptTypeKdegC.dbd
BPT_DBD += bptTypeKdegF.dbd
ifneq (inc,$(strip $(MAKECMDGOALS)))
ifneq ($(filter-out inc,$(strip $(MAKECMDGOALS))),)
DBD += $(BPT_DBD)
endif
@@ -28,5 +28,5 @@ PROD_HOST += makeBpt
makeBpt_SRCS = makeBpt
DOCS += menuConvert.md
HTMLS += menuConvert.html

View File

@@ -21,6 +21,7 @@
#include <ctype.h>
#include "dbDefs.h"
#include "errlog.h"
#include "ellLib.h"
#include "cvtTable.h"
@@ -125,12 +126,12 @@ int main(int argc, char **argv)
}
inFile = fopen(argv[1],"r");
if(!inFile) {
fprintf(stderr,"Error opening %s\n",argv[1]);
fprintf(stderr,ERL_ERROR " opening %s\n",argv[1]);
exit(-1);
}
outFile = fopen(outFilename,"w");
if(!outFile) {
fprintf(stderr,"Error opening %s\n",outFilename);
fprintf(stderr,ERL_ERROR " opening %s\n",outFilename);
exit(-1);
}
while(fgets(inbuf,MAX_LINE_SIZE,inFile)) {
@@ -223,6 +224,8 @@ got_header:
fprintf(outFile,"}\n");
fclose(inFile);
fclose(outFile);
free(outFilename);
free(pname);
return(0);
}

View File

@@ -61,6 +61,12 @@ DBDINC += menuScan
DBDINC += dbCommon
dbMenusPod = $(notdir $(wildcard ../db/menu*.dbd.pod))
DOCS += $(patsubst %.dbd.pod,%.md,$(dbMenusPod))
DOCS += dbCommonRecord.md
DOCS += dbCommonInput.md
DOCS += dbCommonOutput.md
HTMLS += $(patsubst %.dbd.pod,%.html,$(dbMenusPod))
HTMLS += dbCommonRecord.html
HTMLS += dbCommonInput.html

View File

@@ -13,13 +13,15 @@
THESE_RULES := $(IOCDIR)/db/RULES
dbCommon.h$(DEP): $(COMMON_DIR)/dbCommonRecord.dbd $(THESE_RULES)
dbCommon.h$(DEP): $(COMMON_DIR)/dbCommonRecord.dbd $(THESE_RULES) \
$(DBDTORECTYPEH_dep)
@$(RM) $@
@$(DBTORECORDTYPEH) -D -I ../db -I $(COMMON_DIR) -o $(COMMONDEP_TARGET) $< > $@
$(COMMON_DIR)/dbCommonRecord.html: ../db/dbCommon.dbd.pod
$(COMMON_DIR)/dbCommon.h: $(COMMON_DIR)/dbCommonRecord.dbd $(THESE_RULES)
$(COMMON_DIR)/dbCommon.h: $(COMMON_DIR)/dbCommonRecord.dbd $(THESE_RULES) \
$(DBDTORECTYPEH_dep)
@$(RM) $(notdir $@)
$(DBTORECORDTYPEH) -I ../db -I $(COMMON_DIR) -o $(notdir $@) $<
@$(MV) $(notdir $@) $@

View File

@@ -58,6 +58,7 @@ typedef struct cbQueueSet {
int shutdown; // use atomic
int threadsConfigured;
int threadsRunning;
epicsThreadId *threads;
} cbQueueSet;
static cbQueueSet callbackQueue[NUM_CALLBACK_PRIORITIES];
@@ -242,11 +243,15 @@ void callbackStop(void)
for (i = 0; i < NUM_CALLBACK_PRIORITIES; i++) {
cbQueueSet *mySet = &callbackQueue[i];
int j;
while (epicsAtomicGetIntT(&mySet->threadsRunning)) {
epicsEventSignal(mySet->semWakeUp);
epicsEventWaitWithTimeout(startStopEvent, 0.1);
}
for(j=0; j<mySet->threadsConfigured; j++) {
epicsThreadMustJoin(mySet->threads[j]);
}
}
}
@@ -266,6 +271,8 @@ void callbackCleanup(void)
mySet->semWakeUp = NULL;
epicsRingPointerDelete(mySet->queue);
mySet->queue = NULL;
free(mySet->threads);
mySet->threads = NULL;
}
epicsTimerQueueRelease(timerQueue);
@@ -297,17 +304,25 @@ void callbackInit(void)
cantProceed("epicsRingPointerLockedCreate failed for %s\n",
threadNamePrefix[i]);
callbackQueue[i].queueOverflow = FALSE;
if (callbackQueue[i].threadsConfigured == 0)
callbackQueue[i].threadsConfigured = callbackThreadsDefault;
callbackQueue[i].threads = callocMustSucceed(callbackQueue[i].threadsConfigured,
sizeof(*callbackQueue[i].threads),
"callbackInit");
for (j = 0; j < callbackQueue[i].threadsConfigured; j++) {
epicsThreadOpts opts = EPICS_THREAD_OPTS_INIT;
opts.joinable = 1;
opts.priority = threadPriority[i];
opts.stackSize = epicsThreadStackBig;
if (callbackQueue[i].threadsConfigured > 1 )
sprintf(threadName, "%s-%d", threadNamePrefix[i], j);
else
strcpy(threadName, threadNamePrefix[i]);
tid = epicsThreadCreate(threadName, threadPriority[i],
epicsThreadGetStackSize(epicsThreadStackBig),
(EPICSTHREADFUNC)callbackTask, &priorityValue[i]);
callbackQueue[i].threads[j] = tid = epicsThreadCreateOpt(threadName,
(EPICSTHREADFUNC)callbackTask, &priorityValue[i], &opts);
if (tid == 0) {
cantProceed("Failed to spawn callback thread %s\n", threadName);
} else {
@@ -329,6 +344,10 @@ int callbackRequest(epicsCallback *pcallback)
epicsInterruptContextMessage("callbackRequest: " ERL_ERROR " pcallback was NULL\n");
return S_db_notInit;
}
if (!pcallback->callback) {
epicsInterruptContextMessage("callbackRequest: " ERL_ERROR " pcallback->callback was NULL\n");
return S_db_notInit;
}
priority = pcallback->priority;
if (priority < 0 || priority >= NUM_CALLBACK_PRIORITIES) {
epicsInterruptContextMessage("callbackRequest: " ERL_ERROR " Bad priority\n");

View File

@@ -73,7 +73,7 @@ epicsExportAddress(int, dbAccessDebugPUTF);
DB_LOAD_RECORDS_HOOK_ROUTINE dbLoadRecordsHook = NULL;
static short mapDBFToDBR[DBF_NTYPES] = {
static const short mapDBFToDBR[DBF_NTYPES] = {
/* DBF_STRING => */ DBR_STRING,
/* DBF_CHAR => */ DBR_CHAR,
/* DBF_UCHAR => */ DBR_UCHAR,
@@ -112,7 +112,7 @@ void dbSpcAsRegisterCallback(SPC_ASCALLBACK func)
long dbPutSpecial(DBADDR *paddr,int pass)
{
long int (*pspecial)()=NULL;
long int (*pspecial)(struct dbAddr *, int)=NULL;
rset *prset;
dbCommon *precord = paddr->precord;
long status=0;
@@ -145,63 +145,66 @@ long dbPutSpecial(DBADDR *paddr,int pass)
}
static void get_enum_strs(DBADDR *paddr, char **ppbuffer,
rset *prset,long *options)
rset *prset, long *options)
{
short field_type=paddr->field_type;
dbFldDes *pdbFldDes = paddr->pfldDes;
dbMenu *pdbMenu;
dbDeviceMenu *pdbDeviceMenu;
char **papChoice;
unsigned long no_str;
char *ptemp;
struct dbr_enumStrs *pdbr_enumStrs=(struct dbr_enumStrs*)(*ppbuffer);
unsigned int i;
struct dbr_enumStrs *penum=(struct dbr_enumStrs*)(*ppbuffer);
/* advance output buffer on success or failure for next option */
*ppbuffer = dbr_enumStrs_size + (char*)penum;
memset(pdbr_enumStrs,'\0',dbr_enumStrs_size);
switch(field_type) {
case DBF_ENUM:
if( prset && prset->get_enum_strs ) {
(*prset->get_enum_strs)(paddr,pdbr_enumStrs);
} else {
*options = (*options)^DBR_ENUM_STRS;/*Turn off option*/
}
break;
case DBF_MENU:
pdbMenu = (dbMenu *)pdbFldDes->ftPvt;
no_str = pdbMenu->nChoice;
papChoice= pdbMenu->papChoiceValue;
goto choice_common;
case DBF_DEVICE:
pdbDeviceMenu = (dbDeviceMenu *)pdbFldDes->ftPvt;
if(!pdbDeviceMenu) {
*options = (*options)^DBR_ENUM_STRS;/*Turn off option*/
break;
}
no_str = pdbDeviceMenu->nChoice;
papChoice = pdbDeviceMenu->papChoice;
goto choice_common;
choice_common:
i = sizeof(pdbr_enumStrs->strs)/
sizeof(pdbr_enumStrs->strs[0]);
if(i<no_str) no_str = i;
pdbr_enumStrs->no_str = no_str;
ptemp = &(pdbr_enumStrs->strs[0][0]);
for (i=0; i<no_str; i++) {
if(papChoice[i]==NULL) *ptemp=0;
else {
strncpy(ptemp,papChoice[i],
sizeof(pdbr_enumStrs->strs[0]));
*(ptemp+sizeof(pdbr_enumStrs->strs[0])-1) = 0;
}
ptemp += sizeof(pdbr_enumStrs->strs[0]);
}
break;
default:
*options = (*options)^DBR_ENUM_STRS;/*Turn off option*/
break;
memset(penum, 0, dbr_enumStrs_size);
/* from this point
* on success, return early
* on failure, jump or fall through to clear *options bit.
*/
if(paddr->field_type == DBF_ENUM) {
if( prset && prset->get_enum_strs ) {
(*prset->get_enum_strs)(paddr,penum);
return;
}
} else if(paddr->field_type == DBF_MENU || paddr->field_type == DBF_DEVICE) {
char **ppchoices;
epicsUInt32 i, nchoices = 0;
if(paddr->field_type == DBF_MENU) {
dbMenu *pmenu = paddr->pfldDes->ftPvt;
nchoices = pmenu->nChoice;
ppchoices= pmenu->papChoiceValue;
} else if(paddr->field_type == DBF_DEVICE) {
dbDeviceMenu *pdevs = paddr->pfldDes->ftPvt;
if(!pdevs)
goto nostrs;
nchoices = pdevs->nChoice;
ppchoices = pdevs->papChoice;
}
if(nchoices > NELEMENTS(penum->strs))
nchoices = NELEMENTS(penum->strs); /* availible > capacity, truncated list */
penum->no_str = nchoices;
for(i=0; i<nchoices; i++) {
if(ppchoices[i]) {
strncpy(penum->strs[i], ppchoices[i],
sizeof(penum->strs[i]));
/* strs[i][] allowed to omit trailing nil */
} else {
penum->strs[i][0] = '\0';
}
}
*ppbuffer = ((char *)*ppbuffer) + dbr_enumStrs_size;
return;
} else {
/* other DBF_* fall through to error */
}
nostrs:
/* indicate option data not available. distinct from no_str==0 */
*options = (*options)^DBR_ENUM_STRS;
}
static void get_graphics(DBADDR *paddr, char **ppbuffer,
@@ -798,18 +801,13 @@ int dbLoadRecords(const char* file, const char* subs)
return -1;
}
status = dbReadDatabase(&pdbbase, file, 0, subs);
switch(status)
{
case 0:
if(status==0) {
if(dbLoadRecordsHook)
dbLoadRecordsHook(file, subs);
break;
case -2:
errlogPrintf("dbLoadRecords: failed to load '%s'\n"
" Records cannot be loaded after iocInit!\n", file);
break;
default:
errlogPrintf("dbLoadRecords: failed to load '%s'\n", file);
} else {
fprintf(stderr, ERL_ERROR " failed to load '%s'\n", file);
if(status==-2)
fprintf(stderr, " Records cannot be loaded after iocInit!\n");
}
return status;
}
@@ -1327,6 +1325,7 @@ long dbPut(DBADDR *paddr, short dbrType,
long status = 0;
dbFldDes *pfldDes;
int isValueField;
int propertyUpdate = paddr->pfldDes->prop && precord->mlis.count;
if (special == SPC_ATTRIBUTE)
return S_db_noMod;
@@ -1371,12 +1370,31 @@ long dbPut(DBADDR *paddr, short dbrType,
if (nRequest < 1) {
recGblSetSevr(precord, LINK_ALARM, INVALID_ALARM);
} else {
status = dbFastPutConvertRoutine[dbrType][field_type](pbuffer,
paddr->pfield, paddr);
if (propertyUpdate && paddr->field_size <= MAX_STRING_SIZE) {
char propBuffer[MAX_STRING_SIZE];
status = dbFastPutConvertRoutine[dbrType][field_type](pbuffer,
&propBuffer, paddr);
if (!status) {
if (memcmp(paddr->pfield, &propBuffer, paddr->field_size) != 0) {
memcpy(paddr->pfield, &propBuffer, paddr->field_size);
} else {
/* suppress DBE_PROPERTY event if property did not change */
propertyUpdate = 0;
}
}
} else {
status = dbFastPutConvertRoutine[dbrType][field_type](pbuffer,
paddr->pfield, paddr);
}
nRequest = 1;
}
}
/* Post property updates before second dbPutSpecial */
/* which may post DBE_VALUE and/or DBE_LOG events */
if (propertyUpdate && !status)
db_post_events(precord, NULL, DBE_PROPERTY);
/* Always do special processing if needed */
if (special) {
long status2 = dbPutSpecial(paddr, 1);
@@ -1393,12 +1411,6 @@ long dbPut(DBADDR *paddr, short dbrType,
if (precord->mlis.count &&
!(isValueField && pfldDes->process_passive))
db_post_events(precord, pfieldsave, DBE_VALUE | DBE_LOG);
/* If this field is a property (metadata) field,
* then post a property change event (even if the field
* didn't change).
*/
if (precord->mlis.count && pfldDes->prop)
db_post_events(precord, NULL, DBE_PROPERTY);
done:
paddr->pfield = pfieldsave;
return status;

View File

@@ -220,6 +220,8 @@ DBCORE_API long dbNameToAddr(const char *pname, struct dbAddr *paddr);
/** Initialize DBADDR from a dbEntry
* Also handles SPC_DBADDR processing. This is really an internal
* routine for use by dbNameToAddr() and dbChannelCreate().
*
* \since 7.0.2.1
*/
DBCORE_API long dbEntryToAddr(const struct dbEntry *pdbentry,
struct dbAddr *paddr);
@@ -227,6 +229,8 @@ DBCORE_API long dbEntryToAddr(const struct dbEntry *pdbentry,
/** Initialize DBENTRY from a valid dbAddr*
* Constant time equivalent of dbInitEntry() then dbFindRecord(),
* and finally dbFollowAlias().
*
* \since 3.16.1
*/
DBCORE_API void dbInitEntryFromAddr(struct dbAddr *paddr,
struct dbEntry *pdbentry);
@@ -234,6 +238,8 @@ DBCORE_API void dbInitEntryFromAddr(struct dbAddr *paddr,
/** Initialize DBENTRY from a valid record (dbCommon*)
* Constant time equivalent of dbInitEntry() then dbFindRecord(),
* and finally dbFollowAlias() when no field is specified.
*
* \since 3.16.1
*/
DBCORE_API void dbInitEntryFromRecord(struct dbCommon *prec,
struct dbEntry *pdbentry);

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