EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  <20022003  2004  2005  2006  2007  2008  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  <20022003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: RE: dbf_text vs. dbr_text
From: "Jeff Hill" <[email protected]>
To: "'Geoff Savage'" <[email protected]>, <[email protected]>
Date: Wed, 20 Mar 2002 12:26:14 -0700
Geoff,

I agree that at first look the dbf_text array appears to be misaligned.
When Roger Cole created this array for the original EPICS archiver, I
think that he intended for this array to be used only with the following
macros, but unfortunately he did not make the array private as would be
preferred when employing modern interface design methods. At this stage
we are making only small changes in the original CA client interfaces so
that old programs continue to run. Therefore, it is unlikely that this
situation will be addressed except by a new C++ based CA client API.

#define dbf_type_to_text(type)   \
    (  ((type) >= -1 && (type) < dbf_text_dim-2) ? \
        dbf_text[type+1] : dbf_text_invalid  )

#define dbf_text_to_type(text, type)   \
    for (type=dbf_text_dim-3; type>=0; type--) { \
        if (strcmp(text, dbf_text[type+1]) == 0) \
        break; \
    }

Jeff

> -----Original Message-----
> From: Geoff Savage [mailto:[email protected]]
> Sent: Wednesday, March 20, 2002 11:02 AM
> To: [email protected]
> Subject: dbf_text vs. dbr_text
> 
> We are using epics v3.13.4.  In db_access.h there are arrays
containing
> the string representation of the dbr and dbf types.  To me they appear
> inconsistent.  Based on these definitions the dbf_text entries are
> incremented by one as compared to the dbr_text entries.  What am I
> missing?
> 
> Geoff
> 
> /* data request buffer types */
> #define DBR_STRING      DBF_STRING
> #define DBR_INT         DBF_INT
> #define DBR_SHORT       DBF_INT
> #define DBR_FLOAT       DBF_FLOAT
> #define DBR_ENUM        DBF_ENUM
> #define DBR_CHAR        DBF_CHAR
> #define DBR_LONG        DBF_LONG
> #define DBR_DOUBLE      DBF_DOUBLE
> 
> epicsShareDef READONLY char *dbf_text[] = {
>         "TYPENOTCONN",
>         "DBF_STRING",
>         "DBF_SHORT",
>         "DBF_FLOAT",
>         "DBF_ENUM",
>         "DBF_CHAR",
>         "DBF_LONG",
>         "DBF_DOUBLE",
>         "DBF_NO_ACCESS"
>     };
> 
> epicsShareDef READONLY char *dbr_text[LAST_BUFFER_TYPE+1] = {
>         "DBR_STRING",
>         "DBR_SHORT",
>         "DBR_FLOAT",
>         "DBR_ENUM",
>         "DBR_CHAR",
>         "DBR_LONG",
>         "DBR_DOUBLE",
>         "DBR_STS_STRING",
>         "DBR_STS_SHORT",
>         "DBR_STS_FLOAT",
>         "DBR_STS_ENUM",
>         "DBR_STS_CHAR",
>         "DBR_STS_LONG",
>         "DBR_STS_DOUBLE",
>         "DBR_TIME_STRING",
>         "DBR_TIME_SHORT",
>         "DBR_TIME_FLOAT",
>         "DBR_TIME_ENUM",
>         "DBR_TIME_CHAR",
>         "DBR_TIME_LONG",
>         "DBR_TIME_DOUBLE",
>         "DBR_GR_STRING",
>         "DBR_GR_SHORT",
>         "DBR_GR_FLOAT",
>         "DBR_GR_ENUM",
>         "DBR_GR_CHAR",
>         "DBR_GR_LONG",
>         "DBR_GR_DOUBLE",
>         "DBR_CTRL_STRING",
>         "DBR_CTRL_SHORT",
>         "DBR_CTRL_FLOAT",
>         "DBR_CTRL_ENUM",
>         "DBR_CTRL_CHAR",
>         "DBR_CTRL_LONG",
>         "DBR_CTRL_DOUBLE",
>         "DBR_PUT_ACKT",
>         "DBR_PUT_ACKS",
>         "DBR_STSACK_STRING",
>         "DBR_CLASS_NAME",
>     };



References:
dbf_text vs. dbr_text Geoff Savage

Navigate by Date:
Prev: RE: ECA_BADTYPE Jeff Hill
Next: EPICS iocLog file size limitation Kevin Tsubota
Index: 1994  1995  1996  1997  1998  1999  2000  2001  <20022003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: dbf_text vs. dbr_text Geoff Savage
Next: EPICS iocLog file size limitation Kevin Tsubota
Index: 1994  1995  1996  1997  1998  1999  2000  2001  <20022003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 10 Aug 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·