Compare commits

..

31 Commits

Author SHA1 Message Date
6bb78e0d59 bump rpm release
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 / 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
2024-11-25 11:33:27 +01:00
7d73932dc8 fix recursion bug
Previously, linking a field of e.g. a calc record to itself
(calc.INPA = calc.A) directly or through a chain of other records
that support to follow the link for attributes like units, precision
caused an infinite recursion and crashed the ioc.

Affected records: calc, calcout, seq, sub and aSub

Also added support for seq link 0 fields which had been added meanwhile.
2024-11-25 11:32:41 +01:00
4a442bb56c Support deb12-x86_64 2024-11-25 09:27:53 +01:00
60075df3cf Support deb10-x86_64 as a Host arch (allow to build modules on the system) 2024-11-25 09:26:50 +01:00
42892f3921 make VALID_BUILDS contain Host automatically if BUILD_CLASS is HOST 2024-11-18 10:26:59 +01:00
52b3496084 bump rpm release
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 / 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
2024-09-06 16:55:30 +02:00
2296dbc132 Merge remote-tracking branch 'github/propmon' into PSI-7.0 2024-09-06 14:56:21 +02:00
4af01ed26a Merge branch '7.0' into PSI-7.0 2024-09-06 14:55:12 +02:00
d83079999b keep unversioned libs for all linux version
Prevent future problems with versioned libs when we update patch levels.
2024-09-06 14:39:41 +02:00
15a2e22149 revert MAINTENANCE_VERSION numbers to keep dynamic linking compatible 2024-09-06 14:39:21 +02:00
2dc71ebd6e Revert "use versioned libraries from now on for all architectures"
This reverts commit ecb02803c8.
It turned out that we run into unnecessary dynalic link problems when
minor (but compatible) changes cause *_MAINENANCE_VERSION to be
incremented even though the library is compatible.
Maybe use -soname MAJOR.MINOR or -soname MAJOR instead later?
2024-09-06 10:32:17 +02: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
7077ece7f9 Send DBE_PROPERTY events before DBE_VALUE | DBE_LOG events to allow clients to update their formatting etc in time 2024-09-02 13:45:25 +02:00
22aaded26d fix DBE_PROPERTY events for mbbi/mbbo records 2024-09-02 11:46:49 +02:00
c1b8831205 send DBE_PROPERTY events only if property field actually changed 2024-09-02 11:46:16 +02:00
150 changed files with 805 additions and 159 deletions

View File

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

View File

@@ -2,7 +2,7 @@
EPICS_DATABASE_MAJOR_VERSION = 3
EPICS_DATABASE_MINOR_VERSION = 23
EPICS_DATABASE_MAINTENANCE_VERSION = 2
EPICS_DATABASE_MAINTENANCE_VERSION = 1
# Development flag, set to zero for release versions

View File

@@ -2,7 +2,7 @@
EPICS_LIBCOM_MAJOR_VERSION = 3
EPICS_LIBCOM_MINOR_VERSION = 23
EPICS_LIBCOM_MAINTENANCE_VERSION = 2
EPICS_LIBCOM_MAINTENANCE_VERSION = 1
# Development flag, set to zero for release versions

View File

@@ -8,7 +8,7 @@
#-------------------------------------------------------
# Unix valid build types
VALID_BUILDS = Host Ioc Command
VALID_BUILDS = $(if $(filter HOST,$(BUILD_CLASS)),Host) Ioc Command
#-------------------------------------------------------
# Unix prefix and suffix definitions

View File

@@ -1,11 +1,16 @@
# Cross Debian 10 with gcc 8.3
# Debian 10
# Include definitions common to all Linux targets
include $(CONFIG)/os/CONFIG.Common.linuxCommon
include $(CONFIG)/os/CONFIG.Common.linux-x86_64
ARCH_CLASS = x86_64
GNU_DIR = /opt/xgcc/gcc-8.3.0-deb10
GNU_TARGET = x86_64-deb10-linux-gnu
BUILD_CLASS = HOST
STD_CXXFLAGS = -std=c++17
ifneq ($(EPICS_HOST_ARCH),$(T_A))
# Cross compile
GNU_DIR = /opt/xgcc/gcc-8.3.0-deb10
GNU_TARGET = x86_64-deb10-linux-gnu
SYSROOT = $(GNU_DIR)/$(GNU_TARGET)/sys-root
CMPLR_PREFIX = $(GNU_TARGET)-
endif

View File

@@ -0,0 +1,17 @@
# Debian 12
# Include definitions common to all Linux targets
include $(CONFIG)/os/CONFIG.Common.linux-x86_64
BUILD_CLASS = HOST
STD_CXXFLAGS = -std=c++17
ifneq ($(EPICS_HOST_ARCH),$(T_A))
# Cross compile
GNU_DIR = /opt/xgcc/gcc-12.2.0-deb12
GNU_TARGET = x86_64-deb12-linux-gnu
SYSROOT = $(GNU_DIR)/$(GNU_TARGET)/sys-root
CMPLR_PREFIX = $(GNU_TARGET)-
ARCH_DEP_LDFLAGS+=-Wl,-rpath-link,$(SYSROOT)/lib/x86_64-linux-gnu
endif

View File

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

View File

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

View File

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

View File

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

View File

@@ -0,0 +1,2 @@
# Debian 10
COMMANDLINE_LIBRARY=READLINE

View File

@@ -18,6 +18,8 @@ GNU_DIR = $(SYSROOT)$(TOOLSET_DIR)
TARGET_CPPFLAGS += $(SYSROOT:%=--sysroot=%)
TARGET_LDFLAGS += $(SYSROOT:%=--sysroot=%)
ifeq ($(filter SL% RHEL%,$(T_A)),)
VALID_BUILDS = Ioc Command
endif
# backward compatibility: Keep unversioned libs
# in order to prevent dynamic linking problems
# when minor changes increment *_MAINTENANCE_VERSION
SHRLIB_SUFFIX = $(SHRLIB_SUFFIX_BASE)
LOADABLE_SHRLIB_SUFFIX = $(SHRLIB_SUFFIX_BASE)

View File

@@ -21,8 +21,9 @@ CROSS_COMPILER_TARGET_ARCHS += windows-x64
#CROSS_COMPILER_TARGET_ARCHS += yocto21-aarch64
CROSS_COMPILER_TARGET_ARCHS += yocto40-aarch64
# Debian 10
# Debian
CROSS_COMPILER_TARGET_ARCHS += deb10-x86_64
CROSS_COMPILER_TARGET_ARCHS += deb12-x86_64
# Newer DeltaTau PowerPMAC
CROSS_COMPILER_TARGET_ARCHS += gcc8-ppc4xxFP

