EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  <20072008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  <20072008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: cvt_dbaddr called twice
From: "Lei Ge" <[email protected]>
To: [email protected]
Date: Wed, 25 Jul 2007 19:29:01 +0800
Hello, everyone,

I made a record support for our special needs. There are 2 arrays in this 
record support, and I wish to read them from host caget. We are using 
base3.13.8.

The definitions for these fields in the dbd file are:  

       field(BCME,DBF_NOACCESS) { 
               prompt("BCM readout for BER") 
               extra("char bcme[402] ") 
               asl(ASL1) 
               special(SPC_DBADDR) 
               interest(3) 
       } 
       field(BCMP,DBF_NOACCESS) { 
               prompt("BCM readout for BER") 
               extra("char bcmp[402] ") 
               asl(ASL1) 
               special(SPC_DBADDR) 
               interest(3) 
       } 

But whenever I caget one of these fields, the cvt_dbaddr is called twice. Is 
it normally called twice? What's the possible problem in my codes?

static long cvt_dbaddr(paddr) 
   struct dbAddr *paddr; 
{ 
   struct bktRecord *pbkt=(struct bktRecord *)paddr->precord; 
   struct bktdset *pdset = (struct bktdset *)(pbkt->dset); 

   if (bkt_debug>3) { 
      printf("cvt_dbaddr\n"); 
      printf("pbkt bcme, %u, bcmp, %u\n", (long)pbkt->bcme, (long)pbkt- 
>bcmp); 
      printf("paddr pfield %u\n", paddr->pfield); 
     } 

   if ( ((long)paddr->pfield)==((long)pbkt->bcme) ) { 
      if (bkt_debug>1) printf("cvt_dbaddr for bcme\n"); 
      (*pdset->read_rfm)(pbkt); 
     } else if ( ((long)paddr->pfield)==((long)pbkt->bcmp) ) { 
      if (bkt_debug>1) printf("cvt_dbaddr for bcmp\n"); 
      (*pdset->read_rfm)(pbkt); 
     } else printf("cvt_dbaddr, where is it called?\n"); 

/*    paddr->pfield = (void *)(pbkt->bcme); */ 
   paddr->no_elements = 402; 
   paddr->field_type = DBF_CHAR; 
   paddr->field_size = 1; 
   paddr->dbr_field_type = DBF_CHAR; 
   return(0); 
} 

Thank you all, 

Ge 


Replies:
Re: cvt_dbaddr called twice Noboru Yamamoto
References:
medm with epics-base 3.14.6+ Emmanuel Mayssat
Re: medm with epics-base 3.14.6+ Ralph Lange

Navigate by Date:
Prev: Re: Alternative for National instruments card Heinrich du Toit
Next: seq - delay() Heinrich du Toit
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  <20072008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: medm with epics-base 3.14.6+ Ralph Lange
Next: Re: cvt_dbaddr called twice Noboru Yamamoto
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  <20072008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 10 Nov 2011 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·