was accidantally mixed with named-soft-events patch

This commit is contained in:
zimoch
2011-12-23 12:37:22 +00:00
parent 0212ec4075
commit d8edba5dfc

View File

@@ -1,316 +1,3 @@
Index: src/rec/calcoutRecord.c
===================================================================
RCS file: /cvs/G/EPICS/base-3.14.12/src/rec/calcoutRecord.c,v
retrieving revision 1.3
diff -c -r1.3 calcoutRecord.c
*** src/rec/calcoutRecord.c 14 Dec 2011 09:39:53 -0000 1.3
--- src/rec/calcoutRecord.c 14 Dec 2011 13:40:29 -0000
***************
*** 197,202 ****
--- 197,204 ----
callbackSetUser(prec, &prpvt->checkLinkCb);
prpvt->cbScheduled = 0;
+ prec->epvt = eventNameToHandle(prec->oevt);
+
if (pcalcoutDSET->init_record) pcalcoutDSET->init_record(prec);
prec->pval = prec->val;
prec->mlst = prec->val;
***************
*** 357,362 ****
--- 359,367 ----
}
db_post_events(prec, plinkValid, DBE_VALUE);
return 0;
+ case(calcoutRecordOEVT):
+ prec->epvt = eventNameToHandle(prec->oevt);
+ return 0;
default:
recGblDbaddrError(S_db_badChoice, paddr, "calc: special");
return(S_db_badChoice);
***************
*** 540,566 ****
if (prec->nsev < INVALID_ALARM ) {
/* Output the value */
status = writeValue(prec);
! /* post event if output event != 0 */
! if (prec->oevt > 0) {
! post_event((int)prec->oevt);
! }
} else switch (prec->ivoa) {
case menuIvoaContinue_normally:
status = writeValue(prec);
! /* post event if output event != 0 */
! if (prec->oevt > 0) {
! post_event((int)prec->oevt);
! }
break;
case menuIvoaDon_t_drive_outputs:
break;
case menuIvoaSet_output_to_IVOV:
prec->oval = prec->ivov;
status = writeValue(prec);
! /* post event if output event != 0 */
! if (prec->oevt > 0) {
! post_event((int)prec->oevt);
! }
break;
default:
status = -1;
--- 545,565 ----
if (prec->nsev < INVALID_ALARM ) {
/* Output the value */
status = writeValue(prec);
! /* post output event if set */
! if (prec->epvt) postEvent(prec->epvt);
} else switch (prec->ivoa) {
case menuIvoaContinue_normally:
status = writeValue(prec);
! /* post output event if set */
! if (prec->epvt) postEvent(prec->epvt);
break;
case menuIvoaDon_t_drive_outputs:
break;
case menuIvoaSet_output_to_IVOV:
prec->oval = prec->ivov;
status = writeValue(prec);
! /* post output event if set */
! if (prec->epvt) postEvent(prec->epvt);
break;
default:
status = -1;
Index: src/rec/calcoutRecord.dbd
===================================================================
RCS file: /cvs/G/EPICS/base-3.14.12/src/rec/calcoutRecord.dbd,v
retrieving revision 1.3
diff -c -r1.3 calcoutRecord.dbd
*** src/rec/calcoutRecord.dbd 14 Dec 2011 09:39:53 -0000 1.3
--- src/rec/calcoutRecord.dbd 14 Dec 2011 13:40:29 -0000
***************
*** 255,264 ****
prompt("OCAL Valid")
interest(1)
}
! field(OEVT,DBF_USHORT) {
prompt("Event To Issue")
promptgroup(GUI_CLOCK)
asl(ASL0)
}
field(IVOA,DBF_MENU) {
prompt("INVALID output action")
--- 255,273 ----
prompt("OCAL Valid")
interest(1)
}
! field(OEVT,DBF_STRING) {
prompt("Event To Issue")
promptgroup(GUI_CLOCK)
+ special(SPC_MOD)
asl(ASL0)
+ size(40)
+ }
+ %#include "dbScan.h"
+ field(EPVT, DBF_NOACCESS) {
+ prompt("Event private")
+ special(SPC_NOMOD)
+ interest(4)
+ extra("EVENTPVT epvt")
}
field(IVOA,DBF_MENU) {
prompt("INVALID output action")
Index: src/rec/eventRecord.c
===================================================================
RCS file: /cvs/G/EPICS/base-3.14.12/src/rec/eventRecord.c,v
retrieving revision 1.4
diff -c -r1.4 eventRecord.c
*** src/rec/eventRecord.c 14 Dec 2011 09:39:53 -0000 1.4
--- src/rec/eventRecord.c 14 Dec 2011 13:40:29 -0000
***************
*** 32,37 ****
--- 32,38 ----
#include "errMdef.h"
#include "recSup.h"
#include "recGbl.h"
+ #include "special.h"
#include "menuYesNo.h"
#define GEN_SIZE_OFFSET
#include "eventRecord.h"
***************
*** 43,49 ****
#define initialize NULL
static long init_record(eventRecord *, int);
static long process(eventRecord *);
! #define special NULL
static long get_value(eventRecord *, struct valueDes *);
#define cvt_dbaddr NULL
#define get_array_info NULL
--- 44,50 ----
#define initialize NULL
static long init_record(eventRecord *, int);
static long process(eventRecord *);
! static long special(DBADDR *, int);
static long get_value(eventRecord *, struct valueDes *);
#define cvt_dbaddr NULL
#define get_array_info NULL
***************
*** 103,111 ****
}
if (prec->siol.type == CONSTANT) {
! recGblInitConstantLink(&prec->siol,DBF_USHORT,&prec->sval);
}
if( (pdset=(struct eventdset *)(prec->dset)) && (pdset->init_record) )
status=(*pdset->init_record)(prec);
return(status);
--- 104,114 ----
}
if (prec->siol.type == CONSTANT) {
! recGblInitConstantLink(&prec->siol,DBF_STRING,&prec->sval);
}
+ prec->epvt = eventNameToHandle(prec->val);
+
if( (pdset=(struct eventdset *)(prec->dset)) && (pdset->init_record) )
status=(*pdset->init_record)(prec);
return(status);
***************
*** 123,129 ****
if ( !pact && prec->pact ) return(0);
prec->pact = TRUE;
! if(prec->val>0) post_event((int)prec->val);
recGblGetTimeStamp(prec);
--- 126,132 ----
if ( !pact && prec->pact ) return(0);
prec->pact = TRUE;
! postEvent(prec->epvt);
recGblGetTimeStamp(prec);
***************
*** 137,146 ****
return(status);
}
static long get_value(eventRecord *prec, struct valueDes *pvdes)
{
! pvdes->field_type = DBF_USHORT;
pvdes->no_elements=1;
pvdes->pvalue = (void *)(&prec->val);
return(0);
--- 140,160 ----
return(status);
}
+
+ static long special(DBADDR *paddr, int after)
+ {
+ eventRecord *prec = (eventRecord *)paddr->precord;
+
+ if (!after) return 0;
+ if (dbGetFieldIndex(paddr) == eventRecordVAL) {
+ prec->epvt = eventNameToHandle(prec->val);
+ }
+ }
+
static long get_value(eventRecord *prec, struct valueDes *pvdes)
{
! pvdes->field_type = DBF_STRING;
pvdes->no_elements=1;
pvdes->pvalue = (void *)(&prec->val);
return(0);
***************
*** 177,186 ****
return(status);
}
if (prec->simm == menuYesNoYES){
! status=dbGetLink(&(prec->siol),DBR_USHORT,
&(prec->sval),0,0);
if (status==0) {
! prec->val=prec->sval;
prec->udf=FALSE;
}
} else {
--- 191,203 ----
return(status);
}
if (prec->simm == menuYesNoYES){
! status=dbGetLink(&(prec->siol),DBR_STRING,
&(prec->sval),0,0);
if (status==0) {
! if (strcmp(prec->sval, prec->val) != 0) {
! strcpy(prec->val, prec->sval);
! prec->epvt = eventNameToHandle(prec->val);
! }
prec->udf=FALSE;
}
} else {
Index: src/rec/eventRecord.dbd
===================================================================
RCS file: /cvs/G/EPICS/base-3.14.12/src/rec/eventRecord.dbd,v
retrieving revision 1.3
diff -c -r1.3 eventRecord.dbd
*** src/rec/eventRecord.dbd 14 Dec 2011 09:39:53 -0000 1.3
--- src/rec/eventRecord.dbd 14 Dec 2011 13:40:29 -0000
***************
*** 9,18 ****
#*************************************************************************
recordtype(event) {
include "dbCommon.dbd"
! field(VAL,DBF_USHORT) {
! prompt("Event Number To Post")
promptgroup(GUI_INPUTS)
asl(ASL0)
}
field(INP,DBF_INLINK) {
prompt("Input Specification")
--- 9,27 ----
#*************************************************************************
recordtype(event) {
include "dbCommon.dbd"
! field(VAL,DBF_STRING) {
! prompt("Event Name To Post")
promptgroup(GUI_INPUTS)
+ special(SPC_MOD)
asl(ASL0)
+ size(40)
+ }
+ %#include "dbScan.h"
+ field(EPVT, DBF_NOACCESS) {
+ prompt("Event private")
+ special(SPC_NOMOD)
+ interest(4)
+ extra("EVENTPVT epvt")
}
field(INP,DBF_INLINK) {
prompt("Input Specification")
***************
*** 24,31 ****
promptgroup(GUI_INPUTS)
interest(1)
}
! field(SVAL,DBF_USHORT) {
prompt("Simulation Value")
}
field(SIML,DBF_INLINK) {
prompt("Sim Mode Location")
--- 33,41 ----
promptgroup(GUI_INPUTS)
interest(1)
}
! field(SVAL,DBF_STRING) {
prompt("Simulation Value")
+ size(40)
}
field(SIML,DBF_INLINK) {
prompt("Sim Mode Location")
Index: src/rec/selRecord.dbd
===================================================================
RCS file: /cvs/G/EPICS/base-3.14.12/src/rec/selRecord.dbd,v