EPICS Controls 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  2019  2020  2021  <20222023  2024  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  2019  2020  2021  <20222023  2024 
<== Date ==> <== Thread ==>

Subject: RE: Questions from the Static Database Access chapter of the Application Developer's Guide
From: "Wang, Andrew via Tech-talk" <tech-talk at aps.anl.gov>
To: "Johnson, Andrew N." <anj at anl.gov>
Cc: EPICS tech-talk <tech-talk at aps.anl.gov>
Date: Wed, 2 Feb 2022 22:27:13 +0000

HI Andrew,

 

Thank you for your insight! Seeing dbReadDatabase being used in dbLoadRecords and dbLoadDatabase did help elucidate some of my confusion.

 

I tried to run the sample Expand Include code listed in page 213 and page 214, however I am presented with the following message.

 

Record "test" is of unknown type "ao"

Error at or before ")" in path "."  file "test.db" line 1

 

I have a simple record called test, which is an analog output record. Do I need to register the record type “ao”?

 

Thanks,

Andy

 

From: Johnson, Andrew N. <anj at anl.gov>
Sent: Monday, January 31, 2022 4:24 PM
To: Wang, Andrew <wang126 at llnl.gov>
Cc: EPICS tech-talk <tech-talk at aps.anl.gov>
Subject: Re: Questions from the Static Database Access chapter of the Application Developer's Guide

 

Hi Andy,

 

On Jan 31, 2022, at 1:53 AM, Wang, Andrew via Tech-talk <tech-talk at aps.anl.gov> wrote:

 

I have a quick question regarding dbReadDatabase. Based upon my understanding, it seems that it is meant for loading a file containing database definitions, which I presume comes from files with a .dbd extension. However, in Chapter 14.16.1, I noticed that one of the lines of code seems to imply that we can pass .db files into the arguments of dbReadDatabase. I was wondering if that is a typo.

 

No, both dbReadDatabase() can be used to read either type of file, the IOC has a single parser which handles all of the syntax described in the database definition chapter 6.2.

 



Additionally, I am a bit curious about how to utilize some of the functions pertaining to record instances. For instance, dbGetNRecords allows us to get the number of record instances for the record type that DBENTRY references. However, I can’t locate a function that allows me to pass a filename to a record instance file with all the record instances within it.

 

The dbStaticLib API was designed for writing tools to manipulate databases as well as for internal use by the IOC, and it doesn’t encompass everything you need, look at the dbAccessDefs.h header for the dbLoadDatabase() and dbLoadRecords() functions (AppDev chapter 6.10) for instance. Those functions both call dbReadDatabase() to do the actual parsing.

 

HTH,

 

- Andrew

 

-- 

Complexity comes for free, simplicity you have to work for.

 


Replies:
Re: Questions from the Static Database Access chapter of the Application Developer's Guide Andrew Johnson via Tech-talk
References:
Questions from the Static Database Access chapter of the Application Developer's Guide Wang, Andrew via Tech-talk
Re: Questions from the Static Database Access chapter of the Application Developer's Guide Johnson, Andrew N. via Tech-talk

Navigate by Date:
Prev: Re: Configuring serial communication with Lakeshore 331 via Moxa Heinz Junkes via Tech-talk
Next: .RE: Configuring serial communication with Lakeshore 331 via Moxa (Mark Rivers) Koennecke Mark (PSI) 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  2019  2020  2021  <20222023  2024 
Navigate by Thread:
Prev: Re: Questions from the Static Database Access chapter of the Application Developer's Guide Johnson, Andrew N. via Tech-talk
Next: Re: Questions from the Static Database Access chapter of the Application Developer's Guide Andrew Johnson 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  2019  2020  2021  <20222023  2024 
ANJ, 14 Sep 2022 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·