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  <20162017  2018  2019  2020  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  <20162017  2018  2019  2020 
<== Date ==> <== Thread ==>

Subject: Re: Can I override record definition twice in an IOC
From: Andrew Johnson <anj@aps.anl.gov>
To: <tech-talk@aps.anl.gov>
Date: Fri, 8 Jan 2016 10:18:26 -0600
To complete the documentation around this topic:

There are some some cases/people/projects/sites that want to flag
loading duplicate records as an error. For them, there is a control
variable that can be set to make dbLoadRecords() print an error message
if a record already exists with the same name (available in all Base
releases back to 3.14.8). From the iocsh the command to set that is
    var dbRecordsOnceOnly 1
or from the VxWorks shell
    dbRecordsOnceOnly=1

- Andrew


On 01/08/2016 08:18 AM, Kasemir, Kay wrote:
> Hi:
> 
> Loading several *.db files can be a very useful approach.
> Typically you first load *.db files that define all the records, then later load additional *.db files which add fields to those records.
> Loading more *.db files that modify fields that were already defined can be a bit confusing to maintain in the long run, but adding fields is often a good idea.
> For example, the original *.db files can define the logic, and later you load *.db files that set ASG.
> For this to “work”, the record type must remain the same, unless you have a very new release of EPICS base.
> From the 3.15.0.2 release notes:
> ------
> Database field setting updates
> 
> A database (.db) file loaded by an IOC does not have to repeat the record type of a record that has already been loaded. It may replace the first parameter of the record(type, name) statement with an asterisk character inside double-quotes, "*" instead. Thus the following is a legal database file:
> 
> record(ao, "ao1") {}
> record("*", "ao1") {
>     field(VAL, 10)
> }
> ------
> 
> 
> The “*” for a type was specifically supported to allow
> 
> record(ao, “some_record)
> {
>   logic-related fields ..
> }
> 
> Then another *.db file:
> 
> # Don’t care about the record type, just want to configure access security:
> record(“*", “some_record)
> {
>   field(ASG, “SPECIAL”)
> }
> 
> -Kay
> 
>>> On Fri, Jan 8, 2016 at 7:40 AM, <John.Holt@tessella.com> wrote:
>>> I have implemented a record in two separate files which I then use substitutions to combine into a single db file. I am unsure I am allowed to do this after talking to a colleague; he is worried that this will create 2 PVs with identical names. My DB file contains (after make):
>>>
>>>
>>> record(ai, "NAME") {
>>>   field(DESC, "A PV")
>>>   field(EGU, "Gauss")
>>> }
>>>
>>> ...
>>>
>>> record(ai, "NAME") {
>>>   field(FLNK, "ANOTHER_RECORD")
>>> }
>>>
>>> Does this do what I am expecting, which is to create a single PV:
>>>
>>>
>>> record(ai, "NAME") {
>>>   field(DESC, "A PV")
>>>   field(EGU, "Gauss")
>>>   field(FLNK, "ANOTHER_RECORD")
>>> }
>>>
>>> Thank you.
>>>
>>> John
> 
> 

-- 
There are only two hard problems in distributed systems: 2. Exactly-once
delivery 1. Guaranteed order of messages 2. Exactly-once delivery
 -- Mathias Verraes

References:
Can I override record definition twice in an IOC John . Holt
Re: Can I override record definition twice in an IOC bob dalesio
Re: Can I override record definition twice in an IOC Ralph Lange
Re: Can I override record definition twice in an IOC Kasemir, Kay

Navigate by Date:
Prev: Re: Can I override record definition twice in an IOC Kasemir, Kay
Next: Re: mrfioc2 loading error at vxWorks 6.9 Andrew Johnson
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  <20162017  2018  2019  2020 
Navigate by Thread:
Prev: Re: Can I override record definition twice in an IOC Kasemir, Kay
Next: terminal server/serial server/console management switch recommendations? Maren Purves
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  <20162017  2018  2019  2020 
ANJ, 15 Jul 2016 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·