diff --git a/.bzrignore b/.bzrignore
deleted file mode 100644
index df0e03ed6..000000000
--- a/.bzrignore
+++ /dev/null
@@ -1,9 +0,0 @@
-./bin
-./lib
-./db
-./dbd
-./html
-./include
-./templates
-**/O.*
-./QtC-*
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000..c3040f162
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,12 @@
+/cfg/
+/bin/
+/lib/
+/db/
+/dbd/
+/html/
+/include/
+/templates/
+O.*/
+/QtC-*
+*.orig
+*.log
diff --git a/Makefile b/Makefile
index e733d8c99..d058e8fbe 100644
--- a/Makefile
+++ b/Makefile
@@ -6,9 +6,6 @@
# EPICS BASE is distributed subject to a Software License Agreement found
# in file LICENSE that is included with this distribution.
#*************************************************************************
-#
-# $Revision-Id$
-#
TOP = .
include $(TOP)/configure/CONFIG
diff --git a/configure/CONFIG b/configure/CONFIG
index 4371d4e1a..17440a39e 100644
--- a/configure/CONFIG
+++ b/configure/CONFIG
@@ -6,8 +6,6 @@
# EPICS BASE is distributed subject to a Software License Agreement found
# in the file LICENSE that is included with this distribution.
#*************************************************************************
-#
-# $Revision-Id$
#
# Common build definitions
diff --git a/configure/CONFIG.CrossCommon b/configure/CONFIG.CrossCommon
index 167ba490f..2fa6460d7 100644
--- a/configure/CONFIG.CrossCommon
+++ b/configure/CONFIG.CrossCommon
@@ -3,9 +3,8 @@
# National Laboratory.
# Copyright (c) 2002 The Regents of the University of California, as
# Operator of Los Alamos National Laboratory.
-# EPICS BASE Versions 3.13.7
-# and higher are distributed subject to a Software License Agreement found
-# in file LICENSE that is included with this distribution.
+# EPICS BASE is distributed subject to a Software License Agreement found
+# in file LICENSE that is included with this distribution.
#*************************************************************************
# Cross compiler default definitions
@@ -27,6 +26,6 @@ CROSS_LDFLAGS = $(addprefix -L,$(GNU_TARGET_LIB_DIR))
CMPLR_PREFIX_CROSS=$(addsuffix -,$(GNU_TARGET))
CMPLR_PREFIX=$(CMPLR_PREFIX_$(BUILD_CLASS))
-# All cross builds use the gnu compiler
+# Cross builds usually use the gnu compiler
include $(CONFIG)/CONFIG.gnuCommon
diff --git a/configure/CONFIG.gnuCommon b/configure/CONFIG.gnuCommon
index 8e99e9c54..025391548 100644
--- a/configure/CONFIG.gnuCommon
+++ b/configure/CONFIG.gnuCommon
@@ -7,7 +7,7 @@
# and higher are distributed subject to a Software License Agreement found
# in file LICENSE that is included with this distribution.
#*************************************************************************
-#--------------------------------------------------
+
# GNU compiler defaults
GNU = YES
diff --git a/configure/CONFIG_ADDONS b/configure/CONFIG_ADDONS
index f6b6b8481..29a33c415 100644
--- a/configure/CONFIG_ADDONS
+++ b/configure/CONFIG_ADDONS
@@ -6,7 +6,6 @@
# EPICS BASE is distributed subject to a Software License Agreement found
# in file LICENSE that is included with this distribution.
#*************************************************************************
-# $Revision-Id$
#
# check for add-on CFLAGS and CXXFLAGS
#
diff --git a/configure/CONFIG_APP_INCLUDE b/configure/CONFIG_APP_INCLUDE
index 2d00b52c4..8b4bd7d08 100644
--- a/configure/CONFIG_APP_INCLUDE
+++ b/configure/CONFIG_APP_INCLUDE
@@ -6,9 +6,6 @@
# EPICS BASE is distributed subject to a Software License Agreement found
# in the file LICENSE that is included with this distribution.
#*************************************************************************
-#
-# $Revision-Id$
-#
export TOP
diff --git a/configure/CONFIG_BASE b/configure/CONFIG_BASE
index 1957a8f56..70d68bb32 100644
--- a/configure/CONFIG_BASE
+++ b/configure/CONFIG_BASE
@@ -36,6 +36,7 @@ ifdef BASE_TOP
SHRLIB_VERSION = $(EPICS_VERSION).$(EPICS_REVISION).$(EPICS_MODIFICATION)
# Windows only allows 2 levels of version numbering
PROD_VERSION = $(EPICS_VERSION).$(EPICS_REVISION)
+ BASE_CPPFLAGS += -DUSE_TYPED_RSET
endif # BASE_TOP
#---------------------------------------------------------------
@@ -45,7 +46,7 @@ endif # BASE_TOP
OSITHREAD_USE_DEFAULT_STACK = NO
OSITHREAD_DEFAULT_STACK_FLAGS_YES = -DOSITHREAD_USE_DEFAULT_STACK
-BASE_CPPFLAGS = $(OSITHREAD_DEFAULT_STACK_FLAGS_$(OSITHREAD_USE_DEFAULT_STACK))
+BASE_CPPFLAGS += $(OSITHREAD_DEFAULT_STACK_FLAGS_$(OSITHREAD_USE_DEFAULT_STACK))
#---------------------------------------------------------------
# Where to find the installed build tools
diff --git a/configure/CONFIG_BASE_VERSION b/configure/CONFIG_BASE_VERSION
index d41fe95e2..e9f632391 100644
--- a/configure/CONFIG_BASE_VERSION
+++ b/configure/CONFIG_BASE_VERSION
@@ -4,11 +4,9 @@
# Copyright (c) 2002 The Regents of the University of California, as
# Operator of Los Alamos National Laboratory.
# EPICS BASE is distributed subject to a Software License Agreement found
-# in the file LICENSE that is included with this distribution.
+# in the file LICENSE that is included with this distribution.
#*************************************************************************
#
-# $Revision-Id$
-#
# EPICS Version information
#
# Only the person making an official EPICS release should make changes in
@@ -36,10 +34,10 @@ BASE_3_16 = YES
# EPICS_VERSION must be a number >0 and <256
EPICS_VERSION = 3
-# EPICS_REVISION must be a number >=0 and <256
+# EPICS_REVISION must be a number >=0 and <256
EPICS_REVISION = 16
-# EPICS_MODIFICATION must be a number >=0 and <256
+# EPICS_MODIFICATION must be a number >=0 and <256
EPICS_MODIFICATION = 0
# EPICS_PATCH_LEVEL must be a number (win32 resource file requirement)
@@ -72,4 +70,5 @@ EPICS_SHORT_VERSION=$(EPICS_VERSION).$(EPICS_REVISION).$(EPICS_MODIFICATION)$(EP
EPICS_VERSION_NUMBER=$(EPICS_SHORT_VERSION)$(EPICS_DEV_SNAPSHOT)$(EPICS_SITE_VSTRING)
EPICS_VERSION_STRING="EPICS Version $(EPICS_VERSION_NUMBER)"
-COMMIT_DATE="\$$Date$$"
+# Provide this in case anyone is still using the old name
+COMMIT_DATE="-no-date-"
diff --git a/configure/CONFIG_COMMON b/configure/CONFIG_COMMON
index 2df341581..79807c2f2 100644
--- a/configure/CONFIG_COMMON
+++ b/configure/CONFIG_COMMON
@@ -7,8 +7,6 @@
# in file LICENSE that is included with this distribution.
#*************************************************************************
#
-# $Revision-Id$
-#
# CONFIG_COMMON
#
# This file is to be maintained by the community.
@@ -344,7 +342,7 @@ GENVERSIONDEFAULT =
HDEPENDS_METHOD = MKMF
-HDEPENDS_MKMFFLAGS = -m $*$(DEP) $(INCLUDES) $@
+HDEPENDS_MKMFFLAGS = -m $@ $(INCLUDES) $*$(OBJ)
HDEPENDS_MKMF.c = $(MKMF) $(HDEPENDS_FLAGS) $(HDEPENDS_MKMFFLAGS)
HDEPENDS_MKMF.cpp = $(MKMF) $(HDEPENDS_FLAGS) $(HDEPENDS_MKMFFLAGS)
diff --git a/configure/CONFIG_ENV b/configure/CONFIG_ENV
index 5fe70eab1..173dceaca 100644
--- a/configure/CONFIG_ENV
+++ b/configure/CONFIG_ENV
@@ -7,7 +7,6 @@
# and higher are distributed subject to a Software License Agreement found
# in file LICENSE that is included with this distribution.
#*************************************************************************
-# $Revision-Id$
# Author: Andrew Johnson
# Date: 20 April 1995
#
diff --git a/configure/CONFIG_FILE_TYPE b/configure/CONFIG_FILE_TYPE
index c15f4b783..b7870d7e5 100644
--- a/configure/CONFIG_FILE_TYPE
+++ b/configure/CONFIG_FILE_TYPE
@@ -6,7 +6,6 @@
# EPICS BASE is distributed subject to a Software License Agreement found
# in the file LICENSE that is included with this distribution.
#*************************************************************************
-# $Revision-Id$
#
# Macros and rules to create a new installation file type
#
diff --git a/configure/CONFIG_SITE b/configure/CONFIG_SITE
index 6c7f08239..d4edb948a 100644
--- a/configure/CONFIG_SITE
+++ b/configure/CONFIG_SITE
@@ -6,8 +6,7 @@
# EPICS BASE is distributed subject to a Software License Agreement found
# in the file LICENSE that is included with this distribution.
#*************************************************************************
-#
-# $Revision-Id$
+
#
# CONFIG_SITE - Global site configuration file
#
@@ -118,6 +117,13 @@ CROSS_COMPILER_TARGET_ARCHS=
# configure/os/CONFIG_SITE. Any patch files linked below should be applied at the root of the
-base-3.16.0.1 tree. Download them, then use the GNU Patch program as
+base-3.16.1 tree. Download them, then use the GNU Patch program as
follows: The following problems were known by the developers at the time of this
diff --git a/documentation/README.1st b/documentation/README.1st
index b74f6ae92..ee56e542f 100644
--- a/documentation/README.1st
+++ b/documentation/README.1st
@@ -1,24 +1,24 @@
Installation Instructions
- EPICS Base Release 3.16.0
+ EPICS Base Release 3.16.1
--------------------------------------------------------------------------
Table of Contents
- * What is EPICS base?
- * What is new in this release?
- * Copyright
- * Supported platforms
- * Supported compilers
- * Software requirements
- * Host system storage requirements
- * Documentation
- * Directory Structure
- * Build related components
- * Building EPICS base (Unix and Win32)
- * Example application and extension
- * Multiple host platforms
+ *�What is EPICS base?
+ *�What is new in this release?
+ *�Copyright
+ *�Supported platforms
+ *�Supported compilers
+ *�Software requirements
+ *�Host system storage requirements
+ *�Documentation
+ *�Directory Structure
+ *�Build related components
+ *�Building EPICS base (Unix and Win32)
+ *�Example application and extension
+ *�Multiple host platforms
--------------------------------------------------------------------------
diff --git a/documentation/README.darwin.html b/documentation/README.darwin.html
index 68e86171b..cbc290178 100644
--- a/documentation/README.darwin.html
+++ b/documentation/README.darwin.html
@@ -179,8 +179,6 @@ runAppleScript(const char *format, ...)
[pool release];
return ret;
}
-
Instructions for building and executing the 3.15 example application
@@ -350,8 +350,8 @@ Files in the base/startup directory have been provided to
create and build an example application in a user created <top>
directory. It also explains how to run the example application on a
vxWorks ioc or as a process on the host system.
- By running the example application as a host-based IOC, you will be
- able to quickly implement a complete EPICS system and be able to run channel
+ By running the example application as a host-based IOC, you will be
+ able to quickly implement a complete EPICS system and be able to run channel
access clients on the host system.
diff --git a/documentation/RELEASE_NOTES.html b/documentation/RELEASE_NOTES.html
index 4da494f4a..0da4a7b4f 100644
--- a/documentation/RELEASE_NOTES.html
+++ b/documentation/RELEASE_NOTES.html
@@ -3,15 +3,16 @@
This version of EPICS Base has not been released yet. The attempt to fix DNS related delays for short lived CLI programs (eg. caget)
+in lp:1527636 introduced a bug which cased these short lived clients to crash on exit.
+This bug should now be fixed. When a National Instruments network variables CA server is already running on
+a Windows system and an IOC or PCAS server is started, the IOC's attempt to
+bind a TCP socket to the CA server port number fails, but Windows returns a
+different error status value than the IOC is expecting in that circumstance
+(because the National Instruments code requests exclusive use of that port,
+unlike the EPICS code) so the IOC fails to start properly. The relevent EPICS
+bind() checks have now been updated so the IOC will request that a dynamic port
+number be allocated for this TCP socket instead when this happens. Code has been added to the IOC startup to better protect it against bad
+periodic scan rates, including against locales where Loading of database files has been optimized to avoid overproportionally
+long loading times for large databases. As a part of this, the alphabetical
+ordering of records instances (within a record type) has been dropped. In the
+unexpected case that applications were relying on the alphabetic order, setting
+dbRecordsAbcSorted = 1 before loading the databases will retain the
+old behavior. The routine dbRenameRecord() has been removed, as it was intended
+to be used by database configuration tools linked against a host side version
+of the dbStatic library that is not being built anymore. In addition to the more detailed change descriptions below, the following
+Launchpad bugs have also been fixed in this release: When using the Microsoft compilers a new build system variable is provided
+that controls whether whole program optimization is used or not. For static
+builds using Visual Studio 2010 this optimization must be disabled. This is
+controlled in the files configure/os/CONFIG_SITE.Common.windows-x64-static and
+configure/os/CONFIG_SITE.Common.win32-x86-static by setting the variable
+OPT_WHOLE_PROGRAM = NO to override the default value
+YES that would otherwise be used. Note that enabling this optimization slows down the build process. It is not
+possible to selectively disable this optimization, when building a particular
+module say; Microsoft's linker will restart itself automatically with the
+-LTCG flag set and display a warning if it is asked to link any object
+files that were compiled with the -GL flag. Dynamic array sizing support was added to the IOC server (RSRV) in the
+Base-3.14.12 release, but has not until now been supported in the In implementing the above, the gdd method gdd::put(const gdd *) now
+copies the full-sized array from the source gdd if the destination gdd is of
+type array, has no allocated memory and a boundary size of 0. The EPICS timestamp library (epicsTime) inside libCom's OSI layer has
+been extended by routines that convert from struct tm to the EPICS
+internal epicsTime type, assuming UTC - i.e. without going through
+the timezone mechanism. This solves issues with converting from the structured
+type to the EPICS timestamp at driver level from multiple threads at a high
+repetition rate, where the timezone mechanism was blocking on file access. The build configuration files that allow cross-building of the 32-bit
+win32-x86-mingw cross-target have been adjusted to default to building shared
+libraries (DLLs) as this is now supported by recent MinGW compilers. The 64-bit
+windows-x64-mingw cross-target was already being built that way by default. The
+configuration options to tell the minGW cross-compiler to link programs with
+static versions of the compiler support libraries have now been moved into the
+CONFIG_SITE.linux-x86.target files. The iocInit code now performs a sanity check of the current time
+returned by the generalTime subsystem and will print a warning if the wall-clock
+time returned has not been initialized yet. This is just a warning message; when
+a time provider does synchonize the IOC will subsequently pick up and use the
+correct time. This check code also primes the registered event system provider
+if there is one so the epicsTimeGetEventInt() routine will work on IOCs
+that ask for event time within an interrupt service routine. The osiClockTime provider's synchronization thread (which is only used on
+some embedded targets) will now poll the other time providers at 1Hz until the
+first time it manages to get a successful timestamp, after which it will poll
+for updates every 60 seconds as before. The routine generalTimeGetExceptPriority() was designed for use by
+backup (lower priority) time providers like the osiClockTime provider which do
+not have their own absolute time reference and rely on other providers for an
+absolute time source. This routine no longer implements the ratchet mechanism
+that prevented the time it returned from going backwards. If the backup clock's
+tick-timer runs fast the synchronization of the backup time provider would never
+allow it to be corrected backwards when the ratchet was in place. The regular
+epicsTimeGetCurrent() API still uses the ratchet mechanism, so this
+change will not cause the IOC to see time going backwards. The build configuration files for builds using the Microsoft compilers have
+been updated, although there should be no noticable difference at most sites.
+One extra compiler warning is now being suppressed for C++ code, C4344:
+behavior change: use of explicit template arguments results in ... which is
+gratuitous and was appearing frequently in builds of the EPICS V4 modules. Cross-builds of the windows-x64 target from a win32-x86 host have been
+removed as they don't actually work within the context of a single make
+run. Significant changes to the build configuration files would be necessary for
+these kinds of cross-builds to work properly, which could be done if someone
+needs them (email Andrew Johnson before working on this, and see
+
+this stack-overflow answer for a starting point). In preparation for moving to git in place of the Bazaar revision control
+system we have removed all the keywords from the Base source code. Building this version of Base on a Linux system creates a systemd service
+file suitable for starting the Channel Access Repeater under systemd. The file
+will be installed into the target bin directory, from where it can be copied
+into the appropriate systemd location and modified as necessary. Installation
+instructions are included as comments in the file. A new "getenv" device support for both the stringin and lsi (long string
+input) record types can be used to read the value of an environment variable
+from the IOC at runtime. See base/db/softIocExit.db for sample usage. A new order-only prerequisite build rule has been added to ensure that
+library files (and DLL stubs on Windows) get installed before linking any
+executables, which resolves parallel build problems on high-powered CPUs. There
+are some (rare) cases though where a Makefile has to build an executable and run
+it to be able to compile code for a library built by the same Makefile. With
+this new build rule GNUmake will complain about a circular dependency and the
+build will probably fail in those cases. To avoid this problem the failing
+Makefile should set DELAY_INSTALL_LIBS = YES before including the
+$(TOP)/configure/RULES file, disabling the new build rule. The IOC now sets a number of environment variables at startup that provide
+the version of EPICS Base it was built against (EPICS_VERSION_...) and its build
+architecture (ARCH). In some cases this allows a single iocBoot/ioc directory to
+be used to run the same IOC on several different architectures without any
+changes. There are also 3 new environment parameters (EPICS_BUILD_...) available that
+C/C++ code can use to find out the target architecture, OS class and compiler
+class it was built with. These may be useful when writing interfaces to other
+languages. The mechanism behind the "promptgroup()" field property inside a record type
+definition has been changed. Instead of using a fixed set of choices,
+the static database access library now collects the used gui group names
+while parsing DBD information. Group names should start with a two-digit number
+plus space-dash-space to allow proper sorting of groups. The include file guigroup.h that defined the fixed set of choices
+has been deprecated. Instead, use the conversion functions between index number
+and group string that have been added to dbStaticLib. When a DBD file containing record-type descriptions is expanded, any
+old-style GUI_xxx group names will be replaced by a new-style
+string for use by the IOC. This permits an older record type to be used with
+the 3.15.4 release, although eventually record types should be converted by
+hand with better group names used.EPICS Base R3.16.0.1: Known Problems
+EPICS Base R3.16.1: Known Problems
% cd /path/to/base-3.16.0.1
+
@@ -340,7 +340,7 @@ Files in the base/startup directory have been provided to
% cd /path/to/base-3.16.1
% patch -p0 < /path/to/file.patch
-
diff --git a/documentation/README.html b/documentation/README.html
index f717c3d47..8917fa2e7 100644
--- a/documentation/README.html
+++ b/documentation/README.html
@@ -9,7 +9,7 @@
-$Revision-Id$
+Installation Instructions
-EPICS Base Release 3.16.0
+EPICS Base Release 3.16.1
Table of Contents
@@ -190,12 +190,12 @@
CONFIG.CrossCommon Cross build definitions
CONFIG.gnuCommon Gnu compiler build definitions for all archs
CONFIG_ADDONS Definitions for <osclass> and DEFAULT options
- CONFIG_APP_INCLUDE
+ CONFIG_APP_INCLUDE
CONFIG_BASE EPICS base tool and location definitions
CONFIG_BASE_VERSION Definitions for EPICS base version number
CONFIG_COMMON Definitions common to all builds
CONFIG_ENV Definitions of EPICS environment variables
- CONFIG_FILE_TYPE
+ CONFIG_FILE_TYPE
CONFIG_SITE Site specific make definitions
CONFIG_SITE_ENV Site defaults for EPICS environment variables
MAKEFILE Installs CONFIG* RULES* creates
@@ -206,9 +206,9 @@
RULES_ARCHS Definitions and rules for building architectures
RULES_BUILD Build and install rules and definitions
RULES_DIRS Definitions and rules for building subdirectories
- RULES_EXPAND
- RULES_FILE_TYPE
- RULES_TARGET
+ RULES_EXPAND
+ RULES_FILE_TYPE
+ RULES_TARGET
RULES_TOP Rules specific to a <top> dir (uninstall and tar)
Sample.Makefile Sample makefile with comments
Example application and extension
A perl tool, makeBaseApp.pl is included in the distribution
file. This script will create a sample application that can be built
- and then executed to try out this release of base.
+ and then executed to try out this release of base.
EPICS Base Release 3.16.0.2
+EPICS Base Release 3.16.1
Changes made on the 3.16 branch since 3.15.3
+
+Changes made on the 3.16 branch since 3.16.0.1
+
+Changes from the 3.14 branch since 3.15.5
+
+
+
+Fix DNS related crash on exit
+
+Server bind issue on Windows
+
+Checking Periodic Scan Rates
+
+.
is not
+accepted as a decimal separator character. If the scan period in a menuScan
+choice string cannot be parsed, the associated periodic scan thread will no
+longer be started by the IOC and a warning message will be displayed at iocInit
+time. The scanppl command will also flag the faulty menuScan value.Changes made between 3.15.4 and 3.15.5
+
+dbStatic Library Speedup and Cleanup
+
+Launchpad Bug-fixes
+
+
+
+
+Whole-Program Optimization for MS Visual Studio Targets
+
+Add dynamic (variable length) array support to PCAS
+
+Portable
+Channel Access Server
(PCAS). Channel Access server applications using the
+PCAS may not need to be modified at all; if they already push monitors with
+different gdd array lengths, those variable sizes will be forwarded to any CA
+clients who have requested variable length updates. The example CAS server
+application has been modified to demonstrate this feature.Additional epicsTime conversion
+
+MinGW Cross-builds from Linux
+
+General Time updates
+
+Microsoft Visual Studio builds
+
+Bazaar keywords such as 'Revision-Id' removed
+
+Linux systemd service file for CA Repeater
+
+Changes made between 3.15.3 and 3.15.4
+
+New string input device support "getenv"
+
+Build rules and DELAY_INSTALL_LIBS
+
+IOC environment variables and build parameters
+
+New implementation of promptgroup/gui_group field property
+
+CA server configuration changes
@@ -351,7 +622,76 @@ dbQuietMacroWarnings=1 VxWorks
541119.
Dirk Zimoch provided code that allows the NTP Time provider (used on VxWorks +and RTEMS only) to adapt to changes in the OS clock tick rate after the provider +has been initialized. Note that changing the tick rate after iocInit() is not +advisable, and that other software might still misbehave if initialized before +an OS tick rate change. This change was back-ported from the 3.15 branch.
+ +When a CA client gets data from an IOC record using a compound data type such +as DBR_TIME_DOUBLE the value field is fetched from the database in a +separate call than the other metadata, without keeping the record locked. This +allows some other thread such as a periodic scan thread a chance to interrupt +the get operation and process the record in between. CA monitors have always +been atomic as long as the value data isn't a string or an array, but this race +condition in the CA get path has now been fixed so the record will stay locked +between the two fetch operations.
+ +This fixes +Launchpad bug #1581212, thanks to Till Strauman and Dehong Zhang.
+ +The 'make runtests' and 'make tapfiles' build targets normally only run the +self-tests for the main EPICS_HOST_ARCH architecture. If the host is +able to execute self-test programs for other target architectures that are being +built by the host, such as when building a -debug version of the host +architecture for example, the names of those other architectures can be added to +the new CROSS_COMPILER_RUNTEST_ARCHS variable in either the +configure/CONFIG_SITE file or in an appropriate +configure/os/CONFIG_SITE.<host>.Common file to have the test +programs for those targets be run as well.
+ +An additional check has been added at build-time for the contents of the +configure/RELEASE file(s), which will mostly only affect users of the Debian +EPICS packages published by NSLS-2. Support modules may share an install path, +but all such modules must be listed adjacent to each other in any RELEASE files +that point to them. For example the following will fail the new checks:
+ ++ ++AUTOSAVE = /usr/lib/epics +ASYN = /home/mdavidsaver/asyn +EPICS_BASE = /usr/lib/epics +
giving the compile-time error
+ ++ + ++This application's RELEASE file(s) define + EPICS_BASE = /usr/lib/epics +after but not adjacent to + AUTOSAVE = /usr/lib/epics +Module definitions that share paths must be grouped together. +Either remove a definition, or move it to a line immediately +above or below the other(s). +Any non-module definitions belong in configure/CONFIG_SITE. +
In many cases such as the one above the order of the AUTOSAVE and +ASYN lines can be swapped to let the checks pass, but if the +AUTOSAVE module depended on ASYN and hence had to appear +before it in the list this error indicates that AUTOSAVE should also be +built in its own private area; a shared copy would likely be incompatible with +the version of ASYN built in the home directory.
--$Date$
-
- $Authors$
- $Revision-Id$
This document describes the procedures and provides a checklist of tasks that should be performed when creating production releases of EPICS Base.
The version released on the Feature Freeze date is designated the first -pre-release, -pre1. The first Release Candidate -rc1 is the +pre-release, -pre1. The first release candidate -rc1 is the first version that has undergone widespread testing and which has no known problems in it that are slated to be fixed in this release. New versions should be made at about weekly intervals during the testing and debugging period, and -will be designated as either pre-release versions or Release Candidates by the -Release Manager. A Release Candidate that has received widespread testing for a -week without any additional problems being discovered or significant changes -being committed can be designated as the final release version.
+will be designated as either pre-release or release candidate versions by the +Release Manager. After a release candidate has been available to the whole +community for testing for at least a week without any additional problems being +reported or significant changes being committed, the branch can be designated as +the final release version.The following roles are required. The individuals named here have have been -responsible for these tasks in the past and are expected to continue in the -relevent roles unless the Release Manager designates otherwise:
+The following roles are used below:
cd ~/base/mirror-3.16@@ -162,14 +155,16 @@ relevent roles unless the Release Manager designates otherwise: generates a gzipped tarfile directly from the repository:
- bzr tag R3.16.1-rcn + bzr tag R3.16.1-rc1
cd ~/base- This requires that the Bazaar keywords plugin is installed and - configured properly. + Create a GPG signature file of the tarfile as follows: +
- bzr export --keywords=publish - --root=base-3.16.1-rcn - -r tag:R3.16.1-rcn - base-3.16.1-rcn.tar.gz + bzr export + --root=base-3.16.1-rc1 + -r tag:R3.16.1-rc1 + base-3.16.1-rc1.tar.gz mirror-3.16
+ gpg --armor --sign --detach-sig base-3.16.1-rc1.tar.gz +
Ok to releasefrom all platform developers - once a Release Candidate version has gone a whole week without any + once a release candidate version has gone a whole week without any issues being reported.
cd ~/base- This requires that the Bazaar keywords plugin is installed and - configured properly. + Create a GPG signature file of the tarfile as follows: +
- bzr export --keywords=publish + bzr export --root=base-3.16.1 -r tag:R3.16.1 base-3.16.1.tar.gz mirror-3.16
+ gpg --armor --sign --detach-sig base-3.16.1.tar.gz +
Modified on -$Date$
or number of one of the following types:
- +caput [options] <PV name> <value> +caput [options] <PV name> <value> ... caput -a [options] <PV name> <no of elements> <value> ...Description
Put value to a PV.
-The specified value is written to the PV (as a string). The PV value is read -before and after the write operation and printed as "Old" and "new" values on -stdout.
+The specified value is written to the PV (as a string). The PV's value is +read before and after the write operation and printed as "Old" and "New" values +on stdout.
-The array variant writes an array to the specified PV. The first numeric -argument specifying the number of array elements is kept for compatibility with -the array data format of caget - the actual number of values specified on the -command line is used.
+There are two variants to the arguments for this command. For the scalar +variant without the
+ +-aflag, all the value arguments provided after +the PV name are concatenated with a single space character between them, and the +resulting string (up to 40 characters long unless the-Sflag is +given) is written to the specified PV.The array variant with the
-aflag writes an array of string +values to the specified PV. The numeric argument giving the number of array +elements is actually ignored, the array length to be written is actually +controlled by the number of values provided on the command line.
| -t | Terse mode - print only successfully written value, without name | +||
| -l | +Long mode "name timestamp value stat sevr" (read PVs as DBR_TIME_xxx) | +||
| Enum Format: | |||
| + | Default: | Auto - try value as ENUM string, then as index number | |
| Arrays: | |||
| -a | -Put array data | +Default: | +Put scalar |
| - | Value format: Print number of requested values, then list of - values | +Value format: all value arguments concatenated with spaces | |
| -S | -Put string as an array of char (long string) | +Put string as an array of chars (long string) | +|
| -a | +Put array | +||
| + | Value format: number of values, then list of values |
diff --git a/src/libCom/flex/flex.skel b/src/libCom/flex/flex.skel index b8fb64090..6b9805b04 100644 --- a/src/libCom/flex/flex.skel +++ b/src/libCom/flex/flex.skel @@ -1,8 +1,6 @@ /* A lexical scanner generated by flex */ -/* scanner skeleton version: - * $Revision-Id$ - */ +/* scanner skeleton */ #define FLEX_SCANNER diff --git a/src/libCom/flex/flex.skel.static b/src/libCom/flex/flex.skel.static index e4fa7deb1..5e8bf2810 100644 --- a/src/libCom/flex/flex.skel.static +++ b/src/libCom/flex/flex.skel.static @@ -1,8 +1,6 @@ /* A lexical scanner generated by flex */ -/* scanner skeleton version: - * $Revision-Id$ - */ +/* scanner skeleton */ /* modified by Jim Kowalkowski to have everything declared static */ diff --git a/src/libCom/flex/flexdef.h b/src/libCom/flex/flexdef.h index f05694a1c..79cfa9427 100644 --- a/src/libCom/flex/flexdef.h +++ b/src/libCom/flex/flexdef.h @@ -34,8 +34,6 @@ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. */ -/* @(#) $Revision-Id$ (LBL) */ - #ifndef INC_flexdef_H #define INC_flexdef_H diff --git a/src/libCom/flex/flexdoc.html b/src/libCom/flex/flexdoc.html index 0a3b59510..30ed69521 100644 --- a/src/libCom/flex/flexdoc.html +++ b/src/libCom/flex/flexdoc.html @@ -1,12 +1,3 @@ -/*************************************************************************\ -* Copyright (c) 2002 The University of Chicago, as Operator of Argonne -* National Laboratory. -* Copyright (c) 2002 The Regents of the University of California, as -* Operator of Los Alamos National Laboratory. -* EPICS BASE Versions 3.13.7 -* and higher are distributed subject to a Software License Agreement found -* in file LICENSE that is included with this distribution. -\*************************************************************************/diff --git a/src/libCom/flex/libmain.c b/src/libCom/flex/libmain.c index 70a10af06..878aa21dc 100644 --- a/src/libCom/flex/libmain.c +++ b/src/libCom/flex/libmain.c @@ -8,8 +8,6 @@ \*************************************************************************/ /* libmain - flex run-time support library "main" function */ -/* $Revision-Id$ */ - extern int yylex(); int main(int argc, char *argv[]) diff --git a/src/libCom/flex/scan.c b/src/libCom/flex/scan.c index 1c34ee1e9..a12c020bf 100644 --- a/src/libCom/flex/scan.c +++ b/src/libCom/flex/scan.c @@ -1,8 +1,6 @@ /* A lexical scanner generated by flex */ -/* scanner skeleton version: - * $Revision-Id$ - */ +/* scanner skeleton */ #define FLEX_SCANNER diff --git a/src/libCom/flex/yylex.c b/src/libCom/flex/yylex.c index 3fb51dcfa..28f487d6b 100644 --- a/src/libCom/flex/yylex.c +++ b/src/libCom/flex/yylex.c @@ -34,10 +34,6 @@ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. */ -/* - * $Revision-Id$ - */ - #include#include "flexdef.h" #include "parse.h" diff --git a/src/libCom/freeList/freeList.h b/src/libCom/freeList/freeList.h index c7ca84efc..77ebfb82e 100644 --- a/src/libCom/freeList/freeList.h +++ b/src/libCom/freeList/freeList.h @@ -7,10 +7,8 @@ * and higher are distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. \*************************************************************************/ -/* share/epicsH/freeList.h */ -/* share/epicsH $Revision-Id$ */ /* Author: Marty Kraimer Date: 04-19-94 */ - + #ifndef INCfreeListh #define INCfreeListh diff --git a/src/libCom/freeList/freeListLib.c b/src/libCom/freeList/freeListLib.c index b8e8e6f23..b489a476d 100755 --- a/src/libCom/freeList/freeListLib.c +++ b/src/libCom/freeList/freeListLib.c @@ -7,9 +7,7 @@ * and higher are distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. \*************************************************************************/ -/* $Revision-Id$ */ /* Author: Marty Kraimer Date: 04-19-94 */ - #include #include diff --git a/src/libCom/gpHash/gpHash.h b/src/libCom/gpHash/gpHash.h index ce6ec5f4a..d9c0dd204 100644 --- a/src/libCom/gpHash/gpHash.h +++ b/src/libCom/gpHash/gpHash.h @@ -7,7 +7,6 @@ * and higher are distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. \*************************************************************************/ -/* $Revision-Id$ */ /* Author: Marty Kraimer Date: 04-07-94 */ /* gph provides a general purpose directory accessed via a hash table*/ diff --git a/src/libCom/gpHash/gpHashLib.c b/src/libCom/gpHash/gpHashLib.c index 3b680a2fc..a56f00a0c 100644 --- a/src/libCom/gpHash/gpHashLib.c +++ b/src/libCom/gpHash/gpHashLib.c @@ -6,7 +6,6 @@ * EPICS BASE is distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. \*************************************************************************/ -/* $Revision-Id$ */ /* Author: Marty Kraimer Date: 04-07-94 */ diff --git a/src/libCom/iocsh/iocsh.cpp b/src/libCom/iocsh/iocsh.cpp index c5b629ba6..e2e3aaf41 100644 --- a/src/libCom/iocsh/iocsh.cpp +++ b/src/libCom/iocsh/iocsh.cpp @@ -559,6 +559,7 @@ iocshBody (const char *pathname, const char *commandLine, const char *macros) if (macros) { if (macParseDefns(NULL, macros, &defines) < 0) { + free(redirects); return -1; } } @@ -571,6 +572,7 @@ iocshBody (const char *pathname, const char *commandLine, const char *macros) if (handle == NULL) { if (macCreateHandle(&handle, pairs)) { errlogMessage("iocsh: macCreateHandle failed."); + free(redirects); return -1; } diff --git a/src/libCom/log/Makefile b/src/libCom/log/Makefile index 5b0f23cea..7d7a6b620 100644 --- a/src/libCom/log/Makefile +++ b/src/libCom/log/Makefile @@ -21,6 +21,8 @@ iocLogServer_LIBS = Com iocLogServer_SYS_LIBS_solaris += socket iocLogServer_SYS_LIBS_WIN32 += user32 ws2_32 -SCRIPTS_solaris := S99logServer -SCRIPTS_Linux := S99logServer +SCRIPTS_HOST = S99logServer + +EXPAND += S99logServer@ +EXPAND_VARS = INSTALL_BIN=$(abspath $(INSTALL_BIN)) diff --git a/src/libCom/log/RULES b/src/libCom/log/RULES deleted file mode 100644 index 0483b0518..000000000 --- a/src/libCom/log/RULES +++ /dev/null @@ -1,12 +0,0 @@ -#************************************************************************* -# Copyright (c) 2010 UChicago Argonne LLC, as Operator of Argonne -# National Laboratory. -# EPICS BASE is distributed subject to a Software License Agreement found -# in file LICENSE that is included with this distribution. -#************************************************************************* - -# This is a Makefile fragment, see src/libCom/Makefile. - -S99%: ../log/rc2.% - sed -e s%:INSTALL_BIN:%`cd $(INSTALL_BIN); pwd`% $< >$@ - diff --git a/src/libCom/log/rc2.logServer b/src/libCom/log/S99logServer@ similarity index 96% rename from src/libCom/log/rc2.logServer rename to src/libCom/log/S99logServer@ index 407227d91..294b2ec01 100644 --- a/src/libCom/log/rc2.logServer +++ b/src/libCom/log/S99logServer@ @@ -3,7 +3,7 @@ # System-V init script for the EPICS IOC Log Server. # -INSTALL_BIN=:INSTALL_BIN: +INSTALL_BIN=@INSTALL_BIN@ # To change the default values for the EPICS Environment parameters, # uncomment and modify the relevant lines below. diff --git a/src/libCom/log/iocLogServer.c b/src/libCom/log/iocLogServer.c index 3040c9cc8..f5694fc0f 100644 --- a/src/libCom/log/iocLogServer.c +++ b/src/libCom/log/iocLogServer.c @@ -7,7 +7,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ /* iocLogServer.c */ -/* $Revision-Id$ */ /* * archive logMsg() from several IOC's to a common rotating file @@ -85,131 +84,132 @@ static int sighupPipe[2]; /* * - * main() + * main() * */ int main(void) { - struct sockaddr_in serverAddr; /* server's address */ - struct timeval timeout; - int status; - struct ioc_log_server *pserver; + struct sockaddr_in serverAddr; /* server's address */ + struct timeval timeout; + int status; + struct ioc_log_server *pserver; - osiSockIoctl_t optval; + osiSockIoctl_t optval; - status = getConfig(); - if(status<0){ - fprintf(stderr, "iocLogServer: EPICS environment underspecified\n"); - fprintf(stderr, "iocLogServer: failed to initialize\n"); - return IOCLS_ERROR; - } + status = getConfig(); + if (status<0) { + fprintf(stderr, "iocLogServer: EPICS environment underspecified\n"); + fprintf(stderr, "iocLogServer: failed to initialize\n"); + return IOCLS_ERROR; + } - pserver = (struct ioc_log_server *) - calloc(1, sizeof *pserver); - if(!pserver){ - fprintf(stderr, "iocLogServer: %s\n", strerror(errno)); - return IOCLS_ERROR; - } + pserver = (struct ioc_log_server *) + calloc(1, sizeof *pserver); + if (!pserver) { + fprintf(stderr, "iocLogServer: %s\n", strerror(errno)); + return IOCLS_ERROR; + } - pserver->pfdctx = (void *) fdmgr_init(); - if(!pserver->pfdctx){ - fprintf(stderr, "iocLogServer: %s\n", strerror(errno)); - return IOCLS_ERROR; - } + pserver->pfdctx = (void *) fdmgr_init(); + if (!pserver->pfdctx) { + fprintf(stderr, "iocLogServer: %s\n", strerror(errno)); + return IOCLS_ERROR; + } - /* - * Open the socket. Use ARPA Internet address format and stream - * sockets. Format described in . - */ - pserver->sock = epicsSocketCreate(AF_INET, SOCK_STREAM, 0); - if (pserver->sock==INVALID_SOCKET) { + /* + * Open the socket. Use ARPA Internet address format and stream + * sockets. Format described in . + */ + pserver->sock = epicsSocketCreate(AF_INET, SOCK_STREAM, 0); + if (pserver->sock == INVALID_SOCKET) { char sockErrBuf[64]; epicsSocketConvertErrnoToString ( sockErrBuf, sizeof ( sockErrBuf ) ); - fprintf(stderr, "iocLogServer: sock create err: %s\n", sockErrBuf); - return IOCLS_ERROR; - } - + fprintf(stderr, "iocLogServer: sock create err: %s\n", sockErrBuf); + free(pserver); + return IOCLS_ERROR; + } + epicsSocketEnableAddressReuseDuringTimeWaitState ( pserver->sock ); - /* Zero the sock_addr structure */ - memset((void *)&serverAddr, 0, sizeof serverAddr); - serverAddr.sin_family = AF_INET; - serverAddr.sin_port = htons(ioc_log_port); + /* Zero the sock_addr structure */ + memset((void *)&serverAddr, 0, sizeof serverAddr); + serverAddr.sin_family = AF_INET; + serverAddr.sin_port = htons(ioc_log_port); - /* get server's Internet address */ - status = bind ( pserver->sock, - (struct sockaddr *)&serverAddr, - sizeof (serverAddr) ); - if (status<0) { + /* get server's Internet address */ + status = bind ( pserver->sock, + (struct sockaddr *)&serverAddr, + sizeof (serverAddr) ); + if (status < 0) { char sockErrBuf[64]; epicsSocketConvertErrnoToString ( sockErrBuf, sizeof ( sockErrBuf ) ); - fprintf(stderr, "iocLogServer: bind err: %s\n", sockErrBuf ); - fprintf (stderr, - "iocLogServer: a server is already installed on port %u?\n", - (unsigned)ioc_log_port); - return IOCLS_ERROR; - } + fprintf(stderr, "iocLogServer: bind err: %s\n", sockErrBuf ); + fprintf (stderr, + "iocLogServer: a server is already installed on port %u?\n", + (unsigned)ioc_log_port); + return IOCLS_ERROR; + } - /* listen and accept new connections */ - status = listen(pserver->sock, 10); - if (status<0) { + /* listen and accept new connections */ + status = listen(pserver->sock, 10); + if (status < 0) { char sockErrBuf[64]; epicsSocketConvertErrnoToString ( sockErrBuf, sizeof ( sockErrBuf ) ); - fprintf(stderr, "iocLogServer: listen err %s\n", sockErrBuf); - return IOCLS_ERROR; - } + fprintf(stderr, "iocLogServer: listen err %s\n", sockErrBuf); + return IOCLS_ERROR; + } - /* - * Set non blocking IO - * to prevent dead locks - */ - optval = TRUE; - status = socket_ioctl( - pserver->sock, - FIONBIO, - &optval); - if(status<0){ + /* + * Set non blocking IO + * to prevent dead locks + */ + optval = TRUE; + status = socket_ioctl( + pserver->sock, + FIONBIO, + &optval); + if (status < 0){ char sockErrBuf[64]; epicsSocketConvertErrnoToString ( sockErrBuf, sizeof ( sockErrBuf ) ); - fprintf(stderr, "iocLogServer: ioctl FIONBIO err %s\n", sockErrBuf); - return IOCLS_ERROR; - } + fprintf(stderr, "iocLogServer: ioctl FIONBIO err %s\n", sockErrBuf); + return IOCLS_ERROR; + } -# ifdef UNIX - status = setupSIGHUP(pserver); - if (status<0) { - return IOCLS_ERROR; - } -# endif +# ifdef UNIX + status = setupSIGHUP(pserver); + if (status < 0) { + return IOCLS_ERROR; + } +# endif - status = openLogFile(pserver); - if (status<0) { - fprintf(stderr, - "File access problems to `%s' because `%s'\n", - ioc_log_file_name, - strerror(errno)); - return IOCLS_ERROR; - } + status = openLogFile(pserver); + if (status < 0) { + fprintf(stderr, + "File access problems to `%s' because `%s'\n", + ioc_log_file_name, + strerror(errno)); + return IOCLS_ERROR; + } - status = fdmgr_add_callback( - pserver->pfdctx, - pserver->sock, - fdi_read, - acceptNewClient, - pserver); - if(status<0){ - fprintf(stderr, - "iocLogServer: failed to add read callback\n"); - return IOCLS_ERROR; - } + status = fdmgr_add_callback( + pserver->pfdctx, + pserver->sock, + fdi_read, + acceptNewClient, + pserver); + if (status < 0) { + fprintf(stderr, + "iocLogServer: failed to add read callback\n"); + return IOCLS_ERROR; + } - while(TRUE){ - timeout.tv_sec = 60; /* 1 min */ - timeout.tv_usec = 0; - fdmgr_pend_event(pserver->pfdctx, &timeout); - fflush(pserver->poutfile); - } + while (TRUE) { + timeout.tv_sec = 60; /* 1 min */ + timeout.tv_usec = 0; + fdmgr_pend_event(pserver->pfdctx, &timeout); + fflush(pserver->poutfile); + } } /* @@ -965,6 +965,7 @@ static int getDirectory(void) "Problem reading o/p from `%s' because `%s'\n", ioc_log_file_command, strerror(errno)); + (void) pclose(pipe); return IOCLS_ERROR; } (void) pclose(pipe); diff --git a/src/libCom/macLib/macCore.c b/src/libCom/macLib/macCore.c index dea4a061b..55d31719e 100644 --- a/src/libCom/macLib/macCore.c +++ b/src/libCom/macLib/macCore.c @@ -6,8 +6,7 @@ * EPICS BASE is distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. \*************************************************************************/ -/* $Revision-Id$ - * +/* * Implementation of core macro substitution library (macLib) * * The implementation is fairly unsophisticated and linked lists are @@ -868,9 +867,9 @@ static void refer ( MAC_HANDLE *handle, MAC_ENTRY *entry, int level, if ( !refentry->visited ) { /* reference is good, use it */ if ( !handle->dirty ) { - /* copy the already-expanded value, and its error status! */ + /* copy the already-expanded value, merge any error status */ cpy2val( refentry->value, &v, valend ); - entry->error = refentry->error; + entry->error = entry->error || refentry->error; } else { /* translate raw value */ const char *rv = refentry->rawval; diff --git a/src/libCom/macLib/macEnv.c b/src/libCom/macLib/macEnv.c index 8cdf8bd94..f102748a8 100644 --- a/src/libCom/macLib/macEnv.c +++ b/src/libCom/macLib/macEnv.c @@ -4,8 +4,7 @@ * EPICS BASE is distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. \*************************************************************************/ -/* $Revision-Id$ - * +/* * Macro expansion of environment variables */ diff --git a/src/libCom/macLib/macLib.h b/src/libCom/macLib/macLib.h index c06e67d9e..14ecdaa3f 100644 --- a/src/libCom/macLib/macLib.h +++ b/src/libCom/macLib/macLib.h @@ -6,8 +6,7 @@ * EPICS BASE is distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. \*************************************************************************/ -/* $Revision-Id$ - * +/* * Definitions for macro substitution library (macLib) * * William Lupton, W. M. Keck Observatory diff --git a/src/libCom/macLib/macLibNOTES b/src/libCom/macLib/macLibNOTES index d079a3282..fc3606254 100644 --- a/src/libCom/macLib/macLibNOTES +++ b/src/libCom/macLib/macLibNOTES @@ -1,5 +1,3 @@ -# $Revision-Id$ -# # Test input file for macTest filter, doubling as notes on usage of the # macro library. Some special strings at start of line are supported: # diff --git a/src/libCom/macLib/macUtil.c b/src/libCom/macLib/macUtil.c index ee7b53f7f..7bf73542e 100644 --- a/src/libCom/macLib/macUtil.c +++ b/src/libCom/macLib/macUtil.c @@ -6,8 +6,7 @@ * EPICS BASE is distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. \*************************************************************************/ -/* $Revision-Id$ - * +/* * Implementation of utility macro substitution library (macLib) * * William Lupton, W. M. Keck Observatory diff --git a/src/libCom/misc/alarm.h b/src/libCom/misc/alarm.h index 5158206f7..58e2b7313 100644 --- a/src/libCom/misc/alarm.h +++ b/src/libCom/misc/alarm.h @@ -7,7 +7,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ /* Alarm definitions, must match menuAlarmSevr.dbd and menuAlarmStat.dbd */ -/* $Revision-Id$ */ /* * Authors: Bob Dalesio and Marty Kraimer diff --git a/src/libCom/misc/alarmString.c b/src/libCom/misc/alarmString.c index b8c72451c..4db179dcb 100644 --- a/src/libCom/misc/alarmString.c +++ b/src/libCom/misc/alarmString.c @@ -6,7 +6,6 @@ * EPICS BASE is distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. \*************************************************************************/ -/* $Revision-Id$ */ /* String names for alarm status and severity values */ diff --git a/src/libCom/misc/alarmString.h b/src/libCom/misc/alarmString.h index 75fe2317c..ab320f058 100644 --- a/src/libCom/misc/alarmString.h +++ b/src/libCom/misc/alarmString.h @@ -6,7 +6,6 @@ * EPICS BASE is distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. \*************************************************************************/ -/* $Revision-Id$ */ /* * This file is deprecated, use alarm.h instead. diff --git a/src/libCom/misc/cantProceed.c b/src/libCom/misc/cantProceed.c index cbd7e87af..6c35796fd 100644 --- a/src/libCom/misc/cantProceed.c +++ b/src/libCom/misc/cantProceed.c @@ -7,7 +7,6 @@ * and higher are distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. \*************************************************************************/ -/* $Revision-Id$ */ /* Author: Marty Kraimer Date: 04JAN99 */ diff --git a/src/libCom/misc/dbDefs.h b/src/libCom/misc/dbDefs.h index e8c2bb265..e1de3f200 100644 --- a/src/libCom/misc/dbDefs.h +++ b/src/libCom/misc/dbDefs.h @@ -6,8 +6,7 @@ * EPICS BASE is distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. \*************************************************************************/ -/* $Revision-Id$ - * +/* * Author: Marty Kraimer * Date: 6-1-90 */ diff --git a/src/libCom/misc/epicsStdlib.c b/src/libCom/misc/epicsStdlib.c index b2d441274..865c8069d 100644 --- a/src/libCom/misc/epicsStdlib.c +++ b/src/libCom/misc/epicsStdlib.c @@ -6,7 +6,6 @@ * EPICS BASE is distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. \*************************************************************************/ -/* $Revision-Id$ */ /* Authors: Eric Norum & Andrew Johnson */ #include diff --git a/src/libCom/misc/epicsStdlib.h b/src/libCom/misc/epicsStdlib.h index 2d143cb39..20b7cd26f 100644 --- a/src/libCom/misc/epicsStdlib.h +++ b/src/libCom/misc/epicsStdlib.h @@ -70,12 +70,12 @@ epicsShareFunc int /* These macros return 1 if successful, 0 on failure. * This is analagous to the return value from sscanf() */ -#define epicsScanLong(str, to, base) !epicsParseLong(str, to, base, NULL) -#define epicsScanULong(str, to, base) !epicsParseULong(str, to, base, NULL) -#define epicsScanLLong(str, to, base) !epicsParseLLong(str, to, base, NULL) -#define epicsScanULLong(str, to, base) !epicsParseULLong(str, to, base, NULL) -#define epicsScanFloat(str, to) !epicsParseFloat(str, to, NULL) -#define epicsScanDouble(str, to) !epicsParseDouble(str, to, NULL) +#define epicsScanLong(str, to, base) (!epicsParseLong(str, to, base, NULL)) +#define epicsScanULong(str, to, base) (!epicsParseULong(str, to, base, NULL)) +#define epicsScanLLong(str, to, base) (!epicsParseLLong(str, to, base, NULL)) +#define epicsScanULLong(str, to, base) (!epicsParseULLong(str, to, base, NULL)) +#define epicsScanFloat(str, to) (!epicsParseFloat(str, to, NULL)) +#define epicsScanDouble(str, to) (!epicsParseDouble(str, to, NULL)) #ifdef __cplusplus } diff --git a/src/libCom/misc/epicsString.c b/src/libCom/misc/epicsString.c index 996c669aa..e41e21b72 100644 --- a/src/libCom/misc/epicsString.c +++ b/src/libCom/misc/epicsString.c @@ -7,7 +7,6 @@ * EPICS BASE is distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. \*************************************************************************/ -/* $Revision-Id$ */ /* Authors: Jun-ichi Odagiri, Marty Kraimer, Eric Norum, * Mark Rivers, Andrew Johnson, Ralph Lange @@ -266,6 +265,18 @@ int epicsStrPrintEscaped(FILE *fp, const char *s, size_t len) return nout; } +/* Until Base requires POSIX 2008 we must provide our own implementation */ +size_t epicsStrnLen(const char *s, size_t maxlen) +{ + size_t i; + + for (i=0; i #include +//#define EPICS_FREELIST_DEBUG +#define EPICS_PRIVATE_API + #define epicsExportSharedSymbols #include "ipAddrToAsciiAsynchronous.h" #include "epicsThread.h" @@ -54,7 +48,6 @@ public: < ipAddrToAsciiTransactionPrivate, 0x80 > & ); epicsPlacementDeleteOperator (( void *, tsFreeList < ipAddrToAsciiTransactionPrivate, 0x80 > & )) -private: osiSockAddr addr; ipAddrToAsciiEnginePrivate & engine; ipAddrToAsciiCallBack * pCB; @@ -62,7 +55,7 @@ private: void ipAddrToAscii ( const osiSockAddr &, ipAddrToAsciiCallBack & ); void release (); void operator delete ( void * ); - friend class ipAddrToAsciiEnginePrivate; +private: ipAddrToAsciiTransactionPrivate & operator = ( const ipAddrToAsciiTransactionPrivate & ); ipAddrToAsciiTransactionPrivate ( const ipAddrToAsciiTransactionPrivate & ); }; @@ -83,41 +76,54 @@ extern "C" { static void ipAddrToAsciiEngineGlobalMutexConstruct ( void * ); } -// - this class executes the synchronous DNS query -// - it creates one thread -class ipAddrToAsciiEnginePrivate : - public ipAddrToAsciiEngine, - public epicsThreadRunable { -public: - ipAddrToAsciiEnginePrivate (); - virtual ~ipAddrToAsciiEnginePrivate (); - void show ( unsigned level ) const; -private: +namespace { +struct ipAddrToAsciiGlobal : public epicsThreadRunable { + ipAddrToAsciiGlobal(); + virtual ~ipAddrToAsciiGlobal() {} + + virtual void run (); + char nameTmp [1024]; - tsFreeList - < ipAddrToAsciiTransactionPrivate, 0x80 > + tsFreeList + < ipAddrToAsciiTransactionPrivate, 0x80 > transactionFreeList; tsDLList < ipAddrToAsciiTransactionPrivate > labor; mutable epicsMutex mutex; epicsEvent laborEvent; epicsEvent destructorBlockEvent; epicsThread thread; + // pCurrent may be changed by any thread (worker or other) ipAddrToAsciiTransactionPrivate * pCurrent; + // pActive may only be changed by the worker + ipAddrToAsciiTransactionPrivate * pActive; unsigned cancelPendingCount; bool exitFlag; bool callbackInProgress; - static ipAddrToAsciiEnginePrivate * pEngine; +}; +} + +// - this class executes the synchronous DNS query +// - it creates one thread +class ipAddrToAsciiEnginePrivate : + public ipAddrToAsciiEngine { +public: + ipAddrToAsciiEnginePrivate() :refcount(1u), released(false) {} + virtual ~ipAddrToAsciiEnginePrivate () {} + void show ( unsigned level ) const; + + unsigned refcount; + bool released; + + static ipAddrToAsciiGlobal * pEngine; ipAddrToAsciiTransaction & createTransaction (); - void release (); - void run (); - ipAddrToAsciiEnginePrivate ( const ipAddrToAsciiEngine & ); + void release (); + +private: + ipAddrToAsciiEnginePrivate ( const ipAddrToAsciiEngine & ); ipAddrToAsciiEnginePrivate & operator = ( const ipAddrToAsciiEngine & ); - friend class ipAddrToAsciiEngine; - friend class ipAddrToAsciiTransactionPrivate; - friend void ipAddrToAsciiEngineGlobalMutexConstruct ( void * ); }; -ipAddrToAsciiEnginePrivate * ipAddrToAsciiEnginePrivate :: pEngine = 0; +ipAddrToAsciiGlobal * ipAddrToAsciiEnginePrivate :: pEngine = 0; static epicsThreadOnceId ipAddrToAsciiEngineGlobalMutexOnceFlag = EPICS_THREAD_ONCE_INIT; // the users are not required to supply a show routine @@ -132,12 +138,24 @@ ipAddrToAsciiEngine::~ipAddrToAsciiEngine () {} static void ipAddrToAsciiEngineGlobalMutexConstruct ( void * ) { try { - ipAddrToAsciiEnginePrivate::pEngine = new ipAddrToAsciiEnginePrivate (); + ipAddrToAsciiEnginePrivate::pEngine = new ipAddrToAsciiGlobal (); } catch (std::exception& e) { errlogPrintf("ipAddrToAsciiEnginePrivate ctor fails with: %s\n", e.what()); } } +void ipAddrToAsciiEngine::cleanup() +{ + { + epicsGuard G(ipAddrToAsciiEnginePrivate::pEngine->mutex); + ipAddrToAsciiEnginePrivate::pEngine->exitFlag = true; + } + ipAddrToAsciiEnginePrivate::pEngine->laborEvent.signal(); + ipAddrToAsciiEnginePrivate::pEngine->thread.exitWait(); + delete ipAddrToAsciiEnginePrivate::pEngine; + ipAddrToAsciiEnginePrivate::pEngine = 0; +} + // for now its probably sufficent to allocate one // DNS transaction thread for all codes sharing // the same process that need DNS services but we @@ -149,41 +167,78 @@ ipAddrToAsciiEngine & ipAddrToAsciiEngine::allocate () ipAddrToAsciiEngineGlobalMutexConstruct, 0 ); if(!ipAddrToAsciiEnginePrivate::pEngine) throw std::runtime_error("ipAddrToAsciiEngine::allocate fails"); - return * ipAddrToAsciiEnginePrivate::pEngine; + return * new ipAddrToAsciiEnginePrivate(); } -ipAddrToAsciiEnginePrivate::ipAddrToAsciiEnginePrivate () : +ipAddrToAsciiGlobal::ipAddrToAsciiGlobal () : thread ( *this, "ipToAsciiProxy", epicsThreadGetStackSize(epicsThreadStackBig), epicsThreadPriorityLow ), - pCurrent ( 0 ), cancelPendingCount ( 0u ), exitFlag ( false ), + pCurrent ( 0 ), pActive ( 0 ), cancelPendingCount ( 0u ), exitFlag ( false ), callbackInProgress ( false ) { this->thread.start (); // start the thread } -ipAddrToAsciiEnginePrivate::~ipAddrToAsciiEnginePrivate () -{ - { - epicsGuard < epicsMutex > guard ( this->mutex ); - this->exitFlag = true; - } - this->laborEvent.signal (); - this->thread.exitWait (); -} void ipAddrToAsciiEnginePrivate::release () { + bool last; + { + epicsGuard < epicsMutex > guard ( this->pEngine->mutex ); + if(released) + throw std::logic_error("Engine release() called again!"); + + // released==true prevents new transactions + released = true; + + { + // cancel any pending transactions + tsDLIter < ipAddrToAsciiTransactionPrivate > it(pEngine->labor.firstIter()); + while(it.valid()) { + ipAddrToAsciiTransactionPrivate *trn = it.pointer(); + ++it; + + if(this==&trn->engine) { + trn->pending = false; + pEngine->labor.remove(*trn); + } + } + + // cancel transaction in lookup or callback + if (pEngine->pCurrent && this==&pEngine->pCurrent->engine) { + pEngine->pCurrent->pending = false; + pEngine->pCurrent = 0; + } + + // wait for completion of in-progress callback + pEngine->cancelPendingCount++; + while(pEngine->pActive && this==&pEngine->pActive->engine + && ! pEngine->thread.isCurrentThread()) { + epicsGuardRelease < epicsMutex > unguard ( guard ); + pEngine->destructorBlockEvent.wait(); + } + pEngine->cancelPendingCount--; + if(pEngine->cancelPendingCount) + pEngine->destructorBlockEvent.signal(); + } + + assert(refcount>0); + last = 0==--refcount; + } + if(last) { + delete this; + } } void ipAddrToAsciiEnginePrivate::show ( unsigned level ) const { - epicsGuard < epicsMutex > guard ( this->mutex ); + epicsGuard < epicsMutex > guard ( this->pEngine->mutex ); printf ( "ipAddrToAsciiEngine at %p with %u requests pending\n", - static_cast (this), this->labor.count () ); + static_cast (this), this->pEngine->labor.count () ); if ( level > 0u ) { - tsDLIterConst < ipAddrToAsciiTransactionPrivate > - pItem = this->labor.firstIter (); + tsDLIter < ipAddrToAsciiTransactionPrivate > + pItem = this->pEngine->labor.firstIter (); while ( pItem.valid () ) { pItem->show ( level - 1u ); pItem++; @@ -191,10 +246,10 @@ void ipAddrToAsciiEnginePrivate::show ( unsigned level ) const } if ( level > 1u ) { printf ( "mutex:\n" ); - this->mutex.show ( level - 2u ); + this->pEngine->mutex.show ( level - 2u ); printf ( "laborEvent:\n" ); - this->laborEvent.show ( level - 2u ); - printf ( "exitFlag boolean = %u\n", this->exitFlag ); + this->pEngine->laborEvent.show ( level - 2u ); + printf ( "exitFlag boolean = %u\n", this->pEngine->exitFlag ); printf ( "exit event:\n" ); } } @@ -227,10 +282,20 @@ void ipAddrToAsciiTransactionPrivate::operator delete ( void * ) ipAddrToAsciiTransaction & ipAddrToAsciiEnginePrivate::createTransaction () { - return * new ( this->transactionFreeList ) ipAddrToAsciiTransactionPrivate ( *this ); + epicsGuard G(this->pEngine->mutex); + if(this->released) + throw std::logic_error("createTransaction() on release()'d ipAddrToAsciiEngine"); + + assert(this->refcount>0); + + ipAddrToAsciiTransactionPrivate *ret = new ( this->pEngine->transactionFreeList ) ipAddrToAsciiTransactionPrivate ( *this ); + + this->refcount++; + + return * ret; } -void ipAddrToAsciiEnginePrivate::run () +void ipAddrToAsciiGlobal::run () { epicsGuard < epicsMutex > guard ( this->mutex ); while ( ! this->exitFlag ) { @@ -265,15 +330,20 @@ void ipAddrToAsciiEnginePrivate::run () continue; } + // fix for lp:1580623 + // a destructing cac sets pCurrent to NULL, so + // make local copy to avoid race when releasing the guard + ipAddrToAsciiTransactionPrivate *pCur = pActive = pCurrent; this->callbackInProgress = true; { epicsGuardRelease < epicsMutex > unguard ( guard ); // dont call callback with lock applied - this->pCurrent->pCB->transactionComplete ( this->nameTmp ); + pCur->pCB->transactionComplete ( this->nameTmp ); } this->callbackInProgress = false; + pActive = 0; if ( this->pCurrent ) { this->pCurrent->pending = false; @@ -297,44 +367,53 @@ ipAddrToAsciiTransactionPrivate::ipAddrToAsciiTransactionPrivate void ipAddrToAsciiTransactionPrivate::release () { this->~ipAddrToAsciiTransactionPrivate (); - this->engine.transactionFreeList.release ( this ); + this->engine.pEngine->transactionFreeList.release ( this ); } ipAddrToAsciiTransactionPrivate::~ipAddrToAsciiTransactionPrivate () { - epicsGuard < epicsMutex > guard ( this->engine.mutex ); - while ( this->pending ) { - if ( this->engine.pCurrent == this && - this->engine.callbackInProgress && - ! this->engine.thread.isCurrentThread() ) { - // cancel from another thread while callback in progress - // waits for callback to complete - assert ( this->engine.cancelPendingCount < UINT_MAX ); - this->engine.cancelPendingCount++; - { - epicsGuardRelease < epicsMutex > unguard ( guard ); - this->engine.destructorBlockEvent.wait (); - } - assert ( this->engine.cancelPendingCount > 0u ); - this->engine.cancelPendingCount--; - if ( ! this->pending ) { - if ( this->engine.cancelPendingCount ) { - this->engine.destructorBlockEvent.signal (); + ipAddrToAsciiGlobal *pGlobal = this->engine.pEngine; + bool last; + { + epicsGuard < epicsMutex > guard ( pGlobal->mutex ); + while ( this->pending ) { + if ( pGlobal->pCurrent == this && + pGlobal->callbackInProgress && + ! pGlobal->thread.isCurrentThread() ) { + // cancel from another thread while callback in progress + // waits for callback to complete + assert ( pGlobal->cancelPendingCount < UINT_MAX ); + pGlobal->cancelPendingCount++; + { + epicsGuardRelease < epicsMutex > unguard ( guard ); + pGlobal->destructorBlockEvent.wait (); + } + assert ( pGlobal->cancelPendingCount > 0u ); + pGlobal->cancelPendingCount--; + if ( ! this->pending ) { + if ( pGlobal->cancelPendingCount ) { + pGlobal->destructorBlockEvent.signal (); + } + break; } - break; - } - } - else { - if ( this->engine.pCurrent == this ) { - // cancel from callback, or while lookup in progress - this->engine.pCurrent = 0; } else { - // cancel before lookup starts - this->engine.labor.remove ( *this ); + if ( pGlobal->pCurrent == this ) { + // cancel from callback, or while lookup in progress + pGlobal->pCurrent = 0; + } + else { + // cancel before lookup starts + pGlobal->labor.remove ( *this ); + } + this->pending = false; } - this->pending = false; } + assert(this->engine.refcount>0); + last = 0==--this->engine.refcount; + } + if(last) { + delete &this->engine; } } @@ -342,15 +421,21 @@ void ipAddrToAsciiTransactionPrivate::ipAddrToAscii ( const osiSockAddr & addrIn, ipAddrToAsciiCallBack & cbIn ) { bool success; + ipAddrToAsciiGlobal *pGlobal = this->engine.pEngine; { - epicsGuard < epicsMutex > guard ( this->engine.mutex ); - // put some reasonable limit on queue expansion - if ( !this->pending && engine.labor.count () < 16u ) { + epicsGuard < epicsMutex > guard ( pGlobal->mutex ); + + if (this->engine.released) { + errlogPrintf("Warning: ipAddrToAscii on transaction with release()'d ipAddrToAsciiEngine"); + success = false; + + } else if ( !this->pending && pGlobal->labor.count () < 16u ) { + // put some reasonable limit on queue expansion this->addr = addrIn; this->pCB = & cbIn; this->pending = true; - this->engine.labor.add ( *this ); + pGlobal->labor.add ( *this ); success = true; } else { @@ -359,7 +444,7 @@ void ipAddrToAsciiTransactionPrivate::ipAddrToAscii ( } if ( success ) { - this->engine.laborEvent.signal (); + pGlobal->laborEvent.signal (); } else { char autoNameTmp[256]; @@ -376,7 +461,7 @@ osiSockAddr ipAddrToAsciiTransactionPrivate::address () const void ipAddrToAsciiTransactionPrivate::show ( unsigned level ) const { - epicsGuard < epicsMutex > guard ( this->engine.mutex ); + epicsGuard < epicsMutex > guard ( this->engine.pEngine->mutex ); char ipAddr [64]; sockAddrToDottedIP ( &this->addr.sa, ipAddr, sizeof ( ipAddr ) ); printf ( "ipAddrToAsciiTransactionPrivate for address %s\n", ipAddr ); diff --git a/src/libCom/misc/ipAddrToAsciiAsynchronous.h b/src/libCom/misc/ipAddrToAsciiAsynchronous.h index 95b853994..9aefca44e 100644 --- a/src/libCom/misc/ipAddrToAsciiAsynchronous.h +++ b/src/libCom/misc/ipAddrToAsciiAsynchronous.h @@ -9,16 +9,6 @@ \*************************************************************************/ /* - * $Revision-Id$ - * - * - * L O S A L A M O S - * Los Alamos National Laboratory - * Los Alamos, New Mexico 87545 - * - * Copyright, 1986, The Regents of the University of California. - * - * * Author Jeffrey O. Hill * johill@lanl.gov */ @@ -54,6 +44,10 @@ public: static ipAddrToAsciiEngine & allocate (); protected: virtual ~ipAddrToAsciiEngine () = 0; +public: +#ifdef EPICS_PRIVATE_API + static void cleanup(); +#endif }; #endif // ifdef ipAddrToAsciiAsynchronous_h diff --git a/src/libCom/misc/locationException.h b/src/libCom/misc/locationException.h index 4a5a279a9..30b187208 100644 --- a/src/libCom/misc/locationException.h +++ b/src/libCom/misc/locationException.h @@ -8,8 +8,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ -// -// $Revision-Id$ // // Author: Jeff Hill // diff --git a/src/libCom/misc/makeEpicsVersion.pl b/src/libCom/misc/makeEpicsVersion.pl index 08f5aa3c0..c7c9acc39 100644 --- a/src/libCom/misc/makeEpicsVersion.pl +++ b/src/libCom/misc/makeEpicsVersion.pl @@ -30,7 +30,7 @@ print "Building $opt_o from $infile\n" unless $opt_q; open my $VARS, '<', $infile or die "$tool: Can't open $infile: $!\n"; -my ($ver, $rev, $mod, $patch, $snapshot, $commit_date); +my ($ver, $rev, $mod, $patch, $snapshot); while (<$VARS>) { chomp; next if m/^\s*#/; # Skip comments @@ -39,16 +39,16 @@ while (<$VARS>) { if (m/^EPICS_MODIFICATION\s*=\s*(\d+)/) { $mod = $1; } if (m/^EPICS_PATCH_LEVEL\s*=\s*(\d+)/) { $patch = $1; } if (m/^EPICS_DEV_SNAPSHOT\s*=\s*([-\w]*)/) { $snapshot = $1; } - if (m/^COMMIT_DATE\s*=\s*"\\(.*)"/) { $commit_date = $1; } } close $VARS; map { die "$tool: Variable missing from $infile" unless defined $_; -} $ver, $rev, $mod, $patch, $snapshot, $commit_date; +} $ver, $rev, $mod, $patch, $snapshot; my $ver_str = "$ver.$rev.$mod"; $ver_str .= ".$patch" if $patch > 0; +my $ver_short = $ver_str; $ver_str .= $snapshot if $snapshot ne ''; $ver_str .= "-$opt_v" if $opt_v; @@ -71,10 +71,15 @@ print $OUT <<"END"; #define EPICS_PATCH_LEVEL $patch #define EPICS_DEV_SNAPSHOT "$snapshot" #define EPICS_SITE_VERSION "$opt_v" -#define EPICS_VERSION_STRING "EPICS $ver_str" -#define epicsReleaseVersion "EPICS R$ver_str $commit_date" -#define VERSION_INT(V,R,M,P) ( ((V)<<24) | ((R)<<16) | ((M)<<8) | (P)) +#define EPICS_VERSION_SHORT "$ver_short" +#define EPICS_VERSION_FULL "$ver_str" +#define EPICS_VERSION_STRING "EPICS $ver_str" +#define epicsReleaseVersion "EPICS R$ver_str" + +#ifndef VERSION_INT +# define VERSION_INT(V,R,M,P) ( ((V)<<24) | ((R)<<16) | ((M)<<8) | (P)) +#endif #define EPICS_VERSION_INT VERSION_INT($ver, $rev, $mod, $patch) #endif /* INC_${obase}_H */ diff --git a/src/libCom/misc/testMain.h b/src/libCom/misc/testMain.h index 655503881..4db72c39e 100644 --- a/src/libCom/misc/testMain.h +++ b/src/libCom/misc/testMain.h @@ -4,7 +4,6 @@ * EPICS BASE is distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. \*************************************************************************/ -/* $Revision-Id$ */ #ifndef INC_testMain_H #define INC_testMain_H diff --git a/src/libCom/misc/unixFileName.h b/src/libCom/misc/unixFileName.h index faeed9d8e..36e818c8f 100644 --- a/src/libCom/misc/unixFileName.h +++ b/src/libCom/misc/unixFileName.h @@ -10,8 +10,6 @@ /* * unixFileName.h * Author: Jeff Hill - * - * */ #ifndef unixFileNameH #define unixFileNameH diff --git a/src/libCom/osi/devLib.h b/src/libCom/osi/devLib.h index b78f94907..729f9b932 100644 --- a/src/libCom/osi/devLib.h +++ b/src/libCom/osi/devLib.h @@ -9,7 +9,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ /* devLib.h */ -/* $Revision-Id$ */ /* * Original Author: Marty Kraimer diff --git a/src/libCom/osi/devLibVME.c b/src/libCom/osi/devLibVME.c index a935e4857..6c7d93f99 100644 --- a/src/libCom/osi/devLibVME.c +++ b/src/libCom/osi/devLibVME.c @@ -9,7 +9,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ /* devLib.c - support for allocation of common device resources */ -/* $Revision-Id$ */ /* * Original Author: Marty Kraimer diff --git a/src/libCom/osi/devLibVME.h b/src/libCom/osi/devLibVME.h index 8e526a139..4fb17f0c2 100644 --- a/src/libCom/osi/devLibVME.h +++ b/src/libCom/osi/devLibVME.h @@ -7,7 +7,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ /* devLib.h */ -/* devLib.h,v 1.1.2.8 2009/07/09 15:27:43 anj Exp */ /* * Original Author: Marty Kraimer diff --git a/src/libCom/osi/devLibVMEImpl.h b/src/libCom/osi/devLibVMEImpl.h index e695edeb9..e479d869c 100644 --- a/src/libCom/osi/devLibVMEImpl.h +++ b/src/libCom/osi/devLibVMEImpl.h @@ -9,7 +9,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ /* devLibImpl.h */ -/* */ /* * Original Author: Marty Kraimer diff --git a/src/libCom/osi/epicsAssert.h b/src/libCom/osi/epicsAssert.h index a16c036ec..60dc130c8 100644 --- a/src/libCom/osi/epicsAssert.h +++ b/src/libCom/osi/epicsAssert.h @@ -6,7 +6,6 @@ * EPICS BASE is distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. \*************************************************************************/ -/* $Revision-Id$ */ /* * EPICS assert * diff --git a/src/libCom/osi/epicsGeneralTime.c b/src/libCom/osi/epicsGeneralTime.c index 7f8e1b66f..ca3317ee3 100644 --- a/src/libCom/osi/epicsGeneralTime.c +++ b/src/libCom/osi/epicsGeneralTime.c @@ -1,5 +1,5 @@ /*************************************************************************\ -* Copyright (c) 2009 UChicago Argonne LLC, as Operator of Argonne +* Copyright (c) 2016 UChicago Argonne LLC, as Operator of Argonne * National Laboratory. * Copyright (c) 2008 Diamond Light Source Ltd * Copyright (c) 2004 Oak Ridge National Laboratory @@ -31,6 +31,17 @@ #include "generalTimeSup.h" #include "epicsGeneralTime.h" +/* Change 'undef' to 'define' to turn on debug statements: */ +#undef DEBUG_GENERAL_TIME + +#ifdef DEBUG_GENERAL_TIME + int generalTimeDebug = 10; +# define IFDEBUG(n) \ + if (generalTimeDebug >= n) /* block or statement */ +#else +# define IFDEBUG(n) \ + if(0) /* Compiler will elide the block or statement */ +#endif /* Declarations */ @@ -65,6 +76,7 @@ static struct { static epicsThreadOnceId onceId = EPICS_THREAD_ONCE_INIT; +static const char * const tsfmt = "%Y-%m-%d %H:%M:%S.%09f"; /* Implementation */ @@ -75,6 +87,9 @@ static void generalTime_InitOnce(void *dummy) ellInit(>Pvt.eventProviders); gtPvt.eventListLock = epicsMutexMustCreate(); + + IFDEBUG(1) + printf("General Time Initialized\n"); } void generalTime_Init(void) @@ -90,44 +105,103 @@ int generalTimeGetExceptPriority(epicsTimeStamp *pDest, int *pPrio, int ignore) generalTime_Init(); + IFDEBUG(2) + printf("generalTimeGetExceptPriority(ignore=%d)\n", ignore); + epicsMutexMustLock(gtPvt.timeListLock); for (ptp = (gtProvider *)ellFirst(>Pvt.timeProviders); ptp; ptp = (gtProvider *)ellNext(&ptp->node)) { - if (ptp->priority == ignore) + if ((ignore > 0 && ptp->priority == ignore) || + (ignore < 0 && ptp->priority != -ignore)) continue; status = ptp->get.Time(pDest); if (status == epicsTimeOK) { - /* check time is monotonic */ - if (epicsTimeGreaterThanEqual(pDest, >Pvt.lastProvidedTime)) { - gtPvt.lastProvidedTime = *pDest; - if (ignore == 0) - gtPvt.lastTimeProvider = ptp; - if (pPrio) - *pPrio = ptp->priority; - } else { - int key; - - *pDest = gtPvt.lastProvidedTime; - if (pPrio) - *pPrio = gtPvt.lastTimeProvider->priority; - key = epicsInterruptLock(); - gtPvt.ErrorCounts++; - epicsInterruptUnlock(key); - } + /* No ratchet, time from this routine may go backwards */ + if (pPrio) + *pPrio = ptp->priority; break; } + else IFDEBUG(2) + printf("gTGExP provider '%s' returned error\n", ptp->name); } - if (status && ignore == 0) - gtPvt.lastTimeProvider = NULL; epicsMutexUnlock(gtPvt.timeListLock); + IFDEBUG(2) { + if (ptp && status == epicsTimeOK) { + char buff[40]; + + epicsTimeToStrftime(buff, sizeof(buff), tsfmt, pDest); + printf("gTGExP returning %s from provider '%s'\n", + buff, ptp->name); + } + else + printf("gTGExP returning error\n"); + } + return status; } int epicsShareAPI epicsTimeGetCurrent(epicsTimeStamp *pDest) { - return generalTimeGetExceptPriority(pDest, NULL, 0); + gtProvider *ptp; + int status = S_time_noProvider; + epicsTimeStamp ts; + + generalTime_Init(); + + IFDEBUG(20) + printf("epicsTimeGetCurrent()\n"); + + epicsMutexMustLock(gtPvt.timeListLock); + for (ptp = (gtProvider *)ellFirst(>Pvt.timeProviders); + ptp; ptp = (gtProvider *)ellNext(&ptp->node)) { + + status = ptp->get.Time(&ts); + if (status == epicsTimeOK) { + /* check time is monotonic */ + if (epicsTimeGreaterThanEqual(&ts, >Pvt.lastProvidedTime)) { + *pDest = ts; + gtPvt.lastProvidedTime = ts; + gtPvt.lastTimeProvider = ptp; + } else { + int key; + + *pDest = gtPvt.lastProvidedTime; + key = epicsInterruptLock(); + gtPvt.ErrorCounts++; + epicsInterruptUnlock(key); + + IFDEBUG(10) { + char last[40], buff[40]; + + epicsTimeToStrftime(last, sizeof(last), tsfmt, + >Pvt.lastProvidedTime); + epicsTimeToStrftime(buff, sizeof(buff), tsfmt, &ts); + printf("eTGC provider '%s' returned older time\n" + " %s, using %s instead\n", ptp->name, buff, last); + } + } + break; + } + } + if (status) + gtPvt.lastTimeProvider = NULL; + epicsMutexUnlock(gtPvt.timeListLock); + + IFDEBUG(20) { + if (ptp && status == epicsTimeOK) { + char buff[40]; + + epicsTimeToStrftime(buff, sizeof(buff), tsfmt, &ts); + printf("eTGC returning %s from provider '%s'\n", + buff, ptp->name); + } + else + printf("eTGC returning error\n"); + } + + return status; } int epicsTimeGetCurrentInt(epicsTimeStamp *pDest) @@ -135,8 +209,11 @@ int epicsTimeGetCurrentInt(epicsTimeStamp *pDest) gtProvider *ptp = gtPvt.lastTimeProvider; if (ptp == NULL || - ptp->getInt.Time == NULL) - return S_time_noProvider; + ptp->getInt.Time == NULL) { + IFDEBUG(20) + epicsInterruptContextMessage("eTGCInt: No support\n"); + return S_time_noProvider; + } return ptp->getInt.Time(pDest); } @@ -147,9 +224,13 @@ static int generalTimeGetEventPriority(epicsTimeStamp *pDest, int eventNumber, { gtProvider *ptp; int status = S_time_noProvider; + epicsTimeStamp ts; generalTime_Init(); + IFDEBUG(2) + printf("generalTimeGetEventPriority(eventNum=%d)\n", eventNumber); + if ((eventNumber < 0 || eventNumber >= NUM_TIME_EVENTS) && (eventNumber != epicsTimeEventBestTime)) return S_time_badEvent; @@ -158,16 +239,17 @@ static int generalTimeGetEventPriority(epicsTimeStamp *pDest, int eventNumber, for (ptp = (gtProvider *)ellFirst(>Pvt.eventProviders); ptp; ptp = (gtProvider *)ellNext(&ptp->node)) { - status = ptp->get.Event(pDest, eventNumber); + status = ptp->get.Event(&ts, eventNumber); if (status == epicsTimeOK) { gtPvt.lastEventProvider = ptp; if (pPrio) *pPrio = ptp->priority; if (eventNumber == epicsTimeEventBestTime) { - if (epicsTimeGreaterThanEqual(pDest, + if (epicsTimeGreaterThanEqual(&ts, >Pvt.lastProvidedBestTime)) { - gtPvt.lastProvidedBestTime = *pDest; + *pDest = ts; + gtPvt.lastProvidedBestTime = ts; } else { int key; @@ -175,11 +257,23 @@ static int generalTimeGetEventPriority(epicsTimeStamp *pDest, int eventNumber, key = epicsInterruptLock(); gtPvt.ErrorCounts++; epicsInterruptUnlock(key); + + IFDEBUG(10) { + char last[40], buff[40]; + + epicsTimeToStrftime(last, sizeof(last), tsfmt, + >Pvt.lastProvidedBestTime); + epicsTimeToStrftime(buff, sizeof(buff), tsfmt, &ts); + printf("gTGEvP provider '%s' returned older time\n" + " %s, using %s instead\n", + ptp->name, buff, last); + } } } else { if (epicsTimeGreaterThanEqual(pDest, >Pvt.eventTime[eventNumber])) { - gtPvt.eventTime[eventNumber] = *pDest; + *pDest = ts; + gtPvt.eventTime[eventNumber] = ts; } else { int key; @@ -188,14 +282,39 @@ static int generalTimeGetEventPriority(epicsTimeStamp *pDest, int eventNumber, gtPvt.ErrorCounts++; epicsInterruptUnlock(key); } + + IFDEBUG(10) { + char last[40], buff[40]; + + epicsTimeToStrftime(last, sizeof(last), tsfmt, + >Pvt.lastProvidedBestTime); + epicsTimeToStrftime(buff, sizeof(buff), tsfmt, &ts); + printf("gTGEvP provider '%s' returned older time\n" + " %s, using %s instead\n", + ptp->name, buff, last); + } } break; } + else IFDEBUG(2) + printf("gTGEvP provider '%s' returned error\n", ptp->name); } if (status) gtPvt.lastEventProvider = NULL; epicsMutexUnlock(gtPvt.eventListLock); + IFDEBUG(10) { + if (ptp && status == epicsTimeOK) { + char buff[40]; + + epicsTimeToStrftime(buff, sizeof(buff), tsfmt, &ts); + printf("gTGEvP returning %s from provider '%s'\n", + buff, ptp->name); + } + else + printf("gTGEvP returning error\n"); + } + return status; } @@ -216,8 +335,11 @@ int epicsTimeGetEventInt(epicsTimeStamp *pDest, int eventNumber) gtProvider *ptp = gtPvt.lastEventProvider; if (ptp == NULL || - ptp->getInt.Event == NULL) - return S_time_noProvider; + ptp->getInt.Event == NULL) { + IFDEBUG(20) + epicsInterruptContextMessage("eTGEvInt: No support\n"); + return S_time_noProvider; + } return ptp->getInt.Event(pDest, eventNumber); } @@ -258,7 +380,7 @@ static gtProvider * findProvider(ELLLIST *plist, epicsMutexId lock, for (ptp = (gtProvider *)ellFirst(plist); ptp; ptp = (gtProvider *)ellNext(&ptp->node)) { - if (ptp->priority == ptp->priority && + if (ptp->priority == priority && !strcmp(ptp->name, name)) break; } @@ -288,6 +410,9 @@ int generalTimeRegisterEventProvider(const char *name, int priority, insertProvider(ptp, >Pvt.eventProviders, gtPvt.eventListLock); + IFDEBUG(1) + printf("Registered event provider '%s' at %d\n", name, priority); + return epicsTimeOK; } @@ -301,6 +426,9 @@ int generalTimeAddIntEventProvider(const char *name, int priority, ptp->getInt.Event = getEvent; + IFDEBUG(1) + printf("Event provider '%s' is interrupt-callable\n", name); + return epicsTimeOK; } @@ -325,6 +453,9 @@ int generalTimeRegisterCurrentProvider(const char *name, int priority, insertProvider(ptp, >Pvt.timeProviders, gtPvt.timeListLock); + IFDEBUG(1) + printf("Registered time provider '%s' at %d\n", name, priority); + return epicsTimeOK; } @@ -338,6 +469,9 @@ int generalTimeAddIntCurrentProvider(const char *name, int priority, ptp->getInt.Time = getTime; + IFDEBUG(1) + printf("Time provider '%s' is interrupt-callable\n", name); + return epicsTimeOK; } diff --git a/src/libCom/osi/epicsMessageQueue.cpp b/src/libCom/osi/epicsMessageQueue.cpp index 1561fbf7d..1527b3d3a 100644 --- a/src/libCom/osi/epicsMessageQueue.cpp +++ b/src/libCom/osi/epicsMessageQueue.cpp @@ -8,8 +8,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ /* - * $Revision-Id$ - * * Author W. Eric Norum * norume@aps.anl.gov * 630 252 4793 diff --git a/src/libCom/osi/epicsMessageQueue.h b/src/libCom/osi/epicsMessageQueue.h index 0c18dd545..c6a98fd47 100644 --- a/src/libCom/osi/epicsMessageQueue.h +++ b/src/libCom/osi/epicsMessageQueue.h @@ -8,8 +8,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ /* - * $Revision-Id$ - * * Author W. Eric Norum * norume@aps.anl.gov * 630 252 4793 @@ -28,8 +26,6 @@ typedef struct epicsMessageQueueOSD *epicsMessageQueueId; #ifdef __cplusplus -#include "locationException.h" - class epicsShareClass epicsMessageQueue { public: epicsMessageQueue ( unsigned int capacity, diff --git a/src/libCom/osi/epicsMutex.cpp b/src/libCom/osi/epicsMutex.cpp index 8580af204..7c8d05056 100644 --- a/src/libCom/osi/epicsMutex.cpp +++ b/src/libCom/osi/epicsMutex.cpp @@ -7,7 +7,7 @@ * and higher are distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. \*************************************************************************/ -/* epicsMutex.c */ +/* epicsMutex.cpp */ /* Author: Marty Kraimer and Jeff Hill Date: 03APR01 */ /* diff --git a/src/libCom/osi/epicsMutex.h b/src/libCom/osi/epicsMutex.h index b24e5ecb8..6d74f9599 100644 --- a/src/libCom/osi/epicsMutex.h +++ b/src/libCom/osi/epicsMutex.h @@ -22,11 +22,14 @@ typedef enum { #ifdef __cplusplus #include "compilerDependencies.h" +#include "epicsGuard.h" #define newEpicsMutex new epicsMutex(__FILE__,__LINE__) class epicsShareClass epicsMutex { public: + typedef epicsGuard guard_t; + typedef epicsGuard release_t; class mutexCreateFailed; /* exception payload */ class invalidMutex; /* exception payload */ epicsMutex (); @@ -44,6 +47,8 @@ private: class epicsShareClass epicsDeadlockDetectMutex { public: + typedef epicsGuard guard_t; + typedef epicsGuard release_t; typedef unsigned hierarchyLevel_t; epicsDeadlockDetectMutex ( unsigned hierarchyLevel_t ); ~epicsDeadlockDetectMutex (); diff --git a/src/libCom/osi/epicsReadline.c b/src/libCom/osi/epicsReadline.c index d410ac91e..936cbce99 100644 --- a/src/libCom/osi/epicsReadline.c +++ b/src/libCom/osi/epicsReadline.c @@ -5,7 +5,6 @@ * EPICS BASE is distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. \*************************************************************************/ -/* $Revision-Id$ */ /* Author: Eric Norum Date: 12DEC2001 */ #include diff --git a/src/libCom/osi/epicsThread.cpp b/src/libCom/osi/epicsThread.cpp index f59c0bd1a..892d73de0 100644 --- a/src/libCom/osi/epicsThread.cpp +++ b/src/libCom/osi/epicsThread.cpp @@ -7,8 +7,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ // -// $Revision-Id$ -// // Author: Jeff Hill // diff --git a/src/libCom/osi/epicsTime.cpp b/src/libCom/osi/epicsTime.cpp index 59514c2f7..6dd1d3f97 100644 --- a/src/libCom/osi/epicsTime.cpp +++ b/src/libCom/osi/epicsTime.cpp @@ -6,15 +6,15 @@ * Copyright (c) 2007 UChicago Argonne LLC, as Operator of Argonne * National Laboratory. * EPICS BASE is distributed subject to a Software License Agreement found -* in file LICENSE that is included with this distribution. +* in file LICENSE that is included with this distribution. \*************************************************************************/ /* epicsTime.cpp */ /* Author Jeffrey O. Hill */ // Notes: -// 1) The epicsTime::nSec field is not public and so it could be -// changed to work more like the fractional seconds field in the NTP time -// stamp. That would significantly improve the precision of epicsTime on +// 1) The epicsTime::nSec field is not public and so it could be +// changed to work more like the fractional seconds field in the NTP time +// stamp. That would significantly improve the precision of epicsTime on // 64 bit architectures. // @@ -26,7 +26,7 @@ #include #include #include -#include // vxWorks 6.0 requires this include +#include // vxWorks 6.0 requires this include #define epicsExportSharedSymbols #include "locationException.h" @@ -37,7 +37,7 @@ #include "osiSock.h" /* pull in struct timeval */ #include "epicsStdio.h" -static const char pEpicsTimeVersion[] = +static const char pEpicsTimeVersion[] = "@(#) " EPICS_VERSION_STRING ", Common Utilities Library " __DATE__; // @@ -60,11 +60,13 @@ static const unsigned long NTP_TIME_AT_EPICS_EPOCH = // // epicsTime (const unsigned long secIn, const unsigned long nSecIn) // -inline epicsTime::epicsTime (const unsigned long secIn, - const unsigned long nSecIn) : - secPastEpoch ( nSecIn / nSecPerSec + secIn ), - nSec ( nSecIn % nSecPerSec ) +inline epicsTime::epicsTime (const unsigned long secIn, const unsigned long nSecIn) : + secPastEpoch ( secIn ), nSec ( nSecIn ) { + if (nSecIn >= nSecPerSec) { + this->secPastEpoch += nSecIn / nSecPerSec; + this->nSec = nSecIn % nSecPerSec; + } } // @@ -93,7 +95,7 @@ epicsTimeLoadTimeInit::epicsTimeLoadTimeInit () * the ANSI epoch (1/1/1970 00:00:00UTC) * Convert this offset into time_t units, however this must not be * calculated using local time (i.e. using mktime() or similar), since - * in the UK the ANSI Epoch had daylight saving time in effect, and + * in the UK the ANSI Epoch had daylight saving time in effect, and * the value calculated would be 3600 seconds wrong.*/ this->epicsEpochOffset = (double) POSIX_TIME_AT_EPICS_EPOCH / this->time_tSecPerTick; @@ -103,7 +105,7 @@ epicsTimeLoadTimeInit::epicsTimeLoadTimeInit () this->epicsEpochOffset >= 0) { // We can use simpler code on Posix-compliant systems this->useDiffTimeOptimization = true; - this->epicsEpochOffsetAsAnUnsignedLong = + this->epicsEpochOffsetAsAnUnsignedLong = static_cast (this->epicsEpochOffset); } else { // Forced to use the slower but correct code @@ -113,47 +115,26 @@ epicsTimeLoadTimeInit::epicsTimeLoadTimeInit () } // -// epicsTime::addNanoSec () +// private epicsTime::addNanoSec () // -// The nano-second field of several of the the UNIX time stamp formats -// field is stored in the C type "long". +// Most formats keep the nSec value as an unsigned long, so are +ve. +// struct timeval's tv_usec may be -1, but I think that means error, +// so this private method never needs to handle -ve offsets. // void epicsTime :: addNanoSec ( long nSecAdj ) { - // - // After optimizing this function we now have a larger code which - // uses only unsigned integer, and not floating point, arithmetic. - // This change benefits embedded CPU's lacking a floating point - // co-processor at the expense of some additional code to maintain. - // - // We hope that all CPU's we run on provide at least an integer - // divide instruction which should enable this implementation - // to be more efficient than implementations based on branching; - // this is presuming that we will run on pipelined architectures. - // - // Overflow and underflow is expected; in the future we might - // operate close to, the modulo of, the EPICS epic. - // - // We are depending on the normalize operation in the private - // constructor used below. - // - // joh 11-04-2012 - // - if ( nSecAdj >= 0 ) { - const unsigned long nSecPlus = - static_cast ( nSecAdj ); - const unsigned long nSecPlusAdj = nSecPlus % nSecPerSec; - const unsigned long secPlusAdj = nSecPlus / nSecPerSec; - *this = epicsTime ( this->secPastEpoch+secPlusAdj, - this->nSec+nSecPlusAdj ); + if (nSecAdj <= 0) + return; + + if (static_cast (nSecAdj) >= nSecPerSec) { + this->secPastEpoch += nSecAdj / nSecPerSec; + nSecAdj %= nSecPerSec; } - else { - const unsigned long nSecMinus = - static_cast ( -nSecAdj ); - const unsigned long nSecMinusAdj = nSecMinus % nSecPerSec; - const unsigned long secMinusAdj = nSecMinus / nSecPerSec; - *this = epicsTime ( this->secPastEpoch - secMinusAdj - 1u, - this->nSec + nSecPerSec - nSecMinusAdj ); + + this->nSec += nSecAdj; // Can't overflow + if (this->nSec >= nSecPerSec) { + this->secPastEpoch++; + this->nSec -= nSecPerSec; } } @@ -166,11 +147,11 @@ epicsTime::epicsTime ( const time_t_wrapper & ansiTimeTicks ) static epicsTimeLoadTimeInit & lti = * new epicsTimeLoadTimeInit (); // - // try to directly map time_t into an unsigned long integer because this is + // try to directly map time_t into an unsigned long integer because this is // faster on systems w/o hardware floating point and a simple integer type time_t. // if ( lti.useDiffTimeOptimization ) { - // LONG_MAX is used here and not ULONG_MAX because some systems (linux) + // LONG_MAX is used here and not ULONG_MAX because some systems (linux) // still store time_t as a long. if ( ansiTimeTicks.ts > 0 && ansiTimeTicks.ts <= LONG_MAX ) { unsigned long ticks = static_cast < unsigned long > ( ansiTimeTicks.ts ); @@ -186,8 +167,8 @@ epicsTime::epicsTime ( const time_t_wrapper & ansiTimeTicks ) } // - // otherwise map time_t, which ANSI C and POSIX define as any arithmetic type, - // into type double + // otherwise map time_t, which ANSI C and POSIX define as any arithmetic type, + // into type double // double sec = ansiTimeTicks.ts * lti.time_tSecPerTick - lti.epicsEpochOffset; @@ -209,14 +190,14 @@ epicsTime::epicsTime ( const time_t_wrapper & ansiTimeTicks ) this->nSec = static_cast ( ( sec-this->secPastEpoch ) * nSecPerSec ); } -epicsTime::epicsTime (const epicsTimeStamp &ts) +epicsTime::epicsTime (const epicsTimeStamp &ts) { if ( ts.nsec < nSecPerSec ) { this->secPastEpoch = ts.secPastEpoch; this->nSec = ts.nsec; } else { - throw std::logic_error ( + throw std::logic_error ( "epicsTimeStamp has overflow in nano-seconds field" ); } } @@ -262,7 +243,7 @@ epicsTime::operator time_t_wrapper () const return wrap; } } - + // // map type double into time_t which ansi C defines as some arithmetic type // @@ -317,20 +298,82 @@ epicsTime::operator gm_tm_nano_sec () const // epicsTime::epicsTime (const local_tm_nano_sec &tm) { - static const time_t mktimeFailure = static_cast (-1); - time_t_wrapper ansiTimeTicks; struct tm tmp = tm.ansi_tm; + time_t_wrapper ansiTimeTicks = { mktime (&tmp) }; - ansiTimeTicks.ts = mktime (&tmp); - if (ansiTimeTicks.ts == mktimeFailure) { + static const time_t mktimeError = static_cast (-1); + if (ansiTimeTicks.ts == mktimeError) { throwWithLocation ( formatProblemWithStructTM () ); } - *this = epicsTime (ansiTimeTicks); + *this = epicsTime(ansiTimeTicks); + this->addNanoSec(tm.nSec); +} - unsigned long nSecAdj = tm.nSec % nSecPerSec; - unsigned long secAdj = tm.nSec / nSecPerSec; - *this = epicsTime ( this->secPastEpoch+secAdj, this->nSec+nSecAdj ); +// +// epicsTime (const gm_tm_nano_sec &tm) +// + +// do conversion avoiding the timezone mechanism +static inline int is_leap(int year) +{ + if (year % 400 == 0) + return 1; + if (year % 100 == 0) + return 0; + if (year % 4 == 0) + return 1; + return 0; +} + +static inline int days_from_0(int year) +{ + year--; + return 365 * year + (year / 400) - (year / 100) + (year / 4); +} + +static inline int days_from_1970(int year) +{ + static const int days_from_0_to_1970 = days_from_0(1970); + return days_from_0(year) - days_from_0_to_1970; +} + +static inline int days_from_1jan(int year, int month, int day) +{ + static const int days[2][12] = + { + { 0,31,59,90,120,151,181,212,243,273,304,334}, + { 0,31,60,91,121,152,182,213,244,274,305,335} + }; + return days[is_leap(year)][month-1] + day - 1; +} + +epicsTime::epicsTime (const gm_tm_nano_sec &tm) +{ + int year = tm.ansi_tm.tm_year + 1900; + int month = tm.ansi_tm.tm_mon; + if (month > 11) { + year += month / 12; + month %= 12; + } else if (month < 0) { + int years_diff = (-month + 11) / 12; + year -= years_diff; + month += 12 * years_diff; + } + month++; + + int day = tm.ansi_tm.tm_mday; + int day_of_year = days_from_1jan(year, month, day); + int days_since_epoch = days_from_1970(year) + day_of_year; + + time_t_wrapper ansiTimeTicks; + ansiTimeTicks.ts = ((days_since_epoch + * 24 + tm.ansi_tm.tm_hour) + * 60 + tm.ansi_tm.tm_min) + * 60 + tm.ansi_tm.tm_sec; + + *this = epicsTime(ansiTimeTicks); + this->addNanoSec(tm.nSec); } // @@ -372,9 +415,9 @@ epicsTime::operator struct timeval () const // a direct assignment. On other systems I dont know that we can // guarantee that time_t and timeval :: tv_sec will have the // same epoch or have the same scaling factor to discrete seconds. - // For example, on windows time_t changed recently to a 64 bit + // For example, on windows time_t changed recently to a 64 bit // quantity but timeval is still a long. That can cause problems - // on 32 bit systems. So technically, we should have an os + // on 32 bit systems. So technically, we should have an os // dependent conversion between time_t and timeval :: tv_sec? ts.tv_sec = ansiTimeTicks.ts; ts.tv_usec = static_cast < long > ( this->nSec / nSecPerUSec ); @@ -391,9 +434,9 @@ epicsTime::epicsTime (const struct timeval &ts) // a direct assignment. On other systems I dont know that we can // guarantee that time_t and timeval :: tv_sec will have the // same epoch or have the same scaling factor to discrete seconds. - // For example, on windows time_t changed recently to a 64 bit + // For example, on windows time_t changed recently to a 64 bit // quantity but timeval is still a long. That can cause problems - // on 32 bit systems. So technically, we should have an os + // on 32 bit systems. So technically, we should have an os // dependent conversion between time_t and timeval :: tv_sec? ansiTimeTicks.ts = ts.tv_sec; *this = epicsTime (ansiTimeTicks); @@ -415,7 +458,7 @@ epicsTime::operator l_fp () const { l_fp ts; ts.l_ui = this->secPastEpoch + NTP_TIME_AT_EPICS_EPOCH; - ts.l_uf = static_cast < unsigned long > + ts.l_uf = static_cast < unsigned long > ( ( this->nSec * NTP_FRACTION_DENOMINATOR ) / nSecPerSec ); return ts; } @@ -426,14 +469,14 @@ epicsTime::operator l_fp () const epicsTime::epicsTime ( const l_fp & ts ) { this->secPastEpoch = ts.l_ui - NTP_TIME_AT_EPICS_EPOCH; - this->nSec = static_cast < unsigned long > + this->nSec = static_cast < unsigned long > ( ( ts.l_uf / NTP_FRACTION_DENOMINATOR ) * nSecPerSec ); } epicsTime::operator epicsTimeStamp () const { if ( this->nSec >= nSecPerSec ) { - throw std::logic_error ( + throw std::logic_error ( "epicsTimeStamp has overflow in nano-seconds field?" ); } epicsTimeStamp ts; @@ -444,7 +487,7 @@ epicsTime::operator epicsTimeStamp () const // on 64 bit hosts than the original epicsTimeStamp::secPastEpoch. The // epicsTimeStamp::secPastEpoch is based on epicsUInt32 so that it will // match the original network protocol. Of course one can anticipate - // that eventually, a epicsUInt64 based network time stamp will be + // that eventually, a epicsUInt64 based network time stamp will be // introduced when 64 bit architectures are more ubiquitous. // // Truncation usually works fine here because the routines in this code @@ -458,14 +501,14 @@ epicsTime::operator epicsTimeStamp () const return ts; } -// Break up a format string into " %0 f " -// (where in an unsigned integer) +// Break up a format string into " %0 f " +// (where in an unsigned integer) // Result: // A) Copies a prefix which is valid for ANSI strftime into the supplied // buffer setting the buffer to an empty string if no prefix is present. -// B) Indicates whether a valid "%0 f]" is present or not and if so +// B) Indicates whether a valid "%0 f]" is present or not and if so // specifying its nnnn -// C) returning a pointer to the postfix (which might be passed again +// C) returning a pointer to the postfix (which might be passed again // to fracFormatFind. static const char * fracFormatFind ( const char * const pFormat, @@ -529,8 +572,8 @@ static const char * fracFormatFind ( // // size_t epicsTime::strftime () // -size_t epicsTime::strftime ( - char * pBuff, size_t bufLength, const char * pFormat ) const +size_t epicsTime::strftime ( + char * pBuff, size_t bufLength, const char * pFormat ) const { if ( bufLength == 0u ) { return 0u; @@ -547,15 +590,15 @@ size_t epicsTime::strftime ( const char * pFmt = pFormat; size_t bufLenLeft = bufLength; while ( *pFmt != '\0' && bufLenLeft > 1 ) { - // look for "%0 f" at the end (used for fractional second formatting) + // look for "%0 f" at the end (used for fractional second formatting) char strftimePrefixBuf [256]; bool fracFmtFound; unsigned long fracWid = 0; pFmt = fracFormatFind ( - pFmt, + pFmt, strftimePrefixBuf, sizeof ( strftimePrefixBuf ), fracFmtFound, fracWid ); - + // nothing more in the string, then quit if ( ! ( strftimePrefixBuf[0] != '\0' || fracFmtFound ) ) { break; @@ -657,7 +700,7 @@ void epicsTime::show ( unsigned level ) const if ( level > 1 ) { // this also suppresses the "defined, but not used" // warning message - printf ( "epicsTime: revision \"%s\"\n", + printf ( "epicsTime: revision \"%s\"\n", pEpicsTimeVersion ); } @@ -704,10 +747,10 @@ epicsTime epicsTime::operator + (const double &rhs) const } // -// operator - +// operator - // // To make this code robust during timestamp rollover events -// time stamp differences greater than one half full scale are +// time stamp differences greater than one half full scale are // interpreted as rollover situations: // // when RHS is greater than THIS: @@ -729,7 +772,7 @@ double epicsTime::operator - (const epicsTime &rhs) const // so the unsigned to signed conversion is ok // if (this->nSec>=rhs.nSec) { - nSecRes = this->nSec - rhs.nSec; + nSecRes = this->nSec - rhs.nSec; } else { nSecRes = rhs.nSec - this->nSec; @@ -746,7 +789,7 @@ double epicsTime::operator - (const epicsTime &rhs) const if (secRes > ULONG_MAX/2) { // // In this situation where the difference is more than - // 68 years assume that the seconds counter has rolled + // 68 years assume that the seconds counter has rolled // over and compute the "wrap around" difference // secRes = 1 + (ULONG_MAX-secRes); @@ -761,7 +804,7 @@ double epicsTime::operator - (const epicsTime &rhs) const if (secRes > ULONG_MAX/2) { // // In this situation where the difference is more than - // 68 years assume that the seconds counter has rolled + // 68 years assume that the seconds counter has rolled // over and compute the "wrap around" difference // secRes = 1 + (ULONG_MAX-secRes); @@ -770,7 +813,7 @@ double epicsTime::operator - (const epicsTime &rhs) const } } - return secRes + nSecRes/nSecPerSec; + return secRes + nSecRes/nSecPerSec; } // @@ -791,7 +834,7 @@ bool epicsTime::operator <= (const epicsTime &rhs) const else { // // In this situation where the difference is more than - // 69 years assume that the seconds counter has rolled + // 69 years assume that the seconds counter has rolled // over and compute the "wrap around" result // rc = false; @@ -808,7 +851,7 @@ bool epicsTime::operator <= (const epicsTime &rhs) const else { // // In this situation where the difference is more than - // 69 years assume that the seconds counter has rolled + // 69 years assume that the seconds counter has rolled // over and compute the "wrap around" result // rc = true; @@ -843,7 +886,7 @@ bool epicsTime::operator < (const epicsTime &rhs) const else { // // In this situation where the difference is more than - // 69 years assume that the seconds counter has rolled + // 69 years assume that the seconds counter has rolled // over and compute the "wrap around" result // rc = false; @@ -860,7 +903,7 @@ bool epicsTime::operator < (const epicsTime &rhs) const else { // // In this situation where the difference is more than - // 69 years assume that the seconds counter has rolled + // 69 years assume that the seconds counter has rolled // over and compute the "wrap around" result // rc = true; @@ -881,7 +924,7 @@ extern "C" { // // ANSI C interface // - // its too bad that these cant be implemented with inline functions + // its too bad that these cant be implemented with inline functions // at least when running the GNU compiler // epicsShareFunc int epicsShareAPI epicsTimeToTime_t (time_t *pDest, const epicsTimeStamp *pSrc) @@ -944,6 +987,19 @@ extern "C" { } return epicsTimeOK; } + epicsShareFunc int epicsShareAPI epicsTimeFromGMTM (epicsTimeStamp *pDest, const struct tm *pSrc, unsigned long nSecSrc) + { + try { + gm_tm_nano_sec tmns; + tmns.ansi_tm = *pSrc; + tmns.nSec = nSecSrc; + *pDest = epicsTime (tmns); + } + catch (...) { + return S_time_conversion; + } + return epicsTimeOK; + } epicsShareFunc int epicsShareAPI epicsTimeToTimespec (struct timespec *pDest, const epicsTimeStamp *pSrc) { try { @@ -1075,4 +1131,3 @@ extern "C" { } } } - diff --git a/src/libCom/osi/epicsTime.h b/src/libCom/osi/epicsTime.h index bf8f77c87..149f6f2d3 100644 --- a/src/libCom/osi/epicsTime.h +++ b/src/libCom/osi/epicsTime.h @@ -106,10 +106,12 @@ public: epicsTime & operator = ( const local_tm_nano_sec & ); /* - * convert to ANSI Cs "struct tm" (with nano seconds) + * convert to and from ANSI Cs "struct tm" (with nano seconds) * adjusted for GM time (UTC) */ operator gm_tm_nano_sec () const; + epicsTime ( const gm_tm_nano_sec & ); + epicsTime & operator = ( const gm_tm_nano_sec & ); /* convert to and from POSIX RTs "struct timespec" */ operator struct timespec () const; @@ -201,13 +203,15 @@ epicsShareFunc int epicsShareAPI epicsTimeToTime_t ( epicsShareFunc int epicsShareAPI epicsTimeFromTime_t ( epicsTimeStamp * pDest, time_t src ); -/*convert to and from ANSI C's "struct tm" with nano seconds */ +/* convert to and from ANSI C's "struct tm" with nano seconds */ epicsShareFunc int epicsShareAPI epicsTimeToTM ( struct tm * pDest, unsigned long * pNSecDest, const epicsTimeStamp * pSrc ); epicsShareFunc int epicsShareAPI epicsTimeToGMTM ( struct tm * pDest, unsigned long * pNSecDest, const epicsTimeStamp * pSrc ); epicsShareFunc int epicsShareAPI epicsTimeFromTM ( epicsTimeStamp * pDest, const struct tm * pSrc, unsigned long nSecSrc ); +epicsShareFunc int epicsShareAPI epicsTimeFromGMTM ( + epicsTimeStamp * pDest, const struct tm * pSrc, unsigned long nSecSrc ); /* convert to and from POSIX RT's "struct timespec" */ epicsShareFunc int epicsShareAPI epicsTimeToTimespec ( @@ -319,6 +323,11 @@ inline epicsTime & epicsTime::operator = ( const local_tm_nano_sec & rhs ) return *this = epicsTime ( rhs ); } +inline epicsTime & epicsTime::operator = ( const gm_tm_nano_sec & rhs ) +{ + return *this = epicsTime ( rhs ); +} + inline epicsTime & epicsTime::operator = ( const struct timespec & rhs ) { *this = epicsTime ( rhs ); diff --git a/src/libCom/osi/os/Darwin/osdEnv.c b/src/libCom/osi/os/Darwin/osdEnv.c index 35517c1e9..ab3f93644 100644 --- a/src/libCom/osi/os/Darwin/osdEnv.c +++ b/src/libCom/osi/os/Darwin/osdEnv.c @@ -5,8 +5,6 @@ \*************************************************************************/ /* osdEnv.c */ /* - * $Revision-Id$ - * * Author: Eric Norum * Date: May 7, 2001 * diff --git a/src/libCom/osi/os/Darwin/osdSock.h b/src/libCom/osi/os/Darwin/osdSock.h index dc0dcee91..1d4556eee 100644 --- a/src/libCom/osi/os/Darwin/osdSock.h +++ b/src/libCom/osi/os/Darwin/osdSock.h @@ -1,11 +1,9 @@ /*************************************************************************\ * Copyright (c) 2002 The University of Saskatchewan * EPICS BASE is distributed subject to a Software License Agreement found -* in file LICENSE that is included with this distribution. +* in file LICENSE that is included with this distribution. \*************************************************************************/ /* - * $Revision-Id$ - * * Author: Eric Norum */ @@ -40,6 +38,7 @@ typedef socklen_t osiSocklen_t; #define SOCK_ENOBUFS ENOBUFS #define SOCK_ECONNRESET ECONNRESET #define SOCK_ETIMEDOUT ETIMEDOUT +#define SOCK_EACCES EACCES #define SOCK_EADDRINUSE EADDRINUSE #define SOCK_EADDRNOTAVAIL EADDRNOTAVAIL #define SOCK_ECONNREFUSED ECONNREFUSED diff --git a/src/libCom/osi/os/Darwin/osdSockAddrReuse.cpp b/src/libCom/osi/os/Darwin/osdSockAddrReuse.cpp index a7bb3615c..869514160 100644 --- a/src/libCom/osi/os/Darwin/osdSockAddrReuse.cpp +++ b/src/libCom/osi/os/Darwin/osdSockAddrReuse.cpp @@ -1,4 +1,3 @@ - /*************************************************************************\ * Copyright (c) 2002 The University of Chicago, as Operator of Argonne * National Laboratory. @@ -10,7 +9,6 @@ \*************************************************************************/ /* - * $Revision-Id$ * Author: Jeff Hill */ diff --git a/src/libCom/osi/os/Darwin/osdTime.h b/src/libCom/osi/os/Darwin/osdTime.h index 3abea1f14..d0c361404 100644 --- a/src/libCom/osi/os/Darwin/osdTime.h +++ b/src/libCom/osi/os/Darwin/osdTime.h @@ -4,8 +4,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ /* - * $Revision-Id$ - * * Author: Eric Norum */ diff --git a/src/libCom/osi/os/Darwin/osiFileName.h b/src/libCom/osi/os/Darwin/osiFileName.h index 4004e82a4..a78118679 100644 --- a/src/libCom/osi/os/Darwin/osiFileName.h +++ b/src/libCom/osi/os/Darwin/osiFileName.h @@ -5,8 +5,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ /* - * $Revision-Id$ - * * Author: Eric Norum */ diff --git a/src/libCom/osi/os/Linux/osdSock.h b/src/libCom/osi/os/Linux/osdSock.h index b32a16044..614f3f98d 100644 --- a/src/libCom/osi/os/Linux/osdSock.h +++ b/src/libCom/osi/os/Linux/osdSock.h @@ -4,7 +4,7 @@ * Copyright (c) 2002 The Regents of the University of California, as * Operator of Los Alamos National Laboratory. * EPICS BASE is distributed subject to a Software License Agreement found -* in file LICENSE that is included with this distribution. +* in file LICENSE that is included with this distribution. \*************************************************************************/ /* @@ -42,6 +42,7 @@ typedef socklen_t osiSocklen_t; #define SOCK_ENOBUFS ENOBUFS #define SOCK_ECONNRESET ECONNRESET #define SOCK_ETIMEDOUT ETIMEDOUT +#define SOCK_EACCES EACCES #define SOCK_EADDRINUSE EADDRINUSE #define SOCK_EADDRNOTAVAIL EADDRNOTAVAIL #define SOCK_ECONNREFUSED ECONNREFUSED @@ -72,4 +73,3 @@ typedef socklen_t osiSocklen_t; #define ifreq_size(pifreq) (sizeof(pifreq->ifr_name)) #endif /*osdSockH*/ - diff --git a/src/libCom/osi/os/Linux/osdTime.h b/src/libCom/osi/os/Linux/osdTime.h index 50788a025..988f8747f 100644 --- a/src/libCom/osi/os/Linux/osdTime.h +++ b/src/libCom/osi/os/Linux/osdTime.h @@ -6,8 +6,6 @@ \*************************************************************************/ /* - * $Revision-Id$ - * * Author: Eric Norum */ diff --git a/src/libCom/osi/os/Linux/osiFileName.h b/src/libCom/osi/os/Linux/osiFileName.h index b79203992..3a6448d54 100644 --- a/src/libCom/osi/os/Linux/osiFileName.h +++ b/src/libCom/osi/os/Linux/osiFileName.h @@ -10,8 +10,6 @@ /* * osiFileName.h * Author: Jeff Hill - * - * */ #ifndef osiFileNameH #define osiFileNameH diff --git a/src/libCom/osi/os/Linux/osiUnistd.h b/src/libCom/osi/os/Linux/osiUnistd.h index fc58f0b59..336a9a802 100644 --- a/src/libCom/osi/os/Linux/osiUnistd.h +++ b/src/libCom/osi/os/Linux/osiUnistd.h @@ -8,16 +8,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ /* - * $Revision-Id$ - * - * - * L O S A L A M O S - * Los Alamos National Laboratory - * Los Alamos, New Mexico 87545 - * - * Copyright, 1986, The Regents of the University of California. - * - * * Author Jeffrey O. Hill * johill@lanl.gov * 505 665 1831 diff --git a/src/libCom/osi/os/RTEMS/devLibVMEOSD.c b/src/libCom/osi/os/RTEMS/devLibVMEOSD.c index dfc5fcaf1..0a96bad1a 100644 --- a/src/libCom/osi/os/RTEMS/devLibVMEOSD.c +++ b/src/libCom/osi/os/RTEMS/devLibVMEOSD.c @@ -6,7 +6,6 @@ * EPICS BASE is distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. \*************************************************************************/ -/* $Revision-Id$ */ /* RTEMS port by Till Straumann, * 3/2002 diff --git a/src/libCom/osi/os/RTEMS/epicsMMIO.h b/src/libCom/osi/os/RTEMS/epicsMMIO.h index 7db66704f..293886b78 100644 --- a/src/libCom/osi/os/RTEMS/epicsMMIO.h +++ b/src/libCom/osi/os/RTEMS/epicsMMIO.h @@ -12,6 +12,8 @@ #define EPICSMMIO_H #include +#include +#include #if defined(_ARCH_PPC) || defined(__PPC__) || defined(__PPC) # include @@ -39,6 +41,24 @@ # define nat_iowrite16 be_iowrite16 # define nat_iowrite32 be_iowrite32 +static EPICS_ALWAYS_INLINE +epicsUInt16 +bswap16(epicsUInt16 value) +{ + return (((epicsUInt16)(value) & 0x00ff) << 8) | + (((epicsUInt16)(value) & 0xff00) >> 8); +} + +static EPICS_ALWAYS_INLINE +epicsUInt32 +bswap32(epicsUInt32 value) +{ + return (((epicsUInt32)(value) & 0x000000ff) << 24) | + (((epicsUInt32)(value) & 0x0000ff00) << 8) | + (((epicsUInt32)(value) & 0x00ff0000) >> 8) | + (((epicsUInt32)(value) & 0xff000000) >> 24); +} + #elif defined(i386) || defined(__i386__) || defined(__i386) || defined(__m68k__) /* X86 does not need special handling for read/write width. diff --git a/src/libCom/osi/os/RTEMS/osdEvent.c b/src/libCom/osi/os/RTEMS/osdEvent.c index ce21506c7..455413870 100644 --- a/src/libCom/osi/os/RTEMS/osdEvent.c +++ b/src/libCom/osi/os/RTEMS/osdEvent.c @@ -7,7 +7,6 @@ \*************************************************************************/ /* * RTEMS osdEvent.c - * $Revision-Id$ * Author: W. Eric Norum * eric@cls.usask.ca * (306) 966-6055 diff --git a/src/libCom/osi/os/RTEMS/osdEvent.h b/src/libCom/osi/os/RTEMS/osdEvent.h index 506f3d65d..6c53aada7 100644 --- a/src/libCom/osi/os/RTEMS/osdEvent.h +++ b/src/libCom/osi/os/RTEMS/osdEvent.h @@ -6,7 +6,6 @@ \*************************************************************************/ /* * RTEMS osdEvent.h - * $Revision-Id$ * Author: W. Eric Norum * eric@cls.usask.ca * (306) 966-6055 diff --git a/src/libCom/osi/os/RTEMS/osdInterrupt.c b/src/libCom/osi/os/RTEMS/osdInterrupt.c index 8f029112e..88ce664e5 100644 --- a/src/libCom/osi/os/RTEMS/osdInterrupt.c +++ b/src/libCom/osi/os/RTEMS/osdInterrupt.c @@ -6,7 +6,6 @@ \*************************************************************************/ /* * RTEMS osdInterrupt.c - * $Revision-Id$ * Author: W. Eric Norum * eric@cls.usask.ca * (306) 966-6055 diff --git a/src/libCom/osi/os/RTEMS/osdMessageQueue.c b/src/libCom/osi/os/RTEMS/osdMessageQueue.c index 1ac2cb221..a566de6f6 100644 --- a/src/libCom/osi/os/RTEMS/osdMessageQueue.c +++ b/src/libCom/osi/os/RTEMS/osdMessageQueue.c @@ -8,8 +8,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ /* - * $Revision-Id$ - * * Author W. Eric Norum * norume@aps.anl.gov * 630 252 4793 @@ -173,7 +171,7 @@ static int receiveMessage( return -1; } rsize = receiveMessage(id, id->localBuf, id->maxSize, wait, delay); - if ((rsize < 0) || (rsize > size)) + if (rsize > size) return -1; memcpy(buffer, id->localBuf, rsize); } diff --git a/src/libCom/osi/os/RTEMS/osdMessageQueue.h b/src/libCom/osi/os/RTEMS/osdMessageQueue.h index c0631b72a..0244a1f0b 100644 --- a/src/libCom/osi/os/RTEMS/osdMessageQueue.h +++ b/src/libCom/osi/os/RTEMS/osdMessageQueue.h @@ -8,8 +8,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ /* - * $Revision-Id$ - * * Author W. Eric Norum * norume@aps.anl.gov * 630 252 4793 diff --git a/src/libCom/osi/os/RTEMS/osdMutex.c b/src/libCom/osi/os/RTEMS/osdMutex.c index eb02b86ff..96fde6ea0 100644 --- a/src/libCom/osi/os/RTEMS/osdMutex.c +++ b/src/libCom/osi/os/RTEMS/osdMutex.c @@ -6,7 +6,6 @@ \*************************************************************************/ /* * RTEMS osdMutex.c - * $Revision-Id$ * Author: W. Eric Norum * eric@cls.usask.ca * (306) 966-6055 diff --git a/src/libCom/osi/os/RTEMS/osdMutex.h b/src/libCom/osi/os/RTEMS/osdMutex.h index edf630f78..7e2ecc77d 100644 --- a/src/libCom/osi/os/RTEMS/osdMutex.h +++ b/src/libCom/osi/os/RTEMS/osdMutex.h @@ -6,7 +6,6 @@ \*************************************************************************/ /* * RTEMS osdMutex.h - * $Revision-Id$ * Author: W. Eric Norum * eric@cls.usask.ca * (306) 966-6055 diff --git a/src/libCom/osi/os/RTEMS/osdProcess.c b/src/libCom/osi/os/RTEMS/osdProcess.c index ce788bf99..2768dbb0d 100644 --- a/src/libCom/osi/os/RTEMS/osdProcess.c +++ b/src/libCom/osi/os/RTEMS/osdProcess.c @@ -9,8 +9,6 @@ \*************************************************************************/ /* - * $Revision-Id$ - * * Operating System Dependent Implementation of osiProcess.h * * Author: Jeff Hill diff --git a/src/libCom/osi/os/RTEMS/osdReadline.c b/src/libCom/osi/os/RTEMS/osdReadline.c index 03ed7ed90..877db53f6 100644 --- a/src/libCom/osi/os/RTEMS/osdReadline.c +++ b/src/libCom/osi/os/RTEMS/osdReadline.c @@ -5,7 +5,6 @@ * EPICS BASE is distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. \*************************************************************************/ -/* $Revision-Id$ */ /* Author: Eric Norum Date: 12DEC2001 */ /* diff --git a/src/libCom/osi/os/RTEMS/osdSock.h b/src/libCom/osi/os/RTEMS/osdSock.h index a97241126..930ed0e72 100644 --- a/src/libCom/osi/os/RTEMS/osdSock.h +++ b/src/libCom/osi/os/RTEMS/osdSock.h @@ -1,11 +1,10 @@ /*************************************************************************\ * Copyright (c) 2002 The University of Saskatchewan * EPICS BASE is distributed subject to a Software License Agreement found -* in file LICENSE that is included with this distribution. +* in file LICENSE that is included with this distribution. \*************************************************************************/ /* * RTEMS osdSock.h - * $Revision-Id$ * Author: W. Eric Norum * eric@cls.usask.ca * (306) 966-6055 @@ -36,7 +35,7 @@ int select(int n, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, str #ifdef __cplusplus } #endif - + typedef int SOCKET; #define INVALID_SOCKET (-1) #define SOCKERRNO errno @@ -50,6 +49,7 @@ typedef socklen_t osiSocklen_t; #define SOCK_ENOBUFS ENOBUFS #define SOCK_ECONNRESET ECONNRESET #define SOCK_ETIMEDOUT ETIMEDOUT +#define SOCK_EACCES EACCES #define SOCK_EADDRINUSE EADDRINUSE #define SOCK_EADDRNOTAVAIL EADDRNOTAVAIL #define SOCK_ECONNREFUSED ECONNREFUSED @@ -76,7 +76,7 @@ typedef socklen_t osiSocklen_t; #ifndef INADDR_NONE # define INADDR_NONE (0xffffffff) -#endif +#endif /* * For shutdown() diff --git a/src/libCom/osi/os/RTEMS/osdThread.c b/src/libCom/osi/os/RTEMS/osdThread.c index ed6e73368..769e95820 100644 --- a/src/libCom/osi/os/RTEMS/osdThread.c +++ b/src/libCom/osi/os/RTEMS/osdThread.c @@ -5,7 +5,6 @@ \*************************************************************************/ /* * RTEMS osdThread.c - * $Revision-Id$ * Author: W. Eric Norum */ @@ -428,8 +427,6 @@ void epicsThreadGetName (epicsThreadId id, char *name, size_t size) struct taskVar *v; int haveName = 0; - if (size <= 0) - return; taskVarLock (); for (v=taskVarHead ; v != NULL ; v=v->forw) { if (v->id == tid) { @@ -691,6 +688,7 @@ void epicsThreadShow (epicsThreadId id, unsigned int level) for (v = taskVarHead ; v != NULL ; v = v->forw) { if ((rtems_id)id == v->id) { epicsThreadShowInfo (v, level); + taskVarUnlock (); return; } } diff --git a/src/libCom/osi/os/RTEMS/osdTime.cpp b/src/libCom/osi/os/RTEMS/osdTime.cpp index 5e21f3087..4947c568e 100644 --- a/src/libCom/osi/os/RTEMS/osdTime.cpp +++ b/src/libCom/osi/os/RTEMS/osdTime.cpp @@ -6,8 +6,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ /* - * $Revision-Id$ - * * Author: W. Eric Norum */ #define __BSD_VISIBLE 1 diff --git a/src/libCom/osi/os/RTEMS/osdTime.h b/src/libCom/osi/os/RTEMS/osdTime.h index 5790ec3b6..55e3bc2b0 100644 --- a/src/libCom/osi/os/RTEMS/osdTime.h +++ b/src/libCom/osi/os/RTEMS/osdTime.h @@ -7,11 +7,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ -/* - * $Revision-Id$ - * - */ - #ifndef INC_osdTime_H #define INC_osdTime_H diff --git a/src/libCom/osi/os/RTEMS/osdVME.h b/src/libCom/osi/os/RTEMS/osdVME.h index 5e8c5f984..65548abcb 100644 --- a/src/libCom/osi/os/RTEMS/osdVME.h +++ b/src/libCom/osi/os/RTEMS/osdVME.h @@ -7,7 +7,6 @@ * and higher are distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. \*************************************************************************/ -/* $Revision-Id$ */ /* * OS-dependent VME support diff --git a/src/libCom/osi/os/RTEMS/osiFileName.h b/src/libCom/osi/os/RTEMS/osiFileName.h index 5cd57e52c..8c9226898 100644 --- a/src/libCom/osi/os/RTEMS/osiFileName.h +++ b/src/libCom/osi/os/RTEMS/osiFileName.h @@ -6,7 +6,6 @@ \*************************************************************************/ /* * RTEMS osiFileName.h - * $Revision-Id$ * Author: W. Eric Norum * eric@cls.usask.ca * (306) 966-6055 diff --git a/src/libCom/osi/os/RTEMS/osiUnistd.h b/src/libCom/osi/os/RTEMS/osiUnistd.h index e5264267c..c0a6e222d 100644 --- a/src/libCom/osi/os/RTEMS/osiUnistd.h +++ b/src/libCom/osi/os/RTEMS/osiUnistd.h @@ -8,16 +8,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ /* - * $Revision-Id$ - * - * - * L O S A L A M O S - * Los Alamos National Laboratory - * Los Alamos, New Mexico 87545 - * - * Copyright, 1986, The Regents of the University of California. - * - * * Author Jeffrey O. Hill * johill@lanl.gov * 505 665 1831 diff --git a/src/libCom/osi/os/WIN32/epicsSocketConvertErrnoToString.cpp b/src/libCom/osi/os/WIN32/epicsSocketConvertErrnoToString.cpp index 5ab809cde..3db87ac84 100644 --- a/src/libCom/osi/os/WIN32/epicsSocketConvertErrnoToString.cpp +++ b/src/libCom/osi/os/WIN32/epicsSocketConvertErrnoToString.cpp @@ -7,10 +7,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ -/* - * $Revision-Id$ - */ - #include #define epicsExportSharedSymbols diff --git a/src/libCom/osi/os/WIN32/epicsTempFile.cpp b/src/libCom/osi/os/WIN32/epicsTempFile.cpp index dc90ec9b9..11b835134 100644 --- a/src/libCom/osi/os/WIN32/epicsTempFile.cpp +++ b/src/libCom/osi/os/WIN32/epicsTempFile.cpp @@ -9,7 +9,6 @@ \*************************************************************************/ /* - * $Revision-Id$ * Author: Jeff Hill */ diff --git a/src/libCom/osi/os/WIN32/osdEvent.c b/src/libCom/osi/os/WIN32/osdEvent.c index a57d43608..314138b27 100644 --- a/src/libCom/osi/os/WIN32/osdEvent.c +++ b/src/libCom/osi/os/WIN32/osdEvent.c @@ -8,7 +8,6 @@ \*************************************************************************/ /* osdEvent.c */ /* - * $Revision-Id$ * WIN32 version * * Author Jeffrey O. Hill diff --git a/src/libCom/osi/os/WIN32/osdEvent.h b/src/libCom/osi/os/WIN32/osdEvent.h index b5dd115bf..f57f2cc49 100644 --- a/src/libCom/osi/os/WIN32/osdEvent.h +++ b/src/libCom/osi/os/WIN32/osdEvent.h @@ -9,7 +9,6 @@ \*************************************************************************/ /* osdEvent.c */ /* - * $Revision-Id$ * WIN32 version * * Author Jeffrey O. Hill diff --git a/src/libCom/osi/os/WIN32/osdMutex.c b/src/libCom/osi/os/WIN32/osdMutex.c index 0104ac566..63a51efd5 100644 --- a/src/libCom/osi/os/WIN32/osdMutex.c +++ b/src/libCom/osi/os/WIN32/osdMutex.c @@ -9,7 +9,6 @@ \*************************************************************************/ /* osdMutex.c */ /* - * $Revision-Id$ * WIN32 version * * Author Jeffrey O. Hill diff --git a/src/libCom/osi/os/WIN32/osdMutex.h b/src/libCom/osi/os/WIN32/osdMutex.h index e531f792d..d8f3f78bd 100644 --- a/src/libCom/osi/os/WIN32/osdMutex.h +++ b/src/libCom/osi/os/WIN32/osdMutex.h @@ -10,7 +10,6 @@ /* osdMutex.h */ /* - * $Revision-Id$ * WIN32 version * * Author Jeffrey O. Hill diff --git a/src/libCom/osi/os/WIN32/osdNetIntf.c b/src/libCom/osi/os/WIN32/osdNetIntf.c index c508bfdfd..db445d494 100644 --- a/src/libCom/osi/os/WIN32/osdNetIntf.c +++ b/src/libCom/osi/os/WIN32/osdNetIntf.c @@ -3,18 +3,15 @@ * National Laboratory. * Copyright (c) 2002 The Regents of the University of California, as * Operator of Los Alamos National Laboratory. -* EPICS BASE Versions 3.13.7 -* and higher are distributed subject to a Software License Agreement found -* in file LICENSE that is included with this distribution. +* EPICS BASE is distributed subject to a Software License Agreement found +* in file LICENSE that is included with this distribution. \*************************************************************************/ /* - * $Revision-Id$ - * - * WIN32 specific initialisation for bsd sockets, - * based on Chris Timossi's base/src/ca/windows_depend.c, + * WIN32 specific initialisation for bsd sockets, + * based on Chris Timossi's base/src/ca/windows_depend.c, * and also further additions by Kay Kasemir when this was in - * dllmain.cc + * dllmain.cc * * 7-1-97 -joh- * @@ -51,14 +48,14 @@ static epicsThreadOnceId osiLocalAddrId = EPICS_THREAD_ONCE_INIT; */ static void osiLocalAddrOnce ( void *raw ) { - SOCKET *psocket = raw; + SOCKET *psocket = raw; osiSockAddr addr; - int status; - INTERFACE_INFO *pIfinfo; + int status; + INTERFACE_INFO *pIfinfo; INTERFACE_INFO *pIfinfoList = NULL; - unsigned nelem; - DWORD numifs; - DWORD cbBytesReturned; + unsigned nelem; + DWORD numifs; + DWORD cbBytesReturned; memset ( (void *) &addr, '\0', sizeof ( addr ) ); addr.sa.sa_family = AF_UNSPEC; @@ -68,7 +65,7 @@ static void osiLocalAddrOnce ( void *raw ) goto fail; } - nelem = 10; + nelem = 100; pIfinfoList = (INTERFACE_INFO *) calloc ( nelem, sizeof (INTERFACE_INFO) ); if (!pIfinfoList) { errlogPrintf ("calloc failed\n"); @@ -137,12 +134,12 @@ epicsShareFunc osiSockAddr epicsShareAPI osiLocalAddr (SOCKET socket) epicsShareFunc void epicsShareAPI osiSockDiscoverBroadcastAddresses (ELLLIST *pList, SOCKET socket, const osiSockAddr *pMatchAddr) { - int status; + int status; INTERFACE_INFO *pIfinfo; INTERFACE_INFO *pIfinfoList; - unsigned nelem; - int numifs; - DWORD cbBytesReturned; + unsigned nelem; + int numifs; + DWORD cbBytesReturned; osiSockAddrNode *pNewNode; if ( pMatchAddr->sa.sa_family == AF_INET ) { @@ -165,7 +162,7 @@ epicsShareFunc void epicsShareAPI osiSockDiscoverBroadcastAddresses return; } - nelem = 10; + nelem = 100; pIfinfoList = (INTERFACE_INFO *) calloc(nelem, sizeof(INTERFACE_INFO)); if(!pIfinfoList){ return; diff --git a/src/libCom/osi/os/WIN32/osdProcess.c b/src/libCom/osi/os/WIN32/osdProcess.c index fcf1e2feb..6e69c0485 100644 --- a/src/libCom/osi/os/WIN32/osdProcess.c +++ b/src/libCom/osi/os/WIN32/osdProcess.c @@ -8,8 +8,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ /* - * $Revision-Id$ - * * Operating System Dependent Implementation of osiProcess.h * * Author: Jeff Hill diff --git a/src/libCom/osi/os/WIN32/osdSock.c b/src/libCom/osi/os/WIN32/osdSock.c index 564fe431c..b8c8363fb 100644 --- a/src/libCom/osi/os/WIN32/osdSock.c +++ b/src/libCom/osi/os/WIN32/osdSock.c @@ -9,8 +9,6 @@ \*************************************************************************/ /* - * $Revision-Id$ - * * WIN32 specific initialisation for bsd sockets, * based on Chris Timossi's base/src/ca/windows_depend.c, * and also further additions by Kay Kasemir when this was in diff --git a/src/libCom/osi/os/WIN32/osdSock.h b/src/libCom/osi/os/WIN32/osdSock.h index e685f6564..d92e18755 100644 --- a/src/libCom/osi/os/WIN32/osdSock.h +++ b/src/libCom/osi/os/WIN32/osdSock.h @@ -4,7 +4,7 @@ * Copyright (c) 2002 The Regents of the University of California, as * Operator of Los Alamos National Laboratory. * EPICS BASE is distributed subject to a Software License Agreement found -* in file LICENSE that is included with this distribution. +* in file LICENSE that is included with this distribution. \*************************************************************************/ #ifndef osdSockH @@ -14,7 +14,7 @@ #include /* - * winsock2.h changes the structure alignment to 4 if + * winsock2.h changes the structure alignment to 4 if * WIN32 isnt set which can be a source of confusion */ #ifndef WIN32 @@ -48,6 +48,7 @@ typedef int osiSocklen_t; #define SOCK_ENOBUFS WSAENOBUFS #define SOCK_ECONNRESET WSAECONNRESET #define SOCK_ETIMEDOUT WSAETIMEDOUT +#define SOCK_EACCES WSAEACCES #define SOCK_EADDRINUSE WSAEADDRINUSE #define SOCK_EADDRNOTAVAIL WSAEADDRNOTAVAIL #define SOCK_ECONNREFUSED WSAECONNREFUSED diff --git a/src/libCom/osi/os/WIN32/osdSockAddrReuse.cpp b/src/libCom/osi/os/WIN32/osdSockAddrReuse.cpp index e8de4d4b7..d441d7511 100644 --- a/src/libCom/osi/os/WIN32/osdSockAddrReuse.cpp +++ b/src/libCom/osi/os/WIN32/osdSockAddrReuse.cpp @@ -10,7 +10,6 @@ \*************************************************************************/ /* - * $Revision-Id$ * Author: Jeff Hill */ diff --git a/src/libCom/osi/os/WIN32/osdThread.c b/src/libCom/osi/os/WIN32/osdThread.c index 9d45e28e0..8cdb4a3f4 100644 --- a/src/libCom/osi/os/WIN32/osdThread.c +++ b/src/libCom/osi/os/WIN32/osdThread.c @@ -8,11 +8,7 @@ \*************************************************************************/ /* - * $Revision-Id$ - * * Author: Jeff Hill - * - * */ #include @@ -527,13 +523,8 @@ static win32ThreadParam * epicsThreadParmCreate ( const char *pName ) pParmWIN32 = calloc ( 1, sizeof ( *pParmWIN32 ) + strlen ( pName ) + 1 ); if ( pParmWIN32 ) { - if ( pName ) { - pParmWIN32->pName = (char *) ( pParmWIN32 + 1 ); - strcpy ( pParmWIN32->pName, pName ); - } - else { - pParmWIN32->pName = 0; - } + pParmWIN32->pName = (char *) ( pParmWIN32 + 1 ); + strcpy ( pParmWIN32->pName, pName ); pParmWIN32->isSuspended = 0; } return pParmWIN32; diff --git a/src/libCom/osi/os/WIN32/osdTime.cpp b/src/libCom/osi/os/WIN32/osdTime.cpp index 99f75c195..2ee0d3066 100644 --- a/src/libCom/osi/os/WIN32/osdTime.cpp +++ b/src/libCom/osi/os/WIN32/osdTime.cpp @@ -7,12 +7,9 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ -// -// $Revision-Id$ // // Author: Jeff Hill // -// // // ANSI C diff --git a/src/libCom/osi/os/WIN32/osdTime.h b/src/libCom/osi/os/WIN32/osdTime.h index abd150c4b..35848f6dc 100644 --- a/src/libCom/osi/os/WIN32/osdTime.h +++ b/src/libCom/osi/os/WIN32/osdTime.h @@ -8,8 +8,6 @@ \*************************************************************************/ /* - * $Revision-Id$ - * * Author: Jeff Hill */ diff --git a/src/libCom/osi/os/WIN32/osiFileName.h b/src/libCom/osi/os/WIN32/osiFileName.h index 658975d89..6ff0308b2 100644 --- a/src/libCom/osi/os/WIN32/osiFileName.h +++ b/src/libCom/osi/os/WIN32/osiFileName.h @@ -11,7 +11,6 @@ * osiFileName.h * Author: Jeff Hill * - * */ #ifndef osiFileNameH #define osiFileNameH diff --git a/src/libCom/osi/os/WIN32/osiUnistd.h b/src/libCom/osi/os/WIN32/osiUnistd.h index c8c744f6f..3f34e74cc 100644 --- a/src/libCom/osi/os/WIN32/osiUnistd.h +++ b/src/libCom/osi/os/WIN32/osiUnistd.h @@ -8,16 +8,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ /* - * $Revision-Id$ - * - * - * L O S A L A M O S - * Los Alamos National Laboratory - * Los Alamos, New Mexico 87545 - * - * Copyright, 1986, The Regents of the University of California. - * - * * Author Jeffrey O. Hill * johill@lanl.gov * 505 665 1831 diff --git a/src/libCom/osi/os/WIN32/systemCallIntMech.cpp b/src/libCom/osi/os/WIN32/systemCallIntMech.cpp index be18c02a1..5e13299c0 100644 --- a/src/libCom/osi/os/WIN32/systemCallIntMech.cpp +++ b/src/libCom/osi/os/WIN32/systemCallIntMech.cpp @@ -8,7 +8,6 @@ * and higher are distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. \*************************************************************************/ -/* $Revision-Id$ */ /* * Author: Jeff Hill */ diff --git a/src/libCom/osi/os/cygwin32/devLibVMEOSD.c b/src/libCom/osi/os/cygwin32/devLibVMEOSD.c index bc1ec80cf..53cbd58cd 100644 --- a/src/libCom/osi/os/cygwin32/devLibVMEOSD.c +++ b/src/libCom/osi/os/cygwin32/devLibVMEOSD.c @@ -5,8 +5,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ -/* $Revision-Id$ */ - #include #define epicsExportSharedSymbols diff --git a/src/libCom/osi/os/cygwin32/osdSock.h b/src/libCom/osi/os/cygwin32/osdSock.h index 324e75c3f..d642cad44 100644 --- a/src/libCom/osi/os/cygwin32/osdSock.h +++ b/src/libCom/osi/os/cygwin32/osdSock.h @@ -4,7 +4,7 @@ * Copyright (c) 2002 The Regents of the University of California, as * Operator of Los Alamos National Laboratory. * EPICS BASE is distributed subject to a Software License Agreement found -* in file LICENSE that is included with this distribution. +* in file LICENSE that is included with this distribution. \*************************************************************************/ /* * cygwin32 specific include @@ -49,6 +49,7 @@ typedef int osiSocklen_t; #define SOCK_ENOBUFS ENOBUFS #define SOCK_ECONNRESET ECONNRESET #define SOCK_ETIMEDOUT ETIMEDOUT +#define SOCK_EACCES EACCES #define SOCK_EADDRINUSE EADDRINUSE #define SOCK_EADDRNOTAVAIL EADDRNOTAVAIL #define SOCK_ECONNREFUSED ECONNREFUSED @@ -67,4 +68,3 @@ typedef int osiSocklen_t; #define ifreq_size(pifreq) (sizeof(pifreq->ifr_name)) #endif /*osdSockH*/ - diff --git a/src/libCom/osi/os/cygwin32/osdSockAddrReuse.cpp b/src/libCom/osi/os/cygwin32/osdSockAddrReuse.cpp index e8de4d4b7..d441d7511 100644 --- a/src/libCom/osi/os/cygwin32/osdSockAddrReuse.cpp +++ b/src/libCom/osi/os/cygwin32/osdSockAddrReuse.cpp @@ -10,7 +10,6 @@ \*************************************************************************/ /* - * $Revision-Id$ * Author: Jeff Hill */ diff --git a/src/libCom/osi/os/cygwin32/osiFileName.h b/src/libCom/osi/os/cygwin32/osiFileName.h index 658975d89..6d7fd6eb9 100644 --- a/src/libCom/osi/os/cygwin32/osiFileName.h +++ b/src/libCom/osi/os/cygwin32/osiFileName.h @@ -10,8 +10,6 @@ /* * osiFileName.h * Author: Jeff Hill - * - * */ #ifndef osiFileNameH #define osiFileNameH diff --git a/src/libCom/osi/os/cygwin32/systemCallIntMech.cpp b/src/libCom/osi/os/cygwin32/systemCallIntMech.cpp index 93da75ea6..9c0df3293 100644 --- a/src/libCom/osi/os/cygwin32/systemCallIntMech.cpp +++ b/src/libCom/osi/os/cygwin32/systemCallIntMech.cpp @@ -6,7 +6,6 @@ * EPICS BASE is distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. \*************************************************************************/ -/* $Revision-Id$ */ /* * Author: Jeff Hill */ diff --git a/src/libCom/osi/os/default/devLibVMEOSD.c b/src/libCom/osi/os/default/devLibVMEOSD.c index 218f5f6ed..b8b1d5047 100644 --- a/src/libCom/osi/os/default/devLibVMEOSD.c +++ b/src/libCom/osi/os/default/devLibVMEOSD.c @@ -5,8 +5,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ -/* $Revision-Id$ */ - #include #define epicsExportSharedSymbols diff --git a/src/libCom/osi/os/default/epicsMMIODef.h b/src/libCom/osi/os/default/epicsMMIODef.h index a306f8339..dc4bb4cb7 100644 --- a/src/libCom/osi/os/default/epicsMMIODef.h +++ b/src/libCom/osi/os/default/epicsMMIODef.h @@ -90,15 +90,23 @@ nat_iowrite32(volatile void* addr, epicsUInt32 val) *@{ */ -#define bswap16(value) ((epicsUInt16) ( \ - (((epicsUInt16)(value) & 0x00ff) << 8) | \ - (((epicsUInt16)(value) & 0xff00) >> 8))) +static EPICS_ALWAYS_INLINE +epicsUInt16 +bswap16(epicsUInt16 value) +{ + return (((epicsUInt16)(value) & 0x00ff) << 8) | + (((epicsUInt16)(value) & 0xff00) >> 8); +} -#define bswap32(value) ( \ - (((epicsUInt32)(value) & 0x000000ff) << 24) | \ - (((epicsUInt32)(value) & 0x0000ff00) << 8) | \ - (((epicsUInt32)(value) & 0x00ff0000) >> 8) | \ - (((epicsUInt32)(value) & 0xff000000) >> 24)) +static EPICS_ALWAYS_INLINE +epicsUInt32 +bswap32(epicsUInt32 value) +{ + return (((epicsUInt32)(value) & 0x000000ff) << 24) | + (((epicsUInt32)(value) & 0x0000ff00) << 8) | + (((epicsUInt32)(value) & 0x00ff0000) >> 8) | + (((epicsUInt32)(value) & 0xff000000) >> 24); +} # define be_ioread16(A) nat_ioread16(A) # define be_ioread32(A) nat_ioread32(A) diff --git a/src/libCom/osi/os/default/epicsSocketConvertErrnoToString.cpp b/src/libCom/osi/os/default/epicsSocketConvertErrnoToString.cpp index 0e0ef94f0..3cbfce60d 100644 --- a/src/libCom/osi/os/default/epicsSocketConvertErrnoToString.cpp +++ b/src/libCom/osi/os/default/epicsSocketConvertErrnoToString.cpp @@ -7,7 +7,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ /* osdSock.c */ -/* $Revision-Id$ */ /* * Author: Jeff Hill * Date: 04-05-94 diff --git a/src/libCom/osi/os/default/gnuReadline.c b/src/libCom/osi/os/default/gnuReadline.c index 78ed17828..ae646a53e 100644 --- a/src/libCom/osi/os/default/gnuReadline.c +++ b/src/libCom/osi/os/default/gnuReadline.c @@ -5,7 +5,6 @@ * EPICS BASE is distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. \*************************************************************************/ -/* $Revision-Id$ */ /* Author: Eric Norum Date: 12DEC2001 */ /* diff --git a/src/libCom/osi/os/default/osdAssert.c b/src/libCom/osi/os/default/osdAssert.c index 1bd8e7f65..14d548c3d 100644 --- a/src/libCom/osi/os/default/osdAssert.c +++ b/src/libCom/osi/os/default/osdAssert.c @@ -6,7 +6,6 @@ * EPICS BASE is distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. \*************************************************************************/ -/* $Revision-Id$ */ /* * Author: Jeffrey Hill * Date: 02-27-95 diff --git a/src/libCom/osi/os/default/osdEnv.c b/src/libCom/osi/os/default/osdEnv.c index 6c67a6999..682bcc934 100644 --- a/src/libCom/osi/os/default/osdEnv.c +++ b/src/libCom/osi/os/default/osdEnv.c @@ -5,8 +5,6 @@ \*************************************************************************/ /* osdEnv.c */ /* - * $Revision-Id$ - * * Author: Eric Norum * Date: May 7, 2001 * diff --git a/src/libCom/osi/os/default/osdMessageQueue.cpp b/src/libCom/osi/os/default/osdMessageQueue.cpp index 9f589aaf4..c86d8cc2b 100644 --- a/src/libCom/osi/os/default/osdMessageQueue.cpp +++ b/src/libCom/osi/os/default/osdMessageQueue.cpp @@ -8,8 +8,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ /* - * $Revision-Id$ - * * Author W. Eric Norum * norume@aps.anl.gov * 630 252 4793 @@ -18,6 +16,9 @@ #include #include +#include +#include + #define epicsExportSharedSymbols #include "epicsMessageQueue.h" #include diff --git a/src/libCom/osi/os/default/osdNetIntf.c b/src/libCom/osi/os/default/osdNetIntf.c index c3f1a89cb..62247bc5d 100644 --- a/src/libCom/osi/os/default/osdNetIntf.c +++ b/src/libCom/osi/os/default/osdNetIntf.c @@ -8,7 +8,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ -/* $Revision-Id$ */ /* * Author: Jeff Hill * Date: 04-05-94 @@ -77,6 +76,21 @@ epicsShareFunc void epicsShareAPI osiSockDiscoverBroadcastAddresses struct ifreq *pifreq; struct ifreq *pnextifreq; osiSockAddrNode *pNewNode; + + if ( pMatchAddr->sa.sa_family == AF_INET ) { + if ( pMatchAddr->ia.sin_addr.s_addr == htonl (INADDR_LOOPBACK) ) { + pNewNode = (osiSockAddrNode *) calloc (1, sizeof (*pNewNode) ); + if ( pNewNode == NULL ) { + errlogPrintf ( "osiSockDiscoverBroadcastAddresses(): no memory available for configuration\n" ); + return; + } + pNewNode->addr.ia.sin_family = AF_INET; + pNewNode->addr.ia.sin_port = htons ( 0 ); + pNewNode->addr.ia.sin_addr.s_addr = htonl (INADDR_LOOPBACK); + ellAdd ( pList, &pNewNode->node ); + return; + } + } /* * use pool so that we avoid using too much stack space @@ -104,7 +118,6 @@ epicsShareFunc void epicsShareAPI osiSockDiscoverBroadcastAddresses for ( pifreq = pIfreqList; pifreq <= pIfreqListEnd; pifreq = pnextifreq ) { uint32_t current_ifreqsize; - struct sockaddr_in if_addr; /* * find the next ifreq @@ -128,7 +141,6 @@ epicsShareFunc void epicsShareAPI osiSockDiscoverBroadcastAddresses ifDepenDebugPrintf ( ("osiSockDiscoverBroadcastAddresses(): interface \"%s\" was not AF_INET\n", pIfreqList->ifr_name) ); continue; } - if_addr = *(struct sockaddr_in *)&pIfreqList->ifr_addr; /* * if it isnt a wildcarded interface then look for @@ -139,7 +151,8 @@ epicsShareFunc void epicsShareAPI osiSockDiscoverBroadcastAddresses continue; } if ( pMatchAddr->ia.sin_addr.s_addr != htonl (INADDR_ANY) ) { - if ( if_addr.sin_addr.s_addr != pMatchAddr->ia.sin_addr.s_addr ) { + struct sockaddr_in *pInetAddr = (struct sockaddr_in *) &pIfreqList->ifr_addr; + if ( pInetAddr->sin_addr.s_addr != pMatchAddr->ia.sin_addr.s_addr ) { ifDepenDebugPrintf ( ("osiSockDiscoverBroadcastAddresses(): net intf \"%s\" didnt match\n", pIfreqList->ifr_name) ); continue; } @@ -161,6 +174,14 @@ epicsShareFunc void epicsShareAPI osiSockDiscoverBroadcastAddresses continue; } + /* + * dont use the loop back interface + */ + if ( pIfreqList->ifr_flags & IFF_LOOPBACK ) { + ifDepenDebugPrintf ( ("osiSockDiscoverBroadcastAddresses(): ignoring loopback interface: \"%s\"\n", pIfreqList->ifr_name) ); + continue; + } + pNewNode = (osiSockAddrNode *) calloc (1, sizeof (*pNewNode) ); if ( pNewNode == NULL ) { errlogPrintf ( "osiSockDiscoverBroadcastAddresses(): no memory available for configuration\n" ); @@ -179,14 +200,22 @@ epicsShareFunc void epicsShareAPI osiSockDiscoverBroadcastAddresses * interface. */ if ( pIfreqList->ifr_flags & IFF_BROADCAST ) { + osiSockAddr baddr; status = socket_ioctl (socket, SIOCGIFBRDADDR, pIfreqList); if ( status ) { errlogPrintf ("osiSockDiscoverBroadcastAddresses(): net intf \"%s\": bcast addr fetch fail\n", pIfreqList->ifr_name); free ( pNewNode ); continue; } - pNewNode->addr.sa = pIfreqList->ifr_broadaddr; - ifDepenDebugPrintf ( ( "found broadcast addr = %x\n", ntohl ( pNewNode->addr.ia.sin_addr.s_addr ) ) ); + baddr.sa = pIfreqList->ifr_broadaddr; + if (baddr.ia.sin_family==AF_INET && baddr.ia.sin_addr.s_addr != INADDR_ANY) { + pNewNode->addr.sa = pIfreqList->ifr_broadaddr; + ifDepenDebugPrintf ( ( "found broadcast addr = %x\n", ntohl ( baddr.ia.sin_addr.s_addr ) ) ); + } else { + ifDepenDebugPrintf ( ( "Ignoring broadcast addr = \n", ntohl ( baddr.ia.sin_addr.s_addr ) ) ); + free ( pNewNode ); + continue; + } } #if defined (IFF_POINTOPOINT) else if ( pIfreqList->ifr_flags & IFF_POINTOPOINT ) { @@ -198,22 +227,6 @@ epicsShareFunc void epicsShareAPI osiSockDiscoverBroadcastAddresses } pNewNode->addr.sa = pIfreqList->ifr_dstaddr; } -#endif -#if defined(__linux__) - /* On Linux, even though the 'lo' interface doesn't set IFF_BROADCAST - * a broadcast route often exists. Assume that sending to 127.255.255.255 - * reaches all local listeners. - * - * $ ip route show table local scope link dev lo - * broadcast 127.0.0.0 proto kernel src 127.0.0.1 - * broadcast 127.255.255.255 proto kernel src 127.0.0.1 - */ - else if ( pIfreqList->ifr_flags & IFF_LOOPBACK && if_addr.sin_addr.s_addr == htonl(INADDR_LOOPBACK) ) { - memset(&pNewNode->addr.ia, 0, sizeof(pNewNode->addr.ia)); - pNewNode->addr.ia.sin_family = AF_INET; - pNewNode->addr.ia.sin_addr.s_addr = htonl(0x7fffffff); - ifDepenDebugPrintf ( ( "assume loopback broadcast addr = %x\n", ntohl ( pNewNode->addr.ia.sin_addr.s_addr ) ) ); - } #endif else { ifDepenDebugPrintf ( ( "osiSockDiscoverBroadcastAddresses(): net intf \"%s\": not point to point or bcast?\n", pIfreqList->ifr_name ) ); diff --git a/src/libCom/osi/os/default/osdVME.h b/src/libCom/osi/os/default/osdVME.h index 37ac6a30a..1b65b3184 100644 --- a/src/libCom/osi/os/default/osdVME.h +++ b/src/libCom/osi/os/default/osdVME.h @@ -7,7 +7,6 @@ * and higher are distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. \*************************************************************************/ -/* $Revision-Id$ */ /* * OS-dependent VME support diff --git a/src/libCom/osi/os/default/osdWireFormat.h b/src/libCom/osi/os/default/osdWireFormat.h index 6db3e20ab..385c9bd69 100644 --- a/src/libCom/osi/os/default/osdWireFormat.h +++ b/src/libCom/osi/os/default/osdWireFormat.h @@ -8,13 +8,6 @@ \*************************************************************************/ /* - * L O S A L A M O S - * Los Alamos National Laboratory - * Los Alamos, New Mexico 87545 - * - * Copyright, 2000, The Regents of the University of California. - * - * * Author Jeffrey O. Hill * johill@lanl.gov */ diff --git a/src/libCom/osi/os/freebsd/osdSock.h b/src/libCom/osi/os/freebsd/osdSock.h index a950b996c..fe28d4cd5 100644 --- a/src/libCom/osi/os/freebsd/osdSock.h +++ b/src/libCom/osi/os/freebsd/osdSock.h @@ -4,7 +4,7 @@ * Copyright (c) 2002 The Regents of the University of California, as * Operator of Los Alamos National Laboratory. * EPICS BASE is distributed subject to a Software License Agreement found -* in file LICENSE that is included with this distribution. +* in file LICENSE that is included with this distribution. \*************************************************************************/ #ifndef osdSockH @@ -29,7 +29,7 @@ #define IPPORT_USERRESERVED 5000 #endif - + typedef int SOCKET; #define INVALID_SOCKET (-1) #define SOCKERRNO errno @@ -43,6 +43,7 @@ typedef socklen_t osiSocklen_t; #define SOCK_ENOBUFS ENOBUFS #define SOCK_ECONNRESET ECONNRESET #define SOCK_ETIMEDOUT ETIMEDOUT +#define SOCK_EACCES EACCES #define SOCK_EADDRINUSE EADDRINUSE #define SOCK_EADDRNOTAVAIL EADDRNOTAVAIL #define SOCK_ECONNREFUSED ECONNREFUSED @@ -77,4 +78,3 @@ typedef socklen_t osiSocklen_t; #endif #endif /*osdSockH*/ - diff --git a/src/libCom/osi/os/freebsd/osdTime.h b/src/libCom/osi/os/freebsd/osdTime.h index d0a61c9e0..941426c72 100644 --- a/src/libCom/osi/os/freebsd/osdTime.h +++ b/src/libCom/osi/os/freebsd/osdTime.h @@ -5,8 +5,6 @@ \*************************************************************************/ /* - * $Revision-Id$ - * * Author: Eric Norum */ diff --git a/src/libCom/osi/os/freebsd/osiFileName.h b/src/libCom/osi/os/freebsd/osiFileName.h index a64c19ad8..83204c70f 100644 --- a/src/libCom/osi/os/freebsd/osiFileName.h +++ b/src/libCom/osi/os/freebsd/osiFileName.h @@ -9,8 +9,6 @@ /* * osiFileName.h * Author: Jeff Hill - * - * */ #ifndef osiFileNameH #define osiFileNameH diff --git a/src/libCom/osi/os/freebsd/osiUnistd.h b/src/libCom/osi/os/freebsd/osiUnistd.h index b96f87b5f..c64e57a6c 100644 --- a/src/libCom/osi/os/freebsd/osiUnistd.h +++ b/src/libCom/osi/os/freebsd/osiUnistd.h @@ -7,16 +7,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ /* - * $Revision-Id$ - * - * - * L O S A L A M O S - * Los Alamos National Laboratory - * Los Alamos, New Mexico 87545 - * - * Copyright, 1986, The Regents of the University of California. - * - * * Author Jeffrey O. Hill * johill@lanl.gov * 505 665 1831 diff --git a/src/libCom/osi/os/iOS/osdEnv.c b/src/libCom/osi/os/iOS/osdEnv.c index c631ec4f8..a32cce5ef 100644 --- a/src/libCom/osi/os/iOS/osdEnv.c +++ b/src/libCom/osi/os/iOS/osdEnv.c @@ -6,13 +6,10 @@ /* osdEnv.c */ /* - * $Revision-Id$ - * * Author: Eric Norum * Date: May 7, 2001 * * Routines to modify/display environment variables and EPICS parameters - * */ #include diff --git a/src/libCom/osi/os/iOS/osdSock.h b/src/libCom/osi/os/iOS/osdSock.h index 149c4021c..0b3b3f6c1 100644 --- a/src/libCom/osi/os/iOS/osdSock.h +++ b/src/libCom/osi/os/iOS/osdSock.h @@ -5,8 +5,6 @@ \*************************************************************************/ /* - * $Revision-Id$ - * * Author: Eric Norum */ @@ -41,6 +39,7 @@ typedef socklen_t osiSocklen_t; #define SOCK_ENOBUFS ENOBUFS #define SOCK_ECONNRESET ECONNRESET #define SOCK_ETIMEDOUT ETIMEDOUT +#define SOCK_EACCES EACCES #define SOCK_EADDRINUSE EADDRINUSE #define SOCK_EADDRNOTAVAIL EADDRNOTAVAIL #define SOCK_ECONNREFUSED ECONNREFUSED diff --git a/src/libCom/osi/os/iOS/osdSockAddrReuse.cpp b/src/libCom/osi/os/iOS/osdSockAddrReuse.cpp index f5aa99f31..9f64e331a 100644 --- a/src/libCom/osi/os/iOS/osdSockAddrReuse.cpp +++ b/src/libCom/osi/os/iOS/osdSockAddrReuse.cpp @@ -8,7 +8,6 @@ \*************************************************************************/ /* - * $Revision-Id$ * Author: Jeff Hill */ diff --git a/src/libCom/osi/os/iOS/osdTime.h b/src/libCom/osi/os/iOS/osdTime.h index 554999779..953ec31b8 100644 --- a/src/libCom/osi/os/iOS/osdTime.h +++ b/src/libCom/osi/os/iOS/osdTime.h @@ -5,8 +5,6 @@ \*************************************************************************/ /* - * $Revision-Id$ - * * Author: Eric Norum */ diff --git a/src/libCom/osi/os/iOS/osiFileName.h b/src/libCom/osi/os/iOS/osiFileName.h index b88bfe35a..f7dd62878 100644 --- a/src/libCom/osi/os/iOS/osiFileName.h +++ b/src/libCom/osi/os/iOS/osiFileName.h @@ -5,8 +5,6 @@ \*************************************************************************/ /* - * $Revision-Id$ - * * Author: Eric Norum */ diff --git a/src/libCom/osi/os/posix/epicsMath.h b/src/libCom/osi/os/posix/epicsMath.h index 4ed0fdc51..4e558676c 100644 --- a/src/libCom/osi/os/posix/epicsMath.h +++ b/src/libCom/osi/os/posix/epicsMath.h @@ -19,7 +19,7 @@ extern "C" { #ifdef isfinite # undef finite -# define finite(x) isfinite(x) +# define finite(x) isfinite((double)(x)) #endif epicsShareExtern float epicsNAN; diff --git a/src/libCom/osi/os/posix/osdProcess.c b/src/libCom/osi/os/posix/osdProcess.c index 847caa4ad..a08871465 100644 --- a/src/libCom/osi/os/posix/osdProcess.c +++ b/src/libCom/osi/os/posix/osdProcess.c @@ -9,8 +9,6 @@ \*************************************************************************/ /* - * $Revision-Id$ - * * Operating System Dependent Implementation of osiProcess.h * * Author: Jeff Hill diff --git a/src/libCom/osi/os/posix/osdSock.c b/src/libCom/osi/os/posix/osdSock.c index 4cd776c92..9f8146142 100644 --- a/src/libCom/osi/os/posix/osdSock.c +++ b/src/libCom/osi/os/posix/osdSock.c @@ -8,7 +8,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ /* osdSock.c */ -/* $Revision-Id$ */ /* * Author: Jeff Hill * Date: 04-05-94 diff --git a/src/libCom/osi/os/posix/osdSockAddrReuse.cpp b/src/libCom/osi/os/posix/osdSockAddrReuse.cpp index 7ee0c64d2..3a3f78ebd 100644 --- a/src/libCom/osi/os/posix/osdSockAddrReuse.cpp +++ b/src/libCom/osi/os/posix/osdSockAddrReuse.cpp @@ -10,7 +10,6 @@ \*************************************************************************/ /* - * $Revision-Id$ * Author: Jeff Hill */ diff --git a/src/libCom/osi/os/posix/osdTime.h b/src/libCom/osi/os/posix/osdTime.h index 12ff42a12..d1da77696 100644 --- a/src/libCom/osi/os/posix/osdTime.h +++ b/src/libCom/osi/os/posix/osdTime.h @@ -9,8 +9,6 @@ \*************************************************************************/ /* - * $Revision-Id$ - * * Author: Jeff Hill */ diff --git a/src/libCom/osi/os/posix/osiUnistd.h b/src/libCom/osi/os/posix/osiUnistd.h index 5d2bb5e6f..5121261b6 100644 --- a/src/libCom/osi/os/posix/osiUnistd.h +++ b/src/libCom/osi/os/posix/osiUnistd.h @@ -8,16 +8,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ /* - * $Revision-Id$ - * - * - * L O S A L A M O S - * Los Alamos National Laboratory - * Los Alamos, New Mexico 87545 - * - * Copyright, 1986, The Regents of the University of California. - * - * * Author Jeffrey O. Hill * johill@lanl.gov * 505 665 1831 diff --git a/src/libCom/osi/os/posix/systemCallIntMech.cpp b/src/libCom/osi/os/posix/systemCallIntMech.cpp index 9eb77a1b6..cdac1d0cb 100644 --- a/src/libCom/osi/os/posix/systemCallIntMech.cpp +++ b/src/libCom/osi/os/posix/systemCallIntMech.cpp @@ -8,7 +8,6 @@ * and higher are distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. \*************************************************************************/ -/* $Revision-Id$ */ /* * Author: Jeff Hill */ diff --git a/src/libCom/osi/os/solaris/osdSock.h b/src/libCom/osi/os/solaris/osdSock.h index 1ea493680..a39c6c3d3 100644 --- a/src/libCom/osi/os/solaris/osdSock.h +++ b/src/libCom/osi/os/solaris/osdSock.h @@ -4,7 +4,7 @@ * Copyright (c) 2002 The Regents of the University of California, as * Operator of Los Alamos National Laboratory. * EPICS BASE is distributed subject to a Software License Agreement found -* in file LICENSE that is included with this distribution. +* in file LICENSE that is included with this distribution. \*************************************************************************/ /* @@ -39,7 +39,7 @@ typedef int osiSockIoctl_t; #if SOLARIS > 6 || defined ( _SOCKLEN_T ) typedef uint32_t osiSocklen_t; -#else +#else typedef int osiSocklen_t; #endif @@ -51,6 +51,7 @@ typedef int osiSockIoctl_t; #define SOCK_ENOBUFS ENOBUFS #define SOCK_ECONNRESET ECONNRESET #define SOCK_ETIMEDOUT ETIMEDOUT +#define SOCK_EACCES EACCES #define SOCK_EADDRINUSE EADDRINUSE #define SOCK_EADDRNOTAVAIL EADDRNOTAVAIL #define SOCK_ECONNREFUSED ECONNREFUSED @@ -80,9 +81,8 @@ typedef int osiSockIoctl_t; #ifndef INADDR_NONE # define INADDR_NONE (0xffffffff) -#endif +#endif #define ifreq_size(pifreq) (sizeof(pifreq->ifr_name)) #endif /*osdSockH*/ - diff --git a/src/libCom/osi/os/vxWorks/camacLib.h b/src/libCom/osi/os/vxWorks/camacLib.h index eb2456b1a..a30ab5659 100644 --- a/src/libCom/osi/os/vxWorks/camacLib.h +++ b/src/libCom/osi/os/vxWorks/camacLib.h @@ -14,8 +14,6 @@ * */ -static char ht2992_h_RCSID[] = "$Revision-Id$"; - /********************************/ /* GLOBAL DATA */ /********************************/ diff --git a/src/libCom/osi/os/vxWorks/devLibVMEOSD.c b/src/libCom/osi/os/vxWorks/devLibVMEOSD.c index 22cd177ea..82bec603d 100644 --- a/src/libCom/osi/os/vxWorks/devLibVMEOSD.c +++ b/src/libCom/osi/os/vxWorks/devLibVMEOSD.c @@ -7,8 +7,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ /* - * $Revision-Id$ - * * Archictecture dependent support for common device driver resources * * Author: Jeff Hill diff --git a/src/libCom/osi/os/vxWorks/epicsDynLink.c b/src/libCom/osi/os/vxWorks/epicsDynLink.c index ba0fde277..df954782a 100644 --- a/src/libCom/osi/os/vxWorks/epicsDynLink.c +++ b/src/libCom/osi/os/vxWorks/epicsDynLink.c @@ -6,8 +6,7 @@ * EPICS BASE is distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. \*************************************************************************/ -/* $Id $ - * +/* * On 68K targets, all symbols have an underscore prepended to their name. * This code permits both standards to work, as long as you're not looking * for a symbol name that actually begins with an underscore. diff --git a/src/libCom/osi/os/vxWorks/epicsMMIO.h b/src/libCom/osi/os/vxWorks/epicsMMIO.h index dd8abe95a..b12c71ad9 100644 --- a/src/libCom/osi/os/vxWorks/epicsMMIO.h +++ b/src/libCom/osi/os/vxWorks/epicsMMIO.h @@ -37,6 +37,7 @@ #include /* EPICS Common Type Definitions */ #include /* EPICS Byte Order Definitions */ +#include /*===================== * vxAtomicLib.h (which defines the memory barrier macros) @@ -49,15 +50,23 @@ # include #endif -#define bswap16(value) ((epicsUInt16) ( \ - (((epicsUInt16)(value) & 0x00ff) << 8) | \ - (((epicsUInt16)(value) & 0xff00) >> 8))) +static EPICS_ALWAYS_INLINE +epicsUInt16 +bswap16(epicsUInt16 value) +{ + return (((epicsUInt16)(value) & 0x00ff) << 8) | + (((epicsUInt16)(value) & 0xff00) >> 8); +} -#define bswap32(value) ( \ - (((epicsUInt32)(value) & 0x000000ff) << 24) | \ - (((epicsUInt32)(value) & 0x0000ff00) << 8) | \ - (((epicsUInt32)(value) & 0x00ff0000) >> 8) | \ - (((epicsUInt32)(value) & 0xff000000) >> 24)) +static EPICS_ALWAYS_INLINE +epicsUInt32 +bswap32(epicsUInt32 value) +{ + return (((epicsUInt32)(value) & 0x000000ff) << 24) | + (((epicsUInt32)(value) & 0x0000ff00) << 8) | + (((epicsUInt32)(value) & 0x00ff0000) >> 8) | + (((epicsUInt32)(value) & 0xff000000) >> 24); +} #if EPICS_BYTE_ORDER == EPICS_ENDIAN_BIG # define be16_to_cpu(X) (epicsUInt16)(X) diff --git a/src/libCom/osi/os/vxWorks/logMsgToErrlog.cpp b/src/libCom/osi/os/vxWorks/logMsgToErrlog.cpp index fade9ffea..b44881cd0 100644 --- a/src/libCom/osi/os/vxWorks/logMsgToErrlog.cpp +++ b/src/libCom/osi/os/vxWorks/logMsgToErrlog.cpp @@ -9,8 +9,6 @@ \*************************************************************************/ /* - * $Revision-Id$ - * * route vxWorks logMsg messages into the EPICS logging system * * Author: Jeff Hill diff --git a/src/libCom/osi/os/vxWorks/module_types.h b/src/libCom/osi/os/vxWorks/module_types.h index af3dd122f..07372c37a 100644 --- a/src/libCom/osi/os/vxWorks/module_types.h +++ b/src/libCom/osi/os/vxWorks/module_types.h @@ -8,7 +8,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ /* module_types.h */ -/* base/include $Revision-Id$ */ /* * Author: Bob Dalesio * Date: 12-07-88 diff --git a/src/libCom/osi/os/vxWorks/osdEnv.c b/src/libCom/osi/os/vxWorks/osdEnv.c index 085611935..c81f49316 100644 --- a/src/libCom/osi/os/vxWorks/osdEnv.c +++ b/src/libCom/osi/os/vxWorks/osdEnv.c @@ -5,8 +5,6 @@ \*************************************************************************/ /* osdEnv.c */ /* - * $Revision-Id$ - * * Author: Eric Norum * Date: May 7, 2001 * diff --git a/src/libCom/osi/os/vxWorks/osdMessageQueue.cpp b/src/libCom/osi/os/vxWorks/osdMessageQueue.cpp index 206d6def4..89c2745ed 100644 --- a/src/libCom/osi/os/vxWorks/osdMessageQueue.cpp +++ b/src/libCom/osi/os/vxWorks/osdMessageQueue.cpp @@ -8,8 +8,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ /* - * $Revision-Id$ - * * Author W. Eric Norum * norume@aps.anl.gov * 630 252 4793 diff --git a/src/libCom/osi/os/vxWorks/osdMessageQueue.h b/src/libCom/osi/os/vxWorks/osdMessageQueue.h index 3ae77b514..87b35bd38 100644 --- a/src/libCom/osi/os/vxWorks/osdMessageQueue.h +++ b/src/libCom/osi/os/vxWorks/osdMessageQueue.h @@ -8,8 +8,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ /* - * $Revision-Id$ - * * Author W. Eric Norum * norume@aps.anl.gov * 630 252 4793 diff --git a/src/libCom/osi/os/vxWorks/osdProcess.c b/src/libCom/osi/os/vxWorks/osdProcess.c index 27f5b71e9..2347a407c 100644 --- a/src/libCom/osi/os/vxWorks/osdProcess.c +++ b/src/libCom/osi/os/vxWorks/osdProcess.c @@ -8,8 +8,6 @@ \*************************************************************************/ /* - * $Revision-Id$ - * * Operating System Dependent Implementation of osiProcess.h * * Author: Jeff Hill diff --git a/src/libCom/osi/os/vxWorks/osdReadline.c b/src/libCom/osi/os/vxWorks/osdReadline.c index e0208893e..9195b6b72 100644 --- a/src/libCom/osi/os/vxWorks/osdReadline.c +++ b/src/libCom/osi/os/vxWorks/osdReadline.c @@ -5,7 +5,6 @@ * EPICS BASE is distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. \*************************************************************************/ -/* $Revision-Id$ */ /* Author: Eric Norum Date: 12DEC2001 */ /* diff --git a/src/libCom/osi/os/vxWorks/osdSock.h b/src/libCom/osi/os/vxWorks/osdSock.h index f0260c5a8..80464ef87 100644 --- a/src/libCom/osi/os/vxWorks/osdSock.h +++ b/src/libCom/osi/os/vxWorks/osdSock.h @@ -4,7 +4,7 @@ * Copyright (c) 2002 The Regents of the University of California, as * Operator of Los Alamos National Laboratory. * EPICS BASE is distributed subject to a Software License Agreement found -* in file LICENSE that is included with this distribution. +* in file LICENSE that is included with this distribution. \*************************************************************************/ /* * vxWorks specific socket include @@ -44,7 +44,7 @@ int sysClkRateGet(void); #ifdef __cplusplus } #endif - + typedef int SOCKET; #define INVALID_SOCKET (-1) #define SOCKERRNO errno @@ -72,6 +72,7 @@ typedef int osiSocklen_t; #define SOCK_ENOBUFS ENOBUFS #define SOCK_ECONNRESET ECONNRESET #define SOCK_ETIMEDOUT ETIMEDOUT +#define SOCK_EACCES EACCES #define SOCK_EADDRINUSE EADDRINUSE #define SOCK_EADDRNOTAVAIL EADDRNOTAVAIL #define SOCK_ECONNREFUSED ECONNREFUSED @@ -93,7 +94,7 @@ typedef int osiSocklen_t; #ifndef INADDR_NONE # define INADDR_NONE (0xffffffff) -#endif +#endif #if defined(_SIZEOF_ADDR_IFREQ) # define ifreq_size(pifreq) _SIZEOF_ADDR_IFREQ(*pifreq) @@ -104,5 +105,3 @@ typedef int osiSocklen_t; #endif #endif /*osdSockH*/ - - diff --git a/src/libCom/osi/os/vxWorks/osdVME.h b/src/libCom/osi/os/vxWorks/osdVME.h index a5e3bb346..b9d031a04 100644 --- a/src/libCom/osi/os/vxWorks/osdVME.h +++ b/src/libCom/osi/os/vxWorks/osdVME.h @@ -7,7 +7,6 @@ * and higher are distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. \*************************************************************************/ -/* $Revision-Id$ */ /* * OS-dependent VME support diff --git a/src/libCom/osi/os/vxWorks/osiFileName.h b/src/libCom/osi/os/vxWorks/osiFileName.h index b79203992..3a6448d54 100644 --- a/src/libCom/osi/os/vxWorks/osiFileName.h +++ b/src/libCom/osi/os/vxWorks/osiFileName.h @@ -10,8 +10,6 @@ /* * osiFileName.h * Author: Jeff Hill - * - * */ #ifndef osiFileNameH #define osiFileNameH diff --git a/src/libCom/osi/os/vxWorks/task_params.h b/src/libCom/osi/os/vxWorks/task_params.h index 455e8ceb2..7b2055157 100644 --- a/src/libCom/osi/os/vxWorks/task_params.h +++ b/src/libCom/osi/os/vxWorks/task_params.h @@ -7,7 +7,6 @@ * and higher are distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. \*************************************************************************/ -/* $Revision-Id$ */ /* Parameters for tasks on IOC */ /* diff --git a/src/libCom/osi/os/vxWorks/veclist.c b/src/libCom/osi/os/vxWorks/veclist.c index 63aea6618..2a4e617ef 100644 --- a/src/libCom/osi/os/vxWorks/veclist.c +++ b/src/libCom/osi/os/vxWorks/veclist.c @@ -8,9 +8,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ /* - * $Revision-Id$ - * @(#)veclist.c 1.10 - * * list fuctions attached to the interrupt vector table * * Created 28Mar89 Jeffrey O. Hill @@ -19,19 +16,6 @@ * */ -/* - * - * makefile - * - * - * V5VW = /.../vx/v502b - * - * veclist.o: - * cc68k -c -DCPU_FAMILY=MC680X0 -I$(V5VW)/h veclist.c - * - * - */ - #include "vxWorks.h" #include "stdio.h" #include "string.h" @@ -41,9 +25,6 @@ #include "ctype.h" #include "sysSymTbl.h" -static const char sccsID[] = - "@(#) $Revision-Id$"; - /* * * VME bus dependent diff --git a/src/libCom/osi/osiClockTime.c b/src/libCom/osi/osiClockTime.c index efe25f8b8..408a93fc0 100644 --- a/src/libCom/osi/osiClockTime.c +++ b/src/libCom/osi/osiClockTime.c @@ -23,7 +23,7 @@ #include "taskwd.h" #define NSEC_PER_SEC 1000000000 -#define ClockTimeSyncInterval 60.0 +#define ClockTimeSyncInterval_value 60.0 static struct { @@ -32,6 +32,7 @@ static struct { epicsEventId loopEvent; epicsTimeStamp startTime; epicsTimeStamp syncTime; + double ClockTimeSyncInterval; int syncFromPriority; epicsMutexId lock; } ClockTimePvt; @@ -76,6 +77,7 @@ static void ClockTime_InitOnce(void *pfirst) ClockTimePvt.loopEvent = epicsEventMustCreate(epicsEventEmpty); ClockTimePvt.lock = epicsMutexCreate(); + ClockTimePvt.ClockTimeSyncInterval = 1.0; /* First sync */ epicsAtExit(ClockTime_Shutdown, NULL); @@ -142,10 +144,10 @@ static void ClockTimeSync(void *dummy) taskwdInsert(0, NULL, NULL); for (epicsEventWaitWithTimeout(ClockTimePvt.loopEvent, - ClockTimeSyncInterval); + ClockTimePvt.ClockTimeSyncInterval); ClockTimePvt.synchronize == CLOCKTIME_SYNC; epicsEventWaitWithTimeout(ClockTimePvt.loopEvent, - ClockTimeSyncInterval)) { + ClockTimePvt.ClockTimeSyncInterval)) { epicsTimeStamp timeNow; int priority; @@ -167,6 +169,8 @@ static void ClockTimeSync(void *dummy) ClockTimePvt.syncFromPriority = priority; ClockTimePvt.syncTime = timeNow; epicsMutexUnlock(ClockTimePvt.lock); + + ClockTimePvt.ClockTimeSyncInterval = ClockTimeSyncInterval_value; } } @@ -244,7 +248,7 @@ int ClockTime_Report(int level) printf("Last successful sync was at %s\n", timebuf); } printf("Syncronization interval = %.0f seconds\n", - ClockTimeSyncInterval); + ClockTimePvt.ClockTimeSyncInterval); } else printf("OS Clock driver is *not* synchronized\n"); diff --git a/src/libCom/osi/osiPoolStatus.h b/src/libCom/osi/osiPoolStatus.h index 20f1b7339..b0207f185 100644 --- a/src/libCom/osi/osiPoolStatus.h +++ b/src/libCom/osi/osiPoolStatus.h @@ -11,8 +11,6 @@ #define INC_osiPoolStatus_H /* - * $Revision-Id$ - * * Author: Jeff Hill * * Functions which interrogate the state of the system wide pool diff --git a/src/libCom/osi/osiProcess.h b/src/libCom/osi/osiProcess.h index b954c4019..eabff1e72 100644 --- a/src/libCom/osi/osiProcess.h +++ b/src/libCom/osi/osiProcess.h @@ -11,8 +11,6 @@ #define INC_osiProcess_H /* - * $Revision-Id$ - * * Operating System Independent Interface to Process Environment * * Author: Jeff Hill diff --git a/src/libCom/osi/osiSock.c b/src/libCom/osi/osiSock.c index e030f5ab2..8b4634caf 100644 --- a/src/libCom/osi/osiSock.c +++ b/src/libCom/osi/osiSock.c @@ -9,8 +9,6 @@ \*************************************************************************/ /* - * $Revision-Id$ - * * socket support library generic code * * 7-1-97 -joh- diff --git a/src/libCom/osi/osiSock.h b/src/libCom/osi/osiSock.h index 1b52c7993..061619e89 100644 --- a/src/libCom/osi/osiSock.h +++ b/src/libCom/osi/osiSock.h @@ -8,8 +8,6 @@ \*************************************************************************/ /* - * $Revision-Id$ - * * socket support library API def * * 7-1-97 -joh- diff --git a/src/libCom/osi/osiWireFormat.h b/src/libCom/osi/osiWireFormat.h index 1ba8b905d..4d7e6717f 100644 --- a/src/libCom/osi/osiWireFormat.h +++ b/src/libCom/osi/osiWireFormat.h @@ -8,13 +8,6 @@ \*************************************************************************/ /* - * L O S A L A M O S - * Los Alamos National Laboratory - * Los Alamos, New Mexico 87545 - * - * Copyright, 2000, The Regents of the University of California. - * - * * Author Jeffrey O. Hill * johill@lanl.gov */ diff --git a/src/libCom/taskwd/taskwd.h b/src/libCom/taskwd/taskwd.h index 2d66be950..4d5274d56 100644 --- a/src/libCom/taskwd/taskwd.h +++ b/src/libCom/taskwd/taskwd.h @@ -7,8 +7,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ -/* $Revision-Id$ */ - /* General purpose task watchdog */ /* * Original Author: Marty Kraimer diff --git a/src/libCom/test/Makefile b/src/libCom/test/Makefile index f0359420d..ee4d11071 100755 --- a/src/libCom/test/Makefile +++ b/src/libCom/test/Makefile @@ -11,6 +11,7 @@ TOP=../../.. include $(TOP)/configure/CONFIG PROD_LIBS += Com +PROD_SYS_LIBS_WIN32 += ws2_32 advapi32 user32 TESTPROD_HOST += epicsUnitTestTest epicsUnitTestTest_SRCS += epicsUnitTestTest.c @@ -98,6 +99,7 @@ TESTS += epicsTimeTest TESTPROD_HOST += epicsTimeZoneTest epicsTimeZoneTest_SRCS += epicsTimeZoneTest.c +libComTestHarness_SRCS_RTEMS += epicsTimeZoneTest.c TESTS += epicsTimeZoneTest TESTPROD_HOST += epicsThreadTest @@ -170,11 +172,6 @@ epicsAtomicTest_SRCS += epicsAtomicTest.cpp testHarness_SRCS += epicsAtomicTest.cpp TESTS += epicsAtomicTest -TESTPROD_HOST += epicsExceptionTest -epicsExceptionTest_SRCS += epicsExceptionTest.cpp -testHarness_SRCS += epicsExceptionTest.cpp -TESTS += epicsExceptionTest - TESTPROD_HOST += macDefExpandTest macDefExpandTest_SRCS += macDefExpandTest.c testHarness_SRCS += macDefExpandTest.c @@ -208,6 +205,10 @@ epicsStackTraceTest_SRCS += epicsStackTraceTest.c testHarness_SRCS += epicsStackTraceTest.c TESTS += epicsStackTraceTest +TESTPROD_HOST += ipAddrToAsciiTest +ipAddrToAsciiTest_SRCS += ipAddrToAsciiTest.cpp +testHarness_SRCS += ipAddrToAsciiTest.cpp +TESTS += ipAddrToAsciiTest # The testHarness runs all the test programs in a known working order. testHarness_SRCS += epicsRunLibComTests.c diff --git a/src/libCom/test/epicsCalcTest.cpp b/src/libCom/test/epicsCalcTest.cpp index 24e30d417..1bd046d37 100644 --- a/src/libCom/test/epicsCalcTest.cpp +++ b/src/libCom/test/epicsCalcTest.cpp @@ -4,7 +4,6 @@ * EPICS BASE is distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. \*************************************************************************/ -// $Revision-Id$ // Author: Andrew Johnson #include "epicsUnitTest.h" diff --git a/src/libCom/test/epicsEllTest.c b/src/libCom/test/epicsEllTest.c index b608d1cc3..62ee14e39 100644 --- a/src/libCom/test/epicsEllTest.c +++ b/src/libCom/test/epicsEllTest.c @@ -1,4 +1,5 @@ /*************************************************************************\ +* Copyright (c) 2016 Michael Davidsaver * Copyright (c) 2009 UChicago Argonne LLC, as Operator of Argonne * National Laboratory. * Copyright (c) 2002 The Regents of the University of California, as @@ -11,6 +12,7 @@ #include #include "ellLib.h" +#include "dbDefs.h" #include "epicsUnitTest.h" #include "testMain.h" @@ -20,15 +22,13 @@ struct myItem { int num; }; -MAIN(epicsEllTest) +static void testList(void) { ELLLIST list1; ELLLIST list2 = ELLLIST_INIT; int i1 = 1; struct myItem *pitem, *pfirst, *pick; - testPlan(70); - list1.count = 27; list1.node.next = (ELLNODE *) 0x01010101; list1.node.previous = (ELLNODE *) 0x10101010; @@ -192,6 +192,77 @@ MAIN(epicsEllTest) ellFree2(&list1, free); testOk1(ellCount(&list1) == 0); +} + +typedef struct { int A, B; } input_t; + +static int myItemCmp(const ELLNODE *a, const ELLNODE *b) +{ + struct myItem *A = CONTAINER(a, struct myItem, node), + *B = CONTAINER(b, struct myItem, node); + + if (A->num < B->num) return -1; + else if(A->num > B->num) return 1; + else if(A->list < B->list) return -1; + else if(A->list > B->list) return 1; + else return 0; +} + +static const input_t input[] = { + {-4, 0}, + {-5, 0}, + {0,0}, + {50,0}, + {0,1}, + {5,0}, + {5,1} +}; + +static +void testSort(const input_t *inp, size_t ninp) +{ + unsigned i; + ELLLIST list = ELLLIST_INIT; + struct myItem *alloc = calloc(ninp, sizeof(*alloc)); + + if(!alloc) testAbort("testSort allocation fails"); + + for(i=0; i num = inp[i].A; + it->list= inp[i].B; + + ellAdd(&list, &it->node); + } + + ellSortStable(&list, &myItemCmp); + + testOk(ellCount(&list)==ninp, "output length %u == %u", (unsigned)ellCount(&list), (unsigned)ninp); + if(ellCount(&list)==0) { + testSkip(ninp-1, "all items lost"); + } + + { + struct myItem *prev = CONTAINER(ellFirst(&list), struct myItem, node), + *next; + + for(next = CONTAINER(ellNext(&prev->node), struct myItem, node); + next; + prev = next, next = CONTAINER(ellNext(&next->node), struct myItem, node)) + { + int cond = (prev->num num) || (prev->num==next->num && prev->list list); + testOk(cond, "%d:%d < %d:%d", prev->num, prev->list, next->num, next->list); + } + } +} + +MAIN(epicsEllTest) +{ + testPlan(77); + + testList(); + testSort(input, NELEMENTS(input)); return testDone(); } diff --git a/src/libCom/test/epicsEventTest.cpp b/src/libCom/test/epicsEventTest.cpp index b0d79613f..7c1a24141 100644 --- a/src/libCom/test/epicsEventTest.cpp +++ b/src/libCom/test/epicsEventTest.cpp @@ -250,5 +250,12 @@ MAIN(epicsEventTest) eventWaitTest(); eventWakeupTest(); + free(name); + free(id); + epicsRingPointerDelete(pinfo->ring); + epicsMutexDestroy(pinfo->lockRing); + epicsEventDestroy(event); + free(pinfo); + return testDone(); } diff --git a/src/libCom/test/epicsExceptionTest.cpp b/src/libCom/test/epicsExceptionTest.cpp deleted file mode 100644 index d6c3ecd9b..000000000 --- a/src/libCom/test/epicsExceptionTest.cpp +++ /dev/null @@ -1,110 +0,0 @@ -/*************************************************************************\ -* Copyright (c) 2006 UChicago Argonne LLC, as Operator of Argonne -* National Laboratory. -* Copyright (c) 2002 The Regents of the University of California, as -* Operator of Los Alamos National Laboratory. -* EPICS BASE is distributed subject to a Software License Agreement found -* in file LICENSE that is included with this distribution. -\*************************************************************************/ - -// -// Verify that the local c++ exception mechanism matches the ANSI/ISO standard. -// Author: Jeff Hill -// - -#include -#include -#include -#if defined(__GNUC__) && (__GNUC__<2 || (__GNUC__==2 && __GNUC_MINOR__<=96)) -#include -#else -#include -#endif - -#include "epicsUnitTest.h" -#include "epicsThread.h" -#include "testMain.h" - -using namespace std; - -#if defined ( _MSC_VER ) - // some interesting bugs found in the MS implementation of new -# if _MSC_VER >= 1900 - static size_t unsuccessfulNewSize = numeric_limits < size_t > :: max (); -# elif _MSC_VER > 1310 /* this gets fixed some release after visual studio 7 we hope */ - static const size_t unsuccessfulNewSize = numeric_limits < size_t > :: max (); -# else - static const size_t unsuccessfulNewSize = numeric_limits < size_t > :: max () - 100; -# endif - // passing a size_t to printf() needs "%zu" on some platforms -#elif defined(vxWorks) - // Neither vxWorks 5 or 6 supply true ANSI C++ - static const size_t unsuccessfulNewSize = UINT_MAX - 15u; -#else - static const size_t unsuccessfulNewSize = numeric_limits < size_t > :: max (); -#endif - -class exThread : public epicsThreadRunable { -public: - exThread (); - void waitForCompletion (); - ~exThread() {}; -private: - epicsThread thread; - bool done; - void run (); -}; - -static void epicsExceptionTestPrivate () -{ - try { - char * p = new char [unsuccessfulNewSize]; - testFail("new char[%lu] returned %p", - (unsigned long) unsuccessfulNewSize, p); - } - catch ( const bad_alloc & ) { - testPass("new char[%lu] threw", - (unsigned long) unsuccessfulNewSize); - } - catch ( ... ) { - testFail("new: threw wrong type"); - } - try { - char * p = new ( nothrow ) - char [unsuccessfulNewSize]; - testOk(p == 0, "new (nothrow) returned %p", p); - } - catch( ... ) { - testFail("new (nothrow): threw"); - } -} - -exThread::exThread () : - thread ( *this, "testExceptions", epicsThreadGetStackSize(epicsThreadStackSmall) ), - done ( false ) -{ - this->thread.start (); -} - -void exThread::run () -{ - epicsExceptionTestPrivate (); - this->done = true; -} - -void exThread::waitForCompletion () -{ - while ( ! this->done ) { - epicsThreadSleep ( 0.1 ); - } -} - -MAIN(epicsExceptionTest) -{ - testPlan(4); - epicsExceptionTestPrivate (); - - exThread athread; - athread.waitForCompletion (); - return testDone(); -} diff --git a/src/libCom/test/epicsMessageQueueTest.cpp b/src/libCom/test/epicsMessageQueueTest.cpp index e4216c291..ae090fc47 100644 --- a/src/libCom/test/epicsMessageQueueTest.cpp +++ b/src/libCom/test/epicsMessageQueueTest.cpp @@ -7,8 +7,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ /* - * $Revision-Id$ - * * Author W. Eric Norum */ #include diff --git a/src/libCom/test/epicsMutexTest.cpp b/src/libCom/test/epicsMutexTest.cpp index 87cf0a460..d44e5c0f1 100644 --- a/src/libCom/test/epicsMutexTest.cpp +++ b/src/libCom/test/epicsMutexTest.cpp @@ -279,5 +279,11 @@ MAIN(epicsMutexTest) epicsMutexPerformance (); + free(pinfo); + free(arg); + free(name); + free(id); + epicsMutexDestroy(mutex); + return testDone(); } diff --git a/src/libCom/test/epicsRunLibComTests.c b/src/libCom/test/epicsRunLibComTests.c index 5022fef69..c4a76e777 100644 --- a/src/libCom/test/epicsRunLibComTests.c +++ b/src/libCom/test/epicsRunLibComTests.c @@ -24,7 +24,6 @@ int epicsEllTest(void); int epicsEnvTest(void); int epicsErrlogTest(void); int epicsEventTest(void); -int epicsExceptionTest(void); int epicsExitTest(void); int epicsMathTest(void); int epicsMessageQueueTest(void); @@ -44,8 +43,12 @@ int epicsThreadPrivateTest(void); int epicsThreadTest(void); int epicsTimerTest(void); int epicsTimeTest(void); +#ifdef __rtems__ +int epicsTimeZoneTest(void); +#endif int epicsTypesTest(void); int epicsInlineTest(void); +int ipAddrToAsciiTest(void); int macDefExpandTest(void); int macLibTest(void); int ringBytesTest(void); @@ -77,7 +80,7 @@ void epicsRunLibComTests(void) runTest(epicsEnvTest); runTest(epicsErrlogTest); runTest(epicsEventTest); - runTest(epicsExceptionTest); + runTest(epicsInlineTest); runTest(epicsMathTest); runTest(epicsMessageQueueTest); runTest(epicsMMIOTest); @@ -94,8 +97,11 @@ void epicsRunLibComTests(void) runTest(epicsThreadPriorityTest); runTest(epicsThreadPrivateTest); runTest(epicsTimeTest); +#ifdef __rtems__ + runTest(epicsTimeZoneTest); +#endif runTest(epicsTypesTest); - runTest(epicsInlineTest); + runTest(ipAddrToAsciiTest); runTest(macDefExpandTest); runTest(macLibTest); runTest(ringBytesTest); diff --git a/src/libCom/test/epicsStdioTest.c b/src/libCom/test/epicsStdioTest.c index c2d7eb58a..bf25784a5 100644 --- a/src/libCom/test/epicsStdioTest.c +++ b/src/libCom/test/epicsStdioTest.c @@ -37,7 +37,14 @@ static void testEpicsSnprintf(void) { const char *expected = exbuffer; int size; int rtn, rlen; - + +#ifdef _WIN32 +#if (defined(_MSC_VER) && _MSC_VER < 1900) || \ + (defined(_MINGW) && defined(_TWO_DIGIT_EXPONENT)) + _set_output_format(_TWO_DIGIT_EXPONENT); +#endif +#endif + sprintf(exbuffer, format, ivalue, fvalue, svalue); rlen = strlen(expected)+1; @@ -121,11 +128,7 @@ void testStdoutRedir (const char *report) MAIN(epicsStdioTest) { -#ifdef _WIN32 - testPlan(166); -#else testPlan(163); -#endif testEpicsSnprintf(); #ifdef __rtems__ /* ensure there is a writeable area */ diff --git a/src/libCom/test/epicsStringTest.c b/src/libCom/test/epicsStringTest.c index a5fffaf49..3e4aed7e7 100644 --- a/src/libCom/test/epicsStringTest.c +++ b/src/libCom/test/epicsStringTest.c @@ -6,8 +6,7 @@ * EPICS BASE is distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. \*************************************************************************/ -/* $Revision-Id$ - * +/* * Author Marty Kraimer */ @@ -88,7 +87,7 @@ MAIN(epicsStringTest) char *s; int status; - testPlan(402); + testPlan(406); testChars(); @@ -123,6 +122,11 @@ MAIN(epicsStringTest) testOk1(epicsStrHash(abcd, 0) == epicsMemHash(abcde, 4, 0)); testOk1(epicsStrHash(abcd, 0) != epicsMemHash("abcd\0", 5, 0)); + testOk1(epicsStrnLen("abcd", 5)==4); + testOk1(epicsStrnLen("abcd", 4)==4); + testOk1(epicsStrnLen("abcd", 3)==3); + testOk1(epicsStrnLen("abcd", 0)==0); + testGlob(); memset(result, 'x', sizeof(result)); diff --git a/src/libCom/test/epicsThreadOnceTest.c b/src/libCom/test/epicsThreadOnceTest.c index 0939a2aae..2ecdf3a68 100644 --- a/src/libCom/test/epicsThreadOnceTest.c +++ b/src/libCom/test/epicsThreadOnceTest.c @@ -4,7 +4,6 @@ * EPICS BASE is distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. \*************************************************************************/ -/* $Revision-Id$ */ #include #include diff --git a/src/libCom/test/epicsThreadPrivateTest.cpp b/src/libCom/test/epicsThreadPrivateTest.cpp index 582611ad8..7ce28f4fd 100644 --- a/src/libCom/test/epicsThreadPrivateTest.cpp +++ b/src/libCom/test/epicsThreadPrivateTest.cpp @@ -6,7 +6,6 @@ * EPICS BASE is distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. \*************************************************************************/ -/* $Revision-Id$ */ /* Author: Jeff Hill Date: March 28 2001 */ diff --git a/src/libCom/test/epicsTimeTest.cpp b/src/libCom/test/epicsTimeTest.cpp index 970258801..ec5da4c78 100644 --- a/src/libCom/test/epicsTimeTest.cpp +++ b/src/libCom/test/epicsTimeTest.cpp @@ -43,7 +43,7 @@ MAIN(epicsTimeTest) const int wasteTime = 100000; const int nTimes = 10; - testPlan(15 + nTimes * 18); + testPlan(15 + nTimes * 19); try { const epicsTimeStamp epochTS = {0, 0}; @@ -200,6 +200,11 @@ MAIN(epicsTimeTest) epicsTime beginANSI = ansiDate; testOk1(beginANSI + diff == now); + // test struct gmtm round-trip conversion + gm_tm_nano_sec ansiGmDate = begin; + epicsTime beginGMANSI = ansiGmDate; + testOk1(beginGMANSI + diff == now); + // test struct timespec round-trip conversion struct timespec ts = begin; epicsTime beginTS = ts; diff --git a/src/libCom/test/epicsTimeZoneTest.c b/src/libCom/test/epicsTimeZoneTest.c index dd12b1acf..685295fc4 100644 --- a/src/libCom/test/epicsTimeZoneTest.c +++ b/src/libCom/test/epicsTimeZoneTest.c @@ -17,15 +17,9 @@ #endif static -void setTZ(const char *base, const char *dst, int offset) +void setTZ(const char *tz) { - char tz[20]; - if(offset!=0 || dst) - sprintf(tz, "%s%d%s", base, offset/3600, dst); - else - sprintf(tz, "%s", base); - testDiag("TZ=\"%s\"", tz); - + testDiag("TZ = \"%s\"", tz); epicsEnvSet("TZ", tz); tzset(); } @@ -86,32 +80,52 @@ void test_gmtime(time_t T, int sec, int min, int hour, MAIN(epicsTimeZoneTest) { - testPlan(80); + testPlan(160); /* 1445259616 * Mon Oct 19 09:00:16 2015 EDT * Mon Oct 19 08:00:16 2015 CDT + * Mon Oct 19 03:00:16 2015 HST (no dst) * Mon Oct 19 13:00:16 2015 UTC */ testDiag("POSIX 1445259616"); - setTZ("EST", "EDT", 5*3600); - test_localtime(1445259616ul, 16, 0, 9, 19, 9, 2015, 1, 291, 1); - setTZ("CST", "CDT", 6*3600); - test_localtime(1445259616ul, 16, 0, 8, 19, 9, 2015, 1, 291, 1); - setTZ("UTC", NULL, 0); + setTZ("EST5EDT"); + test_localtime(1445259616ul, 16, 0, 9, 19, 9, 2015, 1, 291, 1); + test_gmtime (1445259616ul, 16, 0, 13, 19, 9, 2015, 1, 291, 0); + setTZ("CST6CDT"); + test_localtime(1445259616ul, 16, 0, 8, 19, 9, 2015, 1, 291, 1); + test_gmtime (1445259616ul, 16, 0, 13, 19, 9, 2015, 1, 291, 0); +#if defined(__rtems__) + setTZ("HST10HST10"); +#else + setTZ("HST10"); +#endif + test_localtime(1445259616ul, 16, 0, 3, 19, 9, 2015, 1, 291, 0); + test_gmtime (1445259616ul, 16, 0, 13, 19, 9, 2015, 1, 291, 0); + setTZ("UTC0"); test_localtime(1445259616ul, 16, 0, 13, 19, 9, 2015, 1, 291, 0); - test_gmtime(1445259616ul, 16, 0, 13, 19, 9, 2015, 1, 291, 0); + test_gmtime (1445259616ul, 16, 0, 13, 19, 9, 2015, 1, 291, 0); /* 1421244931 * Wed Jan 14 09:15:31 2015 EST * Wed Jan 14 08:15:31 2015 CST + * Wed Jan 14 04:15:31 2015 HST * Wed Jan 14 14:15:31 2015 UTC */ testDiag("POSIX 1421244931"); - setTZ("EST", "EDT", 5*3600); - test_localtime(1421244931ul, 31, 15, 9, 14, 0, 2015, 3, 13, 0); - setTZ("CST", "CDT", 6*3600); - test_localtime(1421244931ul, 31, 15, 8, 14, 0, 2015, 3, 13, 0); - setTZ("UTC", NULL, 0); + setTZ("EST5EDT"); + test_localtime(1421244931ul, 31, 15, 9, 14, 0, 2015, 3, 13, 0); + test_gmtime (1421244931ul, 31, 15, 14, 14, 0, 2015, 3, 13, 0); + setTZ("CST6CDT"); + test_localtime(1421244931ul, 31, 15, 8, 14, 0, 2015, 3, 13, 0); + test_gmtime (1421244931ul, 31, 15, 14, 14, 0, 2015, 3, 13, 0); +#if defined(__rtems__) + setTZ("HST10HST10"); +#else + setTZ("HST10"); +#endif + test_localtime(1421244931ul, 31, 15, 4, 14, 0, 2015, 3, 13, 0); + test_gmtime (1421244931ul, 31, 15, 14, 14, 0, 2015, 3, 13, 0); + setTZ("UTC0"); test_localtime(1421244931ul, 31, 15, 14, 14, 0, 2015, 3, 13, 0); - test_gmtime(1421244931ul, 31, 15, 14, 14, 0, 2015, 3, 13, 0); + test_gmtime (1421244931ul, 31, 15, 14, 14, 0, 2015, 3, 13, 0); return testDone(); } diff --git a/src/libCom/test/epicsTimerTest.cpp b/src/libCom/test/epicsTimerTest.cpp index 96f1a78cd..f2a510819 100644 --- a/src/libCom/test/epicsTimerTest.cpp +++ b/src/libCom/test/epicsTimerTest.cpp @@ -7,8 +7,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ /* - * $Revision-Id$ - * * Author Jeffrey O. Hill * johill@lanl.gov * 505 665 1831 diff --git a/src/libCom/test/epicsUnitTestTest.c b/src/libCom/test/epicsUnitTestTest.c index 688049c05..b16bad52a 100644 --- a/src/libCom/test/epicsUnitTestTest.c +++ b/src/libCom/test/epicsUnitTestTest.c @@ -5,7 +5,7 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ -/* $Revision-Id$ +/* * Author: Andrew Johnson * * Test for the unit test module... diff --git a/src/libCom/test/ipAddrToAsciiTest.cpp b/src/libCom/test/ipAddrToAsciiTest.cpp new file mode 100644 index 000000000..f9323374d --- /dev/null +++ b/src/libCom/test/ipAddrToAsciiTest.cpp @@ -0,0 +1,165 @@ +/*************************************************************************\ +* Copyright (c) 2017 Michael Davidsaver +* EPICS BASE is distributed subject to a Software License Agreement found +* in file LICENSE that is included with this distribution. +\*************************************************************************/ + +#include +#include + +#define EPICS_PRIVATE_API + +#include "epicsMutex.h" +#include "epicsGuard.h" +#include "epicsThread.h" +#include "epicsEvent.h" +#include "ipAddrToAsciiAsynchronous.h" + +#include "epicsUnitTest.h" +#include "testMain.h" + +namespace { + +typedef epicsGuard Guard; +typedef epicsGuardRelease UnGuard; + +struct CB : public ipAddrToAsciiCallBack +{ + const char *name; + epicsMutex mutex; + epicsEvent starter, blocker, complete; + bool started, cont, done; + CB(const char *name) : name(name), started(false), cont(false), done(false) {} + virtual ~CB() {} + virtual void transactionComplete ( const char * pHostName ) + { + Guard G(mutex); + started = true; + starter.signal(); + testDiag("In transactionComplete(%s) for %s", pHostName, name); + while(!cont) { + UnGuard U(G); + if(!blocker.wait(2.0)) + break; + } + done = true; + complete.signal(); + } + void waitStart() + { + Guard G(mutex); + while(!started) { + UnGuard U(G); + if(!starter.wait(2.0)) + break; + } + } + void poke() + { + testDiag("Poke"); + Guard G(mutex); + cont = true; + blocker.signal(); + } + void finish() + { + testDiag("Finish"); + Guard G(mutex); + while(!done) { + UnGuard U(G); + if(!complete.wait(2.0)) + break; + } + testDiag("Finished"); + } +}; + +// ensure that lookup of 127.0.0.1 works +void doLookup(ipAddrToAsciiEngine& engine) +{ + testDiag("In doLookup"); + + ipAddrToAsciiTransaction& trn(engine.createTransaction()); + CB cb("cb"); + osiSockAddr addr; + addr.ia.sin_family = AF_INET; + addr.ia.sin_addr.s_addr = htonl(INADDR_LOOPBACK); + addr.ia.sin_port = htons(42); + + testDiag("Start lookup"); + trn.ipAddrToAscii(addr, cb); + cb.poke(); + cb.finish(); + testOk1(cb.cont); + testOk1(cb.done); + + trn.release(); +} + +// Test cancel of pending transaction +void doCancel() +{ + testDiag("In doCancel"); + + ipAddrToAsciiEngine& engine1(ipAddrToAsciiEngine::allocate()); + ipAddrToAsciiEngine& engine2(ipAddrToAsciiEngine::allocate()); + + ipAddrToAsciiTransaction& trn1(engine1.createTransaction()), + & trn2(engine2.createTransaction()); + testOk1(&trn1!=&trn2); + CB cb1("cb1"), cb2("cb2"); + + osiSockAddr addr; + addr.ia.sin_family = AF_INET; + addr.ia.sin_addr.s_addr = htonl(INADDR_LOOPBACK); + addr.ia.sin_port = htons(42); + + // ensure that the worker thread is blocked with a transaction from engine1 + testDiag("Start lookup1"); + trn1.ipAddrToAscii(addr, cb1); + testDiag("Wait start1"); + cb1.waitStart(); + + testDiag("Start lookup2"); + trn2.ipAddrToAscii(addr, cb2); + + testDiag("release engine2, implicitly cancels lookup2"); + engine2.release(); + + cb2.poke(); + testDiag("Wait for lookup2 timeout"); + cb2.finish(); + testOk1(!cb2.done); + + testDiag("Complete lookup1"); + cb1.poke(); + cb1.finish(); + testOk1(cb1.done); + + engine1.release(); + + trn1.release(); + trn2.release(); +} + +} // namespace + +MAIN(ipAddrToAsciiTest) +{ + testPlan(5); + { + ipAddrToAsciiEngine& engine(ipAddrToAsciiEngine::allocate()); + doLookup(engine); + engine.release(); + } + doCancel(); + // TODO: somehow test cancel of in-progress callback + // allow time for any un-canceled transcations to crash us... + epicsThreadSleep(1.0); + +#ifdef __linux__ + ipAddrToAsciiEngine::cleanup(); +#endif + + return testDone(); +} diff --git a/src/libCom/test/macDefExpandTest.c b/src/libCom/test/macDefExpandTest.c index 8e651efbe..a5e45a420 100644 --- a/src/libCom/test/macDefExpandTest.c +++ b/src/libCom/test/macDefExpandTest.c @@ -6,9 +6,6 @@ * EPICS BASE is distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. \*************************************************************************/ -/* - * $Revision-Id$ - */ #include #include diff --git a/src/libCom/test/macLibTest.c b/src/libCom/test/macLibTest.c index 1b79ad012..7f1e2c544 100644 --- a/src/libCom/test/macLibTest.c +++ b/src/libCom/test/macLibTest.c @@ -6,9 +6,6 @@ * EPICS BASE is distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. \*************************************************************************/ -/* - * $Revision-Id$ - */ #include #include @@ -68,7 +65,7 @@ static void ovcheck(void) MAIN(macLibTest) { - testPlan(89); + testPlan(91); if (macCreateHandle(&h, NULL)) testAbort("macCreateHandle() failed"); @@ -206,6 +203,9 @@ MAIN(macLibTest) /* STR2 = "VAL2" */ check("${FOO}", " VAL2"); + check("$(FOO)$(FOO1)", "!VAL2$(FOO1,undefined)"); + check("$(FOO1)$(FOO)", "!$(FOO1,undefined)VAL2"); + macPutValue(h, "BAR","${FOO}"); /* FOO = "${BAR}" */ /* BAR = "${FOO}" */ diff --git a/src/libCom/test/ringBytesTest.c b/src/libCom/test/ringBytesTest.c index ecfd991be..6cef93334 100644 --- a/src/libCom/test/ringBytesTest.c +++ b/src/libCom/test/ringBytesTest.c @@ -115,5 +115,9 @@ MAIN(ringBytesTest) testOk(n==1, "ring get %d", 1); check(ring, RINGSIZE); + epicsRingBytesDelete(ring); + epicsEventDestroy(consumerEvent); + free(pinfo); + return testDone(); } diff --git a/src/libCom/test/taskwdTest.c b/src/libCom/test/taskwdTest.c index 3fb2319fe..6cec429d2 100644 --- a/src/libCom/test/taskwdTest.c +++ b/src/libCom/test/taskwdTest.c @@ -4,7 +4,6 @@ * EPICS BASE is distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. \*************************************************************************/ -/* $Revision-Id$ */ /* Author: Andrew Johnson * Date: May 21, 2008 diff --git a/src/libCom/timer/epicsTimer.cpp b/src/libCom/timer/epicsTimer.cpp index 35fdaf9db..e55280e7e 100644 --- a/src/libCom/timer/epicsTimer.cpp +++ b/src/libCom/timer/epicsTimer.cpp @@ -7,8 +7,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ /* - * $Revision-Id$ - * * Author Jeffrey O. Hill * johill@lanl.gov * 505 665 1831 diff --git a/src/libCom/timer/timer.cpp b/src/libCom/timer/timer.cpp index 3f4b2aff6..35d6e47bf 100644 --- a/src/libCom/timer/timer.cpp +++ b/src/libCom/timer/timer.cpp @@ -9,11 +9,9 @@ \*************************************************************************/ /* - * * Author Jeffrey O. Hill * johill@lanl.gov * 505 665 1831 - * */ #include diff --git a/src/libCom/timer/timerPrivate.h b/src/libCom/timer/timerPrivate.h index 186b799e6..c60939851 100644 --- a/src/libCom/timer/timerPrivate.h +++ b/src/libCom/timer/timerPrivate.h @@ -7,8 +7,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ /* - * $Revision-Id$ - * * Author Jeffrey O. Hill * johill@lanl.gov * 505 665 1831 diff --git a/src/libCom/timer/timerQueue.cpp b/src/libCom/timer/timerQueue.cpp index cbccd8ffa..5a798d4d4 100644 --- a/src/libCom/timer/timerQueue.cpp +++ b/src/libCom/timer/timerQueue.cpp @@ -7,7 +7,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ /* - * * Author Jeffrey O. Hill * johill@lanl.gov * 505 665 1831 diff --git a/src/libCom/timer/timerQueueActive.cpp b/src/libCom/timer/timerQueueActive.cpp index 6225b11a0..5d8b72951 100644 --- a/src/libCom/timer/timerQueueActive.cpp +++ b/src/libCom/timer/timerQueueActive.cpp @@ -7,8 +7,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ /* - * $Revision-Id$ - * * Author Jeffrey O. Hill * johill@lanl.gov * 505 665 1831 diff --git a/src/libCom/timer/timerQueueActiveMgr.cpp b/src/libCom/timer/timerQueueActiveMgr.cpp index 803b96bba..d6349a84c 100644 --- a/src/libCom/timer/timerQueueActiveMgr.cpp +++ b/src/libCom/timer/timerQueueActiveMgr.cpp @@ -8,8 +8,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ /* - * $Revision-Id$ - * * Author Jeffrey O. Hill * johill@lanl.gov * 505 665 1831 diff --git a/src/libCom/timer/timerQueuePassive.cpp b/src/libCom/timer/timerQueuePassive.cpp index 192f2bbe5..a352c5672 100644 --- a/src/libCom/timer/timerQueuePassive.cpp +++ b/src/libCom/timer/timerQueuePassive.cpp @@ -8,7 +8,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ /* - * * Author Jeffrey O. Hill * johill@lanl.gov * 505 665 1831 diff --git a/src/std/dev/Makefile b/src/std/dev/Makefile index 6bdbbd997..8e4e242f9 100644 --- a/src/std/dev/Makefile +++ b/src/std/dev/Makefile @@ -66,6 +66,7 @@ dbRecStd_SRCS += devSoSoftCallback.c dbRecStd_SRCS += devTimestamp.c dbRecStd_SRCS += devStdio.c +dbRecStd_SRCS += devEnviron.c dbRecStd_SRCS += asSubRecordFunctions.c diff --git a/src/std/dev/asSubRecordFunctions.c b/src/std/dev/asSubRecordFunctions.c index 957db300a..76943e94b 100644 --- a/src/std/dev/asSubRecordFunctions.c +++ b/src/std/dev/asSubRecordFunctions.c @@ -38,10 +38,10 @@ static void myCallback(CALLBACK *pcallback) { ASDBCALLBACK *pasdbcallback = (ASDBCALLBACK *)pcallback; subRecord *precord; - struct rset *prset; + rset *prset; callbackGetUser(precord,pcallback); - prset=(struct rset *)(precord->rset); + prset=(rset *)(precord->rset); precord->val = 0.0; if(pasdbcallback->status) { recGblSetSevr(precord,READ_ALARM,precord->brsv); diff --git a/src/std/dev/devAaiSoft.c b/src/std/dev/devAaiSoft.c index a9d1c7615..e2e014efb 100644 --- a/src/std/dev/devAaiSoft.c +++ b/src/std/dev/devAaiSoft.c @@ -7,7 +7,7 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ -/* $Revision-Id$ +/* * devAaiSoft.c - Device Support Routines for soft Waveform Records * * Original Author: Bob Dalesio diff --git a/src/std/dev/devAaoSoft.c b/src/std/dev/devAaoSoft.c index dd96d10c0..3331ec1bf 100644 --- a/src/std/dev/devAaoSoft.c +++ b/src/std/dev/devAaoSoft.c @@ -7,7 +7,7 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ -/* $Revision-Id$ +/* * devAaoSoft.c - Device Support Routines for soft Waveform Records * * Original Author: Bob Dalesio diff --git a/src/std/dev/devAiSoft.c b/src/std/dev/devAiSoft.c index 85c78c242..69afff3ee 100644 --- a/src/std/dev/devAiSoft.c +++ b/src/std/dev/devAiSoft.c @@ -7,8 +7,7 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ -/* $Revision-Id$ - * +/* * Original Authors: Bob Dalesio and Marty Kraimer * Date: 3/6/91 */ diff --git a/src/std/dev/devAiSoftRaw.c b/src/std/dev/devAiSoftRaw.c index b06e245d2..e7b767e50 100644 --- a/src/std/dev/devAiSoftRaw.c +++ b/src/std/dev/devAiSoftRaw.c @@ -7,8 +7,7 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ -/* $Revision-Id$ - * +/* * Original Authors: Bob Dalesio and Marty Kraimer * Date: 6-1-90 */ diff --git a/src/std/dev/devAoSoft.c b/src/std/dev/devAoSoft.c index ce63a57b3..56bd05620 100644 --- a/src/std/dev/devAoSoft.c +++ b/src/std/dev/devAoSoft.c @@ -8,7 +8,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ /* devAoSoft.c */ -/* base/src/dev $Revision-Id$ */ /* Device Support Routines for soft Analog Output Records*/ /* diff --git a/src/std/dev/devAoSoftRaw.c b/src/std/dev/devAoSoftRaw.c index 400e8f9a3..05aed035e 100644 --- a/src/std/dev/devAoSoftRaw.c +++ b/src/std/dev/devAoSoftRaw.c @@ -8,7 +8,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ /* devAoSoftRaw.c */ -/* base/src/dev $Revision-Id$ */ /* Device Support Routines for soft raw Analog Output Records*/ /* diff --git a/src/std/dev/devBiSoft.c b/src/std/dev/devBiSoft.c index b1b3c17a3..f0f305b8c 100644 --- a/src/std/dev/devBiSoft.c +++ b/src/std/dev/devBiSoft.c @@ -7,8 +7,7 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ -/* $Revision-Id$ - * +/* * Original Authors: Bob Dalesio and Marty Kraimer * Date: 6-1-90 */ diff --git a/src/std/dev/devBiSoftRaw.c b/src/std/dev/devBiSoftRaw.c index afddd4712..3cb6b6ffe 100644 --- a/src/std/dev/devBiSoftRaw.c +++ b/src/std/dev/devBiSoftRaw.c @@ -7,8 +7,7 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ -/* $Revision-Id$ - * +/* * Original Authors: Bob Dalesio and Marty Kraimer * Date: 6-1-90 */ diff --git a/src/std/dev/devBoSoft.c b/src/std/dev/devBoSoft.c index 65bb4f505..ba6ff14a7 100644 --- a/src/std/dev/devBoSoft.c +++ b/src/std/dev/devBoSoft.c @@ -7,8 +7,6 @@ * and higher are distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. \*************************************************************************/ -/* devBoSoft.c */ -/* base/src/dev $Revision-Id$ */ /* devBoSoft.c - Device Support Routines for Soft Binary Output*/ /* diff --git a/src/std/dev/devBoSoftRaw.c b/src/std/dev/devBoSoftRaw.c index ef812d51b..df1ba5b4e 100644 --- a/src/std/dev/devBoSoftRaw.c +++ b/src/std/dev/devBoSoftRaw.c @@ -7,8 +7,6 @@ * and higher are distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. \*************************************************************************/ -/* devBoSoftRaw.c */ -/* base/src/dev $Revision-Id$ */ /* devBoSoftRaw.c - Device Support Routines for SoftRaw Binary Output*/ /* diff --git a/src/std/dev/devEnviron.c b/src/std/dev/devEnviron.c new file mode 100644 index 000000000..9672d6ce5 --- /dev/null +++ b/src/std/dev/devEnviron.c @@ -0,0 +1,128 @@ +/*************************************************************************\ +* Copyright (c) 2016 UChicago Argonne LLC, as Operator of Argonne +* National Laboratory. +* EPICS BASE is distributed subject to a Software License Agreement found +* in file LICENSE that is included with this distribution. +\*************************************************************************/ + +/* devEnviron.c */ + +#include +#include + +#include "alarm.h" +#include "dbCommon.h" +#include "devSup.h" +#include "errlog.h" +#include "recGbl.h" +#include "recSup.h" + +#include "lsiRecord.h" +#include "stringinRecord.h" +#include "epicsExport.h" + +/* lsi device support */ + +static long add_lsi(dbCommon *pcommon) { + lsiRecord *prec = (lsiRecord *) pcommon; + + if (prec->inp.type != INST_IO) + return S_dev_badInpType; + + return 0; +} + +static long del_lsi(dbCommon *pcommon) { + return 0; +} + +static struct dsxt dsxtLsiEnviron = { + add_lsi, del_lsi +}; + +static long init_lsi(int pass) +{ + if (pass == 0) + devExtend(&dsxtLsiEnviron); + + return 0; +} + +static long read_lsi(lsiRecord *prec) +{ + const char *val = getenv(prec->inp.value.instio.string); + + if (val) { + strncpy(prec->val, val, prec->sizv); + prec->val[prec->sizv - 1] = 0; + prec->len = strlen(prec->val); + prec->udf = FALSE; + } + else { + prec->val[0] = 0; + prec->len = 1; + prec->udf = TRUE; + recGblSetSevr(prec, UDF_ALARM, prec->udfs); + } + + return 0; +} + +lsidset devLsiEnviron = { + 5, NULL, init_lsi, NULL, NULL, read_lsi +}; +epicsExportAddress(dset, devLsiEnviron); + + +/* stringin device support */ + +static long add_stringin(dbCommon *pcommon) { + stringinRecord *prec = (stringinRecord *) pcommon; + + if (prec->inp.type != INST_IO) + return S_dev_badInpType; + + return 0; +} + +static long del_stringin(dbCommon *pcommon) { + return 0; +} + +static struct dsxt dsxtSiEnviron = { + add_stringin, del_stringin +}; + +static long init_stringin(int pass) +{ + if (pass == 0) + devExtend(&dsxtSiEnviron); + + return 0; +} + +static long read_stringin(stringinRecord *prec) +{ + const char *val = getenv(prec->inp.value.instio.string); + + if (val) { + strncpy(prec->val, val, MAX_STRING_SIZE); + prec->val[MAX_STRING_SIZE - 1] = 0; + prec->udf = FALSE; + } + else { + prec->val[0] = 0; + prec->udf = TRUE; + recGblSetSevr(prec, UDF_ALARM, prec->udfs); + } + + return 0; +} + +static struct { + dset common; + DEVSUPFUN read; +} devSiEnviron = { + {5, NULL, init_stringin, NULL, NULL}, read_stringin +}; +epicsExportAddress(dset, devSiEnviron); diff --git a/src/std/dev/devEventSoft.c b/src/std/dev/devEventSoft.c index b5cc02f5c..ae5c9d01b 100644 --- a/src/std/dev/devEventSoft.c +++ b/src/std/dev/devEventSoft.c @@ -7,8 +7,7 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ -/* $Revision-Id$ - * +/* * Author: Janet Anderson * Date: 04-21-91 */ diff --git a/src/std/dev/devGeneralTime.c b/src/std/dev/devGeneralTime.c index 0cce00d4b..1b821d582 100644 --- a/src/std/dev/devGeneralTime.c +++ b/src/std/dev/devGeneralTime.c @@ -3,7 +3,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ -/* $Revision-Id$ */ /* * Original Author: Sheng Peng, ORNL / SNS Project * Date: 07/2004 diff --git a/src/std/dev/devHistogramSoft.c b/src/std/dev/devHistogramSoft.c index 60e6e3ddd..3b46b5d99 100644 --- a/src/std/dev/devHistogramSoft.c +++ b/src/std/dev/devHistogramSoft.c @@ -8,7 +8,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ /* devHistogramSoft.c */ -/* base/src/dev $Revision-Id$ */ /* * Author: Janet Anderson * Date: 07/02/91 diff --git a/src/std/dev/devLiSoft.c b/src/std/dev/devLiSoft.c index b48baccf9..30f981b59 100644 --- a/src/std/dev/devLiSoft.c +++ b/src/std/dev/devLiSoft.c @@ -7,8 +7,7 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ -/* $Revision-Id$ - * +/* * Author: Janet Anderson * Date: 09-23-91 */ diff --git a/src/std/dev/devLoSoft.c b/src/std/dev/devLoSoft.c index fe2de4203..af49c60ff 100644 --- a/src/std/dev/devLoSoft.c +++ b/src/std/dev/devLoSoft.c @@ -8,7 +8,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ /* devLoSoft.c */ -/* base/src/dev $Revision-Id$ */ /* * Author: Janet Anderson * Date: 09-23-91 diff --git a/src/std/dev/devLsoSoftCallback.c b/src/std/dev/devLsoSoftCallback.c index 616b27692..59579d558 100644 --- a/src/std/dev/devLsoSoftCallback.c +++ b/src/std/dev/devLsoSoftCallback.c @@ -4,7 +4,6 @@ * EPICS BASE is distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. \*************************************************************************/ -/* $Revision-Id$ */ /* * Author: Andrew Johnson * Date: 30 Nov 2012 diff --git a/src/std/dev/devMbbiDirectSoft.c b/src/std/dev/devMbbiDirectSoft.c index 8160bdfad..c63d0de1a 100644 --- a/src/std/dev/devMbbiDirectSoft.c +++ b/src/std/dev/devMbbiDirectSoft.c @@ -7,8 +7,7 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ -/* $Revision-Id$ - * +/* * Original Authors: Bob Dalesio and Matthew Needes * Date: 10-08-93 */ diff --git a/src/std/dev/devMbbiDirectSoftRaw.c b/src/std/dev/devMbbiDirectSoftRaw.c index 2509ed392..f6172cdec 100644 --- a/src/std/dev/devMbbiDirectSoftRaw.c +++ b/src/std/dev/devMbbiDirectSoftRaw.c @@ -7,8 +7,7 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ -/* $Revision-Id$ - * +/* * Original Authors: Bob Dalesio and Matthew Needes * Date: 10-08-93 */ diff --git a/src/std/dev/devMbbiSoft.c b/src/std/dev/devMbbiSoft.c index b7411aea4..670e2f615 100644 --- a/src/std/dev/devMbbiSoft.c +++ b/src/std/dev/devMbbiSoft.c @@ -7,8 +7,7 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ -/* $Revision-Id$ - * +/* * Original Authors: Bob Dalesio and Marty Kraimer * Date: 6-1-90 */ diff --git a/src/std/dev/devMbbiSoftRaw.c b/src/std/dev/devMbbiSoftRaw.c index ddaecfc29..fde76513a 100644 --- a/src/std/dev/devMbbiSoftRaw.c +++ b/src/std/dev/devMbbiSoftRaw.c @@ -7,8 +7,7 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ -/* $Revision-Id$ - * +/* * Original Authors: Bob Dalesio and Marty Kraimer * Date: 6-1-90 */ diff --git a/src/std/dev/devMbboSoft.c b/src/std/dev/devMbboSoft.c index 43ad5a05d..b2fe6b094 100644 --- a/src/std/dev/devMbboSoft.c +++ b/src/std/dev/devMbboSoft.c @@ -8,7 +8,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ /* devMbboSoft.c */ -/* base/src/dev $Revision-Id$ */ /* * Original Author: Bob Dalesio * Current Author: Marty Kraimer diff --git a/src/std/dev/devPrintfSoft.c b/src/std/dev/devPrintfSoft.c index a61d4bbfb..ca06f04be 100644 --- a/src/std/dev/devPrintfSoft.c +++ b/src/std/dev/devPrintfSoft.c @@ -4,7 +4,6 @@ * EPICS BASE is distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. \*************************************************************************/ -/* $Revision-Id$ */ /* * Author: Andrew Johnson * Date: 28 Sept 2012 diff --git a/src/std/dev/devPrintfSoftCallback.c b/src/std/dev/devPrintfSoftCallback.c index 51fde605d..e89afd53b 100644 --- a/src/std/dev/devPrintfSoftCallback.c +++ b/src/std/dev/devPrintfSoftCallback.c @@ -4,7 +4,6 @@ * EPICS BASE is distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. \*************************************************************************/ -/* $Revision-Id$ */ /* * Author: Andrew Johnson * Date: 28 Sept 2012 diff --git a/src/std/dev/devSASoft.c b/src/std/dev/devSASoft.c index b197f7eff..56ffdd796 100644 --- a/src/std/dev/devSASoft.c +++ b/src/std/dev/devSASoft.c @@ -7,8 +7,7 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ -/* $Revision-Id$ - * +/* * Author: Carl Lionberger * Date: 9-2-93 */ diff --git a/src/std/dev/devSiSoft.c b/src/std/dev/devSiSoft.c index b1f3255f4..9b1fcfe4b 100644 --- a/src/std/dev/devSiSoft.c +++ b/src/std/dev/devSiSoft.c @@ -7,8 +7,7 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ -/* $Revision-Id$ - * +/* * Author: Janet Anderson * Date: 04-21-91 */ diff --git a/src/std/dev/devSoSoft.c b/src/std/dev/devSoSoft.c index ca7a87051..6dda4a765 100644 --- a/src/std/dev/devSoSoft.c +++ b/src/std/dev/devSoSoft.c @@ -7,7 +7,6 @@ * and higher are distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. \*************************************************************************/ -/* $Revision-Id$ */ /* * Author: Janet Anderson * Date: 21APR1991 diff --git a/src/std/dev/devSoft.dbd b/src/std/dev/devSoft.dbd index d6cb14de9..1314bf540 100644 --- a/src/std/dev/devSoft.dbd +++ b/src/std/dev/devSoft.dbd @@ -1,3 +1,5 @@ +# devSoft.dbd + device(aai,CONSTANT,devAaiSoft,"Soft Channel") device(aao,CONSTANT,devAaoSoft,"Soft Channel") device(ai,CONSTANT,devAiSoft,"Soft Channel") @@ -58,5 +60,8 @@ device(lso,INST_IO,devLsoStdio,"stdio") device(printf,INST_IO,devPrintfStdio,"stdio") device(stringout,INST_IO,devSoStdio,"stdio") +device(lsi,INST_IO,devLsiEnviron,"getenv") +device(stringin,INST_IO,devSiEnviron,"getenv") + device(bi, INST_IO, devBiDbState, "Db State") device(bo, INST_IO, devBoDbState, "Db State") diff --git a/src/std/dev/devStdio.c b/src/std/dev/devStdio.c index 4801657b9..e957bfce0 100644 --- a/src/std/dev/devStdio.c +++ b/src/std/dev/devStdio.c @@ -5,8 +5,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ -/* $Revision-Id$ */ - #include #include diff --git a/src/std/dev/devTimestamp.c b/src/std/dev/devTimestamp.c index a43a2d352..936d7767d 100644 --- a/src/std/dev/devTimestamp.c +++ b/src/std/dev/devTimestamp.c @@ -5,7 +5,6 @@ * in the file LICENSE that is included with this distribution. \*************************************************************************/ -/* $Revision-Id$ */ /* * Device support for EPICS time stamps * diff --git a/src/std/dev/devWfSoft.c b/src/std/dev/devWfSoft.c index 124f615c9..d1daefd7b 100644 --- a/src/std/dev/devWfSoft.c +++ b/src/std/dev/devWfSoft.c @@ -7,8 +7,7 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ -/* $Revision-Id$ - * +/* * Original Authors: Bob Dalesio and Marty Kraimer * Date: 6-1-90 */ diff --git a/src/std/filters/arr.c b/src/std/filters/arr.c index 9e183ac15..7a4960bcf 100644 --- a/src/std/filters/arr.c +++ b/src/std/filters/arr.c @@ -94,7 +94,7 @@ static db_field_log* filter(void* pvt, dbChannel *chan, db_field_log *pfl) { myStruct *my = (myStruct*) pvt; struct dbCommon *prec; - struct rset *prset; + rset *prset; long start = my->start; long end = my->end; long nTarget = 0; diff --git a/src/std/filters/test/arrRecord.c b/src/std/filters/test/arrRecord.c index 7dea7caaf..8f1881f02 100644 --- a/src/std/filters/test/arrRecord.c +++ b/src/std/filters/test/arrRecord.c @@ -37,8 +37,8 @@ /* Create RSET - Record Support Entry Table*/ #define report NULL #define initialize NULL -static long init_record(arrRecord *, int); -static long process(arrRecord *); +static long init_record(struct dbCommon *, int); +static long process(struct dbCommon *); #define special NULL #define get_value NULL static long cvt_dbaddr(DBADDR *); @@ -75,8 +75,10 @@ rset arrRSET = { }; epicsExportAddress(rset, arrRSET); -static long init_record(arrRecord *prec, int pass) +static long init_record(struct dbCommon *pcommon, int pass) { + struct arrRecord *prec = (struct arrRecord *)pcommon; + if (pass == 0) { if (prec->nelm <= 0) prec->nelm = 1; @@ -95,8 +97,10 @@ static long init_record(arrRecord *prec, int pass) return 0; } -static long process(arrRecord *prec) +static long process(struct dbCommon *pcommon) { + struct arrRecord *prec = (struct arrRecord *)pcommon; + if(prec->clbk) (*prec->clbk)(prec); prec->pact = TRUE; diff --git a/src/std/filters/test/syncTest.c b/src/std/filters/test/syncTest.c index ce9b23d01..eea24508b 100644 --- a/src/std/filters/test/syncTest.c +++ b/src/std/filters/test/syncTest.c @@ -140,7 +140,7 @@ MAIN(syncTest) int i; dbEventCtx evtctx; - testPlan(0); + testPlan(139); dbChannelInit(); evtctx = db_init_events(); diff --git a/src/std/rec/aSubRecord.c b/src/std/rec/aSubRecord.c index 02461c135..b513df17a 100644 --- a/src/std/rec/aSubRecord.c +++ b/src/std/rec/aSubRecord.c @@ -4,8 +4,7 @@ * EPICS BASE is distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. \*************************************************************************/ -/* $Revision-Id$ - * +/* * Record Support Routines for the Array Subroutine Record type, * derived from Andy Foster's genSub record, with some features * removed and asynchronous support added. @@ -45,15 +44,15 @@ typedef long (*GENFUNCPTR)(struct aSubRecord *); #define report NULL #define initialize NULL -static long init_record(aSubRecord *, int); -static long process(aSubRecord *); +static long init_record(struct dbCommon *, int); +static long process(struct dbCommon *); static long special(DBADDR *, int); #define get_value NULL static long cvt_dbaddr(DBADDR *); static long get_array_info(DBADDR *, long *, long *); static long put_array_info(DBADDR *, long ); static long get_units(DBADDR *, char *); -static long get_precision(DBADDR *, long *); +static long get_precision(const DBADDR *, long *); #define get_enum_str NULL #define get_enum_strs NULL #define put_enum_str NULL @@ -105,8 +104,9 @@ static const char *Ofldnames[] = { }; -static long init_record(aSubRecord *prec, int pass) +static long init_record(struct dbCommon *pcommon, int pass) { + struct aSubRecord *prec = (struct aSubRecord *)pcommon; STATIC_ASSERT(sizeof(prec->onam)==sizeof(prec->snam)); GENFUNCPTR pfunc; int i; @@ -197,8 +197,9 @@ static long initFields(epicsEnum16 *pft, epicsUInt32 *pno, epicsUInt32 *pne, } -static long process(aSubRecord *prec) +static long process(struct dbCommon *pcommon) { + struct aSubRecord *prec = (struct aSubRecord *)pcommon; int pact = prec->pact; long status = 0; @@ -307,7 +308,7 @@ static long get_units(DBADDR *paddr, char *units) return 0; } -static long get_precision(DBADDR *paddr, long *pprecision) +static long get_precision(const DBADDR *paddr, long *pprecision) { aSubRecord *prec = (aSubRecord *)paddr->precord; int fieldIndex = dbGetFieldIndex(paddr); diff --git a/src/std/rec/aSubRecord.dbd.pod b/src/std/rec/aSubRecord.dbd.pod index d188745f1..73f734629 100644 --- a/src/std/rec/aSubRecord.dbd.pod +++ b/src/std/rec/aSubRecord.dbd.pod @@ -61,33 +61,33 @@ recordtype(aSub) { } field(INAM,DBF_STRING) { prompt("Initialize Subr. Name") - promptgroup(GUI_SUB) + promptgroup("30 - Action") special(SPC_NOMOD) interest(1) size(41) } field(LFLG,DBF_MENU) { prompt("Subr. Input Enable") - promptgroup(GUI_SUB) + promptgroup("30 - Action") interest(1) menu(aSubLFLG) } field(SUBL,DBF_INLINK) { prompt("Subroutine Name Link") - promptgroup(GUI_SUB) + promptgroup("30 - Action") special(SPC_NOMOD) interest(1) } field(SNAM,DBF_STRING) { prompt("Process Subr. Name") - promptgroup(GUI_SUB) + promptgroup("30 - Action") special(SPC_MOD) interest(1) size(41) } field(ONAM,DBF_STRING) { prompt("Old Subr. Name") - promptgroup(GUI_SUB) + promptgroup("30 - Action") special(SPC_NOMOD) interest(3) size(41) @@ -107,127 +107,127 @@ recordtype(aSub) { } field(BRSV,DBF_MENU) { prompt("Bad Return Severity") - promptgroup(GUI_SUB) + promptgroup("70 - Alarm") pp(TRUE) interest(1) menu(menuAlarmSevr) } field(PREC,DBF_SHORT) { prompt("Display Precision") - promptgroup(GUI_DISPLAY) + promptgroup("80 - Display") interest(1) prop(YES) } field(EFLG,DBF_MENU) { prompt("Output Event Flag") - promptgroup(GUI_OUTPUT) + promptgroup("50 - Output") interest(1) menu(aSubEFLG) initial("1") } field(INPA,DBF_INLINK) { prompt("Input Link A") - promptgroup(GUI_INPUTS) + promptgroup("41 - Input A-G") interest(1) } field(INPB,DBF_INLINK) { prompt("Input Link B") - promptgroup(GUI_INPUTS) + promptgroup("41 - Input A-G") interest(1) } field(INPC,DBF_INLINK) { prompt("Input Link C") - promptgroup(GUI_INPUTS) + promptgroup("41 - Input A-G") interest(1) } field(INPD,DBF_INLINK) { prompt("Input Link D") - promptgroup(GUI_INPUTS) + promptgroup("41 - Input A-G") interest(1) } field(INPE,DBF_INLINK) { prompt("Input Link E") - promptgroup(GUI_INPUTS) + promptgroup("41 - Input A-G") interest(1) } field(INPF,DBF_INLINK) { prompt("Input Link F") - promptgroup(GUI_INPUTS) + promptgroup("41 - Input A-G") interest(1) } field(INPG,DBF_INLINK) { prompt("Input Link G") - promptgroup(GUI_INPUTS) + promptgroup("41 - Input A-G") interest(1) } field(INPH,DBF_INLINK) { prompt("Input Link H") - promptgroup(GUI_INPUTS) + promptgroup("42 - Input H-N") interest(1) } field(INPI,DBF_INLINK) { prompt("Input Link I") - promptgroup(GUI_INPUTS) + promptgroup("42 - Input H-N") interest(1) } field(INPJ,DBF_INLINK) { prompt("Input Link J") - promptgroup(GUI_INPUTS) + promptgroup("42 - Input H-N") interest(1) } field(INPK,DBF_INLINK) { prompt("Input Link K") - promptgroup(GUI_INPUTS) + promptgroup("42 - Input H-N") interest(1) } field(INPL,DBF_INLINK) { prompt("Input Link L") - promptgroup(GUI_INPUTS) + promptgroup("42 - Input H-N") interest(1) } field(INPM,DBF_INLINK) { prompt("Input Link M") - promptgroup(GUI_INPUTS) + promptgroup("42 - Input H-N") interest(1) } field(INPN,DBF_INLINK) { prompt("Input Link N") - promptgroup(GUI_INPUTS) + promptgroup("42 - Input H-N") interest(1) } field(INPO,DBF_INLINK) { prompt("Input Link O") - promptgroup(GUI_INPUTS) + promptgroup("43 - Input O-U") interest(1) } field(INPP,DBF_INLINK) { prompt("Input Link P") - promptgroup(GUI_INPUTS) + promptgroup("43 - Input O-U") interest(1) } field(INPQ,DBF_INLINK) { prompt("Input Link Q") - promptgroup(GUI_INPUTS) + promptgroup("43 - Input O-U") interest(1) } field(INPR,DBF_INLINK) { prompt("Input Link R") - promptgroup(GUI_INPUTS) + promptgroup("43 - Input O-U") interest(1) } field(INPS,DBF_INLINK) { prompt("Input Link S") - promptgroup(GUI_INPUTS) + promptgroup("43 - Input O-U") interest(1) } field(INPT,DBF_INLINK) { prompt("Input Link T") - promptgroup(GUI_INPUTS) + promptgroup("43 - Input O-U") interest(1) } field(INPU,DBF_INLINK) { prompt("Input Link U") - promptgroup(GUI_INPUTS) + promptgroup("43 - Input O-U") interest(1) } @@ -451,7 +451,7 @@ recordtype(aSub) { } field(FTA,DBF_MENU) { prompt("Type of A") - promptgroup(GUI_WAVE) + promptgroup("41 - Input A-G") special(SPC_NOMOD) interest(1) initial("DOUBLE") @@ -459,7 +459,7 @@ recordtype(aSub) { } field(FTB,DBF_MENU) { prompt("Type of B") - promptgroup(GUI_WAVE) + promptgroup("41 - Input A-G") special(SPC_NOMOD) interest(1) initial("DOUBLE") @@ -467,7 +467,7 @@ recordtype(aSub) { } field(FTC,DBF_MENU) { prompt("Type of C") - promptgroup(GUI_WAVE) + promptgroup("41 - Input A-G") special(SPC_NOMOD) interest(1) initial("DOUBLE") @@ -475,7 +475,7 @@ recordtype(aSub) { } field(FTD,DBF_MENU) { prompt("Type of D") - promptgroup(GUI_WAVE) + promptgroup("41 - Input A-G") special(SPC_NOMOD) interest(1) initial("DOUBLE") @@ -483,7 +483,7 @@ recordtype(aSub) { } field(FTE,DBF_MENU) { prompt("Type of E") - promptgroup(GUI_WAVE) + promptgroup("41 - Input A-G") special(SPC_NOMOD) interest(1) initial("DOUBLE") @@ -491,7 +491,7 @@ recordtype(aSub) { } field(FTF,DBF_MENU) { prompt("Type of F") - promptgroup(GUI_WAVE) + promptgroup("41 - Input A-G") special(SPC_NOMOD) interest(1) initial("DOUBLE") @@ -499,7 +499,7 @@ recordtype(aSub) { } field(FTG,DBF_MENU) { prompt("Type of G") - promptgroup(GUI_WAVE) + promptgroup("41 - Input A-G") special(SPC_NOMOD) interest(1) initial("DOUBLE") @@ -507,7 +507,7 @@ recordtype(aSub) { } field(FTH,DBF_MENU) { prompt("Type of H") - promptgroup(GUI_WAVE) + promptgroup("42 - Input H-N") special(SPC_NOMOD) interest(1) initial("DOUBLE") @@ -515,7 +515,7 @@ recordtype(aSub) { } field(FTI,DBF_MENU) { prompt("Type of I") - promptgroup(GUI_WAVE) + promptgroup("42 - Input H-N") special(SPC_NOMOD) interest(1) initial("DOUBLE") @@ -523,7 +523,7 @@ recordtype(aSub) { } field(FTJ,DBF_MENU) { prompt("Type of J") - promptgroup(GUI_WAVE) + promptgroup("42 - Input H-N") special(SPC_NOMOD) interest(1) initial("DOUBLE") @@ -531,7 +531,7 @@ recordtype(aSub) { } field(FTK,DBF_MENU) { prompt("Type of K") - promptgroup(GUI_WAVE) + promptgroup("42 - Input H-N") special(SPC_NOMOD) interest(1) initial("DOUBLE") @@ -539,7 +539,7 @@ recordtype(aSub) { } field(FTL,DBF_MENU) { prompt("Type of L") - promptgroup(GUI_WAVE) + promptgroup("42 - Input H-N") special(SPC_NOMOD) interest(1) initial("DOUBLE") @@ -547,7 +547,7 @@ recordtype(aSub) { } field(FTM,DBF_MENU) { prompt("Type of M") - promptgroup(GUI_WAVE) + promptgroup("42 - Input H-N") special(SPC_NOMOD) interest(1) initial("DOUBLE") @@ -555,7 +555,7 @@ recordtype(aSub) { } field(FTN,DBF_MENU) { prompt("Type of N") - promptgroup(GUI_WAVE) + promptgroup("42 - Input H-N") special(SPC_NOMOD) interest(1) initial("DOUBLE") @@ -563,7 +563,7 @@ recordtype(aSub) { } field(FTO,DBF_MENU) { prompt("Type of O") - promptgroup(GUI_WAVE) + promptgroup("43 - Input O-U") special(SPC_NOMOD) interest(1) initial("DOUBLE") @@ -571,7 +571,7 @@ recordtype(aSub) { } field(FTP,DBF_MENU) { prompt("Type of P") - promptgroup(GUI_WAVE) + promptgroup("43 - Input O-U") special(SPC_NOMOD) interest(1) initial("DOUBLE") @@ -579,7 +579,7 @@ recordtype(aSub) { } field(FTQ,DBF_MENU) { prompt("Type of Q") - promptgroup(GUI_WAVE) + promptgroup("43 - Input O-U") special(SPC_NOMOD) interest(1) initial("DOUBLE") @@ -587,7 +587,7 @@ recordtype(aSub) { } field(FTR,DBF_MENU) { prompt("Type of R") - promptgroup(GUI_WAVE) + promptgroup("43 - Input O-U") special(SPC_NOMOD) interest(1) initial("DOUBLE") @@ -595,7 +595,7 @@ recordtype(aSub) { } field(FTS,DBF_MENU) { prompt("Type of S") - promptgroup(GUI_WAVE) + promptgroup("43 - Input O-U") special(SPC_NOMOD) interest(1) initial("DOUBLE") @@ -603,7 +603,7 @@ recordtype(aSub) { } field(FTT,DBF_MENU) { prompt("Type of T") - promptgroup(GUI_WAVE) + promptgroup("43 - Input O-U") special(SPC_NOMOD) interest(1) initial("DOUBLE") @@ -611,7 +611,7 @@ recordtype(aSub) { } field(FTU,DBF_MENU) { prompt("Type of U") - promptgroup(GUI_WAVE) + promptgroup("43 - Input O-U") special(SPC_NOMOD) interest(1) initial("DOUBLE") @@ -619,401 +619,380 @@ recordtype(aSub) { } field(NOA,DBF_ULONG) { prompt("Max. elements in A") - promptgroup(GUI_WAVE) + promptgroup("41 - Input A-G") special(SPC_NOMOD) interest(1) initial("1") } field(NOB,DBF_ULONG) { prompt("Max. elements in B") - promptgroup(GUI_WAVE) + promptgroup("41 - Input A-G") special(SPC_NOMOD) interest(1) initial("1") } field(NOC,DBF_ULONG) { prompt("Max. elements in C") - promptgroup(GUI_WAVE) + promptgroup("41 - Input A-G") special(SPC_NOMOD) interest(1) initial("1") } field(NOD,DBF_ULONG) { prompt("Max. elements in D") - promptgroup(GUI_WAVE) + promptgroup("41 - Input A-G") special(SPC_NOMOD) interest(1) initial("1") } field(NOE,DBF_ULONG) { prompt("Max. elements in E") - promptgroup(GUI_WAVE) + promptgroup("41 - Input A-G") special(SPC_NOMOD) interest(1) initial("1") } field(NOF,DBF_ULONG) { prompt("Max. elements in F") - promptgroup(GUI_WAVE) + promptgroup("41 - Input A-G") special(SPC_NOMOD) interest(1) initial("1") } field(NOG,DBF_ULONG) { prompt("Max. elements in G") - promptgroup(GUI_WAVE) + promptgroup("41 - Input A-G") special(SPC_NOMOD) interest(1) initial("1") } field(NOH,DBF_ULONG) { prompt("Max. elements in H") - promptgroup(GUI_WAVE) + promptgroup("42 - Input H-N") special(SPC_NOMOD) interest(1) initial("1") } field(NOI,DBF_ULONG) { prompt("Max. elements in I") - promptgroup(GUI_WAVE) + promptgroup("42 - Input H-N") special(SPC_NOMOD) interest(1) initial("1") } field(NOJ,DBF_ULONG) { prompt("Max. elements in J") - promptgroup(GUI_WAVE) + promptgroup("42 - Input H-N") special(SPC_NOMOD) interest(1) initial("1") } field(NOK,DBF_ULONG) { prompt("Max. elements in K") - promptgroup(GUI_WAVE) + promptgroup("42 - Input H-N") special(SPC_NOMOD) interest(1) initial("1") } field(NOL,DBF_ULONG) { prompt("Max. elements in L") - promptgroup(GUI_WAVE) + promptgroup("42 - Input H-N") special(SPC_NOMOD) interest(1) initial("1") } field(NOM,DBF_ULONG) { prompt("Max. elements in M") - promptgroup(GUI_WAVE) + promptgroup("42 - Input H-N") special(SPC_NOMOD) interest(1) initial("1") } field(NON,DBF_ULONG) { prompt("Max. elements in N") - promptgroup(GUI_WAVE) + promptgroup("42 - Input H-N") special(SPC_NOMOD) interest(1) initial("1") } field(NOO,DBF_ULONG) { prompt("Max. elements in O") - promptgroup(GUI_WAVE) + promptgroup("43 - Input O-U") special(SPC_NOMOD) interest(1) initial("1") } field(NOP,DBF_ULONG) { prompt("Max. elements in P") - promptgroup(GUI_WAVE) + promptgroup("43 - Input O-U") special(SPC_NOMOD) interest(1) initial("1") } field(NOQ,DBF_ULONG) { prompt("Max. elements in Q") - promptgroup(GUI_WAVE) + promptgroup("43 - Input O-U") special(SPC_NOMOD) interest(1) initial("1") } field(NOR,DBF_ULONG) { prompt("Max. elements in R") - promptgroup(GUI_WAVE) + promptgroup("43 - Input O-U") special(SPC_NOMOD) interest(1) initial("1") } field(NOS,DBF_ULONG) { prompt("Max. elements in S") - promptgroup(GUI_WAVE) + promptgroup("43 - Input O-U") special(SPC_NOMOD) interest(1) initial("1") } field(NOT,DBF_ULONG) { prompt("Max. elements in T") - promptgroup(GUI_WAVE) + promptgroup("43 - Input O-U") special(SPC_NOMOD) interest(1) initial("1") } field(NOU,DBF_ULONG) { prompt("Max. elements in U") - promptgroup(GUI_WAVE) + promptgroup("43 - Input O-U") special(SPC_NOMOD) interest(1) initial("1") } field(NEA,DBF_ULONG) { prompt("Num. elements in A") - promptgroup(GUI_WAVE) special(SPC_NOMOD) interest(3) initial("1") } field(NEB,DBF_ULONG) { prompt("Num. elements in B") - promptgroup(GUI_WAVE) special(SPC_NOMOD) interest(3) initial("1") } field(NEC,DBF_ULONG) { prompt("Num. elements in C") - promptgroup(GUI_WAVE) special(SPC_NOMOD) interest(3) initial("1") } field(NED,DBF_ULONG) { prompt("Num. elements in D") - promptgroup(GUI_WAVE) special(SPC_NOMOD) interest(3) initial("1") } field(NEE,DBF_ULONG) { prompt("Num. elements in E") - promptgroup(GUI_WAVE) special(SPC_NOMOD) interest(3) initial("1") } field(NEF,DBF_ULONG) { prompt("Num. elements in F") - promptgroup(GUI_WAVE) special(SPC_NOMOD) interest(3) initial("1") } field(NEG,DBF_ULONG) { prompt("Num. elements in G") - promptgroup(GUI_WAVE) special(SPC_NOMOD) interest(3) initial("1") } field(NEH,DBF_ULONG) { prompt("Num. elements in H") - promptgroup(GUI_WAVE) special(SPC_NOMOD) interest(3) initial("1") } field(NEI,DBF_ULONG) { prompt("Num. elements in I") - promptgroup(GUI_WAVE) special(SPC_NOMOD) interest(3) initial("1") } field(NEJ,DBF_ULONG) { prompt("Num. elements in J") - promptgroup(GUI_WAVE) special(SPC_NOMOD) interest(3) initial("1") } field(NEK,DBF_ULONG) { prompt("Num. elements in K") - promptgroup(GUI_WAVE) special(SPC_NOMOD) interest(3) initial("1") } field(NEL,DBF_ULONG) { prompt("Num. elements in L") - promptgroup(GUI_WAVE) special(SPC_NOMOD) interest(3) initial("1") } field(NEM,DBF_ULONG) { prompt("Num. elements in M") - promptgroup(GUI_WAVE) special(SPC_NOMOD) interest(3) initial("1") } field(NEN,DBF_ULONG) { prompt("Num. elements in N") - promptgroup(GUI_WAVE) special(SPC_NOMOD) interest(3) initial("1") } field(NEO,DBF_ULONG) { prompt("Num. elements in O") - promptgroup(GUI_WAVE) special(SPC_NOMOD) interest(3) initial("1") } field(NEP,DBF_ULONG) { prompt("Num. elements in P") - promptgroup(GUI_WAVE) special(SPC_NOMOD) interest(3) initial("1") } field(NEQ,DBF_ULONG) { prompt("Num. elements in Q") - promptgroup(GUI_WAVE) special(SPC_NOMOD) interest(3) initial("1") } field(NER,DBF_ULONG) { prompt("Num. elements in R") - promptgroup(GUI_WAVE) special(SPC_NOMOD) interest(3) initial("1") } field(NES,DBF_ULONG) { prompt("Num. elements in S") - promptgroup(GUI_WAVE) special(SPC_NOMOD) interest(3) initial("1") } field(NET,DBF_ULONG) { prompt("Num. elements in T") - promptgroup(GUI_WAVE) special(SPC_NOMOD) interest(3) initial("1") } field(NEU,DBF_ULONG) { prompt("Num. elements in U") - promptgroup(GUI_WAVE) special(SPC_NOMOD) interest(3) initial("1") } field(OUTA,DBF_OUTLINK) { prompt("Output Link A") - promptgroup(GUI_OUTPUT) + promptgroup("51 - Output A-G") interest(1) } field(OUTB,DBF_OUTLINK) { prompt("Output Link B") - promptgroup(GUI_OUTPUT) + promptgroup("51 - Output A-G") interest(1) } field(OUTC,DBF_OUTLINK) { prompt("Output Link C") - promptgroup(GUI_OUTPUT) + promptgroup("51 - Output A-G") interest(1) } field(OUTD,DBF_OUTLINK) { prompt("Output Link D") - promptgroup(GUI_OUTPUT) + promptgroup("51 - Output A-G") interest(1) } field(OUTE,DBF_OUTLINK) { prompt("Output Link E") - promptgroup(GUI_OUTPUT) + promptgroup("51 - Output A-G") interest(1) } field(OUTF,DBF_OUTLINK) { prompt("Output Link F") - promptgroup(GUI_OUTPUT) + promptgroup("51 - Output A-G") interest(1) } field(OUTG,DBF_OUTLINK) { prompt("Output Link G") - promptgroup(GUI_OUTPUT) + promptgroup("51 - Output A-G") interest(1) } field(OUTH,DBF_OUTLINK) { prompt("Output Link H") - promptgroup(GUI_OUTPUT) + promptgroup("52 - Output H-N") interest(1) } field(OUTI,DBF_OUTLINK) { prompt("Output Link I") - promptgroup(GUI_OUTPUT) + promptgroup("52 - Output H-N") interest(1) } field(OUTJ,DBF_OUTLINK) { prompt("Output Link J") - promptgroup(GUI_OUTPUT) + promptgroup("52 - Output H-N") interest(1) } field(OUTK,DBF_OUTLINK) { prompt("Output Link K") - promptgroup(GUI_OUTPUT) + promptgroup("52 - Output H-N") interest(1) } field(OUTL,DBF_OUTLINK) { prompt("Output Link L") - promptgroup(GUI_OUTPUT) + promptgroup("52 - Output H-N") interest(1) } field(OUTM,DBF_OUTLINK) { prompt("Output Link M") - promptgroup(GUI_OUTPUT) + promptgroup("52 - Output H-N") interest(1) } field(OUTN,DBF_OUTLINK) { prompt("Output Link N") - promptgroup(GUI_OUTPUT) + promptgroup("52 - Output H-N") interest(1) } field(OUTO,DBF_OUTLINK) { prompt("Output Link O") - promptgroup(GUI_OUTPUT) + promptgroup("53 - Output O-U") interest(1) } field(OUTP,DBF_OUTLINK) { prompt("Output Link P") - promptgroup(GUI_OUTPUT) + promptgroup("53 - Output O-U") interest(1) } field(OUTQ,DBF_OUTLINK) { prompt("Output Link Q") - promptgroup(GUI_OUTPUT) + promptgroup("53 - Output O-U") interest(1) } field(OUTR,DBF_OUTLINK) { prompt("Output Link R") - promptgroup(GUI_OUTPUT) + promptgroup("53 - Output O-U") interest(1) } field(OUTS,DBF_OUTLINK) { prompt("Output Link S") - promptgroup(GUI_OUTPUT) + promptgroup("53 - Output O-U") interest(1) } field(OUTT,DBF_OUTLINK) { prompt("Output Link T") - promptgroup(GUI_OUTPUT) + promptgroup("53 - Output O-U") interest(1) } field(OUTU,DBF_OUTLINK) { prompt("Output Link U") - promptgroup(GUI_OUTPUT) + promptgroup("53 - Output O-U") interest(1) } @@ -1384,7 +1363,7 @@ recordtype(aSub) { } field(FTVA,DBF_MENU) { prompt("Type of VALA") - promptgroup(GUI_WAVE) + promptgroup("51 - Output A-G") special(SPC_NOMOD) interest(1) initial("DOUBLE") @@ -1392,7 +1371,7 @@ recordtype(aSub) { } field(FTVB,DBF_MENU) { prompt("Type of VALB") - promptgroup(GUI_WAVE) + promptgroup("51 - Output A-G") special(SPC_NOMOD) interest(1) initial("DOUBLE") @@ -1400,7 +1379,7 @@ recordtype(aSub) { } field(FTVC,DBF_MENU) { prompt("Type of VALC") - promptgroup(GUI_WAVE) + promptgroup("51 - Output A-G") special(SPC_NOMOD) interest(1) initial("DOUBLE") @@ -1408,7 +1387,7 @@ recordtype(aSub) { } field(FTVD,DBF_MENU) { prompt("Type of VALD") - promptgroup(GUI_WAVE) + promptgroup("51 - Output A-G") special(SPC_NOMOD) interest(1) initial("DOUBLE") @@ -1416,7 +1395,7 @@ recordtype(aSub) { } field(FTVE,DBF_MENU) { prompt("Type of VALE") - promptgroup(GUI_WAVE) + promptgroup("51 - Output A-G") special(SPC_NOMOD) interest(1) initial("DOUBLE") @@ -1424,7 +1403,7 @@ recordtype(aSub) { } field(FTVF,DBF_MENU) { prompt("Type of VALF") - promptgroup(GUI_WAVE) + promptgroup("51 - Output A-G") special(SPC_NOMOD) interest(1) initial("DOUBLE") @@ -1432,7 +1411,7 @@ recordtype(aSub) { } field(FTVG,DBF_MENU) { prompt("Type of VALG") - promptgroup(GUI_WAVE) + promptgroup("51 - Output A-G") special(SPC_NOMOD) interest(1) initial("DOUBLE") @@ -1440,7 +1419,7 @@ recordtype(aSub) { } field(FTVH,DBF_MENU) { prompt("Type of VALH") - promptgroup(GUI_WAVE) + promptgroup("52 - Output H-N") special(SPC_NOMOD) interest(1) initial("DOUBLE") @@ -1448,7 +1427,7 @@ recordtype(aSub) { } field(FTVI,DBF_MENU) { prompt("Type of VALI") - promptgroup(GUI_WAVE) + promptgroup("52 - Output H-N") special(SPC_NOMOD) interest(1) initial("DOUBLE") @@ -1456,7 +1435,7 @@ recordtype(aSub) { } field(FTVJ,DBF_MENU) { prompt("Type of VALJ") - promptgroup(GUI_WAVE) + promptgroup("52 - Output H-N") special(SPC_NOMOD) interest(1) initial("DOUBLE") @@ -1464,7 +1443,7 @@ recordtype(aSub) { } field(FTVK,DBF_MENU) { prompt("Type of VALK") - promptgroup(GUI_WAVE) + promptgroup("52 - Output H-N") special(SPC_NOMOD) interest(1) initial("DOUBLE") @@ -1472,7 +1451,7 @@ recordtype(aSub) { } field(FTVL,DBF_MENU) { prompt("Type of VALL") - promptgroup(GUI_WAVE) + promptgroup("52 - Output H-N") special(SPC_NOMOD) interest(1) initial("DOUBLE") @@ -1480,7 +1459,7 @@ recordtype(aSub) { } field(FTVM,DBF_MENU) { prompt("Type of VALM") - promptgroup(GUI_WAVE) + promptgroup("52 - Output H-N") special(SPC_NOMOD) interest(1) initial("DOUBLE") @@ -1488,7 +1467,7 @@ recordtype(aSub) { } field(FTVN,DBF_MENU) { prompt("Type of VALN") - promptgroup(GUI_WAVE) + promptgroup("52 - Output H-N") special(SPC_NOMOD) interest(1) initial("DOUBLE") @@ -1496,7 +1475,7 @@ recordtype(aSub) { } field(FTVO,DBF_MENU) { prompt("Type of VALO") - promptgroup(GUI_WAVE) + promptgroup("53 - Output O-U") special(SPC_NOMOD) interest(1) initial("DOUBLE") @@ -1504,7 +1483,7 @@ recordtype(aSub) { } field(FTVP,DBF_MENU) { prompt("Type of VALP") - promptgroup(GUI_WAVE) + promptgroup("53 - Output O-U") special(SPC_NOMOD) interest(1) initial("DOUBLE") @@ -1512,7 +1491,7 @@ recordtype(aSub) { } field(FTVQ,DBF_MENU) { prompt("Type of VALQ") - promptgroup(GUI_WAVE) + promptgroup("53 - Output O-U") special(SPC_NOMOD) interest(1) initial("DOUBLE") @@ -1520,7 +1499,7 @@ recordtype(aSub) { } field(FTVR,DBF_MENU) { prompt("Type of VALR") - promptgroup(GUI_WAVE) + promptgroup("53 - Output O-U") special(SPC_NOMOD) interest(1) initial("DOUBLE") @@ -1528,7 +1507,7 @@ recordtype(aSub) { } field(FTVS,DBF_MENU) { prompt("Type of VALS") - promptgroup(GUI_WAVE) + promptgroup("53 - Output O-U") special(SPC_NOMOD) interest(1) initial("DOUBLE") @@ -1536,7 +1515,7 @@ recordtype(aSub) { } field(FTVT,DBF_MENU) { prompt("Type of VALT") - promptgroup(GUI_WAVE) + promptgroup("53 - Output O-U") special(SPC_NOMOD) interest(1) initial("DOUBLE") @@ -1544,7 +1523,7 @@ recordtype(aSub) { } field(FTVU,DBF_MENU) { prompt("Type of VALU") - promptgroup(GUI_WAVE) + promptgroup("53 - Output O-U") special(SPC_NOMOD) interest(1) initial("DOUBLE") @@ -1552,147 +1531,147 @@ recordtype(aSub) { } field(NOVA,DBF_ULONG) { prompt("Max. elements in VALA") - promptgroup(GUI_WAVE) + promptgroup("51 - Output A-G") special(SPC_NOMOD) interest(1) initial("1") } field(NOVB,DBF_ULONG) { prompt("Max. elements in VALB") - promptgroup(GUI_WAVE) + promptgroup("51 - Output A-G") special(SPC_NOMOD) interest(1) initial("1") } field(NOVC,DBF_ULONG) { prompt("Max. elements in VALC") - promptgroup(GUI_WAVE) + promptgroup("51 - Output A-G") special(SPC_NOMOD) interest(1) initial("1") } field(NOVD,DBF_ULONG) { prompt("Max. elements in VALD") - promptgroup(GUI_WAVE) + promptgroup("51 - Output A-G") special(SPC_NOMOD) interest(1) initial("1") } field(NOVE,DBF_ULONG) { prompt("Max. elements in VALE") - promptgroup(GUI_WAVE) + promptgroup("51 - Output A-G") special(SPC_NOMOD) interest(1) initial("1") } field(NOVF,DBF_ULONG) { prompt("Max. elements in VALF") - promptgroup(GUI_WAVE) + promptgroup("51 - Output A-G") special(SPC_NOMOD) interest(1) initial("1") } field(NOVG,DBF_ULONG) { prompt("Max. elements in VALG") - promptgroup(GUI_WAVE) + promptgroup("51 - Output A-G") special(SPC_NOMOD) interest(1) initial("1") } field(NOVH,DBF_ULONG) { prompt("Max. elements in VAlH") - promptgroup(GUI_WAVE) + promptgroup("52 - Output H-N") special(SPC_NOMOD) interest(1) initial("1") } field(NOVI,DBF_ULONG) { prompt("Max. elements in VALI") - promptgroup(GUI_WAVE) + promptgroup("52 - Output H-N") special(SPC_NOMOD) interest(1) initial("1") } field(NOVJ,DBF_ULONG) { prompt("Max. elements in VALJ") - promptgroup(GUI_WAVE) + promptgroup("52 - Output H-N") special(SPC_NOMOD) interest(1) initial("1") } field(NOVK,DBF_ULONG) { prompt("Max. elements in VALK") - promptgroup(GUI_WAVE) + promptgroup("52 - Output H-N") special(SPC_NOMOD) interest(1) initial("1") } field(NOVL,DBF_ULONG) { prompt("Max. elements in VALL") - promptgroup(GUI_WAVE) + promptgroup("52 - Output H-N") special(SPC_NOMOD) interest(1) initial("1") } field(NOVM,DBF_ULONG) { prompt("Max. elements in VALM") - promptgroup(GUI_WAVE) + promptgroup("52 - Output H-N") special(SPC_NOMOD) interest(1) initial("1") } field(NOVN,DBF_ULONG) { prompt("Max. elements in VALN") - promptgroup(GUI_WAVE) + promptgroup("52 - Output H-N") special(SPC_NOMOD) interest(1) initial("1") } field(NOVO,DBF_ULONG) { prompt("Max. elements in VALO") - promptgroup(GUI_WAVE) + promptgroup("53 - Output O-U") special(SPC_NOMOD) interest(1) initial("1") } field(NOVP,DBF_ULONG) { prompt("Max. elements in VALP") - promptgroup(GUI_WAVE) + promptgroup("53 - Output O-U") special(SPC_NOMOD) interest(1) initial("1") } field(NOVQ,DBF_ULONG) { prompt("Max. elements in VALQ") - promptgroup(GUI_WAVE) + promptgroup("53 - Output O-U") special(SPC_NOMOD) interest(1) initial("1") } field(NOVR,DBF_ULONG) { prompt("Max. elements in VALR") - promptgroup(GUI_WAVE) + promptgroup("53 - Output O-U") special(SPC_NOMOD) interest(1) initial("1") } field(NOVS,DBF_ULONG) { prompt("Max. elements in VALS") - promptgroup(GUI_WAVE) + promptgroup("53 - Output O-U") special(SPC_NOMOD) interest(1) initial("1") } field(NOVT,DBF_ULONG) { prompt("Max. elements in VALT") - promptgroup(GUI_WAVE) + promptgroup("53 - Output O-U") special(SPC_NOMOD) interest(1) initial("1") } field(NOVU,DBF_ULONG) { prompt("Max. elements in VALU") - promptgroup(GUI_WAVE) + promptgroup("53 - Output O-U") special(SPC_NOMOD) interest(1) initial("1") diff --git a/src/std/rec/aaiRecord.c b/src/std/rec/aaiRecord.c index 612b2d8c5..0dfed346c 100644 --- a/src/std/rec/aaiRecord.c +++ b/src/std/rec/aaiRecord.c @@ -50,15 +50,15 @@ /* Create RSET - Record Support Entry Table*/ #define report NULL #define initialize NULL -static long init_record(aaiRecord *, int); -static long process(aaiRecord *); +static long init_record(struct dbCommon *, int); +static long process(struct dbCommon *); #define special NULL #define get_value NULL static long cvt_dbaddr(DBADDR *); static long get_array_info(DBADDR *, long *, long *); static long put_array_info(DBADDR *, long); static long get_units(DBADDR *, char *); -static long get_precision(DBADDR *, long *); +static long get_precision(const DBADDR *, long *); #define get_enum_str NULL #define get_enum_strs NULL #define put_enum_str NULL @@ -100,10 +100,11 @@ struct aaidset { /* aai dset */ static void monitor(aaiRecord *); static long readValue(aaiRecord *); -static long init_record(aaiRecord *prec, int pass) +static long init_record(struct dbCommon *pcommon, int pass) { - long status; + struct aaiRecord *prec = (struct aaiRecord *)pcommon; struct aaidset *pdset = (struct aaidset *)(prec->dset); + long status; /* must have dset defined */ if (!pdset) { @@ -150,8 +151,9 @@ static long init_record(aaiRecord *prec, int pass) return 0; } -static long process(aaiRecord *prec) +static long process(struct dbCommon *pcommon) { + struct aaiRecord *prec = (struct aaiRecord *)pcommon; struct aaidset *pdset = (struct aaidset *)(prec->dset); long status; unsigned char pact = prec->pact; @@ -225,7 +227,7 @@ static long get_units(DBADDR *paddr, char *units) return 0; } -static long get_precision(DBADDR *paddr, long *precision) +static long get_precision(const DBADDR *paddr, long *precision) { aaiRecord *prec = (aaiRecord *)paddr->precord; diff --git a/src/std/rec/aaiRecord.dbd b/src/std/rec/aaiRecord.dbd index 3b6c5fb2c..06ab7f7b8 100644 --- a/src/std/rec/aaiRecord.dbd +++ b/src/std/rec/aaiRecord.dbd @@ -3,13 +3,12 @@ # National Laboratory. # Copyright (c) 2002 The Regents of the University of California, as # Operator of Los Alamos National Laboratory. -# EPICS BASE Versions 3.13.7 -# and higher are distributed subject to a Software License Agreement found -# in file LICENSE that is included with this distribution. +# EPICS BASE is distributed subject to a Software License Agreement found +# in file LICENSE that is included with this distribution. #************************************************************************* menu(aaiPOST) { - choice(aaiPOST_Always,"Always") - choice(aaiPOST_OnChange,"On Change") + choice(aaiPOST_Always,"Always") + choice(aaiPOST_OnChange,"On Change") } recordtype(aai) { include "dbCommon.dbd" @@ -25,44 +24,44 @@ recordtype(aai) { } field(PREC,DBF_SHORT) { prompt("Display Precision") - promptgroup(GUI_ALARMS) + promptgroup("80 - Display") interest(1) prop(YES) } field(INP,DBF_INLINK) { prompt("Input Specification") - promptgroup(GUI_BITS1) + promptgroup("40 - Input") interest(1) } field(EGU,DBF_STRING) { - prompt("Engineering Units Name") - promptgroup(GUI_BITS2) + prompt("Engineering Units") + promptgroup("80 - Display") interest(1) size(16) prop(YES) } field(HOPR,DBF_DOUBLE) { prompt("High Operating Range") - promptgroup(GUI_CALC) + promptgroup("80 - Display") interest(1) prop(YES) } field(LOPR,DBF_DOUBLE) { prompt("Low Operating Range") - promptgroup(GUI_CLOCK) + promptgroup("80 - Display") interest(1) prop(YES) } field(NELM,DBF_ULONG) { prompt("Number of Elements") - promptgroup(GUI_COMPRESS) + promptgroup("30 - Action") special(SPC_NOMOD) interest(1) initial("1") } field(FTVL,DBF_MENU) { prompt("Field Type of Value") - promptgroup(GUI_CONVERT) + promptgroup("30 - Action") special(SPC_NOMOD) interest(1) menu(menuFtype) @@ -79,7 +78,7 @@ recordtype(aai) { } field(SIML,DBF_INLINK) { prompt("Sim Mode Location") - promptgroup(GUI_HIST) + promptgroup("90 - Simulate") interest(1) } field(SIMM,DBF_MENU) { @@ -89,27 +88,27 @@ recordtype(aai) { } field(SIMS,DBF_MENU) { prompt("Sim mode Alarm Svrty") - promptgroup(GUI_INPUTS) + promptgroup("90 - Simulate") interest(2) menu(menuAlarmSevr) } field(SIOL,DBF_INLINK) { prompt("Sim Input Specifctn") - promptgroup(GUI_INPUTS) + promptgroup("90 - Simulate") interest(1) } field(MPST,DBF_MENU) { - prompt("Post Value Monitors") - promptgroup(GUI_DISPLAY) - interest(1) - menu(aaiPOST) + prompt("Post Value Monitors") + promptgroup("80 - Display") + interest(1) + menu(aaiPOST) } field(APST,DBF_MENU) { - prompt("Post Archive Monitors") - promptgroup(GUI_DISPLAY) - interest(1) - menu(aaiPOST) - } + prompt("Post Archive Monitors") + promptgroup("80 - Display") + interest(1) + menu(aaiPOST) + } field(HASH,DBF_ULONG) { prompt("Hash of OnChange data.") interest(3) diff --git a/src/std/rec/aaoRecord.c b/src/std/rec/aaoRecord.c index b547a4c00..1cc2541eb 100644 --- a/src/std/rec/aaoRecord.c +++ b/src/std/rec/aaoRecord.c @@ -50,15 +50,15 @@ /* Create RSET - Record Support Entry Table*/ #define report NULL #define initialize NULL -static long init_record(aaoRecord *, int); -static long process(aaoRecord *); +static long init_record(struct dbCommon *, int); +static long process(struct dbCommon *); #define special NULL #define get_value NULL static long cvt_dbaddr(DBADDR *); static long get_array_info(DBADDR *, long *, long *); static long put_array_info(DBADDR *, long); static long get_units(DBADDR *, char *); -static long get_precision(DBADDR *, long *); +static long get_precision(const DBADDR *, long *); #define get_enum_str NULL #define get_enum_strs NULL #define put_enum_str NULL @@ -100,10 +100,11 @@ struct aaodset { /* aao dset */ static void monitor(aaoRecord *); static long writeValue(aaoRecord *); -static long init_record(aaoRecord *prec, int pass) +static long init_record(struct dbCommon *pcommon, int pass) { - long status; + struct aaoRecord *prec = (struct aaoRecord *)pcommon; struct aaodset *pdset = (struct aaodset *)(prec->dset); + long status; /* must have dset defined */ if (!pdset) { @@ -150,8 +151,9 @@ static long init_record(aaoRecord *prec, int pass) return 0; } -static long process(aaoRecord *prec) +static long process(struct dbCommon *pcommon) { + struct aaoRecord *prec = (struct aaoRecord *)pcommon; struct aaodset *pdset = (struct aaodset *)(prec->dset); long status; unsigned char pact = prec->pact; @@ -225,7 +227,7 @@ static long get_units(DBADDR *paddr, char *units) return 0; } -static long get_precision(DBADDR *paddr, long *precision) +static long get_precision(const DBADDR *paddr, long *precision) { aaoRecord *prec = (aaoRecord *)paddr->precord; diff --git a/src/std/rec/aaoRecord.dbd b/src/std/rec/aaoRecord.dbd index 861a16613..57d842f4f 100644 --- a/src/std/rec/aaoRecord.dbd +++ b/src/std/rec/aaoRecord.dbd @@ -3,13 +3,12 @@ # National Laboratory. # Copyright (c) 2002 The Regents of the University of California, as # Operator of Los Alamos National Laboratory. -# EPICS BASE Versions 3.13.7 -# and higher are distributed subject to a Software License Agreement found -# in file LICENSE that is included with this distribution. +# EPICS BASE is distributed subject to a Software License Agreement found +# in file LICENSE that is included with this distribution. #************************************************************************* menu(aaoPOST) { - choice(aaoPOST_Always,"Always") - choice(aaoPOST_OnChange,"On Change") + choice(aaoPOST_Always,"Always") + choice(aaoPOST_OnChange,"On Change") } recordtype(aao) { include "dbCommon.dbd" @@ -25,44 +24,44 @@ recordtype(aao) { } field(PREC,DBF_SHORT) { prompt("Display Precision") - promptgroup(GUI_ALARMS) + promptgroup("80 - Display") interest(1) prop(YES) } field(OUT,DBF_OUTLINK) { prompt("Output Specification") - promptgroup(GUI_BITS1) + promptgroup("50 - Output") interest(1) } field(EGU,DBF_STRING) { - prompt("Engineering Units Name") - promptgroup(GUI_BITS2) + prompt("Engineering Units") + promptgroup("80 - Display") interest(1) size(16) prop(YES) } field(HOPR,DBF_DOUBLE) { prompt("High Operating Range") - promptgroup(GUI_CALC) + promptgroup("80 - Display") interest(1) prop(YES) } field(LOPR,DBF_DOUBLE) { prompt("Low Operating Range") - promptgroup(GUI_CLOCK) + promptgroup("80 - Display") interest(1) prop(YES) } field(NELM,DBF_ULONG) { prompt("Number of Elements") - promptgroup(GUI_COMPRESS) + promptgroup("30 - Action") special(SPC_NOMOD) interest(1) initial("1") } field(FTVL,DBF_MENU) { prompt("Field Type of Value") - promptgroup(GUI_CONVERT) + promptgroup("30 - Action") special(SPC_NOMOD) interest(1) menu(menuFtype) @@ -79,7 +78,7 @@ recordtype(aao) { } field(SIML,DBF_INLINK) { prompt("Sim Mode Location") - promptgroup(GUI_HIST) + promptgroup("90 - Simulate") interest(1) } field(SIMM,DBF_MENU) { @@ -89,27 +88,27 @@ recordtype(aao) { } field(SIMS,DBF_MENU) { prompt("Sim mode Alarm Svrty") - promptgroup(GUI_INPUTS) + promptgroup("90 - Simulate") interest(2) menu(menuAlarmSevr) } field(SIOL,DBF_OUTLINK) { prompt("Sim Output Specifctn") - promptgroup(GUI_INPUTS) + promptgroup("90 - Simulate") interest(1) } field(MPST,DBF_MENU) { - prompt("Post Value Monitors") - promptgroup(GUI_DISPLAY) - interest(1) - menu(aaoPOST) + prompt("Post Value Monitors") + promptgroup("80 - Display") + interest(1) + menu(aaoPOST) } field(APST,DBF_MENU) { - prompt("Post Archive Monitors") - promptgroup(GUI_DISPLAY) - interest(1) - menu(aaoPOST) - } + prompt("Post Archive Monitors") + promptgroup("80 - Display") + interest(1) + menu(aaoPOST) + } field(HASH,DBF_ULONG) { prompt("Hash of OnChange data.") interest(3) diff --git a/src/std/rec/aiRecord.c b/src/std/rec/aiRecord.c index 9d20cab0d..81f730f6d 100644 --- a/src/std/rec/aiRecord.c +++ b/src/std/rec/aiRecord.c @@ -6,7 +6,6 @@ * EPICS BASE is distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. \*************************************************************************/ -/* $Revision-Id$ */ /* aiRecord.c - Record Support Routines for Analog Input records */ /* @@ -48,15 +47,15 @@ /* Create RSET - Record Support Entry Table*/ #define report NULL #define initialize NULL -static long init_record(void *, int); -static long process(void *); +static long init_record(struct dbCommon *, int); +static long process(struct dbCommon *); static long special(DBADDR *, int); #define get_value NULL #define cvt_dbaddr NULL #define get_array_info NULL #define put_array_info NULL static long get_units(DBADDR *, char *); -static long get_precision(DBADDR *, long *); +static long get_precision(const DBADDR *, long *); #define get_enum_str NULL #define get_enum_strs NULL #define put_enum_str NULL @@ -103,9 +102,9 @@ static void convert(aiRecord *prec); static void monitor(aiRecord *prec); static long readValue(aiRecord *prec); -static long init_record(void *precord,int pass) +static long init_record(struct dbCommon *pcommon, int pass) { - aiRecord *prec = (aiRecord *)precord; + struct aiRecord *prec = (struct aiRecord *)pcommon; aidset *pdset; double eoff = prec->eoff, eslo = prec->eslo; @@ -144,10 +143,10 @@ static long init_record(void *precord,int pass) return(0); } -static long process(void *precord) +static long process(struct dbCommon *pcommon) { - aiRecord *prec = (aiRecord *)precord; - aidset *pdset = (aidset *)(prec->dset); + struct aiRecord *prec = (struct aiRecord *)pcommon; + aidset *pdset = (aidset *)(prec->dset); long status; unsigned char pact=prec->pact; epicsTimeStamp timeLast; @@ -231,7 +230,7 @@ static long get_units(DBADDR *paddr, char *units) return(0); } -static long get_precision(DBADDR *paddr, long *precision) +static long get_precision(const DBADDR *paddr, long *precision) { aiRecord *prec=(aiRecord *)paddr->precord; diff --git a/src/std/rec/aiRecord.dbd.pod b/src/std/rec/aiRecord.dbd.pod index 8da77055d..2973ec831 100644 --- a/src/std/rec/aiRecord.dbd.pod +++ b/src/std/rec/aiRecord.dbd.pod @@ -217,24 +217,24 @@ monitoring functionality. include "dbCommon.dbd" field(VAL,DBF_DOUBLE) { prompt("Current EGU Value") - promptgroup(GUI_INPUTS) + promptgroup("40 - Input") asl(ASL0) pp(TRUE) } field(INP,DBF_INLINK) { prompt("Input Specification") - promptgroup(GUI_INPUTS) + promptgroup("40 - Input") interest(1) } field(PREC,DBF_SHORT) { prompt("Display Precision") - promptgroup(GUI_DISPLAY) + promptgroup("80 - Display") interest(1) - prop(YES) + prop(YES) } field(LINR,DBF_MENU) { prompt("Linearization") - promptgroup(GUI_CONVERT) + promptgroup("60 - Convert") special(SPC_LINCONV) pp(TRUE) interest(1) @@ -242,133 +242,133 @@ monitoring functionality. } field(EGUF,DBF_DOUBLE) { prompt("Engineer Units Full") - promptgroup(GUI_CONVERT) + promptgroup("60 - Convert") special(SPC_LINCONV) pp(TRUE) interest(1) } field(EGUL,DBF_DOUBLE) { prompt("Engineer Units Low") - promptgroup(GUI_CONVERT) + promptgroup("60 - Convert") special(SPC_LINCONV) pp(TRUE) interest(1) } field(EGU,DBF_STRING) { prompt("Engineering Units") - promptgroup(GUI_DISPLAY) + promptgroup("80 - Display") interest(1) size(16) - prop(YES) + prop(YES) } field(HOPR,DBF_DOUBLE) { prompt("High Operating Range") - promptgroup(GUI_DISPLAY) + promptgroup("80 - Display") interest(1) - prop(YES) + prop(YES) } field(LOPR,DBF_DOUBLE) { prompt("Low Operating Range") - promptgroup(GUI_DISPLAY) + promptgroup("80 - Display") interest(1) - prop(YES) + prop(YES) } field(AOFF,DBF_DOUBLE) { prompt("Adjustment Offset") - promptgroup(GUI_CONVERT) + promptgroup("60 - Convert") pp(TRUE) interest(1) } field(ASLO,DBF_DOUBLE) { prompt("Adjustment Slope") - promptgroup(GUI_CONVERT) + promptgroup("60 - Convert") pp(TRUE) interest(1) initial("1") } field(SMOO,DBF_DOUBLE) { prompt("Smoothing") - promptgroup(GUI_CONVERT) + promptgroup("60 - Convert") interest(1) } field(HIHI,DBF_DOUBLE) { prompt("Hihi Alarm Limit") - promptgroup(GUI_ALARMS) + promptgroup("70 - Alarm") pp(TRUE) interest(1) - prop(YES) + prop(YES) } field(LOLO,DBF_DOUBLE) { prompt("Lolo Alarm Limit") - promptgroup(GUI_ALARMS) + promptgroup("70 - Alarm") pp(TRUE) interest(1) - prop(YES) + prop(YES) } field(HIGH,DBF_DOUBLE) { prompt("High Alarm Limit") - promptgroup(GUI_ALARMS) + promptgroup("70 - Alarm") pp(TRUE) interest(1) - prop(YES) + prop(YES) } field(LOW,DBF_DOUBLE) { prompt("Low Alarm Limit") - promptgroup(GUI_ALARMS) + promptgroup("70 - Alarm") pp(TRUE) interest(1) - prop(YES) + prop(YES) } field(HHSV,DBF_MENU) { prompt("Hihi Severity") - promptgroup(GUI_ALARMS) + promptgroup("70 - Alarm") pp(TRUE) interest(1) - prop(YES) + prop(YES) menu(menuAlarmSevr) } field(LLSV,DBF_MENU) { prompt("Lolo Severity") - promptgroup(GUI_ALARMS) + promptgroup("70 - Alarm") pp(TRUE) interest(1) - prop(YES) + prop(YES) menu(menuAlarmSevr) } field(HSV,DBF_MENU) { prompt("High Severity") - promptgroup(GUI_ALARMS) + promptgroup("70 - Alarm") pp(TRUE) interest(1) - prop(YES) + prop(YES) menu(menuAlarmSevr) } field(LSV,DBF_MENU) { prompt("Low Severity") - promptgroup(GUI_ALARMS) + promptgroup("70 - Alarm") pp(TRUE) interest(1) - prop(YES) + prop(YES) menu(menuAlarmSevr) } field(HYST,DBF_DOUBLE) { prompt("Alarm Deadband") - promptgroup(GUI_ALARMS) + promptgroup("70 - Alarm") interest(1) } field(AFTC,DBF_DOUBLE) { prompt("Alarm Filter Time Constant") - promptgroup(GUI_ALARMS) + promptgroup("70 - Alarm") interest(1) } field(ADEL,DBF_DOUBLE) { prompt("Archive Deadband") - promptgroup(GUI_DISPLAY) + promptgroup("80 - Display") interest(1) } field(MDEL,DBF_DOUBLE) { prompt("Monitor Deadband") - promptgroup(GUI_DISPLAY) + promptgroup("80 - Display") interest(1) } field(LALM,DBF_DOUBLE) { @@ -393,14 +393,14 @@ monitoring functionality. } field(ESLO,DBF_DOUBLE) { prompt("Raw to EGU Slope") - promptgroup(GUI_CONVERT) + promptgroup("60 - Convert") pp(TRUE) interest(2) initial("1") } field(EOFF,DBF_DOUBLE) { prompt("Raw to EGU Offset") - promptgroup(GUI_CONVERT) + promptgroup("60 - Convert") pp(TRUE) interest(2) } @@ -469,7 +469,7 @@ simulation mode. field(SIOL,DBF_INLINK) { prompt("Sim. Input Specification") - promptgroup(GUI_INPUTS) + promptgroup("90 - Simulate") interest(1) } field(SVAL,DBF_DOUBLE) { @@ -477,7 +477,7 @@ simulation mode. } field(SIML,DBF_INLINK) { prompt("Sim. Mode Location") - promptgroup(GUI_INPUTS) + promptgroup("90 - Simulate") interest(1) } field(SIMM,DBF_MENU) { @@ -487,7 +487,7 @@ simulation mode. } field(SIMS,DBF_MENU) { prompt("Simulation Mode Severity") - promptgroup(GUI_INPUTS) + promptgroup("90 - Simulate") interest(2) menu(menuAlarmSevr) } @@ -610,7 +610,7 @@ values that the C routine can put in the RVAL field. When RVAL is set to I the VAL field will be set to EGUF, and when RVAL is set to I the VAL field will become EGUL. -The fomulae to use are: +The formulae to use are: =over diff --git a/src/std/rec/aoRecord.c b/src/std/rec/aoRecord.c index a32c5bb55..0d923af5c 100644 --- a/src/std/rec/aoRecord.c +++ b/src/std/rec/aoRecord.c @@ -6,7 +6,6 @@ * EPICS BASE is distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. \*************************************************************************/ -/* $Revision-Id$ */ /* aoRecord.c - Record Support Routines for Analog Output records */ /* @@ -47,15 +46,15 @@ /* Create RSET - Record Support Entry Table*/ #define report NULL #define initialize NULL -static long init_record(aoRecord *prec, int pass); -static long process(aoRecord *); +static long init_record(struct dbCommon *, int); +static long process(struct dbCommon *); static long special(DBADDR *, int); #define get_value NULL #define cvt_dbaddr NULL #define get_array_info NULL #define put_array_info NULL static long get_units(DBADDR *, char *); -static long get_precision(DBADDR *, long *); +static long get_precision(const DBADDR *, long *); #define get_enum_str NULL #define get_enum_strs NULL #define put_enum_str NULL @@ -102,9 +101,10 @@ static void convert(aoRecord *, double); static void monitor(aoRecord *); static long writeValue(aoRecord *); -static long init_record(aoRecord *prec, int pass) +static long init_record(struct dbCommon *pcommon, int pass) { - struct aodset *pdset; + struct aoRecord *prec = (struct aoRecord *)pcommon; + struct aodset *pdset; double eoff = prec->eoff, eslo = prec->eslo; double value; @@ -170,9 +170,10 @@ static long init_record(aoRecord *prec, int pass) return(0); } -static long process(aoRecord *prec) +static long process(struct dbCommon *pcommon) { - struct aodset *pdset = (struct aodset *)(prec->dset); + struct aoRecord *prec = (struct aoRecord *)pcommon; + struct aodset *pdset = (struct aodset *)(prec->dset); long status=0; unsigned char pact=prec->pact; double value; @@ -290,7 +291,7 @@ static long get_units(DBADDR * paddr,char *units) return(0); } -static long get_precision(DBADDR *paddr,long *precision) +static long get_precision(const DBADDR *paddr,long *precision) { aoRecord *prec=(aoRecord *)paddr->precord; diff --git a/src/std/rec/aoRecord.dbd.pod b/src/std/rec/aoRecord.dbd.pod index 5b9280a65..41467dcd3 100644 --- a/src/std/rec/aoRecord.dbd.pod +++ b/src/std/rec/aoRecord.dbd.pod @@ -273,7 +273,7 @@ information on these fields. include "dbCommon.dbd" field(VAL,DBF_DOUBLE) { prompt("Desired Output") - promptgroup(GUI_OUTPUT) + promptgroup("50 - Output") asl(ASL0) pp(TRUE) } @@ -282,40 +282,40 @@ information on these fields. } field(OUT,DBF_OUTLINK) { prompt("Output Specification") - promptgroup(GUI_OUTPUT) + promptgroup("50 - Output") interest(1) } field(OROC,DBF_DOUBLE) { prompt("Output Rate of Change") - promptgroup(GUI_OUTPUT) + promptgroup("50 - Output") interest(1) } field(DOL,DBF_INLINK) { prompt("Desired Output Loc") - promptgroup(GUI_OUTPUT) + promptgroup("40 - Input") interest(1) } field(OMSL,DBF_MENU) { prompt("Output Mode Select") - promptgroup(GUI_OUTPUT) + promptgroup("50 - Output") interest(1) menu(menuOmsl) } field(OIF,DBF_MENU) { prompt("Out Full/Incremental") - promptgroup(GUI_OUTPUT) + promptgroup("50 - Output") interest(1) menu(aoOIF) } field(PREC,DBF_SHORT) { prompt("Display Precision") - promptgroup(GUI_DISPLAY) + promptgroup("80 - Display") interest(1) - prop(YES) + prop(YES) } field(LINR,DBF_MENU) { prompt("Linearization") - promptgroup(GUI_CONVERT) + promptgroup("60 - Convert") special(SPC_LINCONV) pp(TRUE) interest(1) @@ -323,24 +323,24 @@ information on these fields. } field(EGUF,DBF_DOUBLE) { prompt("Eng Units Full") - promptgroup(GUI_CONVERT) + promptgroup("60 - Convert") special(SPC_LINCONV) pp(TRUE) interest(1) } field(EGUL,DBF_DOUBLE) { prompt("Eng Units Low") - promptgroup(GUI_CONVERT) + promptgroup("60 - Convert") special(SPC_LINCONV) pp(TRUE) interest(1) } field(EGU,DBF_STRING) { prompt("Engineering Units") - promptgroup(GUI_DISPLAY) + promptgroup("80 - Display") interest(1) size(16) - prop(YES) + prop(YES) } field(ROFF,DBF_ULONG) { prompt("Raw Offset") @@ -349,128 +349,128 @@ information on these fields. } field(EOFF,DBF_DOUBLE) { prompt("EGU to Raw Offset") - promptgroup(GUI_CONVERT) + promptgroup("60 - Convert") pp(TRUE) interest(2) } field(ESLO,DBF_DOUBLE) { prompt("EGU to Raw Slope") - promptgroup(GUI_CONVERT) + promptgroup("60 - Convert") pp(TRUE) interest(2) initial("1") } field(DRVH,DBF_DOUBLE) { prompt("Drive High Limit") - promptgroup(GUI_OUTPUT) + promptgroup("30 - Action") pp(TRUE) interest(1) - prop(YES) + prop(YES) } field(DRVL,DBF_DOUBLE) { prompt("Drive Low Limit") - promptgroup(GUI_OUTPUT) + promptgroup("30 - Action") pp(TRUE) interest(1) - prop(YES) + prop(YES) } field(HOPR,DBF_DOUBLE) { prompt("High Operating Range") - promptgroup(GUI_DISPLAY) + promptgroup("80 - Display") interest(1) - prop(YES) + prop(YES) } field(LOPR,DBF_DOUBLE) { prompt("Low Operating Range") - promptgroup(GUI_DISPLAY) + promptgroup("80 - Display") interest(1) - prop(YES) + prop(YES) } field(AOFF,DBF_DOUBLE) { prompt("Adjustment Offset") - promptgroup(GUI_CONVERT) + promptgroup("60 - Convert") pp(TRUE) interest(1) } field(ASLO,DBF_DOUBLE) { prompt("Adjustment Slope") - promptgroup(GUI_CONVERT) + promptgroup("60 - Convert") pp(TRUE) interest(1) } field(HIHI,DBF_DOUBLE) { prompt("Hihi Alarm Limit") - promptgroup(GUI_ALARMS) + promptgroup("70 - Alarm") pp(TRUE) interest(1) - prop(YES) + prop(YES) } field(LOLO,DBF_DOUBLE) { prompt("Lolo Alarm Limit") - promptgroup(GUI_ALARMS) + promptgroup("70 - Alarm") pp(TRUE) interest(1) - prop(YES) + prop(YES) } field(HIGH,DBF_DOUBLE) { prompt("High Alarm Limit") - promptgroup(GUI_ALARMS) + promptgroup("70 - Alarm") pp(TRUE) interest(1) - prop(YES) + prop(YES) } field(LOW,DBF_DOUBLE) { prompt("Low Alarm Limit") - promptgroup(GUI_ALARMS) + promptgroup("70 - Alarm") pp(TRUE) interest(1) - prop(YES) + prop(YES) } field(HHSV,DBF_MENU) { prompt("Hihi Severity") - promptgroup(GUI_ALARMS) + promptgroup("70 - Alarm") pp(TRUE) interest(1) - prop(YES) + prop(YES) menu(menuAlarmSevr) } field(LLSV,DBF_MENU) { prompt("Lolo Severity") - promptgroup(GUI_ALARMS) + promptgroup("70 - Alarm") pp(TRUE) interest(1) - prop(YES) + prop(YES) menu(menuAlarmSevr) } field(HSV,DBF_MENU) { prompt("High Severity") - promptgroup(GUI_ALARMS) + promptgroup("70 - Alarm") pp(TRUE) interest(1) - prop(YES) + prop(YES) menu(menuAlarmSevr) } field(LSV,DBF_MENU) { prompt("Low Severity") - promptgroup(GUI_ALARMS) + promptgroup("70 - Alarm") pp(TRUE) interest(1) - prop(YES) + prop(YES) menu(menuAlarmSevr) } field(HYST,DBF_DOUBLE) { prompt("Alarm Deadband") - promptgroup(GUI_ALARMS) + promptgroup("70 - Alarm") interest(1) } field(ADEL,DBF_DOUBLE) { prompt("Archive Deadband") - promptgroup(GUI_DISPLAY) + promptgroup("80 - Display") interest(1) } field(MDEL,DBF_DOUBLE) { prompt("Monitor Deadband") - promptgroup(GUI_DISPLAY) + promptgroup("80 - Display") interest(1) } field(RVAL,DBF_LONG) { @@ -529,12 +529,12 @@ information on these fields. } field(SIOL,DBF_OUTLINK) { prompt("Sim Output Specifctn") - promptgroup(GUI_INPUTS) + promptgroup("90 - Simulate") interest(1) } field(SIML,DBF_INLINK) { prompt("Sim Mode Location") - promptgroup(GUI_INPUTS) + promptgroup("90 - Simulate") interest(1) } field(SIMM,DBF_MENU) { @@ -544,19 +544,19 @@ information on these fields. } field(SIMS,DBF_MENU) { prompt("Sim mode Alarm Svrty") - promptgroup(GUI_INPUTS) + promptgroup("90 - Simulate") interest(2) menu(menuAlarmSevr) } field(IVOA,DBF_MENU) { prompt("INVALID output action") - promptgroup(GUI_OUTPUT) + promptgroup("50 - Output") interest(2) menu(menuIvoa) } field(IVOV,DBF_DOUBLE) { prompt("INVALID output value") - promptgroup(GUI_OUTPUT) + promptgroup("50 - Output") interest(2) } field(OMOD,DBF_UCHAR) { diff --git a/src/std/rec/biRecord.c b/src/std/rec/biRecord.c index 1e09ce2f7..7afea3d9d 100644 --- a/src/std/rec/biRecord.c +++ b/src/std/rec/biRecord.c @@ -7,8 +7,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ -/* $Revision-Id$ */ - /* recBi.c - Record Support Routines for Binary Input records */ /* * Original Author: Bob Dalesio @@ -43,8 +41,8 @@ /* Create RSET - Record Support Entry Table*/ #define report NULL #define initialize NULL -static long init_record(biRecord *, int); -static long process(biRecord *); +static long init_record(struct dbCommon *, int); +static long process(struct dbCommon *); #define special NULL #define get_value NULL #define cvt_dbaddr NULL @@ -52,9 +50,9 @@ static long process(biRecord *); #define put_array_info NULL #define get_units NULL #define get_precision NULL -static long get_enum_str(DBADDR *, char *); -static long get_enum_strs(DBADDR *, struct dbr_enumStrs *); -static long put_enum_str(DBADDR *, char *); +static long get_enum_str(const DBADDR *, char *); +static long get_enum_strs(const DBADDR *, struct dbr_enumStrs *); +static long put_enum_str(const DBADDR *, const char *); #define get_graphic_double NULL #define get_control_double NULL #define get_alarm_double NULL @@ -91,8 +89,9 @@ static void checkAlarms(biRecord *); static void monitor(biRecord *); static long readValue(biRecord *); -static long init_record(biRecord *prec, int pass) +static long init_record(struct dbCommon *pcommon, int pass) { + struct biRecord *prec = (struct biRecord *)pcommon; struct bidset *pdset; long status; @@ -118,9 +117,10 @@ static long init_record(biRecord *prec, int pass) return(0); } -static long process(biRecord *prec) +static long process(struct dbCommon *pcommon) { - struct bidset *pdset = (struct bidset *)(prec->dset); + struct biRecord *prec = (struct biRecord *)pcommon; + struct bidset *pdset = (struct bidset *)(prec->dset); long status; unsigned char pact=prec->pact; @@ -153,7 +153,7 @@ static long process(biRecord *prec) return(status); } -static long get_enum_str(DBADDR *paddr, char *pstring) +static long get_enum_str(const DBADDR *paddr, char *pstring) { biRecord *prec=(biRecord *)paddr->precord; int index; @@ -175,7 +175,7 @@ static long get_enum_str(DBADDR *paddr, char *pstring) return(0); } -static long get_enum_strs(DBADDR *paddr,struct dbr_enumStrs *pes) +static long get_enum_strs(const DBADDR *paddr,struct dbr_enumStrs *pes) { biRecord *prec=(biRecord *)paddr->precord; @@ -188,7 +188,7 @@ static long get_enum_strs(DBADDR *paddr,struct dbr_enumStrs *pes) return(0); } -static long put_enum_str(DBADDR *paddr, char *pstring) +static long put_enum_str(const DBADDR *paddr, const char *pstring) { biRecord *prec=(biRecord *)paddr->precord; diff --git a/src/std/rec/biRecord.dbd b/src/std/rec/biRecord.dbd index 501ecab83..fb3588fb1 100644 --- a/src/std/rec/biRecord.dbd +++ b/src/std/rec/biRecord.dbd @@ -3,47 +3,46 @@ # National Laboratory. # Copyright (c) 2002 The Regents of the University of California, as # Operator of Los Alamos National Laboratory. -# EPICS BASE Versions 3.13.7 -# and higher are distributed subject to a Software License Agreement found -# in file LICENSE that is included with this distribution. +# EPICS BASE is distributed subject to a Software License Agreement found +# in file LICENSE that is included with this distribution. #************************************************************************* recordtype(bi) { include "dbCommon.dbd" field(INP,DBF_INLINK) { prompt("Input Specification") - promptgroup(GUI_INPUTS) + promptgroup("40 - Input") interest(1) } field(VAL,DBF_ENUM) { prompt("Current Value") - promptgroup(GUI_INPUTS) + promptgroup("40 - Input") asl(ASL0) pp(TRUE) } field(ZSV,DBF_MENU) { prompt("Zero Error Severity") - promptgroup(GUI_ALARMS) + promptgroup("70 - Alarm") pp(TRUE) interest(1) menu(menuAlarmSevr) } field(OSV,DBF_MENU) { prompt("One Error Severity") - promptgroup(GUI_ALARMS) + promptgroup("70 - Alarm") pp(TRUE) interest(1) menu(menuAlarmSevr) } field(COSV,DBF_MENU) { prompt("Change of State Svr") - promptgroup(GUI_ALARMS) + promptgroup("70 - Alarm") pp(TRUE) interest(1) menu(menuAlarmSevr) } field(ZNAM,DBF_STRING) { prompt("Zero Name") - promptgroup(GUI_DISPLAY) + promptgroup("80 - Display") pp(TRUE) interest(1) size(26) @@ -51,7 +50,7 @@ recordtype(bi) { } field(ONAM,DBF_STRING) { prompt("One Name") - promptgroup(GUI_DISPLAY) + promptgroup("80 - Display") pp(TRUE) interest(1) size(26) @@ -83,7 +82,7 @@ recordtype(bi) { } field(SIOL,DBF_INLINK) { prompt("Sim Input Specifctn") - promptgroup(GUI_INPUTS) + promptgroup("90 - Simulate") interest(1) } field(SVAL,DBF_ULONG) { @@ -91,7 +90,7 @@ recordtype(bi) { } field(SIML,DBF_INLINK) { prompt("Sim Mode Location") - promptgroup(GUI_INPUTS) + promptgroup("90 - Simulate") interest(1) } field(SIMM,DBF_MENU) { @@ -101,7 +100,7 @@ recordtype(bi) { } field(SIMS,DBF_MENU) { prompt("Sim mode Alarm Svrty") - promptgroup(GUI_INPUTS) + promptgroup("90 - Simulate") interest(2) menu(menuAlarmSevr) } diff --git a/src/std/rec/boRecord.c b/src/std/rec/boRecord.c index 24b842d87..8f60a0be5 100644 --- a/src/std/rec/boRecord.c +++ b/src/std/rec/boRecord.c @@ -7,8 +7,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ -/* $Revision-Id$ */ - /* recBo.c - Record Support Routines for Binary Output records */ /* * Original Author: Bob Dalesio @@ -45,18 +43,18 @@ /* Create RSET - Record Support Entry Table*/ #define report NULL #define initialize NULL -static long init_record(boRecord *, int); -static long process(boRecord *); +static long init_record(struct dbCommon *, int); +static long process(struct dbCommon *); #define special NULL #define get_value NULL #define cvt_dbaddr NULL #define get_array_info NULL #define put_array_info NULL static long get_units(DBADDR *, char *); -static long get_precision(DBADDR *, long *); -static long get_enum_str(DBADDR *, char *); -static long get_enum_strs(DBADDR *, struct dbr_enumStrs *); -static long put_enum_str(DBADDR *, char *); +static long get_precision(const DBADDR *, long *); +static long get_enum_str(const DBADDR *, char *); +static long get_enum_strs(const DBADDR *, struct dbr_enumStrs *); +static long put_enum_str(const DBADDR *, const char *); #define get_graphic_double NULL static long get_control_double(DBADDR *, struct dbr_ctrlDouble *); #define get_alarm_double NULL @@ -130,8 +128,9 @@ static void myCallbackFunc(CALLBACK *arg) dbScanUnlock((struct dbCommon *)prec); } -static long init_record(boRecord *prec,int pass) +static long init_record(struct dbCommon *pcommon,int pass) { + struct boRecord *prec = (struct boRecord *)pcommon; struct bodset *pdset = (struct bodset *) prec->dset; unsigned short ival = 0; long status = 0; @@ -187,9 +186,10 @@ static long init_record(boRecord *prec,int pass) return(status); } -static long process(boRecord *prec) +static long process(struct dbCommon *pcommon) { - struct bodset *pdset = (struct bodset *)(prec->dset); + struct boRecord *prec = (struct boRecord *)pcommon; + struct bodset *pdset = (struct bodset *)(prec->dset); long status=0; unsigned char pact=prec->pact; @@ -280,7 +280,7 @@ static long get_units(DBADDR *paddr, char *units) return(0); } -static long get_precision(DBADDR *paddr, long *precision) +static long get_precision(const DBADDR *paddr, long *precision) { if(dbGetFieldIndex(paddr) == indexof(HIGH)) *precision = boHIGHprecision; @@ -299,7 +299,7 @@ static long get_control_double(DBADDR *paddr,struct dbr_ctrlDouble *pcd) return(0); } -static long get_enum_str(DBADDR *paddr, char *pstring) +static long get_enum_str(const DBADDR *paddr, char *pstring) { boRecord *prec=(boRecord *)paddr->precord; int index; @@ -321,7 +321,7 @@ static long get_enum_str(DBADDR *paddr, char *pstring) return(0); } -static long get_enum_strs(DBADDR *paddr,struct dbr_enumStrs *pes) +static long get_enum_strs(const DBADDR *paddr,struct dbr_enumStrs *pes) { boRecord *prec=(boRecord *)paddr->precord; @@ -334,7 +334,7 @@ static long get_enum_strs(DBADDR *paddr,struct dbr_enumStrs *pes) if(*prec->onam!=0) pes->no_str=2; return(0); } -static long put_enum_str(DBADDR *paddr, char *pstring) +static long put_enum_str(const DBADDR *paddr, const char *pstring) { boRecord *prec=(boRecord *)paddr->precord; diff --git a/src/std/rec/boRecord.dbd b/src/std/rec/boRecord.dbd index 9a861f157..fd002c368 100644 --- a/src/std/rec/boRecord.dbd +++ b/src/std/rec/boRecord.dbd @@ -3,42 +3,41 @@ # National Laboratory. # Copyright (c) 2002 The Regents of the University of California, as # Operator of Los Alamos National Laboratory. -# EPICS BASE Versions 3.13.7 -# and higher are distributed subject to a Software License Agreement found -# in file LICENSE that is included with this distribution. +# EPICS BASE is distributed subject to a Software License Agreement found +# in file LICENSE that is included with this distribution. #************************************************************************* recordtype(bo) { include "dbCommon.dbd" field(VAL,DBF_ENUM) { prompt("Current Value") - promptgroup(GUI_OUTPUT) + promptgroup("50 - Output") asl(ASL0) pp(TRUE) } field(OMSL,DBF_MENU) { prompt("Output Mode Select") - promptgroup(GUI_OUTPUT) + promptgroup("50 - Output") interest(1) menu(menuOmsl) } field(DOL,DBF_INLINK) { prompt("Desired Output Loc") - promptgroup(GUI_OUTPUT) + promptgroup("40 - Input") interest(1) } field(OUT,DBF_OUTLINK) { prompt("Output Specification") - promptgroup(GUI_OUTPUT) + promptgroup("50 - Output") interest(1) } field(HIGH,DBF_DOUBLE) { prompt("Seconds to Hold High") - promptgroup(GUI_OUTPUT) + promptgroup("30 - Action") interest(1) } field(ZNAM,DBF_STRING) { prompt("Zero Name") - promptgroup(GUI_DISPLAY) + promptgroup("80 - Display") pp(TRUE) interest(1) size(26) @@ -46,7 +45,7 @@ recordtype(bo) { } field(ONAM,DBF_STRING) { prompt("One Name") - promptgroup(GUI_DISPLAY) + promptgroup("80 - Display") pp(TRUE) interest(1) size(26) @@ -80,21 +79,21 @@ recordtype(bo) { } field(ZSV,DBF_MENU) { prompt("Zero Error Severity") - promptgroup(GUI_ALARMS) + promptgroup("70 - Alarm") pp(TRUE) interest(1) menu(menuAlarmSevr) } field(OSV,DBF_MENU) { prompt("One Error Severity") - promptgroup(GUI_ALARMS) + promptgroup("70 - Alarm") pp(TRUE) interest(1) menu(menuAlarmSevr) } field(COSV,DBF_MENU) { prompt("Change of State Sevr") - promptgroup(GUI_ALARMS) + promptgroup("70 - Alarm") pp(TRUE) interest(1) menu(menuAlarmSevr) @@ -120,12 +119,12 @@ recordtype(bo) { } field(SIOL,DBF_OUTLINK) { prompt("Sim Output Specifctn") - promptgroup(GUI_INPUTS) + promptgroup("90 - Simulate") interest(1) } field(SIML,DBF_INLINK) { prompt("Sim Mode Location") - promptgroup(GUI_INPUTS) + promptgroup("90 - Simulate") interest(1) } field(SIMM,DBF_MENU) { @@ -135,19 +134,19 @@ recordtype(bo) { } field(SIMS,DBF_MENU) { prompt("Sim mode Alarm Svrty") - promptgroup(GUI_INPUTS) + promptgroup("90 - Simulate") interest(2) menu(menuAlarmSevr) } field(IVOA,DBF_MENU) { prompt("INVALID outpt action") - promptgroup(GUI_OUTPUT) + promptgroup("50 - Output") interest(2) menu(menuIvoa) } field(IVOV,DBF_USHORT) { prompt("INVALID output value") - promptgroup(GUI_OUTPUT) + promptgroup("50 - Output") interest(2) } } diff --git a/src/std/rec/calcRecord.c b/src/std/rec/calcRecord.c index b479b779b..12a58d1c8 100644 --- a/src/std/rec/calcRecord.c +++ b/src/std/rec/calcRecord.c @@ -7,8 +7,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ -/* $Revision-Id$ */ - /* Record Support Routines for Calculation records */ /* * Original Author: Julie Sander and Bob Dalesio @@ -45,15 +43,15 @@ #define report NULL #define initialize NULL -static long init_record(calcRecord *prec, int pass); -static long process(calcRecord *prec); +static long init_record(struct dbCommon *prec, int pass); +static long process(struct dbCommon *prec); static long special(DBADDR *paddr, int after); #define get_value NULL #define cvt_dbaddr NULL #define get_array_info NULL #define put_array_info NULL static long get_units(DBADDR *paddr, char *units); -static long get_precision(DBADDR *paddr, long *precision); +static long get_precision(const DBADDR *paddr, long *precision); #define get_enum_str NULL #define get_enum_strs NULL #define put_enum_str NULL @@ -88,8 +86,9 @@ static void monitor(calcRecord *prec); static int fetch_values(calcRecord *prec); -static long init_record(calcRecord *prec, int pass) +static long init_record(struct dbCommon *pcommon, int pass) { + struct calcRecord *prec = (struct calcRecord *)pcommon; struct link *plink; double *pvalue; int i; @@ -111,8 +110,9 @@ static long init_record(calcRecord *prec, int pass) return 0; } -static long process(calcRecord *prec) +static long process(struct dbCommon *pcommon) { + struct calcRecord *prec = (struct calcRecord *)pcommon; epicsTimeStamp timeLast; prec->pact = TRUE; @@ -180,7 +180,7 @@ static long get_units(DBADDR *paddr, char *units) return 0; } -static long get_precision(DBADDR *paddr, long *pprecision) +static long get_precision(const DBADDR *paddr, long *pprecision) { calcRecord *prec = (calcRecord *)paddr->precord; int fieldIndex = dbGetFieldIndex(paddr); diff --git a/src/std/rec/calcRecord.dbd b/src/std/rec/calcRecord.dbd index 27c21da95..e7eb0eee3 100644 --- a/src/std/rec/calcRecord.dbd +++ b/src/std/rec/calcRecord.dbd @@ -10,11 +10,12 @@ recordtype(calc) { include "dbCommon.dbd" field(VAL,DBF_DOUBLE) { prompt("Result") + promptgroup("50 - Output") asl(ASL0) } field(CALC,DBF_STRING) { prompt("Calculation") - promptgroup(GUI_CALC) + promptgroup("30 - Action") special(SPC_CALC) pp(TRUE) size(80) @@ -22,120 +23,120 @@ recordtype(calc) { } field(INPA,DBF_INLINK) { prompt("Input A") - promptgroup(GUI_CALC) + promptgroup("41 - Input A-F") interest(1) } field(INPB,DBF_INLINK) { prompt("Input B") - promptgroup(GUI_CALC) + promptgroup("41 - Input A-F") interest(1) } field(INPC,DBF_INLINK) { prompt("Input C") - promptgroup(GUI_CALC) + promptgroup("41 - Input A-F") interest(1) } field(INPD,DBF_INLINK) { prompt("Input D") - promptgroup(GUI_CALC) + promptgroup("41 - Input A-F") interest(1) } field(INPE,DBF_INLINK) { prompt("Input E") - promptgroup(GUI_CALC) + promptgroup("41 - Input A-F") interest(1) } field(INPF,DBF_INLINK) { prompt("Input F") - promptgroup(GUI_CALC) + promptgroup("41 - Input A-F") interest(1) } field(INPG,DBF_INLINK) { prompt("Input G") - promptgroup(GUI_CALC) + promptgroup("42 - Input G-L") interest(1) } field(INPH,DBF_INLINK) { prompt("Input H") - promptgroup(GUI_CALC) + promptgroup("42 - Input G-L") interest(1) } field(INPI,DBF_INLINK) { prompt("Input I") - promptgroup(GUI_CALC) + promptgroup("42 - Input G-L") interest(1) } field(INPJ,DBF_INLINK) { prompt("Input J") - promptgroup(GUI_CALC) + promptgroup("42 - Input G-L") interest(1) } field(INPK,DBF_INLINK) { prompt("Input K") - promptgroup(GUI_CALC) + promptgroup("42 - Input G-L") interest(1) } field(INPL,DBF_INLINK) { prompt("Input L") - promptgroup(GUI_CALC) + promptgroup("42 - Input G-L") interest(1) } field(EGU,DBF_STRING) { - prompt("Units Name") - promptgroup(GUI_DISPLAY) + prompt("Engineering Units") + promptgroup("80 - Display") interest(1) size(16) prop(YES) } field(PREC,DBF_SHORT) { prompt("Display Precision") - promptgroup(GUI_DISPLAY) + promptgroup("80 - Display") interest(1) prop(YES) } field(HOPR,DBF_DOUBLE) { prompt("High Operating Rng") - promptgroup(GUI_DISPLAY) + promptgroup("80 - Display") interest(1) prop(YES) } field(LOPR,DBF_DOUBLE) { prompt("Low Operating Range") - promptgroup(GUI_DISPLAY) + promptgroup("80 - Display") interest(1) prop(YES) } field(HIHI,DBF_DOUBLE) { prompt("Hihi Alarm Limit") - promptgroup(GUI_ALARMS) + promptgroup("70 - Alarm") pp(TRUE) interest(1) prop(YES) } field(LOLO,DBF_DOUBLE) { prompt("Lolo Alarm Limit") - promptgroup(GUI_ALARMS) + promptgroup("70 - Alarm") pp(TRUE) interest(1) prop(YES) } field(HIGH,DBF_DOUBLE) { prompt("High Alarm Limit") - promptgroup(GUI_ALARMS) + promptgroup("70 - Alarm") pp(TRUE) interest(1) prop(YES) } field(LOW,DBF_DOUBLE) { prompt("Low Alarm Limit") - promptgroup(GUI_ALARMS) + promptgroup("70 - Alarm") pp(TRUE) interest(1) prop(YES) } field(HHSV,DBF_MENU) { prompt("Hihi Severity") - promptgroup(GUI_ALARMS) + promptgroup("70 - Alarm") pp(TRUE) interest(1) prop(YES) @@ -143,7 +144,7 @@ recordtype(calc) { } field(LLSV,DBF_MENU) { prompt("Lolo Severity") - promptgroup(GUI_ALARMS) + promptgroup("70 - Alarm") pp(TRUE) interest(1) prop(YES) @@ -151,7 +152,7 @@ recordtype(calc) { } field(HSV,DBF_MENU) { prompt("High Severity") - promptgroup(GUI_ALARMS) + promptgroup("70 - Alarm") pp(TRUE) interest(1) prop(YES) @@ -159,35 +160,35 @@ recordtype(calc) { } field(LSV,DBF_MENU) { prompt("Low Severity") - promptgroup(GUI_ALARMS) + promptgroup("70 - Alarm") pp(TRUE) interest(1) prop(YES) menu(menuAlarmSevr) } - field(AFTC, DBF_DOUBLE) { - prompt("Alarm Filter Time Constant") - promptgroup(GUI_ALARMS) - interest(1) - } - field(AFVL, DBF_DOUBLE) { - prompt("Alarm Filter Value") - special(SPC_NOMOD) - interest(3) - } + field(AFTC, DBF_DOUBLE) { + prompt("Alarm Filter Time Constant") + promptgroup("70 - Alarm") + interest(1) + } + field(AFVL, DBF_DOUBLE) { + prompt("Alarm Filter Value") + special(SPC_NOMOD) + interest(3) + } field(HYST,DBF_DOUBLE) { prompt("Alarm Deadband") - promptgroup(GUI_ALARMS) + promptgroup("70 - Alarm") interest(1) } field(ADEL,DBF_DOUBLE) { prompt("Archive Deadband") - promptgroup(GUI_DISPLAY) + promptgroup("80 - Display") interest(1) } field(MDEL,DBF_DOUBLE) { prompt("Monitor Deadband") - promptgroup(GUI_DISPLAY) + promptgroup("80 - Display") interest(1) } field(A,DBF_DOUBLE) { diff --git a/src/std/rec/calcoutRecord.c b/src/std/rec/calcoutRecord.c index ab1f53fac..e1020938e 100644 --- a/src/std/rec/calcoutRecord.c +++ b/src/std/rec/calcoutRecord.c @@ -47,15 +47,15 @@ /* Create RSET - Record Support Entry Table*/ #define report NULL #define initialize NULL -static long init_record(calcoutRecord *, int); -static long process(calcoutRecord *); +static long init_record(struct dbCommon *, int); +static long process(struct dbCommon *); static long special(DBADDR *, int); #define get_value NULL #define cvt_dbaddr NULL #define get_array_info NULL #define put_array_info NULL static long get_units(DBADDR *, char *); -static long get_precision(DBADDR *, long *); +static long get_precision(const DBADDR *, long *); #define get_enum_str NULL #define get_enum_strs NULL #define put_enum_str NULL @@ -134,8 +134,9 @@ static long writeValue(calcoutRecord *prec); int calcoutRecDebug; -static long init_record(calcoutRecord *prec, int pass) +static long init_record(struct dbCommon *pcommon, int pass) { + struct calcoutRecord *prec = (struct calcoutRecord *)pcommon; DBLINK *plink; int i; double *pvalue; @@ -229,8 +230,9 @@ static long init_record(calcoutRecord *prec, int pass) return 0; } -static long process(calcoutRecord *prec) +static long process(struct dbCommon *pcommon) { + struct calcoutRecord *prec = (struct calcoutRecord *)pcommon; rpvtStruct *prpvt = prec->rpvt; int doOutput; @@ -434,7 +436,7 @@ static long get_units(DBADDR *paddr, char *units) return 0; } -static long get_precision(DBADDR *paddr, long *pprecision) +static long get_precision(const DBADDR *paddr, long *pprecision) { calcoutRecord *prec = (calcoutRecord *)paddr->precord; int fieldIndex = dbGetFieldIndex(paddr); diff --git a/src/std/rec/calcoutRecord.dbd b/src/std/rec/calcoutRecord.dbd index 4b6e2a5e2..5bf2e54de 100644 --- a/src/std/rec/calcoutRecord.dbd +++ b/src/std/rec/calcoutRecord.dbd @@ -34,7 +34,7 @@ recordtype(calcout) { } field(VAL,DBF_DOUBLE) { prompt("Result") - promptgroup(GUI_OUTPUT) + promptgroup("50 - Output") asl(ASL0) } field(PVAL,DBF_DOUBLE) { @@ -42,7 +42,7 @@ recordtype(calcout) { } field(CALC,DBF_STRING) { prompt("Calculation") - promptgroup(GUI_CALC) + promptgroup("30 - Action") special(SPC_CALC) pp(TRUE) size(80) @@ -55,79 +55,79 @@ recordtype(calcout) { field(INPA,DBF_INLINK) { prompt("Input A") special(SPC_MOD) - promptgroup(GUI_CALC) + promptgroup("41 - Input A-F") interest(1) } field(INPB,DBF_INLINK) { prompt("Input B") special(SPC_MOD) - promptgroup(GUI_CALC) + promptgroup("41 - Input A-F") interest(1) } field(INPC,DBF_INLINK) { prompt("Input C") special(SPC_MOD) - promptgroup(GUI_CALC) + promptgroup("41 - Input A-F") interest(1) } field(INPD,DBF_INLINK) { prompt("Input D") special(SPC_MOD) - promptgroup(GUI_CALC) + promptgroup("41 - Input A-F") interest(1) } field(INPE,DBF_INLINK) { prompt("Input E") special(SPC_MOD) - promptgroup(GUI_CALC) + promptgroup("41 - Input A-F") interest(1) } field(INPF,DBF_INLINK) { prompt("Input F") special(SPC_MOD) - promptgroup(GUI_CALC) + promptgroup("41 - Input A-F") interest(1) } field(INPG,DBF_INLINK) { prompt("Input G") special(SPC_MOD) - promptgroup(GUI_CALC) + promptgroup("42 - Input G-L") interest(1) } field(INPH,DBF_INLINK) { prompt("Input H") special(SPC_MOD) - promptgroup(GUI_CALC) + promptgroup("42 - Input G-L") interest(1) } field(INPI,DBF_INLINK) { prompt("Input I") special(SPC_MOD) - promptgroup(GUI_CALC) + promptgroup("42 - Input G-L") interest(1) } field(INPJ,DBF_INLINK) { prompt("Input J") special(SPC_MOD) - promptgroup(GUI_CALC) + promptgroup("42 - Input G-L") interest(1) } field(INPK,DBF_INLINK) { prompt("Input K") special(SPC_MOD) - promptgroup(GUI_CALC) + promptgroup("42 - Input G-L") interest(1) } field(INPL,DBF_INLINK) { prompt("Input L") special(SPC_MOD) - promptgroup(GUI_CALC) + promptgroup("42 - Input G-L") interest(1) } field(OUT,DBF_OUTLINK) { prompt("Output Specification") special(SPC_MOD) - promptgroup(GUI_OUTPUT) + promptgroup("50 - Output") interest(1) } field(INAV,DBF_MENU) { @@ -222,13 +222,13 @@ recordtype(calcout) { } field(OOPT,DBF_MENU) { prompt("Output Execute Opt") - promptgroup(GUI_CALC) + promptgroup("50 - Output") interest(1) menu(calcoutOOPT) } field(ODLY,DBF_DOUBLE) { prompt("Output Execute Delay") - promptgroup(GUI_ALARMS) + promptgroup("50 - Output") asl(ASL0) interest(1) } @@ -239,13 +239,13 @@ recordtype(calcout) { } field(DOPT,DBF_MENU) { prompt("Output Data Opt") - promptgroup(GUI_CALC) + promptgroup("30 - Action") interest(1) menu(calcoutDOPT) } field(OCAL,DBF_STRING) { prompt("Output Calculation") - promptgroup(GUI_CALC) + promptgroup("30 - Action") special(SPC_CALC) pp(TRUE) size(80) @@ -257,7 +257,7 @@ recordtype(calcout) { } field(OEVT,DBF_STRING) { prompt("Event To Issue") - promptgroup(GUI_CLOCK) + promptgroup("30 - Action") special(SPC_MOD) asl(ASL0) size(40) @@ -271,71 +271,71 @@ recordtype(calcout) { } field(IVOA,DBF_MENU) { prompt("INVALID output action") - promptgroup(GUI_OUTPUT) + promptgroup("50 - Output") interest(2) menu(menuIvoa) } field(IVOV,DBF_DOUBLE) { prompt("INVALID output value") - promptgroup(GUI_OUTPUT) + promptgroup("50 - Output") interest(2) } field(EGU,DBF_STRING) { - prompt("Units Name") - promptgroup(GUI_DISPLAY) + prompt("Engineering Units") + promptgroup("80 - Display") interest(1) size(16) prop(YES) } field(PREC,DBF_SHORT) { prompt("Display Precision") - promptgroup(GUI_DISPLAY) + promptgroup("80 - Display") interest(1) prop(YES) } field(HOPR,DBF_DOUBLE) { prompt("High Operating Rng") - promptgroup(GUI_DISPLAY) + promptgroup("80 - Display") interest(1) prop(YES) } field(LOPR,DBF_DOUBLE) { prompt("Low Operating Range") - promptgroup(GUI_DISPLAY) + promptgroup("80 - Display") interest(1) prop(YES) } field(HIHI,DBF_DOUBLE) { prompt("Hihi Alarm Limit") - promptgroup(GUI_ALARMS) + promptgroup("70 - Alarm") pp(TRUE) interest(1) prop(YES) } field(LOLO,DBF_DOUBLE) { prompt("Lolo Alarm Limit") - promptgroup(GUI_ALARMS) + promptgroup("70 - Alarm") pp(TRUE) interest(1) prop(YES) } field(HIGH,DBF_DOUBLE) { prompt("High Alarm Limit") - promptgroup(GUI_ALARMS) + promptgroup("70 - Alarm") pp(TRUE) interest(1) prop(YES) } field(LOW,DBF_DOUBLE) { prompt("Low Alarm Limit") - promptgroup(GUI_ALARMS) + promptgroup("70 - Alarm") pp(TRUE) interest(1) prop(YES) } field(HHSV,DBF_MENU) { prompt("Hihi Severity") - promptgroup(GUI_ALARMS) + promptgroup("70 - Alarm") pp(TRUE) interest(1) prop(YES) @@ -343,7 +343,7 @@ recordtype(calcout) { } field(LLSV,DBF_MENU) { prompt("Lolo Severity") - promptgroup(GUI_ALARMS) + promptgroup("70 - Alarm") pp(TRUE) interest(1) prop(YES) @@ -351,7 +351,7 @@ recordtype(calcout) { } field(HSV,DBF_MENU) { prompt("High Severity") - promptgroup(GUI_ALARMS) + promptgroup("70 - Alarm") pp(TRUE) interest(1) prop(YES) @@ -359,7 +359,7 @@ recordtype(calcout) { } field(LSV,DBF_MENU) { prompt("Low Severity") - promptgroup(GUI_ALARMS) + promptgroup("70 - Alarm") pp(TRUE) interest(1) prop(YES) @@ -367,17 +367,17 @@ recordtype(calcout) { } field(HYST,DBF_DOUBLE) { prompt("Alarm Deadband") - promptgroup(GUI_ALARMS) + promptgroup("70 - Alarm") interest(1) } field(ADEL,DBF_DOUBLE) { prompt("Archive Deadband") - promptgroup(GUI_DISPLAY) + promptgroup("80 - Display") interest(1) } field(MDEL,DBF_DOUBLE) { prompt("Monitor Deadband") - promptgroup(GUI_DISPLAY) + promptgroup("80 - Display") interest(1) } field(A,DBF_DOUBLE) { diff --git a/src/std/rec/compressRecord.c b/src/std/rec/compressRecord.c index c6bdbd869..4b4de5f15 100644 --- a/src/std/rec/compressRecord.c +++ b/src/std/rec/compressRecord.c @@ -7,7 +7,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ -/* $Revision-Id$ */ /* * Original Author: Bob Dalesio * Date: 7-14-89 @@ -42,15 +41,15 @@ /* Create RSET - Record Support Entry Table*/ #define report NULL #define initialize NULL -static long init_record(compressRecord *, int); -static long process(compressRecord *); +static long init_record(struct dbCommon *, int); +static long process(struct dbCommon *); static long special(DBADDR *, int); #define get_value NULL static long cvt_dbaddr(DBADDR *); static long get_array_info(DBADDR *, long *, long *); static long put_array_info(DBADDR *, long); static long get_units(DBADDR *, char *); -static long get_precision(DBADDR *, long *); +static long get_precision(const DBADDR *, long *); #define get_enum_str NULL #define get_enum_strs NULL #define put_enum_str NULL @@ -313,8 +312,9 @@ static int compress_scalar(struct compressRecord *prec,double *psource) } /*Beginning of record support routines*/ -static long init_record(compressRecord *prec, int pass) +static long init_record(struct dbCommon *pcommon, int pass) { + struct compressRecord *prec = (struct compressRecord *)pcommon; if (pass == 0) { if (prec->nsam < 1) prec->nsam = 1; @@ -325,8 +325,9 @@ static long init_record(compressRecord *prec, int pass) return 0; } -static long process(compressRecord *prec) +static long process(struct dbCommon *pcommon) { + struct compressRecord *prec = (struct compressRecord *)pcommon; long status = 0; long nelements = 0; int alg = prec->alg; @@ -458,7 +459,7 @@ static long get_units(DBADDR *paddr, char *units) return 0; } -static long get_precision(DBADDR *paddr, long *precision) +static long get_precision(const DBADDR *paddr, long *precision) { compressRecord *prec = (compressRecord *) paddr->precord; diff --git a/src/std/rec/compressRecord.dbd.pod b/src/std/rec/compressRecord.dbd.pod index 93d1e63bf..c1cb8cc29 100644 --- a/src/std/rec/compressRecord.dbd.pod +++ b/src/std/rec/compressRecord.dbd.pod @@ -79,7 +79,7 @@ recordtype(compress) { } field(INP,DBF_INLINK) { prompt("Input Specification") - promptgroup(GUI_COMPRESS) + promptgroup("40 - Input") interest(1) } field(RES,DBF_SHORT) { @@ -90,7 +90,7 @@ recordtype(compress) { } field(ALG,DBF_MENU) { prompt("Compression Algorithm") - promptgroup(GUI_ALARMS) + promptgroup("30 - Action") special(SPC_RESET) interest(1) menu(compressALG) @@ -104,49 +104,49 @@ recordtype(compress) { } field(NSAM,DBF_ULONG) { prompt("Number of Values") - promptgroup(GUI_COMPRESS) + promptgroup("30 - Action") special(SPC_NOMOD) interest(1) initial("1") } field(N,DBF_ULONG) { prompt("N to 1 Compression") - promptgroup(GUI_COMPRESS) + promptgroup("30 - Action") special(SPC_RESET) interest(1) initial("1") } field(IHIL,DBF_DOUBLE) { prompt("Init High Interest Lim") - promptgroup(GUI_COMPRESS) + promptgroup("30 - Action") interest(1) } field(ILIL,DBF_DOUBLE) { prompt("Init Low Interest Lim") - promptgroup(GUI_COMPRESS) + promptgroup("30 - Action") interest(1) } field(HOPR,DBF_DOUBLE) { prompt("High Operating Range") - promptgroup(GUI_DISPLAY) + promptgroup("80 - Display") interest(1) prop(YES) } field(LOPR,DBF_DOUBLE) { prompt("Low Operating Range") - promptgroup(GUI_DISPLAY) + promptgroup("80 - Display") interest(1) prop(YES) } field(PREC,DBF_SHORT) { prompt("Display Precision") - promptgroup(GUI_DISPLAY) + promptgroup("80 - Display") interest(1) prop(YES) } field(EGU,DBF_STRING) { - prompt("EngineeringUnits") - promptgroup(GUI_DISPLAY) + prompt("Engineering Units") + promptgroup("80 - Display") interest(1) size(16) prop(YES) diff --git a/src/std/rec/dfanoutRecord.c b/src/std/rec/dfanoutRecord.c index d25093d4f..4672fc413 100644 --- a/src/std/rec/dfanoutRecord.c +++ b/src/std/rec/dfanoutRecord.c @@ -5,8 +5,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ -/* $Revision-Id$ */ - /* recDfanout.c - Record Support Routines for Dfanout records */ /* * Original Author: Matt Bickley (Sometime in 1994) @@ -47,15 +45,15 @@ /* Create RSET - Record Support Entry Table*/ #define report NULL #define initialize NULL -static long init_record(dfanoutRecord *, int); -static long process(dfanoutRecord *); +static long init_record(struct dbCommon *, int); +static long process(struct dbCommon *); #define special NULL #define get_value NULL #define cvt_dbaddr NULL #define get_array_info NULL #define put_array_info NULL static long get_units(DBADDR *, char *); -static long get_precision(DBADDR *, long *); +static long get_precision(const DBADDR *, long *); #define get_enum_str NULL #define get_enum_strs NULL #define put_enum_str NULL @@ -93,8 +91,9 @@ static void push_values(dfanoutRecord *); #define OUT_ARG_MAX 8 -static long init_record(dfanoutRecord *prec, int pass) +static long init_record(struct dbCommon *pcommon, int pass) { + struct dfanoutRecord *prec = (struct dfanoutRecord *)pcommon; if (pass==0) return 0; @@ -107,8 +106,9 @@ static long init_record(dfanoutRecord *prec, int pass) return 0; } -static long process(dfanoutRecord *prec) +static long process(struct dbCommon *pcommon) { + struct dfanoutRecord *prec = (struct dfanoutRecord *)pcommon; long status=0; if (!prec->pact && @@ -142,7 +142,7 @@ static long get_units(DBADDR *paddr,char *units) return(0); } -static long get_precision(DBADDR *paddr,long *precision) +static long get_precision(const DBADDR *paddr,long *precision) { dfanoutRecord *prec=(dfanoutRecord *)paddr->precord; diff --git a/src/std/rec/dfanoutRecord.dbd b/src/std/rec/dfanoutRecord.dbd index 4e61907c7..c2eb42a75 100644 --- a/src/std/rec/dfanoutRecord.dbd +++ b/src/std/rec/dfanoutRecord.dbd @@ -3,145 +3,145 @@ # National Laboratory. # Copyright (c) 2002 The Regents of the University of California, as # Operator of Los Alamos National Laboratory. -# EPICS BASE Versions 3.13.7 -# and higher are distributed subject to a Software License Agreement found -# in file LICENSE that is included with this distribution. +# EPICS BASE is distributed subject to a Software License Agreement found +# in file LICENSE that is included with this distribution. #************************************************************************* menu(dfanoutSELM) { - choice(dfanoutSELM_All,"All") - choice(dfanoutSELM_Specified,"Specified") - choice(dfanoutSELM_Mask,"Mask") + choice(dfanoutSELM_All,"All") + choice(dfanoutSELM_Specified,"Specified") + choice(dfanoutSELM_Mask,"Mask") } recordtype(dfanout) { include "dbCommon.dbd" field(VAL,DBF_DOUBLE) { prompt("Desired Output") + promptgroup("40 - Input") asl(ASL0) pp(TRUE) } - field(SELM,DBF_MENU) { - prompt("Select Mechanism") - promptgroup(GUI_LINKS) - interest(1) - menu(dfanoutSELM) - } - field(SELN,DBF_USHORT) { - prompt("Link Selection") - interest(1) - initial("1") - } - field(SELL,DBF_INLINK) { - prompt("Link Selection Loc") - promptgroup(GUI_LINKS) - interest(1) - } + field(SELM,DBF_MENU) { + prompt("Select Mechanism") + promptgroup("30 - Action") + interest(1) + menu(dfanoutSELM) + } + field(SELN,DBF_USHORT) { + prompt("Link Selection") + interest(1) + initial("1") + } + field(SELL,DBF_INLINK) { + prompt("Link Selection Loc") + promptgroup("30 - Action") + interest(1) + } field(OUTA,DBF_OUTLINK) { prompt("Output Spec A") - promptgroup(GUI_OUTPUT) + promptgroup("50 - Output") interest(1) } field(OUTB,DBF_OUTLINK) { prompt("Output Spec B") - promptgroup(GUI_OUTPUT) + promptgroup("50 - Output") interest(1) } field(OUTC,DBF_OUTLINK) { prompt("Output Spec C") - promptgroup(GUI_OUTPUT) + promptgroup("50 - Output") interest(1) } field(OUTD,DBF_OUTLINK) { prompt("Output Spec D") - promptgroup(GUI_OUTPUT) + promptgroup("50 - Output") interest(1) } field(OUTE,DBF_OUTLINK) { prompt("Output Spec E") - promptgroup(GUI_OUTPUT) + promptgroup("50 - Output") interest(1) } field(OUTF,DBF_OUTLINK) { prompt("Output Spec F") - promptgroup(GUI_OUTPUT) + promptgroup("50 - Output") interest(1) } field(OUTG,DBF_OUTLINK) { prompt("Output Spec G") - promptgroup(GUI_OUTPUT) + promptgroup("50 - Output") interest(1) } field(OUTH,DBF_OUTLINK) { prompt("Output Spec H") - promptgroup(GUI_OUTPUT) + promptgroup("50 - Output") interest(1) } field(DOL,DBF_INLINK) { prompt("Desired Output Loc") - promptgroup(GUI_INPUTS) + promptgroup("40 - Input") interest(1) } field(OMSL,DBF_MENU) { prompt("Output Mode Select") - promptgroup(GUI_OUTPUT) + promptgroup("50 - Output") interest(1) menu(menuOmsl) } field(EGU,DBF_STRING) { - prompt("Units name") - promptgroup(GUI_DISPLAY) + prompt("Engineering Units") + promptgroup("80 - Display") interest(1) size(16) prop(YES) } - field(PREC,DBF_SHORT) { - prompt("Display Precision") - promptgroup(GUI_DISPLAY) - interest(1) + field(PREC,DBF_SHORT) { + prompt("Display Precision") + promptgroup("80 - Display") + interest(1) prop(YES) - } + } field(HOPR,DBF_DOUBLE) { prompt("High Operating Range") - promptgroup(GUI_DISPLAY) + promptgroup("80 - Display") interest(1) prop(YES) } field(LOPR,DBF_DOUBLE) { prompt("Low Operating Range") - promptgroup(GUI_DISPLAY) + promptgroup("80 - Display") interest(1) prop(YES) } field(HIHI,DBF_DOUBLE) { prompt("Hihi Alarm Limit") - promptgroup(GUI_ALARMS) + promptgroup("70 - Alarm") pp(TRUE) interest(1) prop(YES) } field(LOLO,DBF_DOUBLE) { prompt("Lolo Alarm Limit") - promptgroup(GUI_ALARMS) + promptgroup("70 - Alarm") pp(TRUE) interest(1) prop(YES) } field(HIGH,DBF_DOUBLE) { prompt("High Alarm Limit") - promptgroup(GUI_ALARMS) + promptgroup("70 - Alarm") pp(TRUE) interest(1) prop(YES) } field(LOW,DBF_DOUBLE) { prompt("Low Alarm Limit") - promptgroup(GUI_ALARMS) + promptgroup("70 - Alarm") pp(TRUE) interest(1) prop(YES) } field(HHSV,DBF_MENU) { prompt("Hihi Severity") - promptgroup(GUI_ALARMS) + promptgroup("70 - Alarm") pp(TRUE) interest(1) prop(YES) @@ -149,7 +149,7 @@ recordtype(dfanout) { } field(LLSV,DBF_MENU) { prompt("Lolo Severity") - promptgroup(GUI_ALARMS) + promptgroup("70 - Alarm") pp(TRUE) interest(1) prop(YES) @@ -157,7 +157,7 @@ recordtype(dfanout) { } field(HSV,DBF_MENU) { prompt("High Severity") - promptgroup(GUI_ALARMS) + promptgroup("70 - Alarm") pp(TRUE) interest(1) prop(YES) @@ -165,7 +165,7 @@ recordtype(dfanout) { } field(LSV,DBF_MENU) { prompt("Low Severity") - promptgroup(GUI_ALARMS) + promptgroup("70 - Alarm") pp(TRUE) interest(1) prop(YES) @@ -173,17 +173,17 @@ recordtype(dfanout) { } field(HYST,DBF_DOUBLE) { prompt("Alarm Deadband") - promptgroup(GUI_ALARMS) + promptgroup("70 - Alarm") interest(1) } field(ADEL,DBF_DOUBLE) { prompt("Archive Deadband") - promptgroup(GUI_DISPLAY) + promptgroup("80 - Display") interest(1) } field(MDEL,DBF_DOUBLE) { prompt("Monitor Deadband") - promptgroup(GUI_DISPLAY) + promptgroup("80 - Display") interest(1) } field(LALM,DBF_DOUBLE) { diff --git a/src/std/rec/eventRecord.c b/src/std/rec/eventRecord.c index 35fd32192..5c4a65743 100644 --- a/src/std/rec/eventRecord.c +++ b/src/std/rec/eventRecord.c @@ -7,8 +7,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ -/* $Revision-Id$ */ - /* recEvent.c - Record Support Routines for Event records */ /* * Author: Janet Anderson @@ -43,8 +41,8 @@ /* Create RSET - Record Support Entry Table*/ #define report NULL #define initialize NULL -static long init_record(eventRecord *, int); -static long process(eventRecord *); +static long init_record(struct dbCommon *, int); +static long process(struct dbCommon *); static long special(DBADDR *, int); #define get_value NULL #define cvt_dbaddr NULL @@ -93,8 +91,9 @@ static void monitor(eventRecord *); static long readValue(eventRecord *); -static long init_record(eventRecord *prec, int pass) +static long init_record(struct dbCommon *pcommon, int pass) { + struct eventRecord *prec = (struct eventRecord *)pcommon; struct eventdset *pdset; long status=0; @@ -110,9 +109,10 @@ static long init_record(eventRecord *prec, int pass) return(status); } -static long process(eventRecord *prec) +static long process(struct dbCommon *pcommon) { - struct eventdset *pdset = (struct eventdset *)(prec->dset); + struct eventRecord *prec = (struct eventRecord *)pcommon; + struct eventdset *pdset = (struct eventdset *)(prec->dset); long status=0; unsigned char pact=prec->pact; diff --git a/src/std/rec/eventRecord.dbd b/src/std/rec/eventRecord.dbd index 842d2b1c0..348902e4b 100644 --- a/src/std/rec/eventRecord.dbd +++ b/src/std/rec/eventRecord.dbd @@ -3,15 +3,14 @@ # National Laboratory. # Copyright (c) 2002 The Regents of the University of California, as # Operator of Los Alamos National Laboratory. -# EPICS BASE Versions 3.13.7 -# and higher are distributed subject to a Software License Agreement found -# in file LICENSE that is included with this distribution. +# EPICS BASE is distributed subject to a Software License Agreement found +# in file LICENSE that is included with this distribution. #************************************************************************* recordtype(event) { include "dbCommon.dbd" field(VAL,DBF_STRING) { prompt("Event Name To Post") - promptgroup(GUI_INPUTS) + promptgroup("40 - Input") special(SPC_MOD) asl(ASL0) size(40) @@ -25,12 +24,12 @@ recordtype(event) { } field(INP,DBF_INLINK) { prompt("Input Specification") - promptgroup(GUI_INPUTS) + promptgroup("40 - Input") interest(1) } field(SIOL,DBF_INLINK) { prompt("Sim Input Specifctn") - promptgroup(GUI_INPUTS) + promptgroup("90 - Simulate") interest(1) } field(SVAL,DBF_STRING) { @@ -39,7 +38,7 @@ recordtype(event) { } field(SIML,DBF_INLINK) { prompt("Sim Mode Location") - promptgroup(GUI_INPUTS) + promptgroup("90 - Simulate") interest(1) } field(SIMM,DBF_MENU) { @@ -49,7 +48,7 @@ recordtype(event) { } field(SIMS,DBF_MENU) { prompt("Sim mode Alarm Svrty") - promptgroup(GUI_INPUTS) + promptgroup("90 - Simulate") interest(2) menu(menuAlarmSevr) } diff --git a/src/std/rec/fanoutRecord.c b/src/std/rec/fanoutRecord.c index 7897fbc6f..3ac6b66c6 100644 --- a/src/std/rec/fanoutRecord.c +++ b/src/std/rec/fanoutRecord.c @@ -7,7 +7,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ -/* $Revision-Id$ */ /* * Original Author: Bob Dalesio * Date: 12-20-88 @@ -41,8 +40,8 @@ /* Create RSET - Record Support Entry Table*/ #define report NULL #define initialize NULL -static long init_record(fanoutRecord *, int); -static long process(fanoutRecord *); +static long init_record(struct dbCommon *, int); +static long process(struct dbCommon *); #define special NULL #define get_value NULL #define cvt_dbaddr NULL @@ -79,9 +78,9 @@ rset fanoutRSET = { }; epicsExportAddress(rset,fanoutRSET); -static long init_record(fanoutRecord *prec, int pass) +static long init_record(struct dbCommon *pcommon, int pass) { - + struct fanoutRecord *prec = (struct fanoutRecord *)pcommon; if (pass == 0) return 0; @@ -89,8 +88,9 @@ static long init_record(fanoutRecord *prec, int pass) return 0; } -static long process(fanoutRecord *prec) +static long process(struct dbCommon *pcommon) { + struct fanoutRecord *prec = (struct fanoutRecord *)pcommon; struct link *plink; epicsUInt16 seln, events; int i; diff --git a/src/std/rec/fanoutRecord.dbd b/src/std/rec/fanoutRecord.dbd index 8ad9209fc..251d63a11 100644 --- a/src/std/rec/fanoutRecord.dbd +++ b/src/std/rec/fanoutRecord.dbd @@ -20,7 +20,7 @@ recordtype(fanout) { } field(SELM,DBF_MENU) { prompt("Select Mechanism") - promptgroup(GUI_LINKS) + promptgroup("30 - Action") interest(1) menu(fanoutSELM) } @@ -31,97 +31,99 @@ recordtype(fanout) { } field(SELL,DBF_INLINK) { prompt("Link Selection Loc") - promptgroup(GUI_LINKS) + promptgroup("30 - Action") interest(1) } field(OFFS,DBF_SHORT) { prompt("Offset for Specified") - interest(1) + promptgroup("30 - Action") + interest(1) initial("0") } field(SHFT,DBF_SHORT) { prompt("Shift for Mask mode") - interest(1) + promptgroup("30 - Action") + interest(1) initial("-1") } field(LNK0,DBF_FWDLINK) { prompt("Forward Link 0") - promptgroup(GUI_LINKS) + promptgroup("51 - Output 0-7") interest(1) } field(LNK1,DBF_FWDLINK) { prompt("Forward Link 1") - promptgroup(GUI_LINKS) + promptgroup("51 - Output 0-7") interest(1) } field(LNK2,DBF_FWDLINK) { prompt("Forward Link 2") - promptgroup(GUI_LINKS) + promptgroup("51 - Output 0-7") interest(1) } field(LNK3,DBF_FWDLINK) { prompt("Forward Link 3") - promptgroup(GUI_LINKS) + promptgroup("51 - Output 0-7") interest(1) } field(LNK4,DBF_FWDLINK) { prompt("Forward Link 4") - promptgroup(GUI_LINKS) + promptgroup("51 - Output 0-7") interest(1) } field(LNK5,DBF_FWDLINK) { prompt("Forward Link 5") - promptgroup(GUI_LINKS) + promptgroup("51 - Output 0-7") interest(1) } field(LNK6,DBF_FWDLINK) { prompt("Forward Link 6") - promptgroup(GUI_LINKS) + promptgroup("51 - Output 0-7") interest(1) } field(LNK7,DBF_FWDLINK) { prompt("Forward Link 7") - promptgroup(GUI_LINKS) + promptgroup("51 - Output 0-7") interest(1) } field(LNK8,DBF_FWDLINK) { prompt("Forward Link 8") - promptgroup(GUI_LINKS) + promptgroup("52 - Output 8-F") interest(1) } field(LNK9,DBF_FWDLINK) { prompt("Forward Link 9") - promptgroup(GUI_LINKS) + promptgroup("52 - Output 8-F") interest(1) } field(LNKA,DBF_FWDLINK) { prompt("Forward Link 10") - promptgroup(GUI_LINKS) + promptgroup("52 - Output 8-F") interest(1) } field(LNKB,DBF_FWDLINK) { prompt("Forward Link 11") - promptgroup(GUI_LINKS) + promptgroup("52 - Output 8-F") interest(1) } field(LNKC,DBF_FWDLINK) { prompt("Forward Link 12") - promptgroup(GUI_LINKS) + promptgroup("52 - Output 8-F") interest(1) } field(LNKD,DBF_FWDLINK) { prompt("Forward Link 13") - promptgroup(GUI_LINKS) + promptgroup("52 - Output 8-F") interest(1) } field(LNKE,DBF_FWDLINK) { prompt("Forward Link 14") - promptgroup(GUI_LINKS) + promptgroup("52 - Output 8-F") interest(1) } field(LNKF,DBF_FWDLINK) { prompt("Forward Link 15") - promptgroup(GUI_LINKS) + promptgroup("52 - Output 8-F") interest(1) } } diff --git a/src/std/rec/histogramRecord.c b/src/std/rec/histogramRecord.c index 643c4fa68..a9563500f 100644 --- a/src/std/rec/histogramRecord.c +++ b/src/std/rec/histogramRecord.c @@ -7,8 +7,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ -/* $Revision-Id$ */ - /* histogramRecord.c - Record Support Routines for Histogram records */ /* * Author: Janet Anderson @@ -48,15 +46,15 @@ /* Create RSET - Record Support Entry Table*/ #define report NULL #define initialize NULL -static long init_record(histogramRecord *, int); -static long process(histogramRecord *); +static long init_record(struct dbCommon *, int); +static long process(struct dbCommon *); static long special(DBADDR *, int); #define get_value NULL static long cvt_dbaddr(DBADDR *); static long get_array_info(DBADDR *, long *, long *); #define put_array_info NULL static long get_units(DBADDR *, char *); -static long get_precision(DBADDR *paddr,long *precision); +static long get_precision(const DBADDR *paddr,long *precision); #define get_enum_str NULL #define get_enum_strs NULL #define put_enum_str NULL @@ -164,8 +162,9 @@ static long wdogInit(histogramRecord *prec) return 0; } -static long init_record(histogramRecord *prec, int pass) +static long init_record(struct dbCommon *pcommon, int pass) { + struct histogramRecord *prec = (struct histogramRecord *)pcommon; struct histogramdset *pdset; if (pass == 0) { @@ -209,9 +208,10 @@ static long init_record(histogramRecord *prec, int pass) return 0; } -static long process(histogramRecord *prec) +static long process(struct dbCommon *pcommon) { - struct histogramdset *pdset = (struct histogramdset *) prec->dset; + struct histogramRecord *prec = (struct histogramRecord *)pcommon; + struct histogramdset *pdset = (struct histogramdset *) prec->dset; int pact = prec->pact; long status; @@ -412,7 +412,7 @@ static long get_units(DBADDR *paddr, char *units) return 0; } -static long get_precision(DBADDR *paddr,long *precision) +static long get_precision(const DBADDR *paddr,long *precision) { histogramRecord *prec = (histogramRecord *) paddr->precord; diff --git a/src/std/rec/histogramRecord.dbd b/src/std/rec/histogramRecord.dbd index 08fc12d4f..075400fc6 100644 --- a/src/std/rec/histogramRecord.dbd +++ b/src/std/rec/histogramRecord.dbd @@ -3,9 +3,8 @@ # National Laboratory. # Copyright (c) 2002 The Regents of the University of California, as # Operator of Los Alamos National Laboratory. -# EPICS BASE Versions 3.13.7 -# and higher are distributed subject to a Software License Agreement found -# in file LICENSE that is included with this distribution. +# EPICS BASE is distributed subject to a Software License Agreement found +# in file LICENSE that is included with this distribution. #************************************************************************* menu(histogramCMD) { choice(histogramCMD_Read,"Read") @@ -26,7 +25,7 @@ recordtype(histogram) { } field(NELM,DBF_USHORT) { prompt("Num of Array Elements") - promptgroup(GUI_HIST) + promptgroup("30 - Action") special(SPC_NOMOD) interest(1) initial("1") @@ -46,14 +45,14 @@ recordtype(histogram) { } field(ULIM,DBF_DOUBLE) { prompt("Upper Signal Limit") - promptgroup(GUI_HIST) + promptgroup("30 - Action") special(SPC_RESET) interest(1) prop(YES) } field(LLIM,DBF_DOUBLE) { prompt("Lower Signal Limit ") - promptgroup(GUI_HIST) + promptgroup("30 - Action") special(SPC_RESET) interest(1) prop(YES) @@ -69,13 +68,13 @@ recordtype(histogram) { } field(PREC,DBF_SHORT) { prompt("Display Precision") - promptgroup(GUI_DISPLAY) + promptgroup("80 - Display") interest(1) prop(YES) } field(SVL,DBF_INLINK) { prompt("Signal Value Location") - promptgroup(GUI_INPUTS) + promptgroup("40 - Input") interest(1) } field(BPTR,DBF_NOACCESS) { @@ -92,7 +91,7 @@ recordtype(histogram) { } field(MDEL,DBF_SHORT) { prompt("Monitor Count Deadband") - promptgroup(GUI_HIST) + promptgroup("80 - Display") interest(1) } field(MCNT,DBF_SHORT) { @@ -102,13 +101,13 @@ recordtype(histogram) { } field(SDEL,DBF_DOUBLE) { prompt("Monitor Seconds Dband") - promptgroup(GUI_HIST) + promptgroup("80 - Display") special(SPC_RESET) interest(1) } field(SIOL,DBF_INLINK) { prompt("Sim Input Specifctn") - promptgroup(GUI_INPUTS) + promptgroup("90 - Simulate") interest(1) } field(SVAL,DBF_DOUBLE) { @@ -116,7 +115,7 @@ recordtype(histogram) { } field(SIML,DBF_INLINK) { prompt("Sim Mode Location") - promptgroup(GUI_INPUTS) + promptgroup("90 - Simulate") interest(1) } field(SIMM,DBF_MENU) { @@ -126,19 +125,19 @@ recordtype(histogram) { } field(SIMS,DBF_MENU) { prompt("Sim mode Alarm Svrty") - promptgroup(GUI_INPUTS) + promptgroup("90 - Simulate") interest(2) menu(menuAlarmSevr) } field(HOPR,DBF_ULONG) { prompt("High Operating Range") - promptgroup(GUI_DISPLAY) + promptgroup("80 - Display") interest(1) prop(YES) } field(LOPR,DBF_ULONG) { prompt("Low Operating Range") - promptgroup(GUI_DISPLAY) + promptgroup("80 - Display") interest(1) prop(YES) } diff --git a/src/std/rec/longinRecord.c b/src/std/rec/longinRecord.c index 91d7e2193..bd3c24ab9 100644 --- a/src/std/rec/longinRecord.c +++ b/src/std/rec/longinRecord.c @@ -7,8 +7,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ -/* $Revision-Id$ */ - /* recLongin.c - Record Support Routines for Longin records */ /* * Author: Janet Anderson @@ -44,8 +42,8 @@ /* Create RSET - Record Support Entry Table*/ #define report NULL #define initialize NULL -static long init_record(longinRecord *, int); -static long process(longinRecord *); +static long init_record(struct dbCommon *, int); +static long process(struct dbCommon *); #define special NULL #define get_value NULL #define cvt_dbaddr NULL @@ -96,8 +94,9 @@ static void monitor(longinRecord *prec); static long readValue(longinRecord *prec); -static long init_record(longinRecord *prec, int pass) +static long init_record(struct dbCommon *pcommon, int pass) { + struct longinRecord *prec = (struct longinRecord *)pcommon; struct longindset *pdset = (struct longindset *) prec->dset; if (pass==0) @@ -130,9 +129,10 @@ static long init_record(longinRecord *prec, int pass) return 0; } -static long process(longinRecord *prec) +static long process(struct dbCommon *pcommon) { - struct longindset *pdset = (struct longindset *)(prec->dset); + struct longinRecord *prec = (struct longinRecord *)pcommon; + struct longindset *pdset = (struct longindset *)(prec->dset); long status; unsigned char pact=prec->pact; epicsTimeStamp timeLast; diff --git a/src/std/rec/longinRecord.dbd b/src/std/rec/longinRecord.dbd index 5c038f9db..60eee5000 100644 --- a/src/std/rec/longinRecord.dbd +++ b/src/std/rec/longinRecord.dbd @@ -3,121 +3,120 @@ # National Laboratory. # Copyright (c) 2002 The Regents of the University of California, as # Operator of Los Alamos National Laboratory. -# EPICS BASE Versions 3.13.7 -# and higher are distributed subject to a Software License Agreement found -# in file LICENSE that is included with this distribution. +# EPICS BASE is distributed subject to a Software License Agreement found +# in file LICENSE that is included with this distribution. #************************************************************************* recordtype(longin) { include "dbCommon.dbd" field(VAL,DBF_LONG) { prompt("Current value") - promptgroup(GUI_INPUTS) + promptgroup("40 - Input") asl(ASL0) pp(TRUE) } field(INP,DBF_INLINK) { prompt("Input Specification") - promptgroup(GUI_INPUTS) + promptgroup("40 - Input") interest(1) } field(EGU,DBF_STRING) { - prompt("Units name") - promptgroup(GUI_DISPLAY) + prompt("Engineering Units") + promptgroup("80 - Display") interest(1) size(16) prop(YES) } field(HOPR,DBF_LONG) { prompt("High Operating Range") - promptgroup(GUI_DISPLAY) + promptgroup("80 - Display") interest(1) prop(YES) } field(LOPR,DBF_LONG) { prompt("Low Operating Range") - promptgroup(GUI_DISPLAY) + promptgroup("80 - Display") interest(1) prop(YES) } field(HIHI,DBF_LONG) { prompt("Hihi Alarm Limit") - promptgroup(GUI_ALARMS) + promptgroup("70 - Alarm") pp(TRUE) interest(1) prop(YES) } field(LOLO,DBF_LONG) { prompt("Lolo Alarm Limit") - promptgroup(GUI_ALARMS) + promptgroup("70 - Alarm") pp(TRUE) interest(1) prop(YES) } field(HIGH,DBF_LONG) { prompt("High Alarm Limit") - promptgroup(GUI_ALARMS) + promptgroup("70 - Alarm") pp(TRUE) interest(1) prop(YES) } field(LOW,DBF_LONG) { prompt("Low Alarm Limit") - promptgroup(GUI_ALARMS) + promptgroup("70 - Alarm") pp(TRUE) interest(1) prop(YES) } field(HHSV,DBF_MENU) { prompt("Hihi Severity") - promptgroup(GUI_ALARMS) + promptgroup("70 - Alarm") pp(TRUE) interest(1) menu(menuAlarmSevr) } field(LLSV,DBF_MENU) { prompt("Lolo Severity") - promptgroup(GUI_ALARMS) + promptgroup("70 - Alarm") pp(TRUE) interest(1) menu(menuAlarmSevr) } field(HSV,DBF_MENU) { prompt("High Severity") - promptgroup(GUI_ALARMS) + promptgroup("70 - Alarm") pp(TRUE) interest(1) menu(menuAlarmSevr) } field(LSV,DBF_MENU) { prompt("Low Severity") - promptgroup(GUI_ALARMS) + promptgroup("70 - Alarm") pp(TRUE) interest(1) menu(menuAlarmSevr) } field(HYST,DBF_LONG) { prompt("Alarm Deadband") - promptgroup(GUI_ALARMS) + promptgroup("70 - Alarm") interest(1) } field(AFTC, DBF_DOUBLE) { - prompt("Alarm Filter Time Constant") - promptgroup(GUI_ALARMS) - interest(1) + prompt("Alarm Filter Time Constant") + promptgroup("70 - Alarm") + interest(1) } field(AFVL, DBF_DOUBLE) { - prompt("Alarm Filter Value") - special(SPC_NOMOD) - interest(3) + prompt("Alarm Filter Value") + special(SPC_NOMOD) + interest(3) } field(ADEL,DBF_LONG) { prompt("Archive Deadband") - promptgroup(GUI_DISPLAY) + promptgroup("80 - Display") interest(1) } field(MDEL,DBF_LONG) { prompt("Monitor Deadband") - promptgroup(GUI_DISPLAY) + promptgroup("80 - Display") interest(1) } field(LALM,DBF_LONG) { @@ -137,7 +136,7 @@ recordtype(longin) { } field(SIOL,DBF_INLINK) { prompt("Sim Input Specifctn") - promptgroup(GUI_INPUTS) + promptgroup("90 - Simulate") interest(1) } field(SVAL,DBF_LONG) { @@ -145,7 +144,7 @@ recordtype(longin) { } field(SIML,DBF_INLINK) { prompt("Sim Mode Location") - promptgroup(GUI_INPUTS) + promptgroup("90 - Simulate") interest(1) } field(SIMM,DBF_MENU) { @@ -155,7 +154,7 @@ recordtype(longin) { } field(SIMS,DBF_MENU) { prompt("Sim mode Alarm Svrty") - promptgroup(GUI_INPUTS) + promptgroup("90 - Simulate") interest(2) menu(menuAlarmSevr) } diff --git a/src/std/rec/longoutRecord.c b/src/std/rec/longoutRecord.c index 5d35df634..6062ad741 100644 --- a/src/std/rec/longoutRecord.c +++ b/src/std/rec/longoutRecord.c @@ -7,7 +7,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ -/* $Revision-Id$ */ /* * Author: Janet Anderson * Date: 9/23/91 @@ -40,8 +39,8 @@ /* Create RSET - Record Support Entry Table*/ #define report NULL #define initialize NULL -static long init_record(longoutRecord *, int); -static long process(longoutRecord *); +static long init_record(struct dbCommon *, int); +static long process(struct dbCommon *); #define special NULL #define get_value NULL #define cvt_dbaddr NULL @@ -92,9 +91,9 @@ static void monitor(longoutRecord *prec); static long writeValue(longoutRecord *prec); static void convert(longoutRecord *prec, epicsInt32 value); - -static long init_record(longoutRecord *prec, int pass) +static long init_record(struct dbCommon *pcommon, int pass) { + struct longoutRecord *prec = (struct longoutRecord *)pcommon; struct longoutdset *pdset = (struct longoutdset *) prec->dset; if (pass==0) @@ -129,9 +128,10 @@ static long init_record(longoutRecord *prec, int pass) return 0; } -static long process(longoutRecord *prec) +static long process(struct dbCommon *pcommon) { - struct longoutdset *pdset = (struct longoutdset *)(prec->dset); + struct longoutRecord *prec = (struct longoutRecord *)pcommon; + struct longoutdset *pdset = (struct longoutdset *)(prec->dset); long status=0; epicsInt32 value; unsigned char pact=prec->pact; diff --git a/src/std/rec/longoutRecord.dbd b/src/std/rec/longoutRecord.dbd index 5124aafe8..c3ba0b977 100644 --- a/src/std/rec/longoutRecord.dbd +++ b/src/std/rec/longoutRecord.dbd @@ -3,136 +3,135 @@ # National Laboratory. # Copyright (c) 2002 The Regents of the University of California, as # Operator of Los Alamos National Laboratory. -# EPICS BASE Versions 3.13.7 -# and higher are distributed subject to a Software License Agreement found -# in file LICENSE that is included with this distribution. +# EPICS BASE is distributed subject to a Software License Agreement found +# in file LICENSE that is included with this distribution. #************************************************************************* recordtype(longout) { include "dbCommon.dbd" field(VAL,DBF_LONG) { prompt("Desired Output") - promptgroup(GUI_OUTPUT) + promptgroup("50 - Output") asl(ASL0) pp(TRUE) } field(OUT,DBF_OUTLINK) { prompt("Output Specification") - promptgroup(GUI_OUTPUT) + promptgroup("50 - Output") interest(1) } field(DOL,DBF_INLINK) { prompt("Desired Output Loc") - promptgroup(GUI_OUTPUT) + promptgroup("40 - Input") interest(1) } field(OMSL,DBF_MENU) { prompt("Output Mode Select") - promptgroup(GUI_OUTPUT) + promptgroup("50 - Output") interest(1) menu(menuOmsl) } field(EGU,DBF_STRING) { - prompt("Units name") - promptgroup(GUI_DISPLAY) + prompt("Engineering Units") + promptgroup("80 - Display") interest(1) size(16) prop(YES) } field(DRVH,DBF_LONG) { prompt("Drive High Limit") - promptgroup(GUI_OUTPUT) + promptgroup("30 - Action") pp(TRUE) interest(1) prop(YES) } field(DRVL,DBF_LONG) { prompt("Drive Low Limit") - promptgroup(GUI_OUTPUT) + promptgroup("30 - Action") pp(TRUE) interest(1) prop(YES) } field(HOPR,DBF_LONG) { prompt("High Operating Range") - promptgroup(GUI_DISPLAY) + promptgroup("80 - Display") interest(1) prop(YES) } field(LOPR,DBF_LONG) { prompt("Low Operating Range") - promptgroup(GUI_DISPLAY) + promptgroup("80 - Display") interest(1) prop(YES) } field(HIHI,DBF_LONG) { prompt("Hihi Alarm Limit") - promptgroup(GUI_ALARMS) + promptgroup("70 - Alarm") pp(TRUE) interest(1) prop(YES) } field(LOLO,DBF_LONG) { prompt("Lolo Alarm Limit") - promptgroup(GUI_ALARMS) + promptgroup("70 - Alarm") pp(TRUE) interest(1) prop(YES) } field(HIGH,DBF_LONG) { prompt("High Alarm Limit") - promptgroup(GUI_ALARMS) + promptgroup("70 - Alarm") pp(TRUE) interest(1) prop(YES) } field(LOW,DBF_LONG) { prompt("Low Alarm Limit") - promptgroup(GUI_ALARMS) + promptgroup("70 - Alarm") pp(TRUE) interest(1) prop(YES) } field(HHSV,DBF_MENU) { prompt("Hihi Severity") - promptgroup(GUI_ALARMS) + promptgroup("70 - Alarm") pp(TRUE) interest(1) menu(menuAlarmSevr) } field(LLSV,DBF_MENU) { prompt("Lolo Severity") - promptgroup(GUI_ALARMS) + promptgroup("70 - Alarm") pp(TRUE) interest(1) menu(menuAlarmSevr) } field(HSV,DBF_MENU) { prompt("High Severity") - promptgroup(GUI_ALARMS) + promptgroup("70 - Alarm") pp(TRUE) interest(1) menu(menuAlarmSevr) } field(LSV,DBF_MENU) { prompt("Low Severity") - promptgroup(GUI_ALARMS) + promptgroup("70 - Alarm") pp(TRUE) interest(1) menu(menuAlarmSevr) } field(HYST,DBF_LONG) { prompt("Alarm Deadband") - promptgroup(GUI_ALARMS) + promptgroup("70 - Alarm") interest(1) } field(ADEL,DBF_LONG) { prompt("Archive Deadband") - promptgroup(GUI_DISPLAY) + promptgroup("80 - Display") interest(1) } field(MDEL,DBF_LONG) { prompt("Monitor Deadband") - promptgroup(GUI_DISPLAY) + promptgroup("80 - Display") interest(1) } field(LALM,DBF_LONG) { @@ -152,12 +151,12 @@ recordtype(longout) { } field(SIOL,DBF_OUTLINK) { prompt("Sim Output Specifctn") - promptgroup(GUI_INPUTS) + promptgroup("90 - Simulate") interest(1) } field(SIML,DBF_INLINK) { prompt("Sim Mode Location") - promptgroup(GUI_INPUTS) + promptgroup("90 - Simulate") interest(1) } field(SIMM,DBF_MENU) { @@ -167,19 +166,19 @@ recordtype(longout) { } field(SIMS,DBF_MENU) { prompt("Sim mode Alarm Svrty") - promptgroup(GUI_INPUTS) + promptgroup("90 - Simulate") interest(2) menu(menuAlarmSevr) } field(IVOA,DBF_MENU) { prompt("INVALID output action") - promptgroup(GUI_OUTPUT) + promptgroup("50 - Output") interest(2) menu(menuIvoa) } field(IVOV,DBF_LONG) { prompt("INVALID output value") - promptgroup(GUI_OUTPUT) + promptgroup("50 - Output") interest(2) } } diff --git a/src/std/rec/lsiRecord.c b/src/std/rec/lsiRecord.c index 1cbff9185..81b6785ab 100644 --- a/src/std/rec/lsiRecord.c +++ b/src/std/rec/lsiRecord.c @@ -36,8 +36,9 @@ static void monitor(lsiRecord *); static long readValue(lsiRecord *); -static long init_record(lsiRecord *prec, int pass) +static long init_record(struct dbCommon *pcommon, int pass) { + struct lsiRecord *prec = (struct lsiRecord *)pcommon; lsidset *pdset; if (pass == 0) { @@ -85,8 +86,9 @@ static long init_record(lsiRecord *prec, int pass) return 0; } -static long process(lsiRecord *prec) +static long process(struct dbCommon *pcommon) { + struct lsiRecord *prec = (struct lsiRecord *)pcommon; int pact = prec->pact; lsidset *pdset = (lsidset *) prec->dset; long status = 0; @@ -158,9 +160,10 @@ static long put_array_info(DBADDR *paddr, long nNew) { lsiRecord *prec = (lsiRecord *) paddr->precord; - if (nNew == prec->sizv) - --nNew; /* truncated string */ - prec->val[nNew] = 0; /* ensure data is terminated */ + if (nNew >= prec->sizv) + nNew = prec->sizv - 1; /* truncated string */ + if (paddr->field_type == DBF_CHAR) + prec->val[nNew] = 0; /* ensure data is terminated */ return 0; } diff --git a/src/std/rec/lsiRecord.dbd b/src/std/rec/lsiRecord.dbd index be14cf552..c50d905d8 100644 --- a/src/std/rec/lsiRecord.dbd +++ b/src/std/rec/lsiRecord.dbd @@ -34,7 +34,7 @@ recordtype(lsi) { } field(SIZV,DBF_USHORT) { prompt("Size of buffers") - promptgroup(GUI_OUTPUT) + promptgroup("40 - Input") special(SPC_NOMOD) interest(1) initial("41") @@ -49,24 +49,24 @@ recordtype(lsi) { } field(INP,DBF_INLINK) { prompt("Input Specification") - promptgroup(GUI_INPUTS) + promptgroup("40 - Input") interest(1) } field(MPST,DBF_MENU) { prompt("Post Value Monitors") - promptgroup(GUI_DISPLAY) + promptgroup("80 - Display") interest(1) menu(menuPost) } field(APST,DBF_MENU) { prompt("Post Archive Monitors") - promptgroup(GUI_DISPLAY) + promptgroup("80 - Display") interest(1) menu(menuPost) } field(SIML,DBF_INLINK) { prompt("Simulation Mode Link") - promptgroup(GUI_INPUTS) + promptgroup("90 - Simulate") interest(2) } field(SIMM,DBF_MENU) { @@ -76,13 +76,13 @@ recordtype(lsi) { } field(SIMS,DBF_MENU) { prompt("Simulation Mode Severity") - promptgroup(GUI_INPUTS) + promptgroup("90 - Simulate") interest(2) menu(menuAlarmSevr) } field(SIOL,DBF_INLINK) { prompt("Sim Input Specifctn") - promptgroup(GUI_INPUTS) + promptgroup("90 - Simulate") interest(2) } } diff --git a/src/std/rec/lsoRecord.c b/src/std/rec/lsoRecord.c index 271a0c3f9..625f5d77c 100644 --- a/src/std/rec/lsoRecord.c +++ b/src/std/rec/lsoRecord.c @@ -40,8 +40,9 @@ static void monitor(lsoRecord *); static long writeValue(lsoRecord *); -static long init_record(lsoRecord *prec, int pass) +static long init_record(struct dbCommon *pcommon, int pass) { + struct lsoRecord *prec = (struct lsoRecord *)pcommon; lsodset *pdset; if (pass == 0) { @@ -91,8 +92,9 @@ static long init_record(lsoRecord *prec, int pass) return 0; } -static long process(lsoRecord *prec) +static long process(struct dbCommon *pcommon) { + struct lsoRecord *prec = (struct lsoRecord *)pcommon; int pact = prec->pact; lsodset *pdset = (lsodset *) prec->dset; long status = 0; @@ -200,9 +202,10 @@ static long put_array_info(DBADDR *paddr, long nNew) { lsoRecord *prec = (lsoRecord *) paddr->precord; - if (nNew == prec->sizv) - --nNew; /* truncated string */ - prec->val[nNew] = 0; /* ensure data is terminated */ + if (nNew >= prec->sizv) + nNew = prec->sizv - 1; /* truncated string */ + if (paddr->field_type == DBF_CHAR) + prec->val[nNew] = 0; /* ensure data is terminated */ return 0; } diff --git a/src/std/rec/lsoRecord.dbd b/src/std/rec/lsoRecord.dbd index 48ddea810..69203f2d0 100644 --- a/src/std/rec/lsoRecord.dbd +++ b/src/std/rec/lsoRecord.dbd @@ -34,7 +34,7 @@ recordtype(lso) { } field(SIZV,DBF_USHORT) { prompt("Size of buffers") - promptgroup(GUI_OUTPUT) + promptgroup("50 - Output") special(SPC_NOMOD) interest(1) initial("41") @@ -50,47 +50,47 @@ recordtype(lso) { } field(DOL,DBF_INLINK) { prompt("Desired Output Link") - promptgroup(GUI_OUTPUT) + promptgroup("40 - Input") interest(1) } field(IVOA,DBF_MENU) { prompt("INVALID Output Action") - promptgroup(GUI_OUTPUT) + promptgroup("50 - Output") interest(2) menu(menuIvoa) } field(IVOV,DBF_STRING) { prompt("INVALID Output Value") - promptgroup(GUI_OUTPUT) + promptgroup("50 - Output") interest(2) size(40) } field(OMSL,DBF_MENU) { prompt("Output Mode Select") - promptgroup(GUI_OUTPUT) + promptgroup("50 - Output") interest(1) menu(menuOmsl) } field(OUT,DBF_OUTLINK) { prompt("Output Specification") - promptgroup(GUI_OUTPUT) + promptgroup("50 - Output") interest(1) } field(MPST,DBF_MENU) { prompt("Post Value Monitors") - promptgroup(GUI_DISPLAY) + promptgroup("80 - Display") interest(1) menu(menuPost) } field(APST,DBF_MENU) { prompt("Post Archive Monitors") - promptgroup(GUI_DISPLAY) + promptgroup("80 - Display") interest(1) menu(menuPost) } field(SIML,DBF_INLINK) { prompt("Sim Mode link") - promptgroup(GUI_INPUTS) + promptgroup("90 - Simulate") interest(1) } field(SIMM,DBF_MENU) { @@ -100,13 +100,13 @@ recordtype(lso) { } field(SIMS,DBF_MENU) { prompt("Sim mode Alarm Svrty") - promptgroup(GUI_INPUTS) + promptgroup("90 - Simulate") interest(2) menu(menuAlarmSevr) } field(SIOL,DBF_OUTLINK) { prompt("Sim Output Specifctn") - promptgroup(GUI_INPUTS) + promptgroup("90 - Simulate") interest(1) } } diff --git a/src/std/rec/mbbiDirectRecord.c b/src/std/rec/mbbiDirectRecord.c index cc1170b7e..112272925 100644 --- a/src/std/rec/mbbiDirectRecord.c +++ b/src/std/rec/mbbiDirectRecord.c @@ -9,8 +9,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ -/* $Revision-Id$ */ - /* mbbiDirectRecord.c - Record Support routines for mbboDirect records */ /* * Original Authors: Bob Dalesio and Matthew Needes @@ -44,8 +42,8 @@ /* Create RSET - Record Support Entry Table*/ #define report NULL #define initialize NULL -static long init_record(mbbiDirectRecord *, int); -static long process(mbbiDirectRecord *); +static long init_record(struct dbCommon *, int); +static long process(struct dbCommon *); #define special NULL #define get_value NULL #define cvt_dbaddr NULL @@ -96,8 +94,9 @@ static long readValue(mbbiDirectRecord *); #define NUM_BITS 16 -static long init_record(mbbiDirectRecord *prec, int pass) +static long init_record(struct dbCommon *pcommon, int pass) { + struct mbbiDirectRecord *prec = (struct mbbiDirectRecord *)pcommon; struct mbbidset *pdset = (struct mbbidset *) prec->dset; long status = 0; @@ -139,8 +138,9 @@ static long init_record(mbbiDirectRecord *prec, int pass) return status; } -static long process(mbbiDirectRecord *prec) +static long process(struct dbCommon *pcommon) { + struct mbbiDirectRecord *prec = (struct mbbiDirectRecord *)pcommon; struct mbbidset *pdset = (struct mbbidset *) prec->dset; long status; int pact = prec->pact; diff --git a/src/std/rec/mbbiDirectRecord.dbd b/src/std/rec/mbbiDirectRecord.dbd index a72c24070..3fa3d8823 100644 --- a/src/std/rec/mbbiDirectRecord.dbd +++ b/src/std/rec/mbbiDirectRecord.dbd @@ -10,19 +10,19 @@ recordtype(mbbiDirect) { include "dbCommon.dbd" field(VAL,DBF_USHORT) { prompt("Current Value") - promptgroup(GUI_INPUTS) + promptgroup("40 - Input") asl(ASL0) pp(TRUE) } field(NOBT,DBF_SHORT) { prompt("Number of Bits") - promptgroup(GUI_MBB) + promptgroup("40 - Input") special(SPC_NOMOD) interest(1) } field(INP,DBF_INLINK) { prompt("Input Specification") - promptgroup(GUI_MBB) + promptgroup("40 - Input") interest(1) } field(RVAL,DBF_ULONG) { @@ -46,12 +46,12 @@ recordtype(mbbiDirect) { } field(SHFT,DBF_USHORT) { prompt("Shift") - promptgroup(GUI_MBB) + promptgroup("40 - Input") interest(1) } field(SIOL,DBF_INLINK) { prompt("Sim Input Specifctn") - promptgroup(GUI_MBB) + promptgroup("90 - Simulate") interest(1) } field(SVAL,DBF_ULONG) { @@ -59,7 +59,7 @@ recordtype(mbbiDirect) { } field(SIML,DBF_INLINK) { prompt("Sim Mode Location") - promptgroup(GUI_MBB) + promptgroup("90 - Simulate") interest(1) } field(SIMM,DBF_MENU) { @@ -69,7 +69,7 @@ recordtype(mbbiDirect) { } field(SIMS,DBF_MENU) { prompt("Sim mode Alarm Svrty") - promptgroup(GUI_MBB) + promptgroup("90 - Simulate") interest(2) menu(menuAlarmSevr) } diff --git a/src/std/rec/mbbiRecord.c b/src/std/rec/mbbiRecord.c index bd344f307..ad5a8ce06 100644 --- a/src/std/rec/mbbiRecord.c +++ b/src/std/rec/mbbiRecord.c @@ -8,7 +8,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ -/* $Revision-Id$ */ /* * Original Author: Bob Dalesio * Date: 5-9-88 @@ -45,8 +44,8 @@ /* Create RSET - Record Support Entry Table*/ #define report NULL #define initialize NULL -static long init_record(mbbiRecord *, int); -static long process(mbbiRecord *); +static long init_record(struct dbCommon *, int); +static long process(struct dbCommon *); static long special(DBADDR *, int); #define get_value NULL #define cvt_dbaddr NULL @@ -54,9 +53,9 @@ static long special(DBADDR *, int); #define put_array_info NULL #define get_units NULL #define get_precision NULL -static long get_enum_str(DBADDR *, char *); -static long get_enum_strs(DBADDR *, struct dbr_enumStrs *); -static long put_enum_str(DBADDR *, char *); +static long get_enum_str(const DBADDR *, char *); +static long get_enum_strs(const DBADDR *, struct dbr_enumStrs *); +static long put_enum_str(const DBADDR *, const char *); #define get_graphic_double NULL #define get_control_double NULL #define get_alarm_double NULL @@ -112,9 +111,10 @@ static void init_common(mbbiRecord *prec) prec->sdef = FALSE; } -static long init_record(mbbiRecord *prec, int pass) +static long init_record(struct dbCommon *pcommon, int pass) { - struct mbbidset *pdset = (struct mbbidset *) prec->dset; + struct mbbiRecord *prec = (struct mbbiRecord *)pcommon; + struct mbbidset *pdset = (struct mbbidset *) prec->dset; long status = 0; if (pass == 0) @@ -149,9 +149,10 @@ static long init_record(mbbiRecord *prec, int pass) return status; } -static long process(mbbiRecord *prec) +static long process(struct dbCommon *pcommon) { - struct mbbidset *pdset = (struct mbbidset *) prec->dset; + struct mbbiRecord *prec = (struct mbbiRecord *)pcommon; + struct mbbidset *pdset = (struct mbbidset *) prec->dset; long status; int pact = prec->pact; epicsTimeStamp timeLast; @@ -234,7 +235,7 @@ static long special(DBADDR *paddr, int after) } } -static long get_enum_str(DBADDR *paddr, char *pstring) +static long get_enum_str(const DBADDR *paddr, char *pstring) { mbbiRecord *prec = (mbbiRecord *) paddr->precord; int index; @@ -256,7 +257,7 @@ static long get_enum_str(DBADDR *paddr, char *pstring) return 0; } -static long get_enum_strs(DBADDR *paddr, struct dbr_enumStrs *pes) +static long get_enum_strs(const DBADDR *paddr, struct dbr_enumStrs *pes) { mbbiRecord *prec = (mbbiRecord *) paddr->precord; char *pstate = prec->zrst; @@ -272,7 +273,7 @@ static long get_enum_strs(DBADDR *paddr, struct dbr_enumStrs *pes) return 0; } -static long put_enum_str(DBADDR *paddr, char *pstring) +static long put_enum_str(const DBADDR *paddr, const char *pstring) { mbbiRecord *prec = (mbbiRecord *) paddr->precord; char *pstate; diff --git a/src/std/rec/mbbiRecord.dbd b/src/std/rec/mbbiRecord.dbd index ffc37cfaf..1f5724c92 100644 --- a/src/std/rec/mbbiRecord.dbd +++ b/src/std/rec/mbbiRecord.dbd @@ -10,24 +10,24 @@ recordtype(mbbi) { include "dbCommon.dbd" field(VAL,DBF_ENUM) { prompt("Current Value") - promptgroup(GUI_INPUTS) + promptgroup("40 - Input") asl(ASL0) pp(TRUE) } field(NOBT,DBF_USHORT) { prompt("Number of Bits") - promptgroup(GUI_MBB) + promptgroup("40 - Input") special(SPC_NOMOD) interest(1) } field(INP,DBF_INLINK) { prompt("Input Specification") - promptgroup(GUI_MBB) + promptgroup("40 - Input") interest(1) } field(ZRVL,DBF_ULONG) { prompt("Zero Value") - promptgroup(GUI_BITS1) + promptgroup("41 - Input 0-7") special(SPC_MOD) pp(TRUE) base(HEX) @@ -35,7 +35,7 @@ recordtype(mbbi) { } field(ONVL,DBF_ULONG) { prompt("One Value") - promptgroup(GUI_BITS1) + promptgroup("41 - Input 0-7") special(SPC_MOD) pp(TRUE) base(HEX) @@ -43,7 +43,7 @@ recordtype(mbbi) { } field(TWVL,DBF_ULONG) { prompt("Two Value") - promptgroup(GUI_BITS1) + promptgroup("41 - Input 0-7") special(SPC_MOD) pp(TRUE) base(HEX) @@ -51,7 +51,7 @@ recordtype(mbbi) { } field(THVL,DBF_ULONG) { prompt("Three Value") - promptgroup(GUI_BITS1) + promptgroup("41 - Input 0-7") special(SPC_MOD) pp(TRUE) base(HEX) @@ -59,7 +59,7 @@ recordtype(mbbi) { } field(FRVL,DBF_ULONG) { prompt("Four Value") - promptgroup(GUI_BITS1) + promptgroup("41 - Input 0-7") special(SPC_MOD) pp(TRUE) base(HEX) @@ -67,7 +67,7 @@ recordtype(mbbi) { } field(FVVL,DBF_ULONG) { prompt("Five Value") - promptgroup(GUI_BITS1) + promptgroup("41 - Input 0-7") special(SPC_MOD) pp(TRUE) base(HEX) @@ -75,7 +75,7 @@ recordtype(mbbi) { } field(SXVL,DBF_ULONG) { prompt("Six Value") - promptgroup(GUI_BITS1) + promptgroup("41 - Input 0-7") special(SPC_MOD) pp(TRUE) base(HEX) @@ -83,7 +83,7 @@ recordtype(mbbi) { } field(SVVL,DBF_ULONG) { prompt("Seven Value") - promptgroup(GUI_BITS1) + promptgroup("41 - Input 0-7") special(SPC_MOD) pp(TRUE) base(HEX) @@ -91,7 +91,7 @@ recordtype(mbbi) { } field(EIVL,DBF_ULONG) { prompt("Eight Value") - promptgroup(GUI_BITS2) + promptgroup("42 - Input 8-15") special(SPC_MOD) pp(TRUE) base(HEX) @@ -99,7 +99,7 @@ recordtype(mbbi) { } field(NIVL,DBF_ULONG) { prompt("Nine Value") - promptgroup(GUI_BITS2) + promptgroup("42 - Input 8-15") special(SPC_MOD) pp(TRUE) base(HEX) @@ -107,7 +107,7 @@ recordtype(mbbi) { } field(TEVL,DBF_ULONG) { prompt("Ten Value") - promptgroup(GUI_BITS2) + promptgroup("42 - Input 8-15") special(SPC_MOD) pp(TRUE) base(HEX) @@ -115,7 +115,7 @@ recordtype(mbbi) { } field(ELVL,DBF_ULONG) { prompt("Eleven Value") - promptgroup(GUI_BITS2) + promptgroup("42 - Input 8-15") special(SPC_MOD) pp(TRUE) base(HEX) @@ -123,7 +123,7 @@ recordtype(mbbi) { } field(TVVL,DBF_ULONG) { prompt("Twelve Value") - promptgroup(GUI_BITS2) + promptgroup("42 - Input 8-15") special(SPC_MOD) pp(TRUE) base(HEX) @@ -131,7 +131,7 @@ recordtype(mbbi) { } field(TTVL,DBF_ULONG) { prompt("Thirteen Value") - promptgroup(GUI_BITS2) + promptgroup("42 - Input 8-15") special(SPC_MOD) pp(TRUE) base(HEX) @@ -139,7 +139,7 @@ recordtype(mbbi) { } field(FTVL,DBF_ULONG) { prompt("Fourteen Value") - promptgroup(GUI_BITS2) + promptgroup("42 - Input 8-15") special(SPC_MOD) pp(TRUE) base(HEX) @@ -147,7 +147,7 @@ recordtype(mbbi) { } field(FFVL,DBF_ULONG) { prompt("Fifteen Value") - promptgroup(GUI_BITS2) + promptgroup("42 - Input 8-15") special(SPC_MOD) pp(TRUE) base(HEX) @@ -155,7 +155,7 @@ recordtype(mbbi) { } field(ZRST,DBF_STRING) { prompt("Zero String") - promptgroup(GUI_BITS1) + promptgroup("81 - Display 0-7") special(SPC_MOD) pp(TRUE) interest(1) @@ -163,7 +163,7 @@ recordtype(mbbi) { } field(ONST,DBF_STRING) { prompt("One String") - promptgroup(GUI_BITS1) + promptgroup("81 - Display 0-7") special(SPC_MOD) pp(TRUE) interest(1) @@ -171,7 +171,7 @@ recordtype(mbbi) { } field(TWST,DBF_STRING) { prompt("Two String") - promptgroup(GUI_BITS1) + promptgroup("81 - Display 0-7") special(SPC_MOD) pp(TRUE) interest(1) @@ -179,7 +179,7 @@ recordtype(mbbi) { } field(THST,DBF_STRING) { prompt("Three String") - promptgroup(GUI_BITS1) + promptgroup("81 - Display 0-7") special(SPC_MOD) pp(TRUE) interest(1) @@ -187,7 +187,7 @@ recordtype(mbbi) { } field(FRST,DBF_STRING) { prompt("Four String") - promptgroup(GUI_BITS1) + promptgroup("81 - Display 0-7") special(SPC_MOD) pp(TRUE) interest(1) @@ -195,7 +195,7 @@ recordtype(mbbi) { } field(FVST,DBF_STRING) { prompt("Five String") - promptgroup(GUI_BITS1) + promptgroup("81 - Display 0-7") special(SPC_MOD) pp(TRUE) interest(1) @@ -203,7 +203,7 @@ recordtype(mbbi) { } field(SXST,DBF_STRING) { prompt("Six String") - promptgroup(GUI_BITS1) + promptgroup("81 - Display 0-7") special(SPC_MOD) pp(TRUE) interest(1) @@ -211,7 +211,7 @@ recordtype(mbbi) { } field(SVST,DBF_STRING) { prompt("Seven String") - promptgroup(GUI_BITS1) + promptgroup("81 - Display 0-7") special(SPC_MOD) pp(TRUE) interest(1) @@ -219,7 +219,7 @@ recordtype(mbbi) { } field(EIST,DBF_STRING) { prompt("Eight String") - promptgroup(GUI_BITS2) + promptgroup("82 - Display 8-15") special(SPC_MOD) pp(TRUE) interest(1) @@ -227,7 +227,7 @@ recordtype(mbbi) { } field(NIST,DBF_STRING) { prompt("Nine String") - promptgroup(GUI_BITS2) + promptgroup("82 - Display 8-15") special(SPC_MOD) pp(TRUE) interest(1) @@ -235,7 +235,7 @@ recordtype(mbbi) { } field(TEST,DBF_STRING) { prompt("Ten String") - promptgroup(GUI_BITS2) + promptgroup("82 - Display 8-15") special(SPC_MOD) pp(TRUE) interest(1) @@ -243,7 +243,7 @@ recordtype(mbbi) { } field(ELST,DBF_STRING) { prompt("Eleven String") - promptgroup(GUI_BITS2) + promptgroup("82 - Display 8-15") special(SPC_MOD) pp(TRUE) interest(1) @@ -251,7 +251,7 @@ recordtype(mbbi) { } field(TVST,DBF_STRING) { prompt("Twelve String") - promptgroup(GUI_BITS2) + promptgroup("82 - Display 8-15") special(SPC_MOD) pp(TRUE) interest(1) @@ -259,7 +259,7 @@ recordtype(mbbi) { } field(TTST,DBF_STRING) { prompt("Thirteen String") - promptgroup(GUI_BITS2) + promptgroup("82 - Display 8-15") special(SPC_MOD) pp(TRUE) interest(1) @@ -267,7 +267,7 @@ recordtype(mbbi) { } field(FTST,DBF_STRING) { prompt("Fourteen String") - promptgroup(GUI_BITS2) + promptgroup("82 - Display 8-15") special(SPC_MOD) pp(TRUE) interest(1) @@ -275,7 +275,7 @@ recordtype(mbbi) { } field(FFST,DBF_STRING) { prompt("Fifteen String") - promptgroup(GUI_BITS2) + promptgroup("82 - Display 8-15") special(SPC_MOD) pp(TRUE) interest(1) @@ -283,136 +283,136 @@ recordtype(mbbi) { } field(ZRSV,DBF_MENU) { prompt("State Zero Severity") - promptgroup(GUI_BITS1) + promptgroup("71 - Alarm 0-7") pp(TRUE) interest(1) menu(menuAlarmSevr) } field(ONSV,DBF_MENU) { prompt("State One Severity") - promptgroup(GUI_BITS1) + promptgroup("71 - Alarm 0-7") pp(TRUE) interest(1) menu(menuAlarmSevr) } field(TWSV,DBF_MENU) { prompt("State Two Severity") - promptgroup(GUI_BITS1) + promptgroup("71 - Alarm 0-7") pp(TRUE) interest(1) menu(menuAlarmSevr) } field(THSV,DBF_MENU) { prompt("State Three Severity") - promptgroup(GUI_BITS1) + promptgroup("71 - Alarm 0-7") pp(TRUE) interest(1) menu(menuAlarmSevr) } field(FRSV,DBF_MENU) { prompt("State Four Severity") - promptgroup(GUI_BITS1) + promptgroup("71 - Alarm 0-7") pp(TRUE) interest(1) menu(menuAlarmSevr) } field(FVSV,DBF_MENU) { prompt("State Five Severity") - promptgroup(GUI_BITS1) + promptgroup("71 - Alarm 0-7") pp(TRUE) interest(1) menu(menuAlarmSevr) } field(SXSV,DBF_MENU) { prompt("State Six Severity") - promptgroup(GUI_BITS1) + promptgroup("71 - Alarm 0-7") pp(TRUE) interest(1) menu(menuAlarmSevr) } field(SVSV,DBF_MENU) { prompt("State Seven Severity") - promptgroup(GUI_BITS1) + promptgroup("71 - Alarm 0-7") pp(TRUE) interest(1) menu(menuAlarmSevr) } field(EISV,DBF_MENU) { prompt("State Eight Severity") - promptgroup(GUI_BITS2) + promptgroup("72 - Alarm 8-15") pp(TRUE) interest(1) menu(menuAlarmSevr) } field(NISV,DBF_MENU) { prompt("State Nine Severity") - promptgroup(GUI_BITS2) + promptgroup("72 - Alarm 8-15") pp(TRUE) interest(1) menu(menuAlarmSevr) } field(TESV,DBF_MENU) { prompt("State Ten Severity") - promptgroup(GUI_BITS2) + promptgroup("72 - Alarm 8-15") pp(TRUE) interest(1) menu(menuAlarmSevr) } field(ELSV,DBF_MENU) { prompt("State Eleven Severity") - promptgroup(GUI_BITS2) + promptgroup("72 - Alarm 8-15") pp(TRUE) interest(1) menu(menuAlarmSevr) } field(TVSV,DBF_MENU) { prompt("State Twelve Severity") - promptgroup(GUI_BITS2) + promptgroup("72 - Alarm 8-15") pp(TRUE) interest(1) menu(menuAlarmSevr) } field(TTSV,DBF_MENU) { prompt("State Thirteen Sevr") - promptgroup(GUI_BITS2) + promptgroup("72 - Alarm 8-15") pp(TRUE) interest(1) menu(menuAlarmSevr) } field(FTSV,DBF_MENU) { prompt("State Fourteen Sevr") - promptgroup(GUI_BITS2) + promptgroup("72 - Alarm 8-15") pp(TRUE) interest(1) menu(menuAlarmSevr) } field(FFSV,DBF_MENU) { prompt("State Fifteen Severity") - promptgroup(GUI_BITS2) + promptgroup("72 - Alarm 8-15") pp(TRUE) interest(1) menu(menuAlarmSevr) } - field(AFTC, DBF_DOUBLE) { - prompt("Alarm Filter Time Constant") - promptgroup(GUI_ALARMS) - interest(1) - } - field(AFVL, DBF_DOUBLE) { - prompt("Alarm Filter Value") - special(SPC_NOMOD) - interest(3) - } + field(AFTC, DBF_DOUBLE) { + prompt("Alarm Filter Time Constant") + promptgroup("70 - Alarm") + interest(1) + } + field(AFVL, DBF_DOUBLE) { + prompt("Alarm Filter Value") + special(SPC_NOMOD) + interest(3) + } field(UNSV,DBF_MENU) { prompt("Unknown State Severity") - promptgroup(GUI_MBB) + promptgroup("70 - Alarm") pp(TRUE) interest(1) menu(menuAlarmSevr) } field(COSV,DBF_MENU) { prompt("Change of State Svr") - promptgroup(GUI_MBB) + promptgroup("70 - Alarm") pp(TRUE) interest(1) menu(menuAlarmSevr) @@ -448,12 +448,12 @@ recordtype(mbbi) { } field(SHFT,DBF_USHORT) { prompt("Shift") - promptgroup(GUI_MBB) + promptgroup("40 - Input") interest(1) } field(SIOL,DBF_INLINK) { prompt("Sim Input Specifctn") - promptgroup(GUI_MBB) + promptgroup("90 - Simulate") interest(1) } field(SVAL,DBF_ULONG) { @@ -461,7 +461,7 @@ recordtype(mbbi) { } field(SIML,DBF_INLINK) { prompt("Sim Mode Location") - promptgroup(GUI_MBB) + promptgroup("90 - Simulate") interest(1) } field(SIMM,DBF_MENU) { @@ -471,7 +471,7 @@ recordtype(mbbi) { } field(SIMS,DBF_MENU) { prompt("Sim mode Alarm Svrty") - promptgroup(GUI_MBB) + promptgroup("90 - Simulate") interest(2) menu(menuAlarmSevr) } diff --git a/src/std/rec/mbboDirectRecord.c b/src/std/rec/mbboDirectRecord.c index fb36a0a3b..0a6e3391e 100644 --- a/src/std/rec/mbboDirectRecord.c +++ b/src/std/rec/mbboDirectRecord.c @@ -7,8 +7,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ -/* $Revision-Id$ */ - /* mbboDirectRecord.c - Record Support for mbboDirect records */ /* * Original Author: Bob Dalesio @@ -44,8 +42,8 @@ /* Create RSET - Record Support Entry Table*/ #define report NULL #define initialize NULL -static long init_record(mbboDirectRecord *, int); -static long process(mbboDirectRecord *); +static long init_record(struct dbCommon *, int); +static long process(struct dbCommon *); static long special(DBADDR *, int); #define get_value NULL #define cvt_dbaddr NULL @@ -98,8 +96,9 @@ static long writeValue(mbboDirectRecord *); #define NUM_BITS 16 -static long init_record(mbboDirectRecord *prec, int pass) +static long init_record(struct dbCommon *pcommon, int pass) { + struct mbboDirectRecord *prec = (struct mbboDirectRecord *)pcommon; struct mbbodset *pdset = (struct mbbodset *) prec->dset; long status = 0; @@ -159,8 +158,9 @@ static long init_record(mbboDirectRecord *prec, int pass) return status; } -static long process(mbboDirectRecord *prec) +static long process(struct dbCommon *pcommon) { + struct mbboDirectRecord *prec = (struct mbboDirectRecord *)pcommon; struct mbbodset *pdset = (struct mbbodset *)(prec->dset); long status = 0; int pact = prec->pact; diff --git a/src/std/rec/mbboDirectRecord.dbd b/src/std/rec/mbboDirectRecord.dbd index df2927de5..0b4285e32 100644 --- a/src/std/rec/mbboDirectRecord.dbd +++ b/src/std/rec/mbboDirectRecord.dbd @@ -10,13 +10,13 @@ recordtype(mbboDirect) { include "dbCommon.dbd" field(VAL,DBF_USHORT) { prompt("Word") - promptgroup(GUI_OUTPUT) + promptgroup("50 - Output") asl(ASL0) pp(TRUE) } field(OMSL,DBF_MENU) { prompt("Output Mode Select") - promptgroup(GUI_MBB) + promptgroup("50 - Output") special(SPC_RESET) pp(TRUE) interest(1) @@ -24,128 +24,128 @@ recordtype(mbboDirect) { } field(NOBT,DBF_SHORT) { prompt("Number of Bits") - promptgroup(GUI_MBB) + promptgroup("50 - Output") special(SPC_NOMOD) interest(1) } field(DOL,DBF_INLINK) { prompt("Desired Output Loc") - promptgroup(GUI_MBB) + promptgroup("40 - Input") interest(1) } field(OUT,DBF_OUTLINK) { prompt("Output Specification") - promptgroup(GUI_MBB) + promptgroup("50 - Output") interest(1) } field(B0,DBF_UCHAR) { prompt("Bit 0") - promptgroup(GUI_BITS1) + promptgroup("51 - Output 0-7") special(SPC_MOD) pp(TRUE) interest(1) } field(B1,DBF_UCHAR) { prompt("Bit 1") - promptgroup(GUI_BITS1) + promptgroup("51 - Output 0-7") special(SPC_MOD) pp(TRUE) interest(1) } field(B2,DBF_UCHAR) { prompt("Bit 2") - promptgroup(GUI_BITS1) + promptgroup("51 - Output 0-7") special(SPC_MOD) pp(TRUE) interest(1) } field(B3,DBF_UCHAR) { prompt("Bit 3") - promptgroup(GUI_BITS1) + promptgroup("51 - Output 0-7") special(SPC_MOD) pp(TRUE) interest(1) } field(B4,DBF_UCHAR) { prompt("Bit 4") - promptgroup(GUI_BITS1) + promptgroup("51 - Output 0-7") special(SPC_MOD) pp(TRUE) interest(1) } field(B5,DBF_UCHAR) { prompt("Bit 5") - promptgroup(GUI_BITS1) + promptgroup("51 - Output 0-7") special(SPC_MOD) pp(TRUE) interest(1) } field(B6,DBF_UCHAR) { prompt("Bit 6") - promptgroup(GUI_BITS1) + promptgroup("51 - Output 0-7") special(SPC_MOD) pp(TRUE) interest(1) } field(B7,DBF_UCHAR) { prompt("Bit 7") - promptgroup(GUI_BITS1) + promptgroup("51 - Output 0-7") special(SPC_MOD) pp(TRUE) interest(1) } field(B8,DBF_UCHAR) { prompt("Bit 8") - promptgroup(GUI_BITS2) + promptgroup("52 - Output 9-F") special(SPC_MOD) pp(TRUE) interest(1) } field(B9,DBF_UCHAR) { prompt("Bit 9") - promptgroup(GUI_BITS2) + promptgroup("52 - Output 9-F") special(SPC_MOD) pp(TRUE) interest(1) } field(BA,DBF_UCHAR) { prompt("Bit 10") - promptgroup(GUI_BITS2) + promptgroup("52 - Output 9-F") special(SPC_MOD) pp(TRUE) interest(1) } field(BB,DBF_UCHAR) { prompt("Bit 11") - promptgroup(GUI_BITS2) + promptgroup("52 - Output 9-F") special(SPC_MOD) pp(TRUE) interest(1) } field(BC,DBF_UCHAR) { prompt("Bit 12") - promptgroup(GUI_BITS2) + promptgroup("52 - Output 9-F") special(SPC_MOD) pp(TRUE) interest(1) } field(BD,DBF_UCHAR) { prompt("Bit 13") - promptgroup(GUI_BITS2) + promptgroup("52 - Output 9-F") special(SPC_MOD) pp(TRUE) interest(1) } field(BE,DBF_UCHAR) { prompt("Bit 14") - promptgroup(GUI_BITS2) + promptgroup("52 - Output 9-F") special(SPC_MOD) pp(TRUE) interest(1) } field(BF,DBF_UCHAR) { prompt("Bit 15") - promptgroup(GUI_BITS2) + promptgroup("52 - Output 9-F") special(SPC_MOD) pp(TRUE) interest(1) @@ -181,17 +181,17 @@ recordtype(mbboDirect) { } field(SHFT,DBF_ULONG) { prompt("Shift") - promptgroup(GUI_MBB) + promptgroup("50 - Output") interest(1) } field(SIOL,DBF_OUTLINK) { prompt("Sim Output Specifctn") - promptgroup(GUI_MBB) + promptgroup("90 - Simulate") interest(1) } field(SIML,DBF_INLINK) { prompt("Sim Mode Location") - promptgroup(GUI_MBB) + promptgroup("90 - Simulate") interest(1) } field(SIMM,DBF_MENU) { @@ -201,19 +201,19 @@ recordtype(mbboDirect) { } field(SIMS,DBF_MENU) { prompt("Sim mode Alarm Svrty") - promptgroup(GUI_MBB) + promptgroup("90 - Simulate") interest(2) menu(menuAlarmSevr) } field(IVOA,DBF_MENU) { prompt("INVALID outpt action") - promptgroup(GUI_MBB) + promptgroup("50 - Output") interest(2) menu(menuIvoa) } field(IVOV,DBF_USHORT) { prompt("INVALID output value") - promptgroup(GUI_MBB) + promptgroup("50 - Output") interest(2) } } diff --git a/src/std/rec/mbboRecord.c b/src/std/rec/mbboRecord.c index 9d00a6d5e..0ae6a815a 100644 --- a/src/std/rec/mbboRecord.c +++ b/src/std/rec/mbboRecord.c @@ -8,8 +8,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ -/* $Revision-Id$ */ - /* mbboRecord.c - Record Support Routines for multi bit binary Output records */ /* * Original Author: Bob Dalesio @@ -45,8 +43,8 @@ /* Create RSET - Record Support Entry Table*/ #define report NULL #define initialize NULL -static long init_record(mbboRecord *, int); -static long process(mbboRecord *); +static long init_record(struct dbCommon *, int); +static long process(struct dbCommon *); static long special(DBADDR *, int); #define get_value NULL static long cvt_dbaddr(DBADDR *); @@ -54,9 +52,9 @@ static long cvt_dbaddr(DBADDR *); #define put_array_info NULL #define get_units NULL #define get_precision NULL -static long get_enum_str(DBADDR *, char *); -static long get_enum_strs(DBADDR *, struct dbr_enumStrs *); -static long put_enum_str(DBADDR *, char *); +static long get_enum_str(const DBADDR *, char *); +static long get_enum_strs(const DBADDR *, struct dbr_enumStrs *); +static long put_enum_str(const DBADDR *, const char *); #define get_graphic_double NULL #define get_control_double NULL #define get_alarm_double NULL @@ -115,8 +113,9 @@ static void init_common(mbboRecord *prec) prec->sdef = FALSE; } -static long init_record(mbboRecord *prec, int pass) +static long init_record(struct dbCommon *pcommon, int pass) { + struct mbboRecord *prec = (struct mbboRecord *)pcommon; struct mbbodset *pdset; long status; @@ -190,9 +189,10 @@ static long init_record(mbboRecord *prec, int pass) return status; } -static long process(mbboRecord *prec) +static long process(struct dbCommon *pcommon) { - struct mbbodset *pdset = (struct mbbodset *) prec->dset; + struct mbboRecord *prec = (struct mbboRecord *)pcommon; + struct mbbodset *pdset = (struct mbbodset *) prec->dset; long status = 0; int pact = prec->pact; @@ -303,7 +303,7 @@ static long cvt_dbaddr(DBADDR *paddr) return 0; } -static long get_enum_str(DBADDR *paddr, char *pstring) +static long get_enum_str(const DBADDR *paddr, char *pstring) { mbboRecord *prec = (mbboRecord *) paddr->precord; epicsEnum16 *pfield = paddr->pfield; @@ -323,7 +323,7 @@ static long get_enum_str(DBADDR *paddr, char *pstring) return 0; } -static long get_enum_strs(DBADDR *paddr, struct dbr_enumStrs *pes) +static long get_enum_strs(const DBADDR *paddr, struct dbr_enumStrs *pes) { mbboRecord *prec = (mbboRecord *) paddr->precord; const char *pstate; @@ -342,7 +342,7 @@ static long get_enum_strs(DBADDR *paddr, struct dbr_enumStrs *pes) return 0; } -static long put_enum_str(DBADDR *paddr,char *pstring) +static long put_enum_str(const DBADDR *paddr, const char *pstring) { mbboRecord *prec = (mbboRecord *) paddr->precord; const char *pstate; diff --git a/src/std/rec/mbboRecord.dbd b/src/std/rec/mbboRecord.dbd index 1a32ad1cd..f841ba018 100644 --- a/src/std/rec/mbboRecord.dbd +++ b/src/std/rec/mbboRecord.dbd @@ -10,7 +10,7 @@ recordtype(mbbo) { include "dbCommon.dbd" field(VAL,DBF_ENUM) { prompt("Desired Value") - promptgroup(GUI_OUTPUT) + promptgroup("50 - Output") special(SPC_DBADDR) asl(ASL0) pp(TRUE) @@ -19,29 +19,29 @@ recordtype(mbbo) { } field(DOL,DBF_INLINK) { prompt("Desired Output Loc") - promptgroup(GUI_MBB) + promptgroup("40 - Input") interest(1) } field(OMSL,DBF_MENU) { prompt("Output Mode Select") - promptgroup(GUI_MBB) + promptgroup("50 - Output") interest(1) menu(menuOmsl) } field(NOBT,DBF_USHORT) { prompt("Number of Bits") - promptgroup(GUI_MBB) + promptgroup("50 - Output") special(SPC_NOMOD) interest(1) } field(OUT,DBF_OUTLINK) { prompt("Output Specification") - promptgroup(GUI_MBB) + promptgroup("50 - Output") interest(1) } field(ZRVL,DBF_ULONG) { prompt("Zero Value") - promptgroup(GUI_BITS1) + promptgroup("51 - Output 0-7") special(SPC_MOD) pp(TRUE) base(HEX) @@ -49,7 +49,7 @@ recordtype(mbbo) { } field(ONVL,DBF_ULONG) { prompt("One Value") - promptgroup(GUI_BITS1) + promptgroup("51 - Output 0-7") special(SPC_MOD) pp(TRUE) base(HEX) @@ -57,7 +57,7 @@ recordtype(mbbo) { } field(TWVL,DBF_ULONG) { prompt("Two Value") - promptgroup(GUI_BITS1) + promptgroup("51 - Output 0-7") special(SPC_MOD) pp(TRUE) base(HEX) @@ -65,7 +65,7 @@ recordtype(mbbo) { } field(THVL,DBF_ULONG) { prompt("Three Value") - promptgroup(GUI_BITS1) + promptgroup("51 - Output 0-7") special(SPC_MOD) pp(TRUE) base(HEX) @@ -73,7 +73,7 @@ recordtype(mbbo) { } field(FRVL,DBF_ULONG) { prompt("Four Value") - promptgroup(GUI_BITS1) + promptgroup("51 - Output 0-7") special(SPC_MOD) pp(TRUE) base(HEX) @@ -81,7 +81,7 @@ recordtype(mbbo) { } field(FVVL,DBF_ULONG) { prompt("Five Value") - promptgroup(GUI_BITS1) + promptgroup("51 - Output 0-7") special(SPC_MOD) pp(TRUE) base(HEX) @@ -89,7 +89,7 @@ recordtype(mbbo) { } field(SXVL,DBF_ULONG) { prompt("Six Value") - promptgroup(GUI_BITS1) + promptgroup("51 - Output 0-7") special(SPC_MOD) pp(TRUE) base(HEX) @@ -97,7 +97,7 @@ recordtype(mbbo) { } field(SVVL,DBF_ULONG) { prompt("Seven Value") - promptgroup(GUI_BITS1) + promptgroup("51 - Output 0-7") special(SPC_MOD) pp(TRUE) base(HEX) @@ -105,7 +105,7 @@ recordtype(mbbo) { } field(EIVL,DBF_ULONG) { prompt("Eight Value") - promptgroup(GUI_BITS2) + promptgroup("52 - Output 8-15") special(SPC_MOD) pp(TRUE) base(HEX) @@ -113,7 +113,7 @@ recordtype(mbbo) { } field(NIVL,DBF_ULONG) { prompt("Nine Value") - promptgroup(GUI_BITS2) + promptgroup("52 - Output 8-15") special(SPC_MOD) pp(TRUE) base(HEX) @@ -121,7 +121,7 @@ recordtype(mbbo) { } field(TEVL,DBF_ULONG) { prompt("Ten Value") - promptgroup(GUI_BITS2) + promptgroup("52 - Output 8-15") special(SPC_MOD) pp(TRUE) base(HEX) @@ -129,7 +129,7 @@ recordtype(mbbo) { } field(ELVL,DBF_ULONG) { prompt("Eleven Value") - promptgroup(GUI_BITS2) + promptgroup("52 - Output 8-15") special(SPC_MOD) pp(TRUE) base(HEX) @@ -137,7 +137,7 @@ recordtype(mbbo) { } field(TVVL,DBF_ULONG) { prompt("Twelve Value") - promptgroup(GUI_BITS2) + promptgroup("52 - Output 8-15") special(SPC_MOD) pp(TRUE) base(HEX) @@ -145,7 +145,7 @@ recordtype(mbbo) { } field(TTVL,DBF_ULONG) { prompt("Thirteen Value") - promptgroup(GUI_BITS2) + promptgroup("52 - Output 8-15") special(SPC_MOD) pp(TRUE) base(HEX) @@ -153,7 +153,7 @@ recordtype(mbbo) { } field(FTVL,DBF_ULONG) { prompt("Fourteen Value") - promptgroup(GUI_BITS2) + promptgroup("52 - Output 8-15") special(SPC_MOD) pp(TRUE) base(HEX) @@ -161,7 +161,7 @@ recordtype(mbbo) { } field(FFVL,DBF_ULONG) { prompt("Fifteen Value") - promptgroup(GUI_BITS2) + promptgroup("52 - Output 8-15") special(SPC_MOD) pp(TRUE) base(HEX) @@ -169,7 +169,7 @@ recordtype(mbbo) { } field(ZRST,DBF_STRING) { prompt("Zero String") - promptgroup(GUI_BITS1) + promptgroup("81 - Display 0-7") special(SPC_MOD) pp(TRUE) interest(1) @@ -177,7 +177,7 @@ recordtype(mbbo) { } field(ONST,DBF_STRING) { prompt("One String") - promptgroup(GUI_BITS1) + promptgroup("81 - Display 0-7") special(SPC_MOD) pp(TRUE) interest(1) @@ -185,7 +185,7 @@ recordtype(mbbo) { } field(TWST,DBF_STRING) { prompt("Two String") - promptgroup(GUI_BITS1) + promptgroup("81 - Display 0-7") special(SPC_MOD) pp(TRUE) interest(1) @@ -193,7 +193,7 @@ recordtype(mbbo) { } field(THST,DBF_STRING) { prompt("Three String") - promptgroup(GUI_BITS1) + promptgroup("81 - Display 0-7") special(SPC_MOD) pp(TRUE) interest(1) @@ -201,7 +201,7 @@ recordtype(mbbo) { } field(FRST,DBF_STRING) { prompt("Four String") - promptgroup(GUI_BITS1) + promptgroup("81 - Display 0-7") special(SPC_MOD) pp(TRUE) interest(1) @@ -209,7 +209,7 @@ recordtype(mbbo) { } field(FVST,DBF_STRING) { prompt("Five String") - promptgroup(GUI_BITS1) + promptgroup("81 - Display 0-7") special(SPC_MOD) pp(TRUE) interest(1) @@ -217,7 +217,7 @@ recordtype(mbbo) { } field(SXST,DBF_STRING) { prompt("Six String") - promptgroup(GUI_BITS1) + promptgroup("81 - Display 0-7") special(SPC_MOD) pp(TRUE) interest(1) @@ -225,7 +225,7 @@ recordtype(mbbo) { } field(SVST,DBF_STRING) { prompt("Seven String") - promptgroup(GUI_BITS1) + promptgroup("81 - Display 0-7") special(SPC_MOD) pp(TRUE) interest(1) @@ -233,7 +233,7 @@ recordtype(mbbo) { } field(EIST,DBF_STRING) { prompt("Eight String") - promptgroup(GUI_BITS2) + promptgroup("82 - Display 8-15") special(SPC_MOD) pp(TRUE) interest(1) @@ -241,7 +241,7 @@ recordtype(mbbo) { } field(NIST,DBF_STRING) { prompt("Nine String") - promptgroup(GUI_BITS2) + promptgroup("82 - Display 8-15") special(SPC_MOD) pp(TRUE) interest(1) @@ -249,7 +249,7 @@ recordtype(mbbo) { } field(TEST,DBF_STRING) { prompt("Ten String") - promptgroup(GUI_BITS2) + promptgroup("82 - Display 8-15") special(SPC_MOD) pp(TRUE) interest(1) @@ -257,7 +257,7 @@ recordtype(mbbo) { } field(ELST,DBF_STRING) { prompt("Eleven String") - promptgroup(GUI_BITS2) + promptgroup("82 - Display 8-15") special(SPC_MOD) pp(TRUE) interest(1) @@ -265,7 +265,7 @@ recordtype(mbbo) { } field(TVST,DBF_STRING) { prompt("Twelve String") - promptgroup(GUI_BITS2) + promptgroup("82 - Display 8-15") special(SPC_MOD) pp(TRUE) interest(1) @@ -273,7 +273,7 @@ recordtype(mbbo) { } field(TTST,DBF_STRING) { prompt("Thirteen String") - promptgroup(GUI_BITS2) + promptgroup("82 - Display 8-15") special(SPC_MOD) pp(TRUE) interest(1) @@ -281,7 +281,7 @@ recordtype(mbbo) { } field(FTST,DBF_STRING) { prompt("Fourteen String") - promptgroup(GUI_BITS2) + promptgroup("82 - Display 8-15") special(SPC_MOD) pp(TRUE) interest(1) @@ -289,7 +289,7 @@ recordtype(mbbo) { } field(FFST,DBF_STRING) { prompt("Fifteen String") - promptgroup(GUI_BITS2) + promptgroup("82 - Display 8-15") special(SPC_MOD) pp(TRUE) interest(1) @@ -297,126 +297,126 @@ recordtype(mbbo) { } field(ZRSV,DBF_MENU) { prompt("State Zero Severity") - promptgroup(GUI_BITS1) + promptgroup("71 - Alarm 0-7") pp(TRUE) interest(1) menu(menuAlarmSevr) } field(ONSV,DBF_MENU) { prompt("State One Severity") - promptgroup(GUI_BITS1) + promptgroup("71 - Alarm 0-7") pp(TRUE) interest(1) menu(menuAlarmSevr) } field(TWSV,DBF_MENU) { prompt("State Two Severity") - promptgroup(GUI_BITS1) + promptgroup("71 - Alarm 0-7") pp(TRUE) interest(1) menu(menuAlarmSevr) } field(THSV,DBF_MENU) { prompt("State Three Severity") - promptgroup(GUI_BITS1) + promptgroup("71 - Alarm 0-7") pp(TRUE) interest(1) menu(menuAlarmSevr) } field(FRSV,DBF_MENU) { prompt("State Four Severity") - promptgroup(GUI_BITS1) + promptgroup("71 - Alarm 0-7") pp(TRUE) interest(1) menu(menuAlarmSevr) } field(FVSV,DBF_MENU) { prompt("State Five Severity") - promptgroup(GUI_BITS1) + promptgroup("71 - Alarm 0-7") pp(TRUE) interest(1) menu(menuAlarmSevr) } field(SXSV,DBF_MENU) { prompt("State Six Severity") - promptgroup(GUI_BITS1) + promptgroup("71 - Alarm 0-7") pp(TRUE) interest(1) menu(menuAlarmSevr) } field(SVSV,DBF_MENU) { prompt("State Seven Severity") - promptgroup(GUI_BITS1) + promptgroup("71 - Alarm 0-7") pp(TRUE) interest(1) menu(menuAlarmSevr) } field(EISV,DBF_MENU) { prompt("State Eight Severity") - promptgroup(GUI_BITS2) + promptgroup("72 - Alarm 8-15") pp(TRUE) interest(1) menu(menuAlarmSevr) } field(NISV,DBF_MENU) { prompt("State Nine Severity") - promptgroup(GUI_BITS2) + promptgroup("72 - Alarm 8-15") pp(TRUE) interest(1) menu(menuAlarmSevr) } field(TESV,DBF_MENU) { prompt("State Ten Severity") - promptgroup(GUI_BITS2) + promptgroup("72 - Alarm 8-15") pp(TRUE) interest(1) menu(menuAlarmSevr) } field(ELSV,DBF_MENU) { prompt("State Eleven Severity") - promptgroup(GUI_BITS2) + promptgroup("72 - Alarm 8-15") pp(TRUE) interest(1) menu(menuAlarmSevr) } field(TVSV,DBF_MENU) { prompt("State Twelve Severity") - promptgroup(GUI_BITS2) + promptgroup("72 - Alarm 8-15") pp(TRUE) interest(1) menu(menuAlarmSevr) } field(TTSV,DBF_MENU) { prompt("State Thirteen Sevr") - promptgroup(GUI_BITS2) + promptgroup("72 - Alarm 8-15") pp(TRUE) interest(1) menu(menuAlarmSevr) } field(FTSV,DBF_MENU) { prompt("State Fourteen Sevr") - promptgroup(GUI_BITS2) + promptgroup("72 - Alarm 8-15") pp(TRUE) interest(1) menu(menuAlarmSevr) } field(FFSV,DBF_MENU) { prompt("State Fifteen Sevr") - promptgroup(GUI_BITS2) + promptgroup("72 - Alarm 8-15") pp(TRUE) interest(1) menu(menuAlarmSevr) } field(UNSV,DBF_MENU) { prompt("Unknown State Sevr") - promptgroup(GUI_MBB) + promptgroup("70 - Alarm") pp(TRUE) interest(1) menu(menuAlarmSevr) } field(COSV,DBF_MENU) { prompt("Change of State Sevr") - promptgroup(GUI_MBB) + promptgroup("70 - Alarm") pp(TRUE) interest(1) menu(menuAlarmSevr) @@ -461,17 +461,17 @@ recordtype(mbbo) { } field(SHFT,DBF_USHORT) { prompt("Shift") - promptgroup(GUI_MBB) + promptgroup("50 - Output") interest(1) } field(SIOL,DBF_OUTLINK) { prompt("Sim Output Specifctn") - promptgroup(GUI_MBB) + promptgroup("90 - Simulate") interest(1) } field(SIML,DBF_INLINK) { prompt("Sim Mode Location") - promptgroup(GUI_MBB) + promptgroup("90 - Simulate") interest(1) } field(SIMM,DBF_MENU) { @@ -481,19 +481,19 @@ recordtype(mbbo) { } field(SIMS,DBF_MENU) { prompt("Sim mode Alarm Svrty") - promptgroup(GUI_MBB) + promptgroup("90 - Simulate") interest(2) menu(menuAlarmSevr) } field(IVOA,DBF_MENU) { prompt("INVALID outpt action") - promptgroup(GUI_MBB) + promptgroup("50 - Output") interest(2) menu(menuIvoa) } field(IVOV,DBF_USHORT) { prompt("INVALID output value") - promptgroup(GUI_MBB) + promptgroup("50 - Output") interest(2) } } diff --git a/src/std/rec/permissiveRecord.c b/src/std/rec/permissiveRecord.c index 65077253a..e553931bc 100644 --- a/src/std/rec/permissiveRecord.c +++ b/src/std/rec/permissiveRecord.c @@ -7,8 +7,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ -/* $Revision-Id$ */ - /* recPermissive.c - Record Support Routines for Permissive records */ /* * Original Author: Bob Dalesio @@ -39,7 +37,7 @@ #define report NULL #define initialize NULL #define init_record NULL -static long process(permissiveRecord *); +static long process(struct dbCommon *); #define special NULL #define get_value NULL #define cvt_dbaddr NULL @@ -78,8 +76,9 @@ epicsExportAddress(rset,permissiveRSET); static void monitor(permissiveRecord *); -static long process(permissiveRecord *prec) +static long process(struct dbCommon *pcommon) { + struct permissiveRecord *prec = (struct permissiveRecord *)pcommon; prec->pact=TRUE; prec->udf=FALSE; diff --git a/src/std/rec/permissiveRecord.dbd b/src/std/rec/permissiveRecord.dbd index 6e999175f..7eb04bf95 100644 --- a/src/std/rec/permissiveRecord.dbd +++ b/src/std/rec/permissiveRecord.dbd @@ -3,21 +3,21 @@ # National Laboratory. # Copyright (c) 2002 The Regents of the University of California, as # Operator of Los Alamos National Laboratory. -# EPICS BASE Versions 3.13.7 -# and higher are distributed subject to a Software License Agreement found -# in file LICENSE that is included with this distribution. +# EPICS BASE is distributed subject to a Software License Agreement found +# in file LICENSE that is included with this distribution. #************************************************************************* recordtype(permissive) { include "dbCommon.dbd" field(LABL,DBF_STRING) { prompt("Button Label") - promptgroup(GUI_DISPLAY) + promptgroup("80 - Display") pp(TRUE) interest(1) size(20) } field(VAL,DBF_USHORT) { prompt("Status") + promptgroup("40 - Input") asl(ASL0) pp(TRUE) } diff --git a/src/std/rec/printfRecord.c b/src/std/rec/printfRecord.c index f8419e4ad..17114712e 100644 --- a/src/std/rec/printfRecord.c +++ b/src/std/rec/printfRecord.c @@ -292,8 +292,9 @@ static void doPrintf(printfRecord *prec) } -static long init_record(printfRecord *prec, int pass) +static long init_record(struct dbCommon *pcommon, int pass) { + struct printfRecord *prec = (struct printfRecord *)pcommon; printfdset *pdset; if (pass == 0) { @@ -327,8 +328,9 @@ static long init_record(printfRecord *prec, int pass) return 0; } -static long process(printfRecord *prec) +static long process(struct dbCommon *pcommon) { + struct printfRecord *prec = (struct printfRecord *)pcommon; int pact = prec->pact; printfdset *pdset; long status = 0; diff --git a/src/std/rec/printfRecord.dbd b/src/std/rec/printfRecord.dbd index 37beccebf..4fd63ef3c 100644 --- a/src/std/rec/printfRecord.dbd +++ b/src/std/rec/printfRecord.dbd @@ -28,7 +28,7 @@ recordtype(printf) { } field(SIZV,DBF_USHORT) { prompt("Size of VAL buffer") - promptgroup(GUI_OUTPUT) + promptgroup("30 - Action") special(SPC_NOMOD) interest(1) initial("41") @@ -39,69 +39,69 @@ recordtype(printf) { } field(OUT,DBF_OUTLINK) { prompt("Output Specification") - promptgroup(GUI_OUTPUT) + promptgroup("50 - Output") interest(1) } field(FMT,DBF_STRING) { prompt("Format String") - promptgroup(GUI_CALC) + promptgroup("30 - Action") pp(TRUE) size(81) } field(IVLS,DBF_STRING) { prompt("Invalid Link String") - promptgroup(GUI_CALC) + promptgroup("30 - Action") size(16) initial("LNK") } field(INP0,DBF_INLINK) { prompt("Input 0") - promptgroup(GUI_INPUTS) + promptgroup("40 - Input") interest(1) } field(INP1,DBF_INLINK) { prompt("Input 1") - promptgroup(GUI_INPUTS) + promptgroup("40 - Input") interest(1) } field(INP2,DBF_INLINK) { prompt("Input 2") - promptgroup(GUI_INPUTS) + promptgroup("40 - Input") interest(1) } field(INP3,DBF_INLINK) { prompt("Input 3") - promptgroup(GUI_INPUTS) + promptgroup("40 - Input") interest(1) } field(INP4,DBF_INLINK) { prompt("Input 4") - promptgroup(GUI_INPUTS) + promptgroup("40 - Input") interest(1) } field(INP5,DBF_INLINK) { prompt("Input 5") - promptgroup(GUI_INPUTS) + promptgroup("40 - Input") interest(1) } field(INP6,DBF_INLINK) { prompt("Input 6") - promptgroup(GUI_INPUTS) + promptgroup("40 - Input") interest(1) } field(INP7,DBF_INLINK) { prompt("Input 7") - promptgroup(GUI_INPUTS) + promptgroup("40 - Input") interest(1) } field(INP8,DBF_INLINK) { prompt("Input 8") - promptgroup(GUI_INPUTS) + promptgroup("40 - Input") interest(1) } field(INP9,DBF_INLINK) { prompt("Input 9") - promptgroup(GUI_INPUTS) + promptgroup("40 - Input") interest(1) } %/* Number of INPx fields defined */ diff --git a/src/std/rec/selRecord.c b/src/std/rec/selRecord.c index 37456feff..56a995c8f 100644 --- a/src/std/rec/selRecord.c +++ b/src/std/rec/selRecord.c @@ -7,8 +7,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ -/* $Revision-Id$ */ - /* selRecord.c - Record Support Routines for Select records */ /* * Original Author: Bob Dalesio @@ -40,15 +38,15 @@ /* Create RSET - Record Support Entry Table*/ #define report NULL #define initialize NULL -static long init_record(selRecord *, int); -static long process(selRecord *); +static long init_record(struct dbCommon *, int); +static long process(struct dbCommon *); #define special NULL #define get_value NULL #define cvt_dbaddr NULL #define get_array_info NULL #define put_array_info NULL static long get_units(DBADDR *, char *); -static long get_precision(DBADDR *, long *); +static long get_precision(const DBADDR *, long *); #define get_enum_str NULL #define get_enum_strs NULL #define put_enum_str NULL @@ -86,8 +84,9 @@ static int fetch_values(selRecord *); static void monitor(selRecord *); -static long init_record(selRecord *prec, int pass) +static long init_record(struct dbCommon *pcommon, int pass) { + struct selRecord *prec = (struct selRecord *)pcommon; struct link *plink; int i; double *pvalue; @@ -107,8 +106,9 @@ static long init_record(selRecord *prec, int pass) return 0; } -static long process(selRecord *prec) +static long process(struct dbCommon *pcommon) { + struct selRecord *prec = (struct selRecord *)pcommon; prec->pact = TRUE; if ( RTN_SUCCESS(fetch_values(prec)) ) { do_sel(prec); @@ -142,7 +142,7 @@ static long get_units(DBADDR *paddr, char *units) return(0); } -static long get_precision(DBADDR *paddr, long *precision) +static long get_precision(const DBADDR *paddr, long *precision) { selRecord *prec=(selRecord *)paddr->precord; double *pvalue,*plvalue; diff --git a/src/std/rec/selRecord.dbd b/src/std/rec/selRecord.dbd index 0d01586a0..724482704 100644 --- a/src/std/rec/selRecord.dbd +++ b/src/std/rec/selRecord.dbd @@ -3,9 +3,8 @@ # National Laboratory. # Copyright (c) 2002 The Regents of the University of California, as # Operator of Los Alamos National Laboratory. -# EPICS BASE Versions 3.13.7 -# and higher are distributed subject to a Software License Agreement found -# in file LICENSE that is included with this distribution. +# EPICS BASE is distributed subject to a Software License Agreement found +# in file LICENSE that is included with this distribution. #************************************************************************* menu(selSELM) { choice(selSELM_Specified,"Specified") @@ -17,12 +16,13 @@ recordtype(sel) { include "dbCommon.dbd" field(VAL,DBF_DOUBLE) { prompt("Result") + promptgroup("40 - Input") asl(ASL0) special(SPC_NOMOD) } field(SELM,DBF_MENU) { prompt("Select Mechanism") - promptgroup(GUI_INPUTS) + promptgroup("30 - Action") menu(selSELM) } field(SELN,DBF_USHORT) { @@ -30,124 +30,124 @@ recordtype(sel) { } field(PREC,DBF_SHORT) { prompt("Display Precision") - promptgroup(GUI_DISPLAY) + promptgroup("80 - Display") interest(1) } field(NVL,DBF_INLINK) { prompt("Index Value Location") - promptgroup(GUI_INPUTS) + promptgroup("30 - Action") interest(1) } field(INPA,DBF_INLINK) { prompt("Input A") - promptgroup(GUI_SELECT) + promptgroup("41 - Input A-F") interest(1) } field(INPB,DBF_INLINK) { prompt("Input B") - promptgroup(GUI_SELECT) + promptgroup("41 - Input A-F") interest(1) } field(INPC,DBF_INLINK) { prompt("Input C") - promptgroup(GUI_SELECT) + promptgroup("41 - Input A-F") interest(1) } field(INPD,DBF_INLINK) { prompt("Input D") - promptgroup(GUI_SELECT) + promptgroup("41 - Input A-F") interest(1) } field(INPE,DBF_INLINK) { prompt("Input E") - promptgroup(GUI_SELECT) + promptgroup("41 - Input A-F") interest(1) } field(INPF,DBF_INLINK) { prompt("Input F") - promptgroup(GUI_SELECT) + promptgroup("41 - Input A-F") interest(1) } field(INPG,DBF_INLINK) { prompt("Input G") - promptgroup(GUI_SELECT) + promptgroup("42 - Input G-L") interest(1) } field(INPH,DBF_INLINK) { prompt("Input H") - promptgroup(GUI_SELECT) + promptgroup("42 - Input G-L") interest(1) } field(INPI,DBF_INLINK) { prompt("Input I") - promptgroup(GUI_SELECT) + promptgroup("42 - Input G-L") interest(1) } field(INPJ,DBF_INLINK) { prompt("Input J") - promptgroup(GUI_SELECT) + promptgroup("42 - Input G-L") interest(1) } field(INPK,DBF_INLINK) { prompt("Input K") - promptgroup(GUI_SELECT) + promptgroup("42 - Input G-L") interest(1) } field(INPL,DBF_INLINK) { prompt("Input L") - promptgroup(GUI_SELECT) + promptgroup("42 - Input G-L") interest(1) } field(EGU,DBF_STRING) { - prompt("Units Name") - promptgroup(GUI_DISPLAY) + prompt("Engineering Units") + promptgroup("80 - Display") interest(1) size(16) prop(YES) } field(HOPR,DBF_DOUBLE) { prompt("High Operating Rng") - promptgroup(GUI_DISPLAY) + promptgroup("80 - Display") interest(1) prop(YES) } field(LOPR,DBF_DOUBLE) { prompt("Low Operating Range") - promptgroup(GUI_DISPLAY) + promptgroup("80 - Display") interest(1) prop(YES) } field(HIHI,DBF_DOUBLE) { prompt("Hihi Alarm Limit") - promptgroup(GUI_ALARMS) + promptgroup("70 - Alarm") pp(TRUE) interest(1) prop(YES) } field(LOLO,DBF_DOUBLE) { prompt("Lolo Alarm Limit") - promptgroup(GUI_ALARMS) + promptgroup("70 - Alarm") pp(TRUE) interest(1) prop(YES) } field(HIGH,DBF_DOUBLE) { prompt("High Alarm Limit") - promptgroup(GUI_ALARMS) + promptgroup("70 - Alarm") pp(TRUE) interest(1) prop(YES) } field(LOW,DBF_DOUBLE) { prompt("Low Alarm Limit") - promptgroup(GUI_ALARMS) + promptgroup("70 - Alarm") pp(TRUE) interest(1) prop(YES) } field(HHSV,DBF_MENU) { prompt("Hihi Severity") - promptgroup(GUI_ALARMS) + promptgroup("70 - Alarm") pp(TRUE) interest(1) prop(YES) @@ -155,7 +155,7 @@ recordtype(sel) { } field(LLSV,DBF_MENU) { prompt("Lolo Severity") - promptgroup(GUI_ALARMS) + promptgroup("70 - Alarm") pp(TRUE) interest(1) prop(YES) @@ -163,7 +163,7 @@ recordtype(sel) { } field(HSV,DBF_MENU) { prompt("High Severity") - promptgroup(GUI_ALARMS) + promptgroup("70 - Alarm") pp(TRUE) interest(1) prop(YES) @@ -171,7 +171,7 @@ recordtype(sel) { } field(LSV,DBF_MENU) { prompt("Low Severity") - promptgroup(GUI_ALARMS) + promptgroup("70 - Alarm") pp(TRUE) interest(1) prop(YES) @@ -179,17 +179,17 @@ recordtype(sel) { } field(HYST,DBF_DOUBLE) { prompt("Alarm Deadband") - promptgroup(GUI_ALARMS) + promptgroup("70 - Alarm") interest(1) } field(ADEL,DBF_DOUBLE) { prompt("Archive Deadband") - promptgroup(GUI_DISPLAY) + promptgroup("80 - Display") interest(1) } field(MDEL,DBF_DOUBLE) { prompt("Monitor Deadband") - promptgroup(GUI_DISPLAY) + promptgroup("80 - Display") interest(1) } field(A,DBF_DOUBLE) { diff --git a/src/std/rec/seqRecord.c b/src/std/rec/seqRecord.c index eae156fb9..86d05f254 100644 --- a/src/std/rec/seqRecord.c +++ b/src/std/rec/seqRecord.c @@ -8,8 +8,6 @@ \*************************************************************************/ /* - * $Revision-Id$ - * * Author: John Winans * Date: 09-21-92 */ @@ -38,15 +36,15 @@ static void processCallback(CALLBACK *arg); /* Create RSET - Record Support Entry Table*/ #define report NULL #define initialize NULL -static long init_record(seqRecord *prec, int pass); -static long process(seqRecord *prec); +static long init_record(struct dbCommon *prec, int pass); +static long process(struct dbCommon *prec); #define special NULL #define get_value NULL #define cvt_dbaddr NULL #define get_array_info NULL #define put_array_info NULL static long get_units(DBADDR *, char *); -static long get_precision(dbAddr *paddr, long *); +static long get_precision(const DBADDR *paddr, long *); #define get_enum_str NULL #define get_enum_strs NULL #define put_enum_str NULL @@ -103,8 +101,9 @@ typedef struct seqRecPvt { } seqRecPvt; -static long init_record(seqRecord *prec, int pass) +static long init_record(struct dbCommon *pcommon, int pass) { + struct seqRecord *prec = (struct seqRecord *)pcommon; int index; linkGrp *grp; seqRecPvt *pseqRecPvt; @@ -130,8 +129,9 @@ static long init_record(seqRecord *prec, int pass) return 0; } -static long process(seqRecord *prec) +static long process(struct dbCommon *pcommon) { + struct seqRecord *prec = (struct seqRecord *)pcommon; seqRecPvt *pcb = (seqRecPvt *) prec->dpvt; linkGrp *pgrp; epicsUInt16 lmask; @@ -206,7 +206,7 @@ static void processNextLink(seqRecord *prec) if (pgrp == NULL) { /* None left, finish up. */ - prec->rset->process(prec); + prec->rset->process((dbCommon *)prec); return; } @@ -297,7 +297,7 @@ static long get_units(DBADDR *paddr, char *units) return 0; } -static long get_precision(dbAddr *paddr, long *pprecision) +static long get_precision(const DBADDR *paddr, long *pprecision) { seqRecord *prec = (seqRecord *) paddr->precord; int fieldOffset = dbGetFieldIndex(paddr) - indexof(DLY1); diff --git a/src/std/rec/seqRecord.dbd b/src/std/rec/seqRecord.dbd index 3ef3d3ef9..826f3ecf6 100644 --- a/src/std/rec/seqRecord.dbd +++ b/src/std/rec/seqRecord.dbd @@ -20,7 +20,7 @@ recordtype(seq) { } field(SELM,DBF_MENU) { prompt("Select Mechanism") - promptgroup(GUI_INPUTS) + promptgroup("30 - Action") interest(1) menu(seqSELM) } @@ -31,16 +31,18 @@ recordtype(seq) { } field(SELL,DBF_INLINK) { prompt("Link Selection Loc") - promptgroup(GUI_INPUTS) + promptgroup("30 - Action") interest(1) } field(OFFS,DBF_SHORT) { prompt("Offset for Specified") + promptgroup("30 - Action") interest(1) initial("0") } field(SHFT,DBF_SHORT) { prompt("Shift for Mask mode") + promptgroup("30 - Action") interest(1) initial("-1") } @@ -50,17 +52,17 @@ recordtype(seq) { } field(PREC,DBF_SHORT) { prompt("Display Precision") - promptgroup(GUI_DISPLAY) + promptgroup("80 - Display") interest(1) } field(DLY0,DBF_DOUBLE) { prompt("Delay 0") - promptgroup(GUI_SEQ1) + promptgroup("41 - Link 0-7") interest(1) } field(DOL0,DBF_INLINK) { prompt("Input link 0") - promptgroup(GUI_SEQ1) + promptgroup("41 - Link 0-7") interest(1) } field(DO0,DBF_DOUBLE) { @@ -69,17 +71,17 @@ recordtype(seq) { } field(LNK0,DBF_OUTLINK) { prompt("Output Link 0") - promptgroup(GUI_SEQ1) + promptgroup("41 - Link 0-7") interest(1) } field(DLY1,DBF_DOUBLE) { prompt("Delay 1") - promptgroup(GUI_SEQ1) + promptgroup("41 - Link 0-7") interest(1) } field(DOL1,DBF_INLINK) { prompt("Input link1") - promptgroup(GUI_SEQ1) + promptgroup("41 - Link 0-7") interest(1) } field(DO1,DBF_DOUBLE) { @@ -88,17 +90,17 @@ recordtype(seq) { } field(LNK1,DBF_OUTLINK) { prompt("Output Link 1") - promptgroup(GUI_SEQ1) + promptgroup("41 - Link 0-7") interest(1) } field(DLY2,DBF_DOUBLE) { prompt("Delay 2") - promptgroup(GUI_SEQ1) + promptgroup("41 - Link 0-7") interest(1) } field(DOL2,DBF_INLINK) { prompt("Input link 2") - promptgroup(GUI_SEQ1) + promptgroup("41 - Link 0-7") interest(1) } field(DO2,DBF_DOUBLE) { @@ -107,17 +109,17 @@ recordtype(seq) { } field(LNK2,DBF_OUTLINK) { prompt("Output Link 2") - promptgroup(GUI_SEQ1) + promptgroup("41 - Link 0-7") interest(1) } field(DLY3,DBF_DOUBLE) { prompt("Delay 3") - promptgroup(GUI_SEQ1) + promptgroup("41 - Link 0-7") interest(1) } field(DOL3,DBF_INLINK) { prompt("Input link 3") - promptgroup(GUI_SEQ1) + promptgroup("41 - Link 0-7") interest(1) } field(DO3,DBF_DOUBLE) { @@ -126,17 +128,17 @@ recordtype(seq) { } field(LNK3,DBF_OUTLINK) { prompt("Output Link 3") - promptgroup(GUI_SEQ1) + promptgroup("41 - Link 0-7") interest(1) } field(DLY4,DBF_DOUBLE) { prompt("Delay 4") - promptgroup(GUI_SEQ2) + promptgroup("41 - Link 0-7") interest(1) } field(DOL4,DBF_INLINK) { prompt("Input link 4") - promptgroup(GUI_SEQ2) + promptgroup("41 - Link 0-7") interest(1) } field(DO4,DBF_DOUBLE) { @@ -145,17 +147,17 @@ recordtype(seq) { } field(LNK4,DBF_OUTLINK) { prompt("Output Link 4") - promptgroup(GUI_SEQ2) + promptgroup("41 - Link 0-7") interest(1) } field(DLY5,DBF_DOUBLE) { prompt("Delay 5") - promptgroup(GUI_SEQ2) + promptgroup("41 - Link 0-7") interest(1) } field(DOL5,DBF_INLINK) { prompt("Input link 5") - promptgroup(GUI_SEQ2) + promptgroup("41 - Link 0-7") interest(1) } field(DO5,DBF_DOUBLE) { @@ -164,17 +166,17 @@ recordtype(seq) { } field(LNK5,DBF_OUTLINK) { prompt("Output Link 5") - promptgroup(GUI_SEQ2) + promptgroup("41 - Link 0-7") interest(1) } field(DLY6,DBF_DOUBLE) { prompt("Delay 6") - promptgroup(GUI_SEQ2) + promptgroup("41 - Link 0-7") interest(1) } field(DOL6,DBF_INLINK) { prompt("Input link 6") - promptgroup(GUI_SEQ2) + promptgroup("41 - Link 0-7") interest(1) } field(DO6,DBF_DOUBLE) { @@ -183,17 +185,17 @@ recordtype(seq) { } field(LNK6,DBF_OUTLINK) { prompt("Output Link 6") - promptgroup(GUI_SEQ2) + promptgroup("41 - Link 0-7") interest(1) } field(DLY7,DBF_DOUBLE) { prompt("Delay 7") - promptgroup(GUI_SEQ3) + promptgroup("41 - Link 0-7") interest(1) } field(DOL7,DBF_INLINK) { prompt("Input link 7") - promptgroup(GUI_SEQ3) + promptgroup("41 - Link 0-7") interest(1) } field(DO7,DBF_DOUBLE) { @@ -202,17 +204,17 @@ recordtype(seq) { } field(LNK7,DBF_OUTLINK) { prompt("Output Link 7") - promptgroup(GUI_SEQ3) + promptgroup("41 - Link 0-7") interest(1) } field(DLY8,DBF_DOUBLE) { prompt("Delay 8") - promptgroup(GUI_SEQ3) + promptgroup("42 - Link 8-F") interest(1) } field(DOL8,DBF_INLINK) { prompt("Input link 8") - promptgroup(GUI_SEQ3) + promptgroup("42 - Link 8-F") interest(1) } field(DO8,DBF_DOUBLE) { @@ -221,17 +223,17 @@ recordtype(seq) { } field(LNK8,DBF_OUTLINK) { prompt("Output Link 8") - promptgroup(GUI_SEQ3) + promptgroup("42 - Link 8-F") interest(1) } field(DLY9,DBF_DOUBLE) { prompt("Delay 9") - promptgroup(GUI_SEQ3) + promptgroup("42 - Link 8-F") interest(1) } field(DOL9,DBF_INLINK) { prompt("Input link 9") - promptgroup(GUI_SEQ3) + promptgroup("42 - Link 8-F") interest(1) } field(DO9,DBF_DOUBLE) { @@ -240,17 +242,17 @@ recordtype(seq) { } field(LNK9,DBF_OUTLINK) { prompt("Output Link 9") - promptgroup(GUI_SEQ3) + promptgroup("42 - Link 8-F") interest(1) } field(DLYA,DBF_DOUBLE) { prompt("Delay 10") - promptgroup(GUI_SEQ3) + promptgroup("42 - Link 8-F") interest(1) } field(DOLA,DBF_INLINK) { prompt("Input link 10") - promptgroup(GUI_SEQ3) + promptgroup("42 - Link 8-F") interest(1) } field(DOA,DBF_DOUBLE) { @@ -259,17 +261,17 @@ recordtype(seq) { } field(LNKA,DBF_OUTLINK) { prompt("Output Link 10") - promptgroup(GUI_SEQ3) + promptgroup("42 - Link 8-F") interest(1) } field(DLYB,DBF_DOUBLE) { prompt("Delay 11") - promptgroup(GUI_SEQ3) + promptgroup("42 - Link 8-F") interest(1) } field(DOLB,DBF_INLINK) { prompt("Input link 11") - promptgroup(GUI_SEQ3) + promptgroup("42 - Link 8-F") interest(1) } field(DOB,DBF_DOUBLE) { @@ -278,17 +280,17 @@ recordtype(seq) { } field(LNKB,DBF_OUTLINK) { prompt("Output Link 11") - promptgroup(GUI_SEQ3) + promptgroup("42 - Link 8-F") interest(1) } field(DLYC,DBF_DOUBLE) { prompt("Delay 12") - promptgroup(GUI_SEQ3) + promptgroup("42 - Link 8-F") interest(1) } field(DOLC,DBF_INLINK) { prompt("Input link 12") - promptgroup(GUI_SEQ3) + promptgroup("42 - Link 8-F") interest(1) } field(DOC,DBF_DOUBLE) { @@ -297,17 +299,17 @@ recordtype(seq) { } field(LNKC,DBF_OUTLINK) { prompt("Output Link 12") - promptgroup(GUI_SEQ3) + promptgroup("42 - Link 8-F") interest(1) } field(DLYD,DBF_DOUBLE) { prompt("Delay 13") - promptgroup(GUI_SEQ3) + promptgroup("42 - Link 8-F") interest(1) } field(DOLD,DBF_INLINK) { prompt("Input link 13") - promptgroup(GUI_SEQ3) + promptgroup("42 - Link 8-F") interest(1) } field(DOD,DBF_DOUBLE) { @@ -316,17 +318,17 @@ recordtype(seq) { } field(LNKD,DBF_OUTLINK) { prompt("Output Link 13") - promptgroup(GUI_SEQ3) + promptgroup("42 - Link 8-F") interest(1) } field(DLYE,DBF_DOUBLE) { prompt("Delay 14") - promptgroup(GUI_SEQ3) + promptgroup("42 - Link 8-F") interest(1) } field(DOLE,DBF_INLINK) { prompt("Input link 14") - promptgroup(GUI_SEQ3) + promptgroup("42 - Link 8-F") interest(1) } field(DOE,DBF_DOUBLE) { @@ -335,17 +337,17 @@ recordtype(seq) { } field(LNKE,DBF_OUTLINK) { prompt("Output Link 14") - promptgroup(GUI_SEQ3) + promptgroup("42 - Link 8-F") interest(1) } field(DLYF,DBF_DOUBLE) { prompt("Delay 15") - promptgroup(GUI_SEQ3) + promptgroup("42 - Link 8-F") interest(1) } field(DOLF,DBF_INLINK) { prompt("Input link 15") - promptgroup(GUI_SEQ3) + promptgroup("42 - Link 8-F") interest(1) } field(DOF,DBF_DOUBLE) { @@ -354,7 +356,7 @@ recordtype(seq) { } field(LNKF,DBF_OUTLINK) { prompt("Output Link 15") - promptgroup(GUI_SEQ3) + promptgroup("42 - Link 8-F") interest(1) } } diff --git a/src/std/rec/stateRecord.c b/src/std/rec/stateRecord.c index b295ccbb7..ca5df0295 100644 --- a/src/std/rec/stateRecord.c +++ b/src/std/rec/stateRecord.c @@ -7,8 +7,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ -/* $Revision-Id$ */ - /* recState.c - Record Support Routines for State records */ /* * Original Author: Bob Dalesio @@ -40,7 +38,7 @@ #define report NULL #define initialize NULL #define init_record NULL -static long process(stateRecord *); +static long process(struct dbCommon *); #define special NULL #define get_value NULL #define cvt_dbaddr NULL @@ -79,8 +77,9 @@ epicsExportAddress(rset,stateRSET); static void monitor(stateRecord *); -static long process(stateRecord *prec) +static long process(struct dbCommon *pcommon) { + struct stateRecord *prec = (struct stateRecord *)pcommon; prec->udf = FALSE; prec->pact=TRUE; diff --git a/src/std/rec/stateRecord.dbd b/src/std/rec/stateRecord.dbd index c0a253e1c..6e43ddbba 100644 --- a/src/std/rec/stateRecord.dbd +++ b/src/std/rec/stateRecord.dbd @@ -3,15 +3,14 @@ # National Laboratory. # Copyright (c) 2002 The Regents of the University of California, as # Operator of Los Alamos National Laboratory. -# EPICS BASE Versions 3.13.7 -# and higher are distributed subject to a Software License Agreement found -# in file LICENSE that is included with this distribution. +# EPICS BASE is distributed subject to a Software License Agreement found +# in file LICENSE that is included with this distribution. #************************************************************************* recordtype(state) { include "dbCommon.dbd" field(VAL,DBF_STRING) { prompt("Value") - promptgroup(GUI_DISPLAY) + promptgroup("40 - Input") asl(ASL0) pp(TRUE) size(20) diff --git a/src/std/rec/stringinRecord.c b/src/std/rec/stringinRecord.c index 474b24324..163b23a49 100644 --- a/src/std/rec/stringinRecord.c +++ b/src/std/rec/stringinRecord.c @@ -7,8 +7,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ -/* $Revision-Id$ */ - /* recStringin.c - Record Support Routines for Stringin records */ /* * Author: Janet Anderson @@ -42,8 +40,8 @@ /* Create RSET - Record Support Entry Table*/ #define report NULL #define initialize NULL -static long init_record(stringinRecord *, int); -static long process(stringinRecord *); +static long init_record(struct dbCommon *, int); +static long process(struct dbCommon *); #define special NULL #define get_value NULL #define cvt_dbaddr NULL @@ -92,8 +90,9 @@ static void monitor(stringinRecord *); static long readValue(stringinRecord *); -static long init_record(stringinRecord *prec, int pass) +static long init_record(struct dbCommon *pcommon, int pass) { + struct stringinRecord *prec = (struct stringinRecord *)pcommon; STATIC_ASSERT(sizeof(prec->oval)==sizeof(prec->val)); struct stringindset *pdset = (struct stringindset *) prec->dset; @@ -126,9 +125,10 @@ static long init_record(stringinRecord *prec, int pass) /* */ -static long process(stringinRecord *prec) +static long process(struct dbCommon *pcommon) { - struct stringindset *pdset = (struct stringindset *)(prec->dset); + struct stringinRecord *prec = (struct stringinRecord *)pcommon; + struct stringindset *pdset = (struct stringindset *)(prec->dset); long status; unsigned char pact=prec->pact; diff --git a/src/std/rec/stringinRecord.dbd b/src/std/rec/stringinRecord.dbd index acafc8cf4..5b0b76813 100644 --- a/src/std/rec/stringinRecord.dbd +++ b/src/std/rec/stringinRecord.dbd @@ -3,9 +3,8 @@ # National Laboratory. # Copyright (c) 2002 The Regents of the University of California, as # Operator of Los Alamos National Laboratory. -# EPICS BASE Versions 3.13.7 -# and higher are distributed subject to a Software License Agreement found -# in file LICENSE that is included with this distribution. +# EPICS BASE is distributed subject to a Software License Agreement found +# in file LICENSE that is included with this distribution. #************************************************************************* menu(stringinPOST) { choice(stringinPOST_OnChange,"On Change") @@ -15,7 +14,7 @@ recordtype(stringin) { include "dbCommon.dbd" field(VAL,DBF_STRING) { prompt("Current Value") - promptgroup(GUI_INPUTS) + promptgroup("40 - Input") asl(ASL0) pp(TRUE) size(40) @@ -28,24 +27,24 @@ recordtype(stringin) { } field(INP,DBF_INLINK) { prompt("Input Specification") - promptgroup(GUI_INPUTS) + promptgroup("40 - Input") interest(1) } field(MPST,DBF_MENU) { prompt("Post Value Monitors") - promptgroup(GUI_DISPLAY) + promptgroup("80 - Display") interest(1) menu(stringinPOST) } field(APST,DBF_MENU) { prompt("Post Archive Monitors") - promptgroup(GUI_DISPLAY) + promptgroup("80 - Display") interest(1) menu(stringinPOST) } field(SIOL,DBF_INLINK) { prompt("Sim Input Specifctn") - promptgroup(GUI_INPUTS) + promptgroup("90 - Simulate") interest(1) } field(SVAL,DBF_STRING) { @@ -55,7 +54,7 @@ recordtype(stringin) { } field(SIML,DBF_INLINK) { prompt("Sim Mode Location") - promptgroup(GUI_INPUTS) + promptgroup("90 - Simulate") interest(1) } field(SIMM,DBF_MENU) { @@ -65,7 +64,7 @@ recordtype(stringin) { } field(SIMS,DBF_MENU) { prompt("Sim mode Alarm Svrty") - promptgroup(GUI_INPUTS) + promptgroup("90 - Simulate") interest(2) menu(menuAlarmSevr) } diff --git a/src/std/rec/stringoutRecord.c b/src/std/rec/stringoutRecord.c index dbb368a59..416a6db5e 100644 --- a/src/std/rec/stringoutRecord.c +++ b/src/std/rec/stringoutRecord.c @@ -7,8 +7,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ -/* $Revision-Id$ */ - /* recStringout.c - Record Support Routines for Stringout records */ /* * Author: Janet Anderson @@ -44,8 +42,8 @@ /* Create RSET - Record Support Entry Table*/ #define report NULL #define initialize NULL -static long init_record(stringoutRecord *, int); -static long process(stringoutRecord *); +static long init_record(struct dbCommon *, int); +static long process(struct dbCommon *); #define special NULL #define get_value NULL #define cvt_dbaddr NULL @@ -94,8 +92,9 @@ static void monitor(stringoutRecord *); static long writeValue(stringoutRecord *); -static long init_record(stringoutRecord *prec, int pass) +static long init_record(struct dbCommon *pcommon, int pass) { + struct stringoutRecord *prec = (struct stringoutRecord *)pcommon; STATIC_ASSERT(sizeof(prec->oval)==sizeof(prec->val)); struct stringoutdset *pdset = (struct stringoutdset *) prec->dset; @@ -130,9 +129,10 @@ static long init_record(stringoutRecord *prec, int pass) return 0; } -static long process(stringoutRecord *prec) +static long process(struct dbCommon *pcommon) { - struct stringoutdset *pdset = (struct stringoutdset *)(prec->dset); + struct stringoutRecord *prec = (struct stringoutRecord *)pcommon; + struct stringoutdset *pdset = (struct stringoutdset *)(prec->dset); long status=0; unsigned char pact=prec->pact; diff --git a/src/std/rec/stringoutRecord.dbd b/src/std/rec/stringoutRecord.dbd index 25bd2fde9..fe0bae5d0 100644 --- a/src/std/rec/stringoutRecord.dbd +++ b/src/std/rec/stringoutRecord.dbd @@ -3,9 +3,8 @@ # National Laboratory. # Copyright (c) 2002 The Regents of the University of California, as # Operator of Los Alamos National Laboratory. -# EPICS BASE Versions 3.13.7 -# and higher are distributed subject to a Software License Agreement found -# in file LICENSE that is included with this distribution. +# EPICS BASE is distributed subject to a Software License Agreement found +# in file LICENSE that is included with this distribution. #************************************************************************* menu(stringoutPOST) { choice(stringoutPOST_OnChange,"On Change") @@ -15,7 +14,7 @@ recordtype(stringout) { include "dbCommon.dbd" field(VAL,DBF_STRING) { prompt("Current Value") - promptgroup(GUI_OUTPUT) + promptgroup("50 - Output") asl(ASL0) pp(TRUE) size(40) @@ -28,40 +27,40 @@ recordtype(stringout) { } field(DOL,DBF_INLINK) { prompt("Desired Output Loc") - promptgroup(GUI_OUTPUT) + promptgroup("40 - Input") interest(1) } field(OMSL,DBF_MENU) { prompt("Output Mode Select") - promptgroup(GUI_OUTPUT) + promptgroup("50 - Output") interest(1) menu(menuOmsl) } field(OUT,DBF_OUTLINK) { prompt("Output Specification") - promptgroup(GUI_OUTPUT) + promptgroup("50 - Output") interest(1) } field(MPST,DBF_MENU) { prompt("Post Value Monitors") - promptgroup(GUI_DISPLAY) + promptgroup("80 - Display") interest(1) menu(stringoutPOST) } field(APST,DBF_MENU) { prompt("Post Archive Monitors") - promptgroup(GUI_DISPLAY) + promptgroup("80 - Display") interest(1) menu(stringoutPOST) } field(SIOL,DBF_OUTLINK) { prompt("Sim Output Specifctn") - promptgroup(GUI_INPUTS) + promptgroup("90 - Simulate") interest(1) } field(SIML,DBF_INLINK) { prompt("Sim Mode Location") - promptgroup(GUI_INPUTS) + promptgroup("90 - Simulate") interest(1) } field(SIMM,DBF_MENU) { @@ -71,19 +70,19 @@ recordtype(stringout) { } field(SIMS,DBF_MENU) { prompt("Sim mode Alarm Svrty") - promptgroup(GUI_INPUTS) + promptgroup("90 - Simulate") interest(2) menu(menuAlarmSevr) } field(IVOA,DBF_MENU) { prompt("INVALID output action") - promptgroup(GUI_OUTPUT) + promptgroup("50 - Output") interest(2) menu(menuIvoa) } field(IVOV,DBF_STRING) { prompt("INVALID output value") - promptgroup(GUI_OUTPUT) + promptgroup("50 - Output") interest(2) size(40) } diff --git a/src/std/rec/subArrayRecord.c b/src/std/rec/subArrayRecord.c index dd6d50a9c..3de610c26 100644 --- a/src/std/rec/subArrayRecord.c +++ b/src/std/rec/subArrayRecord.c @@ -5,8 +5,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ -/* $Revision-Id$ */ - /* recSubArray.c - Record Support Routines for SubArray records * * @@ -46,15 +44,15 @@ /* Create RSET - Record Support Entry Table*/ #define report NULL #define initialize NULL -static long init_record(subArrayRecord *prec, int pass); -static long process(subArrayRecord *prec); +static long init_record(struct dbCommon *prec, int pass); +static long process(struct dbCommon *prec); #define special NULL #define get_value NULL static long cvt_dbaddr(DBADDR *paddr); static long get_array_info(DBADDR *paddr, long *no_elements, long *offset); static long put_array_info(DBADDR *paddr, long nNew); static long get_units(DBADDR *paddr, char *units); -static long get_precision(DBADDR *paddr, long *precision); +static long get_precision(const DBADDR *paddr, long *precision); #define get_enum_str NULL #define get_enum_strs NULL #define put_enum_str NULL @@ -97,9 +95,9 @@ static void monitor(subArrayRecord *prec); static long readValue(subArrayRecord *prec); - -static long init_record(subArrayRecord *prec, int pass) +static long init_record(struct dbCommon *pcommon, int pass) { + struct subArrayRecord *prec = (struct subArrayRecord *)pcommon; struct sadset *pdset; if (pass==0){ @@ -131,8 +129,9 @@ static long init_record(subArrayRecord *prec, int pass) return 0; } -static long process(subArrayRecord *prec) +static long process(struct dbCommon *pcommon) { + struct subArrayRecord *prec = (struct subArrayRecord *)pcommon; struct sadset *pdset = (struct sadset *)(prec->dset); long status; unsigned char pact=prec->pact; @@ -218,7 +217,7 @@ static long get_units(DBADDR *paddr, char *units) return 0; } -static long get_precision(DBADDR *paddr, long *precision) +static long get_precision(const DBADDR *paddr, long *precision) { subArrayRecord *prec = (subArrayRecord *) paddr->precord; diff --git a/src/std/rec/subArrayRecord.dbd b/src/std/rec/subArrayRecord.dbd index 4a0bfe0c6..7814a2e48 100644 --- a/src/std/rec/subArrayRecord.dbd +++ b/src/std/rec/subArrayRecord.dbd @@ -3,9 +3,8 @@ # National Laboratory. # Copyright (c) 2002 The Regents of the University of California, as # Operator of Los Alamos National Laboratory. -# EPICS BASE Versions 3.13.7 -# and higher are distributed subject to a Software License Agreement found -# in file LICENSE that is included with this distribution. +# EPICS BASE is distributed subject to a Software License Agreement found +# in file LICENSE that is included with this distribution. #************************************************************************* recordtype(subArray) { include "dbCommon.dbd" @@ -21,57 +20,57 @@ recordtype(subArray) { } field(PREC,DBF_SHORT) { prompt("Display Precision") - promptgroup(GUI_COMMON) + promptgroup("80 - Display") interest(1) prop(YES) } field(FTVL,DBF_MENU) { prompt("Field Type of Value") - promptgroup(GUI_ALARMS) + promptgroup("30 - Action") special(SPC_NOMOD) interest(1) menu(menuFtype) } field(INP,DBF_INLINK) { prompt("Input Specification") - promptgroup(GUI_BITS1) + promptgroup("40 - Input") interest(1) } field(EGU,DBF_STRING) { - prompt("Engineering Units Name") - promptgroup(GUI_BITS2) + prompt("Engineering Units") + promptgroup("80 - Display") interest(1) size(16) prop(YES) } field(HOPR,DBF_DOUBLE) { prompt("High Operating Range") - promptgroup(GUI_CALC) + promptgroup("80 - Display") interest(1) prop(YES) } field(LOPR,DBF_DOUBLE) { prompt("Low Operating Range") - promptgroup(GUI_CLOCK) + promptgroup("80 - Display") interest(1) prop(YES) } field(MALM,DBF_ULONG) { - prompt("Maximum Elements ") - promptgroup(GUI_CLOCK) + prompt("Maximum Elements") + promptgroup("30 - Action") special(SPC_NOMOD) interest(1) initial("1") } field(NELM,DBF_ULONG) { prompt("Number of Elements") - promptgroup(GUI_COMPRESS) + promptgroup("30 - Action") pp(TRUE) initial("1") } field(INDX,DBF_ULONG) { prompt("Substring Index") - promptgroup(GUI_CONVERT) + promptgroup("30 - Action") pp(TRUE) } field(BUSY,DBF_SHORT) { diff --git a/src/std/rec/subRecord.c b/src/std/rec/subRecord.c index 9cb3ae683..5c1d654c6 100644 --- a/src/std/rec/subRecord.c +++ b/src/std/rec/subRecord.c @@ -7,8 +7,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ -/* $Revision-Id$ */ - /* Record Support Routines for Subroutine records */ /* * Original Author: Bob Dalesio @@ -44,15 +42,15 @@ /* Create RSET - Record Support Entry Table*/ #define report NULL #define initialize NULL -static long init_record(subRecord *, int); -static long process(subRecord *); +static long init_record(struct dbCommon *, int); +static long process(struct dbCommon *); static long special(DBADDR *, int); #define get_value NULL #define cvt_dbaddr NULL #define get_array_info NULL #define put_array_info NULL static long get_units(DBADDR *, char *); -static long get_precision(DBADDR *, long *); +static long get_precision(const DBADDR *, long *); #define get_enum_str NULL #define get_enum_strs NULL #define put_enum_str NULL @@ -89,8 +87,9 @@ static void monitor(subRecord *); #define INP_ARG_MAX 12 -static long init_record(subRecord *prec, int pass) +static long init_record(struct dbCommon *pcommon, int pass) { + struct subRecord *prec = (struct subRecord *)pcommon; SUBFUNCPTR psubroutine; struct link *plink; int i; @@ -131,8 +130,9 @@ static long init_record(subRecord *prec, int pass) return 0; } -static long process(subRecord *prec) +static long process(struct dbCommon *pcommon) { + struct subRecord *prec = (struct subRecord *)pcommon; long status = 0; int pact = prec->pact; @@ -171,7 +171,7 @@ static long special(DBADDR *paddr, int after) if (!after) { if (prec->snam[0] == 0 && prec->pact) prec->pact = FALSE; - prec->rpro = FALSE; + prec->rpro = FALSE; return 0; } @@ -214,7 +214,7 @@ static long get_units(DBADDR *paddr, char *units) return 0; } -static long get_precision(DBADDR *paddr, long *pprecision) +static long get_precision(const DBADDR *paddr, long *pprecision) { subRecord *prec = (subRecord *)paddr->precord; int fieldIndex = dbGetFieldIndex(paddr); diff --git a/src/std/rec/subRecord.dbd b/src/std/rec/subRecord.dbd index 973cab7f1..48cfc1385 100644 --- a/src/std/rec/subRecord.dbd +++ b/src/std/rec/subRecord.dbd @@ -15,14 +15,14 @@ recordtype(sub) { } field(INAM,DBF_STRING) { prompt("Init Routine Name") - promptgroup(GUI_SUB) + promptgroup("30 - Action") special(SPC_NOMOD) interest(1) size(40) } field(SNAM,DBF_STRING) { prompt("Subroutine Name") - promptgroup(GUI_SUB) + promptgroup("30 - Action") special(SPC_MOD) interest(1) size(40) @@ -37,127 +37,127 @@ recordtype(sub) { } field(INPA,DBF_INLINK) { prompt("Input A") - promptgroup(GUI_INPUTS) + promptgroup("41 - Input A-F") interest(1) } field(INPB,DBF_INLINK) { prompt("Input B") - promptgroup(GUI_INPUTS) + promptgroup("41 - Input A-F") interest(1) } field(INPC,DBF_INLINK) { prompt("Input C") - promptgroup(GUI_INPUTS) + promptgroup("41 - Input A-F") interest(1) } field(INPD,DBF_INLINK) { prompt("Input D") - promptgroup(GUI_INPUTS) + promptgroup("41 - Input A-F") interest(1) } field(INPE,DBF_INLINK) { prompt("Input E") - promptgroup(GUI_INPUTS) + promptgroup("41 - Input A-F") interest(1) } field(INPF,DBF_INLINK) { prompt("Input F") - promptgroup(GUI_INPUTS) + promptgroup("41 - Input A-F") interest(1) } field(INPG,DBF_INLINK) { prompt("Input G") - promptgroup(GUI_INPUTS) + promptgroup("42 - Input G-L") interest(1) } field(INPH,DBF_INLINK) { prompt("Input H") - promptgroup(GUI_INPUTS) + promptgroup("42 - Input G-L") interest(1) } field(INPI,DBF_INLINK) { prompt("Input I") - promptgroup(GUI_INPUTS) + promptgroup("42 - Input G-L") interest(1) } field(INPJ,DBF_INLINK) { prompt("Input J") - promptgroup(GUI_INPUTS) + promptgroup("42 - Input G-L") interest(1) } field(INPK,DBF_INLINK) { prompt("Input K") - promptgroup(GUI_INPUTS) + promptgroup("42 - Input G-L") interest(1) } field(INPL,DBF_INLINK) { prompt("Input L") - promptgroup(GUI_INPUTS) + promptgroup("42 - Input G-L") interest(1) } field(EGU,DBF_STRING) { - prompt("Units Name") - promptgroup(GUI_DISPLAY) + prompt("Engineering Units") + promptgroup("80 - Display") interest(1) size(16) prop(YES) } field(HOPR,DBF_DOUBLE) { - prompt("High Operating Rng") - promptgroup(GUI_DISPLAY) + prompt("High Operating Range") + promptgroup("80 - Display") interest(1) prop(YES) } field(LOPR,DBF_DOUBLE) { prompt("Low Operating Range") - promptgroup(GUI_DISPLAY) + promptgroup("80 - Display") interest(1) prop(YES) } field(HIHI,DBF_DOUBLE) { prompt("Hihi Alarm Limit") - promptgroup(GUI_ALARMS) + promptgroup("70 - Alarm") pp(TRUE) interest(1) prop(YES) } field(LOLO,DBF_DOUBLE) { prompt("Lolo Alarm Limit") - promptgroup(GUI_ALARMS) + promptgroup("70 - Alarm") pp(TRUE) interest(1) prop(YES) } field(HIGH,DBF_DOUBLE) { prompt("High Alarm Limit") - promptgroup(GUI_ALARMS) + promptgroup("70 - Alarm") pp(TRUE) interest(1) prop(YES) } field(LOW,DBF_DOUBLE) { prompt("Low Alarm Limit") - promptgroup(GUI_ALARMS) + promptgroup("70 - Alarm") pp(TRUE) interest(1) prop(YES) } field(PREC,DBF_SHORT) { prompt("Display Precision") - promptgroup(GUI_DISPLAY) + promptgroup("80 - Display") interest(1) prop(YES) } field(BRSV,DBF_MENU) { prompt("Bad Return Severity") - promptgroup(GUI_SUB) + promptgroup("70 - Alarm") pp(TRUE) interest(1) menu(menuAlarmSevr) } field(HHSV,DBF_MENU) { prompt("Hihi Severity") - promptgroup(GUI_ALARMS) + promptgroup("70 - Alarm") pp(TRUE) interest(1) prop(YES) @@ -165,7 +165,7 @@ recordtype(sub) { } field(LLSV,DBF_MENU) { prompt("Lolo Severity") - promptgroup(GUI_ALARMS) + promptgroup("70 - Alarm") pp(TRUE) interest(1) prop(YES) @@ -173,7 +173,7 @@ recordtype(sub) { } field(HSV,DBF_MENU) { prompt("High Severity") - promptgroup(GUI_ALARMS) + promptgroup("70 - Alarm") pp(TRUE) interest(1) prop(YES) @@ -181,7 +181,7 @@ recordtype(sub) { } field(LSV,DBF_MENU) { prompt("Low Severity") - promptgroup(GUI_ALARMS) + promptgroup("70 - Alarm") pp(TRUE) interest(1) prop(YES) @@ -189,17 +189,17 @@ recordtype(sub) { } field(HYST,DBF_DOUBLE) { prompt("Alarm Deadband") - promptgroup(GUI_ALARMS) + promptgroup("70 - Alarm") interest(1) } field(ADEL,DBF_DOUBLE) { prompt("Archive Deadband") - promptgroup(GUI_DISPLAY) + promptgroup("80 - Display") interest(1) } field(MDEL,DBF_DOUBLE) { prompt("Monitor Deadband") - promptgroup(GUI_DISPLAY) + promptgroup("80 - Display") interest(1) } field(A,DBF_DOUBLE) { diff --git a/src/std/rec/test/Makefile b/src/std/rec/test/Makefile index 110d141a8..793312f9a 100644 --- a/src/std/rec/test/Makefile +++ b/src/std/rec/test/Makefile @@ -68,6 +68,14 @@ testHarness_SRCS += analogMonitorTest_registerRecordDeviceDriver.cpp TESTFILES += $(COMMON_DIR)/analogMonitorTest.dbd ../analogMonitorTest.db TESTS += analogMonitorTest +TARGETS += $(COMMON_DIR)/regressTest.dbd +regressTest_DBD += base.dbd +TESTPROD_HOST += regressTest +regressTest_SRCS += regressTest.c +regressTest_SRCS += regressTest_registerRecordDeviceDriver.cpp +TESTFILES += $(COMMON_DIR)/regressTest.dbd ../regressArray1.db +TESTS += regressTest + # epicsRunRecordTests runs all the test programs in a known working order. testHarness_SRCS += epicsRunRecordTests.c diff --git a/src/std/rec/test/asTestLib.c b/src/std/rec/test/asTestLib.c index 62b5e62fc..18139233f 100644 --- a/src/std/rec/test/asTestLib.c +++ b/src/std/rec/test/asTestLib.c @@ -204,7 +204,7 @@ static void hookPass1(initHookState state) testFail("missing rec1"); testSkip(3, "missing record"); } else { - struct rset *prset = dbGetRset(&addr); + rset *prset = dbGetRset(&addr); dbfType ftype = addr.field_type; long count=-1, offset=-1, maxcount = addr.no_elements; testOk1(prset && prset->get_array_info && prset->put_array_info); diff --git a/src/std/rec/test/regressArray1.db b/src/std/rec/test/regressArray1.db new file mode 100644 index 000000000..a09f3bfba --- /dev/null +++ b/src/std/rec/test/regressArray1.db @@ -0,0 +1,9 @@ +record(waveform, "wf") { + field(FTVL, "DOUBLE") + field(NELM, "1") + field(FLNK, "co") +} +record(calcout, "co") { + field(CALC, "A") + field(INPA, "wf") +} diff --git a/src/std/rec/test/regressTest.c b/src/std/rec/test/regressTest.c new file mode 100644 index 000000000..ccbe53189 --- /dev/null +++ b/src/std/rec/test/regressTest.c @@ -0,0 +1,73 @@ +/*************************************************************************\ +* Copyright (c) 2016 Michael Davidsaver +* EPICS BASE is distributed subject to a Software License Agreement found +* in file LICENSE that is included with this distribution. + \*************************************************************************/ + +#include +#include +#include +#include + +#include +#include + +/* + * Test the some identified regressions + */ + +void regressTest_registerRecordDeviceDriver(struct dbBase *); + +/* + * https://bugs.launchpad.net/epics-base/+bug/1577108 + */ +static +void testArrayLength1(void) +{ + waveformRecord *precwf; + calcoutRecord *precco; + double *pbuf; + + testdbPrepare(); + + testdbReadDatabase("regressTest.dbd", NULL, NULL); + + regressTest_registerRecordDeviceDriver(pdbbase); + + testdbReadDatabase("regressArray1.db", NULL, NULL); + + precwf = (waveformRecord*)testdbRecordPtr("wf"); + precco = (calcoutRecord*)testdbRecordPtr("co"); + + eltc(0); + testIocInitOk(); + eltc(1); + + dbScanLock((dbCommon*)precwf); + pbuf = (double*)precwf->bptr; + dbScanUnlock((dbCommon*)precwf); + + testdbPutFieldOk("wf", DBF_DOUBLE, 2.0); + + dbScanLock((dbCommon*)precwf); + testOk(precwf->nord==1, "wf.NORD = %u == 1", (unsigned)precwf->nord); + testOk(pbuf[0]==2.0, "wf.VAL[0] = %f == 2.0", pbuf[0]); + dbScanUnlock((dbCommon*)precwf); + + dbScanLock((dbCommon*)precco); + testOk(precco->a==2.0, "co.A = %f == 2.0", precco->a); + dbScanUnlock((dbCommon*)precco); + + testdbGetFieldEqual("co", DBF_DOUBLE, 2.0); + + testIocShutdownOk(); + + testdbCleanup(); +} + +MAIN(regressTest) +{ + testPlan(5); + testArrayLength1(); + return testDone(); +} diff --git a/src/std/rec/waveformRecord.c b/src/std/rec/waveformRecord.c index 71e19014a..c06c48001 100644 --- a/src/std/rec/waveformRecord.c +++ b/src/std/rec/waveformRecord.c @@ -7,8 +7,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ -/* $Revision-Id$ */ - /* recWaveform.c - Record Support Routines for Waveform records */ /* * Original Author: Bob Dalesio @@ -44,15 +42,15 @@ /* Create RSET - Record Support Entry Table*/ #define report NULL #define initialize NULL -static long init_record(waveformRecord *, int); -static long process(waveformRecord *); +static long init_record(struct dbCommon *, int); +static long process(struct dbCommon *); #define special NULL #define get_value NULL static long cvt_dbaddr(DBADDR *); static long get_array_info(DBADDR *, long *, long *); static long put_array_info(DBADDR *, long); static long get_units(DBADDR *, char *); -static long get_precision(DBADDR *, long *); +static long get_precision(const DBADDR *, long *); #define get_enum_str NULL #define get_enum_strs NULL #define put_enum_str NULL @@ -92,8 +90,9 @@ struct wfdset { /* waveform dset */ static void monitor(waveformRecord *); static long readValue(waveformRecord *); -static long init_record(waveformRecord *prec, int pass) +static long init_record(struct dbCommon *pcommon, int pass) { + struct waveformRecord *prec = (struct waveformRecord *)pcommon; struct wfdset *pdset; if (pass==0){ @@ -128,8 +127,9 @@ static long init_record(waveformRecord *prec, int pass) return (*pdset->init_record)(prec); } -static long process(waveformRecord *prec) +static long process(struct dbCommon *pcommon) { + struct waveformRecord *prec = (struct waveformRecord *)pcommon; struct wfdset *pdset = (struct wfdset *)(prec->dset); unsigned char pact=prec->pact; @@ -209,7 +209,7 @@ static long get_units(DBADDR *paddr, char *units) return 0; } -static long get_precision(DBADDR *paddr, long *precision) +static long get_precision(const DBADDR *paddr, long *precision) { waveformRecord *prec = (waveformRecord *) paddr->precord; diff --git a/src/std/rec/waveformRecord.dbd.pod b/src/std/rec/waveformRecord.dbd.pod index d28302801..db2fa05fb 100644 --- a/src/std/rec/waveformRecord.dbd.pod +++ b/src/std/rec/waveformRecord.dbd.pod @@ -56,50 +56,50 @@ recordtype(waveform) { } field(RARM,DBF_SHORT) { prompt("Rearm the waveform") - promptgroup(GUI_WAVE) + promptgroup("30 - Action") pp(TRUE) interest(1) } field(PREC,DBF_SHORT) { prompt("Display Precision") - promptgroup(GUI_DISPLAY) + promptgroup("80 - Display") interest(1) prop(YES) } field(INP,DBF_INLINK) { prompt("Input Specification") - promptgroup(GUI_INPUTS) + promptgroup("40 - Input") interest(1) } field(EGU,DBF_STRING) { - prompt("Engineering Units Name") - promptgroup(GUI_DISPLAY) + prompt("Engineering Units") + promptgroup("80 - Display") interest(1) size(16) prop(YES) } field(HOPR,DBF_DOUBLE) { prompt("High Operating Range") - promptgroup(GUI_DISPLAY) + promptgroup("80 - Display") interest(1) prop(YES) } field(LOPR,DBF_DOUBLE) { prompt("Low Operating Range") - promptgroup(GUI_DISPLAY) + promptgroup("80 - Display") interest(1) prop(YES) } field(NELM,DBF_ULONG) { prompt("Number of Elements") - promptgroup(GUI_WAVE) + promptgroup("30 - Action") special(SPC_NOMOD) interest(1) initial("1") } field(FTVL,DBF_MENU) { prompt("Field Type of Value") - promptgroup(GUI_WAVE) + promptgroup("30 - Action") special(SPC_NOMOD) interest(1) menu(menuFtype) @@ -120,12 +120,12 @@ recordtype(waveform) { } field(SIOL,DBF_INLINK) { prompt("Sim Input Specifctn") - promptgroup(GUI_INPUTS) + promptgroup("90 - Simulate") interest(1) } field(SIML,DBF_INLINK) { prompt("Sim Mode Location") - promptgroup(GUI_INPUTS) + promptgroup("90 - Simulate") interest(1) } field(SIMM,DBF_MENU) { @@ -135,22 +135,22 @@ recordtype(waveform) { } field(SIMS,DBF_MENU) { prompt("Sim mode Alarm Svrty") - promptgroup(GUI_INPUTS) + promptgroup("90 - Simulate") interest(2) menu(menuAlarmSevr) } field(MPST,DBF_MENU) { - prompt("Post Value Monitors") - promptgroup(GUI_DISPLAY) - interest(1) - menu(waveformPOST) + prompt("Post Value Monitors") + promptgroup("80 - Display") + interest(1) + menu(waveformPOST) } field(APST,DBF_MENU) { - prompt("Post Archive Monitors") - promptgroup(GUI_DISPLAY) - interest(1) - menu(waveformPOST) - } + prompt("Post Archive Monitors") + promptgroup("80 - Display") + interest(1) + menu(waveformPOST) + } field(HASH,DBF_ULONG) { prompt("Hash of OnChange data.") interest(3) diff --git a/src/std/softIoc/base.dbd b/src/std/softIoc/base.dbd index 644d8bbaa..58f4884ea 100644 --- a/src/std/softIoc/base.dbd +++ b/src/std/softIoc/base.dbd @@ -1,5 +1,3 @@ -# $Revision-Id$ -# # This file includes the standard record types and device support # provided by Base and (usually) loaded into all IOCs. diff --git a/src/std/softIoc/softIocExit.db b/src/std/softIoc/softIocExit.db index b5c027d70..c530f778a 100644 --- a/src/std/softIoc/softIocExit.db +++ b/src/std/softIoc/softIocExit.db @@ -1,7 +1,15 @@ -# $Revision-Id$ -# +# softIocExit.db + record(sub,"$(IOC):exit") { - field(DESC,"Exit subroutine") - field(SCAN,"Passive") - field(SNAM,"exit") + field(DESC,"Exit subroutine") + field(SCAN,"Passive") + field(SNAM,"exit") +} + +record(stringin,"$(IOC):BaseVersion") { + field(DESC,"EPICS Base Version") + field(DTYP,"getenv") + field(INP,"@EPICS_VERSION_FULL") + field(PINI,"YES") + field(DISP,1) } diff --git a/src/std/softIoc/softMain.cpp b/src/std/softIoc/softMain.cpp index 13ecce884..8400a6554 100644 --- a/src/std/softIoc/softMain.cpp +++ b/src/std/softIoc/softMain.cpp @@ -7,8 +7,6 @@ * found in the file LICENSE that is included with this distribution. \*************************************************************************/ -/* $Revision-Id$ */ - /* Author: Andrew Johnson Date: 2003-04-08 */ /* Usage: diff --git a/src/template/base/makeBaseApp.pl b/src/template/base/makeBaseApp.pl index 65091a0fb..d6da8adf8 100644 --- a/src/template/base/makeBaseApp.pl +++ b/src/template/base/makeBaseApp.pl @@ -1,7 +1,6 @@ #!/usr/bin/env perl # Authors: Ralph Lange, Marty Kraimer, Andrew Johnson and Janet Anderson -# $Revision-Id$ use FindBin qw($Bin); use lib ("$Bin/../../lib/perl", $Bin); @@ -419,7 +418,8 @@ EOF } sub GetUser { - $user = $opt_u || $ENV{USER} || $ENV{USERNAME} || Win32::LoginName(); + $user = $opt_u || $ENV{USER} || $ENV{USERNAME} || getlogin(); + $user = Win32::LoginName() if !$user && $^ eq 'MSWin32'; unless ($user) { print "Strange, I cannot figure out your user name!\n"; diff --git a/src/template/base/top/caClientApp/caMonitor.c b/src/template/base/top/caClientApp/caMonitor.c index 059fefb5e..9554cc744 100644 --- a/src/template/base/top/caClientApp/caMonitor.c +++ b/src/template/base/top/caClientApp/caMonitor.c @@ -109,6 +109,7 @@ int main(int argc,char **argv) pmynode[npv] = callocMustSucceed(1, sizeof(MYNODE), "caMonitor"); npv++; } + fclose(fp); SEVCHK(ca_context_create(ca_disable_preemptive_callback),"ca_context_create"); SEVCHK(ca_add_exception_event(exceptionCallback,NULL), "ca_add_exception_event"); diff --git a/src/template/base/top/caServerApp/exAsyncPV.cc b/src/template/base/top/caServerApp/exAsyncPV.cc index 7e0758c13..b5bff9181 100644 --- a/src/template/base/top/caServerApp/exAsyncPV.cc +++ b/src/template/base/top/caServerApp/exAsyncPV.cc @@ -3,9 +3,8 @@ * National Laboratory. * Copyright (c) 2002 The Regents of the University of California, as * Operator of Los Alamos National Laboratory. -* EPICS BASE Versions 3.13.7 -* and higher are distributed subject to a Software License Agreement found -* in file LICENSE that is included with this distribution. +* EPICS BASE is distributed subject to a Software License Agreement found +* in file LICENSE that is included with this distribution. \*************************************************************************/ // @@ -30,23 +29,23 @@ exAsyncPV::exAsyncPV ( exServer & cas, pvInfo & setup, // caStatus exAsyncPV::read (const casCtx &ctx, gdd &valueIn) { - exAsyncReadIO *pIO; - - if ( this->simultAsychReadIOCount >= this->cas.maxSimultAsyncIO () ) { - return S_casApp_postponeAsyncIO; - } + exAsyncReadIO *pIO; - pIO = new exAsyncReadIO ( this->cas, ctx, - *this, valueIn, this->asyncDelay ); - if ( ! pIO ) { + if ( this->simultAsychReadIOCount >= this->cas.maxSimultAsyncIO () ) { + return S_casApp_postponeAsyncIO; + } + + pIO = new exAsyncReadIO ( this->cas, ctx, + *this, valueIn, this->asyncDelay ); + if ( ! pIO ) { if ( this->simultAsychReadIOCount > 0 ) { return S_casApp_postponeAsyncIO; } else { - return S_casApp_noMemory; + return S_casApp_noMemory; } - } - this->simultAsychReadIOCount++; + } + this->simultAsychReadIOCount++; return S_casApp_asyncCompletion; } @@ -54,24 +53,24 @@ caStatus exAsyncPV::read (const casCtx &ctx, gdd &valueIn) // exAsyncPV::writeNotify() // caStatus exAsyncPV::writeNotify ( const casCtx &ctx, const gdd &valueIn ) -{ - if ( this->simultAsychWriteIOCount >= this->cas.maxSimultAsyncIO() ) { - return S_casApp_postponeAsyncIO; - } +{ + if ( this->simultAsychWriteIOCount >= this->cas.maxSimultAsyncIO() ) { + return S_casApp_postponeAsyncIO; + } - exAsyncWriteIO * pIO = new + exAsyncWriteIO * pIO = new exAsyncWriteIO ( this->cas, ctx, *this, - valueIn, this->asyncDelay ); - if ( ! pIO ) { + valueIn, this->asyncDelay ); + if ( ! pIO ) { if ( this->simultAsychReadIOCount > 0 ) { return S_casApp_postponeAsyncIO; } else { - return S_casApp_noMemory; + return S_casApp_noMemory; } } - this->simultAsychWriteIOCount++; - return S_casApp_asyncCompletion; + this->simultAsychWriteIOCount++; + return S_casApp_asyncCompletion; } // @@ -79,24 +78,24 @@ caStatus exAsyncPV::writeNotify ( const casCtx &ctx, const gdd &valueIn ) // caStatus exAsyncPV::write ( const casCtx &ctx, const gdd &valueIn ) { - // implement the discard intermediate values, but last value + // implement the discard intermediate values, but last value // sent always applied behavior that IOCs provide excepting // that we will alow N requests to pend instead of a limit // of only one imposed in the IOC - if ( this->simultAsychWriteIOCount >= this->cas.maxSimultAsyncIO() ) { + if ( this->simultAsychWriteIOCount >= this->cas.maxSimultAsyncIO() ) { pStandbyValue.set ( & valueIn ); - return S_casApp_success; - } - - exAsyncWriteIO * pIO = new - exAsyncWriteIO ( this->cas, ctx, *this, - valueIn, this->asyncDelay ); - if ( ! pIO ) { - pStandbyValue.set ( & valueIn ); - return S_casApp_success; + return S_casApp_success; } - this->simultAsychWriteIOCount++; - return S_casApp_asyncCompletion; + + exAsyncWriteIO * pIO = new + exAsyncWriteIO ( this->cas, ctx, *this, + valueIn, this->asyncDelay ); + if ( ! pIO ) { + pStandbyValue.set ( & valueIn ); + return S_casApp_success; + } + this->simultAsychWriteIOCount++; + return S_casApp_asyncCompletion; } // Implementing a specialized update for exAsyncPV @@ -150,7 +149,7 @@ void exAsyncPV::removeWriteIO () exAsyncWriteIO::exAsyncWriteIO ( exServer & cas, const casCtx & ctxIn, exAsyncPV & pvIn, const gdd & valueIn, double asyncDelay ) : - casAsyncWriteIO ( ctxIn ), pv ( pvIn ), + casAsyncWriteIO ( ctxIn ), pv ( pvIn ), timer ( cas.createTimer () ), pValue(valueIn) { this->timer.start ( *this, asyncDelay ); @@ -168,7 +167,7 @@ exAsyncWriteIO::~exAsyncWriteIO() if ( this->pValue.valid () ) { this->pv.updateFromAsyncWrite ( *this->pValue ); } - this->pv.removeWriteIO(); + this->pv.removeWriteIO(); } // @@ -179,9 +178,9 @@ epicsTimerNotify::expireStatus exAsyncWriteIO:: expire ( const epicsTime & /* currentTime */ ) { assert ( this->pValue.valid () ); - caStatus status = this->pv.updateFromAsyncWrite ( *this->pValue ); - this->pValue.set ( 0 ); - this->postIOCompletion ( status ); + caStatus status = this->pv.updateFromAsyncWrite ( *this->pValue ); + this->pValue.set ( 0 ); + this->postIOCompletion ( status ); return noRestart; } @@ -191,7 +190,7 @@ epicsTimerNotify::expireStatus exAsyncWriteIO:: exAsyncReadIO::exAsyncReadIO ( exServer & cas, const casCtx & ctxIn, exAsyncPV & pvIn, gdd & protoIn, double asyncDelay ) : - casAsyncReadIO ( ctxIn ), pv ( pvIn ), + casAsyncReadIO ( ctxIn ), pv ( pvIn ), timer ( cas.createTimer() ), pProto ( protoIn ) { this->timer.start ( *this, asyncDelay ); @@ -202,7 +201,7 @@ exAsyncReadIO::exAsyncReadIO ( exServer & cas, const casCtx & ctxIn, // exAsyncReadIO::~exAsyncReadIO() { - this->pv.removeReadIO (); + this->pv.removeReadIO (); this->timer.destroy (); } @@ -213,16 +212,16 @@ exAsyncReadIO::~exAsyncReadIO() epicsTimerNotify::expireStatus exAsyncReadIO::expire ( const epicsTime & /* currentTime */ ) { - // - // map between the prototype in and the - // current value - // - caStatus status = this->pv.exPV::readNoCtx ( this->pProto ); + // + // map between the prototype in and the + // current value + // + caStatus status = this->pv.exPV::readNoCtx ( this->pProto ); - // - // post IO completion - // - this->postIOCompletion ( status, *this->pProto ); + // + // post IO completion + // + this->postIOCompletion ( status, *this->pProto ); return noRestart; } diff --git a/src/template/base/top/caServerApp/exPV.cc b/src/template/base/top/caServerApp/exPV.cc index af99c4e6a..97430c000 100644 --- a/src/template/base/top/caServerApp/exPV.cc +++ b/src/template/base/top/caServerApp/exPV.cc @@ -3,9 +3,8 @@ * National Laboratory. * Copyright (c) 2002 The Regents of the University of California, as * Operator of Los Alamos National Laboratory. -* EPICS BASE Versions 3.13.7 -* and higher are distributed subject to a Software License Agreement found -* in file LICENSE that is included with this distribution. +* EPICS BASE is distributed subject to a Software License Agreement found +* in file LICENSE that is included with this distribution. \*************************************************************************/ // // Example EPICS CA server @@ -42,7 +41,7 @@ exPV::exPV ( exServer & casIn, pvInfo & setup, // // no dataless PV allowed // - assert (this->info.getElementCount()>=1u); + assert (this->info.getCapacity()>=1u); // // start a very slow background scan diff --git a/src/template/base/top/caServerApp/exScalarPV.cc b/src/template/base/top/caServerApp/exScalarPV.cc index 0e91d81e9..1b326fa51 100644 --- a/src/template/base/top/caServerApp/exScalarPV.cc +++ b/src/template/base/top/caServerApp/exScalarPV.cc @@ -71,9 +71,9 @@ void exScalarPV::scan() } newValue += (float) ( sin (radians) / 10.0 ); limit = (float) this->info.getHopr (); - newValue = tsMin ( newValue, limit ); + newValue = epicsMin ( newValue, limit ); limit = (float) this->info.getLopr (); - newValue = tsMax ( newValue, limit ); + newValue = epicsMax ( newValue, limit ); *pDD = newValue; aitTimeStamp gddts ( this->currentTime ); pDD->setTimeStamp ( & gddts ); diff --git a/src/template/base/top/caServerApp/exServer.cc b/src/template/base/top/caServerApp/exServer.cc index 49ea802dc..f934f3608 100644 --- a/src/template/base/top/caServerApp/exServer.cc +++ b/src/template/base/top/caServerApp/exServer.cc @@ -3,9 +3,8 @@ * National Laboratory. * Copyright (c) 2002 The Regents of the University of California, as * Operator of Los Alamos National Laboratory. -* EPICS BASE Versions 3.13.7 -* and higher are distributed subject to a Software License Agreement found -* in file LICENSE that is included with this distribution. +* EPICS BASE is distributed subject to a Software License Agreement found +* in file LICENSE that is included with this distribution. \*************************************************************************/ // // fileDescriptorManager.process(delay); @@ -304,7 +303,7 @@ exPV *pvInfo::createPV ( exServer & cas, bool preCreateFlag, // depending on the io type and the number // of elements // - if (this->elementCount==1u) { + if (this->capacity==1u) { switch (this->ioType){ case excasIoSync: pNewPV = new exScalarPV ( cas, *this, preCreateFlag, scanOn ); diff --git a/src/template/base/top/caServerApp/exServer.h b/src/template/base/top/caServerApp/exServer.h index 59ba11309..cd9a897d3 100644 --- a/src/template/base/top/caServerApp/exServer.h +++ b/src/template/base/top/caServerApp/exServer.h @@ -3,9 +3,8 @@ * National Laboratory. * Copyright (c) 2002 The Regents of the University of California, as * Operator of Los Alamos National Laboratory. -* EPICS BASE Versions 3.13.7 -* and higher are distributed subject to a Software License Agreement found -* in file LICENSE that is included with this distribution. +* EPICS BASE is distributed subject to a Software License Agreement found +* in file LICENSE that is included with this distribution. \*************************************************************************/ // // Example EPICS CA server @@ -45,7 +44,7 @@ #include "casdef.h" #include "epicsAssert.h" #include "resourceLib.h" -#include "tsMinMax.h" +#include "epicsAlgorithm.h" #ifndef NELEMENTS # define NELEMENTS(A) (sizeof(A)/sizeof(A[0])) @@ -76,8 +75,10 @@ public: double getLopr () const; aitEnum getType () const; excasIoType getIOType () const; - unsigned getElementCount () const; - void unlinkPV (); + unsigned getCapacity () const; + unsigned getElementCount () const; + void setElementCount (unsigned); + void unlinkPV (); exPV *createPV ( exServer & exCAS, bool preCreateFlag, bool scanOn, double asyncDelay ); void deletePV (); @@ -88,7 +89,8 @@ private: const double lopr; aitEnum type; const excasIoType ioType; - const unsigned elementCount; + const unsigned capacity; + unsigned elementCount; exPV * pPV; pvInfo & operator = ( const pvInfo & ); }; @@ -441,8 +443,8 @@ inline pvInfo::pvInfo ( double scanPeriodIn, const char *pNameIn, scanPeriod ( scanPeriodIn ), pName ( pNameIn ), hopr ( hoprIn ), lopr ( loprIn ), type ( typeIn ), - ioType ( ioTypeIn ), elementCount ( countIn ), - pPV ( 0 ) + ioType ( ioTypeIn ), capacity ( countIn ), + elementCount ( 0 ), pPV ( 0 ) { } @@ -454,8 +456,8 @@ inline pvInfo::pvInfo ( const pvInfo & copyIn ) : scanPeriod ( copyIn.scanPeriod ), pName ( copyIn.pName ), hopr ( copyIn.hopr ), lopr ( copyIn.lopr ), type ( copyIn.type ), - ioType ( copyIn.ioType ), elementCount ( copyIn.elementCount ), - pPV ( copyIn.pPV ) + ioType ( copyIn.ioType ), capacity ( copyIn.capacity ), + elementCount ( copyIn.elementCount ), pPV ( copyIn.pPV ) { } @@ -509,12 +511,22 @@ inline excasIoType pvInfo::getIOType () const return this->ioType; } -inline unsigned pvInfo::getElementCount () const -{ - return this->elementCount; +inline unsigned pvInfo::getCapacity () const +{ + return this->capacity; } -inline void pvInfo::unlinkPV () +inline unsigned pvInfo::getElementCount () const +{ + return this->elementCount; +} + +inline void pvInfo::setElementCount (unsigned newCount) +{ + this->elementCount = newCount; +} + +inline void pvInfo::unlinkPV () { this->pPV = NULL; } diff --git a/src/template/base/top/caServerApp/exVectorPV.cc b/src/template/base/top/caServerApp/exVectorPV.cc index 963b59082..932188806 100644 --- a/src/template/base/top/caServerApp/exVectorPV.cc +++ b/src/template/base/top/caServerApp/exVectorPV.cc @@ -3,9 +3,8 @@ * National Laboratory. * Copyright (c) 2002 The Regents of the University of California, as * Operator of Los Alamos National Laboratory. -* EPICS BASE Versions 3.13.7 -* and higher are distributed subject to a Software License Agreement found -* in file LICENSE that is included with this distribution. +* EPICS BASE is distributed subject to a Software License Agreement found +* in file LICENSE that is included with this distribution. \*************************************************************************/ #include "exServer.h" @@ -48,7 +47,7 @@ unsigned exVectorPV::maxDimension() const aitIndex exVectorPV::maxBound (unsigned dimension) const { if (dimension==0u) { - return this->info.getElementCount(); + return this->info.getCapacity(); } else { return 0u; @@ -60,45 +59,40 @@ aitIndex exVectorPV::maxBound (unsigned dimension) const // void exVectorPV::scan() { - caStatus status; - double radians; - smartGDDPointer pDD; - aitFloat32 *pF, *pFE; - const aitFloat32 *pCF; - float newValue; - float limit; - exVecDestructor *pDest; - int gddStatus; + static epicsTime startTime = epicsTime::getCurrent(); - // - // update current time (so we are not required to do - // this every time that we write the PV which impacts - // throughput under sunos4 because gettimeofday() is - // slow) + // update current time // this->currentTime = epicsTime::getCurrent(); - - pDD = new gddAtomic (gddAppType_value, aitEnumFloat64, - 1u, this->info.getElementCount()); + + // demonstrate a changing array size + unsigned ramp = 15 & (unsigned) (this->currentTime - startTime); + unsigned newSize = this->info.getCapacity(); + if (newSize > ramp) { + newSize -= ramp; + } + + smartGDDPointer pDD = new gddAtomic (gddAppType_value, aitEnumFloat64, + 1u, newSize); if ( ! pDD.valid () ) { return; } - + // // smart pointer class manages reference count after this point // - gddStatus = pDD->unreference(); - assert (!gddStatus); + gddStatus gdds = pDD->unreference(); + assert(!gdds); // // allocate array buffer // - pF = new aitFloat32 [this->info.getElementCount()]; + aitFloat64 * pF = new aitFloat64 [newSize]; if (!pF) { return; } - pDest = new exVecDestructor; + exVecDestructor * pDest = new exVecDestructor; if (!pDest) { delete [] pF; return; @@ -114,37 +108,39 @@ void exVectorPV::scan() // double check for reasonable bounds on the // current value // - pCF=NULL; - if ( this->pValue.valid () ) { - if (this->pValue->dimension()==1u) { - const gddBounds *pB = this->pValue->getBounds(); - if (pB[0u].size()==this->info.getElementCount()) { - pCF = *this->pValue; - } - } + const aitFloat64 *pCF = NULL, *pCFE = NULL; + if (this->pValue.valid () && + this->pValue->dimension() == 1u) { + const gddBounds *pB = this->pValue->getBounds(); + + pCF = *this->pValue; + pCFE = &pCF[pB->size()]; } - pFE = &pF[this->info.getElementCount()]; - while (pF info.getHopr(); - newValue = tsMin (newValue, limit); - limit = (float) this->info.getLopr(); - newValue = tsMax (newValue, limit); - *(pF++) = newValue; + newValue += (sin (radians) / 10.0); + double limit = this->info.getHopr(); + newValue = epicsMin (newValue, limit); + limit = this->info.getLopr(); + newValue = epicsMax (newValue, limit); + *pF++ = newValue; } aitTimeStamp gddts = this->currentTime; pDD->setTimeStamp ( & gddts ); - status = this->update ( *pDD ); + caStatus status = this->update ( *pDD ); + this->info.setElementCount(newSize); + if ( status != S_casApp_success ) { errMessage (status, "vector scan update failed\n"); } @@ -166,7 +162,7 @@ void exVectorPV::scan() // caStatus exVectorPV::updateValue ( const gdd & value ) { - + aitUint32 newSize = 0; // // Check bounds of incoming request // (and see if we are replacing all elements - @@ -183,7 +179,9 @@ caStatus exVectorPV::updateValue ( const gdd & value ) if ( pb[0u].first() != 0u ) { return S_casApp_outOfBounds; } - else if ( pb[0u].size() > this->info.getElementCount() ) { + + newSize = pb[0u].size(); + if ( newSize > this->info.getCapacity() ) { return S_casApp_outOfBounds; } } @@ -193,14 +191,14 @@ caStatus exVectorPV::updateValue ( const gdd & value ) // return S_casApp_outOfBounds; } - + // // Create a new array data descriptor // (so that old values that may be referenced on the // event queue are not replaced) // - smartGDDPointer pNewValue ( new gddAtomic ( gddAppType_value, aitEnumFloat64, - 1u, this->info.getElementCount() ) ); + smartGDDPointer pNewValue ( new gddAtomic ( gddAppType_value, aitEnumFloat64, + 1u, newSize ) ); if ( ! pNewValue.valid() ) { return S_casApp_noMemory; } @@ -211,21 +209,20 @@ caStatus exVectorPV::updateValue ( const gdd & value ) // gddStatus gdds = pNewValue->unreference( ); assert ( ! gdds ); - + // // allocate array buffer // - aitFloat64 * pF = new aitFloat64 [this->info.getElementCount()]; + aitFloat64 * pF = new aitFloat64 [newSize]; if (!pF) { return S_casApp_noMemory; } - + // // Install (and initialize) array buffer // if no old values exist // - unsigned count = this->info.getElementCount(); - for ( unsigned i = 0u; i < count; i++ ) { + for ( unsigned i = 0u; i < newSize; i++ ) { pF[i] = 0.0f; } @@ -240,7 +237,7 @@ caStatus exVectorPV::updateValue ( const gdd & value ) // (do this before we increment pF) // pNewValue->putRef ( pF, pDest ); - + // // copy in the values that they are writing // @@ -248,9 +245,10 @@ caStatus exVectorPV::updateValue ( const gdd & value ) if ( gdds ) { return S_cas_noConvert; } - + this->pValue = pNewValue; - + this->info.setElementCount(newSize); + return S_casApp_success; } @@ -261,6 +259,6 @@ caStatus exVectorPV::updateValue ( const gdd & value ) // void exVecDestructor::run ( void *pUntyped ) { - aitFloat32 * pf = reinterpret_cast < aitFloat32 * > ( pUntyped ); + aitFloat64 * pf = reinterpret_cast < aitFloat64 * > ( pUntyped ); delete [] pf; } diff --git a/src/template/base/top/caServerApp/vxEntry.cc b/src/template/base/top/caServerApp/vxEntry.cc index 14984fe19..1cb240723 100644 --- a/src/template/base/top/caServerApp/vxEntry.cc +++ b/src/template/base/top/caServerApp/vxEntry.cc @@ -8,10 +8,8 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ // -// $Revision-Id$ // Author: Jeff HIll (LANL) // -// #include