jba 2/6/91
This commit is contained in:
@@ -118,6 +118,8 @@
|
||||
#include <recSup.h>
|
||||
#include <special.h>
|
||||
|
||||
long jba_debug=0;
|
||||
|
||||
long dbPut();
|
||||
|
||||
#define MAX_LOCK 10
|
||||
@@ -208,11 +210,17 @@ long dbProcess(paddr)
|
||||
struct dbCommon *precord=(struct dbCommon *)(paddr->precord);
|
||||
long status;
|
||||
|
||||
if (jba_debug)
|
||||
printf ("-------------------------%s dbProcess entered -----------------\n",precord->name);
|
||||
|
||||
/* If already active dont process */
|
||||
if(precord->pact) {
|
||||
struct rset *prset;
|
||||
struct valueDes valueDes;
|
||||
|
||||
if (jba_debug)
|
||||
printf ("-------------------------%s already active -----------------\n",precord->name);
|
||||
|
||||
/* raise scan alarm after MAX_LOCK times */
|
||||
if(precord->stat==SCAN_ALARM) return(0);
|
||||
if(precord->lcnt++ !=MAX_LOCK) return(0);
|
||||
@@ -249,6 +257,9 @@ long dbProcess(paddr)
|
||||
/* if disabled just return success */
|
||||
if(precord->disa == precord->disv) {
|
||||
|
||||
if (jba_debug)
|
||||
printf ("-------------------------%s is disabled -----------------\n",precord->name);
|
||||
|
||||
return(0);
|
||||
}
|
||||
|
||||
@@ -262,6 +273,9 @@ long dbProcess(paddr)
|
||||
/* process record */
|
||||
status = (*prset->process)(paddr);
|
||||
|
||||
if (jba_debug)
|
||||
printf ("-------------------------%s processed ------------------------\n",precord->name);
|
||||
|
||||
return(status);
|
||||
|
||||
}
|
||||
@@ -3488,11 +3502,11 @@ long no_elements;
|
||||
long offset;
|
||||
{
|
||||
double *pdest=(double *)paddr->pfield;
|
||||
float value;
|
||||
double value;
|
||||
|
||||
if(nRequest==1 && offset==0) {
|
||||
if(sscanf(pbuffer,"%lf",&value) == 1) {
|
||||
*pdest = (double)value;
|
||||
*pdest = value;
|
||||
return(0);
|
||||
}
|
||||
}
|
||||
@@ -3506,17 +3520,15 @@ long nRequest;
|
||||
long no_elements;
|
||||
long offset;
|
||||
{
|
||||
unsigned short *pdest=( unsigned short *)paddr->pfield;
|
||||
unsigned short value;
|
||||
struct rset *prset;
|
||||
short record_type=(paddr->record_type);
|
||||
long status;
|
||||
|
||||
if(nRequest==1 && offset==0) {
|
||||
if(sscanf(pbuffer,"%hu",&value) == 1) {
|
||||
*pdest = value;
|
||||
return(0);
|
||||
}
|
||||
else return(-1);
|
||||
}
|
||||
return(-1);
|
||||
if((prset=GET_PRSET(record_type)) && (prset->put_enum_str))
|
||||
return( (*prset->put_enum_str)(paddr,pbuffer) );
|
||||
status=S_db_noRSET;
|
||||
recGblRecSupError(status,paddr,"dbPutField","put_enum_str");
|
||||
return(S_db_badDbrtype);
|
||||
}
|
||||
|
||||
static long putStringGchoice(paddr,pbuffer,nRequest,no_elements,offset)
|
||||
@@ -5014,7 +5026,7 @@ long offset;
|
||||
else
|
||||
status=S_db_precision;
|
||||
if(!RTN_SUCCESS(status)) {
|
||||
recGblRecSupError(status,paddr,"db_put_field","get_precision");
|
||||
recGblRecSupError(status,paddr,"dbPutField","get_precision");
|
||||
return(status);
|
||||
}
|
||||
|
||||
@@ -5255,7 +5267,7 @@ long offset;
|
||||
else
|
||||
status=S_db_precision;
|
||||
if(!RTN_SUCCESS(status)) {
|
||||
recGblRecSupError(status,paddr,"db_put_field","get_precision");
|
||||
recGblRecSupError(status,paddr,"dbPutField","get_precision");
|
||||
return(status);
|
||||
}
|
||||
|
||||
|
||||
@@ -191,6 +191,7 @@ struct event_user
|
||||
|
||||
bfill(evuser, sizeof(*evuser), NULL);
|
||||
evuser->firstque.evuser = evuser;
|
||||
FASTLOCKINIT(&(evuser->firstque.writelock));
|
||||
/*
|
||||
init_event_que(&evuser->firstevent);
|
||||
|
||||
@@ -291,6 +292,7 @@ register struct event_block *pevent; /* ptr to event blk (not required) */
|
||||
tmp_que->evuser = evuser;
|
||||
ev_que->nextque = tmp_que;
|
||||
ev_que = tmp_que;
|
||||
FASTLOCKINIT(&(ev_que->writelock));
|
||||
break;
|
||||
}
|
||||
ev_que = ev_que->nextque;
|
||||
|
||||
@@ -188,6 +188,16 @@
|
||||
#include <taskParams.h>
|
||||
#include <module_types.h>
|
||||
|
||||
/* local routines */
|
||||
static int add_to_periodic_list();
|
||||
static int add_to_io_event_list();
|
||||
static int add_to_event_list();
|
||||
static int delete_from_periodic_list();
|
||||
static int delete_from_io_event_list();
|
||||
static int delete_from_event_list();
|
||||
static long get_io_info();
|
||||
|
||||
|
||||
|
||||
|
||||
typedef unsigned long TIME;
|
||||
|
||||
@@ -1047,7 +1047,7 @@ static int dbpr_report(pname, paddr, interest_level, pMsgBuff, tab_size)
|
||||
if(n>(sizeof(temp_buf)-2)/2) n = (sizeof(temp_buf)-2)/2;
|
||||
for (i=0; i<n; i++, (ptemp_buf+=2), pchar++) {
|
||||
value = *((unsigned char *)pchar);
|
||||
sprintf(ptemp_buf,"%-2.2x",value);
|
||||
sprintf(ptemp_buf,"%02x",value);
|
||||
}
|
||||
*ptemp_buf = 0;
|
||||
sprintf(pmsg, "%s: %s", pfield_name,temp_buf);
|
||||
|
||||
@@ -49,7 +49,6 @@ char * pfilename;
|
||||
logMsg("iocInit can only be called once\n");
|
||||
return(-1);
|
||||
}
|
||||
initialized = TRUE;
|
||||
if(status=initBusController()) {
|
||||
logMsg("iocInit aborting because initBusController failed\n");
|
||||
return(-1);
|
||||
@@ -58,9 +57,11 @@ char * pfilename;
|
||||
logMsg("iocInit aborting because sdrLoad failed\n");
|
||||
return(-1);
|
||||
}
|
||||
initialized = TRUE;
|
||||
logMsg("sdrLoad completed\n");
|
||||
/* enable interrupt level 5 */
|
||||
/* enable interrupt level 5 and 6 */
|
||||
sysIntEnable(5);
|
||||
sysIntEnable(6);
|
||||
if(initDrvSup()==0) logMsg("Drivers Initialized\n");
|
||||
if(initRecSup()==0) logMsg("Record Support Initialized\n");
|
||||
if(initDevSup()==0) logMsg("Device Support Initialized\n");
|
||||
|
||||
Reference in New Issue
Block a user