Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  <20192020  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  <20192020 
<== Date ==> <== Thread ==>

Subject: Re: dbdlint (dbd/db verify tool)
From: Michael Davidsaver via Tech-talk <tech-talk@aps.anl.gov>
To: "Johnson, Andrew N." <anj@anl.gov>, Sue Witherspoon <withers@jlab.org>
Cc: "tech-talk@aps.anl.gov" <tech-talk@aps.anl.gov>
Date: Sun, 31 Mar 2019 11:25:55 -0700
Sue/Andrew,

A topical example came my way this weekend.  For a given input file XtesSxrPlc.db

An IOC with the ESS driver for ADS (TwinCAT PLCs) errors with:

> dbLoadRecords("XtesSxrPlc.db","P=ADS_IOC:OCTET:,PORT=ADS_1")
> Can't set "MR2K3_GPI_1:PRESS.DTYP" to "asynFloat32" No digits to convert
> Error at or before ")" in path "."  file "XtesSxrPlc.db" line 15
> Error: syntax error

dbExpand.pl errors with

> $ /home/mdavidsaver/work/epics/base-git/bin/linux-x86_64/dbExpand.pl -I/home/mdavidsaver/work/epics/base-git/dbd base.dbd XtesSxrPlc.db 
> dbExpand.pl: Syntax error in 'field(ONAM, PRESS OK)'
> Context: record(bi, MR2K3_GPI_1:PRESS_OK) in file 'XtesSxrPlc.db'
>   while reading 'XtesSxrPlc.db'
> dbExpand.pl: Exiting due to errors

dbdlint gives