View File

@@ -22,6 +22,11 @@ should also be read to understand what has changed since earlier releases:
## Changes made on the 7.0 branch since 7.0.8.1
### DBE_PROPERTY event rate changed
Updating property fields now only post DBE_PROPERTY events if the
field actually changed.
### Allow to load the same alias multiple times
Aliases can now be defined multiple times as long as they still refer to the

View File

@@ -5,7 +5,7 @@
Name: epics-base-%{EpicsVersion}
Summary: EPICS Base %{EpicsVersion}
Version: 2
Release: 0%{?dist}
Release: 2%{?dist}
License: EPICS Open License
Group: Development/Languages
URL: https://git.psi.ch/epics_base/base-7.0
@@ -334,19 +334,52 @@ fi
###########################################
%files boot
# including files to build on some Linux cross archs
# hence some configure/* and lib/perl/* listed twice
%defattr(-,root,root,-)
%dir %{prog_folder}
%dir %{prog_folder}/configure
%{prog_folder}/configure/CONFIG_BASE_VERSION
%{prog_folder}/configure/RELEASE
%{prog_folder}/configure/CONFIG*
%{prog_folder}/configure/RULES*
%dir %{prog_folder}/configure/os
%{prog_folder}/configure/os/CONFIG.Common.UnixCommon
%{prog_folder}/configure/os/CONFIG.Common.linuxCommon
%{prog_folder}/configure/os/CONFIG.Common.linux-clang
%{prog_folder}/configure/os/CONFIG.Common.linux-%{_host_cpu}*
%{prog_folder}/configure/os/CONFIG.Common.[a-z]*-*
%{prog_folder}/configure/os/CONFIG.UnixCommon.Common
%{prog_folder}/configure/os/CONFIG.[a-z]*-*.Common
%{prog_folder}/configure/os/CONFIG.[a-z]*-*.[a-z]*-*
%{prog_folder}/configure/os/CONFIG.linux-*.Common
%{prog_folder}/configure/os/CONFIG.linux-*.linux-*
%{prog_folder}/configure/os/CONFIG_SITE.Common.linuxCommon
%{prog_folder}/configure/os/CONFIG_SITE.Common.linux-*
%{prog_folder}/configure/os/CONFIG_SITE.[a-z]*-*.Common
%{prog_folder}/configure/os/CONFIG_SITE.linux-*.Common
%{prog_folder}/configure/os/CONFIG_SITE.linux-*.UnixCommon
%{prog_folder}/configure/os/CONFIG_SITE.linux-*.linux-*
%dir %{prog_folder}/include
%{prog_folder}/include/*.h
%{prog_folder}/include/compiler
%dir %{prog_folder}/include/os
%{prog_folder}/include/os/Linux/
%{prog_folder}/include/pv/
%{prog_folder}/include/pva/
%{prog_folder}/include/valgrind/
%{prog_folder}/include/flex.skel.static
%dir %{prog_folder}/dbd
%{prog_folder}/dbd/softIoc*.dbd
%{prog_folder}/db
%dir %{prog_folder}/lib
# avoid pulling in pkgconfig and perl
%dir %{prog_folder}/lib/[a-z]*-*
%{prog_folder}/lib/[a-z]*-*/*.so*
%dir %{prog_folder}/lib/perl
%{prog_folder}/lib/perl/EPICS
%{prog_folder}/lib/perl/DBD*
%dir %{prog_folder}/bin
# avoid pulling in host files again
@@ -354,9 +387,11 @@ fi
# including all Windows dlls (hence listed twice: here and in wine)
%dir %{prog_folder}/bin/[a-z]*
%{prog_folder}/bin/[a-z]*/[Scips]*[^.]??
%{prog_folder}/bin/[a-z]*/p2p
%{prog_folder}/bin/[a-z]*/msi*
%{prog_folder}/bin/[a-z]*/acctst*
%{prog_folder}/bin/[a-z]*/*.dll
%{prog_folder}/bin/[a-z]*/registerRecordDeviceDriver*
# vxWorks and RTEMS
%dir %{prog_folder}/bin/V*

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,7 +389,7 @@ 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 */
@@ -556,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

@@ -224,6 +224,8 @@ got_header:
fprintf(outFile,"}\n");
fclose(inFile);
fclose(outFile);
free(outFilename);
free(pname);
return(0);
}

View File

@@ -1353,6 +1353,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;
@@ -1397,12 +1398,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);
@@ -1419,12 +1439,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

@@ -14,6 +14,8 @@
* 505 665 1831
*/
#define USE_TYPED_DBEVENT
#include <string>
#include <stdexcept>

View File

@@ -13,6 +13,8 @@
* 505 665 1831
*/
#define USE_TYPED_DBEVENT
#include <limits.h>
#include "epicsMutex.h"

View File

@@ -12,6 +12,8 @@
* Author Jeff Hill
*/
#define USE_TYPED_DBEVENT
#include <stdlib.h>
#include "epicsMutex.h"

View File

@@ -19,6 +19,8 @@
*/
#define EPICS_PRIVATE_API
#define USE_TYPED_DBEVENT
#include <stddef.h>
#include <stdlib.h>
#include <stdio.h>

View File

