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  <20132014  2015  2016  2017  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  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: Multiple patterns/ .sub files for the same .db file
From: Andrew Johnson <[email protected]>
To: Tito Körner <[email protected]>
Cc: [email protected]
Date: Tue, 10 Sep 2013 13:01:02 -0500
Hi Tito,

On 09/10/2013 12:06 PM, Tito Körner wrote:
I have .sub file looking like this:

file "hvtest.db"
{
     pattern {PROTO, P, BOXNO, LEVELNO, CHANNELNO, ELEMENTNO}
         {hvtest.proto, HV, 19, 0, 0, 0}
         {hvtest.proto, HV, 19, 0, 1, 1}
}

Now I would need another pattern in the same .db file looking like this:

file "hvtest.db"
{
    pattern {EELO, EEUP}
         {dhcp, DHCP}
         {ip, IP}
}

I tried two dbLoadTemplate - lines in my .cmd file

dbLoadTemplate "a.sub"
dbLoadTemplate "b.sub"

but I then got Error messages saying the substitutions from the first
file are undefined. I also tried to put both patterns in one file (I
found examples with different patterns for different .db files). But
then again I get error messages saying the substitutions are undefined.
When I directly append the second pattern after the first, I get a
syntax error message. So how can this be done?

Your examples above do not make sense for template substitutions; does the hvtest.db template file use macros named PROTO, P, BOXNO etc, or EELO and EEUP, or all of them? If it has all of them you will need to combine the macro values, but I don't know exactly how -- this might be one way although I suspect it's wrong:

file "hvtest.db"
{
    pattern {PROTO, P, BOXNO, LEVELNO, CHANNELNO, ELEMENTNO, EELO, EEUP}
        {hvtest.proto, HV, 19, 0, 0, 0, dhcp, DHCP}
        {hvtest.proto, HV, 19, 0, 1, 1, dhcp, DHCP}
        {hvtest.proto, HV, 19, 0, 0, 0, ip, IP}
        {hvtest.proto, HV, 19, 0, 1, 1, ip, IP}
}


If I've misunderstood what you're trying to do you might need to include a snippet from the hvtest.db file as well for us to understand your question properly.

HTH,

- Andrew
--
Advertising may be described as the science of arresting the human
intelligence long enough to get money from it. -- Stephen Leacock

References:
Multiple patterns/ .sub files for the same .db file Tito Körner

Navigate by Date:
Prev: Multiple patterns/ .sub files for the same .db file Tito Körner
Next: Re: motor record: soft motor & DMOV Konrad, Martin
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Multiple patterns/ .sub files for the same .db file Tito Körner
Next: RE: Multiple patterns/ .sub files for the same .db file Emmanuel Mayssat
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 20 Apr 2015 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·