> $ dbdlint -Wno-quoted -F ../m-epics-twincat-ads/dbd/adsExApp.dbd XtesSxrPlc.db 
> ERROR   XtesSxrPlc.db:961 empty - Empty string not allowed
> ERROR   XtesSxrPlc.db:961 bad-rtyp - TV2K4_VGC_1:ErrMsg has unknown record type ''
> ERROR   XtesSxrPlc.db:1179 empty - Empty string not allowed
> ERROR   XtesSxrPlc.db:1179 bad-rtyp - MR1K4_VGC_1:ErrMsg has unknown record type ''
> ERROR   XtesSxrPlc.db:15 bad-dtyp - record type 'ai' has no DTYP 'asynFloat32'
> ERROR   XtesSxrPlc.db:104 bad-dtyp - record type 'ao' has no DTYP 'asynFloat32'
> ERROR   XtesSxrPlc.db:114 bad-dtyp - record type 'ao' has no DTYP 'asynFloat32'
> ERROR   XtesSxrPlc.db:124 bad-dtyp - record type 'ao' has no DTYP 'asynFloat32'
> ERROR   XtesSxrPlc.db:143 bad-dtyp - record type 'ai' has no DTYP 'asynFloat32'
> ERROR   XtesSxrPlc.db:232 bad-dtyp - record type 'ao' has no DTYP 'asynFloat32'
> ERROR   XtesSxrPlc.db:242 bad-dtyp - record type 'ao' has no DTYP 'asynFloat32'
> ERROR   XtesSxrPlc.db:252 bad-dtyp - record type 'ao' has no DTYP 'asynFloat32'
> ERROR   XtesSxrPlc.db:271 bad-dtyp - record type 'ai' has no DTYP 'asynFloat32'
> ERROR   XtesSxrPlc.db:360 bad-dtyp - record type 'ao' has no DTYP 'asynFloat32'
> ERROR   XtesSxrPlc.db:370 bad-dtyp - record type 'ao' has no DTYP 'asynFloat32'
> ERROR   XtesSxrPlc.db:380 bad-dtyp - record type 'ao' has no DTYP 'asynFloat32'
> ERROR   XtesSxrPlc.db:399 bad-dtyp - record type 'ai' has no DTYP 'asynFloat32'
> ERROR   XtesSxrPlc.db:488 bad-dtyp - record type 'ao' has no DTYP 'asynFloat32'
> ERROR   XtesSxrPlc.db:498 bad-dtyp - record type 'ao' has no DTYP 'asynFloat32'
> ERROR   XtesSxrPlc.db:508 bad-dtyp - record type 'ao' has no DTYP 'asynFloat32'
> ERROR   XtesSxrPlc.db:527 bad-dtyp - record type 'ai' has no DTYP 'asynFloat32'
> ERROR   XtesSxrPlc.db:616 bad-dtyp - record type 'ao' has no DTYP 'asynFloat32'
> ERROR   XtesSxrPlc.db:626 bad-dtyp - record type 'ao' has no DTYP 'asynFloat32'
> ERROR   XtesSxrPlc.db:636 bad-dtyp - record type 'ao' has no DTYP 'asynFloat32'
> ERROR   XtesSxrPlc.db:655 bad-dtyp - record type 'ai' has no DTYP 'asynFloat32'
> ERROR   XtesSxrPlc.db:744 bad-dtyp - record type 'ao' has no DTYP 'asynFloat32'
> ERROR   XtesSxrPlc.db:754 bad-dtyp - record type 'ao' has no DTYP 'asynFloat32'
> ERROR   XtesSxrPlc.db:764 bad-dtyp - record type 'ao' has no DTYP 'asynFloat32'
> ERROR   XtesSxrPlc.db:917 bad-dtyp - record type 'ao' has no DTYP 'asynFloat32'
> ERROR   XtesSxrPlc.db:926 bad-dtyp - record type 'ao' has no DTYP 'asynFloat32'
> ERROR   XtesSxrPlc.db:935 bad-dtyp - record type 'ao' has no DTYP 'asynFloat32'
> ERROR   XtesSxrPlc.db:969 bad-field - recordtype 'ai' has not field 'THST'
> ERROR   XtesSxrPlc.db:1135 bad-dtyp - record type 'ao' has no DTYP 'asynFloat32'
> ERROR   XtesSxrPlc.db:1144 bad-dtyp - record type 'ao' has no DTYP 'asynFloat32'
> ERROR   XtesSxrPlc.db:1153 bad-dtyp - record type 'ao' has no DTYP 'asynFloat32'
> ERROR   XtesSxrPlc.db:1187 bad-field - recordtype 'ai' has not field 'THST'
> ERROR   XtesSxrPlc.db:1230 bad-dtyp - record type 'ao' has no DTYP 'asynFloat32'
> ERROR   XtesSxrPlc.db:1260 bad-dtyp - record type 'ai' has no DTYP 'asynFloat32'



On 3/30/19 1:48 PM, Johnson, Andrew N. via Tech-talk wrote:
...
> It’s a bit stricter than the IOC's parser which IIRC treats an empty string as the value 0, but you probably wouldn’t want to set ASLO to 0 anyway…

I notice that the perl parser errors on 'field(ONAM, PRESS OK)'
while the other two don't.  I remember that you and I disagree
about whether/when field values should be quoted.  I think they
always should be.  This is is part of the reason dbdlint treats
unquoted values as a warning.

Can we agree that field values with whitespace should always be quoted?

References:
dbdlint (dbd/db verify tool) Sue Witherspoon via Tech-talk
Re: dbdlint (dbd/db verify tool) Johnson, Andrew N. via Tech-talk

Navigate by Date:
Prev: Build problem Johnson, Andrew N. via Tech-talk
Next: RE: ADpython issues with openCV tom.cobb--- via Tech-talk
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  <20192020 
Navigate by Thread:
Prev: Re: dbdlint (dbd/db verify tool) Johnson, Andrew N. via Tech-talk
Next: Re: dbdlint (dbd/db verify tool) Michael Davidsaver via Tech-talk
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  <20192020 
ANJ, 01 Apr 2019 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·