@@ -32,6 +32,15 @@ struct dbChannel;
struct db_field_log;
struct evSubscrip;
#ifdef USE_TYPED_DBEVENT
struct dbEventContext; // use dbEventCtx
typedef struct evSubscrip* dbEventSubscription;
typedef struct dbEventContext* dbEventCtx;
#else
typedef void * dbEventSubscription;
typedef void * dbEventCtx;
#endif
DBCORE_API int db_event_list (
const char *name, unsigned level);
DBCORE_API int dbel (
@@ -39,8 +48,6 @@ DBCORE_API int dbel (
DBCORE_API int db_post_events (
void *pRecord, void *pField, unsigned caEventMask );
typedef void * dbEventCtx;
typedef void EXTRALABORFUNC (void *extralabor_arg);
DBCORE_API dbEventCtx db_init_events (void);
DBCORE_API int db_start_events (
@@ -63,7 +70,6 @@ DBCORE_API void db_init_event_freelists (void);
typedef void EVENTFUNC (void *user_arg, struct dbChannel *chan,
int eventsRemaining, struct db_field_log *pfl);
typedef void * dbEventSubscription;
DBCORE_API dbEventSubscription db_add_event (
dbEventCtx ctx, struct dbChannel *chan,
EVENTFUNC *user_sub, void *user_arg, unsigned select);

View File

@@ -15,6 +15,8 @@
* 505 665 1831
*/
#define USE_TYPED_DBEVENT
#include <string>
#include <stdexcept>

View File

@@ -14,6 +14,8 @@
* 505 665 1831
*/
#define USE_TYPED_DBEVENT
#include <string>
#include <stdexcept>

View File

@@ -14,6 +14,7 @@
#include <string.h>
#define EPICS_PRIVATE_API
#define USE_TYPED_DBEVENT
#include "dbmf.h"
#include "epicsUnitTest.h"

View File

@@ -2219,13 +2219,11 @@ long dbInitRecordLinks(dbRecordType *rtyp, struct dbCommon *prec)
} else if(dbCanSetLink(plink, &link_info, devsup)!=0) {
errlogPrintf(ERL_ERROR ": %s.%s: can't initialize link type %s with \"%s\" (type %s)\n",
prec->name, pflddes->name, pamaplinkType[plink->type].strvalue,
plink->text, pamaplinkType[link_info.ltype].strvalue);
prec->name, pflddes->name, pamaplinkType[plink->type].strvalue, plink->text, pamaplinkType[link_info.ltype].strvalue);
} else if(dbSetLink(plink, &link_info, devsup)) {
errlogPrintf(ERL_ERROR ": %s.%s: failed to initialize link type %s with \"%s\" (type %s)\n",
prec->name, pflddes->name, pamaplinkType[plink->type].strvalue,
plink->text, pamaplinkType[link_info.ltype].strvalue);
prec->name, pflddes->name, pamaplinkType[plink->type].strvalue, plink->text, pamaplinkType[link_info.ltype].strvalue);
}
free(plink->text);
plink->text = NULL;

View File

@@ -302,6 +302,16 @@ static long get_outlinkNumber(int fieldIndex) {
return -1;
}
#define do_recursion_safe(func, plink, ...) \
do { \
dbScanLock((dbCommon*)prec); \
DBLINK link = *(plink); \
(plink)->lset = NULL; \
func(&link, __VA_ARGS__); \
(plink)->lset = link.lset; \
dbScanUnlock((dbCommon*)prec); \
} while(0)
static long get_units(DBADDR *paddr, char *units)
{
aSubRecord *prec = (aSubRecord *)paddr->precord;
@@ -309,12 +319,12 @@ static long get_units(DBADDR *paddr, char *units)
linkNumber = get_inlinkNumber(dbGetFieldIndex(paddr));
if (linkNumber >= 0) {
dbGetUnits(&prec->inpa + linkNumber, units, DB_UNITS_SIZE);
do_recursion_safe(dbGetUnits, &prec->inpa + linkNumber, units, DB_UNITS_SIZE);
return 0;
}
linkNumber = get_outlinkNumber(dbGetFieldIndex(paddr));
if (linkNumber >= 0) {
dbGetUnits(&prec->outa + linkNumber, units, DB_UNITS_SIZE);
do_recursion_safe(dbGetUnits, &prec->outa + linkNumber, units, DB_UNITS_SIZE);
}
return 0;
}
@@ -322,27 +332,25 @@ static long get_units(DBADDR *paddr, char *units)
static long get_precision(const DBADDR *paddr, long *pprecision)
{
aSubRecord *prec = (aSubRecord *)paddr->precord;
long status;
int fieldIndex = dbGetFieldIndex(paddr);
int linkNumber;
short precision;
*pprecision = prec->prec;
linkNumber = get_inlinkNumber(fieldIndex);
if (linkNumber >= 0) {
short precision;
if (dbGetPrecision(&prec->inpa + linkNumber, &precision) == 0)
*pprecision = precision;
do_recursion_safe(status = dbGetPrecision, &prec->inpa + linkNumber, &precision);
if (status == 0) *pprecision = precision;
return 0;
}
linkNumber = get_outlinkNumber(fieldIndex);
if (linkNumber >= 0) {
short precision;
if (dbGetPrecision(&prec->outa + linkNumber, &precision) == 0)
*pprecision = precision;
} else
recGblGetPrec(paddr, pprecision);
do_recursion_safe(status = dbGetPrecision, &prec->outa + linkNumber, &precision);
if (status == 0) *pprecision = precision;
return 0;
}
recGblGetPrec(paddr, pprecision);
return 0;
}
@@ -354,16 +362,16 @@ static long get_graphic_double(DBADDR *paddr, struct dbr_grDouble *pgd)
linkNumber = get_inlinkNumber(fieldIndex);
if (linkNumber >= 0) {
dbGetGraphicLimits(&prec->inpa + linkNumber,
&pgd->lower_disp_limit,
&pgd->upper_disp_limit);
do_recursion_safe(dbGetGraphicLimits, &prec->inpa + linkNumber,
&pgd->lower_disp_limit,
&pgd->upper_disp_limit);
return 0;
}
linkNumber = get_outlinkNumber(fieldIndex);
if (linkNumber >= 0) {
dbGetGraphicLimits(&prec->outa + linkNumber,
&pgd->lower_disp_limit,
&pgd->upper_disp_limit);
do_recursion_safe(dbGetGraphicLimits, &prec->outa + linkNumber,
&pgd->lower_disp_limit,
&pgd->upper_disp_limit);
}
return 0;
}
@@ -382,20 +390,20 @@ static long get_alarm_double(DBADDR *paddr, struct dbr_alDouble *pad)
linkNumber = get_inlinkNumber(fieldIndex);
if (linkNumber >= 0) {
dbGetAlarmLimits(&prec->inpa + linkNumber,
&pad->lower_alarm_limit,
&pad->lower_warning_limit,
&pad->upper_warning_limit,
&pad->upper_alarm_limit);
do_recursion_safe(dbGetAlarmLimits, &prec->inpa + linkNumber,
&pad->lower_alarm_limit,
&pad->lower_warning_limit,
&pad->upper_warning_limit,
&pad->upper_alarm_limit);
return 0;
}
linkNumber = get_outlinkNumber(fieldIndex);
if (linkNumber >= 0) {
dbGetAlarmLimits(&prec->outa + linkNumber,
&pad->lower_alarm_limit,
&pad->lower_warning_limit,
&pad->upper_warning_limit,
&pad->upper_alarm_limit);
do_recursion_safe(dbGetAlarmLimits, &prec->outa + linkNumber,
&pad->lower_alarm_limit,
&pad->lower_warning_limit,
&pad->upper_warning_limit,
&pad->upper_alarm_limit);
return 0;
}
recGblGetAlarmDouble(paddr, pad);

