diff --git a/documentation/README.1st b/documentation/README.1st deleted file mode 100644 index 177205805..000000000 --- a/documentation/README.1st +++ /dev/null @@ -1,344 +0,0 @@ - Installation Instructions - - EPICS Base Release 7.0.3 - - -------------------------------------------------------------------------- - - 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? - - The Experimental Physics and Industrial Control Systems (EPICS) is an - extensible set of software components and tools with which application - developers can create a control system. This control system can be used - to control accelerators, detectors, telescopes, or other scientific - experimental equipment. EPICS base is the set of core software, i.e. the - components of EPICS without which EPICS would not function. EPICS base - allows an arbitrary number of target systems, IOCs (input/output - controllers), and host systems, OPIs (operator interfaces) of various - types. - - What is new in this release? - - Please check the RELEASE_NOTES file in the distribution for description - of changes and release migration details. - - Copyright - - Please review the LICENSE file included in the distribution for legal - terms of usage. - - Supported platforms - - The list of platforms supported by this version of EPICS base is given - in the configure/CONFIG_SITE file. If you are trying to build EPICS Base - on an unlisted host or for a different target machine you must have the - proper host/target cross compiler and header files, and you will have to - create and add the appropriate new configure files to the - base/configure/os/directory. You can start by copying existing - configuration files in the configure/os directory and then make changes - for your new platforms. - - Supported compilers - - This version of EPICS base has been built and tested using the host - vendor's C and C++ compilers, as well as the GNU gcc and g++ compilers. - The GNU cross-compilers work for all cross-compiled targets. You may - need the C and C++ compilers to be in your search path to do EPICS - builds; check the definitions of CC and CCC in - base/configure/os/CONFIG.. if you have problems. - - Software requirements - - GNU make - You must use the GNU version of make for EPICS builds, and we now - recommend version 4.1 or later (version 3.82 may work on Linux, but - doesn't on Windows). - - Perl - You must have Perl version 5.8.1 or later installed. The EPICS - configuration files do not specify the perl full pathname, so the perl - executable must be found through your normal search path. - - Unzip and tar (Winzip on WIN32 systems) - You must have tools available to unzip and untar the EPICS base - distribution file. - - Target systems - EPICS supports IOCs running on embedded platforms such as VxWorks and - RTEMS built using a cross-compiler, and also supports soft IOCs running - as processes on the host platform. - - vxWorks - You must have vxWorks 6 installed if any of your target systems are - vxWorks systems; the C++ compilers for vxWorks 5.x are now too old to - support. The vxWorks installation provides the cross-compiler and header - files needed to build for these targets. The absolute path to and the - version number of the vxWorks installation must be set in the - base/configure/os/CONFIG_SITE.Common.vxWorksCommon file or in one of its - target-specific overrides. - - Consult the vxWorks 6.x EPICS web pages and the vxWorks documentation - for information about configuring your vxWorks operating system for use - with EPICS. - - RTEMS - For RTEMS targets, you need RTEMS core and toolset version 4.9.2 or - 4.10. The newer 4.11 or 5.x releases are not supported yet. - - Command-line editing libraries - GNU readline or other OS-specific libraries can be used by the IOC shell - to provide command line editing and history recall. The default setting - is different for each OS. On Linux the default is to use READLINE since - most distributions include it. On MacOS the default is also READLINE - since Apple provides a compatible library, although it isn't GNU. On - RTEMS we support GNU readline and Tecla, although the default is to use - neither since these have to be added to the RTEMS installation - separately. On vxWorks we support the built-in ledLib library. - - Host system storage requirements - - The compressed tar file is approximately 1.6 MB in size. The - distribution source tree takes up approximately 12 MB. Each host target - will need around 40 MB for build files, and each cross-compiled target - around 20 MB. - - Documentation - - EPICS documentation is available through the EPICS website at Argonne. - - Release specific documentation can also be found in the - base/documentation directory of the distribution. - - Directory Structure - - Distribution directory structure: - - base Root directory of the base distribution - base/configure Operating system independent build config files - base/configure/os Operating system dependent build config files - base/documentation Distribution documentation - base/src Source code in various subdirectories - base/startup Scripts for setting up path and environment - - Install directories created by the build: - - bin Installed scripts and executables in subdirs - cfg Installed build configuration files - db Installed data bases - dbd Installed data base definitions - doc Installed documentation files - html Installed html documentation - include Installed header files - include/os Installed os specific header files in subdirs - include/compiler Installed compiler-specific header files - lib Installed libraries in arch subdirectories - lib/perl Installed perl modules - templates Installed templates - - Build related components - - base/documentation directory - contains setup, build, and install documents - - README.1st Instructions for setup and building epics base - README.html html version of README.1st - README.darwin.html Installation notes for Mac OS X (Darwin) - RELEASE_NOTES.html Notes on release changes - KnownProblems.html List of known problems and workarounds - - base/startup directory - contains scripts to set environment and path - - EpicsHostArch Shell script to set EPICS_HOST_ARCH env variable - unix.csh C shell script to set path and env variables - unix.sh Bourne shell script to set path and env variables - win32.bat Bat file example to configure win32-x86 target - windows.bat Bat file example to configure windows-x64 target - - base/configure directory - contains build definitions and rules - - CONFIG Includes configure files and allows variable overrides - CONFIG.CrossCommon Cross build definitions - CONFIG.gnuCommon Gnu compiler build definitions for all archs - CONFIG_ADDONS Definitions for and DEFAULT options - 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_SITE Site specific make definitions - CONFIG_SITE_ENV Site defaults for EPICS environment variables - MAKEFILE Installs CONFIG* RULES* creates - RELEASE Location of external products - RULES Includes appropriate rules file - RULES.Db Rules for database and database definition files - RULES.ioc Rules for application iocBoot/ioc* directory - 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_TOP Rules specific to a dir (uninstall and tar) - Sample.Makefile Sample makefile with comments - - base/configure/os directory - contains os-arch specific definitions - - CONFIG.. Specific host-target build definitions - CONFIG.Common. Specific target definitions for all hosts - CONFIG..Common Specific host definitions for all targets - CONFIG.UnixCommon.Common Definitions for Unix hosts and all targets - CONFIG.Common.UnixCommon Definitions for Unix targets and all hosts - CONFIG.Common.vxWorksCommon Specific host definitions for all vx targets - CONFIG_SITE.. Site specific host-target definitions - CONFIG_SITE.Common. Site specific target defs for all hosts - CONFIG_SITE..Common Site specific host defs for all targets - - Building EPICS base (Unix and Win32) - - Unpack file - - Unzip and untar the distribution file. Use WinZip on Windows systems. - - Set environment variables - - Files in the base/startup directory have been provided to help set - required path and other environment variables. - - EPICS_HOST_ARCH - Before you can build or use EPICS Base, the environment variable - EPICS_HOST_ARCH should be defined. A perl script EpicsHostArch.pl in - the base/startup directory has been provided to help set - EPICS_HOST_ARCH. You should have EPICS_HOST_ARCH set to your host - operating system followed by a dash and then your CPU architecture, - e.g. linux-x86_64. If you are not using the OS vendor's c/c++ compiler - for host builds, you will need another dash followed by the alternate - compiler name (e.g. "-gnu" for GNU c/c++ compilers on a solaris host - or "-mingw" for MinGW c/c++ compilers on a WIN32 host). See - configure/CONFIG_SITE for a list of supported EPICS_HOST_ARCH values. - - PERLLIB - On WIN32, some versions of Perl require that the environment variable - PERLLIB be set to . - - PATH - As already mentioned, you must have the perl executable and you may - need C and C++ compilers in your search path. For building base you - also must have echo in your search path. For Unix host builds you also - need ln, cpp, cp, rm, mv, and mkdir in your search path and /bin/chmod - must exist. On some Unix systems you may also need ar and ranlib in - your path, and the C compiler may require as and ld in your path. On - solaris systems you need uname in your path. - - LD_LIBRARY_PATH - EPICS shared libraries and executables normally contain the full path - to any libraries they require. However, if you move the EPICS files or - directories from their build-time location then in order for the - shared libraries to be found at runtime LD_LIBRARY_PATH must include - the full pathname to $(INSTALL_LOCATION)/lib/$(EPICS_HOST_ARCH) when - invoking executables, or some equivalent OS-specific mechanism (such - as /etc/ld.so.conf on Linux) must be used. Shared libraries are now - built by default on all Unix type hosts. - - Do site-specific build configuration - - Site configuration - To configure EPICS, you may want to modify the default definitions in - the following files: - - configure/CONFIG_SITE Build choices. Specify target archs. - configure/CONFIG_SITE_ENV Environment variable defaults - configure/RELEASE TORNADO2 full path location - - Host configuration - To configure each host system, you may override the default - definitions by adding a new file in the configure/os directory with - override definitions. The new file should have the same name as the - distribution file to be overridden except with CONFIG in the name - changed to CONFIG_SITE. - - configure/os/CONFIG.. Host build settings - configure/os/CONFIG..Common Host common build settings - - Target configuration - To configure each target system, you may override the default - definitions by adding a new file in the configure/os directory with - override definitions. The new file should have the same name as the - distribution file to be overridden except with CONFIG in the name - replaced by CONFIG_SITE. This step is necessary even if the host - system is the only target system. - - configure/os/CONFIG.Common. Target common settings - configure/os/CONFIG.. Host-target settings - - Build EPICS base - - After configuring the build you should be able to build EPICS base by - issuing the following commands in the distribution's root directory - (base): - - gnumake clean uninstall - gnumake - - The command "gnumake clean uninstall" will remove all files and - directories generated by a previous build. The command "gnumake" will - build and install everything for the configured host and targets. - - It is recommended that you do a "gnumake clean uninstall" at the root - directory of an EPICS directory structure before each complete rebuild - to ensure that all components will be rebuilt. - - 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. - - Instructions for building and executing the example IOC application can - be found in the section "Example Application" of Chapter 2, "Getting - Started", in the "IOC Application Developer's Guide" for this release. - The "Example IOC Application" section briefly explains how to create and - build an example application in a user created 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 access clients on the host system. - - A perl script, makeBaseExt.pl, is included in the distribution file. - This script will create a sample extension that can be built and - executed. The makeBaseApp.pl and makeBaseExt.pl scripts are installed - into the install location bin/ directory during the base - build. - - Multiple host platforms - - You can build using a single EPICS directory structure on multiple host - systems and for multiple cross target systems. The intermediate and - binary files generated by the build will be created in separate - subdirectories and installed into the appropriate separate host/target - install directories. EPICS executables and perl scripts are installed - into the $(INSTALL_LOCATION)/bin/ directories. Libraries are - installed into $(INSTALL_LOCATION)/lib/. The default definition - for $(INSTALL_LOCATION) is $(TOP) which is the root directory in the - distribution directory structure, base. Created object files are stored - in O. source subdirectories, This allows objects for multiple - cross target architectures to be maintained at the same time. To build - EPICS base for a specific host/target combination you must have the - proper host/target C/C++ cross compiler and target header files and the - base/configure/os directory must have the appropriate configure files. diff --git a/documentation/README.html b/documentation/README.html deleted file mode 100644 index 6e15470fd..000000000 --- a/documentation/README.html +++ /dev/null @@ -1,382 +0,0 @@ - - - - -README - EPICS Base Installation Instructions - - -
-

Installation Instructions

-

EPICS Base Release 7.0.3


-
-
-

Table of Contents

- -
- -

What is EPICS base?

-
The Experimental Physics and Industrial Control Systems - (EPICS) is an extensible set of software components and tools with - which application developers can create a control system. This control - system can be used to control accelerators, detectors, telescopes, or - other scientific experimental equipment. EPICS base is the set of core - software, i.e. the components of EPICS without which EPICS would not - function. EPICS base allows an arbitrary number of target systems, IOCs - (input/output controllers), and host systems, OPIs (operator - interfaces) of various types.
- -

What is new in this release?

-
Please check the RELEASE_NOTES file in the distribution for - description of changes and release migration details.
- -

Copyright

-
Please review the LICENSE file included in the - distribution for legal terms of usage.
- -

Supported platforms

- -
The list of platforms supported by this version of EPICS base - is given in the configure/CONFIG_SITE file. If you are trying to build - EPICS Base on an unlisted host or for a different target machine you - must have the proper host/target cross compiler and header files, and - you will have to create and add the appropriate new configure files to - the base/configure/os/directory. You can start by copying existing - configuration files in the configure/os directory and then make changes - for your new platforms.
- -

Supported compilers

- -
This version of EPICS base has been built and tested using the host - vendor's C and C++ compilers, as well as the GNU gcc and g++ compilers. The GNU - cross-compilers work for all cross-compiled targets. You may need the C and C++ - compilers to be in your search path to do EPICS builds; check the definitions - of CC and CCC in base/configure/os/CONFIG.<host>.<host> if you have - problems.
- -

Software requirements

