Merge branch '7.0' into PSI-7.0

This commit is contained in:
zimoch committed 2026-09-28 09:39:12 +02:00
commit 15ba5ed863
169 files changed
+1183 -898

No files matched your search

+6
View File
@@ -10,3 +10,9 @@ insert_final_newline = true
# Part of readline test that needs file without final newline
[modules/libcom/test/multiline-input.txt]
insert_final_newline = false
# Enforce consistent space indent style in source code
# and remove all trailing spaces
[*.{c,cc,cpp,h,hpp,pl,py,yml}]
indent_style = space
trim_trailing_whitespace = true
+3 -3
View File
@@ -178,8 +178,7 @@ jobs:
- name: "Win-22 MSC-22"
os: windows-2022
cmp: vs2022
configuration: debug
extra: "CMD_CXXFLAGS=-analyze"
configuration: default
- name: "Win-22 MSC-22, static"
os: windows-2022
@@ -191,6 +190,7 @@ jobs:
os: windows-2022
cmp: vs2022
configuration: debug
extra: "CMD_CXXFLAGS=-analyze"
- name: "Win-22 MSC-22 c++14, debug"
os: windows-2022
@@ -319,7 +319,7 @@ jobs:
- uses: actions/checkout@v4
with:
submodules: true
- name: Run...
run: |
env > env.list
+2 -2
View File
@@ -44,7 +44,7 @@ jobs:
sudo apt-get install --yes libreadline-dev
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
uses: github/codeql-action/init@v4
with:
languages: ${{ matrix.language }}
config-file: ./.github/codeql/config.yml
@@ -59,6 +59,6 @@ jobs:
make -sj2 || echo '*** Ignoring build failure for CodeQL ***'
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
uses: github/codeql-action/analyze@v4
with:
category: "/language:${{ matrix.language }}"
+41
View File
@@ -0,0 +1,41 @@
# Contribution Guidelines
For bug fixes, please create new pull requests against the default (7.0)
branch. If the bug only affects a specific older release branch, target that
branch instead.
For new features, please open an issue or discuss the idea on mailing lists
or in Matrix beforehand.
## Maintaining Compatibility
Build and test your changes on as many systems as possible.
Important operating systems are Linux, Windows, macOS, vxWorks and RTEMS.
## Testing
All new features must come with automated tests to verify their correctness.
This also helps to find out if future changes break existing features.
EPICS Base comes with a testing framework which allows you to run IOCs,
set and read/compare values and more.
See any of the existing tests within the repository for guidance on test
structure and dependencies.
Add your tests to the appropriate test directory and ensure they are
included in the test Makefile.
Your test should run (and succeed) when you execute:
```bash
make runtests
```
CI will run these tests automatically. All checks must pass before a
pull request can be merged.
## Review Process
The core developer team will review your changes, suggest changes, highlight
issues or merge your code into EPICS Base.
+5 -1
View File
@@ -54,9 +54,13 @@ Run the `dbl` command to list the records it provides:
epics> dbl
first:BaseVersion
first:exit
epics>
epics>
```
## Contributing
See [CONTRIBUTING.md](./CONTRIBUTING.md).
## License
EPICS Base is distributed subject to a Software License
+4 -1
View File
@@ -337,7 +337,10 @@ COMPILE.cpp = $(CCC) $(CPPFLAGS) $(CXXFLAGS) $(INCLUDES)
#--------------------------------------------------
# C preprocessor command
PREPROCESS.cpp = $(CPP) $(CPPFLAGS) $(INCLUDES) $< > $@
define PREPROCESS.cpp
$(CPP) $(CPPFLAGS) $(INCLUDES) $< > $@.stdout
$(MV) $@.stdout $@
endef
#--------------------------------------------------
# genVersion header defaults
+43 -25
View File
@@ -124,7 +124,10 @@ ACF_CPPFLAGS = $(ACF_CPPFLAGS_$(GNU))
ACF_INCLUDES = -I. $(TARGET_INCLUDES) $(USR_INCLUDES)\
$(SRC_INCLUDES) -I$(INSTALL_DB)
ACFDEPENDS_CMD = $(MKMF) -m $@ $(ACF_INCLUDES) $(COMMONDEP_TARGET) $<
ACF_CMD = $(CPP) $(ACF_CPPFLAGS) $(ACF_INCLUDES) $< > $@
define ACF_CMD
$(CPP) $(ACF_CPPFLAGS) $(ACF_INCLUDES) $< > $@.stdout
$(MV) $@.stdout $@
endef
#---------------------------------------------------------------
# dependencies
@@ -219,68 +222,82 @@ realclean: clean
%Record.h$(DEP): $(COMMON_DIR)/%Record.dbd $(DBDTORECTYPEH_dep)
@$(RM) $@
@$(DBTORECORDTYPEH) -D $(DBDFLAGS) -o $(COMMONDEP_TARGET) $< > $@
@echo "$(COMMONDEP_TARGET): ../Makefile" >> $@
@$(DBTORECORDTYPEH) -D $(DBDFLAGS) -o $(COMMONDEP_TARGET) $< > $@.stdout
@echo "$(COMMONDEP_TARGET): ../Makefile" >> $@.stdout
@$(MV) $@.stdout $@
%Record.h$(DEP): %Record.dbd $(DBDTORECTYPEH_dep)
@$(RM) $@
@$(DBTORECORDTYPEH) -D $(DBDFLAGS) -o $(COMMONDEP_TARGET) $< > $@
@echo "$(COMMONDEP_TARGET): ../Makefile" >> $@
@$(DBTORECORDTYPEH) -D $(DBDFLAGS) -o $(COMMONDEP_TARGET) $< > $@.stdout
@echo "$(COMMONDEP_TARGET): ../Makefile" >> $@.stdout
@$(MV) $@.stdout $@
%Record.h$(DEP): ../%Record.dbd $(DBDTORECTYPEH_dep)
@$(RM) $@
@$(DBTORECORDTYPEH) -D $(DBDFLAGS) -o $(COMMONDEP_TARGET) $< > $@
@echo "$(COMMONDEP_TARGET): ../Makefile" >> $@
@$(DBTORECORDTYPEH) -D $(DBDFLAGS) -o $(COMMONDEP_TARGET) $< > $@.stdout
@echo "$(COMMONDEP_TARGET): ../Makefile" >> $@.stdout
@$(MV) $@.stdout $@
menu%.h$(DEP): $(COMMON_DIR)/menu%.dbd $(DBDTOMENUH_dep)
@$(RM) $@
@$(DBTOMENUH) -D $(DBDFLAGS) -o $(COMMONDEP_TARGET) $< > $@
@echo "$(COMMONDEP_TARGET): ../Makefile" >> $@
@$(DBTOMENUH) -D $(DBDFLAGS) -o $(COMMONDEP_TARGET) $< > $@.stdout
@echo "$(COMMONDEP_TARGET): ../Makefile" >> $@.stdout
@$(MV) $@.stdout $@
menu%.h$(DEP): menu%.dbd $(DBDTOMENUH_dep)
@$(RM) $@
@$(DBTOMENUH) -D $(DBDFLAGS) -o $(COMMONDEP_TARGET) $< > $@
@echo "$(COMMONDEP_TARGET): ../Makefile" >> $@
@$(DBTOMENUH) -D $(DBDFLAGS) -o $(COMMONDEP_TARGET) $< > $@.stdout
@echo "$(COMMONDEP_TARGET): ../Makefile" >> $@.stdout
@$(MV) $@.stdout $@
menu%.h$(DEP): ../menu%.dbd $(DBDTOMENUH_dep)
@$(RM) $@
@$(DBTOMENUH) -D $(DBDFLAGS) -o $(COMMONDEP_TARGET) $< > $@
@echo "$(COMMONDEP_TARGET): ../Makefile" >> $@
@$(DBTOMENUH) -D $(DBDFLAGS) -o $(COMMONDEP_TARGET) $< > $@.stdout
@echo "$(COMMONDEP_TARGET): ../Makefile" >> $@.stdout
@$(MV) $@.stdout $@
%.dbd$(DEP): %.dbd.pod
@$(RM) $@
@echo "$(COMMONDEP_TARGET): ../Makefile" > $@
@echo "$(COMMONDEP_TARGET): ../Makefile" > $@.stdout
@$(MV) $@.stdout $@
%.dbd$(DEP): %Include.dbd
@$(RM) $@
@$(DBEXPAND) -D $(DBDFLAGS) -o $(COMMONDEP_TARGET) $< > $@
@echo "$(COMMONDEP_TARGET): ../Makefile" >> $@
@$(DBEXPAND) -D $(DBDFLAGS) -o $(COMMONDEP_TARGET) $< > $@.stdout
@echo "$(COMMONDEP_TARGET): ../Makefile" >> $@.stdout
@$(MV) $@.stdout $@
%.dbd$(DEP): ../%Include.dbd
@$(RM) $@
@$(DBEXPAND) -D $(DBDFLAGS) -o $(COMMONDEP_TARGET) $< > $@
@echo "$(COMMONDEP_TARGET): ../Makefile" >> $@
@$(DBEXPAND) -D $(DBDFLAGS) -o $(COMMONDEP_TARGET) $< > $@.stdout
@echo "$(COMMONDEP_TARGET): ../Makefile" >> $@.stdout
@$(MV) $@.stdout $@
%.dbd$(DEP): $($*_DBD)
@$(RM) $@
@$(DBEXPAND) -D $(DBDFLAGS) -o $(COMMONDEP_TARGET) $($*_DBD) > $@
@echo "$(COMMONDEP_TARGET): ../Makefile" >> $@
@$(DBEXPAND) -D $(DBDFLAGS) -o $(COMMONDEP_TARGET) $($*_DBD) > $@.stdout
@echo "$(COMMONDEP_TARGET): ../Makefile" >> $@.stdout
@$(MV) $@.stdout $@
%.db$(DEP): %$(SUBST_SUFFIX)
@$(RM) $@
$(MSI3_15) -D $(DBFLAGS) -o $(COMMONDEP_TARGET) -S$< $(TEMPLATE_FILENAME) > $@
$(MSI3_15) -D $(DBFLAGS) -o $(COMMONDEP_TARGET) -S$< $(TEMPLATE_FILENAME) > $@.stdout
@$(MV) $@.stdout $@
%.db$(DEP): ../%$(SUBST_SUFFIX)
@$(RM) $@
$(MSI3_15) -D $(DBFLAGS) -o $(COMMONDEP_TARGET) -S$< $(TEMPLATE_FILENAME) > $@
$(MSI3_15) -D $(DBFLAGS) -o $(COMMONDEP_TARGET) -S$< $(TEMPLATE_FILENAME) > $@.stdout
@$(MV) $@.stdout $@
%.db$(DEP): %$(TEMPL_SUFFIX)
@$(RM) $@
$(MSI3_15) -D $(DBFLAGS) -o $(COMMONDEP_TARGET) $< > $@
$(MSI3_15) -D $(DBFLAGS) -o $(COMMONDEP_TARGET) $< > $@.stdout
@$(MV) $@.stdout $@
%.db$(DEP): ../%$(TEMPL_SUFFIX)
@$(RM) $@
$(MSI3_15) -D $(DBFLAGS) -o $(COMMONDEP_TARGET) $< > $@
$(MSI3_15) -D $(DBFLAGS) -o $(COMMONDEP_TARGET) $< > $@.stdout
@$(MV) $@.stdout $@
%.acf$(DEP): %.acs
@$(RM) $@
@@ -483,8 +500,9 @@ $(COMMON_DIR)/%.html: ../%.pl $(PODTOHTML_dep)
$(COMMON_DIR)/%.db: $(COMMON_DIR)/%.edf
$(E2DB) $(E2DB_SYSFLAGS) $(E2DB_FLAGS) -n $*.VAR $<
@$(REPLACEVAR) < $*.VAR > $@
@$(REPLACEVAR) < $*.VAR > $@.stdout
@$(RM) $*.VAR
@$(MV) $@.stdout $@
$(COMMON_DIR)/%.db: %$(SUBST_SUFFIX)
$(ECHO) "Inflating database from $< $(TEMPLATE_FILENAME)"
+4 -3
View File
@@ -351,12 +351,13 @@ $(LOADABLE_SHRLIBNAME): $(LOADABLE_SHRLIB_PREFIX)%$(LOADABLE_SHRLIB_SUFFIX):
# C++ munching for VxWorks
%.nm: %$(EXE)
@$(RM) $@
$(NM) $< > $@
$(NM) $< > $@.stdout
$(MV) $@.stdout $@
%.nm: %$(OBJ)
@$(RM) $@
$(NM) $< > $@
$(NM) $< > $@.stdout
$(MV) $@.stdout $@
%_ctdt.c: %.nm $(TOOLS)/munch.pl
@$(RM) $@
+2 -1
View File
@@ -43,7 +43,8 @@ $(RELEASE_LOCAL): Makefile $(CONFIG)/CONFIG_SITE \
$(wildcard $(CONFIG)/CONFIG_SITE.local)
$(ECHO) "Creating $@ with"
$(ECHO) " $(PARENT_MODULE) = $(INSTALL_ABSOLUTE)"
@echo $(PARENT_MODULE) = $(INSTALL_ABSOLUTE)> $@
@echo "$(PARENT_MODULE) = $(INSTALL_ABSOLUTE)" > $@.stdout
@$(MV) $@.stdout $@
.PHONY: RELEASE.host
+4 -1
View File
@@ -164,7 +164,10 @@ COMPILE.ctdt = $(CC) -c $(CPPFLAGS) $(CFLAGS_ctdt) $(INCLUDES) $(SOURCE_FLAG)
#--------------------------------------------------
# C preprocessor command
VXCPPFLAGS = $(filter-out $(OP_SYS_INCLUDE_CPPFLAGS),$(CPPFLAGS))
PREPROCESS.cpp = $(CPP) $(VXCPPFLAGS) $(INCLUDES) $< > $@
define PREPROCESS.cpp
$(CPP) $(VXCPPFLAGS) $(INCLUDES) $< > $@.stdout
$(MV) $@.stdout $@
endef
#--------------------------------------------------
# Use LEDLIB for command-line editing
@@ -7,3 +7,5 @@
# arm64 devices: Apple Silicon M1
ARCH_CLASS = arm64
CODE_CFLAGS = -mmacosx-version-min=14.0
+74 -47
View File
@@ -21,107 +21,134 @@ RTD_SRC = $(COMMON_DIR)/rtd-src
DOCS += README.md
DOCS += ca-cli.md
DOCS += RELEASE_NOTES.md
DOCS += ReleaseChecklist.md
OLD_NOTES = $(wildcard ../RELEASE-*.md)
DOCS += $(OLD_NOTES:../%=%)
ifneq ($(EPICS_DEV_SNAPSHOT),)
# Between releases the release target is disabled
DOCS += RELEASE_NOTES.md
REASON = EPICS_DEV_SNAPSHOT not empty
NOTES_FILE = RELEASE-$(EPICS_SHORT_VERSION).md
# NOTES_PATH works in both source and build directories
ifdef T_A
NOTES_PATH = ../$(NOTES_FILE)
else
# Not a snapshot, user may be creating a new release
ifdef T_A
DOC = ../
endif
# Could we be in the middle of anything?
NOTES_FILE = RELEASE-$(EPICS_SHORT_VERSION).md
NOTES_PATH = $(DOC)$(NOTES_FILE)
NOTES_GIT := $(firstword $(shell git status --porcelain $(NOTES_PATH)))
ifeq ($(NOTES_GIT),A)
NOTES_PATH = $(NOTES_FILE)
endif
ifneq ($(EPICS_DEV_SNAPSHOT),)
# Between releases, our special release targets are disabled
REASON = EPICS_DEV_SNAPSHOT not empty
NOTES_PATH =
else
# Not a snapshot. User could be creating a new release,
# or this is a build of an already-tagged release.
# Are we in the process of releasing?
NOTES_STAT := $(and $(wildcard $(TOP)/.git), $(shell which git), \
$(firstword $(shell git status --porcelain $(NOTES_PATH))))
ifeq ($(NOTES_STAT),A)
# New file was added to the Git index; allow unrelease
else ifeq ($(NOTES_GIT),AD)
else ifeq ($(NOTES_STAT),AD)
# File was added to the Git index but deleted; allow unrelease
else ifeq ($(wildcard $(NOTES_PATH)),)
# No file yet, allow release
else
# File exists but isn't in Git
REASON := $(NOTES_FILE) exists but isn't in Git
NOTES_FILE =
# No file yet, "make release" creates it
else ifeq ($(NOTES_STAT),)
# File in repo, unchanged
REASON := file $(NOTES_FILE) exists
NOTES_PATH =
endif
endif
NEW_DIR = ../new-notes
NEW_NOTES = $(wildcard $(NEW_DIR)/*.md)
include $(TOP)/configure/RULES
help:
@echo "Makefile targets for documentation:"
@echo " all - install some files (default)"
@echo " help - Print this list of make targets"
@echo " release - Create RELEASE-<ver>.md, add to git"
@echo " unrelease - Undo 'make release'"
@echo " doxygen - Generate Doxygen HTML output"
@echo " rtd - Install files used by read-the-docs"
@echo " sphinx - Run Sphinx for all release docs"
ifndef T_A
# Delegate these targets to the O.$(T_A) build directory
release unrelease doxygen rtd sphinx: inc
$(MAKE) -C O.$(EPICS_HOST_ARCH) $@
else
# Special release target rules
MAKENOTES = ../make-notes.pl
NEW_DIR = ../new-notes
NEW_NOTES = $(wildcard $(NEW_DIR)/*.md)
MAKENOTES = ../make-notes.pl
ifneq ($(NOTES_PATH),)
$(NOTES_PATH): $(NEW_NOTES) $(MAKENOTES)
ifneq ($(NOTES_PATH),)
$(NOTES_PATH): $(NEW_NOTES) $(MAKENOTES)
@$(RM) $@
$(PERL) $(MAKENOTES) -o $@ -V $(EPICS_SHORT_VERSION) \
-d $(abspath $(NEW_DIR))
release-git: $(NOTES_PATH)
-d $(abspath $(NEW_DIR)) $(OLD_NOTES)
release-git: $(NOTES_PATH)
$(if $(NEW_NOTES), \
git rm -q $(NEW_NOTES))
git add $<
release: $(INSTALL_DOC)/RELEASE_NOTES.md $(INSTALL_DOC)/$(NOTES_FILE)
release: $(INSTALL_DOC)/RELEASE_NOTES.md $(INSTALL_DOC)/$(NOTES_FILE)
unrelease:
unrelease:
$(if $(wildcard $(NOTES_PATH)), \
git restore --staged $(NOTES_PATH); \
$(RM) $(NOTES_PATH))
git restore --staged $(NEW_DIR)
git restore $(NEW_DIR)
REL_DEP = release-git $(NOTES_PATH)
else
REL_DEV = -D
release unrelease:
REL_DEPS = release-git $(NOTES_PATH)
else
DEV_FLAG = -D
release unrelease:
$(error "make $@" not available, $(REASON))
endif
endif
$(COMMON_DIR)/RELEASE_NOTES.md: $(REL_DEP) $(NEW_NOTES) $(MAKENOTES)
# Rules to create RELEASE_NOTES.md
ifeq ($(wildcard ../$(NOTES_FILE)),)
# No RELEASE-<ver>.md file, add new-notes to RELEASE_NOTES.md
$(COMMON_DIR)/RELEASE_NOTES.md: $(REL_DEPS) $(NEW_NOTES) $(MAKENOTES)
@$(RM) $@
$(PERL) $(MAKENOTES) -o $@ -V $(EPICS_SHORT_VERSION) $(REL_DEV) \
$(PERL) $(MAKENOTES) -o $@ -V $(EPICS_SHORT_VERSION) $(DEV_FLAG) \
-d $(abspath $(NEW_DIR)) $(OLD_NOTES) $(NOTES_PATH)
else
# RELEASE-<ver>.md exists, we're building a tagged version
$(COMMON_DIR)/RELEASE_NOTES.md: ../$(NOTES_FILE)
@$(RM) $@
$(PERL) $(MAKENOTES) -o $@ -V $(EPICS_SHORT_VERSION) $(OLD_NOTES)
endif
$(HEADER_MD_FILES): %_h.md: ../HEADER_h.md
$(HEADER_MD_FILES): %_h.md: ../HEADER_h.md
$(EXPAND_TOOL) -t $(INSTALL_LOCATION) -DHEADER=$* $< $@
$(API_RST_FILES): %-api.rst: ../%-API.rst
$(API_RST_FILES): %-api.rst: ../%-API.rst
@$(RM) $@
@$(ECHO) Creating $@
@$(CP) $< $@
@$(foreach h, $($*_HEADERS), \
echo " $h_h.rst" >> $@;)
doxygen: Doxyfile
DOX = doxygen
doxygen: Doxyfile
@$(MKDIR) $(RTD_SRC)
$(DOXYGEN)
DOX = doxygen
# Use "make sphinx DOX=" to skip running doxygen
rtd: $(DOX) $(API_RST_FILES) $(HEADER_MD_FILES)
# Use "make sphinx DOX=" to skip running doxygen
RTD = rtd
rtd: $(DOX) $(API_RST_FILES) $(HEADER_MD_FILES)
rsync -av --exclude=RELEASE-*.md $(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)/
RTD = rtd
# Use "make sphinx RTD=" to skip earlier steps
sphinx: $(RTD)
# Use "make sphinx RTD=" to skip earlier steps
sphinx: $(RTD)
cd $(COMMON_DIR); $(PYTHON) -m sphinx rtd-src readthedocs
rsync -av $(COMMON_DIR)/readthedocs $(INSTALL_HTML)/
endif
.PHONY: release release-git unrelease doxygen rtd sphinx
.PHONY: release help release-git unrelease doxygen rtd sphinx
.NOTPARALLEL: release unrelease doxygen rtd sphinx
+4 -1
View File
@@ -13,7 +13,9 @@ libcom_HEADERS += bucketLib
libcom_HEADERS += cantProceed
libcom_HEADERS += compilerDependencies
libcom_HEADERS += cvtFast
libcom_HEADERS += dbDefs
libcom_HEADERS += dbmf
libcom_HEADERS += devLib
libcom_HEADERS += devLibVME
libcom_HEADERS += devLibVMEImpl
libcom_HEADERS += ellLib
@@ -66,17 +68,18 @@ ca_HEADERS += db_access
database_HEADERS += callback
database_HEADERS += chfPlugin
database_HEADERS += dbBase
database_HEADERS += dbChannel
database_HEADERS += dbCommon
database_HEADERS += dbDefs
database_HEADERS += dbEvent
database_HEADERS += dbExtractArray
database_HEADERS += dbLink
database_HEADERS += dbLock
database_HEADERS += dbServer
database_HEADERS += dbState
database_HEADERS += dbStaticLib
database_HEADERS += dbUnitTest
database_HEADERS += devLib
database_HEADERS += devSup
database_HEADERS += drvSup
database_HEADERS += initHooks
+1 -1
View File
@@ -424,7 +424,7 @@ Changes to this module since the previous release:
Changes to this module since the previous release:
## Release 4.8.1
#### Release 4.8.1
* Fix error message generation code.
-18
View File
@@ -28,7 +28,6 @@ author = "The EPICS Collaboration"
# ones.
extensions = [
"hoverxref.extension",
"breathe",
"sphinx.ext.mathjax",
"sphinx.ext.ifconfig",
@@ -62,23 +61,6 @@ 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:
+14 -8
View File
@@ -98,17 +98,23 @@ as before, but the entries describing changes in those submodules since version
7.0.5 have been copied into the associated EPICS Release Notes files; they will
also be manually added to new EPICS Release Notes published in the future.
## EPICS Release $REL_VERS
__REL_INTRO__
print $out <<"__NEW_INTRO__" if $opt_D && scalar @notes;
__This version of EPICS has not been released yet.__
__When the changes described below get released, the version number used may be
different to the one given above.__
print $out <<"__REL_VERS__" if $opt_d;
## EPICS Release $REL_VERS
The changes below have been merged into EPICS since the last published release.
__REL_VERS__
print $out <<"__NEW_VERS__" if $opt_D;
__This version of EPICS has not been released yet.__
__The version number used for the next release may be
different to the one shown above.__
__NEW_VERS__
print $out <<"__NEW_INTRO__" if scalar @notes;
The changes described below have been merged into EPICS
since the last published release.
__NEW_INTRO__
+11
View File
@@ -0,0 +1,11 @@
### Fix undefined timestamp for NORD field
When monitoring non-val fields such as `NORD` for several record types updates
are not sent out correctly resulting in incorrect timestamps. This fixes this
for the record types `aai`, `aao`, `subArray`.
Note that support modules that already implement this in the device support
layer will need to be updated to avoid doubled monitor updates. If those modules
are to be built against older versions of EPICS base then they will need to use
the defined macros `AAO_POSTS_NORD`, `AAI_POSTS_NORD`, `SA_POSTS_NORD`, or
`WF_POSTS_NORD` as appropriate to detect this change.
+8
View File
@@ -0,0 +1,8 @@
### iocInit wait for local CA links to connect
PR [768](https://github.com/epics-base/epics-base/pull/768)
During iocInit(), wait for local CA links to connect.
With this change, database authors can be certain that
any local CA link is connected prior to `initHookAfterIocRunning`
and `field(PINI, RUNNING)`.
+21
View File
@@ -0,0 +1,21 @@
### epicsThreadGetCPUs and callbackParallelThreads
On systems that support it (e.g. recent Linux systems), `epicsThreadGetCPUs()`
now takes the current cpu affinity mask of the calling thread into acount.
That fixes the problem that an IOC which was started with a limited affinity
mask (e.g. using `taskset`) and that called `callbackParallelThreads` with an
argument of 0 in the startup script, had started more parallel callback
threads than it has CPU cores available.
The iocsh function `callbackParallelThreads` now also accepts positive or
negative percentages for `count`, referring to the availabple number of cores
and always rounding the number of used cores down with a minimum of 1.
#### Examples
```text
# use up to 25% of available cpu cores for callback threads
callbackParallelThreads 25%
# keep at least 10% of available cpu cores unused for callback threads
callbackParallelThreads -10%
```
+19 -17
View File
@@ -7,23 +7,9 @@ Files here must be written in Markdown (see below) and have the extension
'.md' at the end of their filename.
This README.txt file is the only other file that should appear here.
Generating RELEASE_NOTES.md
---------------------------
Running 'make' inside the Base documentation directory now generates a
file RELEASE_NOTES.md and installs it into the top-level doc directory.
The file starts with a level-1 Markdown header and some introductory text.
If any new-notes files are present a level-2 header is added with a Release
version number and a -DEV suffix, followed by some notes explaining their
unreleased status. The new-notes filenames are lexically sorted and their
contents added in order, separated by an extra newline character.
Finally a series of myst Markdown directives are added which will include all
the older RELEASE-<version>.md files present in the documentation directory
into the published HTML version, sorted in version order with the newest first.
Do not add new notes by editing the RELEASE-<version>.md files in the Base
documentation directory or the O.Common/RELEASE_NOTES.md file that running
'make' generates.
Writing a Release Notes entry
-----------------------------
@@ -53,3 +39,19 @@ The file *must* start with a level-3 Markdown title for the entry, like this:
Release note entries are not intended to provide full documentation of major
features. For small features or changes though, they may provide all the
information needed to understand and use the feature.
Generating RELEASE_NOTES.md
---------------------------
Running 'make' inside the Base documentation directory now generates a
file RELEASE_NOTES.md and installs it into the top-level doc directory.
The file starts with a level-1 Markdown header and some introductory text.
If any new-notes files are present a level-2 header is added with a Release
version number and a -DEV suffix, followed by some notes explaining their
unreleased status. The new-notes filenames are lexically sorted and their
contents added in order, separated by an extra newline character.
Finally a series of myst Markdown directives are added which will include all
the older RELEASE-<version>.md files present in the documentation directory
into the published HTML version, sorted in version order with the newest first.
-1
View File
@@ -2,5 +2,4 @@ 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
+1 -1
View File
@@ -956,7 +956,7 @@ const unsigned short dbr_value_size[LAST_BUFFER_TYPE+1] = {
};
//extern "C"
const enum dbr_value_class dbr_value_class[LAST_BUFFER_TYPE+1] = {
const enum dbr_value_class_e dbr_value_class[LAST_BUFFER_TYPE+1] = {
dbr_class_string, /* string max size */
dbr_class_int, /* short */
dbr_class_float, /* IEEE Float */
+1 -1
View File
@@ -129,7 +129,7 @@ unsigned cacChannel::getHostName (
return 0u;
}
unsigned cacChannel::getHostMinorProtocol (
unsigned cacChannel::getHostMinorProtocol (
epicsGuard < epicsMutex > &) const throw ()
{
epicsThreadOnce ( & cacChannelIdOnce, cacChannelSetup, 0);
+8 -8
View File
@@ -272,13 +272,13 @@ LIBCA_API unsigned epicsStdCall ca_write_access (chid chan);
*/
enum channel_state {
/// valid chid, IOC not found or unavailable
cs_never_conn,
cs_never_conn,
/// valid chid, IOC was found, but unavailable (previously connected to server)
cs_prev_conn,
cs_prev_conn,
/// valid chid, IOC was found, still available
cs_conn,
cs_conn,
/// channel deleted by user
cs_closed
cs_closed
};
/** \brief Returns an enumerated type indicating the current state of the specified IO channel.
@@ -352,7 +352,7 @@ enum ca_preemptive_callback_select
*
* \sa ca_context_destroy()
*/
LIBCA_API int epicsStdCall
LIBCA_API int epicsStdCall
ca_context_create (enum ca_preemptive_callback_select select);
/** \brief Detach from any CA context currently attached to the calling thread.
@@ -1433,7 +1433,7 @@ LIBCA_API void epicsStdCall ca_signal_with_file_and_lineno
* pFormat R printf dtyle format string (and optional arguments)
*
*/
LIBCA_API void epicsStdCall ca_signal_formated (long ca_status, const char *pfilenm,
LIBCA_API void epicsStdCall ca_signal_formated (long ca_status, const char *pfilenm,
int lineno, const char *pFormat, ...);
/** \brief Return a character string which contains the name of the host
@@ -1457,11 +1457,11 @@ LIBCA_API const char * epicsStdCall ca_host_name (chid channel);
* \param[out] bufLength The size of the pBuf buffer.
* \returns The effective size of the written host name.
*/
LIBCA_API unsigned epicsStdCall ca_get_host_name ( chid pChan,
LIBCA_API unsigned epicsStdCall ca_get_host_name ( chid pChan,
char *pBuf, unsigned bufLength );
/** \brief Return the minor protocol version number used by the host to
* which a channel is currently connected.
* which a channel is currently connected.
*
* \param[in] pChan channel identifier
* \returns The minor protocol version number.
+2 -2
View File
@@ -554,13 +554,13 @@ LIBCA_API extern const unsigned short dbr_value_size[];
#ifndef db_accessHFORdb_accessC
/* class for each type's value */
enum dbr_value_class {
enum dbr_value_class_e {
dbr_class_int,
dbr_class_float,
dbr_class_string,
dbr_class_max};
LIBCA_API extern const enum dbr_value_class dbr_value_class[LAST_BUFFER_TYPE+1];
LIBCA_API extern const enum dbr_value_class_e dbr_value_class[LAST_BUFFER_TYPE+1];
/*
* ptr to value given a pointer to the structure and the DBR type
+2 -2
View File
@@ -103,7 +103,7 @@ extern "C" int epicsStdCall addAddrToChannelAccessAddressList
/*
* removeDuplicateAddresses ()
*/
extern "C" void epicsStdCall removeDuplicateAddresses
extern "C" void epicsStdCall removeDuplicateAddresses
( ELLLIST *pDestList, ELLLIST *pSrcList, int silent )
{
ELLNODE *pRawNode;
@@ -163,7 +163,7 @@ static void forcePort ( ELLLIST *pList, unsigned short port )
/*
* configureChannelAccessAddressList ()
*/
extern "C" void epicsStdCall configureChannelAccessAddressList
extern "C" void epicsStdCall configureChannelAccessAddressList
( ELLLIST *pList, SOCKET sock, unsigned short port )
{
ELLLIST tmpList;
+1 -1
View File
@@ -116,7 +116,7 @@ const char * netiiu::pHostName (
return pHostNameNetIIU;
}
unsigned netiiu::getHostMinorProtocol (
unsigned netiiu::getHostMinorProtocol (
epicsGuard < epicsMutex > & ) const throw ()
{
return CA_UKN_MINOR_VERSION;
+1 -1
View File
@@ -43,7 +43,7 @@ public:
unsigned bufLength ) const throw () = 0;
virtual const char * pHostName (
epicsGuard < epicsMutex > & ) const throw () = 0;
virtual unsigned getHostMinorProtocol (
virtual unsigned getHostMinorProtocol (
epicsGuard < epicsMutex > & ) const throw ();
virtual bool ca_v41_ok (
epicsGuard < epicsMutex > & ) const = 0;
+2 -2
View File
@@ -1804,9 +1804,9 @@ const char * tcpiiu::pHostName (
return this->hostNameCacheInstance.pointer ();
}
unsigned tcpiiu::getHostMinorProtocol (
unsigned tcpiiu::getHostMinorProtocol (
epicsGuard < epicsMutex > & guard) const throw ()
{
{
guard.assertIdenticalMutex ( this->mutex );
return this->minorProtocolVersion;
}
+1 -1
View File
@@ -48,7 +48,7 @@ extern "C" void epicsStdCall ca_test_event ( struct event_handler_args args )
* ca_dump_dbr()
* dump the specified dbr type to stdout
*/
extern "C" void epicsStdCall ca_dump_dbr (
extern "C" void epicsStdCall ca_dump_dbr (
chtype type, unsigned count, const void * pbuffer )
{
unsigned i;
+2 -2
View File
@@ -462,7 +462,7 @@ void udpiiu :: M_repeaterTimerNotify :: repeaterRegistrationMessage ( unsigned a
*
* register with the repeater
*/
void epicsStdCall caRepeaterRegistrationMessage (
void epicsStdCall caRepeaterRegistrationMessage (
SOCKET sock, unsigned repeaterPort, unsigned attemptNumber )
{
osiSockAddr saddr;
@@ -1342,7 +1342,7 @@ const char * udpiiu::pHostName (
return netiiu::pHostName ( cacGuard );
}
unsigned udpiiu::getHostMinorProtocol (
unsigned udpiiu::getHostMinorProtocol (
epicsGuard < epicsMutex > & cacGuard ) const throw ()
{
return netiiu::getHostMinorProtocol ( cacGuard );
+1 -1
View File
@@ -239,7 +239,7 @@ private:
unsigned bufLength ) const throw ();
const char * pHostName (
epicsGuard < epicsMutex > & ) const throw ();
unsigned getHostMinorProtocol (
unsigned getHostMinorProtocol (
epicsGuard < epicsMutex > & ) const throw ();
bool ca_v41_ok (
epicsGuard < epicsMutex > & ) const;
+1 -1
View File
@@ -168,7 +168,7 @@ public:
unsigned getHostName (
epicsGuard < epicsMutex > &,
char *pBuf, unsigned bufLength ) const throw ();
unsigned getHostMinorProtocol (
unsigned getHostMinorProtocol (
epicsGuard < epicsMutex > &) const throw ();
bool alive (
epicsGuard < epicsMutex > & ) const;
+2 -2
View File
@@ -15,8 +15,8 @@ THESE_RULES := $(IOCDIR)/db/RULES
dbCommon.h$(DEP): $(COMMON_DIR)/dbCommonRecord.dbd $(THESE_RULES) \
$(DBDTORECTYPEH_dep)
@$(RM) $@
@$(DBTORECORDTYPEH) -D -I ../db -I $(COMMON_DIR) -o $(COMMONDEP_TARGET) $< > $@
@$(DBTORECORDTYPEH) -D -I ../db -I $(COMMON_DIR) -o $(COMMONDEP_TARGET) $< > $@.stdout
$(MV) $@.stdout $@
$(COMMON_DIR)/dbCommonRecord.html: ../db/dbCommon.dbd.pod
+11 -5
View File
@@ -193,18 +193,24 @@ DBCORE_API void callbackQueueShow(const int reset);
* By default, only one thread is run for each priority (3 in total).
*
* Calling with count==0 will take the count from the callbackParallelThreadsDefault
* global variable (default default is 2).
* global variable (initialized to the number of CPU cores initially available to
* the main thread).
* Calling with count>0 sets the number of worker threads directly.
* Calling with count<0 computes the count based on the number of CPU cores on the host.
* Calling with count<0 computes the count based on the number of CPU cores
* currently available to the calling thread,
* eg. Passing -2 on an 8 core system will start 6 worker threads.
* In all cases, at least one worker thread will always run.
* The iocsh wrapper also accepts positive or negative percentages for count,
* which allows to refer to a fraction of the currently available CPU cores,
* always rounding the number of created threads down.
* In any case, at least one worker thread will always run.
*
* A special prio name of "*" will modify all priorities.
* An empty prio name or the special value "*" will modify all priorities.
* Otherwise, only the named priority is modified.
* The prio names are case insensitive.
*
* @param count If zero, reset to default (callbackParallelThreadsDefault global/iocsh variable).
* If positive, exact number of worker threads to create.
* If negative, number of worker threads less than core count.
* If negative, reserve this many CPUs to _not_ run parallel callback threads.
* @param prio Priority name. eg. "*", "LOW", "MEDIUM" or "HIGH".
* @return zero on success, non-zero if called after iocInit() or with invalid arguments.
*
+44 -8
View File
@@ -40,6 +40,7 @@
/* We can't include dbStaticLib.h here */
#define dbCalloc(nobj,size) callocMustSucceed(nobj,size,"dbCalloc")
#include <epicsAtomic.h>
#include "db_access_routines.h"
#include "dbCa.h"
#include "dbCaPvt.h"
@@ -64,6 +65,7 @@ extern int dbServiceIsolate;
static ELLLIST workList = ELLLIST_INIT; /* Work list for dbCaTask */
static epicsMutexId workListLock; /*Mutual exclusions semaphores for workList*/
static epicsEventId workListEvent; /*wakeup event for dbCaTask*/
static size_t initOutstanding; // one count for every link with DBCA_CALLBACK_INIT_WAIT
static int removesOutstanding = 0;
#define removesOutstandingWarning 10000
@@ -351,7 +353,7 @@ static void dbCaLinkInitImpl(int isolate)
dbCaCtl = ctlPause;
dbCaWorker = epicsThreadCreateOpt("dbCaLink", dbCaTask, NULL, &opts);
/* wait for worker to startup and initialize dbCaClientContext */
/* wait for worker to startup, initialize dbCaClientContext, and connect local CA */
epicsEventMustWait(startStopEvent);
}
@@ -370,6 +372,10 @@ void dbCaRun(void)
if (dbCaCtl == ctlPause) {
dbCaCtl = ctlRun;
epicsEventSignal(workListEvent);
while(epicsAtomicGetSizeT(&initOutstanding)) {
epicsEventMustWait(startStopEvent);
}
}
}
@@ -380,11 +386,12 @@ void dbCaPause(void)
epicsEventSignal(workListEvent);
}
}
void dbCaAddLinkCallback(struct link *plink,
dbCaCallback connect, dbCaCallback monitor, void *userPvt)
void dbCaAddLinkCallbackOpt(struct dbLocker *locker, struct link *plink,
dbCaCallback connect, dbCaCallback monitor, void *userPvt,
unsigned flags)
{
caLink *pca;
(void)locker; /* Passed for symmetry with dbDbAddLink(). So far unused. */
assert(!plink->value.pv_link.pvt);
@@ -396,6 +403,10 @@ void dbCaAddLinkCallback(struct link *plink,
pca->connect = connect;
pca->monitor = monitor;
pca->userPvt = userPvt;
pca->flags = flags;
if(flags & DBCA_CALLBACK_INIT_WAIT)
epicsAtomicIncrSizeT(&initOutstanding);
epicsMutexMustLock(pca->lock);
plink->lset = &dbCa_lset;
@@ -405,15 +416,22 @@ void dbCaAddLinkCallback(struct link *plink,
epicsMutexUnlock(pca->lock);
}
void dbCaAddLinkCallback(struct link *plink,
dbCaCallback connect, dbCaCallback monitor, void *userPvt)
{
dbCaAddLinkCallbackOpt(NULL, plink, connect, monitor, userPvt, 0);
}
long dbCaAddLink(struct dbLocker *locker, struct link *plink, short dbfType)
{
dbCaAddLinkCallback(plink, 0, 0, NULL);
dbCaAddLinkCallbackOpt(locker, plink, 0, 0, NULL, 0);
return 0;
}
void dbCaRemoveLink(struct dbLocker *locker, struct link *plink)
{
caLink *pca = (caLink *)plink->value.pv_link.pvt;
(void)locker; /* Passed for symmetry with dbDbRemoveLink(). So far unused. */
if (!pca) return;
epicsMutexMustLock(pca->lock);
@@ -841,6 +859,8 @@ static void connectionCallback(struct connection_handler_args arg)
}
pca->hasReadAccess = ca_read_access(arg.chid);
pca->hasWriteAccess = ca_write_access(arg.chid);
if (pca->flags & DBCA_CALLBACK_INIT_WAIT)
link_action |= CA_INIT_READY; // declare initialized, unless cleared below
if (pca->gotFirstConnection) {
if (pca->nelements != ca_element_count(arg.chid) ||
@@ -875,9 +895,11 @@ static void connectionCallback(struct connection_handler_args arg)
pca->dbrType = ca_field_type(arg.chid);
if ((plink->value.pv_link.pvlMask & pvlOptInpNative) && !pca->pgetNative) {
link_action |= CA_MONITOR_NATIVE;
link_action &= ~CA_INIT_READY; // defer to eventCallback()
}
if ((plink->value.pv_link.pvlMask & pvlOptInpString) && !pca->pgetString) {
link_action |= CA_MONITOR_STRING;
link_action &= ~CA_INIT_READY; // defer to eventCallback()
}
if ((plink->value.pv_link.pvlMask & pvlOptOutNative) && pca->gotOutNative) {
link_action |= CA_WRITE_NATIVE;
@@ -889,6 +911,7 @@ static void connectionCallback(struct connection_handler_args arg)
if (pca->dbrType != DBR_STRING) {
/* will run connect() callback later */
link_action |= CA_GET_ATTRIBUTES;
link_action &= ~CA_INIT_READY; // defer to getAttribEventCallback()
} else {
connect = pca->connect;
userPvt = pca->userPvt;
@@ -909,6 +932,7 @@ static void eventCallback(struct event_handler_args arg)
dbCaCallback monitor = 0;
void *userPvt = 0;
int doScan = 1;
short link_action = 0;
assert(pca);
epicsMutexMustLock(pca->lock);
@@ -969,10 +993,13 @@ static void eventCallback(struct event_handler_args arg)
if ((ppv_link->pvlMask & pvlOptCP) ||
((ppv_link->pvlMask & pvlOptCPP) && precord->scan == 0))
{
addAction(pca, CA_DBPROCESS);
link_action |= CA_DBPROCESS;
}
}
if (pca->flags & DBCA_CALLBACK_INIT_WAIT)
link_action |= CA_INIT_READY;
done:
if (link_action) addAction(pca, link_action);
epicsMutexUnlock(pca->lock);
if (monitor) monitor(userPvt);
}
@@ -1096,6 +1123,8 @@ static void getAttribEventCallback(struct event_handler_args arg)
pca->alarmLimits[3] = pdbr->upper_alarm_limit;
pca->precision = pdbr->precision;
memcpy(pca->units, pdbr->units, MAX_UNITS_SIZE);
if (pca->flags & DBCA_CALLBACK_INIT_WAIT)
addAction(pca, CA_INIT_READY);
epicsMutexUnlock(pca->lock);
if (getAttributes) getAttributes(getAttributesPvt);
if (connect) connect(userPvt);
@@ -1110,7 +1139,7 @@ static void dbCaTask(void *arg)
dbCaClientContext = ca_current_context ();
SEVCHK(ca_add_exception_event(exceptionCallback,NULL),
"ca_add_exception_event");
epicsEventSignal(startStopEvent);
epicsEventSignal(startStopEvent); /* unblock dbCaLinkInitImpl() */
/* channel access event loop */
while (TRUE){
@@ -1266,6 +1295,13 @@ static void dbCaTask(void *arg)
db_process(prec);
dbScanUnlock(prec);
}
if ((link_action & CA_INIT_READY) && (pca->flags & DBCA_CALLBACK_INIT_WAIT)) {
pca->flags &= ~DBCA_CALLBACK_INIT_WAIT;
if (epicsAtomicDecrSizeT(&initOutstanding)==0)
{
epicsEventSignal(startStopEvent); /* unblock dbCaRun() */
}
}
}
SEVCHK(ca_flush_io(), "dbCaTask");
}
@@ -1275,5 +1311,5 @@ shutdown:
ca_context_destroy();
else
fprintf(stderr, "dbCa: chan_count = %d at shutdown\n", dbca_chan_count);
epicsEventSignal(startStopEvent);
epicsEventSignal(startStopEvent); /* unblock dbCaShutdown() */
}
+21
View File
@@ -21,6 +21,19 @@
#include "epicsMutex.h"
#include "epicsTypes.h"
#include "link.h"
#include "shareLib.h"
#include "libCaAPI.h"
#ifndef INC_cadef_H
/* Copy some definitions so this header to be included from
* places where cadef.h and db_access.h can not.
*/
typedef void * chid;
typedef void * evid;
LIBCA_API extern const unsigned short dbr_value_size[];
LIBCA_API short epicsShareAPI ca_field_type (chid chan);
#define MAX_UNITS_SIZE 8
#endif
/* link_action mask */
#define CA_CLEAR_CHANNEL 0x1
@@ -32,6 +45,7 @@
#define CA_GET_ATTRIBUTES 0x40
#define CA_SYNC 0x1000
#define CA_DBPROCESS 0x2000
#define CA_INIT_READY 0x4000
/* write type */
#define CA_PUT 0x1
#define CA_PUT_CALLBACK 0x2
@@ -63,6 +77,7 @@ typedef struct caLink
dbCaCallback connect;
dbCaCallback monitor;
void *userPvt;
unsigned flags;
/* The following are for write request */
short putType;
dbCaCallback putCallback;
@@ -97,4 +112,10 @@ typedef struct caLink
unsigned long nUpdate;
}caLink;
#define DBCA_CALLBACK_INIT_WAIT (1)
void dbCaAddLinkCallbackOpt(struct dbLocker *locker, struct link *plink,
dbCaCallback connect, dbCaCallback monitor,
void *userPvt, unsigned flags);
#endif /* INC_dbCaPvt_H */
+1 -1
View File
@@ -310,7 +310,7 @@ typedef struct chFilterIf {
} chFilterIf;
/** \brief Filter plugin data
*
*
* A chFilterPlugin object holds data about a filter plugin.
*/
typedef struct chFilterPlugin {
+6 -1
View File
@@ -22,7 +22,12 @@
extern "C" {
#endif
/** @brief Make a copy of parts of an array.
/**
* @file dbExtractArray.h
*
* @brief Make a copy of parts of an array.
*/
/** @brief Make a copy of parts of an array
*
* The source array may or may not be a record field.
*
+1 -1
View File
@@ -1217,7 +1217,7 @@ static long cvt_f_st(const void *f, void *t, const dbAddr *paddr)
{
const epicsFloat32 *from = (const epicsFloat32 *) f;
char *to = (char *) t;
rset *prset = 0;
long status = 0;
long precision = 6;
+25 -2
View File
@@ -10,6 +10,8 @@
#define EPICS_PRIVATE_API
#include <string.h>
#include "iocsh.h"
#include "callback.h"
@@ -27,6 +29,9 @@
#include "dbState.h"
#include "db_test.h"
#include "dbTest.h"
#include "epicsStdlib.h"
#include "epicsStdio.h"
#include "errlog.h"
DBCORE_API extern int callbackParallelThreadsDefault;
@@ -503,7 +508,7 @@ static void callbackQueueShowCallFunc(const iocshArgBuf *args)
}
/* callbackParallelThreads */
static const iocshArg callbackParallelThreadsArg0 = { "no of threads", iocshArgInt};
static const iocshArg callbackParallelThreadsArg0 = { "no of threads", iocshArgString};
static const iocshArg callbackParallelThreadsArg1 = { "priority", iocshArgString};
static const iocshArg * const callbackParallelThreadsArgs[2] =
{&callbackParallelThreadsArg0,&callbackParallelThreadsArg1};
@@ -513,7 +518,25 @@ static const iocshFuncDef callbackParallelThreadsFuncDef = {"callbackParallelThr
"or one of LOW, MEDIUM, or HIGH.\n"};
static void callbackParallelThreadsCallFunc(const iocshArgBuf *args)
{
iocshSetError(callbackParallelThreads(args[0].ival, args[1].sval));
epicsInt32 num = 0;
if (args[0].sval) {
char* end;
long status = epicsParseInt32(args[0].sval, &num, 10, &end);
if (status || (end[0] && strcmp(end, "%") != 0))
{
fprintf(epicsGetStderr(),
ANSI_RED("Invalid integer '%s'.\n"), args[0].sval);
iocshSetError(-1);
return;
}
if (end[0] == '%') {
/* round down, min 1 */
if (num < 0) num += 100;
if (num > 0) num = num * epicsThreadGetCPUs() / 100;
if (num <= 0) num = 1;
}
}
iocshSetError(callbackParallelThreads(num, args[1].sval));
}
/* dbStateCreate */
+4 -2
View File
@@ -31,7 +31,7 @@
#include "dbAccessDefs.h"
#include "dbAddr.h"
#include "dbBase.h"
#include "dbCa.h"
#include "dbCaPvt.h"
#include "dbCommon.h"
#include "dbConstLink.h"
#include "dbDbLink.h"
@@ -125,7 +125,9 @@ void dbInitLink(struct link *plink, short dbfType)
if (dbfType == DBF_INLINK)
plink->value.pv_link.pvlMask |= pvlOptInpNative;
dbCaAddLink(NULL, plink, dbfType);
int isLocal = dbChannelTest(plink->value.pv_link.pvname)==0;
dbCaAddLinkCallbackOpt(NULL, plink, NULL, NULL, NULL, isLocal ? DBCA_CALLBACK_INIT_WAIT : 0);
if (dbfType == DBF_FWDLINK) {
char *pperiod = strrchr(plink->value.pv_link.pvname, '.');
+46 -9
View File
@@ -24,11 +24,17 @@ extern "C" {
struct dbCommon;
struct dbBase;
/** @brief Lock multiple records.
/**
* @file dbLock.h
* @brief Lock one or multiple records.
*
* A dbLocker allows a caller to simultaneously lock multiple records.
* The list of records is provided to dbLockerAlloc().
* And the resulting dbLocker can be locked/unlocked repeatedly.
* Locking is required to prevent corruption of record fields due to concurrent
* access by different threads.
*/
/** @brief A dbLocker allows a caller to lock a single record or simultaneously
* lock multiple records.
* The list of records is provided to dbLockerAlloc(). And the resulting
* dbLocker can be locked/unlocked repeatedly.
*
* Each thread can only lock one dbLocker at a time.
* While locked, dbScanLock() may be called only on those records
@@ -72,37 +78,68 @@ DBCORE_API void dbLockerFree(dbLocker *plocker);
/** @brief Lock all records of dbLocker
*
* While locked, caller may access any associated record passed to dbLockerAlloc() .
* Locks multiple record. While locked, caller may access any associated record
* passed to dbLockerAlloc().
* dbScanLockMany() may not be called again (multi-lock is not recursive).
* dbScanLock()/dbScanUnlock() may be called on individual record.
* The caller must later call dbScanUnlockMany().
* @since 3.16.0.1
*/
DBCORE_API void dbScanLockMany(dbLocker*);
/** @brief Unlock all records of dbLocker
/** @brief Unlock all records of dbLocker.
*
* Unlocks the records of dbLocker. A thread must call dbScanUnlockMany with the
* same dbLocker* before calling dbScanLockMany again.
* @since 3.16.0.1
*/
DBCORE_API void dbScanUnlockMany(dbLocker*);
/** @brief Returns ID number of the lockset*/
DBCORE_API unsigned long dbLockGetLockId(
struct dbCommon *precord);
/** @brief During IOC startup the complete list of records is iterated by
* dbLockInitRecords
*
* The required locksets are created and populated based on the links defined
* at the time of IOC startup*/
DBCORE_API void dbLockInitRecords(struct dbBase *pdbbase);
/** @brief Frees up locksets which are no longer in use. If lockset is still active, prints warning and calls `dblsr`*/
DBCORE_API void dbLockCleanupRecords(struct dbBase *pdbbase);
/* Lock Set Report */
/** @brief Lock Set Report
*
* Generates a report showing the lock set to which each record belongs.
* If recordname is 0, "", "*" all records are shown. Otherwise only records
* in the same lock set as recordname are shown. Level can have the following
* values:
*
* 0 - show lock set information only
*
* 1 - show each record in the lock set
*
* 2 - show each record and all database links in the lock set
*/
DBCORE_API long dblsr(char *recordname,int level);
/* If recordname NULL then all records*/
/* level = (0,1,2) (lock set state, + recordname, +DB links) */
/** @brief Displays free and active locksets
*/
DBCORE_API long dbLockShowLocked(int level);
/*KLUDGE to support field TPRO*/
/** @brief Support for TPRO field */
DBCORE_API int * dbLockSetAddrTrace(struct dbCommon *precord);
/* debugging */
/** @brief Returns the reference count */
DBCORE_API unsigned long dbLockGetRefs(struct dbCommon*);
/** @brief Returns the number of active locksets*/
DBCORE_API unsigned long dbLockCountSets(void);
#ifdef __cplusplus
+3 -2
View File
@@ -27,6 +27,7 @@
#include "ellLib.h"
#include "epicsAtomic.h"
#include "epicsEvent.h"
#include "epicsGeneralTime.h"
#include "epicsMutex.h"
#include "epicsPrint.h"
#include "epicsRingBytes.h"
@@ -114,7 +115,7 @@ typedef struct event_list {
struct event_list *next;
char eventname[1]; /* actually arbitrary size */
} event_list;
static event_list * volatile pevent_list[256];
static event_list * volatile pevent_list[NUM_TIME_EVENTS];
static epicsMutexId event_lock;
/* IO_EVENT*/
@@ -546,7 +547,7 @@ void postEvent(event_list *pel)
/* backward compatibility */
void post_event(int event)
{
if (event <= 0 || event > 255) return;
if (event <= 0 || event >= NUM_TIME_EVENTS) return;
postEvent(pevent_list[event]);
}
+4 -2
View File
@@ -145,7 +145,7 @@ static void printFieldsList(DBENTRY *pdbentry, char** papfields, int nfields)
printf(", \"%s\"", (pvalue ? pvalue : ""));
}
printf("\n");
}
}
long dbl(const char *precordTypename, const char *fields)
{
@@ -422,8 +422,10 @@ long dbpf(const char *pname,const char *pvalue)
return -1;
}
status = dbPutConvertJSON(pvalue, dbrType, array, &n);
if (status)
if (status) {
free(array);
return status;
}
pvalue = array;
}
}
+60 -53
View File
@@ -7,14 +7,16 @@
* EPICS BASE is distributed subject to a Software License Agreement found
* in file LICENSE that is included with this distribution.
\*************************************************************************/
/*
* Current Author: Marty Kraimer
* Date: 03-19-92
*/
#ifndef INCdbBaseh
#define INCdbBaseh 1
/** \file dbBase.h
* \author Marty Kraimer
* \date 03-19-92
* \brief Base db structures
*/
#include "epicsTypes.h"
#include "dbFldTypes.h"
#include "ellLib.h"
@@ -44,7 +46,7 @@ typedef struct devSup {
int link_type;
/*Following only available on run time system*/
dset *pdset;
struct dsxt *pdsxt; /* Extended device support */
struct dsxt *pdsxt; /**< Extended device support */
}devSup;
typedef struct linkSup {
@@ -59,50 +61,55 @@ typedef struct dbDeviceMenu {
char **papChoice;
}dbDeviceMenu;
/* conversion types*/
/** \brief conversion types*/
typedef enum {CT_DECIMAL,CT_HEX} ctType;
/* access level types */
/** \brief access level types */
typedef enum {ASL0,ASL1} asLevel;
/*Breakpoint Tables */
typedef struct brkInt{ /* breakpoint interval */
double raw; /*raw value for beginning of interval */
double slope; /*slope for interval */
double eng; /*converted value for beginning of interval*/
/* Breakpoint Tables */
/** \brief breakpoint interval */
typedef struct brkInt{
double raw; /**< \brief raw value for beginning of interval */
double slope; /**< \brief slope for interval */
double eng; /**< \brief converted value for beginning of interval*/
}brkInt;
typedef struct brkTable { /* breakpoint table */
/** \brief breakpoint table */
typedef struct brkTable {
ELLNODE node;
char *name; /*breakpoint table name */
long number; /*number of brkInt in this table */
struct brkInt *paBrkInt; /* ptr to array of brkInts */
char *name; /**< \brief breakpoint table name */
long number; /**< \brief number of brkInt in this table */
struct brkInt *paBrkInt; /**< \brief ptr to array of brkInts */
}brkTable;
typedef struct dbFldDes{ /* field description */
char *prompt; /*Prompt string for DCT */
char *name; /*Field name */
char *extra; /*C def for DBF_NOACCESS */
/** \brief field description */
typedef struct dbFldDes{
char *prompt; /**< \brief Prompt string for DCT */
char *name; /**< \brief Field name */
char *extra; /**< \brief C def for DBF_NOACCESS */
struct dbRecordType *pdbRecordType;
short indRecordType; /*within dbRecordType.papFldDes */
short special; /*Special processing requirements */
dbfType field_type; /*Field type as defined in dbFldTypes.h */
unsigned int process_passive:1;/*should dbPutField process passive */
unsigned int prop:1; /*field is a metadata, post DBE_PROPERTY on change*/
unsigned int isDevLink:1; /* true for INP/OUT fields */
ctType base; /*base for integer to string conversions*/
short promptgroup; /*prompt, i.e. gui group */
short interest; /*interest level */
asLevel as_level; /*access security level */
char *initial; /*initial value */
/*If (DBF_MENU,DBF_DEVICE) ftPvt is (pdbMenu,pdbDeviceMenu) */
short indRecordType; /**< \brief within dbRecordType.papFldDes */
short special; /**< \brief Special processing requirements */
dbfType field_type; /**< \brief Field type as defined in dbFldTypes.h */
unsigned int process_passive:1;/**< \brief should dbPutField process passive */
unsigned int prop:1; /**< \brief field is a metadata, post DBE_PROPERTY on change*/
unsigned int isDevLink:1; /**< \brief true for INP/OUT fields */
ctType base; /**< \brief base for integer to string conversions*/
short promptgroup; /**< \brief prompt, i.e. gui group */
short interest; /**< \brief interest level */
asLevel as_level; /**< \brief access security level */
char *initial; /**< \brief initial value */
/** \brief If (DBF_MENU,DBF_DEVICE) ftPvt is (pdbMenu,pdbDeviceMenu) */
void *ftPvt;
/*On no runtime following only set for STRING */
short size; /*length in bytes of a field element */
/* On no runtime following only set for STRING */
short size; /**< \brief length in bytes of a field element */
/*The following are only available on run time system*/
unsigned short offset; /*Offset in bytes from beginning of record*/
unsigned short offset; /**< \brief Offset in bytes from beginning of record*/
}dbFldDes;
typedef struct dbInfoNode { /*non-field per-record information*/
/** non-field per-record information*/
typedef struct dbInfoNode {
ELLNODE node;
char *name;
char *string;
@@ -117,13 +124,13 @@ typedef struct dbRecordNode {
ELLNODE node;
void *precord;
char *recordname;
ELLLIST infoList; /*LIST head of info nodes*/
ELLLIST infoList; /**< \brief LIST head of info nodes*/
int flags;
/** Parse order of this record()
* @since 7.0.8.1
*/
unsigned order;
struct dbRecordNode *aliasedRecnode; /* NULL unless flags|DBRN_FLAGS_ISALIAS */
struct dbRecordNode *aliasedRecnode; /**< \brief NULL unless flags|DBRN_FLAGS_ISALIAS */
}dbRecordNode;
/*dbRecordAttribute is for "pseudo" fields */
@@ -150,24 +157,24 @@ typedef struct dbVariableDef {
typedef struct dbRecordType {
ELLNODE node;
ELLLIST attributeList; /*LIST head of attributes*/
ELLLIST recList; /*LIST head of sorted dbRecordNodes*/
ELLLIST devList; /*List of associated device support*/
ELLLIST cdefList; /*LIST of Cdef text items*/
ELLLIST attributeList; /**< \brief LIST head of attributes*/
ELLLIST recList; /**< \brief LIST head of sorted dbRecordNodes*/
ELLLIST devList; /**< \brief List of associated device support*/
ELLLIST cdefList; /**< \brief LIST of Cdef text items*/
char *name;
short no_fields; /* number of fields defined */
short no_prompt; /* number of fields to configure*/
short no_links; /* number of links */
short no_aliases; /* number of aliases in recList */
short *link_ind; /* addr of array of ind in papFldDes*/
char **papsortFldName;/* ptr to array of ptr to fld names*/
short *sortFldInd; /* addr of array of ind in papFldDes*/
dbFldDes *pvalFldDes; /*pointer dbFldDes for VAL field*/
short indvalFlddes; /*ind in papFldDes*/
dbFldDes **papFldDes; /* ptr to array of ptr to fldDes*/
short no_fields; /**< \brief number of fields defined */
short no_prompt; /**< \brief number of fields to configure*/
short no_links; /**< \brief number of links */
short no_aliases; /**< \brief number of aliases in recList */
short *link_ind; /**< \brief addr of array of ind in papFldDes*/
char **papsortFldName;/**< \brief ptr to array of ptr to fld names*/
short *sortFldInd; /**< \brief * addr of array of ind in papFldDes*/
dbFldDes *pvalFldDes; /**< \brief pointer dbFldDes for VAL field*/
short indvalFlddes; /**< \brief ind in papFldDes*/
dbFldDes **papFldDes; /**< \brief ptr to array of ptr to fldDes*/
/*The following are only available on run time system*/
rset *prset;
int rec_size; /*record size in bytes */
int rec_size; /**< \brief record size in bytes */
}dbRecordType;
struct dbPvd; /* Contents private to dbPvdLib code */
@@ -77,7 +77,7 @@ static const iocshArg * const dbDumpFieldArgs[] =
static const iocshFuncDef dbDumpFieldFuncDef = {"dbDumpField",3,dbDumpFieldArgs,
"Dump information about the fieldName in the recordTypeName.\n"
"Example: dbDumpField pdbbase calcout A\n"
"If last argument(s) are missing, dump information\n"
"If last argument(s) are missing, dump information\n"
"about all fieldName in all recordTypeName in the database.\n"};
static void dbDumpFieldCallFunc(const iocshArgBuf *args)
{
@@ -744,7 +744,7 @@ static long dbAddOnePath (DBBASE *pdbbase, const char *path, unsigned length)
pdbPathNode = (dbPathNode *)dbCalloc(1, sizeof(dbPathNode));
pdbPathNode->directory = (char *)dbMalloc(length+1);
strncpy(pdbPathNode->directory, path, length+1);
memcpy(pdbPathNode->directory, path, length);
pdbPathNode->directory[length] = '\0';
ellAdd(ppathList, &pdbPathNode->node);
return 0;
@@ -1447,6 +1447,7 @@ long dbCreateRecord(DBENTRY *pdbentry,const char *precordName)
pdbentry->precnode = pNewRecNode;
ppvd = dbPvdAdd(pdbentry->pdbbase,precordType,pNewRecNode);
if(!ppvd) {errMessage(-1,"Logic Err: Could not add to PVD");return(-1);}
pNewRecNode->order = pdbentry->pdbbase->no_records++;
return(0);
}
@@ -1700,6 +1701,7 @@ long dbCreateAlias(DBENTRY *pdbentry, const char *alias)
}
ellAdd(&precordType->recList, &pnewnode->node);
pnewnode->order = pdbentry->pdbbase->no_records++;
precordType->no_aliases++;
return 0;
@@ -36,7 +36,7 @@ static void iocBuildCallFunc(const iocshArgBuf *args)
}
/* iocRun */
static const iocshFuncDef iocRunFuncDef = {"iocRun",0,NULL,
static const iocshFuncDef iocRunFuncDef = {"iocRun",0,NULL,
"Bring the IOC out of its initial quiescent state to the running state.\n"
"See more: iocBuild, iocPause\n"};
static void iocRunCallFunc(const iocshArgBuf *args)
@@ -85,7 +85,7 @@ static const iocshArg * const systemArgs[] = {&systemArg0};
static const iocshFuncDef systemFuncDef = {"system",1,systemArgs,
"Send command string to the system command interpreter for execution.\n"
"Not available on all OSs.\n"
"To enable this command, add registrar(iocshSystemCommand) to an application dbd file,\n"
"To enable this command, add registrar(iocshSystemCommand) to an application dbd file,\n"
"or include system.dbd\n"};
static void systemCallFunc(const iocshArgBuf *args)
{
+1 -2
View File
@@ -312,8 +312,7 @@ void rsrv_build_addr_lists(void)
char sockErrBuf[64];
epicsSocketConvertErrnoToString (
sockErrBuf, sizeof ( sockErrBuf ) );
errlogPrintf("CAS: failed to set mcast loopback: %s\n",
sockErrBuf);
errlogPrintf("rsrv: failed to set mcast loopback: %s (%d)\n", sockErrBuf, errno);
}
}
#endif
@@ -85,7 +85,6 @@ static long readLocked(struct link *pinp, void *dummy)
static long read_aai(aaiRecord *prec)
{
epicsUInt32 nord = prec->nord;
struct link *pinp = prec->simm == menuYesNoYES ? &prec->siol : &prec->inp;
long status;
@@ -96,8 +95,5 @@ static long read_aai(aaiRecord *prec)
if (status == S_db_noLSET)
status = readLocked(pinp, NULL);
if (!status && nord != prec->nord)
db_post_events(prec, &prec->nord, DBE_VALUE | DBE_LOG);
return status;
}
+1 -1
View File
@@ -37,7 +37,7 @@ epicsExportAddress(dset, devBiSoft);
static long init_record(dbCommon *pcommon)
{
biRecord *prec = (biRecord *)pcommon;
biRecord *prec = (biRecord *)pcommon;
if (recGblInitConstantLink(&prec->inp, DBF_ENUM, &prec->val))
prec->udf = FALSE;
@@ -154,7 +154,7 @@ static long init(int pass)
static long init_record(dbCommon *pcommon)
{
biRecord *prec = (biRecord *)pcommon;
biRecord *prec = (biRecord *)pcommon;
if (recGblInitConstantLink(&prec->inp, DBR_ENUM, &prec->val))
prec->udf = FALSE;
+1 -1
View File
@@ -37,7 +37,7 @@ epicsExportAddress(dset, devBiSoftRaw);
static long init_record(dbCommon *pcommon)
{
biRecord *prec = (biRecord *)pcommon;
biRecord *prec = (biRecord *)pcommon;
recGblInitConstantLink(&prec->inp, DBF_ULONG, &prec->rval);
@@ -37,7 +37,7 @@ epicsExportAddress(dset, devMbbiDirectSoft);
static long init_record(dbCommon *pcommon)
{
mbbiDirectRecord *prec = (mbbiDirectRecord *)pcommon;
mbbiDirectRecord *prec = (mbbiDirectRecord *)pcommon;
if (recGblInitConstantLink(&prec->inp, DBR_ULONG, &prec->val))
prec->udf = FALSE;
@@ -154,7 +154,7 @@ static long init(int pass)
static long init_record(dbCommon *pcommon)
{
mbbiDirectRecord *prec = (mbbiDirectRecord *)pcommon;
mbbiDirectRecord *prec = (mbbiDirectRecord *)pcommon;
if (recGblInitConstantLink(&prec->inp, DBR_ULONG, &prec->val))
prec->udf = FALSE;
@@ -37,7 +37,7 @@ epicsExportAddress(dset, devMbbiDirectSoftRaw);
static long init_record(dbCommon *pcommon)
{
mbbiDirectRecord *prec = (mbbiDirectRecord *)pcommon;
mbbiDirectRecord *prec = (mbbiDirectRecord *)pcommon;
recGblInitConstantLink(&prec->inp, DBF_ULONG, &prec->rval);
+1 -1
View File
@@ -37,7 +37,7 @@ epicsExportAddress(dset, devMbbiSoft);
static long init_record(dbCommon *pcommon)
{
mbbiRecord *prec = (mbbiRecord *)pcommon;
mbbiRecord *prec = (mbbiRecord *)pcommon;
if (recGblInitConstantLink(&prec->inp, DBF_ENUM, &prec->val))
prec->udf = FALSE;
@@ -154,7 +154,7 @@ static long init(int pass)
static long init_record(dbCommon *pcommon)
{
mbbiRecord *prec = (mbbiRecord *)pcommon;
mbbiRecord *prec = (mbbiRecord *)pcommon;
if (recGblInitConstantLink(&prec->inp, DBR_ENUM, &prec->val))
prec->udf = FALSE;
@@ -37,7 +37,7 @@ epicsExportAddress(dset, devMbbiSoftRaw);
static long init_record(dbCommon *pcommon)
{
mbbiRecord *prec = (mbbiRecord *)pcommon;
mbbiRecord *prec = (mbbiRecord *)pcommon;
recGblInitConstantLink(&prec->inp, DBF_ULONG, &prec->rval);
@@ -23,7 +23,7 @@
static long init_record(dbCommon *pcommon)
{
mbboDirectRecord *prec = (mbboDirectRecord *)pcommon;
mbboDirectRecord *prec = (mbboDirectRecord *)pcommon;
if (prec->nobt == 0)
prec->mask = 0xffffffff;
-4
View File
@@ -93,7 +93,6 @@ static long read_sa(subArrayRecord *prec)
{
long status;
struct sart rt;
epicsUInt32 nord = prec->nord;
rt.nRequest = prec->indx + prec->nelm;
if (rt.nRequest > prec->malm)
@@ -118,9 +117,6 @@ static long read_sa(subArrayRecord *prec)
if (!status) {
subset(prec, rt.nRequest);
if (nord != prec->nord)
db_post_events(prec, &prec->nord, DBE_VALUE | DBE_LOG);
}
return status;
+3 -3
View File
@@ -55,9 +55,9 @@ device(stringout,CONSTANT,devSoSoftCallback,"Async Soft Channel")
device(ai, INST_IO,devTimestampAI,"Soft Timestamp")
device(stringin,INST_IO,devTimestampSI,"Soft Timestamp")
device(ai, INST_IO,devAiGeneralTime,"General Time")
device(bo, INST_IO,devBoGeneralTime,"General Time")
device(longin, INST_IO,devLiGeneralTime,"General Time")
device(ai, INST_IO,devAiGeneralTime,"General Time")
device(bo, INST_IO,devBoGeneralTime,"General Time")
device(longin, INST_IO,devLiGeneralTime,"General Time")
device(stringin,INST_IO,devSiGeneralTime,"General Time")
device(lso,INST_IO,devLsoStdio,"stdio")
-3
View File
@@ -72,7 +72,6 @@ static long read_wf(waveformRecord *prec)
{
long status;
struct wfrt rt;
epicsUInt32 nord = prec->nord;
rt.nRequest = prec->nelm;
rt.ptime = (dbLinkIsConstant(&prec->tsel) &&
@@ -88,8 +87,6 @@ static long read_wf(waveformRecord *prec)
if (!status) {
prec->nord = rt.nRequest;
prec->udf = FALSE;
if (nord != prec->nord)
db_post_events(prec, &prec->nord, DBE_VALUE | DBE_LOG);
}
return status;
+2 -2
View File
@@ -8,8 +8,8 @@
# This is a Makefile fragment, see src/ioc/Makefile.
stdRecords.dbd$(DEP): $(STDDIR)/rec/Makefile $(STDDIR)/rec/RULES
@$(RM) $@
@echo "$(COMMON_DIR)/stdRecords.dbd:" > $@
@echo "$(COMMON_DIR)/stdRecords.dbd:" > $@.stdout
$(MV) $@.stdout $@
$(COMMON_DIR)/stdRecords.dbd: $(STDDIR)/rec/Makefile $(STDDIR)/rec/RULES
+8 -2
View File
@@ -156,8 +156,9 @@ static long process(struct dbCommon *pcommon)
{
struct aaiRecord *prec = (struct aaiRecord *)pcommon;
aaidset *pdset = (aaidset *)(prec->dset);
long status;
unsigned char pact = prec->pact;
epicsUInt32 nord = prec->nord;
long status;
if (pdset == NULL || pdset->read_aai == NULL) {
prec->pact = TRUE;
@@ -173,7 +174,11 @@ static long process(struct dbCommon *pcommon)
prec->udf = FALSE;
recGblGetTimeStampSimm(prec, prec->simm, &prec->siol);
if (nord != prec->nord) {
db_post_events(prec, &prec->nord, DBE_VALUE | DBE_LOG);
}
monitor(prec);
/* process the forward scan link record */
recGblFwdLink(prec);
@@ -233,8 +238,9 @@ static long put_array_info(DBADDR *paddr, long nNew)
if (prec->nord > prec->nelm)
prec->nord = prec->nelm;
if (nord != prec->nord)
if (nord != prec->nord) {
db_post_events(prec, &prec->nord, DBE_VALUE | DBE_LOG);
}
return 0;
}
@@ -303,6 +303,7 @@ Scan forward link if necessary, set PACT FALSE, and return.
% long (*read_aai)(struct aaiRecord *prec); /*returns: (-1,0)=>(failure,success)*/
%} aaidset;
%#define HAS_aaidset
%#define AAI_POSTS_NORD
%#define AAI_DEVINIT_PASS1 2
%
field(VAL,DBF_NOACCESS) {
+4
View File
@@ -153,6 +153,7 @@ static long process(struct dbCommon *pcommon)
aaodset *pdset = (aaodset *)(prec->dset);
long status;
unsigned char pact = prec->pact;
epicsUInt32 nord = prec->nord;
if (pdset == NULL || pdset->write_aao == NULL) {
prec->pact = TRUE;
@@ -180,6 +181,9 @@ static long process(struct dbCommon *pcommon)
recGblGetTimeStampSimm(prec, prec->simm, NULL);
}
if (nord != prec->nord) {
db_post_events(prec, &prec->nord, DBE_VALUE | DBE_LOG);
}
monitor(prec);
/* process the forward scan link record */
recGblFwdLink(prec);
@@ -326,6 +326,7 @@ Scan forward link if necessary, set PACT FALSE, and return.
% long (*write_aao)(struct aaoRecord *prec); /*returns: (-1,0)=>(failure,success)*/
%} aaodset;
%#define HAS_aaodset
%#define AAO_POSTS_NORD
%
field(VAL,DBF_NOACCESS) {
prompt("Value")
+1 -1
View File
@@ -119,7 +119,7 @@ static long init_record(struct dbCommon *pcommon, int pass)
}
if (pdset->common.init_record) {
long status = pdset->common.init_record(pcommon);
long status = pdset->common.init_record(pcommon);
if (prec->linr == menuConvertSLOPE) {
prec->eoff = eoff;
prec->eslo = eslo;
+2 -2
View File
@@ -76,7 +76,7 @@ rset biRSET={
put_enum_str,
get_graphic_double,
get_control_double,
get_alarm_double
get_alarm_double
};
epicsExportAddress(rset,biRSET);
@@ -105,7 +105,7 @@ static long init_record(struct dbCommon *pcommon, int pass)
return(S_dev_missingSup);
}
if( pdset->common.init_record ) {
if((status=(*pdset->common.init_record)(pcommon))) return(status);
if((status=(*pdset->common.init_record)(pcommon))) return(status);
}
prec->mlst = prec->val;
prec->lalm = prec->val;
+2 -2
View File
@@ -96,7 +96,7 @@ static long init_record(struct dbCommon *pcommon, int pass)
recGblInitSimm(pcommon, &prec->sscn, &prec->oldsimm, &prec->simm, &prec->siml);
recGblInitConstantLink(&prec->siol, DBF_STRING, &prec->sval);
if( (pdset=(eventdset *)(prec->dset)) && (pdset->common.init_record) )
if( (pdset=(eventdset *)(prec->dset)) && (pdset->common.init_record) )
status=(*pdset->common.init_record)(pcommon);
prec->epvt = eventNameToHandle(prec->val);
@@ -111,7 +111,7 @@ static long process(struct dbCommon *pcommon)
long status=0;
unsigned char pact=prec->pact;
if((pdset!=NULL) && (pdset->common.number >= 5) && pdset->read_event )
if((pdset!=NULL) && (pdset->common.number >= 5) && pdset->read_event )
status=readValue(prec); /* read the new value */
/* check if device support set pact */
if ( !pact && prec->pact ) return(0);
+2 -2
View File
@@ -111,7 +111,7 @@ static long init_record(dbCommon *pcommon, int pass)
return(S_dev_missingSup);
}
if (pdset->common.init_record) {
if ((status = pdset->common.init_record(pcommon))) return status;
if ((status = pdset->common.init_record(pcommon))) return status;
}
prec->mlst = prec->val;
prec->alst = prec->val;
@@ -122,7 +122,7 @@ static long init_record(dbCommon *pcommon, int pass)
static long process(dbCommon *pcommon)
{
int64inRecord *prec = (int64inRecord*)pcommon;
int64indset *pdset = (int64indset *)(prec->dset);
int64indset *pdset = (int64indset *)(prec->dset);
long status;
unsigned char pact=prec->pact;
epicsTimeStamp timeLast;
+4 -4
View File
@@ -125,7 +125,7 @@ static long init_record(struct dbCommon *pcommon, int pass)
prec->lalm = prec->val;
prec->pval = prec->val;
prec->outpvt = EXEC_OUTPUT;
return 0;
}
@@ -450,14 +450,14 @@ static long conditional_write(longoutRecord *prec)
long status = 0;
int doDevSupWrite = 0;
switch (prec->oopt)
switch (prec->oopt)
{
case longoutOOPT_On_Change:
/* Forces a write op if a change in the OUT field is detected OR is first process */
if (prec->outpvt == EXEC_OUTPUT) {
doDevSupWrite = 1;
} else {
/* Only write if value is different from the previous one */
/* Only write if value is different from the previous one */
doDevSupWrite = (prec->val != prec->pval);
}
break;
@@ -479,7 +479,7 @@ static long conditional_write(longoutRecord *prec)
break;
case longoutOOPT_Transition_To_Non_zero:
doDevSupWrite = ((prec->val != 0)&&(prec->pval == 0));
doDevSupWrite = ((prec->val != 0)&&(prec->pval == 0));
break;
default:
@@ -129,6 +129,7 @@ static long process(struct dbCommon *pcommon)
sadset *pdset = (sadset *)(prec->dset);
long status;
unsigned char pact=prec->pact;
epicsUInt32 nord = prec->nord;
if ((pdset==NULL) || (pdset->read_sa==NULL)) {
prec->pact=TRUE;
@@ -148,6 +149,9 @@ static long process(struct dbCommon *pcommon)
if (status)
recGblSetSevr(prec, UDF_ALARM, prec->udfs);
if (nord != prec->nord)
db_post_events(prec, &prec->nord, DBE_VALUE | DBE_LOG);
monitor(prec);
/* process the forward scan link record */
@@ -319,6 +319,7 @@ INP is expected to point to an array field of a waveform record or similar.
% long (*read_sa)(struct subArrayRecord *prec); /*returns: (-1,0)=>(failure,success)*/
%} sadset;
%#define HAS_sadset
%#define SA_POSTS_NORD
%
field(VAL,DBF_NOACCESS) {
prompt("Value")
@@ -396,6 +396,7 @@ routine and NORD is also set at that time.
% long (*read_wf)(struct waveformRecord *prec); /*returns: (-1,0)=>(failure,success)*/
%} wfdset;
%#define HAS_wfdset
%#define WF_POSTS_NORD
%
field(VAL,DBF_NOACCESS) {
prompt("Value")
+2 -2
View File
@@ -19,5 +19,5 @@ softMain$(DEP): epicsInstallDir.h
epicsInstallDir.h: $(TOP)/configure/CONFIG_SITE*
$(ECHO) "FINAL_LOCATION=$(FINAL_LOCATION)"
$(PERL) $(STDDIR)/softIoc/makeInstallDir.pl "$(FINAL_LOCATION)" > $@
$(PERL) $(STDDIR)/softIoc/makeInstallDir.pl "$(FINAL_LOCATION)" > $@.stdout
$(MV) $@.stdout $@
@@ -37,6 +37,6 @@ static long read_string(lsiRecord *prec)
}
static lsidset dev_CSAFEAPPNAME_Version = {
{5, NULL, NULL, NULL, NULL}, read_string
{5, NULL, NULL, NULL, NULL}, read_string
};
epicsExportAddress(dset,dev_CSAFEAPPNAME_Version);
+7 -7
View File
@@ -102,16 +102,16 @@ $SIG{__DIE__} = sub {
};
sub make_fragment {
my $fragment = $_[1];
$fragment =~ s/\W+/-/g;
$fragment = lc($fragment);
$_[1] = $fragment;
my $fragment = $_[1];
$fragment =~ s/\W+/-/g;
$fragment = lc($fragment);
$_[1] = $fragment;
}
my $podRst = EPICS::PodMD->new(
perldoc_url_prefix => '',
perldoc_fragment_format => make_fragment,
markdown_fragment_format => make_fragment,
perldoc_url_prefix => '',
perldoc_fragment_format => make_fragment,
markdown_fragment_format => make_fragment,
);
# Parse the Pod text from the root DBD object
@@ -29,13 +29,6 @@
#include "dbEvent.h"
#include "shareLib.h"
/* Declarations from cadef.h and db_access.h which we can't include here */
typedef void * chid;
typedef void * evid;
epicsShareExtern const unsigned short dbr_value_size[];
epicsShareExtern short epicsShareAPI ca_field_type (chid chan);
#define MAX_UNITS_SIZE 8
#include "dbCaPvt.h"
#include "errlog.h"
#include "testMain.h"
+13 -13
View File
@@ -65,14 +65,14 @@ static void test_operator_display(void){
testdbPutFieldOk("test_ai_rec.HOPR", DBF_SHORT, hopr);
testdbPutFieldOk("test_ai_rec.LOPR", DBF_SHORT, lopr);
testdbPutFieldOk("test_ai_rec.PREC", DBF_SHORT, prec);
/* verify operator display parameters read back */
testdbGetFieldEqual("test_ai_rec.NAME", DBF_STRING, "test_ai_rec");
testdbGetFieldEqual("test_ai_rec.EGU", DBF_STRING, egu);
testdbGetFieldEqual("test_ai_rec.EGU", DBF_STRING, egu);
testdbGetFieldEqual("test_ai_rec.DESC", DBF_STRING, desc);
testdbGetFieldEqual("test_ai_rec.HOPR", DBF_SHORT, hopr);
testdbGetFieldEqual("test_ai_rec.LOPR", DBF_SHORT, lopr);
testdbGetFieldEqual("test_ai_rec.PREC", DBF_SHORT, prec);
testdbGetFieldEqual("test_ai_rec.PREC", DBF_SHORT, prec);
// number of tests = 7
}
@@ -96,7 +96,7 @@ static void test_no_linr_unit_conversion(void){
testdbPutFieldOk("test_ai_rec.ASLO", DBF_SHORT, aslo);
testdbPutFieldOk("test_ai_rec.AOFF", DBF_SHORT, aoff);
testdbPutFieldOk("test_ai_rec.LINR", DBF_LONG, menuConvertNO_CONVERSION);
/* verify conversion */
testdbPutFieldOk("test_ai_link_rec.VAL", DBF_SHORT, rval);
testdbGetFieldEqual("test_ai_rec.VAL", DBF_SHORT, val);
@@ -128,7 +128,7 @@ static void test_slope_linr_unit_conversion(void){
testdbPutFieldOk("test_ai_rec.ESLO", DBF_LONG, eslo);
testdbPutFieldOk("test_ai_rec.EOFF", DBF_LONG, eoff);
testdbPutFieldOk("test_ai_rec.LINR", DBF_LONG, menuConvertSLOPE);
/* verify conversion */
testdbPutFieldOk("test_ai_link_rec.VAL", DBF_LONG, rval);
testdbGetFieldEqual("test_ai_rec.VAL", DBF_LONG, val);
@@ -166,7 +166,7 @@ static void test_linear_linr_unit_conversion(void){
testdbPutFieldOk("test_ai_rec.EGUL", DBF_LONG, egul);
testdbPutFieldOk("test_ai_rec.EGUF", DBF_LONG, eguf);
testdbPutFieldOk("test_ai_rec.LINR", DBF_LONG, menuConvertLINEAR);
/* verify conversion */
testdbPutFieldOk("test_ai_link_rec.VAL", DBF_LONG, rval);
testdbGetFieldEqual("test_ai_rec.VAL", DBF_LONG, val);
@@ -249,7 +249,7 @@ static void test_smoothing_filter(void){
/* set well known starting point (without smmothing) */
testdbPutFieldOk("test_ai_link_rec.VAL", DBF_SHORT, rval1);
testdbGetFieldEqual("test_ai_rec.VAL", DBF_SHORT, val1);
/* set SMOO */
testdbPutFieldOk("test_ai_rec.SMOO", DBF_DOUBLE, smoo);
@@ -365,7 +365,7 @@ static void test_aftc(void){
/* test AFTC using a monitor and time stamps */
testdbPutFieldOk("test_ai_rec3.AFTC", DBF_DOUBLE, aftc);
testdbPutFieldOk("test_ai_rec3.SCAN", DBF_SHORT, menuScan_1_second);
/* set HIHI alarm VAL */
testdbPutFieldOk("test_ai_link_rec3.VAL", DBF_DOUBLE, 7550.0);
@@ -397,11 +397,11 @@ static void test_aftc(void){
/* Verify that alarm status is now MINOR */
testdbGetFieldEqual("test_ai_rec3.SEVR", DBF_SHORT, menuAlarmSevrMINOR);
/* Verify that time is at least equal to configured aftc */
diffTime = epicsTimeDiffInSeconds(&endTime, &startTime);
testOk(diffTime >= aftc, "ATFC time %lf", diffTime);
// number of tests = 18
}
@@ -416,12 +416,12 @@ MAIN(aiTest) {
testPlan(6+6+11+10+12+14+18+15+6+29+18);
testdbPrepare();
testdbPrepare();
testdbReadDatabase("recTestIoc.dbd", NULL, NULL);
recTestIoc_registerRecordDeviceDriver(pdbbase);
testdbReadDatabase("aiTest.db", NULL, NULL);
eltc(0);
testIocInitOk();
eltc(1);
@@ -436,7 +436,7 @@ MAIN(aiTest) {
test_smoothing_filter();
test_udf();
test_alarm();
test_aftc();
test_aftc();
testIocShutdownOk();
testdbCleanup();
+8 -8
View File
@@ -51,16 +51,16 @@ static void test_operator_display(void){
testdbPutFieldOk("test_bi_rec.DESC", DBF_STRING, "DESC_TEST");
/* verify operator display parameters */
testdbGetFieldEqual("test_bi_rec.ZNAM", DBF_STRING, "ZNAM_TEST");
testdbGetFieldEqual("test_bi_rec.ONAM", DBF_STRING, "ONAM_TEST");
testdbGetFieldEqual("test_bi_rec.ZNAM", DBF_STRING, "ZNAM_TEST");
testdbGetFieldEqual("test_bi_rec.ONAM", DBF_STRING, "ONAM_TEST");
testdbGetFieldEqual("test_bi_rec.NAME", DBF_STRING, "test_bi_rec");
testdbGetFieldEqual("test_bi_rec.DESC", DBF_STRING, "DESC_TEST");
/* verify conversion */
testdbPutFieldOk("test_bi_link_rec.VAL", DBF_SHORT, TRUE);
testdbGetFieldEqual("test_bi_rec.VAL", DBF_STRING, "ONAM_TEST");
testdbGetFieldEqual("test_bi_rec.VAL", DBF_STRING, "ONAM_TEST");
testdbPutFieldOk("test_bi_link_rec.VAL", DBF_SHORT, FALSE);
testdbGetFieldEqual("test_bi_rec.VAL", DBF_STRING, "ZNAM_TEST");
testdbGetFieldEqual("test_bi_rec.VAL", DBF_STRING, "ZNAM_TEST");
// number of tests = 11
}
@@ -78,7 +78,7 @@ static void test_alarm(void){
testdbPutFieldOk("test_bi_rec.ZSV", DBF_SHORT, menuAlarmSevrNO_ALARM);
testdbPutFieldOk("test_bi_rec.OSV", DBF_SHORT, menuAlarmSevrMINOR);
testdbPutFieldOk("test_bi_rec.COSV", DBF_SHORT, menuAlarmSevrINVALID);
/* verify alarm status is NO_ALARM*/
testdbGetFieldEqual("test_bi_rec.SEVR", DBF_SHORT, menuAlarmSevrNO_ALARM);
@@ -92,7 +92,7 @@ static void test_alarm(void){
/* verify LAML */
testdbGetFieldEqual("test_bi_rec.LALM", DBF_SHORT, TRUE);
// number of tests = 13
}
@@ -100,12 +100,12 @@ MAIN(biTest) {
testPlan(6+6+11+13);
testdbPrepare();
testdbPrepare();
testdbReadDatabase("recTestIoc.dbd", NULL, NULL);
recTestIoc_registerRecordDeviceDriver(pdbbase);
testdbReadDatabase("biTest.db", NULL, NULL);
eltc(0);
testIocInitOk();
eltc(1);
+7 -7
View File
@@ -76,16 +76,16 @@ static void test_operator_display(void){
testdbPutFieldOk("test_bo_rec.DESC", DBF_STRING, "DESC_TEST");
/* verify operator display parameters */
testdbGetFieldEqual("test_bo_rec.ZNAM", DBF_STRING, "ZNAM_TEST");
testdbGetFieldEqual("test_bo_rec.ONAM", DBF_STRING, "ONAM_TEST");
testdbGetFieldEqual("test_bo_rec.ZNAM", DBF_STRING, "ZNAM_TEST");
testdbGetFieldEqual("test_bo_rec.ONAM", DBF_STRING, "ONAM_TEST");
testdbGetFieldEqual("test_bo_rec.NAME", DBF_STRING, "test_bo_rec");
testdbGetFieldEqual("test_bo_rec.DESC", DBF_STRING, "DESC_TEST");
/* verify conversion */
testdbPutFieldOk("test_bo_rec.VAL", DBF_SHORT, TRUE);
testdbGetFieldEqual("test_bo_rec.VAL", DBF_STRING, "ONAM_TEST");
testdbGetFieldEqual("test_bo_rec.VAL", DBF_STRING, "ONAM_TEST");
testdbPutFieldOk("test_bo_rec.VAL", DBF_SHORT, FALSE);
testdbGetFieldEqual("test_bo_rec.VAL", DBF_STRING, "ZNAM_TEST");
testdbGetFieldEqual("test_bo_rec.VAL", DBF_STRING, "ZNAM_TEST");
// number of tests = 11
}
@@ -104,7 +104,7 @@ static void test_alarm(void){
testdbPutFieldOk("test_bo_rec.COSV", DBF_SHORT, menuAlarmSevrINVALID);
testdbPutFieldOk("test_bo_rec.IVOA", DBF_SHORT, menuIvoaSet_output_to_IVOV);
testdbPutFieldOk("test_bo_rec.IVOV", DBF_SHORT, FALSE);
/* Verify alarm status is NO_ALARM*/
testdbGetFieldEqual("test_bo_rec.SEVR", DBF_SHORT, menuAlarmSevrNO_ALARM);
@@ -136,12 +136,12 @@ MAIN(boTest) {
testPlan(4+7+11+22);
testdbPrepare();
testdbPrepare();
testdbReadDatabase("recTestIoc.dbd", NULL, NULL);
recTestIoc_registerRecordDeviceDriver(pdbbase);
testdbReadDatabase("boTest.db", NULL, NULL);
eltc(0);
testIocInitOk();
eltc(1);
+1 -1
View File
@@ -653,7 +653,7 @@ void
testAIAveragePartial(void) {
double buf = 0.;
double data[5] = {1., 2., 3., 4., 5.};
/*
/*
* Note that the fifth dbPut essentially resets the circular buffer, so the
* average is once again the average of the _first_ entry alone.
*/
@@ -6,7 +6,7 @@
\*************************************************************************/
/* Compile and link test for epicsExport.h
*
*
* Test if macros eppicsExportAddr, epicsExportRegistrar and epicsRegisterFunction
* expand to valid C and C++ code, in the latter case regardless if
* wrapped with extern "C" {} or not.
@@ -6,7 +6,7 @@
\*************************************************************************/
/* Compile and link test for epicsExport.h
*
*
*/
#include <epicsUnitTest.h>
+4 -4
View File
@@ -146,7 +146,7 @@ static void test_oopt_when_transition_nonzero(void){
/* write a transition to non-zero */
testdbPutFieldOk("longout_rec.VAL", DBF_LONG, 18);
/* Test if the counter_a was processed */
testdbGetFieldEqual("counter_a", DBF_DOUBLE, 1.0);
@@ -156,7 +156,7 @@ static void test_oopt_when_transition_nonzero(void){
static void test_changing_out_field(void){
/* change OOPT to On Change */
testdbPutFieldOk("longout_rec.OOPT", DBF_ENUM, longoutOOPT_On_Change);
/* write an initial value */
testdbPutFieldOk("longout_rec.VAL", DBF_LONG, 16);
@@ -225,7 +225,7 @@ static void test_changing_out_field(void){
/* reset rec processing counters */
testdbPutFieldOk("counter_a.VAL", DBF_DOUBLE, 0.0);
/* test if record with OOPT == On Change will
/* test if record with OOPT == On Change will
write to output at its first process */
testdbPutFieldOk("longout_rec2.VAL", DBF_LONG, 16);
@@ -250,7 +250,7 @@ MAIN(longoutTest) {
recTestIoc_registerRecordDeviceDriver(pdbbase);
testdbReadDatabase("longoutTest.db", NULL, NULL);
eltc(0);
testIocInitOk();
eltc(1);
+7 -7
View File
@@ -196,20 +196,20 @@ static void test_F_format(void){
/* set value on inp0 */
testdbPutFieldOk("test_printf_inp0_rec.VAL", DBF_DOUBLE, 6729982.999);
/* verify that string is formatted as expected */
// visual studio less than 2015 does not support %F
// mingw/gcc also fails, suspect this may be gcc version
// related and checking __GNUC__ could resolve but
// related and checking __GNUC__ could resolve but
// initial attempts didn't work so excluding mingw entirely for now
#ifdef _WIN32
#if (defined(_MSC_VER) && _MSC_VER < 1900) || defined(_MINGW)
testTodoBegin("Fails on windows with old visual studio versions and mingw");
#endif
#endif
testdbGetFieldEqual("test_printf_rec.VAL", DBF_STRING, result_string);
#ifdef _WIN32
#if (defined(_MSC_VER) && _MSC_VER < 1900) || defined(_MINGW)
testTodoEnd();
@@ -422,7 +422,7 @@ static void test_l_flag(void){
/* set value on inp0 */
testdbPutFieldOk("test_printf_inp0_rec.VAL", DBF_LONG, 0x70a1c0c1);
/* verify that string is formatted as expected */
testdbGetFieldEqual("test_printf_rec.VAL", DBF_STRING, result_string);
// number of tests = 3
@@ -532,12 +532,12 @@ MAIN(printfTest) {
testPlan(3+3+3+3+3+3+3+3+4+3+3+3+3+3+3+3+3+3+3+3+3+3+3+3+6+6+12);
testdbPrepare();
testdbPrepare();
testdbReadDatabase("recTestIoc.dbd", NULL, NULL);
recTestIoc_registerRecordDeviceDriver(pdbbase);
testdbReadDatabase("printfTest.db", NULL, NULL);
eltc(0);
testIocInitOk();
eltc(1);
+3 -4
View File
@@ -237,9 +237,8 @@ void testLinkSevr(void)
startRegressTestIoc("regressLinkSevr.db");
/* wait for CA links to connect and receive an initial update */
testdbCaWaitForUpdateCount(dbGetDevLink(testdbRecordPtr("si2")), 1);
testdbCaWaitForUpdateCount(dbGetDevLink(testdbRecordPtr("li2")), 1);
testOk1(dbIsLinkConnected(dbGetDevLink(testdbRecordPtr("si2"))));
testOk1(dbIsLinkConnected(dbGetDevLink(testdbRecordPtr("li2"))));
chan = dbChannelCreate("ai.SEVR");
if(!chan)
@@ -272,7 +271,7 @@ void testLinkSevr(void)
MAIN(regressTest)
{
testPlan(96);
testPlan(98);
testArrayLength1();
testHexConstantLinks();
testLinkMS();
+1 -1
View File
@@ -49,7 +49,7 @@ MAIN(subproctest)
* the testdbPutField call above goes through, so we get a partial
* result of the PROC field being left as 1. */
testdbGetFieldEqual("InvalidINPARec.PROC", DBF_LONG, 1);
testIocShutdownOk();
testdbCleanup();
+2 -2
View File
@@ -2,7 +2,7 @@
* (C) 2014 David Lettier.
* http://www.lettier.com/
* SPDX-License-Identifier: BSD-3-Clause
*
*
* use of UDP funktions and implement timeout, HPJ 15.12.2025
\*************************************************************************/
@@ -33,7 +33,7 @@ int epicsNtpGetTime(char *ntpIp, struct timespec *now)
/* Create an UDP socket, use IP address of given nameserver, set the port number
struct sockaddr_in serv_addr; // Server address data structure.
add timout of 2 seconds
add timout of 2 seconds.
*/
struct sockaddr_in serv_addr = {
.sin_family = AF_INET,
+15 -15
View File
@@ -90,7 +90,7 @@
#ifndef RTEMS_LEGACY_STACK
// setup own ntp-client to get time
#include "epicsNtp.h"
epicsEventId dhcpDone;
epicsEventId dhcpDone;
#endif
/* these settings are needed by the rtems startup
@@ -507,11 +507,11 @@ static void rtshellCallFunc(const iocshArgBuf *args)
{
rtems_shell_cmd_t *cmd = rtems_shell_lookup_cmd(args[0].sval);
int ret;
if (!cmd) {
fprintf(stderr, "ERR: No such command\n");
iocshSetError(-1);
} else {
fflush(stdout);
fflush(stderr);
@@ -768,7 +768,7 @@ dhcpcd_hook_handler(rtems_dhcpcd_hook *hook, char *const *env)
printf("\n");
for (;NULL != *env;++env) {
printf("dhcpcd ---> '%s'\n", *env);
for(const struct dhcp_vars_t* var = dhcp_vars; var->name; var++) {
size_t namelen = strlen(var->name);
@@ -811,8 +811,8 @@ dhcpcd_hook_handler(rtems_dhcpcd_hook *hook, char *const *env)
}
static rtems_dhcpcd_hook dhcpcd_hook = {
.name = "ioc boot",
.handler = dhcpcd_hook_handler
.name = "ioc boot",
.handler = dhcpcd_hook_handler
};
static void
@@ -869,7 +869,7 @@ default_network_dhcpcd(void)
rv = close(fd);
assert(rv == 0);
}
sc = rtems_dhcpcd_start(NULL);
assert(sc == RTEMS_SUCCESSFUL);
}
@@ -944,10 +944,10 @@ rtems_telnetd_config_table rtems_telnetd_config = {
void *
POSIX_Init ( void *argument __attribute__((unused)))
{
int result;
char *argv[3] = { NULL, NULL, NULL };
rtems_status_code sc;
struct timespec now;
int result;
char *argv[3] = { NULL, NULL, NULL };
rtems_status_code sc;
struct timespec now;
char timeBuff[100];
initConsole ();
@@ -1004,7 +1004,7 @@ POSIX_Init ( void *argument __attribute__((unused)))
/*
* Create a reasonable environment
*/
putenv ("TERM=xterm");
putenv ("IOCSH_HISTSIZE=20");
@@ -1063,13 +1063,13 @@ POSIX_Init ( void *argument __attribute__((unused)))
// wait for dhcp done ... should be if SYNCDHCP is used
epicsEventWaitStatus stat;
printf("\n ---- Waiting for DHCP ...\n");
stat = epicsEventWaitWithTimeout(dhcpDone, 600);
stat = epicsEventWaitWithTimeout(dhcpDone, 600);
if (stat == epicsEventOK)
epicsEventDestroy(dhcpDone);
epicsEventDestroy(dhcpDone);
else if (stat == epicsEventWaitTimeout)
printf("\n ---- DHCP timed out!\n");
else
printf("\n ---- dhcpDone Event Unknown state %d\n", stat);
printf("\n ---- dhcpDone Event Unknown state %d\n", stat);
const char* ifconfg_args[] = {
"ifconfig", NULL
+6 -6
View File
@@ -305,17 +305,17 @@ LIBCOM_API int epicsStdCall bucketFree (BUCKET *prb)
/*
* bucketAddItem()
*/
LIBCOM_API int epicsStdCall
LIBCOM_API int epicsStdCall
bucketAddItemUnsignedId(BUCKET *prb, const unsigned *pId, const void *pApp)
{
return bucketAddItem(prb, &BSET[bidtUnsigned], pId, pApp);
}
LIBCOM_API int epicsStdCall
LIBCOM_API int epicsStdCall
bucketAddItemPointerId(BUCKET *prb, void * const *pId, const void *pApp)
{
return bucketAddItem(prb, &BSET[bidtPointer], pId, pApp);
}
LIBCOM_API int epicsStdCall
LIBCOM_API int epicsStdCall
bucketAddItemStringId(BUCKET *prb, const char *pId, const void *pApp)
{
return bucketAddItem(prb, &BSET[bidtString], pId, pApp);
@@ -412,17 +412,17 @@ LIBCOM_API void * epicsStdCall bucketLookupAndRemoveItemStringId (BUCKET *prb, c
/*
* bucketRemoveItem()
*/
LIBCOM_API int epicsStdCall
LIBCOM_API int epicsStdCall
bucketRemoveItemUnsignedId (BUCKET *prb, const unsigned *pId)
{
return bucketLookupAndRemoveItem(prb, &BSET[bidtUnsigned], pId)?S_bucket_success:S_bucket_uknId;
}
LIBCOM_API int epicsStdCall
LIBCOM_API int epicsStdCall
bucketRemoveItemPointerId (BUCKET *prb, void * const *pId)
{
return bucketLookupAndRemoveItem(prb, &BSET[bidtPointer], pId)?S_bucket_success:S_bucket_uknId;
}
LIBCOM_API int epicsStdCall
LIBCOM_API int epicsStdCall
bucketRemoveItemStringId (BUCKET *prb, const char *pId)
{
return bucketLookupAndRemoveItem(prb, &BSET[bidtString], pId)?S_bucket_success:S_bucket_uknId;
+1 -1
View File
@@ -17,7 +17,7 @@
* Provides routines for converting various numeric types into an ascii string.
* They off a combination of speed and convenience not available with sprintf().
*
* All functions return the number of characters in the output
* All functions return the number of characters in the output
*/
#ifndef INCcvtFasth
+1 -1
View File
@@ -5,7 +5,7 @@
# in file LICENSE that is included with this distribution.
#*************************************************************************
# This is a Makefile fragment, see src/libCom/Makefile.
# This is a Makefile fragment, see libCom/src/Makefile.
envData.c: $(LIBCOM)/env/envDefs.h \
$(INSTALL_HOST_BIN)/bldEnvData.pl \
+1 -1
View File
@@ -394,7 +394,7 @@ epicsPrtEnvParams(void)
/*
* envGetInetPortConfigParam ()
*/
LIBCOM_API unsigned short epicsStdCall envGetInetPortConfigParam
LIBCOM_API unsigned short epicsStdCall envGetInetPortConfigParam
(const ENV_PARAM *pEnv, unsigned short defaultPort)
{
long longStatus;
+1 -1
View File
@@ -241,7 +241,7 @@ LIBCOM_API void errlogFlush(void);
* ::errVerbose determines if the filename and line number are shown.
*/
LIBCOM_API void errPrintf(
long status, const char *pFileName, int lineno,
long status, const char *pFileName, int lineno,
EPICS_PRINTF_FMT(const char *pformat), ...
) EPICS_PRINTF_STYLE(4,5);
+2 -2
View File
@@ -101,7 +101,7 @@ template class resTable<timerForOldFdmgr, chronIntId>;
# pragma warning ( pop )
#endif
LIBCOM_API fdRegForOldFdmgr::fdRegForOldFdmgr
LIBCOM_API fdRegForOldFdmgr::fdRegForOldFdmgr
(const SOCKET fdIn, const fdRegType typeIn,
const bool onceOnlyIn, fdManager &managerIn,
pCallBackFDMgr pFuncIn, void *pParamIn) :
@@ -322,7 +322,7 @@ extern "C" LIBCOM_API int epicsStdCall fdmgr_clear_fd (fdctx *pfdctx, SOCKET fd)
/*
* deprecated interface
*/
extern "C" LIBCOM_API int epicsStdCall fdmgr_add_fd (
extern "C" LIBCOM_API int epicsStdCall fdmgr_add_fd (
fdctx *pfdctx, SOCKET fd, void (*pfunc)(void *pParam), void *param)
{
return fdmgr_add_callback (pfdctx, fd, fdi_read, pfunc, param);
+1 -1
View File
@@ -54,7 +54,7 @@ typedef struct {
epicsMutexId lock;
}FREELISTPVT;
LIBCOM_API void epicsStdCall
LIBCOM_API void epicsStdCall
freeListInitPvt(void **ppvt,int size,int nmalloc)
{
FREELISTPVT *pfl;
Loaded 100 of 169 files, more files were not shown because too many files have changed in this diff. Show more