View File

@@ -166,6 +166,16 @@ static long get_linkNumber(int fieldIndex) {
return -1;
}
#define do_recursion_safe(func, plink, ...) \
do { \
dbScanLock((dbCommon*)prec); \
DBLINK link = *(plink); \
(plink)->lset = NULL; \
func(&link, __VA_ARGS__); \
(plink)->lset = link.lset; \
dbScanUnlock((dbCommon*)prec); \
} while(0)
static long get_units(DBADDR *paddr, char *units)
{
calcRecord *prec = (calcRecord *)paddr->precord;
@@ -174,7 +184,7 @@ static long get_units(DBADDR *paddr, char *units)
if(paddr->pfldDes->field_type == DBF_DOUBLE) {
linkNumber = get_linkNumber(dbGetFieldIndex(paddr));
if (linkNumber >= 0)
dbGetUnits(&prec->inpa + linkNumber, units, DB_UNITS_SIZE);
do_recursion_safe(dbGetUnits, &prec->inpa + linkNumber, units, DB_UNITS_SIZE);
else
strncpy(units,prec->egu,DB_UNITS_SIZE);
}
@@ -193,10 +203,10 @@ static long get_precision(const DBADDR *paddr, long *pprecision)
linkNumber = get_linkNumber(fieldIndex);
if (linkNumber >= 0) {
long status;
short precision;
if (dbGetPrecision(&prec->inpa + linkNumber, &precision) == 0)
*pprecision = precision;
do_recursion_safe(status = dbGetPrecision, &prec->inpa + linkNumber, &precision);
if (status == 0) *pprecision = precision;
} else
recGblGetPrec(paddr, pprecision);
return 0;
@@ -222,11 +232,11 @@ static long get_graphic_double(DBADDR *paddr, struct dbr_grDouble *pgd)
break;
default:
linkNumber = get_linkNumber(fieldIndex);
if (linkNumber >= 0) {
dbGetGraphicLimits(&prec->inpa + linkNumber,
&pgd->lower_disp_limit,
&pgd->upper_disp_limit);
} else
if (linkNumber >= 0)
do_recursion_safe(dbGetGraphicLimits, &prec->inpa + linkNumber,
&pgd->lower_disp_limit,
&pgd->upper_disp_limit);
else
recGblGetGraphicDouble(paddr,pgd);
}
return 0;
@@ -267,13 +277,13 @@ static long get_alarm_double(DBADDR *paddr, struct dbr_alDouble *pad)
pad->upper_alarm_limit = prec->hhsv ? prec->hihi : epicsNAN;
} else {
linkNumber = get_linkNumber(fieldIndex);
if (linkNumber >= 0) {
dbGetAlarmLimits(&prec->inpa + linkNumber,
&pad->lower_alarm_limit,
&pad->lower_warning_limit,
&pad->upper_warning_limit,
&pad->upper_alarm_limit);
} else
if (linkNumber >= 0)
do_recursion_safe(dbGetAlarmLimits, &prec->inpa + linkNumber,
&pad->lower_alarm_limit,
&pad->lower_warning_limit,
&pad->upper_warning_limit,
&pad->upper_alarm_limit);
else
recGblGetAlarmDouble(paddr, pad);
}
return 0;

View File

@@ -413,6 +413,16 @@ static long get_linkNumber(int fieldIndex) {
return -1;
}
#define do_recursion_safe(func, plink, ...) \
do { \
dbScanLock((dbCommon*)prec); \
DBLINK link = *(plink); \
(plink)->lset = NULL; \
func(&link, __VA_ARGS__); \
(plink)->lset = link.lset; \
dbScanUnlock((dbCommon*)prec); \
} while(0)
static long get_units(DBADDR *paddr, char *units)
{
calcoutRecord *prec = (calcoutRecord *)paddr->precord;
@@ -425,9 +435,9 @@ static long get_units(DBADDR *paddr, char *units)
}
if(paddr->pfldDes->field_type == DBF_DOUBLE) {
linkNumber = get_linkNumber(dbGetFieldIndex(paddr));
linkNumber = get_linkNumber(fieldIndex);
if (linkNumber >= 0)
dbGetUnits(&prec->inpa + linkNumber, units, DB_UNITS_SIZE);
do_recursion_safe(dbGetUnits, &prec->inpa + linkNumber, units, DB_UNITS_SIZE);
else
strncpy(units,prec->egu,DB_UNITS_SIZE);
}
@@ -451,10 +461,10 @@ static long get_precision(const DBADDR *paddr, long *pprecision)
linkNumber = get_linkNumber(fieldIndex);
if (linkNumber >= 0) {
long status;
short precision;
if (dbGetPrecision(&prec->inpa + linkNumber, &precision) == 0)
*pprecision = precision;
do_recursion_safe(status = dbGetPrecision, &prec->inpa + linkNumber, &precision);
if (status == 0) *pprecision = precision;
} else
recGblGetPrec(paddr, pprecision);
return 0;
@@ -484,11 +494,11 @@ static long get_graphic_double(DBADDR *paddr, struct dbr_grDouble *pgd)
break;
default:
linkNumber = get_linkNumber(fieldIndex);
if (linkNumber >= 0) {
dbGetGraphicLimits(&prec->inpa + linkNumber,
&pgd->lower_disp_limit,
&pgd->upper_disp_limit);
} else
if (linkNumber >= 0)
do_recursion_safe(dbGetGraphicLimits, &prec->inpa + linkNumber,
&pgd->lower_disp_limit,
&pgd->upper_disp_limit);
else
recGblGetGraphicDouble(paddr,pgd);
}
return 0;
@@ -533,13 +543,13 @@ static long get_alarm_double(DBADDR *paddr, struct dbr_alDouble *pad)
pad->lower_alarm_limit = prec->llsv ? prec->lolo : epicsNAN;
} else {
linkNumber = get_linkNumber(fieldIndex);
if (linkNumber >= 0) {
dbGetAlarmLimits(&prec->inpa + linkNumber,
&pad->lower_alarm_limit,
&pad->lower_warning_limit,
&pad->upper_warning_limit,
&pad->upper_alarm_limit);
} else
if (linkNumber >= 0)
do_recursion_safe(dbGetAlarmLimits, &prec->inpa + linkNumber,
&pad->lower_alarm_limit,
&pad->lower_warning_limit,
&pad->upper_warning_limit,
&pad->upper_alarm_limit);
else
recGblGetAlarmDouble(paddr, pad);
}
return 0;

View File

