New DBE_PROPERTY event type and support in catools and mbbi/mbbo records

This commit is contained in:
Ralph Lange
2009-04-02 15:51:30 +00:00
parent f156474714
commit b1556bd871
6 changed files with 56 additions and 19 deletions
+17
View File
@@ -12,6 +12,23 @@
<h2 align="center">Changes between 3.14.10 and 3.14.11</h2>
<!-- Insert new items below here ... -->
<h4>New event type DBE_PROPERTY</h4>
<p>A new event type (flag in the Channel Access event mask) has been added
to support subscriptions that get events whenever a property of the PV
changes. This will allow clients to get notified on changes of control
limits, graphical limits, state strings etc.</p>
<p>The CA commandline tool camonitor and the CA Perl interface support
the new event type.
As a first working example, the mbbi and mbbo records have been extended
to send a DBE_PROPERTY event when their status strings are updated.
A more general mechanism to specify sending DBE_PROPERTY events through
the DBD file will appear in 3.15.</p>
<p>Application developers are encouraged to start using DBE_PROPERTY
subscriptions.</p>
<h4>PINI Processing Phases</h4>
<p>The PHAS field now controls the order in which records with PINI set are
+10 -6
View File
@@ -12,6 +12,7 @@ background-color: #ddf;
-->
</style>
</head>
@@ -32,11 +33,13 @@ Laboratory, SNS Division</span></p>
<p><span style="font-size: x-small; font-weight:lighter;">Helmholtz-Zentrum
Berlin (BESSY II)</span></p>
<p><span style="font-size: xx-small; font-weight:lighter;">Copyright © 2002
The University of Chicago, as Operator of Argonne National Laboratory.<br>
<p><span style="font-size: xx-small; font-weight:lighter;">Copyright © 2009
Helmholtz-Zentrum Berlin für Materialien und Energie GmbH.<br>
Copyright © 2002 The University of Chicago, as Operator of Argonne National
Laboratory.<br>
Copyright © 2002 The Regents of the University of California, as Operator of
Los Alamos National Laboratory.<br>
Copyright © 2002 Helmholtz-Zentrum Berlin für Materialien und Energie
Copyright © 2002 Berliner Speicherringgesellschaft für Synchrotronstrahlung
GmbH.</span></p>
<p><span style="font-size: xx-small; font-weight:lighter;">EPICS BASE
@@ -2864,10 +2867,11 @@ least
<ul>
<li>DBE_VALUE - Trigger events when the channel value exceeds the
monitor dead band</li>
<li>DBE_LOG - Trigger events when the channel value exceeds the
archival dead band</li>
<li>DBE_ARCHIVE (or DBE_LOG) - Trigger events when the channel value
exceeds the archival dead band</li>
<li>DBE_ALARM - Trigger events when the channel alarm state
changes.</li>
changes</li>
<li>DBE_PROPERTY - Trigger events when a channel property changes.</li>
</ul>
<p>For functions above that do not include a trigger specification,
events will be triggered when there are significant changes in the
+11 -4
View File
@@ -22,16 +22,23 @@
Trigger an event when a significant change in the channel's value
occurs. Relies on the monitor deadband field under DCT.
DBE_LOG
DBE_ARCHIVE (DBE_LOG)
Trigger an event when an archive significant change in the channel's
valuue occurs. Relies on the archiver monitor deadband field under DCT.
DBE_ALARM
Trigger an event when the alarm state changes
DBE_PROPERTY
Trigger an event when a property change (control limit, graphical
limit, status string, enum string ...) occurs.
*/
#define DBE_VALUE (1<<0)
#define DBE_LOG (1<<1)
#define DBE_ALARM (1<<2)
#define DBE_VALUE (1<<0)
#define DBE_ARCHIVE (1<<1)
#define DBE_LOG DBE_ARCHIVE
#define DBE_ALARM (1<<2)
#define DBE_PROPERTY (1<<3)
#endif
+7 -6
View File
@@ -50,7 +50,7 @@ void usage (void)
"Channel Access options:\n"
" -w <sec>: Wait time, specifies CA timeout, default is %f second(s)\n"
" -m <mask>: Specify CA event mask to use, with <mask> being any combination of\n"
" 'v' (value), 'a' (alarm), 'l' (log). Default: va\n"
" 'v' (value), 'a' (alarm), 'l' (log/archive), 'p' (property). Default: va\n"
" -p <prio>: CA priority (0-%u, default 0=lowest)\n"
"Timestamps:\n"
" Default: Print absolute timestamps (as reported by CA server)\n"
@@ -278,11 +278,12 @@ int main (int argc, char *argv[])
case 'v': eventMask |= DBE_VALUE; break;
case 'a': eventMask |= DBE_ALARM; break;
case 'l': eventMask |= DBE_LOG; break;
default :
fprintf(stderr, "Invalid argument '%s' "
"for option '-m' - ignored.\n", optarg);
eventMask = DBE_VALUE | DBE_ALARM;
err = 1;
case 'p': eventMask |= DBE_PROPERTY; break;
default :
fprintf(stderr, "Invalid argument '%s' "
"for option '-m' - ignored.\n", optarg);
eventMask = DBE_VALUE | DBE_ALARM;
err = 1;
}
}
break;
+6 -2
View File
@@ -1,4 +1,5 @@
/*************************************************************************\
* Copyright (c) 2009 Helmholtz-Zentrum Berlin fuer Materialien und Energie.
* Copyright (c) 2008 UChicago Argonne LLC, as Operator of Argonne
* National Laboratory.
* Copyright (c) 2002 The Regents of the University of California, as
@@ -196,13 +197,16 @@ static long process(mbbiRecord *pmbbi)
static long special(DBADDR *paddr,int after)
{
mbbiRecord *pmbbi = (mbbiRecord *)(paddr->precord);
int special_type = paddr->special;
int special_type = paddr->special;
int fieldIndex = dbGetFieldIndex(paddr);
if(!after) return(0);
switch(special_type) {
case(SPC_MOD):
init_common(pmbbi);
return(0);
if (fieldIndex >= mbbiRecordZRST && fieldIndex <= mbbiRecordFFST)
db_post_events(pmbbi,&pmbbi->val,DBE_PROPERTY);
return(0);
default:
recGblDbaddrError(S_db_badChoice,paddr,"mbbi: special");
return(S_db_badChoice);
+5 -1
View File
@@ -1,4 +1,5 @@
/*************************************************************************\
* Copyright (c) 2009 Helmholtz-Zentrum Berlin fuer Materialien und Energie.
* Copyright (c) 2008 UChicago Argonne LLC, as Operator of Argonne
* National Laboratory.
* Copyright (c) 2002 The Regents of the University of California, as
@@ -262,12 +263,15 @@ CONTINUE:
static long special(DBADDR *paddr, int after)
{
mbboRecord *pmbbo = (mbboRecord *)(paddr->precord);
int special_type = paddr->special;
int special_type = paddr->special;
int fieldIndex = dbGetFieldIndex(paddr);
if(!after) return(0);
switch(special_type) {
case(SPC_MOD):
init_common(pmbbo);
if (fieldIndex >= mbboRecordZRST && fieldIndex <= mbboRecordFFST)
db_post_events(pmbbo,&pmbbo->val,DBE_PROPERTY);
return(0);
default:
recGblDbaddrError(S_db_badChoice,paddr,"mbbo: special");