Merge 3.15 branch into 7.0
This commit is contained in:
@@ -15,6 +15,7 @@ dbRecStd_SRCS += ts.c
|
||||
dbRecStd_SRCS += dbnd.c
|
||||
dbRecStd_SRCS += arr.c
|
||||
dbRecStd_SRCS += sync.c
|
||||
dbRecStd_SRCS += decimate.c
|
||||
|
||||
HTMLS += filters.html
|
||||
|
||||
|
||||
117
modules/database/src/std/filters/decimate.c
Normal file
117
modules/database/src/std/filters/decimate.c
Normal file
@@ -0,0 +1,117 @@
|
||||
/*************************************************************************\
|
||||
* Copyright (c) 2019 UChicago Argonne LLC, as Operator of Argonne
|
||||
* National Laboratory.
|
||||
* Copyright (c) 2010 Brookhaven National Laboratory.
|
||||
* Copyright (c) 2010 Helmholtz-Zentrum Berlin
|
||||
* fuer Materialien und Energie GmbH.
|
||||
* EPICS BASE is distributed subject to a Software License Agreement found
|
||||
* in file LICENSE that is included with this distribution.
|
||||
\*************************************************************************/
|
||||
|
||||
/*
|
||||
* Authors: Ralph Lange <Ralph.Lange@bessy.de>,
|
||||
* Andrew Johnson <anj@anl.gov>
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include "freeList.h"
|
||||
#include "db_field_log.h"
|
||||
#include "chfPlugin.h"
|
||||
#include "epicsExport.h"
|
||||
|
||||
typedef struct myStruct {
|
||||
epicsInt32 n, i;
|
||||
} myStruct;
|
||||
|
||||
static void *myStructFreeList;
|
||||
|
||||
static const
|
||||
chfPluginArgDef opts[] = {
|
||||
chfInt32(myStruct, n, "n", 1, 0),
|
||||
chfPluginArgEnd
|
||||
};
|
||||
|
||||
static void * allocPvt(void)
|
||||
{
|
||||
myStruct *my = (myStruct*) freeListCalloc(myStructFreeList);
|
||||
return (void *) my;
|
||||
}
|
||||
|
||||
static void freePvt(void *pvt)
|
||||
{
|
||||
freeListFree(myStructFreeList, pvt);
|
||||
}
|
||||
|
||||
static int parse_ok(void *pvt)
|
||||
{
|
||||
myStruct *my = (myStruct*) pvt;
|
||||
|
||||
if (my->n < 1)
|
||||
return -1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static db_field_log* filter(void* pvt, dbChannel *chan, db_field_log *pfl) {
|
||||
db_field_log *passfl = NULL;
|
||||
myStruct *my = (myStruct*) pvt;
|
||||
epicsInt32 i = my->i;
|
||||
|
||||
if (pfl->ctx == dbfl_context_read)
|
||||
return pfl;
|
||||
|
||||
if (i++ == 0)
|
||||
passfl = pfl;
|
||||
else
|
||||
db_delete_field_log(pfl);
|
||||
|
||||
if (i >= my->n)
|
||||
i = 0;
|
||||
|
||||
my->i = i;
|
||||
return passfl;
|
||||
}
|
||||
|
||||
static void channelRegisterPre(dbChannel *chan, void *pvt,
|
||||
chPostEventFunc **cb_out, void **arg_out, db_field_log *probe)
|
||||
{
|
||||
*cb_out = filter;
|
||||
*arg_out = pvt;
|
||||
}
|
||||
|
||||
static void channel_report(dbChannel *chan, void *pvt, int level, const unsigned short indent)
|
||||
{
|
||||
myStruct *my = (myStruct*) pvt;
|
||||
printf("%*sDecimate (dec): n=%d, i=%d\n", indent, "",
|
||||
my->n, my->i);
|
||||
}
|
||||
|
||||
static chfPluginIf pif = {
|
||||
allocPvt,
|
||||
freePvt,
|
||||
|
||||
NULL, /* parse_error, */
|
||||
parse_ok,
|
||||
|
||||
NULL, /* channel_open, */
|
||||
channelRegisterPre,
|
||||
NULL, /* channelRegisterPost, */
|
||||
channel_report,
|
||||
NULL /* channel_close */
|
||||
};
|
||||
|
||||
static void decInitialize(void)
|
||||
{
|
||||
static int firstTime = 1;
|
||||
|
||||
if (!firstTime) return;
|
||||
firstTime = 0;
|
||||
|
||||
if (!myStructFreeList)
|
||||
freeListInitPvt(&myStructFreeList, sizeof(myStruct), 64);
|
||||
|
||||
chfPluginRegister("dec", &pif, opts);
|
||||
}
|
||||
|
||||
epicsExportRegistrar(decInitialize);
|
||||
@@ -14,6 +14,8 @@ The following filters are available in this release:
|
||||
|
||||
=item * L<Synchronize|/"Synchronize Filter sync">
|
||||
|
||||
=item * L<Decimation|/"Decimation Filter dec">
|
||||
|
||||
=back
|
||||
|
||||
=head2 Using Filters
|
||||
@@ -245,3 +247,41 @@ periods only when "blue" is true by using
|
||||
...
|
||||
|
||||
=cut
|
||||
|
||||
registrar(decInitialize)
|
||||
|
||||
=head3 Decimation Filter C<"dec">
|
||||
|
||||
This filter is used to reduce the number or rate of monitor updates from a
|
||||
channel by an integer factor C<n> that is provided as a filter argument,
|
||||
discarding the other updates. A true decimation following the original meaning
|
||||
of the word would be achieved by giving C<n> as 10, to only allow every tenth
|
||||
update through.
|
||||
|
||||
=head4 Parameters
|
||||
|
||||
=over
|
||||
|
||||
=item Number C<"n">
|
||||
|
||||
The decimation factor, a positive integer. Giving n=1 is equivalent to a no-op
|
||||
that allows all updates to be passed to the client.
|
||||
|
||||
=back
|
||||
|
||||
This filter is intentionally very simplistic. It passes on the first monitor
|
||||
event that it sees after the channel connects, then discards the next N-1 events
|
||||
before sending the next event. If several clients connect to a channel using the
|
||||
same filter settings they may see completely different data streams since each
|
||||
client gets its own instance of the filter whose event counter starts when that
|
||||
client connects.
|
||||
|
||||
=head4 Example
|
||||
|
||||
To sample a 60Hz channel at 1Hz, a 10Hz channel every 6 seconds or a 1Hz channel
|
||||
once every minute:
|
||||
|
||||
Hal$ camonitor 'test:channel' 'test:channel.{"dec":{"n":60}}'
|
||||
...
|
||||
|
||||
=cut
|
||||
|
||||
@@ -110,7 +110,9 @@ static db_field_log* filter(void* pvt, dbChannel *chan, db_field_log *pfl) {
|
||||
passfl = pfl;
|
||||
pfl = NULL;
|
||||
}
|
||||
break;
|
||||
else
|
||||
db_delete_field_log(pfl);
|
||||
goto save_state;
|
||||
case syncModeLast:
|
||||
if (!actstate && my->laststate) {
|
||||
passfl = my->lastfl;
|
||||
@@ -122,28 +124,34 @@ static db_field_log* filter(void* pvt, dbChannel *chan, db_field_log *pfl) {
|
||||
passfl = pfl;
|
||||
pfl = NULL;
|
||||
}
|
||||
break;
|
||||
else
|
||||
db_delete_field_log(pfl);
|
||||
goto save_state;
|
||||
case syncModeWhile:
|
||||
if (actstate) {
|
||||
if (actstate)
|
||||
passfl = pfl;
|
||||
}
|
||||
else
|
||||
db_delete_field_log(pfl);
|
||||
goto no_shift;
|
||||
case syncModeUnless:
|
||||
if (!actstate) {
|
||||
if (!actstate)
|
||||
passfl = pfl;
|
||||
}
|
||||
else
|
||||
db_delete_field_log(pfl);
|
||||
goto no_shift;
|
||||
}
|
||||
|
||||
if (my->lastfl)
|
||||
db_delete_field_log(my->lastfl);
|
||||
my->lastfl = pfl;
|
||||
my->laststate = actstate;
|
||||
|
||||
/* since no copy is made we can't keep a reference to the returned fl */
|
||||
assert(my->lastfl != passfl);
|
||||
|
||||
no_shift:
|
||||
save_state:
|
||||
my->laststate = actstate;
|
||||
|
||||
no_shift:
|
||||
return passfl;
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
# Copyright (c) 2002 The Regents of the University of California, as
|
||||
# Operator of Los Alamos National Laboratory.
|
||||
# EPICS BASE is distributed subject to a Software License Agreement found
|
||||
# in file LICENSE that is included with this distribution.
|
||||
# in file LICENSE that is included with this distribution.
|
||||
#*************************************************************************
|
||||
|
||||
=title Analog Input Record (ai)
|
||||
@@ -214,7 +214,7 @@ monitoring functionality.
|
||||
|
||||
=cut
|
||||
|
||||
include "dbCommon.dbd"
|
||||
include "dbCommon.dbd"
|
||||
field(VAL,DBF_DOUBLE) {
|
||||
prompt("Current EGU Value")
|
||||
promptgroup("40 - Input")
|
||||
@@ -547,7 +547,7 @@ The individual routines are described below.
|
||||
|
||||
=head3 Device Support Routines
|
||||
|
||||
=head4 long report(int level)
|
||||
long report(int level)
|
||||
|
||||
This optional routine is called by the IOC command C<dbior> and is passed the
|
||||
report level that was requested by the user.
|
||||
@@ -557,7 +557,7 @@ 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)
|
||||
long init(int after)
|
||||
|
||||
This optional routine is called twice at IOC initialization time.
|
||||
The first call happens before any of the C<init_record()> calls are made, with
|
||||
@@ -565,7 +565,7 @@ the integer parameter C<after> set to 0.
|
||||
The second call happens after all of the C<init_record()> calls have been made,
|
||||
with C<after> set to 1.
|
||||
|
||||
=head4 long init_record(aiRecord *prec)
|
||||
long init_record(aiRecord *prec)
|
||||
|
||||
This optional routine is called by the record initialization code for each ai
|
||||
record instance that has its DTYP field set to use this device support.
|
||||
@@ -582,7 +582,7 @@ C<LINEAR>, but it is not necessary to check that condition first.
|
||||
This same calculation takes place in the C<special_linconv()> routine, so the
|
||||
implementation can usually just call that routine to perform the task.
|
||||
|
||||
=head4 long get_ioint_info(int cmd, aiRecord *prec, IOSCANPVT *piosl)
|
||||
long get_ioint_info(int cmd, aiRecord *prec, IOSCANPVT *piosl)
|
||||
|
||||
This optional routine is called whenever the record's SCAN field is being
|
||||
changed to or from the value C<I/O Intr> to find out which I/O Interrupt Scan
|
||||
@@ -611,7 +611,7 @@ thread.
|
||||
The C<scanIoRequest()> routine is safe to call from an interrupt service routine
|
||||
on embedded architectures (vxWorks and RTEMS).
|
||||
|
||||
=head4 long read_ai(aiRecord *prec)
|
||||
long read_ai(aiRecord *prec)
|
||||
|
||||
This essential routine is called when the record wants a new value from the
|
||||
addressed device.
|
||||
@@ -622,7 +622,7 @@ It is responsible for performing (or at least initiating) a read operation, and
|
||||
|
||||
... return value ...
|
||||
|
||||
=head4 long special_linconv(aiRecord *prec, int after)
|
||||
long special_linconv(aiRecord *prec, int after)
|
||||
|
||||
This optional routine should be provided if the record type's unit conversion
|
||||
features are used by the device support's C<read_ai()> routine returning a
|
||||
|
||||
@@ -162,7 +162,7 @@ these fields.
|
||||
|
||||
=cut
|
||||
|
||||
include "dbCommon.dbd"
|
||||
include "dbCommon.dbd"
|
||||
field(INP,DBF_INLINK) {
|
||||
prompt("Input Specification")
|
||||
promptgroup("40 - Input")
|
||||
@@ -291,7 +291,7 @@ these fields.
|
||||
|
||||
=head3 Record Support Routines
|
||||
|
||||
=head2 C<init_record>
|
||||
long init_record(struct dbCommon *precord, int pass);
|
||||
|
||||
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.
|
||||
@@ -303,19 +303,19 @@ processing is terminated.
|
||||
|
||||
If device support includes C<init_record()>, it is called.
|
||||
|
||||
=head2 C<process>
|
||||
long process(struct dbCommon *precord);
|
||||
|
||||
See next section.
|
||||
See L<Record Processing> below.
|
||||
|
||||
=head2 C<get_enum_str>
|
||||
long get_enum_str(const struct dbAddr *paddr, char *pbuffer);
|
||||
|
||||
Retrieves ASCII string corresponding to VAL.
|
||||
|
||||
=head2 C<get_enum_strs>
|
||||
long get_enum_strs(const struct dbAddr *paddr, struct dbr_enumStrs *p);
|
||||
|
||||
Retrieves ASCII strings for ZNAM and ONAM.
|
||||
|
||||
=head2 C<put_enum_str>
|
||||
long put_enum_str(const struct dbAddr *paddr, const char *pbuffer);
|
||||
|
||||
Check if string matches ZNAM or ONAM, and if it does, sets VAL.
|
||||
|
||||
@@ -323,7 +323,7 @@ Check if string matches ZNAM or ONAM, and if it does, sets VAL.
|
||||
|
||||
Routine process implements the following algorithm:
|
||||
|
||||
=over 1
|
||||
=over
|
||||
|
||||
=item 1.
|
||||
Check to see that the appropriate device support module exists. If it
|
||||
@@ -344,7 +344,7 @@ Convert.
|
||||
|
||||
=back
|
||||
|
||||
=over 1
|
||||
=over
|
||||
|
||||
=item *
|
||||
status = read_bi
|
||||
@@ -363,7 +363,7 @@ if status is 2, set status = 0
|
||||
|
||||
=back
|
||||
|
||||
=over 1
|
||||
=over
|
||||
|
||||
=item 5.
|
||||
Check alarms: This routine checks to see if the new VAL causes the alarm
|
||||
@@ -375,7 +375,7 @@ Check if monitors should be invoked:
|
||||
|
||||
=back
|
||||
|
||||
=over 1
|
||||
=over
|
||||
|
||||
=item *
|
||||
Alarm monitors are invoked if the alarm status or severity has changed.
|
||||
@@ -391,7 +391,7 @@ NSEV and NSTA are reset to 0.
|
||||
|
||||
=back
|
||||
|
||||
=over 1
|
||||
=over
|
||||
|
||||
=item 7.
|
||||
Scan forward link if necessary, set PACT FALSE, and return.
|
||||
@@ -413,7 +413,7 @@ support routines are primarily interested in the following fields:
|
||||
|
||||
Device support consists of the following routines:
|
||||
|
||||
=head4 long report(int level)
|
||||
long report(int level);
|
||||
|
||||
This optional routine is called by the IOC command C<dbior> and is passed the
|
||||
report level that was requested by the user.
|
||||
@@ -423,7 +423,7 @@ 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)
|
||||
long init(int after);
|
||||
|
||||
This optional routine is called twice at IOC initialization time.
|
||||
The first call happens before any of the C<init_record()> calls are made, with
|
||||
@@ -431,19 +431,19 @@ the integer parameter C<after> set to 0.
|
||||
The second call happens after all of the C<init_record()> calls have been made,
|
||||
with C<after> set to 1.
|
||||
|
||||
=head2 C<init_record(precord)>
|
||||
long init_record(struct dbCommon *precord);
|
||||
|
||||
This routine is optional. If provided, it is called by the record support
|
||||
C<init_record()> routine.
|
||||
|
||||
=head2 C<get_ioint_info(int cmd, struct dbCommon *precord, IOSCANPVT *ppvt)>
|
||||
long 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. C<cmd> 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.
|
||||
|
||||
=head2 C<read_bi(precord)>
|
||||
long read_bi(struct dbCommon *precord);
|
||||
|
||||
This routine must provide a new input value. It returns the following
|
||||
values:
|
||||
|
||||
@@ -65,9 +65,9 @@ C<losed_loop> or C<supervisory>. If C<supervisory> is specified, the value
|
||||
in the VAL field can be set externally via dbPuts at run-time. If
|
||||
C<closed_loop> is specified, the VAL field's value is obtained from the
|
||||
address specified in the desired output location (DOL) field which can be a
|
||||
database link, a channel access link, or a constant. To achieve continuous
|
||||
control, a database link to a control algorithm record should be entered in
|
||||
the DOL field.
|
||||
database link or a channel access link, but not a constant. To achieve
|
||||
continuous control, a database link to a control algorithm record should be
|
||||
entered in the DOL field.
|
||||
|
||||
L<Address Specification> presents more information on database addresses
|
||||
and links. L<Scanning Specification> explaines the effect of database
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
# Copyright (c) 2002 The Regents of the University of California, as
|
||||
# Operator of Los Alamos National Laboratory.
|
||||
# EPICS BASE is distributed subject to a Software License Agreement found
|
||||
# in file LICENSE that is included with this distribution.
|
||||
# in file LICENSE that is included with this distribution.
|
||||
#*************************************************************************
|
||||
|
||||
=title Compression Record (compress)
|
||||
@@ -62,46 +62,10 @@ menu(bufferingALG) {
|
||||
}
|
||||
recordtype(compress) {
|
||||
|
||||
=head2 Contents
|
||||
|
||||
=over
|
||||
|
||||
=item * L<Parameter Fields>
|
||||
|
||||
=over
|
||||
|
||||
=item * L<Scanning Parameters>
|
||||
|
||||
=item * L<Algorithms and Related Parameters>
|
||||
|
||||
=item * L<Operator Display Parameters>
|
||||
|
||||
=item * L<Run-time Parameters>
|
||||
|
||||
=back
|
||||
|
||||
=item * L<Record Support>
|
||||
|
||||
=over
|
||||
|
||||
=item * L<Record Support Routines>
|
||||
|
||||
=item * L<Record Processing>
|
||||
|
||||
=back
|
||||
|
||||
=back
|
||||
|
||||
=begin html
|
||||
|
||||
<br>
|
||||
<hr>
|
||||
<br>
|
||||
|
||||
=end html
|
||||
|
||||
=head2 Parameter Fields
|
||||
|
||||
The record-specific fields are described below, grouped by functionality.
|
||||
|
||||
=head3 Scanning Parameters
|
||||
|
||||
The compression record has the standard fields for specifying under what
|
||||
@@ -259,80 +223,52 @@ SPTR points to an array that is used for array averages.
|
||||
|
||||
WPTR is used by the dbGetlinks routines.
|
||||
|
||||
=begin html
|
||||
|
||||
<br>
|
||||
<hr>
|
||||
<br>
|
||||
|
||||
=end html
|
||||
|
||||
=head2 Record Support
|
||||
|
||||
=head3 Record Support Routines (compressRecord.c)
|
||||
=head3 Record Support Routines
|
||||
|
||||
=head4 init_record
|
||||
|
||||
long (*init_record)(struct dbCommon *precord, int pass)
|
||||
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)
|
||||
|
||||
long (*process)(struct dbCommon *precord)
|
||||
See L<Record Processing> below.
|
||||
|
||||
See L<Record Processing>
|
||||
|
||||
=head4 special
|
||||
|
||||
long (*special)(struct dbAddr *paddr, int after)
|
||||
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)
|
||||
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)
|
||||
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);
|
||||
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);
|
||||
long get_units(struct dbAddr *paddr, char *units);
|
||||
|
||||
Retrieves EGU.
|
||||
|
||||
=head4 get_precision
|
||||
|
||||
long (*get_precision)(const struct dbAddr *paddr, long *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);
|
||||
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);
|
||||
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
|
||||
@@ -418,7 +354,7 @@ Scan forward link if necessary, set PACT FALSE, and return.
|
||||
|
||||
=cut
|
||||
|
||||
include "dbCommon.dbd"
|
||||
include "dbCommon.dbd"
|
||||
field(VAL,DBF_NOACCESS) {
|
||||
prompt("Value")
|
||||
asl(ASL0)
|
||||
@@ -549,4 +485,3 @@ Scan forward link if necessary, set PACT FALSE, and return.
|
||||
interest(3)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
# in file LICENSE that is included with this distribution.
|
||||
#*************************************************************************
|
||||
|
||||
=head1 Long Input Record (longin)
|
||||
=title 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
|
||||
@@ -15,56 +15,6 @@ 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<Parameter Fields>
|
||||
|
||||
=over
|
||||
|
||||
=item * L<Scan Parameters>
|
||||
|
||||
=item * L<Read Parameters>
|
||||
|
||||
=item * L<Operator Display Parameters>
|
||||
|
||||
=item * L<Alarm Parameters>
|
||||
|
||||
=item * L<Run-time and Simulation Mode Parameters>
|
||||
|
||||
=back
|
||||
|
||||
=item * L<Record Support>
|
||||
|
||||
=over
|
||||
|
||||
=item * L<Record Support Routines>
|
||||
|
||||
=item * L<Record Processing>
|
||||
|
||||
=back
|
||||
|
||||
=item * L<Device Support>
|
||||
|
||||
=over
|
||||
|
||||
=item * L<Fields Of Interest To Device Support>
|
||||
|
||||
=item * L<Device Support Routines>
|
||||
|
||||
=item * L<Device Support For Soft Records>
|
||||
|
||||
=back
|
||||
|
||||
=back
|
||||
|
||||
=begin html
|
||||
|
||||
<br><hr><br>
|
||||
|
||||
=end html
|
||||
|
||||
=recordtype longin
|
||||
|
||||
=cut
|
||||
@@ -73,21 +23,7 @@ recordtype(longin) {
|
||||
|
||||
=head2 Parameter Fields
|
||||
|
||||
The fields in this record fall into the following categories:
|
||||
|
||||
=over
|
||||
|
||||
=item * L<Scan Parameters>
|
||||
|
||||
=item * L<Read Parameters>
|
||||
|
||||
=item * L<Operator Display Parameters>
|
||||
|
||||
=item * L<Alarm Parameters>
|
||||
|
||||
=item * L<Run-time and Simulation Mode Parameters>
|
||||
|
||||
=back
|
||||
The record-specific fields are described below, grouped by functionality.
|
||||
|
||||
=head3 Scan Parameters
|
||||
|
||||
@@ -174,17 +110,11 @@ See L<Fields Common to Many Record Types> for more information on these fields.
|
||||
|
||||
=fields SIOL, SVAL, SIML, SIMM, SIMS
|
||||
|
||||
=begin html
|
||||
|
||||
<br><hr><br>
|
||||
|
||||
=end html
|
||||
|
||||
=head2 Record Support
|
||||
|
||||
=head3 Record Support Routines
|
||||
=head3 Record Support Routines
|
||||
|
||||
=head4 init_record
|
||||
=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
|
||||
@@ -374,7 +304,7 @@ sets UDF to FALSE. read_longin returns the status of C<recGblGetLinkValue>.
|
||||
|
||||
=cut
|
||||
|
||||
include "dbCommon.dbd"
|
||||
include "dbCommon.dbd"
|
||||
field(VAL,DBF_LONG) {
|
||||
prompt("Current value")
|
||||
promptgroup("40 - Input")
|
||||
|
||||
@@ -7,69 +7,15 @@
|
||||
# in file LICENSE that is included with this distribution.
|
||||
#*************************************************************************
|
||||
|
||||
=head1 B<Long Output Record (longout)>
|
||||
=title Long Output Record (longout)
|
||||
|
||||
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
|
||||
integer values of up to 32 bits and write them to hardware devices. The C<<<
|
||||
Soft Channel >>> device support layer 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<Contents>
|
||||
|
||||
=over
|
||||
|
||||
=item * L<Parameter Fields>
|
||||
|
||||
=over
|
||||
|
||||
=item * L<Scan Parameters>
|
||||
|
||||
=item * L<Desired Output Parameters>
|
||||
|
||||
=item * L<Write Parameters>
|
||||
|
||||
=item * L<Operator Display Parameters>
|
||||
|
||||
=item * L<Alarm Parameters>
|
||||
|
||||
=item * L<Monitor Parameters>
|
||||
|
||||
=item * L<Simulation Mode Parameters>
|
||||
|
||||
=back
|
||||
|
||||
=item * L<Record Support>
|
||||
|
||||
=over
|
||||
|
||||
=item * L<Record Support Routines>
|
||||
|
||||
=item * L<Record Processing>
|
||||
|
||||
=back
|
||||
|
||||
=item * L<Device Support>
|
||||
|
||||
=over
|
||||
|
||||
=item * L<Fields Of Interest To Device Support>
|
||||
|
||||
=item * L<Device Support Routines>
|
||||
|
||||
=item * L<Device Support For Soft Records>
|
||||
|
||||
=back
|
||||
|
||||
=back
|
||||
|
||||
=begin html
|
||||
|
||||
<br><hr><br>
|
||||
|
||||
=end html
|
||||
|
||||
=recordtype longout
|
||||
|
||||
=cut
|
||||
@@ -149,7 +95,7 @@ and database links.
|
||||
|
||||
=cut
|
||||
|
||||
include "dbCommon.dbd"
|
||||
include "dbCommon.dbd"
|
||||
field(VAL,DBF_LONG) {
|
||||
prompt("Desired Output")
|
||||
promptgroup("50 - Output")
|
||||
@@ -243,7 +189,7 @@ HYST field contains the alarm deadband around each limit alarm.
|
||||
See the See L<Alarm Specification> for a complete explanation of alarms and
|
||||
these fields. For an explanation of the IVOA and IVOV fields, see L<Output
|
||||
Records>. L<Alarm Fields> lists other fields related to a alarms that are common
|
||||
to all record types.
|
||||
to all record types.
|
||||
|
||||
=fields HIHI, HIGH, LOW, LOLO, HHSV, HSV, LSV, LLSV, HYST, IVOA, IVOV
|
||||
|
||||
|
||||
@@ -1,263 +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(mbbiDirect) {
|
||||
include "dbCommon.dbd"
|
||||
field(VAL,DBF_LONG) {
|
||||
prompt("Current Value")
|
||||
promptgroup("40 - Input")
|
||||
asl(ASL0)
|
||||
pp(TRUE)
|
||||
}
|
||||
field(NOBT,DBF_SHORT) {
|
||||
prompt("Number of Bits")
|
||||
promptgroup("40 - Input")
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(INP,DBF_INLINK) {
|
||||
prompt("Input Specification")
|
||||
promptgroup("40 - Input")
|
||||
interest(1)
|
||||
}
|
||||
field(RVAL,DBF_ULONG) {
|
||||
prompt("Raw Value")
|
||||
pp(TRUE)
|
||||
}
|
||||
field(ORAW,DBF_ULONG) {
|
||||
prompt("Prev Raw Value")
|
||||
special(SPC_NOMOD)
|
||||
interest(3)
|
||||
}
|
||||
field(MASK,DBF_ULONG) {
|
||||
prompt("Hardware Mask")
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(MLST,DBF_LONG) {
|
||||
prompt("Last Value Monitored")
|
||||
special(SPC_NOMOD)
|
||||
interest(3)
|
||||
}
|
||||
field(SHFT,DBF_USHORT) {
|
||||
prompt("Shift")
|
||||
promptgroup("40 - Input")
|
||||
interest(1)
|
||||
}
|
||||
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(menuSimm)
|
||||
}
|
||||
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("epicsCallback *simpvt")
|
||||
}
|
||||
field(B0,DBF_UCHAR) {
|
||||
prompt("Bit 0")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
}
|
||||
field(B1,DBF_UCHAR) {
|
||||
prompt("Bit 1")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
}
|
||||
field(B2,DBF_UCHAR) {
|
||||
prompt("Bit 2")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
}
|
||||
field(B3,DBF_UCHAR) {
|
||||
prompt("Bit 3")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
}
|
||||
field(B4,DBF_UCHAR) {
|
||||
prompt("Bit 4")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
}
|
||||
field(B5,DBF_UCHAR) {
|
||||
prompt("Bit 5")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
}
|
||||
field(B6,DBF_UCHAR) {
|
||||
prompt("Bit 6")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
}
|
||||
field(B7,DBF_UCHAR) {
|
||||
prompt("Bit 7")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
}
|
||||
field(B8,DBF_UCHAR) {
|
||||
prompt("Bit 8")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
}
|
||||
field(B9,DBF_UCHAR) {
|
||||
prompt("Bit 9")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
}
|
||||
field(BA,DBF_UCHAR) {
|
||||
prompt("Bit 10")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
}
|
||||
field(BB,DBF_UCHAR) {
|
||||
prompt("Bit 11")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
}
|
||||
field(BC,DBF_UCHAR) {
|
||||
prompt("Bit 12")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
}
|
||||
field(BD,DBF_UCHAR) {
|
||||
prompt("Bit 13")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
}
|
||||
field(BE,DBF_UCHAR) {
|
||||
prompt("Bit 14")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
}
|
||||
field(BF,DBF_UCHAR) {
|
||||
prompt("Bit 15")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
}
|
||||
field(B10,DBF_UCHAR) {
|
||||
prompt("Bit 16")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
}
|
||||
field(B11,DBF_UCHAR) {
|
||||
prompt("Bit 17")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
}
|
||||
field(B12,DBF_UCHAR) {
|
||||
prompt("Bit 18")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
}
|
||||
field(B13,DBF_UCHAR) {
|
||||
prompt("Bit 19")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
}
|
||||
field(B14,DBF_UCHAR) {
|
||||
prompt("Bit 20")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
}
|
||||
field(B15,DBF_UCHAR) {
|
||||
prompt("Bit 21")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
}
|
||||
field(B16,DBF_UCHAR) {
|
||||
prompt("Bit 22")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
}
|
||||
field(B17,DBF_UCHAR) {
|
||||
prompt("Bit 23")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
}
|
||||
field(B18,DBF_UCHAR) {
|
||||
prompt("Bit 24")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
}
|
||||
field(B19,DBF_UCHAR) {
|
||||
prompt("Bit 25")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
}
|
||||
field(B1A,DBF_UCHAR) {
|
||||
prompt("Bit 26")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
}
|
||||
field(B1B,DBF_UCHAR) {
|
||||
prompt("Bit 27")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
}
|
||||
field(B1C,DBF_UCHAR) {
|
||||
prompt("Bit 28")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
}
|
||||
field(B1D,DBF_UCHAR) {
|
||||
prompt("Bit 29")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
}
|
||||
field(B1E,DBF_UCHAR) {
|
||||
prompt("Bit 30")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
}
|
||||
field(B1F,DBF_UCHAR) {
|
||||
prompt("Bit 31")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
}
|
||||
}
|
||||
588
modules/database/src/std/rec/mbbiDirectRecord.dbd.pod
Normal file
588
modules/database/src/std/rec/mbbiDirectRecord.dbd.pod
Normal file
@@ -0,0 +1,588 @@
|
||||
#*************************************************************************
|
||||
# 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 Multi-Bit Binary Input Direct Record (mbbiDirect)
|
||||
|
||||
The mbbiDirect record retrieves a 32-bit hardware value and converts it to
|
||||
an array of 32 unsigned characters, each representing a bit of the word.
|
||||
These fields (B0-B9, BA-BF, B10-B19, B1A-B1F) are set to 1 if the corresponding
|
||||
bit is set, and 0 if not.
|
||||
|
||||
This record's operation is similar to that of the multi-bit binary input record,
|
||||
and it has many fields in common with it. This record also has two available
|
||||
soft device support modules: C<Soft Channel> and C<Raw Soft Channel>.
|
||||
|
||||
=recordtype mbbiDirect
|
||||
|
||||
=cut
|
||||
|
||||
recordtype(mbbiDirect) {
|
||||
|
||||
=head2 Parameter Fields
|
||||
|
||||
The record-specific fields are described below, grouped by functionality.
|
||||
|
||||
=head3 Scan Parameters
|
||||
|
||||
The mbbiDirect record has the standard fields for specifying under what
|
||||
circumstances the record will be processed. These fields are listed in L<Scan
|
||||
Fields>. In addition, L<Scanning Specification> explains how these fields are
|
||||
used. Note that I/O event scanning is only supported for those card types
|
||||
that interrupt.
|
||||
|
||||
=head3 Read and Convert Parameters
|
||||
|
||||
The device support routines obtain the record's input from the device or link
|
||||
specified in the INP field. 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. See L<Address Specification> for
|
||||
information on the format of hardware addresses.
|
||||
|
||||
Two soft device support modules can be specified in DTYP C<Soft Channel> and
|
||||
C<<< Raw Soft Channel >>>.
|
||||
|
||||
C<<< Raw Soft Channel >>> reads the value into RVAL,
|
||||
upon which the normal conversion process is undergone. C<<< Soft Channel >>>
|
||||
reads any unsigned integer directly into VAL. For a soft mbbiDirect record, the
|
||||
INP field can be a constant, a database, or a channel access link. If INP is a
|
||||
constant, then the VAL is initialized to the INP value but can be changed at
|
||||
run-time via dbPutField or dbPutLink. See L<Address Specification> for
|
||||
information on how to database links.
|
||||
|
||||
For records that don't use C<<< Soft Channel >>> device support, RVAL is used to
|
||||
determine VAL as follows:
|
||||
|
||||
=over
|
||||
|
||||
=item 1. RVAL is assigned to a temporary variable I<rval> = RVAL
|
||||
|
||||
=item 2. I<rval> is shifted right SHFT number of bits.
|
||||
|
||||
=item 3. VAL is set equal to I<rval>.
|
||||
|
||||
=back
|
||||
|
||||
Each of the fields, B0-BF and B10-B1F, represents one bit of the word.
|
||||
|
||||
=fields VAL, INP, RVAL, SHFT, B0, B1, B2, B3, B4, B5, B6, B7, B8, B9, BA, BB, BC, BD, BE, BF, B10, B11, B12, B13, B14, B15, B16, B17, B18, B19, B1A, B1B, B1C, B1D, B1E, B1F
|
||||
|
||||
=head3 Operator Display Parameters
|
||||
|
||||
These parameters are used to present meaningful data to the operator.
|
||||
|
||||
See L<Fields Common to All Record Types> for more on the record name (NAME) and
|
||||
description (DESC) fields.
|
||||
|
||||
=fields NAME, DESC
|
||||
|
||||
=cut
|
||||
|
||||
include "dbCommon.dbd"
|
||||
field(VAL,DBF_LONG) {
|
||||
prompt("Current Value")
|
||||
promptgroup("40 - Input")
|
||||
asl(ASL0)
|
||||
pp(TRUE)
|
||||
}
|
||||
field(NOBT,DBF_SHORT) {
|
||||
prompt("Number of Bits")
|
||||
promptgroup("40 - Input")
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(INP,DBF_INLINK) {
|
||||
prompt("Input Specification")
|
||||
promptgroup("40 - Input")
|
||||
interest(1)
|
||||
}
|
||||
field(RVAL,DBF_ULONG) {
|
||||
prompt("Raw Value")
|
||||
pp(TRUE)
|
||||
}
|
||||
field(ORAW,DBF_ULONG) {
|
||||
prompt("Prev Raw Value")
|
||||
special(SPC_NOMOD)
|
||||
interest(3)
|
||||
}
|
||||
field(MASK,DBF_ULONG) {
|
||||
prompt("Hardware Mask")
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(MLST,DBF_LONG) {
|
||||
prompt("Last Value Monitored")
|
||||
special(SPC_NOMOD)
|
||||
interest(3)
|
||||
}
|
||||
field(SHFT,DBF_USHORT) {
|
||||
prompt("Shift")
|
||||
promptgroup("40 - Input")
|
||||
interest(1)
|
||||
}
|
||||
|
||||
=head3 Run-time and Simulation Mode Parameters
|
||||
|
||||
These parameters are used by the run-time code for processing the mbbi direct
|
||||
record. They are not configurable prior to run-time.
|
||||
|
||||
MASK is used by device support routine to read hardware register. Record support
|
||||
sets low order NOBT bits in MASK. Device support can shift this value.
|
||||
|
||||
MLST holds the value when the last monitor for value change was triggered.
|
||||
|
||||
=fields NOBT, ORAW, MASK, MLST
|
||||
|
||||
The following fields are used to operate the mbbiDirect record in the simulation
|
||||
mode. See L<Fields Common to Many Record Types> for more information on these
|
||||
fields.
|
||||
|
||||
=fields SIOL, SVAL, SIML, SIMM, SIMS, SSCN, SDLY
|
||||
|
||||
=cut
|
||||
|
||||
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(menuSimm)
|
||||
}
|
||||
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("epicsCallback *simpvt")
|
||||
}
|
||||
|
||||
=head3 Alarm Parameters
|
||||
|
||||
The possible alarm conditions for multi-bit binary input direct records are the
|
||||
SCAN and READ alarms. These alarms are not configurable by the user since they
|
||||
are always of MAJOR severity. See L<Alarm Specification> for a complete
|
||||
explanation of Scan and Read alarms. No fields exist for the mbbi direct record
|
||||
to have state alarms.
|
||||
|
||||
L<Alarm Fields> lists other fields related to a alarms that are common to all
|
||||
record types.
|
||||
|
||||
=cut
|
||||
|
||||
field(B0,DBF_UCHAR) {
|
||||
prompt("Bit 0")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
}
|
||||
field(B1,DBF_UCHAR) {
|
||||
prompt("Bit 1")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
}
|
||||
field(B2,DBF_UCHAR) {
|
||||
prompt("Bit 2")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
}
|
||||
field(B3,DBF_UCHAR) {
|
||||
prompt("Bit 3")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
}
|
||||
field(B4,DBF_UCHAR) {
|
||||
prompt("Bit 4")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
}
|
||||
field(B5,DBF_UCHAR) {
|
||||
prompt("Bit 5")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
}
|
||||
field(B6,DBF_UCHAR) {
|
||||
prompt("Bit 6")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
}
|
||||
field(B7,DBF_UCHAR) {
|
||||
prompt("Bit 7")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
}
|
||||
field(B8,DBF_UCHAR) {
|
||||
prompt("Bit 8")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
}
|
||||
field(B9,DBF_UCHAR) {
|
||||
prompt("Bit 9")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
}
|
||||
field(BA,DBF_UCHAR) {
|
||||
prompt("Bit 10")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
}
|
||||
field(BB,DBF_UCHAR) {
|
||||
prompt("Bit 11")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
}
|
||||
field(BC,DBF_UCHAR) {
|
||||
prompt("Bit 12")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
}
|
||||
field(BD,DBF_UCHAR) {
|
||||
prompt("Bit 13")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
}
|
||||
field(BE,DBF_UCHAR) {
|
||||
prompt("Bit 14")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
}
|
||||
field(BF,DBF_UCHAR) {
|
||||
prompt("Bit 15")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
}
|
||||
field(B10,DBF_UCHAR) {
|
||||
prompt("Bit 16")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
}
|
||||
field(B11,DBF_UCHAR) {
|
||||
prompt("Bit 17")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
}
|
||||
field(B12,DBF_UCHAR) {
|
||||
prompt("Bit 18")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
}
|
||||
field(B13,DBF_UCHAR) {
|
||||
prompt("Bit 19")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
}
|
||||
field(B14,DBF_UCHAR) {
|
||||
prompt("Bit 20")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
}
|
||||
field(B15,DBF_UCHAR) {
|
||||
prompt("Bit 21")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
}
|
||||
field(B16,DBF_UCHAR) {
|
||||
prompt("Bit 22")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
}
|
||||
field(B17,DBF_UCHAR) {
|
||||
prompt("Bit 23")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
}
|
||||
field(B18,DBF_UCHAR) {
|
||||
prompt("Bit 24")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
}
|
||||
field(B19,DBF_UCHAR) {
|
||||
prompt("Bit 25")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
}
|
||||
field(B1A,DBF_UCHAR) {
|
||||
prompt("Bit 26")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
}
|
||||
field(B1B,DBF_UCHAR) {
|
||||
prompt("Bit 27")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
}
|
||||
field(B1C,DBF_UCHAR) {
|
||||
prompt("Bit 28")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
}
|
||||
field(B1D,DBF_UCHAR) {
|
||||
prompt("Bit 29")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
}
|
||||
field(B1E,DBF_UCHAR) {
|
||||
prompt("Bit 30")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
}
|
||||
field(B1F,DBF_UCHAR) {
|
||||
prompt("Bit 31")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
}
|
||||
|
||||
=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.
|
||||
|
||||
Clears MASK and then sets the NOBT low order bits.
|
||||
|
||||
If device support includes C<init_record()>, it is called.
|
||||
|
||||
refresh_bits is then called to refresh all the bit fields based on a hardware
|
||||
value.
|
||||
|
||||
=head4 process
|
||||
|
||||
See next section.
|
||||
|
||||
=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<Output Records> for 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.
|
||||
|
||||
Convert.
|
||||
|
||||
=over
|
||||
|
||||
=item * status = read_mbbiDirect
|
||||
|
||||
=item * PACT = TRUE
|
||||
|
||||
=item * C<recGblGetTimeStamp()> is called.
|
||||
|
||||
=item * If status is 0, then determine VAL
|
||||
|
||||
=over
|
||||
|
||||
=item * Set rval = RVAL
|
||||
|
||||
=item * Shift rval right SHFT bits
|
||||
|
||||
=item * Set VAL = RVAL
|
||||
|
||||
=back
|
||||
|
||||
=item * If status is 1, return 0
|
||||
|
||||
=item * If status is 2, set status = 0
|
||||
|
||||
=back
|
||||
|
||||
=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 MLST is not equal to VAL.
|
||||
|
||||
=item * Monitors for RVAL are checked whenever other monitors are invoked.
|
||||
|
||||
=item * NSEV and NSTA are reset to 0.
|
||||
|
||||
=back
|
||||
|
||||
=item 6.
|
||||
|
||||
Scan forward link if necessary, set PACT FALSE, and return.
|
||||
|
||||
=back
|
||||
|
||||
=begin html
|
||||
|
||||
<br><hr><br>
|
||||
|
||||
=end html
|
||||
|
||||
=head2 Device Support
|
||||
|
||||
=head3 Fields Of Interest To Device Support
|
||||
|
||||
Each input record must have an associated set of device support routines.
|
||||
|
||||
The primary responsibility of the device support routines is to obtain a new raw
|
||||
input value whenever read_mbbiDirect is called. The device support routines are
|
||||
primarily interested in the following fields:
|
||||
|
||||
=fields PACT, DPVT, UDF, NSEV, NSTA, NOBT, VAL, INP, RVAL, MASK, SHFT
|
||||
|
||||
=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<dbior> 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<level> 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<init_record()> calls are made, with
|
||||
the integer parameter C<after> set to 0.
|
||||
The second call happens after all of the C<init_record()> calls have been made,
|
||||
with C<after> set to 1.
|
||||
|
||||
=head4 init_record
|
||||
|
||||
init_record(precord)
|
||||
|
||||
This routine is optional. If provided, it is called by the record support
|
||||
C<init_record()> routine. If it uses MASK, it should shift it as necessary and
|
||||
also give SHFT a value.
|
||||
|
||||
=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 IE<sol>O event scan list. cmd has the value (0,1) if the
|
||||
record is being (added to, deleted from) an IE<sol>O event list. It must be
|
||||
provided for any device type that can use the ioEvent scanner.
|
||||
|
||||
=head4 read_mbbiDirect
|
||||
|
||||
read_mbbiDirect(precord)
|
||||
|
||||
This routine must provide a new input value. It returns the following values:
|
||||
|
||||
=over
|
||||
|
||||
=item *
|
||||
|
||||
0: Success. A new raw value is placed in RVAL. The record support module
|
||||
determines VAL from RVAL and SHFT.
|
||||
|
||||
=item *
|
||||
|
||||
2: Success, but don't modify VAL.
|
||||
|
||||
=item *
|
||||
|
||||
Other: Error.
|
||||
|
||||
=back
|
||||
|
||||
=head3 Device Support For Soft Records
|
||||
|
||||
Two soft device support modules, C<<< Soft Channel >>> and C<<< Raw Soft Channel
|
||||
>>>, are provided for multi-bit binary input direct records not related to
|
||||
actual hardware devices. The INP link type must be either CONSTANT, DB_LINK, or
|
||||
CA_LINK.
|
||||
|
||||
=head4 Soft Channel
|
||||
|
||||
For this module, read_mbbiDirect 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 into VAL by
|
||||
C<init_record()>, and UDF is set to FALSE. VAL can be changed via dbPut
|
||||
requests. If the INP link type is PV_LINK, then dbCaAddInlink is called by
|
||||
C<init_record()>.
|
||||
|
||||
read_mbbiDirect calls recGblGetLinkValue to read the current value of VAL.
|
||||
|
||||
See L<Input Records> for a further explanation.
|
||||
|
||||
If the return status of recGblGetLinkValue is zero, then read_mbbi sets UDF to
|
||||
FALSE. The status of recGblGetLinkValue is returned.
|
||||
|
||||
=head4 Raw Soft Channel
|
||||
|
||||
This module is like the previous except that values are read into RVAL, VAL is
|
||||
computed from RVAL, and read_mbbiDirect returns a value of 0. Thus the record
|
||||
processing routine will determine VAL in the normal way.
|
||||
|
||||
=cut
|
||||
|
||||
}
|
||||
@@ -1,505 +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(mbbi) {
|
||||
include "dbCommon.dbd"
|
||||
field(VAL,DBF_ENUM) {
|
||||
prompt("Current Value")
|
||||
promptgroup("40 - Input")
|
||||
asl(ASL0)
|
||||
pp(TRUE)
|
||||
}
|
||||
field(NOBT,DBF_USHORT) {
|
||||
prompt("Number of Bits")
|
||||
promptgroup("40 - Input")
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(INP,DBF_INLINK) {
|
||||
prompt("Input Specification")
|
||||
promptgroup("40 - Input")
|
||||
interest(1)
|
||||
}
|
||||
field(ZRVL,DBF_ULONG) {
|
||||
prompt("Zero Value")
|
||||
promptgroup("41 - Input 0-7")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
base(HEX)
|
||||
interest(1)
|
||||
}
|
||||
field(ONVL,DBF_ULONG) {
|
||||
prompt("One Value")
|
||||
promptgroup("41 - Input 0-7")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
base(HEX)
|
||||
interest(1)
|
||||
}
|
||||
field(TWVL,DBF_ULONG) {
|
||||
prompt("Two Value")
|
||||
promptgroup("41 - Input 0-7")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
base(HEX)
|
||||
interest(1)
|
||||
}
|
||||
field(THVL,DBF_ULONG) {
|
||||
prompt("Three Value")
|
||||
promptgroup("41 - Input 0-7")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
base(HEX)
|
||||
interest(1)
|
||||
}
|
||||
field(FRVL,DBF_ULONG) {
|
||||
prompt("Four Value")
|
||||
promptgroup("41 - Input 0-7")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
base(HEX)
|
||||
interest(1)
|
||||
}
|
||||
field(FVVL,DBF_ULONG) {
|
||||
prompt("Five Value")
|
||||
promptgroup("41 - Input 0-7")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
base(HEX)
|
||||
interest(1)
|
||||
}
|
||||
field(SXVL,DBF_ULONG) {
|
||||
prompt("Six Value")
|
||||
promptgroup("41 - Input 0-7")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
base(HEX)
|
||||
interest(1)
|
||||
}
|
||||
field(SVVL,DBF_ULONG) {
|
||||
prompt("Seven Value")
|
||||
promptgroup("41 - Input 0-7")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
base(HEX)
|
||||
interest(1)
|
||||
}
|
||||
field(EIVL,DBF_ULONG) {
|
||||
prompt("Eight Value")
|
||||
promptgroup("42 - Input 8-15")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
base(HEX)
|
||||
interest(1)
|
||||
}
|
||||
field(NIVL,DBF_ULONG) {
|
||||
prompt("Nine Value")
|
||||
promptgroup("42 - Input 8-15")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
base(HEX)
|
||||
interest(1)
|
||||
}
|
||||
field(TEVL,DBF_ULONG) {
|
||||
prompt("Ten Value")
|
||||
promptgroup("42 - Input 8-15")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
base(HEX)
|
||||
interest(1)
|
||||
}
|
||||
field(ELVL,DBF_ULONG) {
|
||||
prompt("Eleven Value")
|
||||
promptgroup("42 - Input 8-15")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
base(HEX)
|
||||
interest(1)
|
||||
}
|
||||
field(TVVL,DBF_ULONG) {
|
||||
prompt("Twelve Value")
|
||||
promptgroup("42 - Input 8-15")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
base(HEX)
|
||||
interest(1)
|
||||
}
|
||||
field(TTVL,DBF_ULONG) {
|
||||
prompt("Thirteen Value")
|
||||
promptgroup("42 - Input 8-15")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
base(HEX)
|
||||
interest(1)
|
||||
}
|
||||
field(FTVL,DBF_ULONG) {
|
||||
prompt("Fourteen Value")
|
||||
promptgroup("42 - Input 8-15")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
base(HEX)
|
||||
interest(1)
|
||||
}
|
||||
field(FFVL,DBF_ULONG) {
|
||||
prompt("Fifteen Value")
|
||||
promptgroup("42 - Input 8-15")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
base(HEX)
|
||||
interest(1)
|
||||
}
|
||||
field(ZRST,DBF_STRING) {
|
||||
prompt("Zero String")
|
||||
promptgroup("81 - Display 0-7")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
size(26)
|
||||
}
|
||||
field(ONST,DBF_STRING) {
|
||||
prompt("One String")
|
||||
promptgroup("81 - Display 0-7")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
size(26)
|
||||
}
|
||||
field(TWST,DBF_STRING) {
|
||||
prompt("Two String")
|
||||
promptgroup("81 - Display 0-7")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
size(26)
|
||||
}
|
||||
field(THST,DBF_STRING) {
|
||||
prompt("Three String")
|
||||
promptgroup("81 - Display 0-7")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
size(26)
|
||||
}
|
||||
field(FRST,DBF_STRING) {
|
||||
prompt("Four String")
|
||||
promptgroup("81 - Display 0-7")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
size(26)
|
||||
}
|
||||
field(FVST,DBF_STRING) {
|
||||
prompt("Five String")
|
||||
promptgroup("81 - Display 0-7")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
size(26)
|
||||
}
|
||||
field(SXST,DBF_STRING) {
|
||||
prompt("Six String")
|
||||
promptgroup("81 - Display 0-7")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
size(26)
|
||||
}
|
||||
field(SVST,DBF_STRING) {
|
||||
prompt("Seven String")
|
||||
promptgroup("81 - Display 0-7")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
size(26)
|
||||
}
|
||||
field(EIST,DBF_STRING) {
|
||||
prompt("Eight String")
|
||||
promptgroup("82 - Display 8-15")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
size(26)
|
||||
}
|
||||
field(NIST,DBF_STRING) {
|
||||
prompt("Nine String")
|
||||
promptgroup("82 - Display 8-15")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
size(26)
|
||||
}
|
||||
field(TEST,DBF_STRING) {
|
||||
prompt("Ten String")
|
||||
promptgroup("82 - Display 8-15")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
size(26)
|
||||
}
|
||||
field(ELST,DBF_STRING) {
|
||||
prompt("Eleven String")
|
||||
promptgroup("82 - Display 8-15")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
size(26)
|
||||
}
|
||||
field(TVST,DBF_STRING) {
|
||||
prompt("Twelve String")
|
||||
promptgroup("82 - Display 8-15")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
size(26)
|
||||
}
|
||||
field(TTST,DBF_STRING) {
|
||||
prompt("Thirteen String")
|
||||
promptgroup("82 - Display 8-15")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
size(26)
|
||||
}
|
||||
field(FTST,DBF_STRING) {
|
||||
prompt("Fourteen String")
|
||||
promptgroup("82 - Display 8-15")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
size(26)
|
||||
}
|
||||
field(FFST,DBF_STRING) {
|
||||
prompt("Fifteen String")
|
||||
promptgroup("82 - Display 8-15")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
size(26)
|
||||
}
|
||||
field(ZRSV,DBF_MENU) {
|
||||
prompt("State Zero Severity")
|
||||
promptgroup("71 - Alarm 0-7")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
menu(menuAlarmSevr)
|
||||
}
|
||||
field(ONSV,DBF_MENU) {
|
||||
prompt("State One Severity")
|
||||
promptgroup("71 - Alarm 0-7")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
menu(menuAlarmSevr)
|
||||
}
|
||||
field(TWSV,DBF_MENU) {
|
||||
prompt("State Two Severity")
|
||||
promptgroup("71 - Alarm 0-7")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
menu(menuAlarmSevr)
|
||||
}
|
||||
field(THSV,DBF_MENU) {
|
||||
prompt("State Three Severity")
|
||||
promptgroup("71 - Alarm 0-7")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
menu(menuAlarmSevr)
|
||||
}
|
||||
field(FRSV,DBF_MENU) {
|
||||
prompt("State Four Severity")
|
||||
promptgroup("71 - Alarm 0-7")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
menu(menuAlarmSevr)
|
||||
}
|
||||
field(FVSV,DBF_MENU) {
|
||||
prompt("State Five Severity")
|
||||
promptgroup("71 - Alarm 0-7")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
menu(menuAlarmSevr)
|
||||
}
|
||||
field(SXSV,DBF_MENU) {
|
||||
prompt("State Six Severity")
|
||||
promptgroup("71 - Alarm 0-7")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
menu(menuAlarmSevr)
|
||||
}
|
||||
field(SVSV,DBF_MENU) {
|
||||
prompt("State Seven Severity")
|
||||
promptgroup("71 - Alarm 0-7")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
menu(menuAlarmSevr)
|
||||
}
|
||||
field(EISV,DBF_MENU) {
|
||||
prompt("State Eight Severity")
|
||||
promptgroup("72 - Alarm 8-15")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
menu(menuAlarmSevr)
|
||||
}
|
||||
field(NISV,DBF_MENU) {
|
||||
prompt("State Nine Severity")
|
||||
promptgroup("72 - Alarm 8-15")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
menu(menuAlarmSevr)
|
||||
}
|
||||
field(TESV,DBF_MENU) {
|
||||
prompt("State Ten Severity")
|
||||
promptgroup("72 - Alarm 8-15")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
menu(menuAlarmSevr)
|
||||
}
|
||||
field(ELSV,DBF_MENU) {
|
||||
prompt("State Eleven Severity")
|
||||
promptgroup("72 - Alarm 8-15")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
menu(menuAlarmSevr)
|
||||
}
|
||||
field(TVSV,DBF_MENU) {
|
||||
prompt("State Twelve Severity")
|
||||
promptgroup("72 - Alarm 8-15")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
menu(menuAlarmSevr)
|
||||
}
|
||||
field(TTSV,DBF_MENU) {
|
||||
prompt("State Thirteen Sevr")
|
||||
promptgroup("72 - Alarm 8-15")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
menu(menuAlarmSevr)
|
||||
}
|
||||
field(FTSV,DBF_MENU) {
|
||||
prompt("State Fourteen Sevr")
|
||||
promptgroup("72 - Alarm 8-15")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
menu(menuAlarmSevr)
|
||||
}
|
||||
field(FFSV,DBF_MENU) {
|
||||
prompt("State Fifteen Severity")
|
||||
promptgroup("72 - Alarm 8-15")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
menu(menuAlarmSevr)
|
||||
}
|
||||
field(AFTC, DBF_DOUBLE) {
|
||||
prompt("Alarm Filter Time Constant")
|
||||
promptgroup("70 - Alarm")
|
||||
interest(1)
|
||||
}
|
||||
field(AFVL, DBF_DOUBLE) {
|
||||
prompt("Alarm Filter Value")
|
||||
special(SPC_NOMOD)
|
||||
interest(3)
|
||||
}
|
||||
field(UNSV,DBF_MENU) {
|
||||
prompt("Unknown State Severity")
|
||||
promptgroup("70 - Alarm")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
menu(menuAlarmSevr)
|
||||
}
|
||||
field(COSV,DBF_MENU) {
|
||||
prompt("Change of State Svr")
|
||||
promptgroup("70 - Alarm")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
menu(menuAlarmSevr)
|
||||
}
|
||||
field(RVAL,DBF_ULONG) {
|
||||
prompt("Raw Value")
|
||||
pp(TRUE)
|
||||
}
|
||||
field(ORAW,DBF_ULONG) {
|
||||
prompt("Prev Raw Value")
|
||||
special(SPC_NOMOD)
|
||||
interest(3)
|
||||
}
|
||||
field(MASK,DBF_ULONG) {
|
||||
prompt("Hardware Mask")
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(MLST,DBF_USHORT) {
|
||||
prompt("Last Value Monitored")
|
||||
special(SPC_NOMOD)
|
||||
interest(3)
|
||||
}
|
||||
field(LALM,DBF_USHORT) {
|
||||
prompt("Last Value Alarmed")
|
||||
special(SPC_NOMOD)
|
||||
interest(3)
|
||||
}
|
||||
field(SDEF,DBF_SHORT) {
|
||||
prompt("States Defined")
|
||||
special(SPC_NOMOD)
|
||||
interest(3)
|
||||
}
|
||||
field(SHFT,DBF_USHORT) {
|
||||
prompt("Shift")
|
||||
promptgroup("40 - Input")
|
||||
interest(1)
|
||||
}
|
||||
field(SIOL,DBF_INLINK) {
|
||||
prompt("Simulation Input Link")
|
||||
promptgroup("90 - Simulate")
|
||||
interest(1)
|
||||
}
|
||||
field(SVAL,DBF_ULONG) {
|
||||
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(menuSimm)
|
||||
}
|
||||
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("epicsCallback *simpvt")
|
||||
}
|
||||
}
|
||||
928
modules/database/src/std/rec/mbbiRecord.dbd.pod
Normal file
928
modules/database/src/std/rec/mbbiRecord.dbd.pod
Normal file
@@ -0,0 +1,928 @@
|
||||
#*************************************************************************
|
||||
# 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 Multi-Bit Binary Input Record (mbbi)
|
||||
|
||||
The normal use for the multi-bit binary input record is to read contiguous,
|
||||
multiple bit inputs from hardware. The binary value represents a state from a
|
||||
range of up to 16 states. The multi-bit input record interfaces with devices
|
||||
that use more than one bit.
|
||||
|
||||
Most device support modules obtain values from hardware and place the value in
|
||||
RVAL. For these device support modules record processing uses RVAL to determine
|
||||
the current state (VAL is given a value between 0 and 15). Device support
|
||||
modules may optionally read a value directly into VAL.
|
||||
|
||||
Soft device modules are provided to obtain input via database or channel access
|
||||
links or via dbPutField or dbPutLink requests. Two soft device support modules
|
||||
are provided: C<<< Soft Channel >>> allows VAL to be an arbitrary unsigned short
|
||||
integer. C<<< Raw Soft Channel >>> reads the value into RVAL just like normal
|
||||
device support modules.
|
||||
|
||||
=recordtype mbbi
|
||||
|
||||
=cut
|
||||
|
||||
recordtype(mbbi) {
|
||||
|
||||
=head2 Parameter Fields
|
||||
|
||||
The record-specific fields are described below, grouped by functionality.
|
||||
|
||||
=head3 Scan Parameters
|
||||
|
||||
The multi-bit binary input record has the standard fields for specifying under
|
||||
what circumstances it will be processed. These fields are listed in L<Scan
|
||||
Fields>. In addition, L<Scanning Specification> explains how these fields are
|
||||
used. Note that I/O event scanning is only supported for those card types that
|
||||
interrupt.
|
||||
|
||||
=head3 Read and Convert Parameters
|
||||
|
||||
The device support routines obtain the record's input from the device or link
|
||||
specified in the INP field. 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. See L<Address Specification> for
|
||||
information on the format of hardware addresses.
|
||||
|
||||
Two soft device support modules can be specified in DTYP C<Soft Channel> and
|
||||
C<<< Raw Soft Channel >>>.
|
||||
|
||||
C<<< Raw Soft Channel >>> reads the value into RVAL,
|
||||
upon which the normal conversion process is undergone. C<<< Soft Channel >>>
|
||||
reads any unsigned integer directly into VAL. For a soft mbbi record, the INP
|
||||
field can be a constant, a database, or a channel access link. If INP is a
|
||||
constant, then the VAL is initialized to the constant value but can be changed
|
||||
at run-time via dbPutField or dbPutLink. See L<Address Specification> for
|
||||
information on the format of database addresses.
|
||||
|
||||
MASK is used by the raw soft channel read routine, and by typical device support
|
||||
read routines, to select only the desired bits when reading the hardware
|
||||
register. It is initialized to ((1 E<lt>E<lt> NOBT) - 1) by record
|
||||
initialization. The user can configure the NOBT field, but the device support
|
||||
routines may set it, in which case the value given to it by the user is simply
|
||||
overridden. The device support routines may also override MASK or shift it
|
||||
left by SHFT bits. If MASK is non-zero, only the bits specified by MASK will
|
||||
appear in RVAL.
|
||||
|
||||
Unless the device support routine specifies no conversion, RVAL is used to
|
||||
determine VAL as follows:
|
||||
|
||||
=over
|
||||
|
||||
=item 1.
|
||||
|
||||
RVAL is assigned to a temporary variable -- rval = RVAL
|
||||
|
||||
=item 2.
|
||||
|
||||
rval is shifted right SHFT number of bits.
|
||||
|
||||
=item 3.
|
||||
|
||||
A match is sought between rval and one of the state value fields, ZRVL-FFVL.
|
||||
|
||||
=back
|
||||
|
||||
Each of the fields, ZRVL-FFVL, represents one of the possible sixteen states
|
||||
(not all sixteen have to be used).
|
||||
|
||||
Alternatively, the input value can be read as a string, in which case, a match
|
||||
is sought with one of the strings specified in the ZRST-FFST fields. Then RVAL
|
||||
is set equal to the corresponding value for that string, and the conversion
|
||||
process occurs.
|
||||
|
||||
=fields VAL, INP, MASK, NOBT, RVAL, SHFT, ZRVL, ONVL, TWVL, THVL, FRVL, FVVL, SXVL, SVVL, EIVL, NIVL, TEVL, ELVL, TVVL, TTVL, FTVL, FFVL
|
||||
|
||||
=head3 Operator Display Parameters
|
||||
|
||||
These parameters are used to present meaningful data to the operator. They
|
||||
display the value and other parameters of the mbbi record either textually or
|
||||
graphically. The ZRST-FFST fields contain strings describing one of the possible
|
||||
states of the record. The C<<< get_enum_str >>> and C<<< get_enum_strs >>>
|
||||
record routines retrieve these strings for the operator. C<<< Get_enum_str >>>
|
||||
gets the string corresponding to the value set in VAL, and C<<< get_enum_strs
|
||||
>>> retrieves all the strings.
|
||||
|
||||
See L<Fields Common to All Record Types> for more on the record name (NAME) and
|
||||
description (DESC) fields.
|
||||
|
||||
=fields NAME, DESC, ZRST, ONST, TWST, THST, FRST, FVST, SXST, SVST, EIST, NIST, TEST, ELST, TVST, TTST, FTST, FFST
|
||||
|
||||
=cut
|
||||
|
||||
include "dbCommon.dbd"
|
||||
field(VAL,DBF_ENUM) {
|
||||
prompt("Current Value")
|
||||
promptgroup("40 - Input")
|
||||
asl(ASL0)
|
||||
pp(TRUE)
|
||||
}
|
||||
field(NOBT,DBF_USHORT) {
|
||||
prompt("Number of Bits")
|
||||
promptgroup("40 - Input")
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(INP,DBF_INLINK) {
|
||||
prompt("Input Specification")
|
||||
promptgroup("40 - Input")
|
||||
interest(1)
|
||||
}
|
||||
field(ZRVL,DBF_ULONG) {
|
||||
prompt("Zero Value")
|
||||
promptgroup("41 - Input 0-7")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
base(HEX)
|
||||
interest(1)
|
||||
}
|
||||
field(ONVL,DBF_ULONG) {
|
||||
prompt("One Value")
|
||||
promptgroup("41 - Input 0-7")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
base(HEX)
|
||||
interest(1)
|
||||
}
|
||||
field(TWVL,DBF_ULONG) {
|
||||
prompt("Two Value")
|
||||
promptgroup("41 - Input 0-7")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
base(HEX)
|
||||
interest(1)
|
||||
}
|
||||
field(THVL,DBF_ULONG) {
|
||||
prompt("Three Value")
|
||||
promptgroup("41 - Input 0-7")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
base(HEX)
|
||||
interest(1)
|
||||
}
|
||||
field(FRVL,DBF_ULONG) {
|
||||
prompt("Four Value")
|
||||
promptgroup("41 - Input 0-7")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
base(HEX)
|
||||
interest(1)
|
||||
}
|
||||
field(FVVL,DBF_ULONG) {
|
||||
prompt("Five Value")
|
||||
promptgroup("41 - Input 0-7")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
base(HEX)
|
||||
interest(1)
|
||||
}
|
||||
field(SXVL,DBF_ULONG) {
|
||||
prompt("Six Value")
|
||||
promptgroup("41 - Input 0-7")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
base(HEX)
|
||||
interest(1)
|
||||
}
|
||||
field(SVVL,DBF_ULONG) {
|
||||
prompt("Seven Value")
|
||||
promptgroup("41 - Input 0-7")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
base(HEX)
|
||||
interest(1)
|
||||
}
|
||||
field(EIVL,DBF_ULONG) {
|
||||
prompt("Eight Value")
|
||||
promptgroup("42 - Input 8-15")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
base(HEX)
|
||||
interest(1)
|
||||
}
|
||||
field(NIVL,DBF_ULONG) {
|
||||
prompt("Nine Value")
|
||||
promptgroup("42 - Input 8-15")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
base(HEX)
|
||||
interest(1)
|
||||
}
|
||||
field(TEVL,DBF_ULONG) {
|
||||
prompt("Ten Value")
|
||||
promptgroup("42 - Input 8-15")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
base(HEX)
|
||||
interest(1)
|
||||
}
|
||||
field(ELVL,DBF_ULONG) {
|
||||
prompt("Eleven Value")
|
||||
promptgroup("42 - Input 8-15")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
base(HEX)
|
||||
interest(1)
|
||||
}
|
||||
field(TVVL,DBF_ULONG) {
|
||||
prompt("Twelve Value")
|
||||
promptgroup("42 - Input 8-15")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
base(HEX)
|
||||
interest(1)
|
||||
}
|
||||
field(TTVL,DBF_ULONG) {
|
||||
prompt("Thirteen Value")
|
||||
promptgroup("42 - Input 8-15")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
base(HEX)
|
||||
interest(1)
|
||||
}
|
||||
field(FTVL,DBF_ULONG) {
|
||||
prompt("Fourteen Value")
|
||||
promptgroup("42 - Input 8-15")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
base(HEX)
|
||||
interest(1)
|
||||
}
|
||||
field(FFVL,DBF_ULONG) {
|
||||
prompt("Fifteen Value")
|
||||
promptgroup("42 - Input 8-15")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
base(HEX)
|
||||
interest(1)
|
||||
}
|
||||
field(ZRST,DBF_STRING) {
|
||||
prompt("Zero String")
|
||||
promptgroup("81 - Display 0-7")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
size(26)
|
||||
}
|
||||
field(ONST,DBF_STRING) {
|
||||
prompt("One String")
|
||||
promptgroup("81 - Display 0-7")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
size(26)
|
||||
}
|
||||
field(TWST,DBF_STRING) {
|
||||
prompt("Two String")
|
||||
promptgroup("81 - Display 0-7")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
size(26)
|
||||
}
|
||||
field(THST,DBF_STRING) {
|
||||
prompt("Three String")
|
||||
promptgroup("81 - Display 0-7")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
size(26)
|
||||
}
|
||||
field(FRST,DBF_STRING) {
|
||||
prompt("Four String")
|
||||
promptgroup("81 - Display 0-7")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
size(26)
|
||||
}
|
||||
field(FVST,DBF_STRING) {
|
||||
prompt("Five String")
|
||||
promptgroup("81 - Display 0-7")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
size(26)
|
||||
}
|
||||
field(SXST,DBF_STRING) {
|
||||
prompt("Six String")
|
||||
promptgroup("81 - Display 0-7")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
size(26)
|
||||
}
|
||||
field(SVST,DBF_STRING) {
|
||||
prompt("Seven String")
|
||||
promptgroup("81 - Display 0-7")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
size(26)
|
||||
}
|
||||
field(EIST,DBF_STRING) {
|
||||
prompt("Eight String")
|
||||
promptgroup("82 - Display 8-15")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
size(26)
|
||||
}
|
||||
field(NIST,DBF_STRING) {
|
||||
prompt("Nine String")
|
||||
promptgroup("82 - Display 8-15")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
size(26)
|
||||
}
|
||||
field(TEST,DBF_STRING) {
|
||||
prompt("Ten String")
|
||||
promptgroup("82 - Display 8-15")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
size(26)
|
||||
}
|
||||
field(ELST,DBF_STRING) {
|
||||
prompt("Eleven String")
|
||||
promptgroup("82 - Display 8-15")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
size(26)
|
||||
}
|
||||
field(TVST,DBF_STRING) {
|
||||
prompt("Twelve String")
|
||||
promptgroup("82 - Display 8-15")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
size(26)
|
||||
}
|
||||
field(TTST,DBF_STRING) {
|
||||
prompt("Thirteen String")
|
||||
promptgroup("82 - Display 8-15")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
size(26)
|
||||
}
|
||||
field(FTST,DBF_STRING) {
|
||||
prompt("Fourteen String")
|
||||
promptgroup("82 - Display 8-15")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
size(26)
|
||||
}
|
||||
field(FFST,DBF_STRING) {
|
||||
prompt("Fifteen String")
|
||||
promptgroup("82 - Display 8-15")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
size(26)
|
||||
}
|
||||
|
||||
=head3 Alarm Parameters
|
||||
|
||||
The possible alarm conditions for multi-bit binary inputs are the SCAN, READ,
|
||||
and state alarms. The state alarms are configured in the below severity fields.
|
||||
These fields have the usual possible values for severity fields: NO_ALARM,
|
||||
MINOR, and MAJOR.
|
||||
|
||||
The unknown state severity (UNSV) field, if set to MINOR or MAJOR, triggers an
|
||||
alarm when the record support routine cannot find a matching value in the state
|
||||
value fields for C<<< rval >>>.
|
||||
|
||||
The change of state severity (COSV) field triggers an alarm when any change of
|
||||
state occurs, if set to MAJOR or MINOR.
|
||||
|
||||
The other fields, when set to MAJOR or MINOR, trigger an alarm when VAL equals
|
||||
the corresponding state. See the See L<Alarm Specification> for a complete
|
||||
explanation of discrete alarms and these fields. L<Alarm Fields> lists other
|
||||
fields related to a alarms that are common to all record types.
|
||||
|
||||
=fields UNSV, COSV, ZRSV, ONSV, TWSV, THSV, FRSV, FVSV, SXSV, SVSV, EISV, NISV, TESV, ELSV, TVSV, TTSV, FTSV, FFSV
|
||||
|
||||
=cut
|
||||
|
||||
field(ZRSV,DBF_MENU) {
|
||||
prompt("State Zero Severity")
|
||||
promptgroup("71 - Alarm 0-7")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
menu(menuAlarmSevr)
|
||||
}
|
||||
field(ONSV,DBF_MENU) {
|
||||
prompt("State One Severity")
|
||||
promptgroup("71 - Alarm 0-7")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
menu(menuAlarmSevr)
|
||||
}
|
||||
field(TWSV,DBF_MENU) {
|
||||
prompt("State Two Severity")
|
||||
promptgroup("71 - Alarm 0-7")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
menu(menuAlarmSevr)
|
||||
}
|
||||
field(THSV,DBF_MENU) {
|
||||
prompt("State Three Severity")
|
||||
promptgroup("71 - Alarm 0-7")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
menu(menuAlarmSevr)
|
||||
}
|
||||
field(FRSV,DBF_MENU) {
|
||||
prompt("State Four Severity")
|
||||
promptgroup("71 - Alarm 0-7")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
menu(menuAlarmSevr)
|
||||
}
|
||||
field(FVSV,DBF_MENU) {
|
||||
prompt("State Five Severity")
|
||||
promptgroup("71 - Alarm 0-7")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
menu(menuAlarmSevr)
|
||||
}
|
||||
field(SXSV,DBF_MENU) {
|
||||
prompt("State Six Severity")
|
||||
promptgroup("71 - Alarm 0-7")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
menu(menuAlarmSevr)
|
||||
}
|
||||
field(SVSV,DBF_MENU) {
|
||||
prompt("State Seven Severity")
|
||||
promptgroup("71 - Alarm 0-7")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
menu(menuAlarmSevr)
|
||||
}
|
||||
field(EISV,DBF_MENU) {
|
||||
prompt("State Eight Severity")
|
||||
promptgroup("72 - Alarm 8-15")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
menu(menuAlarmSevr)
|
||||
}
|
||||
field(NISV,DBF_MENU) {
|
||||
prompt("State Nine Severity")
|
||||
promptgroup("72 - Alarm 8-15")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
menu(menuAlarmSevr)
|
||||
}
|
||||
field(TESV,DBF_MENU) {
|
||||
prompt("State Ten Severity")
|
||||
promptgroup("72 - Alarm 8-15")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
menu(menuAlarmSevr)
|
||||
}
|
||||
field(ELSV,DBF_MENU) {
|
||||
prompt("State Eleven Severity")
|
||||
promptgroup("72 - Alarm 8-15")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
menu(menuAlarmSevr)
|
||||
}
|
||||
field(TVSV,DBF_MENU) {
|
||||
prompt("State Twelve Severity")
|
||||
promptgroup("72 - Alarm 8-15")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
menu(menuAlarmSevr)
|
||||
}
|
||||
field(TTSV,DBF_MENU) {
|
||||
prompt("State Thirteen Sevr")
|
||||
promptgroup("72 - Alarm 8-15")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
menu(menuAlarmSevr)
|
||||
}
|
||||
field(FTSV,DBF_MENU) {
|
||||
prompt("State Fourteen Sevr")
|
||||
promptgroup("72 - Alarm 8-15")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
menu(menuAlarmSevr)
|
||||
}
|
||||
field(FFSV,DBF_MENU) {
|
||||
prompt("State Fifteen Severity")
|
||||
promptgroup("72 - Alarm 8-15")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
menu(menuAlarmSevr)
|
||||
}
|
||||
field(AFTC, DBF_DOUBLE) {
|
||||
prompt("Alarm Filter Time Constant")
|
||||
promptgroup("70 - Alarm")
|
||||
interest(1)
|
||||
}
|
||||
field(AFVL, DBF_DOUBLE) {
|
||||
prompt("Alarm Filter Value")
|
||||
special(SPC_NOMOD)
|
||||
interest(3)
|
||||
}
|
||||
field(UNSV,DBF_MENU) {
|
||||
prompt("Unknown State Severity")
|
||||
promptgroup("70 - Alarm")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
menu(menuAlarmSevr)
|
||||
}
|
||||
field(COSV,DBF_MENU) {
|
||||
prompt("Change of State Svr")
|
||||
promptgroup("70 - Alarm")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
menu(menuAlarmSevr)
|
||||
}
|
||||
|
||||
=head3 Run-time Parameters
|
||||
|
||||
These parameters are used by the run-time code for processing the multi-bit
|
||||
binary input.
|
||||
|
||||
ORAW is used by record processing to hold the prior RVAL for use in determining
|
||||
when to post a monitor event for the RVAL field.
|
||||
|
||||
The LALM field implements the change of state alarm severity by holding the
|
||||
value of VAL when the previous change of state alarm was issued.
|
||||
|
||||
MLST holds the value when the last monitor for value change was triggered.
|
||||
|
||||
SDEF is used by record support to save time if no states are defined.
|
||||
|
||||
=fields ORAW, LALM, MLST, SDEF
|
||||
|
||||
=cut
|
||||
|
||||
field(RVAL,DBF_ULONG) {
|
||||
prompt("Raw Value")
|
||||
pp(TRUE)
|
||||
}
|
||||
field(ORAW,DBF_ULONG) {
|
||||
prompt("Prev Raw Value")
|
||||
special(SPC_NOMOD)
|
||||
interest(3)
|
||||
}
|
||||
field(MASK,DBF_ULONG) {
|
||||
prompt("Hardware Mask")
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(MLST,DBF_USHORT) {
|
||||
prompt("Last Value Monitored")
|
||||
special(SPC_NOMOD)
|
||||
interest(3)
|
||||
}
|
||||
field(LALM,DBF_USHORT) {
|
||||
prompt("Last Value Alarmed")
|
||||
special(SPC_NOMOD)
|
||||
interest(3)
|
||||
}
|
||||
field(SDEF,DBF_SHORT) {
|
||||
prompt("States Defined")
|
||||
special(SPC_NOMOD)
|
||||
interest(3)
|
||||
}
|
||||
field(SHFT,DBF_USHORT) {
|
||||
prompt("Shift")
|
||||
promptgroup("40 - Input")
|
||||
interest(1)
|
||||
}
|
||||
|
||||
=head3 Simulation Mode Parameters
|
||||
|
||||
The following fields are used to operate the mbbi record in the simulation mode.
|
||||
See L<Fields Common to Many Record Types> for more information on these fields.
|
||||
|
||||
=fields SIOL, SVAL, SIML, SIMM, SIMS, SSCN, SDLY
|
||||
|
||||
=cut
|
||||
|
||||
field(SIOL,DBF_INLINK) {
|
||||
prompt("Simulation Input Link")
|
||||
promptgroup("90 - Simulate")
|
||||
interest(1)
|
||||
}
|
||||
field(SVAL,DBF_ULONG) {
|
||||
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(menuSimm)
|
||||
}
|
||||
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("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 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.
|
||||
|
||||
Clears MASK and then sets the NOBT low order bits.
|
||||
|
||||
If device support includes C<init_record()>, it is called.
|
||||
|
||||
init_common is then called to determine if any states are defined. If states are
|
||||
defined, SDEF is set to TRUE.
|
||||
|
||||
=head4 process
|
||||
|
||||
See next section.
|
||||
|
||||
=head4 special
|
||||
|
||||
Calls init_common to compute SDEF when any of the fields ZRVL, ... FFVL change
|
||||
value.
|
||||
|
||||
=head4 get_enum_str
|
||||
|
||||
Retrieves ASCII string corresponding to VAL.
|
||||
|
||||
=head4 get_enum_strs
|
||||
|
||||
Retrieves ASCII strings for ZRST,...FFST.
|
||||
|
||||
=head4 put_enum_str
|
||||
|
||||
Checks if string matches ZRST,...FFST and if it does, sets VAL.
|
||||
|
||||
=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<Input Records> 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.
|
||||
|
||||
Convert:
|
||||
|
||||
=over
|
||||
|
||||
=item * status=read_mbbi
|
||||
|
||||
=item * PACT = TRUE
|
||||
|
||||
=item * C<recGblGetTimeStamp()> is called.
|
||||
|
||||
=item * If status is 0, then determine VAL
|
||||
|
||||
=over
|
||||
|
||||
=item * Set rval = RVAL
|
||||
|
||||
=item * Shift rval right SHFT bits
|
||||
|
||||
=back
|
||||
|
||||
=item * If at least one state value is defined
|
||||
|
||||
=over
|
||||
|
||||
=item * Set UDF to TRUE
|
||||
|
||||
=back
|
||||
|
||||
=item * If RVAL is ZRVL,...,FFVL then set
|
||||
|
||||
=over
|
||||
|
||||
=item * VAL equals index of state
|
||||
|
||||
=item * UDF set to FALSE
|
||||
|
||||
=back
|
||||
|
||||
=item * Else set VAL = undefined
|
||||
|
||||
=over
|
||||
|
||||
=item * Else set VAL = RVAL
|
||||
|
||||
=back
|
||||
|
||||
=item * Set UDF to FALSE
|
||||
|
||||
=over
|
||||
|
||||
=item * If status is 1, return 0
|
||||
|
||||
=item * If status is 2, set status = 0
|
||||
|
||||
=back
|
||||
|
||||
=back
|
||||
|
||||
=item 5.
|
||||
|
||||
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.
|
||||
|
||||
=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 MLST is not equal to VAL.
|
||||
|
||||
=item * Monitors for RVAL are checked whenever other monitors are invoked.
|
||||
|
||||
=item * NSEV and NSTA are reset to 0.
|
||||
|
||||
=back
|
||||
|
||||
=item 7.
|
||||
|
||||
Scan forward link if necessary, set PACT FALSE, and return.
|
||||
|
||||
=back
|
||||
|
||||
=head2 Device Support
|
||||
|
||||
=head3 Fields Of Interest To Device Support
|
||||
|
||||
Each input record must have an associated set of device support routines.
|
||||
|
||||
The primary responsibility of the device support routines is to obtain a new raw
|
||||
input value whenever read_mbbi is called. The device support routines are
|
||||
primarily interested in the following fields:
|
||||
|
||||
=fields PACT, DPVT, UDF, NSEV, NSTA, NOBT, VAL, INP, RVAL, MASK, SHFT
|
||||
|
||||
=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<dbior> 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<level> 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<init_record()> calls are made, with
|
||||
the integer parameter C<after> set to 0.
|
||||
The second call happens after all of the C<init_record()> calls have been made,
|
||||
with C<after> set to 1.
|
||||
|
||||
=head4 init_record
|
||||
|
||||
init_record(precord)
|
||||
|
||||
This routine is optional. If provided, it is called by the record support
|
||||
C<init_record()> routine. If it uses MASK, it should shift it as necessary and
|
||||
also give SHFT a value.
|
||||
|
||||
=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 I/O Event scanner.
|
||||
|
||||
=head4 read_mbbi
|
||||
|
||||
read_mbbi(precord)
|
||||
|
||||
This routine must provide a new input value. It returns the following values:
|
||||
|
||||
=over
|
||||
|
||||
=item *
|
||||
|
||||
0: Success. A new raw value is placed in RVAL. The record support module
|
||||
determines VAL from RVAL, SHFT, and ZEVL ... FFVL.
|
||||
|
||||
=item *
|
||||
|
||||
2: Success, but don't modify VAL.
|
||||
|
||||
=item *
|
||||
|
||||
Other: Error.
|
||||
|
||||
=back
|
||||
|
||||
=head3 Device Support For Soft Records
|
||||
|
||||
Two soft device support modules C<<< Soft Channel >>> and C<<< Raw Soft Channel
|
||||
>>> are provided for multi-bit binary input records not related to actual
|
||||
hardware devices. The INP link type must be either CONSTANT, DB_LINK, or
|
||||
CA_LINK.
|
||||
|
||||
=head4 Soft Channel
|
||||
|
||||
read_mbbi 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 into VAL by
|
||||
C<init_record()>, and UDF is set to FALSE. VAL can be changed via dbPut
|
||||
requests. If the INP link type is PV_LINK, then dbCaAddInlink is called by
|
||||
C<init_record()>.
|
||||
|
||||
read_mbbi calls recGblGetLinkValue to read the current value of VAL. See L<Soft
|
||||
Input>.
|
||||
|
||||
If the return status of recGblGetLinkValue is zero, then read_mbbi sets UDF to
|
||||
FALSE. The status of recGblGetLinkValue is returned.
|
||||
|
||||
=head4 Raw Soft Channel
|
||||
|
||||
This module is like the previous except that values are read into RVAL, VAL is
|
||||
computed from RVAL, and read_mbbi returns a value of 0. Thus the record
|
||||
processing routine will determine VAL in the normal way.
|
||||
|
||||
=cut
|
||||
|
||||
}
|
||||
@@ -1,358 +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(mbboDirect) {
|
||||
include "dbCommon.dbd"
|
||||
field(VAL,DBF_LONG) {
|
||||
prompt("Word")
|
||||
promptgroup("50 - Output")
|
||||
asl(ASL0)
|
||||
pp(TRUE)
|
||||
}
|
||||
field(OMSL,DBF_MENU) {
|
||||
prompt("Output Mode Select")
|
||||
promptgroup("50 - Output")
|
||||
special(SPC_RESET)
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
menu(menuOmsl)
|
||||
}
|
||||
field(NOBT,DBF_SHORT) {
|
||||
prompt("Number of Bits")
|
||||
promptgroup("50 - Output")
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(DOL,DBF_INLINK) {
|
||||
prompt("Desired Output Loc")
|
||||
promptgroup("40 - Input")
|
||||
interest(1)
|
||||
}
|
||||
field(OUT,DBF_OUTLINK) {
|
||||
prompt("Output Specification")
|
||||
promptgroup("50 - Output")
|
||||
interest(1)
|
||||
}
|
||||
field(RVAL,DBF_ULONG) {
|
||||
prompt("Raw Value")
|
||||
special(SPC_NOMOD)
|
||||
pp(TRUE)
|
||||
}
|
||||
field(ORAW,DBF_ULONG) {
|
||||
prompt("Prev Raw Value")
|
||||
special(SPC_NOMOD)
|
||||
interest(3)
|
||||
}
|
||||
field(RBV,DBF_ULONG) {
|
||||
prompt("Readback Value")
|
||||
special(SPC_NOMOD)
|
||||
}
|
||||
field(ORBV,DBF_ULONG) {
|
||||
prompt("Prev Readback Value")
|
||||
special(SPC_NOMOD)
|
||||
interest(3)
|
||||
}
|
||||
field(MASK,DBF_ULONG) {
|
||||
prompt("Hardware Mask")
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(MLST,DBF_LONG) {
|
||||
prompt("Last Value Monitored")
|
||||
special(SPC_NOMOD)
|
||||
interest(3)
|
||||
}
|
||||
field(SHFT,DBF_USHORT) {
|
||||
prompt("Shift")
|
||||
promptgroup("50 - Output")
|
||||
interest(1)
|
||||
}
|
||||
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("epicsCallback *simpvt")
|
||||
}
|
||||
field(IVOA,DBF_MENU) {
|
||||
prompt("INVALID outpt action")
|
||||
promptgroup("50 - Output")
|
||||
interest(2)
|
||||
menu(menuIvoa)
|
||||
}
|
||||
field(IVOV,DBF_LONG) {
|
||||
prompt("INVALID output value")
|
||||
promptgroup("50 - Output")
|
||||
interest(2)
|
||||
}
|
||||
field(B0,DBF_UCHAR) {
|
||||
prompt("Bit 0")
|
||||
promptgroup("51 - Output 0-7")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
}
|
||||
field(B1,DBF_UCHAR) {
|
||||
prompt("Bit 1")
|
||||
promptgroup("51 - Output 0-7")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
}
|
||||
field(B2,DBF_UCHAR) {
|
||||
prompt("Bit 2")
|
||||
promptgroup("51 - Output 0-7")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
}
|
||||
field(B3,DBF_UCHAR) {
|
||||
prompt("Bit 3")
|
||||
promptgroup("51 - Output 0-7")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
}
|
||||
field(B4,DBF_UCHAR) {
|
||||
prompt("Bit 4")
|
||||
promptgroup("51 - Output 0-7")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
}
|
||||
field(B5,DBF_UCHAR) {
|
||||
prompt("Bit 5")
|
||||
promptgroup("51 - Output 0-7")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
}
|
||||
field(B6,DBF_UCHAR) {
|
||||
prompt("Bit 6")
|
||||
promptgroup("51 - Output 0-7")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
}
|
||||
field(B7,DBF_UCHAR) {
|
||||
prompt("Bit 7")
|
||||
promptgroup("51 - Output 0-7")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
}
|
||||
field(B8,DBF_UCHAR) {
|
||||
prompt("Bit 8")
|
||||
promptgroup("52 - Output 8-15")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
}
|
||||
field(B9,DBF_UCHAR) {
|
||||
prompt("Bit 9")
|
||||
promptgroup("52 - Output 8-15")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
}
|
||||
field(BA,DBF_UCHAR) {
|
||||
prompt("Bit 10")
|
||||
promptgroup("52 - Output 8-15")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
}
|
||||
field(BB,DBF_UCHAR) {
|
||||
prompt("Bit 11")
|
||||
promptgroup("52 - Output 8-15")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
}
|
||||
field(BC,DBF_UCHAR) {
|
||||
prompt("Bit 12")
|
||||
promptgroup("52 - Output 8-15")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
}
|
||||
field(BD,DBF_UCHAR) {
|
||||
prompt("Bit 13")
|
||||
promptgroup("52 - Output 8-15")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
}
|
||||
field(BE,DBF_UCHAR) {
|
||||
prompt("Bit 14")
|
||||
promptgroup("52 - Output 8-15")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
}
|
||||
field(BF,DBF_UCHAR) {
|
||||
prompt("Bit 15")
|
||||
promptgroup("52 - Output 8-15")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
}
|
||||
field(B10,DBF_UCHAR) {
|
||||
prompt("Bit 16")
|
||||
promptgroup("53 - Output 16-23")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
}
|
||||
field(B11,DBF_UCHAR) {
|
||||
prompt("Bit 17")
|
||||
promptgroup("53 - Output 16-23")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
}
|
||||
field(B12,DBF_UCHAR) {
|
||||
prompt("Bit 18")
|
||||
promptgroup("53 - Output 16-23")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
}
|
||||
field(B13,DBF_UCHAR) {
|
||||
prompt("Bit 19")
|
||||
promptgroup("53 - Output 16-23")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
}
|
||||
field(B14,DBF_UCHAR) {
|
||||
prompt("Bit 20")
|
||||
promptgroup("53 - Output 16-23")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
}
|
||||
field(B15,DBF_UCHAR) {
|
||||
prompt("Bit 21")
|
||||
promptgroup("53 - Output 16-23")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
}
|
||||
field(B16,DBF_UCHAR) {
|
||||
prompt("Bit 22")
|
||||
promptgroup("53 - Output 16-23")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
}
|
||||
field(B17,DBF_UCHAR) {
|
||||
prompt("Bit 23")
|
||||
promptgroup("53 - Output 16-23")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
}
|
||||
field(B18,DBF_UCHAR) {
|
||||
prompt("Bit 24")
|
||||
promptgroup("54 - Output 24-31")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
}
|
||||
field(B19,DBF_UCHAR) {
|
||||
prompt("Bit 25")
|
||||
promptgroup("54 - Output 24-31")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
}
|
||||
field(B1A,DBF_UCHAR) {
|
||||
prompt("Bit 26")
|
||||
promptgroup("54 - Output 24-31")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
}
|
||||
field(B1B,DBF_UCHAR) {
|
||||
prompt("Bit 27")
|
||||
promptgroup("54 - Output 24-31")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
}
|
||||
field(B1C,DBF_UCHAR) {
|
||||
prompt("Bit 28")
|
||||
promptgroup("54 - Output 24-31")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
}
|
||||
field(B1D,DBF_UCHAR) {
|
||||
prompt("Bit 29")
|
||||
promptgroup("54 - Output 24-31")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
}
|
||||
field(B1E,DBF_UCHAR) {
|
||||
prompt("Bit 30")
|
||||
promptgroup("54 - Output 24-31")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
}
|
||||
field(B1F,DBF_UCHAR) {
|
||||
prompt("Bit 31")
|
||||
promptgroup("54 - Output 24-31")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
}
|
||||
}
|
||||
672
modules/database/src/std/rec/mbboDirectRecord.dbd.pod
Normal file
672
modules/database/src/std/rec/mbboDirectRecord.dbd.pod
Normal file
@@ -0,0 +1,672 @@
|
||||
#*************************************************************************
|
||||
# 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 Multi-Bit Binary Output Direct Record (mbboDirect)
|
||||
|
||||
The mbboDirect record performs the opposite function to that of the mbbiDirect
|
||||
record. It accumulates bits (in the fields B0 - BF) as unsigned characters, and
|
||||
converts them to a word which is then written out to hardware. If a bit field is
|
||||
non-zero, it is interpreted as a binary 1. On the other hand, if it is zero, it
|
||||
is interpreted as a binary 0.
|
||||
|
||||
=recordtype mbboDirect
|
||||
|
||||
=cut
|
||||
|
||||
recordtype(mbboDirect) {
|
||||
|
||||
=head2 Parameter Fields
|
||||
|
||||
The record-specific fields are described below, grouped by functionality.
|
||||
|
||||
=head3 Scan Parameters
|
||||
|
||||
The mbboDirect record has the standard fields for specifying under what
|
||||
circumstances it will be processed. These fields are listed in L<Scan Fields>.
|
||||
In addition, L<Scanning Specification> 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 mbboDirect record, like all output records, must specify where its output
|
||||
originates. The output mode select field (OMSL) 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 DOL field is ignored and the current value of VAL is used. The desired
|
||||
output can be written into the VAL field via dpPuts at run-time when the record
|
||||
is in C<<< supervisory >>> mode. DOL can also be a constant, in which case VAL
|
||||
is initialized to the constant value. Note that OMSL cannot be C<<< closed_loop
|
||||
>>> when DOL is a constant. See L<Address Specification> for information on how
|
||||
to specify database links.
|
||||
|
||||
VAL is then converted to RVAL in the routine described in the next section.
|
||||
However, the C<<< Soft Channel >>> device support module for the mbboDirect
|
||||
record writes the VAL field's value without any conversion.
|
||||
|
||||
=fields OMSL, DOL, VAL
|
||||
|
||||
=head3 Convert and Write Parameters
|
||||
|
||||
For records that are to write values to hardware devices, the OUT output link
|
||||
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. See L<Address Specification> for information
|
||||
on the format of hardware addresses.
|
||||
|
||||
If the mbboDirect record does not use the C<<< Soft Channel >>> device support
|
||||
module, then VAL is converted to RVAL, and RVAL is the actual 16-bit word sent
|
||||
out. RVAL is set equal to VAL and then shifted left by the number of bits
|
||||
specified in the SHFT field (the SHFT value is set by device support and is not
|
||||
configurable by the user). RVAL is then sent out to the location specified in
|
||||
the OUT field.
|
||||
|
||||
For mbboDirect records that specify a database link, a channel access link, or a
|
||||
constant, the DTYP field must specify either one of two soft device support
|
||||
routines--{Soft Channel} or C<<< Raw Soft Channel >>>. The difference between
|
||||
the two is that C<<< Soft Channel >>> writes the desired output value from VAL
|
||||
directly to the output link while C<<< Raw Soft Channel >>> writes the value
|
||||
from RVAL to the output link after it has undergone the conversion described
|
||||
above. See L<Address Specification> for information on how to specify database
|
||||
links.
|
||||
|
||||
=fields OUT, RVAL, SHFT, B0, B1, B2, B3, B4, B5, B6, B7, B8, B9, BA, BB, BC, BD, BE, BF
|
||||
|
||||
=head3 Operator Display Parameters
|
||||
|
||||
See L<Fields Common to All Record Types> for more on the record name (NAME) and
|
||||
description (DESC) fields.
|
||||
|
||||
=fields NAME, DESC
|
||||
|
||||
=cut
|
||||
|
||||
include "dbCommon.dbd"
|
||||
field(VAL,DBF_LONG) {
|
||||
prompt("Word")
|
||||
promptgroup("50 - Output")
|
||||
asl(ASL0)
|
||||
pp(TRUE)
|
||||
}
|
||||
field(OMSL,DBF_MENU) {
|
||||
prompt("Output Mode Select")
|
||||
promptgroup("50 - Output")
|
||||
special(SPC_RESET)
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
menu(menuOmsl)
|
||||
}
|
||||
field(NOBT,DBF_SHORT) {
|
||||
prompt("Number of Bits")
|
||||
promptgroup("50 - Output")
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(DOL,DBF_INLINK) {
|
||||
prompt("Desired Output Loc")
|
||||
promptgroup("40 - Input")
|
||||
interest(1)
|
||||
}
|
||||
field(OUT,DBF_OUTLINK) {
|
||||
prompt("Output Specification")
|
||||
promptgroup("50 - Output")
|
||||
interest(1)
|
||||
}
|
||||
field(RVAL,DBF_ULONG) {
|
||||
prompt("Raw Value")
|
||||
special(SPC_NOMOD)
|
||||
pp(TRUE)
|
||||
}
|
||||
field(ORAW,DBF_ULONG) {
|
||||
prompt("Prev Raw Value")
|
||||
special(SPC_NOMOD)
|
||||
interest(3)
|
||||
}
|
||||
field(RBV,DBF_ULONG) {
|
||||
prompt("Readback Value")
|
||||
special(SPC_NOMOD)
|
||||
}
|
||||
field(ORBV,DBF_ULONG) {
|
||||
prompt("Prev Readback Value")
|
||||
special(SPC_NOMOD)
|
||||
interest(3)
|
||||
}
|
||||
field(MASK,DBF_ULONG) {
|
||||
prompt("Hardware Mask")
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(MLST,DBF_LONG) {
|
||||
prompt("Last Value Monitored")
|
||||
special(SPC_NOMOD)
|
||||
interest(3)
|
||||
}
|
||||
field(SHFT,DBF_USHORT) {
|
||||
prompt("Shift")
|
||||
promptgroup("50 - Output")
|
||||
interest(1)
|
||||
}
|
||||
|
||||
=head3 Run-time and Simulation Mode Parameters
|
||||
|
||||
These parameters are used by the run-time code for processing the mbbo Direct
|
||||
record.
|
||||
|
||||
MASK is used by device support routine to read the hardware register. Record
|
||||
support sets low order NOBT bits. Device support can shift this value.
|
||||
|
||||
MLST holds the value when the last monitor for value change was triggered.
|
||||
|
||||
=fields NOBT, ORAW, MASK, MLST
|
||||
|
||||
The following fields are used to operate the mbboDirect record in the simulation
|
||||
mode. See L<Simulation Mode> for more information on the simulation mode fields.
|
||||
|
||||
=fields SIOL, SIML, SIMM, SIMS, SSCN, SDLY
|
||||
|
||||
=cut
|
||||
|
||||
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("epicsCallback *simpvt")
|
||||
}
|
||||
|
||||
=head3 Alarm Parameters
|
||||
|
||||
The possible alarm conditions for mbboDirect records are the SCAN, READ, and
|
||||
INVALID alarms. The SCAN and READ alarms are not configurable by the user since
|
||||
they are always of MAJOR severity. See L<Alarm Specification> for a complete
|
||||
explanation of Scan and Read alarms.
|
||||
|
||||
The IVOA field specifies an action to take when the INVALID alarm is triggered.
|
||||
There are three possible actions: C<<< Continue normally >>>, C<<< Don't drive
|
||||
outputs >>>, or C<<< Set output to IVOV >>>. When C<<< Set output to IVOV >>> is
|
||||
specified and a INVALID alarm is triggered, the record will write the value in
|
||||
the IVOV field to output. See L<Invalid Alarm Output Action> for more
|
||||
information. L<Alarm Fields> lists other fields related to a alarms that are
|
||||
common to all record types.
|
||||
|
||||
=fields IVOA, IVOV
|
||||
|
||||
=cut
|
||||
|
||||
field(IVOA,DBF_MENU) {
|
||||
prompt("INVALID outpt action")
|
||||
promptgroup("50 - Output")
|
||||
interest(2)
|
||||
menu(menuIvoa)
|
||||
}
|
||||
field(IVOV,DBF_LONG) {
|
||||
prompt("INVALID output value")
|
||||
promptgroup("50 - Output")
|
||||
interest(2)
|
||||
}
|
||||
|
||||
field(B0,DBF_UCHAR) {
|
||||
prompt("Bit 0")
|
||||
promptgroup("51 - Output 0-7")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
}
|
||||
field(B1,DBF_UCHAR) {
|
||||
prompt("Bit 1")
|
||||
promptgroup("51 - Output 0-7")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
}
|
||||
field(B2,DBF_UCHAR) {
|
||||
prompt("Bit 2")
|
||||
promptgroup("51 - Output 0-7")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
}
|
||||
field(B3,DBF_UCHAR) {
|
||||
prompt("Bit 3")
|
||||
promptgroup("51 - Output 0-7")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
}
|
||||
field(B4,DBF_UCHAR) {
|
||||
prompt("Bit 4")
|
||||
promptgroup("51 - Output 0-7")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
}
|
||||
field(B5,DBF_UCHAR) {
|
||||
prompt("Bit 5")
|
||||
promptgroup("51 - Output 0-7")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
}
|
||||
field(B6,DBF_UCHAR) {
|
||||
prompt("Bit 6")
|
||||
promptgroup("51 - Output 0-7")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
}
|
||||
field(B7,DBF_UCHAR) {
|
||||
prompt("Bit 7")
|
||||
promptgroup("51 - Output 0-7")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
}
|
||||
field(B8,DBF_UCHAR) {
|
||||
prompt("Bit 8")
|
||||
promptgroup("52 - Output 8-15")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
}
|
||||
field(B9,DBF_UCHAR) {
|
||||
prompt("Bit 9")
|
||||
promptgroup("52 - Output 8-15")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
}
|
||||
field(BA,DBF_UCHAR) {
|
||||
prompt("Bit 10")
|
||||
promptgroup("52 - Output 8-15")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
}
|
||||
field(BB,DBF_UCHAR) {
|
||||
prompt("Bit 11")
|
||||
promptgroup("52 - Output 8-15")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
}
|
||||
field(BC,DBF_UCHAR) {
|
||||
prompt("Bit 12")
|
||||
promptgroup("52 - Output 8-15")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
}
|
||||
field(BD,DBF_UCHAR) {
|
||||
prompt("Bit 13")
|
||||
promptgroup("52 - Output 8-15")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
}
|
||||
field(BE,DBF_UCHAR) {
|
||||
prompt("Bit 14")
|
||||
promptgroup("52 - Output 8-15")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
}
|
||||
field(BF,DBF_UCHAR) {
|
||||
prompt("Bit 15")
|
||||
promptgroup("52 - Output 8-15")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
}
|
||||
field(B10,DBF_UCHAR) {
|
||||
prompt("Bit 16")
|
||||
promptgroup("53 - Output 16-23")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
}
|
||||
field(B11,DBF_UCHAR) {
|
||||
prompt("Bit 17")
|
||||
promptgroup("53 - Output 16-23")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
}
|
||||
field(B12,DBF_UCHAR) {
|
||||
prompt("Bit 18")
|
||||
promptgroup("53 - Output 16-23")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
}
|
||||
field(B13,DBF_UCHAR) {
|
||||
prompt("Bit 19")
|
||||
promptgroup("53 - Output 16-23")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
}
|
||||
field(B14,DBF_UCHAR) {
|
||||
prompt("Bit 20")
|
||||
promptgroup("53 - Output 16-23")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
}
|
||||
field(B15,DBF_UCHAR) {
|
||||
prompt("Bit 21")
|
||||
promptgroup("53 - Output 16-23")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
}
|
||||
field(B16,DBF_UCHAR) {
|
||||
prompt("Bit 22")
|
||||
promptgroup("53 - Output 16-23")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
}
|
||||
field(B17,DBF_UCHAR) {
|
||||
prompt("Bit 23")
|
||||
promptgroup("53 - Output 16-23")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
}
|
||||
field(B18,DBF_UCHAR) {
|
||||
prompt("Bit 24")
|
||||
promptgroup("54 - Output 24-31")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
}
|
||||
field(B19,DBF_UCHAR) {
|
||||
prompt("Bit 25")
|
||||
promptgroup("54 - Output 24-31")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
}
|
||||
field(B1A,DBF_UCHAR) {
|
||||
prompt("Bit 26")
|
||||
promptgroup("54 - Output 24-31")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
}
|
||||
field(B1B,DBF_UCHAR) {
|
||||
prompt("Bit 27")
|
||||
promptgroup("54 - Output 24-31")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
}
|
||||
field(B1C,DBF_UCHAR) {
|
||||
prompt("Bit 28")
|
||||
promptgroup("54 - Output 24-31")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
}
|
||||
field(B1D,DBF_UCHAR) {
|
||||
prompt("Bit 29")
|
||||
promptgroup("54 - Output 24-31")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
}
|
||||
field(B1E,DBF_UCHAR) {
|
||||
prompt("Bit 30")
|
||||
promptgroup("54 - Output 24-31")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
}
|
||||
field(B1F,DBF_UCHAR) {
|
||||
prompt("Bit 31")
|
||||
promptgroup("54 - Output 24-31")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
}
|
||||
|
||||
=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.
|
||||
|
||||
MASK is cleared and then the NOBT low order bits are set.
|
||||
|
||||
If device support includes C<init_record()>, it is called.
|
||||
|
||||
If device support returns success, VAL is then set from RVAL and UDF is set to
|
||||
FALSE.
|
||||
|
||||
=head4 Process
|
||||
|
||||
See next section.
|
||||
|
||||
=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
|
||||
|
||||
=over
|
||||
|
||||
=item * If DOL is DB_LINK and OMSL is CLOSED_LOOP
|
||||
|
||||
=over
|
||||
|
||||
=item * Get value from DOL
|
||||
|
||||
=item * Set PACT to FALSE
|
||||
|
||||
=back
|
||||
|
||||
=back
|
||||
|
||||
=item 3.
|
||||
|
||||
Convert
|
||||
|
||||
=over
|
||||
|
||||
=item * If PACT is FALSE, compute RVAL
|
||||
|
||||
=over
|
||||
|
||||
=item * Set RVAL = VAL
|
||||
|
||||
=item * Shift RVAL left SHFT bits
|
||||
|
||||
=back
|
||||
|
||||
=item * Status=write_mbboDirect
|
||||
|
||||
=back
|
||||
|
||||
=item 4.
|
||||
|
||||
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 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 MLST is not equal to VAL.
|
||||
|
||||
=item * Monitors for RVAL and RBV are checked whenever other monitors are invoked.
|
||||
|
||||
=item * NSEV and NSTA are reset to 0.
|
||||
|
||||
=back
|
||||
|
||||
=item 6.
|
||||
|
||||
Scan forward link if necessary, set PACT FALSE, and return.
|
||||
|
||||
=back
|
||||
|
||||
=begin html
|
||||
|
||||
<br><hr><br>
|
||||
|
||||
=end html
|
||||
|
||||
=head2 Device Support
|
||||
|
||||
=head3 Fields Of Interest To Device Support
|
||||
|
||||
Each mbboDirect record must have an associated set of device support routines.
|
||||
The primary responsibility of the device support routines is to obtain a new raw
|
||||
mbbo value whenever write_mbboDirect is called. The device support routines are
|
||||
primarily interested in the following fields:
|
||||
|
||||
=fields PACT, DPVT, UDF, NSEV, NSTA, NOBT, OUT, RVAL, RBV, MASK, SHFT
|
||||
|
||||
=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<dbior> 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<level> 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<init_record()> calls are made, with
|
||||
the integer parameter C<after> set to 0.
|
||||
The second call happens after all of the C<init_record()> calls have been made,
|
||||
with C<after> set to 1.
|
||||
|
||||
=head4 init_record
|
||||
|
||||
init_record(precord)
|
||||
|
||||
This routine is optional. If provided, it is called by the record support
|
||||
C<init_record()> routine. If MASK is used, it should be shifted if necessary and
|
||||
SHFT given a value.
|
||||
|
||||
=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_mbboDirect
|
||||
|
||||
write_mbboDirect(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
|
||||
|
||||
This C<<< SOft Channel >>> module writes the current value of VAL.
|
||||
|
||||
If the OUT link type is PV_LINK, then dbCaAddInlink is called by
|
||||
C<init_record()>.
|
||||
|
||||
write_mbboDirect calls recGblPutLinkValue to write the current value of VAL.
|
||||
|
||||
See L<Soft Output|Soft_Output>.
|
||||
|
||||
=cut
|
||||
|
||||
}
|
||||
@@ -1,526 +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(mbbo) {
|
||||
include "dbCommon.dbd"
|
||||
field(VAL,DBF_ENUM) {
|
||||
prompt("Desired Value")
|
||||
promptgroup("50 - Output")
|
||||
special(SPC_DBADDR)
|
||||
asl(ASL0)
|
||||
pp(TRUE)
|
||||
#=read Yes
|
||||
#=write Yes
|
||||
}
|
||||
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(NOBT,DBF_USHORT) {
|
||||
prompt("Number of Bits")
|
||||
promptgroup("50 - Output")
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(OUT,DBF_OUTLINK) {
|
||||
prompt("Output Specification")
|
||||
promptgroup("50 - Output")
|
||||
interest(1)
|
||||
}
|
||||
field(ZRVL,DBF_ULONG) {
|
||||
prompt("Zero Value")
|
||||
promptgroup("51 - Output 0-7")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
base(HEX)
|
||||
interest(1)
|
||||
}
|
||||
field(ONVL,DBF_ULONG) {
|
||||
prompt("One Value")
|
||||
promptgroup("51 - Output 0-7")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
base(HEX)
|
||||
interest(1)
|
||||
}
|
||||
field(TWVL,DBF_ULONG) {
|
||||
prompt("Two Value")
|
||||
promptgroup("51 - Output 0-7")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
base(HEX)
|
||||
interest(1)
|
||||
}
|
||||
field(THVL,DBF_ULONG) {
|
||||
prompt("Three Value")
|
||||
promptgroup("51 - Output 0-7")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
base(HEX)
|
||||
interest(1)
|
||||
}
|
||||
field(FRVL,DBF_ULONG) {
|
||||
prompt("Four Value")
|
||||
promptgroup("51 - Output 0-7")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
base(HEX)
|
||||
interest(1)
|
||||
}
|
||||
field(FVVL,DBF_ULONG) {
|
||||
prompt("Five Value")
|
||||
promptgroup("51 - Output 0-7")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
base(HEX)
|
||||
interest(1)
|
||||
}
|
||||
field(SXVL,DBF_ULONG) {
|
||||
prompt("Six Value")
|
||||
promptgroup("51 - Output 0-7")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
base(HEX)
|
||||
interest(1)
|
||||
}
|
||||
field(SVVL,DBF_ULONG) {
|
||||
prompt("Seven Value")
|
||||
promptgroup("51 - Output 0-7")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
base(HEX)
|
||||
interest(1)
|
||||
}
|
||||
field(EIVL,DBF_ULONG) {
|
||||
prompt("Eight Value")
|
||||
promptgroup("52 - Output 8-15")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
base(HEX)
|
||||
interest(1)
|
||||
}
|
||||
field(NIVL,DBF_ULONG) {
|
||||
prompt("Nine Value")
|
||||
promptgroup("52 - Output 8-15")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
base(HEX)
|
||||
interest(1)
|
||||
}
|
||||
field(TEVL,DBF_ULONG) {
|
||||
prompt("Ten Value")
|
||||
promptgroup("52 - Output 8-15")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
base(HEX)
|
||||
interest(1)
|
||||
}
|
||||
field(ELVL,DBF_ULONG) {
|
||||
prompt("Eleven Value")
|
||||
promptgroup("52 - Output 8-15")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
base(HEX)
|
||||
interest(1)
|
||||
}
|
||||
field(TVVL,DBF_ULONG) {
|
||||
prompt("Twelve Value")
|
||||
promptgroup("52 - Output 8-15")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
base(HEX)
|
||||
interest(1)
|
||||
}
|
||||
field(TTVL,DBF_ULONG) {
|
||||
prompt("Thirteen Value")
|
||||
promptgroup("52 - Output 8-15")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
base(HEX)
|
||||
interest(1)
|
||||
}
|
||||
field(FTVL,DBF_ULONG) {
|
||||
prompt("Fourteen Value")
|
||||
promptgroup("52 - Output 8-15")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
base(HEX)
|
||||
interest(1)
|
||||
}
|
||||
field(FFVL,DBF_ULONG) {
|
||||
prompt("Fifteen Value")
|
||||
promptgroup("52 - Output 8-15")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
base(HEX)
|
||||
interest(1)
|
||||
}
|
||||
field(ZRST,DBF_STRING) {
|
||||
prompt("Zero String")
|
||||
promptgroup("81 - Display 0-7")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
size(26)
|
||||
}
|
||||
field(ONST,DBF_STRING) {
|
||||
prompt("One String")
|
||||
promptgroup("81 - Display 0-7")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
size(26)
|
||||
}
|
||||
field(TWST,DBF_STRING) {
|
||||
prompt("Two String")
|
||||
promptgroup("81 - Display 0-7")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
size(26)
|
||||
}
|
||||
field(THST,DBF_STRING) {
|
||||
prompt("Three String")
|
||||
promptgroup("81 - Display 0-7")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
size(26)
|
||||
}
|
||||
field(FRST,DBF_STRING) {
|
||||
prompt("Four String")
|
||||
promptgroup("81 - Display 0-7")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
size(26)
|
||||
}
|
||||
field(FVST,DBF_STRING) {
|
||||
prompt("Five String")
|
||||
promptgroup("81 - Display 0-7")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
size(26)
|
||||
}
|
||||
field(SXST,DBF_STRING) {
|
||||
prompt("Six String")
|
||||
promptgroup("81 - Display 0-7")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
size(26)
|
||||
}
|
||||
field(SVST,DBF_STRING) {
|
||||
prompt("Seven String")
|
||||
promptgroup("81 - Display 0-7")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
size(26)
|
||||
}
|
||||
field(EIST,DBF_STRING) {
|
||||
prompt("Eight String")
|
||||
promptgroup("82 - Display 8-15")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
size(26)
|
||||
}
|
||||
field(NIST,DBF_STRING) {
|
||||
prompt("Nine String")
|
||||
promptgroup("82 - Display 8-15")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
size(26)
|
||||
}
|
||||
field(TEST,DBF_STRING) {
|
||||
prompt("Ten String")
|
||||
promptgroup("82 - Display 8-15")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
size(26)
|
||||
}
|
||||
field(ELST,DBF_STRING) {
|
||||
prompt("Eleven String")
|
||||
promptgroup("82 - Display 8-15")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
size(26)
|
||||
}
|
||||
field(TVST,DBF_STRING) {
|
||||
prompt("Twelve String")
|
||||
promptgroup("82 - Display 8-15")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
size(26)
|
||||
}
|
||||
field(TTST,DBF_STRING) {
|
||||
prompt("Thirteen String")
|
||||
promptgroup("82 - Display 8-15")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
size(26)
|
||||
}
|
||||
field(FTST,DBF_STRING) {
|
||||
prompt("Fourteen String")
|
||||
promptgroup("82 - Display 8-15")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
size(26)
|
||||
}
|
||||
field(FFST,DBF_STRING) {
|
||||
prompt("Fifteen String")
|
||||
promptgroup("82 - Display 8-15")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
size(26)
|
||||
}
|
||||
field(ZRSV,DBF_MENU) {
|
||||
prompt("State Zero Severity")
|
||||
promptgroup("71 - Alarm 0-7")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
menu(menuAlarmSevr)
|
||||
}
|
||||
field(ONSV,DBF_MENU) {
|
||||
prompt("State One Severity")
|
||||
promptgroup("71 - Alarm 0-7")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
menu(menuAlarmSevr)
|
||||
}
|
||||
field(TWSV,DBF_MENU) {
|
||||
prompt("State Two Severity")
|
||||
promptgroup("71 - Alarm 0-7")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
menu(menuAlarmSevr)
|
||||
}
|
||||
field(THSV,DBF_MENU) {
|
||||
prompt("State Three Severity")
|
||||
promptgroup("71 - Alarm 0-7")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
menu(menuAlarmSevr)
|
||||
}
|
||||
field(FRSV,DBF_MENU) {
|
||||
prompt("State Four Severity")
|
||||
promptgroup("71 - Alarm 0-7")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
menu(menuAlarmSevr)
|
||||
}
|
||||
field(FVSV,DBF_MENU) {
|
||||
prompt("State Five Severity")
|
||||
promptgroup("71 - Alarm 0-7")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
menu(menuAlarmSevr)
|
||||
}
|
||||
field(SXSV,DBF_MENU) {
|
||||
prompt("State Six Severity")
|
||||
promptgroup("71 - Alarm 0-7")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
menu(menuAlarmSevr)
|
||||
}
|
||||
field(SVSV,DBF_MENU) {
|
||||
prompt("State Seven Severity")
|
||||
promptgroup("71 - Alarm 0-7")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
menu(menuAlarmSevr)
|
||||
}
|
||||
field(EISV,DBF_MENU) {
|
||||
prompt("State Eight Severity")
|
||||
promptgroup("72 - Alarm 8-15")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
menu(menuAlarmSevr)
|
||||
}
|
||||
field(NISV,DBF_MENU) {
|
||||
prompt("State Nine Severity")
|
||||
promptgroup("72 - Alarm 8-15")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
menu(menuAlarmSevr)
|
||||
}
|
||||
field(TESV,DBF_MENU) {
|
||||
prompt("State Ten Severity")
|
||||
promptgroup("72 - Alarm 8-15")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
menu(menuAlarmSevr)
|
||||
}
|
||||
field(ELSV,DBF_MENU) {
|
||||
prompt("State Eleven Severity")
|
||||
promptgroup("72 - Alarm 8-15")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
menu(menuAlarmSevr)
|
||||
}
|
||||
field(TVSV,DBF_MENU) {
|
||||
prompt("State Twelve Severity")
|
||||
promptgroup("72 - Alarm 8-15")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
menu(menuAlarmSevr)
|
||||
}
|
||||
field(TTSV,DBF_MENU) {
|
||||
prompt("State Thirteen Sevr")
|
||||
promptgroup("72 - Alarm 8-15")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
menu(menuAlarmSevr)
|
||||
}
|
||||
field(FTSV,DBF_MENU) {
|
||||
prompt("State Fourteen Sevr")
|
||||
promptgroup("72 - Alarm 8-15")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
menu(menuAlarmSevr)
|
||||
}
|
||||
field(FFSV,DBF_MENU) {
|
||||
prompt("State Fifteen Sevr")
|
||||
promptgroup("72 - Alarm 8-15")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
menu(menuAlarmSevr)
|
||||
}
|
||||
field(UNSV,DBF_MENU) {
|
||||
prompt("Unknown State Sevr")
|
||||
promptgroup("70 - Alarm")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
menu(menuAlarmSevr)
|
||||
}
|
||||
field(COSV,DBF_MENU) {
|
||||
prompt("Change of State Sevr")
|
||||
promptgroup("70 - Alarm")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
menu(menuAlarmSevr)
|
||||
}
|
||||
field(RVAL,DBF_ULONG) {
|
||||
prompt("Raw Value")
|
||||
pp(TRUE)
|
||||
}
|
||||
field(ORAW,DBF_ULONG) {
|
||||
prompt("Prev Raw Value")
|
||||
special(SPC_NOMOD)
|
||||
interest(3)
|
||||
}
|
||||
field(RBV,DBF_ULONG) {
|
||||
prompt("Readback Value")
|
||||
special(SPC_NOMOD)
|
||||
}
|
||||
field(ORBV,DBF_ULONG) {
|
||||
prompt("Prev Readback Value")
|
||||
special(SPC_NOMOD)
|
||||
interest(3)
|
||||
}
|
||||
field(MASK,DBF_ULONG) {
|
||||
prompt("Hardware Mask")
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(MLST,DBF_USHORT) {
|
||||
prompt("Last Value Monitored")
|
||||
special(SPC_NOMOD)
|
||||
interest(3)
|
||||
}
|
||||
field(LALM,DBF_USHORT) {
|
||||
prompt("Last Value Alarmed")
|
||||
special(SPC_NOMOD)
|
||||
interest(3)
|
||||
}
|
||||
field(SDEF,DBF_SHORT) {
|
||||
prompt("States Defined")
|
||||
special(SPC_NOMOD)
|
||||
interest(3)
|
||||
}
|
||||
field(SHFT,DBF_USHORT) {
|
||||
prompt("Shift")
|
||||
promptgroup("50 - Output")
|
||||
interest(1)
|
||||
}
|
||||
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("epicsCallback *simpvt")
|
||||
}
|
||||
field(IVOA,DBF_MENU) {
|
||||
prompt("INVALID outpt action")
|
||||
promptgroup("50 - Output")
|
||||
interest(2)
|
||||
menu(menuIvoa)
|
||||
}
|
||||
field(IVOV,DBF_USHORT) {
|
||||
prompt("INVALID output value")
|
||||
promptgroup("50 - Output")
|
||||
interest(2)
|
||||
}
|
||||
}
|
||||
969
modules/database/src/std/rec/mbboRecord.dbd.pod
Normal file
969
modules/database/src/std/rec/mbboRecord.dbd.pod
Normal file
@@ -0,0 +1,969 @@
|
||||
#*************************************************************************
|
||||
# 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 Multi-Bit Binary Output Record (mbbo)
|
||||
|
||||
The normal use for the mbbo record type is to send a binary value (representing
|
||||
one of up to 16 states) to a Digital Output module. It is used for any device
|
||||
that uses more than one contiguous bit to control it. The mbbo record can also
|
||||
be used to write discrete values to other records via database or channel access
|
||||
links.
|
||||
|
||||
=recordtype mbbo
|
||||
|
||||
=cut
|
||||
|
||||
recordtype(mbbo) {
|
||||
|
||||
=head2 Parameter Fields
|
||||
|
||||
The record-specific fields are described below, grouped by functionality.
|
||||
|
||||
=head3 Scan Parameters
|
||||
|
||||
The mbbo record has the standard fields for specifying under what circumstances
|
||||
it will be processed. These fields are listed in L<Scan Fields>. In addition,
|
||||
L<Scanning Specification> 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 multi-bit binary output record, like all output records, must specify where
|
||||
its output originates. The output mode select (OMSL) field determines whether
|
||||
the output originates from another record or from database access (i.e., the
|
||||
operator). 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 DOL field is ignored and the current value of
|
||||
VAL is simply written. VAL can be changed via dpPuts at run-time when OMSL is
|
||||
C<<< supervisory >>>. The DOL field can also be a constant, in which case the
|
||||
VAL field is initialized to the constant value. If DOL is a constant, OMSL
|
||||
cannot be set to C<<< closed_loop >>>.
|
||||
|
||||
The VAL field itself usually consists of an index that specifies one of the
|
||||
states. The actual output written is the value of RVAL, which is converted from
|
||||
VAL following the routine explained in the next section. However, records that
|
||||
use the C<<< Soft Channel >>> device support module write the VAL field's value
|
||||
without any conversion.
|
||||
|
||||
=fields OMSL, DOL, VAL
|
||||
|
||||
=head3 Convert and Write Parameters
|
||||
|
||||
The device support routines write the desired output to the location specified
|
||||
in the OUT field. If the record uses soft device support, OUT can contain a
|
||||
constant, a database link, or a channel access link; however, if OUT is a
|
||||
constant, no value will be written.
|
||||
|
||||
For records that write their values to hardware devices, the OUT output link
|
||||
must specify the address of the I/O card, and the DTYP field must specify
|
||||
the corresponding device support module. Be aware that the address format
|
||||
differs according to the I/O bus used. See L<Address Specification> for
|
||||
information on the format of hardware addresses.
|
||||
|
||||
For mbbo records that write to hardware, the value written to the output
|
||||
location is the value contained in RVAL, which is converted from VAL, VAL
|
||||
containing an index of one of the 16 states (0-15). RVAL is then set to the
|
||||
corresponding state value, the value in one of the fields ZRVL through FFVL.
|
||||
Then this value is shifted left according to the number in the SHFT field so
|
||||
that the value is in the correct position for the bits being used (the SHFT
|
||||
value is set by device support and is not configurable by the user).
|
||||
|
||||
The state value fields ZRVL through FFVL must be configured by the user before
|
||||
run-time. When the state values are not defined, the states defined (SDEF) field
|
||||
is set to FALSE at initialization time by the record routines. When SDEF is
|
||||
FALSE, then the record processing routine does not try to find a match, RVAL is
|
||||
set equal to VAL, the bits are shifted using the number in SHFT, and the value
|
||||
is written thus.
|
||||
|
||||
If the OUT output link specifies a database link, channel access link, or
|
||||
constant, then the DTYP field must specify either one of the two soft device
|
||||
support modules-- C<<< Soft Channel >>> or C<<< Raw Soft Channel >>>. C<<< Soft
|
||||
>>> C<<< Channel >>> writes the value of VAL to the output link, without any
|
||||
conversion, while C<<< Raw Soft Channel >>> writes the value from RVAL after it
|
||||
has undergone the above conversion. See L<Address Specification> for information
|
||||
on specifying links.
|
||||
|
||||
Note also that when a string is retrieved as the desired output, a record
|
||||
support routine is provided (C<<< put_enum_str() >>>) that will check to see
|
||||
if the string matches one of the strings in the ZRST through FFST fields. If a
|
||||
match is found, RVAL is set equal to the corresponding state value of that
|
||||
string.
|
||||
|
||||
=fields OUT, DTYP, RVAL, SHFT, SDEF, ZRVL, ONVL, TWVL, THVL, FRVL, FVVL, SXVL, SVVL, EIVL, NIVL, TEVL, ELVL, TVVL, TTVL, FTVL, FFVL
|
||||
|
||||
=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 mbbo record
|
||||
either textually or graphically. The ZRST-FFST fields contain strings describing
|
||||
each of the corresponding states. The C<<< get_enum_str() >>> and
|
||||
C<<< get_enum_strs() >>> record routines retrieve these strings for the
|
||||
operator. C<<< get_enum_str() >>> gets the string corresponding to the value in
|
||||
VAL, and C<<< get_enum_strs() >>> retrieves all the strings.
|
||||
|
||||
See L<Fields Common to All Record Types> for more on the record name (NAME) and
|
||||
description (DESC) fields.
|
||||
|
||||
=fields NAME, DESC, ZRST, ONST, TWST, THST, FRST, FVST, SXST, SVST, EIST, NIST, TEST, ELST, TVST, TTST, FTST, FFST
|
||||
|
||||
=head3 Alarm Parameters
|
||||
|
||||
The possible alarm conditions for multi-bit binary outputs are the SCAN, READ,
|
||||
INVALID, and state alarms. The SCAN and READ alarms are called by the support
|
||||
modules and are not configurable by the user, as their severity is always MAJOR.
|
||||
|
||||
The IVOA field specifies an action to take from a number of possible choices
|
||||
when the INVALID alarm is triggered. The IVOV field contains a value to be
|
||||
written once the INVALID alarm has been triggered if C<<< Set output to IVOV >>>
|
||||
has been chosen in the IVOA field. The severity of the INVALID alarm is not
|
||||
configurable by the user.
|
||||
|
||||
The state alarms are configured in the below severity fields. These fields have
|
||||
the usual possible values for severity fields: NO_ALARM, MINOR, and MAJOR.
|
||||
|
||||
The unknown state severity field (UNSV), if set to MINOR or MAJOR, triggers an
|
||||
alarm when the record support routine cannot find a matching value in the state
|
||||
value fields for VAL or when VAL is out of range.
|
||||
|
||||
The change of state severity field (COSV) triggers an alarm when the record's
|
||||
state changes, if set to MAJOR or MINOR.
|
||||
|
||||
The state severity (ZRSV-FFSV) fields, when set to MAJOR or MINOR, trigger an
|
||||
alarm when VAL equals the corresponding field.
|
||||
|
||||
See L<Alarm Specification> for a complete explanation of discrete alarms and
|
||||
these fields. See L<Invalid Alarm Output Action> for an explanation of the IVOA
|
||||
and IVOV fields. L<Alarm Fields> lists other fields related to a alarms that are
|
||||
common to all record types.
|
||||
|
||||
=fields UNSV, COSV, IVOA, IVOV, ZRSV, ONSV, TWSV, THSV, FRSV, FVSV, SXSV, SVSV, EISV, NISV, TESV, ELSV, TVSV, TTSV, FTSV, FFSV
|
||||
|
||||
=head3 Run-Time and Simulation Mode Parameters
|
||||
|
||||
These parameters are used by the run-time code for processing the multi-bit
|
||||
binary output.
|
||||
|
||||
MASK is used by device support routine to read the hardware register. Record
|
||||
support sets low order of MASK the number of bits specified in NOBT. Device
|
||||
support can shift this value.
|
||||
|
||||
The LALM field implements the change of state alarm severity by holding the
|
||||
value of VAL when the previous change of state alarm was issued.
|
||||
|
||||
MLST holds the value when the last monitor for value change was triggered.
|
||||
|
||||
SDEF is used by record support to save time if no states are defined; it is used
|
||||
for converting VAL to RVAL.
|
||||
|
||||
=fields NOBT, ORAW, MASK, LALM, MLST, SDEF
|
||||
|
||||
The following fields are used to operate the mbbo record in the simulation mode.
|
||||
See L<Fields Common to Many Record Types> for more information on the simulation
|
||||
mode fields.
|
||||
|
||||
=fields SIOL, SIML, SIMM, SIMS, SSCN, SDLY
|
||||
|
||||
=cut
|
||||
|
||||
include "dbCommon.dbd"
|
||||
field(VAL,DBF_ENUM) {
|
||||
prompt("Desired Value")
|
||||
promptgroup("50 - Output")
|
||||
special(SPC_DBADDR)
|
||||
asl(ASL0)
|
||||
pp(TRUE)
|
||||
#=read Yes
|
||||
#=write Yes
|
||||
}
|
||||
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(NOBT,DBF_USHORT) {
|
||||
prompt("Number of Bits")
|
||||
promptgroup("50 - Output")
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(OUT,DBF_OUTLINK) {
|
||||
prompt("Output Specification")
|
||||
promptgroup("50 - Output")
|
||||
interest(1)
|
||||
}
|
||||
field(ZRVL,DBF_ULONG) {
|
||||
prompt("Zero Value")
|
||||
promptgroup("51 - Output 0-7")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
base(HEX)
|
||||
interest(1)
|
||||
}
|
||||
field(ONVL,DBF_ULONG) {
|
||||
prompt("One Value")
|
||||
promptgroup("51 - Output 0-7")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
base(HEX)
|
||||
interest(1)
|
||||
}
|
||||
field(TWVL,DBF_ULONG) {
|
||||
prompt("Two Value")
|
||||
promptgroup("51 - Output 0-7")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
base(HEX)
|
||||
interest(1)
|
||||
}
|
||||
field(THVL,DBF_ULONG) {
|
||||
prompt("Three Value")
|
||||
promptgroup("51 - Output 0-7")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
base(HEX)
|
||||
interest(1)
|
||||
}
|
||||
field(FRVL,DBF_ULONG) {
|
||||
prompt("Four Value")
|
||||
promptgroup("51 - Output 0-7")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
base(HEX)
|
||||
interest(1)
|
||||
}
|
||||
field(FVVL,DBF_ULONG) {
|
||||
prompt("Five Value")
|
||||
promptgroup("51 - Output 0-7")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
base(HEX)
|
||||
interest(1)
|
||||
}
|
||||
field(SXVL,DBF_ULONG) {
|
||||
prompt("Six Value")
|
||||
promptgroup("51 - Output 0-7")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
base(HEX)
|
||||
interest(1)
|
||||
}
|
||||
field(SVVL,DBF_ULONG) {
|
||||
prompt("Seven Value")
|
||||
promptgroup("51 - Output 0-7")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
base(HEX)
|
||||
interest(1)
|
||||
}
|
||||
field(EIVL,DBF_ULONG) {
|
||||
prompt("Eight Value")
|
||||
promptgroup("52 - Output 8-15")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
base(HEX)
|
||||
interest(1)
|
||||
}
|
||||
field(NIVL,DBF_ULONG) {
|
||||
prompt("Nine Value")
|
||||
promptgroup("52 - Output 8-15")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
base(HEX)
|
||||
interest(1)
|
||||
}
|
||||
field(TEVL,DBF_ULONG) {
|
||||
prompt("Ten Value")
|
||||
promptgroup("52 - Output 8-15")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
base(HEX)
|
||||
interest(1)
|
||||
}
|
||||
field(ELVL,DBF_ULONG) {
|
||||
prompt("Eleven Value")
|
||||
promptgroup("52 - Output 8-15")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
base(HEX)
|
||||
interest(1)
|
||||
}
|
||||
field(TVVL,DBF_ULONG) {
|
||||
prompt("Twelve Value")
|
||||
promptgroup("52 - Output 8-15")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
base(HEX)
|
||||
interest(1)
|
||||
}
|
||||
field(TTVL,DBF_ULONG) {
|
||||
prompt("Thirteen Value")
|
||||
promptgroup("52 - Output 8-15")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
base(HEX)
|
||||
interest(1)
|
||||
}
|
||||
field(FTVL,DBF_ULONG) {
|
||||
prompt("Fourteen Value")
|
||||
promptgroup("52 - Output 8-15")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
base(HEX)
|
||||
interest(1)
|
||||
}
|
||||
field(FFVL,DBF_ULONG) {
|
||||
prompt("Fifteen Value")
|
||||
promptgroup("52 - Output 8-15")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
base(HEX)
|
||||
interest(1)
|
||||
}
|
||||
field(ZRST,DBF_STRING) {
|
||||
prompt("Zero String")
|
||||
promptgroup("81 - Display 0-7")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
size(26)
|
||||
}
|
||||
field(ONST,DBF_STRING) {
|
||||
prompt("One String")
|
||||
promptgroup("81 - Display 0-7")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
size(26)
|
||||
}
|
||||
field(TWST,DBF_STRING) {
|
||||
prompt("Two String")
|
||||
promptgroup("81 - Display 0-7")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
size(26)
|
||||
}
|
||||
field(THST,DBF_STRING) {
|
||||
prompt("Three String")
|
||||
promptgroup("81 - Display 0-7")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
size(26)
|
||||
}
|
||||
field(FRST,DBF_STRING) {
|
||||
prompt("Four String")
|
||||
promptgroup("81 - Display 0-7")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
size(26)
|
||||
}
|
||||
field(FVST,DBF_STRING) {
|
||||
prompt("Five String")
|
||||
promptgroup("81 - Display 0-7")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
size(26)
|
||||
}
|
||||
field(SXST,DBF_STRING) {
|
||||
prompt("Six String")
|
||||
promptgroup("81 - Display 0-7")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
size(26)
|
||||
}
|
||||
field(SVST,DBF_STRING) {
|
||||
prompt("Seven String")
|
||||
promptgroup("81 - Display 0-7")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
size(26)
|
||||
}
|
||||
field(EIST,DBF_STRING) {
|
||||
prompt("Eight String")
|
||||
promptgroup("82 - Display 8-15")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
size(26)
|
||||
}
|
||||
field(NIST,DBF_STRING) {
|
||||
prompt("Nine String")
|
||||
promptgroup("82 - Display 8-15")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
size(26)
|
||||
}
|
||||
field(TEST,DBF_STRING) {
|
||||
prompt("Ten String")
|
||||
promptgroup("82 - Display 8-15")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
size(26)
|
||||
}
|
||||
field(ELST,DBF_STRING) {
|
||||
prompt("Eleven String")
|
||||
promptgroup("82 - Display 8-15")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
size(26)
|
||||
}
|
||||
field(TVST,DBF_STRING) {
|
||||
prompt("Twelve String")
|
||||
promptgroup("82 - Display 8-15")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
size(26)
|
||||
}
|
||||
field(TTST,DBF_STRING) {
|
||||
prompt("Thirteen String")
|
||||
promptgroup("82 - Display 8-15")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
size(26)
|
||||
}
|
||||
field(FTST,DBF_STRING) {
|
||||
prompt("Fourteen String")
|
||||
promptgroup("82 - Display 8-15")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
size(26)
|
||||
}
|
||||
field(FFST,DBF_STRING) {
|
||||
prompt("Fifteen String")
|
||||
promptgroup("82 - Display 8-15")
|
||||
special(SPC_MOD)
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
size(26)
|
||||
}
|
||||
field(ZRSV,DBF_MENU) {
|
||||
prompt("State Zero Severity")
|
||||
promptgroup("71 - Alarm 0-7")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
menu(menuAlarmSevr)
|
||||
}
|
||||
field(ONSV,DBF_MENU) {
|
||||
prompt("State One Severity")
|
||||
promptgroup("71 - Alarm 0-7")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
menu(menuAlarmSevr)
|
||||
}
|
||||
field(TWSV,DBF_MENU) {
|
||||
prompt("State Two Severity")
|
||||
promptgroup("71 - Alarm 0-7")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
menu(menuAlarmSevr)
|
||||
}
|
||||
field(THSV,DBF_MENU) {
|
||||
prompt("State Three Severity")
|
||||
promptgroup("71 - Alarm 0-7")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
menu(menuAlarmSevr)
|
||||
}
|
||||
field(FRSV,DBF_MENU) {
|
||||
prompt("State Four Severity")
|
||||
promptgroup("71 - Alarm 0-7")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
menu(menuAlarmSevr)
|
||||
}
|
||||
field(FVSV,DBF_MENU) {
|
||||
prompt("State Five Severity")
|
||||
promptgroup("71 - Alarm 0-7")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
menu(menuAlarmSevr)
|
||||
}
|
||||
field(SXSV,DBF_MENU) {
|
||||
prompt("State Six Severity")
|
||||
promptgroup("71 - Alarm 0-7")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
menu(menuAlarmSevr)
|
||||
}
|
||||
field(SVSV,DBF_MENU) {
|
||||
prompt("State Seven Severity")
|
||||
promptgroup("71 - Alarm 0-7")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
menu(menuAlarmSevr)
|
||||
}
|
||||
field(EISV,DBF_MENU) {
|
||||
prompt("State Eight Severity")
|
||||
promptgroup("72 - Alarm 8-15")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
menu(menuAlarmSevr)
|
||||
}
|
||||
field(NISV,DBF_MENU) {
|
||||
prompt("State Nine Severity")
|
||||
promptgroup("72 - Alarm 8-15")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
menu(menuAlarmSevr)
|
||||
}
|
||||
field(TESV,DBF_MENU) {
|
||||
prompt("State Ten Severity")
|
||||
promptgroup("72 - Alarm 8-15")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
menu(menuAlarmSevr)
|
||||
}
|
||||
field(ELSV,DBF_MENU) {
|
||||
prompt("State Eleven Severity")
|
||||
promptgroup("72 - Alarm 8-15")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
menu(menuAlarmSevr)
|
||||
}
|
||||
field(TVSV,DBF_MENU) {
|
||||
prompt("State Twelve Severity")
|
||||
promptgroup("72 - Alarm 8-15")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
menu(menuAlarmSevr)
|
||||
}
|
||||
field(TTSV,DBF_MENU) {
|
||||
prompt("State Thirteen Sevr")
|
||||
promptgroup("72 - Alarm 8-15")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
menu(menuAlarmSevr)
|
||||
}
|
||||
field(FTSV,DBF_MENU) {
|
||||
prompt("State Fourteen Sevr")
|
||||
promptgroup("72 - Alarm 8-15")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
menu(menuAlarmSevr)
|
||||
}
|
||||
field(FFSV,DBF_MENU) {
|
||||
prompt("State Fifteen Sevr")
|
||||
promptgroup("72 - Alarm 8-15")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
menu(menuAlarmSevr)
|
||||
}
|
||||
field(UNSV,DBF_MENU) {
|
||||
prompt("Unknown State Sevr")
|
||||
promptgroup("70 - Alarm")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
menu(menuAlarmSevr)
|
||||
}
|
||||
field(COSV,DBF_MENU) {
|
||||
prompt("Change of State Sevr")
|
||||
promptgroup("70 - Alarm")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
menu(menuAlarmSevr)
|
||||
}
|
||||
field(RVAL,DBF_ULONG) {
|
||||
prompt("Raw Value")
|
||||
pp(TRUE)
|
||||
}
|
||||
field(ORAW,DBF_ULONG) {
|
||||
prompt("Prev Raw Value")
|
||||
special(SPC_NOMOD)
|
||||
interest(3)
|
||||
}
|
||||
field(RBV,DBF_ULONG) {
|
||||
prompt("Readback Value")
|
||||
special(SPC_NOMOD)
|
||||
}
|
||||
field(ORBV,DBF_ULONG) {
|
||||
prompt("Prev Readback Value")
|
||||
special(SPC_NOMOD)
|
||||
interest(3)
|
||||
}
|
||||
field(MASK,DBF_ULONG) {
|
||||
prompt("Hardware Mask")
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(MLST,DBF_USHORT) {
|
||||
prompt("Last Value Monitored")
|
||||
special(SPC_NOMOD)
|
||||
interest(3)
|
||||
}
|
||||
field(LALM,DBF_USHORT) {
|
||||
prompt("Last Value Alarmed")
|
||||
special(SPC_NOMOD)
|
||||
interest(3)
|
||||
}
|
||||
field(SDEF,DBF_SHORT) {
|
||||
prompt("States Defined")
|
||||
special(SPC_NOMOD)
|
||||
interest(3)
|
||||
}
|
||||
field(SHFT,DBF_USHORT) {
|
||||
prompt("Shift")
|
||||
promptgroup("50 - Output")
|
||||
interest(1)
|
||||
}
|
||||
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("epicsCallback *simpvt")
|
||||
}
|
||||
field(IVOA,DBF_MENU) {
|
||||
prompt("INVALID outpt action")
|
||||
promptgroup("50 - Output")
|
||||
interest(2)
|
||||
menu(menuIvoa)
|
||||
}
|
||||
field(IVOV,DBF_USHORT) {
|
||||
prompt("INVALID output value")
|
||||
promptgroup("50 - Output")
|
||||
interest(2)
|
||||
}
|
||||
}
|
||||
|
||||
=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.
|
||||
|
||||
MASK is cleared and then the NOBT low order bits are set.
|
||||
|
||||
If device support includes C<init_record()>, it is called.
|
||||
|
||||
init_common is then called to determine if any states are defined. If states are
|
||||
defined, SDEF is set to TRUE.
|
||||
|
||||
If device support returns success, VAL is then set from RVAL and UDF is set to
|
||||
FALSE.
|
||||
|
||||
=head4 process
|
||||
|
||||
See next section.
|
||||
|
||||
=head4 special
|
||||
|
||||
Computes SDEF when any of the fields ZRVL,...FFVL change value.
|
||||
|
||||
=head4 get_value
|
||||
|
||||
Fills in the values of struct valueDes so that they refer to VAL.
|
||||
|
||||
=head4 get_enum_str
|
||||
|
||||
Retrieves ASCII string corresponding to VAL.
|
||||
|
||||
=head4 get_enum_strs
|
||||
|
||||
Retrieves ASCII strings for ZRST,...FFST.
|
||||
|
||||
=head4 put_enum_str
|
||||
|
||||
Checks if string matches ZRST,...FFST and if it does, sets VAL.
|
||||
|
||||
=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 not longer be called for
|
||||
this record. Thus error storms will not occur.
|
||||
|
||||
=item 2.
|
||||
|
||||
If PACT is FALSE
|
||||
|
||||
=over
|
||||
|
||||
=item *
|
||||
|
||||
If DOL is DB_LINK and OMSL is CLOSED_LOOP
|
||||
|
||||
=over
|
||||
|
||||
=item *
|
||||
|
||||
Get value from DOL
|
||||
|
||||
=item *
|
||||
|
||||
Set UDF to FALSE
|
||||
|
||||
=item *
|
||||
|
||||
Check for link alarm
|
||||
|
||||
=back
|
||||
|
||||
=item *
|
||||
|
||||
If any state values are defined
|
||||
|
||||
=over
|
||||
|
||||
=item *
|
||||
|
||||
If VAL E<gt> 15, then raise alarm and go to 4
|
||||
|
||||
=item *
|
||||
|
||||
Else using VAL as index set RVAL = one of ZRVL,...FFVL
|
||||
|
||||
=back
|
||||
|
||||
=item *
|
||||
|
||||
Else set RVAL = VAL
|
||||
|
||||
=item *
|
||||
|
||||
Shift RVAL left SHFT bits
|
||||
|
||||
=back
|
||||
|
||||
=item 3.
|
||||
|
||||
Convert
|
||||
|
||||
=over
|
||||
|
||||
=item *
|
||||
|
||||
If PACT is FALSE, compute RVAL
|
||||
|
||||
=over
|
||||
|
||||
=item *
|
||||
|
||||
If VAL is 0,...,15, set RVAL from ZRVL,...,FFVL
|
||||
|
||||
=item *
|
||||
|
||||
If VAL out of range, set RVAL = undefined
|
||||
|
||||
=back
|
||||
|
||||
=item *
|
||||
|
||||
Status = write_mbbo
|
||||
|
||||
=back
|
||||
|
||||
=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.
|
||||
|
||||
=item 5.
|
||||
|
||||
Check severity and write the new value. See L<Simulation Mode> and L<Invalid
|
||||
Alarm Output Action> for more information.
|
||||
|
||||
=item 6.
|
||||
|
||||
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 7.
|
||||
|
||||
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 MLST is not equal to VAL.
|
||||
|
||||
=item *
|
||||
|
||||
Monitors for RVAL and RBV are checked whenever other monitors are invoked.
|
||||
|
||||
=item *
|
||||
|
||||
NSEV and NSTA are reset to 0.
|
||||
|
||||
=back
|
||||
|
||||
=item 8.
|
||||
|
||||
Scan forward link if necessary, set PACT FALSE, and return.
|
||||
|
||||
=back
|
||||
|
||||
|
||||
=head2 Device Support
|
||||
|
||||
=head3 Fields Of Interest To Device Support
|
||||
|
||||
Each mbbo record must have an associated set of device support routines. The
|
||||
primary responsibility of the device support routines is to obtain a new raw
|
||||
mbbo value whenever write_mbbo is called. The device support routines are
|
||||
primarily interested in the following fields:
|
||||
|
||||
=fields PACT, DPVT, NSEV, NSTA, NOBT, OUT, RVAL, RBV, MASK, SHFT
|
||||
|
||||
=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<dbior> 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<level> 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<init_record()> calls are made, with
|
||||
the integer parameter C<after> set to 0.
|
||||
The second call happens after all of the C<init_record()> calls have been made,
|
||||
with C<after> set to 1.
|
||||
|
||||
=head4 init_record
|
||||
|
||||
init_record(precord)
|
||||
|
||||
This routine is optional. If provided, it is called by the record support's
|
||||
C<init_record()> routine. If MASK is used, it should be shifted if necessary and SHFT
|
||||
given a value.
|
||||
|
||||
=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_mbbo
|
||||
|
||||
write_mbbo(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
|
||||
|
||||
=head4 Soft Channel
|
||||
|
||||
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<init_record()>.
|
||||
|
||||
write_mbbo calls recGblPutLinkValue to write the current value of VAL. See
|
||||
L<Soft Output> for more information.
|
||||
|
||||
=head4 Raw Soft Channel
|
||||
|
||||
This module writes RVAL to the location specified in the output link. It returns
|
||||
a 0.
|
||||
|
||||
=cut
|
||||
@@ -1,38 +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(permissive) {
|
||||
include "dbCommon.dbd"
|
||||
field(LABL,DBF_STRING) {
|
||||
prompt("Button Label")
|
||||
promptgroup("80 - Display")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
size(20)
|
||||
}
|
||||
field(VAL,DBF_USHORT) {
|
||||
prompt("Status")
|
||||
promptgroup("40 - Input")
|
||||
asl(ASL0)
|
||||
pp(TRUE)
|
||||
}
|
||||
field(OVAL,DBF_USHORT) {
|
||||
prompt("Old Status")
|
||||
special(SPC_NOMOD)
|
||||
interest(3)
|
||||
}
|
||||
field(WFLG,DBF_USHORT) {
|
||||
prompt("Wait Flag")
|
||||
pp(TRUE)
|
||||
}
|
||||
field(OFLG,DBF_USHORT) {
|
||||
prompt("Old Flag")
|
||||
special(SPC_NOMOD)
|
||||
interest(3)
|
||||
}
|
||||
}
|
||||
128
modules/database/src/std/rec/permissiveRecord.dbd.pod
Normal file
128
modules/database/src/std/rec/permissiveRecord.dbd.pod
Normal file
@@ -0,0 +1,128 @@
|
||||
#*************************************************************************
|
||||
# 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 Permissive Record (permissive)
|
||||
|
||||
The permissive record is for communication between a server and a client. An
|
||||
example would be a sequence program server and an operator interface client. By
|
||||
using multiple permissive records a sequence program can communicate its current
|
||||
state to the client.
|
||||
|
||||
B<Note this record is deprecated and may be removed in a future EPICS release.>
|
||||
|
||||
=recordtype permissive
|
||||
|
||||
=cut
|
||||
|
||||
recordtype(permissive) {
|
||||
include "dbCommon.dbd"
|
||||
|
||||
=head2 Parameter Fields
|
||||
|
||||
The record-specific fields are described below, grouped by functionality.
|
||||
|
||||
=head3 Scan Parameters
|
||||
|
||||
The permissive record has the standard fields for specifying under what
|
||||
circumstances the record will be processed. These fields are listed in
|
||||
L<Scan Fields>. In addition, L<Scanning Specification> explains how these
|
||||
fields are used. Since the permissive record supports no direct interfaces to
|
||||
hardware, its SCAN field cannot be C<<< I/O Intr >>>.
|
||||
|
||||
=head3 Client-server Parameters
|
||||
|
||||
The client and server communicate through the VAL and watchdog flag (WFLG)
|
||||
fields. At initialization, both fields are set equal to 0, which means OFF. The
|
||||
server sets WFLG equal to ON when it is ready to accept a request. The client
|
||||
monitors WFLG and when WFLG equals 1, the client-server action is performed (a
|
||||
private matter between server and client).
|
||||
|
||||
When WFLG is off--when the server is busy--the client program may turn the VAL
|
||||
field from OFF to ON. After the server finishes its task, it will notice that
|
||||
VAL is ON and will turn both WFLG and VAL OFF and performs the requested
|
||||
service.
|
||||
|
||||
Note that when WFLG is ON, the client program ''must not'' turn VAL to on.
|
||||
|
||||
=fields VAL, WFLG
|
||||
|
||||
=cut
|
||||
|
||||
field(VAL,DBF_USHORT) {
|
||||
prompt("Status")
|
||||
promptgroup("40 - Input")
|
||||
asl(ASL0)
|
||||
pp(TRUE)
|
||||
}
|
||||
field(WFLG,DBF_USHORT) {
|
||||
prompt("Wait Flag")
|
||||
pp(TRUE)
|
||||
}
|
||||
|
||||
=head3 Operator Display Parameters
|
||||
|
||||
The label field (LABL) contains a string given to it that should describe the
|
||||
record in further detail. In addition to the DESC field. See
|
||||
L<Fields Common to All Record Types> for more on the record name (NAME) and
|
||||
description (DESC) fields.
|
||||
|
||||
=fields LABL, NAME, DESC
|
||||
|
||||
=cut
|
||||
|
||||
field(LABL,DBF_STRING) {
|
||||
prompt("Button Label")
|
||||
promptgroup("80 - Display")
|
||||
pp(TRUE)
|
||||
interest(1)
|
||||
size(20)
|
||||
}
|
||||
|
||||
=head3 Alarm Parameters
|
||||
|
||||
The Permissive record has the alarm parameters common to all record types.
|
||||
L<Alarm Fields> lists other fields related to a alarms that are common to all
|
||||
record types.
|
||||
|
||||
=head3 Run-time Parameters
|
||||
|
||||
These fields are used to trigger monitors for each field. Monitors for the VAL
|
||||
field are triggered when OVAL, the old value field, does not equal VAL.
|
||||
Likewise, OFLG causes monitors to be invoked for WFLG when WFLG does not equal
|
||||
OLFG.
|
||||
|
||||
=fields OVAL, OFLG
|
||||
|
||||
=cut
|
||||
|
||||
field(OVAL,DBF_USHORT) {
|
||||
prompt("Old Status")
|
||||
special(SPC_NOMOD)
|
||||
interest(3)
|
||||
}
|
||||
field(OFLG,DBF_USHORT) {
|
||||
prompt("Old Flag")
|
||||
special(SPC_NOMOD)
|
||||
interest(3)
|
||||
}
|
||||
|
||||
=head2 Record Support
|
||||
|
||||
=head3 Record Support Routines
|
||||
|
||||
=head4 process
|
||||
|
||||
long (*process)(struct dbCommon *precord)
|
||||
|
||||
C<<< process() >>> sets UDF to FALSE, triggers monitors on VAL and WFLG when
|
||||
they change, and scans the forward link if necessary.
|
||||
|
||||
=cut
|
||||
|
||||
}
|
||||
@@ -7,59 +7,13 @@
|
||||
# in file LICENSE that is included with this distribution.
|
||||
#*************************************************************************
|
||||
|
||||
=pod
|
||||
|
||||
=head1 Select Record (sel)
|
||||
=title 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<Parameter Fields>
|
||||
|
||||
=over
|
||||
|
||||
=item * L<Scan Parameters>
|
||||
|
||||
=item * L<Read Parameters>
|
||||
|
||||
=item * L<Select Parameters>
|
||||
|
||||
=item * L<Operator Display Parameters>
|
||||
|
||||
=item * L<Alarm Parameters>
|
||||
|
||||
=item * L<Monitor Parameters>
|
||||
|
||||
=item * L<Run-time Parameters>
|
||||
|
||||
=back
|
||||
|
||||
=item * L<Record Support>
|
||||
|
||||
=over
|
||||
|
||||
=item * L<Record Support Routines (selRecord.c)>
|
||||
|
||||
=item * L<Record Processing>
|
||||
|
||||
=back
|
||||
|
||||
=back
|
||||
|
||||
=begin html
|
||||
|
||||
<br>
|
||||
<hr>
|
||||
<br>
|
||||
|
||||
=end html
|
||||
|
||||
=recordtype sel
|
||||
|
||||
=cut
|
||||
@@ -74,6 +28,8 @@ recordtype(sel) {
|
||||
|
||||
=head2 Parameter Fields
|
||||
|
||||
The record-specific fields are described below, grouped by functionality.
|
||||
|
||||
=head3 Scan Parameters
|
||||
|
||||
The select record has the standard fields for specifying under what
|
||||
@@ -206,17 +162,9 @@ equal to A, no monitor is invoked for A.
|
||||
|
||||
=fields VAL, LALM, ALST, MLST, LA, LB, LC, LD, LE, LF, LG, LH, LI, LJ, LK, LL
|
||||
|
||||
=begin html
|
||||
|
||||
<br>
|
||||
<hr>
|
||||
<br>
|
||||
|
||||
=end html
|
||||
|
||||
=head2 Record Support
|
||||
|
||||
=head3 Record Support Routines (selRecord.c)
|
||||
=head3 Record Support Routines
|
||||
|
||||
=head4 init_record
|
||||
|
||||
@@ -336,7 +284,7 @@ Scan forward link if necessary, set PACT FALSE, and return.
|
||||
|
||||
=cut
|
||||
|
||||
include "dbCommon.dbd"
|
||||
include "dbCommon.dbd"
|
||||
field(VAL,DBF_DOUBLE) {
|
||||
prompt("Result")
|
||||
promptgroup("40 - Input")
|
||||
@@ -644,4 +592,3 @@ Scan forward link if necessary, set PACT FALSE, and return.
|
||||
interest(3)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
# Copyright (c) 2002 The Regents of the University of California, as
|
||||
# Operator of Los Alamos National Laboratory.
|
||||
# EPICS BASE is distributed subject to a Software License Agreement found
|
||||
# in file LICENSE that is included with this distribution.
|
||||
# in file LICENSE that is included with this distribution.
|
||||
#*************************************************************************
|
||||
|
||||
=title Sequence Record (seq)
|
||||
@@ -28,63 +28,9 @@ menu(seqSELM) {
|
||||
|
||||
recordtype(seq) {
|
||||
|
||||
=pod
|
||||
|
||||
=head1 Contents
|
||||
|
||||
=over
|
||||
|
||||
=item * L<Parameter Fields>
|
||||
|
||||
=over
|
||||
|
||||
=item * L<Scan Parameters>
|
||||
|
||||
=item * L<Desired Output Parameters>
|
||||
|
||||
=item * L<Output Parameters>
|
||||
|
||||
=item * L<Selection Algorithm Parameters>
|
||||
|
||||
=item * L<Delay Parameters>
|
||||
|
||||
=item * L<Operator Display Parameters>
|
||||
|
||||
=item * L<Alarm Parameters>
|
||||
|
||||
=back
|
||||
|
||||
=item * L<Record Support>
|
||||
|
||||
=back
|
||||
|
||||
=begin html
|
||||
|
||||
<br><hr><br>
|
||||
|
||||
=end html
|
||||
|
||||
=head2 Parameter Fields
|
||||
|
||||
The fields fall into the following categories:
|
||||
|
||||
=over
|
||||
|
||||
=item * L<Scan Parameters>
|
||||
|
||||
=item * L<Desired Output Parameters>
|
||||
|
||||
=item * L<Output Parameters>
|
||||
|
||||
=item * L<Selection Algorithm Parameters>
|
||||
|
||||
=item * L<Delay Parameters>
|
||||
|
||||
=item * L<Operator Display Parameters>
|
||||
|
||||
=item * L<Alarm Parameters>
|
||||
|
||||
=back
|
||||
The record-specific fields are described below, grouped by functionality.
|
||||
|
||||
=head3 Scan Parameters
|
||||
|
||||
@@ -294,7 +240,7 @@ information on call
|
||||
|
||||
=cut
|
||||
|
||||
include "dbCommon.dbd"
|
||||
include "dbCommon.dbd"
|
||||
field(VAL,DBF_LONG) {
|
||||
prompt("Used to trigger")
|
||||
asl(ASL0)
|
||||
|
||||
@@ -1,24 +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(state) {
|
||||
include "dbCommon.dbd"
|
||||
field(VAL,DBF_STRING) {
|
||||
prompt("Value")
|
||||
promptgroup("40 - Input")
|
||||
asl(ASL0)
|
||||
pp(TRUE)
|
||||
size(20)
|
||||
}
|
||||
field(OVAL,DBF_STRING) {
|
||||
prompt("Prev Value")
|
||||
special(SPC_NOMOD)
|
||||
interest(3)
|
||||
size(20)
|
||||
}
|
||||
}
|
||||
88
modules/database/src/std/rec/stateRecord.dbd.pod
Normal file
88
modules/database/src/std/rec/stateRecord.dbd.pod
Normal file
@@ -0,0 +1,88 @@
|
||||
#*************************************************************************
|
||||
# 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 State Record (state)
|
||||
|
||||
The state record is a means for a state program to communicate with the operator
|
||||
interface. Its only function is to provide a place in the database through which
|
||||
the state program can inform the operator interface of its state by storing an
|
||||
arbitrary ASCII string in its VAL field.
|
||||
|
||||
B<Note this record is deprecated and may be removed in a future EPICS release.>
|
||||
|
||||
=recordtype state
|
||||
|
||||
=cut
|
||||
|
||||
recordtype(state) {
|
||||
include "dbCommon.dbd"
|
||||
|
||||
=head2 Parameter Fields
|
||||
|
||||
The record-specific fields are described below, grouped by functionality.
|
||||
|
||||
=head3 Scan Parameters
|
||||
|
||||
The state record has the standard fields for specifying under what circumstances
|
||||
it will be processed. These fields are listed in L<Scan Fields>. In addition,
|
||||
L<Scanning Specification> explains how these fields are used.
|
||||
|
||||
=head3 Operator Display Parameters
|
||||
|
||||
See L<Fields Common to All Record Types> for more on the record name (NAME) and
|
||||
description (DESC) fields.
|
||||
|
||||
=fields NAME, DESC
|
||||
|
||||
=head3 Alarm Parameters
|
||||
|
||||
The state record has the alarm parameters common to all record types.
|
||||
L<Alarm Fields> lists other fields related to a alarms that are common to all
|
||||
record types.
|
||||
|
||||
=head3 Run-time Parameters
|
||||
|
||||
These parameters are used by the application code to convey the state of the
|
||||
program to the operator interface. The VAL field holds the string retrieved from
|
||||
the state program. The OVAL is used to implement monitors for the VAL field.
|
||||
When the string in OVAL differs from the one in VAL, monitors are triggered.
|
||||
They represent the current state of the sequence program.
|
||||
|
||||
=fields VAL, OVAL
|
||||
|
||||
=cut
|
||||
|
||||
field(VAL,DBF_STRING) {
|
||||
prompt("Value")
|
||||
promptgroup("40 - Input")
|
||||
asl(ASL0)
|
||||
pp(TRUE)
|
||||
size(20)
|
||||
}
|
||||
field(OVAL,DBF_STRING) {
|
||||
prompt("Prev Value")
|
||||
special(SPC_NOMOD)
|
||||
interest(3)
|
||||
size(20)
|
||||
}
|
||||
|
||||
=head2 Record Support
|
||||
|
||||
=head3 Record Support Routines
|
||||
|
||||
=head4 process
|
||||
|
||||
long (*process)(struct dbCommon *precord)
|
||||
|
||||
C<process()> triggers monitors on VAL when it changes and scans the forward
|
||||
link if necessary.
|
||||
|
||||
=cut
|
||||
|
||||
}
|
||||
@@ -1,98 +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(stringinPOST) {
|
||||
choice(stringinPOST_OnChange,"On Change")
|
||||
choice(stringinPOST_Always,"Always")
|
||||
}
|
||||
recordtype(stringin) {
|
||||
include "dbCommon.dbd"
|
||||
field(VAL,DBF_STRING) {
|
||||
prompt("Current Value")
|
||||
promptgroup("40 - Input")
|
||||
asl(ASL0)
|
||||
pp(TRUE)
|
||||
size(40)
|
||||
}
|
||||
field(OVAL,DBF_STRING) {
|
||||
prompt("Previous Value")
|
||||
special(SPC_NOMOD)
|
||||
interest(3)
|
||||
size(40)
|
||||
}
|
||||
field(INP,DBF_INLINK) {
|
||||
prompt("Input Specification")
|
||||
promptgroup("40 - Input")
|
||||
interest(1)
|
||||
}
|
||||
field(MPST,DBF_MENU) {
|
||||
prompt("Post Value Monitors")
|
||||
promptgroup("80 - Display")
|
||||
interest(1)
|
||||
menu(stringinPOST)
|
||||
}
|
||||
field(APST,DBF_MENU) {
|
||||
prompt("Post Archive Monitors")
|
||||
promptgroup("80 - Display")
|
||||
interest(1)
|
||||
menu(stringinPOST)
|
||||
}
|
||||
field(SIOL,DBF_INLINK) {
|
||||
prompt("Simulation Input Link")
|
||||
promptgroup("90 - Simulate")
|
||||
interest(1)
|
||||
}
|
||||
field(SVAL,DBF_STRING) {
|
||||
prompt("Simulation Value")
|
||||
pp(TRUE)
|
||||
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("epicsCallback *simpvt")
|
||||
}
|
||||
}
|
||||
319
modules/database/src/std/rec/stringinRecord.dbd.pod
Normal file
319
modules/database/src/std/rec/stringinRecord.dbd.pod
Normal file
@@ -0,0 +1,319 @@
|
||||
#*************************************************************************
|
||||
# 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 String Input Record (stringin)
|
||||
|
||||
The string input record retrieves an arbitrary ASCII string of up to 40
|
||||
characters. Several device support routines are available, all of which are soft
|
||||
device support for retrieving values from other records or other software
|
||||
components.
|
||||
|
||||
=recordtype stringin
|
||||
|
||||
=cut
|
||||
|
||||
menu(stringinPOST) {
|
||||
choice(stringinPOST_OnChange,"On Change")
|
||||
choice(stringinPOST_Always,"Always")
|
||||
}
|
||||
recordtype(stringin) {
|
||||
include "dbCommon.dbd"
|
||||
field(VAL,DBF_STRING) {
|
||||
prompt("Current Value")
|
||||
promptgroup("40 - Input")
|
||||
asl(ASL0)
|
||||
pp(TRUE)
|
||||
size(40)
|
||||
}
|
||||
field(OVAL,DBF_STRING) {
|
||||
prompt("Previous Value")
|
||||
special(SPC_NOMOD)
|
||||
interest(3)
|
||||
size(40)
|
||||
}
|
||||
|
||||
=head2 Parameter Fields
|
||||
|
||||
The record-specific fields are described below, grouped by functionality.
|
||||
|
||||
=head3 Scan Parameters
|
||||
|
||||
The string input record has the standard fields for specifying under what
|
||||
circumstances it will be processed. These fields are listed in L<Scan Fields>.
|
||||
In addition, L<Scanning Specification> explains how these fields are used.
|
||||
|
||||
=head3 Read Parameters
|
||||
|
||||
The INP field determines where the string input record gets its string. It can
|
||||
be a database or channel access link, or a constant. If constant, the VAL field
|
||||
is initialized with the constant and can be changed via dbPuts. Otherwise, the
|
||||
string is read from the specified location each time the record is processed and
|
||||
placed in the VAL field. The maximum number of characters that the string in VAL
|
||||
can be is 40. In addition, the appropriate device support module must be entered
|
||||
into the DTYP field.
|
||||
|
||||
See L<Address Specification> for information on specifying links.
|
||||
|
||||
=fields VAL, INP, DTYP
|
||||
|
||||
=cut
|
||||
|
||||
field(INP,DBF_INLINK) {
|
||||
prompt("Input Specification")
|
||||
promptgroup("40 - Input")
|
||||
interest(1)
|
||||
}
|
||||
|
||||
=head3 Monitor Parameters
|
||||
|
||||
These parameters are used to specify when the monitor post should be sent by
|
||||
C<monitor()> routine. There are two possible choices:
|
||||
|
||||
=head4 Menu stringinPOST
|
||||
|
||||
=menu stringinPOST
|
||||
|
||||
APST is used for archiver monitors and MPST is for all other type of monitors.
|
||||
|
||||
=fields MPST, APST
|
||||
|
||||
=cut
|
||||
|
||||
field(MPST,DBF_MENU) {
|
||||
prompt("Post Value Monitors")
|
||||
promptgroup("80 - Display")
|
||||
interest(1)
|
||||
menu(stringinPOST)
|
||||
}
|
||||
field(APST,DBF_MENU) {
|
||||
prompt("Post Archive Monitors")
|
||||
promptgroup("80 - Display")
|
||||
interest(1)
|
||||
menu(stringinPOST)
|
||||
}
|
||||
|
||||
=head3 Operator Display Parameters
|
||||
|
||||
See L<Fields Common to All Record Types> for more on the record name (NAME) and
|
||||
description (DESC) fields.
|
||||
|
||||
=fields NAME, DESC
|
||||
|
||||
=head3 Alarm Parameters
|
||||
|
||||
The string input record has the alarm parameters common to all record types.
|
||||
L<Alarm Fields> lists other fields related to a alarms that are common to all
|
||||
record types.
|
||||
|
||||
=head3 Run-time and Simulation Mode Parameters
|
||||
|
||||
The old value field (OVAL) of the string input is used to implement value change
|
||||
monitors for VAL. If VAL is not equal to OVAL, then monitors are triggered.
|
||||
|
||||
=fields OVAL
|
||||
|
||||
|
||||
The following fields are used to operate the string input in the simulation
|
||||
mode. See L<Simulation Mode> for more information on simulation mode fields.
|
||||
|
||||
=fields SIOL, SVAL, SIML, SIMM, SIMS, SSCN, SDLY
|
||||
|
||||
=cut
|
||||
|
||||
field(SIOL,DBF_INLINK) {
|
||||
prompt("Simulation Input Link")
|
||||
promptgroup("90 - Simulate")
|
||||
interest(1)
|
||||
}
|
||||
field(SVAL,DBF_STRING) {
|
||||
prompt("Simulation Value")
|
||||
pp(TRUE)
|
||||
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("epicsCallback *simpvt")
|
||||
}
|
||||
|
||||
=head2 Record Support
|
||||
|
||||
=head3 Record Support Routines
|
||||
|
||||
=head4 init_record
|
||||
|
||||
long (*init_record)(struct dbCommon *precord, int pass)
|
||||
|
||||
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 record
|
||||
support read routine is defined. If either does not exist, an error message is
|
||||
issued and processing is terminated.
|
||||
|
||||
If device support includes an C<init_record()> routine it is called.
|
||||
|
||||
=head4 process
|
||||
|
||||
long (*process)(struct dbCommon *precord)
|
||||
|
||||
See L<Record Processing>.
|
||||
|
||||
=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<Simulation Mode> for more information on simulation
|
||||
mode fields and how they affect input.
|
||||
|
||||
=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.
|
||||
|
||||
C<recGblGetTimeStamp()> is called.
|
||||
|
||||
=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 OVAL is not equal to VAL.
|
||||
|
||||
=item *
|
||||
|
||||
NSEV and NSTA are reset to 0.
|
||||
|
||||
=back
|
||||
|
||||
=item 6.
|
||||
|
||||
Scan forward link if necessary, set PACT FALSE, and return.
|
||||
|
||||
=back
|
||||
|
||||
=begin html
|
||||
|
||||
<br>
|
||||
<hr>
|
||||
<br>
|
||||
|
||||
=end html
|
||||
|
||||
=head2 Device Support
|
||||
|
||||
=head3 Fields Of Interest To Device Support
|
||||
|
||||
Each stringin input record must have an associated set of device support
|
||||
routines. The primary responsibility of the device support routines is to obtain
|
||||
a new ASCII string value whenever read_stringin is called. The device support
|
||||
routines are primarily interested in the following fields:
|
||||
|
||||
=fields PACT, DPVT, UDF, VAL, INP
|
||||
|
||||
=head3 Device Support Routines (devSiSoft.c)
|
||||
|
||||
=head4 init_record
|
||||
|
||||
long init_record(stringinRecord *prec)
|
||||
|
||||
This routine is optional. If provided, it is called by the record support
|
||||
C<init_record()> routine.
|
||||
|
||||
=head4 read_stringin
|
||||
|
||||
long read_stringin(stringinRecord *prec)
|
||||
|
||||
This routine must provide a new input value. It returns the following values:
|
||||
|
||||
=over
|
||||
|
||||
=item * 0: Success. A new ASCII string is stored into VAL.
|
||||
|
||||
=item * Other: Error.
|
||||
|
||||
=back
|
||||
|
||||
=head3 Device Support for Soft Records
|
||||
|
||||
The C<<< Soft Channel >>> module places a value directly in VAL.
|
||||
|
||||
If the INP link type is constant, the double constant, if non-zero, is converted
|
||||
to a string and stored into VAL by C<init_record()>, and UDF is set to FALSE. If
|
||||
the INP link type is PV_LINK, then dbCaAddInlink is called by C<init_record()>.
|
||||
|
||||
read_stringin calls recGblGetLinkValue to read the current value of VAL. See
|
||||
L<Soft Input>.
|
||||
|
||||
If the return status of recGblGetLinkValue is zero, then read_stringin sets UDF
|
||||
to FALSE. The status of recGblGetLinkValue is returned.
|
||||
|
||||
=cut
|
||||
|
||||
}
|
||||
@@ -1,116 +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(stringoutPOST) {
|
||||
choice(stringoutPOST_OnChange,"On Change")
|
||||
choice(stringoutPOST_Always,"Always")
|
||||
}
|
||||
recordtype(stringout) {
|
||||
include "dbCommon.dbd"
|
||||
field(VAL,DBF_STRING) {
|
||||
prompt("Current Value")
|
||||
promptgroup("50 - Output")
|
||||
asl(ASL0)
|
||||
pp(TRUE)
|
||||
size(40)
|
||||
}
|
||||
field(OVAL,DBF_STRING) {
|
||||
prompt("Previous Value")
|
||||
special(SPC_NOMOD)
|
||||
interest(3)
|
||||
size(40)
|
||||
}
|
||||
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(OUT,DBF_OUTLINK) {
|
||||
prompt("Output Specification")
|
||||
promptgroup("50 - Output")
|
||||
interest(1)
|
||||
}
|
||||
field(MPST,DBF_MENU) {
|
||||
prompt("Post Value Monitors")
|
||||
promptgroup("80 - Display")
|
||||
interest(1)
|
||||
menu(stringoutPOST)
|
||||
}
|
||||
field(APST,DBF_MENU) {
|
||||
prompt("Post Archive Monitors")
|
||||
promptgroup("80 - Display")
|
||||
interest(1)
|
||||
menu(stringoutPOST)
|
||||
}
|
||||
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("epicsCallback *simpvt")
|
||||
}
|
||||
field(IVOA,DBF_MENU) {
|
||||
prompt("INVALID output action")
|
||||
promptgroup("50 - Output")
|
||||
interest(2)
|
||||
menu(menuIvoa)
|
||||
}
|
||||
field(IVOV,DBF_STRING) {
|
||||
prompt("INVALID output value")
|
||||
promptgroup("50 - Output")
|
||||
interest(2)
|
||||
size(40)
|
||||
}
|
||||
}
|
||||
384
modules/database/src/std/rec/stringoutRecord.dbd.pod
Normal file
384
modules/database/src/std/rec/stringoutRecord.dbd.pod
Normal file
@@ -0,0 +1,384 @@
|
||||
#*************************************************************************
|
||||
# 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 String Output Record (stringout)
|
||||
|
||||
The stringout record is used to write an arbitrary ASCII string of up to 40
|
||||
characters to other records or software variables.
|
||||
|
||||
=recordtype stringout
|
||||
|
||||
=cut
|
||||
|
||||
include "menuIvoa.dbd"
|
||||
|
||||
menu(stringoutPOST) {
|
||||
choice(stringoutPOST_OnChange,"On Change")
|
||||
choice(stringoutPOST_Always,"Always")
|
||||
}
|
||||
recordtype(stringout) {
|
||||
include "dbCommon.dbd"
|
||||
field(VAL,DBF_STRING) {
|
||||
prompt("Current Value")
|
||||
promptgroup("50 - Output")
|
||||
asl(ASL0)
|
||||
pp(TRUE)
|
||||
size(40)
|
||||
}
|
||||
field(OVAL,DBF_STRING) {
|
||||
prompt("Previous Value")
|
||||
special(SPC_NOMOD)
|
||||
interest(3)
|
||||
size(40)
|
||||
}
|
||||
|
||||
|
||||
=head2 Parameter Fields
|
||||
|
||||
The record-specific fields are described below, grouped by functionality.
|
||||
|
||||
=head3 Scan Parameters
|
||||
|
||||
The string output record has the standard fields for specifying under what
|
||||
circumstances it will be processed. These fields are listed in
|
||||
L<Scan Fields>.
|
||||
In addition, L<Scanning Specification>
|
||||
explains how these fields are used.
|
||||
|
||||
=head3 Desired Output Parameters
|
||||
|
||||
The string output record must specify from where it gets its desired output
|
||||
string. The first field that determines where the desired output originates is
|
||||
the output mode select (OSML) field, which can have two possible value: C<<<
|
||||
closed_loop >>> or C<<< supervisory >>>. If C<<< supervisory >>> is specified,
|
||||
DOL is ignored, the current value of VAL is written, and the VAL can be changed
|
||||
externally via dbPuts at run-time. If C<<< closed_loop >>> is specified, the VAL
|
||||
field's value is obtained from the address specified in the desired output
|
||||
location field (DOL) which can be either a database link or a channel access
|
||||
link.
|
||||
|
||||
DOL can also be a constant in addition to a link, in which case VAL is
|
||||
initialized to the constant value. However, your string constant may be
|
||||
interpreted as a CA link name, so if you want to initialize your string output
|
||||
record, it's best to use the VAL field. Note that if DOL is a constant, OMSL
|
||||
cannot be C<<< closed_loop. >>> See
|
||||
L<Address Specification>
|
||||
for information on specifying links.
|
||||
|
||||
=fields VAL, DOL, OMSL
|
||||
|
||||
=cut
|
||||
|
||||
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 Write Parameters
|
||||
|
||||
The output link specified in the OUT field specifies where the string output
|
||||
record is to write its string. The link can be a database or channel access
|
||||
link. If the OUT field is a constant, no output will be written. See L<Address
|
||||
Specification> for information on specifying links.
|
||||
|
||||
In addition, the appropriate device support module must be entered into the DTYP
|
||||
field.
|
||||
|
||||
=fields OUT, DTYP
|
||||
|
||||
=cut
|
||||
|
||||
field(OUT,DBF_OUTLINK) {
|
||||
prompt("Output Specification")
|
||||
promptgroup("50 - Output")
|
||||
interest(1)
|
||||
}
|
||||
|
||||
=head3 Monitor Parameters
|
||||
|
||||
These parameters are used to specify when the monitor post should be sent by
|
||||
C<monitor()> routine. There are two possible choices:
|
||||
|
||||
=head4 Menu stringoutPOST
|
||||
|
||||
=menu stringoutPOST
|
||||
|
||||
APST is used for archiver monitors and MPST is for all other type of monitors.
|
||||
|
||||
=fields MPST, APST
|
||||
|
||||
=cut
|
||||
|
||||
field(MPST,DBF_MENU) {
|
||||
prompt("Post Value Monitors")
|
||||
promptgroup("80 - Display")
|
||||
interest(1)
|
||||
menu(stringoutPOST)
|
||||
}
|
||||
field(APST,DBF_MENU) {
|
||||
prompt("Post Archive Monitors")
|
||||
promptgroup("80 - Display")
|
||||
interest(1)
|
||||
menu(stringoutPOST)
|
||||
}
|
||||
|
||||
=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 string output
|
||||
either textually or graphically.
|
||||
|
||||
See L<Fields Common to All Record Types>
|
||||
for more on the record name (NAME) and description (DESC) fields.
|
||||
|
||||
=fields NAME, DESC
|
||||
|
||||
=head3 Run-time and Simulation Mode Parameters
|
||||
|
||||
The old value field (OVAL) of the string input is used to implement value change
|
||||
monitors for VAL. If VAL is not equal to OVAL, then monitors are triggered.
|
||||
|
||||
=fields OVAL
|
||||
|
||||
The following fields are used to operate the string output in the simulation
|
||||
mode. See
|
||||
L<Simulation Mode>
|
||||
for more information on these fields.
|
||||
|
||||
=fields SIOL, SIML, SIMM, SIMS, SSCN, SDLY
|
||||
|
||||
=cut
|
||||
|
||||
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("epicsCallback *simpvt")
|
||||
}
|
||||
|
||||
=head3 Alarm Parameters
|
||||
|
||||
The possible alarm conditions for the string output record are the SCAN, READ,
|
||||
and INVALID alarms. The severity of the first two is always MAJOR and not
|
||||
configurable.
|
||||
|
||||
The IVOA field specifies an action to take when the INVALID alarm is triggered.
|
||||
There are three possible actions:
|
||||
|
||||
=head4 Menu menuIvoa
|
||||
|
||||
=menu menuIvoa
|
||||
|
||||
When C<<< Set output to IVOV >>>, the value contained in the IVOV field is
|
||||
written to the output link during an alarm condition. See
|
||||
L<Invalid Alarm Output Action>
|
||||
for more information on the IVOA and IVOV fields.
|
||||
L<Alarm Fields>
|
||||
lists other fields related to a alarms that are common to all record types.
|
||||
|
||||
=fields IVOA, IVOV
|
||||
|
||||
=cut
|
||||
|
||||
field(IVOA,DBF_MENU) {
|
||||
prompt("INVALID output action")
|
||||
promptgroup("50 - Output")
|
||||
interest(2)
|
||||
menu(menuIvoa)
|
||||
}
|
||||
field(IVOV,DBF_STRING) {
|
||||
prompt("INVALID output value")
|
||||
promptgroup("50 - Output")
|
||||
interest(2)
|
||||
size(40)
|
||||
}
|
||||
|
||||
=head2 Record Support
|
||||
|
||||
=head3 Record Support Routines
|
||||
|
||||
=head4 init_record
|
||||
|
||||
long (*init_record)(struct dbCommon *precord, int pass)
|
||||
|
||||
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 the type double constant, if non-zero, is converted
|
||||
to a string and stored into VAL 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<init_record()>, it is called.
|
||||
|
||||
=head4 process
|
||||
|
||||
long (*process)(struct dbCommon *precord)
|
||||
|
||||
See L<Record Processing>.
|
||||
|
||||
=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<Soft Output>.
|
||||
If the return status of recGblGetLinkValue is zero then UDF is set to FALSE.
|
||||
|
||||
=item 3.
|
||||
|
||||
Check severity and write the new value. See
|
||||
L<Simulation Mode>
|
||||
and L<Invalid Alarm Output Action>
|
||||
for details on how the simulation mode and the INVALID alarm conditions affect output.
|
||||
|
||||
=item 4.
|
||||
|
||||
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 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 OVAL is not equal to VAL.
|
||||
|
||||
=item *
|
||||
|
||||
NSEV and NSTA are reset to 0.
|
||||
|
||||
=back
|
||||
|
||||
=item 6.
|
||||
|
||||
Scan forward link if necessary, set PACT FALSE, and return.
|
||||
|
||||
=back
|
||||
|
||||
=begin html
|
||||
|
||||
<br>
|
||||
<hr>
|
||||
<br>
|
||||
|
||||
=end html
|
||||
|
||||
=head2 Device Support
|
||||
|
||||
=head3 Fields Of Interest To Device Support
|
||||
|
||||
Each stringout 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 write_stringout is called. The device support routines are
|
||||
primarily interested in the following fields:
|
||||
|
||||
=fields PACT, DPVT, NSEV, NSTA, VAL, OUT
|
||||
|
||||
=head3 Device Support Routines (devSoSoft.c)
|
||||
|
||||
=head4 write_stringout
|
||||
|
||||
long write_stringout(stringoutRecord *prec)
|
||||
|
||||
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 >>> device support module writes the current value of VAL.
|
||||
|
||||
If the OUT link type is PV_LINK, then dbCaAddInlink is called by
|
||||
C<init_record()>.
|
||||
|
||||
write_so calls recGblPutLinkValue to write the current value of VAL. See
|
||||
L<Soft Output>.
|
||||
|
||||
=cut
|
||||
|
||||
}
|
||||
@@ -7,7 +7,7 @@
|
||||
# in file LICENSE that is included with this distribution.
|
||||
#*************************************************************************
|
||||
|
||||
=head1 Sub-Array Record (subArray)
|
||||
=title Sub-Array Record (subArray)
|
||||
|
||||
The normal use for the subArray record type is to obtain sub-arrays from
|
||||
waveform records. Setting either the number of elements (NELM) or index (INDX)
|
||||
@@ -23,64 +23,6 @@ elements actually available are returned, and the number of elements read field
|
||||
(NORD) is set to reflect this. This record type does not support writing new
|
||||
values into waveform records.
|
||||
|
||||
=head2 Contents
|
||||
|
||||
=over
|
||||
|
||||
=item * L<Parameter Fields>
|
||||
|
||||
=over
|
||||
|
||||
=item * L<Scan Parameters>
|
||||
|
||||
=item * L<Read Parameters>
|
||||
|
||||
=item * L<Array Parameters>
|
||||
|
||||
=item * L<Operator Display Parameters>
|
||||
|
||||
=item * L<Alarm Parameters>
|
||||
|
||||
=item * L<Run-time Parameters>
|
||||
|
||||
=back
|
||||
|
||||
=item * L<Record Support>
|
||||
|
||||
=over
|
||||
|
||||
=item * L<Record Support Routines (subArrayRecord.c)>
|
||||
|
||||
=item * L<Record Processing>
|
||||
|
||||
=item * L<Example Synchronous Subroutine>
|
||||
|
||||
=item * L<Example Asynchronous Subroutine>
|
||||
|
||||
=back
|
||||
|
||||
=item * L<Device Support>
|
||||
|
||||
=over
|
||||
|
||||
=item * L<Fields Of Interest To Device Support>
|
||||
|
||||
=item * L<Device Support Routines (devSASoft.c)>
|
||||
|
||||
=item * L<Device Support For Soft Records>
|
||||
|
||||
=back
|
||||
|
||||
=back
|
||||
|
||||
=begin html
|
||||
|
||||
<br>
|
||||
<hr>
|
||||
<br>
|
||||
|
||||
=end html
|
||||
|
||||
=recordtype subArray
|
||||
|
||||
=cut
|
||||
@@ -89,14 +31,14 @@ recordtype(subArray) {
|
||||
|
||||
=head2 Parameter Fields
|
||||
|
||||
The record-specific fields are described below, grouped by functionality.
|
||||
|
||||
=head3 Scan Parameters
|
||||
|
||||
The subArray record has the standard fields for specifying under what
|
||||
circumstances the record will be processed. These fields are listed in
|
||||
L<Scan Fields>.
|
||||
In addition,
|
||||
L<Scanning Specification>
|
||||
explains how these fields are used.
|
||||
In addition, L<Scanning Specification> explains how these fields are used.
|
||||
|
||||
=head3 Read Parameters
|
||||
|
||||
@@ -186,7 +128,7 @@ BPTR contains a pointer to the record's array.
|
||||
|
||||
=head2 Record Support
|
||||
|
||||
=head3 Record Support Routines (subArrayRecord.c)
|
||||
=head3 Record Support Routines
|
||||
|
||||
=head4 init_record
|
||||
|
||||
@@ -372,7 +314,7 @@ INP is expected to point to a waveform record.
|
||||
|
||||
=cut
|
||||
|
||||
include "dbCommon.dbd"
|
||||
include "dbCommon.dbd"
|
||||
field(VAL,DBF_NOACCESS) {
|
||||
prompt("Value")
|
||||
asl(ASL0)
|
||||
|
||||
@@ -4,62 +4,14 @@
|
||||
# Copyright (c) 2002 The Regents of the University of California, as
|
||||
# Operator of Los Alamos National Laboratory.
|
||||
# EPICS BASE is distributed subject to a Software License Agreement found
|
||||
# in file LICENSE that is included with this distribution.
|
||||
# in file LICENSE that is included with this distribution.
|
||||
#*************************************************************************
|
||||
|
||||
=head1 Subroutine Record (sub)
|
||||
=title Subroutine Record (sub)
|
||||
|
||||
The subroutine record is used to call a C initialization routine and a recurring
|
||||
scan routine. There is no device support for this record.
|
||||
|
||||
=head2 Contents
|
||||
|
||||
=over
|
||||
|
||||
=item * L<Parameter Fields>
|
||||
|
||||
=over
|
||||
|
||||
=item * L<Scan Parameters>
|
||||
|
||||
=item * L<Read Parameters>
|
||||
|
||||
=item * L<Subroutine Connection>
|
||||
|
||||
=item * L<Operator Display Parameters>
|
||||
|
||||
=item * L<Alarm Parameters>
|
||||
|
||||
=item * L<Monitor Parameters>
|
||||
|
||||
=item * L<Run-time Parameters>
|
||||
|
||||
=back
|
||||
|
||||
=item * L<Record Support>
|
||||
|
||||
=over
|
||||
|
||||
=item * L<Record Support Routines (subRecord.c)>
|
||||
|
||||
=item * L<Record Processing>
|
||||
|
||||
=item * L<Example Synchronous Subroutine>
|
||||
|
||||
=item * L<Example Asynchronous Subroutine>
|
||||
|
||||
=back
|
||||
|
||||
=back
|
||||
|
||||
=begin html
|
||||
|
||||
<br>
|
||||
<hr>
|
||||
<br>
|
||||
|
||||
=end html
|
||||
|
||||
=recordtype sub
|
||||
|
||||
=cut
|
||||
@@ -68,6 +20,8 @@ recordtype(sub) {
|
||||
|
||||
=head2 Parameter Fields
|
||||
|
||||
The record-specific fields are described below, grouped by functionality.
|
||||
|
||||
=head3 Scan Parameters
|
||||
|
||||
The subroutine record has the standard fields for specifying under what
|
||||
@@ -170,7 +124,7 @@ monitors are called for that field.
|
||||
|
||||
=head2 Record Support
|
||||
|
||||
=head3 Record Support Routines (subRecord.c)
|
||||
=head3 Record Support Routines
|
||||
|
||||
=head4 init_record
|
||||
|
||||
@@ -307,19 +261,19 @@ called.
|
||||
#include <subRecord.h>
|
||||
#include <registryFunction.h>
|
||||
#include <epicsExport.h>
|
||||
|
||||
|
||||
static long subInit(struct subRecord *psub)
|
||||
{
|
||||
printf("subInit was called\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static long subProcess(struct subRecord *psub)
|
||||
{
|
||||
psub->val++;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
epicsRegisterFunction(subInit);
|
||||
epicsRegisterFunction(subProcess);
|
||||
|
||||
@@ -396,14 +350,14 @@ processing.
|
||||
#include <dbDefs.h>
|
||||
#include <dbAccess.h>
|
||||
#include <subRecord.h>
|
||||
|
||||
|
||||
/* control block for callback*/
|
||||
struct callback {
|
||||
epicsCallback callback;
|
||||
struct dbCommon *precord;
|
||||
WDOG_ID wd_id;
|
||||
};
|
||||
|
||||
|
||||
void myCallback(struct callback *pcallback)
|
||||
{
|
||||
struct dbCommon *precord=pcallback->precord;
|
||||
@@ -412,7 +366,7 @@ processing.
|
||||
(*prset->process)(precord);
|
||||
dbScanUnlock(precord);
|
||||
}
|
||||
|
||||
|
||||
long subInit(struct subRecord *psub)
|
||||
{
|
||||
struct callback *pcallback;
|
||||
@@ -424,7 +378,7 @@ processing.
|
||||
printf("subInit was called\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
long subProcess(struct subRecord *psub)
|
||||
{
|
||||
struct callback *pcallback=(struct callback *)(psub->dpvt);
|
||||
@@ -454,7 +408,7 @@ processing.
|
||||
|
||||
=cut
|
||||
|
||||
include "dbCommon.dbd"
|
||||
include "dbCommon.dbd"
|
||||
field(VAL,DBF_DOUBLE) {
|
||||
prompt("Result")
|
||||
asl(ASL0)
|
||||
@@ -773,4 +727,3 @@ processing.
|
||||
interest(3)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
# Copyright (c) 2002 The Regents of the University of California, as
|
||||
# Operator of Los Alamos National Laboratory.
|
||||
# EPICS BASE is distributed subject to a Software License Agreement found
|
||||
# in file LICENSE that is included with this distribution.
|
||||
# in file LICENSE that is included with this distribution.
|
||||
#*************************************************************************
|
||||
|
||||
=title Waveform Record (waveform)
|
||||
@@ -26,71 +26,9 @@ menu(waveformPOST) {
|
||||
|
||||
recordtype(waveform) {
|
||||
|
||||
=pod
|
||||
|
||||
=head1 Contents
|
||||
|
||||
=over
|
||||
|
||||
=item * L<Parameter Fields>
|
||||
|
||||
=over
|
||||
|
||||
=item * L<Scan Parameters>
|
||||
|
||||
=item * L<Read Parameters>
|
||||
|
||||
=item * L<Operator Display Parameters>
|
||||
|
||||
=item * L<Run-time Parameters>
|
||||
|
||||
=back
|
||||
|
||||
=item * L<Record Support>
|
||||
|
||||
=over
|
||||
|
||||
=item * L<Record Support Routines>
|
||||
|
||||
=item * L<Record Processing>
|
||||
|
||||
=back
|
||||
|
||||
=item * L<Device Support>
|
||||
|
||||
=over
|
||||
|
||||
=item * L<Fields Of Interest To Device Support>
|
||||
|
||||
=item * L<Device Support Routines>
|
||||
|
||||
=item * L<Device Support For Soft Records>
|
||||
|
||||
=back
|
||||
|
||||
=back
|
||||
|
||||
=begin html
|
||||
|
||||
<hr>
|
||||
|
||||
=end html
|
||||
|
||||
=head2 Parameter Fields
|
||||
|
||||
The waveform's fields fall into the following categories:
|
||||
|
||||
=over
|
||||
|
||||
=item * L<Scan Parameters>;
|
||||
|
||||
=item * L<Read Parameters>;
|
||||
|
||||
=item * L<Operator Display Parameters>;
|
||||
|
||||
=item * L<Run-time Parameters>;
|
||||
|
||||
=back
|
||||
The record-specific fields are described below, grouped by functionality.
|
||||
|
||||
=head3 Scan Parameters
|
||||
|
||||
@@ -120,7 +58,7 @@ The values retrieved from the input link are placed in an array referenced by
|
||||
VAL. (If the INP link is a constant, elements can be placed in the array via
|
||||
dbPuts.) NELM specifies the number of elements that the array will hold, while
|
||||
FTVL specifies the data type of the elements.
|
||||
The RARM field causes the device to re-arm when this field is set to 1.
|
||||
The RARM field causes the device to re-arm when this field is set to 1.
|
||||
|
||||
=head4 Possible data types for FTVL
|
||||
|
||||
@@ -458,7 +396,7 @@ NORD is set to the number of values returned and read_wf returns.
|
||||
|
||||
=cut
|
||||
|
||||
include "dbCommon.dbd"
|
||||
include "dbCommon.dbd"
|
||||
field(VAL,DBF_NOACCESS) {
|
||||
prompt("Value")
|
||||
asl(ASL0)
|
||||
|
||||
Reference in New Issue
Block a user