@@ -220,12 +220,9 @@ static long special(DBADDR *paddr, int after)
return 0;
init_common(prec);
/* Note: ZRVL..FFVL are also SPC_MOD */
if (fieldIndex >= mbbiRecordZRST && fieldIndex <= mbbiRecordFFST) {
int event = DBE_PROPERTY;
if (prec->val == fieldIndex - mbbiRecordZRST)
event |= DBE_VALUE | DBE_LOG;
db_post_events(prec, &prec->val, event);
if (fieldIndex >= mbbiRecordZRST && fieldIndex <= mbbiRecordFFST
&& prec->val == fieldIndex - mbbiRecordZRST) {
db_post_events(prec, &prec->val, DBE_VALUE | DBE_LOG);
}
return 0;

View File

@@ -276,6 +276,7 @@ Parameters> for more on the record name (NAME) and description (DESC) fields.
pp(TRUE)
interest(1)
size(26)
prop(YES)
}
field(ONST,DBF_STRING) {
prompt("One String")
@@ -284,6 +285,7 @@ Parameters> for more on the record name (NAME) and description (DESC) fields.
pp(TRUE)
interest(1)
size(26)
prop(YES)
}
field(TWST,DBF_STRING) {
prompt("Two String")
@@ -292,6 +294,7 @@ Parameters> for more on the record name (NAME) and description (DESC) fields.
pp(TRUE)
interest(1)
size(26)
prop(YES)
}
field(THST,DBF_STRING) {
prompt("Three String")
@@ -300,6 +303,7 @@ Parameters> for more on the record name (NAME) and description (DESC) fields.
pp(TRUE)
interest(1)
size(26)
prop(YES)
}
field(FRST,DBF_STRING) {
prompt("Four String")
@@ -308,6 +312,7 @@ Parameters> for more on the record name (NAME) and description (DESC) fields.
pp(TRUE)
interest(1)
size(26)
prop(YES)
}
field(FVST,DBF_STRING) {
prompt("Five String")
@@ -316,6 +321,7 @@ Parameters> for more on the record name (NAME) and description (DESC) fields.
pp(TRUE)
interest(1)
size(26)
prop(YES)
}
field(SXST,DBF_STRING) {
prompt("Six String")
@@ -324,6 +330,7 @@ Parameters> for more on the record name (NAME) and description (DESC) fields.
pp(TRUE)
interest(1)
size(26)
prop(YES)
}
field(SVST,DBF_STRING) {
prompt("Seven String")
@@ -332,6 +339,7 @@ Parameters> for more on the record name (NAME) and description (DESC) fields.
pp(TRUE)
interest(1)
size(26)
prop(YES)
}
field(EIST,DBF_STRING) {
prompt("Eight String")
@@ -340,6 +348,7 @@ Parameters> for more on the record name (NAME) and description (DESC) fields.
pp(TRUE)
interest(1)
size(26)
prop(YES)
}
field(NIST,DBF_STRING) {
prompt("Nine String")
@@ -348,6 +357,7 @@ Parameters> for more on the record name (NAME) and description (DESC) fields.
pp(TRUE)
interest(1)
size(26)
prop(YES)
}
field(TEST,DBF_STRING) {
prompt("Ten String")
@@ -356,6 +366,7 @@ Parameters> for more on the record name (NAME) and description (DESC) fields.
pp(TRUE)
interest(1)
size(26)
prop(YES)
}
field(ELST,DBF_STRING) {
prompt("Eleven String")
@@ -364,6 +375,7 @@ Parameters> for more on the record name (NAME) and description (DESC) fields.
pp(TRUE)
interest(1)
size(26)
prop(YES)
}
field(TVST,DBF_STRING) {
prompt("Twelve String")
@@ -372,6 +384,7 @@ Parameters> for more on the record name (NAME) and description (DESC) fields.
pp(TRUE)
interest(1)
size(26)
prop(YES)
}
field(TTST,DBF_STRING) {
prompt("Thirteen String")
@@ -380,6 +393,7 @@ Parameters> for more on the record name (NAME) and description (DESC) fields.
pp(TRUE)
interest(1)
size(26)
prop(YES)
}
field(FTST,DBF_STRING) {
prompt("Fourteen String")
@@ -388,6 +402,7 @@ Parameters> for more on the record name (NAME) and description (DESC) fields.
pp(TRUE)
interest(1)
size(26)
prop(YES)
}
field(FFST,DBF_STRING) {
prompt("Fifteen String")
@@ -396,6 +411,7 @@ Parameters> for more on the record name (NAME) and description (DESC) fields.
pp(TRUE)
interest(1)
size(26)
prop(YES)
}
=head3 Alarm Parameters

View File

