make release
This commit is contained in:
@ -1,4 +1,3 @@
|
||||
|
||||
/* dbAccess.c */
|
||||
/* share/src/db $Id$ */
|
||||
|
||||
@ -120,6 +119,8 @@
|
||||
|
||||
long dbPut();
|
||||
|
||||
#define MAX_LOCK 10
|
||||
|
||||
#define MIN(x,y) ((x < y)?x:y)
|
||||
#define MAX(x,y) ((x > y)?x:y)
|
||||
|
||||
@ -205,35 +206,54 @@ long dbProcess(paddr)
|
||||
struct rset *prset;
|
||||
struct dbCommon *precord=(struct dbCommon *)(paddr->precord);
|
||||
long status;
|
||||
long options=0;
|
||||
long nRequest=1;
|
||||
|
||||
|
||||
/* If already active dont process */
|
||||
if(precord->pact) return(0);
|
||||
if(precord->pact) {
|
||||
struct rset *prset;
|
||||
struct valueDes valueDes;
|
||||
|
||||
/* raise scan alarm after MAX_LOCK times */
|
||||
if(precord->stat==SCAN_ALARM) return(0);
|
||||
if(precord->lcnt++ <=MAX_LOCK) return(0);
|
||||
precord->sevr = MAJOR_ALARM;
|
||||
precord->stat = SCAN_ALARM;
|
||||
precord->nsev = 0;
|
||||
precord->nsta = 0;
|
||||
/* anyone waiting for an event on this record?*/
|
||||
if(precord->mlis.count==0) return(0);
|
||||
db_post_events(precord,&precord->stat,DBE_VALUE);
|
||||
db_post_events(precord,&precord->sevr,DBE_VALUE);
|
||||
prset=GET_PRSET(paddr->record_type);
|
||||
if( prset && prset->get_value ){
|
||||
(*prset->get_value)(precord,&valueDes);
|
||||
db_post_events(precord,valueDes.pvalue,DBE_VALUE|DBE_ALARM|DBE_LOG);
|
||||
}
|
||||
return(0);
|
||||
} else precord->lcnt=0;
|
||||
|
||||
|
||||
/* set nsta and nsev to 0. Everyone else maximizes nsev.*/
|
||||
/* process must raise alarm if nsta!=stat or nsev!=nsev */
|
||||
precord->nsta = 0;
|
||||
precord->nsev = 0;
|
||||
|
||||
/* get the scan disable link if defined*/
|
||||
if(precord->sdis.type == DB_LINK) {
|
||||
(status = dbGetLink(precord->sdis.value.db_link,precord,
|
||||
DBR_SHORT,(caddr_t)(&(precord->disa)),&options,&nRequest));
|
||||
if(!RTN_SUCCESS(status)) {
|
||||
recGblDbaddrError(status,paddr,"dbProcess");
|
||||
return(status);
|
||||
}
|
||||
long options=0;
|
||||
long nRequest=1;
|
||||
|
||||
(status = dbGetLink(precord->sdis.value.db_link,precord,
|
||||
DBR_SHORT,(caddr_t)(&(precord->disa)),&options,&nRequest));
|
||||
if(!RTN_SUCCESS(status)) {
|
||||
recGblDbaddrError(status,paddr,"dbProcess");
|
||||
return(status);
|
||||
}
|
||||
}
|
||||
/* if disabled just return success */
|
||||
if(precord->disa) return(0);
|
||||
if(precord->disa == precord->disv) return(0);
|
||||
|
||||
/* locate record processing routine */
|
||||
if(!(prset=GET_PRSET(paddr->record_type)) || !(prset->process)) {
|
||||
precord->pact=1;/*set pact TRUE so error is issued only once*/
|
||||
recGblRecSupError(S_db_noRSET,paddr,"dbProcess","process");
|
||||
return(S_db_noRSET);
|
||||
precord->pact=1;/*set pact TRUE so error is issued only once*/
|
||||
recGblRecSupError(S_db_noRSET,paddr,"dbProcess","process");
|
||||
return(S_db_noRSET);
|
||||
}
|
||||
|
||||
/* process record */
|
||||
@ -254,7 +274,7 @@ struct dbAddr *paddr;
|
||||
short field_offset;
|
||||
short record_number;
|
||||
short n;
|
||||
long status;
|
||||
long status=0;
|
||||
struct rset *prset;
|
||||
struct recLoc *precLoc;
|
||||
char* precord;
|
||||
@ -324,7 +344,7 @@ long dbGetLink(pdblink,pdest,dbrType,pbuffer,options,nRequest)
|
||||
long *options;
|
||||
long *nRequest;
|
||||
{
|
||||
struct dbAddr *paddr=(struct dbAddr*)(pdblink->paddr);
|
||||
struct dbAddr *paddr=(struct dbAddr*)(pdblink->pdbAddr);
|
||||
long status;
|
||||
|
||||
if(pdblink->process_passive) {
|
||||
@ -335,8 +355,8 @@ long dbGetLink(pdblink,pdest,dbrType,pbuffer,options,nRequest)
|
||||
struct dbCommon *pfrom=(struct dbCommon*)(paddr->precord);
|
||||
|
||||
if(pfrom->sevr>pdest->sevr) {
|
||||
pdest->sevr = pfrom->sevr;
|
||||
pdest->stat = LINK_ALARM;
|
||||
pdest->nsev = pfrom->sevr;
|
||||
pdest->nsta = LINK_ALARM;
|
||||
}
|
||||
|
||||
}
|
||||
@ -351,7 +371,7 @@ long dbPutLink(pdblink,pdest,dbrType,pbuffer,options,nRequest)
|
||||
long *options;
|
||||
long *nRequest;
|
||||
{
|
||||
struct dbAddr *paddr=(struct dbAddr*)(pdblink->paddr);
|
||||
struct dbAddr *paddr=(struct dbAddr*)(pdblink->pdbAddr);
|
||||
long status;
|
||||
|
||||
status=dbPut(paddr,dbrType,pbuffer,nRequest);
|
||||
@ -359,8 +379,8 @@ long dbPutLink(pdblink,pdest,dbrType,pbuffer,options,nRequest)
|
||||
struct dbCommon *pfrom=(struct dbCommon*)(paddr->precord);
|
||||
|
||||
if(pfrom->sevr>pdest->sevr) {
|
||||
pdest->sevr = pfrom->sevr;
|
||||
pdest->stat = LINK_ALARM;
|
||||
pdest->nsev = pfrom->sevr;
|
||||
pdest->nsta = LINK_ALARM;
|
||||
}
|
||||
}
|
||||
if(!RTN_SUCCESS(status)) return(status);
|
||||
@ -3088,6 +3108,7 @@ long *options;
|
||||
struct devChoiceSet *pdevChoiceSet;
|
||||
unsigned long no_str;
|
||||
char *ptemp;
|
||||
struct dbr_enumStrs *pdbr_enumStrs;
|
||||
int i;
|
||||
|
||||
switch(field_type) {
|
||||
@ -3115,7 +3136,8 @@ choice_common:
|
||||
*options = (*options)^DBR_ENUM_STRS;/*Turn off option*/
|
||||
break;
|
||||
}
|
||||
no_str=MIN(pchoiceSet->number,16);
|
||||
i = sizeof(pdbr_enumStrs->strs)/sizeof(pdbr_enumStrs->strs[0]);
|
||||
no_str=MIN(pchoiceSet->number,i);
|
||||
*(unsigned long*)pbuffer = no_str;
|
||||
ptemp = pbuffer + sizeof(unsigned long);
|
||||
for (i=0; i<no_str; i++) {
|
||||
@ -3134,7 +3156,8 @@ choice_common:
|
||||
*options = (*options)^DBR_ENUM_STRS;/*Turn off option*/
|
||||
break;
|
||||
}
|
||||
no_str=MIN(pdevChoiceSet->number,16);
|
||||
i = sizeof(pdbr_enumStrs->strs)/sizeof(pdbr_enumStrs->strs[0]);
|
||||
no_str=MIN(pdevChoiceSet->number,i);
|
||||
*(unsigned long*)pbuffer = no_str;
|
||||
ptemp = pbuffer + sizeof(unsigned long);
|
||||
for (i=0; i<no_str; i++) {
|
||||
@ -5839,7 +5862,7 @@ long (*put_convert_table[DBR_ENUM+1][DBF_DEVCHOICE+1])() = {
|
||||
putEnumEnum, putEnumEnum, putEnumEnum, putEnumEnum}
|
||||
};
|
||||
|
||||
long dbPut(paddr,dbrType,pbuffer,nRequest)
|
||||
static long dbPut(paddr,dbrType,pbuffer,nRequest)
|
||||
struct dbAddr *paddr;
|
||||
short dbrType;
|
||||
caddr_t pbuffer;
|
||||
@ -5919,10 +5942,12 @@ long nRequest;
|
||||
}
|
||||
}
|
||||
|
||||
/* propagate events for this field (except for VAL)*/
|
||||
/* propagate events for this field */
|
||||
/* if the field is VAL and process_passive is true dont propagate*/
|
||||
pfldDes = (struct fldDes *)(paddr->pfldDes);
|
||||
pfield_name = (long *)&(pfldDes->fldname[0]);
|
||||
if(precord->mlis.count && (*pval != *pfield_name))
|
||||
if(precord->mlis.count &&
|
||||
((*pval != *pfield_name) || (!pfldDes->process_passive)))
|
||||
db_post_events(precord,paddr->pfield,DBE_VALUE);
|
||||
|
||||
all_done:
|
||||
|
101
src/db/dbScan.c
101
src/db/dbScan.c
@ -1,4 +1,3 @@
|
||||
|
||||
/* dbScan.c */
|
||||
/* share/src/db $Id$ */
|
||||
|
||||
@ -53,13 +52,14 @@
|
||||
* undefined ones
|
||||
* .10 07-21-89 lrd added support for the COMPRESS record
|
||||
* .11 01-25-90 lrd added support for SUB records
|
||||
* .12 04-05-90 lrd added the momentary output task
|
||||
* .12 04-05-90 lrd added the callback output task
|
||||
* .13 05-22-89 mrk periodic scan now scans at correct rate
|
||||
* .14 08-08-90 lrd removed T_AI from initialization at start up
|
||||
* only outputs need to be read at initialization
|
||||
* .15 08-30-90 lrd renamed the interrupt scanner wakeup from
|
||||
* intr_event_poster to io_scanner_wakeup
|
||||
* .16 09-14-90 mrk changed for new record/device support
|
||||
* .17 10-24-90 mrk replaced momentary task by general purpose callback task
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -69,7 +69,12 @@
|
||||
* ioEventTask Task which processes records on I/O interrupt
|
||||
* eventTask Task which processes records on global events
|
||||
* wdScanTask Task which restarts other tasks when suspended
|
||||
* momentaryTask Task that turns off momentary outputs
|
||||
* callbackTask General purpose callback task
|
||||
* callbackRequest request callback
|
||||
* arg
|
||||
* pointer to arbitrary structure with first element being
|
||||
* address of callback routine. When called addr of
|
||||
* structure is passed.
|
||||
* scan_init Build the scan lists and start the tasks
|
||||
* remove_scan_tasks Delete scan tasks, free any malloc'd memory
|
||||
* args
|
||||
@ -267,7 +272,7 @@ struct event_list{
|
||||
#define EVENT 0x02
|
||||
#define PERIODIC 0x04
|
||||
#define WDSCAN 0x08
|
||||
#define MOMENTARY 0x10
|
||||
#define CALLBACK 0x10
|
||||
|
||||
int fd; /* used for the print list diagnostics */
|
||||
|
||||
@ -316,15 +321,14 @@ static int wdScanTaskId = 0;
|
||||
static int wdScanOff = 0;
|
||||
|
||||
|
||||
/* MOMENTARY GLOBALS */
|
||||
/* semaphore on which the momentary output task waits */
|
||||
SEMAPHORE momentarySem;
|
||||
|
||||
/* ring buffer into which the drivers place the binary outputs to zero */
|
||||
RING_ID momentaryQ;
|
||||
|
||||
static int momentaryTaskId = 0;
|
||||
extern long masks[]; /* masks for bit numbers */
|
||||
/* CALLBACK GLOBALS */
|
||||
static SEMAPHORE callbackSem;
|
||||
static RING_ID callbackQ;
|
||||
static int callbackTaskId = 0;
|
||||
struct callback {
|
||||
void (*callback)();
|
||||
/*remainder is callback dependent*/
|
||||
};
|
||||
|
||||
/* flag to the drivers that they can start to send events to the event tasks */
|
||||
short wakeup_init;
|
||||
@ -622,24 +626,31 @@ wdScanTask()
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Momentary output task
|
||||
*
|
||||
* turns off momentary outputs after expired time
|
||||
*/
|
||||
momentaryTask(){
|
||||
struct intr_momentary intr_data;
|
||||
/* General purpose callback task */
|
||||
callbackTask(){
|
||||
struct callback *pcallback;
|
||||
|
||||
FOREVER {
|
||||
/* wait for somebody to wake us up */
|
||||
semTake (&momentarySem);
|
||||
semTake (&callbackSem);
|
||||
|
||||
/* process requests in the command ring buffer */
|
||||
while (rngBufGet(momentaryQ,&intr_data,sizeof(intr_data))) {
|
||||
(*intr_data.callback)(intr_data.arg);
|
||||
while (rngBufGet(callbackQ,&pcallback,sizeof(pcallback))) {
|
||||
(*pcallback->callback)(pcallback);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Routine which places requests into callback queue*/
|
||||
callbackRequest(pcallback)
|
||||
struct callback *pcallback;
|
||||
{
|
||||
if(rngBufPut(callbackQ,&pcallback,sizeof(pcallback))!=sizeof(pcallback)) {
|
||||
logMsg("callbackQ full\n");
|
||||
} else {
|
||||
semGive(&callbackSem);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* SCAN_INIT
|
||||
@ -651,16 +662,16 @@ momentaryTask(){
|
||||
scan_init()
|
||||
{
|
||||
/* remove scan tasks */
|
||||
remove_scan_tasks(EVENT | IO_EVENT | PERIODIC | MOMENTARY);
|
||||
remove_scan_tasks(EVENT | IO_EVENT | PERIODIC | CALLBACK);
|
||||
|
||||
/* build the scan lists */
|
||||
build_scan_lists(EVENT | IO_EVENT | PERIODIC);
|
||||
|
||||
/* create event ring buffers */
|
||||
initialize_ring_buffers(EVENT | IO_EVENT | MOMENTARY);
|
||||
initialize_ring_buffers(EVENT | IO_EVENT | CALLBACK);
|
||||
|
||||
/* Spawn scanner tasks */
|
||||
start_scan_tasks(EVENT | IO_EVENT | PERIODIC | WDSCAN | MOMENTARY);
|
||||
start_scan_tasks(EVENT | IO_EVENT | PERIODIC | WDSCAN | CALLBACK);
|
||||
|
||||
/* let drivers know we're ready to accept events */
|
||||
wakeup_init = 1;
|
||||
@ -700,11 +711,11 @@ register short tasks;
|
||||
fill(event_lists,sizeof(struct event_list)*MAX_EVENTS,0);
|
||||
}
|
||||
|
||||
/* delete the momentaryTask if it is running */
|
||||
if (tasks & MOMENTARY){
|
||||
if (momentaryTaskId)
|
||||
if (td(momentaryTaskId) != 0)
|
||||
momentaryTaskId = 0;
|
||||
/* delete the callbackTask if it is running */
|
||||
if (tasks & CALLBACK){
|
||||
if (callbackTaskId)
|
||||
if (td(callbackTaskId) != 0)
|
||||
callbackTaskId = 0;
|
||||
}
|
||||
|
||||
/* delete the periodicScanTask if it is running */
|
||||
@ -808,17 +819,17 @@ register short lists;
|
||||
semInit(&eventSem);
|
||||
}
|
||||
|
||||
/* create the momentary ring buffer and semaphore */
|
||||
if (lists & MOMENTARY){
|
||||
/* create the callback ring buffer and semaphore */
|
||||
if (lists & CALLBACK){
|
||||
/* clear it if it is created */
|
||||
if (momentaryQ){
|
||||
rngFlush(momentaryQ);
|
||||
if (callbackQ){
|
||||
rngFlush(callbackQ);
|
||||
/* create it if it does not exist */
|
||||
}else if ((momentaryQ = rngCreate(sizeof(struct intr_momentary) * MAX_EVENTS))
|
||||
}else if ((callbackQ = rngCreate(sizeof(struct callback *) * MAX_EVENTS))
|
||||
== (RING_ID)NULL){
|
||||
panic ("scan_init: momentaryQ not created\n");
|
||||
panic ("scan_init: callbackQ not created\n");
|
||||
}
|
||||
semInit(&momentarySem);
|
||||
semInit(&callbackSem);
|
||||
}
|
||||
}
|
||||
|
||||
@ -867,13 +878,13 @@ register short tasks;
|
||||
wdScanTask);
|
||||
}
|
||||
|
||||
if (tasks & MOMENTARY){
|
||||
momentaryTaskId =
|
||||
taskSpawn(MOMENTARY_NAME,
|
||||
MOMENTARY_PRI,
|
||||
MOMENTARY_OPT,
|
||||
MOMENTARY_STACK,
|
||||
momentaryTask);
|
||||
if (tasks & CALLBACK){
|
||||
callbackTaskId =
|
||||
taskSpawn(CALLBACK_NAME,
|
||||
CALLBACK_PRI,
|
||||
CALLBACK_OPT,
|
||||
CALLBACK_STACK,
|
||||
callbackTask);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -61,6 +61,9 @@
|
||||
*
|
||||
* dbior(pname) io_report
|
||||
* char *pname Driver name. If null all drivers
|
||||
*
|
||||
* dblls(ptypeName) list lock sets
|
||||
* char *ptypeName; Record type. If null all record types
|
||||
*/
|
||||
|
||||
#include <vxWorks.h>
|
||||
@ -778,3 +781,49 @@ long dbior(pdrvName)
|
||||
}
|
||||
return(0);
|
||||
}
|
||||
|
||||
long dblls(ptypeName) /* list lock set for specified record type*/
|
||||
char *ptypeName;
|
||||
{
|
||||
int rectype,beg,end,recnum;
|
||||
struct recLoc *precLoc;
|
||||
struct dbCommon *precord;
|
||||
char *pstr;
|
||||
char name[PVNAME_SZ+1];
|
||||
|
||||
if(dbRecType==NULL || dbRecords==NULL) return(1);
|
||||
if(ptypeName==NULL) {
|
||||
beg=0;
|
||||
end=dbRecords->number - 1;
|
||||
}
|
||||
else {
|
||||
for(rectype=0; rectype<dbRecType->number; rectype++) {
|
||||
if(!(pstr=GET_PRECTYPE(rectype))) continue;
|
||||
if(strcmp(pstr,ptypeName)==0){
|
||||
beg=rectype;
|
||||
end=rectype;
|
||||
goto got_it;
|
||||
}
|
||||
}
|
||||
printf("Illegal Record Type\n");
|
||||
return(1);
|
||||
}
|
||||
got_it:
|
||||
for(rectype=beg; rectype<=end; rectype++) {
|
||||
if(!(precLoc=GET_PRECLOC(rectype))) continue;
|
||||
for(recnum=0; precord=(struct dbCommon *)(GET_PRECORD(precLoc,recnum));
|
||||
recnum++) {
|
||||
if(precord->name[0] == 0) continue; /*deleted record*/
|
||||
strncpy(name,precord->name,PVNAME_SZ);
|
||||
name[PVNAME_SZ]=0;
|
||||
printf("%4.4d %4.4d %4.4d %4.4d %4.4d %s\n",
|
||||
precord->lset,
|
||||
precord->lcnt,
|
||||
precord->disv,
|
||||
precord->disa,
|
||||
precord->pact,
|
||||
name);
|
||||
}
|
||||
}
|
||||
return(0);
|
||||
}
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/* db_access.c */
|
||||
/* share/src/db $Id$ */
|
||||
/* db_access.c - Interface between old database access and new */
|
||||
@ -68,6 +67,14 @@ struct dbr_ctrl_float{
|
||||
float lower_ctrl_limit; /* lower control limit */
|
||||
float value; /* current value */
|
||||
};
|
||||
/* structure for a control enumeration field */
|
||||
struct dbr_ctrl_enum{
|
||||
short status; /* status of value */
|
||||
short severity; /* severity of alarm */
|
||||
short no_str; /* number of strings */
|
||||
char strs[16][26]; /* state strings */
|
||||
short value; /* current value */
|
||||
};
|
||||
|
||||
/* From $cs/dblib/src/dbiocsubs.c
|
||||
* subroutines
|
||||
@ -195,7 +202,6 @@ unsigned short no_elements;
|
||||
long nRequest;
|
||||
long precision;
|
||||
short severity;
|
||||
short no_str;
|
||||
|
||||
|
||||
switch(buffer_type) {
|
||||
@ -293,23 +299,31 @@ unsigned short no_elements;
|
||||
nRequest=no_elements;
|
||||
status = dbGetField(paddr,DBR_FLOAT,pbuffer,&options,&nRequest);
|
||||
break;
|
||||
case(oldDBR_CTRL_ENUM):
|
||||
case(oldDBR_CTRL_ENUM): {
|
||||
short no_str,i;
|
||||
struct dbr_enumStrs enumStrs;
|
||||
struct dbr_ctrl_enum *poldenum=(struct dbr_ctrl_enum *)pbuffer;
|
||||
|
||||
bzero(pbuffer,sizeof(struct dbr_ctrl_enum));
|
||||
/* first get status and severity */
|
||||
options=DBR_STATUS;
|
||||
nRequest=0;
|
||||
status = dbGetField(paddr,DBR_ENUM,pbuffer,&options,&nRequest);
|
||||
status = dbGetField(paddr,DBR_ENUM,poldenum,&options,&nRequest);
|
||||
adjust_severity(pbuffer);
|
||||
/* adjust pbuffer so it points to old severity and save it*/
|
||||
pbuffer += sizeof(short);
|
||||
severity = *((short *)pbuffer);
|
||||
/* now get enum strs */
|
||||
options=DBR_ENUM_STRS;
|
||||
nRequest=0;
|
||||
status = dbGetField(paddr,DBR_ENUM,&enumStrs,&options,&nRequest);
|
||||
no_str = enumStrs.no_str;
|
||||
if(no_str>16) no_str=16;
|
||||
poldenum->no_str = no_str;
|
||||
for (i=0; i<no_str; i++)
|
||||
strncpy(poldenum->strs[i],&enumStrs.strs[i],sizeof(poldenum->strs[i]));
|
||||
/*now get values*/
|
||||
options=DBR_ENUM_STRS;
|
||||
nRequest=no_elements;
|
||||
status = dbGetField(paddr,DBR_ENUM,pbuffer,&options,&nRequest);
|
||||
/* no_str was returned as unsigned long. Convert and restore serv*/
|
||||
no_str = (short )(*((unsigned long*)pbuffer));
|
||||
*(((short *)pbuffer)++) = severity;
|
||||
*((short *)pbuffer) = no_str;
|
||||
status = dbGetField(paddr,DBR_ENUM,&poldenum->value,&options,&nRequest);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
return(-1);
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/* iocInit.c ioc initialization */
|
||||
/* share/src/db $Id$ */
|
||||
|
||||
@ -252,9 +251,6 @@ static long initDatabase()
|
||||
lstInit(&(precord->mlis));
|
||||
precord->pact=FALSE;
|
||||
|
||||
/* set lset=0 See determine lock set below.*/
|
||||
precord->lset = 0;
|
||||
|
||||
/* Init DSET NOTE that result may be NULL*/
|
||||
precord->dset=(struct dset *)GET_PDSET(pdevSup,precord->dtyp);
|
||||
|
||||
@ -267,13 +263,13 @@ static long initDatabase()
|
||||
strcat(name,".");
|
||||
strncat(name,plink->value.pv_link.fldname,FLDNAME_SZ);
|
||||
if(dbNameToAddr(name,&dbAddr) == 0) {
|
||||
((struct dbCommon *)(dbAddr.precord))->lset = -1;
|
||||
plink->type = DB_LINK;
|
||||
plink->value.db_link.paddr =
|
||||
plink->value.db_link.pdbAddr =
|
||||
(caddr_t)calloc(1,sizeof(struct dbAddr));
|
||||
*((struct dbAddr *)(plink->value.db_link.paddr))=dbAddr;
|
||||
*((struct dbAddr *)(plink->value.db_link.pdbAddr))=dbAddr;
|
||||
/* show that refered to record has link. */
|
||||
/* See determine lock set below.*/
|
||||
((struct dbCommon *)(dbAddr.precord))->lset = -1;
|
||||
}
|
||||
else {
|
||||
/*This will be replaced by channel access call*/
|
||||
@ -315,6 +311,7 @@ static long initDatabase()
|
||||
if(precord->lset > 0) continue; /*already in a lock set */
|
||||
lookAhead = ( (precord->lset == -1) ? TRUE : FALSE);
|
||||
nset++;
|
||||
printf("calling addToSet\n");
|
||||
status = addToSet(precord,i,lookAhead,i,j,nset);
|
||||
if(status) return(status);
|
||||
}
|
||||
@ -335,15 +332,11 @@ static long addToSet(precord,record_type,lookAhead,i,j,lset)
|
||||
long status;
|
||||
struct fldDes *pfldDes;
|
||||
struct link *plink;
|
||||
struct dbCommon *ptemp;
|
||||
struct dbCommon *ptemp1;
|
||||
struct recTypDes *precTypDes;
|
||||
struct recLoc *precLoc;
|
||||
|
||||
|
||||
if(precord->lset = -1) precord->lset=0;
|
||||
if(precord->lset != 0) {
|
||||
if(precord->lset == lset) return(0);
|
||||
printf("%s precord->lset %d lset %d lookAhead %d\n",precord->name,precord->lset,lset,lookAhead);
|
||||
if(precord->lset > 0) {
|
||||
status = S_db_lsetLogic;
|
||||
errMessage(status,"Logic Error in iocInit(addToSet)");
|
||||
return(status);
|
||||
@ -352,12 +345,22 @@ static long addToSet(precord,record_type,lookAhead,i,j,lset)
|
||||
/* add all DB_LINKs in this record to the set */
|
||||
precTypDes = dbRecDes->papRecTypDes[record_type];
|
||||
for(k=0; k<precTypDes->no_links; k++) {
|
||||
struct dbCommon *pk;
|
||||
|
||||
pfldDes = precTypDes->papFldDes[precTypDes->link_ind[k]];
|
||||
plink = (struct link *)((char *)precord + pfldDes->offset);
|
||||
if(plink->type != DB_LINK) continue;
|
||||
status = addToSet(
|
||||
((struct dbAddr *)(plink->value.db_link.paddr))->precord,
|
||||
((struct dbAddr *)(plink->value.db_link.paddr))->record_type,
|
||||
pk = (struct dbCommon *)
|
||||
(((struct dbAddr *)(plink->value.db_link.pdbAddr))->precord);
|
||||
if(pk->lset > 0){
|
||||
if(pk->lset == lset) continue; /*already in lock set*/
|
||||
status = S_db_lsetLogic;
|
||||
errMessage(status,"Logic Error in iocInit(addToSet)");
|
||||
return(status);
|
||||
}
|
||||
printf("calling addToSet recursive 1\n");
|
||||
status = addToSet(pk,
|
||||
((struct dbAddr *)(plink->value.db_link.pdbAddr))->record_type,
|
||||
TRUE,i,j,lset);
|
||||
if(status) return(status);
|
||||
}
|
||||
@ -366,29 +369,33 @@ static long addToSet(precord,record_type,lookAhead,i,j,lset)
|
||||
if(!lookAhead) return(0);
|
||||
j1st=j+1;
|
||||
for(in=i; in<dbRecords->number; in++) {
|
||||
struct dbCommon *pn;
|
||||
|
||||
if(!(precLoc = dbRecords->papRecLoc[in])) continue;
|
||||
precTypDes = dbRecDes->papRecTypDes[in];
|
||||
for(jn=j1st,
|
||||
(char *)ptemp= (char *)(precLoc->pFirst) + jn*(precLoc->rec_size);
|
||||
(char *)pn= (char *)(precLoc->pFirst) + jn*(precLoc->rec_size);
|
||||
jn<precLoc->no_records;
|
||||
jn++, ((char *)ptemp) += precLoc->rec_size) {
|
||||
jn++, ((char *)pn) += precLoc->rec_size) {
|
||||
/* If NAME is null then skip this record*/
|
||||
if(!(ptemp->name[0])) continue;
|
||||
if(!(pn->name[0])) continue;
|
||||
for(k=0; k<precTypDes->no_links; k++) {
|
||||
struct dbCommon *pk;
|
||||
|
||||
pfldDes = precTypDes->papFldDes[precTypDes->link_ind[k]];
|
||||
plink = (struct link *)((char *)ptemp + pfldDes->offset);
|
||||
plink = (struct link *)((char *)pn + pfldDes->offset);
|
||||
if(plink->type != DB_LINK) continue;
|
||||
ptemp1 = (struct dbCommon *)
|
||||
(((struct dbAddr *)(plink->value.db_link.paddr))->precord);
|
||||
if(ptemp1 != precord) continue;
|
||||
if(ptemp->lset != 0) {
|
||||
if(ptemp->lset == lset) continue;
|
||||
pk = (struct dbCommon *)
|
||||
(((struct dbAddr *)(plink->value.db_link.pdbAddr))->precord);
|
||||
if(pk != precord) continue;
|
||||
if(pn->lset > 0) {
|
||||
if(pn->lset == lset) continue;
|
||||
status = S_db_lsetLogic;
|
||||
errMessage(status,"Logic Error in iocInit(addToSet)");
|
||||
return(status);
|
||||
}
|
||||
itemp = ((struct dbAddr *)(plink->value.db_link.paddr))->record_type;
|
||||
status = addToSet(ptemp1,itemp,TRUE,i,j,lset);
|
||||
printf("calling addToSet recursive 2\n");
|
||||
status = addToSet(pn,in,TRUE,i,j,lset);
|
||||
if(status) return(status);
|
||||
}
|
||||
}
|
||||
|
@ -188,8 +188,9 @@ int recGblReportDbCommon(fp,paddr)
|
||||
if(recGblReportGblChoice(fp,precord,"SCAN",precord->scan)) return(-1);
|
||||
if(fprintf(fp,"PHAS %d\tEVNT %d\n",
|
||||
precord->phas,precord->evnt)<0) return(-1);
|
||||
if(fprintf(fp,"STAT %d\tSEVR %d\tACHN %d\nDTYP %5d\n",
|
||||
precord->stat,precord->sevr,precord->achn,precord->dtyp)<0) return(-1);
|
||||
if(fprintf(fp,"STAT %d\tSEVR %d\tNSTA %d\tNSEV %d\nDTYP %5d\n",
|
||||
precord->stat,precord->sevr,
|
||||
precord->nsta,precord->nsev,precord->dtyp)<0) return(-1);
|
||||
if(precord->dset != NULL) {
|
||||
if(!(pdevSup=GET_DEVSUP(paddr->record_type))) return(-1);
|
||||
if(fprintf(fp,"DSET %s\n",(pdevSup->dsetName[precord->dtyp]))<0)
|
||||
@ -263,7 +264,7 @@ int recGblReportLink(fp,pfield_name,plink)
|
||||
plink->value.db_link.process_passive,
|
||||
plink->value.db_link.maximize_sevr,
|
||||
((struct dbCommon *)(
|
||||
((struct dbAddr *)plink->value.db_link.paddr)
|
||||
((struct dbAddr *)plink->value.db_link.pdbAddr)
|
||||
->precord))->name)<0)
|
||||
return(-1);
|
||||
break;
|
||||
|
@ -44,7 +44,7 @@ static long init_record(pai)
|
||||
struct aiRecord *pai;
|
||||
{
|
||||
char message[100];
|
||||
short value;
|
||||
unsigned short value;
|
||||
struct vmeio *pvmeio;
|
||||
long status;
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* devAiTestAsyn.c */
|
||||
/* share/src/dev $Id$ */
|
||||
/* share/src/dev @(#)devAiTestAsyn.c 1.1 11/8/90 */
|
||||
|
||||
/* devAiTestAsyn.c - Device Support Routines for testing asynchronous processing*/
|
||||
|
||||
@ -43,7 +43,7 @@ struct callback {
|
||||
void (*callback)();
|
||||
struct dbAddr dbAddr;
|
||||
WDOG_ID wd_id;
|
||||
short completion;
|
||||
void (*process)();
|
||||
};
|
||||
|
||||
void callbackRequest();
|
||||
@ -54,21 +54,18 @@ static void myCallback(pcallback)
|
||||
struct aiRecord *pai=(struct aiRecord *)(pcallback->dbAddr.precord);
|
||||
|
||||
dbScanLock(pai);
|
||||
pcallback->completion = TRUE;
|
||||
pai->pact=0;
|
||||
dbScanPassive(&(pcallback->dbAddr));
|
||||
(pcallback->process)(&pcallback->dbAddr);
|
||||
dbScanUnlock(pai);
|
||||
}
|
||||
|
||||
|
||||
|
||||
static long init_record(pai)
|
||||
static long init_record(pai,process)
|
||||
struct aiRecord *pai;
|
||||
void (*process)();
|
||||
{
|
||||
char message[100];
|
||||
struct callback *pcallback;
|
||||
int precTypeIndex;
|
||||
struct rset *prset;
|
||||
|
||||
/* ai.inp must be a CONSTANT*/
|
||||
switch (pai->inp.type) {
|
||||
@ -80,7 +77,9 @@ static long init_record(pai)
|
||||
logMsg("dbNameToAddr failed in init_record for devAiTestAsyn\n");
|
||||
exit(1);
|
||||
}
|
||||
pcallback->process = process;
|
||||
pcallback->wd_id = wdCreate();
|
||||
pcallback->process = process;
|
||||
pai->val = pai->inp.value.value;
|
||||
break;
|
||||
default :
|
||||
@ -89,8 +88,6 @@ static long init_record(pai)
|
||||
errMessage(S_db_badField,message);
|
||||
return(S_db_badField);
|
||||
}
|
||||
/* Make sure record processing routine does not perform any conversion*/
|
||||
pai->linr=0;
|
||||
return(0);
|
||||
}
|
||||
|
||||
@ -105,9 +102,8 @@ static long read_ai(pai)
|
||||
/* ai.inp must be a CONSTANT*/
|
||||
switch (pai->inp.type) {
|
||||
case (CONSTANT) :
|
||||
if(pcallback->completion==TRUE) {
|
||||
if(pai->pact) {
|
||||
printf("%s Completed\n",pai->name);
|
||||
pcallback->completion=FALSE;
|
||||
return(0);
|
||||
} else {
|
||||
wait_time = (short)(pai->val);
|
||||
|
@ -44,7 +44,7 @@ static long init_record(pai)
|
||||
struct aiRecord *pai;
|
||||
{
|
||||
char message[100];
|
||||
short value;
|
||||
unsigned short value;
|
||||
struct vmeio *pvmeio;
|
||||
long status;
|
||||
|
||||
@ -76,7 +76,7 @@ static long init_record(pai)
|
||||
static long read_ai(pai)
|
||||
struct aiRecord *pai;
|
||||
{
|
||||
short value;
|
||||
unsigned short value;
|
||||
struct vmeio *pvmeio;
|
||||
long status;
|
||||
|
||||
|
@ -44,7 +44,7 @@ static long init_record(pai)
|
||||
struct aiRecord *pai;
|
||||
{
|
||||
char message[100];
|
||||
short value;
|
||||
unsigned short value;
|
||||
struct vmeio *pvmeio;
|
||||
long status;
|
||||
|
||||
@ -89,7 +89,7 @@ static long get_ioint_info(pai,io_type,card_type,card_number)
|
||||
static long read_ai(pai)
|
||||
struct aiRecord *pai;
|
||||
{
|
||||
short value;
|
||||
unsigned short value;
|
||||
struct vmeio *pvmeio;
|
||||
long status;
|
||||
|
||||
|
@ -43,7 +43,7 @@ static long init_record(pai)
|
||||
struct aiRecord *pai;
|
||||
{
|
||||
char message[100];
|
||||
short value;
|
||||
unsigned short value;
|
||||
struct vmeio *pvmeio;
|
||||
long status;
|
||||
|
||||
@ -75,7 +75,7 @@ static long init_record(pai)
|
||||
static long read_ai(pai)
|
||||
struct aiRecord *pai;
|
||||
{
|
||||
short value;
|
||||
unsigned short value;
|
||||
struct vmeio *pvmeio;
|
||||
long status;
|
||||
|
||||
|
@ -49,8 +49,6 @@ static long init_record(pao)
|
||||
struct aoRecord *pao;
|
||||
{
|
||||
char message[100];
|
||||
short value;
|
||||
struct vmeio *pvmeio;
|
||||
|
||||
/* ao.out must be an VME_IO */
|
||||
switch (pao->out.type) {
|
||||
@ -81,14 +79,13 @@ static long write_ao(pao)
|
||||
|
||||
pvmeio = (struct vmeio *)&(pao->out.value);
|
||||
value = pao->rval;
|
||||
status = ao_driver(pvmeio->card,pvmeio->signal,pao->type,&value,&rbvalue);
|
||||
status = ao_driver(pvmeio->card,pvmeio->signal,VMI4100,&value,&rbvalue);
|
||||
if(status==0 || status==-2) pao->rbv = rbvalue;
|
||||
if(status==-1) {
|
||||
if(pao->nsev<MAJOR_ALARM ) {
|
||||
pao->nsta = WRITE_ALARM;
|
||||
pao->nsev = MAJOR_ALARM;
|
||||
}
|
||||
status=2; /*dont convert*/
|
||||
}else if(status==-2) {
|
||||
status=0;
|
||||
if(pao->nsev<MAJOR_ALARM ) {
|
||||
@ -114,12 +111,11 @@ static long special_linconv(pao,after)
|
||||
static void read_ao(pao)
|
||||
struct aoRecord *pao;
|
||||
{
|
||||
int status;
|
||||
unsigned short value;
|
||||
struct vmeio *pvmeio = &pao->out.value.vmeio;
|
||||
|
||||
/* get the value from the ao driver */
|
||||
ao_read(pvmeio->card,pvmeio->signal,pao->type,&value);
|
||||
ao_read(pvmeio->card,pvmeio->signal,VMI4100,&value);
|
||||
/* convert raw readback to egu */
|
||||
switch (pao->linr){
|
||||
case (LINEAR):
|
||||
|
@ -51,8 +51,6 @@ static long init_record(pbi)
|
||||
struct biRecord *pbi;
|
||||
{
|
||||
char message[100];
|
||||
short value;
|
||||
struct vmeio *pvmeio;
|
||||
|
||||
/* bi.inp must be an VME_IO */
|
||||
switch (pbi->inp.type) {
|
||||
|
@ -41,6 +41,7 @@ static long init_record(pbi)
|
||||
struct biRecord *pbi;
|
||||
{
|
||||
char message[100];
|
||||
|
||||
/* bi.inp must be a CONSTANT or a PV_LINK or a DB_LINK or a CA_LINK*/
|
||||
switch (pbi->inp.type) {
|
||||
case (CONSTANT) :
|
||||
@ -65,7 +66,7 @@ static long read_bi(pbi)
|
||||
struct biRecord *pbi;
|
||||
{
|
||||
char message[100];
|
||||
long status,options,nRequest;
|
||||
long options,nRequest;
|
||||
|
||||
/* bi.inp must be a CONSTANT or a DB_LINK or a CA_LINK*/
|
||||
switch (pbi->inp.type) {
|
||||
|
@ -51,8 +51,6 @@ static long init_record(pbi)
|
||||
struct biRecord *pbi;
|
||||
{
|
||||
char message[100];
|
||||
short value;
|
||||
struct vmeio *pvmeio;
|
||||
|
||||
/* bi.inp must be an VME_IO */
|
||||
switch (pbi->inp.type) {
|
||||
|
@ -14,7 +14,7 @@
|
||||
#include <devSup.h>
|
||||
#include <link.h>
|
||||
#include <module_types.h>
|
||||
#include <biRecord.h>
|
||||
#include <boRecord.h>
|
||||
|
||||
|
||||
/* Create the dset for devAiBoMpv902 */
|
||||
@ -48,7 +48,7 @@ static long masks[] = {
|
||||
|
||||
|
||||
static long init_record(pbo)
|
||||
struct biRecord *pbo;
|
||||
struct boRecord *pbo;
|
||||
{
|
||||
char message[100];
|
||||
int value,status;
|
||||
@ -84,20 +84,17 @@ static long init_record(pbo)
|
||||
}
|
||||
|
||||
static long write_bo(pbo)
|
||||
struct biRecord *pbo;
|
||||
struct boRecord *pbo;
|
||||
{
|
||||
struct vmeio *pvmeio;
|
||||
int status;
|
||||
long value;
|
||||
|
||||
|
||||
pvmeio = (struct vmeio *)&(pbo->out.value);
|
||||
if(pbo->val == 0) pbo->rval = 0;
|
||||
else pbo->rval = masks[pvmeio->signal];
|
||||
status = bo_driver(pvmeio->card,pbo->rval,masks[pvmeio->signal],BB902);
|
||||
if(status==0) {
|
||||
pbo->rbv = pbo->val;
|
||||
} else {
|
||||
if(status!=0) {
|
||||
if(pbo->nsev<MAJOR_ALARM ) {
|
||||
pbo->nsta = WRITE_ALARM;
|
||||
pbo->nsev = MAJOR_ALARM;
|
||||
|
@ -65,14 +65,12 @@ static long write_bo(pbo)
|
||||
struct boRecord *pbo;
|
||||
{
|
||||
char message[100];
|
||||
long status;
|
||||
|
||||
/* bo.out must be a CONSTANT or a DB_LINK or a CA_LINK*/
|
||||
switch (pbo->out.type) {
|
||||
case (CONSTANT) :
|
||||
break;
|
||||
case (DB_LINK) :
|
||||
nRequest=1;
|
||||
(void)dbPutLink(&(pbo->out.value.db_link),pbo,DBR_SHORT,pbo->val,1L);
|
||||
break;
|
||||
case (CA_LINK) :
|
||||
|
@ -14,7 +14,7 @@
|
||||
#include <devSup.h>
|
||||
#include <link.h>
|
||||
#include <module_types.h>
|
||||
#include <biRecord.h>
|
||||
#include <boRecord.h>
|
||||
|
||||
|
||||
/* Create the dset for devAiBoXVme220 */
|
||||
@ -48,7 +48,7 @@ static long masks[] = {
|
||||
|
||||
|
||||
static long init_record(pbo)
|
||||
struct biRecord *pbo;
|
||||
struct boRecord *pbo;
|
||||
{
|
||||
char message[100];
|
||||
int value,status;
|
||||
@ -57,6 +57,7 @@ static long init_record(pbo)
|
||||
/* bo.out must be an VME_IO */
|
||||
switch (pbo->out.type) {
|
||||
case (VME_IO) :
|
||||
pvmeio = (struct vmeio *)&(pbo->out.value);
|
||||
status = bo_read(pvmeio->card,masks[pvmeio->signal],&value,XY220);
|
||||
if(status == 0) {
|
||||
pbo->rbv = pbo->val = (value == 0)?0:1;
|
||||
@ -82,20 +83,17 @@ static long init_record(pbo)
|
||||
}
|
||||
|
||||
static long write_bo(pbo)
|
||||
struct biRecord *pbo;
|
||||
struct boRecord *pbo;
|
||||
{
|
||||
struct vmeio *pvmeio;
|
||||
int status;
|
||||
long value;
|
||||
|
||||
|
||||
pvmeio = (struct vmeio *)&(pbo->out.value);
|
||||
if(pbo->val == 0) pbo->rval = 0;
|
||||
else pbo->rval = masks[pvmeio->signal];
|
||||
status = bo_driver(pvmeio->card,pbo->rval,masks[pvmeio->signal],XY220);
|
||||
if(status==0) {
|
||||
pbo->rbv = pbo->val;
|
||||
} else {
|
||||
if(status!=0) {
|
||||
if(pbo->nsev<MAJOR_ALARM ) {
|
||||
pbo->nsta = WRITE_ALARM;
|
||||
pbo->nsev = MAJOR_ALARM;
|
||||
|
@ -53,7 +53,6 @@ static long init_record(pmbbi)
|
||||
struct mbbiRecord *pmbbi;
|
||||
{
|
||||
char message[100];
|
||||
struct vmeio *pvmeio;
|
||||
|
||||
/* mbbi.inp must be an VME_IO */
|
||||
switch (pmbbi->inp.type) {
|
||||
@ -78,9 +77,9 @@ static long read_mbbi(pmbbi)
|
||||
|
||||
|
||||
pvmeio = (struct vmeio *)&(pmbbi->inp.value);
|
||||
status = bi_driver(pvmeio->card,masks[pvmeio->signal],BB910,&value);
|
||||
status = bi_driver(pvmeio->card,pmbbi->mask,BB910,&value);
|
||||
if(status==0) {
|
||||
pmbbi->rval = value;
|
||||
pmbbi->rval = value >> pvmeio->signal;
|
||||
} else {
|
||||
if(pmbbi->nsev<MAJOR_ALARM ) {
|
||||
pmbbi->nsta = READ_ALARM;
|
||||
|
@ -65,7 +65,7 @@ static long read_mbbi(pmbbi)
|
||||
struct mbbiRecord *pmbbi;
|
||||
{
|
||||
char message[100];
|
||||
long status,options,nRequest;
|
||||
long options,nRequest;
|
||||
|
||||
/* mbbi.inp must be a CONSTANT or a DB_LINK or a CA_LINK*/
|
||||
switch (pmbbi->inp.type) {
|
||||
|
@ -53,7 +53,6 @@ static long init_record(pmbbi)
|
||||
struct mbbiRecord *pmbbi;
|
||||
{
|
||||
char message[100];
|
||||
struct vmeio *pvmeio;
|
||||
|
||||
/* mbbi.inp must be an VME_IO */
|
||||
switch (pmbbi->inp.type) {
|
||||
@ -78,9 +77,9 @@ static long read_mbbi(pmbbi)
|
||||
|
||||
|
||||
pvmeio = (struct vmeio *)&(pmbbi->inp.value);
|
||||
status = bi_driver(pvmeio->card,masks[pvmeio->signal],XY210,&value);
|
||||
status = bi_driver(pvmeio->card,pmbbi->mask,XY210,&value);
|
||||
if(status==0) {
|
||||
pmbbi->rval = value;
|
||||
pmbbi->rval = value >> pvmeio->signal;
|
||||
} else {
|
||||
if(pmbbi->nsev<MAJOR_ALARM ) {
|
||||
pmbbi->nsta = READ_ALARM;
|
||||
|
@ -86,7 +86,7 @@ static long write_mbbo(pmbbo)
|
||||
if(pmbbo->sdef) {
|
||||
unsigned long *pvalues = &(pmbbo->zrvl);
|
||||
|
||||
if(pmbbo->val<0 || pmbbo->val>15) {
|
||||
if(pmbbo->val>15) {
|
||||
if(pmbbo->nsev<MAJOR_ALARM ) {
|
||||
pmbbo->nsta = SOFT_ALARM;
|
||||
pmbbo->nsev = MAJOR_ALARM;
|
||||
|
@ -62,7 +62,7 @@ static long init_record(pmbbo)
|
||||
case (VME_IO) :
|
||||
pvmeio = &(pmbbo->out.value.vmeio);
|
||||
pmbbo->mask = masks[pmbbo->nobt]<<pvmeio->signal;
|
||||
status = bo_read(pvmeio->card,pmbbo->mask,&value,BB902);
|
||||
status = bo_read(pvmeio->card,pmbbo->mask,&value,XY220);
|
||||
if(status==0) pmbbo->rval = value>> pvmeio->signal;
|
||||
break;
|
||||
default :
|
||||
@ -86,7 +86,7 @@ static long write_mbbo(pmbbo)
|
||||
if(pmbbo->sdef) {
|
||||
unsigned long *pvalues = &(pmbbo->zrvl);
|
||||
|
||||
if(pmbbo->val<0 || pmbbo->val>15) {
|
||||
if(pmbbo->val>15) {
|
||||
if(pmbbo->nsev<MAJOR_ALARM ) {
|
||||
pmbbo->nsta = SOFT_ALARM;
|
||||
pmbbo->nsev = MAJOR_ALARM;
|
||||
@ -97,9 +97,9 @@ static long write_mbbo(pmbbo)
|
||||
pmbbo->rval = value<<pvmeio->signal;
|
||||
} else pmbbo->rval = ((unsigned long)(pmbbo->val))<<pvmeio->signal;
|
||||
|
||||
status = bo_driver(pvmeio->card,pmbbo->rval,pmbbo->mask,BB902);
|
||||
status = bo_driver(pvmeio->card,pmbbo->rval,pmbbo->mask,XY220);
|
||||
if(status==0) {
|
||||
status = bo_read(pvmeio->card,pmbbo->mask,&value,BB902);
|
||||
status = bo_read(pvmeio->card,pmbbo->mask,&value,XY220);
|
||||
if(status==0) pmbbo->rval = value>> pvmeio->signal;
|
||||
else if(pmbbo->nsev<MAJOR_ALARM ) {
|
||||
pmbbo->nsta = READ_ALARM;
|
||||
|
Reference in New Issue
Block a user