- -
GNU make
- You must use the GNU version of make for EPICS builds, and we now recommend - version 4.1 or later (version 3.82 may work on Linux, but doesn't on Windows). - -

Perl
- You must have Perl version 5.8.1 or later installed. The EPICS configuration - files do not specify the perl full pathname, so the perl executable must - be found through your normal search path.

- -

Unzip and tar (Winzip on WIN32 systems)
- You must have tools available to unzip and untar the EPICS base - distribution file.

- -

Target systems
- EPICS supports IOCs running on embedded platforms such as VxWorks - and RTEMS built using a cross-compiler, and also supports soft IOCs running - as processes on the host platform.

- -

vxWorks
- You must have vxWorks 6 installed if any of your target systems are vxWorks - systems; the C++ compilers for vxWorks 5.x are now too old to support. The - vxWorks installation provides the cross-compiler and header files needed to - build for these targets. The absolute path to and the version number of the - vxWorks installation must be set in the - base/configure/os/CONFIG_SITE.Common.vxWorksCommon file or in one of its - target-specific overrides.

- -

Consult the vxWorks - 6.x EPICS web pages and the vxWorks documentation for information - about configuring your vxWorks operating system for use with EPICS.

- -

RTEMS
- For RTEMS targets, you need RTEMS core and toolset version 4.9.2 or 4.10. The - newer 4.11 or 5.x releases are not supported yet.

- -

Command-line editing libraries
- - GNU readline or other OS-specific libraries can be used by the IOC shell to - provide command line editing and history recall. The default setting is - different for each OS. On Linux the default is to use READLINE since most - distributions include it. On MacOS the default is also READLINE since Apple - provides a compatible library, although it isn't GNU. On RTEMS we support GNU - readline and Tecla, although the default is to use neither since these have to - be added to the RTEMS installation separately. On vxWorks we support the - built-in ledLib library.

- -
- -

Host system storage requirements

- -
The compressed tar file is approximately 1.6 MB in size. The - distribution source tree takes up approximately 12 MB. Each host target will - need around 40 MB for build files, and each cross-compiled target around 20 - MB.
- -

Documentation

-
EPICS documentation is available through the - EPICS website at Argonne. -

Release specific documentation can also be found in the base/documentation - directory of the distribution.

- -

Directory Structure

-

Distribution directory structure:

- -
-        base                    Root directory of the base distribution
-        base/configure          Operating system independent build config files
-        base/configure/os       Operating system dependent build config files
-        base/documentation      Distribution documentation
-        base/src                Source code in various subdirectories
-        base/startup            Scripts for setting up path and environment
-
- -

Install directories created by the build:

-
-        bin                     Installed scripts and executables in subdirs
-        cfg                     Installed build configuration files
-        db                      Installed data bases
-        dbd                     Installed data base definitions
-        doc                     Installed documentation files
-        html                    Installed html documentation
-        include                 Installed header files
-        include/os              Installed os specific header files in subdirs
-        include/compiler        Installed compiler-specific header files
-        lib                     Installed libraries in arch subdirectories
-        lib/perl                Installed perl modules
-        templates               Installed templates
-
-
- -

Build related components

-
- -

base/documentation directory - contains setup, build, and install - documents

-
-        README.1st           Instructions for setup and building epics base
-        README.html          html version of README.1st
-        README.darwin.html   Installation notes for Mac OS X (Darwin)
-        RELEASE_NOTES.html   Notes on release changes
-        KnownProblems.html   List of known problems and workarounds
-
- -

base/startup directory - contains scripts to set environment and path

-
-        EpicsHostArch       Shell script to set EPICS_HOST_ARCH env variable
-        unix.csh            C shell script to set path and env variables
-        unix.sh             Bourne shell script to set path and env variables
-        win32.bat           Bat file example to configure win32-x86 target
-        windows.bat         Bat file example to configure windows-x64 target
-
- -

base/configure directory - contains build definitions and rules

-
-        CONFIG                Includes configure files and allows variable overrides
-        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_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_SITE           Site specific make definitions
-        CONFIG_SITE_ENV       Site defaults for EPICS environment variables
-        MAKEFILE              Installs CONFIG* RULES* creates
-        RELEASE               Location of external products
-        RULES                 Includes appropriate rules file
-        RULES.Db              Rules for database and database definition files
-        RULES.ioc             Rules for application iocBoot/ioc* directory
-        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_TOP             Rules specific to a <top> dir (uninstall and tar)
-        Sample.Makefile       Sample makefile with comments
-
- -

base/configure/os directory - contains os-arch specific definitions

-
-        CONFIG.<host>.<target>      Specific host-target build definitions
-        CONFIG.Common.<target>      Specific target definitions for all hosts
-        CONFIG.<host>.Common        Specific host definitions for all targets
-        CONFIG.UnixCommon.Common    Definitions for Unix hosts and all targets
-        CONFIG.Common.UnixCommon    Definitions for Unix targets and all hosts
-        CONFIG.Common.vxWorksCommon Specific host definitions for all vx targets
-        CONFIG_SITE.<host>.<target> Site specific host-target definitions
-        CONFIG_SITE.Common.<target> Site specific target defs for all hosts
-        CONFIG_SITE.<host>.Common   Site specific host defs for all targets
-
- -
- -

Building EPICS base (Unix and Win32)

-
- -

Unpack file

-
-Unzip and untar the distribution file. Use WinZip on Windows - systems. -
- -

Set environment variables

-
-Files in the base/startup directory have been provided to - help set required path and other environment variables. - -

EPICS_HOST_ARCH
- Before you can build or use EPICS Base, the environment variable - EPICS_HOST_ARCH should be defined. A perl script EpicsHostArch.pl in the - base/startup directory has been provided to help set EPICS_HOST_ARCH. - You should have EPICS_HOST_ARCH set to your host operating system - followed by a dash and then your CPU architecture, e.g. linux-x86_64. - If you are not using the OS vendor's c/c++ compiler for host builds, - you will need another dash followed by the alternate compiler name - (e.g. "-gnu" for GNU c/c++ compilers on a solaris host or "-mingw" - for MinGW c/c++ compilers on a WIN32 host). See configure/CONFIG_SITE - for a list of supported EPICS_HOST_ARCH values.

- -

PERLLIB
- On WIN32, some versions of Perl require that the environment - variable PERLLIB be set to <perl directory location>.

- -

PATH
- As already mentioned, you must have the perl executable and you may - need C and C++ compilers in your search path. For building base you - also must have echo in your search path. For Unix host builds you also - need ln, cpp, cp, rm, mv, and mkdir in your search path and /bin/chmod - must exist. On some Unix systems you may also need ar and ranlib in - your path, and the C compiler may require as and ld in your path. On - solaris systems you need uname in your path.

- -

LD_LIBRARY_PATH
- - EPICS shared libraries and executables normally contain the full path - to any libraries they require. - However, if you move the EPICS files or directories from their build-time - location then in order for the shared libraries to be found at runtime - LD_LIBRARY_PATH must include the full pathname to - $(INSTALL_LOCATION)/lib/$(EPICS_HOST_ARCH) when invoking executables, or - some equivalent OS-specific mechanism (such as /etc/ld.so.conf on Linux) - must be used. - Shared libraries are now built by default on all Unix type hosts.

-
- -

Do site-specific build configuration

-
- -Site configuration
- To configure EPICS, you may want to modify the default definitions - in the following files: -
-        configure/CONFIG_SITE      Build choices. Specify target archs.
-        configure/CONFIG_SITE_ENV  Environment variable defaults
-        configure/RELEASE          TORNADO2 full path location
-
- - Host configuration
- To configure each host system, you may override the default - definitions by adding a new file in the configure/os directory with - override definitions. The new file should have the same name as the - distribution file to be overridden except with CONFIG in the name - changed to CONFIG_SITE. - -
-        configure/os/CONFIG.<host>.<host>      Host build settings
-        configure/os/CONFIG.<host>.Common      Host common build settings
-
- -Target configuration
- To configure each target system, you may override the default - definitions by adding a new file in the configure/os directory with - override definitions. The new file should have the same name as the - distribution file to be overridden except with CONFIG in the name - replaced by CONFIG_SITE. This step is necessary even if the host system - is the only target system. -
-        configure/os/CONFIG.Common.<target>     Target common settings
-        configure/os/CONFIG.<host>.<target>     Host-target settings
-
-
- -

Build EPICS base

-
After configuring the build you should be able to build - EPICS base by issuing the following commands in the distribution's root - directory (base): -
-        gnumake clean uninstall
-        gnumake
-
- - The command "gnumake clean uninstall" - will remove all files and directories generated by a previous build. - The command "gnumake" will build and install everything for the - configured host and targets. - -

It is recommended that you do a "gnumake clean uninstall" at the - root directory of an EPICS directory structure before each complete - rebuild to ensure that all components will be rebuilt. -

-
- -

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. - -

- Instructions for building and executing the example IOC application - can be found in the section "Example Application" of Chapter 2, - "Getting Started", in the "IOC Application Developer's Guide" for this - release. The "Example IOC Application" section briefly explains how 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 - access clients on the host system. - -

- A perl script, - makeBaseExt.pl, is included in the distribution file. This script will - create a sample extension that can be built and executed. The - makeBaseApp.pl and makeBaseExt.pl scripts are installed into the - install location bin/<hostarch> directory during the base build. -

- -

Multiple host platforms

-
You can build using a single EPICS directory structure on - multiple host systems and for multiple cross target systems. The - intermediate and binary files generated by the build will be created in - separate subdirectories and installed into the appropriate separate - host/target install directories. EPICS executables and perl scripts are - installed into the $(INSTALL_LOCATION)/bin/<arch> directories. - Libraries are installed into $(INSTALL_LOCATION)/lib/<arch>. - The default definition for $(INSTALL_LOCATION) is $(TOP) - which is the root directory in the distribution directory structure, - base. Created object files are stored in O.<arch> source - subdirectories, This allows objects for multiple cross target - architectures to be maintained at the same time. To build EPICS base - for a specific host/target combination you must have the proper - host/target C/C++ cross compiler and target header files and the - base/configure/os directory must have the appropriate configure files. -
- - diff --git a/documentation/README.md b/documentation/README.md new file mode 100644 index 000000000..444dd44cc --- /dev/null +++ b/documentation/README.md @@ -0,0 +1,375 @@ +# Installation Instructions + +## EPICS Base Release 3.15.6 + + + +----- + +### Table of Contents + + - [What is EPICS base?](#0_0_1) + - [What is new in this release?](#0_0_2) + - [Copyright](#0_0_3) + - [Supported platforms](#0_0_4) + - [Supported compilers](#0_0_5) + - [Software requirements](#0_0_6) + - [Host system storage requirements](#0_0_7) + - [Documentation](#0_0_8) + - [Directory Structure](#0_0_10) + - [Build related components](#0_0_11) + - [Building EPICS base (Unix and Win32)](#0_0_12) + - [Example application and extension](#0_0_13) + - [Multiple host platforms](#0_0_14) + +----- + +### What is EPICS base? + +The Experimental Physics and Industrial Control Systems (EPICS) is an +extensible set of software components and tools with which application +developers can create a control system. This control system can be +used to control accelerators, detectors, telescopes, or other +scientific experimental equipment. EPICS base is the set of core +software, i.e. the components of EPICS without which EPICS would not +function. EPICS base allows an arbitrary number of target systems, +IOCs (input/output controllers), and host systems, OPIs (operator +interfaces) of various types. + +### What is new in this release? + +Please check the RELEASE\_NOTES file in the distribution for +description of changes and release migration details. + +### Copyright + +Please review the LICENSE file included in the distribution for legal +terms of usage. + +### Supported platforms + +The list of platforms supported by this version of EPICS base is given +in the configure/CONFIG\_SITE file. If you are trying to build EPICS +Base on an unlisted host or for a different target machine you must +have the proper host/target cross compiler and header files, and you +will have to create and add the appropriate new configure files to the +base/configure/os/directory. You can start by copying existing +configuration files in the configure/os directory and then make +changes for your new platforms. + +### Supported compilers + +This version of EPICS base has been built and tested using the host +vendor's C and C++ compilers, as well as the GNU gcc and g++ +compilers. The GNU cross-compilers work for all cross-compiled +targets. You may need the C and C++ compilers to be in your search +path to do EPICS builds; check the definitions of CC and CCC in +base/configure/os/CONFIG.<host>.<host> if you have problems. + +### Software requirements + +**GNU make** +You must use GNU make, gnumake, for any EPICS builds. Set your path so +that a gnumake version 3.81 or later is available. + +**Perl** +You must have Perl version 5.8.1 or later installed. The EPICS +configuration files do not specify the perl full pathname, so the perl +executable must be found through your normal search path. + +**Unzip and tar (Winzip on WIN32 systems)** +You must have tools available to unzip and untar the EPICS base +distribution file. + +**Target systems** +EPICS supports IOCs running on embedded platforms such as VxWorks and +RTEMS built using a cross-compiler, and also supports soft IOCs +running as processes on the host platform. + +**vxWorks** +You must have vxWorks 5.5.x or 6.x installed if any of your target +systems are vxWorks systems; the C++ compiler for vxWorks 5.4 is now +too old to support. The vxWorks installation provides the +cross-compiler and header files needed to build for these targets. The +absolute path to and the version number of the vxWorks installation +must be set in the base/configure/os/CONFIG\_SITE.Common.vxWorksCommon +file or in one of its target-specific overrides. + +Consult the [vxWorks 5.x](https://epics.anl.gov/base/tornado.php) or +[vxWorks 6.x](https://epics.anl.gov/base/vxWorks6.php) EPICS web pages +about and the vxWorks documentation for information about configuring +your vxWorks operating system for use with EPICS. + +**RTEMS** +For RTEMS targets, you need RTEMS core and toolset version 4.9.2 or +later. + +**GNU readline or Tecla library** +GNU readline and Tecla libraries can be used by the IOC shell to +provide command line editing and command line history recall and edit. +GNU readline (or Tecla library) must be installed on your target +system when COMMANDLINE\_LIBRARY is set to READLINE (or TECLA) for +that target. EPICS (EPICS shell) is the default specified in +CONFIG\_COMMON. A READLINE override is defined for linux-x86 in the +EPICS distribution. Comment out COMMANDLINE\_LIBRARY=READLINE in +configure/os/CONFIG\_SITE.Common.linux-x86 if readline is not +installed on linux-x86. Command-line editing and history will then be +those supplied by the os. On vxWorks the ledLib command-line input +library is used instead. + +### Host system storage requirements + +The compressed tar file is approximately 1.6 MB in size. The +distribution source tree takes up approximately 12 MB. Each host +target will need around 40 MB for build files, and each cross-compiled +target around 20 MB. + +### Documentation + +EPICS documentation is available through the [EPICS +website](https://epics.anl.gov/) at Argonne. + +Release specific documentation can also be found in the +base/documentation directory of the distribution. + +### Directory Structure + +#### Distribution directory structure: + +``` + base Root directory of the base distribution + base/configure Operating system independent build config files + base/configure/os Operating system dependent build config files + base/documentation Distribution documentation + base/src Source code in various subdirectories + base/startup Scripts for setting up path and environment +``` + +#### Install directories created by the build: + +``` + bin Installed scripts and executables in subdirs + cfg Installed build configuration files + db Installed data bases + dbd Installed data base definitions + doc Installed documentation files + html Installed html documentation + include Installed header files + include/os Installed os specific header files in subdirs + include/compiler Installed compiler-specific header files + lib Installed libraries in arch subdirectories + lib/perl Installed perl modules + templates Installed templates +``` + +### Build related components + +#### base/documentation directory - contains setup, build, and install documents + +``` + README.md Instructions for setup and building epics base + README.darwin.html Installation notes for Mac OS X (Darwin) + RELEASE_NOTES.html Notes on release changes + KnownProblems.html List of known problems and workarounds +``` + +#### base/startup directory - contains scripts to set environment and path + +``` + EpicsHostArch Shell script to set EPICS_HOST_ARCH env variable + unix.csh C shell script to set path and env variables + unix.sh Bourne shell script to set path and env variables + win32.bat Bat file example to configure win32-x86 target + windows.bat Bat file example to configure windows-x64 target +``` + +#### base/configure directory - contains build definitions and rules + +``` + CONFIG Includes configure files and allows variable overrides + 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_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_SITE Site specific make definitions + CONFIG_SITE_ENV Site defaults for EPICS environment variables + MAKEFILE Installs CONFIG* RULES* creates + RELEASE Location of external products + RULES Includes appropriate rules file + RULES.Db Rules for database and database definition files + RULES.ioc Rules for application iocBoot/ioc* directory + 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_TOP Rules specific to a <top> dir (uninstall and tar) + Sample.Makefile Sample makefile with comments +``` + +#### base/configure/os directory - contains os-arch specific definitions + +``` + CONFIG.<host>.<target> Specific host-target build definitions + CONFIG.Common.<target> Specific target definitions for all hosts + CONFIG.<host>.Common Specific host definitions for all targets + CONFIG.UnixCommon.Common Definitions for Unix hosts and all targets + CONFIG.Common.UnixCommon Definitions for Unix targets and all hosts + CONFIG.Common.vxWorksCommon Specific host definitions for all vx targets + CONFIG_SITE.<host>.<target> Site specific host-target definitions + CONFIG_SITE.Common.<target> Site specific target defs for all hosts + CONFIG_SITE.<host>.Common Site specific host defs for all targets +``` + +### Building EPICS base (Unix and Win32) + +#### Unpack file + +Unzip and untar the distribution file. Use WinZip on Windows +systems. + +#### Set environment variables + +Files in the base/startup directory have been provided to help set +required path and other environment variables. + +**EPICS\_HOST\_ARCH** +Before you can build or use EPICS R3.15, the environment variable +EPICS\_HOST\_ARCH must be defined. A perl script EpicsHostArch.pl in +the base/startup directory has been provided to help set +EPICS\_HOST\_ARCH. You should have EPICS\_HOST\_ARCH set to your +host operating system followed by a dash and then your host +architecture, e.g. solaris-sparc. If you are not using the OS +vendor's c/c++ compiler for host builds, you will need another dash +followed by the alternate compiler name (e.g. "-gnu" for GNU c/c++ +compilers on a solaris host or "-mingw" for MinGW c/c++ compilers on +a WIN32 host). See configure/CONFIG\_SITE for a list of supported +EPICS\_HOST\_ARCH values. + +**PERLLIB** +On WIN32, some versions of Perl require that the environment +variable PERLLIB be set to <perl directory location>. + +**PATH** +As already mentioned, you must have the perl executable and you may +need C and C++ compilers in your search path. For building base you +also must have echo in your search path. For Unix host builds you +also need ln, cpp, cp, rm, mv, and mkdir in your search path and +/bin/chmod must exist. On some Unix systems you may also need ar and +ranlib in your path, and the C compiler may require as and ld in +your path. On solaris systems you need uname in your path. + +**LD\_LIBRARY\_PATH** +R3.15 shared libraries and executables normally contain the full +path to any libraries they require. However, if you move the EPICS +files or directories from their build-time location then in order +for the shared libraries to be found at runtime LD\_LIBRARY\_PATH +must include the full pathname to +$(INSTALL\_LOCATION)/lib/$(EPICS\_HOST\_ARCH) when invoking +executables, or some equivalent OS-specific mechanism (such as +/etc/ld.so.conf on Linux) must be used. Shared libraries are now +built by default on all Unix type hosts. + +#### Do site-specific build configuration + +**Site configuration** +To configure EPICS, you may want to modify the default definitions +in the following files: + +``` + configure/CONFIG_SITE Build choices. Specify target archs. + configure/CONFIG_SITE_ENV Environment variable defaults + configure/RELEASE TORNADO2 full path location +``` + +**Host configuration** +To configure each host system, you may override the default +definitions by adding a new file in the configure/os directory with +override definitions. The new file should have the same name as the +distribution file to be overridden except with CONFIG in the name +changed to CONFIG\_SITE. + +``` + configure/os/CONFIG.<host>.<host> Host build settings + configure/os/CONFIG.<host>.Common Host common build settings +``` + +**Target configuration** +To configure each target system, you may override the default +definitions by adding a new file in the configure/os directory with +override definitions. The new file should have the same name as the +distribution file to be overridden except with CONFIG in the name +replaced by CONFIG\_SITE. This step is necessary even if the host +system is the only target system. + +``` + configure/os/CONFIG.Common.<target> Target common settings + configure/os/CONFIG.<host>.<target> Host-target settings +``` + +#### Build EPICS base + +After configuring the build you should be able to build EPICS base +by issuing the following commands in the distribution's root +directory (base): + +``` + gnumake clean uninstall + gnumake +``` + +The command "gnumake clean uninstall" will remove all files and +directories generated by a previous build. The command "gnumake" +will build and install everything for the configured host and +targets. + +It is recommended that you do a "gnumake clean uninstall" at the +root directory of an EPICS directory structure before each complete +rebuild to ensure that all components will be rebuilt. + +### 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. + +Instructions for building and executing the 3.15 example application +can be found in the section "Example Application" of Chapter 2, +"Getting Started", in the "IOC Application Developer's Guide" for this +release. The "Example IOC Application" section briefly explains how 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 access clients on +the host system. + +A perl script, makeBaseExt.pl, is included in the distribution file. +This script will create a sample extension that can be built and +executed. The makeBaseApp.pl and makeBaseExt.pl scripts are installed +into the install location bin/<hostarch> directory during the base +build. + +### Multiple host platforms + +You can build using a single EPICS directory structure on multiple +host systems and for multiple cross target systems. The intermediate +and binary files generated by the build will be created in separate +subdirectories and installed into the appropriate separate host/target +install directories. EPICS executables and perl scripts are installed +into the `$(INSTALL_LOCATION)/bin/` directories. Libraries are +installed into $`(INSTALL_LOCATION)/lib/`. The default +definition for `$(INSTALL_LOCATION)` is `$(TOP)` which is the root +directory in the distribution directory structure, base. Created +object files are stored in O.<arch> source subdirectories, This +allows objects for multiple cross target architectures to be +maintained at the same time. To build EPICS base for a specific +host/target combination you must have the proper host/target C/C++ +cross compiler and target header files and the base/configure/os +directory must have the appropriate configure files. diff --git a/documentation/RELEASE_NOTES.html b/documentation/RELEASE_NOTES.html index a80ae4ea8..b17f000c8 100644 --- a/documentation/RELEASE_NOTES.html +++ b/documentation/RELEASE_NOTES.html @@ -1164,6 +1164,18 @@ of its CALLBACK objects.

+

Add option to avoid CALLBACK conflict

+ +

If a macro EPICS_NO_CALLBACK is defined, then callback.h will no longer (re)define CALLBACK. +The name 'CALLBACK' is used by the WIN32 API, and redefinition in callback.h cause errors +if some windows headers are later included. +

+ +

Code which defines EPICS_NO_CALLBACK, but still wishes to use callbacks, should use +the alternate name 'epicsCallback' introduced in 3.15.6, 3.16.2, and 7.0.2. +It is also possible, though not encouraged, to use 'struct callbackPvt' +which has been present since the callback API was introduced.

+

Cleaning up with Multiple CA contexts in a Process

Bruno Martins reported a problem with the CA client library at shutdown in a diff --git a/modules/database/src/ioc/as/asDbLib.h b/modules/database/src/ioc/as/asDbLib.h index 65c4c6f59..1e0f6756e 100644 --- a/modules/database/src/ioc/as/asDbLib.h +++ b/modules/database/src/ioc/as/asDbLib.h @@ -16,7 +16,7 @@ #include "shareLib.h" typedef struct { - CALLBACK callback; + epicsCallback callback; long status; } ASDBCALLBACK; diff --git a/modules/database/src/ioc/db/callback.c b/modules/database/src/ioc/db/callback.c index e1f1d45a2..bbd798ed4 100644 --- a/modules/database/src/ioc/db/callback.c +++ b/modules/database/src/ioc/db/callback.c @@ -216,7 +216,7 @@ static void callbackTask(void *arg) epicsEventMustWait(mySet->semWakeUp); while ((ptr = epicsRingPointerPop(mySet->queue))) { - CALLBACK *pcallback = (CALLBACK *)ptr; + epicsCallback *pcallback = (epicsCallback *)ptr; if(!epicsRingPointerIsEmpty(mySet->queue)) epicsEventMustTrigger(mySet->semWakeUp); mySet->queueOverflow = FALSE; @@ -317,7 +317,7 @@ void callbackInit(void) } /* This routine can be called from interrupt context */ -int callbackRequest(CALLBACK *pcallback) +int callbackRequest(epicsCallback *pcallback) { int priority; int pushOK; @@ -347,7 +347,7 @@ int callbackRequest(CALLBACK *pcallback) return 0; } -static void ProcessCallback(CALLBACK *pcallback) +static void ProcessCallback(epicsCallback *pcallback) { dbCommon *pRec; @@ -358,14 +358,14 @@ static void ProcessCallback(CALLBACK *pcallback) dbScanUnlock(pRec); } -void callbackSetProcess(CALLBACK *pcallback, int Priority, void *pRec) +void callbackSetProcess(epicsCallback *pcallback, int Priority, void *pRec) { callbackSetCallback(ProcessCallback, pcallback); callbackSetPriority(Priority, pcallback); callbackSetUser(pRec, pcallback); } -int callbackRequestProcessCallback(CALLBACK *pcallback, +int callbackRequestProcessCallback(epicsCallback *pcallback, int Priority, void *pRec) { callbackSetProcess(pcallback, Priority, pRec); @@ -374,11 +374,11 @@ int callbackRequestProcessCallback(CALLBACK *pcallback, static void notify(void *pPrivate) { - CALLBACK *pcallback = (CALLBACK *)pPrivate; + epicsCallback *pcallback = (epicsCallback *)pPrivate; callbackRequest(pcallback); } -void callbackRequestDelayed(CALLBACK *pcallback, double seconds) +void callbackRequestDelayed(epicsCallback *pcallback, double seconds) { epicsTimerId timer = (epicsTimerId)pcallback->timer; @@ -389,7 +389,7 @@ void callbackRequestDelayed(CALLBACK *pcallback, double seconds) epicsTimerStartDelay(timer, seconds); } -void callbackCancelDelayed(CALLBACK *pcallback) +void callbackCancelDelayed(epicsCallback *pcallback) { epicsTimerId timer = (epicsTimerId)pcallback->timer; @@ -398,7 +398,7 @@ void callbackCancelDelayed(CALLBACK *pcallback) } } -void callbackRequestProcessCallbackDelayed(CALLBACK *pcallback, +void callbackRequestProcessCallbackDelayed(epicsCallback *pcallback, int Priority, void *pRec, double seconds) { callbackSetProcess(pcallback, Priority, pRec); diff --git a/modules/database/src/ioc/db/callback.h b/modules/database/src/ioc/db/callback.h index 720cf337d..a77a888f9 100644 --- a/modules/database/src/ioc/db/callback.h +++ b/modules/database/src/ioc/db/callback.h @@ -26,7 +26,7 @@ extern "C" { /* * WINDOWS also has a "CALLBACK" type def */ -#ifdef _WIN32 +#if defined(_WIN32) && !defined(EPICS_NO_CALLBACK) # ifdef CALLBACK # undef CALLBACK # endif /*CALLBACK*/ @@ -44,7 +44,9 @@ typedef struct callbackPvt { void *timer; /*for use by callback itself*/ }epicsCallback; +#if !defined(EPICS_NO_CALLBACK) typedef epicsCallback CALLBACK; +#endif typedef void (*CALLBACKFUNC)(struct callbackPvt*); @@ -69,16 +71,16 @@ typedef struct callbackQueueStats { epicsShareFunc void callbackInit(void); epicsShareFunc void callbackStop(void); epicsShareFunc void callbackCleanup(void); -epicsShareFunc int callbackRequest(CALLBACK *pCallback); +epicsShareFunc int callbackRequest(epicsCallback *pCallback); epicsShareFunc void callbackSetProcess( - CALLBACK *pcallback, int Priority, void *pRec); + epicsCallback *pcallback, int Priority, void *pRec); epicsShareFunc int callbackRequestProcessCallback( - CALLBACK *pCallback,int Priority, void *pRec); + epicsCallback *pCallback,int Priority, void *pRec); epicsShareFunc void callbackRequestDelayed( - CALLBACK *pCallback,double seconds); -epicsShareFunc void callbackCancelDelayed(CALLBACK *pcallback); + epicsCallback *pCallback,double seconds); +epicsShareFunc void callbackCancelDelayed(epicsCallback *pcallback); epicsShareFunc void callbackRequestProcessCallbackDelayed( - CALLBACK *pCallback, int Priority, void *pRec, double seconds); + epicsCallback *pCallback, int Priority, void *pRec, double seconds); epicsShareFunc int callbackSetQueueSize(int size); epicsShareFunc int callbackQueueStatus(const int reset, callbackQueueStats *result); epicsShareFunc void callbackQueueShow(const int reset); diff --git a/modules/database/src/ioc/db/dbNotify.c b/modules/database/src/ioc/db/dbNotify.c index 794672a55..e25ce4aa0 100644 --- a/modules/database/src/ioc/db/dbNotify.c +++ b/modules/database/src/ioc/db/dbNotify.c @@ -69,7 +69,7 @@ typedef struct notifyPvt { ELLNODE node; /*For free list*/ long magic; short state; - CALLBACK callback; + epicsCallback callback; ELLLIST waitList; /*list of records for current processNotify*/ short cancelWait; short userCallbackWait; @@ -86,7 +86,7 @@ typedef struct notifyGlobal { static notifyGlobal *pnotifyGlobal = 0; -static void notifyCallback(CALLBACK *pcallback); +static void notifyCallback(epicsCallback *pcallback); #define ellSafeAdd(list,listnode) \ { \ @@ -270,7 +270,7 @@ static void processNotifyCommon(processNotify *ppn, dbCommon *precord, int first callDone(precord, ppn); } -static void notifyCallback(CALLBACK *pcallback) +static void notifyCallback(epicsCallback *pcallback) { processNotify *ppn = NULL; dbCommon *precord; diff --git a/modules/database/src/ioc/db/dbScan.c b/modules/database/src/ioc/db/dbScan.c index 9224ed504..1904082e7 100644 --- a/modules/database/src/ioc/db/dbScan.c +++ b/modules/database/src/ioc/db/dbScan.c @@ -109,7 +109,7 @@ static char *priorityName[NUM_CALLBACK_PRIORITIES] = { /* EVENT */ typedef struct event_list { - CALLBACK callback[NUM_CALLBACK_PRIORITIES]; + epicsCallback callback[NUM_CALLBACK_PRIORITIES]; scan_list scan_list[NUM_CALLBACK_PRIORITIES]; struct event_list *next; char eventname[1]; /* actually arbitrary size */ @@ -120,7 +120,7 @@ static epicsMutexId event_lock; /* IO_EVENT*/ typedef struct io_scan_list { - CALLBACK callback; + epicsCallback callback; scan_list scan_list; } io_scan_list; @@ -141,9 +141,9 @@ static void periodicTask(void *arg); static void initPeriodic(void); static void deletePeriodic(void); static void spawnPeriodic(int ind); -static void eventCallback(CALLBACK *pcallback); +static void eventCallback(epicsCallback *pcallback); static void ioscanInit(void); -static void ioscanCallback(CALLBACK *pcallback); +static void ioscanCallback(epicsCallback *pcallback); static void ioscanDestroy(void); static void printList(scan_list *psl, char *message); static void scanList(scan_list *psl); @@ -448,7 +448,7 @@ int scanpiol(void) /* print pioscan_list */ return 0; } -static void eventCallback(CALLBACK *pcallback) +static void eventCallback(epicsCallback *pcallback) { scan_list *psl; @@ -944,7 +944,7 @@ static void spawnPeriodic(int ind) epicsEventWait(startStopEvent); } -static void ioscanCallback(CALLBACK *pcallback) +static void ioscanCallback(epicsCallback *pcallback) { ioscan_head *piosh; int prio; diff --git a/modules/database/src/ioc/db/dbTest.c b/modules/database/src/ioc/db/dbTest.c index 0daafc436..e23220503 100644 --- a/modules/database/src/ioc/db/dbTest.c +++ b/modules/database/src/ioc/db/dbTest.c @@ -56,7 +56,7 @@ typedef struct msgBuff TAB_BUFFER; # define MIN(x,y) (((x) < (y)) ? (x) : (y)) #endif #ifndef MAX -# define MAX(x,y) (((x) < (y)) ? (x) : (y)) +# define MAX(x,y) (((x) > (y)) ? (x) : (y)) #endif /* Local Routines */ diff --git a/modules/database/src/ioc/db/menuAlarmStat.dbd b/modules/database/src/ioc/db/menuAlarmStat.dbd.pod similarity index 84% rename from modules/database/src/ioc/db/menuAlarmStat.dbd rename to modules/database/src/ioc/db/menuAlarmStat.dbd.pod index e8d7f1ced..78debf8c5 100644 --- a/modules/database/src/ioc/db/menuAlarmStat.dbd +++ b/modules/database/src/ioc/db/menuAlarmStat.dbd.pod @@ -7,6 +7,17 @@ # and higher are distributed subject to a Software License Agreement found # in file LICENSE that is included with this distribution. #************************************************************************* + +=head1 Menu menuAlarmStat + +This menu defines the possible alarm statuses that EPICS records can exhibit +which is used for C and C fields of all record types. +See L for more information. + +=menu menuAlarmStat + +=cut + menu(menuAlarmStat) { choice(menuAlarmStatNO_ALARM,"NO_ALARM") choice(menuAlarmStatREAD,"READ") diff --git a/modules/database/src/ioc/db/menuFtype.dbd b/modules/database/src/ioc/db/menuFtype.dbd.pod similarity index 88% rename from modules/database/src/ioc/db/menuFtype.dbd rename to modules/database/src/ioc/db/menuFtype.dbd.pod index af6a8803d..9df014d22 100644 --- a/modules/database/src/ioc/db/menuFtype.dbd +++ b/modules/database/src/ioc/db/menuFtype.dbd.pod @@ -6,6 +6,15 @@ # EPICS BASE is distributed subject to a Software License Agreement found # in file LICENSE that is included with this distribution. #************************************************************************* + +=head1 Menu menuFtype + +This menu is used for the C and similar fields of many record types. + +=menu menuFtype + +=cut + menu(menuFtype) { choice(menuFtypeSTRING,"STRING") choice(menuFtypeCHAR,"CHAR") diff --git a/modules/database/src/std/dev/asSubRecordFunctions.c b/modules/database/src/std/dev/asSubRecordFunctions.c index 76943e94b..5bbd95886 100644 --- a/modules/database/src/std/dev/asSubRecordFunctions.c +++ b/modules/database/src/std/dev/asSubRecordFunctions.c @@ -34,7 +34,7 @@ /* The following is provided for access security*/ /*It allows a CA client to force access security initialization*/ -static void myCallback(CALLBACK *pcallback) +static void myCallback(epicsCallback *pcallback) { ASDBCALLBACK *pasdbcallback = (ASDBCALLBACK *)pcallback; subRecord *precord; diff --git a/modules/database/src/std/dev/devAiSoftCallback.c b/modules/database/src/std/dev/devAiSoftCallback.c index cf38c8713..8bf6385e1 100644 --- a/modules/database/src/std/dev/devAiSoftCallback.c +++ b/modules/database/src/std/dev/devAiSoftCallback.c @@ -36,7 +36,7 @@ typedef struct devPvt { processNotify pn; - CALLBACK callback; + epicsCallback callback; long options; int status; int smooth; diff --git a/modules/database/src/std/dev/devBiSoftCallback.c b/modules/database/src/std/dev/devBiSoftCallback.c index 314460049..607b1af33 100644 --- a/modules/database/src/std/dev/devBiSoftCallback.c +++ b/modules/database/src/std/dev/devBiSoftCallback.c @@ -35,7 +35,7 @@ typedef struct devPvt { processNotify pn; - CALLBACK callback; + epicsCallback callback; long options; int status; struct { diff --git a/modules/database/src/std/dev/devLiSoftCallback.c b/modules/database/src/std/dev/devLiSoftCallback.c index caab523e5..d833939ee 100644 --- a/modules/database/src/std/dev/devLiSoftCallback.c +++ b/modules/database/src/std/dev/devLiSoftCallback.c @@ -35,7 +35,7 @@ typedef struct devPvt { processNotify pn; - CALLBACK callback; + epicsCallback callback; long options; int status; struct { diff --git a/modules/database/src/std/dev/devMbbiDirectSoftCallback.c b/modules/database/src/std/dev/devMbbiDirectSoftCallback.c index d785f7386..e40a6b006 100644 --- a/modules/database/src/std/dev/devMbbiDirectSoftCallback.c +++ b/modules/database/src/std/dev/devMbbiDirectSoftCallback.c @@ -35,7 +35,7 @@ typedef struct devPvt { processNotify pn; - CALLBACK callback; + epicsCallback callback; long options; int status; struct { diff --git a/modules/database/src/std/dev/devMbbiSoftCallback.c b/modules/database/src/std/dev/devMbbiSoftCallback.c index 3796bcee6..fee81b5d9 100644 --- a/modules/database/src/std/dev/devMbbiSoftCallback.c +++ b/modules/database/src/std/dev/devMbbiSoftCallback.c @@ -35,7 +35,7 @@ typedef struct devPvt { processNotify pn; - CALLBACK callback; + epicsCallback callback; long options; int status; struct { diff --git a/modules/database/src/std/dev/devSiSoftCallback.c b/modules/database/src/std/dev/devSiSoftCallback.c index 8f679889e..fd0e3761b 100644 --- a/modules/database/src/std/dev/devSiSoftCallback.c +++ b/modules/database/src/std/dev/devSiSoftCallback.c @@ -37,7 +37,7 @@ typedef struct devPvt { DBADDR dbaddr; processNotify pn; - CALLBACK callback; + epicsCallback callback; long options; int status; struct { diff --git a/modules/database/src/std/rec/Makefile b/modules/database/src/std/rec/Makefile index b2c0512ed..87021987e 100644 --- a/modules/database/src/std/rec/Makefile +++ b/modules/database/src/std/rec/Makefile @@ -55,3 +55,7 @@ stdRecords_DBD = $(patsubst %,%.dbd,$(stdRecords)) dbRecStd_SRCS += $(patsubst %,%.c,$(stdRecords)) HTMLS += $(patsubst %.dbd.pod,%.html,$(notdir $(wildcard ../rec/*Record.dbd.pod))) + +vpath %.png $(SRC_DIRS) +HTMLS += image/compress-1.png +HTMLS += image/compress-2.png diff --git a/modules/database/src/std/rec/aaiRecord.c b/modules/database/src/std/rec/aaiRecord.c index 7805c9fba..51af45f61 100644 --- a/modules/database/src/std/rec/aaiRecord.c +++ b/modules/database/src/std/rec/aaiRecord.c @@ -356,10 +356,10 @@ static long readValue(aaiRecord *prec) recGblSetSevr(prec, SIMM_ALARM, prec->sims); if (prec->sdly >= 0) { - CALLBACK *pvt = prec->simpvt; + epicsCallback *pvt = prec->simpvt; if (!pvt) { /* very lazy allocation of callback structure */ - pvt = calloc(1, sizeof(CALLBACK)); + pvt = calloc(1, sizeof(epicsCallback)); prec->simpvt = pvt; } if (pvt) diff --git a/modules/database/src/std/rec/aaiRecord.dbd b/modules/database/src/std/rec/aaiRecord.dbd index 15db6d360..b4675b302 100644 --- a/modules/database/src/std/rec/aaiRecord.dbd +++ b/modules/database/src/std/rec/aaiRecord.dbd @@ -122,7 +122,7 @@ recordtype(aai) { prompt("Sim. Mode Private") special(SPC_NOMOD) interest(4) - extra("CALLBACK *simpvt") + extra("epicsCallback *simpvt") } field(MPST,DBF_MENU) { prompt("Post Value Monitors") diff --git a/modules/database/src/std/rec/aaoRecord.c b/modules/database/src/std/rec/aaoRecord.c index b71750052..ccf05179f 100644 --- a/modules/database/src/std/rec/aaoRecord.c +++ b/modules/database/src/std/rec/aaoRecord.c @@ -367,9 +367,9 @@ static long writeValue(aaoRecord *prec) status = pdset->write_aao(prec); prec->pact = FALSE; } else { /* !prec->pact && delay >= 0. */ - CALLBACK *pvt = prec->simpvt; + epicsCallback *pvt = prec->simpvt; if (!pvt) { - pvt = calloc(1, sizeof(CALLBACK)); /* very lazy allocation of callback structure */ + pvt = calloc(1, sizeof(epicsCallback)); /* very lazy allocation of callback structure */ prec->simpvt = pvt; } if (pvt) callbackRequestProcessCallbackDelayed(pvt, prec->prio, prec, prec->sdly); diff --git a/modules/database/src/std/rec/aaoRecord.dbd b/modules/database/src/std/rec/aaoRecord.dbd index a1731a3cb..20e957ff4 100644 --- a/modules/database/src/std/rec/aaoRecord.dbd +++ b/modules/database/src/std/rec/aaoRecord.dbd @@ -122,7 +122,7 @@ recordtype(aao) { prompt("Sim. Mode Private") special(SPC_NOMOD) interest(4) - extra("CALLBACK *simpvt") + extra("epicsCallback *simpvt") } field(MPST,DBF_MENU) { prompt("Post Value Monitors") diff --git a/modules/database/src/std/rec/aiRecord.c b/modules/database/src/std/rec/aiRecord.c index 500193360..0e3593282 100644 --- a/modules/database/src/std/rec/aiRecord.c +++ b/modules/database/src/std/rec/aiRecord.c @@ -508,9 +508,9 @@ static long readValue(aiRecord *prec) } prec->pact = FALSE; } else { /* !prec->pact && delay >= 0. */ - CALLBACK *pvt = prec->simpvt; + epicsCallback *pvt = prec->simpvt; if (!pvt) { - pvt = calloc(1, sizeof(CALLBACK)); /* very lazy allocation of callback structure */ + pvt = calloc(1, sizeof(epicsCallback)); /* very lazy allocation of callback structure */ prec->simpvt = pvt; } if (pvt) callbackRequestProcessCallbackDelayed(pvt, prec->prio, prec, prec->sdly); diff --git a/modules/database/src/std/rec/aiRecord.dbd.pod b/modules/database/src/std/rec/aiRecord.dbd.pod index 69ca65f3f..e113aa3d2 100644 --- a/modules/database/src/std/rec/aiRecord.dbd.pod +++ b/modules/database/src/std/rec/aiRecord.dbd.pod @@ -516,7 +516,7 @@ simulation mode. prompt("Sim. Mode Private") special(SPC_NOMOD) interest(4) - extra("CALLBACK *simpvt") + extra("epicsCallback *simpvt") } } diff --git a/modules/database/src/std/rec/aoRecord.c b/modules/database/src/std/rec/aoRecord.c index c5a84f615..6fa65859b 100644 --- a/modules/database/src/std/rec/aoRecord.c +++ b/modules/database/src/std/rec/aoRecord.c @@ -574,9 +574,9 @@ static long writeValue(aoRecord *prec) status = dbPutLink(&prec->siol, DBR_DOUBLE, &prec->oval, 1); prec->pact = FALSE; } else { /* !prec->pact && delay >= 0. */ - CALLBACK *pvt = prec->simpvt; + epicsCallback *pvt = prec->simpvt; if (!pvt) { - pvt = calloc(1, sizeof(CALLBACK)); /* very lazy allocation of callback structure */ + pvt = calloc(1, sizeof(epicsCallback)); /* very lazy allocation of callback structure */ prec->simpvt = pvt; } if (pvt) callbackRequestProcessCallbackDelayed(pvt, prec->prio, prec, prec->sdly); diff --git a/modules/database/src/std/rec/aoRecord.dbd.pod b/modules/database/src/std/rec/aoRecord.dbd.pod index f2361df7e..c54cb2c4f 100644 --- a/modules/database/src/std/rec/aoRecord.dbd.pod +++ b/modules/database/src/std/rec/aoRecord.dbd.pod @@ -70,7 +70,7 @@ output value PVAL is added to it. =head4 Drive Limits The output value is now clipped to the range DRVL to DRVH inclusive, provided -that DRVH > DRVL. +that DRVH E DRVL. The result is copied into both the VAL and PVAL fields. =head4 Limit Rate of Change @@ -164,9 +164,7 @@ OUT field must specify the address of the I/O card. In addition, the DTYP field must contain the name of the device support module. Be aware that the address format differs according to the I/O bus used. See Address Specification for information on the format of hardware -addresses. The user can see a list of the device support modules -currently supported at the user's local site by using the dbst utility -in R3.13. +addresses. For soft records the output link can be a database link, a channel access link, or a constant value. If the link is a constant, no output @@ -573,7 +571,7 @@ information on these fields. prompt("Sim. Mode Private") special(SPC_NOMOD) interest(4) - extra("CALLBACK *simpvt") + extra("epicsCallback *simpvt") } field(IVOA,DBF_MENU) { prompt("INVALID output action") @@ -620,7 +618,7 @@ terminated. For compatibility with old device supports that don't know EOFF, if both EOFF and ESLO have their default value, EOFF is set to EGUL. -If device support includes init_record, it is called. +If device support includes C, it is called. INIT is set TRUE. This causes PBRK, LBRK, and smoothing to be re-initialized. If "backwards" linear conversion is requested, then VAL @@ -647,10 +645,6 @@ called. INIT is set TRUE. This causes PBRK, LBRK, and smoothing to be re-initialized. -=item get_value - -Fills in the values of struct valueDes so that they refer to VAL. - =item get_alarm_double Sets the following values: @@ -930,7 +924,7 @@ OUT link type must be either a CONSTANT, DB_LINK, or CA_LINK. This module writes the current value of OVAL. If the OUT link type is PV_LINK, then dbCaAddInlink is called by -init_record. init_record always returns a value of 2, which means that +C. C always returns a value of 2, which means that no conversion will ever be attempted. write_ao calls recGblPutLinkValue to write the current value of VAL. diff --git a/modules/database/src/std/rec/biRecord.c b/modules/database/src/std/rec/biRecord.c index be700a56a..9c0ddb3c0 100644 --- a/modules/database/src/std/rec/biRecord.c +++ b/modules/database/src/std/rec/biRecord.c @@ -304,9 +304,9 @@ static long readValue(biRecord *prec) } prec->pact = FALSE; } else { /* !prec->pact && delay >= 0. */ - CALLBACK *pvt = prec->simpvt; + epicsCallback *pvt = prec->simpvt; if (!pvt) { - pvt = calloc(1, sizeof(CALLBACK)); /* very lazy allocation of callback structure */ + pvt = calloc(1, sizeof(epicsCallback)); /* very lazy allocation of callback structure */ prec->simpvt = pvt; } if (pvt) callbackRequestProcessCallbackDelayed(pvt, prec->prio, prec, prec->sdly); diff --git a/modules/database/src/std/rec/biRecord.dbd.pod b/modules/database/src/std/rec/biRecord.dbd.pod index fbf343ad4..6973b2a63 100644 --- a/modules/database/src/std/rec/biRecord.dbd.pod +++ b/modules/database/src/std/rec/biRecord.dbd.pod @@ -69,9 +69,7 @@ If the binary input record gets its value from hardware, the address of the card must be entered in the INP field, and the name of the device support module must be entered in the DTYP field. See L

for information on the format of the hardware address. Be aware that the format -differs between types of cards. You can see a list of device support -modules currently supported at the user's local site by using C -utility (R3.13). +differs between types of cards. For records that specify C or C device support routines, the INP field can be a channel or a database link, or a @@ -94,18 +92,18 @@ the device support module reads a value directly into VAL or the C device support is used. The value can also be fetched as one of the strings specified in the ZNAM or ONAM fields. The ZNAM field has a string that corresponds to the 0 state, so when the value is fetched as -this string, C will return a 0. The ONAM field hold the +this string, C will return a 0. The ONAM field hold the string that corresponds to the 1 state, so when the value is fetched as -this string, C returns a 1. +this string, C returns a 1. =fields ZNAM, ONAM =head3 Operator Display Parameters These parameters are used to present meaningful data to the operator. The -C record support routine can retrieve the state string -corresponding to the VAL's state. If the value is 1, C will -return the string in the ONAM field; and if 0, C will return +C record support routine can retrieve the state string +corresponding to the VAL's state. If the value is 1, C will +return the string in the ONAM field; and if 0, C will return the ZNAM string. See L for more on the record name (NAME) @@ -149,7 +147,7 @@ The LALM fields holds the value of the last occurence of the change of state alarm. It is used to implement the change of state alarm, and thus only has meaning if COSV is MAJOR or MINOR. -The MSLT field is used by the C record support routine to +The MSLT field is used by the C record support routine to determine if archive and value change monitors are invoked. They are if MSLT is not equal to VAL. @@ -286,7 +284,7 @@ these fields. prompt("Sim. Mode Private") special(SPC_NOMOD) interest(4) - extra("CALLBACK *simpvt") + extra("epicsCallback *simpvt") } =head2 Record Support @@ -303,16 +301,12 @@ This routine next checks to see that device support is available and a device support routine is defined. If neither exist, an error is issued and processing is terminated. -If device support includes C, it is called. +If device support includes C, it is called. =head2 C See next section. -=head2 C - -Fills in the values of struct valueDes so that they refer to VAL. - =head2 C Retrieves ASCII string corresponding to VAL. @@ -338,7 +332,7 @@ the PACT field still set to TRUE. This ensures that processes will no longer be called for this record. Thus error storms will not occur. =item 2. -C is called. See L for details. +C is called. See L for details. =item 3. If PACT has been changed to TRUE, the device support read routine has @@ -359,7 +353,7 @@ status = read_bi PACT = TRUE =item * -TIME = tslocaltime +C is called. =item * if status is 0, then set VAL=(0,1) if RVAL is (0, not 0) and UDF = False. @@ -410,7 +404,7 @@ Scan forward link if necessary, set PACT FALSE, and return. Each binary input record must have an associated set of device support routines. The primary resposibility of the device support routines is to -obtain a new raw input value whenever C is called. The device +obtain a new raw input value whenever C is called. The device support routines are primarily interested in the following fields: =fields PACT, DPVT, UDF, NSEV, NSTA, VAL, INP, RVAL, MASK @@ -419,22 +413,32 @@ support routines are primarily interested in the following fields: Device support consists of the following routines: -=head2 C +=head4 long report(int level) -Not currently used. +This optional routine is called by the IOC command C and is passed the +report level that was requested by the user. +It should print a report on the state of the device support to stdout. +The C parameter may be used to output increasingly more detailed +information at higher levels, or to select different types of information with +different levels. +Level zero should print no more than a small summary. -=head2 C +=head4 long init(int after) -This routine is called once during IOC initialization. +This optional routine is called twice at IOC initialization time. +The first call happens before any of the C calls are made, with +the integer parameter C set to 0. +The second call happens after all of the C calls have been made, +with C set to 1. =head2 C This routine is optional. If provided, it is called by the record support -C routine. +C routine. =head2 C -This routine is called by the C system each time the record is +This routine is called by the ioEventScan system each time the record is added or deleted from an I/O event scan list. C has the value (0,1) if the record is being (added to, deleted from) and I/O event list. It must be provided for any device type that can use the ioEvent scanner. @@ -466,25 +470,25 @@ link type must be either CONSTANT, DB_LINK, or CA_LINK. =head3 Soft Channel -C always returns a value of 2, which means that no conversion is +C always returns a value of 2, which means that no conversion is performed. If the INP link type is CONSTANT, then the constant value is stored in VAL -by C, and the UDF is set to FALSE. VAL can be changed via -C requests. If the INP link type is PV_LINK, the C is -called by C. +by C, and the UDF is set to FALSE. VAL can be changed via +C requests. If the INP link type is PV_LINK, the C is +called by C. -C calls C to read the current value of VAL. +C calls C to read the current value of VAL. See L for details. -If the return status of C is zero, then C sets -UDF to FALSE. The status of C is returned. +If the return status of C is zero, then C sets +UDF to FALSE. The status of C is returned. =head3 Raw Soft Channel This module is like the previous except that values are read into RVAL. -C returns a value of 0. Thus the record processing routine will +C returns a value of 0. Thus the record processing routine will force VAL to be 0 or 1. =cut diff --git a/modules/database/src/std/rec/boRecord.c b/modules/database/src/std/rec/boRecord.c index 186182311..4cfe62d48 100644 --- a/modules/database/src/std/rec/boRecord.c +++ b/modules/database/src/std/rec/boRecord.c @@ -98,7 +98,7 @@ struct bodset { /* binary output dset */ /* control block for callback*/ typedef struct myCallback { - CALLBACK callback; + epicsCallback callback; struct dbCommon *precord; }myCallback; @@ -106,7 +106,7 @@ static void checkAlarms(boRecord *); static void monitor(boRecord *); static long writeValue(boRecord *); -static void myCallbackFunc(CALLBACK *arg) +static void myCallbackFunc(epicsCallback *arg) { myCallback *pcallback; boRecord *prec; @@ -439,9 +439,9 @@ static long writeValue(boRecord *prec) status = dbPutLink(&prec->siol, DBR_USHORT, &prec->val, 1); prec->pact = FALSE; } else { /* !prec->pact && delay >= 0. */ - CALLBACK *pvt = prec->simpvt; + epicsCallback *pvt = prec->simpvt; if (!pvt) { - pvt = calloc(1, sizeof(CALLBACK)); /* very lazy allocation of callback structure */ + pvt = calloc(1, sizeof(epicsCallback)); /* very lazy allocation of callback structure */ prec->simpvt = pvt; } if (pvt) callbackRequestProcessCallbackDelayed(pvt, prec->prio, prec, prec->sdly); diff --git a/modules/database/src/std/rec/boRecord.dbd.pod b/modules/database/src/std/rec/boRecord.dbd.pod index fe0a98e6e..8df8d7f31 100644 --- a/modules/database/src/std/rec/boRecord.dbd.pod +++ b/modules/database/src/std/rec/boRecord.dbd.pod @@ -130,8 +130,7 @@ It must specify the address of an I/O card if the record sends its output to hardware, and the DTYP field must contain the corresponding device support module. Be aware that the address format differs according to the I/O bus used. See L
for information on the format of -hardware addresses. You can see a list of device support modules currently -supported at the user's local site by using the C utility in R3.13. +hardware addresses. Otherwise, if the record is configured to use the soft device support modules, then it can be either a database link, a channel access link, or a @@ -143,9 +142,9 @@ this chapter for more on output to other records. =head3 Operator Display Parameters These parameters are used to present meaningful data to the operator, The -C record support routine can retrieve the state string -corresponding to the VAL's state. So, if the value is 1, C -will return the string in the ONAM field: and if 0, C will +C record support routine can retrieve the state string +corresponding to the VAL's state. So, if the value is 1, C +will return the string in the ONAM field: and if 0, C will return the ZNAM string. See L for more on the record name (NAME) @@ -194,7 +193,7 @@ The LALM field holds the value of the last occurrence of the change of state alarm. It is used to implement the change of state alarm, and thus only has meaning if COSV is MINOR or MAJOR. -The MLST is used by the C record support routine to determine if +The MLST is used by the C record support routine to determine if archive and value change monitors are invoked. They are if MLST is not equal to VAL. @@ -366,7 +365,7 @@ information on these fields. prompt("Sim. Mode Private") special(SPC_NOMOD) interest(4) - extra("CALLBACK *simpvt") + extra("epicsCallback *simpvt") } field(IVOA,DBF_MENU) { prompt("INVALID outpt action") @@ -400,17 +399,13 @@ exist, and error message is issued and processing is terminated. If DOL is a constant, then VAL is initialized to 1 if its value is nonzero or initialzed to 0 if DOL is zero, and UDF is set to FALSE. -If device support includes C, it is called. VAL is set using +If device support includes C, it is called. VAL is set using RVAL, and UDF is set to FALSE. =head2 C See next section. -=head2 C - -Fills in the values of struct valueDes so that they refer to VAL. - =head2 C Retrieves ASCII string corresponding to VAL. @@ -443,7 +438,7 @@ If PACT is FALSE =over =item * -If DOL is DB_LINK and OMSL is CLOSED_LOOP +If DOL holds a link and OMSL is C =over @@ -527,27 +522,37 @@ Scan forward link if necessary, set PACT FALSE, and return Each binary output record must have an associated set of device support routines. The primary responsibility of the device support routines is to -write a new value whenever C is called. The device support routines +write a new value whenever C is called. The device support routines are primarily interested in the following fields: =fields PACT, DPVT, NSEV, NSTA, VAL, OUT, RVAL, MASK, RBV -=head3 Decive Support Routines +=head3 Device Support Routines Device support consists of the following routines: -=head2 C +=head4 long report(int level) -Not currently used. +This optional routine is called by the IOC command C and is passed the +report level that was requested by the user. +It should print a report on the state of the device support to stdout. +The C parameter may be used to output increasingly more detailed +information at higher levels, or to select different types of information with +different levels. +Level zero should print no more than a small summary. -=head2 C +=head4 long init(int after) -This routine is called once during IOC initialization. +This optional routine is called twice at IOC initialization time. +The first call happens before any of the C calls are made, with +the integer parameter C set to 0. +The second call happens after all of the C calls have been made, +with C set to 1. =head2 C This routine is optional. If provided, it is called by record support -C routine. It should determine MASK if it is needed. +C routine. It should determine MASK if it is needed. =over @@ -593,10 +598,10 @@ link type must be either CONSTANT, DB_LINK, or CA_LINK. This module writes the current value of VAL. -If the OUT link type is PV_LINK, then C is called by -C. C always returns a value of 2, which means -that no conversion will ever be attempted. C calls -C to write the current value of VAL. See L +If the OUT link type is PV_LINK, then C is called by +C. C always returns a value of 2, which means +that no conversion will ever be attempted. C calls +C to write the current value of VAL. See L for details. =head3 Raw Soft Channel diff --git a/modules/database/src/std/rec/calcRecord.dbd.pod b/modules/database/src/std/rec/calcRecord.dbd.pod index c50667fb3..243c81eee 100644 --- a/modules/database/src/std/rec/calcRecord.dbd.pod +++ b/modules/database/src/std/rec/calcRecord.dbd.pod @@ -261,22 +261,22 @@ ATAN: Arc tangent =over 1 =item * ->= : Greater than or equal to +C<<< >= >>> : Greater than or equal to =item * -> : Greater than +C<<< > >>> : Greater than =item * -<= : Less than or equal to +C<<< <= >>> : Less than or equal to =item * -< : Less than +C<<< < >>> : Less than =item * -# : Not equal to +C<<< # >>> : Not equal to =item * -= : Equal to +C<<< = >>> : Equal to =back @@ -285,13 +285,13 @@ ATAN: Arc tangent =over 1 =item * -&& : And +C<&&> : And =item * -|| : Or +C<||> : Or =item * -! : Not +C : Not =back @@ -300,10 +300,10 @@ ATAN: Arc tangent =over 1 =item * -| : Bitwise Or +C<|> : Bitwise Or =item * -& : Bitwise And +C<&> : Bitwise And =item * OR : Bitwise Or @@ -315,13 +315,13 @@ AND : Bitwise And XOR : Bitwise Exclusive Or =item * -~ : One's Complement +C<~> : One's Complement =item * -<< : Left shift +C<<< << >>> : Left shift =item * ->> : Right shift +C<<< >> >>> : Right shift =back @@ -330,7 +330,7 @@ XOR : Bitwise Exclusive Or =over 1 =item * -:= : assigns a value (right hand side) to a variable (i.e. field) +C<:=> : assigns a value (right hand side) to a variable (i.e. field) =back @@ -360,35 +360,35 @@ C =over 1 =item * -Result is A + B + 10 +Result is C =back =head3 Relational -C<(A + B) < (C + D)> +C<<< (A + B) < (C + D) >>> =over 1 =item * -Result is 1 if (A + B) < (C + D) +Result is 1 if C<<< (A + B) < (C + D) >>> =item * -Result is 0 if (A + B) >= (C + D) +Result is 0 if C<<< (A + B) >= (C + D) >>> =back =head3 Question Mark -C<(A + B) < (C + D) ? E : F + L + 10> +C<<< (A + B) < (C + D) ? E : F + L + 10 >>> =over 1 =item * -Result is E if (A + B) < (C + D) +Result is C if C<<< (A + B) < (C + D) >>> =item * -Result is F + L + 10 if (A + B) >= (C + D) +Result is C if C<<< (A + B) >= (C + D) >>> =back @@ -412,7 +412,7 @@ C<(A + B) < (C + D) ? E : VAL> =head3 Logical -C +C =over 1 @@ -851,10 +851,6 @@ See next section. This is called if CALC is changed. C calls postfix. -=head2 C - -Fills in the values of struct valueDes so that the refer to VAL. - =head2 C Retrieves EGU. diff --git a/modules/database/src/std/rec/calcoutRecord.c b/modules/database/src/std/rec/calcoutRecord.c index 8b5525527..d9f66af3c 100644 --- a/modules/database/src/std/rec/calcoutRecord.c +++ b/modules/database/src/std/rec/calcoutRecord.c @@ -117,8 +117,8 @@ typedef struct calcoutDSET { #define CA_LINKS_NOT_OK 2 typedef struct rpvtStruct { - CALLBACK doOutCb; - CALLBACK checkLinkCb; + epicsCallback doOutCb; + epicsCallback checkLinkCb; short cbScheduled; short caLinkStat; /* NO_CA_LINKS, CA_LINKS_ALL_OK, CA_LINKS_NOT_OK */ } rpvtStruct; @@ -128,7 +128,7 @@ static void monitor(calcoutRecord *prec); static int fetch_values(calcoutRecord *prec); static void execOutput(calcoutRecord *prec); static void checkLinks(calcoutRecord *prec); -static void checkLinksCallback(CALLBACK *arg); +static void checkLinksCallback(epicsCallback *arg); static long writeValue(calcoutRecord *prec); int calcoutRecDebug; @@ -702,7 +702,7 @@ static int fetch_values(calcoutRecord *prec) return(status); } -static void checkLinksCallback(CALLBACK *arg) +static void checkLinksCallback(epicsCallback *arg) { calcoutRecord *prec; @@ -760,7 +760,7 @@ static void checkLinks(calcoutRecord *prec) prpvt->caLinkStat = NO_CA_LINKS; if (!prpvt->cbScheduled && caLinkNc) { - /* Schedule another CALLBACK */ + /* Schedule another epicsCallback */ prpvt->cbScheduled = 1; callbackRequestDelayed(&prpvt->checkLinkCb, .5); } diff --git a/modules/database/src/std/rec/calcoutRecord.dbd.pod b/modules/database/src/std/rec/calcoutRecord.dbd.pod index 6289f9043..176f1d25f 100644 --- a/modules/database/src/std/rec/calcoutRecord.dbd.pod +++ b/modules/database/src/std/rec/calcoutRecord.dbd.pod @@ -293,22 +293,22 @@ ATAN: Arc tangent =over 1 =item * ->= : Greater than or equal to +C<<< >= >>> : Greater than or equal to =item * -> : Greater than +C<<< > >>> : Greater than =item * -<= : Less than or equal to +C<<< <= >>> : Less than or equal to =item * -< : Less than +C<<< < >>> : Less than =item * -# : Not equal to +C<<< # >>> : Not equal to =item * -= : Equal to +C<<< = >>> : Equal to =back @@ -332,10 +332,10 @@ ATAN: Arc tangent =over 1 =item * -| : Bitwise Or +C<|> : Bitwise Or =item * -& : Bitwise And +C<&> : Bitwise And =item * OR : Bitwise Or @@ -347,13 +347,13 @@ AND : Bitwise And XOR : Bitwise Exclusive Or =item * -~ : One's Complement +C<~> : One's Complement =item * -<< : Left shift +C<<< << >>> : Left shift =item * ->> : Right shift +C<<< >> >>> : Right shift =back @@ -362,11 +362,11 @@ XOR : Bitwise Exclusive Or =over 1 =item * -:= : assigns a value (right hand side) to a variable (i.e. field) +C<:=> : assigns a value (right hand side) to a variable (i.e. field) =back -=head3 Parentheses and Comma +=head3 Parantheses, Comma, and Semicolon The open and close parentheses are supported. Nested parentheses are supported. @@ -374,6 +374,10 @@ supported. The comma is supported when used to separate the arguments of a binary function. +The semicolon is used to separate expressions. Although only one +traditional calculation expression is allowed, multiple assignment +expressions are allowed. + =head3 Conditional Expression The C language's question mark operator is supported. The format is: @@ -388,41 +392,59 @@ C =over 1 =item * -Result is A + B + 10 +Result is C =back =head3 Relational -C<(A + B) < (C + D)> +C<<< (A + B) < (C + D) >>> =over 1 =item * -Result is 1 if (A + B) < (C + D) +Result is 1 if C<<< (A + B) < (C + D) >>> =item * -Result is 0 if (A + B) >= (C + D) +Result is 0 if C<<< (A + B) >= (C + D) >>> =back =head3 Question Mark -C<(A + B) < (C + D) ? E : F + L + 10> +C<<< (A + B) < (C + D) ? E : F + L + 10 >>> =over 1 =item * -Result is E if (A + B) < (C + D) +Result is C if C<<< (A + B) < (C + D) >>> =item * -Result is F + L + 10 if (A + B) >= (C + D) +Result is C if C<<< (A + B) >= (C + D) >>> + +=back + +Prior to Base 3.14.9 it was legal to omit the : and the second (else) part +of the conditional, like this: + +C<(A + B)<(C + D) ? E> + +=over 1 + +=item +Result is E if (A + B)<(C + D) + +=item +Result is unchanged if (A + B)>=(C + D) + +From 3.14.9 onwards, this expresion must be written as +C<(A + B) < (C + D) ? E : VAL> =back =head3 Logical -C +C =over 1 @@ -447,6 +469,18 @@ Convert result to floating point =back +=head3 Assignment + +C + +=over 1 + +=item * +Causes the Calc record to output the successive values of a sine curve in +1 degree intervals. + +=back + =head3 Output Parameters These parameters specify and control the output capabilities of the Calcout @@ -529,7 +563,7 @@ are also meant to represent the status of the record at run-time. The EGU field contains a string of up to 16 characters which is supplied by the user and which describes the values being operated upon. The string is -retrieved whenever the routine C is called. The EGU string is +retrieved whenever the routine C is called. The EGU string is solely for an operator's sake and does not have to be used. The HOPR and LOPR fields on;y refer to the limits if the VAL, HIHI, HIGH, @@ -1146,10 +1180,6 @@ See next section. This is called id CALC or OCAL is changed. C calls postfix. -=head2 C - -Fills in the values of struct valueDes so that they refer to VAL. - =head2 C Retrieves EGU. diff --git a/modules/database/src/std/rec/compressRecord.dbd.pod b/modules/database/src/std/rec/compressRecord.dbd.pod index 265cdfe8a..5eb817f62 100644 --- a/modules/database/src/std/rec/compressRecord.dbd.pod +++ b/modules/database/src/std/rec/compressRecord.dbd.pod @@ -7,7 +7,7 @@ # in file LICENSE that is included with this distribution. #************************************************************************* -=title Compress Record (compress) +=title Compression Record (compress) The data compression record is used to collect and compress data from arrays. When the INP field references a data array field, it immediately compresses the @@ -62,7 +62,359 @@ menu(bufferingALG) { } recordtype(compress) { -=fields VAL +=head2 Contents + +=over + +=item * L + +=over + +=item * L + +=item * L + +=item * L + +=item * L + +=back + +=item * L + +=over + +=item * L + +=item * L + +=back + +=back + +=begin html + +
+
+
+ +=end html + +=head2 Parameter Fields + +=head3 Scanning Parameters + +The compression record has the standard fields for specifying under what +circumstances the record will be processed. These fields are listed in +L. In addition, L +explains how these fields are used. Since the compression record supports no +direct interfaces to hardware, its SCAN field cannot specify C<<< I/O Intr >>>. + +=head3 Algorithms and Related Parameters + +The user specifies the algorithm to be used in the ALG field. There are six possible +algorithms which can be specified as follows: + +=head4 Menu compressALG + +=menu compressALG + +The following fields determine what channel to read and how to compress the data: + +=fields ALG, INP, NSAM, N, ILIL, IHIL, OFF, RES + +As stated above, the ALG field specifies which algorithm to be performed on the data. + +The INP should be a database or channel access link. Though INP can be a constant, +the data compression algorithms are supported only when INP is a database link. See +L
for information on specifying links. + + +IHIL and ILIL can be set to provide an initial value filter on the input array. +If ILIL E IHIL, the input elements will be skipped until a value is found +that is in the range of ILIL to IHIL. Note that ILIL and IHIL are used only in +C<<< N to 1 >>> algorithms. + +OFF provides the offset to the current beginning of the array data. +Note that OFF is used only in C<<< N to 1 >>> algorithms. + +The RES field can be accessed at run time to cause the algorithm to reset +itself before the maximum number of samples are reached. + +=head4 Algorithms + +B algorithm keeps a circular buffer of length NSAM. +Each time the record is processed, it gets the data referenced by INP and puts +it into the circular buffer referenced by VAL. The INP can refer to both scalar or +array data and VAL is just a time ordered circular buffer of values obtained +from INP. +Note that N, ILIL, IHIL and OFF are not used in C<<< Circular Buffer >>> algorithm. + +B takes an average of every element of the array obtained from +INP over time; that is, the entire array referenced by INP is retrieved, and for +each element, the new average is calculated and placed in the corresponding +element of the value buffer. The retrieved array is truncated to be of length +NSAM. N successive arrays are averaged and placed in the buffer. Thus, VAL[0] +holds the average of the first element of INP over N samples, VAL[1] holds the +average of the next element of INP over N samples, and so on. The following +shows the equation: + +=for comment Latex form of equation bellow : VAL[i] \leftarrow \frac{1}{N}\sum_{n=1}^NINP_{n}[i] + +=begin html + + + +=end html + +B If any of the C<<< N to 1 >>> algorithms are chosen, then VAL is a circular +buffer of NSAM samples. +The actual algorithm depends on whether INP references a scalar or an array. + +If INP refers to a scalar, then N successive time ordered samples of INP are taken. +After the Nth sample is obtained, a new value determined by the algorithm +(Lowest, Highest, or Average), is written to the circular buffer referenced by +VAL. If C<<< Low Value >>> the lowest value of all the samples is written; if +C<<< High Value >>> the highest value is written; and if C<<< Average >>>, the +average of all the samples are written. The C<<< Median >>> setting behaves +like C<<< Average >>> with scalar input data. + +If INP refers to an array, then the following applies: + +=over + +=item C<<< N to 1 Low Value >>> + +Compress N to 1 samples, keeping the lowest value. + +=item C<<< N to 1 High Value >>> + +Compress N to 1 samples, keeping the highest value. + +=item C<<< N to 1 Average >>> + +Compress N to 1 samples, taking the average value. + +=item C<<< N to 1 Median >>> + +Compress N to 1 samples, taking the median value. + +=back + +The compression record keeps NSAM data samples. + +The field N determines the number of elements to compress into each result. + +Thus, if NSAM was 3, and N was also equal to 3, then the algorithms would work +as in the following diagram: + +=begin html + + + +=end html + + +=head3 Operator Display Parameters + +These parameters are used to present meaningful data to the operator. They +display the value and other parameters of the record either textually or +graphically. + +=fields EGU, HOPR, LOPR, PREC, NAME, DESC + +The EGU field should be given a string that describes the value of VAL, but is +used whenever the C<<< get_units >>> record support routine is called. + +The HOPR and LOPR fields only specify the upper and lower display limits for +VAL, HIHI, HIGH, LOLO and LOW fields. + +PREC controls the floating-point precision whenever C<<< get_precision >>> is +called, and the field being referenced is the VAL field (i.e., one of the values +contained in the circular buffer). + +See L +for more on the record name (NAME) and description (DESC) fields. + + +=head3 Alarm Parameters + +The compression record has the alarm parameters common to all record types +described in L. + +=head3 Run-time Parameters + +These parameters are used by the run-time code for processing the data +compression algorithm. They are not configurable by the user, though some are +accessible at run-time. They can represent the current state of the waveform or +of the record whose field is referenced by the INP field. + +=fields NUSE, OUSE, BPTR, SPTR, WPTR, CVB, INPN, INX + +NUSE and OUSE hold the current and previous number of elements stored in VAL. + +BPTR is a pointer that refers to the buffer referenced by VAL. + +SPTR points to an array that is used for array averages. + +WPTR is used by the dbGetlinks routines. + +=begin html + +
+
+
+ +=end html + +=head2 Record Support + +=head3 Record Support Routines (compressRecord.c) + +=head4 init_record + + long (*init_record)(struct dbCommon *precord, int pass) + +Space for all necessary arrays is allocated. The addresses are stored in the +appropriate fields in the record. + +=head4 process + + long (*process)(struct dbCommon *precord) + +See L + +=head4 special + + long (*special)(struct dbAddr *paddr, int after) + +This routine is called when RSET, ALG, or N are set. It performs a reset. + +=head4 cvt_dbaddr + + long (*cvt_dbaddr)(struct dbAddr *paddr) + +This is called by dbNameToAddr. It makes the dbAddr structure refer to the +actual buffer holding the result. + +=head4 get_array_info + + long (*get_array_info)(struct dbAddr *paddr, long *no_elements, long *offset) + +Obtains values from the circular buffer referenced by VAL. + +=head4 put_array_info + + long (*put_array_info)(struct dbAddr *paddr, long nNew); + +Writes values into the circular buffer referenced by VAL. + +=head4 get_units + + long (*get_units)(struct dbAddr *paddr, char *units); + +Retrieves EGU. + +=head4 get_precision + + long (*get_precision)(const struct dbAddr *paddr, long *precision); + +Retrieves PREC. + +=head4 get_graphic_double + + long (*get_graphic_double)(struct dbAddr *paddr, struct dbr_grDouble *p); + +Sets the upper display and lower display limits for a field. If the field is +VAL, the limits are set to HOPR and LOPR, else if the field has upper and lower +limits defined they will be used, else the upper and lower maximum values for +the field type will be used. + +=head4 get_control_double + + long (*get_control_double)(struct dbAddr *paddr, struct dbr_ctrlDouble *p); + +Sets the upper control and the lower control limits for a field. If the field is +VAL, the limits are set to HOPR and LOPR, else if the field has upper and lower +limits defined they will be used, else the upper and lower maximum values for +the field type will be used. + +=head3 Record Processing + +Routine process implements the following algorithm: + +=over + +=item 1. + +If INP is not a database link, check monitors and the forward link and return. + +=item 2. + +Get the current data referenced by INP. + +=item 3. + +Perform the appropriate algorithm: + +=over + +=item * + +Average: Read N successive instances of INP and perform an element by element +average. Until N instances have been obtained it just return without checking +monitors or the forward link. When N instances have been obtained complete the +algorithm, store the result in the VAL array, check monitors and the forward +link, and return. + +=item * + +Circular Buffer: Write the values obtained from INP into the VAL array as a +circular buffer, check monitors and the forward link, and return. + +=item * + +N to 1 xxx when INP refers to a scalar: Obtain N successive values from INP and +apply the N to 1 xxx algorithm to these values. Until N values are obtained +monitors and forward links are not triggered. When N successive values have been +obtained, complete the algorithm, check monitors and trigger the forward link, +and return. + +=item * + +N to 1 xxx when INP refers to an array: The ILIL and IHIL are honored if ILIL +E IHIL. The input array is divided into subarrays of length N. The specified +N to 1 xxx compression algorithm is applied to each sub-array and the result +stored in the array referenced by VAL. The monitors and forward link are +checked. + +=back + +=item 4. + +If success, set UDF to FALSE. + +=item 5. + +Check to see if monitors should be invoked: + +=over + +=item * + +Alarm monitors are invoked if the alarm status or severity has changed. + +=item * + +NSEV and NSTA are reset to 0. + +=back + +=item 6. + +Scan forward link if necessary, set PACT FALSE, and return. + +=back =cut @@ -197,3 +549,4 @@ recordtype(compress) { interest(3) } } + diff --git a/modules/database/src/std/rec/dfanoutRecord.dbd.pod b/modules/database/src/std/rec/dfanoutRecord.dbd.pod index 0d0487666..790abdffe 100644 --- a/modules/database/src/std/rec/dfanoutRecord.dbd.pod +++ b/modules/database/src/std/rec/dfanoutRecord.dbd.pod @@ -379,11 +379,6 @@ and the DOL link, a non-zero value is returned if an error occurs. See next section. -=head2 C - -This routine fills in the members of C with the VAL fields -value and characteristics. - =head2 C The routine copies the string specified in the EGU field to the location diff --git a/modules/database/src/std/rec/eventRecord.c b/modules/database/src/std/rec/eventRecord.c index dbaef0114..c10c90240 100644 --- a/modules/database/src/std/rec/eventRecord.c +++ b/modules/database/src/std/rec/eventRecord.c @@ -199,9 +199,9 @@ static long readValue(eventRecord *prec) } prec->pact = FALSE; } else { /* !prec->pact && delay >= 0. */ - CALLBACK *pvt = prec->simpvt; + epicsCallback *pvt = prec->simpvt; if (!pvt) { - pvt = calloc(1, sizeof(CALLBACK)); /* very lazy allocation of callback structure */ + pvt = calloc(1, sizeof(epicsCallback)); /* very lazy allocation of callback structure */ prec->simpvt = pvt; } if (pvt) callbackRequestProcessCallbackDelayed(pvt, prec->prio, prec, prec->sdly); diff --git a/modules/database/src/std/rec/eventRecord.dbd b/modules/database/src/std/rec/eventRecord.dbd deleted file mode 100644 index 57306f5f5..000000000 --- a/modules/database/src/std/rec/eventRecord.dbd +++ /dev/null @@ -1,82 +0,0 @@ -#************************************************************************* -# 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 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("40 - Input") - special(SPC_MOD) - asl(ASL0) - size(40) - } - %#include "dbScan.h" - field(EPVT, DBF_NOACCESS) { - prompt("Event private") - special(SPC_NOMOD) - interest(4) - extra("EVENTPVT epvt") - } - field(INP,DBF_INLINK) { - prompt("Input Specification") - promptgroup("40 - Input") - interest(1) - } - field(SIOL,DBF_INLINK) { - prompt("Simulation Input Link") - promptgroup("90 - Simulate") - interest(1) - } - field(SVAL,DBF_STRING) { - prompt("Simulation Value") - size(40) - } - field(SIML,DBF_INLINK) { - prompt("Simulation Mode Link") - promptgroup("90 - Simulate") - interest(1) - } - field(SIMM,DBF_MENU) { - prompt("Simulation Mode") - special(SPC_MOD) - interest(1) - menu(menuYesNo) - } - field(SIMS,DBF_MENU) { - prompt("Simulation Mode Severity") - promptgroup("90 - Simulate") - interest(2) - menu(menuAlarmSevr) - } - field(OLDSIMM,DBF_MENU) { - prompt("Prev. Simulation Mode") - special(SPC_NOMOD) - interest(4) - menu(menuSimm) - } - field(SSCN,DBF_MENU) { - prompt("Sim. Mode Scan") - promptgroup("90 - Simulate") - interest(1) - menu(menuScan) - initial("65535") - } - field(SDLY,DBF_DOUBLE) { - prompt("Sim. Mode Async Delay") - promptgroup("90 - Simulate") - interest(2) - initial("-1.0") - } - %#include "callback.h" - field(SIMPVT,DBF_NOACCESS) { - prompt("Sim. Mode Private") - special(SPC_NOMOD) - interest(4) - extra("CALLBACK *simpvt") - } -} diff --git a/modules/database/src/std/rec/eventRecord.dbd.pod b/modules/database/src/std/rec/eventRecord.dbd.pod new file mode 100644 index 000000000..c783e984f --- /dev/null +++ b/modules/database/src/std/rec/eventRecord.dbd.pod @@ -0,0 +1,305 @@ +#************************************************************************* +# 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 is distributed subject to a Software License Agreement found +# in file LICENSE that is included with this distribution. +#************************************************************************* + +=title Event Record (event) + +The normal use for this record type is to post an event and/or process a +forward link. Device support for this record can provide a hardware interrupt +handler routine for I/O Event-scanned records. + +=head2 Parameter Fields + +The records in this field fall into the following groups of parameters: + +=over + +=item * + +scan parameters + +=item * + +read parameters + +=item * + +event number parameters + +=item * + +simulation mode parameters + +=back + +=recordtype event + +=cut + +recordtype(event) { + include "dbCommon.dbd" + +=head3 Scan Parameters + +The event record has the standard fields for specifying under what circumstances +it will be processed. If the SCAN field specifies C, then device +support will provide an interrupt handler, posting an event number when an I/O +interrupt occurs. These fields are listed in L. In addition, +L explains how the scanning fields work. Note that I/O +event scanning is only supported for those card types that interrupt. + +=head3 Event Number Parameters + +The VAL field contains the event number read by the device support routines. It +is this number which is posted. For records that use C device +support, it can be configured before run-time or set via dbPuts. + +=fields VAL + +=cut + + field(VAL,DBF_STRING) { + prompt("Event Name To Post") + promptgroup("40 - Input") + special(SPC_MOD) + asl(ASL0) + size(40) + } + %#include "dbScan.h" + field(EPVT, DBF_NOACCESS) { + prompt("Event private") + special(SPC_NOMOD) + interest(4) + extra("EVENTPVT epvt") + } + +=head3 Input Specification + +The device support routines use the address in this record to obtain input. For +records that provide an interrupt handler, the INP field should specify the +address of the I/O card, and the DTYP field should specify a valid device +support module. Be aware that the address format differs according to the card +type used. See L
for information on the format of +hardware addresses and specifying links. + +For soft records, the INP field can be a constant, a database link, or a channel +access link. For soft records, the DTYP field should specify C. + +=fields INP, DTYP + +=cut + + field(INP,DBF_INLINK) { + prompt("Input Specification") + promptgroup("40 - Input") + interest(1) + } + +=head3 Operator Display Parameters + +See L for more on the record name (NAME) and +description (DESC) fields. + +=fields NAME, DESC + +=head3 Alarm Parameters + +The Event record has the alarm parameters common to all record types. L lists other fields related to alarms that are common to all record +types. + +=head3 Simulation Mode Parameters + +The following fields are used to operate the event record in the simulation +mode. See L for more information on these +fields. + +=fields SIOL, SVAL, SIML, SIMM, SIMS + +=cut + + field(SIOL,DBF_INLINK) { + prompt("Sim Input Specifctn") + promptgroup("90 - Simulate") + interest(1) + } + field(SVAL,DBF_STRING) { + prompt("Simulation Value") + size(40) + } + field(SIML,DBF_INLINK) { + prompt("Sim Mode Location") + promptgroup("90 - Simulate") + interest(1) + } + field(SIMM,DBF_MENU) { + prompt("Simulation Mode") + special(SPC_MOD) + interest(1) + menu(menuYesNo) + } + field(SIMS,DBF_MENU) { + prompt("Sim mode Alarm Svrty") + promptgroup("90 - Simulate") + interest(2) + menu(menuAlarmSevr) + } + field(OLDSIMM,DBF_MENU) { + prompt("Prev. Simulation Mode") + special(SPC_NOMOD) + interest(4) + menu(menuSimm) + } + field(SSCN,DBF_MENU) { + prompt("Sim. Mode Scan") + promptgroup("90 - Simulate") + interest(1) + menu(menuScan) + initial("65535") + } + field(SDLY,DBF_DOUBLE) { + prompt("Sim. Mode Async Delay") + promptgroup("90 - Simulate") + interest(2) + initial("-1.0") + } + %#include "callback.h" + field(SIMPVT,DBF_NOACCESS) { + prompt("Sim. Mode Private") + special(SPC_NOMOD) + interest(4) + extra("epicsCallback *simpvt") + } + +=head2 Record Support + +=head3 Record Support Routines + +=head4 init_record + +This routine initializes SIMM with the value of SIML if SIML type is a CONSTANT +link or creates a channel access link if SIML type is PV_LINK. SVAL is likewise +initialized if SIOL is CONSTANT or PV_LINK. + +If device support includes C, it is called. + +=head4 process + +See next section. + +=head3 Record Processing + +Routine process implements the following algorithm: + +=over + +=item 1. + +readValue is called. See L for more information. + +=item 2. + +If PACT has been changed to TRUE, the device support read routine has started +but has not completed reading a new input value. In this case, the processing +routine merely returns, leaving PACT TRUE. + +=item 3. + +If VAL E 0, post event number VAL. + +=item 4. + +Check to see if monitors should be invoked. Alarm monitors are invoked if the +alarm status or severity has chanet to 0. + +=item 5. + +Scan forward link if necessary, set PACT FALSE, and return. + +=back + +=head2 Device Support + +=head3 Fields of Interest To Device Support + +Each record must have an associated set of device support routines. The device +support routines are primarily interested in the following fields: + +=fields PACT, DPVT, UDF, NSEV, NSTA, INP, PRIO + +=head3 Device Support Routines + +Device support consists of the following routines: + +=head4 long report(int level) + +This optional routine is called by the IOC command C and is passed the +report level that was requested by the user. +It should print a report on the state of the device support to stdout. +The C parameter may be used to output increasingly more detailed +information at higher levels, or to select different types of information with +different levels. +Level zero should print no more than a small summary. + +=head4 long init(int after) + +This optional routine is called twice at IOC initialization time. +The first call happens before any of the C calls are made, with +the integer parameter C set to 0. +The second call happens after all of the C calls have been made, +with C set to 1. + +=head4 init_record + + init_record(precord) + +This routine is optional. If provided, it is called by the record support +C routine. + +=head4 get_ioint_info + + get_ioint_info(int cmd, struct dbCommon *precord, IOSCANPVT *ppvt) + +This routine is called by the ioEventScan system each time the record is added +or deleted from an I/O event scan list. cmd has the value (0,1) if the record is +being (added to, deleted from) an I/O event list. It must be provided for any +device type that can use the ioEvent scanner. + +=head4 read_event + + read_event(precord) + +This routine returns the following values: + +=over + +=item * + +0: Success. + +=item * + +Other: Error. + +=back + +=head3 Device Support For Soft Records + +The C device support module is available. The INP link type must +be either CONSTANT, DB_LINK, or CA_LINK. + +If the INP link type is CONSTANT, then the constant value is stored into VAL by +C, and UDF is set to FALSE. If the INP link type is PV_LINK, then +dbCaAddInlink is called by C. + +C calls recGblGetLinkValue to read the current value of VAL. See +L for details on soft input. + +=cut + +} diff --git a/modules/database/src/std/rec/fanoutRecord.dbd b/modules/database/src/std/rec/fanoutRecord.dbd deleted file mode 100644 index 251d63a11..000000000 --- a/modules/database/src/std/rec/fanoutRecord.dbd +++ /dev/null @@ -1,129 +0,0 @@ -#************************************************************************* -# Copyright (c) 2012 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. -#************************************************************************* -menu(fanoutSELM) { - choice(fanoutSELM_All,"All") - choice(fanoutSELM_Specified,"Specified") - choice(fanoutSELM_Mask,"Mask") -} -recordtype(fanout) { - include "dbCommon.dbd" - field(VAL,DBF_LONG) { - prompt("Used to trigger") - asl(ASL0) - pp(TRUE) - } - field(SELM,DBF_MENU) { - prompt("Select Mechanism") - promptgroup("30 - Action") - interest(1) - menu(fanoutSELM) - } - 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(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") - } - field(LNK0,DBF_FWDLINK) { - prompt("Forward Link 0") - promptgroup("51 - Output 0-7") - interest(1) - } - field(LNK1,DBF_FWDLINK) { - prompt("Forward Link 1") - promptgroup("51 - Output 0-7") - interest(1) - } - field(LNK2,DBF_FWDLINK) { - prompt("Forward Link 2") - promptgroup("51 - Output 0-7") - interest(1) - } - field(LNK3,DBF_FWDLINK) { - prompt("Forward Link 3") - promptgroup("51 - Output 0-7") - interest(1) - } - field(LNK4,DBF_FWDLINK) { - prompt("Forward Link 4") - promptgroup("51 - Output 0-7") - interest(1) - } - field(LNK5,DBF_FWDLINK) { - prompt("Forward Link 5") - promptgroup("51 - Output 0-7") - interest(1) - } - field(LNK6,DBF_FWDLINK) { - prompt("Forward Link 6") - promptgroup("51 - Output 0-7") - interest(1) - } - field(LNK7,DBF_FWDLINK) { - prompt("Forward Link 7") - promptgroup("51 - Output 0-7") - interest(1) - } - field(LNK8,DBF_FWDLINK) { - prompt("Forward Link 8") - promptgroup("52 - Output 8-F") - interest(1) - } - field(LNK9,DBF_FWDLINK) { - prompt("Forward Link 9") - promptgroup("52 - Output 8-F") - interest(1) - } - field(LNKA,DBF_FWDLINK) { - prompt("Forward Link 10") - promptgroup("52 - Output 8-F") - interest(1) - } - field(LNKB,DBF_FWDLINK) { - prompt("Forward Link 11") - promptgroup("52 - Output 8-F") - interest(1) - } - field(LNKC,DBF_FWDLINK) { - prompt("Forward Link 12") - promptgroup("52 - Output 8-F") - interest(1) - } - field(LNKD,DBF_FWDLINK) { - prompt("Forward Link 13") - promptgroup("52 - Output 8-F") - interest(1) - } - field(LNKE,DBF_FWDLINK) { - prompt("Forward Link 14") - promptgroup("52 - Output 8-F") - interest(1) - } - field(LNKF,DBF_FWDLINK) { - prompt("Forward Link 15") - promptgroup("52 - Output 8-F") - interest(1) - } -} diff --git a/modules/database/src/std/rec/fanoutRecord.dbd.pod b/modules/database/src/std/rec/fanoutRecord.dbd.pod new file mode 100644 index 000000000..11a9ad32e --- /dev/null +++ b/modules/database/src/std/rec/fanoutRecord.dbd.pod @@ -0,0 +1,314 @@ +#************************************************************************* +# Copyright (c) 2012 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. +#************************************************************************* + +=title Fanout Record (fanout) + +The fanout record uses several forward processing links to force multiple +passive records to scan. When more than one record needs to be scanned as the +result of a record being processed, the forward link of that record can specify +a fanout record. The fanout record can specify up to sixteen other records to +process. If more than sixteen are needed, one of the forward links in the fanout +record (or its FLNK field) can point to another fanout record. + +B The dfanout or +data fanout record can, on the other hand, send data to other records. + +=head2 Parameter Fields + +The fanout record's fields fall into the following categories: + +=over + +=item * + +scan parameters + +=item * + +operator display parameters + +=item * + +run-time parameters. + +=back + +=recordtype fanout + +=cut + +menu(fanoutSELM) { + choice(fanoutSELM_All,"All") + choice(fanoutSELM_Specified,"Specified") + choice(fanoutSELM_Mask,"Mask") +} + +recordtype(fanout) { + include "dbCommon.dbd" + +=head3 Scan Parameters + +The forward link fields of the fanout record (LNK0-LNK9, LNKA-LNKF) specify +records to be scanned. The records to be processed must specify C in +their SCAN fields; otherwise the forward link will not cause them to process. +Also when specifying database links for the fanout record, the user needs only +to specify the record name. As no value is being sent or retrieved, a field name +is only required when the link will be over Channel Access, in which case the +field PROC must be named. + +The SELM, SELN, and SELL fields specify the order of processing for the forward +links. The select mechanism menu field (SELM) has three choices: + +=menu fanoutSELM + +How the SELM value affects which links to process and in which order is as +follows: + +=over + +=item * + +B +Links are processed in numerical order - LNK0, LNK1, etc. + +=item * + +B The sum of the values in the SELN and OFFS fields is used as the +specifier of which link to process. For instance, with OFFS=0 and SELN=1, the +record targeted by LNK1 will be processed. + +=item * + +B The individual bits in SELN are shifted by SHFT bits (negative means +shift left) and the result used to select which links to process as follows: + +=over + +=item * + +If bit 0 (LSB) is set, LNK0 is processed. + +=item * + +If bit 1 is set, LNK2 is processed. + +=item * + +If bit 2 is set, LNK3 is processed, etc. + +=back + +=back + +SELN reads its value from SELL. SELL can be a constant, a database link, or a +channel access link. If a constant, SELN is initialized with the constant value +and can be changed via dbPuts. For database/channel access links, SELN is +retrieved from SELL each time the record is processed and can also be changed +via dbPuts. + +The Fanout record also has the standard scanning fields common to all records. +These fields are listed in L. In addition, +L explains in more detail how forward links and the +scanning algorithms work. + +=fields SELM, SELN, SELL, OFFS, SHFT, LNK0, LNK1, LNK2, LNK3, LNK4, LNK5, LNK6, LNK7, LNK8, LNK9, LNKA, LNKB, LNKC, LNKD, LNKE, LNKF + +=cut + + field(VAL,DBF_LONG) { + prompt("Used to trigger") + asl(ASL0) + pp(TRUE) + } + field(SELM,DBF_MENU) { + prompt("Select Mechanism") + promptgroup("30 - Action") + interest(1) + menu(fanoutSELM) + } + 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(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") + } + field(LNK0,DBF_FWDLINK) { + prompt("Forward Link 0") + promptgroup("51 - Output 0-7") + interest(1) + } + field(LNK1,DBF_FWDLINK) { + prompt("Forward Link 1") + promptgroup("51 - Output 0-7") + interest(1) + } + field(LNK2,DBF_FWDLINK) { + prompt("Forward Link 2") + promptgroup("51 - Output 0-7") + interest(1) + } + field(LNK3,DBF_FWDLINK) { + prompt("Forward Link 3") + promptgroup("51 - Output 0-7") + interest(1) + } + field(LNK4,DBF_FWDLINK) { + prompt("Forward Link 4") + promptgroup("51 - Output 0-7") + interest(1) + } + field(LNK5,DBF_FWDLINK) { + prompt("Forward Link 5") + promptgroup("51 - Output 0-7") + interest(1) + } + field(LNK6,DBF_FWDLINK) { + prompt("Forward Link 6") + promptgroup("51 - Output 0-7") + interest(1) + } + field(LNK7,DBF_FWDLINK) { + prompt("Forward Link 7") + promptgroup("51 - Output 0-7") + interest(1) + } + field(LNK8,DBF_FWDLINK) { + prompt("Forward Link 8") + promptgroup("52 - Output 8-F") + interest(1) + } + field(LNK9,DBF_FWDLINK) { + prompt("Forward Link 9") + promptgroup("52 - Output 8-F") + interest(1) + } + field(LNKA,DBF_FWDLINK) { + prompt("Forward Link 10") + promptgroup("52 - Output 8-F") + interest(1) + } + field(LNKB,DBF_FWDLINK) { + prompt("Forward Link 11") + promptgroup("52 - Output 8-F") + interest(1) + } + field(LNKC,DBF_FWDLINK) { + prompt("Forward Link 12") + promptgroup("52 - Output 8-F") + interest(1) + } + field(LNKD,DBF_FWDLINK) { + prompt("Forward Link 13") + promptgroup("52 - Output 8-F") + interest(1) + } + field(LNKE,DBF_FWDLINK) { + prompt("Forward Link 14") + promptgroup("52 - Output 8-F") + interest(1) + } + field(LNKF,DBF_FWDLINK) { + prompt("Forward Link 15") + promptgroup("52 - Output 8-F") + interest(1) + } + +=head3 Operator Display Parameters + +These parameters are used to present meaningful data to the operator. See +L for more on these fields. + +=fields NAME, DESC + +=head3 Alarm Parameters + +The Fanout record has the alarm parameters common to all record types. +L lists other fields related to a alarms that are common to all +record types. + +=head3 Run-time Parameters + +The VAL field performs no specific function, but a Channel Access put to it will +cause the record to process. + +=fields VAL + +=head2 Record Support + +=head3 Record Support Routines + +=head4 init_record + +This routine initializes SELN with the value of SELL, if SELL type is CONSTANT +link, or creates a channel access link if SELL type is PV_LINK. + +=head4 process + +See next section. + +=head3 Record Processing + +Routine process implements the following algorithm: + +=over + +=item 1. + +PACT is set to TRUE. + +=item 2. + +The link selection SELN is fetched. + +=item 3. + +Depending on the selection mechanism, the link selection forward links are +processed, and UDF is set to FALSE. + +=item 4. + +Check to see if monitors should be invoked: + +=over + +=item * + +Alarm monitors are invoked if the alarm status or severity has changed. + +=item * + +NSEV and NSTA are reset to 0. + +=back + +=item 5. + +Scan forward link field FLNK if used, set PACT FALSE, and return. + +=back + +=cut + +} diff --git a/modules/database/src/std/rec/histogramRecord.c b/modules/database/src/std/rec/histogramRecord.c index cac81ffd0..82fc91a68 100644 --- a/modules/database/src/std/rec/histogramRecord.c +++ b/modules/database/src/std/rec/histogramRecord.c @@ -100,7 +100,7 @@ struct histogramdset { /* histogram input dset */ /* control block for callback*/ typedef struct myCallback { - CALLBACK callback; + epicsCallback callback; histogramRecord *prec; } myCallback; @@ -110,7 +110,7 @@ static void monitor(histogramRecord *); static long readValue(histogramRecord *); -static void wdogCallback(CALLBACK *arg) +static void wdogCallback(epicsCallback *arg) { myCallback *pcallback; histogramRecord *prec; @@ -403,9 +403,9 @@ static long readValue(histogramRecord *prec) } prec->pact = FALSE; } else { /* !prec->pact && delay >= 0. */ - CALLBACK *pvt = prec->simpvt; + epicsCallback *pvt = prec->simpvt; if (!pvt) { - pvt = calloc(1, sizeof(CALLBACK)); /* very lazy allocation of callback structure */ + pvt = calloc(1, sizeof(epicsCallback)); /* very lazy allocation of callback structure */ prec->simpvt = pvt; } if (pvt) callbackRequestProcessCallbackDelayed(pvt, prec->prio, prec, prec->sdly); diff --git a/modules/database/src/std/rec/histogramRecord.dbd b/modules/database/src/std/rec/histogramRecord.dbd index 545ae3fcc..304038bf1 100644 --- a/modules/database/src/std/rec/histogramRecord.dbd +++ b/modules/database/src/std/rec/histogramRecord.dbd @@ -154,7 +154,7 @@ recordtype(histogram) { prompt("Sim. Mode Private") special(SPC_NOMOD) interest(4) - extra("CALLBACK *simpvt") + extra("epicsCallback *simpvt") } field(HOPR,DBF_ULONG) { prompt("High Operating Range") diff --git a/modules/database/src/std/rec/image/compress-1.png b/modules/database/src/std/rec/image/compress-1.png new file mode 100644 index 000000000..3001ce9f5 Binary files /dev/null and b/modules/database/src/std/rec/image/compress-1.png differ diff --git a/modules/database/src/std/rec/image/compress-2.png b/modules/database/src/std/rec/image/compress-2.png new file mode 100644 index 000000000..5ce46e041 Binary files /dev/null and b/modules/database/src/std/rec/image/compress-2.png differ diff --git a/modules/database/src/std/rec/int64inRecord.c b/modules/database/src/std/rec/int64inRecord.c index c76d96c67..8ce241000 100644 --- a/modules/database/src/std/rec/int64inRecord.c +++ b/modules/database/src/std/rec/int64inRecord.c @@ -420,9 +420,9 @@ static long readValue(int64inRecord *prec) } prec->pact = FALSE; } else { /* !prec->pact && delay >= 0. */ - CALLBACK *pvt = prec->simpvt; + epicsCallback *pvt = prec->simpvt; if (!pvt) { - pvt = calloc(1, sizeof(CALLBACK)); /* very lazy allocation of callback structure */ + pvt = calloc(1, sizeof(epicsCallback)); /* very lazy allocation of callback structure */ prec->simpvt = pvt; } if (pvt) callbackRequestProcessCallbackDelayed(pvt, prec->prio, prec, prec->sdly); diff --git a/modules/database/src/std/rec/int64inRecord.dbd.pod b/modules/database/src/std/rec/int64inRecord.dbd.pod index c85992f05..edb19a73f 100644 --- a/modules/database/src/std/rec/int64inRecord.dbd.pod +++ b/modules/database/src/std/rec/int64inRecord.dbd.pod @@ -313,7 +313,7 @@ simulation mode. prompt("Sim. Mode Private") special(SPC_NOMOD) interest(4) - extra("CALLBACK *simpvt") + extra("epicsCallback *simpvt") } } diff --git a/modules/database/src/std/rec/int64outRecord.c b/modules/database/src/std/rec/int64outRecord.c index da5a76d8f..e9170f9a9 100644 --- a/modules/database/src/std/rec/int64outRecord.c +++ b/modules/database/src/std/rec/int64outRecord.c @@ -396,9 +396,9 @@ static long writeValue(int64outRecord *prec) status = dbPutLink(&prec->siol, DBR_INT64, &prec->val, 1); prec->pact = FALSE; } else { /* !prec->pact && delay >= 0. */ - CALLBACK *pvt = prec->simpvt; + epicsCallback *pvt = prec->simpvt; if (!pvt) { - pvt = calloc(1, sizeof(CALLBACK)); /* very lazy allocation of callback structure */ + pvt = calloc(1, sizeof(epicsCallback)); /* very lazy allocation of callback structure */ prec->simpvt = pvt; } if (pvt) callbackRequestProcessCallbackDelayed(pvt, prec->prio, prec, prec->sdly); diff --git a/modules/database/src/std/rec/int64outRecord.dbd.pod b/modules/database/src/std/rec/int64outRecord.dbd.pod index f76541489..1b5003efe 100644 --- a/modules/database/src/std/rec/int64outRecord.dbd.pod +++ b/modules/database/src/std/rec/int64outRecord.dbd.pod @@ -350,7 +350,7 @@ simulation mode. prompt("Sim. Mode Private") special(SPC_NOMOD) interest(4) - extra("CALLBACK *simpvt") + extra("epicsCallback *simpvt") } =head3 Invalid Alarm Output Action diff --git a/modules/database/src/std/rec/longinRecord.c b/modules/database/src/std/rec/longinRecord.c index f72ac9137..d52464137 100644 --- a/modules/database/src/std/rec/longinRecord.c +++ b/modules/database/src/std/rec/longinRecord.c @@ -428,9 +428,9 @@ static long readValue(longinRecord *prec) } prec->pact = FALSE; } else { /* !prec->pact && delay >= 0. */ - CALLBACK *pvt = prec->simpvt; + epicsCallback *pvt = prec->simpvt; if (!pvt) { - pvt = calloc(1, sizeof(CALLBACK)); /* very lazy allocation of callback structure */ + pvt = calloc(1, sizeof(epicsCallback)); /* very lazy allocation of callback structure */ prec->simpvt = pvt; } if (pvt) callbackRequestProcessCallbackDelayed(pvt, prec->prio, prec, prec->sdly); diff --git a/modules/database/src/std/rec/longinRecord.dbd b/modules/database/src/std/rec/longinRecord.dbd deleted file mode 100644 index f0e5a8de5..000000000 --- a/modules/database/src/std/rec/longinRecord.dbd +++ /dev/null @@ -1,188 +0,0 @@ -#************************************************************************* -# 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 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("40 - Input") - asl(ASL0) - pp(TRUE) - } - field(INP,DBF_INLINK) { - prompt("Input Specification") - promptgroup("40 - Input") - interest(1) - } - field(EGU,DBF_STRING) { - prompt("Engineering Units") - promptgroup("80 - Display") - interest(1) - size(16) - prop(YES) - } - field(HOPR,DBF_LONG) { - prompt("High Operating Range") - promptgroup("80 - Display") - interest(1) - prop(YES) - } - field(LOPR,DBF_LONG) { - prompt("Low Operating Range") - promptgroup("80 - Display") - interest(1) - prop(YES) - } - field(HIHI,DBF_LONG) { - prompt("Hihi Alarm Limit") - promptgroup("70 - Alarm") - pp(TRUE) - interest(1) - prop(YES) - } - field(LOLO,DBF_LONG) { - prompt("Lolo Alarm Limit") - promptgroup("70 - Alarm") - pp(TRUE) - interest(1) - prop(YES) - } - field(HIGH,DBF_LONG) { - prompt("High Alarm Limit") - promptgroup("70 - Alarm") - pp(TRUE) - interest(1) - prop(YES) - } - field(LOW,DBF_LONG) { - prompt("Low Alarm Limit") - promptgroup("70 - Alarm") - pp(TRUE) - interest(1) - prop(YES) - } - field(HHSV,DBF_MENU) { - prompt("Hihi Severity") - promptgroup("70 - Alarm") - pp(TRUE) - interest(1) - menu(menuAlarmSevr) - } - field(LLSV,DBF_MENU) { - prompt("Lolo Severity") - promptgroup("70 - Alarm") - pp(TRUE) - interest(1) - menu(menuAlarmSevr) - } - field(HSV,DBF_MENU) { - prompt("High Severity") - promptgroup("70 - Alarm") - pp(TRUE) - interest(1) - menu(menuAlarmSevr) - } - field(LSV,DBF_MENU) { - prompt("Low Severity") - promptgroup("70 - Alarm") - pp(TRUE) - interest(1) - menu(menuAlarmSevr) - } - field(HYST,DBF_LONG) { - prompt("Alarm Deadband") - promptgroup("70 - Alarm") - interest(1) - } - 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(ADEL,DBF_LONG) { - prompt("Archive Deadband") - promptgroup("80 - Display") - interest(1) - } - field(MDEL,DBF_LONG) { - prompt("Monitor Deadband") - promptgroup("80 - Display") - interest(1) - } - field(LALM,DBF_LONG) { - prompt("Last Value Alarmed") - special(SPC_NOMOD) - interest(3) - } - field(ALST,DBF_LONG) { - prompt("Last Value Archived") - special(SPC_NOMOD) - interest(3) - } - field(MLST,DBF_LONG) { - prompt("Last Val Monitored") - special(SPC_NOMOD) - interest(3) - } - field(SIOL,DBF_INLINK) { - prompt("Simulation Input Link") - promptgroup("90 - Simulate") - interest(1) - } - field(SVAL,DBF_LONG) { - prompt("Simulation Value") - } - field(SIML,DBF_INLINK) { - prompt("Simulation Mode Link") - promptgroup("90 - Simulate") - interest(1) - } - field(SIMM,DBF_MENU) { - prompt("Simulation Mode") - special(SPC_MOD) - interest(1) - menu(menuYesNo) - } - field(SIMS,DBF_MENU) { - prompt("Simulation Mode Severity") - promptgroup("90 - Simulate") - interest(2) - menu(menuAlarmSevr) - } - field(OLDSIMM,DBF_MENU) { - prompt("Prev. Simulation Mode") - special(SPC_NOMOD) - interest(4) - menu(menuSimm) - } - field(SSCN,DBF_MENU) { - prompt("Sim. Mode Scan") - promptgroup("90 - Simulate") - interest(1) - menu(menuScan) - initial("65535") - } - field(SDLY,DBF_DOUBLE) { - prompt("Sim. Mode Async Delay") - promptgroup("90 - Simulate") - interest(2) - initial("-1.0") - } - %#include "callback.h" - field(SIMPVT,DBF_NOACCESS) { - prompt("Sim. Mode Private") - special(SPC_NOMOD) - interest(4) - extra("CALLBACK *simpvt") - } -} diff --git a/modules/database/src/std/rec/longinRecord.dbd.pod b/modules/database/src/std/rec/longinRecord.dbd.pod new file mode 100644 index 000000000..20f236b7d --- /dev/null +++ b/modules/database/src/std/rec/longinRecord.dbd.pod @@ -0,0 +1,555 @@ +#************************************************************************* +# 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 is distributed subject to a Software License Agreement found +# in file LICENSE that is included with this distribution. +#************************************************************************* + +=head1 Long Input Record (longin) + +The normal use for the long input record or "longin" record is to retrieve a +long integer value of up to 32 bits. Device support routines are provided to +support direct interfaces to hardware. In addition, the C<<< Soft Channel >>> +device module is provided to obtain input via database or channel access links +or via dbPutField or dbPutLink requests. + +=head1 Contents + +=over + +=item * L + +=over + +=item * L + +=item * L + +=item * L + +=item * L + +=item * L + +=back + +=item * L + +=over + +=item * L + +=item * L + +=back + +=item * L + +=over + +=item * L + +=item * L + +=item * L + +=back + +=back + +=begin html + +


+ +=end html + +=recordtype longin + +=cut + +recordtype(longin) { + +=head2 Parameter Fields + +The fields in this record fall into the following categories: + +=over + +=item * L + +=item * L + +=item * L + +=item * L + +=item * L + +=back + +=head3 Scan Parameters + +The long input record has the standard fields for specifying under what +circumstances the record will be processed. These fields are listed in L. In addition, L explains how these fields are +used. Note that I/O event scanning is only supported for those card types +that interrupt. + +=head3 Read Parameters + +The device support routines use the INP field to obtain the record's input. For +records that obtain their input from devices, the INP field must contain the +address of the I/O card, and the DTYP field must specify the proper device +support module. Be aware that the address format differs according to the +I/O bus used. + +For soft records, the INP can be a constant, a database link, or a channel +access link. The value is read directly into VAL. The C<<< Soft Channel >>> +device support module is available for longin records. See L
for information on the format of hardware addresses and a +database links. + +=fields VAL, INP, DTYP + +=head3 Operator Display Parameters + +These parameters are used to present meaningful data to the operator. These +fields are used to display the value and other parameters of the long input +either textually or graphically. + +EGU is a string of up to 16 characters describing the units that the long input +measures. It is retrieved by the C<<< get_units >>> record support routine. + +The HOPR and LOPR fields set the upper and lower display limits for the VAL, +HIHI, HIGH, LOW, and LOLO fields. Both the C<<< get_graphic_double >>> and C<<< +get_control_double >>> record support routines retrieve these fields. + +See L for more on the record name (NAME) and +description (DESC) fields. + +=fields EGU, HOPR, LOPR, NAME, DESC + +=head3 Alarm Parameters + +The possible alarm conditions for long inputs are the SCAN, READ, and limit +alarms. The SCAN and READ alarms are called by the record or device support +routines. + +The limit alarms are configured by the user in the HIHI, LOLO, HIGH, and LOW +fields using numerical values. For each of these fields, there is a +corresponding severity field which can be either NO_ALARM, MINOR, or MAJOR. The +HYST field can be used to specify a deadband around each limit. See L for a complete explanation of alarms and these fields. L lists other fields related to a alarms that are common to all record +types. + +=fields HIHI, HIGH, LOW, LOLO, HHSV, HSV, LSV, LLSV, HYST + +=head3 Monitor Parameters + +These parameters are used to determine when to send monitors placed on the value +field. The monitors are sent when the value field exceeds the last monitored +field (see the next section) by the appropriate deadband. If these fields have a +value of zero, everytime the value changes, a monitor will be triggered; if they +have a value of -1, everytime the record is scanned, monitors are triggered. The +ADEL field is used by archive monitors and the MDEL field for all other types of +monitors. See L for a complete explanation of monitors. + +=fields ADEL, MDEL + +=head3 Run-time and Simulation Mode Parameters + +The LALM, MLST, and ALST fields are used to implement the hysteresis factors for +monitor callbacks. Only if the difference between these fields and the +corresponding value field is greater than the appropriate delta (MDEL, ADEL, +HYST)--only then are monitors triggered. For instance, only if the difference +between VAL and MLST is greater than MDEL are the monitors triggered for VAL. + +=fields LALM, ALST, MLST + +The following fields are used to operate the long input in the simulation mode. +See L for more information on these fields. + +=fields SIOL, SVAL, SIML, SIMM, SIMS + +=begin html + +


+ +=end html + +=head2 Record Support + +=head3 Record Support Routines + +=head4 init_record + +This routine initializes SIMM with the value of SIML if SIML type is CONSTANT +link or creates a channel access link if SIML type is PV_LINK. SVAL is likewise +initialized if SIOL is CONSTANT or PV_LINK. + +This routine next checks to see that device support is available and a device +support read routine is defined. If either does not exist, an error message is +issued and processing is terminated. + +If device support includes C, it is called. + +=head4 process + +See next section. + +=head4 get_units + +Retrieves EGU. + +=head4 get_graphic_double + +Sets the upper display and lower display limits for a field. If the field is +VAL, HIHI, HIGH, LOW, or LOLO, the limits are set to HOPR and LOPR, else if the +field has upper and lower limits defined they will be used, else the upper and +lower maximum values for the field type will be used. + +=head4 get_control_double + +Sets the upper control and the lower control limits for a field. If the field is +VAL, HIHI, HIGH, LOW, or LOLO, the limits are set to HOPR and LOPR, else if the +field has upper and lower limits defined they will be used, else the upper and +lower maximum values for the field type will be used. + +=head4 get_alarm_double + +Sets the following values: + + upper_alarm_limit = HIHI + upper_warning_limit = HIGH + lower_warning_limit = LOW + lower_alarm_limit = LOLO + +=head3 Record Processing + +Routine process implements the following algorithm: + +=over + +=item 1. + +Check to see that the appropriate device support module exists. If it doesn't, +an error message is issued and processing is terminated with the PACT field +still set to TRUE. This ensures that processes will no longer be called for this +record. Thus error storms will not occur. + +=item 2. + +readValue is called. See L for more information. + +=item 3. + +If PACT has been changed to TRUE, the device support read routine has started +but has not completed reading a new input value. In this case, the processing +routine merely returns, leaving PACT TRUE. + +=item 4. + +Check alarms. This routine checks to see if the new VAL causes the alarm status +and severity to change. If so, NSEV, NSTA and LALM are set. It also honors the +alarm hysteresis factor (HYST). Thus the value must change by more than HYST +before the alarm status and severity is lowered. + +=item 5. + +Check to see if monitors should be invoked: + +=over + +=item * + +Alarm monitors are invoked if the alarm status or severity has changed. + +=item * + +Archive and value change monitors are invoked if ADEL and MDEL conditions are +met. + +=item * + +NSEV and NSTA are reset to 0. + +=back + +=item 6. + +Scan forward link if necessary, set PACT FALSE, and return. + +=back + +=begin html + +


+ +=end html + +=head2 Device Support + +=head3 Fields Of Interest To Device Support + +Each long input record must have an associated set of device support routines. +The primary responsibility of the device support routines is to obtain a new +input value whenever read_longin is called. The device support routines are +primarily interested in the following fields: + +=fields PACT, DPVT, UDF, NSEV, NSTA, VAL, INP + +=head3 Device Support Routines + +Device support consists of the following routines: + +=head4 long report(int level) + +This optional routine is called by the IOC command C and is passed the +report level that was requested by the user. +It should print a report on the state of the device support to stdout. +The C parameter may be used to output increasingly more detailed +information at higher levels, or to select different types of information with +different levels. +Level zero should print no more than a small summary. + +=head4 long init(int after) + +This optional routine is called twice at IOC initialization time. +The first call happens before any of the C calls are made, with +the integer parameter C set to 0. +The second call happens after all of the C calls have been made, +with C set to 1. + +=head4 init_record + + init_record(precord) + +This routine is optional. If provided, it is called by the record support +C routine. + +=head4 get_ioint_info + + get_ioint_info(int cmd,struct dbCommon *precord,IOSCANPVT *ppvt) + +This routine is called by the ioEventScan system each time the record is added +or deleted from an I/O event scan list. cmd has the value (0,1) if the +record is being (added to, deleted from) an I/O event list. It must be +provided for any device type that can use the ioEvent scanner. + +=head4 read_longin + + read_longin(precord) + +This routine must provide a new input value. It returns the following values: + +=over + +=item * + +0: Success. A new value is placed in VAL. + +=item * + +Other: Error. + +=back + +=head3 Device Support For Soft Records + +The C<<< Soft Channel >>> device support module places a value directly in VAL. + +If the INP link type is constant, then the constant value is stored into VAL by +C, and UDF is set to FALSE. If the INP link type is PV_LINK, then +dbCaAddInlink is called by C. + +C<<< read_longin >>> calls recGblGetLinkValue to read the current value of VAL. +See L for more information + +If the return status of C<<< recGblGetLinkValue >>> is zero then read_longin +sets UDF to FALSE. read_longin returns the status of C. + + +=cut + + include "dbCommon.dbd" + field(VAL,DBF_LONG) { + prompt("Current value") + promptgroup("40 - Input") + asl(ASL0) + pp(TRUE) + } + field(INP,DBF_INLINK) { + prompt("Input Specification") + promptgroup("40 - Input") + interest(1) + } + field(EGU,DBF_STRING) { + prompt("Engineering Units") + promptgroup("80 - Display") + interest(1) + size(16) + prop(YES) + } + field(HOPR,DBF_LONG) { + prompt("High Operating Range") + promptgroup("80 - Display") + interest(1) + prop(YES) + } + field(LOPR,DBF_LONG) { + prompt("Low Operating Range") + promptgroup("80 - Display") + interest(1) + prop(YES) + } + field(HIHI,DBF_LONG) { + prompt("Hihi Alarm Limit") + promptgroup("70 - Alarm") + pp(TRUE) + interest(1) + prop(YES) + } + field(LOLO,DBF_LONG) { + prompt("Lolo Alarm Limit") + promptgroup("70 - Alarm") + pp(TRUE) + interest(1) + prop(YES) + } + field(HIGH,DBF_LONG) { + prompt("High Alarm Limit") + promptgroup("70 - Alarm") + pp(TRUE) + interest(1) + prop(YES) + } + field(LOW,DBF_LONG) { + prompt("Low Alarm Limit") + promptgroup("70 - Alarm") + pp(TRUE) + interest(1) + prop(YES) + } + field(HHSV,DBF_MENU) { + prompt("Hihi Severity") + promptgroup("70 - Alarm") + pp(TRUE) + interest(1) + menu(menuAlarmSevr) + } + field(LLSV,DBF_MENU) { + prompt("Lolo Severity") + promptgroup("70 - Alarm") + pp(TRUE) + interest(1) + menu(menuAlarmSevr) + } + field(HSV,DBF_MENU) { + prompt("High Severity") + promptgroup("70 - Alarm") + pp(TRUE) + interest(1) + menu(menuAlarmSevr) + } + field(LSV,DBF_MENU) { + prompt("Low Severity") + promptgroup("70 - Alarm") + pp(TRUE) + interest(1) + menu(menuAlarmSevr) + } + field(HYST,DBF_LONG) { + prompt("Alarm Deadband") + promptgroup("70 - Alarm") + interest(1) + } + 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(ADEL,DBF_LONG) { + prompt("Archive Deadband") + promptgroup("80 - Display") + interest(1) + } + field(MDEL,DBF_LONG) { + prompt("Monitor Deadband") + promptgroup("80 - Display") + interest(1) + } + field(LALM,DBF_LONG) { + prompt("Last Value Alarmed") + special(SPC_NOMOD) + interest(3) + } + field(ALST,DBF_LONG) { + prompt("Last Value Archived") + special(SPC_NOMOD) + interest(3) + } + field(MLST,DBF_LONG) { + prompt("Last Val Monitored") + special(SPC_NOMOD) + interest(3) + } + field(SIOL,DBF_INLINK) { + prompt("Sim Input Specifctn") + promptgroup("90 - Simulate") + interest(1) + } + field(SVAL,DBF_LONG) { + prompt("Simulation Value") + } + field(SIML,DBF_INLINK) { + prompt("Sim Mode Location") + promptgroup("90 - Simulate") + interest(1) + } + field(SIMM,DBF_MENU) { + prompt("Simulation Mode") + special(SPC_MOD) + interest(1) + menu(menuYesNo) + } + field(SIMS,DBF_MENU) { + prompt("Sim mode Alarm Svrty") + promptgroup("90 - Simulate") + interest(2) + menu(menuAlarmSevr) + } + field(OLDSIMM,DBF_MENU) { + prompt("Prev. Simulation Mode") + special(SPC_NOMOD) + interest(4) + menu(menuSimm) + } + field(SSCN,DBF_MENU) { + prompt("Sim. Mode Scan") + promptgroup("90 - Simulate") + interest(1) + menu(menuScan) + initial("65535") + } + field(SDLY,DBF_DOUBLE) { + prompt("Sim. Mode Async Delay") + promptgroup("90 - Simulate") + interest(2) + initial("-1.0") + } + %#include "callback.h" + field(SIMPVT,DBF_NOACCESS) { + prompt("Sim. Mode Private") + special(SPC_NOMOD) + interest(4) + extra("epicsCallback *simpvt") + } +} diff --git a/modules/database/src/std/rec/longoutRecord.c b/modules/database/src/std/rec/longoutRecord.c index 5e13e09b9..06e3b6e21 100644 --- a/modules/database/src/std/rec/longoutRecord.c +++ b/modules/database/src/std/rec/longoutRecord.c @@ -401,9 +401,9 @@ static long writeValue(longoutRecord *prec) status = dbPutLink(&prec->siol, DBR_LONG, &prec->val, 1); prec->pact = FALSE; } else { /* !prec->pact && delay >= 0. */ - CALLBACK *pvt = prec->simpvt; + epicsCallback *pvt = prec->simpvt; if (!pvt) { - pvt = calloc(1, sizeof(CALLBACK)); /* very lazy allocation of callback structure */ + pvt = calloc(1, sizeof(epicsCallback)); /* very lazy allocation of callback structure */ prec->simpvt = pvt; } if (pvt) callbackRequestProcessCallbackDelayed(pvt, prec->prio, prec, prec->sdly); diff --git a/modules/database/src/std/rec/longoutRecord.dbd b/modules/database/src/std/rec/longoutRecord.dbd deleted file mode 100644 index 626be1645..000000000 --- a/modules/database/src/std/rec/longoutRecord.dbd +++ /dev/null @@ -1,211 +0,0 @@ -#************************************************************************* -# 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 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("50 - Output") - asl(ASL0) - pp(TRUE) - } - field(OUT,DBF_OUTLINK) { - prompt("Output Specification") - promptgroup("50 - Output") - interest(1) - } - field(DOL,DBF_INLINK) { - prompt("Desired Output Loc") - promptgroup("40 - Input") - interest(1) - } - field(OMSL,DBF_MENU) { - prompt("Output Mode Select") - promptgroup("50 - Output") - interest(1) - menu(menuOmsl) - } - field(EGU,DBF_STRING) { - prompt("Engineering Units") - promptgroup("80 - Display") - interest(1) - size(16) - prop(YES) - } - field(DRVH,DBF_LONG) { - prompt("Drive High Limit") - promptgroup("30 - Action") - pp(TRUE) - interest(1) - prop(YES) - } - field(DRVL,DBF_LONG) { - prompt("Drive Low Limit") - promptgroup("30 - Action") - pp(TRUE) - interest(1) - prop(YES) - } - field(HOPR,DBF_LONG) { - prompt("High Operating Range") - promptgroup("80 - Display") - interest(1) - prop(YES) - } - field(LOPR,DBF_LONG) { - prompt("Low Operating Range") - promptgroup("80 - Display") - interest(1) - prop(YES) - } - field(HIHI,DBF_LONG) { - prompt("Hihi Alarm Limit") - promptgroup("70 - Alarm") - pp(TRUE) - interest(1) - prop(YES) - } - field(LOLO,DBF_LONG) { - prompt("Lolo Alarm Limit") - promptgroup("70 - Alarm") - pp(TRUE) - interest(1) - prop(YES) - } - field(HIGH,DBF_LONG) { - prompt("High Alarm Limit") - promptgroup("70 - Alarm") - pp(TRUE) - interest(1) - prop(YES) - } - field(LOW,DBF_LONG) { - prompt("Low Alarm Limit") - promptgroup("70 - Alarm") - pp(TRUE) - interest(1) - prop(YES) - } - field(HHSV,DBF_MENU) { - prompt("Hihi Severity") - promptgroup("70 - Alarm") - pp(TRUE) - interest(1) - menu(menuAlarmSevr) - } - field(LLSV,DBF_MENU) { - prompt("Lolo Severity") - promptgroup("70 - Alarm") - pp(TRUE) - interest(1) - menu(menuAlarmSevr) - } - field(HSV,DBF_MENU) { - prompt("High Severity") - promptgroup("70 - Alarm") - pp(TRUE) - interest(1) - menu(menuAlarmSevr) - } - field(LSV,DBF_MENU) { - prompt("Low Severity") - promptgroup("70 - Alarm") - pp(TRUE) - interest(1) - menu(menuAlarmSevr) - } - field(HYST,DBF_LONG) { - prompt("Alarm Deadband") - promptgroup("70 - Alarm") - interest(1) - } - field(ADEL,DBF_LONG) { - prompt("Archive Deadband") - promptgroup("80 - Display") - interest(1) - } - field(MDEL,DBF_LONG) { - prompt("Monitor Deadband") - promptgroup("80 - Display") - interest(1) - } - field(LALM,DBF_LONG) { - prompt("Last Value Alarmed") - special(SPC_NOMOD) - interest(3) - } - field(ALST,DBF_LONG) { - prompt("Last Value Archived") - special(SPC_NOMOD) - interest(3) - } - field(MLST,DBF_LONG) { - prompt("Last Val Monitored") - special(SPC_NOMOD) - interest(3) - } - field(SIOL,DBF_OUTLINK) { - prompt("Simulation Output Link") - promptgroup("90 - Simulate") - interest(1) - } - field(SIML,DBF_INLINK) { - prompt("Simulation Mode Link") - promptgroup("90 - Simulate") - interest(1) - } - field(SIMM,DBF_MENU) { - prompt("Simulation Mode") - special(SPC_MOD) - interest(1) - menu(menuYesNo) - } - field(SIMS,DBF_MENU) { - prompt("Simulation Mode Severity") - promptgroup("90 - Simulate") - interest(2) - menu(menuAlarmSevr) - } - field(OLDSIMM,DBF_MENU) { - prompt("Prev. Simulation Mode") - special(SPC_NOMOD) - interest(4) - menu(menuSimm) - } - field(SSCN,DBF_MENU) { - prompt("Sim. Mode Scan") - promptgroup("90 - Simulate") - interest(1) - menu(menuScan) - initial("65535") - } - field(SDLY,DBF_DOUBLE) { - prompt("Sim. Mode Async Delay") - promptgroup("90 - Simulate") - interest(2) - initial("-1.0") - } - %#include "callback.h" - field(SIMPVT,DBF_NOACCESS) { - prompt("Sim. Mode Private") - special(SPC_NOMOD) - interest(4) - extra("CALLBACK *simpvt") - } - field(IVOA,DBF_MENU) { - prompt("INVALID output action") - promptgroup("50 - Output") - interest(2) - menu(menuIvoa) - } - field(IVOV,DBF_LONG) { - prompt("INVALID output value") - promptgroup("50 - Output") - interest(2) - } -} diff --git a/modules/database/src/std/rec/longoutRecord.dbd.pod b/modules/database/src/std/rec/longoutRecord.dbd.pod new file mode 100644 index 000000000..a86edb7ac --- /dev/null +++ b/modules/database/src/std/rec/longoutRecord.dbd.pod @@ -0,0 +1,643 @@ +#************************************************************************* +# 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 is distributed subject to a Software License Agreement found +# in file LICENSE that is included with this distribution. +#************************************************************************* + +=head1 B + +The normal use for the long output or "longout" record type is to store long +integer values of up to 32 bits and write them to hardware devices. The C<<< +Soft Channel >>> device support routine can also be used to write values to +other records via database or channel access links. The OUT field determines how +the record is used. The record supports alarm limits and graphics and control +limits. + +=head1 L + +=over + +=item * L + +=over + +=item * L + +=item * L + +=item * L + +=item * L + +=item * L + +=item * L + +=item * L + +=back + +=item * L + +=over + +=item * L + +=item * L + +=back + +=item * L + +=over + +=item * L + +=item * L + +=item * L + +=back + +=back + +=begin html + +


+ +=end html + +=recordtype longout + +=cut + +recordtype(longout) { + +=head2 Parameter Fields + +The fields in this record fall into the following categories: + +=over + +=item * L + +=item * L + +=item * L + +=item * L + +=item * L + +=item * L + +=item * L + +=back + +=head3 Scan Parameters + +The longout record has the standard fields for specifying under what +circumstances it will be processed. These fields are listed in L. +In addition, L explains how these fields are used. Note +that I/O event scanning is only supported for those card types that +interrupt. + +=head3 Desired Output Parameters + +The record must specify where the desired output originates, i.e., the 32 bit +integer value it is to write. The output mode select (OMSL) field determines +whether the output originates from another record or from database access. When +set to C<<< closed_loop >>>, the desired output is retrieved from the link +specified in the desired output (DOL) field (which can specify either a database +or channel access link) and placed into the VAL field. When set to C<<< +supervisory >>>, the desired output can be written into the VAL field via dpPuts +at run-time. + +A third type of value for the DOL field is a constant in which case, when the +record is initialized, the VAL field will be initialized with this constant +value. + +The VAL field's value will be clipped within limits specified in the fields DRVH +and DRVL if these have been configured by the database designer: + + DRVL <= VAL <= DRVH + +Note: These limits are only enforced as long as DRVH E DRVL. If they are not +set or DRVH E= DRVL they will not be used. + +=fields DOL, OMSL, DRVH, DRVL, VAL + +=head3 Write Parameters + +The OUT link field determines where the record is to send its output. For +records that write values to hardware devices, the OUT output link field must +specify the address of the I/O card, and the DTYP field must specify the +name of the corresponding device support module. + +For soft records, the OUT output link can be a constant, a database link, or a +channel access link. If the link is a constant, the result is no output. The +DTYP field must then specify the C<<< Soft Channel >>> device support routine. + +See L
for information on the format of hardware addresses +and database links. + +=fields OUT, DTYP + +=cut + + include "dbCommon.dbd" + field(VAL,DBF_LONG) { + prompt("Desired Output") + promptgroup("50 - Output") + asl(ASL0) + pp(TRUE) + } + field(OUT,DBF_OUTLINK) { + prompt("Output Specification") + promptgroup("50 - Output") + interest(1) + } + field(DOL,DBF_INLINK) { + prompt("Desired Output Loc") + promptgroup("40 - Input") + interest(1) + } + field(OMSL,DBF_MENU) { + prompt("Output Mode Select") + promptgroup("50 - Output") + interest(1) + menu(menuOmsl) + } + +=head3 Operator Display Parameters + +These parameters are used to present meaningful data to the operator. They +display the value and other parameters of the long output either textually or +graphically. + +EGU is a string of up to 16 characters describing the units that the long output +measures. It is retrieved by the C<<< get_units >>> record support routine. + +The HOPR and LOPR fields set the upper and lower display limits for the VAL, +HIHI, HIGH, LOW, and LOLO fields. Both the C<<< get_graphic_double >>> and C<<< +get_control_double >>> record support routines retrieve these fields. + +See L for more on the record name (NAME) and +description (DESC) fields. + +=fields EGU, HOPR, LOPR, NAME, DESC + +=cut + + field(EGU,DBF_STRING) { + prompt("Engineering Units") + promptgroup("80 - Display") + interest(1) + size(16) + prop(YES) + } + field(DRVH,DBF_LONG) { + prompt("Drive High Limit") + promptgroup("30 - Action") + pp(TRUE) + interest(1) + prop(YES) + } + field(DRVL,DBF_LONG) { + prompt("Drive Low Limit") + promptgroup("30 - Action") + pp(TRUE) + interest(1) + prop(YES) + } + field(HOPR,DBF_LONG) { + prompt("High Operating Range") + promptgroup("80 - Display") + interest(1) + prop(YES) + } + field(LOPR,DBF_LONG) { + prompt("Low Operating Range") + promptgroup("80 - Display") + interest(1) + prop(YES) + } + +=head3 Alarm Parameters + +The possible alarm conditions for long inputs are the SCAN, READ, INVALID, and +limit alarms. The SCAN and READ alarms are not configurable by the user because +their severity is always MAJOR. The INVALID alarm is called by the record +support routine when the record or device support routines cannot write the +record's output. The IVOA field specifies the action to take in this case. + +The limit alarms are configured by the user in the HIHI, LOLO, HIGH, and LOW +fields using floating-point values. For each of these fields, there is a +corresponding severity field which can be either NO_ALARM, MINOR, or MAJOR. The +HYST field contains the alarm deadband around each limit alarm. + +See the See L for a complete explanation of alarms and +these fields. For an explanation of the IVOA and IVOV fields, see L. L lists other fields related to a alarms that are common +to all record types. + +=fields HIHI, HIGH, LOW, LOLO, HHSV, HSV, LSV, LLSV, HYST, IVOA, IVOV + +=cut + + field(HIHI,DBF_LONG) { + prompt("Hihi Alarm Limit") + promptgroup("70 - Alarm") + pp(TRUE) + interest(1) + prop(YES) + } + field(LOLO,DBF_LONG) { + prompt("Lolo Alarm Limit") + promptgroup("70 - Alarm") + pp(TRUE) + interest(1) + prop(YES) + } + field(HIGH,DBF_LONG) { + prompt("High Alarm Limit") + promptgroup("70 - Alarm") + pp(TRUE) + interest(1) + prop(YES) + } + field(LOW,DBF_LONG) { + prompt("Low Alarm Limit") + promptgroup("70 - Alarm") + pp(TRUE) + interest(1) + prop(YES) + } + field(HHSV,DBF_MENU) { + prompt("Hihi Severity") + promptgroup("70 - Alarm") + pp(TRUE) + interest(1) + menu(menuAlarmSevr) + } + field(LLSV,DBF_MENU) { + prompt("Lolo Severity") + promptgroup("70 - Alarm") + pp(TRUE) + interest(1) + menu(menuAlarmSevr) + } + field(HSV,DBF_MENU) { + prompt("High Severity") + promptgroup("70 - Alarm") + pp(TRUE) + interest(1) + menu(menuAlarmSevr) + } + field(LSV,DBF_MENU) { + prompt("Low Severity") + promptgroup("70 - Alarm") + pp(TRUE) + interest(1) + menu(menuAlarmSevr) + } + field(HYST,DBF_LONG) { + prompt("Alarm Deadband") + promptgroup("70 - Alarm") + interest(1) + } + +=head3 Monitor Parameters + +These parameters are used to determine when to send monitors placed on the value +field. The monitors are sent when the value field exceeds the last monitored +field by the appropriate delta. If these fields have a value of zero, everytime +the value changes, a monitor will be triggered; if they have a value of -1, +everytime the record is scanned, monitors are triggered. The ADEL field is the +delta for archive monitors, and the MDEL field is the delta for all other types +of monitors. See L for a complete explanation of +monitors. + +=fields ADEL, MDEL + +=cut + + field(ADEL,DBF_LONG) { + prompt("Archive Deadband") + promptgroup("80 - Display") + interest(1) + } + field(MDEL,DBF_LONG) { + prompt("Monitor Deadband") + promptgroup("80 - Display") + interest(1) + } + field(LALM,DBF_LONG) { + prompt("Last Value Alarmed") + special(SPC_NOMOD) + interest(3) + } + field(ALST,DBF_LONG) { + prompt("Last Value Archived") + special(SPC_NOMOD) + interest(3) + } + field(MLST,DBF_LONG) { + prompt("Last Val Monitored") + special(SPC_NOMOD) + interest(3) + } + +=head3 Run-time and Simulation Mode Parameters + +The LALM, MLST, and ALST fields are used to implement the hysteresis factors for +monitor callbacks. Only if the difference between these fields and the +corresponding value field is greater than the appropriate delta (MDEL, ADEL, +HYST)--only then are monitors triggered. For instance, only if the difference +between VAL and MLST is greater than MDEL are the monitors triggered for VAL. + +=fields LALM, ALST, MLST + +The following fields are used to operate the long output in the simulation mode. +See L for more information on the simulation +mode fields + +=fields SIOL, SIML, SIMM, SIMS + +=cut + + field(SIOL,DBF_OUTLINK) { + prompt("Sim Output Specifctn") + promptgroup("90 - Simulate") + interest(1) + } + field(SIML,DBF_INLINK) { + prompt("Sim Mode Location") + promptgroup("90 - Simulate") + interest(1) + } + field(SIMM,DBF_MENU) { + prompt("Simulation Mode") + special(SPC_MOD) + interest(1) + menu(menuYesNo) + } + field(SIMS,DBF_MENU) { + prompt("Sim mode Alarm Svrty") + promptgroup("90 - Simulate") + interest(2) + menu(menuAlarmSevr) + } + field(OLDSIMM,DBF_MENU) { + prompt("Prev. Simulation Mode") + special(SPC_NOMOD) + interest(4) + menu(menuSimm) + } + field(SSCN,DBF_MENU) { + prompt("Sim. Mode Scan") + promptgroup("90 - Simulate") + interest(1) + menu(menuScan) + initial("65535") + } + field(SDLY,DBF_DOUBLE) { + prompt("Sim. Mode Async Delay") + promptgroup("90 - Simulate") + interest(2) + initial("-1.0") + } + %#include "callback.h" + field(SIMPVT,DBF_NOACCESS) { + prompt("Sim. Mode Private") + special(SPC_NOMOD) + interest(4) + extra("epicsCallback *simpvt") + } + field(IVOA,DBF_MENU) { + prompt("INVALID output action") + promptgroup("50 - Output") + interest(2) + menu(menuIvoa) + } + field(IVOV,DBF_LONG) { + prompt("INVALID output value") + promptgroup("50 - Output") + interest(2) + } + + +=begin html + +


+ +=end html + +=head2 Record Support + +=head3 Record Support Routines + +=head4 init_record + +This routine initializes SIMM if SIML is a constant or creates a channel access +link if SIML is PV_LINK. If SIOL is PV_LINK a channel access link is created. + +This routine next checks to see that device support is available. The routine +next checks to see if the device support write routine is defined. + +If either device support or the device support write routine does not exist, an +error message is issued and processing is terminated. + +If DOL is a constant, then VAL is initialized to its value and UDF is set to +FALSE. If DOL type is a PV_LINK then dbCaAddInlink is called to create a channel +access link. + +If device support includes C, it is called. + +=head4 process + +See next section. + +=head4 get_units + +Retrieves EGU. + +=head4 get_graphic_double + +Sets the upper display and lower display limits for a field. If the field is +VAL, HIHI, HIGH, LOW, or LOLO, the limits are set to HOPR and LOPR, else if the +field has upper and lower limits defined they will be used, else the upper and +lower maximum values for the field type will be used. + +=head4 get_control_double + +Sets the upper control and the lower control limits for a field. If the field is +VAL, HIHI, HIGH, LOW, or LOLO, the limits are set to HOPR and LOPR, else if the +field has upper and lower limits defined they will be used, else the upper and +lower maximum values for the field type will be used. + +=head4 get_alarm_double + +Sets the following values: + + upper_alarm_limit = HIHI + upper_warning_limit = HIGH + lower_warning_limit = LOW + lower_alarm_limit = LOLO + + +=head3 Record Processing + +Routine process implements the following algorithm: + +=over + +=item 1. + +Check to see that the appropriate device support module exists. If it doesn't, +an error message is issued and processing is terminated with the PACT field +still set to TRUE. This ensures that processes will no longer be called for this +record. Thus error storms will not occur. + +=item 2. + +If PACT is FALSE and OMSL is CLOSED_LOOP recGblGetLinkValue is called to read +the current value of VAL. See L for more information. If the +return status of recGblGetLinkValue is zero then UDF is set to FALSE. + +=item 3. + +Check alarms. This routine checks to see if the new VAL causes the alarm status +and severity to change. If so, NSEV, NSTA and LALM are set. It also honors the +alarm hysteresis factor (HYST). Thus the value must change by more than HYST +before the alarm status and severity is lowered. + +=item 4. + +Check severity and write the new value. See L for +information on how INVALID alarms affect output records. + +=item 5. + +If PACT has been changed to TRUE, the device support write output routine has +started but has not completed writing the new value. In this case, the +processing routine merely returns, leaving PACT TRUE. + +=item 6. + +Check to see if monitors should be invoked: + +=over + +=item * + +Alarm monitors are invoked if the alarm status or severity has changed. + +=item * + +Archive and value change monitors are invoked if ADEL and MDEL conditions are +met. + +=item * + +NSEV and NSTA are reset to 0. + +=back + +=item 7. + +Scan forward link if necessary, set PACT FALSE, and return. + +=back + +=begin html + +


+ +=end html + +=head2 Device Support + +=head3 Fields Of Interest To Device Support + +Each long output record must have an associated set of device support routines. +The primary responsibility of the device support routines is to output a new +value whenever write_longout is called. The device support routines are +primarily interested in the following fields: + +=fields PACT, DPVT, NSEV, NSTA, OUT + +=head3 Device Support Routines + +Device support consists of the following routines: + +=head4 long report(int level) + +This optional routine is called by the IOC command C and is passed the +report level that was requested by the user. +It should print a report on the state of the device support to stdout. +The C parameter may be used to output increasingly more detailed +information at higher levels, or to select different types of information with +different levels. +Level zero should print no more than a small summary. + +=head4 long init(int after) + +This optional routine is called twice at IOC initialization time. +The first call happens before any of the C calls are made, with +the integer parameter C set to 0. +The second call happens after all of the C calls have been made, +with C set to 1. + +=head4 init_record + + init_record(precord) + +This routine is optional. If provided, it is called by the record support +C routine. + +=head4 get_ioint_info + + get_ioint_info(int cmd,struct dbCommon *precord,IOSCANPVT *ppvt) + +This routine is called by the ioEventScan system each time the record is added +or deleted from an I/O event scan list. cmd has the value (0,1) if the +record is being (added to, deleted from) an I/O event list. It must be +provided for any device type that can use the ioEvent scanner. + +=head4 write_longout + + write_longout(precord) + +This routine must output a new value. It returns the following values: + +=over + +=item * + +0: Success. + +=item * + +Other: Error. + +=back + +=head3 Device Support For Soft Records + +The C<<< Soft Channel >>> module writes the current value of VAL. + +If the OUT link type is PV_LINK, then dbCaAddInlink is called by +C. + +write_longout calls recGblPutLinkValue to write the current value of VAL. + +See L for a further explanation. + +=cut + +} #end of the DBD file diff --git a/modules/database/src/std/rec/lsiRecord.c b/modules/database/src/std/rec/lsiRecord.c index 261313f07..7396946d4 100644 --- a/modules/database/src/std/rec/lsiRecord.c +++ b/modules/database/src/std/rec/lsiRecord.c @@ -241,9 +241,9 @@ static long readValue(lsiRecord *prec) if (status == 0) prec->udf = FALSE; prec->pact = FALSE; } else { /* !prec->pact && delay >= 0. */ - CALLBACK *pvt = prec->simpvt; + epicsCallback *pvt = prec->simpvt; if (!pvt) { - pvt = calloc(1, sizeof(CALLBACK)); /* very lazy allocation of callback structure */ + pvt = calloc(1, sizeof(epicsCallback)); /* very lazy allocation of callback structure */ prec->simpvt = pvt; } if (pvt) callbackRequestProcessCallbackDelayed(pvt, prec->prio, prec, prec->sdly); diff --git a/modules/database/src/std/rec/lsiRecord.dbd b/modules/database/src/std/rec/lsiRecord.dbd index 689366f98..21f2ba43d 100644 --- a/modules/database/src/std/rec/lsiRecord.dbd +++ b/modules/database/src/std/rec/lsiRecord.dbd @@ -110,6 +110,6 @@ recordtype(lsi) { prompt("Sim. Mode Private") special(SPC_NOMOD) interest(4) - extra("CALLBACK *simpvt") + extra("epicsCallback *simpvt") } } diff --git a/modules/database/src/std/rec/lsoRecord.c b/modules/database/src/std/rec/lsoRecord.c index dcbe1500c..9485e3810 100644 --- a/modules/database/src/std/rec/lsoRecord.c +++ b/modules/database/src/std/rec/lsoRecord.c @@ -282,9 +282,9 @@ static long writeValue(lsoRecord *prec) status = dbPutLinkLS(&prec->siol, prec->val, prec->len); prec->pact = FALSE; } else { /* !prec->pact && delay >= 0. */ - CALLBACK *pvt = prec->simpvt; + epicsCallback *pvt = prec->simpvt; if (!pvt) { - pvt = calloc(1, sizeof(CALLBACK)); /* very lazy allocation of callback structure */ + pvt = calloc(1, sizeof(epicsCallback)); /* very lazy allocation of callback structure */ prec->simpvt = pvt; } if (pvt) callbackRequestProcessCallbackDelayed(pvt, prec->prio, prec, prec->sdly); diff --git a/modules/database/src/std/rec/lsoRecord.dbd b/modules/database/src/std/rec/lsoRecord.dbd index 8d3a64edc..880139a3c 100644 --- a/modules/database/src/std/rec/lsoRecord.dbd +++ b/modules/database/src/std/rec/lsoRecord.dbd @@ -134,6 +134,6 @@ recordtype(lso) { prompt("Sim. Mode Private") special(SPC_NOMOD) interest(4) - extra("CALLBACK *simpvt") + extra("epicsCallback *simpvt") } } diff --git a/modules/database/src/std/rec/mbbiDirectRecord.c b/modules/database/src/std/rec/mbbiDirectRecord.c index 779b732d4..88d805c7c 100644 --- a/modules/database/src/std/rec/mbbiDirectRecord.c +++ b/modules/database/src/std/rec/mbbiDirectRecord.c @@ -277,9 +277,9 @@ static long readValue(mbbiDirectRecord *prec) } prec->pact = FALSE; } else { /* !prec->pact && delay >= 0. */ - CALLBACK *pvt = prec->simpvt; + epicsCallback *pvt = prec->simpvt; if (!pvt) { - pvt = calloc(1, sizeof(CALLBACK)); /* very lazy allocation of callback structure */ + pvt = calloc(1, sizeof(epicsCallback)); /* very lazy allocation of callback structure */ prec->simpvt = pvt; } if (pvt) callbackRequestProcessCallbackDelayed(pvt, prec->prio, prec, prec->sdly); diff --git a/modules/database/src/std/rec/mbbiDirectRecord.dbd b/modules/database/src/std/rec/mbbiDirectRecord.dbd index bb432e58f..eb70a1322 100644 --- a/modules/database/src/std/rec/mbbiDirectRecord.dbd +++ b/modules/database/src/std/rec/mbbiDirectRecord.dbd @@ -98,7 +98,7 @@ recordtype(mbbiDirect) { prompt("Sim. Mode Private") special(SPC_NOMOD) interest(4) - extra("CALLBACK *simpvt") + extra("epicsCallback *simpvt") } field(B0,DBF_UCHAR) { prompt("Bit 0") diff --git a/modules/database/src/std/rec/mbbiRecord.c b/modules/database/src/std/rec/mbbiRecord.c index 5995288e0..0202594c5 100644 --- a/modules/database/src/std/rec/mbbiRecord.c +++ b/modules/database/src/std/rec/mbbiRecord.c @@ -409,9 +409,9 @@ static long readValue(mbbiRecord *prec) } prec->pact = FALSE; } else { /* !prec->pact && delay >= 0. */ - CALLBACK *pvt = prec->simpvt; + epicsCallback *pvt = prec->simpvt; if (!pvt) { - pvt = calloc(1, sizeof(CALLBACK)); /* very lazy allocation of callback structure */ + pvt = calloc(1, sizeof(epicsCallback)); /* very lazy allocation of callback structure */ prec->simpvt = pvt; } if (pvt) callbackRequestProcessCallbackDelayed(pvt, prec->prio, prec, prec->sdly); diff --git a/modules/database/src/std/rec/mbbiRecord.dbd b/modules/database/src/std/rec/mbbiRecord.dbd index 52f18e43d..a6ce71cb3 100644 --- a/modules/database/src/std/rec/mbbiRecord.dbd +++ b/modules/database/src/std/rec/mbbiRecord.dbd @@ -500,6 +500,6 @@ recordtype(mbbi) { prompt("Sim. Mode Private") special(SPC_NOMOD) interest(4) - extra("CALLBACK *simpvt") + extra("epicsCallback *simpvt") } } diff --git a/modules/database/src/std/rec/mbboDirectRecord.c b/modules/database/src/std/rec/mbboDirectRecord.c index dcc2b3c33..5c2dd9403 100644 --- a/modules/database/src/std/rec/mbboDirectRecord.c +++ b/modules/database/src/std/rec/mbboDirectRecord.c @@ -375,9 +375,9 @@ static long writeValue(mbboDirectRecord *prec) status = dbPutLink(&prec->siol, DBR_ULONG, &prec->val, 1); prec->pact = FALSE; } else { /* !prec->pact && delay >= 0. */ - CALLBACK *pvt = prec->simpvt; + epicsCallback *pvt = prec->simpvt; if (!pvt) { - pvt = calloc(1, sizeof(CALLBACK)); /* very lazy allocation of callback structure */ + pvt = calloc(1, sizeof(epicsCallback)); /* very lazy allocation of callback structure */ prec->simpvt = pvt; } if (pvt) callbackRequestProcessCallbackDelayed(pvt, prec->prio, prec, prec->sdly); diff --git a/modules/database/src/std/rec/mbboDirectRecord.dbd b/modules/database/src/std/rec/mbboDirectRecord.dbd index a6a43b4f0..ff5fb2834 100644 --- a/modules/database/src/std/rec/mbboDirectRecord.dbd +++ b/modules/database/src/std/rec/mbboDirectRecord.dbd @@ -118,7 +118,7 @@ recordtype(mbboDirect) { prompt("Sim. Mode Private") special(SPC_NOMOD) interest(4) - extra("CALLBACK *simpvt") + extra("epicsCallback *simpvt") } field(IVOA,DBF_MENU) { prompt("INVALID outpt action") diff --git a/modules/database/src/std/rec/mbboRecord.c b/modules/database/src/std/rec/mbboRecord.c index e70838071..2488552ba 100644 --- a/modules/database/src/std/rec/mbboRecord.c +++ b/modules/database/src/std/rec/mbboRecord.c @@ -458,9 +458,9 @@ static long writeValue(mbboRecord *prec) status = dbPutLink(&prec->siol, DBR_USHORT, &prec->val, 1); prec->pact = FALSE; } else { /* !prec->pact && delay >= 0. */ - CALLBACK *pvt = prec->simpvt; + epicsCallback *pvt = prec->simpvt; if (!pvt) { - pvt = calloc(1, sizeof(CALLBACK)); /* very lazy allocation of callback structure */ + pvt = calloc(1, sizeof(epicsCallback)); /* very lazy allocation of callback structure */ prec->simpvt = pvt; } if (pvt) callbackRequestProcessCallbackDelayed(pvt, prec->prio, prec, prec->sdly); diff --git a/modules/database/src/std/rec/mbboRecord.dbd b/modules/database/src/std/rec/mbboRecord.dbd index 5475029df..41f3870ea 100644 --- a/modules/database/src/std/rec/mbboRecord.dbd +++ b/modules/database/src/std/rec/mbboRecord.dbd @@ -510,7 +510,7 @@ recordtype(mbbo) { prompt("Sim. Mode Private") special(SPC_NOMOD) interest(4) - extra("CALLBACK *simpvt") + extra("epicsCallback *simpvt") } field(IVOA,DBF_MENU) { prompt("INVALID outpt action") diff --git a/modules/database/src/std/rec/selRecord.dbd b/modules/database/src/std/rec/selRecord.dbd deleted file mode 100644 index 724482704..000000000 --- a/modules/database/src/std/rec/selRecord.dbd +++ /dev/null @@ -1,323 +0,0 @@ -#************************************************************************* -# 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 is distributed subject to a Software License Agreement found -# in file LICENSE that is included with this distribution. -#************************************************************************* -menu(selSELM) { - choice(selSELM_Specified,"Specified") - choice(selSELM_High_Signal,"High Signal") - choice(selSELM_Low_Signal,"Low Signal") - choice(selSELM_Median_Signal,"Median Signal") -} -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("30 - Action") - menu(selSELM) - } - field(SELN,DBF_USHORT) { - prompt("Index value") - } - field(PREC,DBF_SHORT) { - prompt("Display Precision") - promptgroup("80 - Display") - interest(1) - } - field(NVL,DBF_INLINK) { - prompt("Index Value Location") - promptgroup("30 - Action") - interest(1) - } - field(INPA,DBF_INLINK) { - prompt("Input A") - promptgroup("41 - Input A-F") - interest(1) - } - field(INPB,DBF_INLINK) { - prompt("Input B") - promptgroup("41 - Input A-F") - interest(1) - } - field(INPC,DBF_INLINK) { - prompt("Input C") - promptgroup("41 - Input A-F") - interest(1) - } - field(INPD,DBF_INLINK) { - prompt("Input D") - promptgroup("41 - Input A-F") - interest(1) - } - field(INPE,DBF_INLINK) { - prompt("Input E") - promptgroup("41 - Input A-F") - interest(1) - } - field(INPF,DBF_INLINK) { - prompt("Input F") - promptgroup("41 - Input A-F") - interest(1) - } - field(INPG,DBF_INLINK) { - prompt("Input G") - promptgroup("42 - Input G-L") - interest(1) - } - field(INPH,DBF_INLINK) { - prompt("Input H") - promptgroup("42 - Input G-L") - interest(1) - } - field(INPI,DBF_INLINK) { - prompt("Input I") - promptgroup("42 - Input G-L") - interest(1) - } - field(INPJ,DBF_INLINK) { - prompt("Input J") - promptgroup("42 - Input G-L") - interest(1) - } - field(INPK,DBF_INLINK) { - prompt("Input K") - promptgroup("42 - Input G-L") - interest(1) - } - field(INPL,DBF_INLINK) { - prompt("Input L") - promptgroup("42 - Input G-L") - interest(1) - } - field(EGU,DBF_STRING) { - prompt("Engineering Units") - promptgroup("80 - Display") - interest(1) - size(16) - prop(YES) - } - field(HOPR,DBF_DOUBLE) { - prompt("High Operating Rng") - promptgroup("80 - Display") - interest(1) - prop(YES) - } - field(LOPR,DBF_DOUBLE) { - prompt("Low Operating Range") - promptgroup("80 - Display") - interest(1) - prop(YES) - } - field(HIHI,DBF_DOUBLE) { - prompt("Hihi Alarm Limit") - promptgroup("70 - Alarm") - pp(TRUE) - interest(1) - prop(YES) - } - field(LOLO,DBF_DOUBLE) { - prompt("Lolo Alarm Limit") - promptgroup("70 - Alarm") - pp(TRUE) - interest(1) - prop(YES) - } - field(HIGH,DBF_DOUBLE) { - prompt("High Alarm Limit") - promptgroup("70 - Alarm") - pp(TRUE) - interest(1) - prop(YES) - } - field(LOW,DBF_DOUBLE) { - prompt("Low Alarm Limit") - promptgroup("70 - Alarm") - pp(TRUE) - interest(1) - prop(YES) - } - field(HHSV,DBF_MENU) { - prompt("Hihi Severity") - promptgroup("70 - Alarm") - pp(TRUE) - interest(1) - prop(YES) - menu(menuAlarmSevr) - } - field(LLSV,DBF_MENU) { - prompt("Lolo Severity") - promptgroup("70 - Alarm") - pp(TRUE) - interest(1) - prop(YES) - menu(menuAlarmSevr) - } - field(HSV,DBF_MENU) { - prompt("High Severity") - promptgroup("70 - Alarm") - pp(TRUE) - interest(1) - prop(YES) - menu(menuAlarmSevr) - } - field(LSV,DBF_MENU) { - prompt("Low Severity") - promptgroup("70 - Alarm") - pp(TRUE) - interest(1) - prop(YES) - menu(menuAlarmSevr) - } - field(HYST,DBF_DOUBLE) { - prompt("Alarm Deadband") - promptgroup("70 - Alarm") - interest(1) - } - field(ADEL,DBF_DOUBLE) { - prompt("Archive Deadband") - promptgroup("80 - Display") - interest(1) - } - field(MDEL,DBF_DOUBLE) { - prompt("Monitor Deadband") - promptgroup("80 - Display") - interest(1) - } - field(A,DBF_DOUBLE) { - prompt("Value of Input A") - pp(TRUE) - } - field(B,DBF_DOUBLE) { - prompt("Value of Input B") - pp(TRUE) - } - field(C,DBF_DOUBLE) { - prompt("Value of Input C") - pp(TRUE) - } - field(D,DBF_DOUBLE) { - prompt("Value of Input D") - pp(TRUE) - } - field(E,DBF_DOUBLE) { - prompt("Value of Input E") - pp(TRUE) - } - field(F,DBF_DOUBLE) { - prompt("Value of Input F") - pp(TRUE) - } - field(G,DBF_DOUBLE) { - prompt("Value of Input G") - pp(TRUE) - } - field(H,DBF_DOUBLE) { - prompt("Value of Input H") - pp(TRUE) - } - field(I,DBF_DOUBLE) { - prompt("Value of Input I") - pp(TRUE) - } - field(J,DBF_DOUBLE) { - prompt("Value of Input J") - pp(TRUE) - } - field(K,DBF_DOUBLE) { - prompt("Value of Input K") - pp(TRUE) - } - field(L,DBF_DOUBLE) { - prompt("Value of Input L") - pp(TRUE) - } - field(LA,DBF_DOUBLE) { - prompt("Prev Value of A") - special(SPC_NOMOD) - interest(3) - } - field(LB,DBF_DOUBLE) { - prompt("Prev Value of B") - special(SPC_NOMOD) - interest(3) - } - field(LC,DBF_DOUBLE) { - prompt("Prev Value of C") - special(SPC_NOMOD) - interest(3) - } - field(LD,DBF_DOUBLE) { - prompt("Prev Value of D") - special(SPC_NOMOD) - interest(3) - } - field(LE,DBF_DOUBLE) { - prompt("Prev Value of E") - special(SPC_NOMOD) - interest(3) - } - field(LF,DBF_DOUBLE) { - prompt("Prev Value of F") - special(SPC_NOMOD) - interest(3) - } - field(LG,DBF_DOUBLE) { - prompt("Prev Value of G") - special(SPC_NOMOD) - interest(3) - } - field(LH,DBF_DOUBLE) { - prompt("Prev Value of H") - special(SPC_NOMOD) - interest(3) - } - field(LI,DBF_DOUBLE) { - prompt("Prev Value of I") - special(SPC_NOMOD) - interest(3) - } - field(LJ,DBF_DOUBLE) { - prompt("Prev Value of J") - special(SPC_NOMOD) - interest(3) - } - field(LK,DBF_DOUBLE) { - prompt("Prev Value of K") - special(SPC_NOMOD) - interest(3) - } - field(LL,DBF_DOUBLE) { - prompt("Prev Value of L") - special(SPC_NOMOD) - interest(3) - } - field(LALM,DBF_DOUBLE) { - prompt("Last Value Alarmed") - special(SPC_NOMOD) - interest(3) - } - field(ALST,DBF_DOUBLE) { - prompt("Last Value Archived") - special(SPC_NOMOD) - interest(3) - } - field(MLST,DBF_DOUBLE) { - prompt("Last Val Monitored") - special(SPC_NOMOD) - interest(3) - } - field(NLST,DBF_USHORT) { - prompt("Last Index Monitored") - special(SPC_NOMOD) - interest(3) - } -} diff --git a/modules/database/src/std/rec/selRecord.dbd.pod b/modules/database/src/std/rec/selRecord.dbd.pod new file mode 100644 index 000000000..9e49745cc --- /dev/null +++ b/modules/database/src/std/rec/selRecord.dbd.pod @@ -0,0 +1,647 @@ +#************************************************************************* +# 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 is distributed subject to a Software License Agreement found +# in file LICENSE that is included with this distribution. +#************************************************************************* + +=pod + +=head1 Select Record (sel) + +The select record computes a value based on input obtained from up to 12 +locations. The selection algorithm can be one of the following: C<<< Specified +>>>, C<<< High Signal >>>, C<<< Low Signal >>>, C<<< Median Signal >>>. Each +input can be a constant, a database link, or a channel access link. + +=head2 Contents + +=over + +=item * L + +=over + +=item * L + +=item * L + +=item * L