@@ -285,12 +285,9 @@ static long special(DBADDR *paddr, int after)
return 0;
init_common(prec);
/* Note: ZRVL..FFVL are also SPC_MOD */
if (fieldIndex >= mbboRecordZRST && fieldIndex <= mbboRecordFFST) {
int event = DBE_PROPERTY;
if (prec->val == fieldIndex - mbboRecordZRST)
event |= DBE_VALUE | DBE_LOG;
db_post_events(prec, &prec->val, event);
if (fieldIndex >= mbboRecordZRST && fieldIndex <= mbboRecordFFST
&& prec->val == fieldIndex - mbboRecordZRST) {
db_post_events(prec, &prec->val, DBE_VALUE | DBE_LOG);
}
return 0;

View File

@@ -354,6 +354,7 @@ for more information on simulation mode and its fields.
pp(TRUE)
interest(1)
size(26)
prop(YES)
}
field(ONST,DBF_STRING) {
prompt("One String")
@@ -362,6 +363,7 @@ for more information on simulation mode and its fields.
pp(TRUE)
interest(1)
size(26)
prop(YES)
}
field(TWST,DBF_STRING) {
prompt("Two String")
@@ -370,6 +372,7 @@ for more information on simulation mode and its fields.
pp(TRUE)
interest(1)
size(26)
prop(YES)
}
field(THST,DBF_STRING) {
prompt("Three String")
@@ -378,6 +381,7 @@ for more information on simulation mode and its fields.
pp(TRUE)
interest(1)
size(26)
prop(YES)
}
field(FRST,DBF_STRING) {
prompt("Four String")
@@ -386,6 +390,7 @@ for more information on simulation mode and its fields.
pp(TRUE)
interest(1)
size(26)
prop(YES)
}
field(FVST,DBF_STRING) {
prompt("Five String")
@@ -394,6 +399,7 @@ for more information on simulation mode and its fields.
pp(TRUE)
interest(1)
size(26)
prop(YES)
}
field(SXST,DBF_STRING) {
prompt("Six String")
@@ -402,6 +408,7 @@ for more information on simulation mode and its fields.
pp(TRUE)
interest(1)
size(26)
prop(YES)
}
field(SVST,DBF_STRING) {
prompt("Seven String")
@@ -410,6 +417,7 @@ for more information on simulation mode and its fields.
pp(TRUE)
interest(1)
size(26)
prop(YES)
}
field(EIST,DBF_STRING) {
prompt("Eight String")
@@ -418,6 +426,7 @@ for more information on simulation mode and its fields.
pp(TRUE)
interest(1)
size(26)
prop(YES)
}
field(NIST,DBF_STRING) {
prompt("Nine String")
@@ -426,6 +435,7 @@ for more information on simulation mode and its fields.
pp(TRUE)
interest(1)
size(26)
prop(YES)
}
field(TEST,DBF_STRING) {
prompt("Ten String")
@@ -434,6 +444,7 @@ for more information on simulation mode and its fields.
pp(TRUE)
interest(1)
size(26)
prop(YES)
}
field(ELST,DBF_STRING) {
prompt("Eleven String")
@@ -442,6 +453,7 @@ for more information on simulation mode and its fields.
pp(TRUE)
interest(1)
size(26)
prop(YES)
}
field(TVST,DBF_STRING) {
prompt("Twelve String")
@@ -450,6 +462,7 @@ for more information on simulation mode and its fields.
pp(TRUE)
interest(1)
size(26)
prop(YES)
}
field(TTST,DBF_STRING) {
prompt("Thirteen String")
@@ -458,6 +471,7 @@ for more information on simulation mode and its fields.
pp(TRUE)
interest(1)
size(26)
prop(YES)
}
field(FTST,DBF_STRING) {
prompt("Fourteen String")
@@ -466,6 +480,7 @@ for more information on simulation mode and its fields.
pp(TRUE)
interest(1)
size(26)
prop(YES)
}
field(FFST,DBF_STRING) {
prompt("Fifteen String")
@@ -474,6 +489,7 @@ for more information on simulation mode and its fields.
pp(TRUE)
interest(1)
size(26)
prop(YES)
}
field(ZRSV,DBF_MENU) {
prompt("State Zero Severity")

View File

@@ -279,39 +279,49 @@ static void processCallback(epicsCallback *arg)
#define get_dol(prec, fieldOffset) \
&((linkGrp *) &prec->dly0)[fieldOffset >> 2].dol
#define do_recursion_safe(func, plink, ...) \
do { \
dbScanLock((dbCommon*)prec); \
DBLINK link = *(plink); \
(plink)->lset = NULL; \
func(&link, __VA_ARGS__); \
(plink)->lset = link.lset; \
dbScanUnlock((dbCommon*)prec); \
} while(0)
static long get_units(DBADDR *paddr, char *units)
{
seqRecord *prec = (seqRecord *) paddr->precord;
int fieldOffset = dbGetFieldIndex(paddr) - indexof(DLY1);
int fieldOffset = dbGetFieldIndex(paddr) - indexof(DLY0);
if (fieldOffset >= 0)
switch (fieldOffset & 2) {
switch (fieldOffset & 3) {
case 0: /* DLYn */
strcpy(units, "s");
break;
case 2: /* DOn */
dbGetUnits(get_dol(prec, fieldOffset),
units, DB_UNITS_SIZE);
}
do_recursion_safe(dbGetUnits, get_dol(prec, fieldOffset),
units, DB_UNITS_SIZE);
}
return 0;
}
static long get_precision(const DBADDR *paddr, long *pprecision)
{
seqRecord *prec = (seqRecord *) paddr->precord;
int fieldOffset = dbGetFieldIndex(paddr) - indexof(DLY1);
long status;
int fieldOffset = dbGetFieldIndex(paddr) - indexof(DLY0);
short precision;
if (fieldOffset >= 0)
switch (fieldOffset & 2) {
switch (fieldOffset & 3) {
case 0: /* DLYn */
*pprecision = seqDLYprecision;
return 0;
case 2: /* DOn */
if (dbGetPrecision(get_dol(prec, fieldOffset), &precision) == 0) {
*pprecision = precision;
return 0;
}
do_recursion_safe(status = dbGetPrecision, get_dol(prec, fieldOffset), &precision);
if (status == 0) *pprecision = precision;
return 0;
}
*pprecision = prec->prec;
recGblGetPrec(paddr, pprecision);
@@ -321,18 +331,18 @@ static long get_precision(const DBADDR *paddr, long *pprecision)
static long get_graphic_double(DBADDR *paddr, struct dbr_grDouble *pgd)
{
seqRecord *prec = (seqRecord *) paddr->precord;
int fieldOffset = dbGetFieldIndex(paddr) - indexof(DLY1);
int fieldOffset = dbGetFieldIndex(paddr) - indexof(DLY0);
if (fieldOffset >= 0)
switch (fieldOffset & 2) {
switch (fieldOffset & 3) {
case 0: /* DLYn */
pgd->lower_disp_limit = 0.0;
pgd->lower_disp_limit = 10.0;
pgd->upper_disp_limit = 10.0;
return 0;
case 2: /* DOn */
dbGetGraphicLimits(get_dol(prec, fieldOffset),
&pgd->lower_disp_limit,
&pgd->upper_disp_limit);
do_recursion_safe(dbGetGraphicLimits, get_dol(prec, fieldOffset),
&pgd->lower_disp_limit,
&pgd->upper_disp_limit);
return 0;
}
recGblGetGraphicDouble(paddr, pgd);
@@ -341,9 +351,9 @@ static long get_graphic_double(DBADDR *paddr, struct dbr_grDouble *pgd)
static long get_control_double(DBADDR *paddr, struct dbr_ctrlDouble *pcd)
{
int fieldOffset = dbGetFieldIndex(paddr) - indexof(DLY1);
int fieldOffset = dbGetFieldIndex(paddr) - indexof(DLY0);
if (fieldOffset >= 0 && (fieldOffset & 2) == 0) { /* DLYn */
if (fieldOffset >= 0 && (fieldOffset & 3) == 0) { /* DLYn */
pcd->lower_ctrl_limit = 0.0;
pcd->upper_ctrl_limit = seqDLYlimit;
}
@@ -355,12 +365,12 @@ static long get_control_double(DBADDR *paddr, struct dbr_ctrlDouble *pcd)
static long get_alarm_double(DBADDR *paddr, struct dbr_alDouble *pad)
{
seqRecord *prec = (seqRecord *) paddr->precord;
int fieldOffset = dbGetFieldIndex(paddr) - indexof(DLY1);
int fieldOffset = dbGetFieldIndex(paddr) - indexof(DLY0);
if (fieldOffset >= 0 && (fieldOffset & 2) == 2) /* DOn */
dbGetAlarmLimits(get_dol(prec, fieldOffset),
&pad->lower_alarm_limit, &pad->lower_warning_limit,
&pad->upper_warning_limit, &pad->upper_alarm_limit);
if (fieldOffset >= 0 && (fieldOffset & 3) == 2) /* DOn */
do_recursion_safe(dbGetAlarmLimits, get_dol(prec, fieldOffset),
&pad->lower_alarm_limit, &pad->lower_warning_limit,
&pad->upper_warning_limit, &pad->upper_alarm_limit);
else
recGblGetAlarmDouble(paddr, pad);
return 0;

View File

@@ -201,6 +201,16 @@ static long get_linkNumber(int fieldIndex) {
return -1;
}
#define do_recursion_safe(func, plink, ...) \
do { \
dbScanLock((dbCommon*)prec); \
DBLINK link = *(plink); \
(plink)->lset = NULL; \
func(&link, __VA_ARGS__); \
(plink)->lset = link.lset; \
dbScanUnlock((dbCommon*)prec); \
} while(0)
static long get_units(DBADDR *paddr, char *units)
{
subRecord *prec = (subRecord *)paddr->precord;
@@ -209,7 +219,7 @@ static long get_units(DBADDR *paddr, char *units)
if(paddr->pfldDes->field_type == DBF_DOUBLE) {
linkNumber = get_linkNumber(dbGetFieldIndex(paddr));
if (linkNumber >= 0)
dbGetUnits(&prec->inpa + linkNumber, units, DB_UNITS_SIZE);
do_recursion_safe(dbGetUnits, &prec->inpa + linkNumber, units, DB_UNITS_SIZE);
else
strncpy(units,prec->egu,DB_UNITS_SIZE);
}
@@ -228,10 +238,10 @@ static long get_precision(const DBADDR *paddr, long *pprecision)
linkNumber = get_linkNumber(fieldIndex);
if (linkNumber >= 0) {
long status;
short precision;
if (dbGetPrecision(&prec->inpa + linkNumber, &precision) == 0)
*pprecision = precision;
do_recursion_safe(status = dbGetPrecision, &prec->inpa + linkNumber, &precision);
if (status == 0) *pprecision = precision;
} else
recGblGetPrec(paddr, pprecision);
return 0;
@@ -257,11 +267,11 @@ static long get_graphic_double(DBADDR *paddr, struct dbr_grDouble *pgd)
break;
default:
linkNumber = get_linkNumber(fieldIndex);
if (linkNumber >= 0) {
dbGetGraphicLimits(&prec->inpa + linkNumber,
&pgd->lower_disp_limit,
&pgd->upper_disp_limit);
} else
if (linkNumber >= 0)
do_recursion_safe(dbGetGraphicLimits, &prec->inpa + linkNumber,
&pgd->lower_disp_limit,
&pgd->upper_disp_limit);
else
recGblGetGraphicDouble(paddr,pgd);
}
return 0;
@@ -302,14 +312,14 @@ static long get_alarm_double(DBADDR *paddr, struct dbr_alDouble *pad)
pad->lower_alarm_limit = prec->llsv ? prec->lolo : epicsNAN;
} else {
linkNumber = get_linkNumber(fieldIndex);
if (linkNumber >= 0) {
dbGetAlarmLimits(&prec->inpa + linkNumber,
&pad->lower_alarm_limit,
&pad->lower_warning_limit,
&pad->upper_warning_limit,
&pad->upper_alarm_limit);
} else
recGblGetAlarmDouble(paddr, pad);
if (linkNumber >= 0)
do_recursion_safe(dbGetAlarmLimits, &prec->inpa + linkNumber,
&pad->lower_alarm_limit,
&pad->lower_warning_limit,
&pad->upper_warning_limit,
&pad->upper_alarm_limit);
else
recGblGetAlarmDouble(paddr, pad);
}
return 0;
}

View File

@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 1997 Argonne National Laboratory
#
# SPDX-License-Identifier: EPICS
# Makefile at top of application tree
TOP = .
include $(TOP)/configure/CONFIG

View File

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

View File

@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2015 Argonne National Laboratory
#
# SPDX-License-Identifier: EPICS
record(lsi, "$(user):_APPNAME_:version") {
field(DTYP, "_APPNAME_ version")
field(DESC, "Version string")

View File

@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2017 ITER Organization
#
# SPDX-License-Identifier: EPICS
record(ao, "$(user):circle:step") {
field(VAL , "1.0")
field(DRVL, "0.0")

View File

@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 1998 Argonne National Laboratory
#
# SPDX-License-Identifier: EPICS
record(ai, "$(user):aiExample")
{
field(DESC, "Analog input")

View File

@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 1998 Argonne National Laboratory
#
# SPDX-License-Identifier: EPICS
record(calc, "$(user):calcExample$(no)")
{
alias("$(user):calc$(no)")

View File

@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2002 Argonne National Laboratory
#
# SPDX-License-Identifier: EPICS
record(sub,"$(user):subExample")
{
field(INAM,"mySubInit")

View File

@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2006 Argonne National Laboratory
#
# SPDX-License-Identifier: EPICS
# Example substitutions file
file "db/circle.db" {

View File

@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 1997 Argonne National Laboratory
#
# SPDX-License-Identifier: EPICS
# Makefile at top of application tree
TOP = ..
include $(TOP)/configure/CONFIG

View File

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

View File

@@ -1,3 +1,7 @@
/* SPDX-FileCopyrightText: 2005 Argonne National Laboratory */
/* SPDX-License-Identifier: EPICS */
/* Example showing how to register a new command with iocsh */
#include <stdio.h>

View File

@@ -1 +1,5 @@
# SPDX-FileCopyrightText: 2005 Argonne National Laboratory
#
# SPDX-License-Identifier: EPICS
registrar(helloRegister)

View File

@@ -1,3 +1,7 @@
// SPDX-FileCopyrightText: 2000 Argonne National Laboratory
//
// SPDX-License-Identifier: EPICS
/* _APPNAME_Main.cpp */
/* Author: Marty Kraimer Date: 17MAR2000 */

View File

@@ -1,3 +1,7 @@
/* SPDX-FileCopyrightText: 2002 Argonne National Laboratory */
/* SPDX-License-Identifier: EPICS */
#include <stdio.h>
#include <dbDefs.h>

View File

@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2004 Argonne National Laboratory
#
# SPDX-License-Identifier: EPICS
variable(mySubDebug)
function(mySubInit)
function(mySubProcess)

View File

@@ -1,3 +1,7 @@
/* SPDX-FileCopyrightText: 1998 Argonne National Laboratory */
/* SPDX-License-Identifier: EPICS */
/* devXxxSoft.c */
/* Example device support module */

View File

@@ -1,3 +1,7 @@
/* SPDX-FileCopyrightText: 2015 Argonne National Laboratory */
/* SPDX-License-Identifier: EPICS */
/* dev_APPNAME_Version.c */
/* Example device support for the lsi (long string input) record
* providing the module version string as the value

View File

@@ -1 +1,5 @@
# SPDX-FileCopyrightText: 2015 Argonne National Laboratory
#
# SPDX-License-Identifier: EPICS
device(lsi,INST_IO,dev_CSAFEAPPNAME_Version,"_APPNAME_ version")

View File

@@ -1,3 +1,7 @@
/* SPDX-FileCopyrightText: 2008 Argonne National Laboratory */
/* SPDX-License-Identifier: EPICS */
/* initTrace.c */
/*

View File

@@ -1 +1,5 @@
# SPDX-FileCopyrightText: 2008 Argonne National Laboratory
#
# SPDX-License-Identifier: EPICS
registrar(initTraceRegister)

View File

@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2004 Argonne National Laboratory
#
# SPDX-License-Identifier: EPICS
# The name below is derived from the name of the SNL program
# inside the source file, not from its filename. Here the
# program is called sncExample, but is compiled in both the

View File

@@ -20,3 +20,9 @@ ss ss1 {
} state low
}
}
/*
SPDX-FileCopyrightText: 1998 Argonne National Laboratory
SPDX-License-Identifier: EPICS
*/

View File

@@ -1 +1,7 @@
#include "../sncExample.stt"
/*
SPDX-FileCopyrightText: 2004 Argonne National Laboratory
SPDX-License-Identifier: EPICS
*/

View File

@@ -1,3 +1,7 @@
/* SPDX-FileCopyrightText: 1998 Argonne National Laboratory */
/* SPDX-License-Identifier: EPICS */
/* xxxRecord.c */
/* Example record support module */

View File

@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 1998 Argonne National Laboratory
#
# SPDX-License-Identifier: EPICS
recordtype(xxx) {
include "dbCommon.dbd"
field(VAL,DBF_DOUBLE) {

View File

@@ -1,2 +1,6 @@
# SPDX-FileCopyrightText: 2003 Argonne National Laboratory
#
# SPDX-License-Identifier: EPICS
include "xxxRecord.dbd"
device(xxx,CONSTANT,devXxxSoft,"Soft Channel")

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -7,3 +7,7 @@ and check the executable name on the first line of the st.cmd file
You may need to change the name of the .dbd file given in the
st.cmd's dbLoadDatabase() command before starting the ioc.
SPDX-FileCopyrightText: 2001 Argonne National Laboratory
SPDX-License-Identifier: EPICS

View File

@@ -4,3 +4,7 @@ contents to
Then load the executable into the IOC (floppy disk, network boot, debugger,
etc.) and start it.
SPDX-FileCopyrightText: 2001 Argonne National Laboratory
SPDX-License-Identifier: EPICS

View File

@@ -1,5 +1,9 @@
#!../../bin/_ARCH_/_APPNAME_
#- SPDX-FileCopyrightText: 2000 Argonne National Laboratory
#-
#- SPDX-License-Identifier: EPICS
#- You may have to change _APPNAME_ to something else
#- everywhere it appears in this file

View File

@@ -1,3 +1,7 @@
#- SPDX-FileCopyrightText: 2001 Argonne National Laboratory
#-
#- SPDX-License-Identifier: EPICS
#- Example RTEMS startup script
#- You may have to change _APPNAME_ to something else

View File

@@ -1,3 +1,7 @@
#- SPDX-FileCopyrightText: 1998 Argonne National Laboratory
#-
#- SPDX-License-Identifier: EPICS
#- Example vxWorks startup file
#- The following is needed if your board support package doesn't at boot time

View File

@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2005 Argonne National Laboratory
#
# SPDX-License-Identifier: EPICS
#- Instructions for creating and using a real nfsCommands file
#-
#- in order to use nfs do the following:

View File

@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 1997 Argonne National Laboratory
#
# SPDX-License-Identifier: EPICS
#- Instructions for creating and using a real nfsCommands file
#-
#- in order to use nfs do the following:

View File

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

View File

@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 1997 Argonne National Laboratory
#
# SPDX-License-Identifier: EPICS
# Makefile at top of application tree
TOP = ..
include $(TOP)/configure/CONFIG

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: 2000 Argonne National Laboratory
//
// SPDX-License-Identifier: EPICS
/* _APPNAME_Main.cpp */
/* Author: Marty Kraimer Date: 17MAR2000 */

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -1,5 +1,9 @@
#!../../bin/_ARCH_/_APPNAME_
#- SPDX-FileCopyrightText: 2003 Argonne National Laboratory
#-
#- SPDX-License-Identifier: EPICS
#- You may have to change _APPNAME_ to something else
#- everywhere it appears in this file

View File

@@ -1,5 +1,9 @@
#!../../bin/_ARCH_/_APPNAME_
#- SPDX-FileCopyrightText: 2005 Argonne National Laboratory
#-
#- SPDX-License-Identifier: EPICS
#- You may have to change _APPNAME_ to something else
#- everywhere it appears in this file

View File

@@ -1,3 +1,7 @@
#- SPDX-FileCopyrightText: 2001 Argonne National Laboratory
#-
#- SPDX-License-Identifier: EPICS
#- Example RTEMS startup script
#- You may have to change _APPNAME_ to something else

View File

@@ -1,3 +1,7 @@
#- SPDX-FileCopyrightText: 1998 Argonne National Laboratory
#-
#- SPDX-License-Identifier: EPICS
#- Example vxWorks startup file
#- The following is needed if your board support package doesn't at boot time

View File

@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2005 Argonne National Laboratory
#
# SPDX-License-Identifier: EPICS
#- Instructions for creating and using a real nfsCommands file
#-
#- in order to use nfs do the following:

View File

@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 1997 Argonne National Laboratory
#
# SPDX-License-Identifier: EPICS
#- Instructions for creating and using a real nfsCommands file
#-
#- in order to use nfs do the following:

View File

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

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