EPICS Home

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  2021  2022  2023  2024  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  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: Can I override record definition twice in an IOC
From: "Kasemir, Kay" <[email protected]>
To: "[email protected]" <[email protected]>
Cc: "[email protected]" <[email protected]>
Date: Fri, 8 Jan 2016 14:18:42 +0000
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, <[email protected]> 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



Replies:
Re: Can I override record definition twice in an IOC Andrew Johnson
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

Navigate by Date:
Prev: Re: Can I override record definition twice in an IOC Ralph Lange
Next: Re: Can I override record definition twice in an IOC 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  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: Can I override record definition twice in an IOC Ralph Lange
Next: Re: Can I override record definition twice in an IOC 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  2021  2022  2023  2024